@useinsider/guido 3.24.0-beta.adaba3e → 3.24.0-beta.e71f772
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/dist/components/organisms/display-conditions/CodeEditorField.vue.js +11 -12
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +2 -2
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +1 -1
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +17 -0
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +45 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +23 -21
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +36 -36
- package/dist/extensions/DisplayConditions/constants.js +15 -6
- package/dist/extensions/DisplayConditions/control.js +107 -90
- package/dist/extensions/DisplayConditions/display-conditions.css.js +40 -15
- package/dist/extensions/DisplayConditions/extension.js +4 -4
- package/dist/guido.css +1 -1
- package/dist/package.json.js +4 -4
- package/dist/src/@types/display-condition.d.ts +1 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +18 -0
- package/dist/src/extensions/DisplayConditions/constants.d.ts +9 -0
- package/dist/src/extensions/DisplayConditions/control.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
s,
|
|
1
|
+
import r from "./CodeEditorField.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
5
|
+
return t("div", { staticClass: "guido-code-editor-field", attrs: { id: e.id } }, [t("p", { staticClass: "guido-code-editor-field__label mt-0 mb-2 f-s-1 f-w-400 l-h-1 t-c-1" }, [e._v(" " + e._s(e.label) + " ")]), t(o.InCodeSnippet, { attrs: { code: e.value, disable: e.disabled, "focus-editor": !1, invalid: !!e.error, "invalid-message": e.error, options: o.options, size: { height: e.error ? 196 : 216 }, "syntax-check": !1 }, on: { input: o.onInput, ready: o.onReady } })], 1);
|
|
6
|
+
}, a = [], n = /* @__PURE__ */ s(
|
|
7
|
+
r,
|
|
8
|
+
i,
|
|
10
9
|
a,
|
|
11
10
|
!1,
|
|
12
11
|
null,
|
|
13
|
-
|
|
12
|
+
null
|
|
14
13
|
);
|
|
15
|
-
const
|
|
14
|
+
const c = n.exports;
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
c as default
|
|
18
17
|
};
|
|
@@ -11,7 +11,7 @@ var n = function() {
|
|
|
11
11
|
return e.updateField("name", o);
|
|
12
12
|
} } }), t(e.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-description-input", name: "displayConditionDescription", "character-counter-status": !1, "disabled-status": e.isSaving, "label-text": e.descriptionLabel, "max-character-length": e.DISPLAY_CONDITION_LIMITS.DESCRIPTION_MAX, "placeholder-text": e.trans(`${e.KEY}.condition-description-placeholder`), "state-message": e.errors.description || "", states: e.errors.description ? "error" : "default", "tooltip-status": !1, value: e.draft.description }, on: { input: function(o) {
|
|
13
13
|
return e.updateField("description", o);
|
|
14
|
-
} } }), t("div", { staticClass: "guido-display-condition-create__separator" }), t("p", { staticClass: "guido-display-condition-create__method-title" }, [i._v(" " + i._s(e.trans(`${e.KEY}.select-method`)) + " ")]), t("div", { staticClass: "guido-display-condition-create__methods" }, [t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-logic-builder", disable: "", disabled: "", name: "displayConditionMethod", selected: "codeOnly", value: "logicBuilder", label: e.trans(`${e.KEY}.logic-builder`) } }), t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-code-only", name: "displayConditionMethod", selected: "codeOnly", value: "codeOnly", label: e.trans(`${e.KEY}.code-only`) } })], 1), t(e.CodeEditorField, { ref: "codeBeforeRef", staticClass: "mb-3", attrs: { id: "guido__display-condition-code-before", disabled: e.isSaving, error: e.errors.codeBefore, label: e.trans(`${e.KEY}.code-before`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeBefore }, on: { input: function(o) {
|
|
14
|
+
} } }), t("div", { staticClass: "guido-display-condition-create__separator" }), t("p", { staticClass: "guido-display-condition-create__method-title mt-0 mb-4 f-s-1 f-w-600 l-h-6 l-s-5 t-t-u t-c-55" }, [i._v(" " + i._s(e.trans(`${e.KEY}.select-method`)) + " ")]), t("div", { staticClass: "guido-display-condition-create__methods d-f mb-4" }, [t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-logic-builder", disable: "", disabled: "", name: "displayConditionMethod", selected: "codeOnly", value: "logicBuilder", label: e.trans(`${e.KEY}.logic-builder`) } }), t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-code-only", name: "displayConditionMethod", selected: "codeOnly", value: "codeOnly", label: e.trans(`${e.KEY}.code-only`) } })], 1), t(e.CodeEditorField, { ref: "codeBeforeRef", staticClass: "mb-3", attrs: { id: "guido__display-condition-code-before", disabled: e.isSaving, error: e.errors.codeBefore, label: e.trans(`${e.KEY}.code-before`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeBefore }, on: { input: function(o) {
|
|
15
15
|
return e.updateField("codeBefore", o);
|
|
16
16
|
} } }), t(e.CodeEditorField, { ref: "codeAfterRef", attrs: { id: "guido__display-condition-code-after", disabled: e.isSaving, error: e.errors.codeAfter, label: e.trans(`${e.KEY}.code-after`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeAfter }, on: { input: function(o) {
|
|
17
17
|
return e.updateField("codeAfter", o);
|
|
@@ -22,7 +22,7 @@ var n = function() {
|
|
|
22
22
|
s,
|
|
23
23
|
!1,
|
|
24
24
|
null,
|
|
25
|
-
"
|
|
25
|
+
"1d9700d1"
|
|
26
26
|
);
|
|
27
27
|
const f = d.exports;
|
|
28
28
|
export {
|
|
@@ -50,7 +50,7 @@ const Z = /* @__PURE__ */ w({
|
|
|
50
50
|
}
|
|
51
51
|
})), O = (a, t) => {
|
|
52
52
|
t !== e[a] && (e[a] = t, o.value[a] && (o.value = { ...o.value, [a]: void 0 }));
|
|
53
|
-
}, T = u(() => `${n(`${i}.condition-description`)} <span class="guido-display-condition-create__optional">(${n(`${i}.optional`)})</span>`);
|
|
53
|
+
}, T = u(() => `${n(`${i}.condition-description`)} <span class="guido-display-condition-create__optional t-c-53">(${n(`${i}.optional`)})</span>`);
|
|
54
54
|
return { __sfc: !0, trans: n, store: p, validate: v, notifyInvalid: f, createInline: y, createAndSave: _, cancel: b, describeWithAcademyLink: B, emptyDraft: m, draft: e, errors: o, isSaving: r, isReadingCode: l, isBusy: s, codeBeforeRef: g, codeAfterRef: I, openGeneration: d, descriptionText: C, footerButtonGroupOptions: D, updateField: O, descriptionLabel: T, submit: async (a) => {
|
|
55
55
|
var S, A;
|
|
56
56
|
if (s.value)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import n from "./DisplayConditionListState.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
|
+
var e = this, i = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return i(t.InNoData, { staticClass: "d-f f-d-c j-c-c f-g-1", attrs: { id: t.view.id, "button-status": !!t.view.buttonText, "button-text": t.view.buttonText, description: t.view.description, icon: t.view.icon, title: t.view.title }, on: { click: t.onClick } });
|
|
6
|
+
}, r = [], c = /* @__PURE__ */ o(
|
|
7
|
+
n,
|
|
8
|
+
s,
|
|
9
|
+
r,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const f = c.exports;
|
|
15
|
+
export {
|
|
16
|
+
f as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as s, computed as a } from "vue";
|
|
2
|
+
import { DISPLAY_CONDITIONS_TRANS_KEY as e } from "../../../composables/useDisplayConditions.js";
|
|
3
|
+
import { useTranslations as c } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { InNoData as p } from "@useinsider/design-system-vue";
|
|
5
|
+
const y = /* @__PURE__ */ s({
|
|
6
|
+
__name: "DisplayConditionListState",
|
|
7
|
+
props: {
|
|
8
|
+
state: null
|
|
9
|
+
},
|
|
10
|
+
emits: ["retry", "create"],
|
|
11
|
+
setup(i, { emit: r }) {
|
|
12
|
+
const o = i, t = c(), n = a(() => {
|
|
13
|
+
switch (o.state) {
|
|
14
|
+
case "error":
|
|
15
|
+
return {
|
|
16
|
+
id: "guido__display-condition-error",
|
|
17
|
+
icon: "no-data",
|
|
18
|
+
title: t(`${e}.error-load-title`),
|
|
19
|
+
description: t(`${e}.error-load`),
|
|
20
|
+
buttonText: t(`${e}.retry`)
|
|
21
|
+
};
|
|
22
|
+
case "empty":
|
|
23
|
+
return {
|
|
24
|
+
id: "guido__display-condition-empty",
|
|
25
|
+
icon: "no-personalization",
|
|
26
|
+
title: t(`${e}.empty-title`),
|
|
27
|
+
description: t(`${e}.empty-description`),
|
|
28
|
+
buttonText: t(`${e}.create-new`)
|
|
29
|
+
};
|
|
30
|
+
default:
|
|
31
|
+
return {
|
|
32
|
+
id: "guido__display-condition-no-result",
|
|
33
|
+
icon: "no-data",
|
|
34
|
+
title: t(`${e}.no-result`)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return { __sfc: !0, props: o, emit: r, trans: t, view: n, onClick: () => {
|
|
39
|
+
o.state === "error" ? r("retry") : o.state === "empty" && r("create");
|
|
40
|
+
}, InNoData: p };
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
y as default
|
|
45
|
+
};
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./DisplayConditionSelectDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var s = this,
|
|
6
|
-
return
|
|
7
|
-
t.search =
|
|
8
|
-
} } }) : s._e(), t.store.listStatus === "loading" || t.store.listStatus === "idle" ?
|
|
9
|
-
return
|
|
10
|
-
}), 1) : t.
|
|
11
|
-
return i("li", { key: e.id, staticClass: "guido-display-condition-card", attrs: { "data-condition-id": e.id } }, [i("div", { staticClass: "guido-display-condition-card__header" }, [i("div", { staticClass: "guido-display-condition-card__text" }, [i("p", { staticClass: "guido-display-condition-card__name" }, [s._v(" " + s._s(e.name) + " ")]), e.description ? i("p", { staticClass: "guido-display-condition-card__description" }, [s._v(" " + s._s(e.description) + " ")]) : s._e()]), i("div", { staticClass: "guido-display-condition-card__actions" }, [i("div", { staticClass: "guido-display-condition-card__split" }, [i(t.InButtonV2, { attrs: { id: `guido__display-condition-select-${e.id}`, type: "subtle-primary", "label-text": t.trans(`${t.KEY}.select`) }, on: { click: function(n) {
|
|
12
|
-
return t.select(e);
|
|
13
|
-
} } }), i(t.InButtonV2, { attrs: { id: `guido__display-condition-menu-${e.id}`, "left-icon": "filled-dropdown-down", type: "subtle-primary", "label-text-status": !1 }, on: { click: function(n) {
|
|
14
|
-
return t.toggleMenu(e);
|
|
15
|
-
} } }), t.menuId === e.id ? i("div", { staticClass: "guido-display-condition-card__menu" }, [i("button", { staticClass: "guido-display-condition-card__menu-item", attrs: { id: `guido__display-condition-delete-${e.id}`, type: "button" }, on: { click: function(n) {
|
|
16
|
-
return t.requestDelete(e);
|
|
17
|
-
} } }, [s._v(" " + s._s(t.trans(`${t.KEY}.delete`)) + " ")])]) : s._e()], 1), i("span", { staticClass: "guido-display-condition-card__divider" }), i("button", { staticClass: "guido-display-condition-card__expand", attrs: { id: `guido__display-condition-expand-${e.id}`, type: "button", "aria-expanded": t.expandedId === e.id ? "true" : "false", "aria-label": t.trans(`${t.KEY}.preview`) }, on: { click: function(n) {
|
|
18
|
-
return t.toggleExpanded(e);
|
|
19
|
-
} } }, [i(t.InIcons, { attrs: { name: t.expandedId === e.id ? "filled-dropdown-up" : "filled-dropdown-down" } })], 1)])]), t.expandedId === e.id ? i("pre", { staticClass: "guido-display-condition-card__code" }, [s._v(s._s(t.codeOf(e)))]) : s._e()]);
|
|
20
|
-
}), 0) : i(t.InNoData, { staticClass: "d-f f-d-c j-c-c f-g-1", attrs: { id: "guido__display-condition-no-result", icon: "no-data", title: t.trans(`${t.KEY}.no-result`) } }) : i(t.InNoData, { staticClass: "d-f f-d-c j-c-c f-g-1", attrs: { id: "guido__display-condition-empty", "button-status": "", icon: "no-personalization", "button-text": t.trans(`${t.KEY}.create-new`), description: t.trans(`${t.KEY}.empty-description`), title: t.trans(`${t.KEY}.empty-title`) }, on: { click: function(e) {
|
|
4
|
+
var a = function() {
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-display-condition-select-root" }, [e(t.WpDrawer, { attrs: { id: "guido__display-condition-select-drawer", "description-status": "", "class-name": "guido-display-condition-select-drawer", size: "large", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.isSelectOpen, "title-text": t.trans(`${t.KEY}.select-title`) }, on: { cancelOrBackButtonEvent: t.cancel, onCloseEvent: t.cancel } }, [e("div", { staticClass: "guido-display-condition-select d-f f-d-c f-g-1" }, [t.store.listStatus === "loaded" && t.store.list.length ? e(t.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-search-input", name: "displayConditionSearch", "character-counter-status": !1, "label-status": !1, "placeholder-text": t.trans(`${t.KEY}.search`), "tooltip-status": !1, value: t.search }, on: { input: function(i) {
|
|
7
|
+
t.search = i;
|
|
8
|
+
} } }) : s._e(), t.store.listStatus === "loading" || t.store.listStatus === "idle" ? e("div", { staticClass: "guido-display-condition-select__list", attrs: { "data-testid": "display-condition-loading" } }, s._l(t.SKELETON_HEIGHTS, function(i, n) {
|
|
9
|
+
return e(t.InSkeleton, { key: n, attrs: { sizing: { width: 856, height: i } } });
|
|
10
|
+
}), 1) : t.listState ? e(t.DisplayConditionListState, { attrs: { state: t.listState }, on: { create: function(i) {
|
|
21
11
|
return t.store.openCreate();
|
|
22
|
-
}
|
|
12
|
+
}, retry: t.loadList } }) : e("ul", { staticClass: "guido-display-condition-select__list" }, s._l(t.filteredList, function(i) {
|
|
13
|
+
return e("li", { key: i.id, staticClass: "guido-display-condition-card bor-w-1 bor-s-s bor-c-50 bor-r-1 b-c-4", attrs: { "data-condition-id": i.id } }, [e("div", { staticClass: "guido-display-condition-card__header" }, [e("div", { staticClass: "guido-display-condition-card__text" }, [e("p", { staticClass: "guido-display-condition-card__name m-0 f-s-13 f-w-600 l-h-2 t-c-55" }, [s._v(" " + s._s(i.name) + " ")]), i.description ? e("p", { staticClass: "guido-display-condition-card__description mt-1 mb-0 f-s-1 l-h-1 t-c-53" }, [s._v(" " + s._s(i.description) + " ")]) : s._e()]), e("div", { staticClass: "guido-display-condition-card__actions" }, [e("div", { staticClass: "guido-display-condition-card__split" }, [e(t.InButtonV2, { attrs: { id: `guido__display-condition-select-${i.id}`, type: "subtle-primary", "label-text": t.trans(`${t.KEY}.select`) }, on: { click: function(n) {
|
|
14
|
+
return t.select(i);
|
|
15
|
+
} } }), e(t.InButtonV2, { attrs: { id: `guido__display-condition-menu-${i.id}`, "left-icon": "filled-dropdown-down", type: "subtle-primary", "label-text-status": !1 }, on: { click: function(n) {
|
|
16
|
+
return t.toggleMenu(i);
|
|
17
|
+
} } }), e(t.InDropdownMenu, { staticClass: "guido-display-condition-card__menu", attrs: { id: `guido__display-condition-menu-list-${i.id}`, "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, options: t.menuOptions(i), "select-all-option-status": !1, status: t.menuId === i.id }, on: { clickOutside: function(n) {
|
|
18
|
+
return t.closeMenu(i);
|
|
19
|
+
}, optionClick: function(n) {
|
|
20
|
+
return t.requestDelete(i);
|
|
21
|
+
} } })], 1), e("span", { staticClass: "guido-display-condition-card__divider" }), e(t.InButtonV2, { attrs: { id: `guido__display-condition-expand-${i.id}`, styling: "text", type: "secondary", "label-text-status": !1, "left-icon": t.expandedId === i.id ? "filled-dropdown-up" : "filled-dropdown-down", "selected-status": t.expandedId === i.id, "tooltip-options": t.expandTooltip(i), "tooltip-text": t.trans(`${t.KEY}.preview`) }, on: { click: function(n) {
|
|
22
|
+
return t.toggleExpanded(i);
|
|
23
|
+
} } })], 1)]), t.expandedId === i.id ? e("pre", { staticClass: "guido-display-condition-card__code bor-w-1 bor-s-s bor-c-50 bor-r-1 b-c-4 f-s-2 l-h-2" }, [s._v(s._s(t.codeOf(i)))]) : s._e()]);
|
|
24
|
+
}), 0)], 1)]), t.store.pendingDelete ? e("div", { staticClass: "guido-display-condition-select__delete-modal" }, [e(t.WpModal, { attrs: { id: "guido__display-condition-delete-modal", size: "X-small", state: "danger", "close-on-outside-click": !1, "footer-button-options": t.deleteModalButtons, title: t.trans(`${t.KEY}.delete-confirm-title`) }, on: { close: t.closeDeleteModal, "primary-action": t.confirmDelete } }, [e("p", { staticClass: "guido-display-condition-select__delete-text m-0 t-c-55" }, [s._v(" " + s._s(t.trans(`${t.KEY}.delete-confirm-description`, { name: t.store.pendingDelete.name })) + " ")])])], 1) : s._e()], 1);
|
|
23
25
|
}, l = [], c = /* @__PURE__ */ d(
|
|
24
|
-
a,
|
|
25
26
|
o,
|
|
27
|
+
a,
|
|
26
28
|
l,
|
|
27
29
|
!1,
|
|
28
30
|
null,
|
|
29
|
-
"
|
|
31
|
+
"62c5ac25"
|
|
30
32
|
);
|
|
31
33
|
const f = c.exports;
|
|
32
34
|
export {
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useDisplayConditions as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useDisplayConditionStore as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { defineComponent as T, ref as r, watch as I, computed as i } from "vue";
|
|
2
|
+
import O from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import B from "../../wrappers/WpModal.vue.js";
|
|
4
|
+
import { useDisplayConditions as L, DISPLAY_CONDITIONS_TRANS_KEY as s } from "../../../composables/useDisplayConditions.js";
|
|
5
|
+
import { useTranslations as M } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useDisplayConditionStore as h } from "../../../stores/display-condition.js";
|
|
7
|
+
import { getTooltipOptions as C } from "../../../utils/tooltipUtils.js";
|
|
8
|
+
import { InSkeleton as $, InDropdownMenu as E, InButtonV2 as b, InBasicTextInput as k } from "@useinsider/design-system-vue";
|
|
9
|
+
import w from "./DisplayConditionListState.vue.js";
|
|
10
|
+
const ee = /* @__PURE__ */ T({
|
|
9
11
|
__name: "DisplayConditionSelectDrawer",
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
e && (u.value = "",
|
|
12
|
+
setup(A) {
|
|
13
|
+
const g = [40, 76, 76, 76], l = M(), t = h(), { loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p } = L(), u = r(""), a = r(null), n = r(null), o = r(!1);
|
|
14
|
+
I(() => t.isSelectOpen, (e) => {
|
|
15
|
+
e && (u.value = "", a.value = null, n.value = null, c());
|
|
14
16
|
}, { immediate: !0 });
|
|
15
|
-
const
|
|
17
|
+
const f = i(() => {
|
|
16
18
|
const e = u.value.trim().toLocaleLowerCase();
|
|
17
|
-
return e ? t.list.filter((
|
|
18
|
-
}),
|
|
19
|
+
return e ? t.list.filter((m) => `${m.name} ${m.description}`.toLocaleLowerCase().includes(e)) : t.list;
|
|
20
|
+
}), y = i(() => t.listStatus === "error" ? "error" : t.list.length ? f.value.length ? null : "no-result" : "empty"), _ = i(() => p("select-description")), S = i(() => ({
|
|
19
21
|
cancelOrBackButton: {
|
|
20
22
|
styling: "ghost",
|
|
21
23
|
type: "secondary",
|
|
22
|
-
labelText: l(`${
|
|
24
|
+
labelText: l(`${s}.back`),
|
|
23
25
|
leftIcon: "line-arrow-left"
|
|
24
26
|
}
|
|
25
|
-
})),
|
|
27
|
+
})), x = i(() => ({
|
|
26
28
|
cancelOrBackButton: {
|
|
27
29
|
type: "secondary",
|
|
28
30
|
styling: "ghost",
|
|
29
|
-
labelText: l(`${
|
|
31
|
+
labelText: l(`${s}.cancel`),
|
|
30
32
|
disabledStatus: o.value
|
|
31
33
|
},
|
|
32
34
|
primaryButton: {
|
|
33
35
|
type: "danger",
|
|
34
|
-
labelText: l(`${
|
|
36
|
+
labelText: l(`${s}.delete`),
|
|
35
37
|
loadingStatus: o.value
|
|
36
38
|
}
|
|
37
|
-
}))
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
}));
|
|
40
|
+
return { __sfc: !0, SKELETON_HEIGHTS: g, trans: l, store: t, loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p, search: u, expandedId: a, menuId: n, isDeleting: o, filteredList: f, listState: y, descriptionText: _, footerButtonGroupOptions: S, deleteModalButtons: x, toggleExpanded: (e) => {
|
|
41
|
+
a.value = a.value === e.id ? null : e.id;
|
|
42
|
+
}, toggleMenu: (e) => {
|
|
40
43
|
n.value = n.value === e.id ? null : e.id;
|
|
41
|
-
},
|
|
42
|
-
e.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}), M(() => {
|
|
50
|
-
document.removeEventListener("pointerdown", s, !0);
|
|
51
|
-
}), { __sfc: !0, SKELETON_HEIGHTS: I, trans: l, store: t, loadList: m, select: y, deleteSaved: f, cancel: _, describeWithAcademyLink: v, search: u, expandedId: i, menuId: n, isDeleting: o, filteredList: O, descriptionText: S, footerButtonGroupOptions: B, deleteModalButtons: L, toggleExpanded: E, toggleMenu: T, closeMenuOnOutsidePointer: s, requestDelete: (e) => {
|
|
44
|
+
}, closeMenu: (e) => {
|
|
45
|
+
n.value === e.id && (n.value = null);
|
|
46
|
+
}, expandTooltip: (e) => C(
|
|
47
|
+
`guido__display-condition-expand-tooltip-${e.id}`,
|
|
48
|
+
{ staticPosition: "top right" }
|
|
49
|
+
), menuOptions: (e) => [
|
|
50
|
+
{ text: l(`${s}.delete`), value: `guido__display-condition-delete-${e.id}` }
|
|
51
|
+
], requestDelete: (e) => {
|
|
52
52
|
n.value = null, t.pendingDelete = e;
|
|
53
53
|
}, confirmDelete: async () => {
|
|
54
|
-
!t.pendingDelete || o.value || (o.value = !0, await
|
|
54
|
+
!t.pendingDelete || o.value || (o.value = !0, await d(t.pendingDelete), o.value = !1);
|
|
55
55
|
}, closeDeleteModal: () => {
|
|
56
56
|
o.value || (t.pendingDelete = null);
|
|
57
57
|
}, codeOf: (e) => [e.codeBefore, e.codeAfter].filter(Boolean).join(`
|
|
58
|
-
`), WpDrawer:
|
|
58
|
+
`), WpDrawer: O, WpModal: B, KEY: s, InBasicTextInput: k, InButtonV2: b, InDropdownMenu: E, InSkeleton: $, DisplayConditionListState: w };
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
ee as default
|
|
63
63
|
};
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { BlockType as o } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
const n = "conditions", t = "guido-display-conditions-control",
|
|
2
|
+
const n = "conditions", t = "guido-display-conditions-control", d = 10, s = [o.STRIPE, o.STRUCTURE, o.CONTAINER], c = {
|
|
3
3
|
PLUS: "guido-display-condition-plus",
|
|
4
4
|
EDIT: "guido-display-condition-edit",
|
|
5
5
|
TRASH: "guido-display-condition-trash",
|
|
6
6
|
CHEVRON: "guido-display-condition-chevron"
|
|
7
|
-
}, e =
|
|
7
|
+
}, e = {
|
|
8
|
+
ADD: "guidoDisplayConditionAdd",
|
|
9
|
+
CREATE: "guidoDisplayConditionCreate",
|
|
10
|
+
SELECT: "guidoDisplayConditionSelect",
|
|
11
|
+
SHOW_MORE: "guidoDisplayConditionShowMore",
|
|
12
|
+
SHOW_LESS: "guidoDisplayConditionShowLess",
|
|
13
|
+
EDIT: "guidoDisplayConditionEdit",
|
|
14
|
+
REMOVE: "guidoDisplayConditionRemove"
|
|
15
|
+
}, C = ["applyConditionSwitcher", "applyCondition", "displayConditions"], a = "You can add Display Condition by selecting an existing condition or creating a new one to show specific content.", O = "You can create or select a display condition to control content visibility based on your recipients' properties or events.";
|
|
8
16
|
export {
|
|
9
17
|
O as APPLIED_DESCRIPTION,
|
|
10
|
-
|
|
18
|
+
C as BUILT_IN_CONDITION_CONTROLS,
|
|
11
19
|
t as CONDITIONS_CONTROL_ID,
|
|
12
20
|
n as CONDITIONS_TAB_ID,
|
|
13
21
|
s as CONDITION_BLOCK_TYPES,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
e as CONDITION_BUTTONS,
|
|
23
|
+
c as CONDITION_ICONS,
|
|
24
|
+
a as EMPTY_DESCRIPTION,
|
|
25
|
+
d as MAX_COLLAPSED_LINES
|
|
17
26
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useToaster as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { DisplayConditionSourceType as
|
|
7
|
-
import { ToasterTypeOptions as
|
|
8
|
-
import { CommonControl as
|
|
9
|
-
import { toAppliedCondition as
|
|
10
|
-
import { escapeHtml as
|
|
11
|
-
import { ModificationDescription as
|
|
12
|
-
import { requestDisplayCondition as
|
|
13
|
-
import { CONDITIONS_CONTROL_ID as
|
|
14
|
-
const l = ".guido-display-conditions",
|
|
15
|
-
class
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var v = (c, a, i) => a in c ? b(c, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[a] = i;
|
|
3
|
+
var p = (c, a, i) => v(c, typeof a != "symbol" ? a + "" : a, i);
|
|
4
|
+
import { useToaster as O } from "../../composables/useToaster.js";
|
|
5
|
+
import { useTranslations as w } from "../../composables/useTranslations.js";
|
|
6
|
+
import { DisplayConditionSourceType as N } from "../../enums/display-condition.js";
|
|
7
|
+
import { ToasterTypeOptions as S } from "../../enums/toaster.js";
|
|
8
|
+
import { CommonControl as E } from "../Blocks/common-control.js";
|
|
9
|
+
import { toAppliedCondition as D, parseSource as T } from "../../utils/displayCondition.js";
|
|
10
|
+
import { escapeHtml as f } from "../../utils/htmlEscape.js";
|
|
11
|
+
import { ModificationDescription as I } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
12
|
+
import { requestDisplayCondition as R } from "./bridge.js";
|
|
13
|
+
import { CONDITIONS_CONTROL_ID as M, CONDITION_ICONS as h, CONDITION_BUTTONS as r, APPLIED_DESCRIPTION as $, EMPTY_DESCRIPTION as x, MAX_COLLAPSED_LINES as C } from "./constants.js";
|
|
14
|
+
const l = ".guido-display-conditions", L = { id: 0, name: "", description: "", beforeScript: "", afterScript: "" };
|
|
15
|
+
class F extends E {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
p(this, "expanded", !1);
|
|
19
|
+
p(this, "listeners", []);
|
|
20
|
+
p(this, "resizeObserver", null);
|
|
21
|
+
p(this, "detachOutsideClick", null);
|
|
22
|
+
p(this, "detachRequest", null);
|
|
23
23
|
}
|
|
24
24
|
getId() {
|
|
25
|
-
return
|
|
25
|
+
return M;
|
|
26
26
|
}
|
|
27
27
|
getTemplate() {
|
|
28
28
|
return `
|
|
@@ -32,22 +32,26 @@ class K extends T {
|
|
|
32
32
|
<p class="guido-display-conditions__description" data-dc-description></p>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="guido-display-conditions__empty" data-dc-empty>
|
|
35
|
-
${
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
${this._GuButton({
|
|
36
|
+
name: r.ADD,
|
|
37
|
+
id: "guido__btn-add-display-condition",
|
|
38
|
+
className: "guido-display-conditions__add",
|
|
39
|
+
icon: h.PLUS,
|
|
40
|
+
label: this.api.translate("Add Display Condition")
|
|
41
|
+
})}
|
|
40
42
|
<div class="guido-display-conditions__menu" data-dc-menu hidden>
|
|
41
|
-
${
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
${this._GuButton({
|
|
44
|
+
name: r.CREATE,
|
|
45
|
+
id: "guido__btn-display-condition-create",
|
|
46
|
+
className: "guido-display-conditions__menu-item",
|
|
47
|
+
label: this.api.translate("Create New Condition")
|
|
48
|
+
})}
|
|
49
|
+
${this._GuButton({
|
|
50
|
+
name: r.SELECT,
|
|
51
|
+
id: "guido__btn-display-condition-select",
|
|
52
|
+
className: "guido-display-conditions__menu-item",
|
|
53
|
+
label: this.api.translate("Select Saved Condition")
|
|
54
|
+
})}
|
|
51
55
|
</div>
|
|
52
56
|
</div>
|
|
53
57
|
<div class="guido-display-conditions__applied" data-dc-applied hidden>
|
|
@@ -63,33 +67,43 @@ class K extends T {
|
|
|
63
67
|
</p>
|
|
64
68
|
<pre class="guido-display-conditions__code" data-dc-after></pre>
|
|
65
69
|
</div>
|
|
66
|
-
${
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
${this._GuButton({
|
|
71
|
+
name: r.SHOW_MORE,
|
|
72
|
+
id: "guido__btn-display-condition-show-more",
|
|
73
|
+
className: "guido-display-conditions__toggle",
|
|
74
|
+
icon: h.CHEVRON,
|
|
75
|
+
label: this.api.translate("Show More")
|
|
76
|
+
})}
|
|
77
|
+
${this._GuButton({
|
|
78
|
+
name: r.SHOW_LESS,
|
|
79
|
+
id: "guido__btn-display-condition-show-less",
|
|
80
|
+
className: "guido-display-conditions__toggle guido-display-conditions__toggle--less",
|
|
81
|
+
icon: h.CHEVRON,
|
|
82
|
+
label: this.api.translate("Show Less")
|
|
83
|
+
})}
|
|
72
84
|
</div>
|
|
73
85
|
<div class="guido-display-conditions__actions">
|
|
74
|
-
${
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
${this._GuButton({
|
|
87
|
+
name: r.EDIT,
|
|
88
|
+
id: "guido__btn-edit-display-condition",
|
|
89
|
+
className: "guido-display-conditions__action guido-display-conditions__action--edit",
|
|
90
|
+
icon: h.EDIT,
|
|
91
|
+
label: this.api.translate("Edit")
|
|
92
|
+
})}
|
|
93
|
+
${this._GuButton({
|
|
94
|
+
name: r.REMOVE,
|
|
95
|
+
id: "guido__btn-remove-display-condition",
|
|
96
|
+
className: "guido-display-conditions__action guido-display-conditions__action--remove",
|
|
97
|
+
icon: h.TRASH,
|
|
98
|
+
label: this.api.translate("Remove")
|
|
99
|
+
})}
|
|
84
100
|
</div>
|
|
85
101
|
</div>
|
|
86
102
|
</div>
|
|
87
103
|
`;
|
|
88
104
|
}
|
|
89
105
|
onRender() {
|
|
90
|
-
this.forgetLastPanelNode(), this.teardown(), this.wire("#guido__btn-add-display-condition", () => this.toggleMenu()), this.wire("#guido__btn-display-condition-create", () => this.openDrawer("create")), this.wire("#guido__btn-display-condition-select", () => this.openDrawer("select")), this.wire("#guido__btn-edit-display-condition", () => this.openDrawer("edit")), this.wire("#guido__btn-remove-display-condition", () => this.removeCondition()), this.wire("#guido__btn-display-condition-
|
|
91
|
-
this.expanded = !this.expanded, this.paint();
|
|
92
|
-
}), this.observeCodeSize();
|
|
106
|
+
this.forgetLastPanelNode(), this.teardown(), this.wire("#guido__btn-add-display-condition", () => this.toggleMenu()), this.wire("#guido__btn-display-condition-create", () => this.openDrawer("create")), this.wire("#guido__btn-display-condition-select", () => this.openDrawer("select")), this.wire("#guido__btn-edit-display-condition", () => this.openDrawer("edit")), this.wire("#guido__btn-remove-display-condition", () => this.removeCondition()), this.wire("#guido__btn-display-condition-show-more", () => this.setExpanded(!0)), this.wire("#guido__btn-display-condition-show-less", () => this.setExpanded(!1)), this.observeCodeSize();
|
|
93
107
|
}
|
|
94
108
|
onTemplateNodeUpdated(i) {
|
|
95
109
|
const t = i !== this.currentNode;
|
|
@@ -99,24 +113,27 @@ class K extends T {
|
|
|
99
113
|
var i;
|
|
100
114
|
super.onDestroy(), this.teardown(), (i = this.detachRequest) == null || i.call(this), this.detachRequest = null;
|
|
101
115
|
}
|
|
116
|
+
setExpanded(i) {
|
|
117
|
+
this.expanded = i, this.paint();
|
|
118
|
+
}
|
|
102
119
|
getCondition() {
|
|
103
120
|
var t;
|
|
104
121
|
const i = this.currentNode;
|
|
105
|
-
return
|
|
122
|
+
return D((t = i == null ? void 0 : i.getDisplayCondition) == null ? void 0 : t.call(i));
|
|
106
123
|
}
|
|
107
124
|
toggleMenu(i) {
|
|
108
|
-
var
|
|
109
|
-
const t = (
|
|
125
|
+
var o, s, n;
|
|
126
|
+
const t = (o = this.getContainer()) == null ? void 0 : o.querySelector(`${l} [data-dc-menu]`);
|
|
110
127
|
if (!t)
|
|
111
128
|
return;
|
|
112
|
-
t.hidden = i === void 0 ? !t.hidden : !i, (
|
|
113
|
-
const e = (
|
|
129
|
+
t.hidden = i === void 0 ? !t.hidden : !i, (s = this.detachOutsideClick) == null || s.call(this), t.hidden || this.listenOutsideClick();
|
|
130
|
+
const e = (n = this.getContainer()) == null ? void 0 : n.querySelector(`${l} #guido__btn-add-display-condition`);
|
|
114
131
|
t.style.width = !t.hidden && e ? `${e.getBoundingClientRect().width}px` : "";
|
|
115
132
|
}
|
|
116
133
|
listenOutsideClick() {
|
|
117
134
|
var e;
|
|
118
|
-
const i = ((e = this.getContainer()) == null ? void 0 : e.ownerDocument) ?? document, t = (
|
|
119
|
-
|
|
135
|
+
const i = ((e = this.getContainer()) == null ? void 0 : e.ownerDocument) ?? document, t = (o) => {
|
|
136
|
+
o.composedPath().some((n) => n instanceof HTMLElement && n.matches(`${l} [data-dc-menu], ${l} #guido__btn-add-display-condition`)) || this.toggleMenu(!1);
|
|
120
137
|
};
|
|
121
138
|
i.addEventListener("pointerdown", t, !0), this.detachOutsideClick = () => {
|
|
122
139
|
i.removeEventListener("pointerdown", t, !0), this.detachOutsideClick = null;
|
|
@@ -124,16 +141,16 @@ class K extends T {
|
|
|
124
141
|
}
|
|
125
142
|
openDrawer(i) {
|
|
126
143
|
const t = this.currentNode;
|
|
127
|
-
this.toggleMenu(!1), this.detachRequest =
|
|
144
|
+
this.toggleMenu(!1), this.detachRequest = R(
|
|
128
145
|
{ mode: i, current: i === "edit" ? this.getCondition() : null },
|
|
129
146
|
{ onApply: (e) => this.applyCondition(e, t) }
|
|
130
147
|
);
|
|
131
148
|
}
|
|
132
149
|
// The drawer flows toast through useDisplayConditions; Remove has no drawer, so it toasts here.
|
|
133
150
|
removeCondition() {
|
|
134
|
-
this.applyCondition(null) ||
|
|
135
|
-
type:
|
|
136
|
-
message:
|
|
151
|
+
this.applyCondition(null) || O().showToaster({
|
|
152
|
+
type: S.Error,
|
|
153
|
+
message: w()("products.something-went-wrong")
|
|
137
154
|
});
|
|
138
155
|
}
|
|
139
156
|
// The panel can move to another block while the drawer is open; apply onto the block it was opened for.
|
|
@@ -142,7 +159,7 @@ class K extends T {
|
|
|
142
159
|
return !1;
|
|
143
160
|
try {
|
|
144
161
|
const e = this.api.getDocumentModifier().modifyHtml(t);
|
|
145
|
-
return e.setDisplayCondition(i ||
|
|
162
|
+
return e.setDisplayCondition(i || L), e.apply(new I(
|
|
146
163
|
i ? `Set display condition ${i.name}` : "Remove display condition"
|
|
147
164
|
)), !0;
|
|
148
165
|
} catch (e) {
|
|
@@ -150,51 +167,51 @@ class K extends T {
|
|
|
150
167
|
}
|
|
151
168
|
}
|
|
152
169
|
wire(i, t) {
|
|
153
|
-
var
|
|
154
|
-
const e = (
|
|
170
|
+
var o;
|
|
171
|
+
const e = (o = this.getContainer()) == null ? void 0 : o.querySelector(`${l} ${i}`);
|
|
155
172
|
e && (e.addEventListener("click", t), this.listeners.push({ element: e, handler: t }));
|
|
156
173
|
}
|
|
157
174
|
teardown() {
|
|
158
175
|
var i, t;
|
|
159
|
-
this.listeners.forEach(({ element: e, handler:
|
|
176
|
+
this.listeners.forEach(({ element: e, handler: o }) => e.removeEventListener("click", o)), this.listeners = [], (i = this.resizeObserver) == null || i.disconnect(), this.resizeObserver = null, (t = this.detachOutsideClick) == null || t.call(this);
|
|
160
177
|
}
|
|
161
178
|
// Line counts depend on layout: the panel font loads late and the panel can be resized.
|
|
162
179
|
observeCodeSize() {
|
|
163
180
|
var t;
|
|
164
181
|
const i = (t = this.getContainer()) == null ? void 0 : t.querySelectorAll(`${l} .guido-display-conditions__code`);
|
|
165
182
|
!(i != null && i.length) || typeof ResizeObserver > "u" || (this.resizeObserver = new ResizeObserver(() => this.paint()), i.forEach((e) => {
|
|
166
|
-
var
|
|
167
|
-
return (
|
|
183
|
+
var o;
|
|
184
|
+
return (o = this.resizeObserver) == null ? void 0 : o.observe(e);
|
|
168
185
|
}));
|
|
169
186
|
}
|
|
170
187
|
paint() {
|
|
171
|
-
var
|
|
172
|
-
const i = (
|
|
188
|
+
var y;
|
|
189
|
+
const i = (y = this.getContainer()) == null ? void 0 : y.querySelector(l);
|
|
173
190
|
if (!i)
|
|
174
191
|
return;
|
|
175
|
-
const t = this.getCondition(), e = (
|
|
176
|
-
if (e("[data-dc-empty]").hidden = !!t, e("[data-dc-applied]").hidden = !t, e("[data-dc-description]").textContent = this.api.translate(t ?
|
|
192
|
+
const t = this.getCondition(), e = (_) => i.querySelector(_);
|
|
193
|
+
if (e("[data-dc-empty]").hidden = !!t, e("[data-dc-applied]").hidden = !t, e("[data-dc-description]").textContent = this.api.translate(t ? $ : x), !t)
|
|
177
194
|
return;
|
|
178
195
|
e("[data-dc-name]").textContent = t.name;
|
|
179
|
-
const
|
|
180
|
-
e("#guido__btn-edit-display-condition").hidden = !
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
const u = parseFloat(getComputedStyle(
|
|
184
|
-
|
|
196
|
+
const o = T(t) === N.INLINE;
|
|
197
|
+
e("#guido__btn-edit-display-condition").hidden = !o;
|
|
198
|
+
const s = e("[data-dc-sections]"), n = e("[data-dc-before]"), d = e("[data-dc-after]");
|
|
199
|
+
n.innerHTML = f(t.beforeScript), d.innerHTML = f(t.afterScript), d.hidden = !t.afterScript, e("[data-dc-after-label]").hidden = !t.afterScript, s.style.maxHeight = "";
|
|
200
|
+
const u = parseFloat(getComputedStyle(n).lineHeight) || 24, m = (_) => _.hidden ? 0 : Math.round(_.scrollHeight / u), g = m(n) + m(d) > C;
|
|
201
|
+
e("#guido__btn-display-condition-show-more").hidden = !g || this.expanded, e("#guido__btn-display-condition-show-less").hidden = !g || !this.expanded, g && !this.expanded && (s.style.maxHeight = `${this.collapsedHeight(s, [n, d], u)}px`);
|
|
185
202
|
}
|
|
186
203
|
// Labels do not count toward the line limit, so the cut lands after the 10th rendered code line.
|
|
187
204
|
collapsedHeight(i, t, e) {
|
|
188
|
-
const { top:
|
|
189
|
-
let
|
|
190
|
-
return t.filter((
|
|
191
|
-
if (
|
|
205
|
+
const { top: o } = i.getBoundingClientRect();
|
|
206
|
+
let s = C, n = 0;
|
|
207
|
+
return t.filter((d) => !d.hidden).forEach((d) => {
|
|
208
|
+
if (s <= 0)
|
|
192
209
|
return;
|
|
193
|
-
const u = Math.min(
|
|
194
|
-
|
|
195
|
-
}),
|
|
210
|
+
const u = Math.min(s, Math.round(d.scrollHeight / e));
|
|
211
|
+
n = d.getBoundingClientRect().top - o + u * e, s -= u;
|
|
212
|
+
}), n;
|
|
196
213
|
}
|
|
197
214
|
}
|
|
198
215
|
export {
|
|
199
|
-
|
|
216
|
+
F as DisplayConditionsControl
|
|
200
217
|
};
|
|
@@ -27,7 +27,23 @@ const n = `.guido-display-conditions {
|
|
|
27
27
|
padding: 8px 16px 16px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
/* ue-button draws Stripo's themed .button inside; restyle that, not the host. */
|
|
31
|
+
.guido-display-conditions .guido-display-conditions__add,
|
|
32
|
+
.guido-display-conditions .guido-display-conditions__menu-item {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.guido-display-conditions .button {
|
|
38
|
+
min-width: 0;
|
|
39
|
+
min-height: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.guido-display-conditions .button .icon-button {
|
|
43
|
+
color: inherit;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.guido-display-conditions .guido-display-conditions__add > .button {
|
|
31
47
|
display: flex;
|
|
32
48
|
gap: 8px;
|
|
33
49
|
align-items: center;
|
|
@@ -60,13 +76,13 @@ const n = `.guido-display-conditions {
|
|
|
60
76
|
height: 20px;
|
|
61
77
|
}
|
|
62
78
|
|
|
63
|
-
.guido-display-conditions__add:hover {
|
|
79
|
+
.guido-display-conditions .guido-display-conditions__add > .button:hover {
|
|
64
80
|
background: var(--guido-color-primary-200);
|
|
65
81
|
}
|
|
66
82
|
|
|
67
|
-
.guido-display-conditions__add:focus-visible,
|
|
68
|
-
.guido-display-conditions__action:focus-visible,
|
|
69
|
-
.guido-display-conditions__toggle:focus-visible {
|
|
83
|
+
.guido-display-conditions .guido-display-conditions__add > .button:focus-visible,
|
|
84
|
+
.guido-display-conditions .guido-display-conditions__action > .button:focus-visible,
|
|
85
|
+
.guido-display-conditions .guido-display-conditions__toggle > .button:focus-visible {
|
|
70
86
|
outline: 2px solid var(--guido-color-primary-500);
|
|
71
87
|
outline-offset: 2px;
|
|
72
88
|
}
|
|
@@ -106,10 +122,13 @@ const n = `.guido-display-conditions {
|
|
|
106
122
|
word-break: break-word;
|
|
107
123
|
}
|
|
108
124
|
|
|
109
|
-
.guido-display-conditions__toggle {
|
|
125
|
+
.guido-display-conditions .guido-display-conditions__toggle {
|
|
126
|
+
align-self: flex-start;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.guido-display-conditions .guido-display-conditions__toggle > .button {
|
|
110
130
|
display: inline-flex;
|
|
111
131
|
align-items: center;
|
|
112
|
-
align-self: flex-start;
|
|
113
132
|
padding: 8px 0;
|
|
114
133
|
border: none;
|
|
115
134
|
background: none;
|
|
@@ -124,7 +143,7 @@ const n = `.guido-display-conditions {
|
|
|
124
143
|
padding: 0 8px;
|
|
125
144
|
}
|
|
126
145
|
|
|
127
|
-
.guido-display-conditions__toggle
|
|
146
|
+
.guido-display-conditions__toggle--less ue-icon-component {
|
|
128
147
|
transform: rotate(180deg);
|
|
129
148
|
}
|
|
130
149
|
|
|
@@ -137,7 +156,7 @@ const n = `.guido-display-conditions {
|
|
|
137
156
|
background: var(--guido-color-white);
|
|
138
157
|
}
|
|
139
158
|
|
|
140
|
-
.guido-display-conditions__action {
|
|
159
|
+
.guido-display-conditions .guido-display-conditions__action > .button {
|
|
141
160
|
display: inline-flex;
|
|
142
161
|
align-items: center;
|
|
143
162
|
padding: 8px;
|
|
@@ -153,11 +172,16 @@ const n = `.guido-display-conditions {
|
|
|
153
172
|
padding: 0 8px;
|
|
154
173
|
}
|
|
155
174
|
|
|
156
|
-
.guido-display-
|
|
175
|
+
.guido-display-conditions .guido-display-conditions__toggle > .button:hover,
|
|
176
|
+
.guido-display-conditions .guido-display-conditions__action > .button:hover {
|
|
177
|
+
background: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.guido-display-conditions .guido-display-conditions__action--edit > .button {
|
|
157
181
|
color: var(--guido-color-primary-500);
|
|
158
182
|
}
|
|
159
183
|
|
|
160
|
-
.guido-display-conditions__action--remove {
|
|
184
|
+
.guido-display-conditions .guido-display-conditions__action--remove > .button {
|
|
161
185
|
color: var(--guido-color-danger-500);
|
|
162
186
|
}
|
|
163
187
|
|
|
@@ -176,8 +200,9 @@ const n = `.guido-display-conditions {
|
|
|
176
200
|
box-shadow: 0 4px 16px rgba(34, 41, 56, 0.16);
|
|
177
201
|
}
|
|
178
202
|
|
|
179
|
-
.guido-display-conditions__menu-item {
|
|
180
|
-
display:
|
|
203
|
+
.guido-display-conditions .guido-display-conditions__menu-item > .button {
|
|
204
|
+
display: flex;
|
|
205
|
+
justify-content: flex-start;
|
|
181
206
|
width: 100%;
|
|
182
207
|
padding: 8px 16px;
|
|
183
208
|
border: 0;
|
|
@@ -190,8 +215,8 @@ const n = `.guido-display-conditions {
|
|
|
190
215
|
text-align: left;
|
|
191
216
|
}
|
|
192
217
|
|
|
193
|
-
.guido-display-conditions__menu-item:hover,
|
|
194
|
-
.guido-display-conditions__menu-item:focus-visible {
|
|
218
|
+
.guido-display-conditions .guido-display-conditions__menu-item > .button:hover,
|
|
219
|
+
.guido-display-conditions .guido-display-conditions__menu-item > .button:focus-visible {
|
|
195
220
|
background-color: var(--guido-color-neutral-100);
|
|
196
221
|
outline: none;
|
|
197
222
|
}
|
|
@@ -7,15 +7,15 @@ import { DisplayConditionsLibrary as d } from "./library.js";
|
|
|
7
7
|
import { DisplayConditionsSettingsPanel as r } from "./settingsPanel.js";
|
|
8
8
|
const S = new t().addControl(e).withIconsRegistry(s).withSettingsPanelRegistry(r).withExternalDisplayCondition(d).withStyles(n).withLocalization({
|
|
9
9
|
en: {
|
|
10
|
+
[i]: i,
|
|
11
|
+
[o]: o,
|
|
10
12
|
Conditions: "Conditions",
|
|
13
|
+
Edit: "Edit",
|
|
14
|
+
Remove: "Remove",
|
|
11
15
|
"Display Conditions": "Display Conditions",
|
|
12
16
|
"Add Display Condition": "Add Display Condition",
|
|
13
17
|
"Create New Condition": "Create New Condition",
|
|
14
18
|
"Select Saved Condition": "Select Saved Condition",
|
|
15
|
-
[i]: i,
|
|
16
|
-
[o]: o,
|
|
17
|
-
Edit: "Edit",
|
|
18
|
-
Remove: "Remove",
|
|
19
19
|
"Show More": "Show More",
|
|
20
20
|
"Show Less": "Show Less",
|
|
21
21
|
"Code Before Module": "Code Before Module",
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-ab777dca]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-ab777dca]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-ab777dca]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-ab777dca]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-ab777dca]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-ab777dca]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-1d9700d1]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,#91949F 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-1d9700d1]{gap:16px}.guido-display-condition-select-root[data-v-62c5ac25] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-62c5ac25]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-62c5ac25] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-62c5ac25] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-62c5ac25]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-62c5ac25]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-62c5ac25]{min-width:0}.guido-display-condition-card__name[data-v-62c5ac25],.guido-display-condition-card__description[data-v-62c5ac25]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-62c5ac25]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-62c5ac25]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-62c5ac25]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-62c5ac25]{width:1px;height:24px;background-color:#dcdee6}.guido-display-condition-card__code[data-v-62c5ac25]{margin:1px 15px 15px;padding:8px;color:#101727;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const o = "3.24.0-beta.
|
|
1
|
+
const o = "3.24.0-beta.e71f772", s = { stripo: { version: "2.83.1" } }, e = {
|
|
2
2
|
version: o,
|
|
3
|
-
guido:
|
|
3
|
+
guido: s
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
e as default,
|
|
7
|
+
s as guido,
|
|
8
8
|
o as version
|
|
9
9
|
};
|
|
@@ -49,6 +49,7 @@ export interface AppliedDisplayCondition {
|
|
|
49
49
|
extraData?: string;
|
|
50
50
|
}
|
|
51
51
|
export type DisplayConditionOpenMode = 'select' | 'create' | 'edit';
|
|
52
|
+
export type DisplayConditionListState = 'error' | 'empty' | 'no-result';
|
|
52
53
|
export interface DisplayConditionOpenDetail {
|
|
53
54
|
mode: DisplayConditionOpenMode;
|
|
54
55
|
current: AppliedDisplayCondition | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DisplayConditionListState } from '@@/Types/display-condition';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
state: DisplayConditionListState;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
6
|
+
retry: () => void;
|
|
7
|
+
create: () => void;
|
|
8
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToOption<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -9,6 +9,15 @@ export declare const CONDITION_ICONS: {
|
|
|
9
9
|
readonly TRASH: "guido-display-condition-trash";
|
|
10
10
|
readonly CHEVRON: "guido-display-condition-chevron";
|
|
11
11
|
};
|
|
12
|
+
export declare const CONDITION_BUTTONS: {
|
|
13
|
+
readonly ADD: "guidoDisplayConditionAdd";
|
|
14
|
+
readonly CREATE: "guidoDisplayConditionCreate";
|
|
15
|
+
readonly SELECT: "guidoDisplayConditionSelect";
|
|
16
|
+
readonly SHOW_MORE: "guidoDisplayConditionShowMore";
|
|
17
|
+
readonly SHOW_LESS: "guidoDisplayConditionShowLess";
|
|
18
|
+
readonly EDIT: "guidoDisplayConditionEdit";
|
|
19
|
+
readonly REMOVE: "guidoDisplayConditionRemove";
|
|
20
|
+
};
|
|
12
21
|
export declare const BUILT_IN_CONDITION_CONTROLS: string[];
|
|
13
22
|
export declare const EMPTY_DESCRIPTION: string;
|
|
14
23
|
export declare const APPLIED_DESCRIPTION: string;
|
|
@@ -11,6 +11,7 @@ export declare class DisplayConditionsControl extends CommonControl {
|
|
|
11
11
|
onRender(): void;
|
|
12
12
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
13
13
|
onDestroy(): void;
|
|
14
|
+
private setExpanded;
|
|
14
15
|
private getCondition;
|
|
15
16
|
private toggleMenu;
|
|
16
17
|
private listenOutsideClick;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.24.0-beta.
|
|
3
|
+
"version": "3.24.0-beta.e71f772",
|
|
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",
|