@foxy.io/elements 1.18.0-beta.22 → 1.18.0-beta.23
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-card.js +85 -3
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/shared-4979dca4.js +1 -0
- package/dist/cdn/translations/store-shipping-method-form/en.json +10 -10
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +84 -1
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +88 -15
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +1 -1
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +2 -2
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/types.d.ts +53 -1
- package/dist/elements/public/ItemCategoryForm/types.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +46 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +85 -29
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/index.d.ts +1 -3
- package/dist/elements/public/StoreShippingMethodForm/index.js +1 -3
- package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +3 -3
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +4 -4
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +6 -6
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +4 -4
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +3 -3
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +4 -4
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +3 -3
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/types.d.ts +33 -1
- package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-5b177708.js +0 -82
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-62c088b7.js";import"./shared-2092d86f.js";import{h as
|
|
1
|
+
import"./shared-62c088b7.js";import"./shared-2092d86f.js";import{h as c}from"./shared-0ce006b9.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-0821cfdc.js";import{h}from"./shared-7f33a83a.js";import{C as a}from"./shared-43bcce74.js";import{N as t}from"./shared-181f51bd.js";import{T as s,a as i}from"./shared-2cc638ad.js";import{c as l}from"./shared-4e709717.js";import"./shared-a8ced8bf.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-d3bf9ac0.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -8,7 +8,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
8
8
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
9
9
|
part of the polymer project is also subject to an additional IP rights grant
|
|
10
10
|
found at http://polymer.github.io/PATENTS.txt
|
|
11
|
-
*/const
|
|
11
|
+
*/const v=c`<iron-iconset-svg name="social" size="24">
|
|
12
12
|
<svg><defs>
|
|
13
13
|
<g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"></path></g>
|
|
14
14
|
<g id="domain"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></g>
|
|
@@ -41,4 +41,86 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
41
41
|
<g id="share"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"></path></g>
|
|
42
42
|
<g id="whatshot"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"></path></g>
|
|
43
43
|
</defs></svg>
|
|
44
|
-
</iron-iconset-svg>`;document.head.appendChild(
|
|
44
|
+
</iron-iconset-svg>`;document.head.appendChild(v.content);
|
|
45
|
+
/**
|
|
46
|
+
@license
|
|
47
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
48
|
+
This code may only be used under the BSD style license found at
|
|
49
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
50
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
51
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
52
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
53
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
54
|
+
*/
|
|
55
|
+
const d=c`<iron-iconset-svg name="maps" size="24">
|
|
56
|
+
<svg><defs>
|
|
57
|
+
<g id="add-location"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"></path></g>
|
|
58
|
+
<g id="beenhere"><path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59-7.59L19 7l-9 9z"></path></g>
|
|
59
|
+
<g id="directions"><path d="M21.71 11.29l-9-9c-.39-.39-1.02-.39-1.41 0l-9 9c-.39.39-.39 1.02 0 1.41l9 9c.39.39 1.02.39 1.41 0l9-9c.39-.38.39-1.01 0-1.41zM14 14.5V12h-4v3H8v-4c0-.55.45-1 1-1h5V7.5l3.5 3.5-3.5 3.5z"></path></g>
|
|
60
|
+
<g id="directions-bike"><path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"></path></g>
|
|
61
|
+
<g id="directions-boat"><path d="M20 21c-1.39 0-2.78-.47-4-1.32-2.44 1.71-5.56 1.71-8 0C6.78 20.53 5.39 21 4 21H2v2h2c1.38 0 2.74-.35 4-.99 2.52 1.29 5.48 1.29 8 0 1.26.65 2.62.99 4 .99h2v-2h-2zM3.95 19H4c1.6 0 3.02-.88 4-2 .98 1.12 2.4 2 4 2s3.02-.88 4-2c.98 1.12 2.4 2 4 2h.05l1.89-6.68c.08-.26.06-.54-.06-.78s-.34-.42-.6-.5L20 10.62V6c0-1.1-.9-2-2-2h-3V1H9v3H6c-1.1 0-2 .9-2 2v4.62l-1.29.42c-.26.08-.48.26-.6.5s-.15.52-.06.78L3.95 19zM6 6h12v3.97L12 8 6 9.97V6z"></path></g>
|
|
62
|
+
<g id="directions-bus"><path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z"></path></g>
|
|
63
|
+
<g id="directions-car"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"></path></g>
|
|
64
|
+
<g id="directions-railway"><path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7H6V5h12v5z"></path></g>
|
|
65
|
+
<g id="directions-run"><path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"></path></g>
|
|
66
|
+
<g id="directions-subway"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"></path></g>
|
|
67
|
+
<g id="directions-transit"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"></path></g>
|
|
68
|
+
<g id="directions-walk"><path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"></path></g>
|
|
69
|
+
<g id="edit-location"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm-1.56 10H9v-1.44l3.35-3.34 1.43 1.43L10.44 12zm4.45-4.45l-.7.7-1.44-1.44.7-.7c.15-.15.39-.15.54 0l.9.9c.15.15.15.39 0 .54z"></path></g>
|
|
70
|
+
<g id="ev-station"><path d="M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM18 10c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zM8 18v-4.5H6L10 6v5h2l-4 7z"></path></g>
|
|
71
|
+
<g id="flight"><path d="M10.18 9"></path><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"></path></g>
|
|
72
|
+
<g id="hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"></path></g>
|
|
73
|
+
<g id="layers"><path d="M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"></path></g>
|
|
74
|
+
<g id="layers-clear"><path d="M19.81 14.99l1.19-.92-1.43-1.43-1.19.92 1.43 1.43zm-.45-4.72L21 9l-9-7-2.91 2.27 7.87 7.88 2.4-1.88zM3.27 1L2 2.27l4.22 4.22L3 9l1.63 1.27L12 16l2.1-1.63 1.43 1.43L12 18.54l-7.37-5.73L3 14.07l9 7 4.95-3.85L20.73 21 22 19.73 3.27 1z"></path></g>
|
|
75
|
+
<g id="local-activity"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"></path></g>
|
|
76
|
+
<g id="local-airport"><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"></path></g>
|
|
77
|
+
<g id="local-atm"><path d="M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"></path></g>
|
|
78
|
+
<g id="local-bar"><path d="M21 5V3H3v2l8 9v5H6v2h12v-2h-5v-5l8-9zM7.43 7L5.66 5h12.69l-1.78 2H7.43z"></path></g>
|
|
79
|
+
<g id="local-cafe"><path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM2 21h18v-2H2v2z"></path></g>
|
|
80
|
+
<g id="local-car-wash"><path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zM7 5c.83 0 1.5-.67 1.5-1.5C8.5 2.5 7 .8 7 .8S5.5 2.5 5.5 3.5C5.5 4.33 6.17 5 7 5zm11.92 3.01C18.72 7.42 18.16 7 17.5 7h-11c-.66 0-1.21.42-1.42 1.01L3 14v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 18c-.83 0-1.5-.67-1.5-1.5S5.67 15 6.5 15s1.5.67 1.5 1.5S7.33 18 6.5 18zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 13l1.5-4.5h11L19 13H5z"></path></g>
|
|
81
|
+
<g id="local-convenience-store"><path d="M19 7V4H5v3H2v13h8v-4h4v4h8V7h-3zm-8 3H9v1h2v1H8V9h2V8H8V7h3v3zm5 2h-1v-2h-2V7h1v2h1V7h1v5z"></path></g>
|
|
82
|
+
<g id="local-dining"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"></path></g>
|
|
83
|
+
<g id="local-drink"><path d="M3 2l2.01 18.23C5.13 21.23 5.97 22 7 22h10c1.03 0 1.87-.77 1.99-1.77L21 2H3zm9 17c-1.66 0-3-1.34-3-3 0-2 3-5.4 3-5.4s3 3.4 3 5.4c0 1.66-1.34 3-3 3zm6.33-11H5.67l-.44-4h13.53l-.43 4z"></path></g>
|
|
84
|
+
<g id="local-florist"><path d="M12 22c4.97 0 9-4.03 9-9-4.97 0-9 4.03-9 9zM5.6 10.25c0 1.38 1.12 2.5 2.5 2.5.53 0 1.01-.16 1.42-.44l-.02.19c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5l-.02-.19c.4.28.89.44 1.42.44 1.38 0 2.5-1.12 2.5-2.5 0-1-.59-1.85-1.43-2.25.84-.4 1.43-1.25 1.43-2.25 0-1.38-1.12-2.5-2.5-2.5-.53 0-1.01.16-1.42.44l.02-.19C14.5 2.12 13.38 1 12 1S9.5 2.12 9.5 3.5l.02.19c-.4-.28-.89-.44-1.42-.44-1.38 0-2.5 1.12-2.5 2.5 0 1 .59 1.85 1.43 2.25-.84.4-1.43 1.25-1.43 2.25zM12 5.5c1.38 0 2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8s1.12-2.5 2.5-2.5zM3 13c0 4.97 4.03 9 9 9 0-4.97-4.03-9-9-9z"></path></g>
|
|
85
|
+
<g id="local-gas-station"><path d="M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g>
|
|
86
|
+
<g id="local-grocery-store"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"></path></g>
|
|
87
|
+
<g id="local-hospital"><path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"></path></g>
|
|
88
|
+
<g id="local-hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"></path></g>
|
|
89
|
+
<g id="local-laundry-service"><path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM7 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"></path></g>
|
|
90
|
+
<g id="local-library"><path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"></path></g>
|
|
91
|
+
<g id="local-mall"><path d="M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"></path></g>
|
|
92
|
+
<g id="local-movies"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"></path></g>
|
|
93
|
+
<g id="local-offer"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"></path></g>
|
|
94
|
+
<g id="local-parking"><path d="M13 3H6v18h4v-6h3c3.31 0 6-2.69 6-6s-2.69-6-6-6zm.2 8H10V7h3.2c1.1 0 2 .9 2 2s-.9 2-2 2z"></path></g>
|
|
95
|
+
<g id="local-pharmacy"><path d="M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z"></path></g>
|
|
96
|
+
<g id="local-phone"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"></path></g>
|
|
97
|
+
<g id="local-pizza"><path d="M12 2C8.43 2 5.23 3.54 3.01 6L12 22l8.99-16C18.78 3.55 15.57 2 12 2zM7 7c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm5 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
|
|
98
|
+
<g id="local-play"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"></path></g>
|
|
99
|
+
<g id="local-post-office"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g>
|
|
100
|
+
<g id="local-printshop"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></g>
|
|
101
|
+
<g id="local-see"><circle cx="12" cy="12" r="3.2"></circle><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
|
|
102
|
+
<g id="local-shipping"><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
|
|
103
|
+
<g id="local-taxi"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"></path></g>
|
|
104
|
+
<g id="map"><path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"></path></g>
|
|
105
|
+
<g id="my-location"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g>
|
|
106
|
+
<g id="navigation"><path d="M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z"></path></g>
|
|
107
|
+
<g id="near-me"><path d="M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"></path></g>
|
|
108
|
+
<g id="person-pin"><path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2.7-1.21-2.7-2.7 0-1.49 1.21-2.7 2.7-2.7zM18 16H6v-.9c0-2 4-3.1 6-3.1s6 1.1 6 3.1v.9z"></path></g>
|
|
109
|
+
<g id="person-pin-circle"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 2c1.1 0 2 .9 2 2 0 1.11-.9 2-2 2s-2-.89-2-2c0-1.1.9-2 2-2zm0 10c-1.67 0-3.14-.85-4-2.15.02-1.32 2.67-2.05 4-2.05s3.98.73 4 2.05c-.86 1.3-2.33 2.15-4 2.15z"></path></g>
|
|
110
|
+
<g id="pin-drop"><path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"></path></g>
|
|
111
|
+
<g id="place"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g>
|
|
112
|
+
<g id="rate-review"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 14v-2.47l6.88-6.88c.2-.2.51-.2.71 0l1.77 1.77c.2.2.2.51 0 .71L8.47 14H6zm12 0h-7.5l2-2H18v2z"></path></g>
|
|
113
|
+
<g id="restaurant"><path d="M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"></path></g>
|
|
114
|
+
<g id="restaurant-menu"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"></path></g>
|
|
115
|
+
<g id="satellite"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.99h3C8 6.65 6.66 8 5 8V4.99zM5 12v-2c2.76 0 5-2.25 5-5.01h2C12 8.86 8.87 12 5 12zm0 6l3.5-4.5 2.5 3.01L14.5 12l4.5 6H5z"></path></g>
|
|
116
|
+
<g id="store-mall-directory"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"></path></g>
|
|
117
|
+
<g id="streetview"><path d="M12.56 14.33c-.34.27-.56.7-.56 1.17V21h7c1.1 0 2-.9 2-2v-5.98c-.94-.33-1.95-.52-3-.52-2.03 0-3.93.7-5.44 1.83z"></path><circle cx="18" cy="6" r="5"></circle><path d="M11.5 6c0-1.08.27-2.1.74-3H5c-1.1 0-2 .9-2 2v14c0 .55.23 1.05.59 1.41l9.82-9.82C12.23 9.42 11.5 7.8 11.5 6z"></path></g>
|
|
118
|
+
<g id="subway"><circle cx="15.5" cy="16" r="1"></circle><circle cx="8.5" cy="16" r="1"></circle><path d="M7.01 9h10v5h-10zM17.8 2.8C16 2.09 13.86 2 12 2c-1.86 0-4 .09-5.8.8C3.53 3.84 2 6.05 2 8.86V22h20V8.86c0-2.81-1.53-5.02-4.2-6.06zm.2 13.08c0 1.45-1.18 2.62-2.63 2.62l1.13 1.12V20H15l-1.5-1.5h-2.83L9.17 20H7.5v-.38l1.12-1.12C7.18 18.5 6 17.32 6 15.88V9c0-2.63 3-3 6-3 3.32 0 6 .38 6 3v6.88z"></path></g>
|
|
119
|
+
<g id="terrain"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"></path></g>
|
|
120
|
+
<g id="traffic"><path d="M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41 3 3.86V15H4c0 1.86 1.28 3.41 3 3.86V20c0 .55.45 1 1 1h8c.55 0 1-.45 1-1v-1.14c1.72-.45 3-2 3-3.86h-3v-1.14c1.72-.45 3-2 3-3.86zm-8 9c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2 0-1.11.89-2 2-2 1.1 0 2 .89 2 2 0 1.1-.89 2-2 2z"></path></g>
|
|
121
|
+
<g id="train"><path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-7H6V6h5v4zm2 0V6h5v4h-5zm3.5 7c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
|
|
122
|
+
<g id="tram"><path d="M19 16.94V8.5c0-2.79-2.61-3.4-6.01-3.49l.76-1.51H17V2H7v1.5h4.75l-.76 1.52C7.86 5.11 5 5.73 5 8.5v8.44c0 1.45 1.19 2.66 2.59 2.97L6 21.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 20h-.08c1.69 0 2.58-1.37 2.58-3.06zm-7 1.56c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5-4.5H7V9h10v5z"></path></g>
|
|
123
|
+
<g id="transfer-within-a-station"><path d="M16.49 15.5v-1.75L14 16.25l2.49 2.5V17H22v-1.5zm3.02 4.25H14v1.5h5.51V23L22 20.5 19.51 18zM9.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5.75 8.9L3 23h2.1l1.75-8L9 17v6h2v-7.55L8.95 13.4l.6-3C10.85 12 12.8 13 15 13v-2c-1.85 0-3.45-1-4.35-2.45l-.95-1.6C9.35 6.35 8.7 6 8 6c-.25 0-.5.05-.75.15L2 8.3V13h2V9.65l1.75-.75"></path></g>
|
|
124
|
+
<g id="zoom-out-map"><path d="M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"></path></g>
|
|
125
|
+
</defs></svg>
|
|
126
|
+
</iron-iconset-svg>`;document.head.appendChild(d.content);let e,z,p,r,n,m,o,g,M,V,H,L=c=>c;const f=a(s(i(t,"address-card")));class C extends f{constructor(){super(...arguments),this.templates={},this.__renderAddressName=()=>{var c,a,t;const s=!!(null===(c=this.data)||void 0===c?void 0:c.is_default_billing),i=!!(null===(a=this.data)||void 0===a?void 0:a.is_default_shipping);return h(e||(e=L` <div class="mb-s leading-none"> ${0} <span class="font-semibold"> ${0} ​ </span> ${0} </div> `),this.renderTemplateOrSlot("address-name:before"),s||i?h(z||(z=L` <foxy-i18n data-testid="address-name" lang="${0}" key="default_${0}_address" ns="${0}"> </foxy-i18n> `),this.lang,s?"billing":"shipping",this.ns):h(p||(p=L`<span data-testid="address-name">${0}</span>`),null===(t=this.data)||void 0===t?void 0:t.address_name),this.renderTemplateOrSlot("address-name:after"))},this.__renderLine=(c,a,t)=>h(r||(r=L` <p> ${0} <span class="flex items-center text-m space-x-s text-secondary"> <iron-icon icon="${0}" class="icon-inline flex-shrink-0"></iron-icon> <span class="truncate" data-testid="${0}">${0}</span> ​ </span> ${0} </p> `),this.renderTemplateOrSlot(`${c}:before`),a,c,t,this.renderTemplateOrSlot(`${c}:after`)),this.__renderFullName=()=>{const c=this.data?h(n||(n=L` <foxy-i18n options="${0}" lang="${0}" key="full_name" ns="${0}"> </foxy-i18n> `),JSON.stringify(this.data),this.lang,this.ns):h(m||(m=L`–`));return this.__renderLine("full-name","social:person",c)},this.__renderFullAddress=()=>{const c=this.data?h(o||(o=L` <foxy-i18n data-testid="full-address" options="${0}" lang="${0}" key="full_address" ns="${0}"> </foxy-i18n> `),JSON.stringify(this.data),this.lang,this.ns):h(g||(g=L`–`));return this.__renderLine("full-address","maps:place",c)},this.__renderCompany=()=>{var c;const a=h(M||(M=L`${0}`),(null===(c=this.data)||void 0===c?void 0:c.company)||"–");return this.__renderLine("company","icons:work",a)},this.__renderPhone=()=>{var c;const a=h(V||(V=L`${0}`),(null===(c=this.data)||void 0===c?void 0:c.phone)||"–");return this.__renderLine("phone","maps:local-phone",a)}}render(){var c,a;const t=this.hiddenSelector,s=this.in({idle:"snapshot"}),i=this.in({idle:"template"}),v=this.in("busy");return h(H||(H=L` <div class="relative h-full text-left text-m leading-m font-lumo text-body" aria-live="polite" aria-busy="${0}" data-testid="wrapper"> <div class="${0}"> ${0} ${0} ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),v,l({"transition duration-250 ease-in-out":!0,"opacity-0 pointer-events-none":!s}),t.matches("address-name",!0)?"":this.__renderAddressName(),t.matches("full-name",!0)?"":this.__renderFullName(),t.matches("full-address",!0)?"":this.__renderFullAddress(),t.matches("company",!0)?"":this.__renderCompany(),t.matches("phone",!0)?"":this.__renderPhone(),l({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":s}),this.in("fail")?"error":i?"empty":"busy",this.lang,this.ns,null!==(a=null===(c=customElements.get("foxy-spinner"))||void 0===c?void 0:c.defaultNS)&&void 0!==a?a:"")}}customElements.define("foxy-address-card",C);export{C as AddressCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./foxy-customer.js";import"./shared-bc814810.js";import"./shared-2092d86f.js";import"./shared-62c088b7.js";import"./shared-0479553e.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import{_ as e,k as t}from"./shared-a8ced8bf.js";import{h as s,L as r,c as o}from"./shared-7f33a83a.js";import{A as i}from"./shared-ea67b3f3.js";import"./shared-75e78c70.js";import{C as n}from"./shared-8b6addec.js";import{a,T as l,R as d}from"./shared-2cc638ad.js";import{A as c}from"./shared-a85afa33.js";import{I as m}from"./shared-4f037e43.js";import{c as h}from"./shared-4e709717.js";import{C as u}from"./shared-43bcce74.js";import{N as p}from"./shared-181f51bd.js";import{B as f}from"./shared-76b3d76a.js";import{i as g}from"./shared-d3bf9ac0.js";import"./shared-0ce006b9.js";import"./foxy-attribute-card.js";import"./shared-0821cfdc.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./foxy-attribute-form.js";import"./shared-ed0dee03.js";import"./shared-be66c2e7.js";import"./shared-08156595.js";import"./shared-5ea18e60.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-5a4829e3.js";import"./shared-1c94a156.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-6cb1015f.js";import"./shared-08e27fe9.js";import"./shared-11c2efc8.js";import"./shared-101d1234.js";import"./shared-404aa9cc.js";import"./shared-d8dc97f0.js";import"./shared-5378bd8c.js";import"./foxy-customer-form.js";import"./foxy-nucleon-element.js";import"./shared-b738ee96.js";import"./foxy-address-card.js";import"./
|
|
1
|
+
import"./foxy-customer.js";import"./shared-bc814810.js";import"./shared-2092d86f.js";import"./shared-62c088b7.js";import"./shared-0479553e.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import{_ as e,k as t}from"./shared-a8ced8bf.js";import{h as s,L as r,c as o}from"./shared-7f33a83a.js";import{A as i}from"./shared-ea67b3f3.js";import"./shared-75e78c70.js";import{C as n}from"./shared-8b6addec.js";import{a,T as l,R as d}from"./shared-2cc638ad.js";import{A as c}from"./shared-a85afa33.js";import{I as m}from"./shared-4f037e43.js";import{c as h}from"./shared-4e709717.js";import{C as u}from"./shared-43bcce74.js";import{N as p}from"./shared-181f51bd.js";import{B as f}from"./shared-76b3d76a.js";import{i as g}from"./shared-d3bf9ac0.js";import"./shared-0ce006b9.js";import"./foxy-attribute-card.js";import"./shared-0821cfdc.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./foxy-attribute-form.js";import"./shared-ed0dee03.js";import"./shared-be66c2e7.js";import"./shared-08156595.js";import"./shared-5ea18e60.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-5a4829e3.js";import"./shared-1c94a156.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-6cb1015f.js";import"./shared-08e27fe9.js";import"./shared-11c2efc8.js";import"./shared-101d1234.js";import"./shared-404aa9cc.js";import"./shared-d8dc97f0.js";import"./shared-5378bd8c.js";import"./foxy-customer-form.js";import"./foxy-nucleon-element.js";import"./shared-b738ee96.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-table.js";import"./shared-f80f402a.js";import"./shared-4f9d2417.js";import"./shared-d61b3e4f.js";import"./shared-99065f2a.js";import"./shared-6581241a.js";import"./shared-9bdacf65.js";import"./shared-1000b848.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-39c10b22.js";import"./shared-d518bd55.js";import"./foxy-cancellation-form.js";import"./shared-f7e4cd67.js";import"./shared-bc7f58ef.js";import"./foxy-transaction-card.js";import"./foxy-item-card.js";import"./shared-21679ebd.js";import"./shared-486d7bb5.js";import"./shared-d519a301.js";import"./shared-71d8d167.js";import"./shared-83596b46.js";import"./shared-88c4cfec.js";let $,y,b=e=>e;class v extends(a(l(n),"customer-portal")){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{type:String}})}render(){return this.api.storage.getItem(i.SESSION)?s($||($=b` <foxy-internal-customer-portal-logged-in-view disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" customer="${0}" group="${0}" class="h-full" lang="${0}" href="${0}" ns="${0}" .templates="${0}"> </foxy-internal-customer-portal-logged-in-view> `),this.disabledSelector.toString(),this.readonlySelector.toString(),this.hiddenSelector.toString(),this.base,this.group,this.lang,new URL("./customer_portal_settings",this.base).toString(),this.ns,this.templates):s(y||(y=b` <foxy-internal-customer-portal-logged-out-view disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" group="${0}" class="h-full" lang="${0}" ns="${0}" .templates="${0}"> </foxy-internal-customer-portal-logged-out-view> `),this.disabledSelector.toString(),this.readonlySelector.toString(),this.hiddenSelector.toString(),this.group,this.lang,this.ns,this.templates)}}let S,x,_=e=>e;const j=d(l(a(m(r))));let w,T,O,k,E=e=>e;class R extends(l(r)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=h({"flex-auto font-medium tracking-wide text-s rounded-s transition-colors":!0,"hover-text-primary hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),t=s(w||(w=E` ${0} <slot></slot> `),this.icon?s(T||(T=E`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?s(O||(O=E`<button class="${0}" disabled="disabled">${0}</button>`),e,t):s(k||(k=E` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let z,N,A,F,I,H,U,q,L,P,C=e=>e;const D=l(u(a(p)));let V,B,J,W,G,K,M,Q,X,Y,Z=e=>e;const ee=l(u(a(m(r))));const te=["html"],se=["html"];let re,oe,ie,ne,ae,le,de,ce,me,he,ue,pe,fe=e=>e;const ge=a(u(l(m(r))));let $e,ye,be,ve=e=>e;const Se=u(l(a(m(r),"customer-portal")));customElements.define("foxy-internal-customer-portal-logged-in-view",class extends D{constructor(){var e;super(...arguments),e=this,this.templates={},this.customer="",this.loggingOutState="idle",this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,r,o,i,n;const a="customer:header:actions:sign-out",l=this.loggingOutState,d=this.disabledSelector.matches(a)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==l,m={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:d?"default":"pointer"};return s(z||(z=C` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${a}:before`),this.t("sign_out").toString(),Object.entries(m).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),d,(async function(){try{e.loggingOutState="busy",await new c(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===l?s(N||(N=C`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):s(A||(A=C` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===l?"error":"busy",this.lang,[this.ns,null!==(o=null===(r=customElements.get("foxy-customer"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",null!==(n=null===(i=customElements.get("foxy-spinner"))||void 0===i?void 0:i.defaultNS)&&void 0!==n?n:""].join(" ")),this.renderTemplateOrSlot(`${a}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(F||(F=C`
|
|
2
2
|
${0}
|
|
3
3
|
|
|
4
4
|
<foxy-internal-customer-portal-subscriptions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-62c088b7.js";import"./shared-2092d86f.js";import{h as t}from"./shared-0ce006b9.js";import"./shared-bc814810.js";import"./shared-0479553e.js";import"./foxy-payment-method-card.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-form.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-0821cfdc.js";import{k as e}from"./shared-a8ced8bf.js";import{L as s,h as r,c as a}from"./shared-7f33a83a.js";import{C as o}from"./shared-43bcce74.js";import"./shared-be66c2e7.js";import"./shared-5a4829e3.js";import{w as i,S as h,T as d,a as n}from"./shared-2cc638ad.js";import{c as l}from"./shared-4e709717.js";import"./shared-1c94a156.js";import"./shared-62a54a6c.js";import{S as m}from"./shared-101d1234.js";import"./shared-bd252323.js";import"./shared-08156595.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-6cb1015f.js";import{G as c}from"./shared-d8dc97f0.js";import"./shared-5ea18e60.js";import{N as v}from"./shared-181f51bd.js";import{S as p}from"./shared-4f9d2417.js";import{i as f}from"./shared-d3bf9ac0.js";import"./shared-8dd0af4d.js";import"./shared-99065f2a.js";import"./shared-76b3d76a.js";import"./foxy-nucleon-element.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-4f037e43.js";import"./shared-2f7dcefa.js";import"./shared-6581241a.js";import"./shared-9bdacf65.js";import"./shared-1000b848.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-39c10b22.js";import"./shared-d518bd55.js";import"./foxy-cancellation-form.js";import"./shared-f7e4cd67.js";import"./shared-bc7f58ef.js";import"./shared-ed0dee03.js";import"./shared-11c2efc8.js";import"./shared-404aa9cc.js";import"./shared-08e27fe9.js";import"./foxy-transaction-card.js";import"./foxy-item-card.js";import"./shared-21679ebd.js";import"./shared-486d7bb5.js";import"./shared-d61b3e4f.js";import"./shared-ea67b3f3.js";import"./shared-75e78c70.js";import"./shared-d519a301.js";import"./shared-5378bd8c.js";import"./shared-f80f402a.js";import"./shared-b738ee96.js";
|
|
1
|
+
import"./shared-62c088b7.js";import"./shared-2092d86f.js";import{h as t}from"./shared-0ce006b9.js";import"./shared-bc814810.js";import"./shared-0479553e.js";import"./foxy-payment-method-card.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-form.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-0821cfdc.js";import{k as e}from"./shared-a8ced8bf.js";import{L as s,h as r,c as a}from"./shared-7f33a83a.js";import{C as o}from"./shared-43bcce74.js";import"./shared-be66c2e7.js";import"./shared-5a4829e3.js";import{w as i,S as h,T as d,a as n}from"./shared-2cc638ad.js";import{c as l}from"./shared-4e709717.js";import"./shared-1c94a156.js";import"./shared-62a54a6c.js";import{S as m}from"./shared-101d1234.js";import"./shared-bd252323.js";import"./shared-08156595.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-6cb1015f.js";import{G as c}from"./shared-d8dc97f0.js";import"./shared-5ea18e60.js";import{N as v}from"./shared-181f51bd.js";import{S as p}from"./shared-4f9d2417.js";import{i as f}from"./shared-d3bf9ac0.js";import"./shared-8dd0af4d.js";import"./shared-99065f2a.js";import"./shared-76b3d76a.js";import"./foxy-nucleon-element.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-4f037e43.js";import"./shared-2f7dcefa.js";import"./shared-6581241a.js";import"./shared-9bdacf65.js";import"./shared-1000b848.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-39c10b22.js";import"./shared-d518bd55.js";import"./foxy-cancellation-form.js";import"./shared-f7e4cd67.js";import"./shared-bc7f58ef.js";import"./shared-ed0dee03.js";import"./shared-11c2efc8.js";import"./shared-404aa9cc.js";import"./shared-08e27fe9.js";import"./foxy-transaction-card.js";import"./foxy-item-card.js";import"./shared-21679ebd.js";import"./shared-486d7bb5.js";import"./shared-d61b3e4f.js";import"./shared-ea67b3f3.js";import"./shared-75e78c70.js";import"./shared-d519a301.js";import"./shared-5378bd8c.js";import"./shared-f80f402a.js";import"./shared-b738ee96.js";let g,z,u,b=t=>t;class $ extends s{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return i.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(r(g||(g=b` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,l({"text-l font-semibold px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(r(z||(z=b` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,l({hidden:this.value!==s}),this.value!==s,s));return r(u||(u=b` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-c95c17e6.js";import"./shared-988ec916.js";import"./shared-d518bd55.js";import"./shared-cba08e1c.js";import"./shared-80fc2b6a.js";import{I as e}from"./shared-6581241a.js";import"./foxy-discount-builder.js";import{I as t}from"./shared-9bdacf65.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-88c4cfec.js";import"./foxy-nucleon-element.js";import{TaxCard as n}from"./foxy-tax-card.js";import{_ as r}from"./shared-a8ced8bf.js";import{i}from"./shared-d3bf9ac0.js";import{h as o}from"./shared-7f33a83a.js";import{a}from"./shared-2cc638ad.js";import"./shared-6cb1015f.js";import"./shared-be66c2e7.js";import"./shared-0ce006b9.js";import"./shared-5ea18e60.js";import"./shared-08e27fe9.js";import"./shared-62c088b7.js";import"./shared-08156595.js";import"./shared-39c10b22.js";import"./shared-a85afa33.js";import"./shared-76b3d76a.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-0821cfdc.js";import"./shared-4f037e43.js";import"./shared-bc814810.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-43bcce74.js";import"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-2092d86f.js";import"./shared-181f51bd.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-0479553e.js";import"./shared-11c2efc8.js";import"./shared-21679ebd.js";import"./shared-486d7bb5.js";let l,s=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control-item",class extends n{constructor(){super(...arguments),this.taxItemCategories=null,this.itemCategory=null,this.__resourceElementIsBusy=!1,this.__queryElementData=null}static get properties(){return r(r({},super.properties),{},{taxItemCategories:{type:String,attribute:"tax-item-categories"},itemCategory:{type:String,attribute:"item-category"}})}render(){var e,t,n,r,a;const d=null===(n=null===(t=null===(e=this.__queryElementData)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:tax_item_categories"])||void 0===n?void 0:n[0];let m;try{const e=new URL(null!==(r=this.taxItemCategories)&&void 0!==r?r:""),t=new URL(this.href).pathname.split("/").pop();if(!t)throw new Error;e.searchParams.set("tax_id",t),e.searchParams.set("limit","1"),m=e.toString()}catch(e){m=void 0}return o(l||(l=s` <foxy-nucleon href="${0}" id="query" @update="${0}"> <foxy-nucleon parent="${0}" href="${0}" id="resource" @update="${0}"> </foxy-nucleon> </foxy-nucleon> <vaadin-checkbox class="px-m py-s block overflow-hidden" ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),i(m),(e=>{const t=e.currentTarget;this.__queryElementData=t.data,this.requestUpdate()}),i(null!==(a=this.taxItemCategories)&&void 0!==a?a:void 0),i(null==d?void 0:d._links.self.href),(e=>{const t=e.currentTarget;this.__resourceElementIsBusy=!t.in("idle"),this.requestUpdate()}),!this.__queryElementData||this.__resourceElementIsBusy||this.disabled,!!d,(e=>{const t=e.currentTarget,n=this.renderRoot.querySelector("#resource");t.checked?(n.edit({tax_uri:this.data._links.self.href,item_category_uri:this.itemCategory}),n.submit()):n.delete()}),super.render())}});let d,m=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control",class extends t{constructor(){super(...arguments),this.taxes=null}static get properties(){return r(r({},super.properties),{},{taxes:{type:String}})}renderControl(){var e,t,n,r;const i=this.nucleon;let a;try{const t=new URL(null!==(e=this.taxes)&&void 0!==e?e:"");t.searchParams.set("limit","5"),a=t.toString()}catch(e){a=null!==(t=this.taxes)&&void 0!==t?t:""}return o(d||(d=m` <foxy-i18n class="block text-s font-medium text-secondary leading-none mb-s" infer="" key="title"> </foxy-i18n> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page class="block mb-s divide-y divide-contrast-10 border border-contrast-10 rounded-t-l rounded-b-l" infer="" item="foxy-internal-item-category-form-taxes-control-item" .props="${0}"> </foxy-collection-page> </foxy-pagination> <foxy-i18n class="block text-xs text-secondary leading-xs mt-xs" infer="" key="helper_text"> </foxy-i18n> `),a,{"tax-item-categories":null!==(r=null===(n=null==i?void 0:i.form._links)||void 0===n?void 0:n["fx:tax_item_categories"].href)&&void 0!==r?r:"","item-category":null==i?void 0:i.href})}});let p,c,_,f,u,h,y,g,x,v,b,j,$,w=e=>e;class q extends(a(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null}static get properties(){return r(r({},super.properties),{},{emailTemplates:{type:String,attribute:"email-templates"},taxes:{type:String}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative",({send_admin_email:e,admin_email:t})=>!e||!!t||"admin-email:v8n_required"]}renderBody(){var e,t,n,r;const a=this.form.item_delivery_type,l=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none",s=!this.hiddenSelector.matches("dividers",!0),d=o(p||(p=w`<div class="border-t border-contrast-10 col-span-2"></div>`));return o(c||(c=w` <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="code" class="col-span-2"></foxy-internal-text-control> ${0} <foxy-internal-select-control infer="handling-fee-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} ${0} <foxy-internal-select-control infer="item-delivery-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} ${0} ${0} <foxy-internal-text-control infer="discount-name" class="col-span-2"> </foxy-internal-text-control> ${0} ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="admin-email-template-uri" class="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="customer-email-template-uri" class="col-span-2" @change="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="gift-recipient-email-template-uri" class="col-span-2"> </foxy-internal-async-combo-box-control> ${0} ${0} </div> ${0} `),s?d:"",q.__handlingFeeTypeOptions,"none"===l?"":o(_||(_=w` ${0} ${0} ${0} `),this.__renderHandlingFee(),l.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===l?this.__renderHandlingFeeMinimum():""),s?d:"",q.__itemDeliveryTypeOptions,"downloaded"===a?this.__renderDownloadDeliveryControls():"flat_rate"===a?this.__renderFlatRateControls():"shipped"===a?this.__renderShippingControls():"","shipped"===a||"flat_rate"===a?this.__renderCustomsValue():"",s?d:"",this.form.discount_name?this.__renderDiscountBuilder():"",s?d:"",i(null!==(t=this.emailTemplates)&&void 0!==t?t:void 0),this.form.send_admin_email?"":"col-span-2",(e=>{this.edit({send_admin_email:!!e.detail,admin_email:e.detail?this.form.admin_email:""})}),this.form.send_admin_email?this.__renderAdminEmail():"",i(null!==(n=this.emailTemplates)&&void 0!==n?n:void 0),(e=>this.edit({send_customer_email:!!e.detail})),i(null!==(r=this.emailTemplates)&&void 0!==r?r:void 0),s?d:"",this.data?this.__renderTaxes():"",super.renderBody())}__renderHandlingFee(){return o(f||(f=w` <foxy-internal-number-control infer="handling-fee" class="${0}"> </foxy-internal-number-control> `),"flat_percent"===this.form.handling_fee_type?"":"col-span-2")}__renderHandlingFeePercentage(){return o(u||(u=w` <foxy-internal-number-control infer="handling-fee-percentage"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(h||(h=w` <foxy-internal-number-control infer="handling-fee-minimum"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(y||(y=w` <foxy-internal-integer-control infer="max-downloads-per-customer"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-downloads-time-period"> </foxy-internal-integer-control> `))}__renderFlatRateControls(){return o(g||(g=w` <foxy-internal-number-control infer="shipping-flat-rate"> </foxy-internal-number-control> <foxy-internal-select-control infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),q.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(x||(x=w` <foxy-internal-integer-control infer="default-weight" class="col-span-2"> </foxy-internal-integer-control> <foxy-internal-select-control infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),q.__defaultWeightUnitOptions,q.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(v||(v=w` <foxy-internal-number-control infer="customs-value" class="col-span-2"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const n={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(b||(b=w` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),n,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}__renderAdminEmail(){return o(j||(j=w`<foxy-internal-text-control infer="admin-email"> </foxy-internal-text-control>`))}__renderTaxes(){var e;return o($||($=w` <foxy-internal-item-category-form-taxes-control taxes="${0}" class="col-span-2" infer="taxes"> </foxy-internal-item-category-form-taxes-control> `),i(null!==(e=this.taxes)&&void 0!==e?e:void 0))}}q.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],q.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],q.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],q.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],q.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",q);export{q as ItemCategoryForm};
|
|
1
|
+
import"./shared-c95c17e6.js";import"./shared-988ec916.js";import"./shared-d518bd55.js";import"./shared-cba08e1c.js";import"./shared-80fc2b6a.js";import{I as e}from"./shared-6581241a.js";import"./foxy-discount-builder.js";import{I as t}from"./shared-9bdacf65.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-88c4cfec.js";import"./foxy-nucleon-element.js";import{TaxCard as n}from"./foxy-tax-card.js";import{_ as r}from"./shared-a8ced8bf.js";import{i}from"./shared-d3bf9ac0.js";import{h as o}from"./shared-7f33a83a.js";import{a}from"./shared-2cc638ad.js";import"./shared-6cb1015f.js";import"./shared-be66c2e7.js";import"./shared-0ce006b9.js";import"./shared-5ea18e60.js";import"./shared-08e27fe9.js";import"./shared-62c088b7.js";import"./shared-08156595.js";import"./shared-39c10b22.js";import"./shared-a85afa33.js";import"./shared-76b3d76a.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-0821cfdc.js";import"./shared-4f037e43.js";import"./shared-bc814810.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-43bcce74.js";import"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-2092d86f.js";import"./shared-181f51bd.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-0479553e.js";import"./shared-11c2efc8.js";import"./shared-21679ebd.js";import"./shared-486d7bb5.js";let l,s=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control-item",class extends n{constructor(){super(...arguments),this.taxItemCategories=null,this.itemCategory=null,this.__resourceElementIsBusy=!1,this.__queryElementData=null}static get properties(){return r(r({},super.properties),{},{taxItemCategories:{attribute:"tax-item-categories"},itemCategory:{attribute:"item-category"}})}render(){var e,t,n,r,a;const d=null===(n=null===(t=null===(e=this.__queryElementData)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:tax_item_categories"])||void 0===n?void 0:n[0];let m;try{const e=new URL(null!==(r=this.taxItemCategories)&&void 0!==r?r:""),t=new URL(this.href).pathname.split("/").pop();if(!t)throw new Error;e.searchParams.set("tax_id",t),e.searchParams.set("limit","1"),m=e.toString()}catch(e){m=void 0}return o(l||(l=s` <foxy-nucleon href="${0}" id="query" @update="${0}"> <foxy-nucleon parent="${0}" href="${0}" id="resource" @update="${0}"> </foxy-nucleon> </foxy-nucleon> <vaadin-checkbox class="px-m py-s block overflow-hidden" ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),i(m),(e=>{const t=e.currentTarget;this.__queryElementData=t.data,this.requestUpdate()}),i(null!==(a=this.taxItemCategories)&&void 0!==a?a:void 0),i(null==d?void 0:d._links.self.href),(e=>{const t=e.currentTarget;this.__resourceElementIsBusy=!t.in("idle"),this.requestUpdate()}),!this.__queryElementData||this.__resourceElementIsBusy||this.disabled,!!d,(e=>{const t=e.currentTarget,n=this.renderRoot.querySelector("#resource");t.checked?(n.edit({tax_uri:this.data._links.self.href,item_category_uri:this.itemCategory}),n.submit()):n.delete()}),super.render())}});let d,m=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control",class extends t{constructor(){super(...arguments),this.taxes=null}static get properties(){return r(r({},super.properties),{},{taxes:{}})}renderControl(){var e,t,n,r;const i=this.nucleon;let a;try{const t=new URL(null!==(e=this.taxes)&&void 0!==e?e:"");t.searchParams.set("limit","5"),a=t.toString()}catch(e){a=null!==(t=this.taxes)&&void 0!==t?t:""}return o(d||(d=m` <foxy-i18n class="block text-s font-medium text-secondary leading-none mb-s" infer="" key="title"> </foxy-i18n> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page class="block mb-s divide-y divide-contrast-10 border border-contrast-10 rounded-t-l rounded-b-l" infer="" item="foxy-internal-item-category-form-taxes-control-item" .props="${0}"> </foxy-collection-page> </foxy-pagination> <foxy-i18n class="block text-xs text-secondary leading-xs mt-xs" infer="" key="helper_text"> </foxy-i18n> `),a,{"tax-item-categories":null!==(r=null===(n=null==i?void 0:i.form._links)||void 0===n?void 0:n["fx:tax_item_categories"].href)&&void 0!==r?r:"","item-category":null==i?void 0:i.href})}});let p,c,_,f,u,h,y,x,g,v,b,j,w=e=>e;class $ extends(a(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.templates={},this.taxes=null}static get properties(){return r(r({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative",({send_admin_email:e,admin_email:t})=>!e||!!t||"admin-email:v8n_required"]}renderBody(){var e,t,n,r;const a=this.form.item_delivery_type,l=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return o(p||(p=w` <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="code" class="col-span-2"></foxy-internal-text-control> <foxy-internal-select-control infer="handling-fee-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control infer="item-delivery-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="discount-name" class="col-span-2"> </foxy-internal-text-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="admin-email-template-uri" class="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="customer-email-template-uri" class="col-span-2" @change="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="gift-recipient-email-template-uri" class="col-span-2"> </foxy-internal-async-combo-box-control> ${0} </div> ${0} `),$.__handlingFeeTypeOptions,"none"===l?"":o(c||(c=w` ${0} ${0} ${0} `),this.__renderHandlingFee(),l.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===l?this.__renderHandlingFeeMinimum():""),$.__itemDeliveryTypeOptions,"downloaded"===a?this.__renderDownloadDeliveryControls():"flat_rate"===a?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===a?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",this.form.discount_name?this.__renderDiscountBuilder():"",i(null!==(t=this.emailTemplates)&&void 0!==t?t:void 0),this.form.send_admin_email?"":"col-span-2",(e=>{this.edit({send_admin_email:!!e.detail,admin_email:e.detail?this.form.admin_email:""})}),this.form.send_admin_email?this.__renderAdminEmail():"",i(null!==(n=this.emailTemplates)&&void 0!==n?n:void 0),(e=>this.edit({send_customer_email:!!e.detail})),i(null!==(r=this.emailTemplates)&&void 0!==r?r:void 0),this.data?this.__renderTaxes():"",super.renderBody())}__renderHandlingFee(){return o(_||(_=w` <foxy-internal-number-control infer="handling-fee" class="${0}"> </foxy-internal-number-control> `),"flat_percent"===this.form.handling_fee_type?"":"col-span-2")}__renderHandlingFeePercentage(){return o(f||(f=w` <foxy-internal-number-control infer="handling-fee-percentage"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(u||(u=w` <foxy-internal-number-control infer="handling-fee-minimum"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(h||(h=w` <foxy-internal-integer-control infer="max-downloads-per-customer"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-downloads-time-period"> </foxy-internal-integer-control> `))}__renderFlatRateControls(){return o(y||(y=w` <foxy-internal-number-control infer="shipping-flat-rate"> </foxy-internal-number-control> <foxy-internal-select-control infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),$.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(x||(x=w` <foxy-internal-integer-control infer="default-weight" class="col-span-2"> </foxy-internal-integer-control> <foxy-internal-select-control infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),$.__defaultWeightUnitOptions,$.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(g||(g=w` <foxy-internal-number-control infer="customs-value" class="col-span-2"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const n={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(v||(v=w` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),n,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}__renderAdminEmail(){return o(b||(b=w`<foxy-internal-text-control infer="admin-email"> </foxy-internal-text-control>`))}__renderTaxes(){var e;return o(j||(j=w` <foxy-internal-item-category-form-taxes-control taxes="${0}" class="col-span-2" infer="taxes"> </foxy-internal-item-category-form-taxes-control> `),i(null!==(e=this.taxes)&&void 0!==e?e:void 0))}}$.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],$.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],$.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],$.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],$.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",$);export{$ as ItemCategoryForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./foxy-address-card.js";import"./foxy-item-form.js";import"./foxy-item-card.js";import"./shared-0821cfdc.js";import"./shared-a0c8faf2.js";import"./shared-21679ebd.js";import{_ as s}from"./shared-a8ced8bf.js";import{h as r}from"./shared-7f33a83a.js";import{i as e}from"./shared-d3bf9ac0.js";import{a as t}from"./shared-2cc638ad.js";import{B as i}from"./shared-76b3d76a.js";import{I as o}from"./shared-486d7bb5.js";import{C as a}from"./shared-43bcce74.js";import"./shared-62c088b7.js";import"./shared-0ce006b9.js";import"./shared-2092d86f.js";import"./shared-
|
|
1
|
+
import"./foxy-address-card.js";import"./foxy-item-form.js";import"./foxy-item-card.js";import"./shared-0821cfdc.js";import"./shared-a0c8faf2.js";import"./shared-21679ebd.js";import{_ as s}from"./shared-a8ced8bf.js";import{h as r}from"./shared-7f33a83a.js";import{i as e}from"./shared-d3bf9ac0.js";import{a as t}from"./shared-2cc638ad.js";import{B as i}from"./shared-76b3d76a.js";import{I as o}from"./shared-486d7bb5.js";import{C as a}from"./shared-43bcce74.js";import"./shared-62c088b7.js";import"./shared-0ce006b9.js";import"./shared-2092d86f.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-4f037e43.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-4e709717.js";import"./shared-988ec916.js";import"./shared-bd252323.js";import"./shared-5ea18e60.js";import"./shared-be66c2e7.js";import"./shared-08156595.js";import"./shared-7d4fb1a2.js";import"./shared-39c10b22.js";import"./shared-9bdacf65.js";import"./shared-d518bd55.js";import"./shared-80fc2b6a.js";import"./shared-6581241a.js";import"./shared-bc814810.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./foxy-discount-detail-card.js";import"./shared-868065de.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-nucleon-element.js";import"./foxy-item-option-form.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-ed0dee03.js";import"./shared-5a4829e3.js";import"./shared-1c94a156.js";import"./shared-4849ef5b.js";import"./shared-6cb1015f.js";import"./shared-08e27fe9.js";import"./shared-11c2efc8.js";import"./shared-101d1234.js";import"./shared-404aa9cc.js";import"./shared-d8dc97f0.js";import"./shared-5378bd8c.js";import"./foxy-coupon-card.js";import"./shared-c95c17e6.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-af226a9a.js";import"./shared-a41234b4.js";import"./shared-bc7f58ef.js";import"./shared-f7e4cd67.js";import"./foxy-subscription-card.js";import"./shared-d61b3e4f.js";import"./foxy-subscription-form.js";import"./shared-1000b848.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./foxy-cancellation-form.js";import"./foxy-transaction-card.js";import"./shared-ea67b3f3.js";import"./shared-75e78c70.js";let d,c,m=s=>s;const p=a(t(o,"shipment-card"));class n extends p{constructor(){super(...arguments),this.__customerAddresses="",this.__currencyDisplay="",this.__itemCategories="",this.__editable=!1,this.__currency="",this.__coupons=""}static get properties(){return s(s({},super.properties),{},{__customerAddresses:{attribute:!1},__currencyDisplay:{attribute:!1},__itemCategories:{attribute:!1},__editable:{attribute:!1},__currency:{attribute:!1},__coupons:{attribute:!1}})}get hiddenSelector(){return new i(`address:not=full-address ${super.hiddenSelector.toString()}`)}get readonlySelector(){return this.__editable?super.readonlySelector:i.True}renderBody(){var s,t,i;let o;if(this.data)try{const s=new URL(this.data._links["fx:items"].href);s.searchParams.set("zoom","item_options"),o=s.toString()}catch(s){}return r(c||(c=m` <div class="space-y-m"> <foxy-address-card infer="address" href="${0}"> <div slot="full-address:after" class="flex items-center text-m space-x-s text-secondary"> <iron-icon icon="maps:local-shipping" class="icon-inline flex-shrink-0"></iron-icon> <span class="truncate"> ${0} • <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> </foxy-address-card> <foxy-internal-async-details-control infer="items" first="${0}" limit="5" item="foxy-item-card" open .form="${0}"> </foxy-internal-async-details-control> </div> `),e(null===(s=this.data)||void 0===s?void 0:s._links["fx:customer_address"].href),null===(t=this.data)||void 0===t?void 0:t.shipping_service_description,JSON.stringify({amount:`${null===(i=this.data)||void 0===i?void 0:i.total_shipping} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),e(o),(({html:s,dialog:r,handleFetch:e,handleUpdate:t})=>s(d||(d=m`
|
|
2
2
|
<foxy-item-form
|
|
3
3
|
customer-addresses=${0}
|
|
4
4
|
item-categories=${0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-bc814810.js";import"./shared-2add595d.js";import"./shared-c95c17e6.js";import"./shared-71f2ef1f.js";import"./shared-a37abe4c.js";import"./shared-af226a9a.js";import"./shared-83596b46.js";import"./shared-08156595.js";import{I as e}from"./shared-39c10b22.js";import{i as t}from"./shared-d3bf9ac0.js";import{h as o}from"./shared-7f33a83a.js";import"./shared-988ec916.js";import"./shared-d518bd55.js";import"./shared-cba08e1c.js";import"./shared-80fc2b6a.js";import{I as i}from"./shared-6581241a.js";import"./foxy-nucleon-element.js";import"./shared-0821cfdc.js";import{_ as r}from"./shared-a8ced8bf.js";import{R as s,a as n}from"./shared-2cc638ad.js";import{c as a}from"./shared-4e709717.js";import{c as l}from"./shared-63139d9e.js";import"./shared-be66c2e7.js";import"./shared-0ce006b9.js";import"./shared-88c4cfec.js";import"./shared-62c088b7.js";import"./shared-6cb1015f.js";import"./shared-5ea18e60.js";import"./shared-08e27fe9.js";import"./shared-a85afa33.js";import"./shared-76b3d76a.js";import"./shared-d519a301.js";import"./shared-f3b35364.js";import"./shared-11c2efc8.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-9bdacf65.js";import"./shared-0479553e.js";import"./shared-43bcce74.js";import"./shared-4f037e43.js";import"./shared-181f51bd.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./foxy-spinner.js";import"./shared-2092d86f.js";import"./shared-839dd3a8.js";let c,d=e=>e;customElements.define("foxy-internal-password-control",class extends e{renderControl(){return o(c||(c=d` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> `),t(this._errorMessage),this.helperText,this.placeholder,this.label,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}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});let u,_,p,h,m,f,g,y,x,b,v,$,k,V,j,S,w,q,O,C,U=e=>e;const N=s(n(i,"store-form"));class E extends N{constructor(){super(...arguments),this.customerPasswordHashTypes=null,this.shippingAddressTypes=null,this.storeVersions=null,this.checkoutTypes=null,this.localeCodes=null,this.languages=null,this.timezones=null,this.countries=null,this.regions=null,this.templates={},this.__singleCheckboxGroupOptions=[{label:"option_checked",value:"checked"}],this.__appSessionTimeOptions=[{value:"s",label:"second"},{value:"m",label:"minute"},{value:"h",label:"hour"},{value:"d",label:"day"}],this.__getStoreEmailValue=()=>{var e;return(null!==(e=this.form.store_email)&&void 0!==e?e:"").split(",").map((e=>({value:e.trim()}))).filter((({value:e})=>e.length>0))},this.__setStoreEmailValue=e=>{this.edit({store_email:e.map((e=>e.value)).join(",")})},this.__getBccOnReceiptEmailValue=()=>this.form.bcc_on_receipt_email?["checked"]:[],this.__setBccOnReceiptEmailValue=e=>{this.edit({bcc_on_receipt_email:e.includes("checked")})},this.__getUseEmailDnsValue=()=>this.form.use_email_dns?["checked"]:[],this.__setUseEmailDnsValue=e=>{this.edit({use_email_dns:e.includes("checked")})},this.__getUseSmtpConfigValue=()=>this.form.smtp_config?["checked"]:[],this.__setUseSmtpConfigValue=e=>{e.includes("checked")?this.edit({smtp_config:JSON.stringify({username:"",password:"",security:"",host:"",port:""})}):this.edit({smtp_config:""})},this.__getFeaturesMultishipValue=()=>this.form.features_multiship?["checked"]:[],this.__setFeaturesMultishipValue=e=>{this.edit({features_multiship:e.includes("checked")})},this.__getRequireSignedShippingRatesValue=()=>this.form.require_signed_shipping_rates?["checked"]:[],this.__setRequireSignedShippingRatesValue=e=>{this.edit({require_signed_shipping_rates:e.includes("checked")})},this.__getAppSessionTimeValue=()=>{const e=this.form.app_session_time||43200;return e%86400==0?e/86400+"d":e%3600==0?e/3600+"h":e%60==0?e/60+"m":`${e}s`},this.__setAppSessionTimeValue=e=>{const t=e[e.length-1],o=parseInt(e.substring(0,e.length-1));this.edit({app_session_time:{d:86400,h:3600,m:60,s:1}[t]*o})},this.__getProductsRequireExpiresPropertyValue=()=>this.form.products_require_expires_property?["checked"]:[],this.__setProductsRequireExpiresPropertyValue=e=>{this.edit({products_require_expires_property:e.includes("checked")})},this.__getUseCartValidationValue=()=>this.form.use_cart_validation?["checked"]:[],this.__setUseCartValidationValue=e=>{this.edit({use_cart_validation:e.includes("checked")})},this.__getSingleSignOnUrlValue=()=>{var e;return this.form.use_single_sign_on&&null!==(e=this.form.single_sign_on_url)&&void 0!==e?e:""},this.__setSingleSignOnUrlValue=e=>{this.edit({use_single_sign_on:!!e,single_sign_on_url:e})},this.__getWebhookUrlValue=()=>{var e;return this.form.use_webhook&&null!==(e=this.form.webhook_url)&&void 0!==e?e:""},this.__setWebhookUrlValue=e=>{this.edit({use_webhook:!!e,webhook_url:e})},this.__setStoreDomainValue=e=>{if(e.endsWith(".foxycart.com")){const t=e.substring(0,e.length-13);this.edit({store_domain:t,use_remote_domain:t.includes(".")})}else this.edit({store_domain:e,use_remote_domain:e.includes(".")})}}static get properties(){return r(r({},super.properties),{},{customerPasswordHashTypes:{attribute:"customer-password-hash-types"},shippingAddressTypes:{attribute:"shipping-address-types"},storeVersions:{attribute:"store-versions"},checkoutTypes:{attribute:"checkout-types"},localeCodes:{attribute:"locale-codes"},languages:{},timezones:{},countries:{},regions:{}})}static get v8n(){return[({store_name:e})=>!!e||"store-name:v8n_required",({store_name:e})=>e&&e.length<=50||"store-name:v8n_too_long",({store_domain:e})=>!!e||"store-domain:v8n_required",({store_domain:e})=>e&&e.length<=50||"store-domain:v8n_too_long",({store_url:e})=>!!e||"store-url:v8n_required",({store_url:e})=>e&&e.length<=300||"store-url:v8n_too_long",({receipt_continue_url:e})=>!e||e.length<=300||"receipt-continue-url:v8n_too_long",({store_email:e})=>!!e||"store-email:v8n_required",({store_email:e})=>e&&e.length<=300||"store-email:v8n_too_long",({from_email:e})=>!e||e.length<=100||"from-email:v8n_too_long",({smtp_config:e})=>!e||e.length<=1e3||"use-smtp-config:v8n_too_long",({postal_code:e})=>!!e||"postal-code:v8n_required",({postal_code:e})=>e&&e.length<=50||"postal-code:v8n_too_long",({region:e})=>!!e||"region:v8n_required",({region:e})=>e&&e.length<=100||"region:v8n_too_long",({country:e})=>!!e||"country:v8n_required",({logo_url:e})=>!e||e.length<=100||"logo-url:v8n_too_long",({webhook_url:e,use_webhook:t})=>!t||!!e||"webhook-url:v8n_required",({webhook_url:e,use_webhook:t})=>!t||!e||e.length<=300||"webhook-url:v8n_too_long",({webhook_key:e,use_webhook:t,use_cart_validation:o})=>!t&&!o||!!e||"webhook-key:v8n_required",({webhook_key:e,use_webhook:t,use_cart_validation:o})=>!t&&!o||!e||e.length<=200||"webhook-key:v8n_too_long",({single_sign_on_url:e,use_single_sign_on:t})=>!t||!!e||"single-sign-on-url:v8n_required",({single_sign_on_url:e,use_single_sign_on:t})=>!t||!e||e.length<=300||"single-sign-on-url:v8n_too_long",({customer_password_hash_config:e})=>!e||String(e).length<=100||"customer-password-hash-config:v8n_too_long",({unified_order_entry_password:e})=>!e||String(e).length<=100||"unified-order-entry-password:v8n_too_long",({custom_display_id_config:e})=>!e||String(e).length<=100||"custom-display-id-config-enabled:v8n_too_long"]}renderBody(){var e,i,r,s,n,a,l,c,d,h,m,f,g,y,x,b,v,$,k,V,j,S,w;const q=this.form.use_email_dns&&!(null===(e=this.data)||void 0===e?void 0:e.use_email_dns)&&!this.hiddenSelector.matches("use-email-dns",!0),O=this.form.require_signed_shipping_rates&&!(null===(i=this.data)||void 0===i?void 0:i.require_signed_shipping_rates)&&!this.hiddenSelector.matches("require-signed-shipping-rates",!0),C=this.form.products_require_expires_property&&!(null===(r=this.data)||void 0===r?void 0:r.products_require_expires_property)&&!this.hiddenSelector.matches("products-require-expires-property",!0),N=this.form.use_cart_validation&&!(null===(s=this.data)||void 0===s?void 0:s.use_cart_validation)&&!this.hiddenSelector.matches("use-cart-validation",!0),E=this.t(this.form.use_remote_domain&&!(null===(n=this.data)||void 0===n?void 0:n.use_remote_domain)?"store-domain.custom_domain_note":"store-domain.helper_text"),R=!this.form.store_domain||this.form.store_domain.includes(".")?"":".foxycart.com",T=this.__renderLoader(1),M=this.__renderLoader(2),J=this.__renderLoader(3),P=this.__renderLoader(4),D=this.__renderLoader(5),L=this.__renderLoader(6),W=this.__renderLoader(7),A=this.__renderLoader(8),I=this.__renderLoader(9),B=Object.entries(null!==(l=null===(a=null==M?void 0:M.data)||void 0===a?void 0:a.values)&&void 0!==l?l:{}),G=null==P?void 0:P.data,z=null==D?void 0:D.data,F=null==L?void 0:L.data,H=null!==(d=null===(c=null==W?void 0:W.data)||void 0===c?void 0:c.values.timezone)&&void 0!==d?d:[],K=Object.values(null!==(m=null===(h=null==A?void 0:A.data)||void 0===h?void 0:h.values)&&void 0!==m?m:{}),Q=Object.values(null!==(g=null===(f=null==I?void 0:I.data)||void 0===f?void 0:f.values)&&void 0!==g?g:{}),X=Object.entries(null!==(x=null===(y=null==T?void 0:T.data)||void 0===y?void 0:y.values)&&void 0!==x?x:{}),Y=Object.entries(null!==(v=null===(b=null==J?void 0:J.data)||void 0===b?void 0:b.values)&&void 0!==v?v:{}),Z=Object.entries(null!==($=null==z?void 0:z.values)&&void 0!==$?$:{}),ee=Object.entries(null!==(k=null==F?void 0:F.values)&&void 0!==k?k:{}),te=X.map((e=>({label:e[1].description,value:e[0]}))),oe=B.map((([e,t])=>({label:t,value:e}))),ie=Y.map((([e,t])=>({label:t,value:e}))),re=Z.map((([e,t])=>({value:e,label:t}))),se=ee.map((([e,t])=>({value:e,label:t}))),ne=H.map((e=>({label:e.description,value:e.timezone}))),ae=K.map((e=>({label:e.default,value:e.cc2}))),le=Q.map((e=>({label:e.default,value:e.code})));let ce;try{const e=new URL(null!==(V=this.regions)&&void 0!==V?V:""),t=this.form.country;t&&e.searchParams.set("country_code",t),ce=e.toString()}catch(e){ce=void 0}return o(u||(u=U` ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} <div class="grid gap-m grid-cols-1 sm-grid-cols-2"> <foxy-internal-text-control infer="store-name"></foxy-internal-text-control> <foxy-internal-text-control infer="logo-url"></foxy-internal-text-control> <foxy-internal-text-control helper-text="${0}" suffix="${0}" infer="store-domain" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="store-url"></foxy-internal-text-control> <foxy-internal-editable-list-control infer="store-email" class="sm-col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-select-control infer="timezone" class="sm-col-span-2" .options="${0}"> </foxy-internal-select-control> <foxy-internal-async-combo-box-control item-label-path="version" item-value-path="_links.self.href" infer="store-version-uri" first="${0}" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-text-control infer="from-email" class="sm-col-span-2" placeholder="${0}"> </foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="bcc-on-receipt-email" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="use-email-dns" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-checkbox-group-control infer="use-smtp-config" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="country" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="region" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control infer="postal-code"></foxy-internal-text-control> <foxy-internal-select-control infer="shipping-address-type" .options="${0}"> </foxy-internal-select-control> <foxy-internal-checkbox-group-control infer="features-multiship" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="require-signed-shipping-rates" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> ${0} ${0} <foxy-internal-text-control class="sm-col-span-2" infer="receipt-continue-url"> </foxy-internal-text-control> <foxy-internal-frequency-control class="sm-col-span-2" infer="app-session-time" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-frequency-control> <foxy-internal-checkbox-group-control infer="products-require-expires-property" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-checkbox-group-control infer="use-cart-validation" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="checkout-type" class="sm-col-span-2" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="customer-password-hash-type" .options="${0}" .setValue="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-password-control infer="unified-order-entry-password"> </foxy-internal-password-control> <foxy-internal-text-control infer="single-sign-on-url" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="webhook-url" class="sm-col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} ${0} </div> ${0} `),T.render(this.customerPasswordHashTypes),M.render(this.shippingAddressTypes),J.render(this.checkoutTypes),P.render(this.form.store_version_uri),D.render(this.localeCodes),W.render(this.timezones),A.render(this.countries),L.render(this.languages),I.render(ce),E,R,this.__setStoreDomainValue,this.__getStoreEmailValue,this.__setStoreEmailValue,ne,t(null!==(j=this.storeVersions)&&void 0!==j?j:void 0),G,null!==(w=null===(S=this.__getStoreEmailValue()[0])||void 0===S?void 0:S.value)&&void 0!==w?w:this.t("from-email.placeholder"),this.__getBccOnReceiptEmailValue,this.__setBccOnReceiptEmailValue,this.__singleCheckboxGroupOptions,this.__getUseEmailDnsValue,this.__setUseEmailDnsValue,this.__singleCheckboxGroupOptions,q?this.__renderWarning("use_email_dns_helper_text",{href:"https://wiki.foxycart.com/v/1.1/emails#how_emails_are_sent_spf_dkim_dmarc_etc",caption:"How Emails Are Sent (SPF, DKIM, DMARC, etc.)"}):"",this.__getUseSmtpConfigValue,this.__setUseSmtpConfigValue,this.__singleCheckboxGroupOptions,this.form.smtp_config&&!this.hiddenSelector.matches("smtp-config",!0)?this.__renderSmtpConfig():"",ae,le,oe,this.__getFeaturesMultishipValue,this.__setFeaturesMultishipValue,this.__singleCheckboxGroupOptions,this.__getRequireSignedShippingRatesValue,this.__setRequireSignedShippingRatesValue,this.__singleCheckboxGroupOptions,O?this.__renderWarning("require_signed_shipping_rates_helper_text"):"",se,re,this.hiddenSelector.matches("currency-style",!0)?"":this.__renderCurrencyStyleSelector(),this.hiddenSelector.matches("custom-display-id-config",!0)?"":this.__renderCustomIDSettings(),this.__getAppSessionTimeValue,this.__setAppSessionTimeValue,this.__appSessionTimeOptions,this.__getProductsRequireExpiresPropertyValue,this.__setProductsRequireExpiresPropertyValue,this.__singleCheckboxGroupOptions,C?this.__renderWarning("products_require_expires_property_helper_text"):"",this.__getUseCartValidationValue,this.__setUseCartValidationValue,this.__singleCheckboxGroupOptions,N?this.__renderWarning("use_cart_validation_helper_text",{href:"https://wiki.foxycart.com/v/2.0/hmac_validation",caption:"HMAC Product Verification: Locking Down your Add-To-Cart Links and Forms"}):"",ie,te,(e=>{var t;const o=X.find((([t])=>t===e));this.edit({customer_password_hash_type:e,customer_password_hash_config:null!==(t=null==o?void 0:o[1].config)&&void 0!==t?t:""})}),"number"==typeof this.form.customer_password_hash_config?o(_||(_=U` <foxy-internal-number-control infer="customer-password-hash-config"> </foxy-internal-number-control> `)):o(p||(p=U` <foxy-internal-text-control infer="customer-password-hash-config"> </foxy-internal-text-control> `)),this.__getSingleSignOnUrlValue,this.__setSingleSignOnUrlValue,this.__getWebhookUrlValue,this.__setWebhookUrlValue,this.__renderWebhookKey(),this.data&&!this.hiddenSelector.matches("is-maintenance-mode",!0)?this.__renderMaintenanceModeSwitch():"",super.renderBody())}__renderWebhookKey(){var e,t;let i;try{i=JSON.parse(null!==(e=this.form.webhook_key)&&void 0!==e?e:"")}catch(e){const o=null!==(t=this.form.webhook_key)&&void 0!==t?t:"";i={cart_signing:o,xml_datafeed:o,api_legacy:o,sso:o}}return Object.keys(i).map((e=>o(h||(h=U` <foxy-internal-password-control infer="webhook-key-${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> `),e.replace("_","-"),(()=>i[e]),(t=>{i[e]=t,this.edit({webhook_key:JSON.stringify(i)})}))))}__renderMaintenanceModeSwitch(){var e;const t=!!(null===(e=this.data)||void 0===e?void 0:e.is_maintenance_mode),i=(t?"disable":"enable")+"_maintenance_mode",r=`maintenance_mode_${t?"on":"off"}_explainer`;return o(m||(m=U` <div data-testid="is-maintenance-mode" class="${0}"> <foxy-i18n infer="" class="block mb-s" key="${0}"></foxy-i18n> <vaadin-button theme="tertiary small ${0}" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-button> </div> `),a({"rounded leading-s text-s sm-col-span-2":!0,"text-tertiary":!t,"text-error":t}),r,t?"contrast":"",this.disabledSelector.matches("is-maintenance-mode",!0),(()=>{this.edit({is_maintenance_mode:!this.form.is_maintenance_mode}),this.submit()}),i)}__renderCurrencyStyleSelector(){const e={101:0,100:0,"001":1,"000":2,111:3,110:3,"011":4,"010":5},t=[this.form.hide_currency_symbol,this.form.hide_decimal_characters,this.form.use_international_currency_symbol].map((e=>Number(Boolean(e)))).join(""),i=e[t],r=this.disabledSelector.matches("currency-style",!0),s=this.readonlySelector.matches("currency-style",!0);return o(f||(f=U` <div data-testid="currency-style"> ${0} <div class="grid grid-cols-1 gap-xs transition-colors text-secondary hover-text-body sm-col-span-2"> <foxy-i18n infer="" class="font-medium text-s" key="currency_style_label"></foxy-i18n> <div class="grid grid-cols-3 bg-contrast-10 rounded" style="gap:1px;padding:1px"> ${0} </div> <foxy-i18n infer="" class="text-xs" key="currency_style_helper_text"></foxy-i18n> </div> ${0} </div> `),this.renderTemplateOrSlot("currency-style:before"),["12.34","USD 12.34","$12.34","12","USD 12","$12"].map(((t,n)=>o(g||(g=U` <label style="--lumo-border-radius:calc(var(--lumo-border-radius-m) - 1px)" class="${0}"> <span class="font-medium font-tnum">${0}</span> <input class="sr-only" value="${0}" type="radio" name="currency-style" ?checked="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </label> `),a({"relative z-0 px-s h-m flex items-center transition-colors":!0,"hover-cursor-pointer":!0,"focus-within-z-10 focus-within-ring-2 focus-within-ring-primary-50":!0,"bg-base text-body hover-bg-transparent":n!==i,"bg-primary text-primary-contrast":n===i,"rounded-tl":0===n,"rounded-tr":2===n,"rounded-bl":3===n,"rounded-br":5===n}),t,n,n===i,r,s,(()=>{const t=Object.entries(e).find((e=>e[1]===n))[0];this.edit({hide_currency_symbol:Boolean(Number(t[0])),hide_decimal_characters:Boolean(Number(t[1])),use_international_currency_symbol:Boolean(Number(t[2]))})})))),this.renderTemplateOrSlot("currency-style:after"))}__renderCustomIDSettings(){var e;const t={enabled:!1,start:"0",length:"0",prefix:"",suffix:"",transaction_journal_entries:{enabled:!1,transaction_separator:"",log_detail_request_types:{transaction_authcapture:{prefix:""},transaction_capture:{prefix:""},transaction_refund:{prefix:""},transaction_void:{prefix:""}}}};let i;try{i=JSON.parse(null!==(e=this.form.custom_display_id_config)&&void 0!==e?e:"")}catch(e){i=l(t)}const r=parseInt(i.start||"0"),s=parseInt(i.length||"0")-i.prefix.length-i.suffix.length,n=Math.min(r+Math.floor(Math.random()*Math.pow(10,s)),Math.pow(10,s)-1),a=`${i.prefix}${n.toString().padStart(s,"0")}${i.suffix}`,c=Math.floor(1e3*Math.random()),d=String(c).padStart(3,"0");return o(y||(y=U` <foxy-internal-checkbox-group-control infer="custom-display-id-config-enabled" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),(()=>i.enabled?["checked"]:[]),(e=>{i.enabled=e.includes("checked"),this.edit({custom_display_id_config:JSON.stringify(i)})}),this.__singleCheckboxGroupOptions,i.enabled?o(x||(x=U` <div class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"> <foxy-internal-integer-control infer="custom-display-id-config-start" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="custom-display-id-config-length" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-text-control infer="custom-display-id-config-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-suffix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} </div> <foxy-internal-checkbox-group-control infer="custom-display-id-config-transaction-journal-entries-enabled" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),(()=>parseInt(i.start||"0")),(e=>{i.start=String(e),this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>parseInt(i.length||"0")),(e=>{i.length=String(e),this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.prefix),(e=>{i.prefix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.suffix),(e=>{i.suffix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),i.start&&i.length&&r/10<=s?o(b||(b=U` <table data-testid="custom-display-id-config-examples" style="font-family:monospace" class="col-span-2 text-xs text-secondary whitespace-nowrap"> <tbody> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-first-example"> </foxy-i18n> </td> <td> ${0}${0}${0} </td> </tr> <tr style="width:1%"> <td> <foxy-i18n infer="" key="custom-display-id-config-random-example"> </foxy-i18n> </td> <td>${0}</td> </tr> </tbody> </table> `),i.prefix,r.toString().padStart(s,"0"),i.suffix,a):"",(()=>i.transaction_journal_entries.enabled?["checked"]:[]),(e=>{i.transaction_journal_entries.enabled=e.includes("checked"),this.edit({custom_display_id_config:JSON.stringify(i)})}),this.__singleCheckboxGroupOptions,i.transaction_journal_entries.enabled?o(v||(v=U` <div class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-transaction-separator" class="col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-authcapture-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-capture-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-void-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-refund-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} </div> `),(()=>i.transaction_journal_entries.transaction_separator),(e=>{i.transaction_journal_entries.transaction_separator=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix),(e=>{i.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix),(e=>{i.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.transaction_journal_entries.log_detail_request_types.transaction_void.prefix),(e=>{i.transaction_journal_entries.log_detail_request_types.transaction_void.prefix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),(()=>i.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix),(e=>{i.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix=e,this.edit({custom_display_id_config:JSON.stringify(i)})}),i.start&&i.length&&r/10<=s?o($||($=U` <table data-testid="custom-display-id-config-transaction-journal-entries-examples" style="font-family:monospace" class="col-span-2 text-xs text-secondary whitespace-nowrap"> <tbody> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-authcapture-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-capture-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-void-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-refund-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> </tbody> </table> `),a,i.transaction_journal_entries.transaction_separator,i.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix,d,a,i.transaction_journal_entries.transaction_separator,i.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix,d,a,i.transaction_journal_entries.transaction_separator,i.transaction_journal_entries.log_detail_request_types.transaction_void.prefix,d,a,i.transaction_journal_entries.transaction_separator,i.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix,d):""):""):"")}__renderSmtpConfig(){return o(k||(k=U` <div class="grid grid-cols-2 gap-m p-m rounded-t-l rounded-b-l border border-contrast-10 sm-col-span-2"> ${0} </div> `),["host","port","username","password","security"].map((e=>{const t=()=>JSON.parse(this.form.smtp_config||"{}")[e],i=t=>{var o,i,r,s,n;const a=JSON.parse(this.form.smtp_config||"{}");this.edit({smtp_config:JSON.stringify({username:null!==(o=a.username)&&void 0!==o?o:"",password:null!==(i=a.password)&&void 0!==i?i:"",security:null!==(r=a.security)&&void 0!==r?r:"",host:null!==(s=a.host)&&void 0!==s?s:"",port:null!==(n=a.port)&&void 0!==n?n:"",[e]:t})})},r=`smtp-config-${e}`;return"password"===e?o(V||(V=U` <foxy-internal-password-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> `),r,t,i):"port"===e?o(j||(j=U` <foxy-internal-integer-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> `),r,t,i):"security"===e?o(S||(S=U` <foxy-internal-radio-group-control infer="${0}" class="-mt-xs -mx-xs -mb-m col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> `),r,t,i,[{label:"option_ssl",value:"ssl"},{label:"option_tls",value:"tls"},{label:"option_none",value:""}]):o(w||(w=U` <foxy-internal-text-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),r,t,i)})))}__renderWarning(e,t){return o(q||(q=U` <div class="p-s leading-m text-s rounded bg-primary-10 text-primary sm-col-span-2"> <foxy-i18n infer="" key="${0}"></foxy-i18n> ${0} </div> `),e,t?o(O||(O=U` <a target="_blank" class="font-semibold hover-underline rounded focus-outline-none focus-ring-2 focus-ring-primary" href="${0}" lang="en"> ${0} <iron-icon class="icon-inline" icon="icons:open-in-new"></iron-icon> </a> `),t.href,t.caption):"")}__renderLoader(e){var i;const r=`loader-${e}`;return{data:null===(i=this.renderRoot.querySelector(`#${r}`))||void 0===i?void 0:i.data,render:e=>o(C||(C=U` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),t(null!=e?e:void 0),r,(()=>this.requestUpdate()))}}}customElements.define("foxy-store-form",E);export{E as StoreForm};
|
|
1
|
+
import"./shared-bc814810.js";import"./shared-2add595d.js";import"./shared-c95c17e6.js";import"./shared-71f2ef1f.js";import"./shared-a37abe4c.js";import"./shared-af226a9a.js";import"./shared-4979dca4.js";import"./shared-988ec916.js";import"./shared-d518bd55.js";import"./shared-cba08e1c.js";import"./shared-80fc2b6a.js";import{I as e}from"./shared-6581241a.js";import"./foxy-nucleon-element.js";import"./shared-0821cfdc.js";import{_ as t}from"./shared-a8ced8bf.js";import{R as o,a as i}from"./shared-2cc638ad.js";import{i as r}from"./shared-d3bf9ac0.js";import{c as s}from"./shared-4e709717.js";import{h as n}from"./shared-7f33a83a.js";import{c as a}from"./shared-63139d9e.js";import"./shared-be66c2e7.js";import"./shared-0ce006b9.js";import"./shared-88c4cfec.js";import"./shared-08156595.js";import"./shared-5ea18e60.js";import"./shared-62c088b7.js";import"./shared-39c10b22.js";import"./shared-9bdacf65.js";import"./shared-0479553e.js";import"./shared-43bcce74.js";import"./shared-76b3d76a.js";import"./shared-4f037e43.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-6cb1015f.js";import"./shared-08e27fe9.js";import"./shared-d519a301.js";import"./shared-f3b35364.js";import"./shared-11c2efc8.js";import"./shared-bd252323.js";import"./shared-7d4fb1a2.js";import"./shared-4849ef5b.js";import"./shared-83596b46.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./foxy-spinner.js";import"./shared-2092d86f.js";import"./shared-839dd3a8.js";let l,c,d,u,_,p,h,m,f,g,y,x,b,v,$,V,k,j,S,w,q=e=>e;const O=o(i(e,"store-form"));class C extends O{constructor(){super(...arguments),this.customerPasswordHashTypes=null,this.shippingAddressTypes=null,this.storeVersions=null,this.checkoutTypes=null,this.localeCodes=null,this.languages=null,this.timezones=null,this.countries=null,this.regions=null,this.templates={},this.__singleCheckboxGroupOptions=[{label:"option_checked",value:"checked"}],this.__appSessionTimeOptions=[{value:"s",label:"second"},{value:"m",label:"minute"},{value:"h",label:"hour"},{value:"d",label:"day"}],this.__getStoreEmailValue=()=>{var e;return(null!==(e=this.form.store_email)&&void 0!==e?e:"").split(",").map((e=>({value:e.trim()}))).filter((({value:e})=>e.length>0))},this.__setStoreEmailValue=e=>{this.edit({store_email:e.map((e=>e.value)).join(",")})},this.__getBccOnReceiptEmailValue=()=>this.form.bcc_on_receipt_email?["checked"]:[],this.__setBccOnReceiptEmailValue=e=>{this.edit({bcc_on_receipt_email:e.includes("checked")})},this.__getUseEmailDnsValue=()=>this.form.use_email_dns?["checked"]:[],this.__setUseEmailDnsValue=e=>{this.edit({use_email_dns:e.includes("checked")})},this.__getUseSmtpConfigValue=()=>this.form.smtp_config?["checked"]:[],this.__setUseSmtpConfigValue=e=>{e.includes("checked")?this.edit({smtp_config:JSON.stringify({username:"",password:"",security:"",host:"",port:""})}):this.edit({smtp_config:""})},this.__getFeaturesMultishipValue=()=>this.form.features_multiship?["checked"]:[],this.__setFeaturesMultishipValue=e=>{this.edit({features_multiship:e.includes("checked")})},this.__getRequireSignedShippingRatesValue=()=>this.form.require_signed_shipping_rates?["checked"]:[],this.__setRequireSignedShippingRatesValue=e=>{this.edit({require_signed_shipping_rates:e.includes("checked")})},this.__getAppSessionTimeValue=()=>{const e=this.form.app_session_time||43200;return e%86400==0?e/86400+"d":e%3600==0?e/3600+"h":e%60==0?e/60+"m":`${e}s`},this.__setAppSessionTimeValue=e=>{const t=e[e.length-1],o=parseInt(e.substring(0,e.length-1));this.edit({app_session_time:{d:86400,h:3600,m:60,s:1}[t]*o})},this.__getProductsRequireExpiresPropertyValue=()=>this.form.products_require_expires_property?["checked"]:[],this.__setProductsRequireExpiresPropertyValue=e=>{this.edit({products_require_expires_property:e.includes("checked")})},this.__getUseCartValidationValue=()=>this.form.use_cart_validation?["checked"]:[],this.__setUseCartValidationValue=e=>{this.edit({use_cart_validation:e.includes("checked")})},this.__getSingleSignOnUrlValue=()=>{var e;return this.form.use_single_sign_on&&null!==(e=this.form.single_sign_on_url)&&void 0!==e?e:""},this.__setSingleSignOnUrlValue=e=>{this.edit({use_single_sign_on:!!e,single_sign_on_url:e})},this.__getWebhookUrlValue=()=>{var e;return this.form.use_webhook&&null!==(e=this.form.webhook_url)&&void 0!==e?e:""},this.__setWebhookUrlValue=e=>{this.edit({use_webhook:!!e,webhook_url:e})},this.__setStoreDomainValue=e=>{if(e.endsWith(".foxycart.com")){const t=e.substring(0,e.length-13);this.edit({store_domain:t,use_remote_domain:t.includes(".")})}else this.edit({store_domain:e,use_remote_domain:e.includes(".")})}}static get properties(){return t(t({},super.properties),{},{customerPasswordHashTypes:{attribute:"customer-password-hash-types"},shippingAddressTypes:{attribute:"shipping-address-types"},storeVersions:{attribute:"store-versions"},checkoutTypes:{attribute:"checkout-types"},localeCodes:{attribute:"locale-codes"},languages:{},timezones:{},countries:{},regions:{}})}static get v8n(){return[({store_name:e})=>!!e||"store-name:v8n_required",({store_name:e})=>e&&e.length<=50||"store-name:v8n_too_long",({store_domain:e})=>!!e||"store-domain:v8n_required",({store_domain:e})=>e&&e.length<=50||"store-domain:v8n_too_long",({store_url:e})=>!!e||"store-url:v8n_required",({store_url:e})=>e&&e.length<=300||"store-url:v8n_too_long",({receipt_continue_url:e})=>!e||e.length<=300||"receipt-continue-url:v8n_too_long",({store_email:e})=>!!e||"store-email:v8n_required",({store_email:e})=>e&&e.length<=300||"store-email:v8n_too_long",({from_email:e})=>!e||e.length<=100||"from-email:v8n_too_long",({smtp_config:e})=>!e||e.length<=1e3||"use-smtp-config:v8n_too_long",({postal_code:e})=>!!e||"postal-code:v8n_required",({postal_code:e})=>e&&e.length<=50||"postal-code:v8n_too_long",({region:e})=>!!e||"region:v8n_required",({region:e})=>e&&e.length<=100||"region:v8n_too_long",({country:e})=>!!e||"country:v8n_required",({logo_url:e})=>!e||e.length<=100||"logo-url:v8n_too_long",({webhook_url:e,use_webhook:t})=>!t||!!e||"webhook-url:v8n_required",({webhook_url:e,use_webhook:t})=>!t||!e||e.length<=300||"webhook-url:v8n_too_long",({webhook_key:e,use_webhook:t,use_cart_validation:o})=>!t&&!o||!!e||"webhook-key:v8n_required",({webhook_key:e,use_webhook:t,use_cart_validation:o})=>!t&&!o||!e||e.length<=200||"webhook-key:v8n_too_long",({single_sign_on_url:e,use_single_sign_on:t})=>!t||!!e||"single-sign-on-url:v8n_required",({single_sign_on_url:e,use_single_sign_on:t})=>!t||!e||e.length<=300||"single-sign-on-url:v8n_too_long",({customer_password_hash_config:e})=>!e||String(e).length<=100||"customer-password-hash-config:v8n_too_long",({unified_order_entry_password:e})=>!e||String(e).length<=100||"unified-order-entry-password:v8n_too_long",({custom_display_id_config:e})=>!e||String(e).length<=100||"custom-display-id-config-enabled:v8n_too_long"]}renderBody(){var e,t,o,i,s,a,u,_,p,h,m,f,g,y,x,b,v,$,V,k,j,S,w;const O=this.form.use_email_dns&&!(null===(e=this.data)||void 0===e?void 0:e.use_email_dns)&&!this.hiddenSelector.matches("use-email-dns",!0),C=this.form.require_signed_shipping_rates&&!(null===(t=this.data)||void 0===t?void 0:t.require_signed_shipping_rates)&&!this.hiddenSelector.matches("require-signed-shipping-rates",!0),U=this.form.products_require_expires_property&&!(null===(o=this.data)||void 0===o?void 0:o.products_require_expires_property)&&!this.hiddenSelector.matches("products-require-expires-property",!0),N=this.form.use_cart_validation&&!(null===(i=this.data)||void 0===i?void 0:i.use_cart_validation)&&!this.hiddenSelector.matches("use-cart-validation",!0),R=this.t(this.form.use_remote_domain&&!(null===(s=this.data)||void 0===s?void 0:s.use_remote_domain)?"store-domain.custom_domain_note":"store-domain.helper_text"),E=!this.form.store_domain||this.form.store_domain.includes(".")?"":".foxycart.com",J=this.__renderLoader(1),M=this.__renderLoader(2),T=this.__renderLoader(3),P=this.__renderLoader(4),D=this.__renderLoader(5),L=this.__renderLoader(6),W=this.__renderLoader(7),A=this.__renderLoader(8),B=this.__renderLoader(9),G=Object.entries(null!==(u=null===(a=null==M?void 0:M.data)||void 0===a?void 0:a.values)&&void 0!==u?u:{}),I=null==P?void 0:P.data,z=null==D?void 0:D.data,F=null==L?void 0:L.data,H=null!==(p=null===(_=null==W?void 0:W.data)||void 0===_?void 0:_.values.timezone)&&void 0!==p?p:[],K=Object.values(null!==(m=null===(h=null==A?void 0:A.data)||void 0===h?void 0:h.values)&&void 0!==m?m:{}),Q=Object.values(null!==(g=null===(f=null==B?void 0:B.data)||void 0===f?void 0:f.values)&&void 0!==g?g:{}),X=Object.entries(null!==(x=null===(y=null==J?void 0:J.data)||void 0===y?void 0:y.values)&&void 0!==x?x:{}),Y=Object.entries(null!==(v=null===(b=null==T?void 0:T.data)||void 0===b?void 0:b.values)&&void 0!==v?v:{}),Z=Object.entries(null!==($=null==z?void 0:z.values)&&void 0!==$?$:{}),ee=Object.entries(null!==(V=null==F?void 0:F.values)&&void 0!==V?V:{}),te=X.map((e=>({label:e[1].description,value:e[0]}))),oe=G.map((([e,t])=>({label:t,value:e}))),ie=Y.map((([e,t])=>({label:t,value:e}))),re=Z.map((([e,t])=>({value:e,label:t}))),se=ee.map((([e,t])=>({value:e,label:t}))),ne=H.map((e=>({label:e.description,value:e.timezone}))),ae=K.map((e=>({label:e.default,value:e.cc2}))),le=Q.map((e=>({label:e.default,value:e.code})));let ce;try{const e=new URL(null!==(k=this.regions)&&void 0!==k?k:""),t=this.form.country;t&&e.searchParams.set("country_code",t),ce=e.toString()}catch(e){ce=void 0}return n(l||(l=q` ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} <div class="grid gap-m grid-cols-1 sm-grid-cols-2"> <foxy-internal-text-control infer="store-name"></foxy-internal-text-control> <foxy-internal-text-control infer="logo-url"></foxy-internal-text-control> <foxy-internal-text-control helper-text="${0}" suffix="${0}" infer="store-domain" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="store-url"></foxy-internal-text-control> <foxy-internal-editable-list-control infer="store-email" class="sm-col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-select-control infer="timezone" class="sm-col-span-2" .options="${0}"> </foxy-internal-select-control> <foxy-internal-async-combo-box-control item-label-path="version" item-value-path="_links.self.href" infer="store-version-uri" first="${0}" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-text-control infer="from-email" class="sm-col-span-2" placeholder="${0}"> </foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="bcc-on-receipt-email" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="use-email-dns" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-checkbox-group-control infer="use-smtp-config" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="country" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="region" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control infer="postal-code"></foxy-internal-text-control> <foxy-internal-select-control infer="shipping-address-type" .options="${0}"> </foxy-internal-select-control> <foxy-internal-checkbox-group-control infer="features-multiship" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="require-signed-shipping-rates" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> ${0} ${0} <foxy-internal-text-control class="sm-col-span-2" infer="receipt-continue-url"> </foxy-internal-text-control> <foxy-internal-frequency-control class="sm-col-span-2" infer="app-session-time" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-frequency-control> <foxy-internal-checkbox-group-control infer="products-require-expires-property" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-checkbox-group-control infer="use-cart-validation" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} <foxy-internal-select-control infer="checkout-type" class="sm-col-span-2" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="customer-password-hash-type" .options="${0}" .setValue="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-password-control infer="unified-order-entry-password"> </foxy-internal-password-control> <foxy-internal-text-control infer="single-sign-on-url" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="webhook-url" class="sm-col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} ${0} </div> ${0} `),J.render(this.customerPasswordHashTypes),M.render(this.shippingAddressTypes),T.render(this.checkoutTypes),P.render(this.form.store_version_uri),D.render(this.localeCodes),W.render(this.timezones),A.render(this.countries),L.render(this.languages),B.render(ce),R,E,this.__setStoreDomainValue,this.__getStoreEmailValue,this.__setStoreEmailValue,ne,r(null!==(j=this.storeVersions)&&void 0!==j?j:void 0),I,null!==(w=null===(S=this.__getStoreEmailValue()[0])||void 0===S?void 0:S.value)&&void 0!==w?w:this.t("from-email.placeholder"),this.__getBccOnReceiptEmailValue,this.__setBccOnReceiptEmailValue,this.__singleCheckboxGroupOptions,this.__getUseEmailDnsValue,this.__setUseEmailDnsValue,this.__singleCheckboxGroupOptions,O?this.__renderWarning("use_email_dns_helper_text",{href:"https://wiki.foxycart.com/v/1.1/emails#how_emails_are_sent_spf_dkim_dmarc_etc",caption:"How Emails Are Sent (SPF, DKIM, DMARC, etc.)"}):"",this.__getUseSmtpConfigValue,this.__setUseSmtpConfigValue,this.__singleCheckboxGroupOptions,this.form.smtp_config&&!this.hiddenSelector.matches("smtp-config",!0)?this.__renderSmtpConfig():"",ae,le,oe,this.__getFeaturesMultishipValue,this.__setFeaturesMultishipValue,this.__singleCheckboxGroupOptions,this.__getRequireSignedShippingRatesValue,this.__setRequireSignedShippingRatesValue,this.__singleCheckboxGroupOptions,C?this.__renderWarning("require_signed_shipping_rates_helper_text"):"",se,re,this.hiddenSelector.matches("currency-style",!0)?"":this.__renderCurrencyStyleSelector(),this.hiddenSelector.matches("custom-display-id-config",!0)?"":this.__renderCustomIDSettings(),this.__getAppSessionTimeValue,this.__setAppSessionTimeValue,this.__appSessionTimeOptions,this.__getProductsRequireExpiresPropertyValue,this.__setProductsRequireExpiresPropertyValue,this.__singleCheckboxGroupOptions,U?this.__renderWarning("products_require_expires_property_helper_text"):"",this.__getUseCartValidationValue,this.__setUseCartValidationValue,this.__singleCheckboxGroupOptions,N?this.__renderWarning("use_cart_validation_helper_text",{href:"https://wiki.foxycart.com/v/2.0/hmac_validation",caption:"HMAC Product Verification: Locking Down your Add-To-Cart Links and Forms"}):"",ie,te,(e=>{var t;const o=X.find((([t])=>t===e));this.edit({customer_password_hash_type:e,customer_password_hash_config:null!==(t=null==o?void 0:o[1].config)&&void 0!==t?t:""})}),"number"==typeof this.form.customer_password_hash_config?n(c||(c=q` <foxy-internal-number-control infer="customer-password-hash-config"> </foxy-internal-number-control> `)):n(d||(d=q` <foxy-internal-text-control infer="customer-password-hash-config"> </foxy-internal-text-control> `)),this.__getSingleSignOnUrlValue,this.__setSingleSignOnUrlValue,this.__getWebhookUrlValue,this.__setWebhookUrlValue,this.__renderWebhookKey(),this.data&&!this.hiddenSelector.matches("is-maintenance-mode",!0)?this.__renderMaintenanceModeSwitch():"",super.renderBody())}__renderWebhookKey(){var e,t;let o;try{o=JSON.parse(null!==(e=this.form.webhook_key)&&void 0!==e?e:"")}catch(e){const i=null!==(t=this.form.webhook_key)&&void 0!==t?t:"";o={cart_signing:i,xml_datafeed:i,api_legacy:i,sso:i}}return Object.keys(o).map((e=>n(u||(u=q` <foxy-internal-password-control infer="webhook-key-${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> `),e.replace("_","-"),(()=>o[e]),(t=>{o[e]=t,this.edit({webhook_key:JSON.stringify(o)})}))))}__renderMaintenanceModeSwitch(){var e;const t=!!(null===(e=this.data)||void 0===e?void 0:e.is_maintenance_mode),o=(t?"disable":"enable")+"_maintenance_mode",i=`maintenance_mode_${t?"on":"off"}_explainer`;return n(_||(_=q` <div data-testid="is-maintenance-mode" class="${0}"> <foxy-i18n infer="" class="block mb-s" key="${0}"></foxy-i18n> <vaadin-button theme="tertiary small ${0}" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-button> </div> `),s({"rounded leading-s text-s sm-col-span-2":!0,"text-tertiary":!t,"text-error":t}),i,t?"contrast":"",this.disabledSelector.matches("is-maintenance-mode",!0),(()=>{this.edit({is_maintenance_mode:!this.form.is_maintenance_mode}),this.submit()}),o)}__renderCurrencyStyleSelector(){const e={101:0,100:0,"001":1,"000":2,111:3,110:3,"011":4,"010":5},t=[this.form.hide_currency_symbol,this.form.hide_decimal_characters,this.form.use_international_currency_symbol].map((e=>Number(Boolean(e)))).join(""),o=e[t],i=this.disabledSelector.matches("currency-style",!0),r=this.readonlySelector.matches("currency-style",!0);return n(p||(p=q` <div data-testid="currency-style"> ${0} <div class="grid grid-cols-1 gap-xs transition-colors text-secondary hover-text-body sm-col-span-2"> <foxy-i18n infer="" class="font-medium text-s" key="currency_style_label"></foxy-i18n> <div class="grid grid-cols-3 bg-contrast-10 rounded" style="gap:1px;padding:1px"> ${0} </div> <foxy-i18n infer="" class="text-xs" key="currency_style_helper_text"></foxy-i18n> </div> ${0} </div> `),this.renderTemplateOrSlot("currency-style:before"),["12.34","USD 12.34","$12.34","12","USD 12","$12"].map(((t,a)=>n(h||(h=q` <label style="--lumo-border-radius:calc(var(--lumo-border-radius-m) - 1px)" class="${0}"> <span class="font-medium font-tnum">${0}</span> <input class="sr-only" value="${0}" type="radio" name="currency-style" ?checked="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </label> `),s({"relative z-0 px-s h-m flex items-center transition-colors":!0,"hover-cursor-pointer":!0,"focus-within-z-10 focus-within-ring-2 focus-within-ring-primary-50":!0,"bg-base text-body hover-bg-transparent":a!==o,"bg-primary text-primary-contrast":a===o,"rounded-tl":0===a,"rounded-tr":2===a,"rounded-bl":3===a,"rounded-br":5===a}),t,a,a===o,i,r,(()=>{const t=Object.entries(e).find((e=>e[1]===a))[0];this.edit({hide_currency_symbol:Boolean(Number(t[0])),hide_decimal_characters:Boolean(Number(t[1])),use_international_currency_symbol:Boolean(Number(t[2]))})})))),this.renderTemplateOrSlot("currency-style:after"))}__renderCustomIDSettings(){var e;const t={enabled:!1,start:"0",length:"0",prefix:"",suffix:"",transaction_journal_entries:{enabled:!1,transaction_separator:"",log_detail_request_types:{transaction_authcapture:{prefix:""},transaction_capture:{prefix:""},transaction_refund:{prefix:""},transaction_void:{prefix:""}}}};let o;try{o=JSON.parse(null!==(e=this.form.custom_display_id_config)&&void 0!==e?e:"")}catch(e){o=a(t)}const i=parseInt(o.start||"0"),r=parseInt(o.length||"0")-o.prefix.length-o.suffix.length,s=Math.min(i+Math.floor(Math.random()*Math.pow(10,r)),Math.pow(10,r)-1),l=`${o.prefix}${s.toString().padStart(r,"0")}${o.suffix}`,c=Math.floor(1e3*Math.random()),d=String(c).padStart(3,"0");return n(m||(m=q` <foxy-internal-checkbox-group-control infer="custom-display-id-config-enabled" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),(()=>o.enabled?["checked"]:[]),(e=>{o.enabled=e.includes("checked"),this.edit({custom_display_id_config:JSON.stringify(o)})}),this.__singleCheckboxGroupOptions,o.enabled?n(f||(f=q` <div class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"> <foxy-internal-integer-control infer="custom-display-id-config-start" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="custom-display-id-config-length" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-text-control infer="custom-display-id-config-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-suffix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} </div> <foxy-internal-checkbox-group-control infer="custom-display-id-config-transaction-journal-entries-enabled" class="-mt-xs -mb-m sm-col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),(()=>parseInt(o.start||"0")),(e=>{o.start=String(e),this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>parseInt(o.length||"0")),(e=>{o.length=String(e),this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.prefix),(e=>{o.prefix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.suffix),(e=>{o.suffix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),o.start&&o.length&&i/10<=r?n(g||(g=q` <table data-testid="custom-display-id-config-examples" style="font-family:monospace" class="col-span-2 text-xs text-secondary whitespace-nowrap"> <tbody> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-first-example"> </foxy-i18n> </td> <td> ${0}${0}${0} </td> </tr> <tr style="width:1%"> <td> <foxy-i18n infer="" key="custom-display-id-config-random-example"> </foxy-i18n> </td> <td>${0}</td> </tr> </tbody> </table> `),o.prefix,i.toString().padStart(r,"0"),o.suffix,l):"",(()=>o.transaction_journal_entries.enabled?["checked"]:[]),(e=>{o.transaction_journal_entries.enabled=e.includes("checked"),this.edit({custom_display_id_config:JSON.stringify(o)})}),this.__singleCheckboxGroupOptions,o.transaction_journal_entries.enabled?n(y||(y=q` <div class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-transaction-separator" class="col-span-2" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-authcapture-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-capture-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-void-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-refund-prefix" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> ${0} </div> `),(()=>o.transaction_journal_entries.transaction_separator),(e=>{o.transaction_journal_entries.transaction_separator=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix),(e=>{o.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix),(e=>{o.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.transaction_journal_entries.log_detail_request_types.transaction_void.prefix),(e=>{o.transaction_journal_entries.log_detail_request_types.transaction_void.prefix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),(()=>o.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix),(e=>{o.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix=e,this.edit({custom_display_id_config:JSON.stringify(o)})}),o.start&&o.length&&i/10<=r?n(x||(x=q` <table data-testid="custom-display-id-config-transaction-journal-entries-examples" style="font-family:monospace" class="col-span-2 text-xs text-secondary whitespace-nowrap"> <tbody> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-authcapture-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-capture-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-void-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> <tr> <td style="width:1%"> <foxy-i18n infer="" key="custom-display-id-config-transaction-journal-entries-refund-example"> </foxy-i18n> </td> <td> ${0}${0}${0}${0} </td> </tr> </tbody> </table> `),l,o.transaction_journal_entries.transaction_separator,o.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix,d,l,o.transaction_journal_entries.transaction_separator,o.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix,d,l,o.transaction_journal_entries.transaction_separator,o.transaction_journal_entries.log_detail_request_types.transaction_void.prefix,d,l,o.transaction_journal_entries.transaction_separator,o.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix,d):""):""):"")}__renderSmtpConfig(){return n(b||(b=q` <div class="grid grid-cols-2 gap-m p-m rounded-t-l rounded-b-l border border-contrast-10 sm-col-span-2"> ${0} </div> `),["host","port","username","password","security"].map((e=>{const t=()=>JSON.parse(this.form.smtp_config||"{}")[e],o=t=>{var o,i,r,s,n;const a=JSON.parse(this.form.smtp_config||"{}");this.edit({smtp_config:JSON.stringify({username:null!==(o=a.username)&&void 0!==o?o:"",password:null!==(i=a.password)&&void 0!==i?i:"",security:null!==(r=a.security)&&void 0!==r?r:"",host:null!==(s=a.host)&&void 0!==s?s:"",port:null!==(n=a.port)&&void 0!==n?n:"",[e]:t})})},i=`smtp-config-${e}`;return"password"===e?n(v||(v=q` <foxy-internal-password-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> `),i,t,o):"port"===e?n($||($=q` <foxy-internal-integer-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> `),i,t,o):"security"===e?n(V||(V=q` <foxy-internal-radio-group-control infer="${0}" class="-mt-xs -mx-xs -mb-m col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> `),i,t,o,[{label:"option_ssl",value:"ssl"},{label:"option_tls",value:"tls"},{label:"option_none",value:""}]):n(k||(k=q` <foxy-internal-text-control infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),i,t,o)})))}__renderWarning(e,t){return n(j||(j=q` <div class="p-s leading-m text-s rounded bg-primary-10 text-primary sm-col-span-2"> <foxy-i18n infer="" key="${0}"></foxy-i18n> ${0} </div> `),e,t?n(S||(S=q` <a target="_blank" class="font-semibold hover-underline rounded focus-outline-none focus-ring-2 focus-ring-primary" href="${0}" lang="en"> ${0} <iron-icon class="icon-inline" icon="icons:open-in-new"></iron-icon> </a> `),t.href,t.caption):"")}__renderLoader(e){var t;const o=`loader-${e}`;return{data:null===(t=this.renderRoot.querySelector(`#${o}`))||void 0===t?void 0:t.data,render:e=>n(w||(w=q` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),r(null!=e?e:void 0),o,(()=>this.requestUpdate()))}}}customElements.define("foxy-store-form",C);export{C as StoreForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5b177708.js";import"./shared-62c088b7.js";import"./shared-c95c17e6.js";import"./shared-2add595d.js";import"./shared-bb0e33c3.js";import"./shared-80fc2b6a.js";import{I as e}from"./shared-6581241a.js";import"./foxy-nucleon-element.js";import"./shared-0821cfdc.js";import{I as i}from"./shared-9bdacf65.js";import"./foxy-pagination.js";import"./foxy-spinner.js";import"./shared-88c4cfec.js";import{_ as t}from"./shared-a8ced8bf.js";import{h as r}from"./shared-7f33a83a.js";import{C as s}from"./shared-43bcce74.js";import{N as n}from"./shared-181f51bd.js";import{T as o,a as d}from"./shared-2cc638ad.js";import{i as a}from"./shared-d3bf9ac0.js";import{c as p}from"./shared-4e709717.js";import{B as l}from"./shared-76b3d76a.js";import"./shared-0ce006b9.js";import"./shared-6cb1015f.js";import"./shared-be66c2e7.js";import"./shared-5ea18e60.js";import"./shared-08e27fe9.js";import"./shared-08156595.js";import"./shared-39c10b22.js";import"./shared-a85afa33.js";import"./shared-ed0dee03.js";import"./shared-bc814810.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-4f037e43.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-0479553e.js";import"./shared-2092d86f.js";let h,c=e=>e;const m=s(o(n));customElements.define("foxy-internal-store-shipping-method-form-services-page-item-content",class extends m{constructor(){super(...arguments),this.shippingServiceUri=null,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{shippingServiceUri:{type:String,attribute:"shipping-service-uri"},shippingMethodUri:{type:String,attribute:"shipping-method-uri"}})}render(){return r(h||(h=c` <div class="h-full flex items-center"> <vaadin-checkbox data-testid="checkbox" class="w-full" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <slot></slot> </vaadin-checkbox> </div> `),!this.in("idle")||this.disabled,this.readonly,!!this.data,(e=>{var i,t;e.currentTarget.checked?(this.edit({shipping_service_uri:null!==(i=this.shippingServiceUri)&&void 0!==i?i:"",shipping_method_uri:null!==(t=this.shippingMethodUri)&&void 0!==t?t:""}),this.submit()):this.delete()}))}});let f,u=e=>e;const g=s(o(n));customElements.define("foxy-internal-store-shipping-method-form-services-page-item",class extends g{constructor(){super(...arguments),this.internationalAllowed=!1,this.shippingServiceUri=null,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{internationalAllowed:{type:Boolean,attribute:"international-allowed"},shippingServiceUri:{type:String,attribute:"shipping-service-uri"},shippingMethodUri:{type:String,attribute:"shipping-method-uri"}})}render(){var e,i,t;const s=null===(e=this.data)||void 0===e?void 0:e._embedded["fx:store_shipping_services"][0],n=s?void 0:this.href,o=s?s._links.self.href:void 0;return r(f||(f=u` <foxy-internal-store-shipping-method-form-services-page-item-content shipping-service-uri="${0}" shipping-method-uri="${0}" data-testid="content" parent="${0}" class="h-full" infer="" href="${0}"> <slot></slot> <span class="${0}"> <slot name="suffix"></slot> </span> </foxy-internal-store-shipping-method-form-services-page-item-content> `),a(null!==(i=this.shippingServiceUri)&&void 0!==i?i:void 0),a(null!==(t=this.shippingMethodUri)&&void 0!==t?t:void 0),a(n),a(o),this.internationalAllowed||!o?"text-tertiary":"text-error")}});let v,_,x,y,b=e=>e;const $=s(o(d(n)));customElements.define("foxy-internal-store-shipping-method-form-services-page",class extends ${constructor(){super(...arguments),this.storeShippingServicesUri=null,this.internationalAllowed=!1,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{storeShippingServicesUri:{type:String,attribute:"store-shipping-services-uri"},internationalAllowed:{type:Boolean,attribute:"international-allowed"},shippingMethodUri:{type:String,attribute:"shipping-method-uri"}})}render(){var e,i,t;const s=null!==(i=null===(e=this.data)||void 0===e?void 0:e._embedded["fx:shipping_services"])&&void 0!==i?i:[];let n=20;try{const e=parseInt(null!==(t=new URL(this.href).searchParams.get("limit"))&&void 0!==t?t:"");isNaN(e)||(n=e)}catch(e){}return r(v||(v=b` <div class="relative"> <div class="relative divide-y divide-contrast-10 ml-m"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" state="${0}" class="m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs" infer=""> </foxy-spinner> </div> </div> `),new Array(n).fill(0).map(((e,i)=>{var t,n;const o=s[i];let d;if(o)try{const e=new URL(null!==(t=this.storeShippingServicesUri)&&void 0!==t?t:""),i=new URL(o._links.self.href).pathname.split("/").pop();e.searchParams.set("shipping_service_id",i),e.searchParams.set("limit","1"),d=e.toString()}catch(e){}return d?r(x||(x=b` <foxy-internal-store-shipping-method-form-services-page-item shipping-service-uri="${0}" shipping-method-uri="${0}" data-testclass="item" class="h-l truncate" infer="" href="${0}" ?international-allowed="${0}"> ${0} ${0} </foxy-internal-store-shipping-method-form-services-page-item> `),o._links.self.href,a(null!==(n=this.shippingMethodUri)&&void 0!==n?n:void 0),d,this.internationalAllowed,null==o?void 0:o.name,o.is_international?r(y||(y=b`<foxy-i18n infer="" slot="suffix" key="international_only"></foxy-i18n>`)):""):r(_||(_=b`<div class="h-l"></div>`))})),p({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}});let j,S,U=e=>e;customElements.define("foxy-internal-store-shipping-method-form-services-control",class extends i{renderControl(){var e,i;const t=null===(e=this.nucleon)||void 0===e?void 0:e.data,s=null===(i=this.nucleon)||void 0===i?void 0:i.form;if(!t)return r(j||(j=U``));const n=new URL(t._links["fx:shipping_services"].href);return n.searchParams.set("limit","10"),r(S||(S=U` <foxy-pagination first="${0}" infer=""> <foxy-i18n class="block text-s font-medium text-secondary leading-none mb-s" infer="" key="header"> </foxy-i18n> <foxy-internal-store-shipping-method-form-services-page store-shipping-services-uri="${0}" shipping-method-uri="${0}" class="border border-contrast-10 rounded-t-l rounded-b-l mb-s" infer="" ?international-allowed="${0}"> </foxy-internal-store-shipping-method-form-services-page> </foxy-pagination> `),n.toString(),t._links["fx:store_shipping_services"].href,t._links["fx:shipping_method"].href,!!s.use_for_international)}});let k,w,M=e=>e;const T=d(e,"store-shipping-method-form"),P=e=>{try{return new URL(e),!0}catch(e){return!1}};class E extends T{constructor(){super(...arguments),this.shippingMethods=null,this.__destinations=[{value:"domestic",label:"domestic"},{value:"international",label:"international"}],this.__getDestinations=()=>{const e=[];return this.form.use_for_domestic&&e.push("domestic"),this.form.use_for_international&&e.push("international"),e},this.__setDestinations=e=>{this.edit({use_for_domestic:e.includes("domestic"),use_for_international:e.includes("international")})}}static get properties(){return t(t({},super.properties),{},{shippingMethods:{type:String,attribute:"shipping-methods"}})}static get v8n(){return[({shipping_method_uri:e})=>e&&P(e)||"shipping-method-uri:required",({accountid:e})=>!e||e.length<=50||"accountid:too_long",({password:e})=>!e||e.length<=50||"password:too_long",({meter_number:e})=>!e||e.length<=50||"meter-number:too_long",({authentication_key:e})=>!e||e.length<=50||"authentication-key:too_long",({custom_code:e})=>!e||new Blob([e]).size/1024<=64||"custom-code:too_long",e=>{var i;return"CUSTOM-ENDPOINT-POST"!==(null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"].code)||(e.accountid&&P(e.accountid)||"endpoint:required")},e=>{var i;const t=e.shipping_container_uri,r=null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"].code;return!r||!["USPS","FedEx","UPS"].includes(r)||(t&&P(t)||"shipping-container-uri:required")},e=>{var i;const t=e.shipping_drop_type_uri,r=null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"].code;return!r||!["FedEx","UPS"].includes(r)||(t&&P(t)||"shipping-drop-type-uri:required")}]}get hiddenSelector(){var e;const i=null===(e=this.form._embedded)||void 0===e?void 0:e["fx:shipping_method"].code;if(!i)return new l("not=shipping-method-uri,timestamps,create,delete");const t=["shipping-container-uri","shipping-drop-type-uri","destinations"],r=["authentication-key","meter-number","accountid","password"],s={"CUSTOM-ENDPOINT-POST":["endpoint"],"CUSTOM-CODE":["custom-code"],CUSTOM:["destinations","services"],FedEx:[...t,...r,"services"],USPS:[...t,"services"],UPS:[...t,...r,"services"]};if(s[i]){const e=["shipping-method-uri",...s[i],"timestamps","delete","create"];return new l(`not=${e.join()} ${super.hiddenSelector}`)}return super.hiddenSelector}renderBody(){var e,i,s,n,o,d;const p=null===(e=this.form._embedded)||void 0===e?void 0:e["fx:shipping_method"];return r(k||(k=M` ${0} <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-method-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-container-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-drop-type-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-checkbox-group-control infer="destinations" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-text-control infer="authentication-key"> </foxy-internal-text-control> <foxy-internal-text-control infer="meter-number"></foxy-internal-text-control> <foxy-internal-text-control infer="${0}" property="accountid"> </foxy-internal-text-control> <foxy-internal-text-control infer="password"></foxy-internal-text-control> <foxy-internal-text-area-control infer="custom-code"></foxy-internal-text-area-control> <foxy-internal-store-shipping-method-form-services-control infer="services"> </foxy-internal-store-shipping-method-form-services-control> ${0} `),["method","container","drop_type"].map((e=>{var i;const s=`fx:shipping_${e}`,n=`shipping_${e}_uri`;if(!(null===(i=this.form._embedded)||void 0===i?void 0:i[s])&&this.form[n])return r(w||(w=M` <foxy-nucleon class="hidden" infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),this.form[n],(e=>{const i=e.currentTarget.data;if(i){const e=t(t({},this.form._embedded),{},{[s]:i});this.edit({_embedded:e})}}))})),a(null!==(i=this.shippingMethods)&&void 0!==i?i:null===(s=this.form._links)||void 0===s?void 0:s["fx:shipping_methods"].href),null===(n=this.form._embedded)||void 0===n?void 0:n["fx:shipping_method"],(e=>{const{selectedItem:i}=e.currentTarget,t={"fx:shipping_method":i};this.edit({_embedded:t,shipping_container_uri:"",shipping_drop_type_uri:""})}),a(null==p?void 0:p._links["fx:shipping_containers"].href),null===(o=this.form._embedded)||void 0===o?void 0:o["fx:shipping_container"],(e=>{const{selectedItem:i}=e.currentTarget,r=t(t({},this.form._embedded),{},{"fx:shipping_container":i});this.edit({_embedded:r})}),a(null==p?void 0:p._links["fx:shipping_drop_types"].href),null===(d=this.form._embedded)||void 0===d?void 0:d["fx:shipping_drop_type"],(e=>{const{selectedItem:i}=e.currentTarget,r=t(t({},this.form._embedded),{},{"fx:shipping_drop_type":i});this.edit({_embedded:r})}),this.__getDestinations,this.__setDestinations,this.__destinations,"CUSTOM-ENDPOINT-POST"===(null==p?void 0:p.code)?"endpoint":"accountid",super.renderBody())}}customElements.define("foxy-store-shipping-method-form",E);export{E as StoreShippingMethodForm};
|
|
1
|
+
import"./shared-c95c17e6.js";import"./shared-2add595d.js";import"./shared-bb0e33c3.js";import"./shared-4979dca4.js";import"./shared-80fc2b6a.js";import{I as e}from"./shared-6581241a.js";import"./foxy-nucleon-element.js";import{I as i}from"./shared-9bdacf65.js";import"./foxy-pagination.js";import"./shared-0821cfdc.js";import"./foxy-spinner.js";import"./shared-88c4cfec.js";import{_ as t}from"./shared-a8ced8bf.js";import{C as n}from"./shared-43bcce74.js";import{N as r}from"./shared-181f51bd.js";import{T as s,a as o}from"./shared-2cc638ad.js";import{h as d}from"./shared-7f33a83a.js";import{i as a}from"./shared-d3bf9ac0.js";import{c as l}from"./shared-4e709717.js";import{B as p}from"./shared-76b3d76a.js";import"./shared-6cb1015f.js";import"./shared-be66c2e7.js";import"./shared-0ce006b9.js";import"./shared-5ea18e60.js";import"./shared-08e27fe9.js";import"./shared-62c088b7.js";import"./shared-08156595.js";import"./shared-39c10b22.js";import"./shared-a85afa33.js";import"./shared-ed0dee03.js";import"./shared-83596b46.js";import"./shared-bc814810.js";import"./shared-8dd0af4d.js";import"./shared-62a54a6c.js";import"./shared-4f037e43.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-0479553e.js";import"./shared-2092d86f.js";let h,c=e=>e;const m=n(s(r));customElements.define("foxy-internal-store-shipping-method-form-services-page-item-content",class extends m{constructor(){super(...arguments),this.shippingServiceUri=null,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{shippingServiceUri:{attribute:"shipping-service-uri"},shippingMethodUri:{attribute:"shipping-method-uri"}})}render(){return d(h||(h=c` <div class="h-full flex items-center"> <vaadin-checkbox data-testid="checkbox" class="w-full" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <slot></slot> </vaadin-checkbox> </div> `),!this.in("idle")||this.disabled,this.readonly,!!this.data,(e=>{var i,t;e.currentTarget.checked?(this.edit({shipping_service_uri:null!==(i=this.shippingServiceUri)&&void 0!==i?i:"",shipping_method_uri:null!==(t=this.shippingMethodUri)&&void 0!==t?t:""}),this.submit()):this.delete()}))}});let u,f=e=>e;const v=n(s(r));customElements.define("foxy-internal-store-shipping-method-form-services-page-item",class extends v{constructor(){super(...arguments),this.internationalAllowed=!1,this.shippingServiceUri=null,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{internationalAllowed:{type:Boolean,attribute:"international-allowed"},shippingServiceUri:{attribute:"shipping-service-uri"},shippingMethodUri:{attribute:"shipping-method-uri"}})}render(){var e,i,t;const n=null===(e=this.data)||void 0===e?void 0:e._embedded["fx:store_shipping_services"][0],r=n?void 0:this.href,s=n?n._links.self.href:void 0;return d(u||(u=f` <foxy-internal-store-shipping-method-form-services-page-item-content shipping-service-uri="${0}" shipping-method-uri="${0}" data-testid="content" parent="${0}" class="h-full" infer="" href="${0}"> <slot></slot> <span class="${0}"> <slot name="suffix"></slot> </span> </foxy-internal-store-shipping-method-form-services-page-item-content> `),a(null!==(i=this.shippingServiceUri)&&void 0!==i?i:void 0),a(null!==(t=this.shippingMethodUri)&&void 0!==t?t:void 0),a(r),a(s),this.internationalAllowed||!s?"text-tertiary":"text-error")}});let g,_,x,y,b=e=>e;const $=n(s(o(r)));customElements.define("foxy-internal-store-shipping-method-form-services-page",class extends ${constructor(){super(...arguments),this.storeShippingServicesUri=null,this.internationalAllowed=!1,this.shippingMethodUri=null}static get properties(){return t(t({},super.properties),{},{storeShippingServicesUri:{attribute:"store-shipping-services-uri"},internationalAllowed:{type:Boolean,attribute:"international-allowed"},shippingMethodUri:{attribute:"shipping-method-uri"}})}render(){var e,i,t;const n=null!==(i=null===(e=this.data)||void 0===e?void 0:e._embedded["fx:shipping_services"])&&void 0!==i?i:[];let r=20;try{const e=parseInt(null!==(t=new URL(this.href).searchParams.get("limit"))&&void 0!==t?t:"");isNaN(e)||(r=e)}catch(e){}return d(g||(g=b` <div class="relative"> <div class="relative divide-y divide-contrast-10 ml-m"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" state="${0}" class="m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs" infer=""> </foxy-spinner> </div> </div> `),new Array(r).fill(0).map(((e,i)=>{var t,r;const s=n[i];let o;if(s)try{const e=new URL(null!==(t=this.storeShippingServicesUri)&&void 0!==t?t:""),i=new URL(s._links.self.href).pathname.split("/").pop();e.searchParams.set("shipping_service_id",i),e.searchParams.set("limit","1"),o=e.toString()}catch(e){}return o?d(x||(x=b` <foxy-internal-store-shipping-method-form-services-page-item shipping-service-uri="${0}" shipping-method-uri="${0}" data-testclass="item" class="h-l truncate" infer="" href="${0}" ?international-allowed="${0}"> ${0} ${0} </foxy-internal-store-shipping-method-form-services-page-item> `),s._links.self.href,a(null!==(r=this.shippingMethodUri)&&void 0!==r?r:void 0),o,this.internationalAllowed,null==s?void 0:s.name,s.is_international?d(y||(y=b`<foxy-i18n infer="" slot="suffix" key="international_only"></foxy-i18n>`)):""):d(_||(_=b`<div class="h-l"></div>`))})),l({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}});let j,U,S=e=>e;customElements.define("foxy-internal-store-shipping-method-form-services-control",class extends i{renderControl(){var e,i;const t=null===(e=this.nucleon)||void 0===e?void 0:e.data,n=null===(i=this.nucleon)||void 0===i?void 0:i.form;if(!t)return d(j||(j=S``));const r=new URL(t._links["fx:shipping_services"].href);return r.searchParams.set("limit","10"),d(U||(U=S` <foxy-pagination first="${0}" infer=""> <foxy-i18n class="block text-s font-medium text-secondary leading-none mb-s" infer="" key="label"> </foxy-i18n> <foxy-internal-store-shipping-method-form-services-page store-shipping-services-uri="${0}" shipping-method-uri="${0}" class="border border-contrast-10 rounded mb-s" infer="" ?international-allowed="${0}"> </foxy-internal-store-shipping-method-form-services-page> </foxy-pagination> `),r.toString(),t._links["fx:store_shipping_services"].href,t._links["fx:shipping_method"].href,!!n.use_for_international)}});let k,w,M,T,P=e=>e;const E=o(e,"store-shipping-method-form"),I=e=>{try{return new URL(e),!0}catch(e){return!1}};class O extends E{constructor(){super(...arguments),this.shippingMethods=null,this.templates={},this.__destinations=[{value:"domestic",label:"domestic"},{value:"international",label:"international"}],this.__getDestinations=()=>{const e=[];return this.form.use_for_domestic&&e.push("domestic"),this.form.use_for_international&&e.push("international"),e},this.__setDestinations=e=>{this.edit({use_for_domestic:e.includes("domestic"),use_for_international:e.includes("international")})}}static get properties(){return t(t({},super.properties),{},{shippingMethods:{attribute:"shipping-methods"}})}static get v8n(){return[({shipping_method_uri:e})=>e&&I(e)||"shipping-method-uri:v8n_required",({accountid:e})=>!e||e.length<=50||"accountid:v8n_too_long",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({meter_number:e})=>!e||e.length<=50||"meter-number:v8n_too_long",({authentication_key:e})=>!e||e.length<=50||"authentication-key:v8n_too_long",({custom_code:e})=>!e||new Blob([e]).size/1024<=64||"custom-code:v8n_too_long",e=>{var i,t;return"CUSTOM-ENDPOINT-POST"!==(null===(t=null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"])||void 0===t?void 0:t.code)||(e.accountid&&I(e.accountid)||"endpoint:v8n_required")},e=>{var i,t;const n=e.shipping_container_uri,r=null===(t=null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"])||void 0===t?void 0:t.code;return!r||!["USPS","FedEx","UPS"].includes(r)||(n&&I(n)||"shipping-container-uri:v8n_required")},e=>{var i,t;const n=e.shipping_drop_type_uri,r=null===(t=null===(i=e._embedded)||void 0===i?void 0:i["fx:shipping_method"])||void 0===t?void 0:t.code;return!r||!["FedEx","UPS"].includes(r)||(n&&I(n)||"shipping-drop-type-uri:v8n_required")}]}get hiddenSelector(){var e;const i=null===(e=this.form._embedded)||void 0===e?void 0:e["fx:shipping_method"].code;if(!i)return new p("not=shipping-method-uri,timestamps,create,delete");const t=["shipping-container-uri","shipping-drop-type-uri","destinations"],n=["authentication-key","meter-number","accountid","password"],r={"CUSTOM-ENDPOINT-POST":["endpoint"],"CUSTOM-CODE":["custom-code"],CUSTOM:["destinations","services"],FedEx:[...t,...n,"services"],USPS:[...t,"services"],UPS:[...t,...n,"services"]};if(r[i]){const e=["shipping-method-uri",...r[i],"timestamps","delete","create"];return new p(`not=${e.join()} ${super.hiddenSelector}`)}return super.hiddenSelector}renderBody(){var e,i,n,r,s,o,l,p,h;const c=null===(e=this.form._embedded)||void 0===e?void 0:e["fx:shipping_method"];return d(k||(k=P` ${0} <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-method-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-container-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="shipping-drop-type-uri" .selectedItem="${0}" @selected-item-changed="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-checkbox-group-control infer="destinations" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-text-control infer="authentication-key"></foxy-internal-text-control> <foxy-internal-text-control infer="meter-number"></foxy-internal-text-control> ${0} <foxy-internal-password-control infer="password"></foxy-internal-password-control> <foxy-internal-text-area-control infer="custom-code"></foxy-internal-text-area-control> <foxy-internal-store-shipping-method-form-services-control infer="services"> </foxy-internal-store-shipping-method-form-services-control> ${0} `),["method","container","drop_type"].map((e=>{var i;const n=`fx:shipping_${e}`,r=`shipping_${e}_uri`;if(!(null===(i=this.form._embedded)||void 0===i?void 0:i[n])&&this.form[r])return d(w||(w=P` <foxy-nucleon class="hidden" infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),this.form[r],(e=>{const i=e.currentTarget.data;if(i){const e=t(t({},this.form._embedded),{},{[n]:i});this.edit({_embedded:e})}}))})),a(null!==(i=this.shippingMethods)&&void 0!==i?i:null===(n=this.form._links)||void 0===n?void 0:n["fx:shipping_methods"].href),null!==(s=null===(r=this.form._embedded)||void 0===r?void 0:r["fx:shipping_method"])&&void 0!==s?s:null,(e=>{var i,t;const{selectedItem:n}=e.currentTarget,r={"fx:shipping_method":n};this.edit({_embedded:r,shipping_container_uri:"",shipping_drop_type_uri:"",shipping_method_uri:null!==(t=null===(i=n)||void 0===i?void 0:i._links.self.href)&&void 0!==t?t:""})}),a(null==c?void 0:c._links["fx:shipping_containers"].href),null!==(l=null===(o=this.form._embedded)||void 0===o?void 0:o["fx:shipping_container"])&&void 0!==l?l:null,(e=>{var i,n;const{selectedItem:r}=e.currentTarget,s=t(t({},this.form._embedded),{},{"fx:shipping_container":r});this.edit({shipping_container_uri:null!==(n=null===(i=r)||void 0===i?void 0:i._links.self.href)&&void 0!==n?n:"",_embedded:s})}),a(null==c?void 0:c._links["fx:shipping_drop_types"].href),null!==(h=null===(p=this.form._embedded)||void 0===p?void 0:p["fx:shipping_drop_type"])&&void 0!==h?h:null,(e=>{var i,n;const{selectedItem:r}=e.currentTarget,s=t(t({},this.form._embedded),{},{"fx:shipping_drop_type":r});this.edit({shipping_drop_type_uri:null!==(n=null===(i=r)||void 0===i?void 0:i._links.self.href)&&void 0!==n?n:"",_embedded:s})}),this.__getDestinations,this.__setDestinations,this.__destinations,"CUSTOM-ENDPOINT-POST"===(null==c?void 0:c.code)?d(M||(M=P` <foxy-internal-text-control infer="endpoint" property="accountid"> </foxy-internal-text-control> `)):d(T||(T=P`<foxy-internal-text-control infer="accountid"></foxy-internal-text-control>`)),super.renderBody())}}customElements.define("foxy-store-shipping-method-form",O);export{O as StoreShippingMethodForm};
|