@foxy.io/elements 1.41.0-beta.1 → 1.41.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 +5 -5
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.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-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-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- 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-experimental-add-to-cart-builder.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-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 +1 -1
- 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 +1 -1
- 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-embed.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 +2 -2
- package/dist/cdn/foxy-reports-table.js +6 -6
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-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 -1
- 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-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-card.js +1 -1
- package/dist/cdn/foxy-user-invitation-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-097635e6.js → shared-0179fbaa.js} +1 -1
- package/dist/cdn/{shared-c1e86ea4.js → shared-12ea5def.js} +1 -1
- package/dist/cdn/{shared-f1033d78.js → shared-1522e7b0.js} +3 -3
- package/dist/cdn/{shared-6be00444.js → shared-15f46bcc.js} +1 -1
- package/dist/cdn/{shared-243456aa.js → shared-1cd9967e.js} +1 -1
- package/dist/cdn/{shared-8b0f00fa.js → shared-2931ccbe.js} +1 -1
- package/dist/cdn/{shared-d807cb20.js → shared-29b0ef56.js} +1 -1
- package/dist/cdn/{shared-3fcf4feb.js → shared-2be606c3.js} +1 -1
- package/dist/cdn/{shared-8ef0ca65.js → shared-2fe84d72.js} +1 -1
- package/dist/cdn/{shared-360d6a20.js → shared-30829c7f.js} +1 -1
- package/dist/cdn/{shared-697d44e6.js → shared-313956af.js} +1 -1
- package/dist/cdn/{shared-63eef674.js → shared-32f04dd0.js} +1 -1
- package/dist/cdn/{shared-a03facdf.js → shared-34cbd863.js} +1 -1
- package/dist/cdn/shared-35dbfac1.js +1 -0
- package/dist/cdn/{shared-f9ac8763.js → shared-3ad093b5.js} +1 -1
- package/dist/cdn/{shared-11351c00.js → shared-3c0dcb9e.js} +2 -2
- package/dist/cdn/{shared-2d596f72.js → shared-3f381f99.js} +1 -1
- package/dist/cdn/{shared-84eb85dd.js → shared-43c39c6f.js} +1 -1
- package/dist/cdn/{shared-e41fced3.js → shared-4507220f.js} +1 -1
- package/dist/cdn/{shared-57a179b3.js → shared-49fef994.js} +1 -1
- package/dist/cdn/{shared-495860b4.js → shared-504d2acb.js} +1 -1
- package/dist/cdn/{shared-3556f4b7.js → shared-5231970e.js} +1 -1
- package/dist/cdn/{shared-6957b8e6.js → shared-535d1ec6.js} +1 -1
- package/dist/cdn/{shared-1c355fac.js → shared-54031a26.js} +2 -2
- package/dist/cdn/{shared-29f60d2f.js → shared-58a50b35.js} +5 -5
- package/dist/cdn/{shared-37348820.js → shared-58c0c5cc.js} +1 -1
- package/dist/cdn/{shared-c25538f1.js → shared-58f1f368.js} +2 -2
- package/dist/cdn/{shared-6199cae2.js → shared-59657e70.js} +1 -1
- package/dist/cdn/{shared-cf12f33b.js → shared-5988dd30.js} +1 -1
- package/dist/cdn/{shared-83c5e004.js → shared-619235ab.js} +1 -1
- package/dist/cdn/{shared-be442f26.js → shared-62a913ef.js} +1 -1
- package/dist/cdn/{shared-315d7620.js → shared-65763e6f.js} +1 -1
- package/dist/cdn/{shared-88220d9e.js → shared-678878ae.js} +1 -1
- package/dist/cdn/{shared-f69aacbc.js → shared-69943b4f.js} +1 -1
- package/dist/cdn/{shared-c46affa4.js → shared-72536261.js} +1 -1
- package/dist/cdn/{shared-4d32d19e.js → shared-72ebbdcd.js} +1 -1
- package/dist/cdn/{shared-230dee11.js → shared-75f0b4ce.js} +1 -1
- package/dist/cdn/{shared-9a64bf35.js → shared-7f25f727.js} +1 -1
- package/dist/cdn/{shared-bd5285ff.js → shared-8697a27e.js} +1 -1
- package/dist/cdn/{shared-35a49192.js → shared-86d308bf.js} +1 -1
- package/dist/cdn/{shared-86e9c57a.js → shared-8a380d5b.js} +1 -1
- package/dist/cdn/{shared-a587fd4b.js → shared-8ae33bf4.js} +1 -1
- package/dist/cdn/{shared-7097e2e1.js → shared-90a27f17.js} +1 -1
- package/dist/cdn/{shared-109ec474.js → shared-92f7ee94.js} +1 -1
- package/dist/cdn/{shared-67f73b81.js → shared-968df92b.js} +1 -1
- package/dist/cdn/{shared-c18f681b.js → shared-a146c6a5.js} +1 -1
- package/dist/cdn/{shared-0df46275.js → shared-a477b90e.js} +1 -1
- package/dist/cdn/{shared-f989c70e.js → shared-a4a847e4.js} +1 -1
- package/dist/cdn/{shared-8eeddc22.js → shared-a510a176.js} +1 -1
- package/dist/cdn/{shared-edeeb089.js → shared-acbcad2e.js} +1 -1
- package/dist/cdn/{shared-888018de.js → shared-be50c355.js} +1 -1
- package/dist/cdn/{shared-048d5cae.js → shared-c003fbf3.js} +1 -1
- package/dist/cdn/{shared-7dc9c80b.js → shared-c19d73fe.js} +1 -1
- package/dist/cdn/{shared-47d95cdd.js → shared-c5025eca.js} +1 -1
- package/dist/cdn/{shared-8b25a098.js → shared-c71fb90f.js} +1 -1
- package/dist/cdn/{shared-21e68b72.js → shared-cfea6000.js} +1 -1
- package/dist/cdn/{shared-f1a70f51.js → shared-d298bb95.js} +1 -1
- package/dist/cdn/{shared-43637d69.js → shared-df97fdc7.js} +1 -1
- package/dist/cdn/{shared-b65d169b.js → shared-e69c94bd.js} +1 -1
- package/dist/cdn/{shared-864ff856.js → shared-ec013722.js} +1 -1
- package/dist/cdn/{shared-18e3b778.js → shared-ee4757df.js} +1 -1
- package/dist/cdn/{shared-e3421ca1.js → shared-ef4d09da.js} +1 -1
- package/dist/cdn/{shared-1100bca8.js → shared-f2f81cda.js} +1 -1
- package/dist/cdn/{shared-6683daed.js → shared-fe56bcdb.js} +1 -1
- package/dist/cdn/{shared-77132fe8.js → shared-ffa49371.js} +1 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +1 -0
- package/dist/cdn/translations/coupon-form/en.json +15 -0
- package/dist/cdn/translations/transaction/en.json +60 -35
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +28 -8
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +16 -1
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.d.ts +2 -0
- package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js +22 -4
- package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.js +5 -3
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/index.d.ts +1 -1
- package/dist/elements/public/Transaction/index.js +1 -1
- package/dist/elements/public/Transaction/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +16 -14
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
- package/dist/mixins/themeable.js +12 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-3661a086.js +0 -1
- package/dist/cdn/translations/country/zh-cn.json +0 -248
- package/dist/cdn/translations/country/zh-hk.json +0 -245
- package/dist/cdn/translations/customer-portal/zh-hk.json +0 -1182
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.d.ts +0 -10
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +0 -60
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts +0 -6
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js +0 -8
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PropertyDeclarations, TemplateResult } from 'lit-element';
|
|
2
|
-
import { InternalControl } from '../../../../internal/InternalControl/InternalControl';
|
|
3
|
-
export declare class InternalTransactionPostActionControl extends InternalControl {
|
|
4
|
-
static get properties(): PropertyDeclarations;
|
|
5
|
-
theme: string | null;
|
|
6
|
-
href: string | null;
|
|
7
|
-
private __state;
|
|
8
|
-
renderControl(): TemplateResult;
|
|
9
|
-
private __submit;
|
|
10
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-element';
|
|
2
|
-
import { InternalControl } from "../../../../internal/InternalControl/InternalControl.js";
|
|
3
|
-
import { NucleonElement } from "../../../NucleonElement/NucleonElement.js";
|
|
4
|
-
export class InternalTransactionPostActionControl extends InternalControl {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.theme = null;
|
|
8
|
-
this.href = null;
|
|
9
|
-
this.__state = 'idle';
|
|
10
|
-
}
|
|
11
|
-
static get properties() {
|
|
12
|
-
return {
|
|
13
|
-
...super.properties,
|
|
14
|
-
__state: { type: String },
|
|
15
|
-
theme: { type: String },
|
|
16
|
-
href: { type: String },
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
renderControl() {
|
|
20
|
-
const state = this.__state;
|
|
21
|
-
const theme = state === 'fail' ? 'error' : state === 'idle' ? this.theme : '';
|
|
22
|
-
return html `
|
|
23
|
-
<foxy-internal-confirm-dialog
|
|
24
|
-
header="header"
|
|
25
|
-
infer="confirm"
|
|
26
|
-
id="confirm"
|
|
27
|
-
@hide=${(evt) => !evt.detail.cancelled && this.__submit()}
|
|
28
|
-
>
|
|
29
|
-
</foxy-internal-confirm-dialog>
|
|
30
|
-
|
|
31
|
-
<vaadin-button
|
|
32
|
-
theme="${theme} tertiary-inline"
|
|
33
|
-
?disabled=${state === 'busy' || this.disabled}
|
|
34
|
-
@click=${(evt) => {
|
|
35
|
-
const confirm = this.renderRoot.querySelector('#confirm');
|
|
36
|
-
confirm.show(evt.currentTarget);
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<foxy-i18n key=${state} infer=""></foxy-i18n>
|
|
40
|
-
</vaadin-button>
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
async __submit() {
|
|
44
|
-
var _a;
|
|
45
|
-
if (this.__state === 'busy')
|
|
46
|
-
return;
|
|
47
|
-
try {
|
|
48
|
-
this.__state = 'busy';
|
|
49
|
-
const api = new NucleonElement.API(this);
|
|
50
|
-
const response = await api.fetch((_a = this.href) !== null && _a !== void 0 ? _a : '', { method: 'POST' });
|
|
51
|
-
this.__state = response.ok ? 'idle' : 'fail';
|
|
52
|
-
if (response.ok)
|
|
53
|
-
this.dispatchEvent(new CustomEvent('done'));
|
|
54
|
-
}
|
|
55
|
-
catch (_b) {
|
|
56
|
-
this.__state = 'fail';
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=InternalTransactionPostActionControl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InternalTransactionPostActionControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,IAAI,EAAkB,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,gEAA6D;AAEvF,OAAO,EAAE,cAAc,EAAE,kDAA+C;AAGxE,MAAM,OAAO,oCAAqC,SAAQ,eAAe;IAAzE;;QAUE,UAAK,GAAkB,IAAI,CAAC;QAE5B,SAAI,GAAkB,IAAI,CAAC;QAEnB,YAAO,GAAG,MAAM,CAAC;IA2C3B,CAAC;IAxDC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACvB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACvB,CAAC;IACJ,CAAC;IAQD,aAAa;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAE9E,OAAO,IAAI,CAAA;;;;;gBAKC,CAAC,GAAoB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,EAAE;;;;;iBAKjE,KAAK;oBACF,KAAK,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ;iBACpC,CAAC,GAAgB,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAA0B,CAAC;YACnF,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,aAA8B,CAAC,CAAC;QACnD,CAAC;;yBAEgB,KAAK;;KAEzB,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,QAAQ;;QACpB,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;YAAE,OAAO;QAEpC,IAAI;YACF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YAEtB,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,KAAK,OAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEtE,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7C,IAAI,QAAQ,CAAC,EAAE;gBAAE,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;SAC9D;QAAC,WAAM;YACN,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB;IACH,CAAC;CACF","sourcesContent":["import { PropertyDeclarations, html, TemplateResult } from 'lit-element';\nimport { InternalConfirmDialog } from '../../../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { InternalControl } from '../../../../internal/InternalControl/InternalControl';\nimport { DialogHideEvent } from '../../../../private/Dialog/DialogHideEvent';\nimport { NucleonElement } from '../../../NucleonElement/NucleonElement';\nimport { ButtonElement } from '@vaadin/vaadin-button';\n\nexport class InternalTransactionPostActionControl extends InternalControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __state: { type: String },\n theme: { type: String },\n href: { type: String },\n };\n }\n\n theme: string | null = null;\n\n href: string | null = null;\n\n private __state = 'idle';\n\n renderControl(): TemplateResult {\n const state = this.__state;\n const theme = state === 'fail' ? 'error' : state === 'idle' ? this.theme : '';\n\n return html`\n <foxy-internal-confirm-dialog\n header=\"header\"\n infer=\"confirm\"\n id=\"confirm\"\n @hide=${(evt: DialogHideEvent) => !evt.detail.cancelled && this.__submit()}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n theme=\"${theme} tertiary-inline\"\n ?disabled=${state === 'busy' || this.disabled}\n @click=${(evt: CustomEvent) => {\n const confirm = this.renderRoot.querySelector('#confirm') as InternalConfirmDialog;\n confirm.show(evt.currentTarget as ButtonElement);\n }}\n >\n <foxy-i18n key=${state} infer=\"\"></foxy-i18n>\n </vaadin-button>\n `;\n }\n\n private async __submit(): Promise<void> {\n if (this.__state === 'busy') return;\n\n try {\n this.__state = 'busy';\n\n const api = new NucleonElement.API(this);\n const response = await api.fetch(this.href ?? '', { method: 'POST' });\n\n this.__state = response.ok ? 'idle' : 'fail';\n if (response.ok) this.dispatchEvent(new CustomEvent('done'));\n } catch {\n this.__state = 'fail';\n }\n }\n}\n"]}
|
package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-button';
|
|
2
|
-
import '../../../../internal/InternalConfirmDialog/index';
|
|
3
|
-
import '../../../../internal/InternalControl/index';
|
|
4
|
-
import '../../../I18n/index';
|
|
5
|
-
import { InternalTransactionPostActionControl as Control } from './InternalTransactionPostActionControl';
|
|
6
|
-
export { Control as InternalTransactionPostActionControl };
|
package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-button';
|
|
2
|
-
import "../../../../internal/InternalConfirmDialog/index.js";
|
|
3
|
-
import "../../../../internal/InternalControl/index.js";
|
|
4
|
-
import "../../../I18n/index.js";
|
|
5
|
-
import { InternalTransactionPostActionControl as Control } from "./InternalTransactionPostActionControl.js";
|
|
6
|
-
customElements.define('foxy-internal-transaction-post-action-control', Control);
|
|
7
|
-
export { Control as InternalTransactionPostActionControl };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,6DAA0D;AAC1D,uDAAoD;AACpD,gCAA6B;AAE7B,OAAO,EAAE,oCAAoC,IAAI,OAAO,EAAE,kDAA+C;AAEzG,cAAc,CAAC,MAAM,CAAC,+CAA+C,EAAE,OAAO,CAAC,CAAC;AAEhF,OAAO,EAAE,OAAO,IAAI,oCAAoC,EAAE,CAAC","sourcesContent":["import '@vaadin/vaadin-button';\n\nimport '../../../../internal/InternalConfirmDialog/index';\nimport '../../../../internal/InternalControl/index';\nimport '../../../I18n/index';\n\nimport { InternalTransactionPostActionControl as Control } from './InternalTransactionPostActionControl';\n\ncustomElements.define('foxy-internal-transaction-post-action-control', Control);\n\nexport { Control as InternalTransactionPostActionControl };\n"]}
|