@useinsider/guido 2.1.0-beta.a720424 → 2.1.0-beta.acbfaec
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 +45 -0
- package/dist/@types/config/schemas.js +58 -54
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +71 -60
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/composables/useActionsApi.js +15 -13
- package/dist/composables/useBlocksConfig.js +29 -20
- package/dist/config/migrator/itemsBlockMigrator.js +140 -123
- package/dist/enums/defaults.js +9 -4
- package/dist/extensions/Blocks/Items/block.js +19 -28
- package/dist/extensions/Blocks/Items/controls/button/link.js +19 -31
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +124 -85
- package/dist/extensions/Blocks/Items/controls/image/link.js +19 -31
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +28 -40
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +35 -47
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +49 -54
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +42 -51
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +23 -36
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +45 -57
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +42 -60
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +189 -196
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -2
- package/dist/extensions/Blocks/Items/extension.js +8 -9
- package/dist/extensions/Blocks/Items/settingsPanel.js +10 -15
- package/dist/extensions/Blocks/Items/template.js +181 -175
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +65 -65
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +3 -3
- package/dist/extensions/Blocks/common-control.js +91 -92
- package/dist/extensions/ModulesTabIcons/extension.js +16 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +163 -95
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/enums/defaults.d.ts +5 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +5 -5
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +0 -5
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +10 -12
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +2 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +4 -5
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/package.json +2 -2
- package/dist/extensions/Blocks/Items/store/items-block.js +0 -79
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -45
|
@@ -3,7 +3,6 @@ import { CommonControl } from '../../../common-control';
|
|
|
3
3
|
import { ItemsBlockControlId } from '../../enums/controlEnums';
|
|
4
4
|
export declare const CONTROL_BLOCK_ID = ItemsBlockControlId.PRICE_HIDE_DISCOUNT;
|
|
5
5
|
export declare class PriceHideDiscountControl extends CommonControl {
|
|
6
|
-
private store;
|
|
7
6
|
getId(): string;
|
|
8
7
|
getTemplate(): string;
|
|
9
8
|
onRender(): void;
|
|
@@ -3,7 +3,6 @@ import { CommonControl } from '../../../common-control';
|
|
|
3
3
|
import { ItemsBlockControlId } from '../../enums/controlEnums';
|
|
4
4
|
export declare const CONTROL_BLOCK_ID = ItemsBlockControlId.PRICE_ORIENTATION;
|
|
5
5
|
export declare class PriceOrientationControl extends CommonControl {
|
|
6
|
-
private store;
|
|
7
6
|
getId(): string;
|
|
8
7
|
getTemplate(): string;
|
|
9
8
|
onRender(): void;
|
|
@@ -3,15 +3,10 @@ import { CommonControl } from '../../../common-control';
|
|
|
3
3
|
import { ItemsBlockControlId } from '../../enums/controlEnums';
|
|
4
4
|
export declare const CONTROL_BLOCK_ID = ItemsBlockControlId.PRICE_SINGLE_PRICE;
|
|
5
5
|
export declare class PriceSinglePriceControl extends CommonControl {
|
|
6
|
-
private store;
|
|
7
6
|
getId(): string;
|
|
8
7
|
getTemplate(): string;
|
|
9
8
|
onRender(): void;
|
|
10
9
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
/**
|
|
12
|
-
* Syncs single price state from nodeConfig.
|
|
13
|
-
*/
|
|
14
|
-
private _syncSinglePriceFromNodeConfig;
|
|
15
10
|
_onSinglePriceChange(value: boolean): void;
|
|
16
11
|
private _updatePriceBlock;
|
|
17
12
|
_getSinglePrice(): string;
|
|
@@ -3,12 +3,10 @@ import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
|
3
3
|
import { CommonControl } from '../../common-control';
|
|
4
4
|
export declare const CONTROL_BLOCK_ID = "ui-elements-items-block";
|
|
5
5
|
export declare class ItemsBlockControl extends CommonControl {
|
|
6
|
-
private store;
|
|
7
6
|
getId(): string;
|
|
8
7
|
getTemplate(): string;
|
|
9
8
|
onRender(): void;
|
|
10
9
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
onDestroy(): void;
|
|
12
10
|
_getItemsType(): string;
|
|
13
11
|
_getOrientation(): string;
|
|
14
12
|
_getItemInCart(): string;
|
|
@@ -18,7 +16,7 @@ export declare class ItemsBlockControl extends CommonControl {
|
|
|
18
16
|
_initializeSelectItems(): void;
|
|
19
17
|
_listenToFormUpdates(): void;
|
|
20
18
|
_renderTemplate(): void;
|
|
21
|
-
_getTemplateData(): {
|
|
19
|
+
_getTemplateData(itemsTypeOverride?: ProductType, itemIdOverride?: string): {
|
|
22
20
|
imageSrc: string;
|
|
23
21
|
name: string;
|
|
24
22
|
price: string;
|
|
@@ -26,15 +24,15 @@ export declare class ItemsBlockControl extends CommonControl {
|
|
|
26
24
|
quantity: string;
|
|
27
25
|
button: string;
|
|
28
26
|
};
|
|
29
|
-
_updateImageSrc(imageSrc: string): void;
|
|
30
|
-
_updateName(name: string): void;
|
|
31
|
-
_updatePrice(price: string): void;
|
|
32
|
-
_updateOriginalPrice(originalPrice: string): void;
|
|
33
|
-
_updateQuantity(quantity: string): void;
|
|
34
|
-
_reOrderTemplate(): void;
|
|
35
|
-
_updateDataTypeAttributes(itemsType: ProductType): void;
|
|
36
|
-
_updateDataNumberAttributes(itemId: string): void;
|
|
37
|
-
_reFillTemplate(): void;
|
|
27
|
+
_updateImageSrc(imageSrc: string, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
28
|
+
_updateName(name: string, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
29
|
+
_updatePrice(price: string, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
30
|
+
_updateOriginalPrice(originalPrice: string, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
31
|
+
_updateQuantity(quantity: string, itemsTypeOverride: ProductType | undefined, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
32
|
+
_reOrderTemplate(modifier?: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
33
|
+
_updateDataTypeAttributes(itemsType: ProductType, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
34
|
+
_updateDataNumberAttributes(itemId: string, modifier: ReturnType<typeof this.api.getDocumentModifier>): void;
|
|
35
|
+
_reFillTemplate(itemsType?: ProductType): void;
|
|
38
36
|
_recalculateTrimming(): void;
|
|
39
37
|
private _getParagraphFromBlock;
|
|
40
38
|
private _escapeRegex;
|
|
@@ -66,8 +66,9 @@ export declare function getItemsBlockConfig(currentNode: ImmutableHtmlNode | und
|
|
|
66
66
|
* @param currentNode - The current node from the control
|
|
67
67
|
* @param api - The API object (ControlApi or BlockApi)
|
|
68
68
|
* @param config - The configuration to set (partial update supported)
|
|
69
|
+
* @param modifier - Optional document modifier for batching updates
|
|
69
70
|
*/
|
|
70
|
-
export declare function setItemsBlockConfig(currentNode: ImmutableHtmlNode | undefined, api: ControlApi | BlockApi, config: Partial<ItemsBlockConfig>): void;
|
|
71
|
+
export declare function setItemsBlockConfig(currentNode: ImmutableHtmlNode | undefined, api: ControlApi | BlockApi, config: Partial<ItemsBlockConfig>, modifier?: ReturnType<typeof api.getDocumentModifier>): void;
|
|
71
72
|
/**
|
|
72
73
|
* Gets the block instance ID from the node config.
|
|
73
74
|
* @param currentNode - The current node from the control
|
|
@@ -66,14 +66,13 @@ export declare abstract class CommonControl extends Control {
|
|
|
66
66
|
*/
|
|
67
67
|
protected getBlockInstanceId(): string | null;
|
|
68
68
|
/**
|
|
69
|
-
* Handles block instance change detection and
|
|
70
|
-
* This is a helper method for controls that need to
|
|
69
|
+
* Handles block instance change detection and UI updates.
|
|
70
|
+
* This is a helper method for controls that need to update UI when switching between block instances.
|
|
71
71
|
* Uses Stripo V2 nodeConfig API for block instance tracking.
|
|
72
|
-
* @param
|
|
73
|
-
* @param updateUI - Function to call to update the UI (called both on change and when same block)
|
|
72
|
+
* @param updateUI - Function to call to update the UI (called on every update)
|
|
74
73
|
* @returns true if block instance changed, false otherwise
|
|
75
74
|
*/
|
|
76
|
-
protected handleBlockInstanceChange(
|
|
75
|
+
protected handleBlockInstanceChange(updateUI: () => void): boolean;
|
|
77
76
|
_GuLabel({ text, name }: LabelProps): string;
|
|
78
77
|
_GuToggle(name: string): string;
|
|
79
78
|
_GuSelectItem({ text, value }: {
|
|
@@ -46,6 +46,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
46
46
|
senderName: string;
|
|
47
47
|
subject: string;
|
|
48
48
|
};
|
|
49
|
+
savedModulesFolderName: string;
|
|
50
|
+
defaultModulesFolderName: string;
|
|
49
51
|
};
|
|
50
52
|
ui: {
|
|
51
53
|
showHeader: boolean;
|
|
@@ -141,6 +143,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
141
143
|
senderName: string;
|
|
142
144
|
subject: string;
|
|
143
145
|
};
|
|
146
|
+
savedModulesFolderName: string;
|
|
147
|
+
defaultModulesFolderName: string;
|
|
144
148
|
};
|
|
145
149
|
ui: {
|
|
146
150
|
showHeader: boolean;
|
|
@@ -236,6 +240,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
236
240
|
senderName: string;
|
|
237
241
|
subject: string;
|
|
238
242
|
};
|
|
243
|
+
savedModulesFolderName: string;
|
|
244
|
+
defaultModulesFolderName: string;
|
|
239
245
|
};
|
|
240
246
|
ui: {
|
|
241
247
|
showHeader: boolean;
|
|
@@ -331,6 +337,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
331
337
|
senderName: string;
|
|
332
338
|
subject: string;
|
|
333
339
|
};
|
|
340
|
+
savedModulesFolderName: string;
|
|
341
|
+
defaultModulesFolderName: string;
|
|
334
342
|
};
|
|
335
343
|
ui: {
|
|
336
344
|
showHeader: boolean;
|
|
@@ -426,6 +434,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
426
434
|
senderName: string;
|
|
427
435
|
subject: string;
|
|
428
436
|
};
|
|
437
|
+
savedModulesFolderName: string;
|
|
438
|
+
defaultModulesFolderName: string;
|
|
429
439
|
};
|
|
430
440
|
ui: {
|
|
431
441
|
showHeader: boolean;
|
|
@@ -521,6 +531,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
521
531
|
senderName: string;
|
|
522
532
|
subject: string;
|
|
523
533
|
};
|
|
534
|
+
savedModulesFolderName: string;
|
|
535
|
+
defaultModulesFolderName: string;
|
|
524
536
|
};
|
|
525
537
|
ui: {
|
|
526
538
|
showHeader: boolean;
|
|
@@ -616,6 +628,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
616
628
|
senderName: string;
|
|
617
629
|
subject: string;
|
|
618
630
|
};
|
|
631
|
+
savedModulesFolderName: string;
|
|
632
|
+
defaultModulesFolderName: string;
|
|
619
633
|
};
|
|
620
634
|
ui: {
|
|
621
635
|
showHeader: boolean;
|
|
@@ -711,6 +725,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
711
725
|
senderName: string;
|
|
712
726
|
subject: string;
|
|
713
727
|
};
|
|
728
|
+
savedModulesFolderName: string;
|
|
729
|
+
defaultModulesFolderName: string;
|
|
714
730
|
};
|
|
715
731
|
ui: {
|
|
716
732
|
showHeader: boolean;
|
|
@@ -806,6 +822,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
806
822
|
senderName: string;
|
|
807
823
|
subject: string;
|
|
808
824
|
};
|
|
825
|
+
savedModulesFolderName: string;
|
|
826
|
+
defaultModulesFolderName: string;
|
|
809
827
|
};
|
|
810
828
|
ui: {
|
|
811
829
|
showHeader: boolean;
|
|
@@ -901,6 +919,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
901
919
|
senderName: string;
|
|
902
920
|
subject: string;
|
|
903
921
|
};
|
|
922
|
+
savedModulesFolderName: string;
|
|
923
|
+
defaultModulesFolderName: string;
|
|
904
924
|
};
|
|
905
925
|
ui: {
|
|
906
926
|
showHeader: boolean;
|
|
@@ -996,6 +1016,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
996
1016
|
senderName: string;
|
|
997
1017
|
subject: string;
|
|
998
1018
|
};
|
|
1019
|
+
savedModulesFolderName: string;
|
|
1020
|
+
defaultModulesFolderName: string;
|
|
999
1021
|
};
|
|
1000
1022
|
ui: {
|
|
1001
1023
|
showHeader: boolean;
|
|
@@ -1091,6 +1113,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1091
1113
|
senderName: string;
|
|
1092
1114
|
subject: string;
|
|
1093
1115
|
};
|
|
1116
|
+
savedModulesFolderName: string;
|
|
1117
|
+
defaultModulesFolderName: string;
|
|
1094
1118
|
};
|
|
1095
1119
|
ui: {
|
|
1096
1120
|
showHeader: boolean;
|
|
@@ -1186,6 +1210,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1186
1210
|
senderName: string;
|
|
1187
1211
|
subject: string;
|
|
1188
1212
|
};
|
|
1213
|
+
savedModulesFolderName: string;
|
|
1214
|
+
defaultModulesFolderName: string;
|
|
1189
1215
|
};
|
|
1190
1216
|
ui: {
|
|
1191
1217
|
showHeader: boolean;
|
|
@@ -1281,6 +1307,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1281
1307
|
senderName: string;
|
|
1282
1308
|
subject: string;
|
|
1283
1309
|
};
|
|
1310
|
+
savedModulesFolderName: string;
|
|
1311
|
+
defaultModulesFolderName: string;
|
|
1284
1312
|
};
|
|
1285
1313
|
ui: {
|
|
1286
1314
|
showHeader: boolean;
|
|
@@ -1376,6 +1404,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1376
1404
|
senderName: string;
|
|
1377
1405
|
subject: string;
|
|
1378
1406
|
};
|
|
1407
|
+
savedModulesFolderName: string;
|
|
1408
|
+
defaultModulesFolderName: string;
|
|
1379
1409
|
};
|
|
1380
1410
|
ui: {
|
|
1381
1411
|
showHeader: boolean;
|
|
@@ -1471,6 +1501,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1471
1501
|
senderName: string;
|
|
1472
1502
|
subject: string;
|
|
1473
1503
|
};
|
|
1504
|
+
savedModulesFolderName: string;
|
|
1505
|
+
defaultModulesFolderName: string;
|
|
1474
1506
|
};
|
|
1475
1507
|
ui: {
|
|
1476
1508
|
showHeader: boolean;
|
|
@@ -1566,6 +1598,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1566
1598
|
senderName: string;
|
|
1567
1599
|
subject: string;
|
|
1568
1600
|
};
|
|
1601
|
+
savedModulesFolderName: string;
|
|
1602
|
+
defaultModulesFolderName: string;
|
|
1569
1603
|
};
|
|
1570
1604
|
ui: {
|
|
1571
1605
|
showHeader: boolean;
|
|
@@ -1661,6 +1695,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1661
1695
|
senderName: string;
|
|
1662
1696
|
subject: string;
|
|
1663
1697
|
};
|
|
1698
|
+
savedModulesFolderName: string;
|
|
1699
|
+
defaultModulesFolderName: string;
|
|
1664
1700
|
};
|
|
1665
1701
|
ui: {
|
|
1666
1702
|
showHeader: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.acbfaec",
|
|
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",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"guido": {
|
|
87
87
|
"stripo": {
|
|
88
|
-
"version": "2.
|
|
88
|
+
"version": "2.54.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { defineStore as s } from "pinia";
|
|
2
|
-
import { DefaultConfigValues as e } from "../enums/settingsEnums.js";
|
|
3
|
-
const n = (t) => t.replace(/Url\}/, "Image}"), r = (t) => t.replace(/Image\}/, "Url}"), i = () => {
|
|
4
|
-
const t = e.cartItemsSelectControlValue;
|
|
5
|
-
return {
|
|
6
|
-
itemsType: e.itemsType,
|
|
7
|
-
itemIds: t,
|
|
8
|
-
imageLink: n(t),
|
|
9
|
-
buttonLink: r(t),
|
|
10
|
-
orientation: e.cardOrientationControlValue,
|
|
11
|
-
nameTrimming: !0,
|
|
12
|
-
hideDiscount: !0,
|
|
13
|
-
currencySymbol: "USD",
|
|
14
|
-
currencyLocation: "0",
|
|
15
|
-
formattedPrice: !0,
|
|
16
|
-
singlePrice: !1,
|
|
17
|
-
priceOrientation: "vertical",
|
|
18
|
-
templateData: {
|
|
19
|
-
imageSrc: "",
|
|
20
|
-
name: "",
|
|
21
|
-
price: "",
|
|
22
|
-
originalPrice: "",
|
|
23
|
-
quantity: "",
|
|
24
|
-
button: ""
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}, m = s("guidoItemsBlock", {
|
|
28
|
-
state: () => i(),
|
|
29
|
-
actions: {
|
|
30
|
-
setItemsType(t) {
|
|
31
|
-
this.itemsType = t;
|
|
32
|
-
},
|
|
33
|
-
setItemIds(t) {
|
|
34
|
-
this.itemIds = t, this.imageLink = n(t), this.buttonLink = r(t);
|
|
35
|
-
},
|
|
36
|
-
setImageLink(t) {
|
|
37
|
-
this.imageLink = t;
|
|
38
|
-
},
|
|
39
|
-
setButtonLink(t) {
|
|
40
|
-
this.buttonLink = t;
|
|
41
|
-
},
|
|
42
|
-
setOrientation(t) {
|
|
43
|
-
this.orientation = t;
|
|
44
|
-
},
|
|
45
|
-
setNameTrimming(t) {
|
|
46
|
-
this.nameTrimming = t;
|
|
47
|
-
},
|
|
48
|
-
setHideDiscount(t) {
|
|
49
|
-
this.hideDiscount = t;
|
|
50
|
-
},
|
|
51
|
-
setCurrencySymbol(t) {
|
|
52
|
-
this.currencySymbol = t;
|
|
53
|
-
},
|
|
54
|
-
setCurrencyLocation(t) {
|
|
55
|
-
this.currencyLocation = t;
|
|
56
|
-
},
|
|
57
|
-
setFormattedPrice(t) {
|
|
58
|
-
this.formattedPrice = t;
|
|
59
|
-
},
|
|
60
|
-
setSinglePrice(t) {
|
|
61
|
-
this.singlePrice = t;
|
|
62
|
-
},
|
|
63
|
-
setPriceOrientation(t) {
|
|
64
|
-
this.priceOrientation = t;
|
|
65
|
-
},
|
|
66
|
-
setTemplateData(t) {
|
|
67
|
-
this.templateData = t;
|
|
68
|
-
},
|
|
69
|
-
updateFromAttributes(t) {
|
|
70
|
-
t.itemsType && (this.itemsType = t.itemsType), t.itemIds && this.setItemIds(t.itemIds), t.orientation && (this.orientation = t.orientation);
|
|
71
|
-
},
|
|
72
|
-
reset() {
|
|
73
|
-
Object.assign(this, i());
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
export {
|
|
78
|
-
m as useItemsBlockStore
|
|
79
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { OrientationType, ProductType } from '@@/Types/extensions/items';
|
|
2
|
-
interface ItemsBlockState {
|
|
3
|
-
itemsType: ProductType;
|
|
4
|
-
itemIds: string;
|
|
5
|
-
imageLink: string;
|
|
6
|
-
buttonLink: string;
|
|
7
|
-
orientation: OrientationType;
|
|
8
|
-
nameTrimming: boolean;
|
|
9
|
-
hideDiscount: boolean;
|
|
10
|
-
currencySymbol: string;
|
|
11
|
-
currencyLocation: string;
|
|
12
|
-
formattedPrice: boolean;
|
|
13
|
-
singlePrice: boolean;
|
|
14
|
-
priceOrientation: 'vertical' | 'horizontal';
|
|
15
|
-
templateData: {
|
|
16
|
-
imageSrc: string;
|
|
17
|
-
name: string;
|
|
18
|
-
price: string;
|
|
19
|
-
originalPrice: string;
|
|
20
|
-
quantity: string;
|
|
21
|
-
button: string;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const useItemsBlockStore: import("pinia").StoreDefinition<"guidoItemsBlock", ItemsBlockState, {}, {
|
|
25
|
-
setItemsType(itemsType: ProductType): void;
|
|
26
|
-
setItemIds(itemIds: string): void;
|
|
27
|
-
setImageLink(imageLink: string): void;
|
|
28
|
-
setButtonLink(buttonLink: string): void;
|
|
29
|
-
setOrientation(orientation: OrientationType): void;
|
|
30
|
-
setNameTrimming(nameTrimming: boolean): void;
|
|
31
|
-
setHideDiscount(hideDiscount: boolean): void;
|
|
32
|
-
setCurrencySymbol(currencySymbol: string): void;
|
|
33
|
-
setCurrencyLocation(currencyLocation: string): void;
|
|
34
|
-
setFormattedPrice(formattedPrice: boolean): void;
|
|
35
|
-
setSinglePrice(singlePrice: boolean): void;
|
|
36
|
-
setPriceOrientation(priceOrientation: "vertical" | "horizontal"): void;
|
|
37
|
-
setTemplateData(templateData: ItemsBlockState["templateData"]): void;
|
|
38
|
-
updateFromAttributes(attributes: {
|
|
39
|
-
itemsType?: string;
|
|
40
|
-
itemIds?: string;
|
|
41
|
-
orientation?: string;
|
|
42
|
-
}): void;
|
|
43
|
-
reset(): void;
|
|
44
|
-
}>;
|
|
45
|
-
export {};
|