@useinsider/guido 3.26.0-beta.8251afd → 3.26.0-beta.a188943
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/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +46 -45
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +5 -6
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +19 -18
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +15 -15
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +28 -27
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +42 -27
- package/dist/composables/useCustomInterfaceAppearance.js +50 -50
- package/dist/composables/useFullStoryBridge.js +10 -9
- package/dist/composables/useSave.js +17 -19
- package/dist/composables/useSaveValidation.js +249 -142
- package/dist/composables/useTranslations.js +9 -14
- package/dist/enums/save-validation.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +14 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -40
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +15 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -15
- package/dist/extensions/Blocks/common-control.js +25 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -17
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +122 -184
- package/dist/package.json.js +1 -1
- package/dist/src/composables/useSaveValidation.d.ts +2 -2
- package/dist/src/enums/save-validation.d.ts +14 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +1 -0
- package/dist/src/utils/editorShadowRoot.d.ts +1 -0
- package/dist/stores/onboarding.js +4 -1
- package/dist/utils/editorShadowRoot.js +8 -0
- package/package.json +11 -3
- package/dist/@types/email-be/html-validation.js +0 -24
- package/dist/enums/email-be.js +0 -27
- package/dist/services/emailBe/errors/ApiError.js +0 -50
- package/dist/services/emailBe/errors/handleApiError.js +0 -31
- package/dist/services/emailBe/errors/toApiError.js +0 -71
- package/dist/services/emailBe/html/HtmlValidationService.js +0 -35
- package/dist/services/emailBe/html/index.js +0 -6
- package/dist/services/emailBe/http/HttpManager.js +0 -68
- package/dist/services/emailBe/http/RetryStack.js +0 -23
- package/dist/services/emailBe/http/client.js +0 -61
- package/dist/services/emailBe/http/index.js +0 -10
- package/dist/services/emailBe/http/transportErrors.js +0 -20
- package/dist/src/@types/email-be/html-validation.d.ts +0 -35
- package/dist/src/enums/email-be.d.ts +0 -26
- package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +0 -11
- package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -15
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
- package/dist/src/services/emailBe/errors/ApiError.d.ts +0 -40
- package/dist/src/services/emailBe/errors/handleApiError.d.ts +0 -11
- package/dist/src/services/emailBe/errors/toApiError.d.ts +0 -2
- package/dist/src/services/emailBe/html/HtmlValidationService.d.ts +0 -8
- package/dist/src/services/emailBe/html/index.d.ts +0 -2
- package/dist/src/services/emailBe/http/HttpManager.d.ts +0 -13
- package/dist/src/services/emailBe/http/RetryStack.d.ts +0 -6
- package/dist/src/services/emailBe/http/client.d.ts +0 -3
- package/dist/src/services/emailBe/http/index.d.ts +0 -2
- package/dist/src/services/emailBe/http/transportErrors.d.ts +0 -15
- package/dist/src/services/emailBe/http/types.d.ts +0 -46
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { BlockControlId, BLOCK_ROOT_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { BlockControlId } from './controlIds';
|
|
10
|
-
export { BLOCK_ROOT_SELECTOR, CSS_CLASS_BLOCK, CSS_CLASS_BLOCK_V2, } from './selectors';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and class names used across the extension
|
|
3
|
-
*
|
|
4
|
-
* Declare them ONCE here and import everywhere (template, migrator, save validator,
|
|
5
|
-
* controls). The same literal re-typed across those files is how a rename half-lands.
|
|
6
|
-
*/
|
|
7
|
-
/** Stable contract class, if the backend selects this block by name. Renaming breaks it. */
|
|
8
|
-
export declare const CSS_CLASS_BLOCK = "{{your-block}}";
|
|
9
|
-
/** Current block class — what the template emits and the migrator upgrades legacy blocks to. */
|
|
10
|
-
export declare const CSS_CLASS_BLOCK_V2 = "{{your-block}}-v2";
|
|
11
|
-
/**
|
|
12
|
-
* Block root selector — the block `<td>` itself.
|
|
13
|
-
* Used across block-level controls so edits apply to the whole block, not the title cell.
|
|
14
|
-
* Derived from the class so a rename cannot half-land.
|
|
15
|
-
*/
|
|
16
|
-
export declare const BLOCK_ROOT_SELECTOR = ".{{your-block}}-v2";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Control, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const CONTROL_BLOCK_ID = "ui-elements-{{your-control-block}}";
|
|
3
|
-
export declare class CustomControl extends Control {
|
|
4
|
-
private currentNode?;
|
|
5
|
-
private selectedUnsubGroup?;
|
|
6
|
-
private unsubList;
|
|
7
|
-
getId(): string;
|
|
8
|
-
_setFormValues(): void;
|
|
9
|
-
_getLabel(text: string, name?: string): string;
|
|
10
|
-
_getSelectItem(text: string, value: string): string;
|
|
11
|
-
_getSelect(): string;
|
|
12
|
-
getTemplate(): string;
|
|
13
|
-
_onSelectChange(value: string | number): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
16
|
-
onRender(): Promise<void>;
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const BlockBackgroundControl: {
|
|
2
|
-
new (): {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getLabels(): {
|
|
5
|
-
title: string;
|
|
6
|
-
};
|
|
7
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
8
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
9
|
-
getParentControlId(): string;
|
|
10
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
11
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
12
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
13
|
-
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"checkbox-block\" \n class=\"checkbox-block-v2 esd-block-checkbox esd-checkbox-block esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>{-{-TITLE-}-}</tr>\n <tr>{-{-DESCRIPTION-}-}</tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
|
-
/**
|
|
3
|
-
* @returns The template for the default checkbox block
|
|
4
|
-
*/
|
|
5
|
-
export declare function getDefaultTemplate(): string;
|
|
6
|
-
export default migrationTemplate;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ApiErrorCode } from '@@/Enums/email-be';
|
|
2
|
-
export type ValidationErrors = Record<string, string[]>;
|
|
3
|
-
export interface ApiErrorInit {
|
|
4
|
-
status: number;
|
|
5
|
-
code: string;
|
|
6
|
-
message: string;
|
|
7
|
-
meta?: Record<string, unknown>;
|
|
8
|
-
errors?: ValidationErrors;
|
|
9
|
-
requestId?: string;
|
|
10
|
-
authReported?: boolean;
|
|
11
|
-
cause?: unknown;
|
|
12
|
-
}
|
|
13
|
-
export declare class ApiError extends Error {
|
|
14
|
-
readonly status: number;
|
|
15
|
-
readonly code: string;
|
|
16
|
-
readonly meta: Record<string, unknown>;
|
|
17
|
-
readonly errors: ValidationErrors;
|
|
18
|
-
readonly requestId: string;
|
|
19
|
-
readonly authReported: boolean;
|
|
20
|
-
readonly cause: unknown;
|
|
21
|
-
constructor(init: ApiErrorInit);
|
|
22
|
-
is(code: ApiErrorCode): boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare class ValidationError extends ApiError {
|
|
25
|
-
firstMessage(): string;
|
|
26
|
-
}
|
|
27
|
-
export declare class NotFoundError extends ApiError {
|
|
28
|
-
}
|
|
29
|
-
export declare class ForbiddenError extends ApiError {
|
|
30
|
-
}
|
|
31
|
-
export declare class UnauthorizedError extends ApiError {
|
|
32
|
-
}
|
|
33
|
-
export declare class RateLimitError extends ApiError {
|
|
34
|
-
}
|
|
35
|
-
export declare class ServerError extends ApiError {
|
|
36
|
-
}
|
|
37
|
-
export declare class NetworkError extends ApiError {
|
|
38
|
-
}
|
|
39
|
-
export declare const isApiError: (error: unknown) => error is ApiError;
|
|
40
|
-
export declare const isValidationError: (error: unknown) => error is ValidationError;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ApiErrorCode } from '@@/Enums/email-be';
|
|
2
|
-
import { type ApiError } from './ApiError';
|
|
3
|
-
export type OverrideOutcome = void | string | false;
|
|
4
|
-
export type ErrorOverride = (error: ApiError) => OverrideOutcome;
|
|
5
|
-
export interface HandleApiErrorOptions {
|
|
6
|
-
context: string;
|
|
7
|
-
silent?: boolean;
|
|
8
|
-
overrides?: Partial<Record<ApiErrorCode | number, ErrorOverride>>;
|
|
9
|
-
}
|
|
10
|
-
export declare const GENERIC_MESSAGE_KEY = "products.something-went-wrong";
|
|
11
|
-
export declare function handleApiError(error: unknown, options: HandleApiErrorOptions): ApiError;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { HttpManager } from '@@/Services/emailBe/http/HttpManager';
|
|
2
|
-
import type { Result } from '@@/Services/emailBe/http/types';
|
|
3
|
-
import type { HtmlValidationResult, ValidateHtmlParams } from '@@/Types/email-be/html-validation';
|
|
4
|
-
export declare class HtmlValidationService {
|
|
5
|
-
private readonly http;
|
|
6
|
-
constructor(http: HttpManager);
|
|
7
|
-
validate({ html, syntax }: ValidateHtmlParams): Promise<Result<HtmlValidationResult>>;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ApiEnvelope, HttpManagerDefaults, HttpTransport, RequestConfig } from './types';
|
|
2
|
-
export declare class HttpManager {
|
|
3
|
-
private readonly transport;
|
|
4
|
-
private readonly defaults;
|
|
5
|
-
private readonly inFlight;
|
|
6
|
-
constructor(transport: HttpTransport, defaults: HttpManagerDefaults);
|
|
7
|
-
request<T>(config: RequestConfig): Promise<T>;
|
|
8
|
-
requestEnvelope<T, M = never[]>(config: RequestConfig): Promise<ApiEnvelope<T, M>>;
|
|
9
|
-
private buildKey;
|
|
10
|
-
private shouldDedup;
|
|
11
|
-
private resolveRetry;
|
|
12
|
-
private executeWithRetry;
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { HttpMethod, RetryPolicy } from './types';
|
|
2
|
-
import { type ApiError } from '@@/Services/emailBe/errors/ApiError';
|
|
3
|
-
export declare function defaultRetryFor(method: HttpMethod, fallback: RetryPolicy | null): RetryPolicy | null;
|
|
4
|
-
export declare function shouldRetry(error: ApiError, policy: RetryPolicy | null, attempt: number): boolean;
|
|
5
|
-
export declare function backoffDelay(policy: RetryPolicy, attempt: number): number;
|
|
6
|
-
export declare function delay(ms: number): Promise<void>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class HttpStatusError extends Error {
|
|
2
|
-
readonly status: number;
|
|
3
|
-
readonly body: unknown;
|
|
4
|
-
readonly requestId: string;
|
|
5
|
-
readonly authReported: boolean;
|
|
6
|
-
constructor(status: number, body: unknown, requestId: string, authReported: boolean);
|
|
7
|
-
}
|
|
8
|
-
export declare class TransportNetworkError extends Error {
|
|
9
|
-
readonly isTimeout: boolean;
|
|
10
|
-
readonly cause: unknown;
|
|
11
|
-
constructor(isTimeout: boolean, cause: unknown);
|
|
12
|
-
}
|
|
13
|
-
export declare class SessionExpiredError extends Error {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ApiError } from '@@/Services/emailBe/errors/ApiError';
|
|
2
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
|
-
export interface RetryPolicy {
|
|
4
|
-
maxRetries: number;
|
|
5
|
-
backoffMs: readonly number[];
|
|
6
|
-
}
|
|
7
|
-
export interface RequestConfig {
|
|
8
|
-
method: HttpMethod;
|
|
9
|
-
url: string;
|
|
10
|
-
params?: Record<string, string | number | boolean | null | undefined>;
|
|
11
|
-
body?: unknown;
|
|
12
|
-
retry?: RetryPolicy | null;
|
|
13
|
-
dedup?: boolean;
|
|
14
|
-
timeoutMs?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface ApiEnvelope<T, M = never[]> {
|
|
17
|
-
data: T;
|
|
18
|
-
meta: M;
|
|
19
|
-
}
|
|
20
|
-
export interface ApiErrorEnvelope {
|
|
21
|
-
requestId: string;
|
|
22
|
-
error: {
|
|
23
|
-
code: string;
|
|
24
|
-
message: string;
|
|
25
|
-
meta?: Record<string, unknown>;
|
|
26
|
-
errors?: Record<string, string[]>;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export type Result<T> = {
|
|
30
|
-
ok: true;
|
|
31
|
-
data: T;
|
|
32
|
-
} | {
|
|
33
|
-
ok: false;
|
|
34
|
-
error: ApiError;
|
|
35
|
-
};
|
|
36
|
-
export interface HttpManagerDefaults {
|
|
37
|
-
retry: RetryPolicy | null;
|
|
38
|
-
dedup: boolean;
|
|
39
|
-
}
|
|
40
|
-
export interface TransportResponse {
|
|
41
|
-
status: number;
|
|
42
|
-
data: unknown;
|
|
43
|
-
}
|
|
44
|
-
export interface HttpTransport {
|
|
45
|
-
request(config: RequestConfig): Promise<TransportResponse>;
|
|
46
|
-
}
|