@useinsider/guido 3.19.0-beta.3abc7c5 → 3.19.0-beta.3daecd0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/@types/config/schemas.js +118 -107
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +84 -75
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
- package/dist/components/organisms/header/EditorActions.vue.js +5 -5
- package/dist/components/organisms/header/EditorActions.vue2.js +55 -85
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
- package/dist/components/wrappers/WpDrawer.vue.js +7 -9
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAuthError.js +52 -0
- package/dist/composables/useAutoSave.js +11 -11
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useHttp.js +64 -54
- package/dist/composables/useLegacyStrategyConversion.js +23 -19
- package/dist/composables/useSave.js +45 -90
- package/dist/composables/useStripo.js +24 -20
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/config/migrator/index.js +14 -13
- package/dist/config/migrator/itemsBlockMigrator.js +236 -248
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
- package/dist/enums/extensions/recommendationBlock.js +30 -29
- package/dist/extensions/Blocks/Items/block.js +48 -45
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/block.js +15 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +32 -38
- package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +16 -4
- package/dist/src/components/Guido.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
- package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAuthError.d.ts +12 -0
- package/dist/src/composables/useConfig.d.ts +2 -2
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/composables/useSave.d.ts +1 -6
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/config.d.ts +20 -32
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/stores/config.js +67 -84
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/pairProductVariables.js +71 -71
- package/dist/utils/templatePreparation.js +36 -39
- package/package.json +1 -1
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
- package/dist/composables/useSaveValidation.js +0 -279
- package/dist/composables/useSaveValidationRollout.js +0 -9
- package/dist/enums/save-validation.js +0 -4
- package/dist/src/@types/save-validation.d.ts +0 -19
- package/dist/src/composables/useSaveValidation.d.ts +0 -6
- package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
- package/dist/src/enums/save-validation.d.ts +0 -27
- package/dist/src/stores/save-validation.d.ts +0 -22
- package/dist/stores/save-validation.js +0 -30
- /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → base/AuthErrorModal.vue.d.ts} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useToaster as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { getRecommendationFeedSourceMaps as F, strategyEditPath as
|
|
1
|
+
import { useToaster as _ } from "../../../../composables/useToaster.js";
|
|
2
|
+
import { useTranslations as L } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getRecommendationFeedSourceMaps as F, strategyEditPath as U, strategyCreatePath as N, getOperatorOptions as M, PriceAttributes as E } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
4
|
import { ToasterTypeOptions as B } from "../../../../enums/toaster.js";
|
|
5
|
-
import { useRecommendationApi as
|
|
5
|
+
import { useRecommendationApi as z } from "../../../../services/recommendationApi.js";
|
|
6
6
|
import { useConfigStore as R } from "../../../../stores/config.js";
|
|
7
|
-
import { defineStore as
|
|
7
|
+
import { defineStore as A } from "pinia";
|
|
8
8
|
import "../constants/selectors.js";
|
|
9
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
10
|
-
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as
|
|
9
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as O, DEFAULT_CARDS_IN_ROW as x } from "../constants/layout.js";
|
|
10
|
+
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as T, EXCLUDED_ALGORITHM_IDS as V } from "../constants/defaultConfig.js";
|
|
11
11
|
import { getDefaultProducts as w } from "../templates/utils.js";
|
|
12
12
|
import { generateCompleteFilterQuery as P } from "../utils/filterUtil.js";
|
|
13
|
-
import { isLegacyStrategyConfig as
|
|
14
|
-
import { getPartnerRecommendationParams as
|
|
15
|
-
import { sanitizeProductIds as
|
|
16
|
-
import { isFilterValid as
|
|
17
|
-
import { getInvalidFields as
|
|
18
|
-
const m =
|
|
13
|
+
import { isLegacyStrategyConfig as j } from "../utils/legacyStrategyMigration.js";
|
|
14
|
+
import { getPartnerRecommendationParams as $ } from "../utils/partnerCustomizations.js";
|
|
15
|
+
import { sanitizeProductIds as q } from "../utils/productIds.js";
|
|
16
|
+
import { isFilterValid as K } from "../validation/filterSchema.js";
|
|
17
|
+
import { getInvalidFields as H, isConfigValid as J } from "../validation/requiredFields.js";
|
|
18
|
+
const m = z();
|
|
19
19
|
let S = null, p = null, y = null, I = "", k = null, b = 0;
|
|
20
20
|
const g = /* @__PURE__ */ new Map();
|
|
21
21
|
let l = null;
|
|
@@ -35,7 +35,7 @@ function D() {
|
|
|
35
35
|
productIds: [],
|
|
36
36
|
id: 1,
|
|
37
37
|
language: "en_US",
|
|
38
|
-
mobileCardsInRow:
|
|
38
|
+
mobileCardsInRow: O,
|
|
39
39
|
mobileLayoutEnabled: !1,
|
|
40
40
|
orientation: "grid",
|
|
41
41
|
recommendedProducts: [],
|
|
@@ -56,7 +56,7 @@ function D() {
|
|
|
56
56
|
priceHideIfSameAsDiscounted: !1
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function G() {
|
|
60
60
|
return {
|
|
61
61
|
recommendationConfigs: D(),
|
|
62
62
|
recommendationProducts: [],
|
|
@@ -87,7 +87,7 @@ const Q = () => ({
|
|
|
87
87
|
currentRecommendationId: null,
|
|
88
88
|
strategyPanelOpen: !1,
|
|
89
89
|
configVersion: 0
|
|
90
|
-
}), ft =
|
|
90
|
+
}), ft = A("guidoRecommendationExtension", {
|
|
91
91
|
state: () => Q(),
|
|
92
92
|
getters: {
|
|
93
93
|
// ====================================================================
|
|
@@ -119,7 +119,7 @@ const Q = () => ({
|
|
|
119
119
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
|
|
120
120
|
},
|
|
121
121
|
isLegacyStrategyBlock() {
|
|
122
|
-
return R().isFeatureEnabled("reusableRecommendationStrategy") &&
|
|
122
|
+
return R().isFeatureEnabled("reusableRecommendationStrategy") && j(this.recommendationConfigs);
|
|
123
123
|
},
|
|
124
124
|
legacyConversionLoading(t) {
|
|
125
125
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyConversionLoading ?? !1 : !1;
|
|
@@ -163,7 +163,7 @@ const Q = () => ({
|
|
|
163
163
|
},
|
|
164
164
|
getActivePredictiveAlgorithms: (t) => {
|
|
165
165
|
const e = F(), r = [];
|
|
166
|
-
return t.activePredictiveAlgorithms.filter((n) => !
|
|
166
|
+
return t.activePredictiveAlgorithms.filter((n) => !V.includes(n)).forEach((n) => {
|
|
167
167
|
r.push(...e.filter((s) => s.id === n));
|
|
168
168
|
}), r.map((n) => ({
|
|
169
169
|
text: n.name,
|
|
@@ -181,7 +181,7 @@ const Q = () => ({
|
|
|
181
181
|
getFilterList() {
|
|
182
182
|
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
183
183
|
let e;
|
|
184
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
184
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : E.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
185
185
|
text: t.displayName,
|
|
186
186
|
value: e,
|
|
187
187
|
type: t.attributeType
|
|
@@ -203,7 +203,7 @@ const Q = () => ({
|
|
|
203
203
|
setCurrentBlock(t) {
|
|
204
204
|
this.blockStates[t] || (this.blockStates = {
|
|
205
205
|
...this.blockStates,
|
|
206
|
-
[t]:
|
|
206
|
+
[t]: G()
|
|
207
207
|
}), this.currentRecommendationId = t;
|
|
208
208
|
},
|
|
209
209
|
/**
|
|
@@ -275,7 +275,7 @@ const Q = () => ({
|
|
|
275
275
|
decimalCount: String(e.currencyDecimalCount),
|
|
276
276
|
decimalSeparator: r(e.currencyDecimalSeparator, ","),
|
|
277
277
|
thousandSeparator: r(e.currencyThousandSeparator, ".")
|
|
278
|
-
}, s = !this.blockStates[t], i = s ?
|
|
278
|
+
}, s = !this.blockStates[t], i = s ? G() : this.blockStates[t];
|
|
279
279
|
i.recommendationConfigs = {
|
|
280
280
|
...i.recommendationConfigs,
|
|
281
281
|
strategy: e.strategy,
|
|
@@ -434,9 +434,9 @@ const Q = () => ({
|
|
|
434
434
|
_armStrategyPageReturn(t) {
|
|
435
435
|
const e = window.open(t, "_blank");
|
|
436
436
|
if (!e)
|
|
437
|
-
return
|
|
437
|
+
return _().showToaster({
|
|
438
438
|
type: B.Error,
|
|
439
|
-
message:
|
|
439
|
+
message: L()("discovery-strategy.error-description")
|
|
440
440
|
}), !1;
|
|
441
441
|
e.opener = null, l == null || l();
|
|
442
442
|
let r = !1;
|
|
@@ -471,14 +471,14 @@ const Q = () => ({
|
|
|
471
471
|
* new strategy is offered; the user picks it themselves.
|
|
472
472
|
*/
|
|
473
473
|
openStrategyCreation() {
|
|
474
|
-
return this._armStrategyPageReturn(N
|
|
474
|
+
return this._armStrategyPageReturn(N());
|
|
475
475
|
},
|
|
476
476
|
/**
|
|
477
477
|
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
478
478
|
* edited configuration.
|
|
479
479
|
*/
|
|
480
480
|
openStrategyEdit(t) {
|
|
481
|
-
return this._armStrategyPageReturn(
|
|
481
|
+
return this._armStrategyPageReturn(U(t));
|
|
482
482
|
},
|
|
483
483
|
async resolveStrategyUrlTemplate(t, e) {
|
|
484
484
|
const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
|
|
@@ -503,6 +503,7 @@ const Q = () => ({
|
|
|
503
503
|
this.blockStates[r].legacyConversionLoading = !0;
|
|
504
504
|
try {
|
|
505
505
|
const n = await m.migrateLegacyStrategy(t, e);
|
|
506
|
+
this.invalidateStrategies();
|
|
506
507
|
try {
|
|
507
508
|
await this.fetchStrategies();
|
|
508
509
|
} catch (o) {
|
|
@@ -532,7 +533,7 @@ const Q = () => ({
|
|
|
532
533
|
this.patchCurrentBlockConfig({
|
|
533
534
|
strategyId: "",
|
|
534
535
|
strategy: "",
|
|
535
|
-
size:
|
|
536
|
+
size: T.size,
|
|
536
537
|
nodeConfigVersion: C
|
|
537
538
|
});
|
|
538
539
|
},
|
|
@@ -606,7 +607,7 @@ const Q = () => ({
|
|
|
606
607
|
const n = [...e.recommendationConfigs.filters];
|
|
607
608
|
n[r] = {
|
|
608
609
|
...t,
|
|
609
|
-
isValid:
|
|
610
|
+
isValid: K(t)
|
|
610
611
|
}, e.recommendationConfigs.filters = n;
|
|
611
612
|
}
|
|
612
613
|
},
|
|
@@ -652,21 +653,14 @@ const Q = () => ({
|
|
|
652
653
|
* every block's recommendationConfigs across user edits.
|
|
653
654
|
*/
|
|
654
655
|
hasInvalidBlock() {
|
|
655
|
-
return Object.values(this.blockStates).some((t) => !
|
|
656
|
-
},
|
|
657
|
-
/**
|
|
658
|
-
* Per-instance counterpart to `hasInvalidBlock`: the ids of every block
|
|
659
|
-
* that fails required-field validation, one drawer row each (SD-147430).
|
|
660
|
-
*/
|
|
661
|
-
invalidBlockIds() {
|
|
662
|
-
return Object.entries(this.blockStates).filter(([, t]) => !G(t.recommendationConfigs, this)).map(([t]) => t);
|
|
656
|
+
return Object.values(this.blockStates).some((t) => !J(t.recommendationConfigs, this));
|
|
663
657
|
},
|
|
664
658
|
/**
|
|
665
659
|
* Which required fields are missing across the design's blocks, so the save
|
|
666
660
|
* toaster can name the cause instead of always showing the generic message.
|
|
667
661
|
*/
|
|
668
662
|
invalidBlockFields() {
|
|
669
|
-
return Object.values(this.blockStates).flatMap((t) =>
|
|
663
|
+
return Object.values(this.blockStates).flatMap((t) => H(t.recommendationConfigs, this));
|
|
670
664
|
},
|
|
671
665
|
// ====================================================================
|
|
672
666
|
// Per-Block Product Fetching
|
|
@@ -712,9 +706,9 @@ const Q = () => ({
|
|
|
712
706
|
details: !0,
|
|
713
707
|
campaignId: n.variationId
|
|
714
708
|
};
|
|
715
|
-
r.strategy === "manualMerchandising" ? c.productId =
|
|
709
|
+
r.strategy === "manualMerchandising" ? c.productId = q(r.productIds) : r.strategy === "similarViewed" && (c.productId = "{itemId}"), r.strategy === "userBased" && (c.userId = "{user_id}"), a && (c.filter = a), r.shuffleProducts && (c.shuffle = !0), Object.assign(
|
|
716
710
|
c,
|
|
717
|
-
|
|
711
|
+
$(n.partnerName, r.strategy)
|
|
718
712
|
);
|
|
719
713
|
let u;
|
|
720
714
|
try {
|
|
@@ -10,7 +10,9 @@ const i = [
|
|
|
10
10
|
"iboodde",
|
|
11
11
|
"iboodfr",
|
|
12
12
|
"iboodnl",
|
|
13
|
-
"iboodpl"
|
|
13
|
+
"iboodpl",
|
|
14
|
+
"marionnaudaustria",
|
|
15
|
+
"marionnaudfrance"
|
|
14
16
|
], r = ["interencheres", "interencherespreprod"], d = ["lodenfrey", "lodenfreyuat"], c = "manualMerchandising";
|
|
15
17
|
function s(e, n) {
|
|
16
18
|
const o = {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ATTR_CUSTOM_PREFIX as f } from "../constants/selectors.js";
|
|
2
|
+
function o(t) {
|
|
3
|
+
if (typeof t == "string")
|
|
4
|
+
return t.trim() !== "";
|
|
5
|
+
if (t && typeof t == "object" && "strategyId" in t) {
|
|
6
|
+
const { strategyId: r } = t;
|
|
7
|
+
return (typeof r == "string" || typeof r == "number") && String(r).trim() !== "";
|
|
8
|
+
}
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
function u({ config: t, blockId: r, partnerName: e, campaignUrls: n, rrsEnabled: i }) {
|
|
12
|
+
return e ? t.partnerName ? t.partnerName !== e : !i || !t.strategyId || !n ? !1 : !o(n[String(r)]) : !1;
|
|
13
|
+
}
|
|
14
|
+
function a({ config: t, campaignUrls: r, rrsEnabled: e }) {
|
|
15
|
+
return !t.strategyId || e && !!r;
|
|
16
|
+
}
|
|
17
|
+
function g(t) {
|
|
18
|
+
return t.filter((r) => !r.startsWith(f));
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
a as canJudgeUnstampedBlock,
|
|
22
|
+
u as carriesForeignPartnerConfig,
|
|
23
|
+
o as isDefinedCampaignUrl,
|
|
24
|
+
g as withoutCustomAttributes
|
|
25
|
+
};
|
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-
|
|
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-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-c61cc8ea]{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-c404d230]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-c404d230]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-c404d230]{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-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}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
|
@@ -278,6 +278,14 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
278
278
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
279
279
|
*/
|
|
280
280
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
281
|
+
/**
|
|
282
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
283
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
284
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
285
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
286
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
287
|
+
*/
|
|
288
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
281
289
|
/** Migration-only inputs (legacy block configs) */
|
|
282
290
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
283
291
|
/**
|
|
@@ -403,8 +411,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
403
411
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
404
412
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
405
413
|
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
406
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
407
|
-
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
408
414
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
409
415
|
}, undefined>;
|
|
410
416
|
/**
|
|
@@ -703,6 +709,14 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
703
709
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
704
710
|
*/
|
|
705
711
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
712
|
+
/**
|
|
713
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
714
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
715
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
716
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
717
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
718
|
+
*/
|
|
719
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
706
720
|
/** Migration-only inputs (legacy block configs) */
|
|
707
721
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
708
722
|
/**
|
|
@@ -813,8 +827,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
813
827
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
814
828
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
815
829
|
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
816
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
817
|
-
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
818
830
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
819
831
|
}, undefined>, {}>;
|
|
820
832
|
/** Block configuration */
|
|
@@ -15,23 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
close: () => void;
|
|
16
16
|
};
|
|
17
17
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
18
|
-
saveSilent: () => Promise<
|
|
19
|
-
dynamicContentList: import("@@/Types/generic").DynamicContent[];
|
|
20
|
-
compiledHtml: string;
|
|
21
|
-
rawHtml: string;
|
|
22
|
-
css: string;
|
|
23
|
-
ampHtml: string;
|
|
24
|
-
ampErrors: string[];
|
|
25
|
-
modules: number[];
|
|
26
|
-
recommendation: {
|
|
27
|
-
campaignUrls: Record<string, import("../@types/recommendation").RecommendationCampaignUrlValue>;
|
|
28
|
-
configs: Record<string, string>;
|
|
29
|
-
};
|
|
30
|
-
unsubscribe: {
|
|
31
|
-
status: boolean;
|
|
32
|
-
config: number[];
|
|
33
|
-
};
|
|
34
|
-
} | undefined> | undefined;
|
|
18
|
+
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
35
19
|
setLoading: (value: boolean) => void;
|
|
36
20
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
37
21
|
"dynamic-content:open": (detail: {
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -10,11 +10,11 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var
|
|
13
|
+
declare var __VLS_12: {}, __VLS_14: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
headerBottomSlot?: (props: typeof
|
|
15
|
+
headerBottomSlot?: (props: typeof __VLS_12) => any;
|
|
16
16
|
} & {
|
|
17
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_14) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
20
20
|
className: string;
|
|
@@ -26,7 +26,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
26
|
cancelOrBackButtonEvent: () => void;
|
|
27
27
|
onCloseEvent: () => void;
|
|
28
28
|
primaryButtonEvent: () => void;
|
|
29
|
-
secondaryButtonEvent: () => void;
|
|
30
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
31
30
|
className: string;
|
|
32
31
|
size: string;
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
state?: 'default' | 'primary' | 'warning' | 'danger';
|
|
6
7
|
size?: 'X-small' | 'small' | 'medium' | 'large';
|
|
7
8
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
9
|
closeButtonStatus?: boolean;
|
|
@@ -15,6 +16,7 @@ type __VLS_Slots = {} & {
|
|
|
15
16
|
};
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
18
|
description: string;
|
|
19
|
+
state: string;
|
|
18
20
|
size: string;
|
|
19
21
|
footerButtonOptions: undefined;
|
|
20
22
|
closeButtonStatus: boolean;
|
|
@@ -26,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
28
|
"secondary-action": () => void;
|
|
27
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
28
30
|
description: string;
|
|
31
|
+
state: string;
|
|
29
32
|
size: string;
|
|
30
33
|
footerButtonOptions: undefined;
|
|
31
34
|
closeButtonStatus: boolean;
|
|
@@ -34,9 +37,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
37
|
}>>>, {
|
|
35
38
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
39
|
description: string;
|
|
37
|
-
|
|
40
|
+
state: "default" | "primary" | "warning" | "danger";
|
|
38
41
|
footerButtonOptions: FooterButtonGroup;
|
|
39
42
|
closeButtonStatus: boolean;
|
|
43
|
+
closeOnOutsideClick: boolean;
|
|
40
44
|
footerStatus: boolean;
|
|
41
45
|
}>;
|
|
42
46
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AuthErrorState {
|
|
2
|
+
status: number;
|
|
3
|
+
data: Record<string, unknown> | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const isPanelOrigin: (url: string) => boolean;
|
|
6
|
+
export declare const reportAuthError: (status: number, body: string, url: string) => void;
|
|
7
|
+
export declare const useAuthError: () => {
|
|
8
|
+
authError: import("vue").Ref<{
|
|
9
|
+
status: number;
|
|
10
|
+
data: Record<string, unknown> | null;
|
|
11
|
+
} | null>;
|
|
12
|
+
};
|
|
@@ -43,6 +43,7 @@ export declare const useConfig: () => {
|
|
|
43
43
|
selectedUnsubscribePages: number[];
|
|
44
44
|
forceRecreate: boolean;
|
|
45
45
|
trackIdCounter: number;
|
|
46
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
46
47
|
migration: {
|
|
47
48
|
recommendationConfigs: {
|
|
48
49
|
[x: string]: {
|
|
@@ -101,7 +102,6 @@ export declare const useConfig: () => {
|
|
|
101
102
|
autosave: boolean;
|
|
102
103
|
allowlistEnabled: boolean;
|
|
103
104
|
linkTrackingIds: boolean;
|
|
104
|
-
allowSaveWithErrors: boolean;
|
|
105
105
|
reusableRecommendationStrategy: boolean;
|
|
106
106
|
};
|
|
107
107
|
blocks: {
|
|
@@ -181,6 +181,7 @@ export declare const useConfig: () => {
|
|
|
181
181
|
selectedUnsubscribePages: number[];
|
|
182
182
|
forceRecreate: boolean;
|
|
183
183
|
trackIdCounter: number;
|
|
184
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
184
185
|
migration: {
|
|
185
186
|
recommendationConfigs: {
|
|
186
187
|
[x: string]: {
|
|
@@ -239,7 +240,6 @@ export declare const useConfig: () => {
|
|
|
239
240
|
autosave: boolean;
|
|
240
241
|
allowlistEnabled: boolean;
|
|
241
242
|
linkTrackingIds: boolean;
|
|
242
|
-
allowSaveWithErrors: boolean;
|
|
243
243
|
reusableRecommendationStrategy: boolean;
|
|
244
244
|
} | null>;
|
|
245
245
|
blocks: import("vue").ComputedRef<{
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
* - `error` segments (and message-level `isError` / `isCancelled`) trigger
|
|
18
18
|
* a localized toaster.
|
|
19
19
|
*
|
|
20
|
+
* Every apply settles into a terminal `applyAcks` entry, so cortex moves its button on the write, not the click.
|
|
21
|
+
*
|
|
20
22
|
* In dev (`import.meta.env.DEV`) every observed segment + message-level flag
|
|
21
23
|
* change is also `console.debug`-logged with the prefix `[guido:cortex]` so a
|
|
22
24
|
* developer can watch the agent stream in real time. In production this is
|
|
23
25
|
* gated behind `localStorage.guido:debug:ai === '1'`.
|
|
24
|
-
*
|
|
25
|
-
* If cortex-fe isn't loaded the chat store is undefined and the bridge is a
|
|
26
|
-
* no-op (intentional — Guido must still work standalone).
|
|
27
26
|
*/
|
|
28
27
|
export declare const useCortexBlueprintBridge: () => void;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
type ApplyStatus = 'pending' | 'applying' | 'applied' | 'failed';
|
|
2
|
+
/**
|
|
3
|
+
* Terminal outcome of an apply; every promise here settles with one, since the bridge acks on it.
|
|
4
|
+
* `superseded`: a newer payload for the same key replaced this one and owns the ack.
|
|
5
|
+
*/
|
|
6
|
+
export type ApplyOutcome = {
|
|
7
|
+
status: 'applied';
|
|
8
|
+
} | {
|
|
9
|
+
status: 'failed';
|
|
10
|
+
error: unknown;
|
|
11
|
+
} | {
|
|
12
|
+
status: 'superseded';
|
|
13
|
+
};
|
|
2
14
|
/**
|
|
3
15
|
* Applies email_template blueprints from the chat agent to the Stripo editor.
|
|
4
16
|
*
|
|
@@ -9,18 +21,19 @@ type ApplyStatus = 'pending' | 'applying' | 'applied' | 'failed';
|
|
|
9
21
|
* - manual Apply click (first apply): immediate.
|
|
10
22
|
* - blueprint_update after the user has applied once: debounced 250 ms trailing
|
|
11
23
|
* so rapid mid-stream updates don't thrash updateHtmlAndCss.
|
|
24
|
+
* - a click before Stripo is ready is queued and flushed when `isStripoInitialized` flips.
|
|
12
25
|
*/
|
|
13
26
|
export declare const useEmailTemplateApplier: () => {
|
|
14
27
|
applyStatus: import("vue").Ref<Record<string, ApplyStatus>>;
|
|
15
|
-
markPending: (
|
|
16
|
-
applyTemplate: (
|
|
28
|
+
markPending: (key: string) => void;
|
|
29
|
+
applyTemplate: (key: string, data: {
|
|
17
30
|
html?: string;
|
|
18
31
|
css?: string;
|
|
19
|
-
}) =>
|
|
20
|
-
applyTemplateDebounced: (
|
|
32
|
+
}) => Promise<ApplyOutcome>;
|
|
33
|
+
applyTemplateDebounced: (key: string, data: {
|
|
21
34
|
html?: string;
|
|
22
35
|
css?: string;
|
|
23
|
-
}) =>
|
|
36
|
+
}) => Promise<ApplyOutcome>;
|
|
24
37
|
};
|
|
25
38
|
export declare const resetEmailTemplateApplier: () => void;
|
|
26
39
|
export {};
|
|
@@ -19,6 +19,8 @@ export declare const provideGuidoActions: (actions: {
|
|
|
19
19
|
}) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Provides individual Guido action handlers
|
|
22
|
+
* @deprecated No consumer in src/ and not exported from library.ts — provideGuidoActions
|
|
23
|
+
* provides all four keys itself. Slated for deletion, see the SD-667788 dead-code ledger.
|
|
22
24
|
*/
|
|
23
25
|
export declare const provideBackHandler: (handler: BackHandler) => void;
|
|
24
26
|
export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import type { DynamicContent } from '@@/Types/generic';
|
|
2
2
|
import type { FiltersResponse } from '@@/Types/recommendation';
|
|
3
|
-
/**
|
|
4
|
-
* Extracts recommendation block IDs directly from the HTML by parsing
|
|
5
|
-
* the recommendation-id attribute on block elements.
|
|
6
|
-
* This avoids depending on store state which may not be populated
|
|
7
|
-
* when the settings panel hasn't been opened yet (e.g., saved templates).
|
|
8
|
-
*/
|
|
9
|
-
export declare function getRecommendationBlockIds(html: string): string[];
|
|
10
3
|
/**
|
|
11
4
|
* Parses a `{{recoId_index_attributeName}}` variable (already stripped of the
|
|
12
5
|
* braces/whitespace) into its recommendation id and attribute name. Returns
|
|
@@ -34,20 +27,6 @@ export declare function buildPartnerAttributeNameSet(filterList: FiltersResponse
|
|
|
34
27
|
* before, so flagging it would false-positive on merge tags like `{{user.name}}`.
|
|
35
28
|
*/
|
|
36
29
|
export declare function findInvalidCustomFields(html: string, validCustomFields: string[], recommendationBlockIds: string[], ignoredIds: Set<string>, ignoredAttributeNames: Set<string> | null): string[];
|
|
37
|
-
/**
|
|
38
|
-
* Returns the invalid `{{ ... }}` dynamic-content tags found in the HTML.
|
|
39
|
-
*
|
|
40
|
-
* A tag's variable name is the part before the first `|` (everything after it is the fallback).
|
|
41
|
-
* Surrounding whitespace is always allowed (trimmed). A tag is valid only when the variable name
|
|
42
|
-
* is an allowed system token, or it is a clean identifier (`[A-Za-z0-9_.]`) and — when a `|` is
|
|
43
|
-
* present — the fallback after it is not empty. Otherwise the tag is invalid (e.g.
|
|
44
|
-
* `{{Api Response: OA1 Main Item Url}}` — spaces/`:` — or `{{bounce|}}` — empty fallback).
|
|
45
|
-
*
|
|
46
|
-
* `data-*` block-config attribute values are excluded from the scan: blocks such as Items/cart
|
|
47
|
-
* store product merge tags (`data-product_button_link="{{Abandoned Cart Item (1) Url}}"`) that the
|
|
48
|
-
* backend resolves through its own pipeline, so they must not be treated as user-authored tags.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getInvalidDynamicContentTags(html: string): string[];
|
|
51
30
|
export declare const useHtmlValidator: () => {
|
|
52
31
|
validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
|
|
53
32
|
};
|
|
@@ -16,6 +16,7 @@ export interface HttpError {
|
|
|
16
16
|
status?: number;
|
|
17
17
|
statusText?: string;
|
|
18
18
|
response?: Response;
|
|
19
|
+
authReported?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
21
22
|
loading: import("vue").ComputedRef<boolean>;
|
|
@@ -65,6 +66,7 @@ export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
|
65
66
|
json: () => Promise<any>;
|
|
66
67
|
text: () => Promise<string>;
|
|
67
68
|
} | undefined;
|
|
69
|
+
authReported?: boolean | undefined;
|
|
68
70
|
} | null>;
|
|
69
71
|
hasError: import("vue").ComputedRef<boolean>;
|
|
70
72
|
request: <T = unknown>(method: HttpMethod, url: string, data?: unknown, options?: HttpOptions) => Promise<HttpResponse<T>>;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
2
|
-
type SaveDetails = Omit<SavedTemplateDetails, 'metadata' | 'silent'>;
|
|
3
|
-
type SaveResult = SaveDetails | undefined;
|
|
4
2
|
export declare const useSave: () => {
|
|
5
|
-
save: (suppressEmit?: boolean, silent?: boolean) => Promise<
|
|
6
|
-
saveWithErrors: () => Promise<SaveResult>;
|
|
7
|
-
saveRawOnly: () => Promise<SaveResult>;
|
|
3
|
+
save: (suppressEmit?: boolean, silent?: boolean) => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
8
4
|
};
|
|
9
|
-
export {};
|