@useinsider/guido 3.21.0-beta.1bd7edd → 3.21.0-beta.23f347e

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 (65) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +39 -41
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +79 -81
  5. package/dist/composables/useBlocksConfig.js +24 -32
  6. package/dist/config/compiler/htmlCompilerRules.js +1 -1
  7. package/dist/enums/academy.js +0 -1
  8. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +68 -59
  9. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +188 -188
  10. package/dist/guido.css +1 -1
  11. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
  12. package/dist/node_modules/valibot/dist/index.js +261 -297
  13. package/dist/package.json.js +1 -1
  14. package/dist/src/@types/config/schemas.d.ts +0 -4
  15. package/dist/src/composables/useConfig.d.ts +0 -2
  16. package/dist/src/enums/academy.d.ts +0 -1
  17. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +5 -2
  18. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +2 -0
  19. package/dist/src/stores/config.d.ts +0 -166
  20. package/dist/static/styles/components/tabs.css.js +5 -0
  21. package/dist/stores/config.js +6 -13
  22. package/dist/utils/pairProductVariables.js +14 -15
  23. package/package.json +2 -2
  24. package/dist/@types/display-condition.js +0 -25
  25. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
  26. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
  27. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
  28. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
  29. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
  30. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
  31. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
  32. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
  33. package/dist/composables/useDisplayConditions.js +0 -102
  34. package/dist/enums/display-condition.js +0 -12
  35. package/dist/extensions/DisplayConditions/bridge.js +0 -17
  36. package/dist/extensions/DisplayConditions/constants.js +0 -17
  37. package/dist/extensions/DisplayConditions/control.js +0 -178
  38. package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
  39. package/dist/extensions/DisplayConditions/extension.js +0 -28
  40. package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
  41. package/dist/extensions/DisplayConditions/library.js +0 -27
  42. package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
  43. package/dist/services/displayConditionApi.js +0 -39
  44. package/dist/src/@types/display-condition.d.ts +0 -59
  45. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
  46. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
  47. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
  48. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
  49. package/dist/src/composables/useDisplayConditions.d.ts +0 -16
  50. package/dist/src/enums/display-condition.d.ts +0 -15
  51. package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
  52. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
  53. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
  54. package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
  55. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
  56. package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
  57. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
  58. package/dist/src/mock/api/display-conditions.d.ts +0 -2
  59. package/dist/src/services/displayConditionApi.d.ts +0 -8
  60. package/dist/src/stores/display-condition.d.ts +0 -81
  61. package/dist/src/utils/displayCondition.d.ts +0 -10
  62. package/dist/src/utils/protectTableText.d.ts +0 -2
  63. package/dist/stores/display-condition.js +0 -28
  64. package/dist/utils/displayCondition.js +0 -26
  65. package/dist/utils/protectTableText.js +0 -22
@@ -1,2 +0,0 @@
1
- export declare function protectTableText(html: string): string;
2
- export declare const restoreTableText: (html: string) => string;
@@ -1,28 +0,0 @@
1
- import { defineStore as i } from "pinia";
2
- const n = i("guidoDisplayCondition", {
3
- state: () => ({
4
- view: "none",
5
- editing: null,
6
- list: [],
7
- listStatus: "idle",
8
- pendingDelete: null
9
- }),
10
- getters: {
11
- isCreateOpen: (e) => e.view === "create",
12
- isSelectOpen: (e) => e.view === "select"
13
- },
14
- actions: {
15
- openCreate(e = null) {
16
- this.editing = e, this.view = "create";
17
- },
18
- openSelect() {
19
- this.editing = null, this.view = "select";
20
- },
21
- close() {
22
- this.view = "none", this.pendingDelete = null;
23
- }
24
- }
25
- });
26
- export {
27
- n as useDisplayConditionStore
28
- };
@@ -1,26 +0,0 @@
1
- import { DisplayConditionSourceType as d } from "../enums/display-condition.js";
2
- const m = (e) => {
3
- if (!e)
4
- return null;
5
- try {
6
- return JSON.parse(e.extraData ?? "{}").source === d.INLINE ? "inline" : "saved";
7
- } catch {
8
- return "saved";
9
- }
10
- }, E = (e) => !e || !(e.name || e.beforeScript || e.afterScript) ? null : { ...e, description: e.description ?? "" };
11
- let o = 0;
12
- const w = () => (o = Math.max(Date.now(), o + 1), o), f = /{%-?\s*(\w+)[\s\S]*?-?%}/g, p = /{%[\s\S]*?%}|{{[\s\S]*?}}/g, u = /{%-?\s*(comment|raw)\s*-?%}[\s\S]*?{%-?\s*end\1\s*-?%}/g, l = /* @__PURE__ */ new Set(["if", "unless", "for", "case", "capture", "tablerow", "comment"]), h = /* @__PURE__ */ new Set(["else", "elsif", "elif", "when"]), S = (e) => /{%|%}|{{|}}/.test(e.replace(p, "")), C = (e, c) => {
13
- const t = /* @__PURE__ */ new Set(), r = [];
14
- return [["codeBefore", e], ["codeAfter", c]].forEach(([n, i]) => {
15
- const a = i.replace(u, "");
16
- S(a) && t.add(n), Array.from(a.matchAll(f), (s) => s[1]).forEach((s) => {
17
- l.has(s) ? r.push(s) : s.startsWith("end") && l.has(s.slice(3)) ? r.pop() !== s.slice(3) && t.add(n) : h.has(s) && !r.length && t.add(n);
18
- });
19
- }), r.length && t.add("codeAfter"), [...t];
20
- };
21
- export {
22
- C as findInvalidCodeFields,
23
- w as nextConditionId,
24
- m as parseSource,
25
- E as toAppliedCondition
26
- };
@@ -1,22 +0,0 @@
1
- const c = "guido-table-text:", l = new RegExp(`<!--${c}([A-Za-z0-9+/=]*)-->`, "g"), i = /<!--[\s\S]*?-->|\{%[\s\S]*?%\}|<[a-zA-Z/!?](?:[^>"']|"[^"]*"|'[^']*')*>|[^<{]+|[<{]/g, o = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), T = /* @__PURE__ */ new Set([...o, "td", "th", "caption"]), d = (s) => btoa(unescape(encodeURIComponent(s))), f = (s) => decodeURIComponent(escape(atob(s))), p = (s) => {
2
- const e = /^<(\/?)([a-zA-Z][\w-]*)/.exec(s);
3
- return { name: e ? e[2].toLowerCase() : "", closing: e ? e[1] === "/" : !1 };
4
- };
5
- function u(s) {
6
- const e = [];
7
- let a = !1;
8
- return s.replace(i, (t) => {
9
- if (t.startsWith("<!--") || t.startsWith("{%"))
10
- return t;
11
- if (t.length > 1 && t.startsWith("<")) {
12
- const { name: n, closing: r } = p(t);
13
- return a = T.has(n), a && (r ? e.includes(n) && e.splice(e.lastIndexOf(n)) : e.push(n)), t;
14
- }
15
- return a && o.has(e[e.length - 1] ?? "") && t.trim() ? `<!--${c}${d(t)}-->` : t;
16
- });
17
- }
18
- const E = (s) => s.replace(l, (e, a) => f(a));
19
- export {
20
- u as protectTableText,
21
- E as restoreTableText
22
- };