@foxy.io/elements 1.13.0-beta.3 → 1.14.0-beta.11
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/README.md +1 -1
- 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-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-cancellation-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-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.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 +18 -18
- package/dist/cdn/foxy-customer-portal.js +18 -15
- package/dist/cdn/foxy-customer.js +4 -4
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -0
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.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-query-builder.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-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +26 -9
- 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 -0
- package/dist/cdn/foxy-template-form.js +1 -0
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
- package/dist/cdn/{shared-b0b1d248.js → shared-05956f55.js} +1 -1
- package/dist/cdn/{shared-91a9e922.js → shared-05b473a7.js} +4 -4
- package/dist/cdn/shared-07134f93.js +14 -0
- package/dist/cdn/shared-0ced76a0.js +358 -0
- package/dist/cdn/{shared-a99dea97.js → shared-1177fd2a.js} +1 -1
- package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
- package/dist/cdn/shared-1761daef.js +15 -0
- package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
- package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/{shared-d9159fe1.js → shared-2b685624.js} +1 -1
- package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
- package/dist/cdn/shared-4168c6cd.js +1 -0
- package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
- package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
- package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
- package/dist/cdn/shared-59e44f29.js +1 -0
- package/dist/cdn/{shared-67157a25.js → shared-5d1314d7.js} +1 -1
- package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
- package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
- package/dist/cdn/shared-6b7602c7.js +1 -0
- package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
- package/dist/cdn/shared-70631d0a.js +1 -0
- package/dist/cdn/{shared-f2cf6cfb.js → shared-775b37f9.js} +1 -1
- package/dist/cdn/shared-8730c141.js +314 -0
- package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-f47647ac.js → shared-93f23978.js} +1 -1
- package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
- package/dist/cdn/shared-a46edf4b.js +1 -0
- package/dist/cdn/shared-a94b7271.js +1 -0
- package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
- package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
- package/dist/cdn/{shared-036a8b21.js → shared-bda600d6.js} +1 -1
- package/dist/cdn/{shared-b77179fd.js → shared-d3167239.js} +1 -1
- package/dist/cdn/shared-df573cea.js +12 -0
- package/dist/cdn/shared-e36452b9.js +1 -0
- package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
- package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
- package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
- package/dist/cdn/shared-f968379d.js +264 -0
- package/dist/cdn/{shared-145cc9eb.js → shared-fbeb1de3.js} +1 -1
- package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
- package/dist/cdn/translations/shared/en.json +94 -1
- package/dist/elements/private/Checkbox/Checkbox.d.ts +3 -1
- package/dist/elements/private/Checkbox/Checkbox.js +45 -12
- package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
- package/dist/elements/private/Choice/Choice.js +9 -9
- package/dist/elements/private/Choice/Choice.js.map +1 -1
- package/dist/elements/private/Group/Group.js +1 -1
- package/dist/elements/private/Group/Group.js.map +1 -1
- package/dist/elements/private/I18N/I18N.js +1 -1
- package/dist/elements/private/I18N/I18N.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +8 -4
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.d.ts +1 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js +17 -8
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +11 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +46 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +350 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/index.d.ts +9 -0
- package/dist/elements/public/EmailTemplateForm/index.js +11 -0
- package/dist/elements/public/EmailTemplateForm/index.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/types.d.ts +17 -0
- package/dist/elements/public/EmailTemplateForm/types.js +2 -0
- package/dist/elements/public/EmailTemplateForm/types.js.map +1 -0
- package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
- package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
- package/dist/elements/public/ItemsForm/private/Picture.d.ts +1 -0
- package/dist/elements/public/ItemsForm/private/Picture.js +2 -0
- package/dist/elements/public/ItemsForm/private/Picture.js.map +1 -1
- package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
- package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +12 -4
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js +8 -4
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +138 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +22 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js +157 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +88 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1343 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
- package/dist/elements/public/TemplateConfigForm/index.js +11 -0
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/types.d.ts +150 -0
- package/dist/elements/public/TemplateConfigForm/types.js +2 -0
- package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
- package/dist/elements/public/TemplateForm/TemplateForm.d.ts +45 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js +343 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -0
- package/dist/elements/public/TemplateForm/index.d.ts +9 -0
- package/dist/elements/public/TemplateForm/index.js +11 -0
- package/dist/elements/public/TemplateForm/index.js.map +1 -0
- package/dist/elements/public/TemplateForm/types.d.ts +17 -0
- package/dist/elements/public/TemplateForm/types.js +2 -0
- package/dist/elements/public/TemplateForm/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +3 -0
- package/dist/elements/public/index.defined.d.ts +3 -0
- package/dist/elements/public/index.defined.js +3 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +3 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +143 -24
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -7
- package/dist/cdn/shared-296637c5.js +0 -1
- package/dist/cdn/shared-4a990126.js +0 -1
- package/dist/cdn/shared-50744508.js +0 -15
- package/dist/cdn/shared-b98f88c9.js +0 -369
- package/dist/cdn/shared-bf09e011.js +0 -572
- package/dist/cdn/shared-c0161e6a.js +0 -1
- package/dist/cdn/shared-c1e0e11f.js +0 -1
- package/dist/cdn/shared-dbcffd8e.js +0 -1
- package/dist/cdn/shared-e21a2aac.js +0 -1
- package/dist/cdn/shared-e55b6bb7.js +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { css, html } from 'lit-element';
|
|
2
|
+
import { Choice, Group, PropertyTable } from "../../private/index.js";
|
|
3
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
4
|
+
import { ChoiceChangeEvent } from "../../private/events.js";
|
|
5
|
+
import { ConfigurableMixin } from "../../../mixins/configurable.js";
|
|
6
|
+
import { NucleonElement } from "../NucleonElement/NucleonElement.js";
|
|
7
|
+
import { ThemeableMixin } from "../../../mixins/themeable.js";
|
|
8
|
+
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
9
|
+
import { classMap } from "../../../utils/class-map.js";
|
|
10
|
+
import { live } from 'lit-html/directives/live';
|
|
11
|
+
const NS = 'template-form';
|
|
12
|
+
const Base = ScopedElementsMixin(ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS))));
|
|
13
|
+
/**
|
|
14
|
+
* Form element for creating or editing templates (`fx:cart_include_template`, `fx:checkout_template`, `fx:cart_template`).
|
|
15
|
+
*
|
|
16
|
+
* @slot description:before
|
|
17
|
+
* @slot description:after
|
|
18
|
+
*
|
|
19
|
+
* @slot content:before
|
|
20
|
+
* @slot content:after
|
|
21
|
+
*
|
|
22
|
+
* @slot timestamps:before
|
|
23
|
+
* @slot timestamps:after
|
|
24
|
+
*
|
|
25
|
+
* @slot create:before
|
|
26
|
+
* @slot create:after
|
|
27
|
+
*
|
|
28
|
+
* @slot delete:before
|
|
29
|
+
* @slot delete:after
|
|
30
|
+
*
|
|
31
|
+
* @element foxy-template-form
|
|
32
|
+
* @since 1.14.0
|
|
33
|
+
*/
|
|
34
|
+
export class TemplateForm extends Base {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.templates = {};
|
|
38
|
+
this.__cacheState = 'idle';
|
|
39
|
+
this.__contentChoice = 'default';
|
|
40
|
+
}
|
|
41
|
+
static get properties() {
|
|
42
|
+
return {
|
|
43
|
+
...super.properties,
|
|
44
|
+
__cacheState: { attribute: false },
|
|
45
|
+
__contentChoice: { attribute: false },
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get styles() {
|
|
49
|
+
return [
|
|
50
|
+
...super.styles,
|
|
51
|
+
css `#cached-content::part(input-field){
|
|
52
|
+
max-height:15em;
|
|
53
|
+
}
|
|
54
|
+
`,
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
static get scopedElements() {
|
|
58
|
+
return {
|
|
59
|
+
'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),
|
|
60
|
+
'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),
|
|
61
|
+
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
62
|
+
'foxy-i18n': customElements.get('foxy-i18n'),
|
|
63
|
+
'vaadin-text-field': customElements.get('vaadin-text-field'),
|
|
64
|
+
'vaadin-text-area': customElements.get('vaadin-text-area'),
|
|
65
|
+
'vaadin-button': customElements.get('vaadin-button'),
|
|
66
|
+
'x-property-table': PropertyTable,
|
|
67
|
+
'x-choice': Choice,
|
|
68
|
+
'x-group': Group,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
const { hiddenSelector, href, lang, ns } = this;
|
|
74
|
+
const action = href ? 'delete' : 'create';
|
|
75
|
+
const isBusy = this.in('busy');
|
|
76
|
+
const isFail = this.in('fail');
|
|
77
|
+
return html `
|
|
78
|
+
<div class="space-y-m">
|
|
79
|
+
${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}
|
|
80
|
+
${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}
|
|
81
|
+
${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}
|
|
82
|
+
${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}
|
|
83
|
+
|
|
84
|
+
<div
|
|
85
|
+
data-testid="spinner"
|
|
86
|
+
class=${classMap({
|
|
87
|
+
'transition duration-500 ease-in-out absolute inset-0 flex': true,
|
|
88
|
+
'opacity-0 pointer-events-none': !isBusy && !isFail,
|
|
89
|
+
})}
|
|
90
|
+
>
|
|
91
|
+
<foxy-spinner
|
|
92
|
+
layout="vertical"
|
|
93
|
+
class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l"
|
|
94
|
+
state=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}
|
|
95
|
+
lang=${lang}
|
|
96
|
+
ns="${ns} ${(_b = (_a = customElements.get('foxy-spinner')) === null || _a === void 0 ? void 0 : _a.defaultNS) !== null && _b !== void 0 ? _b : ''}"
|
|
97
|
+
>
|
|
98
|
+
</foxy-spinner>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
__renderDescription() {
|
|
104
|
+
var _a, _b;
|
|
105
|
+
const scope = 'description';
|
|
106
|
+
return html `
|
|
107
|
+
<div>
|
|
108
|
+
${this.renderTemplateOrSlot(`${scope}:before`)}
|
|
109
|
+
|
|
110
|
+
<vaadin-text-field
|
|
111
|
+
data-testid=${scope}
|
|
112
|
+
class="w-full mb-s"
|
|
113
|
+
label=${this.t(scope)}
|
|
114
|
+
?disabled=${!this.in('idle') || this.disabledSelector.matches(scope)}
|
|
115
|
+
?readonly=${this.readonlySelector.matches(scope)}
|
|
116
|
+
.value=${(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : ''}
|
|
117
|
+
@keydown=${(evt) => evt.key === 'Enter' && this.submit()}
|
|
118
|
+
@input=${(evt) => {
|
|
119
|
+
this.edit({ description: evt.currentTarget.value });
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
</vaadin-text-field>
|
|
123
|
+
|
|
124
|
+
${this.renderTemplateOrSlot(`${scope}:after`)}
|
|
125
|
+
</div>
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
__renderContent() {
|
|
129
|
+
var _a;
|
|
130
|
+
const scope = 'content';
|
|
131
|
+
const isDisabled = !this.in('idle') || this.disabledSelector.matches(scope);
|
|
132
|
+
const isReadonly = this.readonlySelector.matches(scope);
|
|
133
|
+
const contentChoice = this.form.content_url
|
|
134
|
+
? 'url'
|
|
135
|
+
: this.form.content
|
|
136
|
+
? 'clipboard'
|
|
137
|
+
: this.__contentChoice;
|
|
138
|
+
return html `
|
|
139
|
+
<div data-testid="content">
|
|
140
|
+
${this.renderTemplateOrSlot(`${scope}:before`)}
|
|
141
|
+
|
|
142
|
+
<x-group frame>
|
|
143
|
+
<foxy-i18n
|
|
144
|
+
class=${classMap({ 'transition-colors': true, 'text-disabled': isDisabled })}
|
|
145
|
+
lang=${this.lang}
|
|
146
|
+
slot="header"
|
|
147
|
+
key="template"
|
|
148
|
+
ns=${this.ns}
|
|
149
|
+
>
|
|
150
|
+
</foxy-i18n>
|
|
151
|
+
|
|
152
|
+
<x-choice
|
|
153
|
+
data-testid="content-type"
|
|
154
|
+
.value=${contentChoice}
|
|
155
|
+
.items=${['default', 'url', 'clipboard']}
|
|
156
|
+
?readonly=${isReadonly}
|
|
157
|
+
?disabled=${isDisabled}
|
|
158
|
+
@change=${(evt) => {
|
|
159
|
+
if (evt instanceof ChoiceChangeEvent) {
|
|
160
|
+
this.edit({ content: '', content_url: '' });
|
|
161
|
+
this.__contentChoice = evt.detail;
|
|
162
|
+
}
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
${['default', 'url', 'clipboard'].map(value => {
|
|
166
|
+
return html `
|
|
167
|
+
<div slot="${value}-label" class="py-s leading-s">
|
|
168
|
+
<foxy-i18n class="block" lang=${this.lang} key="template_${value}" ns=${this.ns}>
|
|
169
|
+
</foxy-i18n>
|
|
170
|
+
|
|
171
|
+
<foxy-i18n
|
|
172
|
+
class="block text-s opacity-70"
|
|
173
|
+
lang=${this.lang}
|
|
174
|
+
key="template_${value}_explainer"
|
|
175
|
+
ns=${this.ns}
|
|
176
|
+
>
|
|
177
|
+
</foxy-i18n>
|
|
178
|
+
</div>
|
|
179
|
+
`;
|
|
180
|
+
})}
|
|
181
|
+
|
|
182
|
+
<div slot="url" ?hidden=${contentChoice !== 'url'}>
|
|
183
|
+
<div class="flex items-center mt-0 mb-m">
|
|
184
|
+
<vaadin-text-field
|
|
185
|
+
data-testid="content-url"
|
|
186
|
+
class="mr-s flex-grow"
|
|
187
|
+
?readonly=${isReadonly}
|
|
188
|
+
?disabled=${isDisabled}
|
|
189
|
+
.value=${this.form.content_url}
|
|
190
|
+
@keydown=${(evt) => evt.key === 'Enter' && this.submit()}
|
|
191
|
+
@input=${(evt) => {
|
|
192
|
+
const value = evt.currentTarget.value;
|
|
193
|
+
this.edit({ content: '', content_url: value });
|
|
194
|
+
}}
|
|
195
|
+
>
|
|
196
|
+
</vaadin-text-field>
|
|
197
|
+
|
|
198
|
+
<vaadin-button
|
|
199
|
+
data-testid="cache"
|
|
200
|
+
class="relative"
|
|
201
|
+
?hidden=${isReadonly || this.form.content_url !== ((_a = this.data) === null || _a === void 0 ? void 0 : _a.content_url)}
|
|
202
|
+
?disabled=${isDisabled || this.__cacheState === 'busy'}
|
|
203
|
+
@click=${this.__cache}
|
|
204
|
+
>
|
|
205
|
+
<foxy-i18n
|
|
206
|
+
class=${classMap({
|
|
207
|
+
'relative transition-opacity': true,
|
|
208
|
+
'opacity-0': this.__cacheState !== 'idle',
|
|
209
|
+
})}
|
|
210
|
+
lang=${this.lang}
|
|
211
|
+
key="cache"
|
|
212
|
+
ns=${this.ns}
|
|
213
|
+
>
|
|
214
|
+
</foxy-i18n>
|
|
215
|
+
|
|
216
|
+
<div
|
|
217
|
+
class=${classMap({
|
|
218
|
+
'absolute inset-0 flex transition-opacity': true,
|
|
219
|
+
'opacity-0': this.__cacheState === 'idle',
|
|
220
|
+
})}
|
|
221
|
+
>
|
|
222
|
+
<foxy-spinner
|
|
223
|
+
layout="no-label"
|
|
224
|
+
class="m-auto"
|
|
225
|
+
state=${this.__cacheState === 'fail' ? 'error' : 'busy'}
|
|
226
|
+
lang=${this.lang}
|
|
227
|
+
ns=${this.ns}
|
|
228
|
+
>
|
|
229
|
+
</foxy-spinner>
|
|
230
|
+
</div>
|
|
231
|
+
</vaadin-button>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
<div slot="clipboard" ?hidden=${contentChoice !== 'clipboard'}>
|
|
236
|
+
<vaadin-text-area
|
|
237
|
+
id="cached-content"
|
|
238
|
+
data-testid="content-clipboard"
|
|
239
|
+
class="w-full mb-m"
|
|
240
|
+
?readonly=${isReadonly}
|
|
241
|
+
?disabled=${isDisabled}
|
|
242
|
+
.value=${live(this.form.content)}
|
|
243
|
+
@input=${(evt) => {
|
|
244
|
+
const value = evt.currentTarget.value;
|
|
245
|
+
this.edit({ content: value, content_url: '' });
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
</vaadin-text-area>
|
|
249
|
+
</div>
|
|
250
|
+
</x-choice>
|
|
251
|
+
</x-group>
|
|
252
|
+
|
|
253
|
+
${this.renderTemplateOrSlot(`${scope}:after`)}
|
|
254
|
+
</div>
|
|
255
|
+
`;
|
|
256
|
+
}
|
|
257
|
+
__renderTimestamps() {
|
|
258
|
+
const scope = 'timestamps';
|
|
259
|
+
return html `
|
|
260
|
+
<div>
|
|
261
|
+
${this.renderTemplateOrSlot(`${scope}:before`)}
|
|
262
|
+
|
|
263
|
+
<x-property-table
|
|
264
|
+
data-testid="timestamps"
|
|
265
|
+
.items=${['date_modified', 'date_created'].map(field => {
|
|
266
|
+
var _a;
|
|
267
|
+
return ({
|
|
268
|
+
name: this.t(field),
|
|
269
|
+
value: ((_a = this.data) === null || _a === void 0 ? void 0 : _a[field]) ? this.t('date', { value: new Date(this.data[field]) })
|
|
270
|
+
: '',
|
|
271
|
+
});
|
|
272
|
+
})}
|
|
273
|
+
>
|
|
274
|
+
</x-property-table>
|
|
275
|
+
|
|
276
|
+
${this.renderTemplateOrSlot(`${scope}:after`)}
|
|
277
|
+
</div>
|
|
278
|
+
`;
|
|
279
|
+
}
|
|
280
|
+
__renderAction(action) {
|
|
281
|
+
const { disabledSelector, href, lang, ns } = this;
|
|
282
|
+
const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });
|
|
283
|
+
const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });
|
|
284
|
+
const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);
|
|
285
|
+
const isValid = isTemplateValid || isSnapshotValid;
|
|
286
|
+
const handleClick = (evt) => {
|
|
287
|
+
if (action === 'delete') {
|
|
288
|
+
const confirm = this.renderRoot.querySelector('#confirm');
|
|
289
|
+
confirm.show(evt.currentTarget);
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
this.submit();
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
return html `
|
|
296
|
+
<div>
|
|
297
|
+
${this.renderTemplateOrSlot(`${action}:before`)}
|
|
298
|
+
|
|
299
|
+
<foxy-internal-confirm-dialog
|
|
300
|
+
message="delete_prompt"
|
|
301
|
+
confirm="delete"
|
|
302
|
+
cancel="cancel"
|
|
303
|
+
header="delete"
|
|
304
|
+
theme="primary error"
|
|
305
|
+
lang=${lang}
|
|
306
|
+
ns=${ns}
|
|
307
|
+
id="confirm"
|
|
308
|
+
data-testid="confirm"
|
|
309
|
+
@hide=${(evt) => {
|
|
310
|
+
if (!evt.detail.cancelled)
|
|
311
|
+
this.delete();
|
|
312
|
+
}}
|
|
313
|
+
>
|
|
314
|
+
</foxy-internal-confirm-dialog>
|
|
315
|
+
|
|
316
|
+
<vaadin-button
|
|
317
|
+
class="w-full"
|
|
318
|
+
theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}
|
|
319
|
+
data-testid=${action}
|
|
320
|
+
?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}
|
|
321
|
+
@click=${handleClick}
|
|
322
|
+
>
|
|
323
|
+
<foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>
|
|
324
|
+
</vaadin-button>
|
|
325
|
+
|
|
326
|
+
${this.renderTemplateOrSlot(`${action}:after`)}
|
|
327
|
+
</div>
|
|
328
|
+
`;
|
|
329
|
+
}
|
|
330
|
+
async __cache() {
|
|
331
|
+
var _a, _b;
|
|
332
|
+
this.__cacheState = 'busy';
|
|
333
|
+
try {
|
|
334
|
+
const url = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:cache'].href) !== null && _b !== void 0 ? _b : '';
|
|
335
|
+
const response = await new TemplateForm.API(this).fetch(url, { method: 'POST' });
|
|
336
|
+
this.__cacheState = response.ok ? 'idle' : 'fail';
|
|
337
|
+
}
|
|
338
|
+
catch (_c) {
|
|
339
|
+
this.__cacheState = 'fail';
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=TemplateForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateForm/TemplateForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,GA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,EAAE,IAAI,mCAAI,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEjF,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;SACnD;QAAC,WAAM;YACN,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;SAC5B;IACH,CAAC;CACF","sourcesContent":["import { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\nimport { Choice, Group, PropertyTable } from '../../private/index';\nimport { Data, Templates } from './types';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ChoiceChangeEvent } from '../../private/events';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { live } from 'lit-html/directives/live';\n\nconst NS = 'template-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)))\n);\n\n/**\n * Form element for creating or editing templates (`fx:cart_include_template`, `fx:checkout_template`, `fx:cart_template`).\n *\n * @slot description:before\n * @slot description:after\n *\n * @slot content:before\n * @slot content:after\n *\n * @slot timestamps:before\n * @slot timestamps:after\n *\n * @slot create:before\n * @slot create:after\n *\n * @slot delete:before\n * @slot delete:after\n *\n * @element foxy-template-form\n * @since 1.14.0\n */\nexport class TemplateForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __cacheState: { attribute: false },\n __contentChoice: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #cached-content::part(input-field) {\n max-height: 15em;\n }\n `,\n ];\n }\n\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'x-property-table': PropertyTable,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n templates: Templates = {};\n\n private __cacheState: 'idle' | 'busy' | 'fail' = 'idle';\n\n private __contentChoice: 'default' | 'url' | 'clipboard' = 'default';\n\n render(): TemplateResult {\n const { hiddenSelector, href, lang, ns } = this;\n const action = href ? 'delete' : 'create';\n const isBusy = this.in('busy');\n const isFail = this.in('fail');\n\n return html`\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}\n ${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}\n ${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}\n ${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy && !isFail,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderDescription() {\n const scope = 'description';\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-text-field\n data-testid=${scope}\n class=\"w-full mb-s\"\n label=${this.t(scope)}\n ?disabled=${!this.in('idle') || this.disabledSelector.matches(scope)}\n ?readonly=${this.readonlySelector.matches(scope)}\n .value=${this.form?.description ?? ''}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n this.edit({ description: (evt.currentTarget as TextFieldElement).value });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n }\n\n private __renderContent() {\n const scope = 'content';\n const isDisabled = !this.in('idle') || this.disabledSelector.matches(scope);\n const isReadonly = this.readonlySelector.matches(scope);\n const contentChoice = this.form.content_url\n ? 'url'\n : this.form.content\n ? 'clipboard'\n : this.__contentChoice;\n\n return html`\n <div data-testid=\"content\">\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <x-group frame>\n <foxy-i18n\n class=${classMap({ 'transition-colors': true, 'text-disabled': isDisabled })}\n lang=${this.lang}\n slot=\"header\"\n key=\"template\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <x-choice\n data-testid=\"content-type\"\n .value=${contentChoice}\n .items=${['default', 'url', 'clipboard']}\n ?readonly=${isReadonly}\n ?disabled=${isDisabled}\n @change=${(evt: Event) => {\n if (evt instanceof ChoiceChangeEvent) {\n this.edit({ content: '', content_url: '' });\n this.__contentChoice = evt.detail as 'url' | 'clipboard' | 'default';\n }\n }}\n >\n ${['default', 'url', 'clipboard'].map(value => {\n return html`\n <div slot=\"${value}-label\" class=\"py-s leading-s\">\n <foxy-i18n class=\"block\" lang=${this.lang} key=\"template_${value}\" ns=${this.ns}>\n </foxy-i18n>\n\n <foxy-i18n\n class=\"block text-s opacity-70\"\n lang=${this.lang}\n key=\"template_${value}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"url\" ?hidden=${contentChoice !== 'url'}>\n <div class=\"flex items-center mt-0 mb-m\">\n <vaadin-text-field\n data-testid=\"content-url\"\n class=\"mr-s flex-grow\"\n ?readonly=${isReadonly}\n ?disabled=${isDisabled}\n .value=${this.form.content_url}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextFieldElement).value;\n this.edit({ content: '', content_url: value });\n }}\n >\n </vaadin-text-field>\n\n <vaadin-button\n data-testid=\"cache\"\n class=\"relative\"\n ?hidden=${isReadonly || this.form.content_url !== this.data?.content_url}\n ?disabled=${isDisabled || this.__cacheState === 'busy'}\n @click=${this.__cache}\n >\n <foxy-i18n\n class=${classMap({\n 'relative transition-opacity': true,\n 'opacity-0': this.__cacheState !== 'idle',\n })}\n lang=${this.lang}\n key=\"cache\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'absolute inset-0 flex transition-opacity': true,\n 'opacity-0': this.__cacheState === 'idle',\n })}\n >\n <foxy-spinner\n layout=\"no-label\"\n class=\"m-auto\"\n state=${this.__cacheState === 'fail' ? 'error' : 'busy'}\n lang=${this.lang}\n ns=${this.ns}\n >\n </foxy-spinner>\n </div>\n </vaadin-button>\n </div>\n </div>\n\n <div slot=\"clipboard\" ?hidden=${contentChoice !== 'clipboard'}>\n <vaadin-text-area\n id=\"cached-content\"\n data-testid=\"content-clipboard\"\n class=\"w-full mb-m\"\n ?readonly=${isReadonly}\n ?disabled=${isDisabled}\n .value=${live(this.form.content)}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextAreaElement).value;\n this.edit({ content: value, content_url: '' });\n }}\n >\n </vaadin-text-area>\n </div>\n </x-choice>\n </x-group>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n }\n\n private __renderTimestamps() {\n const scope = 'timestamps';\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <x-property-table\n data-testid=\"timestamps\"\n .items=${(['date_modified', 'date_created'] as const).map(field => ({\n name: this.t(field),\n value: this.data?.[field]\n ? this.t('date', { value: new Date(this.data[field] as string) })\n : '',\n }))}\n >\n </x-property-table>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n }\n\n private __renderAction(action: string) {\n const { disabledSelector, href, lang, ns } = this;\n\n const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });\n const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });\n const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);\n const isValid = isTemplateValid || isSnapshotValid;\n\n const handleClick = (evt: Event) => {\n if (action === 'delete') {\n const confirm = this.renderRoot.querySelector('#confirm');\n (confirm as InternalConfirmDialog).show(evt.currentTarget as HTMLElement);\n } else {\n this.submit();\n }\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${action}:before`)}\n\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${lang}\n ns=${ns}\n id=\"confirm\"\n data-testid=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.delete();\n }}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n class=\"w-full\"\n theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}\n data-testid=${action}\n ?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}\n @click=${handleClick}\n >\n <foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${action}:after`)}\n </div>\n `;\n }\n\n private async __cache(): Promise<void> {\n this.__cacheState = 'busy';\n\n try {\n const url = this.data?._links['fx:cache'].href ?? '';\n const response = await new TemplateForm.API(this).fetch(url, { method: 'POST' });\n\n this.__cacheState = response.ok ? 'idle' : 'fail';\n } catch {\n this.__cacheState = 'fail';\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
2
|
+
import '@vaadin/vaadin-text-field/vaadin-text-area';
|
|
3
|
+
import '@vaadin/vaadin-button';
|
|
4
|
+
import '../../internal/InternalConfirmDialog/index';
|
|
5
|
+
import '../../internal/InternalSandbox/index';
|
|
6
|
+
import '../Spinner/index';
|
|
7
|
+
import '../I18n/index';
|
|
8
|
+
import { TemplateForm } from './TemplateForm';
|
|
9
|
+
export { TemplateForm };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
2
|
+
import '@vaadin/vaadin-text-field/vaadin-text-area';
|
|
3
|
+
import '@vaadin/vaadin-button';
|
|
4
|
+
import "../../internal/InternalConfirmDialog/index.js";
|
|
5
|
+
import "../../internal/InternalSandbox/index.js";
|
|
6
|
+
import "../Spinner/index.js";
|
|
7
|
+
import "../I18n/index.js";
|
|
8
|
+
import { TemplateForm } from "./TemplateForm.js";
|
|
9
|
+
customElements.define('foxy-template-form', TemplateForm);
|
|
10
|
+
export { TemplateForm };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AACpD,OAAO,uBAAuB,CAAC;AAC/B,uDAAoD;AACpD,iDAA8C;AAC9C,6BAA0B;AAC1B,0BAAuB;AAEvB,OAAO,EAAE,YAAY,EAAE,0BAAuB;AAE9C,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import '@vaadin/vaadin-text-field/vaadin-text-field';\nimport '@vaadin/vaadin-text-field/vaadin-text-area';\nimport '@vaadin/vaadin-button';\nimport '../../internal/InternalConfirmDialog/index';\nimport '../../internal/InternalSandbox/index';\nimport '../Spinner/index';\nimport '../I18n/index';\n\nimport { TemplateForm } from './TemplateForm';\n\ncustomElements.define('foxy-template-form', TemplateForm);\n\nexport { TemplateForm };\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
2
|
+
import { Renderer } from '../../../mixins/configurable';
|
|
3
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
4
|
+
import { TemplateForm } from './TemplateForm';
|
|
5
|
+
export declare type Data = Resource<Rels.CartIncludeTemplate> | Resource<Rels.CheckoutTemplate> | Resource<Rels.CartTemplate>;
|
|
6
|
+
export declare type Templates = {
|
|
7
|
+
'description:before'?: Renderer<TemplateForm>;
|
|
8
|
+
'description:after'?: Renderer<TemplateForm>;
|
|
9
|
+
'content:before'?: Renderer<TemplateForm>;
|
|
10
|
+
'content:after'?: Renderer<TemplateForm>;
|
|
11
|
+
'timestamps:before'?: Renderer<TemplateForm>;
|
|
12
|
+
'timestamps:after'?: Renderer<TemplateForm>;
|
|
13
|
+
'create:before'?: Renderer<TemplateForm>;
|
|
14
|
+
'create:after'?: Renderer<TemplateForm>;
|
|
15
|
+
'delete:before'?: Renderer<TemplateForm>;
|
|
16
|
+
'delete:after'?: Renderer<TemplateForm>;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateForm/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Rels } from '@foxy.io/sdk/backend';\nimport { Renderer } from '../../../mixins/configurable';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { TemplateForm } from './TemplateForm';\n\nexport type Data =\n | Resource<Rels.CartIncludeTemplate>\n | Resource<Rels.CheckoutTemplate>\n | Resource<Rels.CartTemplate>;\n\nexport type Templates = {\n 'description:before'?: Renderer<TemplateForm>;\n 'description:after'?: Renderer<TemplateForm>;\n 'content:before'?: Renderer<TemplateForm>;\n 'content:after'?: Renderer<TemplateForm>;\n 'timestamps:before'?: Renderer<TemplateForm>;\n 'timestamps:after'?: Renderer<TemplateForm>;\n 'create:before'?: Renderer<TemplateForm>;\n 'create:after'?: Renderer<TemplateForm>;\n 'delete:before'?: Renderer<TemplateForm>;\n 'delete:after'?: Renderer<TemplateForm>;\n};\n"]}
|
|
@@ -18,6 +18,7 @@ export { CustomFieldCard } from './CustomFieldCard/CustomFieldCard';
|
|
|
18
18
|
export { CustomFieldForm } from './CustomFieldForm/CustomFieldForm';
|
|
19
19
|
export { DiscountCard } from './DiscountCard/DiscountCard';
|
|
20
20
|
export { Donation } from './Donation/Donation';
|
|
21
|
+
export { EmailTemplateForm } from './EmailTemplateForm/EmailTemplateForm';
|
|
21
22
|
export { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';
|
|
22
23
|
export { FormDialog } from './FormDialog/FormDialog';
|
|
23
24
|
export { I18n } from './I18n/I18n';
|
|
@@ -34,6 +35,8 @@ export { SubscriptionsTable } from './SubscriptionsTable/SubscriptionsTable';
|
|
|
34
35
|
export { Table } from './Table/Table';
|
|
35
36
|
export { TaxCard } from './TaxCard/TaxCard';
|
|
36
37
|
export { TaxForm } from './TaxForm/TaxForm';
|
|
38
|
+
export { TemplateForm } from './TemplateForm/TemplateForm';
|
|
39
|
+
export { TemplateConfigForm } from './TemplateConfigForm/TemplateConfigForm';
|
|
37
40
|
export { TransactionCard } from './TransactionCard/TransactionCard';
|
|
38
41
|
export { TransactionsTable } from './TransactionsTable/TransactionsTable';
|
|
39
42
|
export { UserForm } from './UserForm/UserForm';
|
|
@@ -18,6 +18,7 @@ export { CustomFieldCard } from './CustomFieldCard/index';
|
|
|
18
18
|
export { CustomFieldForm } from './CustomFieldForm/index';
|
|
19
19
|
export { DiscountCard } from './DiscountCard/index';
|
|
20
20
|
export { Donation } from './Donation/index';
|
|
21
|
+
export { EmailTemplateForm } from './EmailTemplateForm/index';
|
|
21
22
|
export { ErrorEntryCard } from './ErrorEntryCard/index';
|
|
22
23
|
export { FormDialog } from './FormDialog/index';
|
|
23
24
|
export { I18n } from './I18n/index';
|
|
@@ -34,6 +35,8 @@ export { SubscriptionsTable } from './SubscriptionsTable/index';
|
|
|
34
35
|
export { Table } from './Table/index';
|
|
35
36
|
export { TaxCard } from './TaxCard/index';
|
|
36
37
|
export { TaxForm } from './TaxForm/index';
|
|
38
|
+
export { TemplateConfigForm } from './TemplateConfigForm/index';
|
|
39
|
+
export { TemplateForm } from './TemplateForm/index';
|
|
37
40
|
export { TransactionCard } from './TransactionCard/index';
|
|
38
41
|
export { TransactionsTable } from './TransactionsTable/index';
|
|
39
42
|
export { UserForm } from './UserForm/index';
|
|
@@ -18,6 +18,7 @@ export { CustomFieldCard } from "./CustomFieldCard/index.js";
|
|
|
18
18
|
export { CustomFieldForm } from "./CustomFieldForm/index.js";
|
|
19
19
|
export { DiscountCard } from "./DiscountCard/index.js";
|
|
20
20
|
export { Donation } from "./Donation/index.js";
|
|
21
|
+
export { EmailTemplateForm } from "./EmailTemplateForm/index.js";
|
|
21
22
|
export { ErrorEntryCard } from "./ErrorEntryCard/index.js";
|
|
22
23
|
export { FormDialog } from "./FormDialog/index.js";
|
|
23
24
|
export { I18n } from "./I18n/index.js";
|
|
@@ -34,6 +35,8 @@ export { SubscriptionsTable } from "./SubscriptionsTable/index.js";
|
|
|
34
35
|
export { Table } from "./Table/index.js";
|
|
35
36
|
export { TaxCard } from "./TaxCard/index.js";
|
|
36
37
|
export { TaxForm } from "./TaxForm/index.js";
|
|
38
|
+
export { TemplateConfigForm } from "./TemplateConfigForm/index.js";
|
|
39
|
+
export { TemplateForm } from "./TemplateForm/index.js";
|
|
37
40
|
export { TransactionCard } from "./TransactionCard/index.js";
|
|
38
41
|
export { TransactionsTable } from "./TransactionsTable/index.js";
|
|
39
42
|
export { UserForm } from "./UserForm/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.defined.js","sourceRoot":"","sources":["../../../src/elements/public/index.defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,sBAAsB,EAAE,0CAAuC;AACxE,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,IAAI,EAAE,wBAAqB;AACpC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,6BAA0B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,UAAU,EAAE,8BAA2B","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/index';\nexport { AddressCard } from './AddressCard/index';\nexport { AddressForm } from './AddressForm/index';\nexport { AppliedTaxCard } from './AppliedTaxCard/index';\nexport { AttributeCard } from './AttributeCard/index';\nexport { AttributeForm } from './AttributeForm/index';\nexport { CancellationForm } from './CancellationForm/index';\nexport { CollectionPage } from './CollectionPage/index';\nexport { CollectionPages } from './CollectionPages/index';\nexport { Customer } from './Customer/index';\nexport { CustomerApi } from './CustomerApi/index';\nexport { CustomerCard } from './CustomerCard/index';\nexport { CustomerForm } from './CustomerForm/index';\nexport { CustomerPortal } from './CustomerPortal/index';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/index';\nexport { CustomersTable } from './CustomersTable/index';\nexport { CustomFieldCard } from './CustomFieldCard/index';\nexport { CustomFieldForm } from './CustomFieldForm/index';\nexport { DiscountCard } from './DiscountCard/index';\nexport { Donation } from './Donation/index';\nexport { ErrorEntryCard } from './ErrorEntryCard/index';\nexport { FormDialog } from './FormDialog/index';\nexport { I18n } from './I18n/index';\nexport { ItemsForm, Item } from './ItemsForm/index';\nexport { NucleonElement } from './NucleonElement/index';\nexport { PaymentCard } from './PaymentCard/index';\nexport { PaymentMethodCard } from './PaymentMethodCard/index';\nexport { QueryBuilder } from './QueryBuilder/index';\nexport { SignInForm } from './SignInForm/index';\nexport { Spinner } from './Spinner/index';\nexport { SubscriptionCard } from './SubscriptionCard/index';\nexport { SubscriptionForm } from './SubscriptionForm/index';\nexport { SubscriptionsTable } from './SubscriptionsTable/index';\nexport { Table } from './Table/index';\nexport { TaxCard } from './TaxCard/index';\nexport { TaxForm } from './TaxForm/index';\nexport { TransactionCard } from './TransactionCard/index';\nexport { TransactionsTable } from './TransactionsTable/index';\nexport { UserForm } from './UserForm/index';\nexport { UsersTable } from './UsersTable/index';\n"]}
|
|
1
|
+
{"version":3,"file":"index.defined.js","sourceRoot":"","sources":["../../../src/elements/public/index.defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,sBAAsB,EAAE,0CAAuC;AACxE,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,IAAI,EAAE,wBAAqB;AACpC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,6BAA0B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,UAAU,EAAE,8BAA2B","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/index';\nexport { AddressCard } from './AddressCard/index';\nexport { AddressForm } from './AddressForm/index';\nexport { AppliedTaxCard } from './AppliedTaxCard/index';\nexport { AttributeCard } from './AttributeCard/index';\nexport { AttributeForm } from './AttributeForm/index';\nexport { CancellationForm } from './CancellationForm/index';\nexport { CollectionPage } from './CollectionPage/index';\nexport { CollectionPages } from './CollectionPages/index';\nexport { Customer } from './Customer/index';\nexport { CustomerApi } from './CustomerApi/index';\nexport { CustomerCard } from './CustomerCard/index';\nexport { CustomerForm } from './CustomerForm/index';\nexport { CustomerPortal } from './CustomerPortal/index';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/index';\nexport { CustomersTable } from './CustomersTable/index';\nexport { CustomFieldCard } from './CustomFieldCard/index';\nexport { CustomFieldForm } from './CustomFieldForm/index';\nexport { DiscountCard } from './DiscountCard/index';\nexport { Donation } from './Donation/index';\nexport { EmailTemplateForm } from './EmailTemplateForm/index';\nexport { ErrorEntryCard } from './ErrorEntryCard/index';\nexport { FormDialog } from './FormDialog/index';\nexport { I18n } from './I18n/index';\nexport { ItemsForm, Item } from './ItemsForm/index';\nexport { NucleonElement } from './NucleonElement/index';\nexport { PaymentCard } from './PaymentCard/index';\nexport { PaymentMethodCard } from './PaymentMethodCard/index';\nexport { QueryBuilder } from './QueryBuilder/index';\nexport { SignInForm } from './SignInForm/index';\nexport { Spinner } from './Spinner/index';\nexport { SubscriptionCard } from './SubscriptionCard/index';\nexport { SubscriptionForm } from './SubscriptionForm/index';\nexport { SubscriptionsTable } from './SubscriptionsTable/index';\nexport { Table } from './Table/index';\nexport { TaxCard } from './TaxCard/index';\nexport { TaxForm } from './TaxForm/index';\nexport { TemplateConfigForm } from './TemplateConfigForm/index';\nexport { TemplateForm } from './TemplateForm/index';\nexport { TransactionCard } from './TransactionCard/index';\nexport { TransactionsTable } from './TransactionsTable/index';\nexport { UserForm } from './UserForm/index';\nexport { UsersTable } from './UsersTable/index';\n"]}
|
|
@@ -18,6 +18,7 @@ export { CustomFieldCard } from "./CustomFieldCard/CustomFieldCard.js";
|
|
|
18
18
|
export { CustomFieldForm } from "./CustomFieldForm/CustomFieldForm.js";
|
|
19
19
|
export { DiscountCard } from "./DiscountCard/DiscountCard.js";
|
|
20
20
|
export { Donation } from "./Donation/Donation.js";
|
|
21
|
+
export { EmailTemplateForm } from "./EmailTemplateForm/EmailTemplateForm.js";
|
|
21
22
|
export { ErrorEntryCard } from "./ErrorEntryCard/ErrorEntryCard.js";
|
|
22
23
|
export { FormDialog } from "./FormDialog/FormDialog.js";
|
|
23
24
|
export { I18n } from "./I18n/I18n.js";
|
|
@@ -34,6 +35,8 @@ export { SubscriptionsTable } from "./SubscriptionsTable/SubscriptionsTable.js";
|
|
|
34
35
|
export { Table } from "./Table/Table.js";
|
|
35
36
|
export { TaxCard } from "./TaxCard/TaxCard.js";
|
|
36
37
|
export { TaxForm } from "./TaxForm/TaxForm.js";
|
|
38
|
+
export { TemplateForm } from "./TemplateForm/TemplateForm.js";
|
|
39
|
+
export { TemplateConfigForm } from "./TemplateConfigForm/TemplateConfigForm.js";
|
|
37
40
|
export { TransactionCard } from "./TransactionCard/TransactionCard.js";
|
|
38
41
|
export { TransactionsTable } from "./TransactionsTable/TransactionsTable.js";
|
|
39
42
|
export { UserForm } from "./UserForm/UserForm.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/elements/public/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,aAAa,EAAE,yCAAsC;AAC9D,OAAO,EAAE,aAAa,EAAE,yCAAsC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,sBAAsB,EAAE,2DAAwD;AACzF,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,UAAU,EAAE,mCAAgC;AACrD,OAAO,EAAE,IAAI,EAAE,uBAAoB;AACnC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,iCAA8B;AACxD,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,UAAU,EAAE,mCAAgC;AACrD,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,UAAU,EAAE,mCAAgC","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/AccessRecoveryForm';\nexport { AddressCard } from './AddressCard/AddressCard';\nexport { AddressForm } from './AddressForm/AddressForm';\nexport { AppliedTaxCard } from './AppliedTaxCard/AppliedTaxCard';\nexport { AttributeCard } from './AttributeCard/AttributeCard';\nexport { AttributeForm } from './AttributeForm/AttributeForm';\nexport { CancellationForm } from './CancellationForm/CancellationForm';\nexport { CollectionPage } from './CollectionPage/CollectionPage';\nexport { CollectionPages } from './CollectionPages/CollectionPages';\nexport { Customer } from './Customer/Customer';\nexport { CustomerApi } from './CustomerApi/CustomerApi';\nexport { CustomerCard } from './CustomerCard/CustomerCard';\nexport { CustomerForm } from './CustomerForm/CustomerForm';\nexport { CustomerPortal } from './CustomerPortal/CustomerPortal';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/CustomerPortalSettings';\nexport { CustomersTable } from './CustomersTable/CustomersTable';\nexport { CustomFieldCard } from './CustomFieldCard/CustomFieldCard';\nexport { CustomFieldForm } from './CustomFieldForm/CustomFieldForm';\nexport { DiscountCard } from './DiscountCard/DiscountCard';\nexport { Donation } from './Donation/Donation';\nexport { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';\nexport { FormDialog } from './FormDialog/FormDialog';\nexport { I18n } from './I18n/I18n';\nexport { ItemsForm, Item } from './ItemsForm/ItemsForm';\nexport { NucleonElement } from './NucleonElement/NucleonElement';\nexport { PaymentCard } from './PaymentCard/PaymentCard';\nexport { PaymentMethodCard } from './PaymentMethodCard/PaymentMethodCard';\nexport { QueryBuilder } from './QueryBuilder/QueryBuilder';\nexport { SignInForm } from './SignInForm/SignInForm';\nexport { Spinner } from './Spinner/Spinner';\nexport { SubscriptionCard } from './SubscriptionCard/SubscriptionCard';\nexport { SubscriptionForm } from './SubscriptionForm/SubscriptionForm';\nexport { SubscriptionsTable } from './SubscriptionsTable/SubscriptionsTable';\nexport { Table } from './Table/Table';\nexport { TaxCard } from './TaxCard/TaxCard';\nexport { TaxForm } from './TaxForm/TaxForm';\nexport { TransactionCard } from './TransactionCard/TransactionCard';\nexport { TransactionsTable } from './TransactionsTable/TransactionsTable';\nexport { UserForm } from './UserForm/UserForm';\nexport { UsersTable } from './UsersTable/UsersTable';\n"]}
|
|
1
|
+
{"version":3,"file":"index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EAAE,mCAAgC;AACrD,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,UAAU,EAAE,mCAAgC","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/AccessRecoveryForm';\nexport { AddressCard } from './AddressCard/AddressCard';\nexport { AddressForm } from './AddressForm/AddressForm';\nexport { AppliedTaxCard } from './AppliedTaxCard/AppliedTaxCard';\nexport { AttributeCard } from './AttributeCard/AttributeCard';\nexport { AttributeForm } from './AttributeForm/AttributeForm';\nexport { CancellationForm } from './CancellationForm/CancellationForm';\nexport { CollectionPage } from './CollectionPage/CollectionPage';\nexport { CollectionPages } from './CollectionPages/CollectionPages';\nexport { Customer } from './Customer/Customer';\nexport { CustomerApi } from './CustomerApi/CustomerApi';\nexport { CustomerCard } from './CustomerCard/CustomerCard';\nexport { CustomerForm } from './CustomerForm/CustomerForm';\nexport { CustomerPortal } from './CustomerPortal/CustomerPortal';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/CustomerPortalSettings';\nexport { CustomersTable } from './CustomersTable/CustomersTable';\nexport { CustomFieldCard } from './CustomFieldCard/CustomFieldCard';\nexport { CustomFieldForm } from './CustomFieldForm/CustomFieldForm';\nexport { DiscountCard } from './DiscountCard/DiscountCard';\nexport { Donation } from './Donation/Donation';\nexport { EmailTemplateForm } from './EmailTemplateForm/EmailTemplateForm';\nexport { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';\nexport { FormDialog } from './FormDialog/FormDialog';\nexport { I18n } from './I18n/I18n';\nexport { ItemsForm, Item } from './ItemsForm/ItemsForm';\nexport { NucleonElement } from './NucleonElement/NucleonElement';\nexport { PaymentCard } from './PaymentCard/PaymentCard';\nexport { PaymentMethodCard } from './PaymentMethodCard/PaymentMethodCard';\nexport { QueryBuilder } from './QueryBuilder/QueryBuilder';\nexport { SignInForm } from './SignInForm/SignInForm';\nexport { Spinner } from './Spinner/Spinner';\nexport { SubscriptionCard } from './SubscriptionCard/SubscriptionCard';\nexport { SubscriptionForm } from './SubscriptionForm/SubscriptionForm';\nexport { SubscriptionsTable } from './SubscriptionsTable/SubscriptionsTable';\nexport { Table } from './Table/Table';\nexport { TaxCard } from './TaxCard/TaxCard';\nexport { TaxForm } from './TaxForm/TaxForm';\nexport { TemplateForm } from './TemplateForm/TemplateForm';\nexport { TemplateConfigForm } from './TemplateConfigForm/TemplateConfigForm';\nexport { TransactionCard } from './TransactionCard/TransactionCard';\nexport { TransactionsTable } from './TransactionsTable/TransactionsTable';\nexport { UserForm } from './UserForm/UserForm';\nexport { UsersTable } from './UsersTable/UsersTable';\n"]}
|