@foxy.io/elements 1.14.2 → 1.15.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-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-coupon-card.js +1 -0
- package/dist/cdn/foxy-coupon-code-form.js +1 -0
- package/dist/cdn/foxy-coupon-codes-form.js +1 -0
- package/dist/cdn/foxy-coupon-form.js +1 -0
- 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 +4 -807
- 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-card.js +1 -1
- package/dist/cdn/foxy-donation.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-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -0
- 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-pagination.js +1 -0
- 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 -69
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +3 -3
- 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-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-74b9e1d1.js → shared-0bda8ecb.js} +1 -1
- package/dist/cdn/{shared-07abcd7b.js → shared-0fcdd1c4.js} +1 -1
- package/dist/cdn/{shared-a46edf4b.js → shared-30131f76.js} +1 -1
- package/dist/cdn/shared-36629ded.js +131 -0
- package/dist/cdn/{shared-bc2bfe52.js → shared-4038cb18.js} +1 -1
- package/dist/cdn/{shared-44cfc617.js → shared-423a4840.js} +1 -1
- package/dist/cdn/shared-4fa5f144.js +1 -0
- package/dist/cdn/shared-51b5e223.js +1 -0
- package/dist/cdn/{shared-593f7e2c.js → shared-51e28c83.js} +1 -1
- package/dist/cdn/shared-710ed658.js +134 -0
- package/dist/cdn/shared-800a5471.js +1 -0
- package/dist/cdn/{shared-8a7bee0d.js → shared-8f7a66c4.js} +1 -1
- package/dist/cdn/{shared-91e768be.js → shared-9af7b5f0.js} +1 -1
- package/dist/cdn/{shared-7a42073a.js → shared-a11160e7.js} +5 -5
- package/dist/cdn/{shared-5f54e916.js → shared-a4e6ecb0.js} +1 -1
- package/dist/cdn/{shared-6ebe3825.js → shared-a8d96c23.js} +1 -1
- package/dist/cdn/{shared-322e60b1.js → shared-b03b6d72.js} +1 -1
- package/dist/cdn/shared-b2330475.js +1 -0
- package/dist/cdn/{shared-1761daef.js → shared-c1dadefe.js} +1 -1
- package/dist/cdn/shared-c6a4b2d6.js +1 -0
- package/dist/cdn/shared-ccea5a33.js +69 -0
- package/dist/cdn/shared-cd3c902e.js +1 -0
- package/dist/cdn/{shared-34b2c1e2.js → shared-d3831f99.js} +1 -1
- package/dist/cdn/shared-d9a260f0.js +1 -0
- package/dist/cdn/{shared-b1fc5dc3.js → shared-f875a4f8.js} +1 -1
- package/dist/cdn/{shared-e7f8ffe9.js → shared-fb403e1f.js} +1 -1
- package/dist/cdn/shared-ff149b55.js +804 -0
- package/dist/cdn/translations/customer-portal/zh-hk.json +35 -0
- package/dist/cdn/translations/shared/en.json +105 -0
- package/dist/cdn/translations/shared/zh-hk.json +179 -0
- package/dist/elements/private/Checkbox/Checkbox.js +36 -22
- package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
- package/dist/elements/private/EditableList/EditableList.d.ts +20 -0
- package/dist/elements/private/EditableList/EditableList.js +123 -0
- package/dist/elements/private/EditableList/EditableList.js.map +1 -0
- package/dist/elements/public/CouponCard/CouponCard.d.ts +29 -0
- package/dist/elements/public/CouponCard/CouponCard.js +130 -0
- package/dist/elements/public/CouponCard/CouponCard.js.map +1 -0
- package/dist/elements/public/CouponCard/index.d.ts +5 -0
- package/dist/elements/public/CouponCard/index.js +7 -0
- package/dist/elements/public/CouponCard/index.js.map +1 -0
- package/dist/elements/public/CouponCard/types.d.ts +15 -0
- package/dist/elements/public/CouponCard/types.js +2 -0
- package/dist/elements/public/CouponCard/types.js.map +1 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +45 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +218 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -0
- package/dist/elements/public/CouponCodeForm/index.d.ts +8 -0
- package/dist/elements/public/CouponCodeForm/index.js +10 -0
- package/dist/elements/public/CouponCodeForm/index.js.map +1 -0
- package/dist/elements/public/CouponCodeForm/types.d.ts +15 -0
- package/dist/elements/public/CouponCodeForm/types.js +2 -0
- package/dist/elements/public/CouponCodeForm/types.js.map +1 -0
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +29 -0
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +209 -0
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -0
- package/dist/elements/public/CouponCodesForm/index.d.ts +8 -0
- package/dist/elements/public/CouponCodesForm/index.js +12 -0
- package/dist/elements/public/CouponCodesForm/index.js.map +1 -0
- package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.d.ts +14 -0
- package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js +48 -0
- package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js.map +1 -0
- package/dist/elements/public/CouponCodesForm/types.d.ts +16 -0
- package/dist/elements/public/CouponCodesForm/types.js +2 -0
- package/dist/elements/public/CouponCodesForm/types.js.map +1 -0
- package/dist/elements/public/CouponForm/CouponForm.d.ts +77 -0
- package/dist/elements/public/CouponForm/CouponForm.js +1266 -0
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -0
- package/dist/elements/public/CouponForm/index.d.ts +19 -0
- package/dist/elements/public/CouponForm/index.js +21 -0
- package/dist/elements/public/CouponForm/index.js.map +1 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.d.ts +19 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js +98 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js.map +1 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.d.ts +19 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js +51 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js.map +1 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.d.ts +19 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js +52 -0
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js.map +1 -0
- package/dist/elements/public/CouponForm/types.d.ts +27 -0
- package/dist/elements/public/CouponForm/types.js +2 -0
- package/dist/elements/public/CouponForm/types.js.map +1 -0
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +39 -0
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +197 -0
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -0
- package/dist/elements/public/GenerateCodesForm/index.d.ts +8 -0
- package/dist/elements/public/GenerateCodesForm/index.js +10 -0
- package/dist/elements/public/GenerateCodesForm/index.js.map +1 -0
- package/dist/elements/public/GenerateCodesForm/types.d.ts +24 -0
- package/dist/elements/public/GenerateCodesForm/types.js +2 -0
- package/dist/elements/public/GenerateCodesForm/types.js.map +1 -0
- package/dist/elements/public/I18n/format/date.js +7 -6
- package/dist/elements/public/I18n/format/date.js.map +1 -1
- package/dist/elements/public/I18n/format/discount.d.ts +6 -0
- package/dist/elements/public/I18n/format/discount.js +20 -0
- package/dist/elements/public/I18n/format/discount.js.map +1 -0
- package/dist/elements/public/I18n/format/index.js +4 -0
- package/dist/elements/public/I18n/format/index.js.map +1 -1
- package/dist/elements/public/I18n/format/ordinal.d.ts +6 -0
- package/dist/elements/public/I18n/format/ordinal.js +9 -0
- package/dist/elements/public/I18n/format/ordinal.js.map +1 -0
- package/dist/elements/public/Pagination/Pagination.d.ts +37 -0
- package/dist/elements/public/Pagination/Pagination.js +154 -0
- package/dist/elements/public/Pagination/Pagination.js.map +1 -0
- package/dist/elements/public/Pagination/index.d.ts +6 -0
- package/dist/elements/public/Pagination/index.js +8 -0
- package/dist/elements/public/Pagination/index.js.map +1 -0
- package/dist/elements/public/Table/Table.js +20 -5
- package/dist/elements/public/Table/Table.js.map +1 -1
- package/dist/elements/public/index.d.ts +6 -0
- package/dist/elements/public/index.defined.d.ts +6 -0
- package/dist/elements/public/index.defined.js +6 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +6 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +80 -4
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-00563cb0.js +0 -1
- package/dist/cdn/shared-1f1734cb.js +0 -264
- package/dist/cdn/shared-66cb6a36.js +0 -1
- package/dist/cdn/shared-9a40309d.js +0 -1
- package/dist/cdn/shared-9c099da6.js +0 -1
- package/dist/cdn/shared-ce1da35d.js +0 -1
- package/dist/cdn/shared-f1dc1c6c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CouponForm.js","sourceRoot":"","sources":["../../../../src/elements/public/CouponForm/CouponForm.ts"],"names":[],"mappings":"AAOA,OAAO,EAAU,IAAI,EAAE,iCAA8B;AACrD,OAAO,EAAwC,IAAI,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGlF,OAAO,EAAE,wBAAwB,EAAE,8CAA2C;AAC9E,OAAO,EAAE,QAAQ,EAAE,2CAAwC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,sDAAmD;AAEjF,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAGjE,OAAO,EAAE,YAAY,EAAE,mDAAgD;AAEvE,OAAO,EAAE,KAAK,EAAE,qCAAkC;AAGlD,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAElE,OAAO,EAAE,aAAa,EAAE,qDAAkD;AAI1E,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAE7D,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,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B,8BAAmB,GAAa;IACtD,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IAClD,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IAC1E,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;IAChE,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;CACnE,CAAC","sourcesContent":["import {\n Data,\n RulesTierFieldParams,\n RulesTierParams,\n RulesTierSelectParams,\n RulesTierSwitchParams,\n} from './types';\nimport { Option, Type } from '../QueryBuilder/types';\nimport { PropertyDeclarations, TemplateResult, html } from 'lit-element';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ButtonElement } from '@vaadin/vaadin-button';\nimport { CategoryRestrictionsPage } from './private/CategoryRestrictionsPage';\nimport { Checkbox } from '../../private/Checkbox/Checkbox';\nimport { CheckboxChangeEvent } from '../../private/Checkbox/CheckboxChangeEvent';\nimport { Column } from '../Table/types';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { DatePickerElement } from '@vaadin/vaadin-date-picker';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { EditableList } from '../../private/EditableList/EditableList';\nimport { FormDialog } from '../FormDialog';\nimport { Group } from '../../private/Group/Group';\nimport { IntegerFieldElement } from '@vaadin/vaadin-text-field/vaadin-integer-field';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { NucleonV8N } from '../NucleonElement/types';\nimport { PropertyTable } from '../../private/PropertyTable/PropertyTable';\nimport { QueryBuilder } from '../QueryBuilder/QueryBuilder';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { live } from 'lit-html/directives/live';\nimport { operatorGreaterThanOrEqual } from '../QueryBuilder/icons/operatorGreaterThanOrEqual';\nimport { repeat } from 'lit-html/directives/repeat';\nimport { serializeDate } from '../../../utils/serialize-date';\n\nconst NS = 'coupon-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(ResponsiveMixin(TranslatableMixin(NucleonElement, NS))))\n);\n\n/**\n * Form element for creating or editing coupons (`fx:coupon`).\n *\n * @slot name:before\n * @slot name:after\n *\n * @slot rules:before\n * @slot rules:after\n *\n * @slot codes:before\n * @slot codes:after\n *\n * @slot usage:before\n * @slot usage:after\n *\n * @slot product-restrictions:before\n * @slot product-restrictions:after\n *\n * @slot category-restrictions:before\n * @slot category-restrictions:after\n *\n * @slot options:before\n * @slot options:after\n *\n * @slot timestamps:before\n * @slot timestamps:after\n *\n * @slot delete:before\n * @slot delete:after\n *\n * @slot create:before\n * @slot create:after\n *\n * @element foxy-coupon-form\n * @since 1.15.0\n */\nexport class CouponForm extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'vaadin-integer-field': customElements.get('vaadin-integer-field'),\n 'vaadin-date-picker': customElements.get('vaadin-date-picker'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-button': customElements.get('vaadin-button'),\n\n 'iron-dropdown': customElements.get('iron-dropdown'),\n 'iron-icon': customElements.get('iron-icon'),\n\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-query-builder': customElements.get('foxy-query-builder'),\n 'foxy-form-dialog': customElements.get('foxy-form-dialog'),\n 'foxy-pagination': customElements.get('foxy-pagination'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-table': customElements.get('foxy-table'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n\n 'x-category-restrictions-page': CategoryRestrictionsPage,\n 'x-property-table': PropertyTable,\n 'x-editable-list': EditableList,\n 'x-checkbox': Checkbox,\n 'x-group': Group,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __codesTableQuery: { attribute: false },\n __itemCategories: { attribute: false },\n };\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ name: v }) => !!v || 'name_required',\n ({ name: v }) => !v || v.length <= 50 || 'name_too_long',\n ];\n }\n\n private __codesTableColumns: Column<Resource<Rels.CouponCodes>>[] = [\n {\n header: ctx => html`<foxy-i18n lang=${ctx.lang} key=\"code\" ns=${ctx.ns}></foxy-i18n>`,\n cell: ctx => html`\n <vaadin-button\n theme=\"tertiary contrast\"\n class=\"p-0\"\n @click=${(evt: CustomEvent) => {\n const dialog = this.renderRoot.querySelector<FormDialog>('#code-dialog')!;\n const button = evt.currentTarget as ButtonElement;\n\n dialog.href = ctx.data._links.self.href;\n dialog.show(button);\n }}\n >\n <span class=\"font-tnum\">${ctx.data.code}</span>\n </vaadin-button>\n `,\n },\n {\n header: ctx => html`<foxy-i18n lang=${ctx.lang} key=\"date_created\" ns=${ctx.ns}></foxy-i18n>`,\n cell: ctx => html`\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_created })}\n class=\"text-tertiary\"\n lang=${ctx.lang}\n key=\"date\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n `,\n },\n {\n hideBelow: 'sm',\n header: c => html`<foxy-i18n lang=${c.lang} key=\"date_modified\" ns=${c.ns}></foxy-i18n>`,\n cell: ctx => html`\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_modified })}\n class=\"text-tertiary\"\n lang=${ctx.lang}\n key=\"date\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n `,\n },\n {\n header: c => html`<foxy-i18n lang=${c.lang} key=\"used_codes\" ns=${c.ns}></foxy-i18n>`,\n cell: ctx => html`${ctx.data.number_of_uses_to_date}`,\n },\n ];\n\n private static readonly __codesQueryOptions: Option[] = [\n { label: 'code', path: 'code', type: Type.String },\n { label: 'used_codes', path: 'number_of_uses_to_date', type: Type.Number },\n { label: 'date_created', path: 'date_created', type: Type.Date },\n { label: 'date_modified', path: 'date_modified', type: Type.Date },\n ];\n\n private __codesTableQuery: string | null = null;\n\n private __itemCategories = '';\n\n render(): TemplateResult {\n const hidden = this.hiddenSelector;\n\n return html`\n <div class=\"relative space-y-l\">\n ${hidden.matches('name', true) ? '' : this.__renderName()}\n ${hidden.matches('rules', true) ? '' : this.__renderRules()}\n ${hidden.matches('codes', true) || !this.data ? '' : this.__renderCodes()}\n ${hidden.matches('usage', true) ? '' : this.__renderUsage()}\n ${hidden.matches('product-restrictions', true) ? '' : this.__renderProductRestrictions()}\n ${hidden.matches('category-restrictions', true) || !this.data\n ? ''\n : this.__renderCategoryRestrictions()}\n ${hidden.matches('options', true) ? '' : this.__renderOptions()}\n ${hidden.matches('timestamps', true) ? '' : this.__renderTimestamps()}\n ${hidden.matches('create', true) || !!this.data ? '' : this.__renderCreate()}\n ${hidden.matches('delete', true) || !this.data ? '' : this.__renderDelete()}\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': !this.in('busy') && !this.in('fail'),\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=${this.in('fail') ? 'error' : this.in('busy') ? 'busy' : 'empty'}\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n protected async _sendGet(): Promise<Data> {\n type Store = Resource<Rels.Store>;\n\n const coupon = await super._sendGet();\n const store = await super._fetch<Store>(coupon._links['fx:store'].href);\n const categoriesURL = new URL(store._links['fx:item_categories'].href);\n\n categoriesURL.searchParams.set('limit', '5');\n this.__itemCategories = categoriesURL.toString();\n\n return coupon;\n }\n\n private __getErrorMessage(prefix: string) {\n const error = this.errors.find(err => err.startsWith(prefix));\n return error ? this.t(error.replace(prefix, 'v8n')).toString() : '';\n }\n\n private __getValidator(prefix: string) {\n return () => !this.errors.some(err => err.startsWith(prefix));\n }\n\n private __renderName() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('name:before')}\n\n <vaadin-text-field\n error-message=${this.__getErrorMessage('name')}\n helper-text=${this.t('coupon_name_helper_text')}\n data-testid=\"name\"\n class=\"w-full\"\n label=${this.t('name')}\n .checkValidity=${this.__getValidator('name')}\n .value=${this.form.name}\n ?disabled=${this.in('busy') || this.disabledSelector.matches('name', true)}\n ?readonly=${this.readonlySelector.matches('name', true)}\n required\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n const newName = (evt.currentTarget as TextFieldElement).value;\n this.edit({ name: newName });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot('name:after')}\n </div>\n `;\n }\n\n private __renderRulesPreset() {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n const isReadonly = this.readonlySelector.matches('rules', true);\n const details = this.form.coupon_discount_details;\n const type = this.form.coupon_discount_type;\n\n const presets = [\n { type: 'quantity_amount', details: 'allunits|2-2' },\n { type: 'quantity_percentage', details: 'allunits|5-10|10-20' },\n { type: 'quantity_amount', details: 'incremental|3-5' },\n { type: 'quantity_percentage', details: 'incremental|11-10|51-15|101-20' },\n { type: 'quantity_percentage', details: 'repeat|2-100' },\n { type: 'quantity_percentage', details: 'repeat|4-50' },\n { type: 'quantity_amount', details: 'single|5-10' },\n { type: 'price_percentage', details: 'single|99.99-10' },\n ] as const;\n\n const selectedPreset = presets.find(p => p.details === details && p.type === type);\n\n return html`\n <label\n class=${classMap({\n 'whitespace-nowrap block ring-primary-50 rounded px-xs -mx-xs transition-colors': true,\n 'text-body hover-text-primary focus-within-ring-2': !isDisabled && !isReadonly,\n 'text-disabled': isDisabled,\n 'text-secondary': isReadonly,\n })}\n >\n <foxy-i18n class=\"sr-only\" lang=${this.lang} key=\"preset\" ns=${this.ns}></foxy-i18n>\n\n <span class=\"relative font-medium flex items-center\">\n <span class=\"truncate\">\n ${selectedPreset\n ? this.t('discount_summary', { params: selectedPreset })\n : this.t('custom_discount')}\n </span>\n\n <iron-icon class=\"icon-inline text-xl ml-xs -mr-xs\" icon=\"icons:expand-more\"></iron-icon>\n\n <select\n class=\"opacity-0 absolute inset-0 focus-outline-none\"\n ?disabled=${isDisabled || isReadonly}\n @change=${(evt: Event) => {\n const select = evt.currentTarget as HTMLSelectElement;\n const preset = presets[select.selectedIndex];\n\n this.edit({\n coupon_discount_details: preset?.details ?? '',\n coupon_discount_type: preset?.type ?? 'quantity_amount',\n });\n }}\n >\n ${presets.map(option => {\n return html`\n <option value=${option.details} ?selected=${option === selectedPreset}>\n ${this.t('discount_summary', { params: option })}\n </option>\n `;\n })}\n\n <option value=\"custom\" ?selected=${!selectedPreset}>\n ${this.t('custom_discount')}\n </option>\n </select>\n </span>\n </label>\n `;\n }\n\n private __renderRulesTierSelect({ label, value, options, onChange }: RulesTierSelectParams) {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n const isReadonly = this.readonlySelector.matches('rules', true);\n const isInteractive = !isDisabled && !isReadonly;\n\n return html`\n <label\n class=${classMap({\n 'h-xs whitespace-nowrap block ring-primary-50 rounded pl-s transition-colors': true,\n 'hover-bg-primary hover-text-primary-contrast focus-within-ring-2': isInteractive,\n 'bg-primary-10 text-primary': isInteractive,\n 'bg-contrast-5 text-disabled': isDisabled,\n 'bg-contrast-5 text-secondary': isReadonly && !isDisabled,\n })}\n >\n <foxy-i18n class=\"sr-only\" lang=${this.lang} key=${label} ns=${this.ns}></foxy-i18n>\n\n <span class=\"relative leading-none font-medium flex items-center h-full\">\n <span class=\"truncate\">${this.t(options[value])}</span>\n <iron-icon class=\"icon-inline text-xl ml-xs\" icon=\"icons:expand-more\"></iron-icon>\n\n <select\n class=\"opacity-0 absolute inset-0 focus-outline-none\"\n ?disabled=${!isInteractive}\n @change=${(evt: Event) => {\n const select = evt.currentTarget as HTMLSelectElement;\n onChange(select.options[select.selectedIndex].value);\n }}\n >\n ${Object.entries(options).map(([optionValue, optionKey]) => {\n return html`\n <option value=${optionValue} ?selected=${optionValue === value}>\n ${this.t(optionKey)}\n </option>\n `;\n })}\n </select>\n </span>\n </label>\n `;\n }\n\n private __renderRulesTierSwitch({ value, options, onChange }: RulesTierSwitchParams) {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n const isReadonly = this.readonlySelector.matches('rules', true);\n const isInteractive = !isDisabled && !isReadonly;\n const name = `switch-${Math.floor(Math.random() * Math.pow(10, 10))}`;\n const dotStyle = 'width: 0.4rem; height: 0.4rem';\n\n return html`\n <div\n class=${classMap({\n 'h-xs px-xs space-x-xs flex items-center rounded transition-colors': true,\n 'hover-bg-primary hover-text-primary-contrast focus-within-ring-2': isInteractive,\n 'ring-primary-50 cursor-pointer bg-primary-10 text-primary': isInteractive,\n 'bg-contrast-5 text-disabled': isDisabled,\n 'bg-contrast-5 text-secondary': isReadonly && !isDisabled,\n })}\n @click=${(evt: Event) => {\n if (!isInteractive) return;\n\n const target = evt.currentTarget as HTMLDivElement;\n const firstInput = target.querySelector('input') as HTMLInputElement;\n\n firstInput.focus();\n onChange(value === 0 ? 1 : 0);\n }}\n >\n <div class=\"leading-none font-medium px-xs pointer-events-none\">\n ${options.map((option, optionIndex) => {\n return html`\n <label>\n <foxy-i18n\n class=${classMap({ 'sr-only': optionIndex !== value })}\n lang=${this.lang}\n key=${option}\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <input\n class=\"sr-only\"\n value=${option}\n name=${name}\n type=\"radio\"\n ?disabled=${!isInteractive}\n ?checked=${optionIndex === value}\n @change=${(evt: Event) => {\n const input = evt.currentTarget as HTMLInputElement;\n if (input.checked) onChange(optionIndex);\n }}\n />\n </label>\n `;\n })}\n </div>\n\n <div class=\"flex justify-evenly h-full ${value ? 'flex-col-reverse' : 'flex-col'}\">\n <div style=${dotStyle} class=\"bg-current rounded-full\"></div>\n <div style=${dotStyle} class=\"border border-current rounded-full\"></div>\n </div>\n </div>\n `;\n }\n\n private __renderRulesTierField({ value, label, onChange }: RulesTierFieldParams) {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n const isReadonly = this.readonlySelector.matches('rules', true);\n const isInteractive = !isDisabled && !isReadonly;\n\n return html`\n <label>\n <foxy-i18n class=\"sr-only\" lang=${this.lang} key=${label} ns=${this.ns}></foxy-i18n>\n <input\n class=${classMap({\n 'transition-colors border p-xs h-xs font-medium text-m rounded w-xl': true,\n 'ring-primary-50 text-body bg-contrast-10': isInteractive,\n 'hover-bg-contrast-20': isInteractive,\n 'focus-outline-none focus-ring-2': isInteractive,\n 'text-disabled bg-contrast-5': isDisabled,\n 'text-secondary': isReadonly && !isDisabled,\n 'border-transparent border-solid': !isReadonly,\n 'border-dashed border-contrast-30': isReadonly,\n })}\n type=\"number\"\n min=\"0\"\n ?disabled=${!isInteractive}\n .value=${value}\n @input=${(evt: InputEvent) => {\n const input = evt.currentTarget as HTMLInputElement;\n onChange(input.value);\n }}\n />\n </label>\n `;\n }\n\n private __renderRulesTier(params: RulesTierParams) {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n const isReadonly = this.readonlySelector.matches('rules', true);\n const tier = params.tier ?? '0-0';\n const sign = tier.includes('+') ? '+' : '-';\n const [from, adjustment] = tier.split(/[-+]/).map(v => parseFloat(v));\n\n return html`\n <div\n aria-label=${this.t('tier')}\n class=${classMap({\n 'flex items-start justify-between rounded-t-l rounded-b-l': true,\n 'border border-contrast-10': true,\n 'border-dashed': !params.tier,\n })}\n >\n <div\n class=${classMap({\n 'transition-colors flex flex-wrap items-center gap-s p-s': true,\n 'text-tertiary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n >\n <foxy-i18n\n class=\"uppercase text-s font-semibold\"\n lang=${this.lang}\n key=\"tier_if\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${this.__renderRulesTierSwitch({\n options: ['total', 'quantity'],\n value: params.source === 'price' ? 0 : 1,\n onChange: i => params.onChange({ source: i ? 'quantity' : 'price' }),\n })}\n\n <div class=\"h-s w-s\">${operatorGreaterThanOrEqual}</div>\n\n ${this.__renderRulesTierField({\n label: 'from',\n value: String(from),\n onChange: v => params.onChange({ tier: `${v}${sign}${adjustment}` }),\n })}\n\n <foxy-i18n\n class=\"uppercase text-s font-semibold\"\n lang=${this.lang}\n key=\"tier_then\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${this.__renderRulesTierSwitch({\n options: ['reduce', 'increase'],\n value: sign === '-' ? 0 : 1,\n onChange: i => params.onChange({ tier: `${from}${i ? '+' : '-'}${adjustment}` }),\n })}\n\n <!---->\n\n ${this.__renderRulesTierSelect({\n options: {\n incremental: 'tier_incremental',\n allunits: 'tier_allunits',\n repeat: 'tier_repeat',\n single: 'tier_single',\n },\n value: params.method,\n label: 'target',\n onChange: v => params.onChange({ method: v }),\n })}\n\n <foxy-i18n\n class=\"uppercase text-s font-semibold\"\n lang=${this.lang}\n key=\"tier_by\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${this.__renderRulesTierField({\n label: 'adjustment',\n value: String(adjustment),\n onChange: v => params.onChange({ tier: `${from}${sign}${v}` }),\n })}\n\n <!---->\n\n ${this.__renderRulesTierSwitch({\n value: params.units === 'percentage' ? 0 : 1,\n options: ['%', '¤'],\n onChange: i => params.onChange({ units: i ? 'amount' : 'percentage' }),\n })}\n </div>\n\n ${params.tier\n ? html`\n <button\n aria-label=${this.t('delete')}\n class=${classMap({\n 'w-s h-s m-s flex-shrink-0 rounded transition-colors ring-primary-50': true,\n 'text-tertiary hover-text-secondary focus-outline-none focus-ring-2': !isDisabled,\n 'text-disabled cursor-default': isDisabled,\n })}\n ?disabled=${isDisabled}\n ?hidden=${isReadonly}\n @click=${() => params.onDelete()}\n >\n <iron-icon icon=\"lumo:cross\"></iron-icon>\n </button>\n `\n : ''}\n </div>\n `;\n }\n\n private __renderRulesUrlParameter() {\n const name = this.form.name ?? '';\n const type = this.form.coupon_discount_type ?? 'quantity_amount';\n const details = this.form.coupon_discount_details ?? '';\n const urlParameter = `discount_${type}=${encodeURIComponent(`${name}{${details}}`)}`;\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n\n return html`\n <div class=\"text-xs flex space-x-xs leading-m\">\n <span\n class=${classMap({\n 'flex-shrink-0 transition-colors': true,\n 'text-tertiary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n >\n <foxy-i18n lang=${this.lang} key=\"url_parameter\" ns=${this.ns}></foxy-i18n>:\n </span>\n\n <code\n class=${classMap({\n 'bg-contrast-5 transition-colors monospace truncate rounded px-xs': true,\n 'text-secondary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n >\n ${urlParameter}\n </code>\n\n <button\n class=${classMap({\n 'flex-shrink-0 transition-colors font-medium rounded px-xs': true,\n 'ring-primary-50 bg-primary-10 text-primary': !isDisabled,\n 'text-disabled bg-contrast-5': isDisabled,\n 'focus-outline-none focus-ring-2': !isDisabled,\n 'hover-bg-primary hover-text-primary-contrast': !isDisabled,\n })}\n ?disabled=${isDisabled}\n @click=${({ currentTarget }: { currentTarget: HTMLButtonElement }) => {\n navigator.clipboard\n .writeText(urlParameter)\n .then(() => (currentTarget.textContent = this.t('copied')))\n .catch(() => (currentTarget.textContent = this.t('error')))\n .then(() => setTimeout(() => (currentTarget.textContent = this.t('copy')), 2000));\n }}\n >\n ${this.t('copy')}\n </button>\n </div>\n `;\n }\n\n private __renderRulesDescription() {\n const type = this.form.coupon_discount_type ?? 'quantity_amount';\n const details = this.form.coupon_discount_details ?? '';\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n\n return html`\n <div class=\"text-xs leading-m\">\n <span class=\"transition-colors ${isDisabled ? 'text-disabled' : 'text-tertiary'}\">\n <foxy-i18n lang=${this.lang} key=\"description\" ns=${this.ns}></foxy-i18n>:\n </span>\n\n <foxy-i18n\n options=${JSON.stringify({ params: { details, type } })}\n class=\"transition-colors ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${this.lang}\n key=\"discount_summary\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n }\n\n private __renderRules() {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('rules', true);\n\n const details = this.form.coupon_discount_details ?? '';\n const tiers = details.split('|').filter(v => !!v.trim());\n const method = (/[-+]/.test(tiers[0]) ? null : tiers.shift()) ?? 'single';\n\n const type = this.form.coupon_discount_type ?? 'quantity_amount';\n const [source, units] = type.split('_');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('rules:before')}\n\n <div>\n <div class=\"flex items-center justify-between space-x-m text-s mb-xs\">\n <foxy-i18n\n class=${classMap({\n 'transition-colors font-medium flex-1': true,\n 'text-secondary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n lang=${this.lang}\n key=\"rule_plural\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div class=\"min-w-0\">${this.__renderRulesPreset()}</div>\n </div>\n\n <div class=\"space-y-s\">\n ${repeat([...tiers, undefined], (tier, tierIndex) => {\n const onChange = (changedParams: Partial<RulesTierParams>) => {\n const newMethod = changedParams.method ?? method;\n const newSource = changedParams.source ?? source;\n const newUnits = changedParams.units ?? units;\n const newTier = changedParams.tier;\n const newTiers = [...tiers];\n\n if (newTier) {\n const newTierIndex = tier ? tierIndex : newTiers.length;\n const oldTiersCount = tier ? 1 : 0;\n newTiers.splice(newTierIndex, oldTiersCount, newTier);\n }\n\n this.edit({\n coupon_discount_details: `${newMethod}|${newTiers.join('|')}`,\n coupon_discount_type: `${newSource}_${newUnits}` as Data['coupon_discount_type'],\n });\n };\n\n const onDelete = () => {\n const newTiers = tiers.filter((_, i) => i !== tierIndex);\n this.edit({ coupon_discount_details: `${method}|${newTiers.join('|')}` });\n };\n\n return this.__renderRulesTier({ source, method, units, tier, onChange, onDelete });\n })}\n </div>\n\n <div class=\"space-y-xs mt-m\">\n ${this.__renderRulesUrlParameter()} ${this.__renderRulesDescription()}\n </div>\n </div>\n\n ${this.renderTemplateOrSlot('rules:after')}\n </div>\n `;\n }\n\n private __renderCodes() {\n const { disabledSelector, group, data, lang, ns } = this;\n\n const isDisabled = !this.in('idle') || disabledSelector.matches('codes', true);\n const filters = this.__codesTableQuery;\n const url = new URL(data!._links['fx:coupon_codes'].href);\n\n new URLSearchParams(filters ?? '').forEach((value, name) => url.searchParams.set(name, value));\n url.searchParams.set('limit', '5');\n\n const filterButtonLabel = filters === null ? 'filter' : 'clear_filters';\n const filterButtonIcon = `icons:${filters === null ? 'filter-list' : 'clear'}`;\n\n return html`\n <foxy-form-dialog\n disabledcontrols=${disabledSelector.zoom('codes:generate:form').toString()}\n readonlycontrols=${this.readonlySelector.zoom('codes:generate:form').toString()}\n hiddencontrols=\"save-button ${this.hiddenSelector.zoom('codes:generate:form').toString()}\"\n related=${JSON.stringify([url.toString()])}\n header=\"generate\"\n parent=${data?._links['fx:generate_codes'].href ?? ''}\n group=${group}\n lang=${lang}\n form=\"foxy-generate-codes-form\"\n ns=${ns}\n id=\"generate-codes-dialog\"\n alert\n >\n </foxy-form-dialog>\n\n <foxy-form-dialog\n disabledcontrols=${disabledSelector.zoom('codes:form').toString()}\n readonlycontrols=${this.readonlySelector.zoom('codes:form').toString()}\n hiddencontrols=${this.hiddenSelector.zoom('codes:form').toString()}\n header=\"code\"\n parent=${url.toString()}\n group=${group}\n lang=${lang}\n form=\"foxy-coupon-code-form\"\n ns=${ns}\n id=\"code-dialog\"\n >\n </foxy-form-dialog>\n\n <foxy-form-dialog\n disabledcontrols=${disabledSelector.zoom('codes:import:form').toString()}\n readonlycontrols=${this.readonlySelector.zoom('codes:import:form').toString()}\n hiddencontrols=\"save-button ${this.hiddenSelector.zoom('codes:generate:form').toString()}\"\n header=\"import\"\n parent=${data!._links['fx:coupon_codes'].href}\n group=${group}\n lang=${lang}\n form=\"foxy-coupon-codes-form\"\n ns=${ns}\n id=\"import-dialog\"\n >\n </foxy-form-dialog>\n\n <div>\n ${this.renderTemplateOrSlot('codes:before')}\n\n <div class=\"flex items-center justify-between mb-xs space-x-s\">\n <foxy-i18n\n class=\"text-s font-medium text-secondary leading-none flex-1\"\n lang=${lang}\n key=\"code_plural\"\n ns=${ns}\n >\n </foxy-i18n>\n\n <vaadin-button\n theme=\"success tertiary small\"\n ?disabled=${isDisabled}\n @click=${(evt: CustomEvent) => {\n const dialog = this.renderRoot.querySelector<FormDialog>('#generate-codes-dialog');\n const button = evt.currentTarget as ButtonElement;\n dialog?.show(button);\n }}\n >\n <foxy-i18n class=\"text-s\" lang=${lang} key=\"generate\" ns=${ns}></foxy-i18n>\n <iron-icon class=\"icon-inline text-s\" icon=\"icons:add\"></iron-icon>\n </vaadin-button>\n\n <vaadin-button\n theme=\"contrast tertiary small\"\n ?disabled=${isDisabled}\n @click=${(evt: CustomEvent) => {\n const dialog = this.renderRoot.querySelector<FormDialog>('#import-dialog');\n const button = evt.currentTarget as ButtonElement;\n dialog?.show(button);\n }}\n >\n <foxy-i18n class=\"text-s\" lang=${lang} key=\"import\" ns=${ns}></foxy-i18n>\n <iron-icon class=\"icon-inline text-s\" icon=\"icons:open-in-browser\"></iron-icon>\n </vaadin-button>\n\n <vaadin-button\n theme=\"contrast ${filters === null ? 'tertiary' : ''} small\"\n ?disabled=${isDisabled}\n @click=${() => (this.__codesTableQuery = filters === null ? '' : null)}\n >\n <foxy-i18n class=\"text-s\" lang=${lang} key=${filterButtonLabel} ns=${ns}></foxy-i18n>\n <iron-icon class=\"icon-inline text-s\" icon=${filterButtonIcon}></iron-icon>\n </vaadin-button>\n </div>\n\n <foxy-query-builder\n class=\"bg-contrast-5 rounded-tl-l rounded-tr-s rounded-b-l p-m mb-s\"\n lang=${lang}\n ns=${ns}\n ?disabled=${isDisabled}\n ?hidden=${filters === null}\n .options=${CouponForm.__codesQueryOptions}\n .value=${filters}\n @change=${(evt: CustomEvent) => {\n const queryBuilder = evt.currentTarget as QueryBuilder;\n this.__codesTableQuery = queryBuilder.value;\n }}\n >\n </foxy-query-builder>\n\n <foxy-pagination first=${url.toString()} lang=${lang} ns=${ns} ?disabled=${isDisabled}>\n <foxy-table\n class=\"px-m mb-s border border-contrast-10 rounded-t-l rounded-b-l\"\n group=${group}\n lang=${lang}\n ns=${ns}\n .columns=${this.__codesTableColumns}\n >\n </foxy-table>\n </foxy-pagination>\n\n ${this.renderTemplateOrSlot('codes:after')}\n </div>\n `;\n }\n\n private __renderUsage() {\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('usage', true);\n const isReadonly = this.readonlySelector.matches('usage', true);\n const usesPerCoupon = this.form.number_of_uses_allowed ?? 0;\n const usesPerCustomer = this.form.number_of_uses_allowed_per_customer ?? 0;\n const usesPerCouponCode = this.form.number_of_uses_allowed_per_code ?? 0;\n\n return html`\n ${this.renderTemplateOrSlot('usage:before')}\n\n <div class=\"space-y-s\">\n <div class=\"grid gap-m grid-cols-3\">\n <vaadin-integer-field\n placeholder=${this.t('unlimited')}\n label=${this.t('uses_per_coupon')}\n class=\"w-full\"\n min=\"0\"\n prevent-invalid-input\n has-controls\n .value=${usesPerCoupon || ''}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as IntegerFieldElement;\n this.edit({ number_of_uses_allowed: parseInt(field.value) });\n }}\n >\n </vaadin-integer-field>\n\n <vaadin-integer-field\n placeholder=${this.t('unlimited')}\n label=${this.t('uses_per_coupon_code')}\n class=\"w-full\"\n min=\"0\"\n prevent-invalid-input\n has-controls\n .value=${usesPerCouponCode || ''}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as IntegerFieldElement;\n this.edit({ number_of_uses_allowed_per_code: parseInt(field.value) });\n }}\n >\n </vaadin-integer-field>\n\n <vaadin-integer-field\n placeholder=${this.t('unlimited')}\n label=${this.t('uses_per_customer')}\n class=\"w-full\"\n min=\"0\"\n prevent-invalid-input\n has-controls\n .value=${usesPerCustomer || ''}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as IntegerFieldElement;\n this.edit({ number_of_uses_allowed_per_customer: parseInt(field.value) });\n }}\n >\n </vaadin-integer-field>\n </div>\n\n <div\n class=${classMap({\n 'transition-colors text-xs leading-s': true,\n 'text-secondary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n >\n <foxy-i18n\n options=${JSON.stringify({ count: usesPerCoupon })}\n lang=${this.lang}\n key=\"uses_per_coupon_summary${usesPerCoupon ? '' : '_0'}\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <foxy-i18n\n options=${JSON.stringify({ count: usesPerCouponCode })}\n lang=${this.lang}\n key=\"uses_per_coupon_code_summary${usesPerCouponCode ? '' : '_0'}\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <foxy-i18n\n options=${JSON.stringify({ count: usesPerCustomer })}\n lang=${this.lang}\n key=\"uses_per_customer_summary${usesPerCustomer ? '' : '_0'}\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n </div>\n\n ${this.renderTemplateOrSlot('usage:after')}\n `;\n }\n\n private __renderProductRestrictions() {\n const scope = 'product-restrictions';\n const isDisabled = !this.in('idle') || this.disabledSelector.matches(scope, true);\n const isReadonly = this.readonlySelector.matches(scope, true);\n const restrictions = this.form.product_code_restrictions ?? '';\n\n const groups = [\n { header: 'allow', items: [] as { label?: string; value: string }[] },\n { header: 'block', items: [] as { label?: string; value: string }[] },\n ];\n\n if (restrictions) {\n restrictions.split(',').forEach(value => {\n const isBlocklistValue = value.startsWith('-');\n const target = isBlocklistValue ? 1 : 0;\n const label = isBlocklistValue ? value.substring(1) : value;\n\n groups[target].items.push({ label, value });\n });\n }\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('product-restrictions:before')}\n\n <div class=\"space-y-s\">\n <x-group frame>\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-secondary'}\n slot=\"header\"\n lang=${this.lang}\n key=\"product_restrictions\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div class=\"grid sm-grid-cols-2 bg-contrast-10\" style=\"gap: 1px\">\n ${groups.map((group, index) => {\n return html`\n <x-group class=\"bg-base pt-m\">\n <foxy-i18n\n class=${isDisabled ? 'text-disabled' : 'text-tertiary'}\n slot=\"header\"\n lang=${this.lang}\n key=${group.header}\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <x-editable-list\n lang=${this.lang}\n ns=${this.ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .items=${group.items}\n @change=${(evt: CustomEvent) => {\n const newItemsByGroup = [\n index === 0 ? (evt.currentTarget as EditableList).items : groups[0].items,\n index === 1 ? (evt.currentTarget as EditableList).items : groups[1].items,\n ];\n\n const newSanitizedItemsByGroup = newItemsByGroup\n .map(list => list.map(v => v.value.replace(/^[\\s-]*/, '').trimEnd()))\n .map(list => list.filter(v => !!v))\n .map(list => Array.from(new Set(list)));\n\n const newRestrictions = newSanitizedItemsByGroup[0]\n .concat(newSanitizedItemsByGroup[1].map(v => `-${v}`))\n .join(',');\n\n this.edit({ product_code_restrictions: newRestrictions });\n }}\n >\n </x-editable-list>\n </x-group>\n `;\n })}\n </div>\n </x-group>\n\n <foxy-i18n\n class=${classMap({\n 'block text-xs leading-s transition-colors': true,\n 'text-secondary': !isDisabled,\n 'text-disabled': isDisabled,\n })}\n lang=${this.lang}\n key=\"product_restrictions_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('product-restrictions:after')}\n </div>\n `;\n }\n\n private __renderCategoryRestrictions() {\n const scope = 'category-restrictions';\n const isDisabled = !this.in('idle') || this.disabledSelector.matches(scope, true);\n const isReadonly = this.readonlySelector.matches(scope, true);\n\n return html`\n ${this.renderTemplateOrSlot('category-restrictions:before')}\n\n <div class=\"space-y-xs\">\n <foxy-pagination\n first=${this.__itemCategories}\n lang=${this.lang}\n ns=${this.ns}\n ?disabled=${isDisabled}\n >\n <foxy-i18n\n class=\"block text-s font-medium text-secondary leading-none mb-s\"\n lang=${this.lang}\n key=\"category_restrictions\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <x-category-restrictions-page\n coupon-item-categories=${ifDefined(this.data?._links['fx:coupon_item_categories'].href)}\n coupon=${this.href}\n class=\"border border-contrast-10 rounded-t-l rounded-b-l mb-s\"\n group=${this.group}\n lang=${this.lang}\n ns=${this.ns}\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n >\n </x-category-restrictions-page>\n </foxy-pagination>\n\n <foxy-i18n\n class=\"block text-xs leading-s text-tertiary\"\n lang=${this.lang}\n key=\"category_restrictions_helper_text\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.renderTemplateOrSlot('category-restrictions:after')}\n `;\n }\n\n private __renderOptions() {\n type Option = { param: keyof Data; label?: string; flip?: boolean };\n\n const isDisabled = !this.in('idle') || this.disabledSelector.matches('options', true);\n const isReadonly = this.readonlySelector.matches('options', true);\n const options: Option[] = [\n { param: 'multiple_codes_allowed' },\n { param: 'combinable' },\n { param: 'exclude_category_discounts', label: 'combine_with_category_discounts', flip: true },\n { param: 'exclude_line_item_discounts', label: 'combine_with_line_discounts', flip: true },\n { param: 'is_taxable', label: 'apply_taxes_before_coupon' },\n ];\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('options:before')}\n\n <x-group frame>\n <foxy-i18n\n class=\"transition-colors ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n slot=\"header\"\n lang=${this.lang}\n key=\"option_plural\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n ${options.map(option => {\n const value = this.form[option.param];\n const label = option.label ?? option.param;\n const color = isDisabled ? 'text-disabled' : 'text-secondary';\n\n return html`\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${option.flip ? !value : value}\n class=\"m-m\"\n @change=${(evt: CheckboxChangeEvent) => {\n this.edit({ [option.param]: option.flip ? !evt.detail : evt.detail });\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${this.lang} key=${label} ns=${this.ns}></foxy-i18n>\n <foxy-i18n\n class=\"transition-colors text-xs leading-s ${color}\"\n lang=${this.lang}\n key=\"${label}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n </x-checkbox>\n\n <div style=\"margin-left: calc(1.125rem + (var(--lumo-space-m) * 2))\">\n <div class=\"border-b border-contrast-10\"></div>\n </div>\n `;\n })}\n\n <x-checkbox\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n ?checked=${this.form.start_date || this.form.end_date}\n class=\"m-m\"\n @change=${(evt: Event) => {\n if (evt instanceof CheckboxChangeEvent) {\n let startDate: string | null = null;\n let endDate: string | null = null;\n\n if (evt.detail) {\n const today = Date.now();\n const oneMonthFromToday = new Date(today).setMonth(new Date().getMonth() + 1);\n\n startDate = serializeDate(new Date(today));\n endDate = serializeDate(new Date(oneMonthFromToday));\n }\n\n // TODO: remove ts directive when sdk types are fixed\n // @ts-expect-error sdk types don't include null\n this.edit({ start_date: startDate, end_date: endDate });\n }\n }}\n >\n <div class=\"flex flex-col\">\n <foxy-i18n lang=${this.lang} key=\"set_time_constraints\" ns=${this.ns}></foxy-i18n>\n <foxy-i18n\n class=\"text-xs leading-s ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${this.lang}\n key=\"set_time_constraints_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n\n ${this.form.start_date || this.form.end_date\n ? html`\n <div class=\"grid grid-cols-2 gap-m mt-m\" slot=\"content\">\n ${(['start_date', 'end_date'] as const).map(property => {\n const formValue = this.form[property];\n const pickerValue = formValue ? serializeDate(new Date(formValue)) : '';\n\n return html`\n <vaadin-date-picker\n placeholder=${this.t('select')}\n label=${this.t(property)}\n clear-button-visible\n ?disabled=${isDisabled}\n ?readonly=${isReadonly}\n .value=${live(pickerValue)}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as DatePickerElement;\n this.edit({ [property]: field.value });\n }}\n >\n </vaadin-date-picker>\n `;\n })}\n </div>\n `\n : ''}\n </x-checkbox>\n </x-group>\n\n ${this.renderTemplateOrSlot('options:after')}\n </div>\n `;\n }\n\n private __renderTimestamps() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('timestamps: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('timestamps:after')}\n </div>\n `;\n }\n\n private __renderCreate() {\n const isCleanTemplateInvalid = this.in({ idle: { template: { clean: 'invalid' } } });\n const isDirtyTemplateInvalid = this.in({ idle: { template: { dirty: 'invalid' } } });\n const isCleanSnapshotInvalid = this.in({ idle: { snapshot: { clean: 'invalid' } } });\n const isDirtySnapshotInvalid = this.in({ idle: { snapshot: { dirty: 'invalid' } } });\n const isTemplateInvalid = isCleanTemplateInvalid || isDirtyTemplateInvalid;\n const isSnaphotInvalid = isCleanSnapshotInvalid || isDirtySnapshotInvalid;\n const isInvalid = isTemplateInvalid || isSnaphotInvalid;\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('create:before')}\n\n <vaadin-button\n data-testid=\"create\"\n class=\"w-full\"\n theme=\"primary success\"\n ?disabled=${isBusy || isInvalid || this.disabledSelector.matches('create', true)}\n @click=${this.submit}\n >\n <foxy-i18n ns=${this.ns} key=\"create\" lang=${this.lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot('create:after')}\n </div>\n `;\n }\n\n private __renderDelete() {\n return html`\n <div>\n <foxy-internal-confirm-dialog\n data-testid=\"confirm\"\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${this.lang}\n ns=${this.ns}\n id=\"confirm\"\n @hide=${(evt: DialogHideEvent) => !evt.detail.cancelled && this.delete()}\n >\n </foxy-internal-confirm-dialog>\n\n ${this.renderTemplateOrSlot('delete:before')}\n\n <vaadin-button\n data-testid=\"delete\"\n theme=\"primary error\"\n class=\"w-full\"\n ?disabled=${this.in('busy') || this.disabledSelector.matches('delete', true)}\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 ns=${this.ns} key=\"delete\" lang=${this.lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot('delete:after')}\n </div>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '@vaadin/vaadin-text-field/vaadin-integer-field';
|
|
2
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
3
|
+
import '@vaadin/vaadin-date-picker';
|
|
4
|
+
import '@vaadin/vaadin-button';
|
|
5
|
+
import '@polymer/iron-icons';
|
|
6
|
+
import '@polymer/iron-icon';
|
|
7
|
+
import '../../internal/InternalConfirmDialog/index';
|
|
8
|
+
import '../../internal/InternalSandbox/index';
|
|
9
|
+
import '../GenerateCodesForm/index';
|
|
10
|
+
import '../CouponCodesForm/index';
|
|
11
|
+
import '../CouponCodeForm/index';
|
|
12
|
+
import '../QueryBuilder/index';
|
|
13
|
+
import '../Pagination/index';
|
|
14
|
+
import '../FormDialog/index';
|
|
15
|
+
import '../Spinner/index';
|
|
16
|
+
import '../Table/index';
|
|
17
|
+
import '../I18n/index';
|
|
18
|
+
import { CouponForm } from './CouponForm';
|
|
19
|
+
export { CouponForm };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import '@vaadin/vaadin-text-field/vaadin-integer-field';
|
|
2
|
+
import '@vaadin/vaadin-text-field/vaadin-text-field';
|
|
3
|
+
import '@vaadin/vaadin-date-picker';
|
|
4
|
+
import '@vaadin/vaadin-button';
|
|
5
|
+
import '@polymer/iron-icons';
|
|
6
|
+
import '@polymer/iron-icon';
|
|
7
|
+
import "../../internal/InternalConfirmDialog/index.js";
|
|
8
|
+
import "../../internal/InternalSandbox/index.js";
|
|
9
|
+
import "../GenerateCodesForm/index.js";
|
|
10
|
+
import "../CouponCodesForm/index.js";
|
|
11
|
+
import "../CouponCodeForm/index.js";
|
|
12
|
+
import "../QueryBuilder/index.js";
|
|
13
|
+
import "../Pagination/index.js";
|
|
14
|
+
import "../FormDialog/index.js";
|
|
15
|
+
import "../Spinner/index.js";
|
|
16
|
+
import "../Table/index.js";
|
|
17
|
+
import "../I18n/index.js";
|
|
18
|
+
import { CouponForm } from "./CouponForm.js";
|
|
19
|
+
customElements.define('foxy-coupon-form', CouponForm);
|
|
20
|
+
export { CouponForm };
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/CouponForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,gDAAgD,CAAC;AACxD,OAAO,6CAA6C,CAAC;AACrD,OAAO,4BAA4B,CAAC;AACpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,uDAAoD;AACpD,iDAA8C;AAC9C,uCAAoC;AACpC,qCAAkC;AAClC,oCAAiC;AACjC,kCAA+B;AAC/B,gCAA6B;AAC7B,gCAA6B;AAC7B,6BAA0B;AAC1B,2BAAwB;AACxB,0BAAuB;AAEvB,OAAO,EAAE,UAAU,EAAE,wBAAqB;AAE1C,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import '@vaadin/vaadin-text-field/vaadin-integer-field';\nimport '@vaadin/vaadin-text-field/vaadin-text-field';\nimport '@vaadin/vaadin-date-picker';\nimport '@vaadin/vaadin-button';\nimport '@polymer/iron-icons';\nimport '@polymer/iron-icon';\nimport '../../internal/InternalConfirmDialog/index';\nimport '../../internal/InternalSandbox/index';\nimport '../GenerateCodesForm/index';\nimport '../CouponCodesForm/index';\nimport '../CouponCodeForm/index';\nimport '../QueryBuilder/index';\nimport '../Pagination/index';\nimport '../FormDialog/index';\nimport '../Spinner/index';\nimport '../Table/index';\nimport '../I18n/index';\n\nimport { CouponForm } from './CouponForm';\n\ncustomElements.define('foxy-coupon-form', CouponForm);\n\nexport { CouponForm };\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit-html';
|
|
2
|
+
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
3
|
+
import { PropertyDeclarations } from 'lit-element';
|
|
4
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
5
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
6
|
+
import { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';
|
|
7
|
+
declare const CategoryRestrictionsPage_base: typeof NucleonElement & import("lit-element").Constructor<import("../../../../mixins/translatable").TranslatableMixinHost> & {
|
|
8
|
+
defaultNS: string;
|
|
9
|
+
} & {
|
|
10
|
+
styles: import("lit-element").CSSResultArray;
|
|
11
|
+
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
12
|
+
export declare class CategoryRestrictionsPage extends CategoryRestrictionsPage_base<Resource<Rels.ItemCategories>> {
|
|
13
|
+
static get scopedElements(): ScopedElementsMap;
|
|
14
|
+
static get properties(): PropertyDeclarations;
|
|
15
|
+
couponItemCategories: string;
|
|
16
|
+
coupon: string;
|
|
17
|
+
render(): TemplateResult;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { CategoryRestrictionsPageItem } from "./CategoryRestrictionsPageItem.js";
|
|
3
|
+
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
4
|
+
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
5
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
6
|
+
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
+
import { TranslatableMixin } from "../../../../mixins/translatable.js";
|
|
8
|
+
import { classMap } from "../../../../utils/class-map.js";
|
|
9
|
+
export class CategoryRestrictionsPage extends ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.couponItemCategories = '';
|
|
13
|
+
this.coupon = '';
|
|
14
|
+
}
|
|
15
|
+
static get scopedElements() {
|
|
16
|
+
return {
|
|
17
|
+
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
18
|
+
'x-category-restrictions-page-item': CategoryRestrictionsPageItem,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
...super.properties,
|
|
24
|
+
couponItemCategories: { type: String, attribute: 'coupon-item-categories' },
|
|
25
|
+
coupon: { type: String },
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
var _a, _b, _c, _d, _e;
|
|
30
|
+
const categories = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._embedded['fx:item_categories']) !== null && _b !== void 0 ? _b : [];
|
|
31
|
+
let limit = 20;
|
|
32
|
+
try {
|
|
33
|
+
const limitFromHref = parseInt((_c = new URL(this.href).searchParams.get('limit')) !== null && _c !== void 0 ? _c : '');
|
|
34
|
+
if (!isNaN(limitFromHref))
|
|
35
|
+
limit = limitFromHref;
|
|
36
|
+
}
|
|
37
|
+
catch (_f) {
|
|
38
|
+
// invalid URL, use the default
|
|
39
|
+
}
|
|
40
|
+
return html `
|
|
41
|
+
<div class="relative">
|
|
42
|
+
<div class="relative divide-y divide-contrast-10 ml-m">
|
|
43
|
+
${new Array(limit).fill(0).map((_, index) => {
|
|
44
|
+
const category = categories[index];
|
|
45
|
+
let href = undefined;
|
|
46
|
+
if (category) {
|
|
47
|
+
try {
|
|
48
|
+
const couponCategoryURL = new URL(this.couponItemCategories);
|
|
49
|
+
const categoryURL = new URL(category._links.self.href);
|
|
50
|
+
const categoryID = categoryURL.pathname.split('/').pop();
|
|
51
|
+
couponCategoryURL.searchParams.set('item_category_id', categoryID);
|
|
52
|
+
couponCategoryURL.searchParams.set('limit', '1');
|
|
53
|
+
href = couponCategoryURL.toString();
|
|
54
|
+
}
|
|
55
|
+
catch (_a) {
|
|
56
|
+
// invalid URL, ignore
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (!href)
|
|
60
|
+
return html `<div class="h-l"></div>`;
|
|
61
|
+
return html `
|
|
62
|
+
<x-category-restrictions-page-item
|
|
63
|
+
item-category=${category._links.self.href}
|
|
64
|
+
coupon=${this.coupon}
|
|
65
|
+
class="h-l"
|
|
66
|
+
group=${this.group}
|
|
67
|
+
href=${href}
|
|
68
|
+
lang=${this.lang}
|
|
69
|
+
ns=${this.ns}
|
|
70
|
+
?disabled=${!this.in('idle') || this.disabled}
|
|
71
|
+
?readonly=${this.readonly}
|
|
72
|
+
>
|
|
73
|
+
${category === null || category === void 0 ? void 0 : category.name}
|
|
74
|
+
</x-category-restrictions-page-item>
|
|
75
|
+
`;
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
class=${classMap({
|
|
81
|
+
'pointer-events-none absolute inset-0 flex transition-opacity': true,
|
|
82
|
+
'opacity-0': !!this.data,
|
|
83
|
+
})}
|
|
84
|
+
>
|
|
85
|
+
<foxy-spinner
|
|
86
|
+
layout="vertical"
|
|
87
|
+
state=${this.in('fail') ? 'error' : this.in({ idle: 'template' }) ? 'empty' : 'busy'}
|
|
88
|
+
class="m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs"
|
|
89
|
+
lang=${this.lang}
|
|
90
|
+
ns="${this.ns} ${(_e = (_d = customElements.get('foxy-spinner')) === null || _d === void 0 ? void 0 : _d.defaultNS) !== null && _e !== void 0 ? _e : ''}"
|
|
91
|
+
>
|
|
92
|
+
</foxy-spinner>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=CategoryRestrictionsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryRestrictionsPage.js","sourceRoot":"","sources":["../../../../../src/elements/public/CouponForm/private/CategoryRestrictionsPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,4BAA4B,EAAE,0CAAuC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,cAAc,EAAE,+CAA4C;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,wCAAqC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,QAAQ,EAAE,uCAAoC;AAEvD,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB,CAC7D,mBAAmB,CAAC,cAAc,CAAC,iBAAiB,CAAC,cAAc,CAAC,C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AI,CAAC,EAAE,IAAI,YAAA,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,0CAAE,SAAS,mCAAI,EAAE;;;;;KAK3E,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { TemplateResult, html } from 'lit-html';\n\nimport { CategoryRestrictionsPageItem } from './CategoryRestrictionsPageItem';\nimport { ConfigurableMixin } from '../../../../mixins/configurable';\nimport { NucleonElement } from '../../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { ThemeableMixin } from '../../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../../mixins/translatable';\nimport { classMap } from '../../../../utils/class-map';\n\nexport class CategoryRestrictionsPage extends ConfigurableMixin(\n ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))\n)<Resource<Rels.ItemCategories>> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'x-category-restrictions-page-item': CategoryRestrictionsPageItem,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n couponItemCategories: { type: String, attribute: 'coupon-item-categories' },\n coupon: { type: String },\n };\n }\n\n couponItemCategories = '';\n\n coupon = '';\n\n render(): TemplateResult {\n const categories = this.data?._embedded['fx:item_categories'] ?? [];\n let limit = 20;\n\n try {\n const limitFromHref = parseInt(new URL(this.href).searchParams.get('limit') ?? '');\n if (!isNaN(limitFromHref)) limit = limitFromHref;\n } catch {\n // invalid URL, use the default\n }\n\n return html`\n <div class=\"relative\">\n <div class=\"relative divide-y divide-contrast-10 ml-m\">\n ${new Array(limit).fill(0).map((_, index) => {\n const category = categories[index];\n let href: string | undefined = undefined;\n\n if (category) {\n try {\n const couponCategoryURL = new URL(this.couponItemCategories);\n const categoryURL = new URL(category._links.self.href);\n const categoryID = categoryURL.pathname.split('/').pop() as string;\n\n couponCategoryURL.searchParams.set('item_category_id', categoryID);\n couponCategoryURL.searchParams.set('limit', '1');\n\n href = couponCategoryURL.toString();\n } catch {\n // invalid URL, ignore\n }\n }\n\n if (!href) return html`<div class=\"h-l\"></div>`;\n\n return html`\n <x-category-restrictions-page-item\n item-category=${category._links.self.href}\n coupon=${this.coupon}\n class=\"h-l\"\n group=${this.group}\n href=${href}\n lang=${this.lang}\n ns=${this.ns}\n ?disabled=${!this.in('idle') || this.disabled}\n ?readonly=${this.readonly}\n >\n ${category?.name}\n </x-category-restrictions-page-item>\n `;\n })}\n </div>\n\n <div\n class=${classMap({\n 'pointer-events-none absolute inset-0 flex transition-opacity': true,\n 'opacity-0': !!this.data,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n state=${this.in('fail') ? 'error' : this.in({ idle: 'template' }) ? 'empty' : 'busy'}\n class=\"m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs\"\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit-html';
|
|
2
|
+
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
3
|
+
import { PropertyDeclarations } from 'lit-element';
|
|
4
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
5
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
6
|
+
import { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';
|
|
7
|
+
declare const CategoryRestrictionsPageItem_base: typeof NucleonElement & import("lit-element").Constructor<import("../../../../mixins/translatable").TranslatableMixinHost> & {
|
|
8
|
+
defaultNS: string;
|
|
9
|
+
} & {
|
|
10
|
+
styles: import("lit-element").CSSResultArray;
|
|
11
|
+
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
12
|
+
export declare class CategoryRestrictionsPageItem extends CategoryRestrictionsPageItem_base<Resource<Rels.CouponItemCategories>> {
|
|
13
|
+
static get scopedElements(): ScopedElementsMap;
|
|
14
|
+
static get properties(): PropertyDeclarations;
|
|
15
|
+
itemCategory: string;
|
|
16
|
+
coupon: string;
|
|
17
|
+
render(): TemplateResult;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { CategoryRestrictionsPageItemContent } from "./CategoryRestrictionsPageItemContent.js";
|
|
3
|
+
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
4
|
+
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
5
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
6
|
+
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
+
import { TranslatableMixin } from "../../../../mixins/translatable.js";
|
|
8
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
9
|
+
export class CategoryRestrictionsPageItem extends ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.itemCategory = '';
|
|
13
|
+
this.coupon = '';
|
|
14
|
+
}
|
|
15
|
+
static get scopedElements() {
|
|
16
|
+
return {
|
|
17
|
+
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
18
|
+
'x-category-restrictions-page-item-content': CategoryRestrictionsPageItemContent,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
...super.properties,
|
|
24
|
+
itemCategory: { type: String, attribute: 'item-category' },
|
|
25
|
+
coupon: { type: String },
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
var _a;
|
|
30
|
+
const category = (_a = this.data) === null || _a === void 0 ? void 0 : _a._embedded['fx:coupon_item_categories'][0];
|
|
31
|
+
const parent = category ? undefined : this.href;
|
|
32
|
+
const href = category ? category._links.self.href : undefined;
|
|
33
|
+
return html `
|
|
34
|
+
<x-category-restrictions-page-item-content
|
|
35
|
+
item-category=${this.itemCategory}
|
|
36
|
+
coupon=${this.coupon}
|
|
37
|
+
parent=${ifDefined(parent)}
|
|
38
|
+
class="h-full"
|
|
39
|
+
group=${this.group}
|
|
40
|
+
href=${ifDefined(href)}
|
|
41
|
+
lang=${this.lang}
|
|
42
|
+
ns=${this.ns}
|
|
43
|
+
?disabled=${!this.in('idle') || this.disabled}
|
|
44
|
+
?readonly=${this.readonly}
|
|
45
|
+
>
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</x-category-restrictions-page-item-content>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=CategoryRestrictionsPageItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryRestrictionsPageItem.js","sourceRoot":"","sources":["../../../../../src/elements/public/CouponForm/private/CategoryRestrictionsPageItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,mCAAmC,EAAE,iDAA8C;AAC5F,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,cAAc,EAAE,+CAA4C;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,wCAAqC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,MAAM,OAAO,4BAA6B,SAAQ,iBAAiB,CACjE,mBAAmB,CAAC,cAAc,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CAClC;IAFtC;;QAkBE,iBAAY,GAAG,EAAE,CAAC;QAElB,WAAM,GAAG,EAAE,CAAC;IAwBd,CAAC;IAzCC,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC;YAClD,2CAA2C,EAAE,mCAAmC;SACjF,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE;YAC1D,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;IAMD,MAAM;;QACJ,MAAM,QAAQ,SAAG,IAAI,CAAC,IAAI,0CAAE,SAAS,CAAC,2BAA2B,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9D,OAAO,IAAI,CAAA;;wBAES,IAAI,CAAC,YAAY;iBACxB,IAAI,CAAC,MAAM;iBACX,SAAS,CAAC,MAAM,CAAC;;gBAElB,IAAI,CAAC,KAAK;eACX,SAAS,CAAC,IAAI,CAAC;eACf,IAAI,CAAC,IAAI;aACX,IAAI,CAAC,EAAE;oBACA,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;oBACjC,IAAI,CAAC,QAAQ;;;;KAI5B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { TemplateResult, html } from 'lit-html';\n\nimport { CategoryRestrictionsPageItemContent } from './CategoryRestrictionsPageItemContent';\nimport { ConfigurableMixin } from '../../../../mixins/configurable';\nimport { NucleonElement } from '../../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { ThemeableMixin } from '../../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../../mixins/translatable';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nexport class CategoryRestrictionsPageItem extends ConfigurableMixin(\n ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))\n)<Resource<Rels.CouponItemCategories>> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'x-category-restrictions-page-item-content': CategoryRestrictionsPageItemContent,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n itemCategory: { type: String, attribute: 'item-category' },\n coupon: { type: String },\n };\n }\n\n itemCategory = '';\n\n coupon = '';\n\n render(): TemplateResult {\n const category = this.data?._embedded['fx:coupon_item_categories'][0];\n const parent = category ? undefined : this.href;\n const href = category ? category._links.self.href : undefined;\n\n return html`\n <x-category-restrictions-page-item-content\n item-category=${this.itemCategory}\n coupon=${this.coupon}\n parent=${ifDefined(parent)}\n class=\"h-full\"\n group=${this.group}\n href=${ifDefined(href)}\n lang=${this.lang}\n ns=${this.ns}\n ?disabled=${!this.in('idle') || this.disabled}\n ?readonly=${this.readonly}\n >\n <slot></slot>\n </x-category-restrictions-page-item-content>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ScopedElementsMap } from '@open-wc/scoped-elements';
|
|
2
|
+
import { TemplateResult } from 'lit-html';
|
|
3
|
+
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
4
|
+
import { PropertyDeclarations } from 'lit-element';
|
|
5
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
6
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
7
|
+
declare const CategoryRestrictionsPageItemContent_base: typeof NucleonElement & import("lit-element").Constructor<import("../../../../mixins/translatable").TranslatableMixinHost> & {
|
|
8
|
+
defaultNS: string;
|
|
9
|
+
} & {
|
|
10
|
+
styles: import("lit-element").CSSResultArray;
|
|
11
|
+
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
12
|
+
export declare class CategoryRestrictionsPageItemContent extends CategoryRestrictionsPageItemContent_base<Resource<Rels.CouponItemCategory>> {
|
|
13
|
+
static get scopedElements(): ScopedElementsMap;
|
|
14
|
+
static get properties(): PropertyDeclarations;
|
|
15
|
+
itemCategory: string;
|
|
16
|
+
coupon: string;
|
|
17
|
+
render(): TemplateResult;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
2
|
+
import { html } from 'lit-html';
|
|
3
|
+
import { Checkbox } from "../../../private/Checkbox/Checkbox.js";
|
|
4
|
+
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
5
|
+
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
6
|
+
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
+
import { TranslatableMixin } from "../../../../mixins/translatable.js";
|
|
8
|
+
export class CategoryRestrictionsPageItemContent extends ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))) {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.itemCategory = '';
|
|
12
|
+
this.coupon = '';
|
|
13
|
+
}
|
|
14
|
+
static get scopedElements() {
|
|
15
|
+
return {
|
|
16
|
+
'x-checkbox': Checkbox,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get properties() {
|
|
20
|
+
return {
|
|
21
|
+
...super.properties,
|
|
22
|
+
itemCategory: { type: String, attribute: 'item-category' },
|
|
23
|
+
coupon: { type: String },
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return html `
|
|
28
|
+
<div class="h-full flex items-center">
|
|
29
|
+
<x-checkbox
|
|
30
|
+
?disabled=${!this.in('idle') || this.disabled}
|
|
31
|
+
?readonly=${this.readonly}
|
|
32
|
+
?checked=${!!this.data}
|
|
33
|
+
@change=${(evt) => {
|
|
34
|
+
if (evt.detail) {
|
|
35
|
+
this.edit({
|
|
36
|
+
item_category_uri: this.itemCategory,
|
|
37
|
+
coupon_uri: this.coupon,
|
|
38
|
+
});
|
|
39
|
+
this.submit();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.delete();
|
|
43
|
+
}
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</x-checkbox>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=CategoryRestrictionsPageItemContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryRestrictionsPageItemContent.js","sourceRoot":"","sources":["../../../../../src/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,8CAA2C;AAE9D,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,cAAc,EAAE,+CAA4C;AAIrE,OAAO,EAAE,cAAc,EAAE,wCAAqC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AAEpE,MAAM,OAAO,mCAAoC,SAAQ,iBAAiB,CACxE,mBAAmB,CAAC,cAAc,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CACpC;IAFpC;;QAiBE,iBAAY,GAAG,EAAE,CAAC;QAElB,WAAM,GAAG,EAAE,CAAC;IA2Bd,CAAC;IA3CC,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,YAAY,EAAE,QAAQ;SACvB,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE;YAC1D,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;IAMD,MAAM;QACJ,OAAO,IAAI,CAAA;;;sBAGO,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;sBACjC,IAAI,CAAC,QAAQ;qBACd,CAAC,CAAC,IAAI,CAAC,IAAI;oBACZ,CAAC,GAAwB,EAAE,EAAE;YACrC,IAAI,GAAG,CAAC,MAAM,EAAE;gBACd,IAAI,CAAC,IAAI,CAAC;oBACR,iBAAiB,EAAE,IAAI,CAAC,YAAY;oBACpC,UAAU,EAAE,IAAI,CAAC,MAAM;iBACxB,CAAC,CAAC;gBAEH,IAAI,CAAC,MAAM,EAAE,CAAC;aACf;iBAAM;gBACL,IAAI,CAAC,MAAM,EAAE,CAAC;aACf;QACH,CAAC;;;;;KAKN,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { Checkbox } from '../../../private/Checkbox/Checkbox';\nimport { CheckboxChangeEvent } from '../../../private/events';\nimport { ConfigurableMixin } from '../../../../mixins/configurable';\nimport { NucleonElement } from '../../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ThemeableMixin } from '../../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../../mixins/translatable';\n\nexport class CategoryRestrictionsPageItemContent extends ConfigurableMixin(\n ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))\n)<Resource<Rels.CouponItemCategory>> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'x-checkbox': Checkbox,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n itemCategory: { type: String, attribute: 'item-category' },\n coupon: { type: String },\n };\n }\n\n itemCategory = '';\n\n coupon = '';\n\n render(): TemplateResult {\n return html`\n <div class=\"h-full flex items-center\">\n <x-checkbox\n ?disabled=${!this.in('idle') || this.disabled}\n ?readonly=${this.readonly}\n ?checked=${!!this.data}\n @change=${(evt: CheckboxChangeEvent) => {\n if (evt.detail) {\n this.edit({\n item_category_uri: this.itemCategory,\n coupon_uri: this.coupon,\n });\n\n this.submit();\n } else {\n this.delete();\n }\n }}\n >\n <slot></slot>\n </x-checkbox>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Rels } from '@foxy.io/sdk/backend';
|
|
2
|
+
import { Resource } from '@foxy.io/sdk/core';
|
|
3
|
+
export declare type Data = Resource<Rels.Coupon>;
|
|
4
|
+
export declare type RulesTierParams = {
|
|
5
|
+
source: string;
|
|
6
|
+
method: string;
|
|
7
|
+
units: string;
|
|
8
|
+
tier?: string;
|
|
9
|
+
onChange: (newParams: Partial<RulesTierParams>) => void;
|
|
10
|
+
onDelete: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare type RulesTierFieldParams = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
onChange: (newValue: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare type RulesTierSwitchParams = {
|
|
18
|
+
value: number;
|
|
19
|
+
options: [string, string];
|
|
20
|
+
onChange: (newValueIndex: number) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare type RulesTierSelectParams = {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
options: Record<string, string>;
|
|
26
|
+
onChange: (newValue: string) => void;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/CouponForm/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\n\nexport type Data = Resource<Rels.Coupon>;\n\nexport type RulesTierParams = {\n source: string;\n method: string;\n units: string;\n tier?: string;\n onChange: (newParams: Partial<RulesTierParams>) => void;\n onDelete: () => void;\n};\n\nexport type RulesTierFieldParams = {\n value: string;\n label: string;\n onChange: (newValue: string) => void;\n};\n\nexport type RulesTierSwitchParams = {\n value: number;\n options: [string, string];\n onChange: (newValueIndex: number) => void;\n};\n\nexport type RulesTierSelectParams = {\n label: string;\n value: string;\n options: Record<string, string>;\n onChange: (newValue: string) => void;\n};\n"]}
|