@useinsider/guido 3.2.0-beta.738ec8a → 3.2.0-beta.803b92e
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 +25 -1
- package/dist/@types/config/schemas.js +38 -36
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +35 -34
- package/dist/components/organisms/AutoSaveController.vue.js +17 -0
- package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +11 -9
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +35 -70
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
- package/dist/composables/useAutoSave.js +68 -0
- package/dist/composables/useSave.js +15 -15
- package/dist/enums/extensions/recommendationBlock.js +27 -28
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +12 -25
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useAutoSave.d.ts +3 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useSave.d.ts +1 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -2
- package/dist/src/stores/autosave.d.ts +6 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/utils/timeUtil.d.ts +8 -0
- package/dist/stores/autosave.js +11 -0
- package/dist/utils/timeUtil.js +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "./AutoSaveToggle.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
|
|
7
|
+
t.isHovered = !0;
|
|
8
|
+
}, mouseleave: function(s) {
|
|
9
|
+
t.isHovered = !1;
|
|
10
|
+
} } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === "saving" ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
|
|
11
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
12
|
+
o,
|
|
13
|
+
n,
|
|
14
|
+
l,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"4cbf0abd"
|
|
18
|
+
);
|
|
19
|
+
const d = r.exports;
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as m, ref as i, computed as f } from "vue";
|
|
2
|
+
import { useConfig as u } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as p } from "../../../stores/autosave.js";
|
|
5
|
+
import { useEditorStore as c } from "../../../stores/editor.js";
|
|
6
|
+
import { formatLocalTime as d } from "../../../utils/timeUtil.js";
|
|
7
|
+
import { InToggle as g, InLoading as v, InInfoBox as S } from "@useinsider/design-system-vue";
|
|
8
|
+
const B = /* @__PURE__ */ m({
|
|
9
|
+
__name: "AutoSaveToggle",
|
|
10
|
+
setup(_) {
|
|
11
|
+
const { isFeatureEnabled: t } = u(), e = c(), o = p(), r = l(), s = i(!1), n = f(() => o.status !== "saved" || !o.lastSavedAt ? "" : d(o.lastSavedAt));
|
|
12
|
+
return { __sfc: !0, isFeatureEnabled: t, editorStore: e, autosaveStore: o, trans: r, isHovered: s, lastSavedLabel: n, toggle: (a) => {
|
|
13
|
+
o.isOn = a;
|
|
14
|
+
}, InInfoBox: S, InLoading: v, InToggle: g };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
B as default
|
|
19
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return e("div", { staticClass: "d-f a-i-c" }, [t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-
|
|
6
|
-
}, a = [], n = /* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import s from "./RightSlot.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
|
|
6
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
7
|
+
s,
|
|
8
|
+
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { defineComponent as a, ref as f, computed as p } from "vue";
|
|
2
2
|
import { useConfig as u } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useTranslations as d } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import { InChips as
|
|
6
|
-
import _ from "./
|
|
7
|
-
import S from "./
|
|
8
|
-
|
|
4
|
+
import { useEditorStore as l } from "../../../stores/editor.js";
|
|
5
|
+
import { InChips as c } from "@useinsider/design-system-vue";
|
|
6
|
+
import _ from "./AutoSaveToggle.vue.js";
|
|
7
|
+
import S from "./EditorActions.vue.js";
|
|
8
|
+
import g from "./version-history/RestoreButton.vue.js";
|
|
9
|
+
const T = /* @__PURE__ */ a({
|
|
9
10
|
__name: "RightSlot",
|
|
10
11
|
setup(h, { expose: r }) {
|
|
11
|
-
const { isFeatureEnabled: o } = u(),
|
|
12
|
+
const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
|
|
12
13
|
return r({
|
|
13
14
|
handleSave: (m) => {
|
|
14
15
|
var e;
|
|
15
16
|
return (e = t.value) == null ? void 0 : e.handleSave(m);
|
|
16
17
|
}
|
|
17
|
-
}), { __sfc: !0, isFeatureEnabled: o, trans:
|
|
18
|
+
}), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
T as default
|
|
22
23
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useConfig as m } from "./useConfig.js";
|
|
2
|
+
import { useAutosaveStore as p } from "../stores/autosave.js";
|
|
3
|
+
import { useEditorStore as S } from "../stores/editor.js";
|
|
4
|
+
import { computed as E, watch as f, onUnmounted as y } from "vue";
|
|
5
|
+
const A = 18e4, c = 6e4, O = (l) => {
|
|
6
|
+
const { isFeatureEnabled: b } = m(), s = S(), t = p();
|
|
7
|
+
let o = null, u = 0;
|
|
8
|
+
const n = E(
|
|
9
|
+
() => b("autosave") && t.isOn
|
|
10
|
+
), g = () => s.hasChanges && !s.isSaveButtonDisabled && !s.isCodeEditorOpen, h = () => ({
|
|
11
|
+
hasChanges: s.hasChanges,
|
|
12
|
+
isSaveButtonDisabled: s.isSaveButtonDisabled,
|
|
13
|
+
isCodeEditorOpen: s.isCodeEditorOpen
|
|
14
|
+
}), r = async (e) => {
|
|
15
|
+
if (!n.value) {
|
|
16
|
+
console.debug("guido:autosave:skipped", { trigger: e, reason: "not-active" });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (!g()) {
|
|
20
|
+
console.debug("guido:autosave:skipped", { trigger: e, reason: "gates-blocked", gates: h() });
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (t.status === "saving") {
|
|
24
|
+
console.debug("guido:autosave:skipped", { trigger: e, reason: "already-saving" });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
console.debug("guido:autosave:save-start", { trigger: e }), t.status = "saving";
|
|
28
|
+
try {
|
|
29
|
+
await l(), s.hasChanges = !1, t.status = "saved", t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
|
|
30
|
+
} catch (i) {
|
|
31
|
+
console.debug("guido:autosave:error", { trigger: e, error: i }), t.status = "error";
|
|
32
|
+
}
|
|
33
|
+
}, a = () => {
|
|
34
|
+
const { visibilityState: e } = document;
|
|
35
|
+
if (console.debug("guido:autosave:visibility-change", {
|
|
36
|
+
visibilityState: e,
|
|
37
|
+
isActive: n.value
|
|
38
|
+
}), e !== "hidden")
|
|
39
|
+
return;
|
|
40
|
+
const i = Date.now() - u;
|
|
41
|
+
if (i < c) {
|
|
42
|
+
console.debug("guido:autosave:visibility-debounced", {
|
|
43
|
+
sinceLastMs: i,
|
|
44
|
+
debounceMs: c
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
u = Date.now(), r("visibility");
|
|
49
|
+
}, d = () => {
|
|
50
|
+
o && (clearInterval(o), o = null);
|
|
51
|
+
}, v = () => {
|
|
52
|
+
document.removeEventListener("visibilitychange", a), window.removeEventListener("pagehide", a);
|
|
53
|
+
};
|
|
54
|
+
f(
|
|
55
|
+
n,
|
|
56
|
+
(e) => {
|
|
57
|
+
console.debug("guido:autosave:active-changed", { active: e }), e ? (d(), o = setInterval(() => {
|
|
58
|
+
console.debug("guido:autosave:interval-tick"), r("interval");
|
|
59
|
+
}, A), document.addEventListener("visibilitychange", a), window.addEventListener("pagehide", a)) : (d(), v(), t.status = "idle");
|
|
60
|
+
},
|
|
61
|
+
{ immediate: !0 }
|
|
62
|
+
), y(() => {
|
|
63
|
+
d(), v();
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
O as useAutoSave
|
|
68
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useSaveStart as
|
|
4
|
-
import { useSyncModuleExtractor as
|
|
5
|
-
import { useStripoApi as
|
|
6
|
-
import { useTemplatePreparation as
|
|
7
|
-
import { useHtmlValidator as
|
|
8
|
-
import { useLiquidValidator as
|
|
9
|
-
const
|
|
10
|
-
const o =
|
|
11
|
-
return { save: async (m = !1) => {
|
|
1
|
+
import { useActionsApi as V } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as x } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as y, useSaveComplete as w } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as b } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { useStripoApi as q } from "../services/stripoApi.js";
|
|
6
|
+
import { useTemplatePreparation as H } from "../utils/templatePreparation.js";
|
|
7
|
+
import { useHtmlValidator as L } from "./useHtmlValidator.js";
|
|
8
|
+
import { useLiquidValidator as P } from "./validators/useLiquidValidator.js";
|
|
9
|
+
const U = () => {
|
|
10
|
+
const o = y(), s = w(), { validateHtml: r } = L(), { validateLiquidSyntax: n } = P(), { callbacks: a, isFeatureEnabled: l } = x(), { extractSyncModuleData: d } = b(), { setSyncModuleUnsubscriptionPages: u } = q(), { editorSave: c } = V();
|
|
11
|
+
return { save: async (m = !1, p = !1) => {
|
|
12
12
|
var i;
|
|
13
13
|
o();
|
|
14
|
-
const { prepareTemplateDetails:
|
|
14
|
+
const { prepareTemplateDetails: f } = H(), t = await f();
|
|
15
15
|
if (l("liquidSyntax")) {
|
|
16
16
|
if (!await n(t.compiledHtml))
|
|
17
17
|
return;
|
|
@@ -20,10 +20,10 @@ const F = () => {
|
|
|
20
20
|
if ((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(t))
|
|
21
21
|
return;
|
|
22
22
|
await c();
|
|
23
|
-
const { unsubscribePayload:
|
|
24
|
-
return await u(
|
|
23
|
+
const { unsubscribePayload: v, stripoModules: S } = d(t.rawHtml);
|
|
24
|
+
return await u(v), t.modules = S, m || s({ ...t, silent: p }), t;
|
|
25
25
|
} };
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
U as useSave
|
|
29
29
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
|
|
3
|
-
},
|
|
3
|
+
}, i = {
|
|
4
4
|
CLIENT_ID: "clientId"
|
|
5
|
-
},
|
|
5
|
+
}, u = [
|
|
6
6
|
{ id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
|
|
7
7
|
{ id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
|
|
8
8
|
{ id: 13, key: "userBased", name: "User Based", path: "user-based" },
|
|
@@ -13,72 +13,71 @@ const i = {
|
|
|
13
13
|
{ id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
|
|
14
14
|
{ id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
|
|
15
15
|
{ id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
|
|
16
|
-
],
|
|
16
|
+
], l = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], c = [
|
|
17
17
|
{ text: "before the amount", value: "0" },
|
|
18
18
|
{ text: "after the amount", value: "1" }
|
|
19
|
-
],
|
|
19
|
+
], d = [
|
|
20
20
|
{ text: "dot(.)", value: "." },
|
|
21
21
|
{ text: "comma(,)", value: "," }
|
|
22
|
-
],
|
|
22
|
+
], p = [
|
|
23
23
|
{ text: "0", value: "0" },
|
|
24
24
|
{ text: "1", value: "1" },
|
|
25
25
|
{ text: "2", value: "2" },
|
|
26
26
|
{ text: "3", value: "3" },
|
|
27
27
|
{ text: "4", value: "4" },
|
|
28
28
|
{ text: "5", value: "5" }
|
|
29
|
-
],
|
|
29
|
+
], e = [
|
|
30
30
|
{ text: "is exactly", value: "=" },
|
|
31
31
|
{ text: "contains", value: "~" },
|
|
32
32
|
{ text: "does not contain", value: "!~" },
|
|
33
|
-
{ text: "any of", value:
|
|
34
|
-
],
|
|
33
|
+
{ text: "any of", value: "||" }
|
|
34
|
+
], a = [
|
|
35
35
|
{ text: "is exactly", value: "=" },
|
|
36
36
|
{ text: "is not exactly", value: "!==" },
|
|
37
37
|
{ text: "contains", value: "~" },
|
|
38
38
|
{ text: "does not contain", value: "!~" },
|
|
39
|
-
{ text: "any of", value:
|
|
39
|
+
{ text: "any of", value: "||" }
|
|
40
40
|
], r = [
|
|
41
41
|
{ text: "is equal to", value: "=" },
|
|
42
42
|
{ text: "is greater than", value: ">" },
|
|
43
43
|
{ text: "is less than", value: "<" }
|
|
44
|
-
],
|
|
44
|
+
], o = [
|
|
45
45
|
{ text: "is equal to", value: "=" },
|
|
46
46
|
{ text: "after", value: ">" },
|
|
47
47
|
{ text: "before", value: "<" }
|
|
48
|
-
],
|
|
48
|
+
], n = [
|
|
49
49
|
{ text: "true", value: "==" },
|
|
50
50
|
{ text: "false", value: "!=" }
|
|
51
|
-
],
|
|
51
|
+
], m = (t) => {
|
|
52
52
|
if (!t)
|
|
53
53
|
return e;
|
|
54
54
|
switch (t) {
|
|
55
55
|
case "Boolean":
|
|
56
|
-
return s;
|
|
57
|
-
case "Date":
|
|
58
56
|
return n;
|
|
57
|
+
case "Date":
|
|
58
|
+
return o;
|
|
59
59
|
case "Number":
|
|
60
60
|
return r;
|
|
61
61
|
case "String":
|
|
62
62
|
return e;
|
|
63
63
|
case "Strings":
|
|
64
|
-
return
|
|
64
|
+
return a;
|
|
65
65
|
default:
|
|
66
66
|
return e;
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
u as
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
d as
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
n as operatorOptionsForDates,
|
|
70
|
+
l as PriceAttributes,
|
|
71
|
+
i as QUERY_PARAMS,
|
|
72
|
+
u as RecommendationFeedSourceMaps,
|
|
73
|
+
s as URLS,
|
|
74
|
+
p as currencyDecimalCounts,
|
|
75
|
+
c as currencyLocationMaps,
|
|
76
|
+
d as currencyOperators,
|
|
77
|
+
m as getOperatorOptions,
|
|
78
|
+
a as operatorOptionsForArrayOfStrings,
|
|
79
|
+
n as operatorOptionsForBooleans,
|
|
80
|
+
o as operatorOptionsForDates,
|
|
82
81
|
r as operatorOptionsForNumbers,
|
|
83
82
|
e as operatorOptionsForStrings
|
|
84
83
|
};
|
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
function m(t) {
|
|
3
|
-
try {
|
|
4
|
-
return decodeURIComponent(t);
|
|
5
|
-
} catch {
|
|
6
|
-
return t;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
function f(t) {
|
|
10
|
-
return t.split(",").filter(Boolean).map(m);
|
|
11
|
-
}
|
|
12
|
-
function y(t) {
|
|
1
|
+
function l(t) {
|
|
13
2
|
if (t.length === 0)
|
|
14
3
|
return "";
|
|
15
4
|
const o = t.sort((r, e) => r.filterNumber - e.filterNumber), u = o.map((r) => {
|
|
16
|
-
const e = r.operator ===
|
|
5
|
+
const e = r.operator === "||", a = e ? "=" : r.operator, c = e ? decodeURIComponent(r.value).split(",").join("||") : r.value;
|
|
17
6
|
return `[${r.attribute}][${a}][${c}]`;
|
|
18
|
-
}), [
|
|
19
|
-
let n =
|
|
7
|
+
}), [s, ...p] = u;
|
|
8
|
+
let n = s;
|
|
20
9
|
for (let r = 0; r < p.length; r++) {
|
|
21
10
|
const e = o[r].innerGroupOperator;
|
|
22
11
|
n += `${e}${p[r]}`;
|
|
23
12
|
}
|
|
24
13
|
return `(${n})`;
|
|
25
14
|
}
|
|
26
|
-
function
|
|
15
|
+
function G(t) {
|
|
27
16
|
if (!t || t.length === 0)
|
|
28
17
|
return "";
|
|
29
|
-
const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e),
|
|
18
|
+
const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e), s = u.map((r) => {
|
|
30
19
|
const e = o[r];
|
|
31
|
-
return
|
|
32
|
-
}), [p, ...n] =
|
|
33
|
-
let
|
|
20
|
+
return l(e);
|
|
21
|
+
}), [p, ...n] = s;
|
|
22
|
+
let i = p;
|
|
34
23
|
for (let r = 0; r < n.length; r++) {
|
|
35
24
|
const e = u[r + 1], c = o[e][0].outerGroupOperator;
|
|
36
|
-
|
|
25
|
+
i += `${c}${n[r]}`;
|
|
37
26
|
}
|
|
38
|
-
return
|
|
27
|
+
return i.trim();
|
|
39
28
|
}
|
|
40
29
|
export {
|
|
41
|
-
|
|
42
|
-
f as parseTagList,
|
|
43
|
-
m as safeDecodeURIComponent
|
|
30
|
+
G as generateCompleteFilterQuery
|
|
44
31
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-
|
|
1
|
+
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-4cbf0abd]{position:relative}.auto-save-toggle__info-box[data-v-4cbf0abd]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-fffc13d6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-fffc13d6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-fffc13d6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -178,6 +178,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
178
178
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
179
179
|
/** Enable Liquid template syntax */
|
|
180
180
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
181
|
+
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
182
|
+
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
181
183
|
}, undefined>;
|
|
182
184
|
/**
|
|
183
185
|
* Default block types available in Stripo
|
|
@@ -501,6 +503,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
501
503
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
502
504
|
/** Enable Liquid template syntax */
|
|
503
505
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
506
|
+
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
507
|
+
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
504
508
|
}, undefined>, {}>;
|
|
505
509
|
/** Block configuration */
|
|
506
510
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
11
11
|
close: () => void;
|
|
12
12
|
};
|
|
13
13
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
14
|
-
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
14
|
+
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
15
15
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
16
|
"dynamic-content:open": (detail: {
|
|
17
17
|
text: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -62,6 +62,7 @@ export declare const useConfig: () => {
|
|
|
62
62
|
unsubscribe: boolean;
|
|
63
63
|
modulesDisabled: boolean;
|
|
64
64
|
liquidSyntax: boolean;
|
|
65
|
+
autosave: boolean;
|
|
65
66
|
};
|
|
66
67
|
blocks: {
|
|
67
68
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -159,6 +160,7 @@ export declare const useConfig: () => {
|
|
|
159
160
|
unsubscribe: boolean;
|
|
160
161
|
modulesDisabled: boolean;
|
|
161
162
|
liquidSyntax: boolean;
|
|
163
|
+
autosave: boolean;
|
|
162
164
|
} | null>;
|
|
163
165
|
blocks: import("vue").ComputedRef<{
|
|
164
166
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
2
2
|
export declare const useSave: () => {
|
|
3
|
-
save: (
|
|
3
|
+
save: (isAsync?: boolean, silent?: boolean) => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
4
4
|
};
|
|
@@ -11,7 +11,6 @@ export declare const PriceAttributes: string[];
|
|
|
11
11
|
export declare const currencyLocationMaps: TextValueObject[];
|
|
12
12
|
export declare const currencyOperators: TextValueObject[];
|
|
13
13
|
export declare const currencyDecimalCounts: TextValueObject[];
|
|
14
|
-
export declare const OP_ANY_OF = "||";
|
|
15
14
|
export declare const operatorOptionsForStrings: TextValueObject[];
|
|
16
15
|
export declare const operatorOptionsForArrayOfStrings: TextValueObject[];
|
|
17
16
|
export declare const operatorOptionsForNumbers: TextValueObject[];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Filter } from '@@/Types/recommendation';
|
|
2
|
-
export declare function safeDecodeURIComponent(value: string): string;
|
|
3
|
-
export declare function parseTagList(value: string): string[];
|
|
4
2
|
/**
|
|
5
3
|
* Generates the complete query with outer group operators
|
|
6
4
|
* @param filters Array of Filter objects
|