@ikas/loyalty-widget-renderer 1.0.0-alpha.97 → 1.0.0-alpha.98
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/build/injector.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { IkasLoyaltyWidgetConfig } from "./models/types";
|
|
1
|
+
import { IkasLoyaltyWidgetConfig, LoyaltyWidgetContextPatch } from "./models/types";
|
|
2
2
|
import LoyaltyWidgetRenderer from "./renderer";
|
|
3
|
+
export declare const LOYALTY_WIDGET_CONTEXT_UPDATE_EVENT = "ikas:loyalty-widget-context-update";
|
|
4
|
+
export declare function updateIkasLoyaltyWidgetContext(patch: LoyaltyWidgetContextPatch): void;
|
|
3
5
|
export declare function startIkasLoyaltyWidget(config?: IkasLoyaltyWidgetConfig): void;
|
|
4
6
|
export { LoyaltyWidgetRenderer };
|
|
5
7
|
export type { IkasLoyaltyWidgetConfig };
|
|
@@ -139,13 +139,32 @@ export type IkasLoyaltyWidgetConfig = {
|
|
|
139
139
|
callbacks: LoyaltyWidgetCallbacks;
|
|
140
140
|
position?: "fixed" | "absolute";
|
|
141
141
|
isPreviewMode?: boolean;
|
|
142
|
+
pageFilters?: LoyaltyWidgetPageFilter[] | null;
|
|
143
|
+
pageContext?: LoyaltyWidgetPageContext | null;
|
|
142
144
|
onViewModelInitialized?: (viewModel: LoyaltyWidgetViewModel) => void;
|
|
143
145
|
};
|
|
146
|
+
export type LoyaltyWidgetPageFilterData = {
|
|
147
|
+
type: string;
|
|
148
|
+
value: string;
|
|
149
|
+
};
|
|
150
|
+
export type LoyaltyWidgetPageFilter = {
|
|
151
|
+
pageType: string;
|
|
152
|
+
filters: LoyaltyWidgetPageFilterData[] | null;
|
|
153
|
+
};
|
|
154
|
+
export type LoyaltyWidgetPageContext = {
|
|
155
|
+
pageType?: string | null;
|
|
156
|
+
pageSpecificDataId?: string | null;
|
|
157
|
+
};
|
|
158
|
+
export type LoyaltyWidgetContextPatch = {
|
|
159
|
+
pageFilters?: LoyaltyWidgetPageFilter[] | null;
|
|
160
|
+
pageContext?: LoyaltyWidgetPageContext | null;
|
|
161
|
+
};
|
|
144
162
|
declare global {
|
|
145
163
|
interface Window {
|
|
146
164
|
startIkasLoyaltyWidget?: (config?: IkasLoyaltyWidgetConfig) => void;
|
|
147
165
|
openIkasStorefrontWidget?: () => void;
|
|
148
166
|
closeIkasStorefrontWidget?: () => void;
|
|
167
|
+
updateIkasLoyaltyWidgetContext?: (patch: LoyaltyWidgetContextPatch) => void;
|
|
149
168
|
ikasLoyaltyWidgetConfig?: IkasLoyaltyWidgetConfig;
|
|
150
169
|
}
|
|
151
170
|
}
|