@justifi/webcomponents 4.7.3 → 4.7.5
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/LICENSE +1 -1
- package/dist/cjs/{Api-548eaa62.js → Api-a06b996e.js} +35 -35
- package/dist/cjs/{Pagination-cae1dcbd.js → Pagination-0da8f095.js} +5 -5
- package/dist/cjs/Payout-7821eb61.js +183 -0
- package/dist/cjs/SubAccount-b9487cbb.js +107 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +50 -50
- package/dist/cjs/business-form-schema-a2b87e77.js +148 -0
- package/dist/cjs/config-ff2dda66.js +15 -0
- package/dist/cjs/exported-parts-b18c68c2.js +9 -0
- package/dist/cjs/{form-1e732a9d.js → form-2ad3d374.js} +84 -84
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +108 -108
- package/dist/cjs/form-control-monetary.cjs.entry.js +50 -50
- package/dist/cjs/form-control-number_3.cjs.entry.js +108 -108
- package/dist/cjs/helpers-b254d050.js +26 -0
- package/dist/cjs/{index-c5ace247.js → index-4286ac32.js} +189 -51
- package/dist/cjs/{index-5a880722.js → index-fc5339a5.js} +406 -195
- package/dist/cjs/{index.esm-91ec051e.js → index.esm-c08c2adc.js} +61 -30
- package/dist/cjs/justifi-additional-questions_6.cjs.entry.js +372 -372
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +56 -56
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +79 -79
- package/dist/cjs/justifi-business-details.cjs.entry.js +61 -61
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +110 -110
- package/dist/cjs/justifi-business-form.cjs.entry.js +71 -71
- package/dist/cjs/justifi-business-list.cjs.entry.js +128 -128
- package/dist/cjs/justifi-card-form.cjs.entry.js +57 -57
- package/dist/cjs/justifi-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +125 -125
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +72 -72
- package/dist/cjs/justifi-payment-details.cjs.entry.js +53 -53
- package/dist/cjs/justifi-payment-form.cjs.entry.js +89 -89
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +171 -188
- package/dist/cjs/justifi-payments-list.cjs.entry.js +97 -97
- package/dist/cjs/justifi-payout-details.cjs.entry.js +54 -54
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +120 -119
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +135 -135
- package/dist/cjs/justifi-refund-form.cjs.entry.js +85 -85
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +62 -62
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +84 -84
- package/dist/cjs/justifi-table_2.cjs.entry.js +62 -61
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +38 -38
- package/dist/cjs/state-options-96d05a98.js +246 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +41 -41
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +11 -11
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +11 -11
- package/dist/cjs/{utils-13d069be.js → utils-36bf8b3e.js} +108 -108
- package/dist/cjs/utils-a2ee48ca.js +35 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/api/Api.js +34 -34
- package/dist/collection/api/Business.js +39 -39
- package/dist/collection/api/Pagination.js +5 -5
- package/dist/collection/api/Payment.js +108 -108
- package/dist/collection/api/Payout.js +33 -33
- package/dist/collection/api/Proceed.js +33 -33
- package/dist/collection/api/SubAccount.js +78 -78
- package/dist/collection/api/mockData/MockOnboardingData.js +108 -108
- package/dist/collection/api/mockData/MockPayments.js +207 -207
- package/dist/collection/api/mockData/MockSubAccount.js +96 -96
- package/dist/collection/api/mockData/mockGrossVolumeReport.js +123 -123
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/bank-account-form/bank-account-form.js +260 -259
- package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js +10 -10
- package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js +38 -38
- package/dist/collection/components/billing-form/billing-form-schema.js +6 -6
- package/dist/collection/components/billing-form/billing-form.css +16 -12
- package/dist/collection/components/billing-form/billing-form.js +177 -179
- package/dist/collection/components/billing-form/state-options.js +240 -240
- package/dist/collection/components/billing-form/test/billing-form.spec.js +50 -50
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +23 -16
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +43 -43
- package/dist/collection/components/business-details/business-details.css +11 -4
- package/dist/collection/components/business-details/business-details.js +107 -107
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +23 -16
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +43 -43
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +23 -16
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +43 -43
- package/dist/collection/components/business-details/owner-details/owner-details.css +23 -16
- package/dist/collection/components/business-details/owner-details/owner-details.js +45 -45
- package/dist/collection/components/business-details/representative-details/representative-details.css +23 -16
- package/dist/collection/components/business-details/representative-details/representative-details.js +43 -43
- package/dist/collection/components/business-form/additional-questions/additional-questions.js +49 -49
- package/dist/collection/components/business-form/business-address/business-address-form-schema.js +8 -8
- package/dist/collection/components/business-form/business-address/business-address-form.css +16 -12
- package/dist/collection/components/business-form/business-address/business-address-form.js +93 -93
- package/dist/collection/components/business-form/business-address/test/business-address.e2e.js +6 -6
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js +21 -21
- package/dist/collection/components/business-form/business-form-schema.js +137 -137
- package/dist/collection/components/business-form/business-form-stepped.css +23 -16
- package/dist/collection/components/business-form/business-form-stepped.js +203 -203
- package/dist/collection/components/business-form/business-form.css +23 -16
- package/dist/collection/components/business-form/business-form.js +111 -111
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.css +16 -12
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +57 -57
- package/dist/collection/components/business-form/business-owners/business-owners.css +23 -16
- package/dist/collection/components/business-form/business-owners/business-owners.js +117 -117
- package/dist/collection/components/business-form/business-representative/business-representative.css +16 -12
- package/dist/collection/components/business-form/business-representative/business-representative.js +65 -65
- package/dist/collection/components/business-form/helpers.js +19 -19
- package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js +6 -6
- package/dist/collection/components/business-form/legal-address-form/legal-address-form.css +16 -12
- package/dist/collection/components/business-form/legal-address-form/legal-address-form.js +61 -61
- package/dist/collection/components/business-form/test/business-form.spec.js +35 -35
- package/dist/collection/components/business-list/business-list.css +3 -0
- package/dist/collection/components/business-list/business-list.js +160 -160
- package/dist/collection/components/business-list/business-list.stories.js +10 -10
- package/dist/collection/components/card-form/card-form.js +278 -277
- package/dist/collection/components/card-form/test/card-form.e2e.js +10 -10
- package/dist/collection/components/card-form/test/card-form.spec.js +45 -45
- package/dist/collection/components/details/details.css +38 -31
- package/dist/collection/components/details/details.js +42 -42
- package/dist/collection/components/form/form-control-datepart.js +224 -224
- package/dist/collection/components/form/form-control-monetary.js +177 -177
- package/dist/collection/components/form/form-control-number-masked.js +208 -208
- package/dist/collection/components/form/form-control-number.css +7 -2
- package/dist/collection/components/form/form-control-number.js +188 -188
- package/dist/collection/components/form/form-control-select.css +7 -2
- package/dist/collection/components/form/form-control-select.js +196 -196
- package/dist/collection/components/form/form-control-text.css +7 -2
- package/dist/collection/components/form/form-control-text.js +188 -188
- package/dist/collection/components/form/form.js +80 -80
- package/dist/collection/components/gross-payment-chart/chart-utils.js +52 -52
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +3 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +125 -125
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +7 -7
- package/dist/collection/components/pagination-menu/pagination-menu.js +72 -72
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +144 -144
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +10 -10
- package/dist/collection/components/payment-details/payment-details.css +38 -31
- package/dist/collection/components/payment-details/payment-details.js +106 -106
- package/dist/collection/components/payment-form/payment-form.css +16 -12
- package/dist/collection/components/payment-form/payment-form.js +319 -318
- package/dist/collection/components/payment-form/payment-method-selector.css +6 -2
- package/dist/collection/components/payment-form/payment-method-selector.js +90 -90
- package/dist/collection/components/payment-form/test/payment-form.e2e.js +9 -9
- package/dist/collection/components/payment-form/test/payment-form.spec.js +157 -157
- package/dist/collection/components/payment-method-form/get-computed-theme.js +47 -47
- package/dist/collection/components/payment-method-form/message-event-types.js +14 -14
- package/dist/collection/components/payment-method-form/payment-method-form.js +288 -262
- package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js +16 -16
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +43 -43
- package/dist/collection/components/payments-list/payments-list.css +3 -0
- package/dist/collection/components/payments-list/payments-list.js +177 -177
- package/dist/collection/components/payments-list/test/payments-list.spec.js +21 -21
- package/dist/collection/components/payout-details/payout-details.css +38 -31
- package/dist/collection/components/payout-details/payout-details.js +107 -107
- package/dist/collection/components/payouts-list/payouts-list.css +3 -0
- package/dist/collection/components/payouts-list/payouts-list.js +200 -199
- package/dist/collection/components/proceeds-list/proceeds-list.css +3 -0
- package/dist/collection/components/proceeds-list/proceeds-list.js +182 -182
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +12 -12
- package/dist/collection/components/refund-form/refund-form-schema.js +9 -9
- package/dist/collection/components/refund-form/refund-form.css +23 -16
- package/dist/collection/components/refund-form/refund-form.js +216 -216
- package/dist/collection/components/refund-form/refund-form.stories.js +27 -27
- package/dist/collection/components/select-input/select-input.css +7 -2
- package/dist/collection/components/select-input/select-input.js +139 -139
- package/dist/collection/components/select-input/test/select-input.spec.js +38 -38
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +65 -65
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +43 -43
- package/dist/collection/components/subaccount-details/subaccount-details.css +38 -31
- package/dist/collection/components/subaccount-details/subaccount-details.js +132 -132
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js +9 -9
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +43 -44
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +44 -43
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +43 -43
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +23 -16
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +43 -43
- package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +7 -7
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +164 -164
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +12 -12
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +6 -6
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +21 -21
- package/dist/collection/components/table/exported-parts.js +5 -0
- package/dist/collection/components/table/table.css +38 -31
- package/dist/collection/components/table/table.js +225 -224
- package/dist/collection/components/table/test/table.spec.js +48 -48
- package/dist/collection/components/text-input/test/text-input.spec.js +31 -31
- package/dist/collection/components/text-input/text-input.css +7 -2
- package/dist/collection/components/text-input/text-input.js +122 -122
- package/dist/collection/utils/country-options.js +198 -198
- package/dist/collection/utils/phone-masks.js +1 -1
- package/dist/collection/utils/utils.js +107 -107
- package/dist/config.js +9 -9
- package/dist/docs.d.ts +401 -0
- package/dist/docs.json +6506 -0
- package/dist/esm/{Api-c65d3ed8.js → Api-0e88671c.js} +35 -35
- package/dist/esm/{Pagination-31f770d6.js → Pagination-afc8f96d.js} +5 -5
- package/dist/esm/Payout-c42e3877.js +179 -0
- package/dist/esm/SubAccount-b3ce8720.js +105 -0
- package/dist/esm/additional-questions-details_5.entry.js +50 -50
- package/dist/esm/business-form-schema-997c585c.js +144 -0
- package/dist/esm/config-476c7241.js +13 -0
- package/dist/esm/exported-parts-abd4c027.js +7 -0
- package/dist/esm/{form-32cf3d1e.js → form-5279c05a.js} +84 -84
- package/dist/esm/form-control-datepart_2.entry.js +108 -108
- package/dist/esm/form-control-monetary.entry.js +50 -50
- package/dist/esm/form-control-number_3.entry.js +108 -108
- package/dist/esm/helpers-d8a6a0f1.js +24 -0
- package/dist/esm/{index-5ed53c20.js → index-5eb05747.js} +406 -195
- package/dist/esm/{index-7471ed60.js → index-ff8194f9.js} +189 -51
- package/dist/esm/{index.esm-9397ffa0.js → index.esm-8ae36d07.js} +61 -30
- package/dist/esm/justifi-additional-questions_6.entry.js +372 -372
- package/dist/esm/justifi-bank-account-form.entry.js +56 -56
- package/dist/esm/justifi-billing-form_2.entry.js +79 -79
- package/dist/esm/justifi-business-details.entry.js +61 -61
- package/dist/esm/justifi-business-form-stepped.entry.js +110 -110
- package/dist/esm/justifi-business-form.entry.js +71 -71
- package/dist/esm/justifi-business-list.entry.js +128 -128
- package/dist/esm/justifi-card-form.entry.js +57 -57
- package/dist/esm/justifi-details.entry.js +13 -13
- package/dist/esm/justifi-gross-payment-chart.entry.js +125 -125
- package/dist/esm/justifi-payment-balance-transactions.entry.js +72 -72
- package/dist/esm/justifi-payment-details.entry.js +53 -53
- package/dist/esm/justifi-payment-form.entry.js +89 -89
- package/dist/esm/justifi-payment-method-form.entry.js +171 -188
- package/dist/esm/justifi-payments-list.entry.js +97 -97
- package/dist/esm/justifi-payout-details.entry.js +54 -54
- package/dist/esm/justifi-payouts-list.entry.js +120 -119
- package/dist/esm/justifi-proceeds-list.entry.js +135 -135
- package/dist/esm/justifi-refund-form.entry.js +85 -85
- package/dist/esm/justifi-subaccount-details.entry.js +62 -62
- package/dist/esm/justifi-subaccounts-list.entry.js +84 -84
- package/dist/esm/justifi-table_2.entry.js +62 -61
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/select-input_2.entry.js +38 -38
- package/dist/esm/state-options-fc1daf67.js +244 -0
- package/dist/esm/subaccount-account-details_4.entry.js +41 -41
- package/dist/esm/subaccount-bank-details.entry.js +11 -11
- package/dist/esm/subaccount-terms-details.entry.js +11 -11
- package/dist/esm/{utils-40b7002c.js → utils-26c7dd12.js} +108 -108
- package/dist/esm/utils-7c6bd149.js +27 -0
- package/dist/esm/webcomponents.js +4 -4
- package/{loader → dist/loader}/cdn.js +1 -1
- package/{loader → dist/loader}/index.cjs.js +1 -1
- package/{loader → dist/loader}/index.d.ts +1 -1
- package/dist/loader/index.es2017.js +3 -0
- package/{loader → dist/loader}/index.js +2 -2
- package/dist/{components → module}/Api.js +35 -35
- package/dist/{components → module}/Pagination.js +5 -5
- package/dist/module/Payout.js +179 -0
- package/dist/module/SubAccount.js +105 -0
- package/dist/{components → module}/additional-questions-details.d.ts +2 -2
- package/dist/module/additional-questions-details2.js +36 -0
- package/dist/module/additional-questions.js +50 -0
- package/dist/module/billing-form.js +113 -0
- package/dist/module/business-address-form.js +72 -0
- package/dist/module/business-generic-info.js +212 -0
- package/dist/module/business-owners.js +116 -0
- package/dist/module/business-representative.js +90 -0
- package/dist/module/config.js +13 -0
- package/dist/module/details.js +38 -0
- package/dist/{components → module}/form-control-datepart.d.ts +2 -2
- package/dist/module/form-control-datepart2.js +98 -0
- package/dist/{components → module}/form-control-monetary.d.ts +2 -2
- package/dist/module/form-control-monetary2.js +83 -0
- package/dist/{components → module}/form-control-number-masked.d.ts +2 -2
- package/dist/module/form-control-number-masked2.js +82 -0
- package/dist/{components → module}/form-control-number.d.ts +2 -2
- package/dist/module/form-control-number2.js +71 -0
- package/dist/{components → module}/form-control-select.d.ts +2 -2
- package/dist/module/form-control-select2.js +67 -0
- package/dist/{components → module}/form-control-text.d.ts +2 -2
- package/dist/module/form-control-text2.js +71 -0
- package/dist/{components → module}/form.js +84 -84
- package/dist/{components → module}/generic-info-details.d.ts +2 -2
- package/dist/module/generic-info-details2.js +37 -0
- package/dist/module/helpers.js +24 -0
- package/dist/{components → module}/index.esm.js +61 -30
- package/dist/{components → module}/index2.js +406 -195
- package/dist/{components → module}/justifi-additional-questions.d.ts +2 -2
- package/dist/{components → module}/justifi-bank-account-form.d.ts +2 -2
- package/dist/module/justifi-bank-account-form.js +96 -0
- package/dist/{components → module}/justifi-billing-form.d.ts +2 -2
- package/dist/{components → module}/justifi-business-address-form.d.ts +2 -2
- package/dist/{components → module}/justifi-business-details.d.ts +2 -2
- package/dist/module/justifi-business-details.js +130 -0
- package/dist/{components → module}/justifi-business-form-stepped.d.ts +2 -2
- package/dist/module/justifi-business-form-stepped.js +228 -0
- package/dist/{components → module}/justifi-business-form.d.ts +2 -2
- package/dist/{components/justifi-payment-details.js → module/justifi-business-form.js} +161 -79
- package/dist/{components → module}/justifi-business-generic-info.d.ts +2 -2
- package/dist/{components → module}/justifi-business-list.d.ts +2 -2
- package/dist/module/justifi-business-list.js +197 -0
- package/dist/{components → module}/justifi-business-owners.d.ts +2 -2
- package/dist/{components → module}/justifi-business-representative.d.ts +2 -2
- package/dist/{components → module}/justifi-card-form.d.ts +2 -2
- package/dist/module/justifi-card-form.js +98 -0
- package/dist/{components → module}/justifi-details.d.ts +2 -2
- package/dist/{components → module}/justifi-gross-payment-chart.d.ts +2 -2
- package/dist/{components → module}/justifi-gross-payment-chart.js +146 -142
- package/dist/{components → module}/justifi-legal-address-form.d.ts +2 -2
- package/dist/{components → module}/justifi-payment-balance-transactions.d.ts +2 -2
- package/dist/module/justifi-payment-balance-transactions.js +125 -0
- package/dist/{components → module}/justifi-payment-details.d.ts +2 -2
- package/dist/module/justifi-payment-details.js +98 -0
- package/dist/{components → module}/justifi-payment-form.d.ts +2 -2
- package/dist/module/justifi-payment-form.js +169 -0
- package/dist/{components → module}/justifi-payment-method-form.d.ts +2 -2
- package/dist/{components → module}/justifi-payment-method-selector.d.ts +2 -2
- package/dist/{components → module}/justifi-payments-list.d.ts +2 -2
- package/dist/module/justifi-payments-list.js +154 -0
- package/dist/{components → module}/justifi-payout-details.d.ts +2 -2
- package/dist/module/justifi-payout-details.js +99 -0
- package/dist/{components → module}/justifi-payouts-list.d.ts +2 -2
- package/dist/module/justifi-payouts-list.js +176 -0
- package/dist/{components → module}/justifi-proceeds-list.d.ts +2 -2
- package/dist/module/justifi-proceeds-list.js +199 -0
- package/dist/{components → module}/justifi-refund-form.d.ts +2 -2
- package/dist/module/justifi-refund-form.js +139 -0
- package/dist/{components → module}/justifi-subaccount-details.d.ts +2 -2
- package/dist/module/justifi-subaccount-details.js +134 -0
- package/dist/{components → module}/justifi-subaccounts-list.d.ts +2 -2
- package/dist/module/justifi-subaccounts-list.js +142 -0
- package/dist/{components → module}/justifi-table.d.ts +2 -2
- package/dist/{components → module}/legal-address-details.d.ts +2 -2
- package/dist/module/legal-address-details2.js +36 -0
- package/dist/module/legal-address-form.js +268 -0
- package/dist/{components → module}/owner-details.d.ts +2 -2
- package/dist/module/owner-details2.js +39 -0
- package/dist/{components → module}/pagination-menu.d.ts +2 -2
- package/dist/module/pagination-menu2.js +43 -0
- package/dist/{components → module}/payment-method-form.js +191 -207
- package/dist/module/payment-method-selector.js +44 -0
- package/dist/{components → module}/phone-masks.js +1 -1
- package/dist/{components → module}/representative-details.d.ts +2 -2
- package/dist/module/representative-details2.js +37 -0
- package/dist/{components → module}/select-input.d.ts +2 -2
- package/dist/module/select-input2.js +50 -0
- package/dist/module/state-options.js +244 -0
- package/dist/{components → module}/subaccount-account-details.d.ts +2 -2
- package/dist/module/subaccount-account-details2.js +38 -0
- package/dist/{components → module}/subaccount-bank-details.d.ts +2 -2
- package/dist/module/subaccount-bank-details.js +39 -0
- package/dist/{components → module}/subaccount-merchant-details.d.ts +2 -2
- package/dist/module/subaccount-merchant-details2.js +37 -0
- package/dist/{components → module}/subaccount-owners-details.d.ts +2 -2
- package/dist/module/subaccount-owners-details2.js +37 -0
- package/dist/{components → module}/subaccount-representative-details.d.ts +2 -2
- package/dist/module/subaccount-representative-details2.js +37 -0
- package/dist/{components → module}/subaccount-terms-details.d.ts +2 -2
- package/dist/{webcomponents/p-98e4eae3.entry.js → module/subaccount-terms-details.js} +39 -1
- package/dist/module/table.js +90 -0
- package/dist/{components → module}/text-input.d.ts +2 -2
- package/dist/module/text-input2.js +48 -0
- package/dist/module/utils.js +27 -0
- package/dist/{components → module}/utils2.js +108 -108
- package/dist/types/api/Api.d.ts +14 -14
- package/dist/types/api/Business.d.ts +120 -120
- package/dist/types/api/GrossVolume.d.ts +4 -4
- package/dist/types/api/Pagination.d.ts +12 -12
- package/dist/types/api/Payment.d.ts +134 -134
- package/dist/types/api/Payout.d.ts +51 -51
- package/dist/types/api/Proceed.d.ts +51 -51
- package/dist/types/api/SubAccount.d.ts +130 -130
- package/dist/types/api/mockData/MockOnboardingData.d.ts +5 -5
- package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +5 -5
- package/dist/types/api/shared.d.ts +9 -9
- package/dist/types/components/bank-account-form/bank-account-form.d.ts +58 -0
- package/dist/types/components/billing-form/billing-form-schema.d.ts +18 -18
- package/dist/types/components/billing-form/billing-form.d.ts +25 -25
- package/dist/types/components/billing-form/state-options.d.ts +2 -2
- 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 +13 -13
- package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +2 -2
- package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +2 -2
- package/dist/types/components/business-details/owner-details/owner-details.d.ts +2 -2
- package/dist/types/components/business-details/representative-details/representative-details.d.ts +2 -2
- package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +7 -7
- package/dist/types/components/business-form/business-address/business-address-form-schema.d.ts +16 -16
- package/dist/types/components/business-form/business-address/business-address-form.d.ts +7 -7
- package/dist/types/components/business-form/business-form-schema.d.ts +102 -102
- package/dist/types/components/business-form/business-form-stepped.d.ts +23 -23
- package/dist/types/components/business-form/business-form.d.ts +11 -11
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +6 -6
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +22 -22
- package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +13 -13
- package/dist/types/components/business-form/business-representative/business-representative.d.ts +8 -8
- package/dist/types/components/business-form/legal-address-form/legal-address-form-schema.d.ts +12 -12
- package/dist/types/components/business-form/legal-address-form/legal-address-form.d.ts +7 -7
- package/dist/types/components/business-list/business-list.d.ts +27 -27
- package/dist/types/components/business-list/business-list.stories.d.ts +3 -3
- package/dist/types/components/card-form/card-form.d.ts +68 -0
- package/dist/types/components/details/details.d.ts +2 -2
- package/dist/types/components/details/utils.d.ts +10 -10
- package/dist/types/components/form/form-control-datepart.d.ts +16 -16
- package/dist/types/components/form/form-control-monetary.d.ts +14 -14
- package/dist/types/components/form/form-control-number-masked.d.ts +16 -16
- package/dist/types/components/form/form-control-number.d.ts +15 -15
- package/dist/types/components/form/form-control-select.d.ts +17 -17
- package/dist/types/components/form/form-control-text.d.ts +15 -15
- package/dist/types/components/form/form.d.ts +18 -18
- package/dist/types/components/gross-payment-chart/chart-utils.d.ts +39 -39
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +16 -16
- package/dist/types/components/pagination-menu/pagination-menu.d.ts +5 -5
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +14 -14
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +3 -3
- package/dist/types/components/payment-details/payment-details.d.ts +9 -9
- package/dist/types/components/payment-form/payment-form.d.ts +22 -22
- package/dist/types/components/payment-form/payment-method-selector.d.ts +6 -6
- package/dist/types/components/payment-form/tokenize.d.ts +3 -3
- package/dist/types/components/payment-method-form/message-event-types.d.ts +14 -14
- package/dist/types/components/payment-method-form/payment-method-form.d.ts +21 -22
- package/dist/types/components/payment-method-form/payment-method-responses.d.ts +40 -40
- package/dist/types/components/payment-method-form/theme.d.ts +45 -45
- package/dist/types/components/payments-list/payments-list.d.ts +14 -14
- package/dist/types/components/payout-details/payout-details.d.ts +9 -9
- package/dist/types/components/payouts-list/payouts-list.d.ts +15 -15
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +15 -15
- package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +4 -4
- package/dist/types/components/refund-form/refund-form-schema.d.ts +4 -4
- package/dist/types/components/refund-form/refund-form.d.ts +54 -54
- package/dist/types/components/refund-form/refund-form.stories.d.ts +21 -21
- package/dist/types/components/select-input/select-input.d.ts +14 -14
- package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +3 -3
- package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +2 -2
- package/dist/types/components/subaccount-details/subaccount-details.d.ts +13 -13
- package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +3 -3
- package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +2 -2
- package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +2 -2
- package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +2 -2
- package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +2 -2
- package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +14 -14
- package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +4 -4
- package/dist/types/components/table/exported-parts.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +19 -19
- package/dist/types/components/text-input/text-input.d.ts +10 -10
- package/dist/types/components.d.ts +228 -15
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/config.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +32 -3
- package/dist/types/utils/country-options.d.ts +2 -2
- package/dist/types/utils/phone-masks.d.ts +1 -1
- package/dist/webcomponents/p-04817850.entry.js +1 -0
- package/dist/webcomponents/{p-b157f6ae.js → p-04c7f8f8.js} +1 -1
- package/dist/webcomponents/p-0a351e24.entry.js +1 -0
- package/dist/webcomponents/{p-ed8c9b88.entry.js → p-0ad353cc.entry.js} +1 -1
- package/dist/webcomponents/{p-f0051cff.entry.js → p-0f5206f0.entry.js} +1 -1
- package/dist/{components/subaccount-terms-details.js → webcomponents/p-173fb8ef.entry.js} +1 -38
- package/dist/webcomponents/p-1e2a98bf.js +1 -0
- package/dist/webcomponents/{p-86c23e1e.js → p-210677e3.js} +1 -1
- package/dist/webcomponents/p-22c2a11e.entry.js +1 -0
- package/dist/webcomponents/p-2b6c9c4f.js +1 -0
- package/dist/webcomponents/p-2cab231e.entry.js +1 -0
- package/dist/webcomponents/p-2ea68b03.entry.js +1 -0
- package/dist/{components/additional-questions-details2.js → webcomponents/p-33e74da7.entry.js} +1 -35
- package/dist/webcomponents/p-34430db2.entry.js +1 -0
- package/dist/webcomponents/p-377303af.entry.js +1 -0
- package/dist/webcomponents/{p-988191bf.js → p-3bef762a.js} +1 -1
- package/dist/webcomponents/p-42bc8e53.entry.js +1 -0
- package/dist/webcomponents/p-439a79c7.entry.js +1 -0
- package/dist/webcomponents/p-57efe345.entry.js +1 -0
- package/dist/webcomponents/p-59ecc2d7.entry.js +1 -0
- package/dist/webcomponents/p-650eb614.entry.js +1 -0
- package/dist/webcomponents/p-68427454.entry.js +1 -0
- package/dist/webcomponents/{p-59860ac8.js → p-78baff54.js} +1 -1
- package/dist/webcomponents/p-7d922421.entry.js +1 -0
- package/dist/webcomponents/{p-311250e2.entry.js → p-8302a5e2.entry.js} +1 -1
- package/dist/webcomponents/p-862f38cc.entry.js +1 -0
- package/dist/webcomponents/p-93579716.js +1 -0
- package/dist/webcomponents/p-b2dc938f.entry.js +1 -0
- package/dist/webcomponents/p-c8099443.entry.js +1 -0
- package/dist/webcomponents/p-c8916484.entry.js +1 -0
- package/dist/webcomponents/{p-c0f9f6a8.entry.js → p-cb5352a3.entry.js} +2 -2
- package/dist/webcomponents/p-cf656598.entry.js +1 -0
- package/dist/webcomponents/p-d84cd3a5.entry.js +1 -0
- package/dist/webcomponents/p-da00d9bf.js +2 -0
- package/dist/webcomponents/p-dd4e8fa1.entry.js +1 -0
- package/dist/webcomponents/p-df8f6a0f.entry.js +1 -0
- package/dist/webcomponents/p-e8f41c84.entry.js +1 -0
- package/dist/webcomponents/p-e9589e45.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +18 -41
- package/dist/cjs/Payout-f8240e9c.js +0 -183
- package/dist/cjs/SubAccount-f47c8522.js +0 -107
- package/dist/cjs/business-form-schema-fe831c30.js +0 -148
- package/dist/cjs/config-a156df17.js +0 -15
- package/dist/cjs/helpers-c505d861.js +0 -26
- package/dist/cjs/state-options-83b52cd1.js +0 -246
- package/dist/cjs/utils-a47b2e73.js +0 -35
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +0 -132
- package/dist/collection/components/bank-account-form/example.js +0 -54
- package/dist/collection/components/billing-form/billing-form.stories.js +0 -61
- package/dist/collection/components/billing-form/example.js +0 -26
- package/dist/collection/components/business-details/business-details.stories.js +0 -23
- package/dist/collection/components/business-form/business-form-example.js +0 -12
- package/dist/collection/components/business-form/business-form-stepped-example.js +0 -12
- package/dist/collection/components/business-form/business-form-stepped.stories.js +0 -132
- package/dist/collection/components/business-form/business-form.stories.js +0 -127
- package/dist/collection/components/card-form/card-form.stories.js +0 -137
- package/dist/collection/components/card-form/example.js +0 -59
- package/dist/collection/components/gross-payment-chart/example.js +0 -12
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +0 -22
- package/dist/collection/components/payment-details/example.js +0 -12
- package/dist/collection/components/payment-details/payment-details.stories.js +0 -47
- package/dist/collection/components/payment-form/example.js +0 -23
- package/dist/collection/components/payment-form/payment-form.stories.js +0 -129
- package/dist/collection/components/payments-list/example.js +0 -12
- package/dist/collection/components/payments-list/payments-list.stories.js +0 -78
- package/dist/collection/components/payout-details/example.js +0 -12
- package/dist/collection/components/payout-details/payout-details.stories.js +0 -47
- package/dist/collection/components/payouts-list/example.js +0 -12
- package/dist/collection/components/payouts-list/payouts-list.stories.js +0 -69
- package/dist/components/Payout.js +0 -179
- package/dist/components/SubAccount.js +0 -105
- package/dist/components/additional-questions.js +0 -49
- package/dist/components/billing-form.js +0 -112
- package/dist/components/business-address-form.js +0 -69
- package/dist/components/business-generic-info.js +0 -211
- package/dist/components/business-owners.js +0 -115
- package/dist/components/business-representative.js +0 -89
- package/dist/components/config.js +0 -13
- package/dist/components/details.js +0 -37
- package/dist/components/form-control-datepart2.js +0 -95
- package/dist/components/form-control-monetary2.js +0 -80
- package/dist/components/form-control-number-masked2.js +0 -79
- package/dist/components/form-control-number2.js +0 -68
- package/dist/components/form-control-select2.js +0 -64
- package/dist/components/form-control-text2.js +0 -68
- package/dist/components/generic-info-details2.js +0 -36
- package/dist/components/helpers.js +0 -24
- package/dist/components/justifi-bank-account-form.js +0 -95
- package/dist/components/justifi-business-details.js +0 -129
- package/dist/components/justifi-business-form-stepped.js +0 -227
- package/dist/components/justifi-business-form.js +0 -175
- package/dist/components/justifi-business-list.js +0 -192
- package/dist/components/justifi-card-form.js +0 -97
- package/dist/components/justifi-payment-balance-transactions.js +0 -122
- package/dist/components/justifi-payment-form.js +0 -168
- package/dist/components/justifi-payments-list.js +0 -149
- package/dist/components/justifi-payout-details.js +0 -95
- package/dist/components/justifi-payouts-list.js +0 -171
- package/dist/components/justifi-proceeds-list.js +0 -194
- package/dist/components/justifi-refund-form.js +0 -138
- package/dist/components/justifi-subaccount-details.js +0 -130
- package/dist/components/justifi-subaccounts-list.js +0 -137
- package/dist/components/legal-address-details2.js +0 -35
- package/dist/components/legal-address-form.js +0 -267
- package/dist/components/owner-details2.js +0 -38
- package/dist/components/pagination-menu2.js +0 -42
- package/dist/components/payment-method-selector.js +0 -43
- package/dist/components/representative-details2.js +0 -36
- package/dist/components/select-input2.js +0 -49
- package/dist/components/state-options.js +0 -244
- package/dist/components/subaccount-account-details2.js +0 -37
- package/dist/components/subaccount-bank-details.js +0 -38
- package/dist/components/subaccount-merchant-details2.js +0 -36
- package/dist/components/subaccount-owners-details2.js +0 -36
- package/dist/components/subaccount-representative-details2.js +0 -36
- package/dist/components/table.js +0 -83
- package/dist/components/text-input2.js +0 -47
- package/dist/components/utils.js +0 -27
- package/dist/esm/Payout-586f06a3.js +0 -179
- package/dist/esm/SubAccount-128190e9.js +0 -105
- package/dist/esm/business-form-schema-30a3eadd.js +0 -144
- package/dist/esm/config-ceb0f902.js +0 -13
- package/dist/esm/helpers-1d5ecdc8.js +0 -24
- package/dist/esm/state-options-ece00aa2.js +0 -244
- package/dist/esm/utils-d19c2778.js +0 -27
- package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -23
- package/dist/types/components/billing-form/billing-form.stories.d.ts +0 -8
- package/dist/types/components/business-details/business-details.stories.d.ts +0 -7
- package/dist/types/components/business-form/business-form-stepped.stories.d.ts +0 -27
- package/dist/types/components/business-form/business-form.stories.d.ts +0 -27
- package/dist/types/components/card-form/card-form.stories.d.ts +0 -17
- package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +0 -7
- package/dist/types/components/payment-details/payment-details.stories.d.ts +0 -8
- package/dist/types/components/payment-form/payment-form.stories.d.ts +0 -8
- package/dist/types/components/payments-list/payments-list.stories.d.ts +0 -10
- package/dist/types/components/payout-details/payout-details.stories.d.ts +0 -8
- package/dist/types/components/payouts-list/payouts-list.stories.d.ts +0 -9
- package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +0 -11
- package/dist/webcomponents/p-14f7229e.entry.js +0 -1
- package/dist/webcomponents/p-2c2cde2d.js +0 -1
- package/dist/webcomponents/p-3501b0e8.entry.js +0 -1
- package/dist/webcomponents/p-3ee831ac.entry.js +0 -1
- package/dist/webcomponents/p-4214dbb8.entry.js +0 -1
- package/dist/webcomponents/p-46d5f717.entry.js +0 -1
- package/dist/webcomponents/p-4852ce94.entry.js +0 -1
- package/dist/webcomponents/p-4ec00b55.entry.js +0 -1
- package/dist/webcomponents/p-4fb653a8.entry.js +0 -1
- package/dist/webcomponents/p-586c8a4f.entry.js +0 -1
- package/dist/webcomponents/p-5e6726a8.entry.js +0 -1
- package/dist/webcomponents/p-77a8bcea.entry.js +0 -1
- package/dist/webcomponents/p-8f37e3ee.js +0 -1
- package/dist/webcomponents/p-91757d9f.entry.js +0 -1
- package/dist/webcomponents/p-9e012e33.entry.js +0 -1
- package/dist/webcomponents/p-a1ef6b4c.entry.js +0 -1
- package/dist/webcomponents/p-ac8ee442.entry.js +0 -1
- package/dist/webcomponents/p-af771964.entry.js +0 -1
- package/dist/webcomponents/p-b60a58f4.entry.js +0 -1
- package/dist/webcomponents/p-b86f7c95.entry.js +0 -1
- package/dist/webcomponents/p-bb70152e.entry.js +0 -1
- package/dist/webcomponents/p-bc91044c.entry.js +0 -1
- package/dist/webcomponents/p-c29c587f.entry.js +0 -1
- package/dist/webcomponents/p-cbb60191.js +0 -2
- package/dist/webcomponents/p-d0e4eca5.entry.js +0 -1
- package/dist/webcomponents/p-d4b66d74.entry.js +0 -1
- package/dist/webcomponents/p-e7ef2455.entry.js +0 -1
- package/dist/webcomponents/p-f2f0aa6e.entry.js +0 -1
- package/loader/index.es2017.js +0 -3
- /package/{loader → dist/loader}/package.json +0 -0
- /package/dist/{components → module}/additional-questions-details.js +0 -0
- /package/dist/{components → module}/form-control-datepart.js +0 -0
- /package/dist/{components → module}/form-control-monetary.js +0 -0
- /package/dist/{components → module}/form-control-number-masked.js +0 -0
- /package/dist/{components → module}/form-control-number.js +0 -0
- /package/dist/{components → module}/form-control-select.js +0 -0
- /package/dist/{components → module}/form-control-text.js +0 -0
- /package/dist/{components → module}/generic-info-details.js +0 -0
- /package/dist/{components → module}/index.d.ts +0 -0
- /package/dist/{components → module}/index.js +0 -0
- /package/dist/{components → module}/justifi-additional-questions.js +0 -0
- /package/dist/{components → module}/justifi-billing-form.js +0 -0
- /package/dist/{components → module}/justifi-business-address-form.js +0 -0
- /package/dist/{components → module}/justifi-business-generic-info.js +0 -0
- /package/dist/{components → module}/justifi-business-owners.js +0 -0
- /package/dist/{components → module}/justifi-business-representative.js +0 -0
- /package/dist/{components → module}/justifi-details.js +0 -0
- /package/dist/{components → module}/justifi-legal-address-form.js +0 -0
- /package/dist/{components → module}/justifi-payment-method-form.js +0 -0
- /package/dist/{components → module}/justifi-payment-method-selector.js +0 -0
- /package/dist/{components → module}/justifi-table.js +0 -0
- /package/dist/{components → module}/legal-address-details.js +0 -0
- /package/dist/{components → module}/owner-details.js +0 -0
- /package/dist/{components → module}/pagination-menu.js +0 -0
- /package/dist/{components → module}/representative-details.js +0 -0
- /package/dist/{components → module}/select-input.js +0 -0
- /package/dist/{components → module}/subaccount-account-details.js +0 -0
- /package/dist/{components → module}/subaccount-merchant-details.js +0 -0
- /package/dist/{components → module}/subaccount-owners-details.js +0 -0
- /package/dist/{components → module}/subaccount-representative-details.js +0 -0
- /package/dist/{components → module}/text-input.js +0 -0
- /package/dist/webcomponents/{p-0d5d02d7.js → p-56f6ce4c.js} +0 -0
- /package/dist/webcomponents/{p-e12ab547.js → p-71679a41.js} +0 -0
- /package/dist/webcomponents/{p-47bc59b5.js → p-8e2a88a8.js} +0 -0
- /package/dist/webcomponents/{p-d6b5793d.js → p-9a6e4749.js} +0 -0
- /package/dist/webcomponents/{p-526cb161.js → p-9b4b91ba.js} +0 -0
- /package/dist/webcomponents/{p-9b6dcac5.js → p-ae263544.js} +0 -0
- /package/dist/webcomponents/{p-7d58db66.js → p-bedada09.js} +0 -0
|
@@ -27,6 +27,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
30
|
+
/**
|
|
31
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
32
|
+
*
|
|
33
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
34
|
+
* support as of Stencil v4.
|
|
35
|
+
*/
|
|
36
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
30
37
|
/**
|
|
31
38
|
* Default style mode id
|
|
32
39
|
*/
|
|
@@ -99,6 +106,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
99
106
|
};
|
|
100
107
|
walk(children);
|
|
101
108
|
if (vnodeData) {
|
|
109
|
+
// normalize class / className attributes
|
|
102
110
|
{
|
|
103
111
|
const classData = vnodeData.className || vnodeData.class;
|
|
104
112
|
if (classData) {
|
|
@@ -320,6 +328,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
320
328
|
}
|
|
321
329
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
322
330
|
}
|
|
331
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
332
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
333
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
334
|
+
}
|
|
323
335
|
if (appliedStyles) {
|
|
324
336
|
appliedStyles.add(scopeId);
|
|
325
337
|
}
|
|
@@ -448,11 +460,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
448
460
|
// except for the first character, we keep the event name case
|
|
449
461
|
memberName = ln[2] + memberName.slice(3);
|
|
450
462
|
}
|
|
451
|
-
if (oldValue) {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
463
|
+
if (oldValue || newValue) {
|
|
464
|
+
// Need to account for "capture" events.
|
|
465
|
+
// If the event name ends with "Capture", we'll update the name to remove
|
|
466
|
+
// the "Capture" suffix and make sure the event listener is setup to handle the capture event.
|
|
467
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
468
|
+
// Make sure we only replace the last instance of "Capture"
|
|
469
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
|
|
470
|
+
if (oldValue) {
|
|
471
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
472
|
+
}
|
|
473
|
+
if (newValue) {
|
|
474
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
475
|
+
}
|
|
456
476
|
}
|
|
457
477
|
}
|
|
458
478
|
else {
|
|
@@ -474,7 +494,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
474
494
|
elm[memberName] = newValue;
|
|
475
495
|
}
|
|
476
496
|
}
|
|
477
|
-
catch (e) {
|
|
497
|
+
catch (e) {
|
|
498
|
+
/**
|
|
499
|
+
* in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
|
|
500
|
+
*/
|
|
501
|
+
}
|
|
478
502
|
}
|
|
479
503
|
if (newValue == null || newValue === false) {
|
|
480
504
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
@@ -493,7 +517,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
493
517
|
}
|
|
494
518
|
};
|
|
495
519
|
const parseClassListRegex = /\s/;
|
|
520
|
+
/**
|
|
521
|
+
* Parsed a string of classnames into an array
|
|
522
|
+
* @param value className string, e.g. "foo bar baz"
|
|
523
|
+
* @returns list of classes, e.g. ["foo", "bar", "baz"]
|
|
524
|
+
*/
|
|
496
525
|
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
526
|
+
const CAPTURE_EVENT_SUFFIX = 'Capture';
|
|
527
|
+
const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
|
|
497
528
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
498
529
|
// if the element passed in is a shadow root, which is a document fragment
|
|
499
530
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -560,6 +591,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
560
591
|
}
|
|
561
592
|
}
|
|
562
593
|
}
|
|
594
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
595
|
+
// to another component but don't end up in a slot
|
|
596
|
+
elm['s-hn'] = hostTagName;
|
|
563
597
|
return elm;
|
|
564
598
|
};
|
|
565
599
|
/**
|
|
@@ -684,8 +718,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
684
718
|
* @param oldCh the old children of the parent node
|
|
685
719
|
* @param newVNode the new VNode which will replace the parent
|
|
686
720
|
* @param newCh the new children of the parent node
|
|
721
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
687
722
|
*/
|
|
688
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
723
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
689
724
|
let oldStartIdx = 0;
|
|
690
725
|
let newStartIdx = 0;
|
|
691
726
|
let oldEndIdx = oldCh.length - 1;
|
|
@@ -709,25 +744,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
709
744
|
else if (newEndVnode == null) {
|
|
710
745
|
newEndVnode = newCh[--newEndIdx];
|
|
711
746
|
}
|
|
712
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
747
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
713
748
|
// if the start nodes are the same then we should patch the new VNode
|
|
714
749
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
715
750
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
716
751
|
// since things are matched up in order.
|
|
717
|
-
patch(oldStartVnode, newStartVnode);
|
|
752
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
718
753
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
719
754
|
newStartVnode = newCh[++newStartIdx];
|
|
720
755
|
}
|
|
721
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
756
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
722
757
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
723
758
|
// decrement our end indices, and also likewise in this case we don't
|
|
724
759
|
// need to move any DOM Nodes.
|
|
725
|
-
patch(oldEndVnode, newEndVnode);
|
|
760
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
726
761
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
727
762
|
newEndVnode = newCh[--newEndIdx];
|
|
728
763
|
}
|
|
729
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
730
|
-
patch(oldStartVnode, newEndVnode);
|
|
764
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
765
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
731
766
|
// We need to move the element for `oldStartVnode` into a position which
|
|
732
767
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
733
768
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -749,8 +784,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
749
784
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
750
785
|
newEndVnode = newCh[--newEndIdx];
|
|
751
786
|
}
|
|
752
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
753
|
-
patch(oldEndVnode, newStartVnode);
|
|
787
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
788
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
754
789
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
755
790
|
// the same node, so since we're here we know that they are not. Thus we
|
|
756
791
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -804,9 +839,10 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
804
839
|
*
|
|
805
840
|
* @param leftVNode the first VNode to check
|
|
806
841
|
* @param rightVNode the second VNode to check
|
|
842
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
807
843
|
* @returns whether they're equal or not
|
|
808
844
|
*/
|
|
809
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
845
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
810
846
|
// compare if two vnode to see if they're "technically" the same
|
|
811
847
|
// need to have the same element tag, and same key to be the same
|
|
812
848
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
@@ -821,8 +857,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
821
857
|
*
|
|
822
858
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
823
859
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
860
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
824
861
|
*/
|
|
825
|
-
const patch = (oldVNode, newVNode) => {
|
|
862
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
826
863
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
827
864
|
const oldChildren = oldVNode.$children$;
|
|
828
865
|
const newChildren = newVNode.$children$;
|
|
@@ -842,7 +879,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
842
879
|
if (oldChildren !== null && newChildren !== null) {
|
|
843
880
|
// looks like there's child vnodes for both the old and new vnodes
|
|
844
881
|
// so we need to call `updateChildren` to reconcile them
|
|
845
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
882
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
846
883
|
}
|
|
847
884
|
else if (newChildren !== null) {
|
|
848
885
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -865,9 +902,9 @@ const patch = (oldVNode, newVNode) => {
|
|
|
865
902
|
}
|
|
866
903
|
};
|
|
867
904
|
/**
|
|
868
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
869
|
-
*
|
|
870
|
-
*
|
|
905
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
|
906
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
|
907
|
+
* node has been removed from the DOM.
|
|
871
908
|
*
|
|
872
909
|
* @param vNode a virtual DOM node
|
|
873
910
|
*/
|
|
@@ -929,7 +966,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
929
966
|
scopeId = hostElm['s-sc'];
|
|
930
967
|
}
|
|
931
968
|
// synchronous patch
|
|
932
|
-
patch(oldVNode, rootVnode);
|
|
969
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
933
970
|
};
|
|
934
971
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
935
972
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1085,6 +1122,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1085
1122
|
*/
|
|
1086
1123
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1087
1124
|
try {
|
|
1125
|
+
/**
|
|
1126
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1127
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1128
|
+
*/
|
|
1088
1129
|
instance = instance.render() ;
|
|
1089
1130
|
{
|
|
1090
1131
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1164,6 +1205,16 @@ const appDidLoad = (who) => {
|
|
|
1164
1205
|
}
|
|
1165
1206
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1166
1207
|
};
|
|
1208
|
+
/**
|
|
1209
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1210
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1211
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1212
|
+
* output bundle and this function returns `undefined`.
|
|
1213
|
+
* @param instance any object that may or may not contain methods
|
|
1214
|
+
* @param method method name
|
|
1215
|
+
* @param arg single arbitrary argument
|
|
1216
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1217
|
+
*/
|
|
1167
1218
|
const safeCall = (instance, method, arg) => {
|
|
1168
1219
|
if (instance && instance[method]) {
|
|
1169
1220
|
try {
|
|
@@ -1231,13 +1282,14 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1231
1282
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1232
1283
|
*/
|
|
1233
1284
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1285
|
+
var _a;
|
|
1286
|
+
const prototype = Cstr.prototype;
|
|
1234
1287
|
if (cmpMeta.$members$) {
|
|
1235
1288
|
if (Cstr.watchers) {
|
|
1236
1289
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1237
1290
|
}
|
|
1238
1291
|
// It's better to have a const than two Object.entries()
|
|
1239
1292
|
const members = Object.entries(cmpMeta.$members$);
|
|
1240
|
-
const prototype = Cstr.prototype;
|
|
1241
1293
|
members.map(([memberName, [memberFlags]]) => {
|
|
1242
1294
|
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1243
1295
|
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
@@ -1260,16 +1312,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1260
1312
|
// proxyComponent - method
|
|
1261
1313
|
Object.defineProperty(prototype, memberName, {
|
|
1262
1314
|
value(...args) {
|
|
1315
|
+
var _a;
|
|
1263
1316
|
const ref = getHostRef(this);
|
|
1264
|
-
return ref.$onInstancePromise
|
|
1317
|
+
return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
|
|
1265
1318
|
},
|
|
1266
1319
|
});
|
|
1267
1320
|
}
|
|
1268
1321
|
});
|
|
1269
1322
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1270
1323
|
const attrNameToPropName = new Map();
|
|
1271
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1324
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1272
1325
|
plt.jmp(() => {
|
|
1326
|
+
var _a;
|
|
1273
1327
|
const propName = attrNameToPropName.get(attrName);
|
|
1274
1328
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1275
1329
|
// in the case where an attribute was set inline.
|
|
@@ -1291,12 +1345,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1291
1345
|
// customElements.define('my-component', MyComponent);
|
|
1292
1346
|
// </script>
|
|
1293
1347
|
// ```
|
|
1294
|
-
// In this case if we do not
|
|
1348
|
+
// In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1295
1349
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1296
1350
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1297
|
-
// the connectedCallback attempts to
|
|
1351
|
+
// the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
|
|
1298
1352
|
//
|
|
1299
|
-
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/
|
|
1353
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
|
|
1300
1354
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1301
1355
|
//
|
|
1302
1356
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
@@ -1316,23 +1370,63 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1316
1370
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1317
1371
|
return;
|
|
1318
1372
|
}
|
|
1373
|
+
else if (propName == null) {
|
|
1374
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1375
|
+
// on a vanilla web component
|
|
1376
|
+
const hostRef = getHostRef(this);
|
|
1377
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1378
|
+
// We only want to trigger the callback(s) if:
|
|
1379
|
+
// 1. The instance is ready
|
|
1380
|
+
// 2. The watchers are ready
|
|
1381
|
+
// 3. The value has changed
|
|
1382
|
+
if (flags &&
|
|
1383
|
+
!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1384
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1385
|
+
newValue !== oldValue) {
|
|
1386
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1387
|
+
const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
|
|
1388
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1389
|
+
if (instance[callbackName] != null) {
|
|
1390
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1319
1396
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1320
1397
|
});
|
|
1321
1398
|
};
|
|
1322
|
-
//
|
|
1323
|
-
//
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1399
|
+
// Create an array of attributes to observe
|
|
1400
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1401
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1402
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1403
|
+
// an invalid attribute.
|
|
1404
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1405
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1406
|
+
...members
|
|
1407
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1408
|
+
.map(([propName, m]) => {
|
|
1409
|
+
const attrName = m[1] || propName;
|
|
1410
|
+
attrNameToPropName.set(attrName, propName);
|
|
1411
|
+
return attrName;
|
|
1412
|
+
}),
|
|
1413
|
+
]));
|
|
1331
1414
|
}
|
|
1332
1415
|
}
|
|
1333
1416
|
return Cstr;
|
|
1334
1417
|
};
|
|
1335
|
-
|
|
1418
|
+
/**
|
|
1419
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1420
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1421
|
+
* and (optionally) an HMR version ID.
|
|
1422
|
+
*
|
|
1423
|
+
* @param elm a host element
|
|
1424
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1425
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1426
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1427
|
+
*/
|
|
1428
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1429
|
+
let Cstr;
|
|
1336
1430
|
// initializeComponent
|
|
1337
1431
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1338
1432
|
// Let the runtime know that the component has been initialized
|
|
@@ -1500,20 +1594,27 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1500
1594
|
const customElements = win.customElements;
|
|
1501
1595
|
const head = doc.head;
|
|
1502
1596
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1503
|
-
const
|
|
1597
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
1504
1598
|
const deferredConnectedCallbacks = [];
|
|
1505
1599
|
let appLoadFallback;
|
|
1506
1600
|
let isBootstrapping = true;
|
|
1507
1601
|
Object.assign(plt, options);
|
|
1508
1602
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1603
|
+
let hasSlotRelocation = false;
|
|
1509
1604
|
lazyBundles.map((lazyBundle) => {
|
|
1510
1605
|
lazyBundle[1].map((compactMeta) => {
|
|
1606
|
+
var _a;
|
|
1511
1607
|
const cmpMeta = {
|
|
1512
1608
|
$flags$: compactMeta[0],
|
|
1513
1609
|
$tagName$: compactMeta[1],
|
|
1514
1610
|
$members$: compactMeta[2],
|
|
1515
1611
|
$listeners$: compactMeta[3],
|
|
1516
1612
|
};
|
|
1613
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
1614
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
1615
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
1616
|
+
hasSlotRelocation = true;
|
|
1617
|
+
}
|
|
1517
1618
|
{
|
|
1518
1619
|
cmpMeta.$members$ = compactMeta[2];
|
|
1519
1620
|
}
|
|
@@ -1521,7 +1622,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1521
1622
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1522
1623
|
}
|
|
1523
1624
|
{
|
|
1524
|
-
cmpMeta.$watchers$ = {};
|
|
1625
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1525
1626
|
}
|
|
1526
1627
|
const tagName = cmpMeta.$tagName$;
|
|
1527
1628
|
const HostElement = class extends HTMLElement {
|
|
@@ -1570,15 +1671,25 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1570
1671
|
}
|
|
1571
1672
|
});
|
|
1572
1673
|
});
|
|
1674
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
1675
|
+
if (hasSlotRelocation) {
|
|
1676
|
+
dataStyles.innerHTML += SLOT_FB_CSS;
|
|
1677
|
+
}
|
|
1678
|
+
// Add hydration styles
|
|
1573
1679
|
{
|
|
1574
|
-
|
|
1575
|
-
|
|
1680
|
+
dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
|
|
1681
|
+
}
|
|
1682
|
+
// If we have styles, add them to the DOM
|
|
1683
|
+
if (dataStyles.innerHTML.length) {
|
|
1684
|
+
dataStyles.setAttribute('data-styles', '');
|
|
1576
1685
|
// Apply CSP nonce to the style tag if it exists
|
|
1577
1686
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1578
1687
|
if (nonce != null) {
|
|
1579
|
-
|
|
1688
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
1580
1689
|
}
|
|
1581
|
-
|
|
1690
|
+
// Insert the styles into the document head
|
|
1691
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
1692
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1582
1693
|
}
|
|
1583
1694
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1584
1695
|
isBootstrapping = false;
|
|
@@ -1630,13 +1741,40 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
|
|
|
1630
1741
|
* @returns void
|
|
1631
1742
|
*/
|
|
1632
1743
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1744
|
+
/**
|
|
1745
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1746
|
+
* instances.
|
|
1747
|
+
*/
|
|
1633
1748
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1749
|
+
/**
|
|
1750
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1751
|
+
*
|
|
1752
|
+
* @param ref the runtime ref of interest
|
|
1753
|
+
* @returns the Host reference (if found) or undefined
|
|
1754
|
+
*/
|
|
1634
1755
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1756
|
+
/**
|
|
1757
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1758
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1759
|
+
*
|
|
1760
|
+
* @param lazyInstance the lazy instance of interest
|
|
1761
|
+
* @param hostRef that instances `HostRef` object
|
|
1762
|
+
* @returns a reference to the host ref WeakMap
|
|
1763
|
+
*/
|
|
1635
1764
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1636
|
-
|
|
1765
|
+
/**
|
|
1766
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1767
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1768
|
+
* metadata.
|
|
1769
|
+
*
|
|
1770
|
+
* @param hostElement the host element to register
|
|
1771
|
+
* @param cmpMeta runtime metadata for that component
|
|
1772
|
+
* @returns a reference to the host ref WeakMap
|
|
1773
|
+
*/
|
|
1774
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1637
1775
|
const hostRef = {
|
|
1638
1776
|
$flags$: 0,
|
|
1639
|
-
$hostElement$:
|
|
1777
|
+
$hostElement$: hostElement,
|
|
1640
1778
|
$cmpMeta$: cmpMeta,
|
|
1641
1779
|
$instanceValues$: new Map(),
|
|
1642
1780
|
};
|
|
@@ -1645,11 +1783,11 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1645
1783
|
}
|
|
1646
1784
|
{
|
|
1647
1785
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1648
|
-
|
|
1649
|
-
|
|
1786
|
+
hostElement['s-p'] = [];
|
|
1787
|
+
hostElement['s-rc'] = [];
|
|
1650
1788
|
}
|
|
1651
|
-
addHostEventListeners(
|
|
1652
|
-
return hostRefs.set(
|
|
1789
|
+
addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
|
|
1790
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1653
1791
|
};
|
|
1654
1792
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1655
1793
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -1737,7 +1875,7 @@ const flush = () => {
|
|
|
1737
1875
|
}
|
|
1738
1876
|
}
|
|
1739
1877
|
};
|
|
1740
|
-
const nextTick =
|
|
1878
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
1741
1879
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1742
1880
|
|
|
1743
1881
|
export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|