@useinsider/guido 3.24.0-beta.3e3347a → 3.24.0-beta.468d41f
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 +7 -1
- package/dist/@types/config/schemas.js +9 -7
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +79 -77
- package/dist/composables/useHtmlCompiler.js +2 -0
- package/dist/composables/useModuleRepair.js +14 -12
- package/dist/composables/useStripo.js +70 -70
- package/dist/config/compiler/htmlCompilerRules.js +14 -6
- package/dist/config/migrator/index.js +16 -15
- package/dist/config/migrator/itemsPriceFormatMigrator.js +20 -0
- package/dist/extensions/Blocks/Items/block.js +115 -77
- package/dist/extensions/Blocks/Items/constants/currency.js +59 -14
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +33 -22
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +62 -51
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +18 -17
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +42 -31
- package/dist/extensions/Blocks/Items/controls/priceFormat.js +145 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +141 -120
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +1 -1
- package/dist/extensions/Blocks/Items/extension.js +9 -8
- package/dist/extensions/Blocks/Items/items.css.js +19 -0
- package/dist/extensions/Blocks/Items/settingsPanel.js +34 -25
- package/dist/extensions/Blocks/Items/template.js +250 -212
- package/dist/extensions/Blocks/Items/utils/priceFormatOps.js +185 -0
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +1 -0
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useStripo.d.ts +1 -1
- package/dist/src/config/migrator/index.d.ts +4 -1
- package/dist/src/config/migrator/itemsPriceFormatMigrator.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +6 -9
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +32 -0
- package/dist/src/extensions/Blocks/Items/controls/priceFormat.d.ts +23 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +4 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/utils/priceFormatOps.d.ts +61 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +12 -0
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/utils/itemsCurrencyRepair.d.ts +5 -1
- package/dist/src/utils/trimHrefWhitespace.d.ts +5 -0
- package/dist/utils/itemsCurrencyRepair.js +29 -24
- package/dist/utils/pairProductVariables.js +119 -99
- package/dist/utils/trimHrefWhitespace.js +10 -0
- package/package.json +1 -1
|
@@ -18,6 +18,25 @@ const n = `/* Utils */
|
|
|
18
18
|
padding: 0
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/* Items Price Format Controls - Currency Location through Decimal Count form one compact group
|
|
22
|
+
on the block panel (the only panel with the main control); dividers are opted out via no-separator */
|
|
23
|
+
.container-wrapper:has(.items-controls-container) ~ .container-wrapper > .items-block-price-currency-location-control {
|
|
24
|
+
padding-bottom: 4px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.container-wrapper:has(.items-controls-container) ~ .container-wrapper > .items-block-price-currency-symbol-control {
|
|
28
|
+
padding-top: 4px;
|
|
29
|
+
padding-bottom: 4px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.container-wrapper > .items-block-price-format-control > .container {
|
|
33
|
+
padding: 4px 16px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.container-wrapper > .items-block-price-format-control > .container:last-child {
|
|
37
|
+
padding-bottom: 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
/* ─── Migration Info Box ─────────────────────────────────────────────── */
|
|
22
41
|
/* Shown in the settings panel title when a block was migrated from legacy */
|
|
23
42
|
|
|
@@ -1,30 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { useConfig as C } from "../../../composables/useConfig.js";
|
|
2
|
+
import { SettingsPanelRegistry as L, SettingsPanelTab as T, SettingsTab as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
import { BLOCK_ID as S } from "./block.js";
|
|
4
|
+
import { COMPOSITION_CONTROL_BLOCK_ID as A } from "./controls/cardComposition.js";
|
|
5
|
+
import { CONTROL_BLOCK_ID as R } from "./controls/settingsControl.js";
|
|
6
|
+
import { ItemsBlockControlId as I, ItemsBlockId as N } from "./enums/controlEnums.js";
|
|
7
|
+
const P = [
|
|
8
|
+
I.PRICE_ORIENTATION,
|
|
9
|
+
I.PRICE_HIDE_DISCOUNT,
|
|
10
|
+
I.PRICE_SINGLE_PRICE,
|
|
11
|
+
I.PRICE_CURRENCY_LOCATION,
|
|
12
|
+
I.PRICE_CURRENCY_SYMBOL
|
|
13
|
+
], e = [
|
|
14
|
+
I.PRICE_HIDE_DISCOUNT,
|
|
15
|
+
I.PRICE_FORMATTED_PRICE,
|
|
16
|
+
I.PRICE_SINGLE_PRICE,
|
|
17
|
+
I.PRICE_CURRENCY_SYMBOL,
|
|
18
|
+
I.PRICE_CURRENCY_LOCATION
|
|
19
|
+
];
|
|
20
|
+
class D extends L {
|
|
21
|
+
registerBlockControls(E) {
|
|
22
|
+
const O = C().isFeatureEnabled("itemsPriceFormatting");
|
|
23
|
+
E[S] = [
|
|
9
24
|
new T(
|
|
10
25
|
_.SETTINGS,
|
|
11
|
-
[
|
|
12
|
-
A
|
|
13
|
-
]
|
|
26
|
+
O ? [R, ...P, I.PRICE_FORMAT] : [R]
|
|
14
27
|
),
|
|
15
28
|
new T(
|
|
16
29
|
"Card Composition",
|
|
17
30
|
[
|
|
18
|
-
|
|
31
|
+
A
|
|
19
32
|
]
|
|
20
33
|
).withLabel("Card Composition")
|
|
21
|
-
], N
|
|
34
|
+
], E[N.ORIGINAL_PRICE] = [
|
|
22
35
|
new T(
|
|
23
36
|
_.SETTINGS,
|
|
24
37
|
[
|
|
25
38
|
I.ORIGINAL_PRICE_STYLE,
|
|
26
39
|
I.ORIGINAL_PRICE_ALIGN,
|
|
27
|
-
I.PRICE_ORIENTATION,
|
|
40
|
+
...O ? [] : [I.PRICE_ORIENTATION],
|
|
28
41
|
I.ORIGINAL_PRICE_PADDINGS
|
|
29
42
|
]
|
|
30
43
|
),
|
|
@@ -36,17 +49,13 @@ class U extends O {
|
|
|
36
49
|
I.ORIGINAL_PRICE_COLOR
|
|
37
50
|
]
|
|
38
51
|
)
|
|
39
|
-
], N
|
|
52
|
+
], E[N.PRICE] = [
|
|
40
53
|
new T(
|
|
41
54
|
_.SETTINGS,
|
|
42
55
|
[
|
|
43
56
|
I.PRICE_STYLE,
|
|
44
57
|
I.PRICE_ALIGN,
|
|
45
|
-
|
|
46
|
-
I.PRICE_FORMATTED_PRICE,
|
|
47
|
-
I.PRICE_SINGLE_PRICE,
|
|
48
|
-
I.PRICE_CURRENCY_SYMBOL,
|
|
49
|
-
I.PRICE_CURRENCY_LOCATION,
|
|
58
|
+
...O ? [] : e,
|
|
50
59
|
I.PRICE_PADDINGS
|
|
51
60
|
]
|
|
52
61
|
),
|
|
@@ -58,7 +67,7 @@ class U extends O {
|
|
|
58
67
|
I.PRICE_COLOR
|
|
59
68
|
]
|
|
60
69
|
)
|
|
61
|
-
], N
|
|
70
|
+
], E[N.NAME] = [
|
|
62
71
|
new T(
|
|
63
72
|
_.SETTINGS,
|
|
64
73
|
[
|
|
@@ -76,7 +85,7 @@ class U extends O {
|
|
|
76
85
|
I.NAME_COLOR
|
|
77
86
|
]
|
|
78
87
|
)
|
|
79
|
-
], N
|
|
88
|
+
], E[N.QUANTITY] = [
|
|
80
89
|
new T(
|
|
81
90
|
_.STYLES,
|
|
82
91
|
[
|
|
@@ -88,7 +97,7 @@ class U extends O {
|
|
|
88
97
|
I.QUANTITY_PADDINGS
|
|
89
98
|
]
|
|
90
99
|
)
|
|
91
|
-
], N
|
|
100
|
+
], E[N.IMAGE] = [
|
|
92
101
|
new T(
|
|
93
102
|
_.SETTINGS,
|
|
94
103
|
[
|
|
@@ -97,7 +106,7 @@ class U extends O {
|
|
|
97
106
|
I.IMAGE_MARGINS
|
|
98
107
|
]
|
|
99
108
|
)
|
|
100
|
-
], N
|
|
109
|
+
], E[N.BUTTON] = [
|
|
101
110
|
new T(
|
|
102
111
|
_.SETTINGS,
|
|
103
112
|
[
|
|
@@ -124,5 +133,5 @@ class U extends O {
|
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
export {
|
|
127
|
-
|
|
136
|
+
D as SettingsPanel
|
|
128
137
|
};
|