@useinsider/guido 3.17.0-beta.dc7f4d2 → 3.17.0-beta.ec0523a
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 +8 -8
- package/dist/components/Guido.vue2.js +76 -78
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/components/organisms/header/EditorActions.vue2.js +43 -74
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -46
- package/dist/components/wrappers/WpDrawer.vue.js +7 -9
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useSave.js +41 -84
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +26 -33
- package/dist/guido.css +1 -1
- package/dist/src/components/Guido.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- package/dist/src/composables/useSave.d.ts +1 -6
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/stores/config.d.ts +0 -5
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/stores/config.js +6 -13
- package/dist/utils/templatePreparation.js +25 -28
- package/package.json +1 -1
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
- package/dist/composables/useSaveValidation.js +0 -279
- package/dist/composables/useSaveValidationRollout.js +0 -9
- package/dist/enums/save-validation.js +0 -4
- package/dist/src/@types/save-validation.d.ts +0 -19
- package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +0 -2
- package/dist/src/composables/useSaveValidation.d.ts +0 -6
- package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
- package/dist/src/enums/save-validation.d.ts +0 -27
- package/dist/src/stores/save-validation.d.ts +0 -22
- package/dist/stores/save-validation.js +0 -30
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useConfigStore as t } from "../stores/config.js";
|
|
2
|
-
import { computed as o } from "vue";
|
|
3
|
-
const n = ["newsletteruatcamp", "newsletterqacamp"], c = () => {
|
|
4
|
-
const e = t();
|
|
5
|
-
return { isEnabled: o(() => n.includes(e.partnerName)) };
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
c as useSaveValidationRollout
|
|
9
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var n = /* @__PURE__ */ ((s) => (s.CouponTagModified = "coupon-tag-modified", s.DuplicateUnsubBlock = "duplicate-unsub-block", s.UnsubBlockMissingTemplate = "unsub-block-missing-template", s.LiquidSyntax = "liquid-syntax", s.InvalidLinks = "invalid-links", s.LinkCheckInProgress = "link-check-in-progress", s.CustomFieldScript = "custom-field-script", s.EmptyHtml = "empty-html", s.MismatchedBraces = "mismatched-braces", s.InvalidDynamicTag = "invalid-dynamic-tag", s.InvalidCustomField = "invalid-custom-field", s.ConditionsSyntax = "conditions-syntax", s.WrongEqualityOperator = "wrong-equality-operator", s.MissingIfEndif = "missing-if-endif", s.ConditionTagSpacing = "condition-tag-spacing", s.BracesInsideIfTag = "braces-inside-if-tag", s.RecommendationRequiredFields = "recommendation-required-fields", s.RecommendationFilters = "recommendation-filters", s.InvalidImageType = "invalid-image-type", s.CheckboxUnsubGroup = "checkbox-unsub-group", s.RadioButtonUnsubGroup = "radio-button-unsub-group", s))(n || {});
|
|
2
|
-
export {
|
|
3
|
-
n as SaveValidationRule
|
|
4
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { SaveValidationRule } from '@@/Enums/save-validation';
|
|
2
|
-
import type { ToasterTypeOptions } from '@@/Enums/toaster';
|
|
3
|
-
/** Which action triggered the validation run. Drives telemetry only in v1. */
|
|
4
|
-
export type SaveValidationIntent = 'save' | 'back' | 'test';
|
|
5
|
-
/**
|
|
6
|
-
* A single validation failure instance, one per drawer row. Names avoid the
|
|
7
|
-
* public `ValidationError` (config validation) collision — NOT exported from
|
|
8
|
-
* library.ts.
|
|
9
|
-
*/
|
|
10
|
-
export interface SaveValidationError {
|
|
11
|
-
/** Stable discriminator for tests and de-duplication. */
|
|
12
|
-
rule: SaveValidationRule;
|
|
13
|
-
/** Final translated string — trans() is applied at collect time. */
|
|
14
|
-
message: string;
|
|
15
|
-
/** Raw user content (field name / tag / src) — not i18n. */
|
|
16
|
-
detail?: string;
|
|
17
|
-
/** Mirrors the legacy toaster severity. Kept for the discriminator/tests; the drawer renders a uniform icon and never reads it. */
|
|
18
|
-
type: ToasterTypeOptions;
|
|
19
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { DynamicContent } from '@@/Types/generic';
|
|
2
|
-
import type { SaveValidationError } from '@@/Types/save-validation';
|
|
3
|
-
export declare const useSaveValidation: () => {
|
|
4
|
-
collectSaveValidationErrors: (compiledHtml: string, dynamicContentList: DynamicContent[]) => Promise<SaveValidationError[]>;
|
|
5
|
-
validateCurrentTemplate: () => Promise<SaveValidationError[]>;
|
|
6
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stable discriminators for each save-validation rule site — one per rule that
|
|
3
|
-
* can produce a drawer row, kept in sync with the collector + legacy validator chains.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum SaveValidationRule {
|
|
6
|
-
CouponTagModified = "coupon-tag-modified",
|
|
7
|
-
DuplicateUnsubBlock = "duplicate-unsub-block",
|
|
8
|
-
UnsubBlockMissingTemplate = "unsub-block-missing-template",
|
|
9
|
-
LiquidSyntax = "liquid-syntax",
|
|
10
|
-
InvalidLinks = "invalid-links",
|
|
11
|
-
LinkCheckInProgress = "link-check-in-progress",
|
|
12
|
-
CustomFieldScript = "custom-field-script",
|
|
13
|
-
EmptyHtml = "empty-html",
|
|
14
|
-
MismatchedBraces = "mismatched-braces",
|
|
15
|
-
InvalidDynamicTag = "invalid-dynamic-tag",
|
|
16
|
-
InvalidCustomField = "invalid-custom-field",
|
|
17
|
-
ConditionsSyntax = "conditions-syntax",
|
|
18
|
-
WrongEqualityOperator = "wrong-equality-operator",
|
|
19
|
-
MissingIfEndif = "missing-if-endif",
|
|
20
|
-
ConditionTagSpacing = "condition-tag-spacing",
|
|
21
|
-
BracesInsideIfTag = "braces-inside-if-tag",
|
|
22
|
-
RecommendationRequiredFields = "recommendation-required-fields",
|
|
23
|
-
RecommendationFilters = "recommendation-filters",
|
|
24
|
-
InvalidImageType = "invalid-image-type",
|
|
25
|
-
CheckboxUnsubGroup = "checkbox-unsub-group",
|
|
26
|
-
RadioButtonUnsubGroup = "radio-button-unsub-group"
|
|
27
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { SaveValidationError, SaveValidationIntent } from '@@/Types/save-validation';
|
|
2
|
-
interface SaveValidationState {
|
|
3
|
-
errors: SaveValidationError[];
|
|
4
|
-
isDrawerOpen: boolean;
|
|
5
|
-
intent: SaveValidationIntent | null;
|
|
6
|
-
}
|
|
7
|
-
export declare const useSaveValidationStore: import("pinia").StoreDefinition<"guidoSaveValidation", SaveValidationState, {
|
|
8
|
-
errorCount: (state: {
|
|
9
|
-
errors: {
|
|
10
|
-
rule: import("../enums/save-validation").SaveValidationRule;
|
|
11
|
-
message: string;
|
|
12
|
-
detail?: string | undefined;
|
|
13
|
-
type: import("../enums/toaster").ToasterTypeOptions;
|
|
14
|
-
}[];
|
|
15
|
-
isDrawerOpen: boolean;
|
|
16
|
-
intent: SaveValidationIntent | null;
|
|
17
|
-
} & import("pinia").PiniaCustomStateProperties<SaveValidationState>) => number;
|
|
18
|
-
}, {
|
|
19
|
-
open(errors: SaveValidationError[], intent: SaveValidationIntent): void;
|
|
20
|
-
close(): void;
|
|
21
|
-
}>;
|
|
22
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineStore as n } from "pinia";
|
|
2
|
-
function i(e) {
|
|
3
|
-
const t = /* @__PURE__ */ new Set();
|
|
4
|
-
return e.filter((r) => {
|
|
5
|
-
const s = JSON.stringify([r.rule, r.message, r.detail ?? ""]);
|
|
6
|
-
return t.has(s) ? !1 : (t.add(s), !0);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
const o = n("guidoSaveValidation", {
|
|
10
|
-
state: () => ({
|
|
11
|
-
errors: [],
|
|
12
|
-
isDrawerOpen: !1,
|
|
13
|
-
intent: null
|
|
14
|
-
}),
|
|
15
|
-
getters: {
|
|
16
|
-
errorCount: (e) => e.errors.length
|
|
17
|
-
},
|
|
18
|
-
actions: {
|
|
19
|
-
open(e, t) {
|
|
20
|
-
this.errors = i(e), this.intent = t, this.isDrawerOpen = !0;
|
|
21
|
-
},
|
|
22
|
-
// Errors are retained so rows don't blank during the ~300ms close animation.
|
|
23
|
-
close() {
|
|
24
|
-
this.isDrawerOpen = !1;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
o as useSaveValidationStore
|
|
30
|
-
};
|