@uniformdev/canvas 19.214.1-alpha.32 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -42
- package/dist/index.d.ts +1 -42
- package/dist/index.esm.js +8 -129
- package/dist/index.js +9 -136
- package/dist/index.mjs +8 -129
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
@@ -11847,29 +11847,6 @@ declare function getNounForNode(node: ComponentInstance | EntryData | Array<Node
|
|
11847
11847
|
|
11848
11848
|
declare function getComponentPath(ancestorsAndSelf: Array<NodeLocationReference>): string;
|
11849
11849
|
|
11850
|
-
type GetEffectivePropertyValueOptions<TValue> = {
|
11851
|
-
property: ComponentParameter<TValue> | undefined;
|
11852
|
-
/** Current locale to bind (or undefined to bind the non-localized value) */
|
11853
|
-
locale: string | undefined;
|
11854
|
-
/** Condition index to bind (or a negative number to not bind a conditional value) */
|
11855
|
-
conditionIndex: number;
|
11856
|
-
/**
|
11857
|
-
* Enables strict matching, that is
|
11858
|
-
* disallowing a locale conditional to fallback to a locale to fallback to base value,
|
11859
|
-
* or a conditional to fallback to base value.
|
11860
|
-
*/
|
11861
|
-
strict?: boolean;
|
11862
|
-
/**
|
11863
|
-
* Enables greedy locale matching.
|
11864
|
-
* `locale` becomes a preferred locale, but if it's not available, the first available locale is used instead if any others exist.
|
11865
|
-
*
|
11866
|
-
* Useful for computing non-localized display names where a randomly selected value is better than nothing.
|
11867
|
-
*/
|
11868
|
-
greedyLocaleMatching?: boolean;
|
11869
|
-
};
|
11870
|
-
/** Resolves the effective value of a property given a locale and/or condition index */
|
11871
|
-
declare function getEffectivePropertyValue<TValue>({ property, conditionIndex, locale, strict, greedyLocaleMatching, }: GetEffectivePropertyValueOptions<TValue>): TValue | undefined;
|
11872
|
-
|
11873
11850
|
declare function extractLocales({ component }: {
|
11874
11851
|
component: ComponentInstance;
|
11875
11852
|
}): Record<string, ComponentInstance[]>;
|
@@ -12073,19 +12050,6 @@ declare function createQuirksVisibilityRule(quirks: Quirks): VisibilityRules;
|
|
12073
12050
|
type CoreStringOperators = 'is' | 'has' | 'startswith' | 'endswith' | 'empty';
|
12074
12051
|
type StringOperators = CoreStringOperators | `!${CoreStringOperators}`;
|
12075
12052
|
|
12076
|
-
type PropertyValue = {
|
12077
|
-
locale: string | undefined;
|
12078
|
-
conditionIndex: number;
|
12079
|
-
value: unknown;
|
12080
|
-
};
|
12081
|
-
/**
|
12082
|
-
* Visits all property values in any locale or any condition
|
12083
|
-
* The value provided is a strict value. See getEffectivePropertyValue() for more details.
|
12084
|
-
*
|
12085
|
-
* NOTE: conditional values are visited in reverse order, which makes them safe to delete during iteration.
|
12086
|
-
*/
|
12087
|
-
declare function walkPropertyValues(property: ComponentParameter, visitor: (options: PropertyValue) => void): void;
|
12088
|
-
|
12089
12053
|
/** API client to fetch entity across releases */
|
12090
12054
|
declare class EntityReleasesClient extends ApiClient {
|
12091
12055
|
constructor(options: ClientOptions);
|
@@ -12835,11 +12799,6 @@ type BindVariablesOptions = {
|
|
12835
12799
|
*/
|
12836
12800
|
declare function bindVariables({ variables, value, errorPrefix, handleBinding, }: BindVariablesOptions): BindVariablesResult<unknown>;
|
12837
12801
|
|
12838
|
-
declare const bindExpressionPrefix = "#";
|
12839
|
-
declare const bindExpressionEscapeChars: Set<string>;
|
12840
|
-
declare function convertToBindExpression(binding: DataElementConnectionDefinition): string;
|
12841
|
-
declare function escapeBindExpressionDefaultValue(defaultValue: string): string;
|
12842
|
-
|
12843
12802
|
declare function createVariableReference(variableName: string): string;
|
12844
12803
|
|
12845
12804
|
/**
|
@@ -12871,4 +12830,4 @@ declare class WorkflowClient extends ApiClient {
|
|
12871
12830
|
|
12872
12831
|
declare const CanvasClientError: typeof ApiClientError;
|
12873
12832
|
|
12874
|
-
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 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 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 };
|
12833
|
+
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 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 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 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 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, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, 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 };
|
package/dist/index.d.ts
CHANGED
@@ -11847,29 +11847,6 @@ declare function getNounForNode(node: ComponentInstance | EntryData | Array<Node
|
|
11847
11847
|
|
11848
11848
|
declare function getComponentPath(ancestorsAndSelf: Array<NodeLocationReference>): string;
|
11849
11849
|
|
11850
|
-
type GetEffectivePropertyValueOptions<TValue> = {
|
11851
|
-
property: ComponentParameter<TValue> | undefined;
|
11852
|
-
/** Current locale to bind (or undefined to bind the non-localized value) */
|
11853
|
-
locale: string | undefined;
|
11854
|
-
/** Condition index to bind (or a negative number to not bind a conditional value) */
|
11855
|
-
conditionIndex: number;
|
11856
|
-
/**
|
11857
|
-
* Enables strict matching, that is
|
11858
|
-
* disallowing a locale conditional to fallback to a locale to fallback to base value,
|
11859
|
-
* or a conditional to fallback to base value.
|
11860
|
-
*/
|
11861
|
-
strict?: boolean;
|
11862
|
-
/**
|
11863
|
-
* Enables greedy locale matching.
|
11864
|
-
* `locale` becomes a preferred locale, but if it's not available, the first available locale is used instead if any others exist.
|
11865
|
-
*
|
11866
|
-
* Useful for computing non-localized display names where a randomly selected value is better than nothing.
|
11867
|
-
*/
|
11868
|
-
greedyLocaleMatching?: boolean;
|
11869
|
-
};
|
11870
|
-
/** Resolves the effective value of a property given a locale and/or condition index */
|
11871
|
-
declare function getEffectivePropertyValue<TValue>({ property, conditionIndex, locale, strict, greedyLocaleMatching, }: GetEffectivePropertyValueOptions<TValue>): TValue | undefined;
|
11872
|
-
|
11873
11850
|
declare function extractLocales({ component }: {
|
11874
11851
|
component: ComponentInstance;
|
11875
11852
|
}): Record<string, ComponentInstance[]>;
|
@@ -12073,19 +12050,6 @@ declare function createQuirksVisibilityRule(quirks: Quirks): VisibilityRules;
|
|
12073
12050
|
type CoreStringOperators = 'is' | 'has' | 'startswith' | 'endswith' | 'empty';
|
12074
12051
|
type StringOperators = CoreStringOperators | `!${CoreStringOperators}`;
|
12075
12052
|
|
12076
|
-
type PropertyValue = {
|
12077
|
-
locale: string | undefined;
|
12078
|
-
conditionIndex: number;
|
12079
|
-
value: unknown;
|
12080
|
-
};
|
12081
|
-
/**
|
12082
|
-
* Visits all property values in any locale or any condition
|
12083
|
-
* The value provided is a strict value. See getEffectivePropertyValue() for more details.
|
12084
|
-
*
|
12085
|
-
* NOTE: conditional values are visited in reverse order, which makes them safe to delete during iteration.
|
12086
|
-
*/
|
12087
|
-
declare function walkPropertyValues(property: ComponentParameter, visitor: (options: PropertyValue) => void): void;
|
12088
|
-
|
12089
12053
|
/** API client to fetch entity across releases */
|
12090
12054
|
declare class EntityReleasesClient extends ApiClient {
|
12091
12055
|
constructor(options: ClientOptions);
|
@@ -12835,11 +12799,6 @@ type BindVariablesOptions = {
|
|
12835
12799
|
*/
|
12836
12800
|
declare function bindVariables({ variables, value, errorPrefix, handleBinding, }: BindVariablesOptions): BindVariablesResult<unknown>;
|
12837
12801
|
|
12838
|
-
declare const bindExpressionPrefix = "#";
|
12839
|
-
declare const bindExpressionEscapeChars: Set<string>;
|
12840
|
-
declare function convertToBindExpression(binding: DataElementConnectionDefinition): string;
|
12841
|
-
declare function escapeBindExpressionDefaultValue(defaultValue: string): string;
|
12842
|
-
|
12843
12802
|
declare function createVariableReference(variableName: string): string;
|
12844
12803
|
|
12845
12804
|
/**
|
@@ -12871,4 +12830,4 @@ declare class WorkflowClient extends ApiClient {
|
|
12871
12830
|
|
12872
12831
|
declare const CanvasClientError: typeof ApiClientError;
|
12873
12832
|
|
12874
|
-
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 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 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 };
|
12833
|
+
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 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 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 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 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, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, 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 };
|
package/dist/index.esm.js
CHANGED
@@ -1855,101 +1855,6 @@ function findParameterInNodeTree(data, predicate) {
|
|
1855
1855
|
return results;
|
1856
1856
|
}
|
1857
1857
|
|
1858
|
-
// src/utils/variables/convertToBindExpression.ts
|
1859
|
-
var bindExpressionPrefix = "#";
|
1860
|
-
var bindExpressionEscapeChars = /* @__PURE__ */ new Set(["#", "\\", "[", "]", ":"]);
|
1861
|
-
function convertToBindExpression(binding) {
|
1862
|
-
if (binding.syntax === "jptr") {
|
1863
|
-
const expressionComponents = [
|
1864
|
-
`${bindExpressionPrefix}${binding.syntax}:${escapeNestedVariableExpressions(
|
1865
|
-
escapeBindExpressionReservedChars(binding.pointer)
|
1866
|
-
)}`
|
1867
|
-
];
|
1868
|
-
if (binding.failureAction && binding.failureAction !== "t") {
|
1869
|
-
expressionComponents.push(`fa=${binding.failureAction}`);
|
1870
|
-
}
|
1871
|
-
if (binding.failureLogLevel && binding.failureLogLevel !== "w") {
|
1872
|
-
expressionComponents.push(`fl=${binding.failureLogLevel}`);
|
1873
|
-
}
|
1874
|
-
if (binding.failureDefault) {
|
1875
|
-
expressionComponents.push(`fd=${escapeBindExpressionDefaultValue(binding.failureDefault)}`);
|
1876
|
-
}
|
1877
|
-
return expressionComponents.join(":");
|
1878
|
-
}
|
1879
|
-
throw new Error(`Unsupported dynamic token binding syntax '${binding.syntax}'`);
|
1880
|
-
}
|
1881
|
-
function escapeNestedVariableExpressions(pointer) {
|
1882
|
-
return pointer.replace(/\$\{([^}]+)\}/g, "$[$1]");
|
1883
|
-
}
|
1884
|
-
function escapeBindExpressionReservedChars(pointer) {
|
1885
|
-
return pointer.split("").map((c) => bindExpressionEscapeChars.has(c) ? `\\${c === ":" ? ";" : c}` : c).join("");
|
1886
|
-
}
|
1887
|
-
function escapeBindExpressionDefaultValue(defaultValue) {
|
1888
|
-
return escapeBindExpressionReservedChars(defaultValue).replace("=", "\\+");
|
1889
|
-
}
|
1890
|
-
|
1891
|
-
// src/utils/variables/createVariableReference.ts
|
1892
|
-
function createVariableReference(variableName) {
|
1893
|
-
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
1894
|
-
}
|
1895
|
-
|
1896
|
-
// src/enhancement/getEffectivePropertyValue.ts
|
1897
|
-
function getEffectivePropertyValue({
|
1898
|
-
property,
|
1899
|
-
conditionIndex,
|
1900
|
-
locale,
|
1901
|
-
strict,
|
1902
|
-
greedyLocaleMatching
|
1903
|
-
}) {
|
1904
|
-
var _a, _b, _c, _d;
|
1905
|
-
if (!property) {
|
1906
|
-
return void 0;
|
1907
|
-
}
|
1908
|
-
let effectiveValue = property.value;
|
1909
|
-
if (conditionIndex >= 0) {
|
1910
|
-
const conditionalValue = (_b = (_a = property.conditions) == null ? void 0 : _a[conditionIndex]) == null ? void 0 : _b.value;
|
1911
|
-
if (conditionalValue === null) {
|
1912
|
-
return void 0;
|
1913
|
-
}
|
1914
|
-
if (conditionalValue !== void 0 || strict) {
|
1915
|
-
effectiveValue = conditionalValue;
|
1916
|
-
}
|
1917
|
-
}
|
1918
|
-
if (locale) {
|
1919
|
-
const localeValue = getLocaleMatch(property.locales, locale, greedyLocaleMatching);
|
1920
|
-
if (localeValue !== void 0 || strict) {
|
1921
|
-
effectiveValue = localeValue;
|
1922
|
-
}
|
1923
|
-
if (conditionIndex >= 0) {
|
1924
|
-
const localeConditionalValue = (_d = (_c = getLocaleMatch(
|
1925
|
-
property.localesConditions,
|
1926
|
-
locale,
|
1927
|
-
greedyLocaleMatching
|
1928
|
-
)) == null ? void 0 : _c[conditionIndex]) == null ? void 0 : _d.value;
|
1929
|
-
if (localeConditionalValue === null) {
|
1930
|
-
return void 0;
|
1931
|
-
}
|
1932
|
-
if (localeConditionalValue !== void 0 || strict) {
|
1933
|
-
effectiveValue = localeConditionalValue;
|
1934
|
-
}
|
1935
|
-
}
|
1936
|
-
}
|
1937
|
-
if (property.connectedData) {
|
1938
|
-
effectiveValue = createVariableReference(convertToBindExpression(property.connectedData));
|
1939
|
-
}
|
1940
|
-
return effectiveValue;
|
1941
|
-
}
|
1942
|
-
function getLocaleMatch(index, locale, greedy) {
|
1943
|
-
if (!index) {
|
1944
|
-
return void 0;
|
1945
|
-
}
|
1946
|
-
const match = index[locale];
|
1947
|
-
if (match === void 0 && greedy) {
|
1948
|
-
return Object.values(index)[0];
|
1949
|
-
}
|
1950
|
-
return match;
|
1951
|
-
}
|
1952
|
-
|
1953
1858
|
// src/enhancement/visibility/evaluateVisibilityCriteriaGroup.ts
|
1954
1859
|
function evaluateVisibilityCriteriaGroup(options) {
|
1955
1860
|
const { criteriaGroup, simplifyCriteria } = options;
|
@@ -2451,33 +2356,6 @@ var UniqueBatchEntries = class {
|
|
2451
2356
|
}
|
2452
2357
|
};
|
2453
2358
|
|
2454
|
-
// src/enhancement/walkPropertyValues.ts
|
2455
|
-
function walkPropertyValues(property, visitor) {
|
2456
|
-
var _a, _b;
|
2457
|
-
const definedLocales = /* @__PURE__ */ new Set([
|
2458
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
2459
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
2460
|
-
]);
|
2461
|
-
const propertyLocales = [void 0, ...definedLocales];
|
2462
|
-
propertyLocales.forEach((locale) => {
|
2463
|
-
var _a2, _b2;
|
2464
|
-
const conditionalValues = (_b2 = locale === void 0 ? property.conditions : (_a2 = property.localesConditions) == null ? void 0 : _a2[locale]) != null ? _b2 : [];
|
2465
|
-
for (let conditionIndex = conditionalValues.length - 1; conditionIndex >= -1; conditionIndex--) {
|
2466
|
-
const value = getEffectivePropertyValue({
|
2467
|
-
property,
|
2468
|
-
locale,
|
2469
|
-
conditionIndex,
|
2470
|
-
strict: true
|
2471
|
-
});
|
2472
|
-
visitor({
|
2473
|
-
locale,
|
2474
|
-
conditionIndex,
|
2475
|
-
value
|
2476
|
-
});
|
2477
|
-
}
|
2478
|
-
});
|
2479
|
-
}
|
2480
|
-
|
2481
2359
|
// src/EntityReleasesClient.ts
|
2482
2360
|
import { ApiClient as ApiClient6 } from "@uniformdev/context/api";
|
2483
2361
|
var releaseContentsUrl = "/api/v1/entity-releases";
|
@@ -3261,6 +3139,13 @@ function bindVariables({
|
|
3261
3139
|
|
3262
3140
|
// src/utils/variables/bindVariablesToObject.ts
|
3263
3141
|
import { isDraft, produce } from "immer";
|
3142
|
+
|
3143
|
+
// src/utils/variables/createVariableReference.ts
|
3144
|
+
function createVariableReference(variableName) {
|
3145
|
+
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
3146
|
+
}
|
3147
|
+
|
3148
|
+
// src/utils/variables/bindVariablesToObject.ts
|
3264
3149
|
function bindVariablesToObject(options) {
|
3265
3150
|
return bindVariablesToObjectRecursive(options);
|
3266
3151
|
}
|
@@ -3452,13 +3337,10 @@ export {
|
|
3452
3337
|
UncachedContentClient,
|
3453
3338
|
UniqueBatchEntries,
|
3454
3339
|
WorkflowClient,
|
3455
|
-
bindExpressionEscapeChars,
|
3456
|
-
bindExpressionPrefix,
|
3457
3340
|
bindVariables,
|
3458
3341
|
bindVariablesToObject,
|
3459
3342
|
compose,
|
3460
3343
|
convertEntryToPutEntry,
|
3461
|
-
convertToBindExpression,
|
3462
3344
|
createBatchEnhancer,
|
3463
3345
|
createCanvasChannel,
|
3464
3346
|
createDynamicInputVisibilityRule,
|
@@ -3469,7 +3351,6 @@ export {
|
|
3469
3351
|
createUniformApiEnhancer,
|
3470
3352
|
createVariableReference,
|
3471
3353
|
enhance,
|
3472
|
-
escapeBindExpressionDefaultValue,
|
3473
3354
|
evaluateNodeVisibilityParameter,
|
3474
3355
|
evaluatePropertyCriteria,
|
3475
3356
|
evaluateVisibilityCriteriaGroup,
|
@@ -3484,7 +3365,6 @@ export {
|
|
3484
3365
|
getComponentJsonPointer,
|
3485
3366
|
getComponentPath,
|
3486
3367
|
getDataSourceVariantFromRouteGetParams,
|
3487
|
-
getEffectivePropertyValue,
|
3488
3368
|
getLocalizedPropertyValues,
|
3489
3369
|
getNounForLocation,
|
3490
3370
|
getNounForNode,
|
@@ -3526,6 +3406,5 @@ export {
|
|
3526
3406
|
nullLimitPolicy,
|
3527
3407
|
parseComponentPlaceholderId,
|
3528
3408
|
parseVariableExpression,
|
3529
|
-
walkNodeTree
|
3530
|
-
walkPropertyValues
|
3409
|
+
walkNodeTree
|
3531
3410
|
};
|
package/dist/index.js
CHANGED
@@ -460,13 +460,10 @@ __export(src_exports, {
|
|
460
460
|
UncachedContentClient: () => UncachedContentClient,
|
461
461
|
UniqueBatchEntries: () => UniqueBatchEntries,
|
462
462
|
WorkflowClient: () => WorkflowClient,
|
463
|
-
bindExpressionEscapeChars: () => bindExpressionEscapeChars,
|
464
|
-
bindExpressionPrefix: () => bindExpressionPrefix,
|
465
463
|
bindVariables: () => bindVariables,
|
466
464
|
bindVariablesToObject: () => bindVariablesToObject,
|
467
465
|
compose: () => compose,
|
468
466
|
convertEntryToPutEntry: () => convertEntryToPutEntry,
|
469
|
-
convertToBindExpression: () => convertToBindExpression,
|
470
467
|
createBatchEnhancer: () => createBatchEnhancer,
|
471
468
|
createCanvasChannel: () => createCanvasChannel,
|
472
469
|
createDynamicInputVisibilityRule: () => createDynamicInputVisibilityRule,
|
@@ -477,7 +474,6 @@ __export(src_exports, {
|
|
477
474
|
createUniformApiEnhancer: () => createUniformApiEnhancer,
|
478
475
|
createVariableReference: () => createVariableReference,
|
479
476
|
enhance: () => enhance,
|
480
|
-
escapeBindExpressionDefaultValue: () => escapeBindExpressionDefaultValue,
|
481
477
|
evaluateNodeVisibilityParameter: () => evaluateNodeVisibilityParameter,
|
482
478
|
evaluatePropertyCriteria: () => evaluatePropertyCriteria,
|
483
479
|
evaluateVisibilityCriteriaGroup: () => evaluateVisibilityCriteriaGroup,
|
@@ -492,7 +488,6 @@ __export(src_exports, {
|
|
492
488
|
getComponentJsonPointer: () => getComponentJsonPointer,
|
493
489
|
getComponentPath: () => getComponentPath,
|
494
490
|
getDataSourceVariantFromRouteGetParams: () => getDataSourceVariantFromRouteGetParams,
|
495
|
-
getEffectivePropertyValue: () => getEffectivePropertyValue,
|
496
491
|
getLocalizedPropertyValues: () => getLocalizedPropertyValues,
|
497
492
|
getNounForLocation: () => getNounForLocation,
|
498
493
|
getNounForNode: () => getNounForNode,
|
@@ -534,8 +529,7 @@ __export(src_exports, {
|
|
534
529
|
nullLimitPolicy: () => nullLimitPolicy,
|
535
530
|
parseComponentPlaceholderId: () => parseComponentPlaceholderId,
|
536
531
|
parseVariableExpression: () => parseVariableExpression,
|
537
|
-
walkNodeTree: () => walkNodeTree
|
538
|
-
walkPropertyValues: () => walkPropertyValues
|
532
|
+
walkNodeTree: () => walkNodeTree
|
539
533
|
});
|
540
534
|
module.exports = __toCommonJS(src_exports);
|
541
535
|
|
@@ -2015,101 +2009,6 @@ function findParameterInNodeTree(data, predicate) {
|
|
2015
2009
|
return results;
|
2016
2010
|
}
|
2017
2011
|
|
2018
|
-
// src/utils/variables/convertToBindExpression.ts
|
2019
|
-
var bindExpressionPrefix = "#";
|
2020
|
-
var bindExpressionEscapeChars = /* @__PURE__ */ new Set(["#", "\\", "[", "]", ":"]);
|
2021
|
-
function convertToBindExpression(binding) {
|
2022
|
-
if (binding.syntax === "jptr") {
|
2023
|
-
const expressionComponents = [
|
2024
|
-
`${bindExpressionPrefix}${binding.syntax}:${escapeNestedVariableExpressions(
|
2025
|
-
escapeBindExpressionReservedChars(binding.pointer)
|
2026
|
-
)}`
|
2027
|
-
];
|
2028
|
-
if (binding.failureAction && binding.failureAction !== "t") {
|
2029
|
-
expressionComponents.push(`fa=${binding.failureAction}`);
|
2030
|
-
}
|
2031
|
-
if (binding.failureLogLevel && binding.failureLogLevel !== "w") {
|
2032
|
-
expressionComponents.push(`fl=${binding.failureLogLevel}`);
|
2033
|
-
}
|
2034
|
-
if (binding.failureDefault) {
|
2035
|
-
expressionComponents.push(`fd=${escapeBindExpressionDefaultValue(binding.failureDefault)}`);
|
2036
|
-
}
|
2037
|
-
return expressionComponents.join(":");
|
2038
|
-
}
|
2039
|
-
throw new Error(`Unsupported dynamic token binding syntax '${binding.syntax}'`);
|
2040
|
-
}
|
2041
|
-
function escapeNestedVariableExpressions(pointer) {
|
2042
|
-
return pointer.replace(/\$\{([^}]+)\}/g, "$[$1]");
|
2043
|
-
}
|
2044
|
-
function escapeBindExpressionReservedChars(pointer) {
|
2045
|
-
return pointer.split("").map((c) => bindExpressionEscapeChars.has(c) ? `\\${c === ":" ? ";" : c}` : c).join("");
|
2046
|
-
}
|
2047
|
-
function escapeBindExpressionDefaultValue(defaultValue) {
|
2048
|
-
return escapeBindExpressionReservedChars(defaultValue).replace("=", "\\+");
|
2049
|
-
}
|
2050
|
-
|
2051
|
-
// src/utils/variables/createVariableReference.ts
|
2052
|
-
function createVariableReference(variableName) {
|
2053
|
-
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
2054
|
-
}
|
2055
|
-
|
2056
|
-
// src/enhancement/getEffectivePropertyValue.ts
|
2057
|
-
function getEffectivePropertyValue({
|
2058
|
-
property,
|
2059
|
-
conditionIndex,
|
2060
|
-
locale,
|
2061
|
-
strict,
|
2062
|
-
greedyLocaleMatching
|
2063
|
-
}) {
|
2064
|
-
var _a, _b, _c, _d;
|
2065
|
-
if (!property) {
|
2066
|
-
return void 0;
|
2067
|
-
}
|
2068
|
-
let effectiveValue = property.value;
|
2069
|
-
if (conditionIndex >= 0) {
|
2070
|
-
const conditionalValue = (_b = (_a = property.conditions) == null ? void 0 : _a[conditionIndex]) == null ? void 0 : _b.value;
|
2071
|
-
if (conditionalValue === null) {
|
2072
|
-
return void 0;
|
2073
|
-
}
|
2074
|
-
if (conditionalValue !== void 0 || strict) {
|
2075
|
-
effectiveValue = conditionalValue;
|
2076
|
-
}
|
2077
|
-
}
|
2078
|
-
if (locale) {
|
2079
|
-
const localeValue = getLocaleMatch(property.locales, locale, greedyLocaleMatching);
|
2080
|
-
if (localeValue !== void 0 || strict) {
|
2081
|
-
effectiveValue = localeValue;
|
2082
|
-
}
|
2083
|
-
if (conditionIndex >= 0) {
|
2084
|
-
const localeConditionalValue = (_d = (_c = getLocaleMatch(
|
2085
|
-
property.localesConditions,
|
2086
|
-
locale,
|
2087
|
-
greedyLocaleMatching
|
2088
|
-
)) == null ? void 0 : _c[conditionIndex]) == null ? void 0 : _d.value;
|
2089
|
-
if (localeConditionalValue === null) {
|
2090
|
-
return void 0;
|
2091
|
-
}
|
2092
|
-
if (localeConditionalValue !== void 0 || strict) {
|
2093
|
-
effectiveValue = localeConditionalValue;
|
2094
|
-
}
|
2095
|
-
}
|
2096
|
-
}
|
2097
|
-
if (property.connectedData) {
|
2098
|
-
effectiveValue = createVariableReference(convertToBindExpression(property.connectedData));
|
2099
|
-
}
|
2100
|
-
return effectiveValue;
|
2101
|
-
}
|
2102
|
-
function getLocaleMatch(index, locale, greedy) {
|
2103
|
-
if (!index) {
|
2104
|
-
return void 0;
|
2105
|
-
}
|
2106
|
-
const match = index[locale];
|
2107
|
-
if (match === void 0 && greedy) {
|
2108
|
-
return Object.values(index)[0];
|
2109
|
-
}
|
2110
|
-
return match;
|
2111
|
-
}
|
2112
|
-
|
2113
2012
|
// src/enhancement/visibility/evaluateVisibilityCriteriaGroup.ts
|
2114
2013
|
function evaluateVisibilityCriteriaGroup(options) {
|
2115
2014
|
const { criteriaGroup, simplifyCriteria } = options;
|
@@ -2611,33 +2510,6 @@ var UniqueBatchEntries = class {
|
|
2611
2510
|
}
|
2612
2511
|
};
|
2613
2512
|
|
2614
|
-
// src/enhancement/walkPropertyValues.ts
|
2615
|
-
function walkPropertyValues(property, visitor) {
|
2616
|
-
var _a, _b;
|
2617
|
-
const definedLocales = /* @__PURE__ */ new Set([
|
2618
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
2619
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
2620
|
-
]);
|
2621
|
-
const propertyLocales = [void 0, ...definedLocales];
|
2622
|
-
propertyLocales.forEach((locale) => {
|
2623
|
-
var _a2, _b2;
|
2624
|
-
const conditionalValues = (_b2 = locale === void 0 ? property.conditions : (_a2 = property.localesConditions) == null ? void 0 : _a2[locale]) != null ? _b2 : [];
|
2625
|
-
for (let conditionIndex = conditionalValues.length - 1; conditionIndex >= -1; conditionIndex--) {
|
2626
|
-
const value = getEffectivePropertyValue({
|
2627
|
-
property,
|
2628
|
-
locale,
|
2629
|
-
conditionIndex,
|
2630
|
-
strict: true
|
2631
|
-
});
|
2632
|
-
visitor({
|
2633
|
-
locale,
|
2634
|
-
conditionIndex,
|
2635
|
-
value
|
2636
|
-
});
|
2637
|
-
}
|
2638
|
-
});
|
2639
|
-
}
|
2640
|
-
|
2641
2513
|
// src/EntityReleasesClient.ts
|
2642
2514
|
var import_api7 = require("@uniformdev/context/api");
|
2643
2515
|
var releaseContentsUrl = "/api/v1/entity-releases";
|
@@ -3421,6 +3293,13 @@ function bindVariables({
|
|
3421
3293
|
|
3422
3294
|
// src/utils/variables/bindVariablesToObject.ts
|
3423
3295
|
var import_immer = require("immer");
|
3296
|
+
|
3297
|
+
// src/utils/variables/createVariableReference.ts
|
3298
|
+
function createVariableReference(variableName) {
|
3299
|
+
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
3300
|
+
}
|
3301
|
+
|
3302
|
+
// src/utils/variables/bindVariablesToObject.ts
|
3424
3303
|
function bindVariablesToObject(options) {
|
3425
3304
|
return bindVariablesToObjectRecursive(options);
|
3426
3305
|
}
|
@@ -3613,13 +3492,10 @@ var CanvasClientError = import_api16.ApiClientError;
|
|
3613
3492
|
UncachedContentClient,
|
3614
3493
|
UniqueBatchEntries,
|
3615
3494
|
WorkflowClient,
|
3616
|
-
bindExpressionEscapeChars,
|
3617
|
-
bindExpressionPrefix,
|
3618
3495
|
bindVariables,
|
3619
3496
|
bindVariablesToObject,
|
3620
3497
|
compose,
|
3621
3498
|
convertEntryToPutEntry,
|
3622
|
-
convertToBindExpression,
|
3623
3499
|
createBatchEnhancer,
|
3624
3500
|
createCanvasChannel,
|
3625
3501
|
createDynamicInputVisibilityRule,
|
@@ -3630,7 +3506,6 @@ var CanvasClientError = import_api16.ApiClientError;
|
|
3630
3506
|
createUniformApiEnhancer,
|
3631
3507
|
createVariableReference,
|
3632
3508
|
enhance,
|
3633
|
-
escapeBindExpressionDefaultValue,
|
3634
3509
|
evaluateNodeVisibilityParameter,
|
3635
3510
|
evaluatePropertyCriteria,
|
3636
3511
|
evaluateVisibilityCriteriaGroup,
|
@@ -3645,7 +3520,6 @@ var CanvasClientError = import_api16.ApiClientError;
|
|
3645
3520
|
getComponentJsonPointer,
|
3646
3521
|
getComponentPath,
|
3647
3522
|
getDataSourceVariantFromRouteGetParams,
|
3648
|
-
getEffectivePropertyValue,
|
3649
3523
|
getLocalizedPropertyValues,
|
3650
3524
|
getNounForLocation,
|
3651
3525
|
getNounForNode,
|
@@ -3687,6 +3561,5 @@ var CanvasClientError = import_api16.ApiClientError;
|
|
3687
3561
|
nullLimitPolicy,
|
3688
3562
|
parseComponentPlaceholderId,
|
3689
3563
|
parseVariableExpression,
|
3690
|
-
walkNodeTree
|
3691
|
-
walkPropertyValues
|
3564
|
+
walkNodeTree
|
3692
3565
|
});
|
package/dist/index.mjs
CHANGED
@@ -1855,101 +1855,6 @@ function findParameterInNodeTree(data, predicate) {
|
|
1855
1855
|
return results;
|
1856
1856
|
}
|
1857
1857
|
|
1858
|
-
// src/utils/variables/convertToBindExpression.ts
|
1859
|
-
var bindExpressionPrefix = "#";
|
1860
|
-
var bindExpressionEscapeChars = /* @__PURE__ */ new Set(["#", "\\", "[", "]", ":"]);
|
1861
|
-
function convertToBindExpression(binding) {
|
1862
|
-
if (binding.syntax === "jptr") {
|
1863
|
-
const expressionComponents = [
|
1864
|
-
`${bindExpressionPrefix}${binding.syntax}:${escapeNestedVariableExpressions(
|
1865
|
-
escapeBindExpressionReservedChars(binding.pointer)
|
1866
|
-
)}`
|
1867
|
-
];
|
1868
|
-
if (binding.failureAction && binding.failureAction !== "t") {
|
1869
|
-
expressionComponents.push(`fa=${binding.failureAction}`);
|
1870
|
-
}
|
1871
|
-
if (binding.failureLogLevel && binding.failureLogLevel !== "w") {
|
1872
|
-
expressionComponents.push(`fl=${binding.failureLogLevel}`);
|
1873
|
-
}
|
1874
|
-
if (binding.failureDefault) {
|
1875
|
-
expressionComponents.push(`fd=${escapeBindExpressionDefaultValue(binding.failureDefault)}`);
|
1876
|
-
}
|
1877
|
-
return expressionComponents.join(":");
|
1878
|
-
}
|
1879
|
-
throw new Error(`Unsupported dynamic token binding syntax '${binding.syntax}'`);
|
1880
|
-
}
|
1881
|
-
function escapeNestedVariableExpressions(pointer) {
|
1882
|
-
return pointer.replace(/\$\{([^}]+)\}/g, "$[$1]");
|
1883
|
-
}
|
1884
|
-
function escapeBindExpressionReservedChars(pointer) {
|
1885
|
-
return pointer.split("").map((c) => bindExpressionEscapeChars.has(c) ? `\\${c === ":" ? ";" : c}` : c).join("");
|
1886
|
-
}
|
1887
|
-
function escapeBindExpressionDefaultValue(defaultValue) {
|
1888
|
-
return escapeBindExpressionReservedChars(defaultValue).replace("=", "\\+");
|
1889
|
-
}
|
1890
|
-
|
1891
|
-
// src/utils/variables/createVariableReference.ts
|
1892
|
-
function createVariableReference(variableName) {
|
1893
|
-
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
1894
|
-
}
|
1895
|
-
|
1896
|
-
// src/enhancement/getEffectivePropertyValue.ts
|
1897
|
-
function getEffectivePropertyValue({
|
1898
|
-
property,
|
1899
|
-
conditionIndex,
|
1900
|
-
locale,
|
1901
|
-
strict,
|
1902
|
-
greedyLocaleMatching
|
1903
|
-
}) {
|
1904
|
-
var _a, _b, _c, _d;
|
1905
|
-
if (!property) {
|
1906
|
-
return void 0;
|
1907
|
-
}
|
1908
|
-
let effectiveValue = property.value;
|
1909
|
-
if (conditionIndex >= 0) {
|
1910
|
-
const conditionalValue = (_b = (_a = property.conditions) == null ? void 0 : _a[conditionIndex]) == null ? void 0 : _b.value;
|
1911
|
-
if (conditionalValue === null) {
|
1912
|
-
return void 0;
|
1913
|
-
}
|
1914
|
-
if (conditionalValue !== void 0 || strict) {
|
1915
|
-
effectiveValue = conditionalValue;
|
1916
|
-
}
|
1917
|
-
}
|
1918
|
-
if (locale) {
|
1919
|
-
const localeValue = getLocaleMatch(property.locales, locale, greedyLocaleMatching);
|
1920
|
-
if (localeValue !== void 0 || strict) {
|
1921
|
-
effectiveValue = localeValue;
|
1922
|
-
}
|
1923
|
-
if (conditionIndex >= 0) {
|
1924
|
-
const localeConditionalValue = (_d = (_c = getLocaleMatch(
|
1925
|
-
property.localesConditions,
|
1926
|
-
locale,
|
1927
|
-
greedyLocaleMatching
|
1928
|
-
)) == null ? void 0 : _c[conditionIndex]) == null ? void 0 : _d.value;
|
1929
|
-
if (localeConditionalValue === null) {
|
1930
|
-
return void 0;
|
1931
|
-
}
|
1932
|
-
if (localeConditionalValue !== void 0 || strict) {
|
1933
|
-
effectiveValue = localeConditionalValue;
|
1934
|
-
}
|
1935
|
-
}
|
1936
|
-
}
|
1937
|
-
if (property.connectedData) {
|
1938
|
-
effectiveValue = createVariableReference(convertToBindExpression(property.connectedData));
|
1939
|
-
}
|
1940
|
-
return effectiveValue;
|
1941
|
-
}
|
1942
|
-
function getLocaleMatch(index, locale, greedy) {
|
1943
|
-
if (!index) {
|
1944
|
-
return void 0;
|
1945
|
-
}
|
1946
|
-
const match = index[locale];
|
1947
|
-
if (match === void 0 && greedy) {
|
1948
|
-
return Object.values(index)[0];
|
1949
|
-
}
|
1950
|
-
return match;
|
1951
|
-
}
|
1952
|
-
|
1953
1858
|
// src/enhancement/visibility/evaluateVisibilityCriteriaGroup.ts
|
1954
1859
|
function evaluateVisibilityCriteriaGroup(options) {
|
1955
1860
|
const { criteriaGroup, simplifyCriteria } = options;
|
@@ -2451,33 +2356,6 @@ var UniqueBatchEntries = class {
|
|
2451
2356
|
}
|
2452
2357
|
};
|
2453
2358
|
|
2454
|
-
// src/enhancement/walkPropertyValues.ts
|
2455
|
-
function walkPropertyValues(property, visitor) {
|
2456
|
-
var _a, _b;
|
2457
|
-
const definedLocales = /* @__PURE__ */ new Set([
|
2458
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
2459
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
2460
|
-
]);
|
2461
|
-
const propertyLocales = [void 0, ...definedLocales];
|
2462
|
-
propertyLocales.forEach((locale) => {
|
2463
|
-
var _a2, _b2;
|
2464
|
-
const conditionalValues = (_b2 = locale === void 0 ? property.conditions : (_a2 = property.localesConditions) == null ? void 0 : _a2[locale]) != null ? _b2 : [];
|
2465
|
-
for (let conditionIndex = conditionalValues.length - 1; conditionIndex >= -1; conditionIndex--) {
|
2466
|
-
const value = getEffectivePropertyValue({
|
2467
|
-
property,
|
2468
|
-
locale,
|
2469
|
-
conditionIndex,
|
2470
|
-
strict: true
|
2471
|
-
});
|
2472
|
-
visitor({
|
2473
|
-
locale,
|
2474
|
-
conditionIndex,
|
2475
|
-
value
|
2476
|
-
});
|
2477
|
-
}
|
2478
|
-
});
|
2479
|
-
}
|
2480
|
-
|
2481
2359
|
// src/EntityReleasesClient.ts
|
2482
2360
|
import { ApiClient as ApiClient6 } from "@uniformdev/context/api";
|
2483
2361
|
var releaseContentsUrl = "/api/v1/entity-releases";
|
@@ -3261,6 +3139,13 @@ function bindVariables({
|
|
3261
3139
|
|
3262
3140
|
// src/utils/variables/bindVariablesToObject.ts
|
3263
3141
|
import { isDraft, produce } from "immer";
|
3142
|
+
|
3143
|
+
// src/utils/variables/createVariableReference.ts
|
3144
|
+
function createVariableReference(variableName) {
|
3145
|
+
return `\${${variableName.replace(/([${}])/g, "\\$1")}}`;
|
3146
|
+
}
|
3147
|
+
|
3148
|
+
// src/utils/variables/bindVariablesToObject.ts
|
3264
3149
|
function bindVariablesToObject(options) {
|
3265
3150
|
return bindVariablesToObjectRecursive(options);
|
3266
3151
|
}
|
@@ -3452,13 +3337,10 @@ export {
|
|
3452
3337
|
UncachedContentClient,
|
3453
3338
|
UniqueBatchEntries,
|
3454
3339
|
WorkflowClient,
|
3455
|
-
bindExpressionEscapeChars,
|
3456
|
-
bindExpressionPrefix,
|
3457
3340
|
bindVariables,
|
3458
3341
|
bindVariablesToObject,
|
3459
3342
|
compose,
|
3460
3343
|
convertEntryToPutEntry,
|
3461
|
-
convertToBindExpression,
|
3462
3344
|
createBatchEnhancer,
|
3463
3345
|
createCanvasChannel,
|
3464
3346
|
createDynamicInputVisibilityRule,
|
@@ -3469,7 +3351,6 @@ export {
|
|
3469
3351
|
createUniformApiEnhancer,
|
3470
3352
|
createVariableReference,
|
3471
3353
|
enhance,
|
3472
|
-
escapeBindExpressionDefaultValue,
|
3473
3354
|
evaluateNodeVisibilityParameter,
|
3474
3355
|
evaluatePropertyCriteria,
|
3475
3356
|
evaluateVisibilityCriteriaGroup,
|
@@ -3484,7 +3365,6 @@ export {
|
|
3484
3365
|
getComponentJsonPointer,
|
3485
3366
|
getComponentPath,
|
3486
3367
|
getDataSourceVariantFromRouteGetParams,
|
3487
|
-
getEffectivePropertyValue,
|
3488
3368
|
getLocalizedPropertyValues,
|
3489
3369
|
getNounForLocation,
|
3490
3370
|
getNounForNode,
|
@@ -3526,6 +3406,5 @@ export {
|
|
3526
3406
|
nullLimitPolicy,
|
3527
3407
|
parseComponentPlaceholderId,
|
3528
3408
|
parseVariableExpression,
|
3529
|
-
walkNodeTree
|
3530
|
-
walkPropertyValues
|
3409
|
+
walkNodeTree
|
3531
3410
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "
|
3
|
+
"version": "20.0.0",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,9 +38,9 @@
|
|
38
38
|
"p-throttle": "5.0.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "
|
42
|
-
"@uniformdev/context": "
|
43
|
-
"@uniformdev/richtext": "
|
41
|
+
"@uniformdev/assets": "20.0.0",
|
42
|
+
"@uniformdev/context": "20.0.0",
|
43
|
+
"@uniformdev/richtext": "20.0.0",
|
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": "0b9d400da380979e899844d2c900fc05f2f34af8"
|
53
53
|
}
|