@useinsider/guido 3.12.0-beta.d2745e7 → 3.12.0-beta.d77b0d2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/@types/config/schemas.js +9 -4
  2. package/dist/components/Guido.vue.js +6 -6
  3. package/dist/components/Guido.vue2.js +50 -49
  4. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +38 -0
  5. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +271 -0
  6. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +18 -0
  7. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +42 -0
  8. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +20 -0
  9. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +18 -0
  10. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +20 -0
  11. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +60 -0
  12. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +19 -0
  13. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +19 -0
  14. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +22 -0
  15. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +29 -0
  16. package/dist/composables/useHtmlValidator.js +68 -60
  17. package/dist/composables/useHttp.js +61 -52
  18. package/dist/composables/useRecommendation.js +56 -40
  19. package/dist/composables/useSave.js +22 -22
  20. package/dist/composables/useStrategyFilters.js +16 -0
  21. package/dist/config/migrator/recommendationMigrator.js +7 -4
  22. package/dist/enums/date.js +4 -3
  23. package/dist/enums/extensions/filteringV2.js +1024 -0
  24. package/dist/enums/extensions/recommendationBlock.js +45 -24
  25. package/dist/enums/extensions/strategyDetail.js +149 -0
  26. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +12 -11
  27. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +141 -123
  28. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +297 -0
  29. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +16 -2
  30. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +137 -0
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +549 -165
  32. package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +97 -0
  33. package/dist/extensions/Blocks/Recommendation/utils/strategyNavigation.js +8 -0
  34. package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +95 -0
  35. package/dist/extensions/Blocks/Recommendation/utils/strategyUrl.js +43 -0
  36. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +24 -10
  37. package/dist/extensions/Blocks/common-control.js +37 -35
  38. package/dist/guido.css +1 -1
  39. package/dist/services/recommendationApi.js +127 -33
  40. package/dist/services/stripoApi.js +18 -18
  41. package/dist/src/@types/config/schemas.d.ts +10 -0
  42. package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +2 -0
  43. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +43 -0
  44. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +29 -0
  45. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +40 -0
  46. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +38 -0
  47. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +51 -0
  48. package/dist/src/composables/useConfig.d.ts +2 -0
  49. package/dist/src/composables/useHtmlValidator.d.ts +2 -0
  50. package/dist/src/composables/useRecommendation.d.ts +2 -0
  51. package/dist/src/composables/useStrategyFilters.d.ts +24 -0
  52. package/dist/src/enums/extensions/filteringV2.d.ts +72 -0
  53. package/dist/src/enums/extensions/recommendationBlock.d.ts +33 -0
  54. package/dist/src/enums/extensions/strategyDetail.d.ts +90 -0
  55. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +10 -4
  56. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +118 -0
  57. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +958 -1
  58. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
  59. package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +50 -0
  60. package/dist/src/extensions/Blocks/Recommendation/utils/strategyNavigation.d.ts +10 -0
  61. package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +34 -0
  62. package/dist/src/extensions/Blocks/Recommendation/utils/strategyUrl.d.ts +51 -0
  63. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +8 -1
  64. package/dist/src/extensions/Blocks/common-control.d.ts +5 -2
  65. package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
  66. package/dist/src/services/recommendationApi.d.ts +9 -1
  67. package/dist/src/stores/config.d.ts +18 -0
  68. package/dist/src/utils/genericUtil.d.ts +9 -0
  69. package/dist/static/styles/components/base-input.css.js +6 -7
  70. package/dist/utils/dateUtil.js +23 -10
  71. package/dist/utils/genericUtil.js +10 -1
  72. package/dist/utils/templatePreparation.js +70 -57
  73. package/package.json +1 -1
@@ -0,0 +1,297 @@
1
+ var S = Object.defineProperty;
2
+ var T = (d, a, t) => a in d ? S(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
3
+ var h = (d, a, t) => T(d, typeof a != "symbol" ? a + "" : a, t);
4
+ import { useTranslations as E } from "../../../../../composables/useTranslations.js";
5
+ import { STRATEGY_PAGES as v } from "../../../../../enums/extensions/recommendationBlock.js";
6
+ import { formatShortDate as C } from "../../../../../utils/dateUtil.js";
7
+ import { escapeHtml as _ } from "../../../../../utils/htmlEscape.js";
8
+ import { UEAttr as u } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
9
+ import { CommonControl as b } from "../../../common-control.js";
10
+ import { useRecommendationExtensionStore as f } from "../../store/recommendation.js";
11
+ import { navigateToStrategyPage as I } from "../../utils/strategyNavigation.js";
12
+ import { buildStrategySummary as R } from "../../utils/strategySummary.js";
13
+ const A = "recommendation-strategy-control", o = {
14
+ STRATEGY: "strategyId",
15
+ MISSING_MESSAGE: "strategyMissing",
16
+ CREATE_BUTTON: "strategyCreate",
17
+ DETAILS_BUTTON: "strategyDetails"
18
+ }, g = "guido__btn-strategy-create", m = "guido__btn-strategy-details", n = {
19
+ ROOT: "data-strategy-control",
20
+ MISSING: "data-strategy-missing",
21
+ CARD: "data-strategy-card",
22
+ VIEW_MORE: "data-strategy-view-more"
23
+ }, M = "dropdown__item", O = ".dropdown__text", p = (d) => d.composedPath().find((a) => a instanceof HTMLElement && a.classList.contains(M)) ?? null, c = 8, w = 150, $ = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-2a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm-1-7a1 1 0 1 1 2 0v4a1 1 0 1 1-2 0v-4zm1-5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg>';
24
+ class V extends b {
25
+ constructor() {
26
+ super(...arguments);
27
+ h(this, "store", f());
28
+ /**
29
+ * InOne's dictionary, not Stripo's. Every dotted key here
30
+ * (`discovery-strategy.*`, `gpt-app-builder.*`) lives in the host panel's
31
+ * translations, which `this.api.translate` does not read — that one is only
32
+ * for the plain-English control labels the rest of this panel uses.
33
+ */
34
+ h(this, "trans", E());
35
+ h(this, "events", null);
36
+ h(this, "unsubscribeStore", null);
37
+ h(this, "cardHideTimer", null);
38
+ /**
39
+ * Resolved once per render.
40
+ *
41
+ * The card stays INSIDE the control's markup. Parking it at the top of the
42
+ * shadow root positions it identically but places it outside the settings
43
+ * panel, and Stripo reads a press there as a press on the canvas: the block
44
+ * is deselected, the panel closes, and View More never gets its click.
45
+ */
46
+ h(this, "card", null);
47
+ }
48
+ getId() {
49
+ return A;
50
+ }
51
+ getTemplate() {
52
+ return `
53
+ <div class="strategy-control" ${n.ROOT}>
54
+ ${this._GuOneColumn([
55
+ this._GuLabel({ text: this.api.translate("Recommendation Strategy") }),
56
+ `<div class="strategy-control__row">
57
+ ${this._GuSelect({
58
+ name: o.STRATEGY,
59
+ placeholder: this.trans("smart-recommender.select-recommendation-strategy"),
60
+ // Filled in onRender — the listing is fetched async.
61
+ options: [],
62
+ searchable: !0,
63
+ className: "strategy-control__select"
64
+ })}
65
+ ${this._GuIconButton({
66
+ name: o.DETAILS_BUTTON,
67
+ icon: "strategy-settings-icon",
68
+ className: "strategy-control__details",
69
+ id: m
70
+ })}
71
+ </div>`,
72
+ /*
73
+ * Hidden in the markup rather than via `setVisibility`: a
74
+ * `UE-MESSAGE` that is parsed before it has a value paints the
75
+ * literal "Undefined", and `onRender` runs too late to prevent
76
+ * the flash. `_GuOnPageMessage` hides its wrapper for the same
77
+ * reason.
78
+ */
79
+ `<div ${n.MISSING} style="display: none;">
80
+ ${this._GuMessage({ name: o.MISSING_MESSAGE, type: "alert" })}
81
+ </div>`,
82
+ `<div class="strategy-control__create-row">
83
+ ${this._GuButton({
84
+ name: o.CREATE_BUTTON,
85
+ label: this.api.translate("Create New Strategy"),
86
+ id: g
87
+ })}
88
+ </div>`
89
+ ])}
90
+ <div class="strategy-card" ${n.CARD} hidden></div>
91
+ </div>
92
+ `;
93
+ }
94
+ onRender() {
95
+ var t;
96
+ this.card = ((t = this._root()) == null ? void 0 : t.querySelector(`[${n.CARD}]`)) ?? null, this._setupEventListeners(), this._subscribeToStoreChanges(), this._render();
97
+ }
98
+ onDestroy() {
99
+ var t, e;
100
+ this._cancelHideCard(), this.card = null, (t = this.events) == null || t.abort(), this.events = null, (e = this.unsubscribeStore) == null || e.call(this), this.unsubscribeStore = null, super.onDestroy();
101
+ }
102
+ _root() {
103
+ var t;
104
+ return ((t = this.getContainer()) == null ? void 0 : t.querySelector(`[${n.ROOT}]`)) ?? null;
105
+ }
106
+ _setupEventListeners() {
107
+ var s, r, i;
108
+ (s = this.events) == null || s.abort(), this.events = new AbortController();
109
+ const { signal: t } = this.events, e = this._root();
110
+ e && (this.api.onValueChanged(o.STRATEGY, (l) => {
111
+ this._onStrategyChange(typeof l == "string" ? l : "");
112
+ }), (r = e.querySelector(`#${m}`)) == null || r.addEventListener("click", () => this.store.openStrategyDrawer(), { signal: t }), (i = e.querySelector(`#${g}`)) == null || i.addEventListener("click", () => I(v.CREATE), { signal: t }), this._setupCardListeners(t));
113
+ }
114
+ /**
115
+ * The card follows Stripo's own option rows.
116
+ *
117
+ * Stripo does not render the dropdown inside `ue-select`: it hands the list to
118
+ * `UE-FLOATING-COMPONENTS-CONTAINER`, a sibling of the whole settings panel.
119
+ * The shadow root is the only node that is an ancestor of both, so that is
120
+ * where the listener goes.
121
+ *
122
+ * `capture: true` is load-bearing, not caution. Stripo binds its own
123
+ * `mouseover` on the option row to drive `ue-select`'s `hoverItem` output and
124
+ * stops propagation there — measured: a bubble-phase listener on the shadow
125
+ * root sees nothing, the event dies one level above the row. Capture runs
126
+ * root-to-target, before that handler ever gets to speak.
127
+ *
128
+ * `mouseover`/`mouseout` rather than `mouseenter`/`mouseleave` because the
129
+ * latter do not participate in delegation at all, and the row is resolved
130
+ * through `composedPath()` rather than `event.target`.
131
+ *
132
+ * A row is matched to a strategy by its label, which doubles as the scope
133
+ * check — hovering the Locale or Currency dropdown finds no match and is
134
+ * ignored. Two strategies sharing a name would show the first one's card;
135
+ * Smart Recommender does not enforce unique names, and that is the cost.
136
+ */
137
+ _setupCardListeners(t) {
138
+ const e = this.getContainer();
139
+ e == null || e.addEventListener("mouseover", (r) => {
140
+ const i = p(r);
141
+ i && this._showCard(i);
142
+ }, { capture: !0, signal: t }), e == null || e.addEventListener("mouseout", (r) => {
143
+ p(r) && this._scheduleHideCard();
144
+ }, { capture: !0, signal: t });
145
+ const { card: s } = this;
146
+ s == null || s.addEventListener("mouseenter", () => this._cancelHideCard(), { signal: t }), s == null || s.addEventListener("mouseleave", () => this._hideCard(), { signal: t }), s == null || s.addEventListener("click", (r) => {
147
+ const i = r.target.closest(`[${n.VIEW_MORE}]`), l = i == null ? void 0 : i.getAttribute(n.VIEW_MORE);
148
+ l && (this._hideCard(), this.store.openStrategyDrawer(l));
149
+ }, { signal: t });
150
+ }
151
+ /**
152
+ * Guarded the same way `AlgorithmControl` guards its own select: writing the
153
+ * value back in `_render()` re-fires `onValueChanged`, and without this the
154
+ * control would re-select on every store change.
155
+ */
156
+ _onStrategyChange(t) {
157
+ !t || t === this.store.recommendationConfigs.strategyId || (this._hideCard(), this.store.selectStrategy(t));
158
+ }
159
+ /**
160
+ * Keeps the select's items, its value and the gear's enabled state in step
161
+ * with the store.
162
+ *
163
+ * All three depend on data that arrives after the first render: the strategy
164
+ * listing is fetched asynchronously, and `strategyId` changes when the user
165
+ * picks, duplicates, or switches blocks.
166
+ */
167
+ _subscribeToStoreChanges() {
168
+ var e;
169
+ (e = this.unsubscribeStore) == null || e.call(this);
170
+ let t = this._stateKey();
171
+ this.unsubscribeStore = this.store.$subscribe(() => {
172
+ const s = this._stateKey();
173
+ s !== t && (t = s, this._render());
174
+ });
175
+ }
176
+ /**
177
+ * Fingerprint of everything the rendered control depends on.
178
+ *
179
+ * Ids rather than a count: a refetch that renames a strategy or swaps one for
180
+ * another of the same length would otherwise leave the select showing stale
181
+ * copy until some unrelated store change happened to repaint.
182
+ */
183
+ _stateKey() {
184
+ return [
185
+ this.store.recommendationConfigs.strategyId,
186
+ this.store.strategiesLoading,
187
+ this.store.strategies.map((t) => `${t.strategy_id}:${t.name}`).join(",")
188
+ ].join("|");
189
+ }
190
+ _render() {
191
+ this.api.setUIEAttribute(
192
+ o.STRATEGY,
193
+ u.SELECTPICKER.items,
194
+ this.store.getStrategyOptions
195
+ ), this.api.updateValues({ [o.STRATEGY]: this.store.recommendationConfigs.strategyId }), this.api.setUIEAttribute(
196
+ o.DETAILS_BUTTON,
197
+ u.BUTTON.disabled,
198
+ this.store.getSelectedStrategy ? "false" : "true"
199
+ ), this._renderMissingMessage();
200
+ }
201
+ /**
202
+ * A strategy id the listing no longer knows was deleted in Smart Recommender.
203
+ * The id is deliberately kept (the save gate needs to see it) but the select
204
+ * falls back to its placeholder, so without this a broken block would look
205
+ * like one that was simply never configured.
206
+ */
207
+ _renderMissingMessage() {
208
+ var s;
209
+ const t = (s = this._root()) == null ? void 0 : s.querySelector(`[${n.MISSING}]`);
210
+ if (!t)
211
+ return;
212
+ const e = this.store.hasMissingStrategy;
213
+ e && this.api.setUIEAttribute(
214
+ o.MISSING_MESSAGE,
215
+ "value",
216
+ this.trans("recommendation-strategy.strategy-not-found")
217
+ ), t.style.display = e ? "" : "none";
218
+ }
219
+ /**
220
+ * The hover card is `position: fixed`, so it can sit beside the narrow panel
221
+ * instead of being clipped by it. Placed once per hover — the list cannot
222
+ * scroll under the pointer without the pointer leaving, so there is nothing
223
+ * to keep in sync.
224
+ */
225
+ _showCard(t) {
226
+ const { card: e } = this, s = this._strategyForItem(t);
227
+ if (!e || !s)
228
+ return;
229
+ this._cancelHideCard(), e.innerHTML = this._buildCardHtml(s), e.removeAttribute("hidden");
230
+ const r = t.getBoundingClientRect(), i = e.getBoundingClientRect(), l = r.left - i.width - c >= c ? r.left - i.width - c : r.right + c, y = window.innerHeight - i.height - c;
231
+ e.style.left = `${Math.max(c, l)}px`, e.style.top = `${Math.min(Math.max(c, r.top), Math.max(c, y))}px`;
232
+ }
233
+ /**
234
+ * Resolves one of Stripo's option rows back to the strategy it was built from.
235
+ *
236
+ * Matched against the *rendered option labels*, not raw strategy names. Stripo's
237
+ * row carries no value of its own — its bindings are disabled/selected/tabindex —
238
+ * so the text is all there is, and `getStrategyOptions` disambiguates duplicate
239
+ * names by appending the id. Comparing to `strategy.name` would miss exactly those
240
+ * rows; going through the option list keeps the label the user sees and the label
241
+ * we match on in lockstep.
242
+ */
243
+ _strategyForItem(t) {
244
+ var r;
245
+ const e = (r = (t.querySelector(O) ?? t).textContent) == null ? void 0 : r.trim();
246
+ if (!e)
247
+ return;
248
+ const s = this.store.getStrategyOptions.find(({ text: i }) => i.trim() === e);
249
+ return s ? this.store.strategies.find((i) => String(i.strategy_id) === s.value) : void 0;
250
+ }
251
+ /** Grace period for the pointer to cross the gap between the row and the card. */
252
+ _scheduleHideCard() {
253
+ this._cancelHideCard(), this.cardHideTimer = setTimeout(() => this._hideCard(), w);
254
+ }
255
+ _cancelHideCard() {
256
+ this.cardHideTimer && (clearTimeout(this.cardHideTimer), this.cardHideTimer = null);
257
+ }
258
+ _hideCard() {
259
+ var t;
260
+ this._cancelHideCard(), (t = this.card) == null || t.setAttribute("hidden", "");
261
+ }
262
+ /**
263
+ * Mirrors the design system's `InInfoBox`: coloured top rule, heading +
264
+ * "last updated" details, content, then a divided footer holding the View
265
+ * More text button. The component itself cannot render here, so the markup
266
+ * and the CSS reproduce its structure and tokens rather than approximating
267
+ * them — the values in `recommendation.css` are read from its stylesheet.
268
+ */
269
+ _buildCardHtml(t) {
270
+ const { trans: e } = this, s = R(t, e).map((r) => `
271
+ <div class="strategy-card__row">
272
+ <p class="strategy-card__row-title">${_(r.title)}</p>
273
+ <p class="strategy-card__row-value">${_(r.value)}</p>
274
+ </div>
275
+ `).join("");
276
+ return `
277
+ <div class="strategy-card__body">
278
+ <p class="strategy-card__title">${_(t.name)}</p>
279
+ <p class="strategy-card__updated">${_(e("gpt-app-builder.strategy-last-updated", {
280
+ date: C(t.updated_at)
281
+ }))}</p>
282
+ <div class="strategy-card__rows">${s}</div>
283
+ </div>
284
+ <div class="strategy-card__footer">
285
+ <button type="button" class="strategy-card__more"
286
+ ${n.VIEW_MORE}="${_(String(t.strategy_id))}">
287
+ ${$}
288
+ <span>${_(e("gpt-app-builder.view-more"))}</span>
289
+ </button>
290
+ </div>
291
+ `;
292
+ }
293
+ }
294
+ export {
295
+ A as STRATEGY_CONTROL_ID,
296
+ V as StrategyControl
297
+ };
@@ -1,6 +1,6 @@
1
1
  import r from "../../../static/assets/info.svg.js";
2
2
  import { IconsRegistry as C } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- class h extends C {
3
+ class l extends C {
4
4
  registerIconsSvg(t) {
5
5
  t["recommendation-icon"] = `
6
6
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
@@ -74,9 +74,23 @@ class h extends C {
74
74
  <path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
75
75
  stroke-width="2" fill="none"/>
76
76
  </svg>
77
+ `, t["strategy-settings-icon"] = `
78
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
79
+ fill="currentColor">
80
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14 4a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v.757c0
81
+ .891-1.077 1.337-1.707.708l-.536-.536a1 1 0 0 0-1.414 0L4.93 6.343a1 1 0 0 0 0
82
+ 1.414l.535.536c.63.63.184 1.707-.707 1.707H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h.757c.891 0
83
+ 1.337 1.077.708 1.707l-.536.536a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414
84
+ 0l.536-.535c.63-.63 1.707-.184 1.707.707V20a1 1 0 0 0 1 1h2a1 1 0 0 0
85
+ 1-1v-.757c0-.891 1.077-1.337 1.707-.707l.536.535a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0
86
+ 0-1.414l-.536-.536c-.63-.63-.183-1.707.708-1.707H20a1 1 0 0 0 1-1v-2a1 1 0 0
87
+ 0-1-1h-.757c-.891 0-1.337-1.077-.707-1.707l.535-.536a1 1 0 0 0
88
+ 0-1.414L17.657 4.93a1 1 0 0 0-1.414 0l-.536.536c-.63.63-1.707.183-1.707-.708V4zm3 8a5 5 0
89
+ 1 1-10 0 5 5 0 0 1 10 0zm-5 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>
90
+ </svg>
77
91
  `, t["migration-info-icon"] = r;
78
92
  }
79
93
  }
80
94
  export {
81
- h as RecommendationIconsRegistry
95
+ l as RecommendationIconsRegistry
82
96
  };
@@ -289,6 +289,143 @@ ue-orderable.orderable-disabled .droppable-icon {
289
289
  font-weight: 400;
290
290
  line-height: 16px;
291
291
  }
292
+
293
+ /*
294
+ * Recommendation Strategy picker (controls/main/strategy.ts).
295
+ *
296
+ * The select, its filter box and both buttons are Stripo UI elements and carry
297
+ * no styling of ours — these rules only lay out the row the select shares with
298
+ * the gear, stretch the Create button, and draw the hover card.
299
+ *
300
+ * The card's values are the design system's own, read from \`InInfoBox\`'s
301
+ * stylesheet. The \`In*\` components themselves cannot render in this shadow root
302
+ * — they are styled from the host document, and copying their stylesheets across
303
+ * drags normalize.css and a global \`*\`/\`svg\` reset into Stripo's panel.
304
+ */
305
+
306
+ .strategy-control__row {
307
+ display: flex;
308
+ align-items: center;
309
+ gap: 8px;
310
+ }
311
+
312
+ /* The select owns the row; \`min-width: 0\` lets it shrink instead of overflowing. */
313
+ .strategy-control__select {
314
+ flex: 1;
315
+ min-width: 0;
316
+ }
317
+
318
+ /* The gear button sits beside the select and must not stretch with it. */
319
+ .strategy-control__details {
320
+ flex: none;
321
+ }
322
+
323
+ .strategy-control__create-row {
324
+ margin-top: 8px;
325
+ }
326
+
327
+ /*
328
+ * \`_GuButton\` renders <ue-button> > .control-shadow-wrapper > button.button, and
329
+ * every level is shrink-to-fit. Stretching only the innermost one leaves the
330
+ * button its intrinsic width, which is why the design's full-width row needs all
331
+ * three.
332
+ */
333
+ .strategy-control__create-row ue-button,
334
+ .strategy-control__create-row .control-shadow-wrapper,
335
+ .strategy-control__create-row .button {
336
+ display: block;
337
+ width: 100%;
338
+ }
339
+
340
+ /*
341
+ * Hover card. Reproduces the design system's \`InInfoBox\` — same 240px medium
342
+ * width, 4px information-blue top rule, 16px body, and a divided footer for the
343
+ * View More button.
344
+ *
345
+ * \`position: fixed\` so the card sits beside the narrow panel instead of being
346
+ * clipped by it.
347
+ */
348
+ /*
349
+ * \`position: fixed\` so the card escapes the narrow panel's clipping, and a
350
+ * z-index above Stripo's floating dropdown (which sits at 1000) since the card
351
+ * is drawn right beside it.
352
+ */
353
+ .strategy-card {
354
+ position: fixed;
355
+ z-index: 9999;
356
+ width: 240px;
357
+ background: var(--guido-color-white);
358
+ border-top: 4px solid var(--guido-color-border-onpage-message-info);
359
+ border-radius: 4px;
360
+ box-shadow: 0 4px 12px rgba(57, 57, 57, 0.15);
361
+ }
362
+
363
+ .strategy-card[hidden] {
364
+ display: none;
365
+ }
366
+
367
+ .strategy-card__body {
368
+ padding: 16px;
369
+ }
370
+
371
+ .strategy-card__title {
372
+ margin: 0;
373
+ color: var(--guido-color-gray-800);
374
+ font-size: 16px;
375
+ font-weight: 600;
376
+ line-height: 24px;
377
+ word-break: break-word;
378
+ }
379
+
380
+ .strategy-card__updated {
381
+ margin: 4px 0 0;
382
+ color: var(--guido-color-gray-600);
383
+ font-size: 13px;
384
+ font-weight: 400;
385
+ line-height: 16px;
386
+ }
387
+
388
+ .strategy-card__rows {
389
+ margin-top: 16px;
390
+ }
391
+
392
+ .strategy-card__row + .strategy-card__row {
393
+ margin-top: 12px;
394
+ }
395
+
396
+ .strategy-card__row-title {
397
+ margin: 0;
398
+ color: var(--guido-color-gray-600);
399
+ font-size: 12px;
400
+ line-height: 16px;
401
+ }
402
+
403
+ .strategy-card__row-value {
404
+ margin: 0;
405
+ color: var(--guido-color-gray-800);
406
+ font-size: 13px;
407
+ line-height: 18px;
408
+ word-break: break-word;
409
+ }
410
+
411
+ .strategy-card__footer {
412
+ padding: 8px 16px;
413
+ border-top: 1px solid var(--guido-color-gray-300);
414
+ }
415
+
416
+ .strategy-card__more {
417
+ display: flex;
418
+ align-items: center;
419
+ gap: 4px;
420
+ padding: 0;
421
+ color: var(--guido-color-primary-500);
422
+ background: none;
423
+ border: 0;
424
+ cursor: pointer;
425
+ font-size: 13px;
426
+ font-weight: 600;
427
+ line-height: 16px;
428
+ }
292
429
  `;
293
430
  export {
294
431
  n as default