@useinsider/guido 3.17.0-beta.ad62b51 → 3.17.0-beta.bdc7d25

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.
@@ -1,18 +1,21 @@
1
1
  import r from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e(t.WpDrawer, { attrs: { id: "assign-strategy-drawer", "description-status": "", size: "medium", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.assignStrategyDrawerStatus, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { cancelOrBackButtonEvent: t.closeDrawer, onCloseEvent: t.closeDrawer, primaryButtonEvent: t.assignStrategy } }, [t.store.assignStrategyDrawerStatus ? e("div", { staticClass: "assign-strategy-drawer-content d-f f-d-c gap-16" }, [e(t.InSelect, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "search-status": "", "static-child-position": "bottom right", "button-status": !1, "dynamic-child-position": !1, "label-text": t.trans("ds-steps.recommendation-strategy"), options: t.strategyOptions, "placeholder-text": t.trans("ds-steps.select-strategy"), "skeleton-sizing": { width: 240, height: 42 }, "skeleton-status": t.store.strategiesLoading, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", value: t.selectValue }, on: { select: t.onSelect } }), t.selectedStrategy ? e("div", { key: String(t.selectedStrategy.strategy_id), staticClass: "assign-strategy-detail" }, [e(t.OrgStrategyDetailModal, { attrs: { show: "", "footer-status": !1, strategy: t.selectedStrategy } })], 1) : s._e()], 1) : s._e()]);
7
- }, n = [], i = /* @__PURE__ */ a(
3
+ /* empty css */
4
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var a = function() {
6
+ var e = this, s = e._self._c, t = e._self._setupProxy;
7
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
+ return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading, "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { select: t.onSelect } })], 1)];
9
+ }, proxy: !0 }], null, !1, 5799417) }) : e._e();
10
+ }, n = [], i = /* @__PURE__ */ o(
8
11
  r,
9
- o,
12
+ a,
10
13
  n,
11
14
  !1,
12
15
  null,
13
- "c56bb033"
16
+ "43e684f6"
14
17
  );
15
- const p = i.exports;
18
+ const y = i.exports;
16
19
  export {
17
- p as default
20
+ y as default
18
21
  };
@@ -1,38 +1,41 @@
1
- import { defineComponent as f, defineAsyncComponent as S, ref as l, computed as o, watch as _ } from "vue";
1
+ import { defineComponent as f, defineAsyncComponent as g, ref as l, computed as a, watch as w } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import v from "../../../wrappers/WpDrawer.vue.js";
4
- import { useToaster as w } from "../../../../composables/useToaster.js";
3
+ import { useToaster as _ } from "../../../../composables/useToaster.js";
5
4
  import { useTranslations as D } from "../../../../composables/useTranslations.js";
6
- import { URLS as T } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as g } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as A } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { buildStrategyInfoBoxProps as E } from "../../../../utils/strategyInfoBox.js";
10
- import { InSelect as O } from "@useinsider/design-system-vue";
11
- const U = /* @__PURE__ */ f({
5
+ import { URLS as v } from "../../../../enums/extensions/recommendationBlock.js";
6
+ import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
7
+ import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import O from "./StrategyInfoBoxContent.vue.js";
9
+ import { buildStrategyInfoBoxProps as x } from "../../../../utils/strategyInfoBox.js";
10
+ const L = /* @__PURE__ */ f({
12
11
  __name: "AssignStrategyDrawer",
13
- setup(x) {
14
- const u = S(
12
+ setup(A) {
13
+ const m = g(
15
14
  async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDetailModal
16
- ), r = D(), e = A(), { showToaster: n } = w(), s = l(null), a = l(!1), m = o(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: T.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
17
- _(() => e.assignStrategyDrawerStatus, (t) => {
15
+ ), y = g(
16
+ async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDropdown
17
+ ), r = D(), e = T(), { showToaster: n } = _(), s = l(null), o = l(!1), u = a(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: v.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
18
+ w(() => e.assignStrategyDrawerStatus, (t) => {
18
19
  if (!t)
19
20
  return;
20
21
  const { strategyId: i } = e.recommendationConfigs;
21
- s.value = i || null, a.value = !1, e.fetchStrategies().catch(() => {
22
+ s.value = i || null, o.value = !1, e.fetchStrategies().catch(() => {
22
23
  n({
23
- type: g.Error,
24
+ type: p.Error,
24
25
  message: r("discovery-strategy.error-description")
25
26
  });
26
27
  });
27
28
  });
28
- const p = o(() => e.strategies.map((t) => ({
29
+ const d = a(() => e.strategies.map((t) => ({
29
30
  text: t.name,
30
31
  value: t.strategy_id,
31
- infoBoxProps: E(t, r)
32
- }))), y = o(() => [{ value: s.value }]), c = o(() => {
32
+ // `slot` lives here, not in the util: the design system renders it with
33
+ // `<component :is>` inside its own info box, and a util must not import one.
34
+ infoBoxProps: { ...x(t, r), slot: O }
35
+ }))), c = a(() => {
33
36
  const t = e.strategies.find((i) => String(i.strategy_id) === String(s.value ?? ""));
34
37
  return t ? { ...t, fallback_config: null } : null;
35
- }), d = o(() => ({
38
+ }), S = a(() => ({
36
39
  primaryButton: {
37
40
  styling: "solid",
38
41
  type: "primary",
@@ -44,23 +47,23 @@ const U = /* @__PURE__ */ f({
44
47
  labelText: r("products.cancel")
45
48
  }
46
49
  }));
47
- return { __sfc: !0, OrgStrategyDetailModal: u, trans: r, store: e, showToaster: n, selectedStrategyId: s, showSelectionError: a, drawerDescription: m, strategyOptions: p, selectValue: y, selectedStrategy: c, footerButtonGroupOptions: d, closeDrawer: () => {
50
+ return { __sfc: !0, OrgStrategyDetailModal: m, OrgStrategyDropdown: y, trans: r, store: e, showToaster: n, selectedStrategyId: s, showSelectionError: o, drawerDescription: u, strategyOptions: d, selectedStrategy: c, footerButtonGroupOptions: S, closeDrawer: () => {
48
51
  e.closeAssignStrategyDrawer();
49
52
  }, assignStrategy: () => {
50
53
  const t = c.value;
51
54
  if (!t) {
52
- a.value = !0;
55
+ o.value = !0;
53
56
  return;
54
57
  }
55
58
  e.assignStrategy(t), n({
56
- type: g.Success,
59
+ type: p.Success,
57
60
  message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
58
61
  }), e.closeAssignStrategyDrawer();
59
62
  }, onSelect: (t) => {
60
- s.value = t.value, a.value = !1;
61
- }, WpDrawer: v, InSelect: O };
63
+ s.value = t.value, o.value = !1;
64
+ } };
62
65
  }
63
66
  });
64
67
  export {
65
- U as default
68
+ L as default
66
69
  };
@@ -0,0 +1,19 @@
1
+ import a from "./StrategyInfoBoxContent.vue2.js";
2
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var t = this, s = t._self._c;
5
+ return t._self._setupProxy, s("div", { staticClass: "d-f f-d-c mt-3" }, t._l(t.details, function(n, e) {
6
+ return s("div", { key: n.title, staticClass: "d-f f-d-c", class: { "mt-2": e > 0 } }, [s("span", { staticClass: "f-s-1 f-w-600 l-h-1 t-c-52 mb-12" }, [t._v(t._s(n.title))]), s("span", { staticClass: "f-s-1 l-h-6 t-c-55 w-b-b-w" }, [t._v(t._s(n.value))])]);
7
+ }), 0);
8
+ }, c = [], f = /* @__PURE__ */ r(
9
+ a,
10
+ _,
11
+ c,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const m = f.exports;
17
+ export {
18
+ m as default
19
+ };
@@ -0,0 +1,13 @@
1
+ import { defineComponent as t } from "vue";
2
+ const o = /* @__PURE__ */ t({
3
+ __name: "StrategyInfoBoxContent",
4
+ props: {
5
+ details: null
6
+ },
7
+ setup(e) {
8
+ return { __sfc: !0 };
9
+ }
10
+ });
11
+ export {
12
+ o as default
13
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-b13f0cfc]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-b13f0cfc]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-b13f0cfc]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{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}[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-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}.gap-16[data-v-c56bb033]{gap:16px}.assign-strategy-select[data-v-c56bb033] .assign-strategy-info-box__updated{margin-top:2px;color:var(--guido-color-gray-600, #6d7686);font-size:12px;line-height:18px}.assign-strategy-select[data-v-c56bb033] .assign-strategy-info-box__row{display:flex;flex-direction:column;margin-top:10px;font-size:12px;line-height:18px}.assign-strategy-select[data-v-c56bb033] .assign-strategy-info-box__label{color:var(--guido-color-gray-600, #6d7686)}.assign-strategy-select[data-v-c56bb033] .assign-strategy-info-box__value{color:var(--guido-color-gray-800, #2c3546);word-break:break-word}.assign-strategy-select[data-v-c56bb033]{width:100%;max-width:none}.assign-strategy-select[data-v-c56bb033] .in-dropdown-box__container{width:58%}.assign-strategy-detail[data-v-c56bb033] .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-detail[data-v-c56bb033] .spaced-dot-sep--top{background-position:center top}.assign-strategy-detail[data-v-c56bb033] .spaced-dot-sep--fc-n:first-child{background:none}.assign-strategy-detail[data-v-c56bb033] .in-drawer__container,.assign-strategy-detail[data-v-c56bb033] .in-drawer__wrapper{position:static!important;inset:auto!important;width:100%!important;max-width:none!important;height:auto!important;border:none!important;box-shadow:none!important;transform:none!important}.assign-strategy-detail[data-v-c56bb033] .in-drawer__content{height:auto!important;max-height:none!important;overflow:visible!important}.assign-strategy-detail[data-v-c56bb033] .in-drawer__content .px-5{padding-left:0!important;padding-right:0!important}.assign-strategy-detail[data-v-c56bb033] .filter-humanizer{margin-right:0!important;margin-left:0!important}.assign-strategy-detail[data-v-c56bb033] .in-drawer__header-main{padding:0!important}.assign-strategy-detail[data-v-c56bb033] .in-tabs-wrapper{padding-right:0;padding-left:0}.assign-strategy-detail[data-v-c56bb033] .in-on-page-message-wrapper{margin-right:0;margin-left:0}.assign-strategy-detail[data-v-c56bb033] .in-drawer__title,.assign-strategy-detail[data-v-c56bb033] [class*=overlay],.assign-strategy-detail[data-v-c56bb033] #close-button-strategy-details-drawer{display:none!important}
1
+ @charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-b13f0cfc]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-b13f0cfc]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-b13f0cfc]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{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}[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-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-43e684f6]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-43e684f6] .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}
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ details: {
3
+ title: string;
4
+ value: string;
5
+ }[];
6
+ };
7
+ 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, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
8
+ export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToOption<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: import('vue').PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
@@ -1,13 +1,23 @@
1
1
  import type { RrsStrategy } from '@@/Types/recommendation';
2
2
  import { useTranslations } from '@@/Composables/useTranslations';
3
- export declare const STRATEGY_INFO_BOX_CLASS = "assign-strategy-info-box";
3
+ interface StrategyInfoBoxDetail {
4
+ title: string;
5
+ value: string;
6
+ }
7
+ interface StrategyInfoBoxContent {
8
+ details: StrategyInfoBoxDetail[];
9
+ }
4
10
  /**
5
11
  * Props for the design system info box that previews a strategy on hover.
6
12
  *
7
13
  * The box is InSelect's own per-option feature: the dropdown v-binds this whole
8
- * object onto `<in-info-box>`, so `titleText`/`descriptionText` are all it takes
9
- * — no slot component. Both go through the design system's sanitizer, and every
10
- * partner-supplied value is escaped here before it reaches that markup.
14
+ * object onto `<in-info-box>` and, when `slot` is set, renders that component
15
+ * inside it with `slotProps`. `slot` is added by the caller — a util must not
16
+ * import a component.
17
+ *
18
+ * `titleText` still reaches the design system's sanitizer as markup, so the
19
+ * partner-supplied name is escaped here; the rows go through the component's
20
+ * text interpolation and need no escaping.
11
21
  *
12
22
  * `trans` is injectable because callers map this over a whole listing, and
13
23
  * `useTranslations()` rebuilds its dictionary and memo cache on every call.
@@ -18,5 +28,8 @@ export declare const buildStrategyInfoBoxProps: (strategy: RrsStrategy, trans?:
18
28
  variant: string;
19
29
  className: string;
20
30
  titleText: string;
31
+ descriptionStatus: boolean;
21
32
  descriptionText: string;
33
+ slotProps: StrategyInfoBoxContent;
22
34
  };
35
+ export {};
@@ -1,37 +1,68 @@
1
- import { useTranslations as m } from "../composables/useTranslations.js";
2
- import { formatShortDate as u } from "./dateUtil.js";
3
- import { escapeHtml as c } from "./htmlEscape.js";
4
- const n = "assign-strategy-info-box", a = (e) => typeof e == "string" ? e : typeof e == "number" ? String(e) : "", p = (e, t) => {
5
- const r = a(e.algorithm) === "MIXED" ? t("discovery-strategy.mixed-algorithm") : t("discovery-strategy.single-algorithm"), i = a(e.algorithm_used).split(",").map((o) => o.trim()).filter(Boolean).map((o) => t(`recommendation-algorithm-names.${o.replaceAll("_", "-").toLowerCase()}`));
6
- return i.length ? `${r} · ${i.join(", ")}` : r;
7
- }, g = (e, t) => [
1
+ import { useTranslations as a } from "../composables/useTranslations.js";
2
+ import { formatShortDate as c } from "./dateUtil.js";
3
+ import { escapeHtml as l } from "./htmlEscape.js";
4
+ const d = "assign-strategy-info-box", o = (e) => typeof e == "string" ? e : typeof e == "number" ? String(e) : "", u = (e, t) => {
5
+ const r = o(e.algorithm) === "MIXED" ? t("discovery-strategy.mixed-algorithm") : t("discovery-strategy.single-algorithm"), n = o(e.algorithm_used).split(",").map((i) => i.trim()).filter(Boolean).map((i) => t(`recommendation-algorithm-names.${i.replaceAll("_", "-").toLowerCase()}`));
6
+ return n.length ? `${r} · ${n.join(", ")}` : r;
7
+ }, m = (e, t) => [
8
8
  [e.exclude_view, "discovery-strategy.exclude-recently-view-items"],
9
9
  [e.exclude_purchase, "discovery-strategy.exclude-recently-purchased-items"],
10
10
  [e.exclude_cart, "discovery-strategy.exclude-recently-added-cart-items"]
11
- ].filter(([r]) => Number(r) === 1).map(([, r]) => t(r)).join(", "), h = (e) => a(
12
- e.manual_merchandising || e.manual_merchandising_products
13
- ).trim(), _ = (e) => {
11
+ ].filter(([r]) => Number(r) === 1).map(([, r]) => t(r)).join(", "), s = (e) => {
12
+ const t = o(e).trim();
13
+ if (!t)
14
+ return "";
15
+ let r;
16
+ try {
17
+ r = JSON.parse(t);
18
+ } catch {
19
+ return t;
20
+ }
21
+ if (Array.isArray(r))
22
+ return r.length ? String(r.length) : "";
23
+ if (r && typeof r == "object") {
24
+ const n = Object.keys(r).length;
25
+ return n ? String(n) : "";
26
+ }
27
+ return t;
28
+ }, p = (e) => s(e.manual_merchandising) || s(e.manual_merchandising_products), g = (e) => {
29
+ if (Array.isArray(e))
30
+ return e.length;
31
+ const { conditionList: t } = e ?? {};
32
+ return Array.isArray(t) ? t.length : 1;
33
+ }, h = (e) => {
14
34
  const t = e.filters;
15
35
  if (!t)
16
36
  return 0;
17
37
  try {
18
38
  const r = typeof t == "string" ? JSON.parse(t) : t;
19
- return Array.isArray(r) ? r.reduce((i, o) => i + (Array.isArray(o) ? o.length : 1), 0) : 0;
39
+ return !r || typeof r != "object" ? 0 : Object.values(r).reduce((n, i) => n + g(i), 0);
20
40
  } catch {
21
41
  return 0;
22
42
  }
23
- }, s = (e, t) => `<div class="${n}__row"><span class="${n}__label">${c(e)}</span><span class="${n}__value">${c(t)}</span></div>`, v = (e, t = m()) => {
24
- const r = t("recommendation-strategy.none"), i = a(e.updated_at || e.created_at), o = _(e), d = i ? c(t("recommendation-strategy.last-updated-on", { value: u(i) })) : "", l = d ? `<div class="${n}__updated">${d}</div>` : "";
43
+ }, f = (e, t) => {
44
+ const r = o(e.updated_at || e.created_at);
45
+ return r ? t("recommendation-strategy.last-updated-on", { value: c(r) }) : "";
46
+ }, y = (e, t = a()) => {
47
+ const r = t("recommendation-strategy.none"), n = h(e);
25
48
  return {
26
- id: `strategy-info-${e.strategy_id}`,
27
- theme: "light",
28
- variant: "information",
29
- className: n,
30
- titleText: c(a(e.name)),
31
- descriptionText: l + s(t("gpt-app-builder.algorithms-and-method"), p(e, t)) + s(t("gpt-app-builder.exclusions"), g(e, t) || r) + s(t("discovery-strategy.filters"), o ? String(o) : r) + s(t("action-builder.manual-merchandising"), h(e) || r)
49
+ details: [
50
+ { title: t("gpt-app-builder.algorithms-and-method"), value: u(e, t) },
51
+ { title: t("gpt-app-builder.exclusions"), value: m(e, t) || r },
52
+ { title: t("discovery-strategy.filters"), value: n ? String(n) : r },
53
+ { title: t("action-builder.manual-merchandising"), value: p(e) || r }
54
+ ]
32
55
  };
33
- };
56
+ }, b = (e, t = a()) => ({
57
+ id: `strategy-info-${e.strategy_id}`,
58
+ theme: "light",
59
+ variant: "information",
60
+ className: d,
61
+ titleText: l(o(e.name)),
62
+ descriptionStatus: !0,
63
+ descriptionText: f(e, t),
64
+ slotProps: y(e, t)
65
+ });
34
66
  export {
35
- n as STRATEGY_INFO_BOX_CLASS,
36
- v as buildStrategyInfoBoxProps
67
+ b as buildStrategyInfoBoxProps
37
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.17.0-beta.ad62b51",
3
+ "version": "3.17.0-beta.bdc7d25",
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",
@@ -48,7 +48,7 @@
48
48
  "license": "ISC",
49
49
  "dependencies": {
50
50
  "@stripoinc/ui-editor-extensions": "3.9.0",
51
- "@useinsider/design-system-organisms": "0.0.3-beta.fc2c160",
51
+ "@useinsider/design-system-organisms": "0.0.3-beta.791d412",
52
52
  "@useinsider/design-system-vue": "1.5.0",
53
53
  "@vueuse/core": "11.3.0",
54
54
  "lodash-es": "4.17.21",