@justifi/webcomponents 4.7.6 → 4.8.0
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/Business-540a6feb.js +67 -0
- package/dist/cjs/BusinessFormEventTypes-863f48e9.js +42 -0
- package/dist/cjs/{Payout-7821eb61.js → Payout-44b49b2d.js} +2 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +4 -4
- package/dist/cjs/{business-form-schema-a2b87e77.js → business-form-schema-37e5381d.js} +17 -17
- package/dist/cjs/{form-control-datepart_2.cjs.entry.js → form-control-datepart_3.cjs.entry.js} +45 -2
- package/dist/cjs/{form-control-number_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +0 -43
- package/dist/cjs/form-input-masks-e3bf2614.js +9 -0
- package/dist/cjs/{index.esm-c08c2adc.js → index.esm-d25bd7bf.js} +0 -259
- package/dist/cjs/{justifi-additional-questions_6.cjs.entry.js → justifi-additional-questions_5.cjs.entry.js} +9 -279
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +46 -52
- package/dist/cjs/justifi-business-form.cjs.entry.js +31 -35
- package/dist/cjs/justifi-business-list.cjs.entry.js +3 -50
- package/dist/cjs/justifi-business-owners.cjs.entry.js +78 -0
- package/dist/cjs/justifi-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-details.cjs.entry.js +43 -42
- package/dist/cjs/justifi-payment-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +6 -4
- package/dist/cjs/justifi-payments-list.cjs.entry.js +46 -90
- package/dist/cjs/justifi-payout-details.cjs.entry.js +47 -45
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +46 -112
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +1 -1
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +1 -1
- package/dist/cjs/justifi-table_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +52 -0
- package/dist/cjs/payment.service-605896dc.js +20 -0
- package/dist/cjs/payments-list-core.cjs.entry.js +98 -0
- package/dist/cjs/payout-details-core.cjs.entry.js +52 -0
- package/dist/cjs/payout.service-b39f2739.js +21 -0
- package/dist/cjs/payouts-list-core.cjs.entry.js +121 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +1 -1
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +1 -1
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +1 -1
- package/dist/cjs/{utils-99c086ee.js → utils-d126d17c.js} +4 -4
- package/dist/cjs/utils-f5d82f21.js +10 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Business.js +18 -3
- package/dist/collection/api/Payment.js +2 -1
- package/dist/collection/api/mockData/MockPayments.js +25 -0
- package/dist/collection/api/services/payment.service.js +13 -0
- package/dist/collection/api/services/payout.service.js +14 -0
- package/dist/collection/api/services/utils.js +6 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +8 -8
- package/dist/collection/components/business-details/business-details.js +3 -3
- package/dist/collection/components/business-form/BusinessFormEventTypes.js +6 -0
- package/dist/collection/components/business-form/business-address/business-address-form-schema.js +1 -1
- package/dist/collection/components/business-form/business-form-schema.js +16 -16
- package/dist/collection/components/business-form/business-form-stepped.js +77 -50
- package/dist/collection/components/business-form/business-form.js +62 -33
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -3
- package/dist/collection/components/business-form/business-owners/business-owners.js +6 -21
- package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
- package/dist/collection/components/business-form/helpers.js +21 -20
- package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js +1 -1
- package/dist/collection/components/business-form/legal-address-form/legal-address-form.js +1 -2
- package/dist/collection/components/business-form/test/business-form.spec.js +5 -14
- package/dist/collection/components/details/utils.js +2 -2
- package/dist/collection/components/pagination-menu/test/pagination-menu.spec.js +87 -0
- package/dist/collection/components/payment-details/get-payment-details.js +17 -0
- package/dist/collection/components/payment-details/payment-details-core.js +86 -0
- package/dist/collection/components/payment-details/payment-details.js +27 -52
- package/dist/collection/components/payment-details/test/get-payment-details.spec.js +64 -0
- package/dist/collection/components/payment-details/test/payment-details-core.spec.js +47 -0
- package/dist/collection/components/payment-details/test/payment-details.spec.js +31 -0
- package/dist/collection/components/payments-list/get-payments.js +20 -0
- package/dist/collection/components/payments-list/payments-list-core.js +158 -0
- package/dist/collection/components/payments-list/payments-list.js +27 -127
- package/dist/collection/components/payments-list/test/get-payments.spec.js +70 -0
- package/dist/collection/components/payments-list/test/payments-list-core.spec.js +100 -0
- package/dist/collection/components/payments-list/test/payments-list.spec.js +17 -21
- package/dist/collection/components/payout-details/get-payout-details.js +20 -0
- package/dist/collection/components/payout-details/payout-details-core.js +86 -0
- package/dist/collection/components/payout-details/payout-details.js +27 -78
- package/dist/collection/components/payout-details/test/get-payout-details.spec.js +55 -0
- package/dist/collection/components/payout-details/test/payout-details-core.spec.js +72 -0
- package/dist/collection/components/payout-details/test/payout-details.spec.js +13 -0
- package/dist/collection/components/payouts-list/get-payouts.js +20 -0
- package/dist/collection/components/payouts-list/payouts-list-core.js +181 -0
- package/dist/collection/components/payouts-list/payouts-list.js +26 -148
- package/dist/collection/components/payouts-list/test/get-payouts.spec.js +64 -0
- package/dist/collection/components/payouts-list/test/payouts-list-core.spec.js +105 -0
- package/dist/collection/components/payouts-list/test/payouts-list.spec.js +29 -0
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/table/test/table.spec.js +18 -0
- package/dist/collection/components/table/utils.js +1 -1
- package/dist/collection/utils/{phone-masks.js → form-input-masks.js} +1 -0
- package/dist/docs.json +390 -226
- package/dist/esm/Business-1f5e9f6b.js +64 -0
- package/dist/esm/BusinessFormEventTypes-989960ba.js +39 -0
- package/dist/esm/{Payout-c42e3877.js → Payout-dc5f009c.js} +2 -1
- package/dist/esm/{SubAccount-b3ce8720.js → SubAccount-bd59f646.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +5 -5
- package/dist/esm/{business-form-schema-997c585c.js → business-form-schema-f8f554d1.js} +17 -17
- package/dist/esm/{form-control-datepart_2.entry.js → form-control-datepart_3.entry.js} +46 -4
- package/dist/esm/{form-control-number_3.entry.js → form-control-select_2.entry.js} +1 -43
- package/dist/esm/form-input-masks-a8187c77.js +6 -0
- package/dist/esm/{index.esm-8ae36d07.js → index.esm-22b47398.js} +1 -258
- package/dist/esm/{justifi-additional-questions_6.entry.js → justifi-additional-questions_5.entry.js} +9 -278
- package/dist/esm/justifi-billing-form_2.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +5 -5
- package/dist/esm/justifi-business-form-stepped.entry.js +47 -53
- package/dist/esm/justifi-business-form.entry.js +32 -36
- package/dist/esm/justifi-business-list.entry.js +3 -50
- package/dist/{module/business-owners.js → esm/justifi-business-owners.entry.js} +13 -55
- package/dist/esm/justifi-details.entry.js +1 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +44 -43
- package/dist/esm/justifi-payment-form.entry.js +2 -2
- package/dist/esm/justifi-payment-method-form.entry.js +6 -4
- package/dist/esm/justifi-payments-list.entry.js +47 -91
- package/dist/esm/justifi-payout-details.entry.js +48 -46
- package/dist/esm/justifi-payouts-list.entry.js +47 -113
- package/dist/esm/justifi-proceeds-list.entry.js +2 -2
- package/dist/esm/justifi-refund-form.entry.js +2 -2
- package/dist/esm/justifi-subaccount-details.entry.js +4 -4
- package/dist/esm/justifi-subaccounts-list.entry.js +3 -3
- package/dist/esm/justifi-table_2.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/payment-details-core.entry.js +48 -0
- package/dist/esm/payment.service-bea02ccf.js +18 -0
- package/dist/esm/payments-list-core.entry.js +94 -0
- package/dist/{webcomponents/p-34c30022.entry.js → esm/payout-details-core.entry.js} +48 -1
- package/dist/esm/payout.service-92e56814.js +19 -0
- package/dist/esm/payouts-list-core.entry.js +117 -0
- package/dist/esm/subaccount-account-details_4.entry.js +2 -2
- package/dist/esm/subaccount-bank-details.entry.js +1 -1
- package/dist/esm/subaccount-terms-details.entry.js +1 -1
- package/dist/esm/utils-546ca6aa.js +8 -0
- package/dist/esm/{utils-f33f7e3c.js → utils-576874df.js} +4 -4
- package/dist/esm/{utils-26c7dd12.js → utils-dd428dba.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +64 -0
- package/dist/module/BusinessFormEventTypes.js +39 -0
- package/dist/module/Payout.js +2 -1
- package/dist/module/additional-questions-details2.js +4 -4
- package/dist/module/business-generic-info.js +25 -27
- package/dist/module/business-representative.js +1 -1
- package/dist/module/form-input-masks.js +6 -0
- package/dist/module/index.esm.js +1 -258
- package/dist/module/justifi-business-details.js +3 -3
- package/dist/module/justifi-business-form-stepped.js +62 -74
- package/dist/module/justifi-business-form.js +47 -57
- package/dist/module/justifi-business-list.js +1 -48
- package/dist/module/justifi-business-owners.js +115 -1
- package/dist/module/justifi-payment-details.js +52 -48
- package/dist/module/justifi-payments-list.js +58 -102
- package/dist/module/justifi-payout-details.js +57 -52
- package/dist/module/justifi-payouts-list.js +59 -125
- package/dist/module/justifi-refund-form.js +1 -1
- package/dist/module/legal-address-form.js +1 -202
- package/dist/module/payment-details-core.d.ts +11 -0
- package/dist/module/payment-details-core.js +6 -0
- package/dist/module/payment-details-core2.js +76 -0
- package/dist/module/payment-method-form.js +6 -4
- package/dist/module/payment.service.js +18 -0
- package/dist/module/payments-list-core.d.ts +11 -0
- package/dist/module/payments-list-core.js +6 -0
- package/dist/module/payments-list-core2.js +131 -0
- package/dist/module/payout-details-core.d.ts +11 -0
- package/dist/module/payout-details-core.js +6 -0
- package/dist/module/payout-details-core2.js +76 -0
- package/dist/module/payout.service.js +19 -0
- package/dist/module/payouts-list-core.d.ts +11 -0
- package/dist/module/payouts-list-core.js +6 -0
- package/dist/module/payouts-list-core2.js +153 -0
- package/dist/module/table.js +2 -2
- package/dist/module/utils.js +4 -4
- package/dist/module/utils3.js +6 -29
- package/dist/types/api/Business.d.ts +60 -37
- package/dist/types/api/Payment.d.ts +33 -1
- package/dist/types/api/services/payment.service.d.ts +9 -0
- package/dist/types/api/services/payout.service.d.ts +9 -0
- package/dist/types/api/services/utils.d.ts +1 -0
- package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +2 -2
- package/dist/types/components/business-details/business-details.d.ts +2 -2
- package/dist/types/components/business-form/BusinessFormEventTypes.d.ts +5 -0
- package/dist/types/components/business-form/business-form-schema.d.ts +1 -19
- package/dist/types/components/business-form/business-form-stepped.d.ts +19 -5
- package/dist/types/components/business-form/business-form.d.ts +11 -2
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +2 -0
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +1 -1
- package/dist/types/components/business-form/helpers.d.ts +1 -1
- package/dist/types/components/details/utils.d.ts +4 -3
- package/dist/types/components/payment-details/get-payment-details.d.ts +8 -0
- package/dist/types/components/payment-details/payment-details-core.d.ts +11 -0
- package/dist/types/components/payment-details/payment-details.d.ts +6 -6
- package/dist/types/components/payment-method-form/payment-method-responses.d.ts +10 -2
- package/dist/types/components/payments-list/get-payments.d.ts +9 -0
- package/dist/types/components/payments-list/payments-list-core.d.ts +17 -0
- package/dist/types/components/payments-list/payments-list.d.ts +4 -12
- package/dist/types/components/payout-details/get-payout-details.d.ts +8 -0
- package/dist/types/components/payout-details/payout-details-core.d.ts +11 -0
- package/dist/types/components/payout-details/payout-details.d.ts +5 -31
- package/dist/types/components/payouts-list/get-payouts.d.ts +9 -0
- package/dist/types/components/payouts-list/payouts-list-core.d.ts +18 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +4 -13
- package/dist/types/components.d.ts +134 -136
- package/dist/types/utils/form-input-masks.d.ts +6 -0
- package/dist/webcomponents/p-081cf5f6.entry.js +1 -0
- package/dist/webcomponents/p-0b9146cd.entry.js +1 -0
- package/dist/webcomponents/p-112acd3c.entry.js +1 -0
- package/dist/webcomponents/p-1555e6b1.js +1 -0
- package/dist/webcomponents/{p-ac8be2a8.entry.js → p-16f41fd0.entry.js} +1 -1
- package/dist/webcomponents/p-17715325.js +1 -0
- package/dist/webcomponents/p-19c5ddf1.entry.js +1 -0
- package/dist/webcomponents/p-1b6ff0d3.entry.js +1 -0
- package/dist/webcomponents/p-1cb65d15.entry.js +1 -0
- package/dist/webcomponents/{p-2b2f8162.entry.js → p-2e318b6a.entry.js} +1 -1
- package/dist/webcomponents/p-34de1c5d.entry.js +1 -0
- package/dist/webcomponents/p-36618b59.entry.js +1 -0
- package/dist/webcomponents/p-3a4d4869.entry.js +1 -0
- package/dist/webcomponents/p-3cb0b96d.js +1 -0
- package/dist/webcomponents/p-4ba2c711.entry.js +1 -0
- package/dist/webcomponents/p-4c01df65.entry.js +1 -0
- package/dist/webcomponents/p-4fa27a28.entry.js +1 -0
- package/dist/webcomponents/{p-3bef762a.js → p-50730e69.js} +1 -1
- package/dist/webcomponents/p-57e592ac.entry.js +1 -0
- package/dist/webcomponents/p-5e142186.entry.js +1 -0
- package/dist/webcomponents/{p-85ddbe82.entry.js → p-5f8b9f64.entry.js} +1 -1
- package/dist/webcomponents/p-663bfe87.js +1 -0
- package/dist/webcomponents/p-6ab67031.entry.js +1 -0
- package/dist/webcomponents/p-6ed680e9.js +1 -0
- package/dist/webcomponents/{p-d8835e7a.entry.js → p-731cb109.entry.js} +1 -1
- package/dist/webcomponents/{p-525adabf.entry.js → p-7c0f91fa.entry.js} +1 -1
- package/dist/webcomponents/{p-40fb25c6.entry.js → p-7dd83492.entry.js} +1 -1
- package/dist/webcomponents/p-810b72b5.js +1 -0
- package/dist/webcomponents/p-876c7257.entry.js +1 -0
- package/dist/webcomponents/p-88027949.js +1 -0
- package/dist/webcomponents/{p-64a5126c.entry.js → p-896a9ddb.entry.js} +1 -1
- package/dist/webcomponents/{p-9ba0be02.entry.js → p-8a90b976.entry.js} +1 -1
- package/dist/webcomponents/p-9b99370e.js +1 -0
- package/dist/webcomponents/p-9cb3ff78.entry.js +1 -0
- package/dist/webcomponents/p-ade12f56.js +1 -0
- package/dist/webcomponents/{p-45d2761d.entry.js → p-b5aba473.entry.js} +1 -1
- package/dist/webcomponents/p-b8a8b551.js +1 -0
- package/dist/webcomponents/{p-c950901c.entry.js → p-c0f882ce.entry.js} +1 -1
- package/dist/webcomponents/p-d66a6057.entry.js +1 -0
- package/dist/webcomponents/{p-9cec4a27.entry.js → p-d71ce1cd.entry.js} +1 -1
- package/dist/webcomponents/{p-c43e29ac.entry.js → p-ec4f27e7.entry.js} +1 -1
- package/dist/webcomponents/{p-9a6e4749.js → p-f0c535ed.js} +1 -1
- package/dist/webcomponents/{p-c63a98f6.entry.js → p-f7a3fd12.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +6 -4
- package/dist/cjs/utils-931f4879.js +0 -34
- package/dist/esm/utils-8cc130a9.js +0 -31
- package/dist/module/phone-masks.js +0 -5
- package/dist/types/utils/phone-masks.d.ts +0 -3
- package/dist/webcomponents/p-0a1347cf.entry.js +0 -1
- package/dist/webcomponents/p-0f3e9483.js +0 -1
- package/dist/webcomponents/p-0fa49c38.entry.js +0 -1
- package/dist/webcomponents/p-1e2a98bf.js +0 -1
- package/dist/webcomponents/p-5a502ceb.entry.js +0 -1
- package/dist/webcomponents/p-5bf0ac1a.entry.js +0 -1
- package/dist/webcomponents/p-6e80f063.entry.js +0 -1
- package/dist/webcomponents/p-71679a41.js +0 -1
- package/dist/webcomponents/p-78baff54.js +0 -1
- package/dist/webcomponents/p-8bbb1b10.entry.js +0 -1
- package/dist/webcomponents/p-90926321.js +0 -1
- package/dist/webcomponents/p-9e0d2179.entry.js +0 -1
- package/dist/webcomponents/p-c4826a33.entry.js +0 -1
- package/dist/webcomponents/p-d4755024.entry.js +0 -1
- package/dist/webcomponents/p-e8e109bd.entry.js +0 -1
- package/dist/webcomponents/p-ead8cfc2.entry.js +0 -1
- package/dist/webcomponents/p-f74899b9.entry.js +0 -1
package/dist/module/index.esm.js
CHANGED
|
@@ -1339,81 +1339,6 @@ for (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At
|
|
|
1339
1339
|
for (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;
|
|
1340
1340
|
for (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;
|
|
1341
1341
|
|
|
1342
|
-
function create$7() {
|
|
1343
|
-
return new BooleanSchema();
|
|
1344
|
-
}
|
|
1345
|
-
class BooleanSchema extends Schema {
|
|
1346
|
-
constructor() {
|
|
1347
|
-
super({
|
|
1348
|
-
type: 'boolean',
|
|
1349
|
-
check(v) {
|
|
1350
|
-
if (v instanceof Boolean) v = v.valueOf();
|
|
1351
|
-
return typeof v === 'boolean';
|
|
1352
|
-
}
|
|
1353
|
-
});
|
|
1354
|
-
this.withMutation(() => {
|
|
1355
|
-
this.transform((value, _raw, ctx) => {
|
|
1356
|
-
if (ctx.spec.coerce && !ctx.isType(value)) {
|
|
1357
|
-
if (/^(true|1)$/i.test(String(value))) return true;
|
|
1358
|
-
if (/^(false|0)$/i.test(String(value))) return false;
|
|
1359
|
-
}
|
|
1360
|
-
return value;
|
|
1361
|
-
});
|
|
1362
|
-
});
|
|
1363
|
-
}
|
|
1364
|
-
isTrue(message = boolean.isValue) {
|
|
1365
|
-
return this.test({
|
|
1366
|
-
message,
|
|
1367
|
-
name: 'is-value',
|
|
1368
|
-
exclusive: true,
|
|
1369
|
-
params: {
|
|
1370
|
-
value: 'true'
|
|
1371
|
-
},
|
|
1372
|
-
test(value) {
|
|
1373
|
-
return isAbsent(value) || value === true;
|
|
1374
|
-
}
|
|
1375
|
-
});
|
|
1376
|
-
}
|
|
1377
|
-
isFalse(message = boolean.isValue) {
|
|
1378
|
-
return this.test({
|
|
1379
|
-
message,
|
|
1380
|
-
name: 'is-value',
|
|
1381
|
-
exclusive: true,
|
|
1382
|
-
params: {
|
|
1383
|
-
value: 'false'
|
|
1384
|
-
},
|
|
1385
|
-
test(value) {
|
|
1386
|
-
return isAbsent(value) || value === false;
|
|
1387
|
-
}
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
default(def) {
|
|
1391
|
-
return super.default(def);
|
|
1392
|
-
}
|
|
1393
|
-
defined(msg) {
|
|
1394
|
-
return super.defined(msg);
|
|
1395
|
-
}
|
|
1396
|
-
optional() {
|
|
1397
|
-
return super.optional();
|
|
1398
|
-
}
|
|
1399
|
-
required(msg) {
|
|
1400
|
-
return super.required(msg);
|
|
1401
|
-
}
|
|
1402
|
-
notRequired() {
|
|
1403
|
-
return super.notRequired();
|
|
1404
|
-
}
|
|
1405
|
-
nullable() {
|
|
1406
|
-
return super.nullable();
|
|
1407
|
-
}
|
|
1408
|
-
nonNullable(msg) {
|
|
1409
|
-
return super.nonNullable(msg);
|
|
1410
|
-
}
|
|
1411
|
-
strip(v) {
|
|
1412
|
-
return super.strip(v);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
create$7.prototype = BooleanSchema.prototype;
|
|
1416
|
-
|
|
1417
1342
|
// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
|
|
1418
1343
|
let rEmail =
|
|
1419
1344
|
// eslint-disable-next-line
|
|
@@ -2079,186 +2004,4 @@ class ObjectSchema extends Schema {
|
|
|
2079
2004
|
}
|
|
2080
2005
|
create$3.prototype = ObjectSchema.prototype;
|
|
2081
2006
|
|
|
2082
|
-
|
|
2083
|
-
return new ArraySchema(type);
|
|
2084
|
-
}
|
|
2085
|
-
class ArraySchema extends Schema {
|
|
2086
|
-
constructor(type) {
|
|
2087
|
-
super({
|
|
2088
|
-
type: 'array',
|
|
2089
|
-
spec: {
|
|
2090
|
-
types: type
|
|
2091
|
-
},
|
|
2092
|
-
check(v) {
|
|
2093
|
-
return Array.isArray(v);
|
|
2094
|
-
}
|
|
2095
|
-
});
|
|
2096
|
-
|
|
2097
|
-
// `undefined` specifically means uninitialized, as opposed to "no subtype"
|
|
2098
|
-
this.innerType = void 0;
|
|
2099
|
-
this.innerType = type;
|
|
2100
|
-
}
|
|
2101
|
-
_cast(_value, _opts) {
|
|
2102
|
-
const value = super._cast(_value, _opts);
|
|
2103
|
-
|
|
2104
|
-
// should ignore nulls here
|
|
2105
|
-
if (!this._typeCheck(value) || !this.innerType) {
|
|
2106
|
-
return value;
|
|
2107
|
-
}
|
|
2108
|
-
let isChanged = false;
|
|
2109
|
-
const castArray = value.map((v, idx) => {
|
|
2110
|
-
const castElement = this.innerType.cast(v, Object.assign({}, _opts, {
|
|
2111
|
-
path: `${_opts.path || ''}[${idx}]`
|
|
2112
|
-
}));
|
|
2113
|
-
if (castElement !== v) {
|
|
2114
|
-
isChanged = true;
|
|
2115
|
-
}
|
|
2116
|
-
return castElement;
|
|
2117
|
-
});
|
|
2118
|
-
return isChanged ? castArray : value;
|
|
2119
|
-
}
|
|
2120
|
-
_validate(_value, options = {}, panic, next) {
|
|
2121
|
-
var _options$recursive;
|
|
2122
|
-
// let sync = options.sync;
|
|
2123
|
-
// let path = options.path;
|
|
2124
|
-
let innerType = this.innerType;
|
|
2125
|
-
// let endEarly = options.abortEarly ?? this.spec.abortEarly;
|
|
2126
|
-
let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;
|
|
2127
|
-
super._validate(_value, options, panic, (arrayErrors, value) => {
|
|
2128
|
-
var _options$originalValu2;
|
|
2129
|
-
if (!recursive || !innerType || !this._typeCheck(value)) {
|
|
2130
|
-
next(arrayErrors, value);
|
|
2131
|
-
return;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
// #950 Ensure that sparse array empty slots are validated
|
|
2135
|
-
let tests = new Array(value.length);
|
|
2136
|
-
for (let index = 0; index < value.length; index++) {
|
|
2137
|
-
var _options$originalValu;
|
|
2138
|
-
tests[index] = innerType.asNestedTest({
|
|
2139
|
-
options,
|
|
2140
|
-
index,
|
|
2141
|
-
parent: value,
|
|
2142
|
-
parentPath: options.path,
|
|
2143
|
-
originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value
|
|
2144
|
-
});
|
|
2145
|
-
}
|
|
2146
|
-
this.runTests({
|
|
2147
|
-
value,
|
|
2148
|
-
tests,
|
|
2149
|
-
originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,
|
|
2150
|
-
options
|
|
2151
|
-
}, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));
|
|
2152
|
-
});
|
|
2153
|
-
}
|
|
2154
|
-
clone(spec) {
|
|
2155
|
-
const next = super.clone(spec);
|
|
2156
|
-
// @ts-expect-error readonly
|
|
2157
|
-
next.innerType = this.innerType;
|
|
2158
|
-
return next;
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
/** Parse an input JSON string to an object */
|
|
2162
|
-
json() {
|
|
2163
|
-
return this.transform(parseJson);
|
|
2164
|
-
}
|
|
2165
|
-
concat(schema) {
|
|
2166
|
-
let next = super.concat(schema);
|
|
2167
|
-
|
|
2168
|
-
// @ts-expect-error readonly
|
|
2169
|
-
next.innerType = this.innerType;
|
|
2170
|
-
if (schema.innerType)
|
|
2171
|
-
// @ts-expect-error readonly
|
|
2172
|
-
next.innerType = next.innerType ?
|
|
2173
|
-
// @ts-expect-error Lazy doesn't have concat and will break
|
|
2174
|
-
next.innerType.concat(schema.innerType) : schema.innerType;
|
|
2175
|
-
return next;
|
|
2176
|
-
}
|
|
2177
|
-
of(schema) {
|
|
2178
|
-
// FIXME: this should return a new instance of array without the default to be
|
|
2179
|
-
let next = this.clone();
|
|
2180
|
-
if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));
|
|
2181
|
-
|
|
2182
|
-
// @ts-expect-error readonly
|
|
2183
|
-
next.innerType = schema;
|
|
2184
|
-
next.spec = Object.assign({}, next.spec, {
|
|
2185
|
-
types: schema
|
|
2186
|
-
});
|
|
2187
|
-
return next;
|
|
2188
|
-
}
|
|
2189
|
-
length(length, message = array.length) {
|
|
2190
|
-
return this.test({
|
|
2191
|
-
message,
|
|
2192
|
-
name: 'length',
|
|
2193
|
-
exclusive: true,
|
|
2194
|
-
params: {
|
|
2195
|
-
length
|
|
2196
|
-
},
|
|
2197
|
-
skipAbsent: true,
|
|
2198
|
-
test(value) {
|
|
2199
|
-
return value.length === this.resolve(length);
|
|
2200
|
-
}
|
|
2201
|
-
});
|
|
2202
|
-
}
|
|
2203
|
-
min(min, message) {
|
|
2204
|
-
message = message || array.min;
|
|
2205
|
-
return this.test({
|
|
2206
|
-
message,
|
|
2207
|
-
name: 'min',
|
|
2208
|
-
exclusive: true,
|
|
2209
|
-
params: {
|
|
2210
|
-
min
|
|
2211
|
-
},
|
|
2212
|
-
skipAbsent: true,
|
|
2213
|
-
// FIXME(ts): Array<typeof T>
|
|
2214
|
-
test(value) {
|
|
2215
|
-
return value.length >= this.resolve(min);
|
|
2216
|
-
}
|
|
2217
|
-
});
|
|
2218
|
-
}
|
|
2219
|
-
max(max, message) {
|
|
2220
|
-
message = message || array.max;
|
|
2221
|
-
return this.test({
|
|
2222
|
-
message,
|
|
2223
|
-
name: 'max',
|
|
2224
|
-
exclusive: true,
|
|
2225
|
-
params: {
|
|
2226
|
-
max
|
|
2227
|
-
},
|
|
2228
|
-
skipAbsent: true,
|
|
2229
|
-
test(value) {
|
|
2230
|
-
return value.length <= this.resolve(max);
|
|
2231
|
-
}
|
|
2232
|
-
});
|
|
2233
|
-
}
|
|
2234
|
-
ensure() {
|
|
2235
|
-
return this.default(() => []).transform((val, original) => {
|
|
2236
|
-
// We don't want to return `null` for nullable schema
|
|
2237
|
-
if (this._typeCheck(val)) return val;
|
|
2238
|
-
return original == null ? [] : [].concat(original);
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
compact(rejector) {
|
|
2242
|
-
let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);
|
|
2243
|
-
return this.transform(values => values != null ? values.filter(reject) : values);
|
|
2244
|
-
}
|
|
2245
|
-
describe(options) {
|
|
2246
|
-
const next = (options ? this.resolve(options) : this).clone();
|
|
2247
|
-
const base = super.describe(options);
|
|
2248
|
-
if (next.innerType) {
|
|
2249
|
-
var _innerOptions;
|
|
2250
|
-
let innerOptions = options;
|
|
2251
|
-
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
2252
|
-
innerOptions = Object.assign({}, innerOptions, {
|
|
2253
|
-
parent: innerOptions.value,
|
|
2254
|
-
value: innerOptions.value[0]
|
|
2255
|
-
});
|
|
2256
|
-
}
|
|
2257
|
-
base.innerType = next.innerType.describe(innerOptions);
|
|
2258
|
-
}
|
|
2259
|
-
return base;
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
create$2.prototype = ArraySchema.prototype;
|
|
2263
|
-
|
|
2264
|
-
export { create$6 as a, create$7 as b, create$3 as c, create$2 as d, create$5 as e };
|
|
2007
|
+
export { create$6 as a, create$5 as b, create$3 as c };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { B as Business } from './Business.js';
|
|
2
3
|
import { A as Api } from './Api.js';
|
|
3
4
|
import './Pagination.js';
|
|
4
5
|
import './Payout.js';
|
|
@@ -54,7 +55,7 @@ const BusinessDetails = /*@__PURE__*/ proxyCustomElement(class BusinessDetails e
|
|
|
54
55
|
this.renderState = RENDER_STATES.ERROR;
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
this.business = response.data;
|
|
58
|
+
this.business = new Business(response.data);
|
|
58
59
|
this.renderState = RENDER_STATES.READY;
|
|
59
60
|
}
|
|
60
61
|
catch (error) {
|
|
@@ -67,14 +68,13 @@ const BusinessDetails = /*@__PURE__*/ proxyCustomElement(class BusinessDetails e
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
render() {
|
|
70
|
-
var _a, _b, _c;
|
|
71
71
|
if (this.renderState === RENDER_STATES.LOADING) {
|
|
72
72
|
return h(Host, null, LoadingState);
|
|
73
73
|
}
|
|
74
74
|
if (this.renderState === RENDER_STATES.ERROR) {
|
|
75
75
|
return h(Host, null, ErrorState(this.errorMessage));
|
|
76
76
|
}
|
|
77
|
-
return (h(Host, null, h("generic-info-details", { business: this.business }), h("legal-address-details", { legalAddress:
|
|
77
|
+
return (h(Host, null, h("generic-info-details", { business: this.business }), h("legal-address-details", { legalAddress: this.business.legal_address }), h("representative-details", { representative: this.business.representative }), h("owner-details", { owners: this.business.owners }), h("additional-questions-details", { additionalQuestions: this.business.additional_questions })));
|
|
78
78
|
}
|
|
79
79
|
static get style() { return businessDetailsCss; }
|
|
80
80
|
}, [1, "justifi-business-details", {
|