@foxy.io/elements 1.40.0-beta.1 → 1.40.0-beta.2
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-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-cart-form.js +2 -2
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/shared-00e02b35.js +1 -0
- package/dist/cdn/{shared-2508187b.js → shared-0c2879b9.js} +1 -1
- package/dist/cdn/shared-4a32f76a.js +1 -0
- package/dist/cdn/shared-5cd33249.js +1 -0
- package/dist/cdn/shared-aca2705d.js +1 -0
- package/dist/cdn/shared-e0da7113.js +1 -0
- package/dist/cdn/{shared-2ab1e9eb.js → shared-e21ddeae.js} +1 -1
- package/dist/cdn/translations/tax-form/en.json +8 -3
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +10 -9
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +15 -23
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js +10 -9
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +44 -40
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js +8 -2
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js.map +1 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +14 -13
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.d.ts +0 -4
- package/dist/elements/public/TaxForm/TaxForm.js +16 -30
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-27cfa174.js +0 -1
- package/dist/cdn/shared-2c81b7df.js +0 -1
- package/dist/cdn/shared-afe24913.js +0 -1
- package/dist/cdn/shared-c05643e6.js +0 -1
- package/dist/cdn/shared-eea8debb.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,cAAc,EAAE,sBAAmB;AAC5C,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,EAAE,GAAG,sBAAsB,CAAC;AAClC,MAAM,IAAI,GAAG,eAAe,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AAElE;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,IAAU;IAAlD;;QAUE,+CAA+C;QAC/C,cAAS,GAAkB,IAAI,CAAC;QAEhC,6CAA6C;QAC7C,YAAO,GAAkB,IAAI,CAAC;QAE9B,wJAAwJ;QACxJ,UAAK,GAAkB,IAAI,CAAC;QAEX,wDAAmD,GAAG,IAAI,CAAC,SAAS,CAAC;YACpF,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAA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C,aAAa;;;;;;;QAOlC,KAAK,CAAC,UAAU,EAAE;;;;;eAKX,SAAS,OAAC,IAAI,CAAC,KAAK,yCAAI,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;;kBAExD,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,IAAY,aAAa;QAEvB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAS,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;IACxE,CAAC;IAED,IAAY,UAAU;;QACpB,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import type { Data, TemplateConfigJSON } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { getDefaultJSON } from './defaults';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html, svg } from 'lit-html';\n\nconst NS = 'template-config-form';\nconst Base = ResponsiveMixin(TranslatableMixin(InternalForm, NS));\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n countries: {},\n regions: {},\n store: {},\n };\n }\n\n /** URI of the `fx:countries` hAPI resource. */\n countries: string | null = null;\n\n /** URI of the `fx:regions` hAPI resource. */\n regions: string | null = null;\n\n /** URI of the `fx:store` hAPI resource related to this template config. If this property is `null`, a link relationship will be used when available. */\n store: string | null = null;\n\n private readonly __customCheckoutFieldCouponEntryRequirementsOptions = JSON.stringify([\n { label: 'option_enabled', value: 'enabled' },\n { label: 'option_disabled', value: 'disabled' },\n ]);\n\n private readonly __customCheckoutFieldRequirementsOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n { label: 'option_hidden', value: 'hidden' },\n ]);\n\n private readonly __tosCheckboxSettingsInitialStateOptions = JSON.stringify([\n { label: 'option_checked', value: 'checked' },\n { label: 'option_unchecked', value: 'unchecked' },\n ]);\n\n private readonly __locationFilteringFilterTypeOptions = JSON.stringify([\n { label: 'option_blocklist', value: 'blacklist' },\n { label: 'option_allowlist', value: 'whitelist' },\n ]);\n\n private readonly __foxycompleteShowComboboxOptions = JSON.stringify([\n { label: 'option_combobox', value: 'combobox' },\n { label: 'option_search', value: 'search' },\n ]);\n\n private readonly __tosCheckboxSettingsUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n ]);\n\n private readonly __locationFilteringUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_shipping', value: 'shipping' },\n { label: 'option_billing', value: 'billing' },\n { label: 'option_both', value: 'both' },\n { label: 'option_independent', value: 'independent' },\n ]);\n\n private readonly __cscRequirementsValueOptions = JSON.stringify([\n { label: 'option_all_cards', value: 'all_cards' },\n { label: 'option_sso_only', value: 'sso_only' },\n { label: 'option_new_cards_only', value: 'new_cards_only' },\n ]);\n\n private readonly __checkoutTypeDefaultOptions = JSON.stringify([\n { label: 'option_default_account', value: 'default_account' },\n { label: 'option_default_guest', value: 'default_guest' },\n ]);\n\n private readonly __checkoutTypeAccountOptions = JSON.stringify([\n { label: 'option_account', value: 'account_only' },\n { label: 'option_guest', value: 'guest_only' },\n { label: 'option_both', value: 'default_guest' },\n ]);\n\n private readonly __cartTypeOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_fullpage', value: 'fullpage' },\n { label: 'option_custom', value: 'custom' },\n ]);\n\n private readonly __locationFilteringFilterValuesSetValue = (\n newValue: Record<string, '*' | string[]>\n ) => {\n const formJson = this.__formJson;\n const newConfig = {\n ...formJson.location_filtering,\n shipping_filter_values: newValue,\n billing_filter_values: newValue,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newConfig }) });\n };\n\n private readonly __locationFilteringFilterTypeSetValue = (value: string) => {\n const formJson = this.__formJson;\n const newValue = {\n ...formJson.location_filtering,\n shipping_filter_type: value,\n billing_filter_type: value,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newValue }) });\n };\n\n private readonly __foxycompleteShowComboboxGetValue = () => {\n return this.__formJson.foxycomplete.show_combobox ? 'combobox' : 'search';\n };\n\n private readonly __foxycompleteShowComboboxSetValue = (value: string) => {\n const newValue = value === 'combobox';\n const foxycomplete = { ...this.__formJson.foxycomplete, show_combobox: newValue };\n this.edit({ json: JSON.stringify({ ...this.__formJson, foxycomplete }) });\n };\n\n private readonly __checkoutTypeAccountGetValue = () => {\n const formJson = this.__formJson;\n return formJson.checkout_type.includes('default') ? 'default_guest' : formJson.checkout_type;\n };\n\n private readonly __customConfigGetValue = () => {\n const formJson = this.__formJson;\n if (typeof formJson.custom_config === 'string') return formJson.custom_config;\n return JSON.stringify(formJson.custom_config, null, 2);\n };\n\n private readonly __customConfigSetValue = (newValue: string) => {\n const formJson = this.__formJson;\n\n try {\n formJson.custom_config = JSON.parse(newValue);\n } catch {\n formJson.custom_config = newValue;\n }\n\n this.edit({ json: JSON.stringify(formJson) });\n };\n\n private readonly __defaultJSON = JSON.stringify(getDefaultJSON());\n\n get hiddenSelector(): BooleanSelector {\n const alwaysHidden = [super.hiddenSelector.toString()];\n\n const dataJson = this.__dataJson;\n const formJson = this.__formJson;\n\n const locationFilteringUsage = formJson.location_filtering.usage;\n const checkoutType = formJson.checkout_type;\n\n if (formJson.cart_display_config.usage !== 'required') {\n alwaysHidden.unshift('cart-group-two', 'cart-group-three', 'cart-group-four');\n }\n\n if (formJson.foxycomplete.usage !== 'required') {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-show-combobox',\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close',\n 'country-and-region-group-one:foxycomplete-show-flags'\n );\n }\n\n if (formJson.foxycomplete.show_combobox === false) {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close'\n );\n }\n\n if (locationFilteringUsage !== 'both') {\n alwaysHidden.unshift('country-and-region-group-two');\n }\n\n if (locationFilteringUsage !== 'shipping' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-three');\n }\n\n if (locationFilteringUsage !== 'billing' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-four');\n }\n\n if (checkoutType !== 'default_account' && checkoutType !== 'default_guest') {\n alwaysHidden.unshift('customer-accounts:checkout-type-default');\n }\n\n if (formJson.tos_checkbox_settings.usage === 'none') {\n alwaysHidden.unshift(\n 'consent-group-one:tos-checkbox-settings-url',\n 'consent-group-one:tos-checkbox-settings-initial-state',\n 'consent-group-one:tos-checkbox-settings-is-hidden'\n );\n }\n\n if (formJson.analytics_config.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics', 'analytics-config-google-tag');\n }\n\n if (dataJson?.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics');\n }\n\n if (formJson.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift(\n 'analytics-config-google-analytics:analytics-config-google-analytics-account-id',\n 'analytics-config-google-analytics:analytics-config-google-analytics-include-on-site'\n );\n }\n\n if (formJson.analytics_config.google_tag.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-account-id');\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-send-to');\n }\n\n if (this.__storeLoader?.data?.features_multiship !== true) {\n alwaysHidden.unshift('custom-script-values-multiship-checkout-fields');\n }\n\n return new BooleanSelector(alwaysHidden.join(' ').trim());\n }\n\n renderBody(): TemplateResult {\n const customCheckoutFieldRequirementsControls = [\n [\n 'billing_address1',\n 'billing_address2',\n 'billing_city',\n 'billing_region',\n 'billing_postal_code',\n 'billing_country',\n ],\n [\n 'billing_first_name',\n 'billing_last_name',\n 'billing_company',\n 'billing_tax_id',\n 'billing_phone',\n 'coupon_entry',\n ],\n ];\n\n const cartDisplayConfigFields = [\n ['show_product_weight', 'show_product_category', 'show_product_code', 'show_product_options'],\n ['show_sub_frequency', 'show_sub_startdate', 'show_sub_nextdate', 'show_sub_enddate'],\n ];\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"cart-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_type\"\n property=\"json\"\n options=${this.__cartTypeOptions}\n layout=\"summary-item\"\n infer=\"cart-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"cart_display_config.usage\"\n property=\"json\"\n infer=\"cart-display-config-usage\"\n invert\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${cartDisplayConfigFields.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const sel = `cart-group-${suffix}:cart-display-config-${prop.replace(/_/g, '-')}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${cartDisplayConfigFields.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"cart-group-${suffix}\">\n ${group.map(prop => {\n return html`\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.${prop}\"\n property=\"json\"\n infer=\"cart-display-config-${prop.replace(/_/g, '-')}\"\n >\n </foxy-internal-switch-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"cart-group-four\">\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.hidden_product_options\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"cart-display-config-hidden-product-options\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"foxycomplete.usage\"\n property=\"json\"\n infer=\"foxycomplete-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n options=${this.__foxycompleteShowComboboxOptions}\n layout=\"summary-item\"\n infer=\"foxycomplete-show-combobox\"\n .getValue=${this.__foxycompleteShowComboboxGetValue}\n .setValue=${this.__foxycompleteShowComboboxSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_open\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-open\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_close\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-close\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.show_flags\"\n property=\"json\"\n infer=\"foxycomplete-show-flags\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"enabled\"\n json-path=\"postal_code_lookup\"\n property=\"json\"\n infer=\"postal-code-lookup\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.usage\"\n property=\"json\"\n options=${this.__locationFilteringUsageOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-usage\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-two\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-filter-type\"\n .setValue=${this.__locationFilteringFilterTypeSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-filter-values\"\n .setValue=${this.__locationFilteringFilterValuesSetValue}\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-three\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-shipping-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-shipping-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-four\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-billing-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-billing-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"customer-accounts\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeAccountOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-account\"\n .getValue=${this.__checkoutTypeAccountGetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeDefaultOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-default\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.usage\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsUsageOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-usage\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.url\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-url\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.initial_state\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsInitialStateOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-initial-state\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.is_hidden\"\n property=\"json\"\n infer=\"tos-checkbox-settings-is-hidden\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"eu_secure_data_transfer_consent.usage\"\n property=\"json\"\n infer=\"eu-secure-data-transfer-consent-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-three\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"newsletter_subscribe.usage\"\n property=\"json\"\n infer=\"newsletter-subscribe-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"supported-cards-group\">\n <foxy-internal-template-config-form-supported-cards-control\n json-template=${this.__defaultJSON}\n json-path=\"supported_payment_cards\"\n property=\"json\"\n infer=\"supported-payment-cards\"\n >\n </foxy-internal-template-config-form-supported-cards-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"disclaimer\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csc-requirements-group\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"csc_requirements\"\n property=\"json\"\n options=${this.__cscRequirementsValueOptions}\n layout=\"summary-item\"\n infer=\"csc-requirements\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"checkout-fields-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"disabled\"\n true-alias=\"enabled\"\n json-path=\"custom_checkout_field_requirements.cart_controls\"\n property=\"json\"\n infer=\"custom-checkout-field-requirements-cart-controls\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${customCheckoutFieldRequirementsControls.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const sel = `checkout-fields-group-${suffix}:custom-checkout-field-requirements-${infer}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${customCheckoutFieldRequirementsControls.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"checkout-fields-group-${suffix}\">\n ${group.map(prop => {\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const path = `custom_checkout_field_requirements.${prop}`;\n return html`\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=${path}\n property=\"json\"\n options=${prop === 'coupon_entry'\n ? this.__customCheckoutFieldCouponEntryRequirementsOptions\n : this.__customCheckoutFieldRequirementsOptions}\n layout=\"summary-item\"\n infer=\"custom-checkout-field-requirements-${infer}\"\n >\n </foxy-internal-select-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"analytics-config\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.usage\"\n property=\"json\"\n infer=\"analytics-config-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-analytics\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_analytics.usage\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-analytics-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.include_on_site\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-include-on-site\"\n >\n </foxy-internal-switch-control>\n\n <p class=\"flex items-start gap-s bg-error-10 text-error\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"deprecation_notice\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-tag\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_tag.usage\"\n property=\"json\"\n infer=\"analytics-config-google-tag-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.send_to\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-send-to\"\n >\n </foxy-internal-text-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <span>\n <foxy-i18n infer=\"\" key=\"usage_notice\"></foxy-i18n>\n <br />\n <a\n target=\"_blank\"\n class=\"cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads\"\n rel=\"nofollow noreferrer noopener\"\n >\n <foxy-i18n class=\"transition-opacity group-hover-opacity-80\" infer=\"\" key=\"docs_link\">\n </foxy-i18n>\n </a>\n </span>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"debug\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"debug.usage\"\n property=\"json\"\n infer=\"debug-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-source-control\n infer=\"custom-config\"\n .getValue=${this.__customConfigGetValue}\n .setValue=${this.__customConfigSetValue}\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.header\"\n property=\"json\"\n infer=\"custom-script-values-header\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.multiship_checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-multiship-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.footer\"\n property=\"json\"\n infer=\"custom-script-values-footer\"\n >\n </foxy-internal-source-control>\n\n ${super.renderBody()}\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.store ?? this.data?._links['fx:store'].href)}\n id=\"storeLoader\"\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n `;\n }\n\n private get __storeLoader() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n return this.renderRoot.querySelector<Loader>('#storeLoader');\n }\n\n private get __formJson(): TemplateConfigJSON {\n return this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n }\n\n private get __dataJson(): TemplateConfigJSON | null {\n return this.data?.json ? JSON.parse(this.data.json) : null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,cAAc,EAAE,sBAAmB;AAC5C,OAA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AC,CAAC,CAAC,IAAI,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import type { Data, TemplateConfigJSON } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { getDefaultJSON } from './defaults';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html, svg } from 'lit-html';\n\nconst NS = 'template-config-form';\nconst Base = ResponsiveMixin(TranslatableMixin(InternalForm, NS));\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n countries: {},\n regions: {},\n store: {},\n };\n }\n\n /** URI of the `fx:countries` hAPI resource. */\n countries: string | null = null;\n\n /** URI of the `fx:regions` hAPI resource. */\n regions: string | null = null;\n\n /** URI of the `fx:store` hAPI resource related to this template config. If this property is `null`, a link relationship will be used when available. */\n store: string | null = null;\n\n private readonly __customCheckoutFieldCouponEntryRequirementsOptions = JSON.stringify([\n { label: 'option_enabled', value: 'enabled' },\n { label: 'option_disabled', value: 'disabled' },\n ]);\n\n private readonly __customCheckoutFieldRequirementsOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n { label: 'option_hidden', value: 'hidden' },\n ]);\n\n private readonly __tosCheckboxSettingsInitialStateOptions = JSON.stringify([\n { label: 'option_checked', value: 'checked' },\n { label: 'option_unchecked', value: 'unchecked' },\n ]);\n\n private readonly __locationFilteringFilterTypeOptions = JSON.stringify([\n { label: 'option_blocklist', value: 'blacklist' },\n { label: 'option_allowlist', value: 'whitelist' },\n ]);\n\n private readonly __foxycompleteShowComboboxOptions = JSON.stringify([\n { label: 'option_combobox', value: 'combobox' },\n { label: 'option_search', value: 'search' },\n ]);\n\n private readonly __tosCheckboxSettingsUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n ]);\n\n private readonly __locationFilteringUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_shipping', value: 'shipping' },\n { label: 'option_billing', value: 'billing' },\n { label: 'option_both', value: 'both' },\n { label: 'option_independent', value: 'independent' },\n ]);\n\n private readonly __cscRequirementsValueOptions = JSON.stringify([\n { label: 'option_all_cards', value: 'all_cards' },\n { label: 'option_sso_only', value: 'sso_only' },\n { label: 'option_new_cards_only', value: 'new_cards_only' },\n ]);\n\n private readonly __checkoutTypeDefaultOptions = JSON.stringify([\n { label: 'option_default_account', value: 'default_account' },\n { label: 'option_default_guest', value: 'default_guest' },\n ]);\n\n private readonly __checkoutTypeAccountOptions = JSON.stringify([\n { label: 'option_account', value: 'account_only' },\n { label: 'option_guest', value: 'guest_only' },\n { label: 'option_both', value: 'default_guest' },\n ]);\n\n private readonly __cartTypeOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_fullpage', value: 'fullpage' },\n { label: 'option_custom', value: 'custom' },\n ]);\n\n private readonly __locationFilteringFilterValuesSetValue = (\n newValue: Record<string, '*' | string[]>\n ) => {\n const formJson = this.__formJson;\n const newConfig = {\n ...formJson.location_filtering,\n shipping_filter_values: newValue,\n billing_filter_values: newValue,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newConfig }) });\n };\n\n private readonly __locationFilteringFilterTypeSetValue = (value: string) => {\n const formJson = this.__formJson;\n const newValue = {\n ...formJson.location_filtering,\n shipping_filter_type: value,\n billing_filter_type: value,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newValue }) });\n };\n\n private readonly __foxycompleteShowComboboxGetValue = () => {\n return this.__formJson.foxycomplete.show_combobox ? 'combobox' : 'search';\n };\n\n private readonly __foxycompleteShowComboboxSetValue = (value: string) => {\n const newValue = value === 'combobox';\n const foxycomplete = { ...this.__formJson.foxycomplete, show_combobox: newValue };\n this.edit({ json: JSON.stringify({ ...this.__formJson, foxycomplete }) });\n };\n\n private readonly __checkoutTypeAccountGetValue = () => {\n const formJson = this.__formJson;\n return formJson.checkout_type.includes('default') ? 'default_guest' : formJson.checkout_type;\n };\n\n private readonly __customConfigGetValue = () => {\n const formJson = this.__formJson;\n if (typeof formJson.custom_config === 'string') return formJson.custom_config;\n return JSON.stringify(formJson.custom_config, null, 2);\n };\n\n private readonly __customConfigSetValue = (newValue: string) => {\n const formJson = this.__formJson;\n\n try {\n formJson.custom_config = JSON.parse(newValue);\n } catch {\n formJson.custom_config = newValue;\n }\n\n this.edit({ json: JSON.stringify(formJson) });\n };\n\n private readonly __defaultJSON = JSON.stringify(getDefaultJSON());\n\n get hiddenSelector(): BooleanSelector {\n const alwaysHidden = [super.hiddenSelector.toString()];\n\n const dataJson = this.__dataJson;\n const formJson = this.__formJson;\n\n const locationFilteringUsage = formJson.location_filtering.usage;\n const checkoutType = formJson.checkout_type;\n\n if (formJson.cart_display_config.usage !== 'required') {\n alwaysHidden.unshift('cart-group-two', 'cart-group-three', 'cart-group-four');\n }\n\n if (formJson.foxycomplete.usage !== 'required') {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-show-combobox',\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close',\n 'country-and-region-group-one:foxycomplete-show-flags'\n );\n }\n\n if (formJson.foxycomplete.show_combobox === false) {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close'\n );\n }\n\n if (locationFilteringUsage !== 'both') {\n alwaysHidden.unshift('country-and-region-group-two');\n }\n\n if (locationFilteringUsage !== 'shipping' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-three');\n }\n\n if (locationFilteringUsage !== 'billing' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-four');\n }\n\n if (checkoutType !== 'default_account' && checkoutType !== 'default_guest') {\n alwaysHidden.unshift('customer-accounts:checkout-type-default');\n }\n\n if (formJson.tos_checkbox_settings.usage === 'none') {\n alwaysHidden.unshift(\n 'consent-group-one:tos-checkbox-settings-url',\n 'consent-group-one:tos-checkbox-settings-initial-state',\n 'consent-group-one:tos-checkbox-settings-is-hidden'\n );\n }\n\n if (formJson.analytics_config.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics', 'analytics-config-google-tag');\n }\n\n if (dataJson?.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics');\n }\n\n if (formJson.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift(\n 'analytics-config-google-analytics:analytics-config-google-analytics-account-id',\n 'analytics-config-google-analytics:analytics-config-google-analytics-include-on-site'\n );\n }\n\n if (formJson.analytics_config.google_tag.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-account-id');\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-send-to');\n }\n\n if (this.__storeLoader?.data?.features_multiship !== true) {\n alwaysHidden.unshift('custom-script-values-multiship-checkout-fields');\n }\n\n return new BooleanSelector(alwaysHidden.join(' ').trim());\n }\n\n renderBody(): TemplateResult {\n const customCheckoutFieldRequirementsControls = [\n [\n 'billing_address1',\n 'billing_address2',\n 'billing_city',\n 'billing_region',\n 'billing_postal_code',\n 'billing_country',\n ],\n [\n 'billing_first_name',\n 'billing_last_name',\n 'billing_company',\n 'billing_tax_id',\n 'billing_phone',\n 'coupon_entry',\n ],\n ];\n\n const cartDisplayConfigFields = [\n ['show_product_weight', 'show_product_category', 'show_product_code', 'show_product_options'],\n ['show_sub_frequency', 'show_sub_startdate', 'show_sub_nextdate', 'show_sub_enddate'],\n ];\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"cart-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_type\"\n property=\"json\"\n options=${this.__cartTypeOptions}\n layout=\"summary-item\"\n infer=\"cart-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"cart_display_config.usage\"\n property=\"json\"\n infer=\"cart-display-config-usage\"\n invert\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${cartDisplayConfigFields.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const sel = `cart-group-${suffix}:cart-display-config-${prop.replace(/_/g, '-')}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${cartDisplayConfigFields.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"cart-group-${suffix}\">\n ${group.map(prop => {\n return html`\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.${prop}\"\n property=\"json\"\n infer=\"cart-display-config-${prop.replace(/_/g, '-')}\"\n >\n </foxy-internal-switch-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"cart-group-four\">\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.hidden_product_options\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"cart-display-config-hidden-product-options\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"foxycomplete.usage\"\n property=\"json\"\n infer=\"foxycomplete-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n options=${this.__foxycompleteShowComboboxOptions}\n layout=\"summary-item\"\n infer=\"foxycomplete-show-combobox\"\n .getValue=${this.__foxycompleteShowComboboxGetValue}\n .setValue=${this.__foxycompleteShowComboboxSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_open\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-open\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_close\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-close\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.show_flags\"\n property=\"json\"\n infer=\"foxycomplete-show-flags\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"enabled\"\n json-path=\"postal_code_lookup.usage\"\n property=\"json\"\n infer=\"postal-code-lookup\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.usage\"\n property=\"json\"\n options=${this.__locationFilteringUsageOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-usage\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-two\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-filter-type\"\n .setValue=${this.__locationFilteringFilterTypeSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-filter-values\"\n .setValue=${this.__locationFilteringFilterValuesSetValue}\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-three\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-shipping-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-shipping-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-four\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-billing-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n regions=${ifDefined(this.regions ?? void 0)}\n infer=\"location-filtering-billing-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"customer-accounts\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeAccountOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-account\"\n .getValue=${this.__checkoutTypeAccountGetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeDefaultOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-default\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.usage\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsUsageOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-usage\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.url\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-url\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.initial_state\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsInitialStateOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-initial-state\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.is_hidden\"\n property=\"json\"\n infer=\"tos-checkbox-settings-is-hidden\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"eu_secure_data_transfer_consent.usage\"\n property=\"json\"\n infer=\"eu-secure-data-transfer-consent-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-three\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"newsletter_subscribe.usage\"\n property=\"json\"\n infer=\"newsletter-subscribe-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"supported-cards-group\">\n <foxy-internal-template-config-form-supported-cards-control\n json-template=${this.__defaultJSON}\n json-path=\"supported_payment_cards\"\n property=\"json\"\n infer=\"supported-payment-cards\"\n >\n </foxy-internal-template-config-form-supported-cards-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"disclaimer\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csc-requirements-group\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"csc_requirements\"\n property=\"json\"\n options=${this.__cscRequirementsValueOptions}\n layout=\"summary-item\"\n infer=\"csc-requirements\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"checkout-fields-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"disabled\"\n true-alias=\"enabled\"\n json-path=\"custom_checkout_field_requirements.cart_controls\"\n property=\"json\"\n infer=\"custom-checkout-field-requirements-cart-controls\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${customCheckoutFieldRequirementsControls.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const sel = `checkout-fields-group-${suffix}:custom-checkout-field-requirements-${infer}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${customCheckoutFieldRequirementsControls.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"checkout-fields-group-${suffix}\">\n ${group.map(prop => {\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const path = `custom_checkout_field_requirements.${prop}`;\n return html`\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=${path}\n property=\"json\"\n options=${prop === 'coupon_entry'\n ? this.__customCheckoutFieldCouponEntryRequirementsOptions\n : this.__customCheckoutFieldRequirementsOptions}\n layout=\"summary-item\"\n infer=\"custom-checkout-field-requirements-${infer}\"\n >\n </foxy-internal-select-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"analytics-config\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.usage\"\n property=\"json\"\n infer=\"analytics-config-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-analytics\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_analytics.usage\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-analytics-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.include_on_site\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-include-on-site\"\n >\n </foxy-internal-switch-control>\n\n <p class=\"flex items-start gap-s bg-error-10 text-error\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"deprecation_notice\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-tag\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_tag.usage\"\n property=\"json\"\n infer=\"analytics-config-google-tag-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.send_to\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-send-to\"\n >\n </foxy-internal-text-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <span>\n <foxy-i18n infer=\"\" key=\"usage_notice\"></foxy-i18n>\n <br />\n <a\n target=\"_blank\"\n class=\"cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads\"\n rel=\"nofollow noreferrer noopener\"\n >\n <foxy-i18n class=\"transition-opacity group-hover-opacity-80\" infer=\"\" key=\"docs_link\">\n </foxy-i18n>\n </a>\n </span>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"debug\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"debug.usage\"\n property=\"json\"\n infer=\"debug-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-source-control\n infer=\"custom-config\"\n .getValue=${this.__customConfigGetValue}\n .setValue=${this.__customConfigSetValue}\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.header\"\n property=\"json\"\n infer=\"custom-script-values-header\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.multiship_checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-multiship-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.footer\"\n property=\"json\"\n infer=\"custom-script-values-footer\"\n >\n </foxy-internal-source-control>\n\n ${super.renderBody()}\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.store ?? this.data?._links['fx:store'].href)}\n id=\"storeLoader\"\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n `;\n }\n\n private get __storeLoader() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n return this.renderRoot.querySelector<Loader>('#storeLoader');\n }\n\n private get __formJson(): TemplateConfigJSON {\n return this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n }\n\n private get __dataJson(): TemplateConfigJSON | null {\n return this.data?.json ? JSON.parse(this.data.json) : null;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-8ef0ca65.js";import"./shared-0c134ce7.js";import{I as e,a as t}from"./shared-5b4e2567.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-4d32d19e.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u as c}from"./shared-f83207fb.js";let u,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends e{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(u||(u=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends t{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=c("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="flex items-start leading-xs gap-m"> <div class="flex-1"> <div class="text-m text-body whitespace-nowrap">${0}</div> <div class="text-s text-secondary">${0}</div> <div class="text-s text-error" ?hidden="${0}"> ${0} </div> </div> <div class="flex items-center gap-xs"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,c="string"==typeof this._value?a(this._value):void 0,u="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,u?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),u):"",this.showCopyIdButton&&null!==c?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),c):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-d807cb20.js";import{a as e}from"./shared-5b4e2567.js";import"./shared-4d32d19e.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-edeeb089.js";import{a as e}from"./shared-5b4e2567.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as s,h as i,s as r}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-d0aed1c1.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(c||(c=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-b65d169b.js";import"./shared-edeeb089.js";import{a as e}from"./shared-5b4e2567.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as s,s as r}from"./shared-ba5c42c7.js";import{i as a}from"./shared-53e42a77.js";import{c as l}from"./shared-4e709717.js";let n,o,d,u,h,p,m=e=>e;customElements.define("foxy-internal-number-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(n||(n=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var e,t,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(o||(o=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,a(null!==(e=this.step)&&void 0!==e?e:void 0),a(null!==(t=this.min)&&void 0!==t?t:void 0),a(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=parseFloat(t.value)}),this.prefix?s(d||(d=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(u||(u=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var e,i,n;const o={"text-disabled":this.disabled,"text-tertiary":!this.readonly&&!this.disabled,"font-medium":!this.readonly};return s(h||(h=m` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <span class="${0}"> ${0} </span> <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> <span class="${0}"> ${0} </span> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,l(t({"text-secondary":this.readonly},o)),this.prefix,this.placeholder,l({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),a(null!==(e=this.step)&&void 0!==e?e:void 0),a(null!==(i=this.min)&&void 0!==i?i:void 0),a(null!==(n=this.max)&&void 0!==n?n:void 0),0===this._value?"":this._value,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation();const t=parseFloat(e.target.value);this._value=isNaN(t)?0:t}),l(t({"text-secondary":this.readonly},o)),this.suffix,this.t("clear"),l({"flex-shrink-0 rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value=0,this.dispatchEvent(new CustomEvent("clear"))}),r(p||(p=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-243456aa.js";import{a as e}from"./shared-5b4e2567.js";import"./shared-4d32d19e.js";import{_ as t}from"./shared-cb58dfcd.js";import{i as s}from"./shared-53e42a77.js";import{h as i,s as a}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="flex items-start leading-xs"> <div class="flex-1"> <label class="text-m text-body" for="select">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="${0}"> <div class="flex items-center gap-xs"> <div> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,l({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))))}});
|