@uniformdev/canvas 20.7.1-alpha.4 → 20.7.1-alpha.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +76 -102
- package/dist/index.d.ts +76 -102
- package/dist/index.esm.js +30 -23
- package/dist/index.js +33 -23
- package/dist/index.mjs +30 -23
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@uniformdev/context/api';
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
|
-
import { AssetGetResponseSingle, AssetDefinitionType } from '@uniformdev/assets';
|
4
|
-
|
3
|
+
import { AssetGetResponseSingle, AssetDefinitionType, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
|
+
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
5
|
+
import { Quirks, StorageCommands, PersonalizedVariant, VariationMatchMetadata, TestVariant } from '@uniformdev/context';
|
5
6
|
import { Options as Options$1 } from 'p-retry';
|
6
7
|
import { Options } from 'p-throttle';
|
7
8
|
import { RichTextBuiltInFormat as RichTextBuiltInFormat$1, RichTextBuiltInElement as RichTextBuiltInElement$1, ParameterRichTextValue } from '@uniformdev/richtext';
|
@@ -552,7 +553,7 @@ interface components$n {
|
|
552
553
|
categoryId?: string | null;
|
553
554
|
/** @description Description of the component definition */
|
554
555
|
description?: string;
|
555
|
-
/** @description
|
556
|
+
/** @description Preview image URL for the component definition (shown in the UI) */
|
556
557
|
previewImageUrl?: string;
|
557
558
|
/**
|
558
559
|
* @description if this component uses team permissions or custom permissions
|
@@ -777,7 +778,7 @@ interface components$m {
|
|
777
778
|
categoryId?: string | null;
|
778
779
|
/** @description Description of the component definition */
|
779
780
|
description?: string;
|
780
|
-
/** @description
|
781
|
+
/** @description Preview image URL for the component definition (shown in the UI) */
|
781
782
|
previewImageUrl?: string;
|
782
783
|
/**
|
783
784
|
* @description if this component uses team permissions or custom permissions
|
@@ -850,6 +851,27 @@ interface components$m {
|
|
850
851
|
* @description ID of the workflow that instances of this content type will use by default. When not set, no workflow is attached
|
851
852
|
*/
|
852
853
|
workflowId?: string;
|
854
|
+
/** @description Configurations for previewing an entry on a consuming pattern or composition. */
|
855
|
+
previewConfigurations?: components$m["schemas"]["ContentTypePreviewConfiguration"][];
|
856
|
+
};
|
857
|
+
/** @description Defines a configuration for previewing an entry on a consuming pattern or composition. */
|
858
|
+
ContentTypePreviewConfiguration: {
|
859
|
+
/**
|
860
|
+
* @description The type of preview configuration
|
861
|
+
* @enum {string}
|
862
|
+
*/
|
863
|
+
type: "pattern" | "project-map";
|
864
|
+
/** @description Display label for the preview configuration */
|
865
|
+
label: string;
|
866
|
+
/**
|
867
|
+
* Format: uuid
|
868
|
+
* @description Target preview entity ID (project map node ID or pattern ID)
|
869
|
+
*/
|
870
|
+
id: string;
|
871
|
+
/** @description Optional mapping of dynamic input names to their values */
|
872
|
+
dynamicInputs?: {
|
873
|
+
[key: string]: string;
|
874
|
+
};
|
853
875
|
};
|
854
876
|
/** @description Defines an editable parameter on a component */
|
855
877
|
ComponentParameter: {
|
@@ -1781,8 +1803,14 @@ declare const CANVAS_DRAFT_STATE = 0;
|
|
1781
1803
|
declare const CANVAS_PUBLISHED_STATE = 64;
|
1782
1804
|
/** Constant for editor composition state. */
|
1783
1805
|
declare const CANVAS_EDITOR_STATE = 63;
|
1784
|
-
/** Public ID of the Uniform Context personalization parameter on Canvas components */
|
1806
|
+
/** Public ID of the Uniform Context personalization criteria parameter on Canvas components */
|
1785
1807
|
declare const CANVAS_PERSONALIZATION_PARAM = "$pzCrit";
|
1808
|
+
/** Public ID of the Uniform Context personalization component's event name parameter */
|
1809
|
+
declare const CANVAS_PERSONALIZATION_EVENT_NAME_PARAM = "trackingEventName";
|
1810
|
+
/** Public ID of the Uniform Context personalization component's algorithm parameter */
|
1811
|
+
declare const CANVAS_PERSONALIZATION_ALGORITHM_PARAM = "algorithm";
|
1812
|
+
/** Public ID of the Uniform Context personalization component's number of variants to show parameter */
|
1813
|
+
declare const CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
|
1786
1814
|
/** Public ID of the Uniform Context test variant parameter on Canvas components */
|
1787
1815
|
declare const CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
|
1788
1816
|
/** Public ID of the Uniform Context enrichment tag parameter on Canvas components */
|
@@ -2763,6 +2791,25 @@ interface components$j {
|
|
2763
2791
|
/** @description State of the component that this permission applies to */
|
2764
2792
|
state: number;
|
2765
2793
|
};
|
2794
|
+
/** @description Defines a configuration for previewing an entry on a consuming pattern or composition. */
|
2795
|
+
ContentTypePreviewConfiguration: {
|
2796
|
+
/**
|
2797
|
+
* @description The type of preview configuration
|
2798
|
+
* @enum {string}
|
2799
|
+
*/
|
2800
|
+
type: "pattern" | "project-map";
|
2801
|
+
/** @description Display label for the preview configuration */
|
2802
|
+
label: string;
|
2803
|
+
/**
|
2804
|
+
* Format: uuid
|
2805
|
+
* @description Target preview entity ID (project map node ID or pattern ID)
|
2806
|
+
*/
|
2807
|
+
id: string;
|
2808
|
+
/** @description Optional mapping of dynamic input names to their values */
|
2809
|
+
dynamicInputs?: {
|
2810
|
+
[key: string]: string;
|
2811
|
+
};
|
2812
|
+
};
|
2766
2813
|
/** @description Defines a content type */
|
2767
2814
|
ContentType: {
|
2768
2815
|
id: components$j["schemas"]["PublicIdProperty"];
|
@@ -2810,6 +2857,8 @@ interface components$j {
|
|
2810
2857
|
* @description ID of the workflow that instances of this content type will use by default. When not set, no workflow is attached
|
2811
2858
|
*/
|
2812
2859
|
workflowId?: string;
|
2860
|
+
/** @description Configurations for previewing an entry on a consuming pattern or composition. */
|
2861
|
+
previewConfigurations?: components$j["schemas"]["ContentTypePreviewConfiguration"][];
|
2813
2862
|
};
|
2814
2863
|
Error: {
|
2815
2864
|
/** @description Error message(s) that occurred while processing the request */
|
@@ -4100,6 +4149,7 @@ interface components$h {
|
|
4100
4149
|
|
4101
4150
|
type HistoryApi$1 = paths$f['/api/v1/entries-history'];
|
4102
4151
|
type ContentType = components$m['schemas']['ContentType'];
|
4152
|
+
type ContentTypePreviewConfiguration = components$m['schemas']['ContentTypePreviewConfiguration'];
|
4103
4153
|
type ContentTypeField = Exclude<ContentType['fields'], undefined>[number];
|
4104
4154
|
type GetContentTypesOptions = paths$h['/api/v1/content-types']['get']['parameters']['query'];
|
4105
4155
|
type DeleteContentTypeOptions = paths$h['/api/v1/content-types']['delete']['requestBody']['content']['application/json'];
|
@@ -7457,6 +7507,8 @@ interface components$8 {
|
|
7457
7507
|
retryCount: number;
|
7458
7508
|
retryDelay: number;
|
7459
7509
|
sourceCache?: string;
|
7510
|
+
/** @description Array of status codes for corresponding retries; will be empty for cache hits, Uniform Content data resources and static JSON data resources */
|
7511
|
+
statusCodes: number[];
|
7460
7512
|
};
|
7461
7513
|
data: unknown;
|
7462
7514
|
};
|
@@ -7491,6 +7543,7 @@ interface components$8 {
|
|
7491
7543
|
};
|
7492
7544
|
};
|
7493
7545
|
DataResolutionIssue: {
|
7546
|
+
componentId?: string;
|
7494
7547
|
componentPath?: string;
|
7495
7548
|
componentType?: string;
|
7496
7549
|
message: string;
|
@@ -8369,8 +8422,8 @@ interface components$8 {
|
|
8369
8422
|
};
|
8370
8423
|
};
|
8371
8424
|
parameters: {
|
8372
|
-
/** @description Enables additional diagnostics that will be attached to the response */
|
8373
|
-
diagnostics:
|
8425
|
+
/** @description Enables additional diagnostics that will be attached to the response; set to "no-data" to skip data resource values while keeping metrics */
|
8426
|
+
diagnostics: "true" | "false" | "no-data";
|
8374
8427
|
/** @description Controls how many levels deep content references should be resolved */
|
8375
8428
|
resolutionDepth: number;
|
8376
8429
|
/** @description Max number of records to return */
|
@@ -9682,9 +9735,10 @@ type DataResolutionOptionPositive = {
|
|
9682
9735
|
type DataResolutionParameters = {
|
9683
9736
|
/**
|
9684
9737
|
* Adds additional diagnostics about edge request processing to the response (`diagnostics`).
|
9685
|
-
*
|
9738
|
+
* Only use when diagnosing performance issues, don't use for serving production traffic.
|
9739
|
+
* Setting to `true` will include all resolved data which may be big. Use `"no-data"` to skip data.
|
9686
9740
|
*/
|
9687
|
-
diagnostics?: boolean;
|
9741
|
+
diagnostics?: boolean | 'no-data';
|
9688
9742
|
/**
|
9689
9743
|
* Controls how many levels deep content references should be resolved.
|
9690
9744
|
*/
|
@@ -10006,81 +10060,6 @@ type schemas = components$8['schemas'];
|
|
10006
10060
|
type InvalidationPayload = schemas['InvalidationPayload'];
|
10007
10061
|
type BatchInvalidationPayload = schemas['BatchInvalidationPayload'];
|
10008
10062
|
|
10009
|
-
type AssetParamValue = AssetParamValueItem[];
|
10010
|
-
type AssetParamValueItem = {
|
10011
|
-
type: string;
|
10012
|
-
_id: string;
|
10013
|
-
/**
|
10014
|
-
* Internal Uniform source ID or
|
10015
|
-
* dataType ID of the global integration library
|
10016
|
-
* which created this asset item
|
10017
|
-
*/
|
10018
|
-
_source?: string;
|
10019
|
-
fields: {
|
10020
|
-
url: {
|
10021
|
-
type: 'text';
|
10022
|
-
value: string;
|
10023
|
-
};
|
10024
|
-
id?: {
|
10025
|
-
type: 'text';
|
10026
|
-
value: string | undefined;
|
10027
|
-
};
|
10028
|
-
title?: {
|
10029
|
-
type: 'text';
|
10030
|
-
value: string | undefined;
|
10031
|
-
};
|
10032
|
-
description?: {
|
10033
|
-
type: 'text';
|
10034
|
-
value: string | undefined;
|
10035
|
-
};
|
10036
|
-
mediaType?: {
|
10037
|
-
type: 'text';
|
10038
|
-
value: string | undefined;
|
10039
|
-
};
|
10040
|
-
/**
|
10041
|
-
* The width of the original asset
|
10042
|
-
*
|
10043
|
-
* Should resolve to a number but might
|
10044
|
-
* be a string with a pointer reference
|
10045
|
-
*/
|
10046
|
-
width?: {
|
10047
|
-
type: 'number';
|
10048
|
-
value: number | string | undefined;
|
10049
|
-
};
|
10050
|
-
/**
|
10051
|
-
* The height of the original asset
|
10052
|
-
*
|
10053
|
-
* Should resolve to a number but might
|
10054
|
-
* be a string with a pointer reference
|
10055
|
-
*/
|
10056
|
-
height?: {
|
10057
|
-
type: 'number';
|
10058
|
-
value: number | string | undefined;
|
10059
|
-
};
|
10060
|
-
/**
|
10061
|
-
* The size in bytes of the original asset
|
10062
|
-
*
|
10063
|
-
* Should resolve to a number but might
|
10064
|
-
* be a string with a pointer reference
|
10065
|
-
*/
|
10066
|
-
size?: {
|
10067
|
-
type: 'number';
|
10068
|
-
value: number | string | undefined;
|
10069
|
-
};
|
10070
|
-
/**
|
10071
|
-
* Any key/value properties which the source
|
10072
|
-
* wants to attach to the asset data
|
10073
|
-
*/
|
10074
|
-
custom?: {
|
10075
|
-
type: string;
|
10076
|
-
value: Record<string, unknown>;
|
10077
|
-
};
|
10078
|
-
};
|
10079
|
-
_overrides?: {
|
10080
|
-
fields: ComponentOverride['parameters'];
|
10081
|
-
};
|
10082
|
-
};
|
10083
|
-
|
10084
10063
|
type LinkParameterType = 'projectMapNode' | 'url' | 'tel' | 'email';
|
10085
10064
|
type LinkTypeConfiguration = Partial<Record<LinkParameterType, boolean>>;
|
10086
10065
|
type LinkParamConfiguration = {
|
@@ -10126,10 +10105,7 @@ interface paths$6 {
|
|
10126
10105
|
path?: never;
|
10127
10106
|
cookie?: never;
|
10128
10107
|
};
|
10129
|
-
/**
|
10130
|
-
* @deprecated
|
10131
|
-
* @description Gets all preview URLs
|
10132
|
-
*/
|
10108
|
+
/** @description Gets all preview URLs */
|
10133
10109
|
get: {
|
10134
10110
|
parameters: {
|
10135
10111
|
query: {
|
@@ -10174,10 +10150,7 @@ interface paths$6 {
|
|
10174
10150
|
500: components$6["responses"]["InternalServerError"];
|
10175
10151
|
};
|
10176
10152
|
};
|
10177
|
-
/**
|
10178
|
-
* @deprecated
|
10179
|
-
* @description Upserts a preview URL
|
10180
|
-
*/
|
10153
|
+
/** @description Upserts a preview URL */
|
10181
10154
|
put: {
|
10182
10155
|
parameters: {
|
10183
10156
|
query?: never;
|
@@ -10239,10 +10212,7 @@ interface paths$6 {
|
|
10239
10212
|
};
|
10240
10213
|
};
|
10241
10214
|
post?: never;
|
10242
|
-
/**
|
10243
|
-
* @deprecated
|
10244
|
-
* @description Deletes a preview URL
|
10245
|
-
*/
|
10215
|
+
/** @description Deletes a preview URL */
|
10246
10216
|
delete: {
|
10247
10217
|
parameters: {
|
10248
10218
|
query?: never;
|
@@ -11573,7 +11543,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
|
11573
11543
|
filters?: CompositionFilters;
|
11574
11544
|
} & ({
|
11575
11545
|
resolveData: true;
|
11576
|
-
diagnostics
|
11546
|
+
diagnostics: DataResolutionParameters['diagnostics'];
|
11577
11547
|
} | {
|
11578
11548
|
resolveData?: false;
|
11579
11549
|
})): Promise<CompositionGetListResponse | CompositionResolvedListResponse>;
|
@@ -12127,13 +12097,19 @@ interface EvaluateNodeTreeVisibilityOptions extends Pick<EvaluateNodeVisibilityO
|
|
12127
12097
|
* When false, indeterminate criteria will fail the summary result, and the node will be hidden
|
12128
12098
|
*/
|
12129
12099
|
showIndeterminate?: boolean;
|
12100
|
+
/**
|
12101
|
+
* When evaluating visibility of a root node, this controls what happens when the node is found to be invisible.
|
12102
|
+
* When 'throw' (default), an error is thrown.
|
12103
|
+
* When 'ignore', the node is left intact. False is still returned.
|
12104
|
+
*/
|
12105
|
+
rootNodeInvisibleHandling?: 'throw' | 'ignore';
|
12130
12106
|
}
|
12131
12107
|
/**
|
12132
12108
|
* Function to call to evaluate visibility rules when traversing the node tree with walkNodeTree.
|
12133
12109
|
*
|
12134
12110
|
* If the function returns false, that means the current node is removed and you should stop any other code handling.
|
12135
12111
|
*/
|
12136
|
-
declare function evaluateWalkTreeNodeVisibility({ rules, showIndeterminate, context, }: EvaluateNodeTreeVisibilityOptions): boolean | undefined;
|
12112
|
+
declare function evaluateWalkTreeNodeVisibility({ rules, showIndeterminate, rootNodeInvisibleHandling, context, }: EvaluateNodeTreeVisibilityOptions): boolean | undefined;
|
12137
12113
|
|
12138
12114
|
interface EvaluateWalkTreePropertyCriteriaOptions extends Pick<EvaluatePropertyCriteriaOptions, 'rules' | 'keepIndeterminate'> {
|
12139
12115
|
node: ComponentInstance;
|
@@ -12423,8 +12399,6 @@ declare const createCanvasChannel: ({ listenTo, broadcastTo, }: {
|
|
12423
12399
|
|
12424
12400
|
/**
|
12425
12401
|
* API client to work with Uniform Project Preview entities
|
12426
|
-
*
|
12427
|
-
* @deprecated beta functionality subject to change
|
12428
12402
|
*/
|
12429
12403
|
declare class PreviewClient extends ApiClient {
|
12430
12404
|
constructor(options: ClientOptions);
|
@@ -12837,7 +12811,7 @@ declare const isSystemComponentDefinition: (componentType: string) => boolean;
|
|
12837
12811
|
* Converts components in a slot into personalized variations (based on each component's intent tag in Canvas) suitable to pass to a personalize component
|
12838
12812
|
* Useful when implementing custom personalization settings for Canvas components.
|
12839
12813
|
*/
|
12840
|
-
declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & PersonalizedVariant
|
12814
|
+
declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & PersonalizedVariant<VariationMatchMetadata>>;
|
12841
12815
|
|
12842
12816
|
/**
|
12843
12817
|
* Converts components in a slot into test variations (based on each component's Context tag in Canvas) suitable to pass to a personalize component
|
@@ -12995,4 +12969,4 @@ declare class WorkflowClient extends ApiClient {
|
|
12995
12969
|
|
12996
12970
|
declare const CanvasClientError: typeof ApiClientError;
|
12997
12971
|
|
12998
|
-
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type AssetParamValue, type AssetParamValueItem, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type ProjectMapLinkParamValue, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, walkNodeTree, walkPropertyValues };
|
12972
|
+
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type ProjectMapLinkParamValue, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, walkNodeTree, walkPropertyValues };
|
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@uniformdev/context/api';
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
|
-
import { AssetGetResponseSingle, AssetDefinitionType } from '@uniformdev/assets';
|
4
|
-
|
3
|
+
import { AssetGetResponseSingle, AssetDefinitionType, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
|
+
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
5
|
+
import { Quirks, StorageCommands, PersonalizedVariant, VariationMatchMetadata, TestVariant } from '@uniformdev/context';
|
5
6
|
import { Options as Options$1 } from 'p-retry';
|
6
7
|
import { Options } from 'p-throttle';
|
7
8
|
import { RichTextBuiltInFormat as RichTextBuiltInFormat$1, RichTextBuiltInElement as RichTextBuiltInElement$1, ParameterRichTextValue } from '@uniformdev/richtext';
|
@@ -552,7 +553,7 @@ interface components$n {
|
|
552
553
|
categoryId?: string | null;
|
553
554
|
/** @description Description of the component definition */
|
554
555
|
description?: string;
|
555
|
-
/** @description
|
556
|
+
/** @description Preview image URL for the component definition (shown in the UI) */
|
556
557
|
previewImageUrl?: string;
|
557
558
|
/**
|
558
559
|
* @description if this component uses team permissions or custom permissions
|
@@ -777,7 +778,7 @@ interface components$m {
|
|
777
778
|
categoryId?: string | null;
|
778
779
|
/** @description Description of the component definition */
|
779
780
|
description?: string;
|
780
|
-
/** @description
|
781
|
+
/** @description Preview image URL for the component definition (shown in the UI) */
|
781
782
|
previewImageUrl?: string;
|
782
783
|
/**
|
783
784
|
* @description if this component uses team permissions or custom permissions
|
@@ -850,6 +851,27 @@ interface components$m {
|
|
850
851
|
* @description ID of the workflow that instances of this content type will use by default. When not set, no workflow is attached
|
851
852
|
*/
|
852
853
|
workflowId?: string;
|
854
|
+
/** @description Configurations for previewing an entry on a consuming pattern or composition. */
|
855
|
+
previewConfigurations?: components$m["schemas"]["ContentTypePreviewConfiguration"][];
|
856
|
+
};
|
857
|
+
/** @description Defines a configuration for previewing an entry on a consuming pattern or composition. */
|
858
|
+
ContentTypePreviewConfiguration: {
|
859
|
+
/**
|
860
|
+
* @description The type of preview configuration
|
861
|
+
* @enum {string}
|
862
|
+
*/
|
863
|
+
type: "pattern" | "project-map";
|
864
|
+
/** @description Display label for the preview configuration */
|
865
|
+
label: string;
|
866
|
+
/**
|
867
|
+
* Format: uuid
|
868
|
+
* @description Target preview entity ID (project map node ID or pattern ID)
|
869
|
+
*/
|
870
|
+
id: string;
|
871
|
+
/** @description Optional mapping of dynamic input names to their values */
|
872
|
+
dynamicInputs?: {
|
873
|
+
[key: string]: string;
|
874
|
+
};
|
853
875
|
};
|
854
876
|
/** @description Defines an editable parameter on a component */
|
855
877
|
ComponentParameter: {
|
@@ -1781,8 +1803,14 @@ declare const CANVAS_DRAFT_STATE = 0;
|
|
1781
1803
|
declare const CANVAS_PUBLISHED_STATE = 64;
|
1782
1804
|
/** Constant for editor composition state. */
|
1783
1805
|
declare const CANVAS_EDITOR_STATE = 63;
|
1784
|
-
/** Public ID of the Uniform Context personalization parameter on Canvas components */
|
1806
|
+
/** Public ID of the Uniform Context personalization criteria parameter on Canvas components */
|
1785
1807
|
declare const CANVAS_PERSONALIZATION_PARAM = "$pzCrit";
|
1808
|
+
/** Public ID of the Uniform Context personalization component's event name parameter */
|
1809
|
+
declare const CANVAS_PERSONALIZATION_EVENT_NAME_PARAM = "trackingEventName";
|
1810
|
+
/** Public ID of the Uniform Context personalization component's algorithm parameter */
|
1811
|
+
declare const CANVAS_PERSONALIZATION_ALGORITHM_PARAM = "algorithm";
|
1812
|
+
/** Public ID of the Uniform Context personalization component's number of variants to show parameter */
|
1813
|
+
declare const CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
|
1786
1814
|
/** Public ID of the Uniform Context test variant parameter on Canvas components */
|
1787
1815
|
declare const CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
|
1788
1816
|
/** Public ID of the Uniform Context enrichment tag parameter on Canvas components */
|
@@ -2763,6 +2791,25 @@ interface components$j {
|
|
2763
2791
|
/** @description State of the component that this permission applies to */
|
2764
2792
|
state: number;
|
2765
2793
|
};
|
2794
|
+
/** @description Defines a configuration for previewing an entry on a consuming pattern or composition. */
|
2795
|
+
ContentTypePreviewConfiguration: {
|
2796
|
+
/**
|
2797
|
+
* @description The type of preview configuration
|
2798
|
+
* @enum {string}
|
2799
|
+
*/
|
2800
|
+
type: "pattern" | "project-map";
|
2801
|
+
/** @description Display label for the preview configuration */
|
2802
|
+
label: string;
|
2803
|
+
/**
|
2804
|
+
* Format: uuid
|
2805
|
+
* @description Target preview entity ID (project map node ID or pattern ID)
|
2806
|
+
*/
|
2807
|
+
id: string;
|
2808
|
+
/** @description Optional mapping of dynamic input names to their values */
|
2809
|
+
dynamicInputs?: {
|
2810
|
+
[key: string]: string;
|
2811
|
+
};
|
2812
|
+
};
|
2766
2813
|
/** @description Defines a content type */
|
2767
2814
|
ContentType: {
|
2768
2815
|
id: components$j["schemas"]["PublicIdProperty"];
|
@@ -2810,6 +2857,8 @@ interface components$j {
|
|
2810
2857
|
* @description ID of the workflow that instances of this content type will use by default. When not set, no workflow is attached
|
2811
2858
|
*/
|
2812
2859
|
workflowId?: string;
|
2860
|
+
/** @description Configurations for previewing an entry on a consuming pattern or composition. */
|
2861
|
+
previewConfigurations?: components$j["schemas"]["ContentTypePreviewConfiguration"][];
|
2813
2862
|
};
|
2814
2863
|
Error: {
|
2815
2864
|
/** @description Error message(s) that occurred while processing the request */
|
@@ -4100,6 +4149,7 @@ interface components$h {
|
|
4100
4149
|
|
4101
4150
|
type HistoryApi$1 = paths$f['/api/v1/entries-history'];
|
4102
4151
|
type ContentType = components$m['schemas']['ContentType'];
|
4152
|
+
type ContentTypePreviewConfiguration = components$m['schemas']['ContentTypePreviewConfiguration'];
|
4103
4153
|
type ContentTypeField = Exclude<ContentType['fields'], undefined>[number];
|
4104
4154
|
type GetContentTypesOptions = paths$h['/api/v1/content-types']['get']['parameters']['query'];
|
4105
4155
|
type DeleteContentTypeOptions = paths$h['/api/v1/content-types']['delete']['requestBody']['content']['application/json'];
|
@@ -7457,6 +7507,8 @@ interface components$8 {
|
|
7457
7507
|
retryCount: number;
|
7458
7508
|
retryDelay: number;
|
7459
7509
|
sourceCache?: string;
|
7510
|
+
/** @description Array of status codes for corresponding retries; will be empty for cache hits, Uniform Content data resources and static JSON data resources */
|
7511
|
+
statusCodes: number[];
|
7460
7512
|
};
|
7461
7513
|
data: unknown;
|
7462
7514
|
};
|
@@ -7491,6 +7543,7 @@ interface components$8 {
|
|
7491
7543
|
};
|
7492
7544
|
};
|
7493
7545
|
DataResolutionIssue: {
|
7546
|
+
componentId?: string;
|
7494
7547
|
componentPath?: string;
|
7495
7548
|
componentType?: string;
|
7496
7549
|
message: string;
|
@@ -8369,8 +8422,8 @@ interface components$8 {
|
|
8369
8422
|
};
|
8370
8423
|
};
|
8371
8424
|
parameters: {
|
8372
|
-
/** @description Enables additional diagnostics that will be attached to the response */
|
8373
|
-
diagnostics:
|
8425
|
+
/** @description Enables additional diagnostics that will be attached to the response; set to "no-data" to skip data resource values while keeping metrics */
|
8426
|
+
diagnostics: "true" | "false" | "no-data";
|
8374
8427
|
/** @description Controls how many levels deep content references should be resolved */
|
8375
8428
|
resolutionDepth: number;
|
8376
8429
|
/** @description Max number of records to return */
|
@@ -9682,9 +9735,10 @@ type DataResolutionOptionPositive = {
|
|
9682
9735
|
type DataResolutionParameters = {
|
9683
9736
|
/**
|
9684
9737
|
* Adds additional diagnostics about edge request processing to the response (`diagnostics`).
|
9685
|
-
*
|
9738
|
+
* Only use when diagnosing performance issues, don't use for serving production traffic.
|
9739
|
+
* Setting to `true` will include all resolved data which may be big. Use `"no-data"` to skip data.
|
9686
9740
|
*/
|
9687
|
-
diagnostics?: boolean;
|
9741
|
+
diagnostics?: boolean | 'no-data';
|
9688
9742
|
/**
|
9689
9743
|
* Controls how many levels deep content references should be resolved.
|
9690
9744
|
*/
|
@@ -10006,81 +10060,6 @@ type schemas = components$8['schemas'];
|
|
10006
10060
|
type InvalidationPayload = schemas['InvalidationPayload'];
|
10007
10061
|
type BatchInvalidationPayload = schemas['BatchInvalidationPayload'];
|
10008
10062
|
|
10009
|
-
type AssetParamValue = AssetParamValueItem[];
|
10010
|
-
type AssetParamValueItem = {
|
10011
|
-
type: string;
|
10012
|
-
_id: string;
|
10013
|
-
/**
|
10014
|
-
* Internal Uniform source ID or
|
10015
|
-
* dataType ID of the global integration library
|
10016
|
-
* which created this asset item
|
10017
|
-
*/
|
10018
|
-
_source?: string;
|
10019
|
-
fields: {
|
10020
|
-
url: {
|
10021
|
-
type: 'text';
|
10022
|
-
value: string;
|
10023
|
-
};
|
10024
|
-
id?: {
|
10025
|
-
type: 'text';
|
10026
|
-
value: string | undefined;
|
10027
|
-
};
|
10028
|
-
title?: {
|
10029
|
-
type: 'text';
|
10030
|
-
value: string | undefined;
|
10031
|
-
};
|
10032
|
-
description?: {
|
10033
|
-
type: 'text';
|
10034
|
-
value: string | undefined;
|
10035
|
-
};
|
10036
|
-
mediaType?: {
|
10037
|
-
type: 'text';
|
10038
|
-
value: string | undefined;
|
10039
|
-
};
|
10040
|
-
/**
|
10041
|
-
* The width of the original asset
|
10042
|
-
*
|
10043
|
-
* Should resolve to a number but might
|
10044
|
-
* be a string with a pointer reference
|
10045
|
-
*/
|
10046
|
-
width?: {
|
10047
|
-
type: 'number';
|
10048
|
-
value: number | string | undefined;
|
10049
|
-
};
|
10050
|
-
/**
|
10051
|
-
* The height of the original asset
|
10052
|
-
*
|
10053
|
-
* Should resolve to a number but might
|
10054
|
-
* be a string with a pointer reference
|
10055
|
-
*/
|
10056
|
-
height?: {
|
10057
|
-
type: 'number';
|
10058
|
-
value: number | string | undefined;
|
10059
|
-
};
|
10060
|
-
/**
|
10061
|
-
* The size in bytes of the original asset
|
10062
|
-
*
|
10063
|
-
* Should resolve to a number but might
|
10064
|
-
* be a string with a pointer reference
|
10065
|
-
*/
|
10066
|
-
size?: {
|
10067
|
-
type: 'number';
|
10068
|
-
value: number | string | undefined;
|
10069
|
-
};
|
10070
|
-
/**
|
10071
|
-
* Any key/value properties which the source
|
10072
|
-
* wants to attach to the asset data
|
10073
|
-
*/
|
10074
|
-
custom?: {
|
10075
|
-
type: string;
|
10076
|
-
value: Record<string, unknown>;
|
10077
|
-
};
|
10078
|
-
};
|
10079
|
-
_overrides?: {
|
10080
|
-
fields: ComponentOverride['parameters'];
|
10081
|
-
};
|
10082
|
-
};
|
10083
|
-
|
10084
10063
|
type LinkParameterType = 'projectMapNode' | 'url' | 'tel' | 'email';
|
10085
10064
|
type LinkTypeConfiguration = Partial<Record<LinkParameterType, boolean>>;
|
10086
10065
|
type LinkParamConfiguration = {
|
@@ -10126,10 +10105,7 @@ interface paths$6 {
|
|
10126
10105
|
path?: never;
|
10127
10106
|
cookie?: never;
|
10128
10107
|
};
|
10129
|
-
/**
|
10130
|
-
* @deprecated
|
10131
|
-
* @description Gets all preview URLs
|
10132
|
-
*/
|
10108
|
+
/** @description Gets all preview URLs */
|
10133
10109
|
get: {
|
10134
10110
|
parameters: {
|
10135
10111
|
query: {
|
@@ -10174,10 +10150,7 @@ interface paths$6 {
|
|
10174
10150
|
500: components$6["responses"]["InternalServerError"];
|
10175
10151
|
};
|
10176
10152
|
};
|
10177
|
-
/**
|
10178
|
-
* @deprecated
|
10179
|
-
* @description Upserts a preview URL
|
10180
|
-
*/
|
10153
|
+
/** @description Upserts a preview URL */
|
10181
10154
|
put: {
|
10182
10155
|
parameters: {
|
10183
10156
|
query?: never;
|
@@ -10239,10 +10212,7 @@ interface paths$6 {
|
|
10239
10212
|
};
|
10240
10213
|
};
|
10241
10214
|
post?: never;
|
10242
|
-
/**
|
10243
|
-
* @deprecated
|
10244
|
-
* @description Deletes a preview URL
|
10245
|
-
*/
|
10215
|
+
/** @description Deletes a preview URL */
|
10246
10216
|
delete: {
|
10247
10217
|
parameters: {
|
10248
10218
|
query?: never;
|
@@ -11573,7 +11543,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
|
11573
11543
|
filters?: CompositionFilters;
|
11574
11544
|
} & ({
|
11575
11545
|
resolveData: true;
|
11576
|
-
diagnostics
|
11546
|
+
diagnostics: DataResolutionParameters['diagnostics'];
|
11577
11547
|
} | {
|
11578
11548
|
resolveData?: false;
|
11579
11549
|
})): Promise<CompositionGetListResponse | CompositionResolvedListResponse>;
|
@@ -12127,13 +12097,19 @@ interface EvaluateNodeTreeVisibilityOptions extends Pick<EvaluateNodeVisibilityO
|
|
12127
12097
|
* When false, indeterminate criteria will fail the summary result, and the node will be hidden
|
12128
12098
|
*/
|
12129
12099
|
showIndeterminate?: boolean;
|
12100
|
+
/**
|
12101
|
+
* When evaluating visibility of a root node, this controls what happens when the node is found to be invisible.
|
12102
|
+
* When 'throw' (default), an error is thrown.
|
12103
|
+
* When 'ignore', the node is left intact. False is still returned.
|
12104
|
+
*/
|
12105
|
+
rootNodeInvisibleHandling?: 'throw' | 'ignore';
|
12130
12106
|
}
|
12131
12107
|
/**
|
12132
12108
|
* Function to call to evaluate visibility rules when traversing the node tree with walkNodeTree.
|
12133
12109
|
*
|
12134
12110
|
* If the function returns false, that means the current node is removed and you should stop any other code handling.
|
12135
12111
|
*/
|
12136
|
-
declare function evaluateWalkTreeNodeVisibility({ rules, showIndeterminate, context, }: EvaluateNodeTreeVisibilityOptions): boolean | undefined;
|
12112
|
+
declare function evaluateWalkTreeNodeVisibility({ rules, showIndeterminate, rootNodeInvisibleHandling, context, }: EvaluateNodeTreeVisibilityOptions): boolean | undefined;
|
12137
12113
|
|
12138
12114
|
interface EvaluateWalkTreePropertyCriteriaOptions extends Pick<EvaluatePropertyCriteriaOptions, 'rules' | 'keepIndeterminate'> {
|
12139
12115
|
node: ComponentInstance;
|
@@ -12423,8 +12399,6 @@ declare const createCanvasChannel: ({ listenTo, broadcastTo, }: {
|
|
12423
12399
|
|
12424
12400
|
/**
|
12425
12401
|
* API client to work with Uniform Project Preview entities
|
12426
|
-
*
|
12427
|
-
* @deprecated beta functionality subject to change
|
12428
12402
|
*/
|
12429
12403
|
declare class PreviewClient extends ApiClient {
|
12430
12404
|
constructor(options: ClientOptions);
|
@@ -12837,7 +12811,7 @@ declare const isSystemComponentDefinition: (componentType: string) => boolean;
|
|
12837
12811
|
* Converts components in a slot into personalized variations (based on each component's intent tag in Canvas) suitable to pass to a personalize component
|
12838
12812
|
* Useful when implementing custom personalization settings for Canvas components.
|
12839
12813
|
*/
|
12840
|
-
declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & PersonalizedVariant
|
12814
|
+
declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & PersonalizedVariant<VariationMatchMetadata>>;
|
12841
12815
|
|
12842
12816
|
/**
|
12843
12817
|
* Converts components in a slot into test variations (based on each component's Context tag in Canvas) suitable to pass to a personalize component
|
@@ -12995,4 +12969,4 @@ declare class WorkflowClient extends ApiClient {
|
|
12995
12969
|
|
12996
12970
|
declare const CanvasClientError: typeof ApiClientError;
|
12997
12971
|
|
12998
|
-
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type AssetParamValue, type AssetParamValueItem, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type ProjectMapLinkParamValue, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, walkNodeTree, walkPropertyValues };
|
12972
|
+
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type ProjectMapLinkParamValue, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, walkNodeTree, walkPropertyValues };
|
package/dist/index.esm.js
CHANGED
@@ -624,7 +624,7 @@ var CanvasClient = class extends ApiClient {
|
|
624
624
|
const edgeParams = {
|
625
625
|
...originParams,
|
626
626
|
projectId,
|
627
|
-
|
627
|
+
diagnostics: typeof params.diagnostics === "boolean" ? params.diagnostics : params.diagnostics === "no-data" ? "no-data" : void 0,
|
628
628
|
...rewrittenFilters
|
629
629
|
};
|
630
630
|
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
@@ -665,7 +665,7 @@ var CanvasClient = class extends ApiClient {
|
|
665
665
|
const edgeParams = {
|
666
666
|
...params,
|
667
667
|
projectId,
|
668
|
-
|
668
|
+
diagnostics: typeof diagnostics === "boolean" ? diagnostics : diagnostics === "no-data" ? "no-data" : void 0
|
669
669
|
};
|
670
670
|
const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
|
671
671
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
@@ -847,7 +847,7 @@ var _ContentClient = class _ContentClient extends ApiClient3 {
|
|
847
847
|
return {
|
848
848
|
projectId,
|
849
849
|
...params,
|
850
|
-
diagnostics:
|
850
|
+
diagnostics: typeof options.diagnostics === "boolean" ? options.diagnostics : options.diagnostics === "no-data" ? "no-data" : void 0
|
851
851
|
};
|
852
852
|
}
|
853
853
|
};
|
@@ -1075,6 +1075,9 @@ var CANVAS_DRAFT_STATE = 0;
|
|
1075
1075
|
var CANVAS_PUBLISHED_STATE = 64;
|
1076
1076
|
var CANVAS_EDITOR_STATE = 63;
|
1077
1077
|
var CANVAS_PERSONALIZATION_PARAM = "$pzCrit";
|
1078
|
+
var CANVAS_PERSONALIZATION_EVENT_NAME_PARAM = "trackingEventName";
|
1079
|
+
var CANVAS_PERSONALIZATION_ALGORITHM_PARAM = "algorithm";
|
1080
|
+
var CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
|
1078
1081
|
var CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
|
1079
1082
|
var CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
|
1080
1083
|
var CANVAS_CONTEXTUAL_EDITING_PARAM = "$contextualEditing";
|
@@ -2089,15 +2092,19 @@ function evaluateNodeVisibility({
|
|
2089
2092
|
function evaluateWalkTreeNodeVisibility({
|
2090
2093
|
rules,
|
2091
2094
|
showIndeterminate,
|
2095
|
+
rootNodeInvisibleHandling = "throw",
|
2092
2096
|
context
|
2093
2097
|
}) {
|
2094
|
-
const { type, node, actions } = context;
|
2098
|
+
const { type, node, actions, ancestorsAndSelf } = context;
|
2095
2099
|
if (type !== "component") {
|
2096
2100
|
return;
|
2097
2101
|
}
|
2098
2102
|
const result = evaluateNodeVisibility({ node, rules, simplifyCriteria: true });
|
2099
2103
|
if (result === null && !showIndeterminate || result === false) {
|
2100
|
-
|
2104
|
+
if (ancestorsAndSelf.length === 1 && rootNodeInvisibleHandling === "ignore") {
|
2105
|
+
} else {
|
2106
|
+
actions.remove();
|
2107
|
+
}
|
2101
2108
|
return false;
|
2102
2109
|
}
|
2103
2110
|
return true;
|
@@ -2333,25 +2340,24 @@ function extractLocales({ component }) {
|
|
2333
2340
|
function localize(options) {
|
2334
2341
|
const nodes = options.nodes;
|
2335
2342
|
const locale = options.locale;
|
2336
|
-
|
2337
|
-
|
2343
|
+
if (!locale) {
|
2344
|
+
return;
|
2345
|
+
}
|
2346
|
+
const vizControlLocaleRule = createLocaleVisibilityRule(locale);
|
2338
2347
|
walkNodeTree(nodes, (context) => {
|
2339
2348
|
const { type, node, actions } = context;
|
2340
2349
|
if (type !== "component") {
|
2341
|
-
|
2342
|
-
localizeProperties(node, locale, vizControlLocaleRule);
|
2343
|
-
}
|
2350
|
+
localizeProperties(node, locale, vizControlLocaleRule);
|
2344
2351
|
return;
|
2345
2352
|
}
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
}
|
2353
|
+
const result = evaluateWalkTreeNodeVisibility({
|
2354
|
+
context,
|
2355
|
+
rules: vizControlLocaleRule,
|
2356
|
+
showIndeterminate: true,
|
2357
|
+
rootNodeInvisibleHandling: "ignore"
|
2358
|
+
});
|
2359
|
+
if (!result) {
|
2360
|
+
return;
|
2355
2361
|
}
|
2356
2362
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
2357
2363
|
const locales = extractLocales({ component: node });
|
@@ -2362,9 +2368,7 @@ function localize(options) {
|
|
2362
2368
|
if (replaceComponent == null ? void 0 : replaceComponent.length) {
|
2363
2369
|
replaceComponent.forEach((component) => {
|
2364
2370
|
removeLocaleProperty(component);
|
2365
|
-
|
2366
|
-
localizeProperties(component, locale, vizControlLocaleRule);
|
2367
|
-
}
|
2371
|
+
localizeProperties(component, locale, vizControlLocaleRule);
|
2368
2372
|
});
|
2369
2373
|
const [first, ...rest] = replaceComponent;
|
2370
2374
|
actions.replace(first);
|
@@ -2374,7 +2378,7 @@ function localize(options) {
|
|
2374
2378
|
} else {
|
2375
2379
|
actions.remove();
|
2376
2380
|
}
|
2377
|
-
} else
|
2381
|
+
} else {
|
2378
2382
|
localizeProperties(node, locale, vizControlLocaleRule);
|
2379
2383
|
}
|
2380
2384
|
});
|
@@ -3422,7 +3426,10 @@ export {
|
|
3422
3426
|
CANVAS_LOCALE_TAG_PARAM,
|
3423
3427
|
CANVAS_LOCALIZATION_SLOT,
|
3424
3428
|
CANVAS_LOCALIZATION_TYPE,
|
3429
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
3430
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
3425
3431
|
CANVAS_PERSONALIZATION_PARAM,
|
3432
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM,
|
3426
3433
|
CANVAS_PERSONALIZE_SLOT,
|
3427
3434
|
CANVAS_PERSONALIZE_TYPE,
|
3428
3435
|
CANVAS_PUBLISHED_STATE,
|
package/dist/index.js
CHANGED
@@ -409,7 +409,10 @@ __export(src_exports, {
|
|
409
409
|
CANVAS_LOCALE_TAG_PARAM: () => CANVAS_LOCALE_TAG_PARAM,
|
410
410
|
CANVAS_LOCALIZATION_SLOT: () => CANVAS_LOCALIZATION_SLOT,
|
411
411
|
CANVAS_LOCALIZATION_TYPE: () => CANVAS_LOCALIZATION_TYPE,
|
412
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM: () => CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
413
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM: () => CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
412
414
|
CANVAS_PERSONALIZATION_PARAM: () => CANVAS_PERSONALIZATION_PARAM,
|
415
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM: () => CANVAS_PERSONALIZATION_TAKE_PARAM,
|
413
416
|
CANVAS_PERSONALIZE_SLOT: () => CANVAS_PERSONALIZE_SLOT,
|
414
417
|
CANVAS_PERSONALIZE_TYPE: () => CANVAS_PERSONALIZE_TYPE,
|
415
418
|
CANVAS_PUBLISHED_STATE: () => CANVAS_PUBLISHED_STATE,
|
@@ -784,7 +787,7 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
784
787
|
const edgeParams = {
|
785
788
|
...originParams,
|
786
789
|
projectId,
|
787
|
-
|
790
|
+
diagnostics: typeof params.diagnostics === "boolean" ? params.diagnostics : params.diagnostics === "no-data" ? "no-data" : void 0,
|
788
791
|
...rewrittenFilters
|
789
792
|
};
|
790
793
|
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
@@ -825,7 +828,7 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
825
828
|
const edgeParams = {
|
826
829
|
...params,
|
827
830
|
projectId,
|
828
|
-
|
831
|
+
diagnostics: typeof diagnostics === "boolean" ? diagnostics : diagnostics === "no-data" ? "no-data" : void 0
|
829
832
|
};
|
830
833
|
const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
|
831
834
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
@@ -1007,7 +1010,7 @@ var _ContentClient = class _ContentClient extends import_api4.ApiClient {
|
|
1007
1010
|
return {
|
1008
1011
|
projectId,
|
1009
1012
|
...params,
|
1010
|
-
diagnostics:
|
1013
|
+
diagnostics: typeof options.diagnostics === "boolean" ? options.diagnostics : options.diagnostics === "no-data" ? "no-data" : void 0
|
1011
1014
|
};
|
1012
1015
|
}
|
1013
1016
|
};
|
@@ -1235,6 +1238,9 @@ var CANVAS_DRAFT_STATE = 0;
|
|
1235
1238
|
var CANVAS_PUBLISHED_STATE = 64;
|
1236
1239
|
var CANVAS_EDITOR_STATE = 63;
|
1237
1240
|
var CANVAS_PERSONALIZATION_PARAM = "$pzCrit";
|
1241
|
+
var CANVAS_PERSONALIZATION_EVENT_NAME_PARAM = "trackingEventName";
|
1242
|
+
var CANVAS_PERSONALIZATION_ALGORITHM_PARAM = "algorithm";
|
1243
|
+
var CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
|
1238
1244
|
var CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
|
1239
1245
|
var CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
|
1240
1246
|
var CANVAS_CONTEXTUAL_EDITING_PARAM = "$contextualEditing";
|
@@ -2249,15 +2255,19 @@ function evaluateNodeVisibility({
|
|
2249
2255
|
function evaluateWalkTreeNodeVisibility({
|
2250
2256
|
rules,
|
2251
2257
|
showIndeterminate,
|
2258
|
+
rootNodeInvisibleHandling = "throw",
|
2252
2259
|
context
|
2253
2260
|
}) {
|
2254
|
-
const { type, node, actions } = context;
|
2261
|
+
const { type, node, actions, ancestorsAndSelf } = context;
|
2255
2262
|
if (type !== "component") {
|
2256
2263
|
return;
|
2257
2264
|
}
|
2258
2265
|
const result = evaluateNodeVisibility({ node, rules, simplifyCriteria: true });
|
2259
2266
|
if (result === null && !showIndeterminate || result === false) {
|
2260
|
-
|
2267
|
+
if (ancestorsAndSelf.length === 1 && rootNodeInvisibleHandling === "ignore") {
|
2268
|
+
} else {
|
2269
|
+
actions.remove();
|
2270
|
+
}
|
2261
2271
|
return false;
|
2262
2272
|
}
|
2263
2273
|
return true;
|
@@ -2493,25 +2503,24 @@ function extractLocales({ component }) {
|
|
2493
2503
|
function localize(options) {
|
2494
2504
|
const nodes = options.nodes;
|
2495
2505
|
const locale = options.locale;
|
2496
|
-
|
2497
|
-
|
2506
|
+
if (!locale) {
|
2507
|
+
return;
|
2508
|
+
}
|
2509
|
+
const vizControlLocaleRule = createLocaleVisibilityRule(locale);
|
2498
2510
|
walkNodeTree(nodes, (context) => {
|
2499
2511
|
const { type, node, actions } = context;
|
2500
2512
|
if (type !== "component") {
|
2501
|
-
|
2502
|
-
localizeProperties(node, locale, vizControlLocaleRule);
|
2503
|
-
}
|
2513
|
+
localizeProperties(node, locale, vizControlLocaleRule);
|
2504
2514
|
return;
|
2505
2515
|
}
|
2506
|
-
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
}
|
2516
|
+
const result = evaluateWalkTreeNodeVisibility({
|
2517
|
+
context,
|
2518
|
+
rules: vizControlLocaleRule,
|
2519
|
+
showIndeterminate: true,
|
2520
|
+
rootNodeInvisibleHandling: "ignore"
|
2521
|
+
});
|
2522
|
+
if (!result) {
|
2523
|
+
return;
|
2515
2524
|
}
|
2516
2525
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
2517
2526
|
const locales = extractLocales({ component: node });
|
@@ -2522,9 +2531,7 @@ function localize(options) {
|
|
2522
2531
|
if (replaceComponent == null ? void 0 : replaceComponent.length) {
|
2523
2532
|
replaceComponent.forEach((component) => {
|
2524
2533
|
removeLocaleProperty(component);
|
2525
|
-
|
2526
|
-
localizeProperties(component, locale, vizControlLocaleRule);
|
2527
|
-
}
|
2534
|
+
localizeProperties(component, locale, vizControlLocaleRule);
|
2528
2535
|
});
|
2529
2536
|
const [first, ...rest] = replaceComponent;
|
2530
2537
|
actions.replace(first);
|
@@ -2534,7 +2541,7 @@ function localize(options) {
|
|
2534
2541
|
} else {
|
2535
2542
|
actions.remove();
|
2536
2543
|
}
|
2537
|
-
} else
|
2544
|
+
} else {
|
2538
2545
|
localizeProperties(node, locale, vizControlLocaleRule);
|
2539
2546
|
}
|
2540
2547
|
});
|
@@ -3583,7 +3590,10 @@ var CanvasClientError = import_api16.ApiClientError;
|
|
3583
3590
|
CANVAS_LOCALE_TAG_PARAM,
|
3584
3591
|
CANVAS_LOCALIZATION_SLOT,
|
3585
3592
|
CANVAS_LOCALIZATION_TYPE,
|
3593
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
3594
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
3586
3595
|
CANVAS_PERSONALIZATION_PARAM,
|
3596
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM,
|
3587
3597
|
CANVAS_PERSONALIZE_SLOT,
|
3588
3598
|
CANVAS_PERSONALIZE_TYPE,
|
3589
3599
|
CANVAS_PUBLISHED_STATE,
|
package/dist/index.mjs
CHANGED
@@ -624,7 +624,7 @@ var CanvasClient = class extends ApiClient {
|
|
624
624
|
const edgeParams = {
|
625
625
|
...originParams,
|
626
626
|
projectId,
|
627
|
-
|
627
|
+
diagnostics: typeof params.diagnostics === "boolean" ? params.diagnostics : params.diagnostics === "no-data" ? "no-data" : void 0,
|
628
628
|
...rewrittenFilters
|
629
629
|
};
|
630
630
|
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
@@ -665,7 +665,7 @@ var CanvasClient = class extends ApiClient {
|
|
665
665
|
const edgeParams = {
|
666
666
|
...params,
|
667
667
|
projectId,
|
668
|
-
|
668
|
+
diagnostics: typeof diagnostics === "boolean" ? diagnostics : diagnostics === "no-data" ? "no-data" : void 0
|
669
669
|
};
|
670
670
|
const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
|
671
671
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
@@ -847,7 +847,7 @@ var _ContentClient = class _ContentClient extends ApiClient3 {
|
|
847
847
|
return {
|
848
848
|
projectId,
|
849
849
|
...params,
|
850
|
-
diagnostics:
|
850
|
+
diagnostics: typeof options.diagnostics === "boolean" ? options.diagnostics : options.diagnostics === "no-data" ? "no-data" : void 0
|
851
851
|
};
|
852
852
|
}
|
853
853
|
};
|
@@ -1075,6 +1075,9 @@ var CANVAS_DRAFT_STATE = 0;
|
|
1075
1075
|
var CANVAS_PUBLISHED_STATE = 64;
|
1076
1076
|
var CANVAS_EDITOR_STATE = 63;
|
1077
1077
|
var CANVAS_PERSONALIZATION_PARAM = "$pzCrit";
|
1078
|
+
var CANVAS_PERSONALIZATION_EVENT_NAME_PARAM = "trackingEventName";
|
1079
|
+
var CANVAS_PERSONALIZATION_ALGORITHM_PARAM = "algorithm";
|
1080
|
+
var CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
|
1078
1081
|
var CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
|
1079
1082
|
var CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
|
1080
1083
|
var CANVAS_CONTEXTUAL_EDITING_PARAM = "$contextualEditing";
|
@@ -2089,15 +2092,19 @@ function evaluateNodeVisibility({
|
|
2089
2092
|
function evaluateWalkTreeNodeVisibility({
|
2090
2093
|
rules,
|
2091
2094
|
showIndeterminate,
|
2095
|
+
rootNodeInvisibleHandling = "throw",
|
2092
2096
|
context
|
2093
2097
|
}) {
|
2094
|
-
const { type, node, actions } = context;
|
2098
|
+
const { type, node, actions, ancestorsAndSelf } = context;
|
2095
2099
|
if (type !== "component") {
|
2096
2100
|
return;
|
2097
2101
|
}
|
2098
2102
|
const result = evaluateNodeVisibility({ node, rules, simplifyCriteria: true });
|
2099
2103
|
if (result === null && !showIndeterminate || result === false) {
|
2100
|
-
|
2104
|
+
if (ancestorsAndSelf.length === 1 && rootNodeInvisibleHandling === "ignore") {
|
2105
|
+
} else {
|
2106
|
+
actions.remove();
|
2107
|
+
}
|
2101
2108
|
return false;
|
2102
2109
|
}
|
2103
2110
|
return true;
|
@@ -2333,25 +2340,24 @@ function extractLocales({ component }) {
|
|
2333
2340
|
function localize(options) {
|
2334
2341
|
const nodes = options.nodes;
|
2335
2342
|
const locale = options.locale;
|
2336
|
-
|
2337
|
-
|
2343
|
+
if (!locale) {
|
2344
|
+
return;
|
2345
|
+
}
|
2346
|
+
const vizControlLocaleRule = createLocaleVisibilityRule(locale);
|
2338
2347
|
walkNodeTree(nodes, (context) => {
|
2339
2348
|
const { type, node, actions } = context;
|
2340
2349
|
if (type !== "component") {
|
2341
|
-
|
2342
|
-
localizeProperties(node, locale, vizControlLocaleRule);
|
2343
|
-
}
|
2350
|
+
localizeProperties(node, locale, vizControlLocaleRule);
|
2344
2351
|
return;
|
2345
2352
|
}
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
}
|
2353
|
+
const result = evaluateWalkTreeNodeVisibility({
|
2354
|
+
context,
|
2355
|
+
rules: vizControlLocaleRule,
|
2356
|
+
showIndeterminate: true,
|
2357
|
+
rootNodeInvisibleHandling: "ignore"
|
2358
|
+
});
|
2359
|
+
if (!result) {
|
2360
|
+
return;
|
2355
2361
|
}
|
2356
2362
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
2357
2363
|
const locales = extractLocales({ component: node });
|
@@ -2362,9 +2368,7 @@ function localize(options) {
|
|
2362
2368
|
if (replaceComponent == null ? void 0 : replaceComponent.length) {
|
2363
2369
|
replaceComponent.forEach((component) => {
|
2364
2370
|
removeLocaleProperty(component);
|
2365
|
-
|
2366
|
-
localizeProperties(component, locale, vizControlLocaleRule);
|
2367
|
-
}
|
2371
|
+
localizeProperties(component, locale, vizControlLocaleRule);
|
2368
2372
|
});
|
2369
2373
|
const [first, ...rest] = replaceComponent;
|
2370
2374
|
actions.replace(first);
|
@@ -2374,7 +2378,7 @@ function localize(options) {
|
|
2374
2378
|
} else {
|
2375
2379
|
actions.remove();
|
2376
2380
|
}
|
2377
|
-
} else
|
2381
|
+
} else {
|
2378
2382
|
localizeProperties(node, locale, vizControlLocaleRule);
|
2379
2383
|
}
|
2380
2384
|
});
|
@@ -3422,7 +3426,10 @@ export {
|
|
3422
3426
|
CANVAS_LOCALE_TAG_PARAM,
|
3423
3427
|
CANVAS_LOCALIZATION_SLOT,
|
3424
3428
|
CANVAS_LOCALIZATION_TYPE,
|
3429
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
3430
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
3425
3431
|
CANVAS_PERSONALIZATION_PARAM,
|
3432
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM,
|
3426
3433
|
CANVAS_PERSONALIZE_SLOT,
|
3427
3434
|
CANVAS_PERSONALIZE_TYPE,
|
3428
3435
|
CANVAS_PUBLISHED_STATE,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "20.7.1-alpha.
|
3
|
+
"version": "20.7.1-alpha.42+580f8a1849",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
29
29
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
30
30
|
"update-openapi": "tsx ./scripts/update-openapi.cts",
|
31
|
-
"document": "api-extractor run --local"
|
31
|
+
"document:prebuild": "api-extractor run --local"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/retry": "0.12.5",
|
@@ -38,9 +38,9 @@
|
|
38
38
|
"p-throttle": "5.0.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "20.7.1-alpha.
|
42
|
-
"@uniformdev/context": "20.7.1-alpha.
|
43
|
-
"@uniformdev/richtext": "20.7.1-alpha.
|
41
|
+
"@uniformdev/assets": "20.7.1-alpha.42+580f8a1849",
|
42
|
+
"@uniformdev/context": "20.7.1-alpha.42+580f8a1849",
|
43
|
+
"@uniformdev/richtext": "20.7.1-alpha.42+580f8a1849",
|
44
44
|
"immer": "10.1.1"
|
45
45
|
},
|
46
46
|
"files": [
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"publishConfig": {
|
50
50
|
"access": "public"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "580f8a1849984760d11edb936da050eb05e28313"
|
53
53
|
}
|