@useinsider/guido 3.8.0-beta.eb4074b → 3.8.1-beta.2ee94c2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useHtmlValidator.js +133 -180
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +57 -58
- package/dist/config/migrator/recommendation/extractors.js +22 -44
- package/dist/config/migrator/recommendation/htmlBuilder.js +169 -175
- package/dist/config/migrator/recommendationMigrator.js +31 -30
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +20 -26
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +41 -55
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +57 -58
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +31 -43
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +2 -3
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +45 -55
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +56 -63
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +6 -7
- package/dist/extensions/Blocks/Recommendation/extension.js +2 -3
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +2 -3
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +2 -3
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +12 -13
- package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -7
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
- package/dist/src/composables/useHtmlValidator.d.ts +0 -27
- package/dist/src/config/migrator/recommendation/extractors.d.ts +0 -15
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +0 -8
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -21
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -9
- package/package.json +1 -1
- package/dist/config/compiler/utils/recommendationIgnoreUtils.js +0 -15
- package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.d.ts +0 -17
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
|
@@ -23,18 +23,6 @@ export declare const MOBILE_ROW_SELECTOR = ".ins-recommendation-mobile-row";
|
|
|
23
23
|
* `{{cId_pIdx_url}}` template variable.
|
|
24
24
|
*/
|
|
25
25
|
export declare const CSS_CLASS_RECO_BUTTON = "reco-v3-button";
|
|
26
|
-
/**
|
|
27
|
-
* Opt-out class for partners who want to inject their own template variables
|
|
28
|
-
* into a recommendation block. When present on `.recommendation-block-v2`,
|
|
29
|
-
* Guido skips ONLY its product-data → template-variable substitution
|
|
30
|
-
* (`replaceProductAttributes`) for that block — partners author their own
|
|
31
|
-
* `{{recoId_index_attribute}}` variables. Everything else (campaign URL
|
|
32
|
-
* building, hidden-row removal, Outlook image widths, text-trim CSS, discount
|
|
33
|
-
* conditions, store hydration, store-level config validation, and general HTML
|
|
34
|
-
* optimizations) still applies. The class is preserved in the final compiled
|
|
35
|
-
* output so partners may use it for their own styling.
|
|
36
|
-
*/
|
|
37
|
-
export declare const CSS_CLASS_SKIP_COMPILE = "ins-skip-compile";
|
|
38
26
|
/**
|
|
39
27
|
* Currency HTML attributes set on the block element
|
|
40
28
|
* These are read by the HTML compiler at runtime to format prices
|
|
@@ -75,12 +63,3 @@ export declare const PRODUCT_ATTRIBUTE_PREFIX = "product_attribute.";
|
|
|
75
63
|
* Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
|
|
76
64
|
*/
|
|
77
65
|
export declare const BUILT_IN_DEFAULT_ATTRIBUTES: Set<string>;
|
|
78
|
-
/**
|
|
79
|
-
* Attribute names valid inside a `{{recoId_index_attributeName}}` template
|
|
80
|
-
* variable regardless of the account's custom attribute list. Every built-in
|
|
81
|
-
* composition attribute is valid, plus `currency` and `discount` which the
|
|
82
|
-
* compiler emits but are not composition toggles. Custom attributes are
|
|
83
|
-
* validated separately against the account's fetched attribute list
|
|
84
|
-
* (`stripo/email-recommendation-attributes`).
|
|
85
|
-
*/
|
|
86
|
-
export declare const RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES: Set<string>;
|
|
@@ -17,13 +17,6 @@ export declare class RecommendationCardCompositionControl extends CommonControl
|
|
|
17
17
|
getId(): string;
|
|
18
18
|
getTemplate(): string;
|
|
19
19
|
onRender(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Card composition restructures the block (toggles/reorders/adds attribute
|
|
22
|
-
* cells), which would corrupt a partner-managed (`ins-skip-compile`) block's
|
|
23
|
-
* preserved markup. There is no native tab-disable API, so the whole control
|
|
24
|
-
* container is rendered inert (greyed + non-interactive) instead.
|
|
25
|
-
*/
|
|
26
|
-
_syncDisabledState(): void;
|
|
27
20
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
28
21
|
onDestroy(): void;
|
|
29
22
|
private _initializeComposition;
|
|
@@ -21,11 +21,6 @@ export declare class LayoutOrientationControl extends CommonControl {
|
|
|
21
21
|
getTemplate(): string;
|
|
22
22
|
onRender(): void;
|
|
23
23
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
24
|
-
/**
|
|
25
|
-
* Layout orientation restructures the whole block, which is meaningless for
|
|
26
|
-
* partner-managed (`ins-skip-compile`) blocks — disable the control there.
|
|
27
|
-
*/
|
|
28
|
-
_syncDisabledState(): void;
|
|
29
24
|
_setFormValues(): void;
|
|
30
25
|
/**
|
|
31
26
|
* Handles layout change
|
|
@@ -30,12 +30,6 @@ export declare class ProductLayoutControl extends CommonControl {
|
|
|
30
30
|
getTemplate(): string;
|
|
31
31
|
onRender(): void;
|
|
32
32
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
33
|
-
/**
|
|
34
|
-
* Products-per-row and mobile-layout restructure the block, which is
|
|
35
|
-
* meaningless for partner-managed (`ins-skip-compile`) blocks — disable
|
|
36
|
-
* these inputs there. Disabling coexists with the visibility logic above.
|
|
37
|
-
*/
|
|
38
|
-
_syncDisabledState(): void;
|
|
39
33
|
onDestroy(): void;
|
|
40
34
|
_setFormValues(): void;
|
|
41
35
|
/**
|
|
@@ -35,15 +35,6 @@ interface DocumentModifier {
|
|
|
35
35
|
* @returns The block element or null if not found
|
|
36
36
|
*/
|
|
37
37
|
export declare function getBlockElement(currentNode: ImmutableHtmlNode | null | undefined): ImmutableHtmlNode | null;
|
|
38
|
-
/**
|
|
39
|
-
* True when the recommendation block has opted out of Guido's content
|
|
40
|
-
* regeneration via the `ins-skip-compile` class. Partner-managed blocks carry
|
|
41
|
-
* hand-authored `{{...}}` variables in their cells, so Guido must never
|
|
42
|
-
* overwrite their content with product data (regenerate / in-place update).
|
|
43
|
-
* @param currentNode - The current template node
|
|
44
|
-
* @returns True if the block opted out of content regeneration
|
|
45
|
-
*/
|
|
46
|
-
export declare function isPartnerManagedBlock(currentNode: ImmutableHtmlNode | null | undefined): boolean;
|
|
47
38
|
/**
|
|
48
39
|
* Gets the current layout orientation from the block's data attribute
|
|
49
40
|
* Supports both old (horizontal/vertical) and new (list/grid) values for backward compatibility
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1-beta.2ee94c2",
|
|
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",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CSS_CLASS_SKIP_COMPILE as n, BLOCK_ROOT_SELECTOR as i } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
2
|
-
function m(o) {
|
|
3
|
-
return o.classList.contains(n);
|
|
4
|
-
}
|
|
5
|
-
function a(o) {
|
|
6
|
-
const r = new DOMParser().parseFromString(o, "text/html").querySelectorAll(`${i}.${n}`), t = /* @__PURE__ */ new Set();
|
|
7
|
-
return r.forEach((c) => {
|
|
8
|
-
const e = c.getAttribute("recommendation-id");
|
|
9
|
-
e && t.add(e);
|
|
10
|
-
}), t;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
a as getIgnoredRecommendationBlockIds,
|
|
14
|
-
m as isIgnoredRecommendationBlock
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns true when a recommendation block has opted out of Guido's
|
|
3
|
-
* product-data → template-variable substitution. Partners signal opt-out by
|
|
4
|
-
* adding the `ins-skip-compile` class on the `.recommendation-block-v2`
|
|
5
|
-
* element. Only the variable substitution is skipped — campaign URL building,
|
|
6
|
-
* hidden-row removal, Outlook image widths, discount conditions, text-trim CSS
|
|
7
|
-
* and general HTML optimizations still apply. See `CSS_CLASS_SKIP_COMPILE` for
|
|
8
|
-
* the full scope.
|
|
9
|
-
*/
|
|
10
|
-
export declare function isIgnoredRecommendationBlock(block: Element): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* DOM-parses the HTML once and returns the set of `recommendation-id`
|
|
13
|
-
* values that belong to ignored blocks. Use this in regex/string-based
|
|
14
|
-
* compiler rules where the rule processes flat matches and only has the
|
|
15
|
-
* extracted block ID rather than a DOM Element reference.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getIgnoredRecommendationBlockIds(html: string): Set<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|