@useinsider/guido 3.9.0-beta.93e438c → 3.9.0-beta.978f9ce
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/config/migrator/itemsBlockMigrator.js +159 -114
- package/dist/extensions/Blocks/Items/block.js +57 -37
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +17 -18
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +67 -78
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +13 -9
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +26 -14
- package/dist/extensions/Blocks/Items/template.js +245 -247
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +53 -45
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +33 -25
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +62 -4
- package/dist/extensions/Blocks/common-control.js +58 -45
- package/dist/src/extensions/Blocks/Items/block.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +7 -0
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +2 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +7 -0
- package/package.json +1 -1
|
@@ -40,6 +40,18 @@ export declare function generateBlockInstanceId(): string;
|
|
|
40
40
|
* Prevents currency symbols like "$", "R$", "HK$" from being interpreted as special replacement patterns.
|
|
41
41
|
*/
|
|
42
42
|
export declare const escapeReplacement: (str: string) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Derives a card's 1-based product index from its `itemsSelectValue`.
|
|
45
|
+
* Prefers the position within ItemInCartOptions for the type; falls back to the
|
|
46
|
+
* `(N)` token in the value (e.g. "{{Browsed Item (3) Url}}" -> "3"); defaults to "1".
|
|
47
|
+
*
|
|
48
|
+
* Single source of truth so block.ts, settingsControl and template.ts stay in sync —
|
|
49
|
+
* the number feeds `data-number`, which pairProductVariables reads to index merge tags.
|
|
50
|
+
*
|
|
51
|
+
* `itemsSelectValue` is typed loosely because callers pass it straight from parsed
|
|
52
|
+
* configs where the field can be absent — the runtime guard below is load-bearing.
|
|
53
|
+
*/
|
|
54
|
+
export declare function deriveItemNumber(itemsSelectValue: string | undefined, itemsType: ProductType): string;
|
|
43
55
|
/**
|
|
44
56
|
* Returns default ItemsBlockConfig values.
|
|
45
57
|
* These are used when initializing a new block or when migrating from legacy format.
|
|
@@ -21,9 +21,10 @@ export declare class AlgorithmControl extends CommonControl {
|
|
|
21
21
|
onRender(): void;
|
|
22
22
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
23
23
|
_setFormValues(): void;
|
|
24
|
+
_clearProductIdsDraft(): void;
|
|
24
25
|
_initializeSelectItems(): void;
|
|
25
26
|
_setProductIdsVisibility(strategy?: string): void;
|
|
26
27
|
_onAlgorithmChange(value: string): void;
|
|
27
|
-
_onProductIdsChange(value: string): void;
|
|
28
|
+
_onProductIdsChange(value: string[]): void;
|
|
28
29
|
_listenToFormUpdates(): void;
|
|
29
30
|
}
|
|
@@ -6,6 +6,12 @@ interface TextInputProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
+
interface MultiSelectProps {
|
|
10
|
+
name: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
9
15
|
interface LabelProps {
|
|
10
16
|
text: string;
|
|
11
17
|
name?: string;
|
|
@@ -145,5 +151,6 @@ export declare abstract class CommonControl extends Control {
|
|
|
145
151
|
value: string;
|
|
146
152
|
}[]): string;
|
|
147
153
|
_GuCheckbox(name: string, caption: string): string;
|
|
154
|
+
_GuMultiSelect({ name, placeholder, className, disabled }: MultiSelectProps): string;
|
|
148
155
|
}
|
|
149
156
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.9.0-beta.
|
|
3
|
+
"version": "3.9.0-beta.978f9ce",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|