@useinsider/guido 1.0.3-beta.c2cbb62 → 1.0.3-beta.c4d9021
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/README.md +0 -3
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
- package/dist/composables/useActionsApi.js +1 -1
- package/dist/composables/useBlocksConfig.js +2 -1
- package/dist/composables/useHtmlCompiler.js +13 -15
- package/dist/composables/useHtmlValidator.js +35 -36
- package/dist/composables/useStripo.js +28 -32
- package/dist/enums/extensions/recommendationBlock.js +2 -2
- package/dist/enums/onboarding.js +3 -7
- package/dist/extensions/Blocks/Checkbox/block.js +2 -5
- package/dist/extensions/Blocks/Checkbox/control.js +14 -15
- package/dist/extensions/Blocks/Checkbox/template.js +9 -14
- package/dist/extensions/Blocks/RadioButton/block.js +2 -5
- package/dist/extensions/Blocks/RadioButton/control.js +17 -18
- package/dist/extensions/Blocks/RadioButton/template.js +9 -18
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +43 -43
- package/dist/extensions/Blocks/Unsubscribe/block.js +41 -45
- package/dist/extensions/Blocks/common-control.js +110 -174
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +168 -213
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
- package/dist/node_modules/lodash-es/keysIn.js +3 -3
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +19 -13
- package/dist/src/enums/onboarding.d.ts +0 -4
- package/dist/src/extensions/Blocks/Checkbox/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/RadioButton/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +4 -3
- package/dist/src/extensions/Blocks/common-control.d.ts +7 -44
- package/dist/src/stores/onboarding.d.ts +0 -334
- package/dist/static/styles/customEditorStyle.css.js +1 -1
- package/dist/stores/onboarding.js +12 -20
- package/dist/utils/genericUtil.js +17 -16
- package/package.json +4 -6
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
- package/dist/config/compiler/itemsCompilerRules.js +0 -14
- package/dist/extensions/Blocks/Items/block.js +0 -67
- package/dist/extensions/Blocks/Items/controls/button/link.js +0 -68
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +0 -193
- package/dist/extensions/Blocks/Items/controls/image/link.js +0 -68
- package/dist/extensions/Blocks/Items/controls/index.js +0 -217
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +0 -70
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +0 -107
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +0 -123
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +0 -76
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +0 -61
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +0 -92
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +0 -316
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +0 -5
- package/dist/extensions/Blocks/Items/enums/productEnums.js +0 -274
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -77
- package/dist/extensions/Blocks/Items/extension.js +0 -20
- package/dist/extensions/Blocks/Items/iconsRegistry.js +0 -32
- package/dist/extensions/Blocks/Items/items.css.js +0 -23
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -62
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -72
- package/dist/extensions/Blocks/Items/settingsPanel.js +0 -132
- package/dist/extensions/Blocks/Items/store/items-block.js +0 -75
- package/dist/extensions/Blocks/Items/template.js +0 -195
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/extensions/Blocks/controlFactories.js +0 -223
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- 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/_WeakMap.js +0 -6
- package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
- 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/_baseEach.js +0 -6
- package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
- 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/_baseHasIn.js +0 -6
- 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/_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/_baseToString.js +0 -18
- package/dist/node_modules/lodash-es/_baseTrim.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/_createBaseEach.js +0 -15
- 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/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- 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/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/lodash-es/_isKey.js +0 -12
- package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
- 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/_nativeKeys.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/_stringToPath.js +0 -10
- package/dist/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- 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/isSymbol.js +0 -9
- 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/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/toFinite.js +0 -14
- package/dist/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/node_modules/lodash-es/toString.js +0 -7
- package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
- package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -27
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -14
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -33
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -14
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +0 -501
- package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -14
- package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -19
- package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -21
- package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -14
- package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -13
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -15
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -48
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -62
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -163
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -43
- package/dist/src/extensions/Blocks/Items/template.d.ts +0 -24
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
- package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -312
- package/dist/src/utils/pairProductVariables.d.ts +0 -7
- package/dist/utils/pairProductVariables.js +0 -136
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reusable Control Factory Functions
|
|
3
|
-
*
|
|
4
|
-
* These factory functions can be used by any extension block to generate
|
|
5
|
-
* controls dynamically, reducing code duplication across the codebase.
|
|
6
|
-
*
|
|
7
|
-
* Note: TypeScript's type inference has limitations with dynamically generated classes.
|
|
8
|
-
* The eslint-disable comment above suppresses warnings that would otherwise require
|
|
9
|
-
* extensive type assertions throughout the file. The generated controls are type-safe
|
|
10
|
-
* at runtime and follow the exact same patterns as manually-written control classes.
|
|
11
|
-
*/
|
|
12
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
13
|
-
/**
|
|
14
|
-
* Factory function to create text align controls for different block elements
|
|
15
|
-
*/
|
|
16
|
-
export declare function createTextAlignControl(controlId: string, targetBlockId: string, containerSelector: string): {
|
|
17
|
-
new (): {
|
|
18
|
-
getId(): string;
|
|
19
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
20
|
-
getParentControlId(): string;
|
|
21
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
22
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
23
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
24
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
25
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Factory function to create text color controls for different block elements
|
|
30
|
-
*/
|
|
31
|
-
export declare function createTextColorControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
32
|
-
new (): {
|
|
33
|
-
getId(): string;
|
|
34
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
35
|
-
getParentControlId(): string;
|
|
36
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
37
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
38
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
39
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
40
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Factory function to create text size controls for different block elements
|
|
45
|
-
*/
|
|
46
|
-
export declare function createTextSizeControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
47
|
-
new (): {
|
|
48
|
-
getId(): string;
|
|
49
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
50
|
-
getParentControlId(): string;
|
|
51
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
52
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
53
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
54
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
55
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Factory function to create text style controls for different block elements
|
|
60
|
-
*/
|
|
61
|
-
export declare function createTextStyleControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
62
|
-
new (): {
|
|
63
|
-
getId(): string;
|
|
64
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
65
|
-
getParentControlId(): string;
|
|
66
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
67
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
68
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
69
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
70
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Factory function to create text font family controls for different block elements
|
|
75
|
-
*/
|
|
76
|
-
export declare function createTextFontFamilyControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
77
|
-
new (): {
|
|
78
|
-
getId(): string;
|
|
79
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
80
|
-
getParentControlId(): string;
|
|
81
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
82
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
83
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
84
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
85
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Factory function to create text background color controls for different block elements
|
|
90
|
-
*/
|
|
91
|
-
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
92
|
-
new (): {
|
|
93
|
-
getId(): string;
|
|
94
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
95
|
-
getParentControlId(): string;
|
|
96
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
97
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
98
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
99
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
100
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* Factory function to create paddings controls for different block elements
|
|
105
|
-
*/
|
|
106
|
-
export declare function createPaddingsControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
107
|
-
new (): {
|
|
108
|
-
getId(): string;
|
|
109
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
110
|
-
getParentControlId(): string;
|
|
111
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
112
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
113
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
114
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
115
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Factory function to create button align controls for different block elements
|
|
120
|
-
*/
|
|
121
|
-
export declare function createButtonAlignControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
122
|
-
new (): {
|
|
123
|
-
getId(): string;
|
|
124
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
125
|
-
getParentControlId(): string;
|
|
126
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
127
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
128
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
129
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
130
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* Factory function to create button color controls for different block elements
|
|
135
|
-
*/
|
|
136
|
-
export declare function createButtonColorControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
137
|
-
new (): {
|
|
138
|
-
getId(): string;
|
|
139
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
140
|
-
getParentControlId(): string;
|
|
141
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
142
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
143
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
144
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
145
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Factory function to create button border controls for different block elements
|
|
150
|
-
*/
|
|
151
|
-
export declare function createButtonBorderControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
152
|
-
new (): {
|
|
153
|
-
getId(): string;
|
|
154
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
155
|
-
getParentControlId(): string;
|
|
156
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonBorderControlLabels | undefined;
|
|
157
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
158
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
159
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
160
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Factory function to create button border radius controls for different block elements
|
|
165
|
-
*/
|
|
166
|
-
export declare function createButtonBorderRadiusControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
167
|
-
new (): {
|
|
168
|
-
getId(): string;
|
|
169
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
170
|
-
getParentControlId(): string;
|
|
171
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonBorderRadiusControlLabels | undefined;
|
|
172
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
173
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
174
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
175
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Factory function to create button font family controls for different block elements
|
|
180
|
-
*/
|
|
181
|
-
export declare function createButtonFontFamilyControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
182
|
-
new (): {
|
|
183
|
-
getId(): string;
|
|
184
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
185
|
-
getParentControlId(): string;
|
|
186
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
187
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
188
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
189
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
190
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Factory function to create button margins controls for different block elements
|
|
195
|
-
*/
|
|
196
|
-
export declare function createButtonMarginsControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
197
|
-
new (): {
|
|
198
|
-
getId(): string;
|
|
199
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
200
|
-
getParentControlId(): string;
|
|
201
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
202
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
203
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
204
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
205
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
/**
|
|
209
|
-
* Factory function to create button paddings controls for different block elements
|
|
210
|
-
*/
|
|
211
|
-
export declare function createButtonPaddingsControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
212
|
-
new (): {
|
|
213
|
-
getId(): string;
|
|
214
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
215
|
-
getParentControlId(): string;
|
|
216
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
217
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
218
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
219
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
220
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* Factory function to create button text controls for different block elements
|
|
225
|
-
*/
|
|
226
|
-
export declare function createButtonTextControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
227
|
-
new (): {
|
|
228
|
-
getId(): string;
|
|
229
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
230
|
-
getParentControlId(): string;
|
|
231
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
232
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
233
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
234
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
235
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Factory function to create button text size controls for different block elements
|
|
240
|
-
*/
|
|
241
|
-
export declare function createButtonTextSizeControl(controlId: string, targetBlockId: string, containerSelector?: string): {
|
|
242
|
-
new (): {
|
|
243
|
-
getId(): string;
|
|
244
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
245
|
-
getParentControlId(): string;
|
|
246
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
247
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
248
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
249
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
250
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
/**
|
|
254
|
-
* Factory function to create button text style and font color controls for different block elements
|
|
255
|
-
*/
|
|
256
|
-
export declare function createButtonTextStyleAndFontColorControl(controlId: string, targetBlockId: string, containerSelector: string): {
|
|
257
|
-
new (): {
|
|
258
|
-
getId(): string;
|
|
259
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
260
|
-
getParentControlId(): string;
|
|
261
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
|
|
262
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
263
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
264
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
265
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* Factory function to create button fit to container controls for different block elements
|
|
270
|
-
*/
|
|
271
|
-
export declare function createButtonFitToContainerControl(controlId: string, targetBlockId: string, containerSelector: string): {
|
|
272
|
-
new (): {
|
|
273
|
-
getId(): string;
|
|
274
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
275
|
-
getParentControlId(): string;
|
|
276
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
277
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
278
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
279
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
280
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Factory function to create image size controls for different block elements
|
|
285
|
-
*/
|
|
286
|
-
export declare function createImageSizeControl(controlId: string, targetBlockId: string, containerSelector: string): {
|
|
287
|
-
new (): {
|
|
288
|
-
getId(): string;
|
|
289
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
290
|
-
getParentControlId(): string;
|
|
291
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
292
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
293
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
294
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
295
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
/**
|
|
299
|
-
* Factory function to create image margins controls for different block elements
|
|
300
|
-
*/
|
|
301
|
-
export declare function createImageMarginsControl(controlId: string, targetBlockId: string, containerSelector: string): {
|
|
302
|
-
new (): {
|
|
303
|
-
getId(): string;
|
|
304
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
305
|
-
getParentControlId(): string;
|
|
306
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
307
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
308
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
309
|
-
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
310
|
-
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
311
|
-
};
|
|
312
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transforms product-related HTML elements from default/dummy values to template variables.
|
|
3
|
-
* This method is called before saving email templates to ensure product data is properly templated.
|
|
4
|
-
* @param html - The HTML string containing product elements
|
|
5
|
-
* @returns The transformed HTML with template variables
|
|
6
|
-
*/
|
|
7
|
-
export declare function pairProductVariables(html: string): string;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { productPairs as w } from "../extensions/Blocks/Items/enums/productEnums.js";
|
|
2
|
-
function M(H) {
|
|
3
|
-
const m = H.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), $ = new DOMParser().parseFromString(m, "text/html"), C = w.PAIRS_FOR_EXTENSION;
|
|
4
|
-
Object.entries(C).forEach(([n, d]) => {
|
|
5
|
-
$.querySelectorAll(".ins-product-td").forEach((o) => {
|
|
6
|
-
const h = o.getAttribute("data-number") || "1", _ = o.getAttribute("data-type") || "CART_ITEMS";
|
|
7
|
-
o.querySelectorAll(`[product-attr="${n}"]`).forEach((e) => {
|
|
8
|
-
var y;
|
|
9
|
-
const b = e.getAttribute("data-type") || _, u = e.getAttribute("data-number") || h, p = d[b];
|
|
10
|
-
if (p)
|
|
11
|
-
switch (n) {
|
|
12
|
-
case "imageSrc": {
|
|
13
|
-
let t = null, i = null;
|
|
14
|
-
if (e.tagName === "IMG" ? (t = e, i = t.closest("a")) : (t = e.querySelector("img"), i = e.querySelector("a") || e.closest("a")), !t)
|
|
15
|
-
break;
|
|
16
|
-
const c = p.DEFAULT, a = p.ATTR;
|
|
17
|
-
if (c && t.src) {
|
|
18
|
-
const r = t.src;
|
|
19
|
-
c.some((l) => {
|
|
20
|
-
const s = l.split("/").pop() || "", F = r.split("/").pop() || "";
|
|
21
|
-
return r.includes(l) || r.includes(s) || F === s;
|
|
22
|
-
}) && (t.src = `{{${a}_${u}}}`);
|
|
23
|
-
}
|
|
24
|
-
if (i) {
|
|
25
|
-
const r = (y = C.itemLink) == null ? void 0 : y[b];
|
|
26
|
-
if (r) {
|
|
27
|
-
const f = r.HREF, l = r.DEFAULT_HREF || "#!", s = i.href;
|
|
28
|
-
(s === "#" || s === "" || s.endsWith("#!") || s.endsWith(l) || s === `${window.location.href}${l}` || !s || s === window.location.href) && (i.href = `{{${f}_${u}}}`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
case "name": {
|
|
34
|
-
const t = p, i = t.ATTR, c = t.DEFAULT_HREF || "#!", a = t.HREF;
|
|
35
|
-
e.textContent && (e.textContent = `{{${i}_${u}}}`);
|
|
36
|
-
const r = e.closest("a") || (e.tagName === "A" ? e : null);
|
|
37
|
-
if (r && a) {
|
|
38
|
-
const f = r.href, l = `${window.location.href}${c}`;
|
|
39
|
-
(f === l || f.endsWith(c)) && (r.href = `{{${a}_${u}}}`);
|
|
40
|
-
}
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
case "price":
|
|
44
|
-
case "originalPrice": {
|
|
45
|
-
const t = p, c = e.getAttribute("data-formated") === "true", a = e.getAttribute("data-curency") || "before", r = c ? t.PRICE_FORMATTED : t.PRICE, f = t.CURRENCY;
|
|
46
|
-
let l = `{{${r}_${u}}}`;
|
|
47
|
-
if (f) {
|
|
48
|
-
const s = `{{${f}_${u}}}`;
|
|
49
|
-
l = a === "after" ? `${l} ${s}` : `${s} ${l}`;
|
|
50
|
-
}
|
|
51
|
-
e.textContent = l;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
case "quantity": {
|
|
55
|
-
const t = p, i = t.ATTR, c = t.DEFAULT;
|
|
56
|
-
e.textContent && e.textContent.trim() === c && (e.textContent = `{{${i}_${u}}}`);
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
case "button": {
|
|
60
|
-
const t = p, i = t.HREF, c = t.DEFAULT_HREF || "#!", a = e.tagName === "A" ? e : e.querySelector("a");
|
|
61
|
-
if (a) {
|
|
62
|
-
const r = a.href || "", f = `${window.location.href}${c}`;
|
|
63
|
-
(r === "" || r === "#" || r === f || r.endsWith(c) || r.endsWith("#!") || r === window.location.href) && (a.href = `{{${i}_${u}}}`);
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
case "itemLink": {
|
|
68
|
-
const t = p, i = t.HREF, c = t.DEFAULT_HREF || "#!", a = e;
|
|
69
|
-
if (a.href) {
|
|
70
|
-
const r = a.href, f = `${window.location.href}${c}`;
|
|
71
|
-
(r === f || r.endsWith(c)) && (a.href = `{{${i}_${u}}}`);
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
default: {
|
|
76
|
-
if ("ATTR" in p) {
|
|
77
|
-
const t = p.ATTR;
|
|
78
|
-
e.textContent && (e.textContent = `{{${t}_${u}}}`);
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
const S = $.querySelectorAll(".ins-product-td"), R = [];
|
|
87
|
-
S.forEach((n) => {
|
|
88
|
-
const d = n.getAttribute("data-type") || "CART_ITEMS", A = n.getAttribute("data-number") || "1", o = n.getAttribute("data-nodup"), h = n.outerHTML;
|
|
89
|
-
R.push({
|
|
90
|
-
element: n,
|
|
91
|
-
outerHtml: h,
|
|
92
|
-
type: d,
|
|
93
|
-
number: A,
|
|
94
|
-
nodup: o || void 0
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
let E = $.body.innerHTML;
|
|
98
|
-
R.reverse().forEach(({ outerHtml: n, type: d, number: A }) => {
|
|
99
|
-
let o = "";
|
|
100
|
-
switch (d) {
|
|
101
|
-
case "CART_ITEMS":
|
|
102
|
-
o = "ins_apr_total_product_kind";
|
|
103
|
-
break;
|
|
104
|
-
case "BROWSED_ITEMS":
|
|
105
|
-
o = "browsed_item_total_product_kind";
|
|
106
|
-
break;
|
|
107
|
-
case "PURCHASED_ITEMS":
|
|
108
|
-
o = "purchased_item_total_product_kind";
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
if (o) {
|
|
112
|
-
const _ = parseInt(A) - 1, b = `${`{% if ${o} > ${_} %}`}${n}{% endif %}`;
|
|
113
|
-
E = E.replace(n, b);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
const k = $.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), T = [];
|
|
117
|
-
return k.forEach((n) => {
|
|
118
|
-
const d = n.getAttribute("data-number"), A = n.getAttribute("data-type");
|
|
119
|
-
if (!d || A !== "CART_ITEMS")
|
|
120
|
-
return;
|
|
121
|
-
const o = n.closest(".product-original-price-class");
|
|
122
|
-
if (o) {
|
|
123
|
-
const h = o.outerHTML;
|
|
124
|
-
T.some((g) => g.tdOuterHtml === h) || T.push({ tdOuterHtml: h, number: d });
|
|
125
|
-
}
|
|
126
|
-
}), T.reverse().forEach(({ tdOuterHtml: n, number: d }) => {
|
|
127
|
-
const A = `{% if ins_apr_price_${d} != ins_apr_originalprice_${d} %}`;
|
|
128
|
-
if (!E.includes(A) && !n.includes("{% if")) {
|
|
129
|
-
const h = `${A}${n}{% endif %}`;
|
|
130
|
-
E = E.replace(n, h);
|
|
131
|
-
}
|
|
132
|
-
}), E.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
133
|
-
}
|
|
134
|
-
export {
|
|
135
|
-
M as pairProductVariables
|
|
136
|
-
};
|