@useinsider/guido 2.1.0-beta.7ffef92 → 2.1.0-beta.814593d
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/components/organisms/base/Toaster.vue.js +4 -4
- package/dist/components/organisms/base/Toaster.vue2.js +12 -9
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +13 -11
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +24 -55
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +3 -3
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +21 -34
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +9 -9
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +35 -44
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +2 -2
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +65 -64
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +39 -58
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +57 -93
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/guido.css +1 -1
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -1
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +1 -15
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -18
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/static/styles/components/notification.css.js +18 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/unsubscribe.js +37 -34
- package/package.json +2 -2
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +0 -29
- package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +0 -15
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (a, s, e) =>
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var h = (a, s, e) => s in a ? d(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e;
|
|
3
|
+
var u = (a, s, e) => h(a, typeof s != "symbol" ? s + "" : s, e);
|
|
4
4
|
import { useUnsubscribeStore as l } from "../../../stores/unsubscribe.js";
|
|
5
5
|
import { Control as T, UEAttr as i, UIElementType as n } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
6
6
|
import { DATA_ATTRIBUTES as p } from "./utils/constants.js";
|
|
7
7
|
import { parsePageList as _ } from "./utils/utils.js";
|
|
8
|
-
const
|
|
8
|
+
const v = "ui-elements-unsubscribe", r = {
|
|
9
9
|
SELECT_BUTTON: "selectTemplateButton",
|
|
10
10
|
PREV_BUTTON: "prevButton",
|
|
11
11
|
NEXT_BUTTON: "nextButton",
|
|
12
12
|
COUNTER_TEXT: "counterText",
|
|
13
13
|
PREVIEW_IMAGE: "previewImage"
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class B extends T {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
u(this, "currentPreviewIndex", 0);
|
|
@@ -22,7 +22,7 @@ class N extends T {
|
|
|
22
22
|
u(this, "lastParsedAttribute");
|
|
23
23
|
}
|
|
24
24
|
getId() {
|
|
25
|
-
return
|
|
25
|
+
return v;
|
|
26
26
|
}
|
|
27
27
|
getTemplate() {
|
|
28
28
|
return `
|
|
@@ -35,7 +35,7 @@ class N extends T {
|
|
|
35
35
|
onTemplateNodeUpdated(e) {
|
|
36
36
|
if (this.currentNode = e, "getAttribute" in this.currentNode) {
|
|
37
37
|
const t = this.currentNode.getAttribute(p.PAGE_LIST);
|
|
38
|
-
t && (t !== this.lastParsedAttribute && (this.currentPages = _(t), this.lastParsedAttribute = t, this.currentPreviewIndex = 0), this.
|
|
38
|
+
t && (t !== this.lastParsedAttribute && (this.currentPages = _(t), this.lastParsedAttribute = t, this.currentPreviewIndex = 0), this._updateCounter(), this._loadAndUpdatePreview());
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
onRender() {
|
|
@@ -73,6 +73,9 @@ class N extends T {
|
|
|
73
73
|
_onNextClick() {
|
|
74
74
|
this.currentPreviewIndex < this.totalTemplates - 1 && (this.currentPreviewIndex++, this._updatePreview(), this._updateCounter());
|
|
75
75
|
}
|
|
76
|
+
async _loadAndUpdatePreview() {
|
|
77
|
+
await l().fetchTemplates(), this._updatePreview(), this._updateCounter();
|
|
78
|
+
}
|
|
76
79
|
_updatePreview() {
|
|
77
80
|
var e;
|
|
78
81
|
if ((e = this.currentPages) != null && e.length)
|
|
@@ -162,6 +165,6 @@ class N extends T {
|
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
167
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
168
|
+
v as UNSUBSCRIBE_CONTROL_ID,
|
|
169
|
+
B as UnsubscribeControl
|
|
167
170
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { UIElement as
|
|
5
|
-
const E = "unsubscribe-preview",
|
|
6
|
-
class
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var m = (s, i, e) => i in s ? n(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
|
|
3
|
+
var r = (s, i, e) => m(s, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
+
import { UIElement as l } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
const E = "unsubscribe-preview", c = "img", a = "Unsubscribe page preview", g = "is-loaded";
|
|
6
|
+
class d extends l {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
-
|
|
9
|
+
r(this, "imgElement");
|
|
10
10
|
}
|
|
11
11
|
getId() {
|
|
12
12
|
return E;
|
|
@@ -14,19 +14,21 @@ class o extends m {
|
|
|
14
14
|
getTemplate() {
|
|
15
15
|
return `
|
|
16
16
|
<div class="unsubscribe-preview-image-container">
|
|
17
|
+
<div class="unsubscribe-preview-loader"></div>
|
|
17
18
|
<img
|
|
18
19
|
src=""
|
|
19
|
-
alt="${
|
|
20
|
+
alt="${a}"
|
|
20
21
|
class="unsubscribe-preview-image"
|
|
21
22
|
/>
|
|
22
23
|
</div>
|
|
23
24
|
`;
|
|
24
25
|
}
|
|
25
26
|
onRender(e) {
|
|
26
|
-
this.imgElement = e.querySelector(
|
|
27
|
+
this.imgElement = e.querySelector(c);
|
|
27
28
|
}
|
|
28
29
|
setValue(e) {
|
|
29
|
-
|
|
30
|
+
var t;
|
|
31
|
+
this.imgElement && (this.imgElement.src = e, (t = this.imgElement.parentElement) == null || t.classList.add(g));
|
|
30
32
|
}
|
|
31
33
|
getValue() {
|
|
32
34
|
var e;
|
|
@@ -38,5 +40,5 @@ class o extends m {
|
|
|
38
40
|
}
|
|
39
41
|
export {
|
|
40
42
|
E as PREVIEW_UI_ELEMENT_ID,
|
|
41
|
-
|
|
43
|
+
d as PreviewUIElement
|
|
42
44
|
};
|
|
@@ -29,12 +29,42 @@ const n = `/* Unsubscribe Extension Styles */
|
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
|
+
position: relative;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
.unsubscribe-preview-image {
|
|
35
|
+
.unsubscribe-preview-image-container .unsubscribe-preview-image {
|
|
35
36
|
object-fit: cover;
|
|
36
37
|
width: 100%;
|
|
37
38
|
height: auto;
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.unsubscribe-preview-image-container.is-loaded .unsubscribe-preview-image {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.unsubscribe-preview-image-container.is-loaded .unsubscribe-preview-loader {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Loading shimmer */
|
|
51
|
+
.unsubscribe-preview-loader {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 200px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
56
|
+
background-size: 200% 100%;
|
|
57
|
+
animation: unsubscribe-shimmer 1.5s infinite;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes unsubscribe-shimmer {
|
|
61
|
+
0% {
|
|
62
|
+
background-position: 200% 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
100% {
|
|
66
|
+
background-position: -200% 0;
|
|
67
|
+
}
|
|
38
68
|
}
|
|
39
69
|
`;
|
|
40
70
|
export {
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-16abb398]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-16abb398]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-16abb398]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -3,7 +3,6 @@ type __VLS_Props = {
|
|
|
3
3
|
filter: Filter;
|
|
4
4
|
index: number;
|
|
5
5
|
hasLogicAdapter?: boolean;
|
|
6
|
-
submitted: boolean;
|
|
7
6
|
};
|
|
8
7
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
9
8
|
"delete-filter": (filter: Filter) => void;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
submitted: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
5
|
-
switchToGroup: (groupId: number) => void;
|
|
6
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
7
2
|
export default _default;
|
|
8
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
type __VLS_TypePropsToOption<T> = {
|
|
10
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
-
} : {
|
|
13
|
-
type: import('vue').PropType<T[K]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en: Record<string, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stripo Editor Translation Overrides
|
|
3
|
+
*
|
|
4
|
+
* Custom translations for Stripo editor UI elements.
|
|
5
|
+
* Each language has its own folder with categorized JSON files.
|
|
6
|
+
*
|
|
7
|
+
* Reference: https://email-static.useinsider.com/guido/{version}/assets/i18n/en.json
|
|
8
|
+
* @module config/i18n
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Combined locale patch for Stripo editor initialization.
|
|
12
|
+
* Maps language codes to their translation overrides.
|
|
13
|
+
*/
|
|
14
|
+
export declare const localePatch: {
|
|
15
|
+
en: Record<string, string>;
|
|
16
|
+
};
|
|
@@ -76,9 +76,4 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
76
76
|
* (e.g., fetchRecommendationCreateData setting preferred currency).
|
|
77
77
|
*/
|
|
78
78
|
_listenStateUpdates(): void;
|
|
79
|
-
/**
|
|
80
|
-
* Persists the current filter state from Pinia store to the Stripo node config.
|
|
81
|
-
* This ensures filters survive template save/reload cycles.
|
|
82
|
-
*/
|
|
83
|
-
private _persistFiltersToNodeConfig;
|
|
84
79
|
}
|
|
@@ -31,8 +31,6 @@ interface PerBlockState {
|
|
|
31
31
|
filterGroup: number;
|
|
32
32
|
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
33
33
|
isInitialized: boolean;
|
|
34
|
-
/** Snapshot of filters taken when the drawer opens, used to revert on cancel */
|
|
35
|
-
filterSnapshot: Filter[] | null;
|
|
36
34
|
}
|
|
37
35
|
interface StoreState {
|
|
38
36
|
recommendationCampaignUrls: Record<string, string>;
|
|
@@ -127,9 +125,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
127
125
|
configVersion: number;
|
|
128
126
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
129
127
|
hasFilters(): boolean;
|
|
130
|
-
hasValidFilters(): boolean;
|
|
131
128
|
getFilterGroupCount(): number;
|
|
132
|
-
getUniqueFilterGroups(): number[];
|
|
133
129
|
getActivePredictiveAlgorithms: (state: {
|
|
134
130
|
recommendationCampaignUrls: Record<string, string>;
|
|
135
131
|
activePredictiveAlgorithms: number[];
|
|
@@ -207,31 +203,19 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
207
203
|
patchCurrentBlockConfig(updates: Partial<PerBlockConfigs>, options?: {
|
|
208
204
|
triggerRefetch?: boolean;
|
|
209
205
|
}): void;
|
|
210
|
-
/**
|
|
211
|
-
* Creates a filter with the first available attribute and operator pre-selected.
|
|
212
|
-
*/
|
|
213
|
-
createDefaultFilter(filterGroup: number, filterNumber: number): Filter;
|
|
214
206
|
/**
|
|
215
207
|
* Opens the filter selection drawer for the current block.
|
|
216
|
-
*
|
|
217
|
-
* If no filters exist, initializes with a default filter
|
|
208
|
+
* If no filters exist, initializes with a default empty filter
|
|
218
209
|
* so the user has a starting point for input.
|
|
219
210
|
*/
|
|
220
211
|
openFilterDrawer(): void;
|
|
221
212
|
/**
|
|
222
|
-
* Closes the filter selection drawer for the current block
|
|
223
|
-
* Called after successful apply — discards the snapshot.
|
|
213
|
+
* Closes the filter selection drawer for the current block
|
|
224
214
|
*/
|
|
225
215
|
closeFilterDrawer(): void;
|
|
226
|
-
/**
|
|
227
|
-
* Cancels the filter selection drawer and reverts filters
|
|
228
|
-
* to the snapshot taken when the drawer was opened.
|
|
229
|
-
*/
|
|
230
|
-
cancelFilterDrawer(): void;
|
|
231
216
|
fetchRecommendationCreateData(): Promise<void>;
|
|
232
217
|
fetchRecommendationFilters(): Promise<void>;
|
|
233
218
|
addFilterGroup(filterGroup: number): void;
|
|
234
|
-
deleteFilterGroup(groupId: number): void;
|
|
235
219
|
updateFilter(updatedFilter: Filter): void;
|
|
236
220
|
deleteFilter(filter: Filter): void;
|
|
237
221
|
addFilter(filter: Filter): void;
|
|
@@ -17,6 +17,24 @@ ue-notifications-container .alert-message-wrapper {
|
|
|
17
17
|
padding: 16px 24px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
ue-notifications-container .alert-message-wrapper.info,
|
|
21
|
+
ue-notifications-container .alert-message-wrapper.loader {
|
|
22
|
+
background-color: var(--guido-color-background-toaster-info) !important;
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.alert-message-wrapper .alert-message-main {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ue-notifications-container ue-caption .caption {
|
|
31
|
+
color: var(--guido-color-white) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ue-block-thumb-hint {
|
|
35
|
+
text-align: left;
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
|
|
21
39
|
width: calc(100% - 64px);
|
|
22
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = `ue-emoji .emoji-tabs .active-smile-tab {
|
|
2
2
|
border-color: var(--guido-color-primary-500);
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -17,7 +17,11 @@ ue-insert-table .template-cell {
|
|
|
17
17
|
border: 1px solid var(--guido-color-gray-300);
|
|
18
18
|
box-shadow: var(--guido-box-shadow);
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
.ue-popover.dark-tiny {
|
|
22
|
+
text-align: left !important;
|
|
23
|
+
}
|
|
20
24
|
`;
|
|
21
25
|
export {
|
|
22
|
-
|
|
26
|
+
e as default
|
|
23
27
|
};
|
|
@@ -10,6 +10,7 @@ const o = `:host {
|
|
|
10
10
|
--guido-color-gray-1: #F0F0F0;
|
|
11
11
|
--guido-color-gray-0: #F9F9F9;
|
|
12
12
|
--guido-color-neutral-800: #222938;
|
|
13
|
+
--guido-color-neutral-700: #2C3546;
|
|
13
14
|
--guido-color-neutral-200: #DCDFE6;
|
|
14
15
|
--guido-color-neutral-100: #EFF2F4;
|
|
15
16
|
--guido-color-danger-300: #e84342;
|
|
@@ -25,6 +26,7 @@ const o = `:host {
|
|
|
25
26
|
--guido-color-border-onpage-message-error: var(--guido-color-danger-500);
|
|
26
27
|
--guido-color-background-toaster-success: #128745;
|
|
27
28
|
--guido-color-background-toaster-error: var(--guido-color-danger-500);
|
|
29
|
+
--guido-color-background-toaster-info: var(--guido-color-neutral-700);
|
|
28
30
|
--guido-color-background-toaster-warn: #D37400;
|
|
29
31
|
}
|
|
30
32
|
`;
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { TYPE_COLLECTIONS as i, PAGE_TYPES as
|
|
2
|
-
import { useUnsubscribeApi as
|
|
3
|
-
import { defineStore as
|
|
4
|
-
|
|
1
|
+
import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
|
|
2
|
+
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
|
+
import { defineStore as h } from "pinia";
|
|
4
|
+
let o = null;
|
|
5
|
+
const r = () => ({
|
|
5
6
|
templates: [],
|
|
6
7
|
selectedTemplates: {},
|
|
7
8
|
selectedUnsubscribePages: [],
|
|
8
|
-
selectedCollectionType:
|
|
9
|
-
activeType:
|
|
9
|
+
selectedCollectionType: p.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
activeType: p.GLOBAL_UNSUBSCRIBE,
|
|
10
11
|
pageSelectionUpdateStatus: !1,
|
|
11
12
|
pageSelectionDrawerStatus: !1,
|
|
12
13
|
typeSelectionDrawerStatus: !1,
|
|
13
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
14
15
|
isSubscriptionPreferencesCenterDisabled: !1
|
|
15
|
-
}),
|
|
16
|
-
state: () =>
|
|
16
|
+
}), b = h("guidoUnsubscribe", {
|
|
17
|
+
state: () => r(),
|
|
17
18
|
getters: {
|
|
18
19
|
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
19
20
|
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
20
21
|
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
21
22
|
getThumbnailByTemplateId: (e) => (t) => {
|
|
22
|
-
var
|
|
23
|
-
return ((
|
|
23
|
+
var l;
|
|
24
|
+
return ((l = e.templates.find((s) => s.id === t)) == null ? void 0 : l.thumbnail) ?? "";
|
|
24
25
|
},
|
|
25
26
|
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
27
|
+
const l = i[t];
|
|
28
|
+
if (!l)
|
|
28
29
|
return [];
|
|
29
30
|
const s = /* @__PURE__ */ new Map();
|
|
30
31
|
e.templates.forEach((n) => {
|
|
31
32
|
s.set(n.id, n.type);
|
|
32
33
|
});
|
|
33
|
-
const
|
|
34
|
+
const c = new Set(l);
|
|
34
35
|
return e.selectedUnsubscribePages.filter((n) => {
|
|
35
|
-
const
|
|
36
|
-
return
|
|
36
|
+
const a = s.get(n);
|
|
37
|
+
return a !== void 0 && c.has(a);
|
|
37
38
|
});
|
|
38
39
|
},
|
|
39
40
|
isActiveTypeFirstInCollection: (e) => {
|
|
@@ -47,7 +48,7 @@ const p = () => ({
|
|
|
47
48
|
hasTemplatesByCollectionType: (e) => {
|
|
48
49
|
const t = {};
|
|
49
50
|
return i[e.selectedCollectionType].forEach((s) => {
|
|
50
|
-
t[s] = e.templates.some((
|
|
51
|
+
t[s] = e.templates.some((c) => c.type === s);
|
|
51
52
|
}), t;
|
|
52
53
|
},
|
|
53
54
|
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
@@ -56,29 +57,31 @@ const p = () => ({
|
|
|
56
57
|
$reset() {
|
|
57
58
|
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
58
59
|
Object.assign(this, {
|
|
59
|
-
...
|
|
60
|
+
...r(),
|
|
60
61
|
templates: e,
|
|
61
62
|
selectedUnsubscribePages: t
|
|
62
63
|
});
|
|
63
64
|
},
|
|
64
65
|
async fetchTemplates() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
this.templates.length || (o || (o = (async () => {
|
|
67
|
+
const { getUnsubscribePages: e } = d();
|
|
68
|
+
this.templates = await e();
|
|
69
|
+
})().finally(() => {
|
|
70
|
+
o = null;
|
|
71
|
+
})), await o);
|
|
69
72
|
},
|
|
70
73
|
setCollection(e) {
|
|
71
74
|
this.selectedCollectionType = e;
|
|
72
75
|
const t = i[e];
|
|
73
76
|
if (t && t.length > 0) {
|
|
74
77
|
[this.activeType] = t;
|
|
75
|
-
const
|
|
78
|
+
const l = { ...this.selectedTemplates };
|
|
76
79
|
t.forEach((s) => {
|
|
77
|
-
if (!
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
+
if (!l[s]) {
|
|
81
|
+
const c = this.templates.find((n) => n.type === s);
|
|
82
|
+
c && (l[s] = c.id);
|
|
80
83
|
}
|
|
81
|
-
}), this.selectedTemplates =
|
|
84
|
+
}), this.selectedTemplates = l;
|
|
82
85
|
}
|
|
83
86
|
},
|
|
84
87
|
setCollectionWithoutAutoSelection(e) {
|
|
@@ -101,17 +104,17 @@ const p = () => ({
|
|
|
101
104
|
t >= 0 && (this.activeType = this.getSelectedCollection[t]);
|
|
102
105
|
},
|
|
103
106
|
loadSelectedTemplates(e) {
|
|
104
|
-
const t = new Map(this.templates.map((s) => [s.id, s.type])),
|
|
107
|
+
const t = new Map(this.templates.map((s) => [s.id, s.type])), l = { ...this.selectedTemplates };
|
|
105
108
|
e.forEach((s) => {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
}), this.selectedTemplates =
|
|
109
|
+
const c = t.get(s);
|
|
110
|
+
c !== void 0 && (l[c] = s);
|
|
111
|
+
}), this.selectedTemplates = l;
|
|
109
112
|
},
|
|
110
113
|
getSelectedTemplatesByCollection(e) {
|
|
111
|
-
const t = i[e],
|
|
114
|
+
const t = i[e], l = [];
|
|
112
115
|
return t.forEach((s) => {
|
|
113
|
-
this.selectedTemplates[s] &&
|
|
114
|
-
}),
|
|
116
|
+
this.selectedTemplates[s] && l.push(this.selectedTemplates[s]);
|
|
117
|
+
}), l;
|
|
115
118
|
},
|
|
116
119
|
addUnsubscribePages(e) {
|
|
117
120
|
const t = /* @__PURE__ */ new Set([...this.selectedUnsubscribePages, ...e]);
|
|
@@ -125,5 +128,5 @@ const p = () => ({
|
|
|
125
128
|
}
|
|
126
129
|
});
|
|
127
130
|
export {
|
|
128
|
-
|
|
131
|
+
b as useUnsubscribeStore
|
|
129
132
|
};
|
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.814593d",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
35
|
-
"@useinsider/design-system-vue": "0.14.
|
|
35
|
+
"@useinsider/design-system-vue": "0.14.28",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
38
38
|
"pinia": "2.3.1",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { safeParse as o, object as p, boolean as l, number as i, pipe as c, minLength as f, string as m } from "../../../../node_modules/valibot/dist/index.js";
|
|
2
|
-
const e = c(m(), f(1)), s = p({
|
|
3
|
-
type: e,
|
|
4
|
-
attribute: e,
|
|
5
|
-
operator: e,
|
|
6
|
-
innerGroupOperator: e,
|
|
7
|
-
outerGroupOperator: e,
|
|
8
|
-
value: e,
|
|
9
|
-
filterGroup: i(),
|
|
10
|
-
filterNumber: i(),
|
|
11
|
-
isValid: l()
|
|
12
|
-
});
|
|
13
|
-
function g(t) {
|
|
14
|
-
return o(s, t).success;
|
|
15
|
-
}
|
|
16
|
-
function S(t) {
|
|
17
|
-
const r = o(s, t);
|
|
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
|
-
})
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
s as FilterSchema,
|
|
27
|
-
S as getInvalidFilterFields,
|
|
28
|
-
g as isFilterValid
|
|
29
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Filter } from '@@/Types/recommendation';
|
|
2
|
-
import * as v from 'valibot';
|
|
3
|
-
export declare const FilterSchema: v.ObjectSchema<{
|
|
4
|
-
readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5
|
-
readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6
|
-
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
7
|
-
readonly innerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
8
|
-
readonly outerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
9
|
-
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
10
|
-
readonly filterGroup: v.NumberSchema<undefined>;
|
|
11
|
-
readonly filterNumber: v.NumberSchema<undefined>;
|
|
12
|
-
readonly isValid: v.BooleanSchema<undefined>;
|
|
13
|
-
}, undefined>;
|
|
14
|
-
export declare function isFilterValid(filter: Filter): boolean;
|
|
15
|
-
export declare function getInvalidFilterFields(filter: Filter): Set<string>;
|