@uniformdev/canvas 19.194.0 → 19.194.1-alpha.4
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 +14 -83
- package/dist/index.d.ts +14 -83
- package/dist/index.esm.js +30 -0
- package/dist/index.js +34 -0
- package/dist/index.mjs +30 -0
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@uniformdev/context/api';
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
|
-
import { AssetGetResponseSingle } from '@uniformdev/assets';
|
3
|
+
import { AssetGetResponseSingle, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
|
+
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
5
|
import { Quirks, StorageCommands, PersonalizedVariant, TestVariant } from '@uniformdev/context';
|
5
6
|
import Pusher from 'pusher-js';
|
6
7
|
import { Options as Options$1 } from 'p-retry';
|
@@ -21705,7 +21706,7 @@ interface external$6 {
|
|
21705
21706
|
* undefined: Data resources were resolved using published data from their data source
|
21706
21707
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21707
21708
|
*/
|
21708
|
-
|
21709
|
+
dataSourceVariant?: external$6["../../../lambda/functions/v1-route.swagger.yml"]["components"]["parameters"]["dataSourceVariant"];
|
21709
21710
|
};
|
21710
21711
|
};
|
21711
21712
|
responses: {
|
@@ -21758,7 +21759,7 @@ interface external$6 {
|
|
21758
21759
|
*
|
21759
21760
|
* @enum {string}
|
21760
21761
|
*/
|
21761
|
-
|
21762
|
+
dataSourceVariant?: "unpublished";
|
21762
21763
|
/** @enum {string} */
|
21763
21764
|
type: "composition";
|
21764
21765
|
compositionApiResponse: external$6["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
|
@@ -21844,7 +21845,7 @@ interface external$6 {
|
|
21844
21845
|
* undefined: Data resources were resolved using published data from their data source
|
21845
21846
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21846
21847
|
*/
|
21847
|
-
|
21848
|
+
dataSourceVariant: "unpublished";
|
21848
21849
|
};
|
21849
21850
|
};
|
21850
21851
|
operations: {};
|
@@ -21925,7 +21926,7 @@ interface paths$5 {
|
|
21925
21926
|
* undefined: Data resources were resolved using published data from their data source
|
21926
21927
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21927
21928
|
*/
|
21928
|
-
|
21929
|
+
dataSourceVariant?: components$3["parameters"]["dataSourceVariant"];
|
21929
21930
|
};
|
21930
21931
|
};
|
21931
21932
|
responses: {
|
@@ -21978,7 +21979,7 @@ interface components$3 {
|
|
21978
21979
|
*
|
21979
21980
|
* @enum {string}
|
21980
21981
|
*/
|
21981
|
-
|
21982
|
+
dataSourceVariant?: "unpublished";
|
21982
21983
|
/** @enum {string} */
|
21983
21984
|
type: "composition";
|
21984
21985
|
compositionApiResponse: external$5["v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
|
@@ -22064,7 +22065,7 @@ interface components$3 {
|
|
22064
22065
|
* undefined: Data resources were resolved using published data from their data source
|
22065
22066
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
22066
22067
|
*/
|
22067
|
-
|
22068
|
+
dataSourceVariant: "unpublished";
|
22068
22069
|
};
|
22069
22070
|
}
|
22070
22071
|
interface external$5 {
|
@@ -24800,81 +24801,6 @@ type schemas = components$4['schemas'];
|
|
24800
24801
|
type InvalidationPayload = schemas['InvalidationPayload'];
|
24801
24802
|
type BatchInvalidationPayload = schemas['BatchInvalidationPayload'];
|
24802
24803
|
|
24803
|
-
type AssetParamValue = AssetParamValueItem[];
|
24804
|
-
type AssetParamValueItem = {
|
24805
|
-
type: string;
|
24806
|
-
_id: string;
|
24807
|
-
/**
|
24808
|
-
* Internal Uniform source ID or
|
24809
|
-
* dataType ID of the global integration library
|
24810
|
-
* which created this asset item
|
24811
|
-
*/
|
24812
|
-
_source?: string;
|
24813
|
-
fields: {
|
24814
|
-
url: {
|
24815
|
-
type: 'text';
|
24816
|
-
value: string;
|
24817
|
-
};
|
24818
|
-
id?: {
|
24819
|
-
type: 'text';
|
24820
|
-
value: string | undefined;
|
24821
|
-
};
|
24822
|
-
title?: {
|
24823
|
-
type: 'text';
|
24824
|
-
value: string | undefined;
|
24825
|
-
};
|
24826
|
-
description?: {
|
24827
|
-
type: 'text';
|
24828
|
-
value: string | undefined;
|
24829
|
-
};
|
24830
|
-
mediaType?: {
|
24831
|
-
type: 'text';
|
24832
|
-
value: string | undefined;
|
24833
|
-
};
|
24834
|
-
/**
|
24835
|
-
* The width of the original asset
|
24836
|
-
*
|
24837
|
-
* Should resolve to a number but might
|
24838
|
-
* be a string with a pointer reference
|
24839
|
-
*/
|
24840
|
-
width?: {
|
24841
|
-
type: 'number';
|
24842
|
-
value: number | string | undefined;
|
24843
|
-
};
|
24844
|
-
/**
|
24845
|
-
* The height of the original asset
|
24846
|
-
*
|
24847
|
-
* Should resolve to a number but might
|
24848
|
-
* be a string with a pointer reference
|
24849
|
-
*/
|
24850
|
-
height?: {
|
24851
|
-
type: 'number';
|
24852
|
-
value: number | string | undefined;
|
24853
|
-
};
|
24854
|
-
/**
|
24855
|
-
* The size in bytes of the original asset
|
24856
|
-
*
|
24857
|
-
* Should resolve to a number but might
|
24858
|
-
* be a string with a pointer reference
|
24859
|
-
*/
|
24860
|
-
size?: {
|
24861
|
-
type: 'number';
|
24862
|
-
value: number | string | undefined;
|
24863
|
-
};
|
24864
|
-
/**
|
24865
|
-
* Any key/value properties which the source
|
24866
|
-
* wants to attach to the asset data
|
24867
|
-
*/
|
24868
|
-
custom?: {
|
24869
|
-
type: string;
|
24870
|
-
value: Record<string, unknown>;
|
24871
|
-
};
|
24872
|
-
};
|
24873
|
-
_overrides?: {
|
24874
|
-
fields: ComponentOverride['parameters'];
|
24875
|
-
};
|
24876
|
-
};
|
24877
|
-
|
24878
24804
|
type LinkParameterType = 'projectMapNode' | 'url' | 'tel' | 'email';
|
24879
24805
|
type LinkTypeConfiguration = Partial<Record<LinkParameterType, boolean>>;
|
24880
24806
|
type LinkParamConfiguration = {
|
@@ -29373,6 +29299,8 @@ declare const createUniformApiEnhancer: ({ apiUrl }: {
|
|
29373
29299
|
*/
|
29374
29300
|
declare function convertEntryToPutEntry(entry: Entry): PutEntryBody;
|
29375
29301
|
|
29302
|
+
declare const getDataSourceVariantFromRouteGetParams: (params: Partial<RouteGetParameters>, defaultPreviewState?: number) => "unpublished" | undefined;
|
29303
|
+
|
29376
29304
|
declare const ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
29377
29305
|
declare const ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
29378
29306
|
declare const ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
@@ -29411,6 +29339,9 @@ declare function isRootEntryReference(root: NodeLocationReference): root is Root
|
|
29411
29339
|
* looks like Entry data
|
29412
29340
|
*/
|
29413
29341
|
declare function isEntryData(entryData: ComponentInstance | EntryData | null | undefined | unknown): entryData is EntryData;
|
29342
|
+
declare function isEntry(entry: null | undefined | unknown): entry is Entry;
|
29343
|
+
declare function isAssetData(assetData: null | undefined | unknown): assetData is AssetGetResponseSingle;
|
29344
|
+
declare function isComposition(componentInstance: null | undefined | unknown): componentInstance is CompositionGetResponse;
|
29414
29345
|
/**
|
29415
29346
|
* A fast, non-exhaustive guard which checks that the value is an array
|
29416
29347
|
* as well as the first item, if there is one, looks like an asset item
|
@@ -29610,4 +29541,4 @@ declare class WorkflowClient extends ApiClient {
|
|
29610
29541
|
|
29611
29542
|
declare const CanvasClientError: typeof ApiClientError;
|
29612
29543
|
|
29613
|
-
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_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, type ChannelSubscription, 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 ComponentLocationReferenceV2, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDataDiagnostic, type CompositionDeleteParameters, type CompositionDiagnostics, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetOrderBy, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionIssue, type CompositionPatternIssue, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, 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 EventNames, 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 LinkComponentParameterValue, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeDeprecatedOptions, type LocalizeModernOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, type PreviewEventBus, type PreviewPanelSettings, type ProjectMapLinkComponentParameterValue, 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 SubscribeToCompositionOptions, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UnsubscribeCallback, 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 WalkComponentTreeActions, 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, createEventBus, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getChannelName, getComponentJsonPointer, getComponentPath, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, getPropertyValue, 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, subscribeToComposition, walkComponentTree, walkNodeTree };
|
29544
|
+
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_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, type ChannelSubscription, 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 ComponentLocationReferenceV2, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDataDiagnostic, type CompositionDeleteParameters, type CompositionDiagnostics, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetOrderBy, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionIssue, type CompositionPatternIssue, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, 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 EventNames, 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 LinkComponentParameterValue, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeDeprecatedOptions, type LocalizeModernOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, type PreviewEventBus, type PreviewPanelSettings, type ProjectMapLinkComponentParameterValue, 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 SubscribeToCompositionOptions, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UnsubscribeCallback, 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 WalkComponentTreeActions, 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, createEventBus, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getChannelName, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, getPropertyValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetData, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isComposition, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntry, 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, subscribeToComposition, walkComponentTree, walkNodeTree };
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@uniformdev/context/api';
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
|
-
import { AssetGetResponseSingle } from '@uniformdev/assets';
|
3
|
+
import { AssetGetResponseSingle, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
|
+
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
5
|
import { Quirks, StorageCommands, PersonalizedVariant, TestVariant } from '@uniformdev/context';
|
5
6
|
import Pusher from 'pusher-js';
|
6
7
|
import { Options as Options$1 } from 'p-retry';
|
@@ -21705,7 +21706,7 @@ interface external$6 {
|
|
21705
21706
|
* undefined: Data resources were resolved using published data from their data source
|
21706
21707
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21707
21708
|
*/
|
21708
|
-
|
21709
|
+
dataSourceVariant?: external$6["../../../lambda/functions/v1-route.swagger.yml"]["components"]["parameters"]["dataSourceVariant"];
|
21709
21710
|
};
|
21710
21711
|
};
|
21711
21712
|
responses: {
|
@@ -21758,7 +21759,7 @@ interface external$6 {
|
|
21758
21759
|
*
|
21759
21760
|
* @enum {string}
|
21760
21761
|
*/
|
21761
|
-
|
21762
|
+
dataSourceVariant?: "unpublished";
|
21762
21763
|
/** @enum {string} */
|
21763
21764
|
type: "composition";
|
21764
21765
|
compositionApiResponse: external$6["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
|
@@ -21844,7 +21845,7 @@ interface external$6 {
|
|
21844
21845
|
* undefined: Data resources were resolved using published data from their data source
|
21845
21846
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21846
21847
|
*/
|
21847
|
-
|
21848
|
+
dataSourceVariant: "unpublished";
|
21848
21849
|
};
|
21849
21850
|
};
|
21850
21851
|
operations: {};
|
@@ -21925,7 +21926,7 @@ interface paths$5 {
|
|
21925
21926
|
* undefined: Data resources were resolved using published data from their data source
|
21926
21927
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
21927
21928
|
*/
|
21928
|
-
|
21929
|
+
dataSourceVariant?: components$3["parameters"]["dataSourceVariant"];
|
21929
21930
|
};
|
21930
21931
|
};
|
21931
21932
|
responses: {
|
@@ -21978,7 +21979,7 @@ interface components$3 {
|
|
21978
21979
|
*
|
21979
21980
|
* @enum {string}
|
21980
21981
|
*/
|
21981
|
-
|
21982
|
+
dataSourceVariant?: "unpublished";
|
21982
21983
|
/** @enum {string} */
|
21983
21984
|
type: "composition";
|
21984
21985
|
compositionApiResponse: external$5["v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
|
@@ -22064,7 +22065,7 @@ interface components$3 {
|
|
22064
22065
|
* undefined: Data resources were resolved using published data from their data source
|
22065
22066
|
* unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
|
22066
22067
|
*/
|
22067
|
-
|
22068
|
+
dataSourceVariant: "unpublished";
|
22068
22069
|
};
|
22069
22070
|
}
|
22070
22071
|
interface external$5 {
|
@@ -24800,81 +24801,6 @@ type schemas = components$4['schemas'];
|
|
24800
24801
|
type InvalidationPayload = schemas['InvalidationPayload'];
|
24801
24802
|
type BatchInvalidationPayload = schemas['BatchInvalidationPayload'];
|
24802
24803
|
|
24803
|
-
type AssetParamValue = AssetParamValueItem[];
|
24804
|
-
type AssetParamValueItem = {
|
24805
|
-
type: string;
|
24806
|
-
_id: string;
|
24807
|
-
/**
|
24808
|
-
* Internal Uniform source ID or
|
24809
|
-
* dataType ID of the global integration library
|
24810
|
-
* which created this asset item
|
24811
|
-
*/
|
24812
|
-
_source?: string;
|
24813
|
-
fields: {
|
24814
|
-
url: {
|
24815
|
-
type: 'text';
|
24816
|
-
value: string;
|
24817
|
-
};
|
24818
|
-
id?: {
|
24819
|
-
type: 'text';
|
24820
|
-
value: string | undefined;
|
24821
|
-
};
|
24822
|
-
title?: {
|
24823
|
-
type: 'text';
|
24824
|
-
value: string | undefined;
|
24825
|
-
};
|
24826
|
-
description?: {
|
24827
|
-
type: 'text';
|
24828
|
-
value: string | undefined;
|
24829
|
-
};
|
24830
|
-
mediaType?: {
|
24831
|
-
type: 'text';
|
24832
|
-
value: string | undefined;
|
24833
|
-
};
|
24834
|
-
/**
|
24835
|
-
* The width of the original asset
|
24836
|
-
*
|
24837
|
-
* Should resolve to a number but might
|
24838
|
-
* be a string with a pointer reference
|
24839
|
-
*/
|
24840
|
-
width?: {
|
24841
|
-
type: 'number';
|
24842
|
-
value: number | string | undefined;
|
24843
|
-
};
|
24844
|
-
/**
|
24845
|
-
* The height of the original asset
|
24846
|
-
*
|
24847
|
-
* Should resolve to a number but might
|
24848
|
-
* be a string with a pointer reference
|
24849
|
-
*/
|
24850
|
-
height?: {
|
24851
|
-
type: 'number';
|
24852
|
-
value: number | string | undefined;
|
24853
|
-
};
|
24854
|
-
/**
|
24855
|
-
* The size in bytes of the original asset
|
24856
|
-
*
|
24857
|
-
* Should resolve to a number but might
|
24858
|
-
* be a string with a pointer reference
|
24859
|
-
*/
|
24860
|
-
size?: {
|
24861
|
-
type: 'number';
|
24862
|
-
value: number | string | undefined;
|
24863
|
-
};
|
24864
|
-
/**
|
24865
|
-
* Any key/value properties which the source
|
24866
|
-
* wants to attach to the asset data
|
24867
|
-
*/
|
24868
|
-
custom?: {
|
24869
|
-
type: string;
|
24870
|
-
value: Record<string, unknown>;
|
24871
|
-
};
|
24872
|
-
};
|
24873
|
-
_overrides?: {
|
24874
|
-
fields: ComponentOverride['parameters'];
|
24875
|
-
};
|
24876
|
-
};
|
24877
|
-
|
24878
24804
|
type LinkParameterType = 'projectMapNode' | 'url' | 'tel' | 'email';
|
24879
24805
|
type LinkTypeConfiguration = Partial<Record<LinkParameterType, boolean>>;
|
24880
24806
|
type LinkParamConfiguration = {
|
@@ -29373,6 +29299,8 @@ declare const createUniformApiEnhancer: ({ apiUrl }: {
|
|
29373
29299
|
*/
|
29374
29300
|
declare function convertEntryToPutEntry(entry: Entry): PutEntryBody;
|
29375
29301
|
|
29302
|
+
declare const getDataSourceVariantFromRouteGetParams: (params: Partial<RouteGetParameters>, defaultPreviewState?: number) => "unpublished" | undefined;
|
29303
|
+
|
29376
29304
|
declare const ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
29377
29305
|
declare const ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
29378
29306
|
declare const ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
@@ -29411,6 +29339,9 @@ declare function isRootEntryReference(root: NodeLocationReference): root is Root
|
|
29411
29339
|
* looks like Entry data
|
29412
29340
|
*/
|
29413
29341
|
declare function isEntryData(entryData: ComponentInstance | EntryData | null | undefined | unknown): entryData is EntryData;
|
29342
|
+
declare function isEntry(entry: null | undefined | unknown): entry is Entry;
|
29343
|
+
declare function isAssetData(assetData: null | undefined | unknown): assetData is AssetGetResponseSingle;
|
29344
|
+
declare function isComposition(componentInstance: null | undefined | unknown): componentInstance is CompositionGetResponse;
|
29414
29345
|
/**
|
29415
29346
|
* A fast, non-exhaustive guard which checks that the value is an array
|
29416
29347
|
* as well as the first item, if there is one, looks like an asset item
|
@@ -29610,4 +29541,4 @@ declare class WorkflowClient extends ApiClient {
|
|
29610
29541
|
|
29611
29542
|
declare const CanvasClientError: typeof ApiClientError;
|
29612
29543
|
|
29613
|
-
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_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, type ChannelSubscription, 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 ComponentLocationReferenceV2, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDataDiagnostic, type CompositionDeleteParameters, type CompositionDiagnostics, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetOrderBy, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionIssue, type CompositionPatternIssue, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, 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 EventNames, 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 LinkComponentParameterValue, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeDeprecatedOptions, type LocalizeModernOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, type PreviewEventBus, type PreviewPanelSettings, type ProjectMapLinkComponentParameterValue, 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 SubscribeToCompositionOptions, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UnsubscribeCallback, 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 WalkComponentTreeActions, 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, createEventBus, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getChannelName, getComponentJsonPointer, getComponentPath, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, getPropertyValue, 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, subscribeToComposition, walkComponentTree, walkNodeTree };
|
29544
|
+
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_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, type ChannelSubscription, 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 ComponentLocationReferenceV2, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDataDiagnostic, type CompositionDeleteParameters, type CompositionDiagnostics, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetOrderBy, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionIssue, type CompositionPatternIssue, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, 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 EventNames, 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 LinkComponentParameterValue, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeDeprecatedOptions, type LocalizeModernOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type NodeLocationReference, type NonProjectMapLinkParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, type PreviewEventBus, type PreviewPanelSettings, type ProjectMapLinkComponentParameterValue, 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 SubscribeToCompositionOptions, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UnsubscribeCallback, 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 WalkComponentTreeActions, 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, createEventBus, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getChannelName, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, getPropertyValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetData, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isComposition, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntry, 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, subscribeToComposition, walkComponentTree, walkNodeTree };
|
package/dist/index.esm.js
CHANGED
@@ -975,6 +975,19 @@ function isRootEntryReference(root) {
|
|
975
975
|
function isEntryData(entryData) {
|
976
976
|
return Boolean(entryData && typeof entryData === "object" && "fields" in entryData);
|
977
977
|
}
|
978
|
+
function isEntry(entry) {
|
979
|
+
return Boolean(entry && typeof entry === "object" && "entry" in entry);
|
980
|
+
}
|
981
|
+
function isAssetData(assetData) {
|
982
|
+
return Boolean(
|
983
|
+
assetData && typeof assetData === "object" && "asset" in assetData && assetData.asset instanceof Object && "type" in assetData.asset && assetData.asset.type === "image"
|
984
|
+
);
|
985
|
+
}
|
986
|
+
function isComposition(componentInstance) {
|
987
|
+
return Boolean(
|
988
|
+
componentInstance && typeof componentInstance === "object" && "composition" in componentInstance
|
989
|
+
);
|
990
|
+
}
|
978
991
|
function isAssetParamValue(value) {
|
979
992
|
return Array.isArray(value) && (value.length > 0 ? isAssetParamValueItem(value[0]) : true);
|
980
993
|
}
|
@@ -2972,6 +2985,19 @@ function convertEntryToPutEntry(entry) {
|
|
2972
2985
|
};
|
2973
2986
|
}
|
2974
2987
|
|
2988
|
+
// src/utils/getDataSourceVariantFromRouteGetParams.ts
|
2989
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
2990
|
+
var _a, _b;
|
2991
|
+
const dataSourceVariant = (
|
2992
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
2993
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
2994
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
2995
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
2996
|
+
)
|
2997
|
+
);
|
2998
|
+
return dataSourceVariant;
|
2999
|
+
};
|
3000
|
+
|
2975
3001
|
// src/utils/getParameterAttributes.ts
|
2976
3002
|
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
2977
3003
|
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
@@ -3343,6 +3369,7 @@ export {
|
|
3343
3369
|
getChannelName,
|
3344
3370
|
getComponentJsonPointer,
|
3345
3371
|
getComponentPath,
|
3372
|
+
getDataSourceVariantFromRouteGetParams,
|
3346
3373
|
getLocalizedPropertyValues,
|
3347
3374
|
getNounForLocation,
|
3348
3375
|
getNounForNode,
|
@@ -3352,12 +3379,15 @@ export {
|
|
3352
3379
|
hasReferencedVariables,
|
3353
3380
|
isAddComponentMessage,
|
3354
3381
|
isAllowedReferrer,
|
3382
|
+
isAssetData,
|
3355
3383
|
isAssetParamValue,
|
3356
3384
|
isAssetParamValueItem,
|
3357
3385
|
isComponentActionMessage,
|
3358
3386
|
isComponentPlaceholderId,
|
3387
|
+
isComposition,
|
3359
3388
|
isContextStorageUpdatedMessage,
|
3360
3389
|
isDismissPlaceholderMessage,
|
3390
|
+
isEntry,
|
3361
3391
|
isEntryData,
|
3362
3392
|
isLinkParamValue,
|
3363
3393
|
isMovingComponentMessage,
|
package/dist/index.js
CHANGED
@@ -369,6 +369,7 @@ __export(src_exports, {
|
|
369
369
|
getChannelName: () => getChannelName,
|
370
370
|
getComponentJsonPointer: () => getComponentJsonPointer,
|
371
371
|
getComponentPath: () => getComponentPath,
|
372
|
+
getDataSourceVariantFromRouteGetParams: () => getDataSourceVariantFromRouteGetParams,
|
372
373
|
getLocalizedPropertyValues: () => getLocalizedPropertyValues,
|
373
374
|
getNounForLocation: () => getNounForLocation,
|
374
375
|
getNounForNode: () => getNounForNode,
|
@@ -378,12 +379,15 @@ __export(src_exports, {
|
|
378
379
|
hasReferencedVariables: () => hasReferencedVariables,
|
379
380
|
isAddComponentMessage: () => isAddComponentMessage,
|
380
381
|
isAllowedReferrer: () => isAllowedReferrer,
|
382
|
+
isAssetData: () => isAssetData,
|
381
383
|
isAssetParamValue: () => isAssetParamValue,
|
382
384
|
isAssetParamValueItem: () => isAssetParamValueItem,
|
383
385
|
isComponentActionMessage: () => isComponentActionMessage,
|
384
386
|
isComponentPlaceholderId: () => isComponentPlaceholderId,
|
387
|
+
isComposition: () => isComposition,
|
385
388
|
isContextStorageUpdatedMessage: () => isContextStorageUpdatedMessage,
|
386
389
|
isDismissPlaceholderMessage: () => isDismissPlaceholderMessage,
|
390
|
+
isEntry: () => isEntry,
|
387
391
|
isEntryData: () => isEntryData,
|
388
392
|
isLinkParamValue: () => isLinkParamValue,
|
389
393
|
isMovingComponentMessage: () => isMovingComponentMessage,
|
@@ -1131,6 +1135,19 @@ function isRootEntryReference(root) {
|
|
1131
1135
|
function isEntryData(entryData) {
|
1132
1136
|
return Boolean(entryData && typeof entryData === "object" && "fields" in entryData);
|
1133
1137
|
}
|
1138
|
+
function isEntry(entry) {
|
1139
|
+
return Boolean(entry && typeof entry === "object" && "entry" in entry);
|
1140
|
+
}
|
1141
|
+
function isAssetData(assetData) {
|
1142
|
+
return Boolean(
|
1143
|
+
assetData && typeof assetData === "object" && "asset" in assetData && assetData.asset instanceof Object && "type" in assetData.asset && assetData.asset.type === "image"
|
1144
|
+
);
|
1145
|
+
}
|
1146
|
+
function isComposition(componentInstance) {
|
1147
|
+
return Boolean(
|
1148
|
+
componentInstance && typeof componentInstance === "object" && "composition" in componentInstance
|
1149
|
+
);
|
1150
|
+
}
|
1134
1151
|
function isAssetParamValue(value) {
|
1135
1152
|
return Array.isArray(value) && (value.length > 0 ? isAssetParamValueItem(value[0]) : true);
|
1136
1153
|
}
|
@@ -3128,6 +3145,19 @@ function convertEntryToPutEntry(entry) {
|
|
3128
3145
|
};
|
3129
3146
|
}
|
3130
3147
|
|
3148
|
+
// src/utils/getDataSourceVariantFromRouteGetParams.ts
|
3149
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
3150
|
+
var _a, _b;
|
3151
|
+
const dataSourceVariant = (
|
3152
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
3153
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
3154
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
3155
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
3156
|
+
)
|
3157
|
+
);
|
3158
|
+
return dataSourceVariant;
|
3159
|
+
};
|
3160
|
+
|
3131
3161
|
// src/utils/getParameterAttributes.ts
|
3132
3162
|
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
3133
3163
|
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
@@ -3500,6 +3530,7 @@ var CanvasClientError = import_api15.ApiClientError;
|
|
3500
3530
|
getChannelName,
|
3501
3531
|
getComponentJsonPointer,
|
3502
3532
|
getComponentPath,
|
3533
|
+
getDataSourceVariantFromRouteGetParams,
|
3503
3534
|
getLocalizedPropertyValues,
|
3504
3535
|
getNounForLocation,
|
3505
3536
|
getNounForNode,
|
@@ -3509,12 +3540,15 @@ var CanvasClientError = import_api15.ApiClientError;
|
|
3509
3540
|
hasReferencedVariables,
|
3510
3541
|
isAddComponentMessage,
|
3511
3542
|
isAllowedReferrer,
|
3543
|
+
isAssetData,
|
3512
3544
|
isAssetParamValue,
|
3513
3545
|
isAssetParamValueItem,
|
3514
3546
|
isComponentActionMessage,
|
3515
3547
|
isComponentPlaceholderId,
|
3548
|
+
isComposition,
|
3516
3549
|
isContextStorageUpdatedMessage,
|
3517
3550
|
isDismissPlaceholderMessage,
|
3551
|
+
isEntry,
|
3518
3552
|
isEntryData,
|
3519
3553
|
isLinkParamValue,
|
3520
3554
|
isMovingComponentMessage,
|
package/dist/index.mjs
CHANGED
@@ -975,6 +975,19 @@ function isRootEntryReference(root) {
|
|
975
975
|
function isEntryData(entryData) {
|
976
976
|
return Boolean(entryData && typeof entryData === "object" && "fields" in entryData);
|
977
977
|
}
|
978
|
+
function isEntry(entry) {
|
979
|
+
return Boolean(entry && typeof entry === "object" && "entry" in entry);
|
980
|
+
}
|
981
|
+
function isAssetData(assetData) {
|
982
|
+
return Boolean(
|
983
|
+
assetData && typeof assetData === "object" && "asset" in assetData && assetData.asset instanceof Object && "type" in assetData.asset && assetData.asset.type === "image"
|
984
|
+
);
|
985
|
+
}
|
986
|
+
function isComposition(componentInstance) {
|
987
|
+
return Boolean(
|
988
|
+
componentInstance && typeof componentInstance === "object" && "composition" in componentInstance
|
989
|
+
);
|
990
|
+
}
|
978
991
|
function isAssetParamValue(value) {
|
979
992
|
return Array.isArray(value) && (value.length > 0 ? isAssetParamValueItem(value[0]) : true);
|
980
993
|
}
|
@@ -2972,6 +2985,19 @@ function convertEntryToPutEntry(entry) {
|
|
2972
2985
|
};
|
2973
2986
|
}
|
2974
2987
|
|
2988
|
+
// src/utils/getDataSourceVariantFromRouteGetParams.ts
|
2989
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
2990
|
+
var _a, _b;
|
2991
|
+
const dataSourceVariant = (
|
2992
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
2993
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
2994
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
2995
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
2996
|
+
)
|
2997
|
+
);
|
2998
|
+
return dataSourceVariant;
|
2999
|
+
};
|
3000
|
+
|
2975
3001
|
// src/utils/getParameterAttributes.ts
|
2976
3002
|
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
2977
3003
|
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
@@ -3343,6 +3369,7 @@ export {
|
|
3343
3369
|
getChannelName,
|
3344
3370
|
getComponentJsonPointer,
|
3345
3371
|
getComponentPath,
|
3372
|
+
getDataSourceVariantFromRouteGetParams,
|
3346
3373
|
getLocalizedPropertyValues,
|
3347
3374
|
getNounForLocation,
|
3348
3375
|
getNounForNode,
|
@@ -3352,12 +3379,15 @@ export {
|
|
3352
3379
|
hasReferencedVariables,
|
3353
3380
|
isAddComponentMessage,
|
3354
3381
|
isAllowedReferrer,
|
3382
|
+
isAssetData,
|
3355
3383
|
isAssetParamValue,
|
3356
3384
|
isAssetParamValueItem,
|
3357
3385
|
isComponentActionMessage,
|
3358
3386
|
isComponentPlaceholderId,
|
3387
|
+
isComposition,
|
3359
3388
|
isContextStorageUpdatedMessage,
|
3360
3389
|
isDismissPlaceholderMessage,
|
3390
|
+
isEntry,
|
3361
3391
|
isEntryData,
|
3362
3392
|
isLinkParamValue,
|
3363
3393
|
isMovingComponentMessage,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.194.
|
3
|
+
"version": "19.194.1-alpha.4+a46691a815",
|
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
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "19.194.
|
42
|
-
"@uniformdev/context": "19.194.
|
43
|
-
"@uniformdev/richtext": "19.194.
|
41
|
+
"@uniformdev/assets": "19.194.1-alpha.4+a46691a815",
|
42
|
+
"@uniformdev/context": "19.194.1-alpha.4+a46691a815",
|
43
|
+
"@uniformdev/richtext": "19.194.1-alpha.4+a46691a815",
|
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": "a46691a815b94e40c8f5e8d982e2cf66938a4548"
|
53
53
|
}
|