@foxy.io/elements 1.27.0-beta.1 → 1.27.0-beta.3
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/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +4 -4
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +10 -10
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -5
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-d9f44257.js → shared-030f561a.js} +1 -1
- package/dist/cdn/{shared-dbfccb3e.js → shared-0cbb19f4.js} +1 -1
- package/dist/cdn/{shared-09ac8087.js → shared-0cf90158.js} +1 -1
- package/dist/cdn/{shared-8a92f939.js → shared-1024766f.js} +1 -1
- package/dist/cdn/{shared-8f706991.js → shared-12390d6f.js} +1 -1
- package/dist/cdn/{shared-380c0453.js → shared-12ad8924.js} +2 -2
- package/dist/cdn/shared-150f5214.js +1 -0
- package/dist/cdn/shared-2062c274.js +1 -0
- package/dist/cdn/{shared-e460ee3d.js → shared-2376abfc.js} +7 -7
- package/dist/cdn/{shared-648f62a1.js → shared-26f4b6bf.js} +1 -1
- package/dist/cdn/{shared-1bb9c21a.js → shared-2920b595.js} +1 -1
- package/dist/cdn/{shared-13afcc16.js → shared-331a223c.js} +1 -1
- package/dist/cdn/{shared-c0cbb20a.js → shared-33d8cbfb.js} +1 -1
- package/dist/cdn/{shared-062f3122.js → shared-352c79a6.js} +1 -1
- package/dist/cdn/{shared-adecdd5f.js → shared-37e1a834.js} +1 -1
- package/dist/cdn/shared-3f19b914.js +20 -0
- package/dist/cdn/{shared-30f373f2.js → shared-405a290e.js} +1 -1
- package/dist/cdn/shared-40bece2b.js +1 -0
- package/dist/cdn/{shared-24ceebec.js → shared-4482e7b9.js} +1 -1
- package/dist/cdn/{shared-02883252.js → shared-44bb85d8.js} +1 -1
- package/dist/cdn/{shared-d3e8c449.js → shared-497ebb8c.js} +1 -1
- package/dist/cdn/{shared-a5ec3472.js → shared-4cec4de0.js} +1 -1
- package/dist/cdn/{shared-6424d196.js → shared-510a9e1b.js} +1 -1
- package/dist/cdn/{shared-6310fdde.js → shared-5ba87b6d.js} +1 -1
- package/dist/cdn/{shared-8c937a7c.js → shared-5df32007.js} +1 -1
- package/dist/cdn/{shared-0fdfc2c2.js → shared-5dfec3b7.js} +1 -1
- package/dist/cdn/shared-651c44fa.js +6 -0
- package/dist/cdn/{shared-5ba412f7.js → shared-655e7c5f.js} +1 -1
- package/dist/cdn/shared-6d41c9a9.js +1 -0
- package/dist/cdn/{shared-e1cade57.js → shared-6e508e5b.js} +5 -5
- package/dist/cdn/{shared-ff35e803.js → shared-6ed07856.js} +1 -1
- package/dist/cdn/{shared-b17fcc8f.js → shared-7039733e.js} +1 -1
- package/dist/cdn/{shared-c692070c.js → shared-74adbf9e.js} +1 -1
- package/dist/cdn/{shared-0dcc1ea4.js → shared-7ea4cb27.js} +1 -1
- package/dist/cdn/{shared-2d7cab3c.js → shared-83fc5dca.js} +1 -1
- package/dist/cdn/{shared-4345e9fd.js → shared-882e7191.js} +1 -1
- package/dist/cdn/shared-8ab2ba91.js +425 -0
- package/dist/cdn/{shared-36a09fe6.js → shared-8b80db13.js} +1 -1
- package/dist/cdn/{shared-b114fee0.js → shared-966feb65.js} +1 -1
- package/dist/cdn/{shared-1af365fe.js → shared-97d63da6.js} +1 -1
- package/dist/cdn/shared-99f0fee6.js +1 -0
- package/dist/cdn/shared-9adc47da.js +113 -0
- package/dist/cdn/{shared-708f960f.js → shared-9fd64015.js} +1 -1
- package/dist/cdn/{shared-5ecc7f74.js → shared-a19e1dff.js} +1 -1
- package/dist/cdn/{shared-921d4691.js → shared-a5ecd56e.js} +1 -1
- package/dist/cdn/{shared-b56daa27.js → shared-a9f76cae.js} +1 -1
- package/dist/cdn/{shared-e260fc5a.js → shared-ae459232.js} +4 -4
- package/dist/cdn/{shared-3895091e.js → shared-bbc0cdd6.js} +1 -1
- package/dist/cdn/{shared-fe165f2e.js → shared-bf695fe7.js} +1 -1
- package/dist/cdn/{shared-fba9b7b3.js → shared-cd8c3429.js} +1 -1
- package/dist/cdn/{shared-67696f2f.js → shared-cfed658c.js} +1 -1
- package/dist/cdn/shared-d0374d0c.js +1 -0
- package/dist/cdn/{shared-5f6d7cc6.js → shared-d244dd07.js} +1 -1
- package/dist/cdn/{shared-fcddc6cc.js → shared-d9f65ee0.js} +4 -4
- package/dist/cdn/{shared-d61d1d8d.js → shared-db98729a.js} +1 -1
- package/dist/cdn/{shared-019ad470.js → shared-e40937c5.js} +1 -1
- package/dist/cdn/shared-f1afbd7b.js +1 -0
- package/dist/cdn/{shared-d96312ed.js → shared-f53d078e.js} +1 -1
- package/dist/cdn/{shared-a3ec1362.js → shared-f588b5c2.js} +1 -1
- package/dist/cdn/{shared-8addaf74.js → shared-f5d4dda0.js} +1 -1
- package/dist/cdn/{shared-d070d509.js → shared-f94fa366.js} +1 -1
- package/dist/cdn/{shared-8cc1f513.js → shared-fd0a4026.js} +1 -1
- package/dist/cdn/translations/coupon-code-form/en.json +68 -12
- package/dist/cdn/translations/coupon-form/en.json +68 -11
- package/dist/cdn/translations/custom-field-form/en.json +32 -13
- package/dist/cdn/translations/customer/en.json +1 -12
- package/dist/cdn/translations/gift-card-code-form/en.json +51 -21
- package/dist/cdn/translations/gift-card-form/en.json +56 -22
- package/dist/cdn/translations/subscription-form/en.json +1 -12
- package/dist/cdn/translations/transaction/en.json +32 -13
- package/dist/cdn/translations/user-form/en.json +54 -20
- package/dist/cdn/translations/users-table/en.json +54 -20
- package/dist/elements/public/AttributeForm/AttributeForm.d.ts +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +19 -21
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +47 -178
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/index.d.ts +5 -6
- package/dist/elements/public/CouponCodeForm/index.js +5 -6
- package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/types.d.ts +11 -4
- package/dist/elements/public/CouponCodeForm/types.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.d.ts +2 -1
- package/dist/elements/public/CouponForm/CouponForm.js +4 -0
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CouponForm/types.d.ts +3 -0
- package/dist/elements/public/CouponForm/types.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +27 -36
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +40 -221
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/index.d.ts +3 -7
- package/dist/elements/public/CustomFieldForm/index.js +3 -7
- package/dist/elements/public/CustomFieldForm/index.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/types.d.ts +4 -7
- package/dist/elements/public/CustomFieldForm/types.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +12 -29
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +27 -276
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/index.d.ts +5 -9
- package/dist/elements/public/GiftCardCodeForm/index.js +5 -9
- package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +17 -6
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +0 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +0 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/types.d.ts +6 -4
- package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +3 -0
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +88 -78
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/index.d.ts +0 -2
- package/dist/elements/public/SubscriptionForm/index.js +0 -8
- package/dist/elements/public/SubscriptionForm/index.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.d.ts +15 -12
- package/dist/elements/public/UserForm/UserForm.js +64 -172
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/UserForm/index.d.ts +3 -5
- package/dist/elements/public/UserForm/index.js +3 -5
- package/dist/elements/public/UserForm/index.js.map +1 -1
- package/dist/elements/public/UserForm/types.d.ts +3 -1
- package/dist/elements/public/UserForm/types.js.map +1 -1
- package/dist/elements/public/UsersTable/UsersTable.js +1 -1
- package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
- package/dist/elements/public/UsersTable/roles.js.map +1 -0
- package/dist/mixins/themeable.js +38 -8
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-20142d51.js +0 -1
- package/dist/cdn/shared-74086729.js +0 -1
- package/dist/cdn/shared-8b7ef8ec.js +0 -1
- package/dist/cdn/shared-9f41236b.js +0 -1
- package/dist/cdn/shared-c0242421.js +0 -531
- package/dist/cdn/shared-ce9795cd.js +0 -25
- package/dist/cdn/shared-d1ee06bb.js +0 -1
- package/dist/cdn/shared-ded1248f.js +0 -1
- package/dist/cdn/shared-f655b20d.js +0 -1
- package/dist/elements/public/UserForm/roles.js.map +0 -1
- /package/dist/elements/public/{UserForm → UsersTable}/roles.d.ts +0 -0
- /package/dist/elements/public/{UserForm → UsersTable}/roles.js +0 -0
|
@@ -203,41 +203,28 @@ export class SubscriptionForm extends Base {
|
|
|
203
203
|
`;
|
|
204
204
|
};
|
|
205
205
|
this.__renderEndDate = () => {
|
|
206
|
-
|
|
207
|
-
const
|
|
206
|
+
var _a;
|
|
207
|
+
const { data, lang, ns } = this;
|
|
208
208
|
return html `
|
|
209
|
-
<div
|
|
209
|
+
<div data-testid="end-date">
|
|
210
210
|
${this.renderTemplateOrSlot('end-date:before')}
|
|
211
211
|
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
ns=${ns}
|
|
225
|
-
.templates=${this.getNestedTemplates('end-date:form')}
|
|
226
|
-
>
|
|
227
|
-
</foxy-form-dialog>
|
|
228
|
-
|
|
229
|
-
<vaadin-button
|
|
230
|
-
data-testid="end-date"
|
|
231
|
-
theme="error"
|
|
232
|
-
class="w-full"
|
|
233
|
-
?disabled=${!this.data || disabledSelector.matches('end-date', true)}
|
|
234
|
-
@click=${(evt) => {
|
|
235
|
-
const form = this.renderRoot.querySelector('#end-date-form');
|
|
236
|
-
form.show(evt.currentTarget);
|
|
212
|
+
<x-group frame>
|
|
213
|
+
<foxy-i18n key="end_date" ns=${ns} lang=${lang} slot="header"></foxy-i18n>
|
|
214
|
+
<foxy-internal-calendar
|
|
215
|
+
start=${ifDefined((_a = data === null || data === void 0 ? void 0 : data.end_date) === null || _a === void 0 ? void 0 : _a.substr(0, 10))}
|
|
216
|
+
value=${ifDefined(data === null || data === void 0 ? void 0 : data.end_date)}
|
|
217
|
+
lang=${lang}
|
|
218
|
+
?readonly=${!this.__isEndDateEditable}
|
|
219
|
+
?disabled=${this.disabledSelector.matches('end-date', true)}
|
|
220
|
+
.checkAvailability=${this.__checkEndDateAvailability}
|
|
221
|
+
@change=${(evt) => {
|
|
222
|
+
const target = evt.target;
|
|
223
|
+
this.edit({ end_date: target.value });
|
|
237
224
|
}}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</
|
|
225
|
+
>
|
|
226
|
+
</foxy-internal-calendar>
|
|
227
|
+
</x-group>
|
|
241
228
|
|
|
242
229
|
${this.renderTemplateOrSlot('end-date:after')}
|
|
243
230
|
</div>
|
|
@@ -254,6 +241,12 @@ export class SubscriptionForm extends Base {
|
|
|
254
241
|
this.__checkStartDateAvailability = (date) => {
|
|
255
242
|
return date.getTime() >= Date.now();
|
|
256
243
|
};
|
|
244
|
+
this.__checkEndDateAvailability = (date) => {
|
|
245
|
+
const tomorrow = new Date();
|
|
246
|
+
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
247
|
+
tomorrow.setHours(0, 0, 0, 0);
|
|
248
|
+
return date.getTime() >= tomorrow.getTime();
|
|
249
|
+
};
|
|
257
250
|
this.__renderStartDate = () => {
|
|
258
251
|
const { data, lang, ns } = this;
|
|
259
252
|
return html `
|
|
@@ -415,16 +408,12 @@ export class SubscriptionForm extends Base {
|
|
|
415
408
|
'foxy-internal-async-list-control': customElements.get('foxy-internal-async-list-control'),
|
|
416
409
|
'foxy-internal-number-control': customElements.get('foxy-internal-number-control'),
|
|
417
410
|
'foxy-internal-calendar': customElements.get('foxy-internal-calendar'),
|
|
418
|
-
'foxy-collection-pages': customElements.get('foxy-collection-pages'),
|
|
419
411
|
'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),
|
|
420
412
|
'foxy-customer-card': customElements.get('foxy-customer-card'),
|
|
421
413
|
'vaadin-combo-box': customElements.get('vaadin-combo-box'),
|
|
422
|
-
'foxy-form-dialog': customElements.get('foxy-form-dialog'),
|
|
423
|
-
'vaadin-button': customElements.get('vaadin-button'),
|
|
424
414
|
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
425
415
|
'foxy-nucleon': customElements.get('foxy-nucleon'),
|
|
426
416
|
'vcf-tooltip': customElements.get('vcf-tooltip'),
|
|
427
|
-
'foxy-table': customElements.get('foxy-table'),
|
|
428
417
|
'foxy-i18n': customElements.get('foxy-i18n'),
|
|
429
418
|
'iron-icon': customElements.get('iron-icon'),
|
|
430
419
|
'x-skeleton': Skeleton,
|
|
@@ -473,52 +462,52 @@ export class SubscriptionForm extends Base {
|
|
|
473
462
|
currencyCode = (_g = (_f = /Currency: ([A-Z]{3})/g.exec(localeInfo)) === null || _f === void 0 ? void 0 : _f[1]) !== null && _g !== void 0 ? _g : null;
|
|
474
463
|
}
|
|
475
464
|
return html `
|
|
476
|
-
<
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
465
|
+
<div class="relative grid grid-cols-1 sm-grid-cols-2 gap-l">
|
|
466
|
+
<foxy-nucleon
|
|
467
|
+
class="hidden"
|
|
468
|
+
infer=""
|
|
469
|
+
href=${ifDefined(this.__transactionTemplateHref)}
|
|
470
|
+
id=${this.__transactionTemplateLoaderId}
|
|
471
|
+
@update=${() => this.requestUpdate()}
|
|
472
|
+
>
|
|
473
|
+
</foxy-nucleon>
|
|
484
474
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
475
|
+
<foxy-nucleon
|
|
476
|
+
class="hidden"
|
|
477
|
+
infer=""
|
|
478
|
+
href=${ifDefined(this.__defaultTemplateSetHref)}
|
|
479
|
+
id=${this.__defaultTemplateSetLoaderId}
|
|
480
|
+
@update=${() => this.requestUpdate()}
|
|
481
|
+
>
|
|
482
|
+
</foxy-nucleon>
|
|
493
483
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
484
|
+
<foxy-nucleon
|
|
485
|
+
class="hidden"
|
|
486
|
+
infer=""
|
|
487
|
+
href=${ifDefined(this.__localeCodesHelperHref)}
|
|
488
|
+
id=${this.__localeCodesHelperLoaderId}
|
|
489
|
+
@update=${() => this.requestUpdate()}
|
|
490
|
+
>
|
|
491
|
+
</foxy-nucleon>
|
|
502
492
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
493
|
+
<foxy-nucleon
|
|
494
|
+
class="hidden"
|
|
495
|
+
infer=""
|
|
496
|
+
href=${ifDefined(this.__templateSetHref)}
|
|
497
|
+
id=${this.__templateSetLoaderId}
|
|
498
|
+
@update=${() => this.requestUpdate()}
|
|
499
|
+
>
|
|
500
|
+
</foxy-nucleon>
|
|
511
501
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
502
|
+
<foxy-nucleon
|
|
503
|
+
class="hidden"
|
|
504
|
+
infer=""
|
|
505
|
+
href=${ifDefined(this.__storeHref)}
|
|
506
|
+
id=${this.__storeLoaderId}
|
|
507
|
+
@update=${() => this.requestUpdate()}
|
|
508
|
+
>
|
|
509
|
+
</foxy-nucleon>
|
|
520
510
|
|
|
521
|
-
<div class="relative grid grid-cols-1 sm-grid-cols-2 gap-l">
|
|
522
511
|
${this.hiddenSelector.matches('header', true)
|
|
523
512
|
? ''
|
|
524
513
|
: this.__renderHeader(currencyCode !== null && currencyCode !== void 0 ? currencyCode : void 0, currencyDisplay)}
|
|
@@ -527,6 +516,7 @@ export class SubscriptionForm extends Base {
|
|
|
527
516
|
${this.__isFrequencyVisible ? this.__renderFrequency() : ''}
|
|
528
517
|
${this.__isStartDateVisible ? this.__renderStartDate() : ''}
|
|
529
518
|
${this.__isNextTransactionDateVisible ? this.__renderNextTransactionDate() : ''}
|
|
519
|
+
${this.__isEndDateVisible ? this.__renderEndDate() : ''}
|
|
530
520
|
|
|
531
521
|
<foxy-internal-number-control
|
|
532
522
|
suffix=${ifDefined(currencyCode !== null && currencyCode !== void 0 ? currencyCode : void 0)}
|
|
@@ -559,8 +549,6 @@ export class SubscriptionForm extends Base {
|
|
|
559
549
|
|
|
560
550
|
<foxy-internal-timestamps-control infer="timestamps" class="sm-col-span-2">
|
|
561
551
|
</foxy-internal-timestamps-control>
|
|
562
|
-
|
|
563
|
-
${this.hiddenSelector.matches('end-date', true) ? '' : this.__renderEndDate()}
|
|
564
552
|
</div>
|
|
565
553
|
`;
|
|
566
554
|
}
|
|
@@ -646,6 +634,17 @@ export class SubscriptionForm extends Base {
|
|
|
646
634
|
return false;
|
|
647
635
|
return this.__isNextTransactionDateVisible;
|
|
648
636
|
}
|
|
637
|
+
get __isEndDateVisible() {
|
|
638
|
+
if (this.hiddenSelector.matches('end-date', true))
|
|
639
|
+
return false;
|
|
640
|
+
if (this.data === null)
|
|
641
|
+
return false;
|
|
642
|
+
if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now())
|
|
643
|
+
return false;
|
|
644
|
+
if (this.data.is_active === false)
|
|
645
|
+
return false;
|
|
646
|
+
return !this.settings;
|
|
647
|
+
}
|
|
649
648
|
get __isStartDateEditable() {
|
|
650
649
|
if (this.readonlySelector.matches('start-date', true))
|
|
651
650
|
return false;
|
|
@@ -659,6 +658,17 @@ export class SubscriptionForm extends Base {
|
|
|
659
658
|
return false;
|
|
660
659
|
return this.settings === null;
|
|
661
660
|
}
|
|
661
|
+
get __isEndDateEditable() {
|
|
662
|
+
if (this.readonlySelector.matches('end-date', true))
|
|
663
|
+
return false;
|
|
664
|
+
if (this.data === null)
|
|
665
|
+
return false;
|
|
666
|
+
if (this.data.end_date && new Date(this.data.end_date) <= new Date())
|
|
667
|
+
return false;
|
|
668
|
+
if (this.data.is_active === false)
|
|
669
|
+
return false;
|
|
670
|
+
return this.settings === null;
|
|
671
|
+
}
|
|
662
672
|
get __isFrequencyVisible() {
|
|
663
673
|
if (this.hiddenSelector.matches('frequency', true))
|
|
664
674
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionForm.js","sourceRoot":"","sources":["../../../../src/elements/public/SubscriptionForm/SubscriptionForm.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,+BAA4B;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAY,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAA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AAC,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE;YAAE,OAAO,KAAK,CAAC;QAC7F,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,KAAK;YAAE,OAAO,KAAK,CAAC;QAChD,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAExC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;YAC/C,YAAY,EAAE,IAAI,CAAC,IAAI;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC;IAED,IAAY,aAAa;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAE7D,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;YAC/C,YAAY,EAAE,IAAI,CAAC,IAAI;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import type { CustomerPageGetter, Data, Settings, Templates, TransactionPageGetter } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { ScopedElementsMap } from '@open-wc/scoped-elements';\nimport type { InternalCalendar } from '../../internal/InternalCalendar';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { ButtonElement } from '@vaadin/vaadin-button';\nimport type { FormDialog } from '../FormDialog';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { Choice, Group, Skeleton } from '../../private/index';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector, Resource } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { parseFrequency } from '../../../utils/parse-frequency';\nimport { serializeDate } from '../../../utils/serialize-date';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-html';\n\nimport {\n getNextTransactionDateConstraints,\n getAllowedFrequencies,\n isNextTransactionDate,\n} from '@foxy.io/sdk/customer';\n\nconst NS = 'subscription-form';\nconst Base = ScopedElementsMixin(ResponsiveMixin(TranslatableMixin(InternalForm, NS)));\n\n/**\n * Form element for creating or editing subscriptions.\n *\n * @slot header:before - **new in v1.4.0**\n * @slot header:after - **new in v1.4.0**\n *\n * @slot items:before - **new in v1.4.0**\n * @slot items:after - **new in v1.4.0**\n * @slot items:actions:before - **new in v1.4.0**\n * @slot items:actions:after - **new in v1.4.0**\n *\n * @slot end-date:before - **new in v1.4.0**\n * @slot end-date:after - **new in v1.4.0**\n *\n * @slot next-transaction-date:before - **new in v1.4.0**\n * @slot next-transaction-date:after - **new in v1.4.0**\n *\n * @slot frequency:before - **new in v1.4.0**\n * @slot frequency:after - **new in v1.4.0**\n *\n * @slot transactions:before - **new in v1.4.0**\n * @slot transactions:after - **new in v1.4.0**\n *\n * @slot attributes:before - **new in v1.20.0**\n * @slot attributes:after - **new in v1.20.0**\n *\n * @slot timestamps:before - **new in v1.20.0**\n * @slot timestamps:after - **new in v1.20.0**\n *\n * @slot past-due-amount:before - **new in v1.20.0**\n * @slot past-due-amount:after - **new in v1.20.0**\n *\n * @slot start-date:before - **new in v1.20.0**\n * @slot start-date:after - **new in v1.20.0**\n *\n * @element foxy-subscription-form\n * @since 1.2.0\n */\nexport class SubscriptionForm extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-timestamps-control': customElements.get('foxy-internal-timestamps-control'),\n 'foxy-internal-async-list-control': customElements.get('foxy-internal-async-list-control'),\n 'foxy-internal-number-control': customElements.get('foxy-internal-number-control'),\n 'foxy-internal-calendar': customElements.get('foxy-internal-calendar'),\n 'foxy-collection-pages': customElements.get('foxy-collection-pages'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-customer-card': customElements.get('foxy-customer-card'),\n 'vaadin-combo-box': customElements.get('vaadin-combo-box'),\n 'foxy-form-dialog': customElements.get('foxy-form-dialog'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-nucleon': customElements.get('foxy-nucleon'),\n 'vcf-tooltip': customElements.get('vcf-tooltip'),\n 'foxy-table': customElements.get('foxy-table'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'iron-icon': customElements.get('iron-icon'),\n 'x-skeleton': Skeleton,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n getTransactionPageHref: { attribute: false },\n getCustomerPageHref: { attribute: false },\n customerAddresses: { attribute: 'customer-addresses' },\n itemCategories: { attribute: 'item-categories' },\n localeCodes: { attribute: 'locale-codes' },\n settings: { type: Object },\n coupons: {},\n };\n }\n\n getTransactionPageHref: TransactionPageGetter = (_, data: any) => {\n return data?._links['fx:receipt'].href;\n };\n\n getCustomerPageHref: CustomerPageGetter | null = null;\n\n customerAddresses: string | null = null;\n\n itemCategories: string | null = null;\n\n localeCodes: string | null = null;\n\n templates: Templates = {};\n\n settings: Settings | null = null;\n\n coupons: string | null = null;\n\n private readonly __transactionTemplateLoaderId = 'transactionTemplateLoader';\n\n private readonly __defaultTemplateSetLoaderId = 'defaultTemplateSetLoader';\n\n private readonly __localeCodesHelperLoaderId = 'localeCodesLoader';\n\n private readonly __templateSetLoaderId = 'templateSetLoader';\n\n private readonly __storeLoaderId = 'storeLoader';\n\n private readonly __renderHeaderSubtitle = () => {\n const { data, lang, ns } = this;\n\n if (data) {\n let color = 'text-secondary';\n let date: string;\n let key: string;\n\n if (data.first_failed_transaction_date) {\n color = 'text-error';\n date = data.first_failed_transaction_date;\n key = 'subscription_failed';\n } else if (data.end_date) {\n date = data.end_date;\n const hasEnded = new Date(data.end_date).getTime() > Date.now();\n key = hasEnded ? 'subscription_will_be_cancelled' : 'subscription_cancelled';\n } else if (!data.is_active) {\n date = '';\n key = 'subscription_inactive';\n } else if (new Date(data.start_date) > new Date()) {\n date = data.start_date;\n key = 'subscription_will_be_active';\n } else {\n date = data.next_transaction_date;\n key = 'subscription_active';\n }\n\n const text = html`\n <foxy-i18n\n data-testid=\"header-subtitle\"\n options=${JSON.stringify({ date })}\n class=${color}\n lang=${lang}\n key=${key}\n ns=${ns}\n >\n </foxy-i18n>\n `;\n\n if (data.first_failed_transaction_date) {\n return html`\n <span id=\"status\" class=\"flex items-center space-x-xs ${color}\">\n ${text}<iron-icon icon=\"icons:info-outline\" class=\"icon-inline\"></iron-icon>\n </span>\n <vcf-tooltip for=\"status\" position=\"bottom\">\n <span class=\"text-s\">${data.error_message}</span>\n </vcf-tooltip>\n `;\n }\n\n return text;\n }\n\n return html`<x-skeleton class=\"w-full\" variant=\"static\"> </x-skeleton>`;\n };\n\n private readonly __renderHeaderTitle = (\n currency: string | undefined,\n currencyDisplay: string | undefined\n ) => {\n const { data, lang, ns } = this;\n\n if (data) {\n const frequency = parseFrequency(data.frequency);\n const transactionTemplate = this.__transactionTemplate;\n const total = transactionTemplate?.total_order;\n\n if (typeof currency !== 'string') return html`--`;\n\n return html`\n <foxy-i18n\n data-testid=\"header-title\"\n options=${JSON.stringify({\n ...frequency,\n amount: `${total} ${currency}`,\n currencyDisplay,\n })}\n lang=${lang}\n key=\"price_${data.frequency === '.5m' ? 'twice_a_month' : 'recurring'}\"\n ns=${ns}\n >\n </foxy-i18n>\n `;\n }\n\n return html`<x-skeleton class=\"w-full\" variant=\"static\"> </x-skeleton>`;\n };\n\n private readonly __renderHeader = (\n currencyCode: string | undefined,\n currencyDisplay: string | undefined\n ) => {\n return html`\n <div data-testid=\"header\" class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('header:before')}\n <div class=\"leading-xs text-xxl font-medium truncate\">\n ${this.__renderHeaderTitle(currencyCode, currencyDisplay)}\n </div>\n <div class=\"leading-xs text-l\">${this.__renderHeaderSubtitle()}</div>\n ${this.renderTemplateOrSlot('header:after')}\n </div>\n `;\n };\n\n private readonly __renderItemsActions = () => {\n return html`\n <div class=\"flex\" data-testid=\"items:actions\">\n ${this.renderTemplateOrSlot('items:actions:before')}\n\n <foxy-i18n\n data-testid=\"items:actions-label\"\n class=\"flex-1 text-s font-medium text-secondary\"\n lang=${this.lang}\n key=\"item_plural\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${this.renderTemplateOrSlot('items:actions:after')}\n </div>\n `;\n };\n\n private readonly __renderItems = () => {\n let itemsHref: string | undefined;\n\n try {\n const cart = this.__transactionTemplate;\n const url = new URL(cart?._links['fx:items'].href ?? '');\n url.searchParams.set('zoom', 'item_options');\n itemsHref = url.toString();\n } catch {\n itemsHref = undefined;\n }\n\n return html`\n <div data-testid=\"items\" class=\"space-y-xs sm-col-span-2\">\n ${this.hiddenSelector.matches('items:actions', true) ? '' : this.__renderItemsActions()}\n\n <foxy-internal-async-list-control\n first=${ifDefined(itemsHref)}\n limit=\"5\"\n infer=\"items\"\n item=\"foxy-item-card\"\n >\n </foxy-internal-async-list-control>\n </div>\n `;\n };\n\n private readonly __renderEndDate = () => {\n const { disabledSelector, lang, ns } = this;\n const formHiddenSelector = this.hiddenSelector.zoom('end-date:form').toString();\n\n return html`\n <div class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('end-date:before')}\n\n <foxy-form-dialog\n readonlycontrols=${this.readonlySelector.zoom('end-date:form').toString()}\n disabledcontrols=${disabledSelector.zoom('end-date:form').toString()}\n hiddencontrols=\"save-button ${formHiddenSelector}\"\n data-testid=\"cancellation-form\"\n parent=${this.parent}\n header=\"end_subscription\"\n alert\n form=\"foxy-cancellation-form\"\n href=${this.href}\n lang=${lang}\n id=\"end-date-form\"\n ns=${ns}\n .templates=${this.getNestedTemplates('end-date:form')}\n >\n </foxy-form-dialog>\n\n <vaadin-button\n data-testid=\"end-date\"\n theme=\"error\"\n class=\"w-full\"\n ?disabled=${!this.data || disabledSelector.matches('end-date', true)}\n @click=${(evt: Event) => {\n const form = this.renderRoot.querySelector('#end-date-form') as FormDialog;\n form.show(evt.currentTarget as ButtonElement);\n }}\n >\n <foxy-i18n key=\"end_subscription\" ns=${ns} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot('end-date:after')}\n </div>\n `;\n };\n\n private readonly __checkNextTransactionDateAvailability = (date: Date) => {\n const { settings, data: subscription } = this;\n\n if (settings && subscription) {\n const value = serializeDate(date);\n return isNextTransactionDate({ value, settings, subscription });\n }\n\n return date.getTime() >= Date.now();\n };\n\n private readonly __checkStartDateAvailability = (date: Date) => {\n return date.getTime() >= Date.now();\n };\n\n private readonly __renderStartDate = () => {\n const { data, lang, ns } = this;\n\n return html`\n <div data-testid=\"start-date\">\n ${this.renderTemplateOrSlot('start-date:before')}\n\n <x-group frame>\n <foxy-i18n key=\"start_date\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n <foxy-internal-calendar\n start=${ifDefined(data?.start_date.substr(0, 10))}\n value=${ifDefined(data?.start_date)}\n lang=${lang}\n ?readonly=${!this.__isStartDateEditable}\n ?disabled=${this.disabledSelector.matches('start-date', true)}\n .checkAvailability=${this.__checkStartDateAvailability}\n @change=${(evt: Event) => {\n const target = evt.target as InternalCalendar;\n this.edit({ start_date: target.value });\n }}\n >\n </foxy-internal-calendar>\n </x-group>\n\n ${this.renderTemplateOrSlot('start-date:after')}\n </div>\n `;\n };\n\n private readonly __renderNextTransactionDate = () => {\n const { data, lang, ns } = this;\n const isActive = !!data?.is_active;\n\n return html`\n <div data-testid=\"next-transaction-date\">\n ${this.renderTemplateOrSlot('next-transaction-date:before')}\n\n <x-group frame>\n <foxy-i18n key=\"next_transaction_date\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n <foxy-internal-calendar\n start=${ifDefined(data?.next_transaction_date.substr(0, 10))}\n value=${ifDefined(data?.next_transaction_date)}\n lang=${lang}\n ?readonly=${!isActive || this.readonlySelector.matches('next-transaction-date', true)}\n ?disabled=${!data || this.disabledSelector.matches('next-transaction-date', true)}\n .checkAvailability=${this.__checkNextTransactionDateAvailability}\n @change=${(evt: Event) => {\n const target = evt.target as InternalCalendar;\n this.edit({ next_transaction_date: target.value });\n }}\n >\n </foxy-internal-calendar>\n </x-group>\n\n ${this.renderTemplateOrSlot('next-transaction-date:after')}\n </div>\n `;\n };\n\n private readonly __renderFrequencyAsDropdown = () => {\n const { data } = this;\n const active = !!data?.is_active;\n const items = this.__frequencies.map(v => ({\n label: this.t(v === '.5m' ? 'twice_a_month' : 'frequency', parseFrequency(v)),\n value: v,\n }));\n\n return html`\n <vaadin-combo-box\n item-value-path=\"value\"\n item-label-path=\"label\"\n data-testid=\"frequency\"\n ?disabled=${!data || this.disabledSelector.matches('frequency', true)}\n ?readonly=${data && (!active || this.readonlySelector.matches('frequency', true))}\n class=\"w-full\"\n label=${this.t('frequency_label').toString()}\n value=${ifDefined(this.form.frequency)}\n .items=${items}\n @change=${(evt: Event) => {\n this.edit({ frequency: (evt.target as HTMLInputElement).value });\n }}\n >\n </vaadin-combo-box>\n `;\n };\n\n private readonly __renderFrequencyAsRadioList = () => {\n const { data, lang, ns } = this;\n\n return html`\n <x-group frame>\n <foxy-i18n key=\"frequency_label\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n\n <x-choice\n default-custom-value=\"1d\"\n data-testid=\"frequency\"\n type=\"frequency\"\n ns=${ns}\n ?custom=${this.settings === null}\n .items=${this.__frequencies}\n .value=${this.form.frequency ?? null}\n ?disabled=${!data || this.disabledSelector.matches('frequency', true)}\n ?readonly=${data && (!data.is_active || this.readonlySelector.matches('frequency', true))}\n @change=${(evt: Event) => {\n this.edit({ frequency: (evt.target as HTMLInputElement).value });\n }}\n >\n ${this.__frequencies.map(\n frequency => html`\n <foxy-i18n\n options=${JSON.stringify(parseFrequency(frequency))}\n slot=\"${frequency}-label\"\n lang=${lang}\n key=${frequency === '.5m' ? 'twice_a_month' : 'frequency'}\n ns=${ns}\n >\n </foxy-i18n>\n `\n )}\n </x-choice>\n </x-group>\n `;\n };\n\n private readonly __renderFrequency = () => {\n return html`\n <div class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('frequency:before')}\n ${this.settings && this.__frequencies.length > 4\n ? this.__renderFrequencyAsDropdown()\n : this.__renderFrequencyAsRadioList()}\n ${this.renderTemplateOrSlot('frequency:after')}\n </div>\n `;\n };\n\n private readonly __renderCustomer = () => {\n const customerHref = this.data?._links['fx:customer'].href;\n const customerPageHref = customerHref ? this.getCustomerPageHref?.(customerHref) : void 0;\n\n return html`\n <div data-testid=\"customer\" class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('customer:before')}\n\n <foxy-i18n infer=\"customer\" class=\"block text-s font-medium leading-xs mb-xs\" key=\"label\">\n </foxy-i18n>\n\n <a\n class=${classMap({\n 'block rounded transition-colors': true,\n 'ring-1 ring-contrast-10': !customerPageHref,\n 'cursor-pointer bg-contrast-5 hover-bg-contrast-10': !!customerPageHref,\n 'focus-outline-none focus-ring-2 focus-ring-primary-50': !!customerPageHref,\n })}\n style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n href=${ifDefined(customerPageHref)}\n >\n <foxy-customer-card infer=\"customer\" href=${ifDefined(customerHref)}></foxy-customer-card>\n </a>\n\n ${this.renderTemplateOrSlot('customer:after')}\n </div>\n `;\n };\n\n get hiddenSelector(): BooleanSelector {\n return new BooleanSelector(`items:pagination:card:autorenew-icon ${super.hiddenSelector}`);\n }\n\n renderBody(): TemplateResult {\n let transactionsHref: string | undefined;\n\n try {\n const url = new URL(this.data?._links['fx:transactions'].href ?? '');\n url.searchParams.set('order', 'transaction_date desc');\n url.searchParams.set('zoom', 'items');\n transactionsHref = url.toString();\n } catch {\n transactionsHref = undefined;\n }\n\n const currencyDisplay = this.__store?.use_international_currency_symbol ? 'code' : 'symbol';\n const cart = this.__transactionTemplate;\n\n let currencyCode: string | null = null;\n\n if (cart?.currency_code) {\n currencyCode = cart.currency_code;\n } else {\n const allLocaleCodes = this.__localeCodesHelper;\n const localeCode = (this.__templateSet ?? this.__defaultTemplateSet)?.locale_code;\n const localeInfo = localeCode ? allLocaleCodes?.values[localeCode] : void 0;\n\n if (localeInfo) currencyCode = /Currency: ([A-Z]{3})/g.exec(localeInfo)?.[1] ?? null;\n }\n\n return html`\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__transactionTemplateHref)}\n id=${this.__transactionTemplateLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__defaultTemplateSetHref)}\n id=${this.__defaultTemplateSetLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__localeCodesHelperHref)}\n id=${this.__localeCodesHelperLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__templateSetHref)}\n id=${this.__templateSetLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__storeHref)}\n id=${this.__storeLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <div class=\"relative grid grid-cols-1 sm-grid-cols-2 gap-l\">\n ${this.hiddenSelector.matches('header', true)\n ? ''\n : this.__renderHeader(currencyCode ?? void 0, currencyDisplay)}\n ${this.hiddenSelector.matches('customer', true) ? '' : this.__renderCustomer()}\n ${this.hiddenSelector.matches('items', true) ? '' : this.__renderItems()}\n ${this.__isFrequencyVisible ? this.__renderFrequency() : ''}\n ${this.__isStartDateVisible ? this.__renderStartDate() : ''}\n ${this.__isNextTransactionDateVisible ? this.__renderNextTransactionDate() : ''}\n\n <foxy-internal-number-control\n suffix=${ifDefined(currencyCode ?? void 0)}\n infer=\"past-due-amount\"\n class=\"sm-col-span-2\"\n min=\"0\"\n >\n </foxy-internal-number-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(this.data?._links['fx:attributes']?.href)}\n class=\"sm-col-span-2\"\n infer=\"attributes\"\n limit=\"5\"\n form=\"foxy-attribute-form\"\n item=\"foxy-attribute-card\"\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(transactionsHref)}\n class=\"sm-col-span-2\"\n infer=\"transactions\"\n limit=\"5\"\n item=\"foxy-transaction-card\"\n hide-delete-button\n .getPageHref=${this.getTransactionPageHref}\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-timestamps-control infer=\"timestamps\" class=\"sm-col-span-2\">\n </foxy-internal-timestamps-control>\n\n ${this.hiddenSelector.matches('end-date', true) ? '' : this.__renderEndDate()}\n </div>\n `;\n }\n\n private get __transactionTemplateHref() {\n type DataWithEmbeds = Resource<Rels.Subscription, { zoom: 'transaction_template' }>;\n type Embed = Resource<Rels.TransactionTemplate>;\n\n const data = this.data as DataWithEmbeds | null;\n const embed = data?._embedded?.['fx:transaction_template'] as Embed | undefined;\n\n return embed ? void 0 : data?._links['fx:transaction_template'].href;\n }\n\n private get __defaultTemplateSetHref() {\n const templateSetUri = this.__transactionTemplate?.template_set_uri;\n\n if (templateSetUri === '') {\n try {\n const url = new URL(this.__store?._links['fx:template_sets'].href ?? '');\n url.searchParams.set('code', 'DEFAULT');\n return url.toString();\n } catch {\n //\n }\n }\n }\n\n private get __localeCodesHelperHref() {\n if (this.__defaultTemplateSetHref || this.__templateSetHref) {\n return this.localeCodes ?? void 0;\n }\n }\n\n private get __templateSetHref() {\n const cart = this.__transactionTemplate;\n if (!cart?.currency_code) return cart?.template_set_uri || void 0;\n }\n\n private get __storeHref() {\n return this.data?._links['fx:store']?.href;\n }\n\n private get __transactionTemplate() {\n type DataWithEmbeds = Resource<Rels.Subscription, { zoom: 'transaction_template' }>;\n type Loader = NucleonElement<Resource<Rels.TransactionTemplate>>;\n type Embed = Resource<Rels.TransactionTemplate>;\n\n const data = this.data as DataWithEmbeds | null;\n const embed = data?._embedded?.['fx:transaction_template'] as Embed | undefined;\n const selector = `#${this.__transactionTemplateLoaderId}`;\n\n return embed ?? this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __defaultTemplateSet() {\n type Loader = NucleonElement<Resource<Rels.TemplateSets>>;\n const selector = `#${this.__defaultTemplateSetLoaderId}`;\n const loader = this.renderRoot.querySelector<Loader>(selector);\n return loader?.data?._embedded['fx:template_sets'][0] ?? null;\n }\n\n private get __localeCodesHelper() {\n type Loader = NucleonElement<Resource<Rels.LocaleCodes>>;\n const selector = `#${this.__localeCodesHelperLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __templateSet() {\n type Loader = NucleonElement<Resource<Rels.TemplateSet>>;\n const selector = `#${this.__templateSetLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __store() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n const selector = `#${this.__storeLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __isNextTransactionDateVisible() {\n if (this.hiddenSelector.matches('next-transaction-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now()) return false;\n if (this.data.is_active === false) return false;\n if (this.settings === null) return true;\n\n const rules = this.settings.subscriptions.allow_next_date_modification;\n return !!getNextTransactionDateConstraints(this.data, rules);\n }\n\n private get __isStartDateVisible() {\n if (this.hiddenSelector.matches('start-date', true)) return false;\n return this.__isNextTransactionDateVisible;\n }\n\n private get __isStartDateEditable() {\n if (this.readonlySelector.matches('start-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date) <= new Date()) return false;\n if (this.data.is_active === false) return false;\n if (this.data.start_date && new Date(this.data.start_date) <= new Date()) return false;\n\n return this.settings === null;\n }\n\n private get __isFrequencyVisible() {\n if (this.hiddenSelector.matches('frequency', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now()) return false;\n if (this.data.is_active === false) return false;\n if (this.settings === null) return true;\n\n const allowedFrequencies = getAllowedFrequencies({\n subscription: this.data,\n settings: this.settings,\n });\n\n return !allowedFrequencies.next().done;\n }\n\n private get __frequencies() {\n if (!this.settings || !this.data) return ['.5m', '1m', '1y'];\n\n const allowedFrequencies = getAllowedFrequencies({\n subscription: this.data,\n settings: this.settings,\n });\n\n return Array.from(allowedFrequencies);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SubscriptionForm.js","sourceRoot":"","sources":["../../../../src/elements/public/SubscriptionForm/SubscriptionForm.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,+BAA4B;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAY,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAChE,OAAO,EAAE,aAAa,EAAE,yCAAsC;AAC9D,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EACL,iCAAiC,EACjC,qBAAqB,E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;YAC/C,YAAY,EAAE,IAAI,CAAC,IAAI;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import type { CustomerPageGetter, Data, Settings, Templates, TransactionPageGetter } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { ScopedElementsMap } from '@open-wc/scoped-elements';\nimport type { InternalCalendar } from '../../internal/InternalCalendar';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { Choice, Group, Skeleton } from '../../private/index';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector, Resource } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { parseFrequency } from '../../../utils/parse-frequency';\nimport { serializeDate } from '../../../utils/serialize-date';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-html';\n\nimport {\n getNextTransactionDateConstraints,\n getAllowedFrequencies,\n isNextTransactionDate,\n} from '@foxy.io/sdk/customer';\n\nconst NS = 'subscription-form';\nconst Base = ScopedElementsMixin(ResponsiveMixin(TranslatableMixin(InternalForm, NS)));\n\n/**\n * Form element for creating or editing subscriptions.\n *\n * @slot header:before - **new in v1.4.0**\n * @slot header:after - **new in v1.4.0**\n *\n * @slot items:before - **new in v1.4.0**\n * @slot items:after - **new in v1.4.0**\n * @slot items:actions:before - **new in v1.4.0**\n * @slot items:actions:after - **new in v1.4.0**\n *\n * @slot end-date:before - **new in v1.4.0**\n * @slot end-date:after - **new in v1.4.0**\n *\n * @slot next-transaction-date:before - **new in v1.4.0**\n * @slot next-transaction-date:after - **new in v1.4.0**\n *\n * @slot frequency:before - **new in v1.4.0**\n * @slot frequency:after - **new in v1.4.0**\n *\n * @slot transactions:before - **new in v1.4.0**\n * @slot transactions:after - **new in v1.4.0**\n *\n * @slot attributes:before - **new in v1.20.0**\n * @slot attributes:after - **new in v1.20.0**\n *\n * @slot timestamps:before - **new in v1.20.0**\n * @slot timestamps:after - **new in v1.20.0**\n *\n * @slot past-due-amount:before - **new in v1.20.0**\n * @slot past-due-amount:after - **new in v1.20.0**\n *\n * @slot start-date:before - **new in v1.20.0**\n * @slot start-date:after - **new in v1.20.0**\n *\n * @element foxy-subscription-form\n * @since 1.2.0\n */\nexport class SubscriptionForm extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-timestamps-control': customElements.get('foxy-internal-timestamps-control'),\n 'foxy-internal-async-list-control': customElements.get('foxy-internal-async-list-control'),\n 'foxy-internal-number-control': customElements.get('foxy-internal-number-control'),\n 'foxy-internal-calendar': customElements.get('foxy-internal-calendar'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-customer-card': customElements.get('foxy-customer-card'),\n 'vaadin-combo-box': customElements.get('vaadin-combo-box'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-nucleon': customElements.get('foxy-nucleon'),\n 'vcf-tooltip': customElements.get('vcf-tooltip'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'iron-icon': customElements.get('iron-icon'),\n 'x-skeleton': Skeleton,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n getTransactionPageHref: { attribute: false },\n getCustomerPageHref: { attribute: false },\n customerAddresses: { attribute: 'customer-addresses' },\n itemCategories: { attribute: 'item-categories' },\n localeCodes: { attribute: 'locale-codes' },\n settings: { type: Object },\n coupons: {},\n };\n }\n\n getTransactionPageHref: TransactionPageGetter = (_, data: any) => {\n return data?._links['fx:receipt'].href;\n };\n\n getCustomerPageHref: CustomerPageGetter | null = null;\n\n customerAddresses: string | null = null;\n\n itemCategories: string | null = null;\n\n localeCodes: string | null = null;\n\n templates: Templates = {};\n\n settings: Settings | null = null;\n\n coupons: string | null = null;\n\n private readonly __transactionTemplateLoaderId = 'transactionTemplateLoader';\n\n private readonly __defaultTemplateSetLoaderId = 'defaultTemplateSetLoader';\n\n private readonly __localeCodesHelperLoaderId = 'localeCodesLoader';\n\n private readonly __templateSetLoaderId = 'templateSetLoader';\n\n private readonly __storeLoaderId = 'storeLoader';\n\n private readonly __renderHeaderSubtitle = () => {\n const { data, lang, ns } = this;\n\n if (data) {\n let color = 'text-secondary';\n let date: string;\n let key: string;\n\n if (data.first_failed_transaction_date) {\n color = 'text-error';\n date = data.first_failed_transaction_date;\n key = 'subscription_failed';\n } else if (data.end_date) {\n date = data.end_date;\n const hasEnded = new Date(data.end_date).getTime() > Date.now();\n key = hasEnded ? 'subscription_will_be_cancelled' : 'subscription_cancelled';\n } else if (!data.is_active) {\n date = '';\n key = 'subscription_inactive';\n } else if (new Date(data.start_date) > new Date()) {\n date = data.start_date;\n key = 'subscription_will_be_active';\n } else {\n date = data.next_transaction_date;\n key = 'subscription_active';\n }\n\n const text = html`\n <foxy-i18n\n data-testid=\"header-subtitle\"\n options=${JSON.stringify({ date })}\n class=${color}\n lang=${lang}\n key=${key}\n ns=${ns}\n >\n </foxy-i18n>\n `;\n\n if (data.first_failed_transaction_date) {\n return html`\n <span id=\"status\" class=\"flex items-center space-x-xs ${color}\">\n ${text}<iron-icon icon=\"icons:info-outline\" class=\"icon-inline\"></iron-icon>\n </span>\n <vcf-tooltip for=\"status\" position=\"bottom\">\n <span class=\"text-s\">${data.error_message}</span>\n </vcf-tooltip>\n `;\n }\n\n return text;\n }\n\n return html`<x-skeleton class=\"w-full\" variant=\"static\"> </x-skeleton>`;\n };\n\n private readonly __renderHeaderTitle = (\n currency: string | undefined,\n currencyDisplay: string | undefined\n ) => {\n const { data, lang, ns } = this;\n\n if (data) {\n const frequency = parseFrequency(data.frequency);\n const transactionTemplate = this.__transactionTemplate;\n const total = transactionTemplate?.total_order;\n\n if (typeof currency !== 'string') return html`--`;\n\n return html`\n <foxy-i18n\n data-testid=\"header-title\"\n options=${JSON.stringify({\n ...frequency,\n amount: `${total} ${currency}`,\n currencyDisplay,\n })}\n lang=${lang}\n key=\"price_${data.frequency === '.5m' ? 'twice_a_month' : 'recurring'}\"\n ns=${ns}\n >\n </foxy-i18n>\n `;\n }\n\n return html`<x-skeleton class=\"w-full\" variant=\"static\"> </x-skeleton>`;\n };\n\n private readonly __renderHeader = (\n currencyCode: string | undefined,\n currencyDisplay: string | undefined\n ) => {\n return html`\n <div data-testid=\"header\" class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('header:before')}\n <div class=\"leading-xs text-xxl font-medium truncate\">\n ${this.__renderHeaderTitle(currencyCode, currencyDisplay)}\n </div>\n <div class=\"leading-xs text-l\">${this.__renderHeaderSubtitle()}</div>\n ${this.renderTemplateOrSlot('header:after')}\n </div>\n `;\n };\n\n private readonly __renderItemsActions = () => {\n return html`\n <div class=\"flex\" data-testid=\"items:actions\">\n ${this.renderTemplateOrSlot('items:actions:before')}\n\n <foxy-i18n\n data-testid=\"items:actions-label\"\n class=\"flex-1 text-s font-medium text-secondary\"\n lang=${this.lang}\n key=\"item_plural\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${this.renderTemplateOrSlot('items:actions:after')}\n </div>\n `;\n };\n\n private readonly __renderItems = () => {\n let itemsHref: string | undefined;\n\n try {\n const cart = this.__transactionTemplate;\n const url = new URL(cart?._links['fx:items'].href ?? '');\n url.searchParams.set('zoom', 'item_options');\n itemsHref = url.toString();\n } catch {\n itemsHref = undefined;\n }\n\n return html`\n <div data-testid=\"items\" class=\"space-y-xs sm-col-span-2\">\n ${this.hiddenSelector.matches('items:actions', true) ? '' : this.__renderItemsActions()}\n\n <foxy-internal-async-list-control\n first=${ifDefined(itemsHref)}\n limit=\"5\"\n infer=\"items\"\n item=\"foxy-item-card\"\n >\n </foxy-internal-async-list-control>\n </div>\n `;\n };\n\n private readonly __renderEndDate = () => {\n const { data, lang, ns } = this;\n\n return html`\n <div data-testid=\"end-date\">\n ${this.renderTemplateOrSlot('end-date:before')}\n\n <x-group frame>\n <foxy-i18n key=\"end_date\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n <foxy-internal-calendar\n start=${ifDefined(data?.end_date?.substr(0, 10))}\n value=${ifDefined(data?.end_date)}\n lang=${lang}\n ?readonly=${!this.__isEndDateEditable}\n ?disabled=${this.disabledSelector.matches('end-date', true)}\n .checkAvailability=${this.__checkEndDateAvailability}\n @change=${(evt: Event) => {\n const target = evt.target as InternalCalendar;\n this.edit({ end_date: target.value });\n }}\n >\n </foxy-internal-calendar>\n </x-group>\n\n ${this.renderTemplateOrSlot('end-date:after')}\n </div>\n `;\n };\n\n private readonly __checkNextTransactionDateAvailability = (date: Date) => {\n const { settings, data: subscription } = this;\n\n if (settings && subscription) {\n const value = serializeDate(date);\n return isNextTransactionDate({ value, settings, subscription });\n }\n\n return date.getTime() >= Date.now();\n };\n\n private readonly __checkStartDateAvailability = (date: Date) => {\n return date.getTime() >= Date.now();\n };\n\n private readonly __checkEndDateAvailability = (date: Date) => {\n const tomorrow = new Date();\n tomorrow.setDate(tomorrow.getDate() + 1);\n tomorrow.setHours(0, 0, 0, 0);\n return date.getTime() >= tomorrow.getTime();\n };\n\n private readonly __renderStartDate = () => {\n const { data, lang, ns } = this;\n\n return html`\n <div data-testid=\"start-date\">\n ${this.renderTemplateOrSlot('start-date:before')}\n\n <x-group frame>\n <foxy-i18n key=\"start_date\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n <foxy-internal-calendar\n start=${ifDefined(data?.start_date.substr(0, 10))}\n value=${ifDefined(data?.start_date)}\n lang=${lang}\n ?readonly=${!this.__isStartDateEditable}\n ?disabled=${this.disabledSelector.matches('start-date', true)}\n .checkAvailability=${this.__checkStartDateAvailability}\n @change=${(evt: Event) => {\n const target = evt.target as InternalCalendar;\n this.edit({ start_date: target.value });\n }}\n >\n </foxy-internal-calendar>\n </x-group>\n\n ${this.renderTemplateOrSlot('start-date:after')}\n </div>\n `;\n };\n\n private readonly __renderNextTransactionDate = () => {\n const { data, lang, ns } = this;\n const isActive = !!data?.is_active;\n\n return html`\n <div data-testid=\"next-transaction-date\">\n ${this.renderTemplateOrSlot('next-transaction-date:before')}\n\n <x-group frame>\n <foxy-i18n key=\"next_transaction_date\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n <foxy-internal-calendar\n start=${ifDefined(data?.next_transaction_date.substr(0, 10))}\n value=${ifDefined(data?.next_transaction_date)}\n lang=${lang}\n ?readonly=${!isActive || this.readonlySelector.matches('next-transaction-date', true)}\n ?disabled=${!data || this.disabledSelector.matches('next-transaction-date', true)}\n .checkAvailability=${this.__checkNextTransactionDateAvailability}\n @change=${(evt: Event) => {\n const target = evt.target as InternalCalendar;\n this.edit({ next_transaction_date: target.value });\n }}\n >\n </foxy-internal-calendar>\n </x-group>\n\n ${this.renderTemplateOrSlot('next-transaction-date:after')}\n </div>\n `;\n };\n\n private readonly __renderFrequencyAsDropdown = () => {\n const { data } = this;\n const active = !!data?.is_active;\n const items = this.__frequencies.map(v => ({\n label: this.t(v === '.5m' ? 'twice_a_month' : 'frequency', parseFrequency(v)),\n value: v,\n }));\n\n return html`\n <vaadin-combo-box\n item-value-path=\"value\"\n item-label-path=\"label\"\n data-testid=\"frequency\"\n ?disabled=${!data || this.disabledSelector.matches('frequency', true)}\n ?readonly=${data && (!active || this.readonlySelector.matches('frequency', true))}\n class=\"w-full\"\n label=${this.t('frequency_label').toString()}\n value=${ifDefined(this.form.frequency)}\n .items=${items}\n @change=${(evt: Event) => {\n this.edit({ frequency: (evt.target as HTMLInputElement).value });\n }}\n >\n </vaadin-combo-box>\n `;\n };\n\n private readonly __renderFrequencyAsRadioList = () => {\n const { data, lang, ns } = this;\n\n return html`\n <x-group frame>\n <foxy-i18n key=\"frequency_label\" ns=${ns} lang=${lang} slot=\"header\"></foxy-i18n>\n\n <x-choice\n default-custom-value=\"1d\"\n data-testid=\"frequency\"\n type=\"frequency\"\n ns=${ns}\n ?custom=${this.settings === null}\n .items=${this.__frequencies}\n .value=${this.form.frequency ?? null}\n ?disabled=${!data || this.disabledSelector.matches('frequency', true)}\n ?readonly=${data && (!data.is_active || this.readonlySelector.matches('frequency', true))}\n @change=${(evt: Event) => {\n this.edit({ frequency: (evt.target as HTMLInputElement).value });\n }}\n >\n ${this.__frequencies.map(\n frequency => html`\n <foxy-i18n\n options=${JSON.stringify(parseFrequency(frequency))}\n slot=\"${frequency}-label\"\n lang=${lang}\n key=${frequency === '.5m' ? 'twice_a_month' : 'frequency'}\n ns=${ns}\n >\n </foxy-i18n>\n `\n )}\n </x-choice>\n </x-group>\n `;\n };\n\n private readonly __renderFrequency = () => {\n return html`\n <div class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('frequency:before')}\n ${this.settings && this.__frequencies.length > 4\n ? this.__renderFrequencyAsDropdown()\n : this.__renderFrequencyAsRadioList()}\n ${this.renderTemplateOrSlot('frequency:after')}\n </div>\n `;\n };\n\n private readonly __renderCustomer = () => {\n const customerHref = this.data?._links['fx:customer'].href;\n const customerPageHref = customerHref ? this.getCustomerPageHref?.(customerHref) : void 0;\n\n return html`\n <div data-testid=\"customer\" class=\"sm-col-span-2\">\n ${this.renderTemplateOrSlot('customer:before')}\n\n <foxy-i18n infer=\"customer\" class=\"block text-s font-medium leading-xs mb-xs\" key=\"label\">\n </foxy-i18n>\n\n <a\n class=${classMap({\n 'block rounded transition-colors': true,\n 'ring-1 ring-contrast-10': !customerPageHref,\n 'cursor-pointer bg-contrast-5 hover-bg-contrast-10': !!customerPageHref,\n 'focus-outline-none focus-ring-2 focus-ring-primary-50': !!customerPageHref,\n })}\n style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n href=${ifDefined(customerPageHref)}\n >\n <foxy-customer-card infer=\"customer\" href=${ifDefined(customerHref)}></foxy-customer-card>\n </a>\n\n ${this.renderTemplateOrSlot('customer:after')}\n </div>\n `;\n };\n\n get hiddenSelector(): BooleanSelector {\n return new BooleanSelector(`items:pagination:card:autorenew-icon ${super.hiddenSelector}`);\n }\n\n renderBody(): TemplateResult {\n let transactionsHref: string | undefined;\n\n try {\n const url = new URL(this.data?._links['fx:transactions'].href ?? '');\n url.searchParams.set('order', 'transaction_date desc');\n url.searchParams.set('zoom', 'items');\n transactionsHref = url.toString();\n } catch {\n transactionsHref = undefined;\n }\n\n const currencyDisplay = this.__store?.use_international_currency_symbol ? 'code' : 'symbol';\n const cart = this.__transactionTemplate;\n\n let currencyCode: string | null = null;\n\n if (cart?.currency_code) {\n currencyCode = cart.currency_code;\n } else {\n const allLocaleCodes = this.__localeCodesHelper;\n const localeCode = (this.__templateSet ?? this.__defaultTemplateSet)?.locale_code;\n const localeInfo = localeCode ? allLocaleCodes?.values[localeCode] : void 0;\n\n if (localeInfo) currencyCode = /Currency: ([A-Z]{3})/g.exec(localeInfo)?.[1] ?? null;\n }\n\n return html`\n <div class=\"relative grid grid-cols-1 sm-grid-cols-2 gap-l\">\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__transactionTemplateHref)}\n id=${this.__transactionTemplateLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__defaultTemplateSetHref)}\n id=${this.__defaultTemplateSetLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__localeCodesHelperHref)}\n id=${this.__localeCodesHelperLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__templateSetHref)}\n id=${this.__templateSetLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.__storeHref)}\n id=${this.__storeLoaderId}\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n\n ${this.hiddenSelector.matches('header', true)\n ? ''\n : this.__renderHeader(currencyCode ?? void 0, currencyDisplay)}\n ${this.hiddenSelector.matches('customer', true) ? '' : this.__renderCustomer()}\n ${this.hiddenSelector.matches('items', true) ? '' : this.__renderItems()}\n ${this.__isFrequencyVisible ? this.__renderFrequency() : ''}\n ${this.__isStartDateVisible ? this.__renderStartDate() : ''}\n ${this.__isNextTransactionDateVisible ? this.__renderNextTransactionDate() : ''}\n ${this.__isEndDateVisible ? this.__renderEndDate() : ''}\n\n <foxy-internal-number-control\n suffix=${ifDefined(currencyCode ?? void 0)}\n infer=\"past-due-amount\"\n class=\"sm-col-span-2\"\n min=\"0\"\n >\n </foxy-internal-number-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(this.data?._links['fx:attributes']?.href)}\n class=\"sm-col-span-2\"\n infer=\"attributes\"\n limit=\"5\"\n form=\"foxy-attribute-form\"\n item=\"foxy-attribute-card\"\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(transactionsHref)}\n class=\"sm-col-span-2\"\n infer=\"transactions\"\n limit=\"5\"\n item=\"foxy-transaction-card\"\n hide-delete-button\n .getPageHref=${this.getTransactionPageHref}\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-timestamps-control infer=\"timestamps\" class=\"sm-col-span-2\">\n </foxy-internal-timestamps-control>\n </div>\n `;\n }\n\n private get __transactionTemplateHref() {\n type DataWithEmbeds = Resource<Rels.Subscription, { zoom: 'transaction_template' }>;\n type Embed = Resource<Rels.TransactionTemplate>;\n\n const data = this.data as DataWithEmbeds | null;\n const embed = data?._embedded?.['fx:transaction_template'] as Embed | undefined;\n\n return embed ? void 0 : data?._links['fx:transaction_template'].href;\n }\n\n private get __defaultTemplateSetHref() {\n const templateSetUri = this.__transactionTemplate?.template_set_uri;\n\n if (templateSetUri === '') {\n try {\n const url = new URL(this.__store?._links['fx:template_sets'].href ?? '');\n url.searchParams.set('code', 'DEFAULT');\n return url.toString();\n } catch {\n //\n }\n }\n }\n\n private get __localeCodesHelperHref() {\n if (this.__defaultTemplateSetHref || this.__templateSetHref) {\n return this.localeCodes ?? void 0;\n }\n }\n\n private get __templateSetHref() {\n const cart = this.__transactionTemplate;\n if (!cart?.currency_code) return cart?.template_set_uri || void 0;\n }\n\n private get __storeHref() {\n return this.data?._links['fx:store']?.href;\n }\n\n private get __transactionTemplate() {\n type DataWithEmbeds = Resource<Rels.Subscription, { zoom: 'transaction_template' }>;\n type Loader = NucleonElement<Resource<Rels.TransactionTemplate>>;\n type Embed = Resource<Rels.TransactionTemplate>;\n\n const data = this.data as DataWithEmbeds | null;\n const embed = data?._embedded?.['fx:transaction_template'] as Embed | undefined;\n const selector = `#${this.__transactionTemplateLoaderId}`;\n\n return embed ?? this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __defaultTemplateSet() {\n type Loader = NucleonElement<Resource<Rels.TemplateSets>>;\n const selector = `#${this.__defaultTemplateSetLoaderId}`;\n const loader = this.renderRoot.querySelector<Loader>(selector);\n return loader?.data?._embedded['fx:template_sets'][0] ?? null;\n }\n\n private get __localeCodesHelper() {\n type Loader = NucleonElement<Resource<Rels.LocaleCodes>>;\n const selector = `#${this.__localeCodesHelperLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __templateSet() {\n type Loader = NucleonElement<Resource<Rels.TemplateSet>>;\n const selector = `#${this.__templateSetLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __store() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n const selector = `#${this.__storeLoaderId}`;\n return this.renderRoot.querySelector<Loader>(selector)?.data ?? null;\n }\n\n private get __isNextTransactionDateVisible() {\n if (this.hiddenSelector.matches('next-transaction-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now()) return false;\n if (this.data.is_active === false) return false;\n if (this.settings === null) return true;\n\n const rules = this.settings.subscriptions.allow_next_date_modification;\n return !!getNextTransactionDateConstraints(this.data, rules);\n }\n\n private get __isStartDateVisible() {\n if (this.hiddenSelector.matches('start-date', true)) return false;\n return this.__isNextTransactionDateVisible;\n }\n\n private get __isEndDateVisible() {\n if (this.hiddenSelector.matches('end-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now()) return false;\n if (this.data.is_active === false) return false;\n return !this.settings;\n }\n\n private get __isStartDateEditable() {\n if (this.readonlySelector.matches('start-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date) <= new Date()) return false;\n if (this.data.is_active === false) return false;\n if (this.data.start_date && new Date(this.data.start_date) <= new Date()) return false;\n\n return this.settings === null;\n }\n\n private get __isEndDateEditable() {\n if (this.readonlySelector.matches('end-date', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date) <= new Date()) return false;\n if (this.data.is_active === false) return false;\n\n return this.settings === null;\n }\n\n private get __isFrequencyVisible() {\n if (this.hiddenSelector.matches('frequency', true)) return false;\n if (this.data === null) return false;\n if (this.data.end_date && new Date(this.data.end_date).getTime() <= Date.now()) return false;\n if (this.data.is_active === false) return false;\n if (this.settings === null) return true;\n\n const allowedFrequencies = getAllowedFrequencies({\n subscription: this.data,\n settings: this.settings,\n });\n\n return !allowedFrequencies.next().done;\n }\n\n private get __frequencies() {\n if (!this.settings || !this.data) return ['.5m', '1m', '1y'];\n\n const allowedFrequencies = getAllowedFrequencies({\n subscription: this.data,\n settings: this.settings,\n });\n\n return Array.from(allowedFrequencies);\n }\n}\n"]}
|
|
@@ -9,13 +9,11 @@ import '../../internal/InternalNumberControl/index';
|
|
|
9
9
|
import '../../internal/InternalCalendar/index';
|
|
10
10
|
import '../../internal/InternalSandbox/index';
|
|
11
11
|
import '../../internal/InternalForm/index';
|
|
12
|
-
import '../CancellationForm/index';
|
|
13
12
|
import '../TransactionCard/index';
|
|
14
13
|
import '../NucleonElement/index';
|
|
15
14
|
import '../AttributeCard/index';
|
|
16
15
|
import '../AttributeForm/index';
|
|
17
16
|
import '../CustomerCard/index';
|
|
18
|
-
import '../FormDialog/index';
|
|
19
17
|
import '../ItemCard/index';
|
|
20
18
|
import '../I18n/index';
|
|
21
19
|
import { SubscriptionForm } from './SubscriptionForm';
|
|
@@ -9,22 +9,14 @@ import "../../internal/InternalNumberControl/index.js";
|
|
|
9
9
|
import "../../internal/InternalCalendar/index.js";
|
|
10
10
|
import "../../internal/InternalSandbox/index.js";
|
|
11
11
|
import "../../internal/InternalForm/index.js";
|
|
12
|
-
import "../CancellationForm/index.js";
|
|
13
12
|
import "../TransactionCard/index.js";
|
|
14
13
|
import "../NucleonElement/index.js";
|
|
15
14
|
import "../AttributeCard/index.js";
|
|
16
15
|
import "../AttributeForm/index.js";
|
|
17
16
|
import "../CustomerCard/index.js";
|
|
18
|
-
import "../FormDialog/index.js";
|
|
19
17
|
import "../ItemCard/index.js";
|
|
20
18
|
import "../I18n/index.js";
|
|
21
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles';
|
|
22
19
|
import { SubscriptionForm } from "./SubscriptionForm.js";
|
|
23
|
-
/** https://github.com/vaadin-component-factory/vcf-tooltip/issues/6 */
|
|
24
|
-
registerStyles('vcf-tooltip', css `:host([hidden]) [part='container']{
|
|
25
|
-
display:none !important;
|
|
26
|
-
}
|
|
27
|
-
`);
|
|
28
20
|
customElements.define('foxy-subscription-form', SubscriptionForm);
|
|
29
21
|
export { SubscriptionForm };
|
|
30
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/SubscriptionForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,0BAA0B,CAAC;AAClC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAE5B,2DAAwD;AACxD,0DAAuD;AACvD,uDAAoD;AACpD,kDAA+C;AAC/C,iDAA8C;AAC9C,8CAA2C;AAE3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/SubscriptionForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,0BAA0B,CAAC;AAClC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAE5B,2DAAwD;AACxD,0DAAuD;AACvD,uDAAoD;AACpD,kDAA+C;AAC/C,iDAA8C;AAC9C,8CAA2C;AAE3C,qCAAkC;AAClC,oCAAiC;AACjC,mCAAgC;AAChC,mCAAgC;AAChC,kCAA+B;AAC/B,8BAA2B;AAC3B,0BAAuB;AAEvB,OAAO,EAAE,gBAAgB,EAAE,8BAA2B;AAEtD,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import '@vaadin-component-factory/vcf-tooltip';\nimport '@vaadin/vaadin-combo-box';\nimport '@vaadin/vaadin-button';\nimport '@polymer/iron-icons';\nimport '@polymer/iron-icon';\n\nimport '../../internal/InternalTimestampsControl/index';\nimport '../../internal/InternalAsyncListControl/index';\nimport '../../internal/InternalNumberControl/index';\nimport '../../internal/InternalCalendar/index';\nimport '../../internal/InternalSandbox/index';\nimport '../../internal/InternalForm/index';\n\nimport '../TransactionCard/index';\nimport '../NucleonElement/index';\nimport '../AttributeCard/index';\nimport '../AttributeForm/index';\nimport '../CustomerCard/index';\nimport '../ItemCard/index';\nimport '../I18n/index';\n\nimport { SubscriptionForm } from './SubscriptionForm';\n\ncustomElements.define('foxy-subscription-form', SubscriptionForm);\n\nexport { SubscriptionForm };\n"]}
|
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
import type { ScopedElementsMap } from '@open-wc/scoped-elements';
|
|
2
1
|
import type { Data, Templates } from './types';
|
|
3
2
|
import type { TemplateResult } from 'lit-html';
|
|
4
3
|
import type { NucleonV8N } from '../NucleonElement/types';
|
|
4
|
+
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
5
5
|
import { InternalForm } from '../../internal/InternalForm/InternalForm';
|
|
6
6
|
declare const Base: typeof InternalForm & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
7
7
|
defaultNS: string;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
/**
|
|
10
10
|
* Form element for `fx:user` resources.
|
|
11
11
|
*
|
|
12
12
|
* @slot first-name:before – new in v1.22.0
|
|
13
13
|
* @slot first-name:after – new in v1.22.0
|
|
14
|
+
*
|
|
14
15
|
* @slot last-name:before – new in v1.22.0
|
|
15
16
|
* @slot last-name:after – new in v1.22.0
|
|
17
|
+
*
|
|
16
18
|
* @slot email:before – new in v1.22.0
|
|
17
19
|
* @slot email:after – new in v1.22.0
|
|
20
|
+
*
|
|
18
21
|
* @slot phone:before – new in v1.22.0
|
|
19
22
|
* @slot phone:after – new in v1.22.0
|
|
23
|
+
*
|
|
20
24
|
* @slot role:before – new in v1.22.0
|
|
21
25
|
* @slot role:after – new in v1.22.0
|
|
26
|
+
*
|
|
27
|
+
* @slot timestamps:before – new in v1.27.0
|
|
28
|
+
* @slot timestamps:after – new in v1.27.0
|
|
29
|
+
*
|
|
22
30
|
* @slot create:before – new in v1.22.0
|
|
23
31
|
* @slot create:after – new in v1.22.0
|
|
32
|
+
*
|
|
24
33
|
* @slot delete:before – new in v1.22.0
|
|
25
34
|
* @slot delete:after – new in v1.22.0
|
|
26
35
|
*
|
|
@@ -28,18 +37,12 @@ declare const Base: typeof InternalForm & import("lit-element").Constructor<impo
|
|
|
28
37
|
* @since 1.3.0
|
|
29
38
|
*/
|
|
30
39
|
export declare class UserForm extends Base<Data> {
|
|
31
|
-
static get scopedElements(): ScopedElementsMap;
|
|
32
40
|
static get v8n(): NucleonV8N<Data>;
|
|
33
41
|
templates: Templates;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
42
|
+
private readonly __roleGetValue;
|
|
43
|
+
private readonly __roleSetValue;
|
|
44
|
+
private readonly __roleOptions;
|
|
45
|
+
get readonlySelector(): BooleanSelector;
|
|
36
46
|
renderBody(): TemplateResult;
|
|
37
|
-
private __renderField;
|
|
38
|
-
private __renderRole;
|
|
39
|
-
private __renderAction;
|
|
40
|
-
private __getErrorMessage;
|
|
41
|
-
private __handleActionClick;
|
|
42
|
-
private __handleConfirmHide;
|
|
43
|
-
private __handleKeyDown;
|
|
44
47
|
}
|
|
45
48
|
export {};
|