@useinsider/guido 3.2.0-beta.572bfc6 → 3.2.0-beta.6691dff

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 (34) hide show
  1. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  2. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  3. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  4. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  5. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  6. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  7. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  8. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  9. package/dist/composables/useHtmlValidator.js +41 -36
  10. package/dist/composables/useRecommendation.js +2 -2
  11. package/dist/composables/useRibbonOffset.js +21 -0
  12. package/dist/composables/useStripo.js +5 -5
  13. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  14. package/dist/enums/displayConditions.js +78 -82
  15. package/dist/enums/extensions/recommendationBlock.js +41 -95
  16. package/dist/enums/onboarding.js +7 -2
  17. package/dist/enums/unsubscribe.js +36 -30
  18. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  19. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  20. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -11
  21. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
  22. package/dist/guido.css +1 -1
  23. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  24. package/dist/package.json.js +1 -1
  25. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  26. package/dist/src/enums/displayConditions.d.ts +1 -5
  27. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  28. package/dist/src/enums/onboarding.d.ts +6 -0
  29. package/dist/src/enums/unsubscribe.d.ts +8 -8
  30. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
  31. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
  32. package/dist/src/stores/onboarding.d.ts +4 -0
  33. package/dist/stores/onboarding.js +4 -0
  34. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.60.0" } }, s = {
1
+ const o = { stripo: { version: "2.62.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -0,0 +1,4 @@
1
+ export declare const useRibbonOffset: () => {
2
+ ribbonOffset: import("vue").Ref<number>;
3
+ getTopPosition: (baseTop: number) => string;
4
+ };
@@ -1,6 +1,2 @@
1
1
  import type { ConditionCategories } from '@@/Types/condition-categories';
2
- /**
3
- * Get display conditions lazily so translations resolve at access time.
4
- * Must be called within a Vue component context or after Pinia is initialized.
5
- */
6
- export declare const getDisplayConditions: () => ConditionCategories;
2
+ export declare const displayConditions: ConditionCategories;
@@ -6,11 +6,7 @@ export declare const URLS: {
6
6
  export declare const QUERY_PARAMS: {
7
7
  CLIENT_ID: string;
8
8
  };
9
- /**
10
- * Get recommendation feed source maps lazily so translated names resolve at access time.
11
- * Must be called within a Vue component context or after Pinia is initialized.
12
- */
13
- export declare const getRecommendationFeedSourceMaps: () => RecommendationFeedItem[];
9
+ export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
14
10
  export declare const PriceAttributes: string[];
15
11
  export declare const currencyLocationMaps: TextValueObject[];
16
12
  export declare const currencyOperators: TextValueObject[];
@@ -3,3 +3,9 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
3
3
  export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
4
4
  export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
5
5
  export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
6
+ export declare const DYNAMIC_CONTENT_BUTTON_SELECTOR = "#guido__btn-add-dynamic-content";
7
+ export declare const AMP_TOGGLE_BUTTON_SELECTOR = ".guido__amp-toggle-html";
8
+ export declare const AMP_TOGGLE_WRAPPER_SELECTOR = ".in-segments-wrapper";
9
+ export declare const HEADER_SELECTOR = "[data-testid=\"guido-header\"]";
10
+ export declare const POPOVER_LEFT_OFFSET = 158;
11
+ export declare const POPOVER_TOP_GAP = 10;
@@ -12,15 +12,15 @@ export declare const URLS: {
12
12
  UNSUBSCRIBE_URL: string;
13
13
  PREFERENCES_URL: string;
14
14
  };
15
+ export declare const PRODUCT_TYPE_URL_SEGMENTS: {
16
+ readonly 60: "email";
17
+ readonly 49: "journey";
18
+ readonly 97: "email";
19
+ };
15
20
  export declare const INSIDER_ID = "iid";
16
- export declare const DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID = "G";
17
- /**
18
- * Get the default unsubscribe group lazily so the translated name resolves at access time.
19
- * Must be called within a Vue component context or after Pinia is initialized.
20
- */
21
- export declare const getDefaultUnsubscribeGroup: () => {
22
- name: string;
23
- sendGridId: string;
21
+ export declare const DEFAULT_UNSUBSCRIBE_GROUP: {
22
+ readonly name: "Global Unsubscribe";
23
+ readonly sendGridId: "G";
24
24
  };
25
25
  export declare const UNSUBSCRIBE_PAGES_LINK = "/email/unsubscribe-pages";
26
26
  export declare const PAGE_TYPES: {
@@ -1,5 +1,5 @@
1
1
  import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
2
- interface PerBlockConfigs {
2
+ export interface PerBlockConfigs {
3
3
  cardsInRow: number;
4
4
  currencySettings: {
5
5
  name: string;
@@ -238,6 +238,12 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
238
238
  deleteFilter(filter: Filter): void;
239
239
  addFilter(filter: Filter): void;
240
240
  generateFilterQuery(): string;
241
+ /**
242
+ * Validation-only check invoked at save-CTA time. Defined as an action
243
+ * (not a getter) so reading it does not register reactive tracking on
244
+ * every block's recommendationConfigs across user edits.
245
+ */
246
+ hasInvalidBlock(): boolean;
241
247
  fetchRecommendationProducts(): Promise<void>;
242
248
  _doFetchProducts(): Promise<void>;
243
249
  }>;
@@ -0,0 +1,21 @@
1
+ import type { PerBlockConfigs } from '../store/recommendation';
2
+ import type { Currency, Languages } from '@@/Types/recommendation';
3
+ /**
4
+ * Structural slice of the recommendation extension store that descriptors may read.
5
+ * Add new fields here when a future descriptor needs them.
6
+ */
7
+ export interface ExtensionStoreSlice {
8
+ languages: Languages;
9
+ currencyList: Currency[];
10
+ }
11
+ interface RequiredField {
12
+ key: string;
13
+ getValue: (config: PerBlockConfigs) => string;
14
+ getAvailableOptions?: (store: ExtensionStoreSlice) => string[];
15
+ condition?: (config: PerBlockConfigs) => boolean;
16
+ }
17
+ export declare const REQUIRED_RECOMMENDATION_FIELDS: RequiredField[];
18
+ export declare const RecommendationRequiredFieldsKey = "newsletter.recommendation-fill-required-fields";
19
+ export declare function getInvalidFields(config: PerBlockConfigs, store: ExtensionStoreSlice): string[];
20
+ export declare function isConfigValid(config: PerBlockConfigs, store: ExtensionStoreSlice): boolean;
21
+ export {};
@@ -1392,6 +1392,10 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
1392
1392
  close(type: OnboardingType): Promise<void>;
1393
1393
  next(type: OnboardingType): void;
1394
1394
  previous(type: OnboardingType): void;
1395
+ updateCardPosition(type: OnboardingType, cardIndex: number, position: {
1396
+ top: string;
1397
+ position: string;
1398
+ }): void;
1395
1399
  setConfig(type: OnboardingType, config: OnboardingCardConfig[]): void;
1396
1400
  onDiscoverNowClicked(): Promise<void>;
1397
1401
  onRemindMeLater(): void;
@@ -71,6 +71,10 @@ const t = () => ({
71
71
  previous(n) {
72
72
  this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
73
73
  },
74
+ updateCardPosition(n, i, o) {
75
+ const s = this.onboardings[n].config[i];
76
+ s && (s.top = o.top, s.position = o.position);
77
+ },
74
78
  setConfig(n, i) {
75
79
  this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
76
80
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.2.0-beta.572bfc6",
3
+ "version": "3.2.0-beta.6691dff",
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",
@@ -32,7 +32,7 @@
32
32
  "author": "",
33
33
  "license": "ISC",
34
34
  "dependencies": {
35
- "@stripoinc/ui-editor-extensions": "3.7.0",
35
+ "@stripoinc/ui-editor-extensions": "3.8.0",
36
36
  "@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
37
37
  "@vueuse/core": "11.3.0",
38
38
  "lodash-es": "4.17.21",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "guido": {
88
88
  "stripo": {
89
- "version": "2.60.0"
89
+ "version": "2.62.0"
90
90
  }
91
91
  }
92
92
  }