@rulecms/widget-angular 0.6.0 → 0.8.0
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/fesm2022/rulecms-widget-angular.mjs +1741 -148
- package/fesm2022/rulecms-widget-angular.mjs.map +1 -1
- package/lib/fetch/fetch-rule-cms-widget.d.ts +42 -7
- package/lib/fetch/fetch-rule-cms-widget.d.ts.map +1 -1
- package/lib/helpers/get-component-attributes-and-styles.d.ts.map +1 -1
- package/lib/helpers/index.d.ts +1 -0
- package/lib/helpers/index.d.ts.map +1 -1
- package/lib/helpers/with-widget-placeholder-values.d.ts +25 -0
- package/lib/helpers/with-widget-placeholder-values.d.ts.map +1 -0
- package/lib/id-utils/dev-client-token.d.ts +15 -0
- package/lib/id-utils/dev-client-token.d.ts.map +1 -1
- package/lib/library-registry/types.d.ts +7 -0
- package/lib/library-registry/types.d.ts.map +1 -1
- package/lib/project-css-classes/format-project-css-classes-stylesheet.d.ts +10 -1
- package/lib/project-css-classes/format-project-css-classes-stylesheet.d.ts.map +1 -1
- package/lib/project-css-classes/include-project-css-layers-on-published-widget.d.ts +6 -0
- package/lib/project-css-classes/include-project-css-layers-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-classes/project-css-classes-stylesheet.component.d.ts +3 -2
- package/lib/project-css-classes/project-css-classes-stylesheet.component.d.ts.map +1 -1
- package/lib/project-css-fonts/format-project-css-fonts-stylesheet.d.ts +34 -0
- package/lib/project-css-fonts/format-project-css-fonts-stylesheet.d.ts.map +1 -0
- package/lib/project-css-fonts/include-project-css-fonts-on-published-widget.d.ts +6 -0
- package/lib/project-css-fonts/include-project-css-fonts-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-fonts/project-css-fonts-stylesheet.component.d.ts +16 -0
- package/lib/project-css-fonts/project-css-fonts-stylesheet.component.d.ts.map +1 -0
- package/lib/project-css-keyframes/format-project-css-keyframes-stylesheet.d.ts +11 -0
- package/lib/project-css-keyframes/format-project-css-keyframes-stylesheet.d.ts.map +1 -0
- package/lib/project-css-keyframes/include-project-css-keyframes-on-published-widget.d.ts +6 -0
- package/lib/project-css-keyframes/include-project-css-keyframes-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-keyframes/project-css-keyframes-stylesheet.component.d.ts +14 -0
- package/lib/project-css-keyframes/project-css-keyframes-stylesheet.component.d.ts.map +1 -0
- package/lib/project-css-position-try/format-project-css-position-try-stylesheet.d.ts +11 -0
- package/lib/project-css-position-try/format-project-css-position-try-stylesheet.d.ts.map +1 -0
- package/lib/project-css-position-try/include-project-css-position-try-on-published-widget.d.ts +6 -0
- package/lib/project-css-position-try/include-project-css-position-try-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-position-try/project-css-position-try-stylesheet.component.d.ts +14 -0
- package/lib/project-css-position-try/project-css-position-try-stylesheet.component.d.ts.map +1 -0
- package/lib/project-css-properties/format-project-css-properties-stylesheet.d.ts +15 -0
- package/lib/project-css-properties/format-project-css-properties-stylesheet.d.ts.map +1 -0
- package/lib/project-css-properties/include-project-css-properties-on-published-widget.d.ts +6 -0
- package/lib/project-css-properties/include-project-css-properties-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-properties/project-css-properties-stylesheet.component.d.ts +14 -0
- package/lib/project-css-properties/project-css-properties-stylesheet.component.d.ts.map +1 -0
- package/lib/project-css-themes/format-project-css-themes-stylesheet.d.ts +24 -0
- package/lib/project-css-themes/format-project-css-themes-stylesheet.d.ts.map +1 -0
- package/lib/project-css-themes/include-project-css-themes-on-published-widget.d.ts +6 -0
- package/lib/project-css-themes/include-project-css-themes-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-themes/project-css-themes-stylesheet.component.d.ts +14 -0
- package/lib/project-css-themes/project-css-themes-stylesheet.component.d.ts.map +1 -0
- package/lib/project-css-variables/format-project-css-variables-stylesheet.d.ts +1 -1
- package/lib/project-css-variables/format-project-css-variables-stylesheet.d.ts.map +1 -1
- package/lib/project-css-variables/include-project-css-variables-on-published-widget.d.ts +4 -9
- package/lib/project-css-variables/include-project-css-variables-on-published-widget.d.ts.map +1 -1
- package/lib/project-css-widget-chrome/format-project-css-widget-chrome-stylesheet.d.ts +19 -0
- package/lib/project-css-widget-chrome/format-project-css-widget-chrome-stylesheet.d.ts.map +1 -0
- package/lib/project-css-widget-chrome/include-project-css-widget-chrome-on-published-widget.d.ts +6 -0
- package/lib/project-css-widget-chrome/include-project-css-widget-chrome-on-published-widget.d.ts.map +1 -0
- package/lib/project-css-widget-chrome/project-css-widget-chrome-stylesheet.component.d.ts +14 -0
- package/lib/project-css-widget-chrome/project-css-widget-chrome-stylesheet.component.d.ts.map +1 -0
- package/lib/render/breakpoint-variant-render.component.d.ts +2 -1
- package/lib/render/breakpoint-variant-render.component.d.ts.map +1 -1
- package/lib/render/display-component.component.d.ts +4 -1
- package/lib/render/display-component.component.d.ts.map +1 -1
- package/lib/render/render-components-for-device.component.d.ts +2 -1
- package/lib/render/render-components-for-device.component.d.ts.map +1 -1
- package/lib/render/render-components-inner.component.d.ts +4 -1
- package/lib/render/render-components-inner.component.d.ts.map +1 -1
- package/lib/render/render-components.component.d.ts +2 -1
- package/lib/render/render-components.component.d.ts.map +1 -1
- package/lib/widget/prepare-rule-cms-widget-data.d.ts.map +1 -1
- package/lib/widget/rule-cms-widget.component.d.ts +33 -2
- package/lib/widget/rule-cms-widget.component.d.ts.map +1 -1
- package/lib/widget/widget-data.types.d.ts +104 -16
- package/lib/widget/widget-data.types.d.ts.map +1 -1
- package/lib/widget/widget-selection/build-widget-resolve-request.d.ts +23 -0
- package/lib/widget/widget-selection/build-widget-resolve-request.d.ts.map +1 -0
- package/lib/widget/widget-selection/get-or-create-anonymous-id.d.ts +11 -0
- package/lib/widget/widget-selection/get-or-create-anonymous-id.d.ts.map +1 -0
- package/lib/widget/widget-selection/is-widget-resolve-fallback-status.d.ts +8 -0
- package/lib/widget/widget-selection/is-widget-resolve-fallback-status.d.ts.map +1 -0
- package/lib/widget/widget-selection/normalize-widget-resolve-response.d.ts +16 -0
- package/lib/widget/widget-selection/normalize-widget-resolve-response.d.ts.map +1 -0
- package/lib/widget/widget-selection/stable-json-stringify.d.ts +8 -0
- package/lib/widget/widget-selection/stable-json-stringify.d.ts.map +1 -0
- package/lib/widget/widget-selection/to-ruleset-key.d.ts +7 -0
- package/lib/widget/widget-selection/to-ruleset-key.d.ts.map +1 -0
- package/lib/widget/widget-selection/types.d.ts +78 -0
- package/lib/widget/widget-selection/types.d.ts.map +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -1
- package/public-api.d.ts.map +1 -1
package/lib/project-css-variables/include-project-css-variables-on-published-widget.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"include-project-css-variables-on-published-widget.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-variables/include-project-css-variables-on-published-widget.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"include-project-css-variables-on-published-widget.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-variables/include-project-css-variables-on-published-widget.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,0CAA0C,CACxD,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,GACnC,OAAO,CAET"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const PROJECT_WIDGET_CHROME_COLOR_SCHEME_VALUES: readonly ["light", "dark", "light dark"];
|
|
2
|
+
export declare const PROJECT_WIDGET_CHROME_SCROLLBAR_WIDTH_VALUES: readonly ["auto", "thin", "none"];
|
|
3
|
+
export type ProjectWidgetChromeColorScheme = (typeof PROJECT_WIDGET_CHROME_COLOR_SCHEME_VALUES)[number];
|
|
4
|
+
export type ProjectWidgetChromeScrollbarWidth = (typeof PROJECT_WIDGET_CHROME_SCROLLBAR_WIDTH_VALUES)[number];
|
|
5
|
+
export type ProjectWidgetChrome = {
|
|
6
|
+
colorScheme?: ProjectWidgetChromeColorScheme;
|
|
7
|
+
selectionBackground?: string;
|
|
8
|
+
selectionColor?: string;
|
|
9
|
+
caretColor?: string;
|
|
10
|
+
scrollbarColor?: string;
|
|
11
|
+
scrollbarWidth?: ProjectWidgetChromeScrollbarWidth;
|
|
12
|
+
};
|
|
13
|
+
export declare const sanitizeProjectWidgetChrome: (widgetChrome: ProjectWidgetChrome | null | undefined) => ProjectWidgetChrome | null;
|
|
14
|
+
/**
|
|
15
|
+
* Color-scheme, caret, and scrollbars on boxed children of the published-key
|
|
16
|
+
* wrapper; selection on that subtree. Never `:root` / `html` / `body`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatProjectCssWidgetChromeStylesheet: (publishedKey: string, widgetChrome: ProjectWidgetChrome | null | undefined, includeWidgetChrome?: boolean | null) => string | null;
|
|
19
|
+
//# sourceMappingURL=format-project-css-widget-chrome-stylesheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-project-css-widget-chrome-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-widget-chrome/format-project-css-widget-chrome-stylesheet.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yCAAyC,0CAI5C,CAAC;AACX,eAAO,MAAM,4CAA4C,mCAAoC,CAAC;AAE9F,MAAM,MAAM,8BAA8B,GACxC,CAAC,OAAO,yCAAyC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,iCAAiC,GAC3C,CAAC,OAAO,4CAA4C,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,8BAA8B,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,iCAAiC,CAAC;CACpD,CAAC;AAeF,eAAO,MAAM,2BAA2B,iBACxB,mBAAmB,GAAG,IAAI,GAAG,SAAS,KACnD,mBAAmB,GAAG,IAyBxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sCAAsC,iBACnC,MAAM,gBACN,mBAAmB,GAAG,IAAI,GAAG,SAAS,wBAC9B,OAAO,GAAG,IAAI,KACnC,MAAM,GAAG,IA0CX,CAAC"}
|
package/lib/project-css-widget-chrome/include-project-css-widget-chrome-on-published-widget.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Missing/undefined on a widget GET payload means include. Only an explicit
|
|
3
|
+
* `false` turns emission off, even if `widgetChrome` is still present.
|
|
4
|
+
*/
|
|
5
|
+
export declare function shouldIncludeWidgetChromeOnPublishedWidget(includeWidgetChrome?: boolean | null): boolean;
|
|
6
|
+
//# sourceMappingURL=include-project-css-widget-chrome-on-published-widget.d.ts.map
|
package/lib/project-css-widget-chrome/include-project-css-widget-chrome-on-published-widget.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include-project-css-widget-chrome-on-published-widget.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-widget-chrome/include-project-css-widget-chrome-on-published-widget.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,0CAA0C,CACxD,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,GACnC,OAAO,CAET"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProjectWidgetChrome } from './format-project-css-widget-chrome-stylesheet';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Emits one `<style data-rulecms-project-widget-chrome>` from the project
|
|
5
|
+
* catalog, or nothing when the catalog is empty / unsanitary.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ProjectCssWidgetChromeStylesheetComponent {
|
|
8
|
+
publishedKey: string;
|
|
9
|
+
widgetChrome?: ProjectWidgetChrome | null;
|
|
10
|
+
get css(): string | null;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProjectCssWidgetChromeStylesheetComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProjectCssWidgetChromeStylesheetComponent, "rulecms-project-css-widget-chrome-stylesheet", never, { "publishedKey": { "alias": "publishedKey"; "required": true; }; "widgetChrome": { "alias": "widgetChrome"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=project-css-widget-chrome-stylesheet.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-css-widget-chrome-stylesheet.component.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-widget-chrome/project-css-widget-chrome-stylesheet.component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;;AAEzF;;;GAGG;AACH,qBASa,yCAAyC;IACzB,YAAY,EAAG,MAAM,CAAC;IACxC,YAAY,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEnD,IAAI,GAAG,IAAI,MAAM,GAAG,IAAI,CAEvB;yCANU,yCAAyC;2CAAzC,yCAAyC;CAOrD"}
|
|
@@ -10,6 +10,7 @@ export declare class BreakpointVariantRenderComponent implements OnChanges {
|
|
|
10
10
|
plugins: RenderComponentPlugins;
|
|
11
11
|
componentProps?: ComponentPropsMap;
|
|
12
12
|
mounts?: MountsMap;
|
|
13
|
+
placeholderValues?: unknown;
|
|
13
14
|
scopeIdInput?: string;
|
|
14
15
|
readonly devices: ("Phone" | "Tablet" | "Desktop")[];
|
|
15
16
|
divergent: boolean;
|
|
@@ -17,6 +18,6 @@ export declare class BreakpointVariantRenderComponent implements OnChanges {
|
|
|
17
18
|
resolvedScopeId: string;
|
|
18
19
|
ngOnChanges(): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<BreakpointVariantRenderComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BreakpointVariantRenderComponent, "rulecms-breakpoint-variants", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "scopeIdInput": { "alias": "scopeIdInput"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BreakpointVariantRenderComponent, "rulecms-breakpoint-variants", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; }; "scopeIdInput": { "alias": "scopeIdInput"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
22
|
}
|
|
22
23
|
//# sourceMappingURL=breakpoint-variant-render.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoint-variant-render.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/breakpoint-variant-render.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,SAAS,EAET,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAUjD,
|
|
1
|
+
{"version":3,"file":"breakpoint-variant-render.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/breakpoint-variant-render.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,SAAS,EAET,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAUjD,qBA2Ca,gCAAiC,YAAW,SAAS;IACrC,eAAe,EAAG,KAAK,CAAC;IACxB,iBAAiB,EAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IACxD,OAAO,EAAG,sBAAsB,CAAC;IACnD,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B,QAAQ,CAAC,OAAO,qCAAmB;IACnC,SAAS,UAAS;IAClB,aAAa,SAAM;IACnB,eAAe,SAAmC;IAElD,WAAW,IAAI,IAAI;yCAdR,gCAAgC;2CAAhC,gCAAgC;CAmB5C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnChanges } from '@angular/core';
|
|
2
2
|
import type { LibraryCardComponent, LibraryComponentEntry } from '../library-registry/types';
|
|
3
|
+
import type { PageViewType } from '../helpers';
|
|
3
4
|
import { MountsMap, WidgetInstanceProps } from '../helpers/types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class DisplayComponentComponent implements OnChanges {
|
|
@@ -13,6 +14,8 @@ export declare class DisplayComponentComponent implements OnChanges {
|
|
|
13
14
|
[key: string]: any;
|
|
14
15
|
};
|
|
15
16
|
widgetInstanceProps?: WidgetInstanceProps;
|
|
17
|
+
pageViewType?: PageViewType;
|
|
18
|
+
columnPath?: string;
|
|
16
19
|
mounts?: MountsMap;
|
|
17
20
|
card: LibraryCardComponent | null;
|
|
18
21
|
cardInputs: Record<string, unknown>;
|
|
@@ -23,6 +26,6 @@ export declare class DisplayComponentComponent implements OnChanges {
|
|
|
23
26
|
wrapperStyle: Record<string, unknown>;
|
|
24
27
|
ngOnChanges(): void;
|
|
25
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisplayComponentComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DisplayComponentComponent, "rulecms-display-component", never, { "componentType": { "alias": "componentType"; "required": true; }; "libraryId": { "alias": "libraryId"; "required": false; }; "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "components": { "alias": "components"; "required": true; }; "styleProps": { "alias": "styleProps"; "required": false; }; "widgetInstanceProps": { "alias": "widgetInstanceProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DisplayComponentComponent, "rulecms-display-component", never, { "componentType": { "alias": "componentType"; "required": true; }; "libraryId": { "alias": "libraryId"; "required": false; }; "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "components": { "alias": "components"; "required": true; }; "styleProps": { "alias": "styleProps"; "required": false; }; "widgetInstanceProps": { "alias": "widgetInstanceProps"; "required": false; }; "pageViewType": { "alias": "pageViewType"; "required": false; }; "columnPath": { "alias": "columnPath"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
30
|
}
|
|
28
31
|
//# sourceMappingURL=display-component.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-component.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/display-component.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAG7F,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;;AASlE,qBAqBa,yBAA0B,YAAW,SAAS;IAC9B,aAAa,EAAG,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC3B,UAAU,EAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,MAAM,CAAC,EAAE,SAAS,CAAC;IAE5B,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IACzC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,YAAY,UAAS;IACrB,iBAAiB,UAAS;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IAE3C,WAAW,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"display-component.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/display-component.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAG7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;;AASlE,qBAqBa,yBAA0B,YAAW,SAAS;IAC9B,aAAa,EAAG,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC3B,UAAU,EAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IAE5B,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IACzC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,YAAY,UAAS;IACrB,iBAAiB,UAAS;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IAE3C,WAAW,IAAI,IAAI;yCAnBR,yBAAyB;2CAAzB,yBAAyB;CA2DrC"}
|
|
@@ -14,8 +14,9 @@ export declare class RenderComponentsForDeviceComponent {
|
|
|
14
14
|
plugins: RenderComponentPlugins;
|
|
15
15
|
componentProps?: ComponentPropsMap;
|
|
16
16
|
mounts?: MountsMap;
|
|
17
|
+
placeholderValues?: unknown;
|
|
17
18
|
ancestorColumnIds?: string[];
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<RenderComponentsForDeviceComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsForDeviceComponent, "rulecms-render-for-device", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "deviceDisplayType": { "alias": "deviceDisplayType"; "required": true; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "ancestorColumnIds": { "alias": "ancestorColumnIds"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsForDeviceComponent, "rulecms-render-for-device", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "deviceDisplayType": { "alias": "deviceDisplayType"; "required": true; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; }; "ancestorColumnIds": { "alias": "ancestorColumnIds"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=render-components-for-device.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-components-for-device.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components-for-device.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAGjD,
|
|
1
|
+
{"version":3,"file":"render-components-for-device.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components-for-device.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAGjD,qBAwBa,kCAAkC;IAClB,eAAe,EAAG,KAAK,CAAC;IAC1C,aAAa,UAAS;IACtB,kBAAkB,UAAS;IACT,iBAAiB,EAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IAC1E,kBAAkB,UAAS;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAG,MAAM,OAAO,kBAAkB,CAAC;IACpD,OAAO,EAAG,sBAAsB,CAAC;IACnD,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;yCAZ3B,kCAAkC;2CAAlC,kCAAkC;CAa9C"}
|
|
@@ -21,6 +21,7 @@ export declare class RenderComponentsInnerComponent {
|
|
|
21
21
|
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
22
22
|
componentProps?: ComponentPropsMap;
|
|
23
23
|
mounts?: MountsMap;
|
|
24
|
+
placeholderValues?: unknown;
|
|
24
25
|
ancestorColumnIds?: string[];
|
|
25
26
|
get components(): Record<string, import("@rulecms/widget-angular").LibraryComponentEntry>;
|
|
26
27
|
get shouldStack(): boolean;
|
|
@@ -38,10 +39,12 @@ export declare class RenderComponentsInnerComponent {
|
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
collectionFor(col: DisplayItemColumn): Items | null;
|
|
42
|
+
get pageViewType(): import("@rulecms/widget-angular").PageViewType;
|
|
41
43
|
childAncestorIds(columnId: string): string[];
|
|
44
|
+
columnPathFor(columnId: string): string | undefined;
|
|
42
45
|
instanceProps(columnId: string): import("@rulecms/widget-angular").WidgetInstanceProps | undefined;
|
|
43
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<RenderComponentsInnerComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsInnerComponent, "rulecms-render-inner", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "plugins": { "alias": "plugins"; "required": true; }; "deviceDisplayType": { "alias": "deviceDisplayType"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "ancestorColumnIds": { "alias": "ancestorColumnIds"; "required": false; }; }, {}, never, never, true, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsInnerComponent, "rulecms-render-inner", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "plugins": { "alias": "plugins"; "required": true; }; "deviceDisplayType": { "alias": "deviceDisplayType"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; }; "ancestorColumnIds": { "alias": "ancestorColumnIds"; "required": false; }; }, {}, never, never, true, never>;
|
|
45
48
|
}
|
|
46
49
|
export {};
|
|
47
50
|
//# sourceMappingURL=render-components-inner.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-components-inner.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components-inner.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EAEjB,kBAAkB,EAClB,KAAK,
|
|
1
|
+
{"version":3,"file":"render-components-inner.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components-inner.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,S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AAG,CAAA;SAAE,CAAC;KACrC;IAaD,aAAa,CAAC,GAAG,EAAE,iBAAiB,GAAG,KAAK,GAAG,IAAI;IAiBnD,IAAI,YAAY,mDAEf;IAED,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAI5C,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOnD,aAAa,CAAC,QAAQ,EAAE,MAAM;yCA9InB,8BAA8B;2CAA9B,8BAA8B;CAwJ1C"}
|
|
@@ -14,6 +14,7 @@ export declare class RenderComponentsComponent implements OnInit, OnDestroy {
|
|
|
14
14
|
plugins: RenderComponentPlugins;
|
|
15
15
|
componentProps?: ComponentPropsMap;
|
|
16
16
|
mounts?: MountsMap;
|
|
17
|
+
placeholderValues?: unknown;
|
|
17
18
|
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
18
19
|
private phoneQuery?;
|
|
19
20
|
private tabletQuery?;
|
|
@@ -22,6 +23,6 @@ export declare class RenderComponentsComponent implements OnInit, OnDestroy {
|
|
|
22
23
|
ngOnDestroy(): void;
|
|
23
24
|
private updateDeviceType;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<RenderComponentsComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsComponent, "rulecms-render-components", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RenderComponentsComponent, "rulecms-render-components", never, { "displayItemList": { "alias": "displayItemList"; "required": true; }; "isComposeMode": { "alias": "isComposeMode"; "required": false; }; "isWithinCollection": { "alias": "isWithinCollection"; "required": false; }; "widgetCollections": { "alias": "widgetCollections"; "required": true; }; "showDropContainers": { "alias": "showDropContainers"; "required": false; }; "reduxDeviceDisplayType": { "alias": "reduxDeviceDisplayType"; "required": false; }; "plugins": { "alias": "plugins"; "required": true; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
27
|
}
|
|
27
28
|
//# sourceMappingURL=render-components.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-components.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAKjD,
|
|
1
|
+
{"version":3,"file":"render-components.component.d.ts","sourceRoot":"","sources":["../../../src/lib/render/render-components.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EACL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAKjD,qBAwBa,yBAA0B,YAAW,MAAM,EAAE,SAAS;IACtC,eAAe,EAAG,KAAK,CAAC;IAC1C,aAAa,UAAS;IACtB,kBAAkB,UAAS;IACT,iBAAiB,EAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IAC1E,kBAAkB,UAAS;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAG,sBAAsB,CAAC;IACnD,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAErC,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAa;IAE/D,OAAO,CAAC,UAAU,CAAC,CAAiB;IACpC,OAAO,CAAC,WAAW,CAAC,CAAiB;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,QAAQ,IAAI,IAAI;IAUhB,WAAW,IAAI,IAAI;IAKnB,OAAO,CAAC,gBAAgB;yCAjCb,yBAAyB;2CAAzB,yBAAyB;CAwCrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-rule-cms-widget-data.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/prepare-rule-cms-widget-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prepare-rule-cms-widget-data.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/prepare-rule-cms-widget-data.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EAGrB,MAAM,qBAAqB,CAAC;AAoC7B,qFAAqF;AACrF,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,oBAAoB,GACxB,iBAAiB,CAiDnB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ErrorHandler, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ErrorHandler, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import type { LibraryRegistrationMap } from '../library-registry/types';
|
|
3
3
|
import type { ComponentPropsMap, MountsMap } from '../helpers/types';
|
|
4
4
|
import { RuleCMSWidgetContextService } from '../provider/rule-cms-widget-context.service';
|
|
5
5
|
import type { RenderComponentPlugins } from '../render/types';
|
|
6
6
|
import type { SourceComponentsPlugin } from '../library-registry/types';
|
|
7
7
|
import type { RuleCMSWidgetData } from './widget-data.types';
|
|
8
|
+
import type { WidgetResolveContentType, WidgetSelection, WidgetSelectionParams } from './widget-selection/types';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class RuleCMSWidgetComponent implements OnInit, OnChanges, OnDestroy {
|
|
10
11
|
private readonly context;
|
|
@@ -12,8 +13,25 @@ export declare class RuleCMSWidgetComponent implements OnInit, OnChanges, OnDest
|
|
|
12
13
|
/**
|
|
13
14
|
* Staging/production: published key (`{environmentId}---{widgetKey}`).
|
|
14
15
|
* Development (`dev.` token): the live widget key itself (`widget-...`).
|
|
16
|
+
* Omit when `rulesetPublishedKey` is set — the ruleset picks the widget.
|
|
15
17
|
*/
|
|
16
18
|
publishedKey: string;
|
|
19
|
+
/**
|
|
20
|
+
* Staging/production: ruleset published key (`{environmentId}---ruleset-…`).
|
|
21
|
+
* Development (`dev.` token): the `ruleset-…` key.
|
|
22
|
+
*/
|
|
23
|
+
rulesetPublishedKey?: string;
|
|
24
|
+
/** Any JSON object sent to the resolve endpoint. The server flattens nested objects. */
|
|
25
|
+
params?: WidgetSelectionParams;
|
|
26
|
+
/**
|
|
27
|
+
* `false` skips minting an anonymous id. A string is used as `params.anonId`.
|
|
28
|
+
* Omit it in the browser and the widget stores one in `localStorage`.
|
|
29
|
+
*/
|
|
30
|
+
anonymousId?: string | false;
|
|
31
|
+
/** Plain published-key GET used when the resolve request fails with a network error or 5xx. */
|
|
32
|
+
fallbackPublishedKey?: string;
|
|
33
|
+
/** Defaults to `text/plain` so the browser skips the CORS preflight. */
|
|
34
|
+
contentType?: WidgetResolveContentType;
|
|
17
35
|
/** Optional token for direct usage without a provider. */
|
|
18
36
|
token?: string;
|
|
19
37
|
/** Optional API origin override. */
|
|
@@ -41,6 +59,13 @@ export declare class RuleCMSWidgetComponent implements OnInit, OnChanges, OnDest
|
|
|
41
59
|
* passes this, so the canvas always shows that placeholder.
|
|
42
60
|
*/
|
|
43
61
|
mounts?: MountsMap;
|
|
62
|
+
/**
|
|
63
|
+
* Values copied onto every Text as `placeholderValues`, unless that column's
|
|
64
|
+
* `componentProps` entry already sets the key (including `null` to opt out).
|
|
65
|
+
*/
|
|
66
|
+
placeholderValues?: unknown;
|
|
67
|
+
/** Fires when a ruleset resolve returns a selection. */
|
|
68
|
+
selectionChange: EventEmitter<WidgetSelection>;
|
|
44
69
|
readonly publishedKeyAttribute = "data-rulecms-published-key";
|
|
45
70
|
readonly loadingContainerStyle: Record<string, string>;
|
|
46
71
|
readonly spinnerContainerStyle: Record<string, string>;
|
|
@@ -53,11 +78,17 @@ export declare class RuleCMSWidgetComponent implements OnInit, OnChanges, OnDest
|
|
|
53
78
|
preparedData: RuleCMSWidgetData | null;
|
|
54
79
|
sourceComponentsPlugin: SourceComponentsPlugin | null;
|
|
55
80
|
useBreakpointVariants: boolean;
|
|
81
|
+
selection: WidgetSelection | null;
|
|
82
|
+
/** Published key of the widget a ruleset chose, when `publishedKey` was omitted. */
|
|
83
|
+
resolvedPublishedKey: string;
|
|
56
84
|
private abortController;
|
|
57
85
|
private lastFetchKey;
|
|
58
86
|
private stylesInjected;
|
|
87
|
+
private fetchGeneration;
|
|
59
88
|
constructor(context: RuleCMSWidgetContextService | null, errorHandler: ErrorHandler | null);
|
|
60
89
|
get plugins(): RenderComponentPlugins;
|
|
90
|
+
/** Ruleset mode has no publishedKey; the root then carries the chosen widget's key. */
|
|
91
|
+
get renderPublishedKey(): string;
|
|
61
92
|
ngOnInit(): void;
|
|
62
93
|
ngOnChanges(_changes: SimpleChanges): void;
|
|
63
94
|
ngOnDestroy(): void;
|
|
@@ -67,6 +98,6 @@ export declare class RuleCMSWidgetComponent implements OnInit, OnChanges, OnDest
|
|
|
67
98
|
private fetchClient;
|
|
68
99
|
private ensureSpinnerStyles;
|
|
69
100
|
static ɵfac: i0.ɵɵFactoryDeclaration<RuleCMSWidgetComponent, [{ optional: true; }, { optional: true; }]>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RuleCMSWidgetComponent, "rulecms-widget", never, { "publishedKey": { "alias": "publishedKey"; "required":
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RuleCMSWidgetComponent, "rulecms-widget", never, { "publishedKey": { "alias": "publishedKey"; "required": false; }; "rulesetPublishedKey": { "alias": "rulesetPublishedKey"; "required": false; }; "params": { "alias": "params"; "required": false; }; "anonymousId": { "alias": "anonymousId"; "required": false; }; "fallbackPublishedKey": { "alias": "fallbackPublishedKey"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "token": { "alias": "token"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "initialData": { "alias": "initialData"; "required": false; }; "libraries": { "alias": "libraries"; "required": false; }; "componentProps": { "alias": "componentProps"; "required": false; }; "mounts": { "alias": "mounts"; "required": false; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
71
102
|
}
|
|
72
103
|
//# sourceMappingURL=rule-cms-widget.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-cms-widget.component.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/rule-cms-widget.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAGZ,SAAS,EACT,SAAS,EACT,MAAM,
|
|
1
|
+
{"version":3,"file":"rule-cms-widget.component.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/rule-cms-widget.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,YAAY,EAGZ,SAAS,EACT,SAAS,EACT,MAAM,EAGN,aAAa,EACd,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC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|
import { ConfigLibrariesMap } from '../library-registry/types';
|
|
3
|
-
import type { ProjectCssClassDefinitions } from '../project-css-classes/format-project-css-classes-stylesheet';
|
|
3
|
+
import type { ProjectCssClassDefinitions, ProjectCssClassLayer } from '../project-css-classes/format-project-css-classes-stylesheet';
|
|
4
4
|
import type { ProjectCssVariableDefinitions } from '../project-css-variables/format-project-css-variables-stylesheet';
|
|
5
|
+
import type { ProjectFontFace } from '../project-css-fonts/format-project-css-fonts-stylesheet';
|
|
6
|
+
import type { ProjectCssKeyframeDefinitions } from '../project-css-keyframes/format-project-css-keyframes-stylesheet';
|
|
7
|
+
import type { ProjectThemeDefinition } from '../project-css-themes/format-project-css-themes-stylesheet';
|
|
8
|
+
import type { ProjectCssPropertyDefinition } from '../project-css-properties/format-project-css-properties-stylesheet';
|
|
9
|
+
import type { ProjectWidgetChrome } from '../project-css-widget-chrome/format-project-css-widget-chrome-stylesheet';
|
|
10
|
+
import type { ProjectCssPositionTryDefinitions } from '../project-css-position-try/format-project-css-position-try-stylesheet';
|
|
5
11
|
export interface WidgetData {
|
|
6
12
|
publishedKey: string;
|
|
7
13
|
name: string;
|
|
@@ -24,30 +30,23 @@ export interface ChildCollection {
|
|
|
24
30
|
}
|
|
25
31
|
export interface GetRuleCMSWidgetResponse {
|
|
26
32
|
success: boolean;
|
|
27
|
-
data:
|
|
28
|
-
widget: WidgetData;
|
|
29
|
-
childCollections: {
|
|
30
|
-
[key: string]: ChildCollection;
|
|
31
|
-
};
|
|
32
|
-
libraries?: ConfigLibrariesMap;
|
|
33
|
-
/**
|
|
34
|
-
* Project CSS variable catalog joined at GET time. Omitted when empty or
|
|
35
|
-
* when emission is off.
|
|
36
|
-
*/
|
|
37
|
-
cssVariables?: ProjectCssVariableDefinitions;
|
|
38
|
-
classDefinitions?: ProjectCssClassDefinitions;
|
|
39
|
-
includeClassDefinitions?: boolean;
|
|
40
|
-
};
|
|
33
|
+
data: RuleCMSWidgetRawData;
|
|
41
34
|
}
|
|
35
|
+
/** Render-ready widget payload after parsing API / fetch response. */
|
|
42
36
|
export interface RuleCMSWidgetData {
|
|
43
37
|
displayItemList: Items;
|
|
44
38
|
widgetCollections: {
|
|
45
39
|
[key: string]: WidgetCollection;
|
|
46
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Platform-served library descriptors (optional; absent for configs that
|
|
43
|
+
* only use the default library, and until the platform serves them).
|
|
44
|
+
*/
|
|
47
45
|
libraries?: ConfigLibrariesMap;
|
|
48
46
|
/**
|
|
49
47
|
* Project CSS variable catalog joined onto the widget GET. Optional; omit
|
|
50
|
-
* or `{}` when the project has none. Not stored on itemList.
|
|
48
|
+
* or `{}` when the project has none. Not stored on itemList. Dropped when
|
|
49
|
+
* `includeCssVariables` on the raw GET is `false`.
|
|
51
50
|
*/
|
|
52
51
|
cssVariables?: ProjectCssVariableDefinitions;
|
|
53
52
|
/**
|
|
@@ -56,19 +55,108 @@ export interface RuleCMSWidgetData {
|
|
|
56
55
|
* when `includeClassDefinitions` on the raw GET is `false`.
|
|
57
56
|
*/
|
|
58
57
|
classDefinitions?: ProjectCssClassDefinitions;
|
|
58
|
+
/**
|
|
59
|
+
* Cascade layer to wrap class definitions. Dropped when
|
|
60
|
+
* `includeClassLayer` on the raw GET is `false`.
|
|
61
|
+
*/
|
|
62
|
+
classLayer?: ProjectCssClassLayer;
|
|
63
|
+
/**
|
|
64
|
+
* Project font-face catalog joined onto the widget GET. Dropped when
|
|
65
|
+
* `includeFontFaces` on the raw GET is `false`.
|
|
66
|
+
*/
|
|
67
|
+
fontFaces?: ProjectFontFace[];
|
|
68
|
+
/**
|
|
69
|
+
* Project keyframes catalog joined onto the widget GET. Dropped when
|
|
70
|
+
* `includeKeyframes` on the raw GET is `false`.
|
|
71
|
+
*/
|
|
72
|
+
keyframes?: ProjectCssKeyframeDefinitions;
|
|
73
|
+
/**
|
|
74
|
+
* Project theme-override catalog joined onto the widget GET. Dropped when
|
|
75
|
+
* `includeThemes` on the raw GET is `false`.
|
|
76
|
+
*/
|
|
77
|
+
themes?: ProjectThemeDefinition[];
|
|
78
|
+
/**
|
|
79
|
+
* Project typed `@property` catalog joined onto the widget GET. Dropped when
|
|
80
|
+
* `includeCssProperties` on the raw GET is `false`.
|
|
81
|
+
*/
|
|
82
|
+
cssProperties?: ProjectCssPropertyDefinition[];
|
|
83
|
+
/**
|
|
84
|
+
* Project widget-root chrome joined onto the widget GET. Dropped when
|
|
85
|
+
* `includeWidgetChrome` on the raw GET is `false`.
|
|
86
|
+
*/
|
|
87
|
+
widgetChrome?: ProjectWidgetChrome;
|
|
88
|
+
/**
|
|
89
|
+
* Project position-try catalog joined onto the widget GET. Dropped when
|
|
90
|
+
* `includePositionTry` on the raw GET is `false`.
|
|
91
|
+
*/
|
|
92
|
+
positionTry?: ProjectCssPositionTryDefinitions;
|
|
93
|
+
/**
|
|
94
|
+
* Which widget the ruleset picked, present only when the data came from a
|
|
95
|
+
* `rulesetPublishedKey` resolve (absent on plain `publishedKey` fetches and
|
|
96
|
+
* when the resolve fell back to `fallbackPublishedKey`).
|
|
97
|
+
*/
|
|
98
|
+
selection?: import('./widget-selection/types').WidgetSelection;
|
|
59
99
|
}
|
|
60
100
|
export interface RuleCMSWidgetRawData {
|
|
61
101
|
widget: WidgetData;
|
|
62
102
|
childCollections: {
|
|
63
103
|
[key: string]: ChildCollection;
|
|
64
104
|
};
|
|
105
|
+
/** Optional platform-served library descriptors (see RuleCMSWidgetData). */
|
|
65
106
|
libraries?: ConfigLibrariesMap;
|
|
66
107
|
cssVariables?: ProjectCssVariableDefinitions;
|
|
108
|
+
/**
|
|
109
|
+
* When `false`, do not emit the catalog even if `cssVariables` is present.
|
|
110
|
+
* Missing means include (legacy payloads).
|
|
111
|
+
*/
|
|
112
|
+
includeCssVariables?: boolean;
|
|
67
113
|
classDefinitions?: ProjectCssClassDefinitions;
|
|
68
114
|
/**
|
|
69
115
|
* When `false`, do not emit class definitions even if `classDefinitions` is
|
|
70
116
|
* present. Missing means include (legacy payloads).
|
|
71
117
|
*/
|
|
72
118
|
includeClassDefinitions?: boolean;
|
|
119
|
+
classLayer?: ProjectCssClassLayer;
|
|
120
|
+
/**
|
|
121
|
+
* When `false`, emit class definitions unlayered even if `classLayer` is
|
|
122
|
+
* present. Missing means wrap when `classLayer` is set.
|
|
123
|
+
*/
|
|
124
|
+
includeClassLayer?: boolean;
|
|
125
|
+
fontFaces?: ProjectFontFace[];
|
|
126
|
+
/**
|
|
127
|
+
* When `false`, do not emit fonts even if `fontFaces` is present.
|
|
128
|
+
* Missing means include (legacy payloads).
|
|
129
|
+
*/
|
|
130
|
+
includeFontFaces?: boolean;
|
|
131
|
+
keyframes?: ProjectCssKeyframeDefinitions;
|
|
132
|
+
/**
|
|
133
|
+
* When `false`, do not emit keyframes even if `keyframes` is present.
|
|
134
|
+
* Missing means include (legacy payloads).
|
|
135
|
+
*/
|
|
136
|
+
includeKeyframes?: boolean;
|
|
137
|
+
themes?: ProjectThemeDefinition[];
|
|
138
|
+
/**
|
|
139
|
+
* When `false`, do not emit theme overrides even if `themes` is present.
|
|
140
|
+
* Missing means include (legacy payloads).
|
|
141
|
+
*/
|
|
142
|
+
includeThemes?: boolean;
|
|
143
|
+
cssProperties?: ProjectCssPropertyDefinition[];
|
|
144
|
+
/**
|
|
145
|
+
* When `false`, do not emit typed CSS properties even if `cssProperties` is
|
|
146
|
+
* present. Missing means include (legacy payloads).
|
|
147
|
+
*/
|
|
148
|
+
includeCssProperties?: boolean;
|
|
149
|
+
widgetChrome?: ProjectWidgetChrome;
|
|
150
|
+
/**
|
|
151
|
+
* When `false`, do not emit widget chrome even if `widgetChrome` is present.
|
|
152
|
+
* Missing means include (legacy payloads).
|
|
153
|
+
*/
|
|
154
|
+
includeWidgetChrome?: boolean;
|
|
155
|
+
positionTry?: ProjectCssPositionTryDefinitions;
|
|
156
|
+
/**
|
|
157
|
+
* When `false`, do not emit position-try fallbacks even if `positionTry` is
|
|
158
|
+
* present. Missing means include (legacy payloads).
|
|
159
|
+
*/
|
|
160
|
+
includePositionTry?: boolean;
|
|
73
161
|
}
|
|
74
162
|
//# sourceMappingURL=widget-data.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-data.types.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/widget-data.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"widget-data.types.d.ts","sourceRoot":"","sources":["../../../src/lib/widget/widget-data.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EACV,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AACtH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAChG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AACtH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACzG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AACvH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0EAA0E,CAAC;AACpH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,wEAAwE,CAAC;AAE/H,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,E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AAC;CAChE;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;IACrD,4EAA4E;IAC5E,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,YAAY,CAAC,EAAE,6BAA6B,CAAC;IAC7C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;IAC9C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,6BAA6B,CAAC;IAC1C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,gCAAgC,CAAC;IAC/C;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WidgetResolveContentType, WidgetSelectionParams } from './types';
|
|
2
|
+
export declare const DEFAULT_WIDGET_RESOLVE_CONTENT_TYPE: WidgetResolveContentType;
|
|
3
|
+
export interface BuildWidgetResolveRequestBodyParams {
|
|
4
|
+
token: string;
|
|
5
|
+
rulesetPublishedKey: string;
|
|
6
|
+
params?: WidgetSelectionParams;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Body for the resolve POST. Published tokens send
|
|
10
|
+
* `{ token, rulesetPublishedKey, params, mode: 'payload' }`; `dev.` tokens hit
|
|
11
|
+
* the draft route, which wants the bare `rulesetKey` and no `mode`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildWidgetResolveRequestBody({ token, rulesetPublishedKey, params, }: BuildWidgetResolveRequestBodyParams): Record<string, unknown>;
|
|
14
|
+
export interface BuildWidgetResolveRequestInitParams extends BuildWidgetResolveRequestBodyParams {
|
|
15
|
+
contentType?: WidgetResolveContentType;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* `fetch` init for the resolve POST. `Content-Type` is the only header —
|
|
19
|
+
* `text/plain` keeps the request CORS-simple (no preflight); anything else
|
|
20
|
+
* would add one, so nothing else is set here.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildWidgetResolveRequestInit({ contentType, ...bodyParams }: BuildWidgetResolveRequestInitParams): RequestInit;
|
|
23
|
+
//# sourceMappingURL=build-widget-resolve-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-widget-resolve-request.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/build-widget-resolve-request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE/E,eAAO,MAAM,mCAAmC,EAAE,wBAAuC,CAAC;AAE1F,MAAM,WAAW,mCAAmC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,mBAAmB,EACnB,MAAM,GACP,EAAE,mCAAmC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAc/D;AAED,MAAM,WAAW,mCAAoC,SAAQ,mCAAmC;IAC9F,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,WAAiD,EACjD,GAAG,UAAU,EACd,EAAE,mCAAmC,GAAG,WAAW,CAMnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** First-party `localStorage` key holding the SDK-generated anonymous id. */
|
|
2
|
+
export declare const RULECMS_ANONYMOUS_ID_STORAGE_KEY = "rulecms_anon_id";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the anonymous id used as `params.anonId` for experiments, minting
|
|
5
|
+
* and persisting one in `localStorage` on first use. Browser-only: returns
|
|
6
|
+
* `undefined` outside a window (SSR) so the server never invents an id, and
|
|
7
|
+
* when storage is unavailable (private mode, blocked third-party context) a
|
|
8
|
+
* per-page-load id is returned without persisting.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getOrCreateAnonymousId(): string | undefined;
|
|
11
|
+
//# sourceMappingURL=get-or-create-anonymous-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-or-create-anonymous-id.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/get-or-create-anonymous-id.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,eAAO,MAAM,gCAAgC,oBAAoB,CAAC;AAalE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,SAAS,CAe3D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a failed resolve response should be retried through the plain GET of
|
|
3
|
+
* `fallbackPublishedKey`. Only server-side failures (5xx) qualify: a 4xx means
|
|
4
|
+
* the request itself is wrong (bad token, unknown ruleset, environment
|
|
5
|
+
* mismatch), and a fallback widget would just mask that.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isWidgetResolveFallbackStatus(status: number): boolean;
|
|
8
|
+
//# sourceMappingURL=is-widget-resolve-fallback-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-widget-resolve-fallback-status.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/is-widget-resolve-fallback-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NormalizedWidgetResolveResult } from './types';
|
|
2
|
+
export interface NormalizeWidgetResolveResponseParams {
|
|
3
|
+
token: string;
|
|
4
|
+
/** As passed by the caller; echoed on the dev selection, which has no envelope of its own. */
|
|
5
|
+
rulesetPublishedKey: string;
|
|
6
|
+
/** Parsed JSON body of a 2xx resolve response. */
|
|
7
|
+
body: unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reduces either resolve response shape to the existing widget payload plus a
|
|
11
|
+
* `selection`. Published: `{ success, data: { …payload, selection } }`.
|
|
12
|
+
* Draft (`dev.` token): unwrapped `{ resolution, widget, childCollections, …css }`.
|
|
13
|
+
* Returns `null` when the body is not a successful resolve.
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeWidgetResolveResponse({ token, rulesetPublishedKey, body, }: NormalizeWidgetResolveResponseParams): NormalizedWidgetResolveResult | null;
|
|
16
|
+
//# sourceMappingURL=normalize-widget-resolve-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-widget-resolve-response.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/normalize-widget-resolve-response.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,6BAA6B,EAG9B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,oCAAoC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kDAAkD;IAClD,IAAI,EAAE,OAAO,CAAC;CACf;AA+BD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,KAAK,EACL,mBAAmB,EACnB,IAAI,GACL,EAAE,oCAAoC,GAAG,6BAA6B,GAAG,IAAI,CAI7E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `JSON.stringify` with object keys sorted at every depth, so two objects with
|
|
3
|
+
* the same values serialize identically regardless of insertion order. Used as
|
|
4
|
+
* the effect dependency for resolve `params`: a fresh `{ b, a }` on every render
|
|
5
|
+
* must not trigger a refetch when `{ a, b }` was already sent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function stableJsonStringify(value: unknown): string | undefined;
|
|
8
|
+
//# sourceMappingURL=stable-json-stringify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stable-json-stringify.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/stable-json-stringify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWtE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The draft resolve route wants the bare `ruleset-…` key. Callers may hand us
|
|
3
|
+
* a published key (`{environmentId}---ruleset-…`) out of habit; strip the
|
|
4
|
+
* environment prefix so both spellings work with a `dev.` token.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toRulesetKey(rulesetPublishedKey: string): string;
|
|
7
|
+
//# sourceMappingURL=to-ruleset-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-ruleset-key.d.ts","sourceRoot":"","sources":["../../../../src/lib/widget/widget-selection/to-ruleset-key.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAKhE"}
|