@useinsider/guido 3.23.0-beta.95eb6bb → 3.23.0-beta.cddbd15
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/README.md +0 -1
- package/dist/@types/config/schemas.js +39 -41
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +82 -84
- package/dist/composables/useBlocksConfig.js +24 -32
- package/dist/config/compiler/utils/itemsCompilerUtils.js +42 -43
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +64 -67
- package/dist/enums/academy.js +0 -1
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
- package/dist/node_modules/valibot/dist/index.js +261 -297
- package/dist/package.json.js +2 -2
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/academy.d.ts +0 -1
- package/dist/src/stores/config.d.ts +0 -166
- package/dist/static/stripo-runtime-manifest.json.js +1 -1
- package/dist/stores/config.js +6 -13
- package/dist/utils/pairProductVariables.js +29 -30
- package/package.json +2 -2
- package/dist/@types/display-condition.js +0 -25
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
- package/dist/composables/useDisplayConditions.js +0 -109
- package/dist/enums/display-condition.js +0 -12
- package/dist/extensions/DisplayConditions/bridge.js +0 -18
- package/dist/extensions/DisplayConditions/constants.js +0 -17
- package/dist/extensions/DisplayConditions/control.js +0 -182
- package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
- package/dist/extensions/DisplayConditions/extension.js +0 -28
- package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
- package/dist/extensions/DisplayConditions/library.js +0 -27
- package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
- package/dist/services/displayConditionApi.js +0 -39
- package/dist/src/@types/display-condition.d.ts +0 -60
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
- package/dist/src/composables/useDisplayConditions.d.ts +0 -16
- package/dist/src/enums/display-condition.d.ts +0 -15
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
- package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
- package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
- package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
- package/dist/src/mock/api/display-conditions.d.ts +0 -2
- package/dist/src/services/displayConditionApi.d.ts +0 -8
- package/dist/src/stores/display-condition.d.ts +0 -84
- package/dist/src/utils/displayCondition.d.ts +0 -10
- package/dist/src/utils/protectTableText.d.ts +0 -2
- package/dist/stores/display-condition.js +0 -29
- package/dist/utils/displayCondition.js +0 -26
- package/dist/utils/protectTableText.js +0 -22
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AppliedDisplayCondition, DisplayConditionSource } from '@@/Types/display-condition';
|
|
2
|
-
export declare const parseSource: (condition: AppliedDisplayCondition | null | undefined) => DisplayConditionSource | null;
|
|
3
|
-
type ConditionLike = Omit<AppliedDisplayCondition, 'description'> & {
|
|
4
|
-
description?: string | null;
|
|
5
|
-
};
|
|
6
|
-
export declare const toAppliedCondition: (condition: ConditionLike | null | undefined) => AppliedDisplayCondition | null;
|
|
7
|
-
export declare const nextConditionId: () => number;
|
|
8
|
-
export type CodeField = 'codeBefore' | 'codeAfter';
|
|
9
|
-
export declare const findInvalidCodeFields: (codeBefore: string, codeAfter: string) => CodeField[];
|
|
10
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineStore as t } from "pinia";
|
|
2
|
-
const n = t("guidoDisplayCondition", {
|
|
3
|
-
state: () => ({
|
|
4
|
-
view: "none",
|
|
5
|
-
editing: null,
|
|
6
|
-
list: [],
|
|
7
|
-
listStatus: "idle",
|
|
8
|
-
listRequest: 0,
|
|
9
|
-
pendingDelete: null
|
|
10
|
-
}),
|
|
11
|
-
getters: {
|
|
12
|
-
isCreateOpen: (e) => e.view === "create",
|
|
13
|
-
isSelectOpen: (e) => e.view === "select"
|
|
14
|
-
},
|
|
15
|
-
actions: {
|
|
16
|
-
openCreate(e = null) {
|
|
17
|
-
this.editing = e, this.view = "create";
|
|
18
|
-
},
|
|
19
|
-
openSelect() {
|
|
20
|
-
this.editing = null, this.view = "select";
|
|
21
|
-
},
|
|
22
|
-
close() {
|
|
23
|
-
this.view = "none", this.pendingDelete = null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
n as useDisplayConditionStore
|
|
29
|
-
};
|
|
@@ -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 n = "guido-table-text:", i = new RegExp(`<!--${n}([A-Za-z0-9+/=]*)-->`, "g"), T = /<!--[\s\S]*?-->|\{%[\s\S]*?%\}|<[a-zA-Z/!?](?:[^>"']|"[^"]*"|'[^']*')*>|[^<{]+|[<{]/g, o = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr", "colgroup"]), r = /* @__PURE__ */ new Set(["col"]), f = /* @__PURE__ */ new Set([...o, ...r, "td", "th", "caption"]), p = (s) => btoa(unescape(encodeURIComponent(s))), u = (s) => decodeURIComponent(escape(atob(s))), d = (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 E(s) {
|
|
6
|
-
const e = [];
|
|
7
|
-
let a = !1;
|
|
8
|
-
return s.replace(T, (t) => {
|
|
9
|
-
if (t.startsWith("<!--") || t.startsWith("{%"))
|
|
10
|
-
return t;
|
|
11
|
-
if (t.length > 1 && t.startsWith("<")) {
|
|
12
|
-
const { name: c, closing: l } = d(t);
|
|
13
|
-
return a = f.has(c), !a || r.has(c) || (l ? e.includes(c) && e.splice(e.lastIndexOf(c)) : e.push(c)), t;
|
|
14
|
-
}
|
|
15
|
-
return a && o.has(e[e.length - 1] ?? "") && t.trim() ? `<!--${n}${p(t)}-->` : t;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const g = (s) => s.replace(i, (e, a) => u(a));
|
|
19
|
-
export {
|
|
20
|
-
E as protectTableText,
|
|
21
|
-
g as restoreTableText
|
|
22
|
-
};
|