@useinsider/guido 3.12.0-beta.841bb6a → 3.12.0-beta.86e34da
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 +9 -4
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +50 -49
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +38 -0
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +271 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +42 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +18 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +60 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +19 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +19 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +22 -0
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +29 -0
- package/dist/composables/usePreviewInteractionGuard.js +36 -11
- package/dist/composables/useRecommendation.js +56 -40
- package/dist/composables/useRecommendationPreview.js +61 -60
- package/dist/composables/useStrategyFilters.js +16 -0
- package/dist/config/migrator/recommendationMigrator.js +7 -4
- package/dist/enums/date.js +4 -3
- package/dist/enums/extensions/filteringV2.js +1024 -0
- package/dist/enums/extensions/recommendationBlock.js +45 -24
- package/dist/enums/extensions/strategyDetail.js +148 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +12 -11
- package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +141 -123
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +285 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +16 -2
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +257 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +460 -113
- package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +97 -0
- package/dist/extensions/Blocks/Recommendation/utils/strategyNavigation.js +8 -0
- package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +95 -0
- package/dist/extensions/Blocks/Recommendation/utils/strategyUrl.js +43 -0
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +24 -10
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
- package/dist/extensions/Blocks/common-control.js +2 -1
- package/dist/extensions/Blocks/controlFactories.js +125 -75
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +120 -32
- package/dist/services/stripoApi.js +18 -18
- package/dist/src/@types/config/schemas.d.ts +10 -0
- package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +43 -0
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +29 -0
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +40 -0
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +38 -0
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +51 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
- package/dist/src/composables/useRecommendation.d.ts +2 -0
- package/dist/src/composables/useStrategyFilters.d.ts +24 -0
- package/dist/src/enums/extensions/filteringV2.d.ts +72 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +33 -0
- package/dist/src/enums/extensions/strategyDetail.d.ts +90 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +10 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +75 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +903 -1
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +50 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyNavigation.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyUrl.d.ts +51 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +8 -1
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +2 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
- package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +9 -1
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/utils/genericUtil.d.ts +9 -0
- package/dist/src/utils/urlSchemes.d.ts +6 -0
- package/dist/static/styles/components/base-input.css.js +6 -7
- package/dist/utils/dateUtil.js +23 -10
- package/dist/utils/genericUtil.js +10 -1
- package/dist/utils/pairProductVariables.js +43 -44
- package/dist/utils/templatePreparation.js +70 -57
- package/dist/utils/urlSchemes.js +4 -0
- package/package.json +1 -1
|
@@ -3,10 +3,43 @@ import type { RecommendationFeedItem } from '@@/Types/recommendation';
|
|
|
3
3
|
export declare const URLS: {
|
|
4
4
|
RECOMMENDATION_API_URL: string;
|
|
5
5
|
PRODUCT_ATTRIBUTES_PATH: string;
|
|
6
|
+
RECOMMENDATION_STRATEGIES_PATH: string;
|
|
7
|
+
STRATEGY_ENDPOINT_GENERATE_PATH: string;
|
|
8
|
+
STRATEGY_DUPLICATE_PATH: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Smart Recommender panel routes, relative to the embedding inone origin.
|
|
12
|
+
* Guido navigates in the same tab; the flow continues on those pages and does
|
|
13
|
+
* not come back (`{{id}}` is substituted by `buildStrategyEditPath`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const STRATEGY_PAGES: {
|
|
16
|
+
LISTING: string;
|
|
17
|
+
CREATE: string;
|
|
18
|
+
EDIT: string;
|
|
6
19
|
};
|
|
7
20
|
export declare const QUERY_PARAMS: {
|
|
8
21
|
CLIENT_ID: string;
|
|
22
|
+
FILTERS: string;
|
|
23
|
+
PAGE: string;
|
|
24
|
+
PER_PAGE: string;
|
|
9
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Page size for the strategy listing.
|
|
28
|
+
*
|
|
29
|
+
* Sent explicitly because Smart Recommender's default page size is not documented
|
|
30
|
+
* anywhere we can read: an unpaginated call would silently return only the first
|
|
31
|
+
* page and the marketer would see a short list with no error. The caller pages
|
|
32
|
+
* until a short page comes back.
|
|
33
|
+
*/
|
|
34
|
+
export declare const RRS_STRATEGIES_PER_PAGE = 100;
|
|
35
|
+
/** Safety stop for the listing pager, mirroring discovery-strategies-fe's helper. */
|
|
36
|
+
export declare const RRS_STRATEGIES_MAX_PAGES = 50;
|
|
37
|
+
/**
|
|
38
|
+
* Smart Recommender's filter grammar: `[table.field][operator][value]`, ANDed with `*`.
|
|
39
|
+
* `~` means "contains" — required because `suitable_channels` is a comma-separated
|
|
40
|
+
* column, so `=` would only ever match single-channel strategies.
|
|
41
|
+
*/
|
|
42
|
+
export declare const RRS_EMAIL_ACTIVE_FILTER = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]";
|
|
10
43
|
/**
|
|
11
44
|
* Get recommendation feed source maps lazily so translated names resolve at access time.
|
|
12
45
|
* Must be called within a Vue component context or after Pinia is initialized.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enums for the Reusable Recommendation Strategy (RRS) detail drawer.
|
|
3
|
+
*
|
|
4
|
+
* Ported from design-system-organisms
|
|
5
|
+
* `src/organisms/OrgStrategyDetailModal/enums/details-modal.enum.ts` (branch `develop`).
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT — this is NOT the same operator table as `@@/Enums/extensions/filteringV2`.
|
|
8
|
+
* The detail modal carries its own, deliberately: it uses different operator values
|
|
9
|
+
* (a `-page-context` suffix where FilteringEnumsV2 uses `_dynamic`) and a different
|
|
10
|
+
* label per operator. The two tables humanize the same JSON for different surfaces —
|
|
11
|
+
* filteringV2 backs the four-row panel summary, this one backs the drawer's filter
|
|
12
|
+
* humanizer. Do not merge them or the drawer starts rendering the wrong operator names.
|
|
13
|
+
*
|
|
14
|
+
* One deliberate deviation from the source: the source resolves `translations[...]` at
|
|
15
|
+
* module-evaluation time. Guido loads translations from editor config after module init,
|
|
16
|
+
* so every `text` here stays a translation KEY and is resolved at render through
|
|
17
|
+
* `useTranslations()`. Resolving eagerly would freeze every label to `undefined`.
|
|
18
|
+
*/
|
|
19
|
+
/** Discriminates a duration-based exclusion from a count-based one. */
|
|
20
|
+
export declare const TIME = "TIME";
|
|
21
|
+
export declare const COUNT = "COUNT";
|
|
22
|
+
export declare const OperatorAbbreviations: {
|
|
23
|
+
readonly OPERATOR: {
|
|
24
|
+
readonly IN_LAST: "in-last";
|
|
25
|
+
readonly IS_EMPTY: "is-empty";
|
|
26
|
+
readonly IS_NOT_EMPTY: "is-not-empty";
|
|
27
|
+
readonly IN_BETWEEN: "is-between";
|
|
28
|
+
readonly IS_TRUE: "true";
|
|
29
|
+
readonly IS_FALSE: "false";
|
|
30
|
+
readonly IN: "in";
|
|
31
|
+
readonly NOT_IN: "not-in";
|
|
32
|
+
};
|
|
33
|
+
readonly OPERATOR_EXPRESSION: {
|
|
34
|
+
readonly IS_EMPTY: "?";
|
|
35
|
+
readonly IS_NOT_EMPTY: "!?";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** One operator option; `text` is a translation key, not a label. */
|
|
39
|
+
export interface DetailOperator {
|
|
40
|
+
value: string;
|
|
41
|
+
text: string;
|
|
42
|
+
operator: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const Operators: Record<string, DetailOperator[]>;
|
|
45
|
+
export declare const DataTypes: {
|
|
46
|
+
readonly STRING: "String";
|
|
47
|
+
readonly BOOLEAN: "Boolean";
|
|
48
|
+
readonly DATE: "Date";
|
|
49
|
+
readonly NUMBER: "Number";
|
|
50
|
+
readonly TEXT: "Text";
|
|
51
|
+
readonly URL: "Image";
|
|
52
|
+
readonly NUMBERS: "Numbers";
|
|
53
|
+
readonly DATES: "Dates";
|
|
54
|
+
readonly BOOLEANS: "Booleans";
|
|
55
|
+
readonly STRINGS: "Strings";
|
|
56
|
+
};
|
|
57
|
+
export declare const MultiSelectDataTypes: string[];
|
|
58
|
+
export declare const OperatorNames: {
|
|
59
|
+
readonly IS_EXACTLY: "is-exactly";
|
|
60
|
+
readonly IS_NOT_EXACTLY: "is-not-exactly";
|
|
61
|
+
readonly CONTAINS: "contains";
|
|
62
|
+
readonly NOT_CONTAINS: "does-not-contain";
|
|
63
|
+
readonly IN: "in";
|
|
64
|
+
readonly NOT_IN: "not-in";
|
|
65
|
+
};
|
|
66
|
+
export declare const FilterTypeNames: {
|
|
67
|
+
readonly STANDARD_FILTER: "standardFilter";
|
|
68
|
+
readonly DYNAMIC_FILTER: "dynamicFilter";
|
|
69
|
+
readonly USER_CONTEXT_FILTER: "userContextFilter";
|
|
70
|
+
readonly USER_ATTRIBUTE_FILTER: "userAttributeFilter";
|
|
71
|
+
readonly USER_EVENT_FILTER: "userEventFilter";
|
|
72
|
+
readonly EVENT_BASED_FILTER: "eventBasedFilter";
|
|
73
|
+
};
|
|
74
|
+
export declare const UserEventKeys: {
|
|
75
|
+
readonly CURRENTLY_VIEWED_ITEM: "page";
|
|
76
|
+
readonly LEGACY_CURRENTLY_VIEWED_ITEM: "currentlyViewedItem";
|
|
77
|
+
};
|
|
78
|
+
/** `text` is a translation key, resolved at render. */
|
|
79
|
+
export declare const UserEvents: {
|
|
80
|
+
value: string;
|
|
81
|
+
text: string;
|
|
82
|
+
}[];
|
|
83
|
+
/** Channel value that must render as the email product's own label. */
|
|
84
|
+
export declare const EMAIL_CHANNEL = "email";
|
|
85
|
+
export declare const PageTypeTranslationKeys: Record<string, string>;
|
|
86
|
+
/** Drawer tab identifiers. */
|
|
87
|
+
export declare const DetailTabs: {
|
|
88
|
+
readonly GENERAL: "general";
|
|
89
|
+
readonly OTHER: "other";
|
|
90
|
+
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* These IDs are returned by the getId() method of each control
|
|
4
4
|
*/
|
|
5
5
|
export declare enum RecommendationControlId {
|
|
6
|
+
BLOCK_BACKGROUND = "recommendation-block-background-color-control",
|
|
6
7
|
BUTTON_ALIGN = "recommendation-block-button-align-control",
|
|
7
8
|
BUTTON_BORDER = "recommendation-block-button-border-control",
|
|
8
9
|
BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const BlockBackgroundColorControl: {
|
|
2
|
+
new (): {
|
|
3
|
+
getId(): string;
|
|
4
|
+
getLabels(): {
|
|
5
|
+
title: string;
|
|
6
|
+
};
|
|
7
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
8
|
+
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
9
|
+
getParentControlId(): string;
|
|
10
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
11
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
12
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -20,6 +20,7 @@ export { ButtonControls } from './button';
|
|
|
20
20
|
export { ImageControls } from './image';
|
|
21
21
|
export { CustomAttributeControls } from './customAttribute';
|
|
22
22
|
export { SpacingControl, SPACING_CONTROL_ID } from './spacing';
|
|
23
|
+
export { BlockBackgroundColorControl } from './blockBackground';
|
|
23
24
|
export { CardBackgroundColorControl, CARD_BACKGROUND_COLOR_CONTROL_ID } from './cardBackground';
|
|
24
25
|
export { RecommendationCardCompositionControl, COMPOSITION_CONTROL_BLOCK_ID } from './cardComposition';
|
|
25
26
|
export { SyncInfoMessageControl, SYNC_INFO_MESSAGE_CONTROL_ID } from './syncInfoMessage';
|
|
@@ -9,8 +9,9 @@ import { PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID } from './pricePlacem
|
|
|
9
9
|
import { ProductCountControl, PRODUCT_COUNT_CONTROL_ID } from './productCount';
|
|
10
10
|
import { ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID } from './productLayout';
|
|
11
11
|
import { ShuffleControl, SHUFFLE_CONTROL_ID } from './shuffle';
|
|
12
|
+
import { StrategyControl, STRATEGY_CONTROL_ID } from './strategy';
|
|
12
13
|
export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
|
|
13
|
-
export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, };
|
|
14
|
+
export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, StrategyControl, STRATEGY_CONTROL_ID, };
|
|
14
15
|
export * from './utils';
|
|
15
16
|
/**
|
|
16
17
|
* Main recommendation block control that composes all sub-controls
|
|
@@ -21,6 +22,7 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
21
22
|
private storeUnsubscription;
|
|
22
23
|
private syncedBlockIds;
|
|
23
24
|
private algorithmControl;
|
|
25
|
+
private strategyControl;
|
|
24
26
|
private localeControl;
|
|
25
27
|
private currencyControl;
|
|
26
28
|
private productCountControl;
|
|
@@ -107,8 +109,12 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
107
109
|
*/
|
|
108
110
|
private _listenStateUpdates;
|
|
109
111
|
/**
|
|
110
|
-
* Persists the
|
|
111
|
-
*
|
|
112
|
+
* Persists the Pinia-owned parts of the block config to the Stripo node config,
|
|
113
|
+
* so they survive template save/reload cycles.
|
|
114
|
+
*
|
|
115
|
+
* Filters are edited in a drawer and the strategy in an overlaid picker — neither
|
|
116
|
+
* is a Stripo form element, so neither can write to the node itself. Both ride
|
|
117
|
+
* this one update to keep the undo history to a single entry per change.
|
|
112
118
|
*/
|
|
113
|
-
private
|
|
119
|
+
private _persistStoreConfigToNode;
|
|
114
120
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CommonControl } from '../../../common-control';
|
|
2
|
+
export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
3
|
+
/**
|
|
4
|
+
* Control for selecting a Reusable Recommendation Strategy
|
|
5
|
+
*/
|
|
6
|
+
export declare class StrategyControl extends CommonControl {
|
|
7
|
+
private store;
|
|
8
|
+
/**
|
|
9
|
+
* InOne's dictionary, not Stripo's. Every dotted key here
|
|
10
|
+
* (`discovery-strategy.*`, `gpt-app-builder.*`) lives in the host panel's
|
|
11
|
+
* translations, which `this.api.translate` does not read — that one is only
|
|
12
|
+
* for the plain-English control labels the rest of this panel uses.
|
|
13
|
+
*/
|
|
14
|
+
private trans;
|
|
15
|
+
private events;
|
|
16
|
+
private unsubscribeStore;
|
|
17
|
+
private searchTerm;
|
|
18
|
+
private isOpen;
|
|
19
|
+
private cardHideTimer;
|
|
20
|
+
getId(): string;
|
|
21
|
+
getTemplate(): string;
|
|
22
|
+
onRender(): void;
|
|
23
|
+
onDestroy(): void;
|
|
24
|
+
private _root;
|
|
25
|
+
/**
|
|
26
|
+
* All listeners are delegated onto nodes that survive `innerHTML` rebuilds and
|
|
27
|
+
* are torn down together by the AbortController — the option rows themselves
|
|
28
|
+
* are replaced on every render and must never own a listener.
|
|
29
|
+
*/
|
|
30
|
+
private _setupEventListeners;
|
|
31
|
+
/**
|
|
32
|
+
* Keeps the trigger label and the gear's enabled state in step with the store.
|
|
33
|
+
*
|
|
34
|
+
* Both depend on data that arrives after the first render: the strategy listing
|
|
35
|
+
* is fetched asynchronously, and `strategyId` changes when the user picks,
|
|
36
|
+
* duplicates, or switches blocks.
|
|
37
|
+
*/
|
|
38
|
+
private _subscribeToStoreChanges;
|
|
39
|
+
/**
|
|
40
|
+
* Fingerprint of everything the rendered markup depends on.
|
|
41
|
+
*
|
|
42
|
+
* Ids rather than a count: a refetch that renames a strategy or swaps one for
|
|
43
|
+
* another of the same length would otherwise leave the trigger and the card
|
|
44
|
+
* showing stale copy until some unrelated store change happened to repaint.
|
|
45
|
+
*/
|
|
46
|
+
private _stateKey;
|
|
47
|
+
private _render;
|
|
48
|
+
private _renderTrigger;
|
|
49
|
+
private _renderOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Client-side filtering: the listing is fetched whole and cached, so narrowing
|
|
52
|
+
* it here avoids a request per keystroke.
|
|
53
|
+
*/
|
|
54
|
+
private _filteredStrategies;
|
|
55
|
+
private _toggleMenu;
|
|
56
|
+
private _closeMenu;
|
|
57
|
+
/**
|
|
58
|
+
* The hover card is `position: fixed`, so it can sit beside the panel instead of
|
|
59
|
+
* being clipped by it. Placed once per hover — the list cannot scroll under the
|
|
60
|
+
* pointer without the pointer leaving, so there is nothing to keep in sync.
|
|
61
|
+
*/
|
|
62
|
+
private _showCard;
|
|
63
|
+
/** Grace period for the pointer to cross the gap between option and card. */
|
|
64
|
+
private _scheduleHideCard;
|
|
65
|
+
private _cancelHideCard;
|
|
66
|
+
private _hideCard;
|
|
67
|
+
/**
|
|
68
|
+
* Mirrors the design system's `InInfoBox`: coloured top rule, heading +
|
|
69
|
+
* "last updated" details, content, then a divided footer holding the View
|
|
70
|
+
* More text button. The component itself cannot render here, so the markup
|
|
71
|
+
* and the CSS reproduce its structure and tokens rather than approximating
|
|
72
|
+
* them — the values in `recommendation.css` are read from its stylesheet.
|
|
73
|
+
*/
|
|
74
|
+
private _buildCardHtml;
|
|
75
|
+
}
|