@useinsider/guido 3.2.0-beta.78d83bd → 3.2.0-beta.7e0c6bd
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/@types/config/schemas.js +1 -1
- package/dist/@types/config/validator.js +27 -34
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +76 -81
- package/dist/components/organisms/base/Toaster.vue2.js +10 -11
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +9 -15
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +31 -40
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +19 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +11 -14
- package/dist/components/organisms/header/EditorActions.vue.js +11 -12
- package/dist/components/organisms/header/EditorActions.vue2.js +18 -22
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +12 -15
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -19
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +14 -17
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +49 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +36 -38
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +47 -51
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +18 -21
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +27 -31
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +33 -46
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +20 -21
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +8 -9
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +9 -10
- package/dist/composables/useActionsApi.js +37 -38
- package/dist/composables/useBlocksConfig.js +26 -26
- package/dist/composables/useFullStoryBridge.js +8 -9
- package/dist/composables/useHtmlCompiler.js +34 -26
- package/dist/composables/useHtmlValidator.js +101 -109
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/useRecommendation.js +14 -15
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +21 -22
- package/dist/composables/useStripo.js +53 -50
- package/dist/composables/useSyncModuleExtractor.js +31 -29
- package/dist/composables/useTimerClone.js +24 -25
- package/dist/composables/useTranslations.js +23 -16
- package/dist/composables/useValidation.js +7 -8
- package/dist/composables/validators/useLiquidValidator.js +13 -13
- package/dist/config/compiler/unsubscribeCompilerRules.js +17 -19
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +10 -11
- package/dist/config/migrator/checkboxMigrator.js +20 -21
- package/dist/config/migrator/couponBlockMigrator.js +18 -19
- package/dist/config/migrator/itemsBlockMigrator.js +87 -89
- package/dist/config/migrator/radioButtonMigrator.js +12 -13
- package/dist/config/migrator/recommendationMigrator.js +106 -109
- package/dist/config/migrator/unsubscribeMigrator.js +10 -11
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +18 -19
- package/dist/extensions/Blocks/Items/block.js +9 -9
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +89 -97
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +23 -24
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +13 -14
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +44 -47
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +38 -40
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +155 -162
- package/dist/extensions/Blocks/Items/enums/productEnums.js +9 -14
- package/dist/extensions/Blocks/Items/template.js +218 -216
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +128 -133
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +17 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +82 -90
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +35 -36
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +134 -135
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +18 -20
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +8 -16
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +55 -56
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +22 -23
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +24 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +45 -47
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
- package/dist/extensions/Blocks/Unsubscribe/control.js +11 -13
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +16 -18
- package/dist/extensions/Blocks/common-control.js +25 -26
- package/dist/extensions/DynamicContent/dynamic-content.js +53 -58
- package/dist/guido.css +1 -1
- package/dist/library.js +11 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +233 -210
- package/dist/node_modules/valibot/dist/index.js +122 -126
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +14 -17
- package/dist/services/templateLibraryApi.js +37 -38
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/useTranslations.d.ts +1 -1
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/stores/config.js +25 -81
- package/dist/stores/dynamic-content.js +6 -11
- package/dist/stores/onboarding.js +5 -1
- package/dist/stores/preview.js +6 -9
- package/dist/stores/unsubscribe.js +1 -4
- package/dist/utils/dateUtil.js +7 -10
- package/dist/utils/genericUtil.js +10 -13
- package/dist/utils/pairProductVariables.js +13 -14
- package/package.json +8 -5
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/lodash-es/_Hash.js +0 -20
- package/dist/node_modules/lodash-es/_ListCache.js +0 -20
- package/dist/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/lodash-es/_MapCache.js +0 -20
- package/dist/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/lodash-es/_SetCache.js +0 -13
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -20
- package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
- package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
- package/dist/node_modules/lodash-es/_arraySome.js +0 -9
- package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
- package/dist/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/lodash-es/_baseGet.js +0 -11
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
- package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
- package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/lodash-es/_baseRange.js +0 -9
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseToString.js +0 -18
- package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_createRange.js +0 -11
- package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
- package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
- package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
- package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- package/dist/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/lodash-es/_getTag.js +0 -28
- package/dist/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/lodash-es/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isKey.js +0 -12
- package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
- package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/lodash-es/_toSource.js +0 -17
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/lodash-es/flatMap.js +0 -8
- package/dist/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isFunction.js +0 -12
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/lodash-es/map.js +0 -11
- package/dist/node_modules/lodash-es/memoize.js +0 -18
- package/dist/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/lodash-es/range.js +0 -5
- package/dist/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toFinite.js +0 -14
- package/dist/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/node_modules/lodash-es/toString.js +0 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { useRecommendationExtensionStore as p } from "../../store/recommendation.js";
|
|
2
|
+
import { formatPrice as b } from "../../utils/priceFormatter.js";
|
|
3
|
+
import { sanitizeImageUrl as u, CUSTOM_CELL_HTML as m } from "../utils.js";
|
|
4
|
+
import { ATTR_PRODUCT_ATTR as g, ATTR_PRODUCT_BUTTON as i, ATTR_PRODUCT_IMAGE as c, ATTR_PRODUCT_OMNIBUS_DISCOUNT as f, ATTR_PRODUCT_OMNIBUS_PRICE as T, ATTR_PRODUCT_OLD_PRICE as x, ATTR_PRODUCT_PRICE as _, ATTR_PRODUCT_NAME as R } from "../../constants/selectors.js";
|
|
1
5
|
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { formatPrice as R } from "../../utils/priceFormatter.js";
|
|
5
|
-
import { sanitizeImageUrl as C, CUSTOM_CELL_HTML as y } from "../utils.js";
|
|
6
|
-
function p() {
|
|
7
|
-
const t = _(), { currencySettings: e } = t.recommendationConfigs;
|
|
6
|
+
function l() {
|
|
7
|
+
const t = p(), { currencySettings: e } = t.recommendationConfigs;
|
|
8
8
|
return {
|
|
9
9
|
code: e.value,
|
|
10
10
|
symbol: e.symbol,
|
|
@@ -15,29 +15,29 @@ function p() {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
function s(t, e = "price") {
|
|
18
|
-
const n =
|
|
19
|
-
return
|
|
18
|
+
const n = l(), r = t[e], a = r?.[n.code] ?? Object.values(r ?? {})[0] ?? 0;
|
|
19
|
+
return b({
|
|
20
20
|
price: a,
|
|
21
21
|
currency: n
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const P = {
|
|
25
25
|
/**
|
|
26
26
|
* Image cell - left column (120px fixed width)
|
|
27
27
|
* Has recommendation-attribute-row class and data attributes for Card Composition control
|
|
28
28
|
*/
|
|
29
|
-
[
|
|
29
|
+
[c]: (t) => `
|
|
30
30
|
<td
|
|
31
31
|
width="120"
|
|
32
32
|
class="esd-block-image product-image-cell recommendation-attribute-row es-p5"
|
|
33
33
|
esd-extension-block-id="${o.IMAGE}"
|
|
34
|
-
data-attribute-type="${
|
|
34
|
+
data-attribute-type="${c}"
|
|
35
35
|
data-visibility="1"
|
|
36
36
|
align="center"
|
|
37
37
|
valign="middle">
|
|
38
38
|
<a target="_blank" href="${t.url}">
|
|
39
39
|
<img
|
|
40
|
-
src="${
|
|
40
|
+
src="${u(t.image_url)}"
|
|
41
41
|
alt="${t.name}"
|
|
42
42
|
style="display: block; max-width: 100%; height: auto;"
|
|
43
43
|
class="adapt-img product-image">
|
|
@@ -47,7 +47,7 @@ const I = {
|
|
|
47
47
|
/**
|
|
48
48
|
* Name element - row for info cell table
|
|
49
49
|
*/
|
|
50
|
-
[
|
|
50
|
+
[R]: (t) => `
|
|
51
51
|
<tr>
|
|
52
52
|
<td
|
|
53
53
|
class="esd-block-text product-name"
|
|
@@ -62,7 +62,7 @@ const I = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Price element - row for info cell table
|
|
64
64
|
*/
|
|
65
|
-
[
|
|
65
|
+
[_]: (t) => `
|
|
66
66
|
<tr>
|
|
67
67
|
<td
|
|
68
68
|
class="esd-block-text product-price"
|
|
@@ -77,7 +77,7 @@ const I = {
|
|
|
77
77
|
/**
|
|
78
78
|
* Old price element - row for info cell table
|
|
79
79
|
*/
|
|
80
|
-
[
|
|
80
|
+
[x]: (t) => `
|
|
81
81
|
<tr>
|
|
82
82
|
<td
|
|
83
83
|
class="esd-block-text product-old-price"
|
|
@@ -94,7 +94,7 @@ const I = {
|
|
|
94
94
|
/**
|
|
95
95
|
* Omnibus price element - row for info cell table
|
|
96
96
|
*/
|
|
97
|
-
[
|
|
97
|
+
[T]: (t) => `
|
|
98
98
|
<tr>
|
|
99
99
|
<td
|
|
100
100
|
class="esd-block-text product-omnibus-price"
|
|
@@ -113,9 +113,8 @@ const I = {
|
|
|
113
113
|
/**
|
|
114
114
|
* Omnibus discount element - row for info cell table
|
|
115
115
|
*/
|
|
116
|
-
[
|
|
117
|
-
|
|
118
|
-
const e = p(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, r = ((c = t.price) == null ? void 0 : c[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, a = n > 0 ? Math.round((n - r) / n * 100) : 0, b = a > 0 ? `-${a}%` : "0%";
|
|
116
|
+
[f]: (t) => {
|
|
117
|
+
const e = l(), n = t.original_price?.[e.code] ?? Object.values(t.original_price ?? {})[0] ?? 0, r = t.price?.[e.code] ?? Object.values(t.price ?? {})[0] ?? 0, a = n > 0 ? Math.round((n - r) / n * 100) : 0, d = a > 0 ? `-${a}%` : "0%";
|
|
119
118
|
return `
|
|
120
119
|
<tr>
|
|
121
120
|
<td
|
|
@@ -126,7 +125,7 @@ const I = {
|
|
|
126
125
|
align="left">
|
|
127
126
|
<p contenteditable="false" style="font-size: 12px; color: #666666; margin: 0;">
|
|
128
127
|
<span class="omnibus-text-before"></span>
|
|
129
|
-
<span class="omnibus-discount-value">${
|
|
128
|
+
<span class="omnibus-discount-value">${d}</span>
|
|
130
129
|
<span class="omnibus-text-after"></span>
|
|
131
130
|
</p>
|
|
132
131
|
</td>
|
|
@@ -137,12 +136,12 @@ const I = {
|
|
|
137
136
|
* Button cell - right column (100px fixed width)
|
|
138
137
|
* Has recommendation-attribute-row class and data attributes for Card Composition control
|
|
139
138
|
*/
|
|
140
|
-
[
|
|
139
|
+
[i]: (t) => `
|
|
141
140
|
<td
|
|
142
141
|
width="100"
|
|
143
142
|
class="esd-block-button button-cell recommendation-attribute-row product-button es-p5l es-p5r"
|
|
144
143
|
esd-extension-block-id="${o.BUTTON}"
|
|
145
|
-
data-attribute-type="${
|
|
144
|
+
data-attribute-type="${i}"
|
|
146
145
|
data-visibility="1"
|
|
147
146
|
align="center"
|
|
148
147
|
valign="middle">
|
|
@@ -169,10 +168,10 @@ const I = {
|
|
|
169
168
|
* @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
|
|
170
169
|
* @param content - Display content for the cell
|
|
171
170
|
*/
|
|
172
|
-
[
|
|
171
|
+
[m]: (t, e) => `
|
|
173
172
|
<tr>
|
|
174
173
|
<td
|
|
175
|
-
${
|
|
174
|
+
${g}="${t}"
|
|
176
175
|
class="esd-block-text product-custom-attribute"
|
|
177
176
|
esd-extension-block-id="${o.CUSTOM_ATTRIBUTE}"
|
|
178
177
|
align="left">
|
|
@@ -182,5 +181,5 @@ const I = {
|
|
|
182
181
|
`
|
|
183
182
|
};
|
|
184
183
|
export {
|
|
185
|
-
|
|
184
|
+
P as listElementRenderer
|
|
186
185
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ATTR_PRODUCT_IMAGE as a, ATTR_PRODUCT_BUTTON as d } from "../../constants/selectors.js";
|
|
2
1
|
import { DEFAULT_CARD_COMPOSITION as b, spacer as m, buildElementRenderer as C, DEFAULT_CARD_VISIBILITY as T } from "../utils.js";
|
|
3
2
|
import { listElementRenderer as f } from "./elementRenderer.js";
|
|
3
|
+
import { ATTR_PRODUCT_IMAGE as a, ATTR_PRODUCT_BUTTON as d } from "../../constants/selectors.js";
|
|
4
4
|
function R(r, n, l) {
|
|
5
5
|
const t = l ? "" : ' style="display: none;"', o = r.replace(/<tr>/, "").replace(/<\/tr>/, "");
|
|
6
6
|
return `<tr
|
|
@@ -1,60 +1,58 @@
|
|
|
1
|
-
import { ATTR_PRODUCT_IMAGE as
|
|
2
|
-
function
|
|
1
|
+
import { ATTR_PRODUCT_IMAGE as u, ATTR_PRODUCT_NAME as m, ATTR_PRODUCT_OLD_PRICE as b, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as _, ATTR_PRODUCT_OMNIBUS_DISCOUNT as g, ATTR_PRODUCT_BUTTON as C, ATTR_CUSTOM_PREFIX as p } from "../constants/selectors.js";
|
|
2
|
+
function O(t) {
|
|
3
3
|
return t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
return (n == null ? void 0 : n.type) === "defaultAttribute";
|
|
5
|
+
function f(t, e) {
|
|
6
|
+
return Object.values(e).find((r) => r.attributeName === t)?.type === "defaultAttribute";
|
|
8
7
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
8
|
+
function U(t, e) {
|
|
9
|
+
return f(t, e) ? t : `product_attribute.${t}`;
|
|
11
10
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const r = t[
|
|
11
|
+
const y = Symbol("customCellHtml");
|
|
12
|
+
function E(t, e, n = {}) {
|
|
13
|
+
const r = t[y];
|
|
15
14
|
if (!r)
|
|
16
15
|
return { ...t };
|
|
17
16
|
const l = { ...t };
|
|
18
|
-
return e.filter((o) => o.startsWith(
|
|
19
|
-
const s = o.substring(
|
|
17
|
+
return e.filter((o) => o.startsWith(p) && !l[o]).forEach((o) => {
|
|
18
|
+
const s = o.substring(p.length), a = O(s), A = U(s, n), D = f(s, n);
|
|
20
19
|
l[o] = (d) => {
|
|
21
|
-
|
|
22
|
-
const i = O ? d[s] : (p = d.product_attributes) == null ? void 0 : p[s];
|
|
20
|
+
const i = D ? d[s] : d.product_attributes?.[s];
|
|
23
21
|
let c = a;
|
|
24
|
-
return typeof i == "string" ? c = i : typeof i == "number" && (c = String(i)), r(
|
|
22
|
+
return typeof i == "string" ? c = i : typeof i == "number" && (c = String(i)), r(A, c);
|
|
25
23
|
};
|
|
26
24
|
}), l;
|
|
27
25
|
}
|
|
28
|
-
const
|
|
26
|
+
const S = {
|
|
29
27
|
TITLE: "You May Also Like!"
|
|
30
|
-
},
|
|
28
|
+
}, L = [
|
|
29
|
+
u,
|
|
31
30
|
m,
|
|
32
31
|
b,
|
|
33
32
|
T,
|
|
34
33
|
_,
|
|
35
34
|
g,
|
|
36
|
-
C
|
|
37
|
-
|
|
38
|
-
],
|
|
35
|
+
C
|
|
36
|
+
], M = {
|
|
37
|
+
[u]: !0,
|
|
39
38
|
[m]: !0,
|
|
40
|
-
[b]: !0,
|
|
41
|
-
[_]: !0,
|
|
42
39
|
[T]: !0,
|
|
40
|
+
[b]: !0,
|
|
41
|
+
[_]: !1,
|
|
43
42
|
[g]: !1,
|
|
44
|
-
[C]: !
|
|
45
|
-
|
|
46
|
-
}, h = `
|
|
43
|
+
[C]: !0
|
|
44
|
+
}, P = `
|
|
47
45
|
<tr>
|
|
48
46
|
<td class="spacer" style="height: 10px;"></td>
|
|
49
47
|
</tr>
|
|
50
|
-
`,
|
|
51
|
-
function
|
|
52
|
-
return !t || typeof t != "string" || t.trim() === "" ?
|
|
48
|
+
`, R = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
|
|
49
|
+
function $(t) {
|
|
50
|
+
return !t || typeof t != "string" || t.trim() === "" ? R : t.startsWith("http://") ? t.replace("http://", "https://") : t;
|
|
53
51
|
}
|
|
54
|
-
function
|
|
52
|
+
function h(t) {
|
|
55
53
|
return {
|
|
56
54
|
name: "Product Name",
|
|
57
|
-
image_url:
|
|
55
|
+
image_url: R,
|
|
58
56
|
price: { USD: 18 },
|
|
59
57
|
original_price: { USD: 20 },
|
|
60
58
|
discount: { USD: 2 },
|
|
@@ -66,13 +64,13 @@ function I(t) {
|
|
|
66
64
|
category: []
|
|
67
65
|
};
|
|
68
66
|
}
|
|
69
|
-
function
|
|
67
|
+
function w(t = 6) {
|
|
70
68
|
return Array.from(
|
|
71
69
|
{ length: t },
|
|
72
|
-
(e, n) =>
|
|
70
|
+
(e, n) => h(String(n + 1))
|
|
73
71
|
);
|
|
74
72
|
}
|
|
75
|
-
function
|
|
73
|
+
function N(t = "grid", e) {
|
|
76
74
|
const n = t === "list" ? `
|
|
77
75
|
data-layout="list"` : "", r = e ? ` ${e}` : "";
|
|
78
76
|
return `
|
|
@@ -110,7 +108,7 @@ function k(t = "grid", e) {
|
|
|
110
108
|
</table>
|
|
111
109
|
</td>
|
|
112
110
|
</tr>
|
|
113
|
-
${
|
|
111
|
+
${P}
|
|
114
112
|
<tr>
|
|
115
113
|
<td>
|
|
116
114
|
<table
|
|
@@ -149,17 +147,17 @@ function k(t = "grid", e) {
|
|
|
149
147
|
`;
|
|
150
148
|
}
|
|
151
149
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
150
|
+
y as CUSTOM_CELL_HTML,
|
|
151
|
+
S as DEFAULTS,
|
|
152
|
+
L as DEFAULT_CARD_COMPOSITION,
|
|
153
|
+
M as DEFAULT_CARD_VISIBILITY,
|
|
154
|
+
R as PLACEHOLDER_IMAGE,
|
|
155
|
+
E as buildElementRenderer,
|
|
156
|
+
N as createBlockTemplate,
|
|
157
|
+
w as getDefaultProducts,
|
|
158
|
+
f as isDefaultAttribute,
|
|
159
|
+
U as resolveProductAttrValue,
|
|
160
|
+
$ as sanitizeImageUrl,
|
|
161
|
+
P as spacer,
|
|
162
|
+
O as toDisplayName
|
|
165
163
|
};
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { safeParse as
|
|
2
|
-
const e =
|
|
1
|
+
import { safeParse as i, object as a, boolean as p, number as n, pipe as l, minLength as c, string as f } from "../../../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const e = l(f(), c(1)), o = a({
|
|
3
3
|
type: e,
|
|
4
4
|
attribute: e,
|
|
5
5
|
operator: e,
|
|
6
6
|
innerGroupOperator: e,
|
|
7
7
|
outerGroupOperator: e,
|
|
8
8
|
value: e,
|
|
9
|
-
filterGroup:
|
|
10
|
-
filterNumber:
|
|
11
|
-
isValid:
|
|
9
|
+
filterGroup: n(),
|
|
10
|
+
filterNumber: n(),
|
|
11
|
+
isValid: p()
|
|
12
12
|
});
|
|
13
|
-
function
|
|
14
|
-
return o
|
|
13
|
+
function b(t) {
|
|
14
|
+
return i(o, t).success;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const r = o
|
|
16
|
+
function g(t) {
|
|
17
|
+
const r = i(o, t);
|
|
18
18
|
return r.success ? /* @__PURE__ */ new Set() : new Set(
|
|
19
|
-
r.issues.flatMap((u) =>
|
|
20
|
-
var n;
|
|
21
|
-
return ((n = u.path) == null ? void 0 : n.map((a) => String(a.key))) ?? [];
|
|
22
|
-
})
|
|
19
|
+
r.issues.flatMap((s) => s.path?.map((u) => String(u.key)) ?? [])
|
|
23
20
|
);
|
|
24
21
|
}
|
|
25
22
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
o as FilterSchema,
|
|
24
|
+
g as getInvalidFilterFields,
|
|
25
|
+
b as isFilterValid
|
|
29
26
|
};
|
|
@@ -47,8 +47,7 @@ class B extends T {
|
|
|
47
47
|
}), this.valueChangeHandlers = [], this.currentNode = void 0, this.currentPages = void 0, this.currentPreviewIndex = 0, this.lastParsedAttribute = void 0;
|
|
48
48
|
}
|
|
49
49
|
get totalTemplates() {
|
|
50
|
-
|
|
51
|
-
return ((e = this.currentPages) == null ? void 0 : e.length) ?? 0;
|
|
50
|
+
return this.currentPages?.length ?? 0;
|
|
52
51
|
}
|
|
53
52
|
_listenToFormUpdates() {
|
|
54
53
|
this.valueChangeHandlers.push(
|
|
@@ -77,24 +76,23 @@ class B extends T {
|
|
|
77
76
|
await l().fetchTemplates(), this._updatePreview(), this._updateCounter();
|
|
78
77
|
}
|
|
79
78
|
_updatePreview() {
|
|
80
|
-
|
|
81
|
-
if ((e = this.currentPages) != null && e.length)
|
|
79
|
+
if (this.currentPages?.length)
|
|
82
80
|
try {
|
|
83
|
-
const
|
|
81
|
+
const e = this.currentPages[this.currentPreviewIndex], o = l().getThumbnailByTemplateId(e);
|
|
84
82
|
if (!o) {
|
|
85
|
-
console.warn("[UnsubscribeControl] No thumbnail found for page:",
|
|
83
|
+
console.warn("[UnsubscribeControl] No thumbnail found for page:", e);
|
|
86
84
|
return;
|
|
87
85
|
}
|
|
88
86
|
this.api.updateValues({
|
|
89
87
|
[r.PREVIEW_IMAGE]: o
|
|
90
88
|
});
|
|
91
|
-
} catch (
|
|
92
|
-
console.error("[UnsubscribeControl] Failed to update preview:",
|
|
89
|
+
} catch (e) {
|
|
90
|
+
console.error("[UnsubscribeControl] Failed to update preview:", e);
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
_updateCounter() {
|
|
96
|
-
const e = this.currentPreviewIndex + 1, t = this.totalTemplates,
|
|
97
|
-
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled,
|
|
94
|
+
const e = this.currentPreviewIndex + 1, t = this.totalTemplates, o = this.currentPreviewIndex === 0, c = this.currentPreviewIndex >= t - 1;
|
|
95
|
+
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, o), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, c), this.api.setUIEAttribute(
|
|
98
96
|
r.COUNTER_TEXT,
|
|
99
97
|
i.LABEL.text,
|
|
100
98
|
`${this.api.translate("Showing")} ${e} ${this.api.translate("of")} ${t}`
|
|
@@ -135,14 +133,14 @@ class B extends T {
|
|
|
135
133
|
</${n.LABEL}>
|
|
136
134
|
`;
|
|
137
135
|
}
|
|
138
|
-
_getIconButton(e, t,
|
|
139
|
-
const
|
|
136
|
+
_getIconButton(e, t, o) {
|
|
137
|
+
const c = o ? `${i.BUTTON.disabled}="true"` : "";
|
|
140
138
|
return `
|
|
141
139
|
<${n.BUTTON}
|
|
142
140
|
id="${e}"
|
|
143
141
|
class="flat-inline flat-white"
|
|
144
142
|
${i.BUTTON.name}="${e}"
|
|
145
|
-
${
|
|
143
|
+
${c}
|
|
146
144
|
>
|
|
147
145
|
<${n.ICON}
|
|
148
146
|
src="${t}"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { UIElement as
|
|
5
|
-
const
|
|
6
|
-
class
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var n = (s, e, i) => e in s ? r(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
|
|
3
|
+
var t = (s, e, i) => n(s, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
import { UIElement as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
const l = "unsubscribe-preview", E = "img", c = "Unsubscribe page preview", a = "is-loaded";
|
|
6
|
+
class u extends m {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
-
|
|
9
|
+
t(this, "imgElement");
|
|
10
10
|
}
|
|
11
11
|
getId() {
|
|
12
|
-
return
|
|
12
|
+
return l;
|
|
13
13
|
}
|
|
14
14
|
getTemplate() {
|
|
15
15
|
return `
|
|
@@ -17,28 +17,26 @@ class d extends l {
|
|
|
17
17
|
<div class="unsubscribe-preview-loader"></div>
|
|
18
18
|
<img
|
|
19
19
|
src=""
|
|
20
|
-
alt="${
|
|
20
|
+
alt="${c}"
|
|
21
21
|
class="unsubscribe-preview-image"
|
|
22
22
|
/>
|
|
23
23
|
</div>
|
|
24
24
|
`;
|
|
25
25
|
}
|
|
26
|
-
onRender(
|
|
27
|
-
this.imgElement =
|
|
26
|
+
onRender(i) {
|
|
27
|
+
this.imgElement = i.querySelector(E);
|
|
28
28
|
}
|
|
29
|
-
setValue(
|
|
30
|
-
|
|
31
|
-
this.imgElement && (this.imgElement.src = e, (t = this.imgElement.parentElement) == null || t.classList.add(g));
|
|
29
|
+
setValue(i) {
|
|
30
|
+
this.imgElement && (this.imgElement.src = i, this.imgElement.parentElement?.classList.add(a));
|
|
32
31
|
}
|
|
33
32
|
getValue() {
|
|
34
|
-
|
|
35
|
-
return ((e = this.imgElement) == null ? void 0 : e.src) ?? "";
|
|
33
|
+
return this.imgElement?.src ?? "";
|
|
36
34
|
}
|
|
37
35
|
onDestroy() {
|
|
38
36
|
this.imgElement = void 0;
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
l as PREVIEW_UI_ELEMENT_ID,
|
|
41
|
+
u as PreviewUIElement
|
|
44
42
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (
|
|
3
|
-
var
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var i = (a, E, e) => E in a ? T(a, E, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[E] = e;
|
|
3
|
+
var c = (a, E, e) => i(a, typeof E != "symbol" ? E + "" : E, e);
|
|
4
4
|
import { Control as I, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
class d extends I {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
c(this, "currentNode");
|
|
9
|
+
c(this, "lastBlockInstanceId", null);
|
|
10
10
|
}
|
|
11
11
|
getContainer() {
|
|
12
|
-
|
|
13
|
-
return (e = document.querySelector("ui-editor")) == null ? void 0 : e.shadowRoot;
|
|
12
|
+
return document.querySelector("ui-editor")?.shadowRoot;
|
|
14
13
|
}
|
|
15
14
|
onTemplateNodeUpdated(e) {
|
|
16
15
|
this.currentNode = e;
|
|
@@ -91,7 +90,7 @@ class d extends I {
|
|
|
91
90
|
* and combines it with the text in Stripo's alert-message layout.
|
|
92
91
|
*/
|
|
93
92
|
_setInfoMessageValue(e, t) {
|
|
94
|
-
const o = this.getContainer(),
|
|
93
|
+
const o = this.getContainer(), l = o.querySelector(`[data-icon-key="${e}"]`)?.querySelector("ue-icon-component")?.outerHTML ?? "";
|
|
95
94
|
this.api.setUIEAttribute(
|
|
96
95
|
e,
|
|
97
96
|
"value",
|
|
@@ -104,8 +103,8 @@ class d extends I {
|
|
|
104
103
|
</div>
|
|
105
104
|
`
|
|
106
105
|
);
|
|
107
|
-
const
|
|
108
|
-
|
|
106
|
+
const u = o.querySelector(`[data-info-message="${e}"]`);
|
|
107
|
+
u && (u.style.display = "");
|
|
109
108
|
}
|
|
110
109
|
_GuToggle(e) {
|
|
111
110
|
return `
|
|
@@ -121,33 +120,33 @@ class d extends I {
|
|
|
121
120
|
${$.SELECT_ITEM.value}="${t}">
|
|
122
121
|
</${n.SELECT_ITEM}>`;
|
|
123
122
|
}
|
|
124
|
-
_GuSelect({ name: e, placeholder: t, options: o, className:
|
|
123
|
+
_GuSelect({ name: e, placeholder: t, options: o, className: r = "es-180w" }) {
|
|
125
124
|
return `
|
|
126
125
|
<${n.SELECTPICKER}
|
|
127
|
-
class="${
|
|
126
|
+
class="${r}"
|
|
128
127
|
${$.SELECTPICKER.name}="${e}"
|
|
129
128
|
${$.SELECTPICKER.placeholder}="${t}">
|
|
130
|
-
${o.map((
|
|
129
|
+
${o.map((s) => this._GuSelectItem(s)).join("")}
|
|
131
130
|
</${n.SELECTPICKER}>
|
|
132
131
|
`;
|
|
133
132
|
}
|
|
134
|
-
_GuTextInput({ name: e, placeholder: t, className: o = "", disabled:
|
|
133
|
+
_GuTextInput({ name: e, placeholder: t, className: o = "", disabled: r = !1 }) {
|
|
135
134
|
return `
|
|
136
135
|
<${n.TEXT}
|
|
137
136
|
class=${o}
|
|
138
137
|
${$.TEXT.name}="${e}"
|
|
139
138
|
placeholder="${t || e}"
|
|
140
|
-
${
|
|
139
|
+
${r ? `${$.TEXT.disabled}="true"` : ""}>
|
|
141
140
|
</${n.TEXT}>
|
|
142
141
|
`;
|
|
143
142
|
}
|
|
144
|
-
_GuCounter({ name: e, maxValue: t, minValue: o = 1, step:
|
|
143
|
+
_GuCounter({ name: e, maxValue: t, minValue: o = 1, step: r = 1 }) {
|
|
145
144
|
return `
|
|
146
145
|
<${n.COUNTER}
|
|
147
146
|
${$.COUNTER.name}="${e}"
|
|
148
147
|
${$.COUNTER.minValue}="${o}"
|
|
149
148
|
${$.COUNTER.maxValue}="${t}"
|
|
150
|
-
${$.COUNTER.step}="${
|
|
149
|
+
${$.COUNTER.step}="${r}">
|
|
151
150
|
</${n.COUNTER}>
|
|
152
151
|
`;
|
|
153
152
|
}
|
|
@@ -165,7 +164,7 @@ class d extends I {
|
|
|
165
164
|
<${n.RADIO_BUTTONS}
|
|
166
165
|
${o ? `id="${o}"` : ""}
|
|
167
166
|
${$.RADIO_BUTTONS.name}="${e}">
|
|
168
|
-
${t.map((
|
|
167
|
+
${t.map((r) => this._GuRadioButtonItem(r)).join("")}
|
|
169
168
|
</${n.RADIO_BUTTONS}>
|
|
170
169
|
`;
|
|
171
170
|
}
|
|
@@ -223,17 +222,17 @@ class d extends I {
|
|
|
223
222
|
*/
|
|
224
223
|
_GuOrderable(e, t) {
|
|
225
224
|
let o = "";
|
|
226
|
-
t.forEach((
|
|
225
|
+
t.forEach((s) => {
|
|
227
226
|
const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
|
|
228
227
|
o += `
|
|
229
|
-
<${n.ORDERABLE_ITEM} ${l}="${
|
|
230
|
-
${
|
|
228
|
+
<${n.ORDERABLE_ITEM} ${l}="${s.key}">
|
|
229
|
+
${s.content}
|
|
231
230
|
</${n.ORDERABLE_ITEM}>
|
|
232
231
|
`;
|
|
233
232
|
});
|
|
234
|
-
const
|
|
233
|
+
const r = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
|
|
235
234
|
return `
|
|
236
|
-
<${n.ORDERABLE} ${
|
|
235
|
+
<${n.ORDERABLE} ${r}="${e}">
|
|
237
236
|
${o}
|
|
238
237
|
</${n.ORDERABLE}>
|
|
239
238
|
`;
|
|
@@ -275,10 +274,10 @@ class d extends I {
|
|
|
275
274
|
`;
|
|
276
275
|
}
|
|
277
276
|
_GuRadioButtons(e, t) {
|
|
278
|
-
const o = t.map((
|
|
277
|
+
const o = t.map((r) => `
|
|
279
278
|
<${n.RADIO_ITEM}
|
|
280
|
-
${$.RADIO_ITEM.text}="${
|
|
281
|
-
${$.RADIO_ITEM.value}="${
|
|
279
|
+
${$.RADIO_ITEM.text}="${r.text}"
|
|
280
|
+
${$.RADIO_ITEM.value}="${r.value}">
|
|
282
281
|
</${n.RADIO_ITEM}>
|
|
283
282
|
`).join("");
|
|
284
283
|
return `
|