@useinsider/guido 3.28.1-beta.d3309a6 → 3.28.1-beta.ff58f9a

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.
Files changed (46) hide show
  1. package/README.md +0 -10
  2. package/dist/@types/config/schemas.js +129 -142
  3. package/dist/@types/display-condition.js +21 -45
  4. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +19 -25
  5. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +55 -77
  6. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +1 -1
  7. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +43 -62
  8. package/dist/composables/useDisplayConditions.js +68 -83
  9. package/dist/enums/html-validator.js +1 -1
  10. package/dist/extensions/DisplayConditions/constants.js +10 -19
  11. package/dist/extensions/DisplayConditions/control.js +99 -120
  12. package/dist/extensions/DisplayConditions/display-conditions.css.js +6 -58
  13. package/dist/extensions/DisplayConditions/extension.js +14 -18
  14. package/dist/guido.css +1 -1
  15. package/dist/node_modules/valibot/dist/index.js +102 -118
  16. package/dist/package.json.js +1 -1
  17. package/dist/services/displayConditionApi.js +19 -18
  18. package/dist/src/@types/config/schemas.d.ts +0 -65
  19. package/dist/src/@types/display-condition.d.ts +0 -67
  20. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  21. package/dist/src/composables/useConfig.d.ts +2 -42
  22. package/dist/src/composables/useDisplayConditions.d.ts +1 -1
  23. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -2
  24. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -1
  25. package/dist/src/stores/config.d.ts +21 -441
  26. package/package.json +2 -2
  27. package/dist/components/organisms/display-conditions/LogicBuilderConnector.vue.js +0 -18
  28. package/dist/components/organisms/display-conditions/LogicBuilderConnector.vue2.js +0 -25
  29. package/dist/components/organisms/display-conditions/LogicBuilderField.vue.js +0 -28
  30. package/dist/components/organisms/display-conditions/LogicBuilderField.vue2.js +0 -28
  31. package/dist/components/organisms/display-conditions/LogicBuilderGroup.vue.js +0 -30
  32. package/dist/components/organisms/display-conditions/LogicBuilderGroup.vue2.js +0 -32
  33. package/dist/components/organisms/display-conditions/LogicBuilderRow.vue.js +0 -28
  34. package/dist/components/organisms/display-conditions/LogicBuilderRow.vue2.js +0 -60
  35. package/dist/composables/useScrollToInvalid.js +0 -15
  36. package/dist/src/components/organisms/display-conditions/LogicBuilderConnector.vue.d.ts +0 -19
  37. package/dist/src/components/organisms/display-conditions/LogicBuilderField.vue.d.ts +0 -22
  38. package/dist/src/components/organisms/display-conditions/LogicBuilderGroup.vue.d.ts +0 -24
  39. package/dist/src/components/organisms/display-conditions/LogicBuilderRow.vue.d.ts +0 -25
  40. package/dist/src/composables/useScrollToInvalid.d.ts +0 -6
  41. package/dist/src/utils/displayConditionBuilder.d.ts +0 -29
  42. package/dist/src/utils/displayConditionRules.d.ts +0 -12
  43. package/dist/src/utils/displayConditionSummary.d.ts +0 -11
  44. package/dist/utils/displayConditionBuilder.js +0 -50
  45. package/dist/utils/displayConditionRules.js +0 -91
  46. package/dist/utils/displayConditionSummary.js +0 -28
@@ -235,29 +235,6 @@ export declare const TemplateMigrationSchema: v.ObjectSchema<{
235
235
  readonly isPriceDeletedForZeroSale: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
236
236
  }, undefined>, undefined>, {}>;
237
237
  }, undefined>;
238
- /**
239
- * Attributes offered by the display-condition Logic Builder, grouped as in the property menu
240
- */
241
- export declare const DisplayConditionAttributesSchema: v.ObjectSchema<{
242
- readonly custom: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
243
- key: string;
244
- label: string;
245
- type: "string" | "number" | "boolean" | "date" | "strings";
246
- options: {
247
- label: string;
248
- value: string;
249
- }[];
250
- }[]>]>, readonly []>;
251
- readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
252
- key: string;
253
- label: string;
254
- type: "string" | "number" | "boolean" | "date" | "strings";
255
- options: {
256
- label: string;
257
- value: string;
258
- }[];
259
- }[]>]>, readonly []>;
260
- }, undefined>;
261
238
  /**
262
239
  * Template configuration - initial content and preselected values
263
240
  */
@@ -289,27 +266,6 @@ export declare const TemplateSchema: v.ObjectSchema<{
289
266
  readonly dynamicContentList: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithFallback<v.ArraySchema<v.GenericSchema<DynamicContentNode>, undefined>, readonly []>, undefined>, {}>;
290
267
  /** Valid custom field attribute names from the partner's categorized fields */
291
268
  readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
292
- /** Attributes the display-condition Logic Builder offers (`ui.externalDisplayConditions`) */
293
- readonly displayConditionAttributes: v.OptionalSchema<v.ObjectSchema<{
294
- readonly custom: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
295
- key: string;
296
- label: string;
297
- type: "string" | "number" | "boolean" | "date" | "strings";
298
- options: {
299
- label: string;
300
- value: string;
301
- }[];
302
- }[]>]>, readonly []>;
303
- readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
304
- key: string;
305
- label: string;
306
- type: "string" | "number" | "boolean" | "date" | "strings";
307
- options: {
308
- label: string;
309
- value: string;
310
- }[];
311
- }[]>]>, readonly []>;
312
- }, undefined>, {}>;
313
269
  /** Selected unsubscribe page IDs */
314
270
  readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
315
271
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
@@ -752,27 +708,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
752
708
  readonly dynamicContentList: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithFallback<v.ArraySchema<v.GenericSchema<DynamicContentNode>, undefined>, readonly []>, undefined>, {}>;
753
709
  /** Valid custom field attribute names from the partner's categorized fields */
754
710
  readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
755
- /** Attributes the display-condition Logic Builder offers (`ui.externalDisplayConditions`) */
756
- readonly displayConditionAttributes: v.OptionalSchema<v.ObjectSchema<{
757
- readonly custom: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
758
- key: string;
759
- label: string;
760
- type: "string" | "number" | "boolean" | "date" | "strings";
761
- options: {
762
- label: string;
763
- value: string;
764
- }[];
765
- }[]>]>, readonly []>;
766
- readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithFallback<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>, v.TransformAction<unknown[], {
767
- key: string;
768
- label: string;
769
- type: "string" | "number" | "boolean" | "date" | "strings";
770
- options: {
771
- label: string;
772
- value: string;
773
- }[];
774
- }[]>]>, readonly []>;
775
- }, undefined>, {}>;
776
711
  /** Selected unsubscribe page IDs */
777
712
  readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
778
713
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
@@ -1,64 +1,6 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const DisplayConditionSyntaxSchema: v.PicklistSchema<["liquid", "pongo"], undefined>;
3
3
  export declare const DisplayConditionMethodSchema: v.PicklistSchema<["codeOnly", "logicBuilder"], undefined>;
4
- export declare const AttributeTypeSchema: v.PicklistSchema<["string", "number", "boolean", "date", "strings"], undefined>;
5
- export declare const LogicOperatorSchema: v.PicklistSchema<["and", "or"], undefined>;
6
- export declare const RuleOperatorSchema: v.PicklistSchema<["is", "isNot", "contains", "notContains", "isOneOf", "isNotOneOf"], undefined>;
7
- export declare const DisplayConditionAttributeSchema: v.ObjectSchema<{
8
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
9
- readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
10
- readonly type: v.OptionalSchema<v.PicklistSchema<["string", "number", "boolean", "date", "strings"], undefined>, "string">;
11
- readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
12
- readonly label: v.StringSchema<undefined>;
13
- readonly value: v.StringSchema<undefined>;
14
- }, undefined>, undefined>, readonly []>;
15
- }, undefined>;
16
- export declare const RuleSchema: v.ObjectSchema<{
17
- readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
18
- readonly type: v.PicklistSchema<["string", "number", "boolean", "date", "strings"], undefined>;
19
- readonly operator: v.PicklistSchema<["is", "isNot", "contains", "notContains", "isOneOf", "isNotOneOf"], undefined>;
20
- readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
21
- }, undefined>;
22
- export declare const RuleGroupSchema: v.ObjectSchema<{
23
- readonly condition: v.PicklistSchema<["and", "or"], undefined>;
24
- readonly rules: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
25
- readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
26
- readonly type: v.PicklistSchema<["string", "number", "boolean", "date", "strings"], undefined>;
27
- readonly operator: v.PicklistSchema<["is", "isNot", "contains", "notContains", "isOneOf", "isNotOneOf"], undefined>;
28
- readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
29
- }, undefined>, undefined>, v.MinLengthAction<{
30
- attribute: string;
31
- type: "string" | "number" | "boolean" | "date" | "strings";
32
- operator: "is" | "isNot" | "contains" | "notContains" | "isOneOf" | "isNotOneOf";
33
- values: string[];
34
- }[], 1, undefined>]>;
35
- }, undefined>;
36
- export declare const RuleTreeSchema: v.ObjectSchema<{
37
- readonly version: v.LiteralSchema<1, undefined>;
38
- readonly condition: v.PicklistSchema<["and", "or"], undefined>;
39
- readonly groups: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
40
- readonly condition: v.PicklistSchema<["and", "or"], undefined>;
41
- readonly rules: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
42
- readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
43
- readonly type: v.PicklistSchema<["string", "number", "boolean", "date", "strings"], undefined>;
44
- readonly operator: v.PicklistSchema<["is", "isNot", "contains", "notContains", "isOneOf", "isNotOneOf"], undefined>;
45
- readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
46
- }, undefined>, undefined>, v.MinLengthAction<{
47
- attribute: string;
48
- type: "string" | "number" | "boolean" | "date" | "strings";
49
- operator: "is" | "isNot" | "contains" | "notContains" | "isOneOf" | "isNotOneOf";
50
- values: string[];
51
- }[], 1, undefined>]>;
52
- }, undefined>, undefined>, v.MinLengthAction<{
53
- condition: "and" | "or";
54
- rules: {
55
- attribute: string;
56
- type: "string" | "number" | "boolean" | "date" | "strings";
57
- operator: "is" | "isNot" | "contains" | "notContains" | "isOneOf" | "isNotOneOf";
58
- values: string[];
59
- }[];
60
- }[], 1, undefined>]>;
61
- }, undefined>;
62
4
  export declare const SavedDisplayConditionSchema: v.ObjectSchema<{
63
5
  readonly id: v.NumberSchema<undefined>;
64
6
  readonly name: v.StringSchema<undefined>;
@@ -91,20 +33,11 @@ export type DisplayConditionSyntax = v.InferOutput<typeof DisplayConditionSyntax
91
33
  export type DisplayConditionMethod = v.InferOutput<typeof DisplayConditionMethodSchema>;
92
34
  export type SavedDisplayCondition = v.InferOutput<typeof SavedDisplayConditionSchema>;
93
35
  export type DisplayConditionListResponse = v.InferOutput<typeof DisplayConditionListResponseSchema>;
94
- export type AttributeType = v.InferOutput<typeof AttributeTypeSchema>;
95
- export type LogicOperator = v.InferOutput<typeof LogicOperatorSchema>;
96
- export type RuleOperator = v.InferOutput<typeof RuleOperatorSchema>;
97
- export type DisplayConditionAttribute = v.InferOutput<typeof DisplayConditionAttributeSchema>;
98
- export type Rule = v.InferOutput<typeof RuleSchema>;
99
- export type RuleGroup = v.InferOutput<typeof RuleGroupSchema>;
100
- export type RuleTree = v.InferOutput<typeof RuleTreeSchema>;
101
36
  export interface DisplayConditionDraft {
102
37
  name: string;
103
38
  description: string;
104
- method: DisplayConditionMethod;
105
39
  codeBefore: string;
106
40
  codeAfter: string;
107
- rules: RuleTree | null;
108
41
  }
109
42
  /** Mirrors Stripo's `DisplayCondition`; kept local so Vue code does not import the Stripo package. */
110
43
  export interface AppliedDisplayCondition {
@@ -35,8 +35,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
35
35
  closeOnOutsideClick: boolean;
36
36
  footerStatus: boolean;
37
37
  }>>>, {
38
- description: string;
39
38
  size: "X-small" | "small" | "medium" | "large";
39
+ description: string;
40
40
  state: "default" | "primary" | "warning" | "danger";
41
41
  footerButtonOptions: FooterButtonGroup;
42
42
  closeButtonStatus: boolean;
@@ -17,7 +17,7 @@ export declare const useConfig: () => {
17
17
  partner: {
18
18
  name: string;
19
19
  productType: 60 | 49 | 97;
20
- messageType: 2 | 1;
20
+ messageType: 1 | 2;
21
21
  username: string;
22
22
  fallbackFont?: {
23
23
  name: string;
@@ -40,26 +40,6 @@ export declare const useConfig: () => {
40
40
  [x: string]: import("../library").DynamicContentNode[];
41
41
  };
42
42
  customFieldAttributes: string[];
43
- displayConditionAttributes: {
44
- custom: {
45
- key: string;
46
- label: string;
47
- type: "string" | "number" | "boolean" | "date" | "strings";
48
- options: {
49
- label: string;
50
- value: string;
51
- }[];
52
- }[];
53
- default: {
54
- key: string;
55
- label: string;
56
- type: "string" | "number" | "boolean" | "date" | "strings";
57
- options: {
58
- label: string;
59
- value: string;
60
- }[];
61
- }[];
62
- };
63
43
  selectedUnsubscribePages: number[];
64
44
  forceRecreate: boolean;
65
45
  trackIdCounter: number;
@@ -181,7 +161,7 @@ export declare const useConfig: () => {
181
161
  partner: import("vue").ComputedRef<{
182
162
  name: string;
183
163
  productType: 60 | 49 | 97;
184
- messageType: 2 | 1;
164
+ messageType: 1 | 2;
185
165
  username: string;
186
166
  fallbackFont?: {
187
167
  name: string;
@@ -204,26 +184,6 @@ export declare const useConfig: () => {
204
184
  [x: string]: import("../library").DynamicContentNode[];
205
185
  };
206
186
  customFieldAttributes: string[];
207
- displayConditionAttributes: {
208
- custom: {
209
- key: string;
210
- label: string;
211
- type: "string" | "number" | "boolean" | "date" | "strings";
212
- options: {
213
- label: string;
214
- value: string;
215
- }[];
216
- }[];
217
- default: {
218
- key: string;
219
- label: string;
220
- type: "string" | "number" | "boolean" | "date" | "strings";
221
- options: {
222
- label: string;
223
- value: string;
224
- }[];
225
- }[];
226
- };
227
187
  selectedUnsubscribePages: number[];
228
188
  forceRecreate: boolean;
229
189
  trackIdCounter: number;
@@ -1,5 +1,5 @@
1
1
  import type { DisplayConditionDraft, DisplayConditionOpenDetail, SavedDisplayCondition } from '@@/Types/display-condition';
2
- export type DraftField = 'name' | 'description' | 'codeBefore' | 'codeAfter';
2
+ export type DraftField = keyof DisplayConditionDraft;
3
3
  export type DraftErrors = Partial<Record<DraftField, string>>;
4
4
  export type CreateIntent = 'inline' | 'save';
5
5
  export declare const DISPLAY_CONDITIONS_TRANS_KEY = "email-editor.display-conditions";
@@ -21,5 +21,3 @@ export declare const CONDITION_BUTTONS: {
21
21
  export declare const BUILT_IN_CONDITION_CONTROLS: string[];
22
22
  export declare const EMPTY_DESCRIPTION: string;
23
23
  export declare const APPLIED_DESCRIPTION: string;
24
- export declare const RULES_INTRO = "Show this block if recipient meet the condition below";
25
- export declare const OPERATOR_LABELS: Record<string, string>;
@@ -21,6 +21,5 @@ export declare class DisplayConditionsControl extends CommonControl {
21
21
  private teardown;
22
22
  private observeCodeSize;
23
23
  private paint;
24
- private renderRules;
25
24
  private collapsedHeight;
26
25
  }