Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c738c41
feat: WooCommerce Bookings trigger initiated
RishadAlam Oct 12, 2024
afc0f60
feat: WCBookings logo added
RishadAlam Oct 12, 2024
ac1241a
remove: WC Booking triggers are deprecated
RishadAlam Oct 12, 2024
f6bfbf1
feat: GoogleSheet OneClickAuth Feature Completed.
NiloyDas789 Oct 17, 2024
0fc2393
chore: Some ux improvement and design changes.
NiloyDas789 Oct 21, 2024
1d5f7e4
Fix: Next button disable issue fixed.
NiloyDas789 Oct 23, 2024
81b0ef8
Merge branch 'main' into niloy-dev
NiloyDas789 Oct 23, 2024
3848ef3
Fix: Google delete account issue fixed.
NiloyDas789 Oct 23, 2024
0295777
fix: WooCommerce version condition added
RishadAlam Oct 23, 2024
445154e
fix: authorization system not authorize sometimes
shuvomohajan Oct 23, 2024
ec20a55
fix: googlesheet window.close issue fixed.
NiloyDas789 Oct 23, 2024
8bf13b0
feat: WCBookings status dependency added
RishadAlam Oct 24, 2024
0322313
Merge branch 'main' into trigger/wcbookings
RishadAlam Oct 24, 2024
e099d17
remove: Woocommerce duplicate line
RishadAlam Oct 24, 2024
64ffedd
feat: WCBookings integrations helpers added
RishadAlam Oct 24, 2024
412fc11
fix: Webhooks body field mapping index
RishadAlam Oct 24, 2024
230b4ae
refactor: upload feature image converted to recursive
RishadAlam Oct 26, 2024
a71519c
refactor: get acf field groups early return added
RishadAlam Oct 26, 2024
16b258a
Fix: Delete user issue fixed.
NiloyDas789 Oct 26, 2024
c5fae06
chore: selectedUser, setSelectedUser renamed to selectedUserIndex and…
NiloyDas789 Oct 27, 2024
021add4
refac: handleAuthUser renamed to handleConnectionSelection
NiloyDas789 Oct 27, 2024
6123640
refac: setSheetConf called 2 times issue resolved.
NiloyDas789 Oct 27, 2024
5cc1682
refac: manageAuth func renamed to processAuth
NiloyDas789 Oct 27, 2024
844291c
refac: handleConnectionSelection moved to UserRadio button.
NiloyDas789 Oct 27, 2024
6650451
refac: TrashIcn component used.
NiloyDas789 Oct 27, 2024
ee889d4
refac: StoreAuthDataController class renamed to AuthDataController
NiloyDas789 Oct 27, 2024
0ebe5e8
refac: grant token-related logic rolled back to the previous version
NiloyDas789 Oct 27, 2024
e640758
refac: $redirectURI removed from global state.
NiloyDas789 Oct 27, 2024
176aae6
refactor: Webhooks body
RishadAlam Oct 27, 2024
86d7542
fix: WooCommerce plugin activation checks added
RishadAlam Oct 27, 2024
4de8b8f
refactor: Webhook formFields
RishadAlam Oct 27, 2024
d837a21
feat: WCBookings formFields store into database
RishadAlam Oct 27, 2024
79791dd
chore: store formFields into flowDetails on refetch
RishadAlam Oct 27, 2024
471ed52
Merge branch 'main' into rishad-dev-tmp
RishadAlam Oct 28, 2024
ee31384
chore: telemetry version upgraded
RishadAlam Oct 28, 2024
2e51346
chore: lazy import added on plugin pages
RishadAlam Oct 28, 2024
bbe4d43
refac: grantTokenAtom renamed to authInfoAtom
NiloyDas789 Oct 28, 2024
16a26ff
refac: UserRadioButton renamed to AuthAccRadioBtn
NiloyDas789 Oct 28, 2024
141c3e3
refac: RadioInput component renamed to SelectAuthTypRadioBtn
NiloyDas789 Oct 28, 2024
e361815
refac: SelectAuthTypRadioBtn and AuthAccRadioBtn moved to OneClickRad…
NiloyDas789 Oct 28, 2024
0d0bd4f
refac: Added some comments in AuthAccRadioBtn component.
NiloyDas789 Oct 28, 2024
11b1e6d
chore: Async debounce added into analyticsHandler api req
RishadAlam Oct 28, 2024
8031517
refac: Some post requests converted to get request in ajax.php file.
NiloyDas789 Oct 28, 2024
91665d4
refac: Sanitization implemented in some files.
NiloyDas789 Oct 29, 2024
f2356f8
refac: Sanitization implemented on actionName field.
NiloyDas789 Oct 29, 2024
4549900
refac: CredentialsController renamed to OneClickCredentialController
NiloyDas789 Oct 29, 2024
a57755c
refac: AuthAccRadioBtn namespace changed in GoogleSheetInfo Component.
NiloyDas789 Oct 29, 2024
d88a80e
refac: setState function used with a callback pattern
NiloyDas789 Oct 29, 2024
7a9c16e
refac: handleDelete func refactored in AuthAccRadioBtn Component.
NiloyDas789 Oct 29, 2024
6d12ccb
fix: unnecessary loading issue fixed.
NiloyDas789 Oct 29, 2024
0d71835
refactor: Post Upload Feature Image function refactored
RishadAlam Oct 30, 2024
327aae2
refac: Object in AuthDataController sanitized via sanitize_text_field
NiloyDas789 Oct 30, 2024
4570085
fix: wp_generate_attachment_metadata exif warning
RishadAlam Oct 30, 2024
6786dea
fix: Unnecesary Request sending issue fixed.
NiloyDas789 Oct 30, 2024
3cf4794
refac: react functional update pattern used in Googlesheet component.
NiloyDas789 Oct 30, 2024
1e1ebed
refac: onclick event replaced with onchange in SelectAuthTypRadioBtn …
NiloyDas789 Oct 30, 2024
579aa62
refac: useSetRecoilState used instead of useRecoilState in AuthResponse.
NiloyDas789 Oct 30, 2024
ccc3f6d
refac: authInfo object data set type refactored.
NiloyDas789 Oct 30, 2024
d7b6e3c
refac: Sanitized objects in AuthDataController
NiloyDas789 Oct 30, 2024
1713715
fix: googlesheet info page issue fixed.
NiloyDas789 Oct 30, 2024
12c302e
refac: oneClickAuth variable changed to oneClickAuthCredentials
NiloyDas789 Oct 30, 2024
57a80c2
refac: AuthAccRadioBtn component renamed to AuthorizationAccountList
NiloyDas789 Oct 30, 2024
a8d4ec2
refac: SelectAuthTypRadioBtn component renamed to SelectAuthorization…
NiloyDas789 Oct 30, 2024
11e3791
Merge branch 'niloy-dev' into plugin-update
NiloyDas789 Oct 30, 2024
0c13d77
Merge branch 'rishad-dev-tmp' into plugin-update
NiloyDas789 Oct 30, 2024
3698915
update: Version updated to 2.3.2
NiloyDas789 Oct 30, 2024
5d333c8
Merge branch 'trigger/wcbookings' into rishad-dev-tmp
RishadAlam Oct 30, 2024
f704aa2
Merge branch 'rishad-dev-tmp' into plugin-update
NiloyDas789 Oct 30, 2024
ce6e4e8
chore: date updated of readme.
NiloyDas789 Oct 30, 2024
41d8980
refac: Object sanitized before checking empty in AuthDataController.
NiloyDas789 Oct 30, 2024
e71d485
Merge branch 'niloy-dev' into plugin-update
NiloyDas789 Oct 30, 2024
f344a7e
chore: pro & free triggers are alphabetically sorted
RishadAlam Oct 30, 2024
bd08aca
Merge remote-tracking branch 'origin/plugin-update' into rishad-dev-tmp
RishadAlam Oct 30, 2024
44e3d21
refactor: Changelog toggle style
RishadAlam Oct 30, 2024
988dd62
chore: create language directory file added
RishadAlam Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@
"testdox",
"yoast"
],
"[typescript, javascript, typescriptreact, json, css]": {
"[typescript, javascript, typescriptreact, javascriptreact, json, css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[php]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
6 changes: 3 additions & 3 deletions bitwpfi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Bit Integrations
* Plugin URI: https://bitapps.pro/bit-integrations
* Description: Bit Integrations is a platform that integrates with over 200+ different platforms to help with various tasks on your WordPress site, like WooCommerce, Form builder, Page builder, LMS, Sales funnels, Bookings, CRM, Webhooks, Email marketing, Social media and Spreadsheets, etc
* Version: 2.3.1
* Version: 2.3.2
* Author: Automation & Integration Plugin - Bit Apps
* Author URI: https://bitapps.pro
* Text Domain: bit-integrations
Expand All @@ -20,10 +20,10 @@
exit;
}
global $btcbi_db_version;
$btcbi_db_version = '1.0';
$btcbi_db_version = '1.1';

// Define most essential constants.
define('BTCBI_VERSION', '2.3.1');
define('BTCBI_VERSION', '2.3.2');
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);

require_once plugin_dir_path(__FILE__) . 'includes/loader.php';
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"require": {
"bitapps/wp-telemetry": "^0.0.8",
"bitapps/wp-telemetry": "v0.0.9",
"typisttech/imposter-plugin": "*"
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion frontend-dev/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"printWidth": 105,
"singleQuote": true,
"trailingComma": "none",
"jsxBracketSameLine": true
Expand Down
8 changes: 8 additions & 0 deletions frontend-dev/bin/mkdir-language.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const fs = require('fs')
const path = require('path')

const dirPath = path.join(__dirname, '../../languages')

if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true })
}
2 changes: 1 addition & 1 deletion frontend-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"i18n": "pnpm i18n:gettext-parser && pnpm i18n:php && pnpm i18n:pot",
"i18n:gettext-parser": "npx react-gettext-parser --output ./locale.pot --config ./gettext-parser.config.js './src/**/{*.js,*.jsx}'",
"i18n:json": "npx po2json locale.pot ../languages/btcbi-admin-script.json -f jed1.x",
"i18n:mkdir": "[ ! -d \"../languages/\" ] && mkdir '../languages/'",
"i18n:mkdir": "node ./bin/mkdir-language.js",
"i18n:php": "node ./pot-to-php.js locale.pot ../languages/generatedString.php bit-integrations",
"i18n:pot": "wp i18n make-pot ../ --include=*.php --skip-js --slug=bit-integrations --headers='{\"Last-Translator\":\"developer@bitcode.pro\",\"Language-Team\":\"support@bitcode.pro\",\"PO-Revision-Date\":\"\"}'",
"clean": "rimraf node_modules yarn.lock package-lock.json pnpm-lock.yaml",
Expand Down
137 changes: 83 additions & 54 deletions frontend-dev/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions frontend-dev/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
/* eslint-disable react/jsx-one-expression-per-line */

import { lazy, Suspense, useEffect, useState } from 'react'
import { Link, Navigate, NavLink, Route, Routes } from 'react-router-dom'
import { Route, Routes } from 'react-router-dom'
import './resource/sass/app.scss'
// eslint-disable-next-line import/no-extraneous-dependencies
import { Toaster } from 'react-hot-toast'
import logo from '../logo.svg'
import Integrations from './components/Integrations'
import Loader from './components/Loaders/Loader'
import TableLoader from './components/Loaders/TableLoader2'
import useFetch from './hooks/useFetch'
import DocSupport from './pages/DocSupport'
import FlowBuilder from './pages/FlowBuilder'
import Settings from './pages/Settings'
import './resource/icons/style.css'
import { __ } from './Utils/i18nwrap'
import { $btcbi } from './GlobalStates'
Expand All @@ -25,7 +21,12 @@ import { useRecoilValue } from 'recoil'
import 'regenerator-runtime/runtime.js'
import AnnouncementModal from './pages/AnnouncementModal'
import ProModalBtn from './components/Utilities/ProModalBtn'
const AuthResponse = lazy(() => import('./pages/AuthResponse'))
const AllIntegrations = lazy(() => import('./pages/AllIntegrations'))
const Integrations = lazy(() => import('./components/Integrations'))
const Settings = lazy(() => import('./pages/Settings'))
const DocSupport = lazy(() => import('./pages/DocSupport'))
const FlowBuilder = lazy(() => import('./pages/FlowBuilder'))
const Error404 = lazy(() => import('./pages/Error404'))

function App() {
Expand Down Expand Up @@ -147,6 +148,15 @@ function App() {
}
/>

<Route
path="/auth-response/*"
element={
<Suspense fallback={<Loader className="g-c" style={loaderStyle} />}>
<AuthResponse />
</Suspense>
}
/>

<Route path="*" element={<Error404 />} />
</Routes>
</div>
Expand Down
15 changes: 13 additions & 2 deletions frontend-dev/src/GlobalStates.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import { atom } from 'recoil'
import { atomWithBroadcast } from './components/atomWithBroadcast'

// atoms
// eslint-disable-next-line no-undef
export const $btcbi = atom({ key: '$btcbi', default: typeof btcbi !== 'undefined' ? btcbi : {} })
export const $newFlow = atom({ key: '$newFlow', default: {}, dangerouslyAllowMutability: true })
export const $actionConf = atom({ key: '$actionConf', default: {}, dangerouslyAllowMutability: true })
export const $formFields = atom({ key: '$formFields', default: {}, dangerouslyAllowMutability: true })
export const $actionConf = atom({
key: '$actionConf',
default: {},
dangerouslyAllowMutability: true
})
export const $formFields = atom({
key: '$formFields',
default: {},
dangerouslyAllowMutability: true
})
export const $flowStep = atom({ key: '$flowStep', default: 1, dangerouslyAllowMutability: true })

export const authInfoAtom = atomWithBroadcast('authInfo', {});
5 changes: 5 additions & 0 deletions frontend-dev/src/components/AllIntegrations/EditFormInteg.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ function EditFormInteg({ setSnackbar, className = '' }) {
).then((res) => {
if (res.success) {
setFormFields(res.data.fields)
setFlow((prevFlow) =>
create(prevFlow, (draftFlow) => {
draftFlow.flow_details.fields = res.data.fields
})
)
}
return res.data
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable no-unused-expressions */

import bitsFetch from "../../Utils/bitsFetch"

export const addFieldMap = (i, confTmp, setConf) => {
const newConf = { ...confTmp }
newConf.field_map.splice(i, 0, {})
Expand Down Expand Up @@ -31,3 +33,18 @@ export const handleCustomValue = (event, index, conftTmp, setConf) => {
newConf.field_map[index].customValue = event.target.value
setConf({ ...newConf })
}

export const handleAuthData = async (actionName, tokenDetails, userInfo, setAuthData) => {
const requestParams = {};
requestParams.actionName = actionName
requestParams.tokenDetails = tokenDetails
requestParams.userInfo = userInfo
await bitsFetch(requestParams, 'store/authData').then((resp) => {
if (resp.success) {
if (resp.data.data.length > 0) {
setAuthData(resp.data.data);
}
// setSnackbar({ show: true, msg: 'Authorization Data Fetched Successfully' })
}
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import BackIcn from '../../../Icons/BackIcn'
import { __ } from '../../../Utils/i18nwrap'
import SnackMsg from '../../Utilities/SnackMsg'
import Steps from '../../Utilities/Steps'
import { setGrantTokenResponse } from '../IntegrationHelpers/GoogleIntegrationHelpers'
import { saveActionConf } from '../IntegrationHelpers/IntegrationHelpers'
import IntegrationStepThree from '../IntegrationHelpers/IntegrationStepThree'
import GoogleSheetAuthorization from './GoogleSheetAuthorization'
import { handleInput, checkMappedFields } from './GoogleSheetCommonFunc'
import GoogleSheetIntegLayout from './GoogleSheetIntegLayout'
import bitsFetch from '../../../Utils/bitsFetch'


function GoogleSheet({ formFields, setFlow, flow, allIntegURL }) {
const navigate = useNavigate()
Expand All @@ -36,9 +37,19 @@ function GoogleSheet({ formFields, setFlow, flow, allIntegURL }) {
})

useEffect(() => {
window.opener && setGrantTokenResponse('googleSheet')
if (sheetConf.oneClickAuthCredentials === undefined) {
const requestParams = {
actionName: "googleSheet",
}
bitsFetch(null, 'get/credentials', requestParams, 'Get').then((res) => {
setSheetConf((prevConf) => {
return { ...prevConf, oneClickAuthCredentials: res.data }
})
})
}
}, [])


const nextPage = () => {
setTimeout(() => {
document.getElementById('btcd-settings-wrp').scrollTop = 0
Expand Down
Loading