@foxy.io/elements 1.21.0-beta.3 → 1.21.1

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.
@@ -31,7 +31,7 @@ import"./foxy-customer.js";import"./shared-bc814810.js";import"./shared-2092d86f
31
31
  </foxy-internal-customer-portal-transactions>
32
32
 
33
33
  ${0}
34
- `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return e(e({},super.properties),{},{customer:{type:String},loggingOutState:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}render(){var e,t;const r=this.hiddenSelector.zoom("customer"),o=new f(`\n attributes\n transactions\n subscriptions\n addresses:actions:create\n header:actions:edit:form:delete\n ${r.toString()}\n `).toString(),i=this.getNestedTemplates("customer"),n=i["header:actions:after"],a=i["header:actions:edit:form:timestamps:after"],l=i.default;return i["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(H||(H=C`
34
+ `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return e(e({},super.properties),{},{customer:{type:String},loggingOutState:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}render(){var e,t;const r=this.hiddenSelector.zoom("customer"),o=new f(["attributes","transactions","subscriptions","addresses:actions:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),i=this.getNestedTemplates("customer"),n=i["header:actions:after"],a=i["header:actions:edit:form:timestamps:after"],l=i.default;return i["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(H||(H=C`
35
35
  <div style="display:flex">
36
36
  ${0}
37
37
  ${0}
@@ -128,14 +128,14 @@ export class InternalCustomerPortalLoggedInView extends Base {
128
128
  render() {
129
129
  var _a, _b;
130
130
  const hiddenSelector = this.hiddenSelector.zoom('customer');
131
- const customerHiddenControls = new BooleanSelector(`
132
- attributes
133
- transactions
134
- subscriptions
135
- addresses:actions:create
136
- header:actions:edit:form:delete
137
- ${hiddenSelector.toString()}
138
- `).toString();
131
+ const customerHiddenControls = new BooleanSelector([
132
+ 'attributes',
133
+ 'transactions',
134
+ 'subscriptions',
135
+ 'addresses:actions:create',
136
+ 'header:actions:edit:form:delete',
137
+ hiddenSelector.toString(),
138
+ ].join(' ')).toString();
139
139
  const templates = this.getNestedTemplates('customer');
140
140
  const originalHeaderActionsAfterTemplate = templates['header:actions:after'];
141
141
  const originalTimestampsAfterTemplate = templates['header:actions:edit:form:timestamps:after'];
@@ -1 +1 @@
1
- {"version":3,"file":"InternalCustomerPortalLoggedInView.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,wCAAqC;AAC3E,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,iCAA8B;AAG5C,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAGlE,OAAO,EAAE,eAAe,EAAY,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAEjE,MAAM,IAAI,GAAG,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAGlF,MAAM,OAAO,kCAAmC,SAAQ,IAAU;IAAlE;;QAUE,cAAS,GAAc,EAAE,CAAC;QAE1B,aAAQ,GAAG,EAAE,CAAC;QAEd,oBAAe,GAA6B,MAAM,CAAC;QAEnD,gCAA2B,GAA0B,IA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D,SAAS;kBACZ,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,2BAA2B;YAAE,YAAY,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACvF,CAAC;IAED,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAW,WAAW,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["import { ConfigurableMixin, Renderer } from '../../../mixins/configurable';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { API } from '../NucleonElement/API';\nimport { Customer } from '../Customer/Customer';\nimport { Templates as CustomerTemplates } from '../Customer/types';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/customer';\nimport { BooleanSelector, Resource } from '@foxy.io/sdk/core';\nimport { Templates } from './types';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\n\nconst Base = ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement)));\ntype Data = Resource<Rels.CustomerPortalSettings>;\n\nexport class InternalCustomerPortalLoggedInView extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n customer: { type: String },\n loggingOutState: { attribute: false },\n loggingOutStateResetTimeout: { attribute: false },\n };\n }\n\n templates: Templates = {};\n\n customer = '';\n\n loggingOutState: 'idle' | 'busy' | 'fail' = 'idle';\n\n loggingOutStateResetTimeout: NodeJS.Timeout | null = null;\n\n private readonly __renderHeaderActionsSignOut = () => {\n const scope = 'customer:header:actions:sign-out';\n const state = this.loggingOutState;\n\n const isDisabled =\n this.disabledSelector.matches(scope) ||\n !this.__customerElement?.in({ idle: 'snapshot' }) ||\n state !== 'idle';\n\n const handleClick = async () => {\n try {\n this.loggingOutState = 'busy';\n await new API(this).fetch('foxy://customer-api/session', { method: 'DELETE' });\n this.loggingOutState = 'idle';\n } catch {\n this.loggingOutState = 'fail';\n this.loggingOutStateResetTimeout = setTimeout(() => {\n this.loggingOutState = 'idle';\n this.loggingOutStateResetTimeout = null;\n }, 1000);\n }\n };\n\n const style = {\n 'border-radius': '100%',\n 'padding': 'var(--lumo-space-xs)',\n 'display': 'flex',\n 'margin': '0',\n 'cursor': isDisabled ? 'default' : 'pointer',\n };\n\n return html`\n <div style=\"display: flex; margin-left: var(--lumo-space-m)\">\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-button\n data-testid=\"sign-out\"\n aria-label=${this.t('sign_out').toString()}\n style=${Object.entries(style).reduce((p, [k, v]) => `${p}${k}:${v};`, '')}\n theme=\"icon\"\n ?disabled=${isDisabled}\n @click=${handleClick}\n >\n ${state === 'idle'\n ? html`<iron-icon icon=\"icons:exit-to-app\"></iron-icon>`\n : html`\n <foxy-spinner\n layout=\"no-label\"\n state=${state === 'fail' ? 'error' : 'busy'}\n style=\"margin: auto\"\n lang=${this.lang}\n ns=${[\n this.ns,\n customElements.get('foxy-customer')?.defaultNS ?? '',\n customElements.get('foxy-spinner')?.defaultNS ?? '',\n ].join(' ')}\n >\n </foxy-spinner>\n `}\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderSubscriptions: Renderer<Customer> = (html, host) => {\n const scope = 'customer:subscriptions';\n\n return html`\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-subscriptions\n readonlycontrols=${this.readonlySelector.zoom(scope).toString()}\n disabledcontrols=${this.disabledSelector.zoom(scope).toString()}\n hiddencontrols=${this.hiddenSelector.zoom(scope).toString()}\n group=${host.group}\n lang=${host.lang}\n ns=${host.ns}\n .templates=${this.getNestedTemplates(scope)}\n .settings=${this.data}\n .customer=${host.data}\n >\n </foxy-internal-customer-portal-subscriptions>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n `;\n };\n\n private readonly __renderTransactions: Renderer<Customer> = (html, host) => {\n const scope = 'customer:transactions';\n\n return html`\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-transactions\n readonlycontrols=${this.readonlySelector.zoom(scope).toString()}\n disabledcontrols=${this.disabledSelector.zoom(scope).toString()}\n hiddencontrols=${this.hiddenSelector.zoom(scope).toString()}\n group=${host.group}\n lang=${host.lang}\n ns=${host.ns}\n .templates=${this.getNestedTemplates(scope)}\n .customer=${host.data}\n >\n </foxy-internal-customer-portal-transactions>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n `;\n };\n\n render(): TemplateResult {\n const hiddenSelector = this.hiddenSelector.zoom('customer');\n const customerHiddenControls = new BooleanSelector(`\n attributes\n transactions\n subscriptions\n addresses:actions:create\n header:actions:edit:form:delete\n ${hiddenSelector.toString()}\n `).toString();\n\n const templates: CustomerTemplates = this.getNestedTemplates('customer');\n const originalHeaderActionsAfterTemplate = templates['header:actions:after'];\n const originalTimestampsAfterTemplate = templates['header:actions:edit:form:timestamps:after'];\n const originalDefaultTemplate = templates['default'];\n\n templates['header:actions:after'] = (html, host) => {\n const isSignOutHidden = hiddenSelector.matches('header:actions:sign-out', true);\n return html`\n <div style=\"display:flex\">\n ${isSignOutHidden ? '' : this.__renderHeaderActionsSignOut()}\n ${originalHeaderActionsAfterTemplate?.(html, host)}\n </div>\n `;\n };\n\n templates['default'] = (html, host) => {\n const renderSubscriptions = this.__renderSubscriptions;\n const renderTransactions = this.__renderTransactions;\n\n return html`\n <style>\n .space-y-m > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(var(--lumo-space-m, 1rem) * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(var(--lumo-space-m, 1rem) * var(--tw-space-y-reverse));\n }\n </style>\n\n ${hiddenSelector.matches('default', true) ? '' : originalDefaultTemplate?.(html, host)}\n\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('subscriptions', true) ? '' : renderSubscriptions(html, host)}\n ${hiddenSelector.matches('transactions', true) ? '' : renderTransactions(html, host)}\n </div>\n `;\n };\n\n templates['header:actions:edit:form:timestamps:after'] = (html, host) => {\n const scope = 'change-password';\n\n return html`\n ${originalTimestampsAfterTemplate?.(html, host)}\n ${host.hiddenSelector.matches(scope, true)\n ? ''\n : html`\n ${host.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-change-password\n customer=${host.href}\n session=\"foxy://customer-api/session\"\n style=\"margin-top: var(--lumo-space-l)\"\n email=${host.data?.email ?? ''}\n lang=${host.lang}\n ns=${host.ns}\n ?disabled=${host.in('busy') || host.disabledSelector.matches(scope, true)}\n >\n </foxy-internal-customer-portal-change-password>\n\n ${host.renderTemplateOrSlot(`${scope}:after`)}\n `}\n `;\n };\n\n return html`\n <foxy-customer\n readonlycontrols=${this.readonlySelector.zoom('customer').toString()}\n disabledcontrols=${this.disabledSelector.zoom('customer').toString()}\n hiddencontrols=${customerHiddenControls}\n data-testid=\"customer\"\n group=${this.group}\n href=${this.customer}\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-customer')?.defaultNS ?? ''}\"\n id=\"customer\"\n .templates=${templates}\n @update=${() => this.requestUpdate()}\n >\n </foxy-customer>\n `;\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.loggingOutStateResetTimeout) clearTimeout(this.loggingOutStateResetTimeout);\n }\n\n private get __customerElement() {\n return this.renderRoot.querySelector<Customer>('#customer');\n }\n}\n"]}
1
+ {"version":3,"file":"InternalCustomerPortalLoggedInView.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,wCAAqC;AAC3E,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,iCAA8B;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C,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;;;;gBAIzE,IAAI,CAAC,oBAAoB,CAAC,GAAG,KAAK,QAAQ,CAAC;aAC9C;OACN,CAAC;QACJ,CAAC,CAAC;QAEF,OAAO,IAAI,CAAA;;2BAEY,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;2BACjD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;yBACnD,sBAAsB;;gBAE/B,IAAI,CAAC,KAAK;eACX,IAAI,CAAC,QAAQ;eACb,IAAI,CAAC,IAAI;cACV,IAAI,CAAC,EAAE,IAAI,YAAA,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,0CAAE,SAAS,mCAAI,EAAE;;qBAExD,SAAS;kBACZ,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,2BAA2B;YAAE,YAAY,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACvF,CAAC;IAED,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAW,WAAW,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["import { ConfigurableMixin, Renderer } from '../../../mixins/configurable';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { API } from '../NucleonElement/API';\nimport { Customer } from '../Customer/Customer';\nimport { Templates as CustomerTemplates } from '../Customer/types';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/customer';\nimport { BooleanSelector, Resource } from '@foxy.io/sdk/core';\nimport { Templates } from './types';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\n\nconst Base = ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement)));\ntype Data = Resource<Rels.CustomerPortalSettings>;\n\nexport class InternalCustomerPortalLoggedInView extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n customer: { type: String },\n loggingOutState: { attribute: false },\n loggingOutStateResetTimeout: { attribute: false },\n };\n }\n\n templates: Templates = {};\n\n customer = '';\n\n loggingOutState: 'idle' | 'busy' | 'fail' = 'idle';\n\n loggingOutStateResetTimeout: NodeJS.Timeout | null = null;\n\n private readonly __renderHeaderActionsSignOut = () => {\n const scope = 'customer:header:actions:sign-out';\n const state = this.loggingOutState;\n\n const isDisabled =\n this.disabledSelector.matches(scope) ||\n !this.__customerElement?.in({ idle: 'snapshot' }) ||\n state !== 'idle';\n\n const handleClick = async () => {\n try {\n this.loggingOutState = 'busy';\n await new API(this).fetch('foxy://customer-api/session', { method: 'DELETE' });\n this.loggingOutState = 'idle';\n } catch {\n this.loggingOutState = 'fail';\n this.loggingOutStateResetTimeout = setTimeout(() => {\n this.loggingOutState = 'idle';\n this.loggingOutStateResetTimeout = null;\n }, 1000);\n }\n };\n\n const style = {\n 'border-radius': '100%',\n 'padding': 'var(--lumo-space-xs)',\n 'display': 'flex',\n 'margin': '0',\n 'cursor': isDisabled ? 'default' : 'pointer',\n };\n\n return html`\n <div style=\"display: flex; margin-left: var(--lumo-space-m)\">\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-button\n data-testid=\"sign-out\"\n aria-label=${this.t('sign_out').toString()}\n style=${Object.entries(style).reduce((p, [k, v]) => `${p}${k}:${v};`, '')}\n theme=\"icon\"\n ?disabled=${isDisabled}\n @click=${handleClick}\n >\n ${state === 'idle'\n ? html`<iron-icon icon=\"icons:exit-to-app\"></iron-icon>`\n : html`\n <foxy-spinner\n layout=\"no-label\"\n state=${state === 'fail' ? 'error' : 'busy'}\n style=\"margin: auto\"\n lang=${this.lang}\n ns=${[\n this.ns,\n customElements.get('foxy-customer')?.defaultNS ?? '',\n customElements.get('foxy-spinner')?.defaultNS ?? '',\n ].join(' ')}\n >\n </foxy-spinner>\n `}\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderSubscriptions: Renderer<Customer> = (html, host) => {\n const scope = 'customer:subscriptions';\n\n return html`\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-subscriptions\n readonlycontrols=${this.readonlySelector.zoom(scope).toString()}\n disabledcontrols=${this.disabledSelector.zoom(scope).toString()}\n hiddencontrols=${this.hiddenSelector.zoom(scope).toString()}\n group=${host.group}\n lang=${host.lang}\n ns=${host.ns}\n .templates=${this.getNestedTemplates(scope)}\n .settings=${this.data}\n .customer=${host.data}\n >\n </foxy-internal-customer-portal-subscriptions>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n `;\n };\n\n private readonly __renderTransactions: Renderer<Customer> = (html, host) => {\n const scope = 'customer:transactions';\n\n return html`\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-transactions\n readonlycontrols=${this.readonlySelector.zoom(scope).toString()}\n disabledcontrols=${this.disabledSelector.zoom(scope).toString()}\n hiddencontrols=${this.hiddenSelector.zoom(scope).toString()}\n group=${host.group}\n lang=${host.lang}\n ns=${host.ns}\n .templates=${this.getNestedTemplates(scope)}\n .customer=${host.data}\n >\n </foxy-internal-customer-portal-transactions>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n `;\n };\n\n render(): TemplateResult {\n const hiddenSelector = this.hiddenSelector.zoom('customer');\n const customerHiddenControls = new BooleanSelector(\n [\n 'attributes',\n 'transactions',\n 'subscriptions',\n 'addresses:actions:create',\n 'header:actions:edit:form:delete',\n hiddenSelector.toString(),\n ].join(' ')\n ).toString();\n\n const templates: CustomerTemplates = this.getNestedTemplates('customer');\n const originalHeaderActionsAfterTemplate = templates['header:actions:after'];\n const originalTimestampsAfterTemplate = templates['header:actions:edit:form:timestamps:after'];\n const originalDefaultTemplate = templates['default'];\n\n templates['header:actions:after'] = (html, host) => {\n const isSignOutHidden = hiddenSelector.matches('header:actions:sign-out', true);\n return html`\n <div style=\"display:flex\">\n ${isSignOutHidden ? '' : this.__renderHeaderActionsSignOut()}\n ${originalHeaderActionsAfterTemplate?.(html, host)}\n </div>\n `;\n };\n\n templates['default'] = (html, host) => {\n const renderSubscriptions = this.__renderSubscriptions;\n const renderTransactions = this.__renderTransactions;\n\n return html`\n <style>\n .space-y-m > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(var(--lumo-space-m, 1rem) * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(var(--lumo-space-m, 1rem) * var(--tw-space-y-reverse));\n }\n </style>\n\n ${hiddenSelector.matches('default', true) ? '' : originalDefaultTemplate?.(html, host)}\n\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('subscriptions', true) ? '' : renderSubscriptions(html, host)}\n ${hiddenSelector.matches('transactions', true) ? '' : renderTransactions(html, host)}\n </div>\n `;\n };\n\n templates['header:actions:edit:form:timestamps:after'] = (html, host) => {\n const scope = 'change-password';\n\n return html`\n ${originalTimestampsAfterTemplate?.(html, host)}\n ${host.hiddenSelector.matches(scope, true)\n ? ''\n : html`\n ${host.renderTemplateOrSlot(`${scope}:before`)}\n\n <foxy-internal-customer-portal-change-password\n customer=${host.href}\n session=\"foxy://customer-api/session\"\n style=\"margin-top: var(--lumo-space-l)\"\n email=${host.data?.email ?? ''}\n lang=${host.lang}\n ns=${host.ns}\n ?disabled=${host.in('busy') || host.disabledSelector.matches(scope, true)}\n >\n </foxy-internal-customer-portal-change-password>\n\n ${host.renderTemplateOrSlot(`${scope}:after`)}\n `}\n `;\n };\n\n return html`\n <foxy-customer\n readonlycontrols=${this.readonlySelector.zoom('customer').toString()}\n disabledcontrols=${this.disabledSelector.zoom('customer').toString()}\n hiddencontrols=${customerHiddenControls}\n data-testid=\"customer\"\n group=${this.group}\n href=${this.customer}\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-customer')?.defaultNS ?? ''}\"\n id=\"customer\"\n .templates=${templates}\n @update=${() => this.requestUpdate()}\n >\n </foxy-customer>\n `;\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.loggingOutStateResetTimeout) clearTimeout(this.loggingOutStateResetTimeout);\n }\n\n private get __customerElement() {\n return this.renderRoot.querySelector<Customer>('#customer');\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.21.0-beta.3",
4
+ "version": "1.21.1",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "generate-schemas": "node \"./.scripts/generate-schemas.js\" && prettier \"./src/static/schemas/*.json\" \"./.vscode/settings.json\" --write",
17
17
  "generate-groups": "node \"./.scripts/generate-groups.js\" && prettier \"./web-test-runner-groups.config.js\" --write",
18
18
  "storybook": "wds --watch",
19
- "storybook:build": "build-storybook",
19
+ "storybook:build": "NODE_OPTIONS=--openssl-legacy-provider build-storybook",
20
20
  "lint": "npm run lint:eslint && npm run lint:prettier",
21
21
  "lint:eslint": "eslint --ext .ts,.html . --ignore-path .gitignore",
22
22
  "lint:prettier": "prettier \"**/*.js\" \"**/*.ts\" --check --ignore-path .gitignore",