@useinsider/guido 1.0.3-beta.dfb1fcf → 1.0.3-beta.e1adf59
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 -144
- package/dist/components/Guido.vue.js +10 -12
- package/dist/components/Guido.vue2.js +101 -84
- 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/header/RightSlot.vue2.js +22 -23
- 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/useApiErrorTracking.js +120 -0
- package/dist/composables/useErrorTracking.js +98 -0
- package/dist/composables/useGuidoActions.js +9 -19
- package/dist/composables/useHttp.js +89 -52
- package/dist/composables/useStripo.js +163 -66
- package/dist/composables/useStripoErrorCategory.js +86 -0
- package/dist/composables/useStripoSlackNotifier.js +47 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/defaults.js +8 -16
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +25 -27
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/Recommendation/block.js +3 -6
- package/dist/extensions/Blocks/Recommendation/control.js +65 -109
- package/dist/extensions/Blocks/Recommendation/extension.js +7 -18
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -159
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/common-control.js +43 -125
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +33 -128
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +100 -312
- package/dist/package.json.js +1 -1
- package/dist/services/slackNotificationService.js +167 -0
- package/dist/services/stripoApi.js +49 -19
- package/dist/services/stripoErrorDeduplicationService.js +91 -0
- package/dist/src/@types/generic.d.ts +6 -42
- package/dist/src/components/Guido.vue.d.ts +3 -4
- 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/composables/useApiErrorTracking.d.ts +26 -0
- package/dist/src/composables/useErrorTracking.d.ts +30 -0
- package/dist/src/composables/useGuidoActions.d.ts +0 -9
- package/dist/src/composables/useStripoErrorCategory.d.ts +26 -0
- package/dist/src/composables/useStripoSlackNotifier.d.ts +8 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +2 -11
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -21
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -52
- package/dist/src/services/slackNotificationService.d.ts +110 -0
- package/dist/src/services/stripoErrorDeduplicationService.d.ts +75 -0
- package/dist/src/stores/config.d.ts +2 -10
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/editor.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +1 -1
- package/dist/src/stores/preview.d.ts +1 -1
- package/dist/src/stores/recommendation.d.ts +1 -1
- package/dist/src/stores/save-as-template.d.ts +1 -1
- package/dist/src/stores/toaster.d.ts +1 -1
- package/dist/src/stores/unsubscribe.d.ts +1 -1
- package/dist/src/stores/version-history.d.ts +1 -1
- 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/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -19
- package/dist/stores/config.js +5 -5
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/stores/editor.js +1 -1
- package/dist/stores/onboarding.js +27 -27
- package/dist/stores/preview.js +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/stores/save-as-template.js +2 -2
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.js +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/dateUtil.js +3 -24
- package/dist/utils/genericUtil.js +9 -20
- package/package.json +3 -3
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/config/migrator/recommendationMigrator.js +0 -293
- package/dist/enums/date.js +0 -6
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -193
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -14
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -272
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/priceHideControl.js +0 -60
- package/dist/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.js +0 -160
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -184
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/extensions/Blocks/controlFactories.js +0 -234
- 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/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -79
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -91
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -71
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/priceHideControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.d.ts +0 -50
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +0 -60
- 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 -52
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
- package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -95
- package/dist/src/utils/environmentUtil.d.ts +0 -5
- package/dist/utils/environmentUtil.js +0 -4
|
@@ -34,7 +34,7 @@ interface StoreState {
|
|
|
34
34
|
filterList: FiltersResponse;
|
|
35
35
|
filterGroup: number;
|
|
36
36
|
}
|
|
37
|
-
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"
|
|
37
|
+
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"recommendationExtension", StoreState, {
|
|
38
38
|
hasFilters: (state: {
|
|
39
39
|
recommendationCampaignUrls: Record<string, string>;
|
|
40
40
|
recommendationConfigs: {
|
|
@@ -62,26 +62,5 @@ export declare abstract class CommonControl extends Control {
|
|
|
62
62
|
*/
|
|
63
63
|
_GuIconButton({ name, icon, className }: IconButtonProps): string;
|
|
64
64
|
_GuTwoColumns(children: string[]): string;
|
|
65
|
-
/**
|
|
66
|
-
* Creates an orderable (sortable) list control
|
|
67
|
-
* @param name - The control name for value binding
|
|
68
|
-
* @param items - Array of item keys/values
|
|
69
|
-
* @param itemLabels - Optional array of objects with key and label properties for display
|
|
70
|
-
* @returns HTML string for the orderable control
|
|
71
|
-
*/
|
|
72
|
-
_GuOrderable(name: string, items: {
|
|
73
|
-
key: string;
|
|
74
|
-
label: string;
|
|
75
|
-
content: string;
|
|
76
|
-
}[]): string;
|
|
77
|
-
_GuNestedControl(id: string, content: string): string;
|
|
78
|
-
_GuExpandable(label: string, content: string): string;
|
|
79
|
-
_GuColorPicker(name: string): string;
|
|
80
|
-
_GuFontFamily(name: string, placeholder?: string): string;
|
|
81
|
-
_GuRadioButtons(name: string, buttons: {
|
|
82
|
-
text: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[]): string;
|
|
85
|
-
_GuCheckbox(name: string, caption: string): string;
|
|
86
65
|
}
|
|
87
66
|
export {};
|
|
@@ -1,13 +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
|
-
/**
|
|
7
|
-
* Opens the merge tags library modal
|
|
8
|
-
* @param dynamicContent - Currently selected dynamic content (if any)
|
|
9
|
-
* @param onDataSelectCallback - Callback invoked when user selects a merge tag
|
|
10
|
-
* @param position - Optional position data to place the modal
|
|
11
|
-
*/
|
|
12
|
-
openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void, position?: PositionData): void;
|
|
5
|
+
openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
|
|
13
6
|
}
|
|
@@ -1,66 +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 lastClickedElement;
|
|
11
|
-
private lastClickedFrame;
|
|
12
|
-
private mousedownListener;
|
|
9
|
+
private selectedDynamicContent;
|
|
13
10
|
getId(): string;
|
|
14
11
|
onRender(container: HTMLElement): void;
|
|
15
12
|
onDestroy(): void;
|
|
16
13
|
_onClick(): void;
|
|
17
|
-
/**
|
|
18
|
-
* Called when Stripo detects merge tag interactions
|
|
19
|
-
* This is the key method that receives notifications about merge tag clicks
|
|
20
|
-
* @param name - Attribute name (e.g., 'mergeTag')
|
|
21
|
-
* @param value - MergeTag object with label, value, selStart, selEnd, etc.
|
|
22
|
-
*/
|
|
23
|
-
onAttributeUpdated(name: string, value: MergeTag | null | undefined): void;
|
|
24
14
|
openMergeTagLibrary(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Opens the dynamic content library for external apps
|
|
27
|
-
* Dispatches event with dynamic content data and position
|
|
28
|
-
*/
|
|
29
|
-
private _openDynamicContentLibrary;
|
|
30
|
-
/**
|
|
31
|
-
* Gets the button's position on the screen
|
|
32
|
-
* Used to position the modal or anything else near the button
|
|
33
|
-
*/
|
|
34
|
-
private _getButtonPosition;
|
|
35
|
-
/**
|
|
36
|
-
* Sets up coordinate tracking for merge tag clicks in the iframe
|
|
37
|
-
* Workaround from Stripo intercepting click events - tracks mousedown events instead
|
|
38
|
-
*/
|
|
39
|
-
private _setupCoordinateTracking;
|
|
40
|
-
/**
|
|
41
|
-
* Gets the editor iframe element
|
|
42
|
-
*/
|
|
43
|
-
private _getEditorFrame;
|
|
44
|
-
/**
|
|
45
|
-
* Finds merge tag element in the element tree
|
|
46
|
-
*/
|
|
47
|
-
private _findMergeTagElement;
|
|
48
|
-
/**
|
|
49
|
-
* Gets the position of the last clicked element, calculated on-demand
|
|
50
|
-
* This ensures we always use the correct element's position even with rapid clicks
|
|
51
|
-
*/
|
|
52
|
-
private _getLastClickedPosition;
|
|
53
|
-
/**
|
|
54
|
-
* Calculates absolute position of element relative to page
|
|
55
|
-
*/
|
|
56
|
-
private _calculateAbsolutePosition;
|
|
57
|
-
/**
|
|
58
|
-
* Cleans up the coordinate tracking event listener
|
|
59
|
-
*/
|
|
60
|
-
private _cleanupCoordinateTracking;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the HTML template for the "Add Dynamic Content" button
|
|
63
|
-
* This button is placed in the merge tags selector UI
|
|
64
|
-
*/
|
|
65
15
|
getTemplate(): string;
|
|
66
16
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack notification payload structure
|
|
3
|
+
*/
|
|
4
|
+
export interface SlackNotificationPayload {
|
|
5
|
+
channel?: string;
|
|
6
|
+
username?: string;
|
|
7
|
+
icon_emoji?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
attachments?: SlackAttachment[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Slack attachment for formatted messages
|
|
13
|
+
*/
|
|
14
|
+
export interface SlackAttachment {
|
|
15
|
+
color?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
title_link?: string;
|
|
18
|
+
text?: string;
|
|
19
|
+
fields?: SlackField[];
|
|
20
|
+
footer?: string;
|
|
21
|
+
ts?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Slack field for structured data
|
|
25
|
+
*/
|
|
26
|
+
export interface SlackField {
|
|
27
|
+
title: string;
|
|
28
|
+
value: string;
|
|
29
|
+
short?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Slack error notification content
|
|
33
|
+
*/
|
|
34
|
+
export interface SlackErrorNotification {
|
|
35
|
+
title: string;
|
|
36
|
+
message: string;
|
|
37
|
+
errorType: string;
|
|
38
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
39
|
+
context?: Record<string, unknown>;
|
|
40
|
+
stackTrace?: string;
|
|
41
|
+
timestamp?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Service for sending error notifications to Slack
|
|
45
|
+
* Used to alert team members about critical Stripo errors
|
|
46
|
+
*/
|
|
47
|
+
export declare class SlackNotificationService {
|
|
48
|
+
private webhookUrl;
|
|
49
|
+
private channel;
|
|
50
|
+
private defaultUsername;
|
|
51
|
+
private enabled;
|
|
52
|
+
constructor(webhookUrl?: string, options?: {
|
|
53
|
+
channel?: string;
|
|
54
|
+
username?: string;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Send an error notification to Slack
|
|
59
|
+
*/
|
|
60
|
+
sendErrorNotification(notification: SlackErrorNotification): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Send a critical error that requires immediate attention
|
|
63
|
+
*/
|
|
64
|
+
sendCriticalError(title: string, message: string, context?: Record<string, unknown>): Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Send a CORS error notification
|
|
67
|
+
*/
|
|
68
|
+
sendCorsErrorNotification(resourceUrl?: string, additionalContext?: Record<string, unknown>): Promise<boolean>;
|
|
69
|
+
/**
|
|
70
|
+
* Send a plugin load error notification
|
|
71
|
+
*/
|
|
72
|
+
sendPluginLoadErrorNotification(reason: string, additionalContext?: Record<string, unknown>): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Build Slack message payload from error notification
|
|
75
|
+
*/
|
|
76
|
+
private buildErrorPayload;
|
|
77
|
+
/**
|
|
78
|
+
* Format field title for Slack (e.g., emailId -> Email ID)
|
|
79
|
+
*/
|
|
80
|
+
private formatFieldTitle;
|
|
81
|
+
/**
|
|
82
|
+
* Format field value for Slack display
|
|
83
|
+
*/
|
|
84
|
+
private formatFieldValue;
|
|
85
|
+
/**
|
|
86
|
+
* Check if notifications are enabled
|
|
87
|
+
*/
|
|
88
|
+
isEnabled(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Update webhook URL
|
|
91
|
+
*/
|
|
92
|
+
setWebhookUrl(url: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* Update channel
|
|
95
|
+
*/
|
|
96
|
+
setChannel(channel: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Enable/disable notifications
|
|
99
|
+
*/
|
|
100
|
+
setEnabled(enabled: boolean): void;
|
|
101
|
+
}
|
|
102
|
+
export declare const getSlackNotificationService: () => SlackNotificationService;
|
|
103
|
+
/**
|
|
104
|
+
* Initialize or reinitialize Slack notification service
|
|
105
|
+
*/
|
|
106
|
+
export declare const initializeSlackNotificationService: (webhookUrl?: string, options?: {
|
|
107
|
+
channel?: string;
|
|
108
|
+
username?: string;
|
|
109
|
+
enabled?: boolean;
|
|
110
|
+
}) => SlackNotificationService;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for handling Stripo error deduplication locally in Guido
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: These errors are Guido's responsibility, not consuming teams'
|
|
5
|
+
* - Errors are caught and handled within Guido
|
|
6
|
+
* - Slack alerts notify Guido team to take action
|
|
7
|
+
* - Do NOT propagate errors to consuming teams' error tracking
|
|
8
|
+
* - Do NOT require backend involvement (errors are client-side)
|
|
9
|
+
*
|
|
10
|
+
* This keeps Stripo integration issues isolated to Guido's systems
|
|
11
|
+
*/
|
|
12
|
+
export interface StripoErrorDuplication {
|
|
13
|
+
errorType: string;
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
errorCategory: string;
|
|
16
|
+
context: {
|
|
17
|
+
emailId?: string;
|
|
18
|
+
userId?: string;
|
|
19
|
+
environment?: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
reportedAt: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Service for deduplicating Stripo error alerts locally in Guido
|
|
27
|
+
* Prevents duplicate Slack notifications for the same error within a session
|
|
28
|
+
*
|
|
29
|
+
* Errors are handled entirely on the FE:
|
|
30
|
+
* - Slack notification alerts Guido team immediately (first occurrence)
|
|
31
|
+
* - Duplicate alerts suppressed within same session
|
|
32
|
+
* - Sentry/FullStory logs for analysis
|
|
33
|
+
* - No backend endpoint required
|
|
34
|
+
* - No propagation to consuming teams
|
|
35
|
+
*/
|
|
36
|
+
export declare class StripoErrorDeduplicationService {
|
|
37
|
+
private reportedErrors;
|
|
38
|
+
constructor();
|
|
39
|
+
/**
|
|
40
|
+
* Track an error locally to prevent duplicate Slack alerts
|
|
41
|
+
* Only sends Slack alert once per unique error within the same session
|
|
42
|
+
*/
|
|
43
|
+
trackError(errorData: StripoErrorDuplication): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Track plugin load error locally (CORS, script failure, timeout)
|
|
46
|
+
*/
|
|
47
|
+
trackPluginLoadError(errorMessage: string, context?: Record<string, unknown>): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Track CORS error locally
|
|
50
|
+
*/
|
|
51
|
+
trackCorsError(errorMessage: string, context?: Record<string, unknown>): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Track authentication error locally (token refresh failure)
|
|
54
|
+
* Tracks it, but Slack notifier decides whether to alert based on token expiration
|
|
55
|
+
*/
|
|
56
|
+
trackAuthenticationError(errorMessage: string, context?: Record<string, unknown>): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Generate unique deduplication key for error
|
|
59
|
+
* Format: "errorType:emailId:userId" to allow same error on different emails
|
|
60
|
+
*/
|
|
61
|
+
private getDeduplicationKey;
|
|
62
|
+
/**
|
|
63
|
+
* Clear tracked errors (for testing or session reset)
|
|
64
|
+
*/
|
|
65
|
+
clearTrackedErrors(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Get count of errors tracked in this session
|
|
68
|
+
*/
|
|
69
|
+
getTrackedErrorCount(): number;
|
|
70
|
+
}
|
|
71
|
+
export declare const getStripoErrorDeduplicationService: () => StripoErrorDeduplicationService;
|
|
72
|
+
/**
|
|
73
|
+
* Reset tracked errors (useful for testing or session reset)
|
|
74
|
+
*/
|
|
75
|
+
export declare const resetStripoErrorDeduplicationService: () => void;
|
|
@@ -3,7 +3,7 @@ interface StoreState {
|
|
|
3
3
|
guidoConfig: GuidoConfig;
|
|
4
4
|
templateConfig?: TemplateConfig;
|
|
5
5
|
}
|
|
6
|
-
export declare const useConfigStore: import("pinia").StoreDefinition<"
|
|
6
|
+
export declare const useConfigStore: import("pinia").StoreDefinition<"config", StoreState, {
|
|
7
7
|
getVariationId: (state: {
|
|
8
8
|
guidoConfig: {
|
|
9
9
|
translationsPath: string;
|
|
@@ -64,7 +64,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guidoConfi
|
|
|
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,24 +76,17 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guidoConfi
|
|
|
77
76
|
dynamicContent?: boolean | undefined;
|
|
78
77
|
saveAsTemplate?: boolean | undefined;
|
|
79
78
|
versionHistory?: boolean | undefined;
|
|
80
|
-
testMessage?: boolean | undefined;
|
|
81
|
-
displayConditions?: boolean | undefined;
|
|
82
79
|
} | undefined;
|
|
83
|
-
blocks?: {
|
|
84
|
-
excludeDefaults?: import("@@/Types/generic").GuidoBlockType[] | undefined;
|
|
85
|
-
includeCustoms?: import("@@/Types/generic").GuidoCustomBlockType[] | undefined;
|
|
86
|
-
} | undefined;
|
|
87
|
-
backButtonLabel?: string | undefined;
|
|
88
80
|
};
|
|
89
81
|
templateConfig?: {
|
|
90
82
|
preselectedDynamicContentList?: {
|
|
91
83
|
value: string;
|
|
84
|
+
text: string;
|
|
92
85
|
fallback?: string | undefined;
|
|
93
86
|
format?: {
|
|
94
87
|
key: string;
|
|
95
88
|
value: string;
|
|
96
89
|
} | undefined;
|
|
97
|
-
text: string;
|
|
98
90
|
}[] | undefined;
|
|
99
91
|
selectedUnsubscribePages?: number[] | undefined;
|
|
100
92
|
variationId?: string | undefined;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { DynamicContent } from '@@/Types/generic';
|
|
2
|
-
export declare const useDynamicContentStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dynamicContent", {
|
|
3
3
|
selectedDynamicContent: DynamicContent;
|
|
4
4
|
selectedDynamicContentList: DynamicContent[];
|
|
5
5
|
}, {
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnboardingCardConfig, OnboardingType, OnboardingStoreState } from '@@/Types/onboarding';
|
|
2
|
-
export declare const useOnboardingStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboarding", OnboardingStoreState, {
|
|
3
3
|
getOnboarding: (state: {
|
|
4
4
|
onboardings: {
|
|
5
5
|
newVersionPopup: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PreviewState, EmailFormat } from '@@/Types/preview';
|
|
2
|
-
export declare const usePreviewStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const usePreviewStore: import("pinia").StoreDefinition<"preview", PreviewState, {
|
|
3
3
|
isAMPModeEnabled: (state: {
|
|
4
4
|
emailFormat: EmailFormat;
|
|
5
5
|
ampHtml: string;
|
|
@@ -6,5 +6,5 @@ type RecommendationConfig = {
|
|
|
6
6
|
interface StoreState {
|
|
7
7
|
recommendationConfigs: RecommendationConfig[];
|
|
8
8
|
}
|
|
9
|
-
export declare const useRecommendationStore: import("pinia").StoreDefinition<"
|
|
9
|
+
export declare const useRecommendationStore: import("pinia").StoreDefinition<"recommendation", StoreState, {}, {}>;
|
|
10
10
|
export {};
|
|
@@ -17,7 +17,7 @@ interface StoreState {
|
|
|
17
17
|
message: number;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"
|
|
20
|
+
export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"saveAsTemplate", StoreState, {
|
|
21
21
|
getTemplateName: (state: {
|
|
22
22
|
templateName: string;
|
|
23
23
|
categories: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToasterState, ToasterOptions } from '@@/Types/toaster';
|
|
2
|
-
export declare const useToasterStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const useToasterStore: import("pinia").StoreDefinition<"toaster", ToasterState, {
|
|
3
3
|
shouldAutoHide: (s: {
|
|
4
4
|
status: boolean;
|
|
5
5
|
type: import("@@/Types/toaster").ToasterType;
|
|
@@ -11,7 +11,7 @@ interface StoreState {
|
|
|
11
11
|
isGlobalUnsubscribeDisabled: boolean;
|
|
12
12
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"
|
|
14
|
+
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"unsubscribe", StoreState, {
|
|
15
15
|
getSelectedCollection: (state: {
|
|
16
16
|
templates: {
|
|
17
17
|
id: number;
|
|
@@ -2,7 +2,7 @@ import type { VersionHistoryState } from '@@/Types/version-history-api';
|
|
|
2
2
|
export interface StoreState extends VersionHistoryState {
|
|
3
3
|
editorVisualMode: 'desktop' | 'mobile';
|
|
4
4
|
}
|
|
5
|
-
export declare const useVersionHistoryStore: import("pinia").StoreDefinition<"
|
|
5
|
+
export declare const useVersionHistoryStore: import("pinia").StoreDefinition<"versionHistory", StoreState, {
|
|
6
6
|
hasPreviousPatch: (state: {
|
|
7
7
|
editorVisualMode: "desktop" | "mobile";
|
|
8
8
|
previousPatch: {
|
|
@@ -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;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DynamicContent, MergeTag } from '@@/Types/generic';
|
|
2
|
-
export declare const mergeTagToDynamicContent: (mergeTag: MergeTag) => DynamicContent;
|
|
3
2
|
export declare const dynamicContentToMergeTags: (dynamicContentList: DynamicContent[]) => MergeTag[];
|
|
4
3
|
export declare const getCsrfToken: () => string;
|
|
5
4
|
/**
|
|
@@ -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
|
|
@@ -6,6 +6,10 @@ ue-main-editor-container[panel-position=SETTINGS_BLOCKS] ue-wide-panel {
|
|
|
6
6
|
right: calc(100% - calc(var(--ue-spacing-step, 5px) * 3) - 425px);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
ue-main-tabs-panel-component .fixed-panel-header {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
/* Remove with this writing task DT-28355 */
|
|
10
14
|
ue-description a {
|
|
11
15
|
display: none;
|
|
@@ -18,25 +18,6 @@ const n = `.esd-x,
|
|
|
18
18
|
border-radius: 0;
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
/* Hide block actions for product attributes */
|
|
23
|
-
.ins-recommendation-v3-block-v2 .product-attribute-cell ue-node-actions,
|
|
24
|
-
.ins-recommendation-v3-block-v2 .product-attribute-cell ue-node-panel {
|
|
25
|
-
display: none !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/* Apply to the table cell (td) with text-trim-enabled class */
|
|
29
|
-
.text-trim-enabled {
|
|
30
|
-
max-width: 0 !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.text-trim-enabled p {
|
|
34
|
-
overflow: hidden !important;
|
|
35
|
-
text-overflow: ellipsis !important;
|
|
36
|
-
white-space: nowrap !important;
|
|
37
|
-
margin: 0 !important;
|
|
38
|
-
display: block !important;
|
|
39
|
-
}
|
|
40
21
|
`;
|
|
41
22
|
export {
|
|
42
23
|
n as default
|
package/dist/stores/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DefaultGuidoConfig as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
const
|
|
1
|
+
import { DefaultGuidoConfig as e } from "../enums/defaults.js";
|
|
2
|
+
import { defineStore as i } from "pinia";
|
|
3
|
+
const r = i("config", {
|
|
4
4
|
state: () => ({
|
|
5
|
-
guidoConfig:
|
|
5
|
+
guidoConfig: e,
|
|
6
6
|
templateConfig: {}
|
|
7
7
|
}),
|
|
8
8
|
getters: {
|
|
@@ -13,5 +13,5 @@ const n = e("guidoConfig", {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
r as useConfigStore
|
|
17
17
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
|
|
2
2
|
import { defineStore as a } from "pinia";
|
|
3
|
-
const s = a("
|
|
3
|
+
const s = a("dynamicContent", {
|
|
4
4
|
state: () => ({
|
|
5
|
-
selectedDynamicContent: { text: "", value: "" },
|
|
5
|
+
selectedDynamicContent: { text: "", value: "", fallback: "" },
|
|
6
6
|
selectedDynamicContentList: []
|
|
7
7
|
}),
|
|
8
8
|
actions: {
|
package/dist/stores/editor.js
CHANGED