@rulecms/widget-angular 0.7.0 → 0.8.1
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 +570 -88
- 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/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 +13 -1
- package/lib/project-css-classes/format-project-css-classes-stylesheet.d.ts.map +1 -1
- package/lib/project-css-properties/format-project-css-properties-stylesheet.d.ts.map +1 -1
- 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/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 +6 -0
- 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
|
@@ -1,23 +1,58 @@
|
|
|
1
1
|
import { RuleCMSWidgetData } from '../widget/widget-data.types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import type { WidgetResolveRequestOptions } from '../widget/widget-selection/types';
|
|
3
|
+
/**
|
|
4
|
+
* How long a published-token GET stays in the in-process cache when the caller
|
|
5
|
+
* sets no cache policy. Angular has no Next.js `next.revalidate`; this is the
|
|
6
|
+
* same 60-second default `@rulecms/widget-react` applies on the server.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_PUBLISHED_WIDGET_CACHE_MS = 60000;
|
|
9
|
+
interface FetchRuleCMSWidgetBaseParams {
|
|
8
10
|
token: string;
|
|
9
11
|
/**
|
|
10
12
|
* Optional API origin override. Omit in apps — defaults to rulecms.com for
|
|
11
13
|
* `dev.` tokens and widget-cache for published tokens.
|
|
12
14
|
*/
|
|
13
15
|
endpoint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Pass-through to `fetch`. Published-token GETs are cached in-process for
|
|
18
|
+
* 60 seconds unless `cache` is `no-store`, `reload`, or `no-cache`. `dev.`
|
|
19
|
+
* tokens always use `cache: 'no-store'` and are never cached here. A
|
|
20
|
+
* `rulesetPublishedKey` resolve is a POST and is never cached.
|
|
21
|
+
*/
|
|
14
22
|
fetchOptions?: RequestInit;
|
|
15
23
|
}
|
|
24
|
+
/** Fetch one widget by key through the plain GET path. */
|
|
25
|
+
export interface FetchRuleCMSWidgetPublishedKeyParams extends FetchRuleCMSWidgetBaseParams {
|
|
26
|
+
/**
|
|
27
|
+
* Published key for staging/production tokens, or the live widget key when
|
|
28
|
+
* using a `dev.`-prefixed Development token.
|
|
29
|
+
*/
|
|
30
|
+
publishedKey: string;
|
|
31
|
+
rulesetPublishedKey?: never;
|
|
32
|
+
params?: never;
|
|
33
|
+
fallbackPublishedKey?: never;
|
|
34
|
+
contentType?: never;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Let a published ruleset pick the widget from `params` (POST resolve). The
|
|
38
|
+
* server never invents an anonymous id — pass `params.anonId` yourself when
|
|
39
|
+
* experiments should bucket a known visitor.
|
|
40
|
+
*/
|
|
41
|
+
export interface FetchRuleCMSWidgetRulesetParams extends FetchRuleCMSWidgetBaseParams, WidgetResolveRequestOptions {
|
|
42
|
+
publishedKey?: never;
|
|
43
|
+
}
|
|
44
|
+
export type FetchRuleCMSWidgetParams = FetchRuleCMSWidgetPublishedKeyParams | FetchRuleCMSWidgetRulesetParams;
|
|
16
45
|
export declare class FetchRuleCMSWidgetError extends Error {
|
|
17
46
|
readonly status?: number;
|
|
18
47
|
constructor(message: string, status?: number);
|
|
19
48
|
}
|
|
20
|
-
/**
|
|
49
|
+
/** Drops the in-process published-widget cache. Tests call this between cases. */
|
|
50
|
+
export declare function clearPublishedWidgetFetchCache(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Fetch widget JSON on the server (or at build time) and return render-ready
|
|
53
|
+
* data. Pass `publishedKey` for one widget, or `rulesetPublishedKey` + `params`
|
|
54
|
+
* to let a ruleset choose (the result then carries `selection`).
|
|
55
|
+
*/
|
|
21
56
|
export declare function fetchRuleCMSWidget(params: FetchRuleCMSWidgetParams): Promise<RuleCMSWidgetData>;
|
|
22
57
|
export type { RuleCMSWidgetData };
|
|
23
58
|
//# sourceMappingURL=fetch-rule-cms-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-rule-cms-widget.d.ts","sourceRoot":"","sources":["../../../src/lib/fetch/fetch-rule-cms-widget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-rule-cms-widget.d.ts","sourceRoot":"","sources":["../../../src/lib/fetch/fetch-rule-cms-widget.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAKpF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAExD,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED,0DAA0D;AAC1D,MAAM,WAAW,oCAAqC,SAAQ,4BAA4B;IACxF;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BACf,SAAQ,4BAA4B,EAClC,2BAA2B;IAC7B,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,MAAM,MAAM,wBAAwB,GAChC,oCAAoC,GACpC,+BAA+B,CAAC;AAEpC,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAK7C;AAMD,kFAAkF;AAClF,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAoHD;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAsB5B;AAED,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/helpers/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type { WidgetContainerStyles } from './resolve-widget-container-styles';
|
|
|
36
36
|
export { DEFAULT_BASE_Z_INDEX, Z_INDEX_WIDGET_ATTRIBUTE_NAME, buildOverlayLayerBoxStyles, buildOverlayStackStyles, getOverlayLayerZIndex, hasOverlayLayers, isOverlayLayerEmptyForDevice, resolveBaseZIndex, resolveOverlayLayerPointerEvents, } from './resolve-overlay-layers';
|
|
37
37
|
export { CSS_CLASSES_ATTRIBUTE_NAME, normalizeCssClasses } from './css-classes';
|
|
38
38
|
export { COMPONENT_PROPS_PATH_SEPARATOR, resolveWidgetInstanceProps, } from './resolve-widget-instance-props';
|
|
39
|
+
export { WIDGET_PLACEHOLDER_VALUES_KEY, withWidgetPlaceholderValues, } from './with-widget-placeholder-values';
|
|
39
40
|
export { collectComponentInstancePaths } from './collect-component-instance-paths';
|
|
40
41
|
export { findUnmatchedComponentPropsKeys, warnUnmatchedComponentProps, } from './warn-unmatched-component-props';
|
|
41
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAA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,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WidgetInstanceProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The one key copied from `rulecms-widget`'s `placeholderValues` onto a card.
|
|
4
|
+
* Must stay the key `r-text` reads (`PLACEHOLDER_VALUES_PROP` in
|
|
5
|
+
* `@rulecms/source-components-angular`). The renderer copies the value and does
|
|
6
|
+
* not look inside it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WIDGET_PLACEHOLDER_VALUES_KEY = "placeholderValues";
|
|
9
|
+
/**
|
|
10
|
+
* Widget-wide placeholder values for one component instance.
|
|
11
|
+
*
|
|
12
|
+
* When the host passed `placeholderValues` on `rulecms-widget`, every instance
|
|
13
|
+
* receives that object unless its own `componentProps` entry already has the
|
|
14
|
+
* key. An entry that sets the key wins even when the value is `null` or
|
|
15
|
+
* otherwise unusable: that is how one Text opts out. Other keys on the entry,
|
|
16
|
+
* such as `onClick`, stay. The host's entry is not mutated.
|
|
17
|
+
*
|
|
18
|
+
* `undefined` means the widget input was omitted, which is the common case and
|
|
19
|
+
* must not invent a bag.
|
|
20
|
+
*/
|
|
21
|
+
export declare function withWidgetPlaceholderValues({ widgetInstanceProps, placeholderValues, }: {
|
|
22
|
+
widgetInstanceProps?: WidgetInstanceProps;
|
|
23
|
+
placeholderValues?: unknown;
|
|
24
|
+
}): WidgetInstanceProps | undefined;
|
|
25
|
+
//# sourceMappingURL=with-widget-placeholder-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-widget-placeholder-values.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/with-widget-placeholder-values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,sBAAsB,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,mBAAmB,EACnB,iBAAiB,GAClB,EAAE;IACD,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,mBAAmB,GAAG,SAAS,CAgBlC"}
|
|
@@ -8,6 +8,10 @@ export declare const WIDGET_CACHE_API_ORIGIN = "https://widget-cache.rulecms.com
|
|
|
8
8
|
export declare const PUBLISHED_WIDGET_API_PATH = "/api/v1/c/widget/get";
|
|
9
9
|
/** Live draft client API path — no cache; reads the widget table directly. */
|
|
10
10
|
export declare const DEV_WIDGET_API_PATH = "/api/v1/c/dev/widget/get";
|
|
11
|
+
/** Published ruleset resolve path (POST) — picks a widget by params, returns its payload. */
|
|
12
|
+
export declare const PUBLISHED_WIDGET_RESOLVE_API_PATH = "/api/v1/c/widget/resolve";
|
|
13
|
+
/** Live draft ruleset resolve path (POST) — compiles the draft ruleset in-process. */
|
|
14
|
+
export declare const DEV_WIDGET_RESOLVE_API_PATH = "/api/v1/c/dev/widget/resolve";
|
|
11
15
|
export declare function isDevClientToken(token: string | null | undefined): boolean;
|
|
12
16
|
/**
|
|
13
17
|
* Resolves the API origin. Consumers should not need to set `endpoint` —
|
|
@@ -30,4 +34,15 @@ export interface BuildWidgetFetchUrlParams {
|
|
|
30
34
|
* draft endpoint with `widgetKey`; everything else uses the published API.
|
|
31
35
|
*/
|
|
32
36
|
export declare function buildWidgetFetchUrl({ publishedKey, token, endpoint, }: BuildWidgetFetchUrlParams): string;
|
|
37
|
+
export interface BuildWidgetResolveUrlParams {
|
|
38
|
+
token: string;
|
|
39
|
+
/** Optional override. Defaults by token: rulecms.com (dev) or widget-cache (published). */
|
|
40
|
+
endpoint?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Builds the ruleset resolve URL. The token, ruleset key and params travel in
|
|
44
|
+
* the POST body, so the URL carries no query string. Development tokens
|
|
45
|
+
* (`dev.…`) hit the draft resolve route; everything else uses the published one.
|
|
46
|
+
*/
|
|
47
|
+
export declare function buildWidgetResolveUrl({ token, endpoint, }: BuildWidgetResolveUrlParams): string;
|
|
33
48
|
//# sourceMappingURL=dev-client-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-client-token.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/dev-client-token.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAE9C,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAExD,mCAAmC;AACnC,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAE1E,0CAA0C;AAC1C,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC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ACT,EAAE,yBAAyB,GAAG,MAAM,CAQpC;AAED,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,QAAQ,GACT,EAAE,2BAA2B,GAAG,MAAM,CAKtC"}
|
|
@@ -35,6 +35,13 @@ export interface LibraryCardInputs {
|
|
|
35
35
|
};
|
|
36
36
|
className?: string;
|
|
37
37
|
widgetInstanceProps?: WidgetInstanceProps;
|
|
38
|
+
/**
|
|
39
|
+
* This instance's column path — enclosing collection columns first, its own
|
|
40
|
+
* column id last, joined with `/`. `r-button` emits it as
|
|
41
|
+
* `data-rulecms-column-path`. Absent in the composer and from releases that
|
|
42
|
+
* predate it.
|
|
43
|
+
*/
|
|
44
|
+
columnPath?: string;
|
|
38
45
|
/**
|
|
39
46
|
* Host-supplied map of mount name → Angular component. Only `r-mount`
|
|
40
47
|
* reads this. Absent in the composer, and absent whenever the host
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/library-registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,8BAA8B,CAAC;CAC/C,CAAC;AAEF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AsB,GACtB;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,CAAC,MAAM,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAEzE,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAClD,UAAU,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,MAAM,EAAE,sBAAsB,GAAG,sBAAsB,GAAG,IAAI,CAAC;IAC3E,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAC1E"}
|
|
@@ -12,11 +12,23 @@ export declare const wrapProjectCssClassesStylesheetInLayer: (css: string | null
|
|
|
12
12
|
* `[data-rulecms-published-key="…"]`. `CSS.escape` is not assumed (SSR / Node).
|
|
13
13
|
*/
|
|
14
14
|
export declare const escapeCssAttributeValue: (value: string) => string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Escape a class name for use after `.` in a selector. `/` becomes `\/` so
|
|
17
|
+
* `ring-parity-accent/30` emits as `.ring-parity-accent\/30`.
|
|
18
|
+
*
|
|
19
|
+
* A CSS identifier may not *start* with a digit, or with a hyphen followed by a
|
|
20
|
+
* digit, so a leading digit needs the numeric escape form instead of a
|
|
21
|
+
* backslash: `2xl:flex` has to emit `.\32 xl\:flex`, because `.2xl\:flex` is a
|
|
22
|
+
* parse error and the browser drops the whole rule. Tailwind breakpoint
|
|
23
|
+
* prefixes (`2xl:`) and grid utilities kept in class names hit this.
|
|
24
|
+
*/
|
|
16
25
|
export declare const escapeCssClassName: (name: string) => string;
|
|
17
26
|
/**
|
|
18
27
|
* Descendant class rules under this widget’s published-key span.
|
|
19
28
|
* Empty / flag-off / unsanitary catalogs return null so the caller omits `<style>`.
|
|
29
|
+
*
|
|
30
|
+
* Rules are emitted in catalog order. Two utilities that set the same property
|
|
31
|
+
* are resolved by source order, so re-sorting here would change which one wins.
|
|
20
32
|
*/
|
|
21
33
|
export declare const formatProjectCssClassesStylesheet: (publishedKey: string, classes: ProjectCssClassDefinitions | null | undefined, includeClassDefinitions?: boolean | null, classLayer?: ProjectCssClassLayer | null) => string | null;
|
|
22
34
|
export declare const formatProjectCssClassesStylesheetInLayer: (publishedKey: string, classes: ProjectCssClassDefinitions | null | undefined, classLayer: ProjectCssClassLayer | null | undefined, includeClassDefinitions?: boolean | null) => string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-project-css-classes-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-classes/format-project-css-classes-stylesheet.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB,sCAAuC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI7E,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,KAAK,IAAI,oBACR,CAAC;AAQ1D;;;GAGG;AACH,eAAO,MAAM,sCAAsC,QAC5C,MAAM,GAAG,IAAI,eACL,oBAAoB,GAAG,IAAI,KACvC,MAAM,GAAG,IAQX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,UAAW,MAAM,KAAG,MACL,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"format-project-css-classes-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-classes/format-project-css-classes-stylesheet.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB,sCAAuC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI7E,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,KAAK,IAAI,oBACR,CAAC;AAQ1D;;;GAGG;AACH,eAAO,MAAM,sCAAsC,QAC5C,MAAM,GAAG,IAAI,eACL,oBAAoB,GAAG,IAAI,KACvC,MAAM,GAAG,IAQX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,UAAW,MAAM,KAAG,MACL,CAAC;AAEpD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,MASjD,CAAC;AAuEF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,iBAC9B,MAAM,WACX,0BAA0B,GAAG,IAAI,GAAG,SAAS,4BAC5B,OAAO,GAAG,IAAI,eAC3B,oBAAoB,GAAG,IAAI,KACvC,MAAM,GAAG,IAoBX,CAAC;AAEF,eAAO,MAAM,wCAAwC,iBACrC,MAAM,WACX,0BAA0B,GAAG,IAAI,GAAG,SAAS,cAC1C,oBAAoB,GAAG,IAAI,GAAG,SAAS,4BACzB,OAAO,GAAG,IAAI,KACvC,MAAM,GAAG,IACmF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-project-css-properties-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-properties/format-project-css-properties-stylesheet.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kCAAkC,wKAYrC,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3F,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"format-project-css-properties-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/lib/project-css-properties/format-project-css-properties-stylesheet.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kCAAkC,wKAYrC,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3F,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA4BF,eAAO,MAAM,4BAA4B,kBACxB,SAAS,4BAA4B,EAAE,GAAG,IAAI,GAAG,SAAS,KACxE,4BAA4B,EAoC9B,CAAC;AAeF;;;GAGG;AACH,eAAO,MAAM,oCAAoC,iBACjC,MAAM,iBACL,SAAS,4BAA4B,EAAE,GAAG,IAAI,GAAG,SAAS,yBAClD,OAAO,GAAG,IAAI,KACpC,MAAM,GAAG,IAaX,CAAC"}
|
|
@@ -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,SAAS,EACT,iBAAiB,EAEjB,kBAAkB,EAClB,KAAK,EAEL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;;AAKjD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACnC,CAAC;AAEF,qBA8Fa,8BAA8B;IACd,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;IACjC,iBAAiB,EAAG,MAAM,OAAO,kBAAkB,CAAC;IACtE,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtC,IAAI,UAAU,4EAEb;IAED,IAAI,WAAW,IAAI,OAAO,CASzB;IAED,IAAI,WAAW,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAiBxC;IAED,IAAI,iBAAiB,IAAI,gBAAgB,EAAE,CAwB1C;IAED,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO;IAoBnD,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG;QAClC,mBAAmB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;QAC7C,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,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,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;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,2BAA2B,EAAE,MAAM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jE,QAAQ,CAAC,qBAAqB,yBAAyB;IACvD,QAAQ,CAAC,qBAAqB,yBAAyB;IACvD,QAAQ,CAAC,YAAY,yBAAgB;IACrC,QAAQ,CAAC,mBAAmB,yBAAuB;IACnD,QAAQ,CAAC,eAAe,yBAAmB;IAC3C,QAAQ,CAAC,iBAAiB,yBAAqB;IAE/C,OAAO,UAAQ;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAC9C,sBAAsB,EAAE,sBAAsB,GAAG,IAAI,CAAQ;IAC7D,qBAAqB,UAAS;IAC9B,SAAS,EAAE,eAAe,GAAG,IAAI,CAAQ;IACzC,oFAAoF;IACpF,oBAAoB,SAAM;IAE1B,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,eAAe,CAAK;gBAGG,OAAO,EAAE,2BAA2B,GAAG,IAAI,EACrB,YAAY,EAAE,YAAY,GAAG,IAAI;IAGtF,IAAI,OAAO,IAAI,sBAAsB,CAEpC;IAED,uFAAuF;IACvF,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED,QAAQ,IAAI,IAAI;IAIhB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAI1C,WAAW,IAAI,IAAI;IAInB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,gBAAgB;IAgCxB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,WAAW;IA4JnB,OAAO,CAAC,mBAAmB;yCAlUhB,sBAAsB;2CAAtB,sBAAsB;CA+UlC"}
|
|
@@ -90,6 +90,12 @@ export interface RuleCMSWidgetData {
|
|
|
90
90
|
* `includePositionTry` on the raw GET is `false`.
|
|
91
91
|
*/
|
|
92
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;
|
|
93
99
|
}
|
|
94
100
|
export interface RuleCMSWidgetRawData {
|
|
95
101
|
widget: WidgetData;
|
|
@@ -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,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,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,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,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,KAAK,CAAC;IACvB,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IACvD;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;;OAIG;IACH,YAAY,CAAC,EAAE,6BAA6B,CAAC;IAC7C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;IAC9C;;;OAGG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,6BAA6B,CAAC;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C;;;OAGG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,gCAAgC,CAAC;
|
|
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,C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AAC,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
|