@useinsider/guido 3.7.0-beta.24bdfa3 → 3.7.0-beta.30ff65e
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/@types/config/schemas.js +66 -70
- package/dist/composables/usePreviewMode.js +14 -15
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +82 -90
- package/dist/config/migrator/recommendation/htmlBuilder.js +58 -59
- package/dist/config/migrator/recommendation/settingsMapper.js +33 -38
- package/dist/extensions/Blocks/Recommendation/block.js +43 -59
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +32 -41
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +313 -377
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +72 -84
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +66 -68
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +7 -21
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -64
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +5 -7
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +72 -101
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -31
- package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -9
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +59 -74
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -88
- package/dist/src/@types/config/schemas.d.ts +0 -16
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +3 -29
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -3
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +2 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -33
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -15
- package/dist/src/stores/config.d.ts +0 -36
- package/package.json +1 -1
- package/dist/composables/useRecommendationPreview.js +0 -100
- package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +0 -133
- package/dist/src/composables/useRecommendationPreview.d.ts +0 -10
- package/dist/src/composables/useRecommendationPreview.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/pricePlacement.d.ts +0 -59
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Price Placement Control
|
|
3
|
-
*
|
|
4
|
-
* Two block-level price settings ported from the legacy product block, shown
|
|
5
|
-
* above the Currency control in the main Settings tab:
|
|
6
|
-
*
|
|
7
|
-
* - "Product Price Orientation" (`priceMovedToNextLine`): a vertical/horizontal
|
|
8
|
-
* icon radio (mirrors the Items block control). `vertical` (default) keeps the
|
|
9
|
-
* price and original price on separate stacked rows (current Guido look);
|
|
10
|
-
* `horizontal` renders them inline on the same line and Card Composition
|
|
11
|
-
* collapses them into a single "Product Prices" entry.
|
|
12
|
-
* - "Hide if same as discounted" (`priceHideIfSameAsDiscounted`): a toggle.
|
|
13
|
-
* When ON, email-service blanks the redundant original price at send time when
|
|
14
|
-
* it equals the sale price (see the `hide-price` block attribute below).
|
|
15
|
-
*
|
|
16
|
-
* Orientation re-renders the rows (it changes the saved template layout).
|
|
17
|
-
* Hide-if-same NEVER touches the template — it only persists config + stamps the
|
|
18
|
-
* `hide-price` attribute; the visual hide is simulated in the preview and applied
|
|
19
|
-
* for real server-side by email-service.
|
|
20
|
-
*/
|
|
21
|
-
import type { RecommendationNodeConfig } from '../../types/nodeConfig';
|
|
22
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
23
|
-
import { CommonControl } from '../../../common-control';
|
|
24
|
-
export declare const PRICE_PLACEMENT_CONTROL_ID = "recommendation-price-placement-control";
|
|
25
|
-
type Orientation = 'vertical' | 'horizontal';
|
|
26
|
-
/**
|
|
27
|
-
* Control for the block-level price orientation radio + hide-if-same toggle.
|
|
28
|
-
*/
|
|
29
|
-
export declare class PricePlacementControl extends CommonControl {
|
|
30
|
-
private store;
|
|
31
|
-
getId(): string;
|
|
32
|
-
getTemplate(): string;
|
|
33
|
-
onRender(): void;
|
|
34
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
35
|
-
_setFormValues(config: RecommendationNodeConfig): void;
|
|
36
|
-
_initializeHideToggle(config: RecommendationNodeConfig): void;
|
|
37
|
-
/**
|
|
38
|
-
* Disables the orientation radio when a price element is hidden via Card
|
|
39
|
-
* Composition — orientation is meaningless without both prices visible.
|
|
40
|
-
* Visibility lives on the attribute rows' `data-visibility` (set by the Card
|
|
41
|
-
* Composition control). Inline mode has no standalone original-price row, so
|
|
42
|
-
* the merged "Product Prices" entry (the price row) governs.
|
|
43
|
-
*/
|
|
44
|
-
_updateOrientationDisabled(): void;
|
|
45
|
-
_onOrientationChange(orientation: Orientation): void;
|
|
46
|
-
_onHideIfSameChange(value: boolean): void;
|
|
47
|
-
/**
|
|
48
|
-
* Mirrors the hide-if-same flag onto the durable `hide-price` block attribute
|
|
49
|
-
* read by email-service at send time.
|
|
50
|
-
*/
|
|
51
|
-
_stampHideIfSameAttr(value: boolean): void;
|
|
52
|
-
/**
|
|
53
|
-
* Rebuilds the product rows so the renderer re-reads the inline/stacked
|
|
54
|
-
* layout flag from the store. Used by the orientation change only.
|
|
55
|
-
*/
|
|
56
|
-
_regenerate(): void;
|
|
57
|
-
_listenToFormUpdates(): void;
|
|
58
|
-
}
|
|
59
|
-
export {};
|