@justifi/webcomponents 4.19.1-rc-5 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Analytics-8949ea18.js → Analytics-f870b3ee.js} +3 -2
- package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-11ce0005.js} +1 -1
- package/dist/cjs/{business-form-options-582467fe.js → business-form-options-26f9900c.js} +1 -1
- package/dist/cjs/{business.service-6bb7ac82.js → business.service-f63650f5.js} +6 -5
- package/dist/cjs/config-ff2dda66.js +15 -0
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +4 -4
- package/dist/cjs/{get-payout-csv-1391ff3e.js → get-payout-csv-f3aee6d0.js} +4 -3
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +10 -9
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +9 -11
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -4
- package/dist/cjs/{package-a3cbc925.js → package-1321b070.js} +4 -2
- package/dist/cjs/{payload-parsers-1cbc3b57.js → payload-parsers-969ab9b6.js} +1 -1
- package/dist/cjs/{payment.service-dfcfa19b.js → payment.service-0a64f9cd.js} +3 -2
- package/dist/cjs/{schema-validations-2733de42.js → schema-validations-f3db892c.js} +1 -1
- package/dist/collection/api/services/analytics.service.js +2 -1
- package/dist/collection/api/services/business.service.js +6 -5
- package/dist/collection/api/services/checkout.service.js +3 -2
- package/dist/collection/api/services/insurance.service.js +3 -2
- package/dist/collection/api/services/payment.service.js +3 -2
- package/dist/collection/api/services/payout.service.js +4 -3
- package/dist/collection/api/services/provision.service.js +4 -2
- package/dist/collection/api/services/reports.service.js +2 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-form.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -2
- package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
- package/dist/collection/components/card-form/card-form.js +4 -3
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +4 -6
- package/dist/collection/components/checkout/payment-method-options.js +4 -3
- package/dist/collection/components/checkout/saved-payment-method.js +4 -3
- package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
- package/dist/collection/components/payment-form/payment-form.js +4 -3
- package/dist/collection/components/refund-form/refund-form.js +3 -2
- package/dist/config.js +11 -0
- package/dist/docs.json +8 -8
- package/dist/esm/{Analytics-38d3bafb.js → Analytics-262cdde5.js} +3 -2
- package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-e39bc781.js} +1 -1
- package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-0b08e08c.js} +1 -1
- package/dist/esm/{business.service-f45decfc.js → business.service-74bd1212.js} +6 -5
- package/dist/esm/config-476c7241.js +13 -0
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox_9.entry.js +4 -4
- package/dist/esm/{get-payout-csv-e784a2ab.js → get-payout-csv-b494abfe.js} +4 -3
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -9
- package/dist/esm/justifi-bank-account-form.entry.js +5 -4
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +4 -3
- package/dist/esm/justifi-business-form.entry.js +9 -8
- package/dist/esm/justifi-card-form.entry.js +5 -4
- package/dist/esm/justifi-checkout-core.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +5 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
- package/dist/esm/justifi-new-payment-method_4.entry.js +9 -11
- package/dist/esm/justifi-owner-form_3.entry.js +5 -4
- package/dist/esm/justifi-payment-details.entry.js +4 -3
- package/dist/esm/justifi-payment-form.entry.js +6 -5
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payments-list.entry.js +4 -3
- package/dist/esm/justifi-payout-details.entry.js +4 -3
- package/dist/esm/justifi-payouts-list.entry.js +4 -3
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
- package/dist/esm/{package-89734008.js → package-d88677e9.js} +4 -2
- package/dist/esm/{payload-parsers-acb719d1.js → payload-parsers-62f443e1.js} +1 -1
- package/dist/esm/{payment.service-dad5153b.js → payment.service-3ca4a492.js} +3 -2
- package/dist/esm/{schema-validations-a83ff220.js → schema-validations-2f4fdebb.js} +1 -1
- package/dist/module/Analytics.js +2 -1
- package/dist/module/business-bank-account-form-step.js +3 -2
- package/dist/module/business-document-upload-form-step.js +3 -2
- package/dist/module/business-form-options.js +1 -1
- package/dist/module/business-terms-conditions-form-step.js +3 -2
- package/dist/module/business.service.js +6 -5
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/config.js +13 -0
- package/dist/module/get-payout-csv.js +4 -3
- package/dist/module/justifi-bank-account-form.js +3 -2
- package/dist/module/justifi-business-form.js +3 -2
- package/dist/module/justifi-card-form.js +3 -2
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-payment-form.js +4 -3
- package/dist/module/justifi-payment-provisioning.js +3 -2
- package/dist/module/justifi-refund-form.js +3 -2
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/new-payment-method.js +3 -5
- package/dist/module/package.js +4 -2
- package/dist/module/payment-method-options.js +3 -2
- package/dist/module/payment.service.js +3 -2
- package/dist/module/saved-payment-method.js +3 -2
- package/dist/module/sezzle-payment-method.js +3 -2
- package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
- package/dist/webcomponents/index.esm.js +0 -1
- package/dist/webcomponents/p-04a0dbb6.js +1 -0
- package/dist/webcomponents/p-061dcb79.entry.js +1 -0
- package/dist/webcomponents/p-07109641.entry.js +1 -0
- package/dist/webcomponents/p-08b0fb31.js +1 -41
- package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
- package/dist/webcomponents/p-14c91ffd.js +1 -20
- package/dist/webcomponents/p-198994c0.entry.js +1 -0
- package/dist/webcomponents/p-1a43e355.entry.js +19 -0
- package/dist/webcomponents/p-1ad5995e.js +1 -3599
- package/dist/webcomponents/p-1f70fa27.entry.js +1 -0
- package/dist/webcomponents/p-1ff8810b.js +1 -29
- package/dist/webcomponents/p-2338affa.js +1 -213
- package/dist/webcomponents/p-241b0ed9.js +1 -0
- package/dist/webcomponents/p-2799383d.entry.js +1 -0
- package/dist/webcomponents/p-29c0b182.js +1 -114
- package/dist/webcomponents/p-2b6c9c4f.js +1 -7
- package/dist/webcomponents/p-2eab3c90.js +1 -3052
- package/dist/webcomponents/p-3affadfc.entry.js +1 -0
- package/dist/webcomponents/p-3d4d566d.entry.js +1 -0
- package/dist/webcomponents/p-3dd4c6c3.entry.js +1 -0
- package/dist/webcomponents/p-462dc522.entry.js +1 -0
- package/dist/webcomponents/p-46f679a9.js +1 -0
- package/dist/webcomponents/p-487b72a8.entry.js +1 -0
- package/dist/webcomponents/p-48ae16e0.entry.js +1 -0
- package/dist/webcomponents/p-4abc17f0.entry.js +1 -0
- package/dist/webcomponents/p-4bac636e.entry.js +1 -0
- package/dist/webcomponents/p-52021fa1.entry.js +1 -0
- package/dist/webcomponents/p-525db3e8.js +1 -22
- package/dist/webcomponents/p-53948ff8.entry.js +1 -0
- package/dist/webcomponents/p-53e64f15.entry.js +1 -0
- package/dist/webcomponents/p-554a3c18.js +1 -0
- package/dist/webcomponents/p-56f6ce4c.js +1 -10
- package/dist/webcomponents/p-5968ff8a.js +1 -178
- package/dist/webcomponents/p-6078a370.js +1 -244
- package/dist/webcomponents/p-60a370fc.entry.js +1 -0
- package/dist/webcomponents/p-62b32c4c.entry.js +1 -0
- package/dist/webcomponents/p-65b561da.entry.js +1 -0
- package/dist/webcomponents/p-72c9e6b3.entry.js +1 -0
- package/dist/webcomponents/p-75b4daef.js +1 -0
- package/dist/webcomponents/p-7d85af5c.js +1 -16
- package/dist/webcomponents/p-8115b2f4.js +1 -28
- package/dist/webcomponents/p-83125497.js +1 -4027
- package/dist/webcomponents/p-8603348a.js +1 -0
- package/dist/webcomponents/p-890b3254.entry.js +1 -0
- package/dist/webcomponents/p-8df7bde8.js +1 -27
- package/dist/webcomponents/p-92bb1e5f.entry.js +1 -0
- package/dist/webcomponents/p-9c9c7dac.js +1 -24
- package/dist/webcomponents/p-9ccfa1c9.entry.js +1 -0
- package/dist/webcomponents/p-9dc36f76.entry.js +1 -0
- package/dist/webcomponents/p-ad41c8c7.entry.js +1 -0
- package/dist/webcomponents/p-ae263544.js +1 -0
- package/dist/webcomponents/p-af244664.js +1 -126
- package/dist/webcomponents/p-b16dfd5d.entry.js +1 -0
- package/dist/webcomponents/p-ba4bae6f.js +1 -12
- package/dist/webcomponents/p-bbed6107.entry.js +1 -0
- package/dist/webcomponents/p-bc92235c.entry.js +1 -0
- package/dist/webcomponents/p-be39c802.entry.js +1 -0
- package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
- package/dist/webcomponents/p-d101c5db.js +1 -0
- package/dist/webcomponents/p-d1c8d794.entry.js +1 -0
- package/dist/webcomponents/p-d25c2f12.js +1 -0
- package/dist/webcomponents/p-d2a5054f.entry.js +1 -0
- package/dist/webcomponents/p-d765d638.js +1 -0
- package/dist/webcomponents/p-d8355f91.entry.js +1 -0
- package/dist/webcomponents/p-d89bad72.js +1 -39
- package/dist/webcomponents/p-dce846bf.js +1 -27
- package/dist/webcomponents/p-df21aaad.js +1 -120
- package/dist/webcomponents/p-e1255160.js +1 -3
- package/dist/webcomponents/p-e2c88817.entry.js +1 -0
- package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
- package/dist/webcomponents/p-e333620e.js +1 -34
- package/dist/webcomponents/p-e3fab0e2.js +1 -43
- package/dist/webcomponents/p-f0866375.entry.js +1 -0
- package/dist/webcomponents/p-fad19d75.js +2 -1638
- package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
- package/dist/webcomponents/p-fe33151d.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +4 -362
- package/dist/webcomponents/webcomponents.esm.js +1 -20
- package/package.json +4 -2
- package/dist/globals.d.ts +0 -2
- package/dist/webcomponents/p-0179fbb2.entry.js +0 -1684
- package/dist/webcomponents/p-01a404ca.entry.js +0 -44
- package/dist/webcomponents/p-03d35880.entry.js +0 -130
- package/dist/webcomponents/p-06ff0429.entry.js +0 -65
- package/dist/webcomponents/p-220fc2cc.entry.js +0 -98
- package/dist/webcomponents/p-258b1ee2.entry.js +0 -149
- package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
- package/dist/webcomponents/p-2988ac56.js +0 -79
- package/dist/webcomponents/p-2e405359.entry.js +0 -73
- package/dist/webcomponents/p-3e9ef4a8.js +0 -28
- package/dist/webcomponents/p-3fd13ca3.js +0 -52
- package/dist/webcomponents/p-5482d030.entry.js +0 -21
- package/dist/webcomponents/p-576826b1.entry.js +0 -43
- package/dist/webcomponents/p-5cb3f0b2.entry.js +0 -261
- package/dist/webcomponents/p-5f835b89.entry.js +0 -606
- package/dist/webcomponents/p-6fed319e.entry.js +0 -99
- package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
- package/dist/webcomponents/p-74d0d0e1.entry.js +0 -75
- package/dist/webcomponents/p-7582b554.entry.js +0 -18
- package/dist/webcomponents/p-79646550.entry.js +0 -61
- package/dist/webcomponents/p-7b0400cd.entry.js +0 -131
- package/dist/webcomponents/p-800d31fe.entry.js +0 -162
- package/dist/webcomponents/p-85fc69e5.js +0 -90
- package/dist/webcomponents/p-890088fc.entry.js +0 -298
- package/dist/webcomponents/p-89887332.js +0 -301
- package/dist/webcomponents/p-8eb774df.entry.js +0 -54
- package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
- package/dist/webcomponents/p-a2da97f2.entry.js +0 -145
- package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
- package/dist/webcomponents/p-a5c5821e.entry.js +0 -101
- package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
- package/dist/webcomponents/p-a6d04afc.js +0 -44
- package/dist/webcomponents/p-ac086069.entry.js +0 -58
- package/dist/webcomponents/p-ad5cfa9d.js +0 -77
- package/dist/webcomponents/p-b82c146f.entry.js +0 -111
- package/dist/webcomponents/p-b9a41ec2.entry.js +0 -74
- package/dist/webcomponents/p-ba5fae28.js +0 -90
- package/dist/webcomponents/p-c636f563.entry.js +0 -791
- package/dist/webcomponents/p-c64abefc.entry.js +0 -117
- package/dist/webcomponents/p-cb26f708.js +0 -18
- package/dist/webcomponents/p-cbf2437a.entry.js +0 -80
- package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
- package/dist/webcomponents/p-d894aed2.entry.js +0 -133
- package/dist/webcomponents/p-e356f280.entry.js +0 -29
- package/dist/webcomponents/p-e837a453.entry.js +0 -94
- package/dist/webcomponents/p-e84a2dcb.entry.js +0 -97
- package/dist/webcomponents/p-ec2bd24f.entry.js +0 -94
- package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
- package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
const name = "@justifi/webcomponents";
|
|
2
|
-
const version = "4.19.1-rc-5";
|
|
3
|
-
const description = "JustiFi Web Components";
|
|
4
|
-
const collection = "dist/collection/collection-manifest.json";
|
|
5
|
-
const main = "dist/index.cjs.js";
|
|
6
|
-
const module = "dist/module/index.js";
|
|
7
|
-
const types = "dist/module/index.d.ts";
|
|
8
|
-
const repository = {
|
|
9
|
-
type: "git",
|
|
10
|
-
url: "git+https://github.com/justifi-tech/web-component-library.git"
|
|
11
|
-
};
|
|
12
|
-
const homepage = "https://storybook.justifi.ai/?path=/docs/introduction--docs";
|
|
13
|
-
const publishConfig = {
|
|
14
|
-
registry: "https://registry.npmjs.org"
|
|
15
|
-
};
|
|
16
|
-
const files = [
|
|
17
|
-
"dist/"
|
|
18
|
-
];
|
|
19
|
-
const scripts = {
|
|
20
|
-
build: "stencil build --docs",
|
|
21
|
-
dev: "stencil build --watch",
|
|
22
|
-
lint: "eslint . --max-warnings 0",
|
|
23
|
-
clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
24
|
-
generate: "stencil generate",
|
|
25
|
-
test: "TZ=utc stencil test --spec",
|
|
26
|
-
"test:watch": "TZ=utc stencil test --spec --watchAll",
|
|
27
|
-
"test:file": "stencil test --spec --watch --"
|
|
28
|
-
};
|
|
29
|
-
const dependencies = {
|
|
30
|
-
"@stencil/core": "^4.0.5",
|
|
31
|
-
"@stencil/store": "^2.0.8",
|
|
32
|
-
bootstrap: "^5.2.3",
|
|
33
|
-
"chart.js": "^4.4.1",
|
|
34
|
-
"date-fns": "^2.29.3",
|
|
35
|
-
"dinero.js": "^1.9.1",
|
|
36
|
-
"iframe-resizer": "^4.3.7",
|
|
37
|
-
imask: "^7.6.0",
|
|
38
|
-
rxjs: "^7.8.1",
|
|
39
|
-
"ts-dedent": "^2.2.0",
|
|
40
|
-
uuid: "^9.0.0",
|
|
41
|
-
yup: "^1.0.0"
|
|
42
|
-
};
|
|
43
|
-
const devDependencies = {
|
|
44
|
-
"@babel/preset-env": "^7.21.5",
|
|
45
|
-
"@babel/preset-react": "^7.18.6",
|
|
46
|
-
"@babel/preset-typescript": "^7.21.5",
|
|
47
|
-
"@rollup/plugin-replace": "^5.0.7",
|
|
48
|
-
"@stencil/sass": "^3.0.1",
|
|
49
|
-
"@types/jest": "27.0.3",
|
|
50
|
-
"@types/react": "^18.0.37",
|
|
51
|
-
"@types/react-dom": "^18.0.11",
|
|
52
|
-
dotenv: "^16.3.1",
|
|
53
|
-
jest: "^29.7.0",
|
|
54
|
-
"jest-cli": "^29.7.0",
|
|
55
|
-
"jest-environment-node": "^29.7.0",
|
|
56
|
-
"ts-jest": "^29.1.2"
|
|
57
|
-
};
|
|
58
|
-
const license = "MIT";
|
|
59
|
-
const gitHead = "507bac1d941eae6e1f56e185ecd9bc9d22637783";
|
|
60
|
-
const packageJson = {
|
|
61
|
-
name: name,
|
|
62
|
-
version: version,
|
|
63
|
-
description: description,
|
|
64
|
-
collection: collection,
|
|
65
|
-
main: main,
|
|
66
|
-
module: module,
|
|
67
|
-
types: types,
|
|
68
|
-
repository: repository,
|
|
69
|
-
homepage: homepage,
|
|
70
|
-
publishConfig: publishConfig,
|
|
71
|
-
files: files,
|
|
72
|
-
scripts: scripts,
|
|
73
|
-
dependencies: dependencies,
|
|
74
|
-
devDependencies: devDependencies,
|
|
75
|
-
license: license,
|
|
76
|
-
gitHead: gitHead
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export { packageJson as p };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
|
|
3
|
-
import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './p-14c91ffd.js';
|
|
4
|
-
import { m as makeGetBusiness, a as makePostProvisioning } from './p-5968ff8a.js';
|
|
5
|
-
import { B as BusinessService } from './p-3e9ef4a8.js';
|
|
6
|
-
import { A as Api } from './p-29c0b182.js';
|
|
7
|
-
import './p-2988ac56.js';
|
|
8
|
-
import './p-8115b2f4.js';
|
|
9
|
-
|
|
10
|
-
class ProvisionService {
|
|
11
|
-
async postProvisioning(authToken, businessId, product) {
|
|
12
|
-
const endpoint = `entities/provisioning`;
|
|
13
|
-
const payload = {
|
|
14
|
-
business_id: businessId,
|
|
15
|
-
product_category: product,
|
|
16
|
-
};
|
|
17
|
-
return Api({ authToken, apiOrigin: undefined }).post(endpoint, JSON.stringify(payload));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const PaymentProvisioning = class {
|
|
22
|
-
constructor(hostRef) {
|
|
23
|
-
registerInstance(this, hostRef);
|
|
24
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
25
|
-
this.postProvisioning = undefined;
|
|
26
|
-
this.getBusiness = undefined;
|
|
27
|
-
this.businessId = undefined;
|
|
28
|
-
this.authToken = undefined;
|
|
29
|
-
this.allowOptionalFields = false;
|
|
30
|
-
this.formTitle = 'Business Information';
|
|
31
|
-
}
|
|
32
|
-
propChanged() {
|
|
33
|
-
this.initializeApi();
|
|
34
|
-
}
|
|
35
|
-
componentWillLoad() {
|
|
36
|
-
this.analytics = new JustifiAnalytics(this);
|
|
37
|
-
this.initializeApi();
|
|
38
|
-
}
|
|
39
|
-
disconnectedCallback() {
|
|
40
|
-
this.analytics.cleanup();
|
|
41
|
-
}
|
|
42
|
-
initializeApi() {
|
|
43
|
-
if (this.authToken && this.businessId) {
|
|
44
|
-
this.getBusiness = makeGetBusiness({
|
|
45
|
-
authToken: this.authToken,
|
|
46
|
-
businessId: this.businessId,
|
|
47
|
-
service: new BusinessService()
|
|
48
|
-
});
|
|
49
|
-
this.postProvisioning = makePostProvisioning({
|
|
50
|
-
authToken: this.authToken,
|
|
51
|
-
businessId: this.businessId,
|
|
52
|
-
product: 'payment',
|
|
53
|
-
service: new ProvisionService()
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.errorEvent.emit({
|
|
58
|
-
message: 'auth-token and business-id are required',
|
|
59
|
-
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
60
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return (h("justifi-payment-provisioning-core", { key: 'a93ee23fabf4bdeb381e924bfdf684ddd183075a', businessId: this.businessId, authToken: this.authToken, allowOptionalFields: this.allowOptionalFields, formTitle: this.formTitle, getBusiness: this.getBusiness, postProvisioning: this.postProvisioning }));
|
|
66
|
-
}
|
|
67
|
-
static get watchers() { return {
|
|
68
|
-
"authToken": ["propChanged"],
|
|
69
|
-
"businessId": ["propChanged"]
|
|
70
|
-
}; }
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export { PaymentProvisioning as justifi_payment_provisioning };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { A as Api } from './p-29c0b182.js';
|
|
2
|
-
|
|
3
|
-
class BusinessService {
|
|
4
|
-
async fetchBusiness(businessId, authToken) {
|
|
5
|
-
const endpoint = `entities/business/${businessId}`;
|
|
6
|
-
return Api({ authToken, apiOrigin: undefined }).get(endpoint);
|
|
7
|
-
}
|
|
8
|
-
async patchBusiness(authToken, businessId, payload) {
|
|
9
|
-
const endpoint = `entities/business/${businessId}`;
|
|
10
|
-
return Api({ authToken, apiOrigin: undefined }).patch(endpoint, payload);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
class IdentityService {
|
|
14
|
-
async fetchIdentity(identityId, authToken) {
|
|
15
|
-
const endpoint = `entities/identity/${identityId}`;
|
|
16
|
-
return Api({ authToken, apiOrigin: undefined }).get(endpoint);
|
|
17
|
-
}
|
|
18
|
-
async patchIdentity(authToken, identityId, payload) {
|
|
19
|
-
const endpoint = `entities/identity/${identityId}`;
|
|
20
|
-
return Api({ authToken, apiOrigin: undefined }).patch(endpoint, payload);
|
|
21
|
-
}
|
|
22
|
-
async postIdentity(authToken, payload) {
|
|
23
|
-
const endpoint = `entities/identity`;
|
|
24
|
-
return Api({ authToken, apiOrigin: undefined }).post(endpoint, payload);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { BusinessService as B, IdentityService as I };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { c as create$3 } from './p-2eab3c90.js';
|
|
2
|
-
import { h as businessNameValidation, w as websiteUrlValidation, e as emailValidation, d as phoneValidation, j as doingBusinessAsValidation, k as businessClassificationValidation, m as industryValidation, t as taxIdValidation, n as dateOfIncorporationValidation, r as revenueValidation, o as paymentVolumeValidation, q as whenServiceReceivedValidation, u as recurringPaymentsValidation, v as recurringPaymentsPercentageValidation, x as seasonalBusinessValidation, y as otherPaymentDetailsValidation } from './p-89887332.js';
|
|
3
|
-
|
|
4
|
-
const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
5
|
-
const schema = create$3({
|
|
6
|
-
legal_name: businessNameValidation.required('Enter legal name'),
|
|
7
|
-
website_url: websiteUrlValidation.required('Enter business website url'),
|
|
8
|
-
email: emailValidation.required('Enter business email'),
|
|
9
|
-
phone: phoneValidation.required('Enter phone number'),
|
|
10
|
-
doing_business_as: doingBusinessAsValidation.required('Enter doing business as'),
|
|
11
|
-
classification: businessClassificationValidation.required('Select business classification'),
|
|
12
|
-
industry: industryValidation.required('Enter a business industry'),
|
|
13
|
-
tax_id: taxIdValidation.required('Enter tax id, SSN, or EIN'),
|
|
14
|
-
date_of_incorporation: dateOfIncorporationValidation.required('Enter date of incorporation'),
|
|
15
|
-
});
|
|
16
|
-
const easySchema = create$3({
|
|
17
|
-
legal_name: businessNameValidation.required('Enter legal name'),
|
|
18
|
-
website_url: websiteUrlValidation.nullable(),
|
|
19
|
-
email: emailValidation.nullable(),
|
|
20
|
-
phone: phoneValidation.nullable(),
|
|
21
|
-
doing_business_as: doingBusinessAsValidation.nullable(),
|
|
22
|
-
classification: businessClassificationValidation.nullable(),
|
|
23
|
-
industry: industryValidation.nullable(),
|
|
24
|
-
tax_id: taxIdValidation.nullable(),
|
|
25
|
-
date_of_incorporation: dateOfIncorporationValidation.nullable(),
|
|
26
|
-
});
|
|
27
|
-
return allowOptionalFields ? easySchema : schema;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const additionalQuestionsSchema = (allowOptionalFields) => {
|
|
31
|
-
const schema = create$3({
|
|
32
|
-
business_revenue: revenueValidation.required('Enter business revenue'),
|
|
33
|
-
business_payment_volume: paymentVolumeValidation.required('Enter business payment volume'),
|
|
34
|
-
business_when_service_received: whenServiceReceivedValidation.required('Select when service is received'),
|
|
35
|
-
business_recurring_payments: recurringPaymentsValidation.required('Select recurring payments'),
|
|
36
|
-
business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
|
|
37
|
-
business_seasonal: seasonalBusinessValidation.required('Select business seasonal'),
|
|
38
|
-
business_other_payment_details: otherPaymentDetailsValidation.nullable(),
|
|
39
|
-
});
|
|
40
|
-
const easySchema = create$3({
|
|
41
|
-
business_revenue: revenueValidation.nullable(),
|
|
42
|
-
business_payment_volume: paymentVolumeValidation.nullable(),
|
|
43
|
-
business_when_service_received: whenServiceReceivedValidation.nullable(),
|
|
44
|
-
business_recurring_payments: recurringPaymentsValidation.nullable(),
|
|
45
|
-
business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
|
|
46
|
-
business_seasonal: seasonalBusinessValidation.nullable(),
|
|
47
|
-
business_other_payment_details: otherPaymentDetailsValidation.nullable(),
|
|
48
|
-
});
|
|
49
|
-
return allowOptionalFields ? easySchema : schema;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { additionalQuestionsSchema as a, businessCoreInfoSchema as b };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './p-fad19d75.js';
|
|
2
|
-
import { E as ExtendedPagingDefaults } from './p-56f6ce4c.js';
|
|
3
|
-
|
|
4
|
-
const PaginationMenu = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this.paging = ExtendedPagingDefaults;
|
|
8
|
-
this.params = {};
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
return (h(Host, { key: '645df5028861aa714a814f908ccace8dcd0986f8', exportparts: `page-arrow,page-button,page-button-disabled,page-button-text` }, h("nav", { key: '6cb86ce01c625db9c31204f63258570f8a5d0a0f', "aria-label": "Table pagination", class: "d-flex justify-content-end gap-3" }, h("ul", { key: '7ffb5771a1c51553d64735721b937e53c699949d', class: "pagination m-0" }, h("li", { key: 'b439c2f7fe81ccdfa29670a6fc04715681ed5ab3', class: `page-item ${this.paging.has_previous ? '' : ' disabled'}` }, h("a", { key: 'dc59152e834a3076f09304f6fcd0195058ebefec', href: "#", class: "page-link", onClick: (e) => {
|
|
12
|
-
e.preventDefault();
|
|
13
|
-
this.paging.handleClickPrevious(this.paging.start_cursor);
|
|
14
|
-
}, part: `page-button${this.paging.has_previous ? '' : ' page-button-disabled'}` }, h("span", { key: 'fc640fb9ae2ca672bfed89d23c5641cb346c673d', class: "me-1", part: "page-arrow" }, "\u00AB"), h("span", { key: 'fb6fcd31ebd4d194b37f53a071537133b8c4d369', part: "page-button-text" }, "Previous"))), h("li", { key: 'b10e12ec7bc4a89cd897e868ec7b303c62599cd3', class: `page-item ${this.paging.has_next ? '' : ' disabled'}` }, h("a", { key: '51f91eb7cfef91dcbcfd9f11522213308bf717b5', href: "#", class: "page-link", onClick: (e) => {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
this.paging.handleClickNext(this.paging.end_cursor);
|
|
17
|
-
}, part: `page-button${this.paging.has_next ? '' : ' page-button-disabled'}` }, h("span", { key: 'd89f50a44dead676d19b8862a92ba636947fe6b1', part: "page-button-text" }, "Next"), h("span", { key: 'f5dd2ddddef86931d935df56101f1fed8118e4f6', class: "ms-1", part: "page-arrow" }, "\u00BB")))))));
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { PaginationMenu as pagination_menu };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './p-fad19d75.js';
|
|
2
|
-
|
|
3
|
-
const NumberInput = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
7
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
8
|
-
this.handleFormControlInput = (event) => {
|
|
9
|
-
const target = event.target;
|
|
10
|
-
const name = target.getAttribute('name');
|
|
11
|
-
this.inputHandler(name, target.value);
|
|
12
|
-
this.formControlInput.emit({ name, value: target.value });
|
|
13
|
-
};
|
|
14
|
-
this.updateInput = (newValue) => {
|
|
15
|
-
const inputElement = this.el.querySelector('input');
|
|
16
|
-
if (inputElement) {
|
|
17
|
-
inputElement.value = newValue || '';
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
this.label = undefined;
|
|
21
|
-
this.name = undefined;
|
|
22
|
-
this.helpText = undefined;
|
|
23
|
-
this.errorText = undefined;
|
|
24
|
-
this.defaultValue = undefined;
|
|
25
|
-
this.inputHandler = undefined;
|
|
26
|
-
this.disabled = undefined;
|
|
27
|
-
}
|
|
28
|
-
handleDefaultValueChange(newValue) {
|
|
29
|
-
this.updateInput(newValue);
|
|
30
|
-
}
|
|
31
|
-
componentDidLoad() {
|
|
32
|
-
this.updateInput(this.defaultValue);
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (h(Host, { key: 'dd43d75b327c05e75b453b954346c6ffcd85a2f5', exportparts: 'label,input,input-invalid' }, h("div", { key: '5215f62251bd89be493ddffe46bf0c466b42e314', class: 'form-group d-flex flex-column' }, h("label", { key: 'f0409970f8d43bcdef92b81363cc24aa1bb691a0', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '9c6a5899e64ba1a8af6af80c63b6a0895351da63', id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h("form-control-help-text", { key: 'cd7b4a724427383cafc04137f6feca473695b020', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '04748d3c5b1067b0312a2b7c36369e2a21a7215f', errorText: this.errorText, name: this.name }))));
|
|
36
|
-
}
|
|
37
|
-
get el() { return getElement(this); }
|
|
38
|
-
static get watchers() { return {
|
|
39
|
-
"defaultValue": ["handleDefaultValueChange"]
|
|
40
|
-
}; }
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export { NumberInput as form_control_number };
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { c as makeGetIdentity, d as makePatchIdentity, e as makePostIdentity } from './p-5968ff8a.js';
|
|
3
|
-
import { I as IdentityService } from './p-3e9ef4a8.js';
|
|
4
|
-
import { F as FormController } from './p-2eab3c90.js';
|
|
5
|
-
import { O as Owner } from './p-af244664.js';
|
|
6
|
-
import { a as BusinessFormClickActions } from './p-d89bad72.js';
|
|
7
|
-
import { c as parseIdentityInfo, i as identitySchema } from './p-85fc69e5.js';
|
|
8
|
-
import { B as Button } from './p-9c9c7dac.js';
|
|
9
|
-
import { S as SSN_MASK, P as PHONE_MASKS } from './p-525db3e8.js';
|
|
10
|
-
import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './p-7d85af5c.js';
|
|
11
|
-
import './p-14c91ffd.js';
|
|
12
|
-
import './p-8115b2f4.js';
|
|
13
|
-
import './p-29c0b182.js';
|
|
14
|
-
import './p-1ff8810b.js';
|
|
15
|
-
import './p-6078a370.js';
|
|
16
|
-
import './p-89887332.js';
|
|
17
|
-
import './p-ba5fae28.js';
|
|
18
|
-
|
|
19
|
-
const BusinessOwnerForm = class {
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
registerInstance(this, hostRef);
|
|
22
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
23
|
-
this.getOwner = undefined;
|
|
24
|
-
this.patchOwner = undefined;
|
|
25
|
-
this.postOwner = undefined;
|
|
26
|
-
this.authToken = undefined;
|
|
27
|
-
this.ownerId = undefined;
|
|
28
|
-
this.businessId = undefined;
|
|
29
|
-
this.allowOptionalFields = undefined;
|
|
30
|
-
this.removeOwner = undefined;
|
|
31
|
-
this.newFormOpen = undefined;
|
|
32
|
-
this.ownersLength = undefined;
|
|
33
|
-
}
|
|
34
|
-
async validate() {
|
|
35
|
-
return this.coreComponent.validate();
|
|
36
|
-
}
|
|
37
|
-
async submit() {
|
|
38
|
-
return this.coreComponent.submit();
|
|
39
|
-
}
|
|
40
|
-
async validateAndSubmit({ onSuccess }) {
|
|
41
|
-
this.coreComponent.validateAndSubmit({ onSuccess });
|
|
42
|
-
}
|
|
43
|
-
componentWillLoad() {
|
|
44
|
-
this.initializeApi();
|
|
45
|
-
}
|
|
46
|
-
initializeApi() {
|
|
47
|
-
if (!this.authToken) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.getOwner = makeGetIdentity({
|
|
51
|
-
authToken: this.authToken,
|
|
52
|
-
identityId: this.ownerId,
|
|
53
|
-
service: new IdentityService()
|
|
54
|
-
});
|
|
55
|
-
this.patchOwner = makePatchIdentity({
|
|
56
|
-
authToken: this.authToken,
|
|
57
|
-
identityId: this.ownerId,
|
|
58
|
-
service: new IdentityService()
|
|
59
|
-
});
|
|
60
|
-
this.postOwner = makePostIdentity({
|
|
61
|
-
authToken: this.authToken,
|
|
62
|
-
service: new IdentityService()
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
return (h("owner-form-core", { key: '332d1e77d01886f13aba09b32b2d5f2199131619', ownerId: this.ownerId, businessId: this.businessId, getOwner: this.getOwner, patchOwner: this.patchOwner, postOwner: this.postOwner, allowOptionalFields: this.allowOptionalFields, removeOwner: this.removeOwner, newFormOpen: this.newFormOpen, ownersLength: this.ownersLength, ref: ref => this.coreComponent = ref }));
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const BusinessOwnerFormCore = class {
|
|
71
|
-
loadingWatcher() {
|
|
72
|
-
this.formLoading.emit(this.isLoading);
|
|
73
|
-
}
|
|
74
|
-
constructor(hostRef) {
|
|
75
|
-
registerInstance(this, hostRef);
|
|
76
|
-
this.submitted = createEvent(this, "submitted", 7);
|
|
77
|
-
this.ownerSubmitted = createEvent(this, "ownerSubmitted", 7);
|
|
78
|
-
this.clickEvent = createEvent(this, "click-event", 7);
|
|
79
|
-
this.formLoading = createEvent(this, "formLoading", 7);
|
|
80
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
81
|
-
this.getData = () => {
|
|
82
|
-
this.isLoading = true;
|
|
83
|
-
this.getOwner({
|
|
84
|
-
onSuccess: (response) => {
|
|
85
|
-
this.instantiateOwner(response.data);
|
|
86
|
-
},
|
|
87
|
-
onError: ({ error, code, severity }) => {
|
|
88
|
-
this.errorEvent.emit({
|
|
89
|
-
message: error,
|
|
90
|
-
errorCode: code,
|
|
91
|
-
severity: severity
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
final: () => this.isLoading = false
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
this.sendData = () => {
|
|
98
|
-
this.isLoading = true;
|
|
99
|
-
return new Promise((resolve) => {
|
|
100
|
-
if (this.ownerId) {
|
|
101
|
-
this.patchOwner({
|
|
102
|
-
payload: this.payload,
|
|
103
|
-
onSuccess: (response) => {
|
|
104
|
-
this.submitted.emit({
|
|
105
|
-
data: response,
|
|
106
|
-
metadata: { ownerID: response.data.id }
|
|
107
|
-
});
|
|
108
|
-
this.ownerSubmitted.emit({ id: response.data.id });
|
|
109
|
-
this.instantiateOwner(response.data);
|
|
110
|
-
resolve(true);
|
|
111
|
-
},
|
|
112
|
-
onError: ({ error, code, severity }) => {
|
|
113
|
-
this.submitted.emit({ data: { error } });
|
|
114
|
-
this.errorEvent.emit({
|
|
115
|
-
message: error,
|
|
116
|
-
errorCode: code,
|
|
117
|
-
severity: severity
|
|
118
|
-
});
|
|
119
|
-
resolve(false);
|
|
120
|
-
},
|
|
121
|
-
final: () => this.isLoading = false
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
this.postOwner({
|
|
126
|
-
payload: this.payload,
|
|
127
|
-
onSuccess: (response) => {
|
|
128
|
-
this.submitted.emit({
|
|
129
|
-
data: response,
|
|
130
|
-
metadata: { ownerID: response.data.id }
|
|
131
|
-
});
|
|
132
|
-
this.ownerSubmitted.emit({ id: response.data.id });
|
|
133
|
-
this.instantiateOwner(response.data);
|
|
134
|
-
resolve(true);
|
|
135
|
-
},
|
|
136
|
-
onError: ({ error, code, severity }) => {
|
|
137
|
-
this.submitted.emit({ data: { error } });
|
|
138
|
-
this.errorEvent.emit({
|
|
139
|
-
message: error,
|
|
140
|
-
errorCode: code,
|
|
141
|
-
severity: severity
|
|
142
|
-
});
|
|
143
|
-
resolve(false);
|
|
144
|
-
},
|
|
145
|
-
final: () => this.isLoading = false
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
this.instantiateOwner = async (data) => {
|
|
151
|
-
this.owner = Object.assign({}, new Owner(data));
|
|
152
|
-
await this.formController.setInitialValues(this.owner);
|
|
153
|
-
};
|
|
154
|
-
this.handleAddOwner = () => {
|
|
155
|
-
const eventName = this.ownerId ? BusinessFormClickActions.updateOwner : BusinessFormClickActions.addOwner;
|
|
156
|
-
this.clickEvent.emit({ name: eventName });
|
|
157
|
-
};
|
|
158
|
-
this.handleRemoveOwner = () => {
|
|
159
|
-
this.removeOwner(this.ownerId);
|
|
160
|
-
this.clickEvent.emit({ name: BusinessFormClickActions.removeOwner });
|
|
161
|
-
};
|
|
162
|
-
this.isLoading = false;
|
|
163
|
-
this.formController = undefined;
|
|
164
|
-
this.errors = {};
|
|
165
|
-
this.owner = {};
|
|
166
|
-
this.ownerId = undefined;
|
|
167
|
-
this.businessId = undefined;
|
|
168
|
-
this.getOwner = undefined;
|
|
169
|
-
this.patchOwner = undefined;
|
|
170
|
-
this.postOwner = undefined;
|
|
171
|
-
this.allowOptionalFields = undefined;
|
|
172
|
-
this.removeOwner = undefined;
|
|
173
|
-
this.newFormOpen = undefined;
|
|
174
|
-
this.ownersLength = undefined;
|
|
175
|
-
this.validate = this.validate.bind(this);
|
|
176
|
-
this.submit = this.submit.bind(this);
|
|
177
|
-
this.validateAndSubmit = this.validateAndSubmit.bind(this);
|
|
178
|
-
}
|
|
179
|
-
async returnOwnerData() {
|
|
180
|
-
return this.ownerId;
|
|
181
|
-
}
|
|
182
|
-
async validate() {
|
|
183
|
-
return this.formController.validate();
|
|
184
|
-
}
|
|
185
|
-
async submit() {
|
|
186
|
-
const isValid = await this.validate();
|
|
187
|
-
if (isValid) {
|
|
188
|
-
return this.sendData();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
async validateAndSubmit(event) {
|
|
192
|
-
event.preventDefault();
|
|
193
|
-
const isValid = await this.validate();
|
|
194
|
-
if (isValid) {
|
|
195
|
-
this.submit();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
get payload() {
|
|
199
|
-
let formValues = parseIdentityInfo(this.formController.values.getValue());
|
|
200
|
-
if (this.ownerId) {
|
|
201
|
-
return JSON.stringify(formValues);
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
return JSON.stringify(Object.assign(Object.assign({}, formValues), { business_id: this.businessId }));
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
get formTitle() {
|
|
208
|
-
return this.ownerId ? 'Edit Business Owner' : 'Add Business Owner';
|
|
209
|
-
}
|
|
210
|
-
get submitButtonText() {
|
|
211
|
-
return this.ownerId ? 'Update' : 'Add';
|
|
212
|
-
}
|
|
213
|
-
get showRemoveButton() {
|
|
214
|
-
const blankForm = !this.ownerId && this.newFormOpen;
|
|
215
|
-
if (this.ownersLength <= 1) {
|
|
216
|
-
return false;
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
if (blankForm) {
|
|
220
|
-
return true;
|
|
221
|
-
}
|
|
222
|
-
else if (this.ownerId && !this.newFormOpen) {
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
componentWillLoad() {
|
|
228
|
-
this.formController = new FormController(identitySchema('owner', this.allowOptionalFields));
|
|
229
|
-
this.ownerId ? this.getData() : this.instantiateOwner({});
|
|
230
|
-
}
|
|
231
|
-
componentDidLoad() {
|
|
232
|
-
this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
|
|
233
|
-
}
|
|
234
|
-
render() {
|
|
235
|
-
return (h("form", { key: 'b2e2aaced859260e9d2ef59bc3f8a0763d05872c', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2a93ddb4c945be0ec081ce31d6d9eff4b302d622' }, h("legend", { key: 'ea9859e55099e3f8263024d884edfb48b3666eaa', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'f646c1ecc544c358d87e701aba8e151fcb96c54e' }), h("div", { key: '874bf4ebd7cef0afbdee96fa4d5679b6d683b0f0', class: "row gy-3" }, h("owner-form-inputs", { key: '866dbf0002ec1ac70d7942c6011c67f8cd144960', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '15d907270ecf3d16769cedea39ba279d7ffb0748', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '84c09ef594e7fa387e64a09014de81ed713cc765', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dafd97aa7b84644c9d011224a152ad7f99ce620', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: 'f1f31da4d147afcd01ef96acd01d63ee9497dd6b' }))));
|
|
236
|
-
}
|
|
237
|
-
static get watchers() { return {
|
|
238
|
-
"isLoading": ["loadingWatcher"]
|
|
239
|
-
}; }
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
const BusinessOwnerFormInputs = class {
|
|
243
|
-
constructor(hostRef) {
|
|
244
|
-
registerInstance(this, hostRef);
|
|
245
|
-
this.inputHandler = (name, value) => {
|
|
246
|
-
updateFormValues(this.formController, { [name]: value });
|
|
247
|
-
};
|
|
248
|
-
this.onAddressFormUpdate = (values) => {
|
|
249
|
-
updateAddressFormValues(this.formController, Object.assign(Object.assign({}, this.formController.values.getValue().address), values));
|
|
250
|
-
};
|
|
251
|
-
this.ownerDefaultValue = undefined;
|
|
252
|
-
this.errors = undefined;
|
|
253
|
-
this.formController = undefined;
|
|
254
|
-
}
|
|
255
|
-
render() {
|
|
256
|
-
return (h("div", { key: '6fcc165d4bc75b92403d9031ad98f05f6b1dcd34', class: 'row gy-3' }, h("div", { key: '74f1e42a13892e95497a99684ba9de64719edb72', class: 'col-12 col-md-6' }, h("form-control-text", { key: '29caea2b0b0a62822cc20c99e697f3db7c22a541', name: 'name', label: 'Full Name', defaultValue: this.ownerDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: '5b0f8da9a0512de70558baa9cb188b4d5e773dc2', class: 'col-12 col-md-4' }, h("form-control-text", { key: '5967094f115a64876f8dc943a273f5a22b193f1c', name: 'title', label: 'Title', defaultValue: this.ownerDefaultValue.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '6c05fec9b87f8ba5e3be9ce74ef727a1e4b14905', class: 'col-12 col-md-6' }, h("form-control-text", { key: '8c5b2839b6de605915d8e7c14a0ba22d3f440bda', name: 'email', label: 'Email Address', defaultValue: this.ownerDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: 'd7eae882aea84b8562e459e66bc1ba885c4be3c7', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '2d6b33f47e4008745fd65c5ef3cb60dd92b85eba', name: 'phone', label: 'Phone Number', defaultValue: this.ownerDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: '92b825163aedf052bdb89721397da69c717e595d', class: 'col-12 col-md-4' }, h("form-control-date", { key: 'cd884b773ef0eb60effc61e8cfbf42b21620cd1c', name: 'dob_full', label: 'Birth Date', defaultValue: this.ownerDefaultValue.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController) })), h("div", { key: '614ba65972946645ba5c7a299c00efd0e85abf5e', class: 'col-12 col-md-8' }, h("form-control-number-masked", { key: '7cd9fe7a1b56d351942a0b962f3c7227459406ae', name: 'identification_number', label: 'SSN', defaultValue: this.ownerDefaultValue.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { key: 'ce08f35a16de4b9be65377cde0a9daa5b4cbe876', class: 'col-12' }, h("justifi-identity-address-form", { key: '79a7f5e8c08fc57383c1975145a6b06bd4e615dd', errors: this.errors.address, defaultValues: this.ownerDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate }))));
|
|
257
|
-
}
|
|
258
|
-
;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export { BusinessOwnerForm as justifi_owner_form, BusinessOwnerFormCore as owner_form_core, BusinessOwnerFormInputs as owner_form_inputs };
|