@useinsider/guido 1.0.3-beta.c8da346 → 1.0.3-beta.cc03cd5
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 +3 -141
- package/dist/components/Guido.vue.js +10 -12
- package/dist/components/Guido.vue2.js +77 -82
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -19
- package/dist/composables/useStripo.js +48 -39
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/defaults.js +8 -15
- package/dist/enums/onboarding.js +1 -2
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +13 -20
- package/dist/extensions/DynamicContent/dynamic-content.js +33 -145
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +93 -311
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +1 -1
- package/dist/src/@types/generic.d.ts +4 -43
- package/dist/src/components/Guido.vue.d.ts +2 -3
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +1 -3
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +1 -3
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -8
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -50
- package/dist/src/stores/config.d.ts +1 -8
- package/dist/src/stores/dynamic-content.d.ts +2 -2
- package/dist/src/stores/editor.d.ts +0 -21
- package/dist/src/utils/dateUtil.d.ts +0 -21
- package/dist/src/utils/genericUtil.d.ts +0 -1
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/customEditorStyle.css.js +0 -5
- package/dist/stores/editor.js +1 -2
- package/dist/utils/dateUtil.js +3 -24
- package/dist/utils/genericUtil.js +7 -8
- package/package.json +4 -4
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/config/migrator/recommendationMigrator.js +0 -293
- package/dist/enums/date.js +0 -6
- package/dist/enums/extensions/recommendationBlock.js +0 -80
- package/dist/extensions/Blocks/Recommendation/block.js +0 -30
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/control.js +0 -306
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/extension.js +0 -45
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -117
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
- package/dist/extensions/Blocks/common-control.js +0 -184
- package/dist/services/recommendationApi.js +0 -43
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
- package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
- package/dist/src/composables/useBlocksConfig.d.ts +0 -11
- package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
- package/dist/src/enums/date.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -11
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -51
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -87
- package/dist/src/mock/api/recommendation.d.ts +0 -2
- package/dist/src/services/recommendationApi.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DynamicContent, GuidoConfig,
|
|
1
|
+
import type { DynamicContent, GuidoConfig, TemplateConfig } from '@@/Types/generic';
|
|
2
2
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
@@ -20,13 +20,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
20
20
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
21
21
|
saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
|
|
22
22
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
23
|
-
"dynamic-content:open": (detail: DynamicContent | null
|
|
23
|
+
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
24
24
|
back: () => void;
|
|
25
25
|
"save:start": () => void;
|
|
26
26
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
27
27
|
"on-change": (hasChanges: boolean) => void;
|
|
28
28
|
ready: () => void;
|
|
29
|
-
"onboarding:finished": () => void;
|
|
30
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
31
30
|
export default _default;
|
|
32
31
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
-
"onboarding-finished": () => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
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<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
-
"onboarding-finished": () => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
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<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
32
|
closeOnOutsideClick: boolean;
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
|
-
size: "small" | "medium" | "large";
|
|
36
35
|
description: string;
|
|
36
|
+
size: "small" | "medium" | "large";
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type { DynamicContent
|
|
1
|
+
import type { DynamicContent } from '@@/Types/generic';
|
|
2
2
|
export declare class ExternalMergeTagsLibrary {
|
|
3
3
|
selectedDynamicContent: DynamicContent | null;
|
|
4
4
|
dataSelectCallback: (data: DynamicContent) => void;
|
|
5
|
-
|
|
6
|
-
* Opens the merge tags library modal
|
|
7
|
-
* @param dynamicContent - Currently selected dynamic content (if any)
|
|
8
|
-
* @param onDataSelectCallback - Callback invoked when user selects a merge tag
|
|
9
|
-
* @param position - Optional position data to place the modal
|
|
10
|
-
*/
|
|
11
|
-
openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void, position?: PositionData): void;
|
|
5
|
+
openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
|
|
12
6
|
}
|
|
@@ -1,64 +1,16 @@
|
|
|
1
|
-
import type { MergeTag } from '@@/Types/generic';
|
|
2
1
|
import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
|
|
3
2
|
export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
|
|
4
3
|
registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
|
|
5
4
|
}
|
|
6
5
|
export declare class DynamicContentUiElementExtension extends UIElement {
|
|
7
6
|
private mergeTagsButton;
|
|
7
|
+
private listener;
|
|
8
8
|
private mergeTagsLibrary;
|
|
9
|
-
private
|
|
10
|
-
private lastClickedPosition;
|
|
11
|
-
private mousedownListener;
|
|
9
|
+
private selectedDynamicContent;
|
|
12
10
|
getId(): string;
|
|
13
11
|
onRender(container: HTMLElement): void;
|
|
14
12
|
onDestroy(): void;
|
|
15
13
|
_onClick(): void;
|
|
16
|
-
/**
|
|
17
|
-
* Called when Stripo detects merge tag interactions
|
|
18
|
-
* This is the key method that receives notifications about merge tag clicks
|
|
19
|
-
* @param name - Attribute name (e.g., 'mergeTag')
|
|
20
|
-
* @param value - MergeTag object with label, value, selStart, selEnd, etc.
|
|
21
|
-
*/
|
|
22
|
-
onAttributeUpdated(name: string, value: MergeTag | null | undefined): void;
|
|
23
14
|
openMergeTagLibrary(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Opens the dynamic content library for external apps
|
|
26
|
-
* Dispatches event with dynamic content data and position
|
|
27
|
-
*/
|
|
28
|
-
private _openDynamicContentLibrary;
|
|
29
|
-
/**
|
|
30
|
-
* Ensures merge tags library is initialized
|
|
31
|
-
*/
|
|
32
|
-
private _ensureMergeTagsLibrary;
|
|
33
|
-
/**
|
|
34
|
-
* Gets the button's position on the screen
|
|
35
|
-
* Used to position the modal near the button
|
|
36
|
-
*/
|
|
37
|
-
private _getButtonPosition;
|
|
38
|
-
/**
|
|
39
|
-
* Sets up coordinate tracking for merge tag clicks in the iframe
|
|
40
|
-
* Workaround for Stripo intercepting click events - tracks mousedown events instead
|
|
41
|
-
*/
|
|
42
|
-
private _setupCoordinateTracking;
|
|
43
|
-
/**
|
|
44
|
-
* Gets the editor iframe element
|
|
45
|
-
*/
|
|
46
|
-
private _getEditorFrame;
|
|
47
|
-
/**
|
|
48
|
-
* Finds merge tag element in the element tree
|
|
49
|
-
*/
|
|
50
|
-
private _findMergeTagElement;
|
|
51
|
-
/**
|
|
52
|
-
* Calculates absolute position of element relative to page
|
|
53
|
-
*/
|
|
54
|
-
private _calculateAbsolutePosition;
|
|
55
|
-
/**
|
|
56
|
-
* Cleans up the coordinate tracking event listener
|
|
57
|
-
*/
|
|
58
|
-
private _cleanupCoordinateTracking;
|
|
59
|
-
/**
|
|
60
|
-
* Returns the HTML template for the "Add Dynamic Content" button
|
|
61
|
-
* This button is placed in the merge tags selector UI
|
|
62
|
-
*/
|
|
63
15
|
getTemplate(): string;
|
|
64
16
|
}
|
|
@@ -64,7 +64,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"config", S
|
|
|
64
64
|
senderName: string;
|
|
65
65
|
subject: string;
|
|
66
66
|
};
|
|
67
|
-
migrationDate: number;
|
|
68
67
|
partner?: {
|
|
69
68
|
partnerName: string;
|
|
70
69
|
productType: number;
|
|
@@ -77,23 +76,17 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"config", S
|
|
|
77
76
|
dynamicContent?: boolean | undefined;
|
|
78
77
|
saveAsTemplate?: boolean | undefined;
|
|
79
78
|
versionHistory?: boolean | undefined;
|
|
80
|
-
testMessage?: boolean | undefined;
|
|
81
79
|
} | undefined;
|
|
82
|
-
blocks?: {
|
|
83
|
-
excludeDefaults?: import("@@/Types/generic").GuidoBlockType[] | undefined;
|
|
84
|
-
includeCustoms?: import("@@/Types/generic").GuidoCustomBlockType[] | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
backButtonLabel?: string | undefined;
|
|
87
80
|
};
|
|
88
81
|
templateConfig?: {
|
|
89
82
|
preselectedDynamicContentList?: {
|
|
90
83
|
value: string;
|
|
84
|
+
text: string;
|
|
91
85
|
fallback?: string | undefined;
|
|
92
86
|
format?: {
|
|
93
87
|
key: string;
|
|
94
88
|
value: string;
|
|
95
89
|
} | undefined;
|
|
96
|
-
text: string;
|
|
97
90
|
}[] | undefined;
|
|
98
91
|
selectedUnsubscribePages?: number[] | undefined;
|
|
99
92
|
variationId?: string | undefined;
|
|
@@ -6,21 +6,21 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dy
|
|
|
6
6
|
getSelectedDynamicContentList: (state: {
|
|
7
7
|
selectedDynamicContent: {
|
|
8
8
|
value: string;
|
|
9
|
+
text: string;
|
|
9
10
|
fallback?: string | undefined;
|
|
10
11
|
format?: {
|
|
11
12
|
key: string;
|
|
12
13
|
value: string;
|
|
13
14
|
} | undefined;
|
|
14
|
-
text: string;
|
|
15
15
|
};
|
|
16
16
|
selectedDynamicContentList: {
|
|
17
17
|
value: string;
|
|
18
|
+
text: string;
|
|
18
19
|
fallback?: string | undefined;
|
|
19
20
|
format?: {
|
|
20
21
|
key: string;
|
|
21
22
|
value: string;
|
|
22
23
|
} | undefined;
|
|
23
|
-
text: string;
|
|
24
24
|
}[];
|
|
25
25
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
26
26
|
selectedDynamicContent: DynamicContent;
|
|
@@ -7,7 +7,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
7
7
|
editorVisualMode: string;
|
|
8
8
|
hasChanges: boolean;
|
|
9
9
|
isStripoInitialized: boolean;
|
|
10
|
-
templateId: string;
|
|
11
10
|
}, {
|
|
12
11
|
isUndoButtonDisabled: (state: {
|
|
13
12
|
loadingStatus: boolean;
|
|
@@ -18,7 +17,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
18
17
|
editorVisualMode: string;
|
|
19
18
|
hasChanges: boolean;
|
|
20
19
|
isStripoInitialized: boolean;
|
|
21
|
-
templateId: string;
|
|
22
20
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
23
21
|
loadingStatus: boolean;
|
|
24
22
|
isCodeEditorOpen: boolean;
|
|
@@ -28,7 +26,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
28
26
|
editorVisualMode: string;
|
|
29
27
|
hasChanges: boolean;
|
|
30
28
|
isStripoInitialized: boolean;
|
|
31
|
-
templateId: string;
|
|
32
29
|
}>) => boolean;
|
|
33
30
|
isRedoButtonDisabled: (state: {
|
|
34
31
|
loadingStatus: boolean;
|
|
@@ -39,7 +36,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
39
36
|
editorVisualMode: string;
|
|
40
37
|
hasChanges: boolean;
|
|
41
38
|
isStripoInitialized: boolean;
|
|
42
|
-
templateId: string;
|
|
43
39
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
44
40
|
loadingStatus: boolean;
|
|
45
41
|
isCodeEditorOpen: boolean;
|
|
@@ -49,7 +45,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
49
45
|
editorVisualMode: string;
|
|
50
46
|
hasChanges: boolean;
|
|
51
47
|
isStripoInitialized: boolean;
|
|
52
|
-
templateId: string;
|
|
53
48
|
}>) => boolean;
|
|
54
49
|
isCodeEditorButtonDisabled: (state: {
|
|
55
50
|
loadingStatus: boolean;
|
|
@@ -60,7 +55,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
60
55
|
editorVisualMode: string;
|
|
61
56
|
hasChanges: boolean;
|
|
62
57
|
isStripoInitialized: boolean;
|
|
63
|
-
templateId: string;
|
|
64
58
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
65
59
|
loadingStatus: boolean;
|
|
66
60
|
isCodeEditorOpen: boolean;
|
|
@@ -70,7 +64,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
70
64
|
editorVisualMode: string;
|
|
71
65
|
hasChanges: boolean;
|
|
72
66
|
isStripoInitialized: boolean;
|
|
73
|
-
templateId: string;
|
|
74
67
|
}>) => boolean;
|
|
75
68
|
isPreviewButtonDisabled: (state: {
|
|
76
69
|
loadingStatus: boolean;
|
|
@@ -81,7 +74,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
81
74
|
editorVisualMode: string;
|
|
82
75
|
hasChanges: boolean;
|
|
83
76
|
isStripoInitialized: boolean;
|
|
84
|
-
templateId: string;
|
|
85
77
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
86
78
|
loadingStatus: boolean;
|
|
87
79
|
isCodeEditorOpen: boolean;
|
|
@@ -91,7 +83,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
91
83
|
editorVisualMode: string;
|
|
92
84
|
hasChanges: boolean;
|
|
93
85
|
isStripoInitialized: boolean;
|
|
94
|
-
templateId: string;
|
|
95
86
|
}>) => boolean;
|
|
96
87
|
isViewOptionsDisabled: (state: {
|
|
97
88
|
loadingStatus: boolean;
|
|
@@ -102,7 +93,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
102
93
|
editorVisualMode: string;
|
|
103
94
|
hasChanges: boolean;
|
|
104
95
|
isStripoInitialized: boolean;
|
|
105
|
-
templateId: string;
|
|
106
96
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
107
97
|
loadingStatus: boolean;
|
|
108
98
|
isCodeEditorOpen: boolean;
|
|
@@ -112,7 +102,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
112
102
|
editorVisualMode: string;
|
|
113
103
|
hasChanges: boolean;
|
|
114
104
|
isStripoInitialized: boolean;
|
|
115
|
-
templateId: string;
|
|
116
105
|
}>) => boolean;
|
|
117
106
|
isVersionHistoryButtonDisabled: (state: {
|
|
118
107
|
loadingStatus: boolean;
|
|
@@ -123,7 +112,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
123
112
|
editorVisualMode: string;
|
|
124
113
|
hasChanges: boolean;
|
|
125
114
|
isStripoInitialized: boolean;
|
|
126
|
-
templateId: string;
|
|
127
115
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
128
116
|
loadingStatus: boolean;
|
|
129
117
|
isCodeEditorOpen: boolean;
|
|
@@ -133,7 +121,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
133
121
|
editorVisualMode: string;
|
|
134
122
|
hasChanges: boolean;
|
|
135
123
|
isStripoInitialized: boolean;
|
|
136
|
-
templateId: string;
|
|
137
124
|
}>) => boolean;
|
|
138
125
|
isExportButtonDisabled: (state: {
|
|
139
126
|
loadingStatus: boolean;
|
|
@@ -144,7 +131,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
144
131
|
editorVisualMode: string;
|
|
145
132
|
hasChanges: boolean;
|
|
146
133
|
isStripoInitialized: boolean;
|
|
147
|
-
templateId: string;
|
|
148
134
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
149
135
|
loadingStatus: boolean;
|
|
150
136
|
isCodeEditorOpen: boolean;
|
|
@@ -154,7 +140,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
154
140
|
editorVisualMode: string;
|
|
155
141
|
hasChanges: boolean;
|
|
156
142
|
isStripoInitialized: boolean;
|
|
157
|
-
templateId: string;
|
|
158
143
|
}>) => boolean;
|
|
159
144
|
isSaveAsButtonDisabled: (state: {
|
|
160
145
|
loadingStatus: boolean;
|
|
@@ -165,7 +150,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
165
150
|
editorVisualMode: string;
|
|
166
151
|
hasChanges: boolean;
|
|
167
152
|
isStripoInitialized: boolean;
|
|
168
|
-
templateId: string;
|
|
169
153
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
170
154
|
loadingStatus: boolean;
|
|
171
155
|
isCodeEditorOpen: boolean;
|
|
@@ -175,7 +159,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
175
159
|
editorVisualMode: string;
|
|
176
160
|
hasChanges: boolean;
|
|
177
161
|
isStripoInitialized: boolean;
|
|
178
|
-
templateId: string;
|
|
179
162
|
}>) => boolean;
|
|
180
163
|
isTestButtonDisabled: (state: {
|
|
181
164
|
loadingStatus: boolean;
|
|
@@ -186,7 +169,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
186
169
|
editorVisualMode: string;
|
|
187
170
|
hasChanges: boolean;
|
|
188
171
|
isStripoInitialized: boolean;
|
|
189
|
-
templateId: string;
|
|
190
172
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
191
173
|
loadingStatus: boolean;
|
|
192
174
|
isCodeEditorOpen: boolean;
|
|
@@ -196,7 +178,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
196
178
|
editorVisualMode: string;
|
|
197
179
|
hasChanges: boolean;
|
|
198
180
|
isStripoInitialized: boolean;
|
|
199
|
-
templateId: string;
|
|
200
181
|
}>) => boolean;
|
|
201
182
|
isSaveButtonDisabled: (state: {
|
|
202
183
|
loadingStatus: boolean;
|
|
@@ -207,7 +188,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
207
188
|
editorVisualMode: string;
|
|
208
189
|
hasChanges: boolean;
|
|
209
190
|
isStripoInitialized: boolean;
|
|
210
|
-
templateId: string;
|
|
211
191
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
212
192
|
loadingStatus: boolean;
|
|
213
193
|
isCodeEditorOpen: boolean;
|
|
@@ -217,6 +197,5 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
217
197
|
editorVisualMode: string;
|
|
218
198
|
hasChanges: boolean;
|
|
219
199
|
isStripoInitialized: boolean;
|
|
220
|
-
templateId: string;
|
|
221
200
|
}>) => boolean;
|
|
222
201
|
}, {}>;
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Locale List:
|
|
3
|
-
* en-US -> MM/DD/YYYY
|
|
4
|
-
* en-GB -> DD/MM/YYYY
|
|
5
|
-
* tr-TR -> DD.MM.YYYY
|
|
6
|
-
*/
|
|
7
|
-
export declare const convertToDateObject: (date: string | number | Date | null | undefined) => Date;
|
|
8
|
-
export declare const locale: () => string;
|
|
9
|
-
export declare const localTz: string;
|
|
10
|
-
export declare const timezone: () => string;
|
|
11
|
-
export declare const hour12: () => boolean;
|
|
12
|
-
export declare const dateFormat: () => string;
|
|
13
|
-
/**
|
|
14
|
-
* @example 04/22/2024
|
|
15
|
-
* @param date - The date or timestamp input
|
|
16
|
-
* @param specificLocale - Locale to use for formatting
|
|
17
|
-
* @param tz - Timezone [window.l10n.timezone]
|
|
18
|
-
* @returns Formatted date string
|
|
19
|
-
*/
|
|
20
|
-
export declare const formatShortDate: (date: string | number | Date, specificLocale?: string, tz?: string) => string;
|
|
21
1
|
export declare const formatPatchDate: (timestamp: number) => string;
|
|
22
|
-
export declare const isAfterDate: (timestamp: number) => boolean;
|
|
@@ -6,4 +6,3 @@ export declare const getCsrfToken: () => string;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const getUrlParams: () => URLSearchParams;
|
|
8
8
|
export declare const getUrlParam: (paramName: string, defaultValue?: string) => string;
|
|
9
|
-
export declare const replaceString: (string?: string, values?: Record<string, string | number>, isRemoveEmptyValues?: boolean) => string;
|
|
@@ -32,16 +32,6 @@ ue-stripe-thumb:hover:not(.disabled),
|
|
|
32
32
|
padding: 0 16px 16px;
|
|
33
33
|
grid-row-gap: 16px;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
/* TODO: will be removed after we find another way to hide stripo custom modules */
|
|
37
|
-
#moduleTab_tab1,
|
|
38
|
-
button[aria-label="Default Modules"],
|
|
39
|
-
button[aria-controls="moduleTab_tab1_content"],
|
|
40
|
-
#moduleTab_tab2,
|
|
41
|
-
button[aria-label="Pre-Built AMP"],
|
|
42
|
-
button[aria-controls="moduleTab_tab2_content"] {
|
|
43
|
-
display: none !important;
|
|
44
|
-
}
|
|
45
35
|
`;
|
|
46
36
|
export {
|
|
47
37
|
o as default
|
|
@@ -18,11 +18,6 @@ const n = `.esd-x,
|
|
|
18
18
|
border-radius: 0;
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
.ins-recommendation-v3-block-v2 .product-attribute-cell ue-node-actions,
|
|
23
|
-
.ins-recommendation-v3-block-v2 .product-attribute-cell ue-node-panel {
|
|
24
|
-
display: none !important;
|
|
25
|
-
}
|
|
26
21
|
`;
|
|
27
22
|
export {
|
|
28
23
|
n as default
|
package/dist/stores/editor.js
CHANGED
package/dist/utils/dateUtil.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length === 10 ? new Date(Number(t) * 1e3) : new Date(t) : typeof t == "number" ? t.toString().length === 10 ? new Date(t * 1e3) : new Date(t) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), s = () => {
|
|
3
|
-
const t = window.l10n;
|
|
4
|
-
return (t == null ? void 0 : t.locale) === a ? r : (t == null ? void 0 : t.locale) || r;
|
|
5
|
-
}, u = new Intl.DateTimeFormat().resolvedOptions().timeZone, f = () => {
|
|
6
|
-
const t = window.l10n;
|
|
7
|
-
return (t == null ? void 0 : t.timezone) || u || c;
|
|
8
|
-
}, D = (t, e = s(), n = f()) => {
|
|
9
|
-
const o = {
|
|
10
|
-
year: "numeric",
|
|
11
|
-
month: "2-digit",
|
|
12
|
-
day: "2-digit",
|
|
13
|
-
timeZone: n
|
|
14
|
-
}, i = m(t);
|
|
15
|
-
return new Intl.DateTimeFormat(e, o).format(i);
|
|
16
|
-
}, T = (t) => {
|
|
1
|
+
const o = (t) => {
|
|
17
2
|
if (!t)
|
|
18
3
|
return "";
|
|
19
4
|
const e = new Date(t);
|
|
@@ -25,13 +10,7 @@ const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length ===
|
|
|
25
10
|
second: "2-digit",
|
|
26
11
|
hour12: !1
|
|
27
12
|
}).format(e);
|
|
28
|
-
}
|
|
13
|
+
};
|
|
29
14
|
export {
|
|
30
|
-
|
|
31
|
-
T as formatPatchDate,
|
|
32
|
-
D as formatShortDate,
|
|
33
|
-
h as isAfterDate,
|
|
34
|
-
u as localTz,
|
|
35
|
-
s as locale,
|
|
36
|
-
f as timezone
|
|
15
|
+
o as formatPatchDate
|
|
37
16
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = (l) => l.map((a) => a.format ? {
|
|
2
2
|
label: `${a.text} | ${a.format.key}=${a.format.value}`,
|
|
3
3
|
value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
|
|
4
4
|
} : {
|
|
5
5
|
label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
|
|
6
6
|
value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
|
|
7
|
-
}),
|
|
8
|
-
var
|
|
9
|
-
return ((
|
|
10
|
-
}
|
|
7
|
+
}), r = () => {
|
|
8
|
+
var l;
|
|
9
|
+
return ((l = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : l.getAttribute("content")) ?? "";
|
|
10
|
+
};
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$ as replaceString
|
|
12
|
+
e as dynamicContentToMergeTags,
|
|
13
|
+
r as getCsrfToken
|
|
15
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.cc03cd5",
|
|
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",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"author": "",
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stripoinc/ui-editor-extensions": "3.
|
|
35
|
-
"@useinsider/design-system-vue": "0.14.
|
|
34
|
+
"@stripoinc/ui-editor-extensions": "3.0.0",
|
|
35
|
+
"@useinsider/design-system-vue": "0.14.8",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
38
38
|
"pinia": "2.3.1",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"guido": {
|
|
85
85
|
"stripo": {
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.41.0"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import r from "./FilterItem.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var l = function() {
|
|
5
|
-
var a = this, e = a._self._c, t = a._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f f-d-c w-1 gap-16" }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
|
|
7
|
-
return t.emit("delete-filter", t.props.filter);
|
|
8
|
-
} } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, value: [t.selectedAttributeType] }, on: { select: function(s) {
|
|
9
|
-
return t.updateFilter({ text: "attribute", value: s.value });
|
|
10
|
-
} } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), value: [t.selectedOperatorType] }, on: { select: function(s) {
|
|
11
|
-
return t.updateFilter({ text: "operator", value: s.value });
|
|
12
|
-
} } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", type: "text", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "tooltip-status": !1, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
|
|
13
|
-
t.updateFilter({ text: "value", value: encodeURIComponent(s) });
|
|
14
|
-
} } })], 1), t.props.hasLogicAdapter ? e("div", { staticClass: "w-1 d-f a-i-c j-c-c p-r bor-b-s-s bor-b-w-1 bor-b-c-50 mt-4" }, [e(t.LogicAdapter, { staticClass: "p-a", attrs: { logic: t.props.filter.innerGroupOperator }, on: { change: function(s) {
|
|
15
|
-
return t.updateFilter({ text: "innerGroupOperator", value: s });
|
|
16
|
-
} } })], 1) : a._e()]);
|
|
17
|
-
}, n = [], o = /* @__PURE__ */ i(
|
|
18
|
-
r,
|
|
19
|
-
l,
|
|
20
|
-
n,
|
|
21
|
-
!1,
|
|
22
|
-
null,
|
|
23
|
-
"6562e38c"
|
|
24
|
-
);
|
|
25
|
-
const f = o.exports;
|
|
26
|
-
export {
|
|
27
|
-
f as default
|
|
28
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, computed as i } from "vue";
|
|
2
|
-
import { useTranslations as v } from "../../../../composables/useTranslations.js";
|
|
3
|
-
import { getOperatorOptions as a } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
|
-
import { useRecommendationExtensionStore as x } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
-
import { InButtonV2 as y, InSelect as F, InBasicTextInput as T } from "@useinsider/design-system-vue";
|
|
6
|
-
import _ from "./LogicAdapter.vue.js";
|
|
7
|
-
import { useDebounceFn as b } from "../../../../node_modules/@vueuse/shared/index.js";
|
|
8
|
-
const h = /* @__PURE__ */ f({
|
|
9
|
-
__name: "FilterItem",
|
|
10
|
-
props: {
|
|
11
|
-
filter: null,
|
|
12
|
-
index: null,
|
|
13
|
-
hasLogicAdapter: { type: Boolean }
|
|
14
|
-
},
|
|
15
|
-
emits: ["delete-filter"],
|
|
16
|
-
setup(p, { emit: u }) {
|
|
17
|
-
const e = p, n = v(), r = x(), m = [
|
|
18
|
-
{
|
|
19
|
-
text: n("email-editor.standard-filter"),
|
|
20
|
-
value: "standardFilter"
|
|
21
|
-
}
|
|
22
|
-
], s = i(() => e.filter.attribute || ""), l = i(() => r.getFilterList.find((t) => t.value === s.value) || { text: "", value: "", type: "" }), c = i(() => {
|
|
23
|
-
var t;
|
|
24
|
-
return a((t = l.value) == null ? void 0 : t.type).find((o) => o.value === e.filter.operator);
|
|
25
|
-
}), d = b((t) => {
|
|
26
|
-
console.debug("updateFilter: ", t);
|
|
27
|
-
const o = {
|
|
28
|
-
...e.filter,
|
|
29
|
-
[t.text]: t.value
|
|
30
|
-
};
|
|
31
|
-
r.updateFilter(o);
|
|
32
|
-
}, 500);
|
|
33
|
-
return { __sfc: !0, trans: n, store: r, props: e, filterTypeOptions: m, attributeType: s, selectedAttributeType: l, selectedOperatorType: c, emit: u, updateFilter: d, getOperatorOptions: a, InBasicTextInput: T, InSelect: F, InButtonV2: y, LogicAdapter: _ };
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
export {
|
|
37
|
-
h as default
|
|
38
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import o from "./FilterSelectionDrawer.vue2.js";
|
|
2
|
-
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var l = function() {
|
|
4
|
-
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return r(t.WpDrawer, { attrs: { id: "recommendation-filter-drawer", "title-text": "Filter Selection", "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.filterSelectionDrawerStatus }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.applyFilter } }, [r(t.Filters)], 1);
|
|
6
|
-
}, s = [], a = /* @__PURE__ */ n(
|
|
7
|
-
o,
|
|
8
|
-
l,
|
|
9
|
-
s,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const p = a.exports;
|
|
15
|
-
export {
|
|
16
|
-
p as default
|
|
17
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, ref as a, computed as l } from "vue";
|
|
2
|
-
import i from "../../../wrappers/WpDrawer.vue.js";
|
|
3
|
-
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
4
|
-
import { useRecommendationExtensionStore as c } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
-
import u from "./Filters.vue.js";
|
|
6
|
-
const b = /* @__PURE__ */ n({
|
|
7
|
-
__name: "FilterSelectionDrawer",
|
|
8
|
-
setup(m) {
|
|
9
|
-
const t = p(), o = c(), e = a(!1), s = l(() => ({
|
|
10
|
-
primaryButton: {
|
|
11
|
-
styling: "solid",
|
|
12
|
-
type: "primary",
|
|
13
|
-
labelText: t(
|
|
14
|
-
e.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
15
|
-
),
|
|
16
|
-
loadingStatus: e.value,
|
|
17
|
-
disabledStatus: !1
|
|
18
|
-
},
|
|
19
|
-
cancelOrBackButton: {
|
|
20
|
-
styling: "ghost",
|
|
21
|
-
type: "secondary",
|
|
22
|
-
labelText: t("products.cancel"),
|
|
23
|
-
disabledStatus: e.value
|
|
24
|
-
}
|
|
25
|
-
})), r = () => {
|
|
26
|
-
o.filterSelectionDrawerStatus = !1;
|
|
27
|
-
};
|
|
28
|
-
return { __sfc: !0, trans: t, store: o, isApplying: e, footerButtonGroupOptions: s, closeModal: r, applyFilter: () => {
|
|
29
|
-
e.value = !0, setTimeout(() => {
|
|
30
|
-
console.debug("Filter applied!"), r(), o.generateFilterQuery();
|
|
31
|
-
}, 2e3);
|
|
32
|
-
}, WpDrawer: i, Filters: u };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
b as default
|
|
37
|
-
};
|