@useinsider/guido 3.20.1-beta.2a573b4 → 3.20.1-beta.2d09f29

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 (42) hide show
  1. package/dist/composables/useActionsApi.js +22 -21
  2. package/dist/composables/useFullStoryBridge.js +10 -9
  3. package/dist/composables/useLegacyStrategyConversion.js +16 -16
  4. package/dist/composables/useStripo.js +3 -4
  5. package/dist/config/migrator/fullStoryScriptMigrator.js +5 -0
  6. package/dist/config/migrator/index.js +11 -10
  7. package/dist/extensions/Blocks/Items/block.js +42 -43
  8. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +223 -296
  9. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +205 -219
  10. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +9 -9
  11. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +36 -51
  12. package/dist/extensions/Blocks/Recommendation/utils/productIds.js +3 -5
  13. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +35 -31
  14. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +192 -271
  15. package/dist/package.json.js +1 -1
  16. package/dist/src/config/migrator/fullStoryScriptMigrator.d.ts +1 -0
  17. package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +0 -1
  18. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +0 -8
  19. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +0 -40
  20. package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +0 -1
  21. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +0 -1
  22. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -11
  23. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +0 -7
  24. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -2
  25. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -18
  26. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -7
  27. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -7
  28. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -7
  29. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -7
  30. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -7
  31. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +0 -7
  32. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -8
  33. package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +0 -7
  34. package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +0 -2
  35. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -1
  36. package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -22
  37. package/dist/src/utils/fullStoryScripts.d.ts +6 -0
  38. package/dist/static/styles/components/button.css.js +0 -5
  39. package/dist/utils/fullStoryScripts.js +8 -0
  40. package/package.json +3 -3
  41. package/dist/extensions/Blocks/Recommendation/utils/blockRefresh.js +0 -19
  42. package/dist/src/extensions/Blocks/Recommendation/utils/blockRefresh.d.ts +0 -17
@@ -0,0 +1,6 @@
1
+ export declare const FULLSTORY_BRIDGE_SCRIPT_URL = "https://email-static.useinsider.com/guido/guido-fs.js";
2
+ /**
3
+ * Removes FullStory `<script>` elements that the panel / bridge leave in the editor iframe head,
4
+ * which Stripo then serializes into the stored source. Other scripts are left untouched.
5
+ */
6
+ export declare function stripFullStoryScripts(html: string): string;
@@ -115,11 +115,6 @@ ue-color .base-input {
115
115
  width: 100%;
116
116
  }
117
117
 
118
- /* Stripo 2.79.0: empty unless templateThemeMode is DARK; its min-width: 10% squeezes ue-color by ~8px. */
119
- .container > ue-check-buttons.dark-mode-border-color-switcher {
120
- min-width: 0;
121
- }
122
-
123
118
  ue-select-text-input .select-text-input-toggle {
124
119
  top: 0;
125
120
  right: 0;
@@ -0,0 +1,8 @@
1
+ const o = "https://email-static.useinsider.com/guido/guido-fs.js", E = new RegExp("<script\\b([^>]*?)(?<!\\/)>([\\s\\S]*?)<\\/script\\s*>", "gi"), _ = /<script\b([^>]*?)\/>/gi, e = /\bsrc\s*=\s*["']?(?:https?:)?\/\/(?:[\w-]+\.)*fullstory\.com[/"'\s>]/i, R = /\bdata-fullstory-bridge\b/i, S = /\b_fs_(?:script|namespace)\b/, i = (s, t = "") => e.test(`${s} `) || R.test(s) || s.includes(o) || S.test(t);
2
+ function n(s) {
3
+ return !s || !/fullstory|_fs_|guido-fs\.js/i.test(s) ? s : s.replace(E, (t, c, r) => i(c, r) ? "" : t).replace(_, (t, c) => i(c) ? "" : t);
4
+ }
5
+ export {
6
+ o as FULLSTORY_BRIDGE_SCRIPT_URL,
7
+ n as stripFullStoryScripts
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.20.1-beta.2a573b4",
3
+ "version": "3.20.1-beta.2d09f29",
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",
@@ -52,7 +52,7 @@
52
52
  "author": "",
53
53
  "license": "ISC",
54
54
  "dependencies": {
55
- "@stripoinc/ui-editor-extensions": "3.11.0",
55
+ "@stripoinc/ui-editor-extensions": "3.10.0",
56
56
  "@useinsider/design-system-organisms": "0.0.3-beta.d816f06",
57
57
  "@useinsider/design-system-vue": "1.5.0",
58
58
  "@vueuse/core": "11.3.0",
@@ -123,7 +123,7 @@
123
123
  },
124
124
  "guido": {
125
125
  "stripo": {
126
- "version": "2.79.0"
126
+ "version": "2.77.0"
127
127
  }
128
128
  }
129
129
  }
@@ -1,19 +0,0 @@
1
- import { useRecommendationExtensionStore as u } from "../store/recommendation.js";
2
- import { commitBlockChangeOutsidePanel as d } from "./nodeConfigWriter.js";
3
- async function l(e, { pickUpdates: n, description: i, fetch: s = !0 }) {
4
- const t = u(), r = t.blockStates[e];
5
- if (!r)
6
- return !1;
7
- const { configVersion: c, adoptedSizeVersion: a } = r, f = n(r.recommendationConfigs);
8
- if (s)
9
- try {
10
- await t.fetchRecommendationProductsForBlock(e);
11
- } catch (m) {
12
- console.error("[recommendation] product refetch outside the panel failed", m);
13
- }
14
- const o = t.blockStates[e];
15
- return o ? o.configVersion !== c || o.adoptedSizeVersion !== a ? l(e, { pickUpdates: n, description: i }) : d(e, f, o.recommendationProducts, i) : !1;
16
- }
17
- export {
18
- l as refreshBlockOutsidePanel
19
- };
@@ -1,17 +0,0 @@
1
- import type { PerBlockConfigs } from '../store/recommendation';
2
- import type { PartialNodeConfig } from '../types/nodeConfig';
3
- interface BlockRefreshOptions {
4
- pickUpdates: (configs: PerBlockConfigs) => PartialNodeConfig;
5
- description: string;
6
- fetch?: boolean;
7
- }
8
- /**
9
- * Fetches one block's products and commits them with its config straight to the document, for
10
- * callers the settings panel can no longer serve (deselect, block switch, host-rendered strategy UI).
11
- * @param options.pickUpdates - the config keys this caller owns on the node
12
- * @param options.description - labels the undo entry
13
- * @param options.fetch - false when the block's products already landed and only need rendering
14
- * @returns whether the write reached a node
15
- */
16
- export declare function refreshBlockOutsidePanel(blockId: number, { pickUpdates, description, fetch }: BlockRefreshOptions): Promise<boolean>;
17
- export {};