@uniformdev/mesh-sdk-react 19.62.0 → 19.62.1-alpha.127
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/LICENSE.txt +1 -1
- package/dist/index.d.mts +644 -59
- package/dist/index.d.ts +644 -59
- package/dist/index.esm.js +3231 -953
- package/dist/index.js +3539 -1242
- package/dist/index.mjs +3231 -953
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -5,11 +5,11 @@ import { TDate } from 'timeago.js';
|
|
|
5
5
|
import * as _emotion_react from '@emotion/react';
|
|
6
6
|
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
7
7
|
import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
|
|
8
|
-
import {
|
|
8
|
+
import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
|
|
9
9
|
export * from '@uniformdev/mesh-sdk';
|
|
10
10
|
import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
|
|
11
11
|
import { Emitter } from 'mitt';
|
|
12
|
-
import { BadgeThemeProps, InputSelectProps } from '@uniformdev/design-system';
|
|
12
|
+
import { BadgeThemeProps, InputSelectProps, IconType } from '@uniformdev/design-system';
|
|
13
13
|
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, DrawerContent, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps, useParameterShell } from '@uniformdev/design-system';
|
|
14
14
|
import * as lexical from 'lexical';
|
|
15
15
|
import { SerializedEditorState, SerializedLexicalNode, Spread, DecoratorNode, NodeKey, LexicalNode, LexicalEditor, EditorState } from 'lexical';
|
|
@@ -42,21 +42,7 @@ declare const SvgMoreVerticalAlt: (props: SVGProps<SVGSVGElement>) => _emotion_r
|
|
|
42
42
|
declare const SvgPlus: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
43
43
|
|
|
44
44
|
declare namespace index {
|
|
45
|
-
export {
|
|
46
|
-
SvgCaution as Caution,
|
|
47
|
-
SvgCheckmark as Checkmark,
|
|
48
|
-
SvgChevronDown as ChevronDown,
|
|
49
|
-
SvgClose as Close,
|
|
50
|
-
SvgDanger as Danger,
|
|
51
|
-
SvgExclamationPoint as ExclamationPoint,
|
|
52
|
-
SvgInfo as Info,
|
|
53
|
-
SvgLightbulb as Lightbulb,
|
|
54
|
-
SvgMagnifyingGlass as MagnifyingGlass,
|
|
55
|
-
SvgMaximizeAlt as MaximizeAlt,
|
|
56
|
-
SvgMinus as Minus,
|
|
57
|
-
SvgMoreVerticalAlt as MoreVerticalAlt,
|
|
58
|
-
SvgPlus as Plus,
|
|
59
|
-
};
|
|
45
|
+
export { SvgCaution as Caution, SvgCheckmark as Checkmark, SvgChevronDown as ChevronDown, SvgClose as Close, SvgDanger as Danger, SvgExclamationPoint as ExclamationPoint, SvgInfo as Info, SvgLightbulb as Lightbulb, SvgMagnifyingGlass as MagnifyingGlass, SvgMaximizeAlt as MaximizeAlt, SvgMinus as Minus, SvgMoreVerticalAlt as MoreVerticalAlt, SvgPlus as Plus };
|
|
60
46
|
}
|
|
61
47
|
|
|
62
48
|
/** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
|
|
@@ -399,11 +385,9 @@ declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
|
|
|
399
385
|
declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
|
|
400
386
|
declare const damSelectItemImage: _emotion_react.SerializedStyles;
|
|
401
387
|
|
|
402
|
-
type MinimalDynamicInput = Omit<DynamicInput, 'source'>;
|
|
403
|
-
type MinimalDynamicInputs = Record<string, MinimalDynamicInput>;
|
|
404
388
|
type DataResourceDynamicInputProviderProps = {
|
|
405
389
|
/** Explicitly provide dynamic input values. If not set, Mesh location will be used */
|
|
406
|
-
dynamicInputs?:
|
|
390
|
+
dynamicInputs?: DynamicInputs;
|
|
407
391
|
/** Child components of the provider. Variables-using components, such as InputVariables, can be used here. */
|
|
408
392
|
children: ReactNode;
|
|
409
393
|
};
|
|
@@ -429,12 +413,18 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
|
|
|
429
413
|
*
|
|
430
414
|
* You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
|
|
431
415
|
*/
|
|
432
|
-
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.
|
|
416
|
+
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
417
|
+
type: TLocationType;
|
|
418
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
419
|
+
type: TLocationType;
|
|
420
|
+
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
433
421
|
type: TLocationType;
|
|
434
422
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
435
423
|
type: TLocationType;
|
|
436
424
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
437
425
|
type: TLocationType;
|
|
426
|
+
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
427
|
+
type: TLocationType;
|
|
438
428
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
439
429
|
type: TLocationType;
|
|
440
430
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
|
|
@@ -444,12 +434,18 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
444
434
|
}> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
|
|
445
435
|
type: TLocationType;
|
|
446
436
|
}>, "setValue"> & {
|
|
447
|
-
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.
|
|
437
|
+
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
438
|
+
type: TLocationType;
|
|
439
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
440
|
+
type: TLocationType;
|
|
441
|
+
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
448
442
|
type: TLocationType;
|
|
449
443
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
450
444
|
type: TLocationType;
|
|
451
445
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
452
446
|
type: TLocationType;
|
|
447
|
+
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
448
|
+
type: TLocationType;
|
|
453
449
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
454
450
|
type: TLocationType;
|
|
455
451
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
|
|
@@ -458,12 +454,18 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
458
454
|
type: TLocationType;
|
|
459
455
|
}> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
|
|
460
456
|
type: TLocationType;
|
|
461
|
-
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.
|
|
457
|
+
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
458
|
+
type: TLocationType;
|
|
459
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
460
|
+
type: TLocationType;
|
|
461
|
+
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
462
462
|
type: TLocationType;
|
|
463
463
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
464
464
|
type: TLocationType;
|
|
465
465
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
466
466
|
type: TLocationType;
|
|
467
|
+
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
468
|
+
type: TLocationType;
|
|
467
469
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
468
470
|
type: TLocationType;
|
|
469
471
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
|
|
@@ -510,7 +512,7 @@ type VariableNodeState = {
|
|
|
510
512
|
* Note that this is ignored if `isFresh` is true, which is set for the result of edits or insertions
|
|
511
513
|
* made after the editor has mounted (which we know are good and don't validate to prevent flicker or false errors)
|
|
512
514
|
*/
|
|
513
|
-
referenceIsValid: boolean | 'info';
|
|
515
|
+
referenceIsValid: boolean | 'info' | 'warning';
|
|
514
516
|
/**
|
|
515
517
|
* Whether the variable node has been inserted or edited during this editing session
|
|
516
518
|
* Fresh nodes are always considered "valid" because they are the result of a user action
|
|
@@ -586,6 +588,10 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
|
|
|
586
588
|
* If not passed, defaults to helpText.
|
|
587
589
|
*/
|
|
588
590
|
tooltip?: string;
|
|
591
|
+
/**
|
|
592
|
+
If true the variable will be shown only in menus.
|
|
593
|
+
*/
|
|
594
|
+
system?: boolean;
|
|
589
595
|
};
|
|
590
596
|
/**
|
|
591
597
|
* Provides information for an undefined variable that might be referenced in data,
|
|
@@ -596,6 +602,7 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
|
|
|
596
602
|
type KnownUndefinedVariableInfo = {
|
|
597
603
|
error?: string;
|
|
598
604
|
info?: string;
|
|
605
|
+
warning?: string;
|
|
599
606
|
displayName?: string;
|
|
600
607
|
};
|
|
601
608
|
type DataVariableDefinitionWithName = {
|
|
@@ -607,9 +614,25 @@ type DataVariableDefinitionWithName = {
|
|
|
607
614
|
*/
|
|
608
615
|
declare function variablesToList(variables: Record<string, MeshDataVariableDefinition> | undefined): Array<DataVariableDefinitionWithName>;
|
|
609
616
|
|
|
617
|
+
type KnownUndefinedVariableInfoWithName = KnownUndefinedVariableInfo & {
|
|
618
|
+
name: string;
|
|
619
|
+
resultType: 'undefined';
|
|
620
|
+
};
|
|
621
|
+
type VariableEditorProps<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = {
|
|
622
|
+
variable: string;
|
|
623
|
+
onSubmit: (values: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName, context: TEditVariableCompletedContext) => void | Promise<void>;
|
|
624
|
+
/** Disables the tip about Mesh integrations. Intended for use when this is placed on a custom Mesh integration to edit variables. */
|
|
625
|
+
disableMeshTip?: boolean;
|
|
626
|
+
onCancel: (context: TEditVariableCancelledContext) => void;
|
|
627
|
+
context: TEditorContext | undefined;
|
|
628
|
+
disableAutoFocusOnMount?: boolean;
|
|
629
|
+
showDisplayName?: boolean;
|
|
630
|
+
};
|
|
631
|
+
declare function VariableEditor({ variable, onSubmit, onCancel, showDisplayName, disableMeshTip, }: VariableEditorProps<any, unknown, EditConnectedDataResponseCancellationContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
632
|
+
|
|
610
633
|
type SelectVariableMenuProps<TEditorContext = undefined> = {
|
|
611
634
|
/** sets the onClick menu item event. Also called if the menu adds a variable with the newly added variable. */
|
|
612
|
-
onSelectVariable: (selectedVariable: DataVariableDefinitionWithName) => void;
|
|
635
|
+
onSelectVariable: (selectedVariable: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName) => void;
|
|
613
636
|
/** Controls whether one can add variables from the menu */
|
|
614
637
|
showAddVariableMenuOption?: boolean | string;
|
|
615
638
|
/** Emotion styles to apply to the menu trigger icon button */
|
|
@@ -626,6 +649,8 @@ type SelectVariableMenuProps<TEditorContext = undefined> = {
|
|
|
626
649
|
menuTooltip?: string;
|
|
627
650
|
/** Filters available variables in menus and auto-completes */
|
|
628
651
|
filterVariable?: (variableName: string, variableDefinition: MeshDataVariableDefinition, context: TEditorContext | undefined) => boolean;
|
|
652
|
+
/** Sets the menu to be a portal */
|
|
653
|
+
portal?: boolean;
|
|
629
654
|
};
|
|
630
655
|
|
|
631
656
|
type VariableSourceGroup = {
|
|
@@ -776,10 +801,23 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
776
801
|
* @deprecated this is ignored if passed, computation is now automatic
|
|
777
802
|
*/
|
|
778
803
|
disableReset?: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* By default when keyDown happens in the variables input, any active variable editor is dismissed automatically.
|
|
806
|
+
* This makes sense, until you want to put a variables input _into_ a variables editor component. In that case,
|
|
807
|
+
* disable it with this prop.
|
|
808
|
+
*/
|
|
809
|
+
disableDismissEditorOnChange?: boolean;
|
|
779
810
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
780
811
|
multiLine?: boolean;
|
|
781
812
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
782
813
|
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
814
|
+
/**
|
|
815
|
+
* Defines single place to render "Insert variable" menu buttons.
|
|
816
|
+
* Be aware that it will override "disableInlineMenu" if set.
|
|
817
|
+
*
|
|
818
|
+
* @deprecated beta
|
|
819
|
+
*/
|
|
820
|
+
showMenuPosition?: 'label' | 'input' | 'inline-right';
|
|
783
821
|
/**
|
|
784
822
|
* Enables clicking a variable reference to edit the variable
|
|
785
823
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -791,10 +829,12 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
791
829
|
addOmitIfEmpty?: boolean;
|
|
792
830
|
/** (optional) sets and shows the the error message value */
|
|
793
831
|
errorMessage?: string;
|
|
794
|
-
/** (optional) sets and shows the
|
|
832
|
+
/** (optional) sets and shows the warning message value */
|
|
795
833
|
warningMessage?: string;
|
|
796
834
|
/** (optional) sets and shows the the info message value */
|
|
797
835
|
infoMessage?: string;
|
|
836
|
+
/** (optional) sets placeholder when there is no value */
|
|
837
|
+
placeholder?: string;
|
|
798
838
|
/** (optional) sets caption text value */
|
|
799
839
|
caption?: string;
|
|
800
840
|
/** Disables editing the value of the input, editing variables, and adding variables */
|
|
@@ -812,6 +852,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
812
852
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
813
853
|
/** The compact style is similar to the parameters panel */
|
|
814
854
|
styleVariant?: 'default' | 'compact';
|
|
855
|
+
/** Set the menu dropdown to render in a portal, this helps fix z-indexing issue */
|
|
856
|
+
renderMenuInPortal?: boolean;
|
|
815
857
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
816
858
|
/**
|
|
817
859
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
|
@@ -887,17 +929,6 @@ type ParameterVariablesProps<TEditorContext = unknown> = {
|
|
|
887
929
|
*/
|
|
888
930
|
declare function ParameterVariables<TEditorContext = unknown>(props: ParameterVariablesProps<TEditorContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
889
931
|
|
|
890
|
-
type VariableEditorProps<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = {
|
|
891
|
-
variable: string;
|
|
892
|
-
onSubmit: (values: DataVariableDefinitionWithName, context: TEditVariableCompletedContext) => void | Promise<void>;
|
|
893
|
-
/** Disables the tip about Mesh integrations. Intended for use when this is placed on a custom Mesh integration to edit variables. */
|
|
894
|
-
disableMeshTip?: boolean;
|
|
895
|
-
onCancel: (context: TEditVariableCancelledContext) => void;
|
|
896
|
-
context: TEditorContext | undefined;
|
|
897
|
-
disableAutoFocusOnMount?: boolean;
|
|
898
|
-
};
|
|
899
|
-
declare function VariableEditor({ variable, onSubmit, onCancel, disableMeshTip, }: VariableEditorProps<any, unknown, EditConnectedDataResponseCancellationContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
900
|
-
|
|
901
932
|
type VariablesProviderProps<TEditVariableContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = React.PropsWithChildren<{
|
|
902
933
|
/**
|
|
903
934
|
* Signals that components in this variables context are not intended to allow mutation
|
|
@@ -917,6 +948,14 @@ type VariablesProviderProps<TEditVariableContext = unknown, TEditVariableComplet
|
|
|
917
948
|
knownUndefinedValues?: Record<string, KnownUndefinedVariableInfo>;
|
|
918
949
|
/** Function to handle mutations to the variable values (optional when readOnly is true) */
|
|
919
950
|
onChange?: (newValue: Record<string, MeshDataVariableDefinition>) => void;
|
|
951
|
+
/**
|
|
952
|
+
* Called when a custom editVariableComponent signals that it wants to add a known undefined value to the variable context
|
|
953
|
+
* instead of a valid variable. This is useful when the variable editor component may be allowed to select invalid values that should produce
|
|
954
|
+
* warning or info messages when referenced, rather than being treated as an error.
|
|
955
|
+
*
|
|
956
|
+
* The caller must wire up the logic to pass back new `knownUndefinedValues` after they are modified.
|
|
957
|
+
*/
|
|
958
|
+
onChangeKnownUndefinedValue?: (name: string, value: KnownUndefinedVariableInfo) => void;
|
|
920
959
|
/**
|
|
921
960
|
* Provide a component to handle editing a variable definition (e.g. a modal wrapper)
|
|
922
961
|
* If not passed, the editor will be rendered inline, with potentially strange results.
|
|
@@ -953,7 +992,7 @@ type VariablesAction<TEditVariableContext> = {
|
|
|
953
992
|
type VariableEditorCompleteEvent<TEditVariableCompletedContext, TEditVariableCancelledContext> = {
|
|
954
993
|
canceled: false;
|
|
955
994
|
/** Selected variable */
|
|
956
|
-
selectedVariable: DataVariableDefinitionWithName;
|
|
995
|
+
selectedVariable: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName;
|
|
957
996
|
/**
|
|
958
997
|
* Arbitrary object that was returned by the variables editor component's onSubmit
|
|
959
998
|
* Can be used to convey context data about the submit from custom editor components
|
|
@@ -966,9 +1005,10 @@ type VariableEditorCompleteEvent<TEditVariableCompletedContext, TEditVariableCan
|
|
|
966
1005
|
/**
|
|
967
1006
|
* Arbitrary object that was returned by the variables editor component's onCancel
|
|
968
1007
|
* Can be used to convey context data about the submit from custom editor components
|
|
969
|
-
* to their consumers. Always `null` using the default variables editor.
|
|
1008
|
+
* to their consumers. Always `null` using the default variables editor. Can always be undefined
|
|
1009
|
+
* if the editor is dismissed by the variables provider instead of user action.
|
|
970
1010
|
*/
|
|
971
|
-
editorCancelledContext
|
|
1011
|
+
editorCancelledContext?: TEditVariableCancelledContext;
|
|
972
1012
|
};
|
|
973
1013
|
type VariablesEvents<TEditVariableCompletedContext, TEditVariableCancelledContext> = {
|
|
974
1014
|
editCompleted: VariableEditorCompleteEvent<TEditVariableCompletedContext, TEditVariableCancelledContext>;
|
|
@@ -994,6 +1034,12 @@ type VariablesContext<TEditVariableContext, TEditVariableCompletedContext, TEdit
|
|
|
994
1034
|
isEditing: boolean;
|
|
995
1035
|
/** Add event handles (don't forget to unhook) */
|
|
996
1036
|
events: Emitter<VariablesEvents<TEditVariableCompletedContext, TEditVariableCancelledContext>>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Creates an exclusive, promise-based variable editing transaction that definitely returns a result.
|
|
1039
|
+
* Only one edit can occur at a time; if another edit is started, the previous one will be resolved as cancelled.
|
|
1040
|
+
* Note: this is an alternative to emitting editing events with dispatch directly that can be easier to consume when a result is required.
|
|
1041
|
+
*/
|
|
1042
|
+
editVariableTxn: (variable: string, context?: TEditVariableContext) => Promise<VariableEditorCompleteEvent<TEditVariableCompletedContext, TEditVariableCancelledContext>>;
|
|
997
1043
|
/** Whether the context is backed by a provider, or is just a readonly fake */
|
|
998
1044
|
canDispatch: boolean;
|
|
999
1045
|
/**
|
|
@@ -1008,7 +1054,7 @@ type VariablesContext<TEditVariableContext, TEditVariableCompletedContext, TEdit
|
|
|
1008
1054
|
*/
|
|
1009
1055
|
isLoading: boolean;
|
|
1010
1056
|
};
|
|
1011
|
-
declare function VariablesProvider<TEditComponentContext = never, TEditVariableCompletedContext = never, TEditVariableCancelledContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1057
|
+
declare function VariablesProvider<TEditComponentContext = never, TEditVariableCompletedContext = never, TEditVariableCancelledContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, onChangeKnownUndefinedValue, }: VariablesProviderProps<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1012
1058
|
declare function useVariables<TEditComponentContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown>(returnEmptyWithoutProvider?: boolean): VariablesContext<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>;
|
|
1013
1059
|
|
|
1014
1060
|
declare function useVariableEditor<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown>(): {
|
|
@@ -1167,7 +1213,10 @@ type ObjectSearchContainerProps = {
|
|
|
1167
1213
|
enableDynamicInputToResultId?: boolean;
|
|
1168
1214
|
/** a child node that places components within the search location */
|
|
1169
1215
|
searchFilters: ReactNode;
|
|
1170
|
-
/**
|
|
1216
|
+
/**
|
|
1217
|
+
* a child node that places components within a scrollable list location
|
|
1218
|
+
* set to `null` expl
|
|
1219
|
+
*/
|
|
1171
1220
|
resultList?: ReactNode;
|
|
1172
1221
|
/** allows any child element */
|
|
1173
1222
|
children?: ReactNode;
|
|
@@ -1190,9 +1239,10 @@ type ObjectSearchFilterProps = {
|
|
|
1190
1239
|
selectLabel?: string;
|
|
1191
1240
|
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1192
1241
|
selectOptions?: Array<{
|
|
1193
|
-
id
|
|
1242
|
+
id?: string;
|
|
1194
1243
|
name?: string;
|
|
1195
1244
|
label: string;
|
|
1245
|
+
value?: string;
|
|
1196
1246
|
}>;
|
|
1197
1247
|
/** sets the search input name value
|
|
1198
1248
|
* @default 'searchText'
|
|
@@ -1229,6 +1279,8 @@ type SearchQueryProps<TExtraFilters = unknown> = {
|
|
|
1229
1279
|
contentType?: string;
|
|
1230
1280
|
/** sets the keyword search in the search context */
|
|
1231
1281
|
keyword?: string;
|
|
1282
|
+
/** sets the locale in the search context */
|
|
1283
|
+
locale?: string;
|
|
1232
1284
|
} & TExtraFilters;
|
|
1233
1285
|
type SelectedItemProps<TExtraProps = unknown> = {
|
|
1234
1286
|
/** sets the id value */
|
|
@@ -1299,12 +1351,16 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1299
1351
|
list: ItemListProps<TExtraItemProps>;
|
|
1300
1352
|
/** function that sets the list of items to state */
|
|
1301
1353
|
onSetList: (value: ItemListProps) => void;
|
|
1354
|
+
/** is multi items selection allowed or not */
|
|
1355
|
+
isMulti: boolean;
|
|
1302
1356
|
};
|
|
1303
1357
|
type ObjectSearchProviderProps = {
|
|
1304
1358
|
children: ReactNode;
|
|
1305
1359
|
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
1360
|
+
isMulti?: boolean;
|
|
1361
|
+
defaultQuery?: SearchQueryProps;
|
|
1306
1362
|
};
|
|
1307
|
-
declare const ObjectSearchProvider: ({ currentlySelectedItems, children }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1363
|
+
declare const ObjectSearchProvider: ({ currentlySelectedItems, isMulti, children, defaultQuery, }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1308
1364
|
declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraItemProps = unknown>(): ObjectSearchContextProps<TExtraSearchFilters, TExtraItemProps>;
|
|
1309
1365
|
|
|
1310
1366
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
@@ -1313,7 +1369,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1313
1369
|
/** sets image parameters
|
|
1314
1370
|
* @deprecated Please use imageUrl to make it compatible with */
|
|
1315
1371
|
image?: {
|
|
1316
|
-
/** sets the src
|
|
1372
|
+
/** sets the src value */
|
|
1317
1373
|
src: string;
|
|
1318
1374
|
/** sets the alt text value */
|
|
1319
1375
|
alt: string;
|
|
@@ -1335,15 +1391,16 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1335
1391
|
children?: React$1.ReactNode;
|
|
1336
1392
|
/** sets whether multiple entries can be added to the results list context
|
|
1337
1393
|
* @default false
|
|
1394
|
+
* @deprecated Please use isMulti property in <ObjectSearchProvider />
|
|
1338
1395
|
*/
|
|
1339
1396
|
isMulti?: boolean;
|
|
1340
1397
|
/** sets disabled state to the interactive element */
|
|
1341
1398
|
disabled?: boolean;
|
|
1342
|
-
}
|
|
1399
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
1343
1400
|
/**
|
|
1344
1401
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1345
1402
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1346
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1403
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1347
1404
|
/**
|
|
1348
1405
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1349
1406
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
|
@@ -1395,6 +1452,8 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1395
1452
|
* @default 'Selected'
|
|
1396
1453
|
*/
|
|
1397
1454
|
resultLabelText?: string;
|
|
1455
|
+
/** sets and override react node replacing the whole HTML block for the result label and counter */
|
|
1456
|
+
resultLabelOverride?: ReactNode;
|
|
1398
1457
|
/** sets the on remove button click action */
|
|
1399
1458
|
onRemoveAllSelected?: () => void;
|
|
1400
1459
|
/** sets the remove button text
|
|
@@ -1406,9 +1465,9 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1406
1465
|
*/
|
|
1407
1466
|
hideRemoveButton?: boolean;
|
|
1408
1467
|
/** allows additional buttons to be added to the result title group */
|
|
1409
|
-
additionalButtons?:
|
|
1468
|
+
additionalButtons?: React__default.ReactNode;
|
|
1410
1469
|
/** allows placing child components within the result list area */
|
|
1411
|
-
renderResultComponent?: (value: TRenderComponent) =>
|
|
1470
|
+
renderResultComponent?: (value: TRenderComponent) => React__default.ReactNode;
|
|
1412
1471
|
/** disable or enable drag and drop functionality
|
|
1413
1472
|
* @default false
|
|
1414
1473
|
*/
|
|
@@ -1416,7 +1475,13 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1416
1475
|
/** sets the draggable id value */
|
|
1417
1476
|
multiSelectId?: string;
|
|
1418
1477
|
/** Rendered when nothing is selected */
|
|
1419
|
-
whenNothingSelected?:
|
|
1478
|
+
whenNothingSelected?: React__default.ReactNode;
|
|
1479
|
+
/**
|
|
1480
|
+
* Special case for re-parenting the drag and drop container in case of issues with "position: fixed" and "transform:
|
|
1481
|
+
* You can read more about this here https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/reparenting.md
|
|
1482
|
+
* Providing this getter assumes you have that HTML element in the document, and it will enable re-parenting.
|
|
1483
|
+
*/
|
|
1484
|
+
getContainerForDnDReparenting?: () => HTMLElement;
|
|
1420
1485
|
};
|
|
1421
1486
|
/**
|
|
1422
1487
|
* @description An opinionated result list UI component that has built in drag and drop functionality and removal of all selected items from context.
|
|
@@ -1424,7 +1489,7 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1424
1489
|
* maintain drag and drop functionality
|
|
1425
1490
|
* @example <ObjectSearchResultList id="my-id" title="title" renderResultComponent={(values) => <CustomComponent {...values} />} />
|
|
1426
1491
|
*/
|
|
1427
|
-
declare function ObjectSearchResultList<TRenderComponent extends SelectedItemProps = SelectedItemProps>({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, additionalButtons, renderResultComponent, multiSelectId, disableDnD, whenNothingSelected, }: ObjectSearchResultListProps<TRenderComponent>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1492
|
+
declare function ObjectSearchResultList<TRenderComponent extends SelectedItemProps = SelectedItemProps>({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, resultLabelOverride, additionalButtons, renderResultComponent, multiSelectId, disableDnD, getContainerForDnDReparenting, whenNothingSelected, }: ObjectSearchResultListProps<TRenderComponent>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1428
1493
|
|
|
1429
1494
|
type QueryFilterSearchProps = {
|
|
1430
1495
|
/** sets the count value */
|
|
@@ -1434,12 +1499,18 @@ type QueryFilterSearchProps = {
|
|
|
1434
1499
|
/** sets the sortOrder filter value */
|
|
1435
1500
|
sortOrder: string;
|
|
1436
1501
|
};
|
|
1437
|
-
type
|
|
1438
|
-
|
|
1439
|
-
|
|
1502
|
+
type QueryFilterSelectionOptionProps = Array<{
|
|
1503
|
+
/** @deprecated please use value instead */
|
|
1504
|
+
id?: string;
|
|
1505
|
+
/** @deprecated please use value or label instead */
|
|
1506
|
+
name?: string;
|
|
1507
|
+
/** contains id or machine values. will be used as value attribute in <option> */
|
|
1508
|
+
value?: string;
|
|
1509
|
+
/** Contains human-readable display name for select options.
|
|
1510
|
+
* Used as value in case value is not present <option> */
|
|
1440
1511
|
label: string;
|
|
1441
1512
|
}>;
|
|
1442
|
-
type QueryFilterProps<TSelectOptions extends
|
|
1513
|
+
type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = QueryFilterSelectionOptionProps> = {
|
|
1443
1514
|
/** sets the query filter title
|
|
1444
1515
|
* @default 'Configure Query'
|
|
1445
1516
|
*/
|
|
@@ -1460,10 +1531,11 @@ type QueryFilterProps<TSelectOptions extends QuertFilterSelectionOptionProps = Q
|
|
|
1460
1531
|
* @default 'Count'
|
|
1461
1532
|
*/
|
|
1462
1533
|
countLabel?: string;
|
|
1463
|
-
/** sets the count value or items to show
|
|
1534
|
+
/** sets the count value or items to show. As a string you can pass dynamic variables ${countFromQuery} for example
|
|
1464
1535
|
* @default 5
|
|
1536
|
+
* @deprecated please use ObjectSearchProviderProps['defaultQuery'] to pass initial count value
|
|
1465
1537
|
*/
|
|
1466
|
-
countValue?: number;
|
|
1538
|
+
countValue?: number | string;
|
|
1467
1539
|
/** sets the sort label text
|
|
1468
1540
|
* @default 'Sort'
|
|
1469
1541
|
*/
|
|
@@ -1637,11 +1709,494 @@ declare function useRequestParameter(paramName: string): {
|
|
|
1637
1709
|
update: (value: string) => void;
|
|
1638
1710
|
};
|
|
1639
1711
|
|
|
1712
|
+
/** @deprecated beta - Filter editor component names */
|
|
1713
|
+
type FilterEditor = 'singleChoice' | 'multiChoice' | 'dateRange' | 'date' | 'text' | 'empty' | 'number' | 'numberRange' | 'statusMultiChoice' | 'statusSingleChoice';
|
|
1714
|
+
/** @deprecated beta - Input option props */
|
|
1715
|
+
type InputOption = {
|
|
1716
|
+
/** The label for the option */
|
|
1717
|
+
label: string;
|
|
1718
|
+
/** The value for the option */
|
|
1719
|
+
value?: string | undefined;
|
|
1720
|
+
/** The options for the option */
|
|
1721
|
+
options?: Array<FilterOption>;
|
|
1722
|
+
/** Set a disabled state on the input */
|
|
1723
|
+
isDisabled?: boolean;
|
|
1724
|
+
/** Set a readonly state on the input */
|
|
1725
|
+
readOnly?: boolean;
|
|
1726
|
+
};
|
|
1727
|
+
/** @deprecated beta - Operator option props */
|
|
1728
|
+
type Operator = {
|
|
1729
|
+
/** The label for the operator */
|
|
1730
|
+
label: string;
|
|
1731
|
+
/** The symbol for the operator */
|
|
1732
|
+
value?: string;
|
|
1733
|
+
/** The symbol for the operator */
|
|
1734
|
+
symbol?: string;
|
|
1735
|
+
/** The editor type for the operator */
|
|
1736
|
+
options?: Array<InputOption>;
|
|
1737
|
+
/** The editor type for the operator */
|
|
1738
|
+
editorType?: FilterEditor;
|
|
1739
|
+
};
|
|
1740
|
+
/** @deprecated beta - Filter option props */
|
|
1741
|
+
type FilterOption = {
|
|
1742
|
+
/** The label for the option */
|
|
1743
|
+
label: string;
|
|
1744
|
+
/** The value for the option */
|
|
1745
|
+
value: string;
|
|
1746
|
+
/** The options for the option */
|
|
1747
|
+
options?: FilterOption[];
|
|
1748
|
+
/** The operator options for the option */
|
|
1749
|
+
operatorOptions?: Operator[];
|
|
1750
|
+
/** The value options for the option */
|
|
1751
|
+
valueOptions?: InputOption[];
|
|
1752
|
+
/** Set a readonly state on the input */
|
|
1753
|
+
readOnly?: boolean;
|
|
1754
|
+
/** Set a disabled state on the input */
|
|
1755
|
+
disabled?: boolean;
|
|
1756
|
+
/** If filter operator allows it allow bind dynamic value to this filter */
|
|
1757
|
+
bindable?: boolean;
|
|
1758
|
+
};
|
|
1759
|
+
/** @deprecated beta - Filter selected and query value props */
|
|
1760
|
+
type Filter = {
|
|
1761
|
+
/** The field value selected */
|
|
1762
|
+
field: string;
|
|
1763
|
+
/** The operator value selected */
|
|
1764
|
+
operator: string;
|
|
1765
|
+
/** The value selected */
|
|
1766
|
+
value: string | string[];
|
|
1767
|
+
};
|
|
1768
|
+
|
|
1769
|
+
/** @deprecated beta - a list of possible operator values that sync with uniform search api */
|
|
1770
|
+
type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'sys-date-neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts';
|
|
1771
|
+
type OperatorValueType = {
|
|
1772
|
+
value: OperatorValue;
|
|
1773
|
+
};
|
|
1774
|
+
/** @deprecated beta - a list of possible operator types */
|
|
1775
|
+
type OperatorType = Array<Omit<Operator, 'value'> & OperatorValueType>;
|
|
1776
|
+
/** @deprecated beta - uniform number operators */
|
|
1777
|
+
declare const NUMBER_OPERATORS: OperatorType;
|
|
1778
|
+
/** @deprecated beta - uniform date operators */
|
|
1779
|
+
declare const DATE_OPERATORS: OperatorType;
|
|
1780
|
+
/** @deprecated beta - uniform textbox operators */
|
|
1781
|
+
declare const TEXTBOX_OPERATORS: OperatorType;
|
|
1782
|
+
/** @deprecated beta - uniform user operators */
|
|
1783
|
+
declare const USER_OPERATORS: OperatorType;
|
|
1784
|
+
/** @deprecated beta - uniform system date operators */
|
|
1785
|
+
declare const SYSTEM_DATE_OPERATORS: OperatorType;
|
|
1786
|
+
/** @deprecated beta - uniform rich text operators */
|
|
1787
|
+
declare const RICHTEXT_OPERATORS: OperatorType;
|
|
1788
|
+
/** @deprecated beta - uniform checkbox operators */
|
|
1789
|
+
declare const CHECKBOX_OPERATORS: OperatorType;
|
|
1790
|
+
/** @deprecated beta - uniform system field operators */
|
|
1791
|
+
declare const SYSTEM_FIELD_OPERATORS: OperatorType;
|
|
1792
|
+
/** @deprecated beta - uniform publish status field operators */
|
|
1793
|
+
declare const PUBLISH_STATUS_FIELD_OPERATORS: OperatorType;
|
|
1794
|
+
|
|
1795
|
+
/** @description beta - filter button type */
|
|
1796
|
+
type FilterButtonProps = {
|
|
1797
|
+
/** text to display on the button
|
|
1798
|
+
* @default "Filters"
|
|
1799
|
+
*/
|
|
1800
|
+
text?: string;
|
|
1801
|
+
/** icon to display on the button
|
|
1802
|
+
* @default "filter-add"
|
|
1803
|
+
*/
|
|
1804
|
+
icon?: IconType;
|
|
1805
|
+
/** number of filters to display on the button and sets the styles on the button */
|
|
1806
|
+
filterCount?: number;
|
|
1807
|
+
/** sets the selected styles on the button */
|
|
1808
|
+
hasSelectedValue?: boolean;
|
|
1809
|
+
/** sets the data-testid attribute on the button */
|
|
1810
|
+
dataTestId?: string;
|
|
1811
|
+
} & HTMLAttributes<HTMLButtonElement>;
|
|
1812
|
+
/**
|
|
1813
|
+
* @deprecated beta - A filter button component used to display filter menu options
|
|
1814
|
+
* @example <FilterButton text="Filters" filterCount={3} />
|
|
1815
|
+
*/
|
|
1816
|
+
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* @deprecated beta - Default filter controls for search and filter
|
|
1820
|
+
* @example <FilterControls />
|
|
1821
|
+
*/
|
|
1822
|
+
declare const FilterControls: ({ children, hideSearchInput, }: {
|
|
1823
|
+
/** optional param to allow you to add your own controls */
|
|
1824
|
+
children?: ReactNode;
|
|
1825
|
+
/** optional param to hide the search input */
|
|
1826
|
+
hideSearchInput?: boolean | undefined;
|
|
1827
|
+
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1828
|
+
|
|
1829
|
+
type FilterEditorProps = Record<FilterEditor, ComponentType<{
|
|
1830
|
+
label?: string;
|
|
1831
|
+
value?: string;
|
|
1832
|
+
options: any;
|
|
1833
|
+
onChange: (value: any) => void;
|
|
1834
|
+
}> | (() => ReactNode) | null>;
|
|
1835
|
+
type ComboboxOption = {
|
|
1836
|
+
label: string;
|
|
1837
|
+
value: string;
|
|
1838
|
+
};
|
|
1839
|
+
type SingleValueComboboxProps = Omit<FilterEditorCommonInputProps, 'value'> & {
|
|
1840
|
+
value?: string;
|
|
1841
|
+
options: ComboboxOption[];
|
|
1842
|
+
onChange: (e: string) => void;
|
|
1843
|
+
};
|
|
1844
|
+
type MultiValueComboboxProps = Omit<FilterEditorCommonInputProps, 'value'> & {
|
|
1845
|
+
value?: string[];
|
|
1846
|
+
options: ComboboxOption[];
|
|
1847
|
+
onChange: (e: string[]) => void;
|
|
1848
|
+
};
|
|
1849
|
+
type FilterEditorCommonInputProps = {
|
|
1850
|
+
ariaLabel: string;
|
|
1851
|
+
onChange: (e: string | string[]) => void;
|
|
1852
|
+
disabled?: boolean;
|
|
1853
|
+
value?: string | string[];
|
|
1854
|
+
readOnly?: boolean;
|
|
1855
|
+
valueTestId?: string;
|
|
1856
|
+
bindable?: boolean;
|
|
1857
|
+
};
|
|
1858
|
+
/**
|
|
1859
|
+
* @deprecated beta - Multie select filter component
|
|
1860
|
+
* @example <FilterMultiChoiceEditor options={options} value={options.filter((option) => values.includes(option.value)} onChange={(e) => onChange(e.map((option) => option.value))} />
|
|
1861
|
+
*/
|
|
1862
|
+
declare const FilterMultiChoiceEditor: ({ value, options, disabled, readOnly, valueTestId, ...props }: MultiValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1863
|
+
/**
|
|
1864
|
+
* @deprecated beta - Single select filter component
|
|
1865
|
+
* @example <FilterSingleChoiceEditor options={options} value={options.find((option) => values.includes(option.value)} onChange={(e) => onChange(e.value)} />
|
|
1866
|
+
*/
|
|
1867
|
+
declare const FilterSingleChoiceEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: SingleValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1868
|
+
/**
|
|
1869
|
+
* @deprecated beta - Status multi select filter component that renders a custom dropdown menu
|
|
1870
|
+
* @example <StatusMultiEditor options={options} value={value} onChange={onChange} />
|
|
1871
|
+
*/
|
|
1872
|
+
declare const StatusMultiEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: MultiValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1873
|
+
/**
|
|
1874
|
+
* @deprecated beta - Status single select filter component that renders a custom dropdown menu
|
|
1875
|
+
* @example <StatusSingleEditor options={options} value={value} onChange={onChange} />
|
|
1876
|
+
*/
|
|
1877
|
+
declare const StatusSingleEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: SingleValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1878
|
+
/**
|
|
1879
|
+
* @deprecated beta - Renders a text input field for filtering
|
|
1880
|
+
* @example <TextEditor ariaLabel="Search" value={value} onChange={onChange} />
|
|
1881
|
+
*/
|
|
1882
|
+
declare const TextEditor: ({ onChange, ariaLabel, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1883
|
+
/**
|
|
1884
|
+
* @deprecated beta - Renders a number range input field for filtering
|
|
1885
|
+
* @example <NumberRangeEditor ariaLabel="Number Range" value={value} onChange={onChange} />
|
|
1886
|
+
*/
|
|
1887
|
+
declare const NumberRangeEditor: ({ onChange, disabled, ariaLabel, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1888
|
+
/**
|
|
1889
|
+
* @deprecated beta - Renders a number input field for filtering
|
|
1890
|
+
* @example <NumberEditor ariaLabel="Number" value={value} onChange={onChange} />
|
|
1891
|
+
*/
|
|
1892
|
+
declare const NumberEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1893
|
+
/**
|
|
1894
|
+
* @deprecated beta - Renders a date input field for filtering
|
|
1895
|
+
* @example <DateEditor ariaLabel="Date" value={value} onChange={onChange} />
|
|
1896
|
+
*/
|
|
1897
|
+
declare const DateEditor: ({ onChange, ariaLabel, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1898
|
+
/**
|
|
1899
|
+
* @deprecated beta - Renders a date range input field for filtering
|
|
1900
|
+
* @example <DateRangeEditor ariaLabel="Date Range" value={value} onChange={onChange} />
|
|
1901
|
+
*/
|
|
1902
|
+
declare const DateRangeEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1903
|
+
type FilterEditorRendererProps = Pick<FilterOption, 'readOnly' | 'disabled' | 'bindable'> & {
|
|
1904
|
+
/** The type of filter editor to render */
|
|
1905
|
+
editorType: FilterEditor;
|
|
1906
|
+
/** The options for the filter editor */
|
|
1907
|
+
options?: Array<Operator>;
|
|
1908
|
+
/** The value for the filter editor */
|
|
1909
|
+
value?: string | string[] | InputOption[] | InputOption;
|
|
1910
|
+
/** The onChange event for the filter editor */
|
|
1911
|
+
onChange: (e: string) => void;
|
|
1912
|
+
/** Sets the data-testid value */
|
|
1913
|
+
valueTestId?: string;
|
|
1914
|
+
};
|
|
1915
|
+
/**
|
|
1916
|
+
* @deprecated beta - Renders a filter editor component
|
|
1917
|
+
* @example <FilterEditorRenderer editorType="multiChoice" options={options} value={value} onChange={onChange} />
|
|
1918
|
+
*/
|
|
1919
|
+
declare const FilterEditorRenderer: ({ editorType, ...props }: FilterEditorRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
1920
|
+
/** @deprecated beta - A mapper for filter editor components */
|
|
1921
|
+
declare const filterMapper: Record<FilterEditor, ComponentType<any> | null>;
|
|
1922
|
+
declare const bindableFiltersMapper: {
|
|
1923
|
+
multiChoice: React__default.FC<MultiValueComboboxProps>;
|
|
1924
|
+
singleChoice: React__default.FC<SingleValueComboboxProps>;
|
|
1925
|
+
date: React__default.FC<FilterEditorCommonInputProps & {
|
|
1926
|
+
value?: string | undefined;
|
|
1927
|
+
options?: {
|
|
1928
|
+
label: string;
|
|
1929
|
+
value: string;
|
|
1930
|
+
}[] | undefined;
|
|
1931
|
+
}>;
|
|
1932
|
+
text: React__default.FC<FilterEditorCommonInputProps & {
|
|
1933
|
+
value?: string | undefined;
|
|
1934
|
+
options?: {
|
|
1935
|
+
label: string;
|
|
1936
|
+
value: string;
|
|
1937
|
+
}[] | undefined;
|
|
1938
|
+
}>;
|
|
1939
|
+
number: React__default.FC<FilterEditorCommonInputProps & {
|
|
1940
|
+
value?: string | undefined;
|
|
1941
|
+
options?: {
|
|
1942
|
+
label: string;
|
|
1943
|
+
value: string;
|
|
1944
|
+
}[] | undefined;
|
|
1945
|
+
}>;
|
|
1946
|
+
dateRange: React__default.ComponentType<any> | null;
|
|
1947
|
+
empty: React__default.ComponentType<any> | null;
|
|
1948
|
+
numberRange: React__default.ComponentType<any> | null;
|
|
1949
|
+
statusMultiChoice: React__default.ComponentType<any> | null;
|
|
1950
|
+
statusSingleChoice: React__default.ComponentType<any> | null;
|
|
1951
|
+
};
|
|
1952
|
+
|
|
1953
|
+
type FilterMapper = Record<string, ComponentType<any> | null>;
|
|
1954
|
+
type SearchAndFilterProviderProps = {
|
|
1955
|
+
/** sets the filter values */
|
|
1956
|
+
filters: Filter[];
|
|
1957
|
+
/** sets the filter visibility */
|
|
1958
|
+
filterVisible?: boolean;
|
|
1959
|
+
/** function to trigger search change event */
|
|
1960
|
+
onSearchChange?: (term: string) => void;
|
|
1961
|
+
/** function to trigger filter change events */
|
|
1962
|
+
onChange: (filters: Filter[]) => void;
|
|
1963
|
+
/** Sets default value for full text search input, useful for bindable search */
|
|
1964
|
+
defaultSearchTerm?: string;
|
|
1965
|
+
/** sets the reset filter values
|
|
1966
|
+
* @default "[{ field: '', operator: '', value: '' }]"
|
|
1967
|
+
*/
|
|
1968
|
+
resetFilterValues?: Filter[];
|
|
1969
|
+
/** sets the list of filter options for each filter row */
|
|
1970
|
+
filterOptions: FilterOption[];
|
|
1971
|
+
/** the total number of results */
|
|
1972
|
+
totalResults?: number;
|
|
1973
|
+
/** the filter mapper function */
|
|
1974
|
+
filterMapper?: FilterMapper;
|
|
1975
|
+
/** sets child components giving access to useSearchAndFilter context */
|
|
1976
|
+
children: ReactNode;
|
|
1977
|
+
};
|
|
1978
|
+
type SearchAndFilterContextProps = {
|
|
1979
|
+
/** the search term value */
|
|
1980
|
+
searchTerm: string;
|
|
1981
|
+
/** sets the search term value */
|
|
1982
|
+
setSearchTerm: (term: string) => void;
|
|
1983
|
+
/** current filter visibility */
|
|
1984
|
+
filterVisibility?: boolean;
|
|
1985
|
+
/** sets the filter visibility */
|
|
1986
|
+
setFilterVisibility: (visible: boolean) => void;
|
|
1987
|
+
/** sets the initial filters */
|
|
1988
|
+
filters: Filter[];
|
|
1989
|
+
/** function to update the current filters */
|
|
1990
|
+
setFilters: (updatedFilters: Filter[]) => void;
|
|
1991
|
+
/** function that adds a blank set of filter options */
|
|
1992
|
+
handleAddFilter: () => void;
|
|
1993
|
+
/** function to reset all filter values and search term */
|
|
1994
|
+
handleResetFilters: () => void;
|
|
1995
|
+
/** function that deletes a row and it's values visually and from state */
|
|
1996
|
+
handleDeleteFilter: (index: number) => void;
|
|
1997
|
+
/** sets the initial list of filter options */
|
|
1998
|
+
filterOptions: FilterOption[];
|
|
1999
|
+
/** a valid list of valid filter options */
|
|
2000
|
+
validFilterQuery: Filter[] | undefined;
|
|
2001
|
+
/** a component list to map filter options */
|
|
2002
|
+
filterMapper?: FilterMapper;
|
|
2003
|
+
/** the total number of results */
|
|
2004
|
+
totalResults?: number;
|
|
2005
|
+
};
|
|
2006
|
+
declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
|
|
2007
|
+
/**
|
|
2008
|
+
* @deprecated beta - Search and filter provider
|
|
2009
|
+
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
2010
|
+
* */
|
|
2011
|
+
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2012
|
+
/** @deprecated beta - Search and filter hook
|
|
2013
|
+
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
2014
|
+
*/
|
|
2015
|
+
declare const useSearchAndFilter: () => {
|
|
2016
|
+
/** the search term value */
|
|
2017
|
+
searchTerm: string;
|
|
2018
|
+
/** sets the search term value */
|
|
2019
|
+
setSearchTerm: (term: string) => void;
|
|
2020
|
+
/** current filter visibility */
|
|
2021
|
+
filterVisibility?: boolean | undefined;
|
|
2022
|
+
/** sets the filter visibility */
|
|
2023
|
+
setFilterVisibility: (visible: boolean) => void;
|
|
2024
|
+
/** sets the initial filters */
|
|
2025
|
+
filters: Filter[];
|
|
2026
|
+
/** function to update the current filters */
|
|
2027
|
+
setFilters: (updatedFilters: Filter[]) => void;
|
|
2028
|
+
/** function that adds a blank set of filter options */
|
|
2029
|
+
handleAddFilter: () => void;
|
|
2030
|
+
/** function to reset all filter values and search term */
|
|
2031
|
+
handleResetFilters: () => void;
|
|
2032
|
+
/** function that deletes a row and it's values visually and from state */
|
|
2033
|
+
handleDeleteFilter: (index: number) => void;
|
|
2034
|
+
/** sets the initial list of filter options */
|
|
2035
|
+
filterOptions: FilterOption[];
|
|
2036
|
+
/** a valid list of valid filter options */
|
|
2037
|
+
validFilterQuery: Filter[] | undefined;
|
|
2038
|
+
/** a component list to map filter options */
|
|
2039
|
+
filterMapper?: FilterMapper | undefined;
|
|
2040
|
+
/** the total number of results */
|
|
2041
|
+
totalResults?: number | undefined;
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
2045
|
+
/** The filter controls to be displayed
|
|
2046
|
+
* @default '<FilterControls />'
|
|
2047
|
+
*/
|
|
2048
|
+
filterControls?: React$1.ReactNode;
|
|
2049
|
+
/** sets the filter mode */
|
|
2050
|
+
filterVisible?: boolean;
|
|
2051
|
+
/** The view switch controls to be displayed */
|
|
2052
|
+
viewSwitchControls?: React$1.ReactNode;
|
|
2053
|
+
/** The number of total results */
|
|
2054
|
+
totalResults?: number;
|
|
2055
|
+
/** The results container view
|
|
2056
|
+
* @default '<SearchAndFilterResultContainer />'
|
|
2057
|
+
*/
|
|
2058
|
+
resultsContainerView?: React$1.ReactNode;
|
|
2059
|
+
/** sets the reset filter values */
|
|
2060
|
+
resetFilterValues?: Filter[];
|
|
2061
|
+
/** The filter mapper function */
|
|
2062
|
+
filterMapper?: Record<FilterEditor, React$1.ComponentType<any> | null>;
|
|
2063
|
+
/** Component to render inside filters container right below main Filters widget
|
|
2064
|
+
* that should contain additional controls like filters
|
|
2065
|
+
* which do not fit main structure or sorting */
|
|
2066
|
+
additionalFiltersContainer?: React$1.ReactNode;
|
|
2067
|
+
};
|
|
2068
|
+
/**
|
|
2069
|
+
* @deprecated beta - Search and filter component
|
|
2070
|
+
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
2071
|
+
* */
|
|
2072
|
+
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2073
|
+
|
|
2074
|
+
type FilterRowProps = {
|
|
2075
|
+
/** the index of the filter row */
|
|
2076
|
+
index: number;
|
|
2077
|
+
/** the list of filter options for each filter row */
|
|
2078
|
+
paramOptions: FilterOption[];
|
|
2079
|
+
/** function to trigger filter change events */
|
|
2080
|
+
onParamChange: (e: string) => void;
|
|
2081
|
+
/** the list of operator options for each filter row */
|
|
2082
|
+
operatorOptions: Operator[];
|
|
2083
|
+
/** function to trigger operator change events */
|
|
2084
|
+
onOperatorChange: (e: string) => void;
|
|
2085
|
+
/** function to trigger value change events */
|
|
2086
|
+
onValueChange: (e: string) => void;
|
|
2087
|
+
/** the list of value options for each filter row */
|
|
2088
|
+
valueOptions: InputOption[];
|
|
2089
|
+
};
|
|
2090
|
+
/** @deprecated beta - A filter item component used to display filter options */
|
|
2091
|
+
declare const FilterItem: ({ index, paramOptions, operatorOptions, valueOptions, onParamChange, onOperatorChange, onValueChange, }: FilterRowProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2092
|
+
type FilterItemsProps = {
|
|
2093
|
+
/** The text for the add button */
|
|
2094
|
+
addButtonText?: string;
|
|
2095
|
+
additionalFiltersContainer: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2096
|
+
};
|
|
2097
|
+
/** @deprecated beta - A filter items component used to display filter options */
|
|
2098
|
+
declare const FilterItems: ({ addButtonText, additionalFiltersContainer, }: FilterItemsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2099
|
+
|
|
2100
|
+
type SearchAndFilterOptionsContainerProps = {
|
|
2101
|
+
/** The button row to be displayed at the bottom of the container */
|
|
2102
|
+
buttonRow?: React__default.ReactNode;
|
|
2103
|
+
/** The children of the container */
|
|
2104
|
+
children: React__default.ReactNode;
|
|
2105
|
+
additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2106
|
+
};
|
|
2107
|
+
/**
|
|
2108
|
+
* @deprecated beta - A container component for search and filter options
|
|
2109
|
+
* @example <SearchAndFilterOptionsContainer buttonRow={<button>Button</button>}>Children</SearchAndFilterOptionsContainer>
|
|
2110
|
+
* */
|
|
2111
|
+
declare const SearchAndFilterOptionsContainer: ({ buttonRow, additionalFiltersContainer, children, }: SearchAndFilterOptionsContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2112
|
+
type FiltersProps = {
|
|
2113
|
+
/** The id of the filter menu */
|
|
2114
|
+
id: string;
|
|
2115
|
+
/** The text for the filter title */
|
|
2116
|
+
filterTitle?: string;
|
|
2117
|
+
/** The controls to be displayed at the bottom of the filter menu */
|
|
2118
|
+
menuControls?: React__default.ReactNode;
|
|
2119
|
+
/** The children of the filter menu */
|
|
2120
|
+
children: React__default.ReactNode;
|
|
2121
|
+
/** Sets the data-test-id attribute for the filter menu */
|
|
2122
|
+
dataTestId?: string;
|
|
2123
|
+
/** The text for the reset button
|
|
2124
|
+
* @default 'reset'
|
|
2125
|
+
*/
|
|
2126
|
+
resetButtonText?: string;
|
|
2127
|
+
additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2128
|
+
};
|
|
2129
|
+
/**
|
|
2130
|
+
* @deprecated beta - A filter menu component used to display filter options
|
|
2131
|
+
* @example <FilterMenu id="search-and-filter-options">Children</FilterMenu>
|
|
2132
|
+
* */
|
|
2133
|
+
declare const FilterMenu: ({ id, filterTitle, menuControls, additionalFiltersContainer, children, dataTestId, resetButtonText, }: FiltersProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2134
|
+
|
|
2135
|
+
type SearchAndFilterResultContainerProps = {
|
|
2136
|
+
/** The label for the clear button
|
|
2137
|
+
* @default 'Clear'
|
|
2138
|
+
*/
|
|
2139
|
+
clearButtonLabel?: string;
|
|
2140
|
+
/** The text for the button */
|
|
2141
|
+
buttonText?: string;
|
|
2142
|
+
/** The title for the callout */
|
|
2143
|
+
calloutTitle?: string;
|
|
2144
|
+
/** The text for the callout */
|
|
2145
|
+
calloutText?: string;
|
|
2146
|
+
/** The function to handle the clear button */
|
|
2147
|
+
onHandleClear?: () => void;
|
|
2148
|
+
/** Sets whether to show or hide both clear search buttons */
|
|
2149
|
+
hideClearButton?: boolean;
|
|
2150
|
+
};
|
|
2151
|
+
/** @deprecated beta - Search and filter results container */
|
|
2152
|
+
declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
2153
|
+
|
|
2154
|
+
declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
|
|
2155
|
+
type SearchOnlyProviderProps = Pick<SearchAndFilterProviderProps, 'onSearchChange'> & {
|
|
2156
|
+
/** sets the max width of input wrapper
|
|
2157
|
+
* @default '712px'
|
|
2158
|
+
*/
|
|
2159
|
+
maxWidth?: string;
|
|
2160
|
+
};
|
|
2161
|
+
declare const SearchOnlyFilter: ({ onSearchChange, maxWidth }: SearchOnlyProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2162
|
+
|
|
2163
|
+
type SortItemsProps = {
|
|
2164
|
+
/** The label for the sort by field
|
|
2165
|
+
* @default 'Sort by'
|
|
2166
|
+
*/
|
|
2167
|
+
sortByLabel?: string;
|
|
2168
|
+
/** The label for the locale returned field
|
|
2169
|
+
* @default 'Enabled locale'
|
|
2170
|
+
*/
|
|
2171
|
+
localeLabel?: string;
|
|
2172
|
+
/** sets the list of sort options */
|
|
2173
|
+
sortOptions: FilterOption[];
|
|
2174
|
+
/** the default sort by value */
|
|
2175
|
+
sortByValue?: string;
|
|
2176
|
+
/** function to trigger sort change events */
|
|
2177
|
+
onSortChange: (sort: string) => void;
|
|
2178
|
+
/** sets the list of locale options */
|
|
2179
|
+
localeOptions?: InputOption[];
|
|
2180
|
+
/** function to trigger locale change events */
|
|
2181
|
+
onLocaleChange?: (locale: string) => void;
|
|
2182
|
+
/** sets the default locale option value */
|
|
2183
|
+
localeValue?: string;
|
|
2184
|
+
/**
|
|
2185
|
+
* Optionally disable the binding for sorting inputs.
|
|
2186
|
+
* Mostly used to disable binding for Single/Multiple data resources
|
|
2187
|
+
*/
|
|
2188
|
+
disableSortBinding?: boolean;
|
|
2189
|
+
};
|
|
2190
|
+
/**
|
|
2191
|
+
Copy of Design System <SortItems > component with ability to bind variables to inputs.
|
|
2192
|
+
*/
|
|
2193
|
+
declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue, onSortChange, localeValue, localeOptions, onLocaleChange, disableSortBinding, }: SortItemsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2194
|
+
|
|
1640
2195
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1641
2196
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1642
2197
|
|
|
1643
2198
|
/** Converts dynamic inputs into VariablesProvider-format variables */
|
|
1644
|
-
declare function useDynamicInputsAsVariables(dynamicInputs:
|
|
2199
|
+
declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
|
|
1645
2200
|
|
|
1646
2201
|
/**
|
|
1647
2202
|
* Provides convenient access to the current Uniform Mesh SDK instance via React hook.
|
|
@@ -1658,4 +2213,34 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
1658
2213
|
*/
|
|
1659
2214
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
1660
2215
|
|
|
1661
|
-
|
|
2216
|
+
type ContentDataResourceLocaleInfoResult = {
|
|
2217
|
+
/**
|
|
2218
|
+
* Effective locale for data resource. It can be one of two types:
|
|
2219
|
+
* - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
|
|
2220
|
+
* - variable reference - locale stored in mesh data type/resource as a variable reference (e.g. '${locale}')
|
|
2221
|
+
*/
|
|
2222
|
+
effectiveLocale: string;
|
|
2223
|
+
/** Bound locale value. It can be one of two types:
|
|
2224
|
+
* - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
|
|
2225
|
+
* - empty string - if locale was not set
|
|
2226
|
+
*/
|
|
2227
|
+
boundLocale: string | undefined;
|
|
2228
|
+
};
|
|
2229
|
+
type ContentDataResourceLocaleInfoProps = {
|
|
2230
|
+
/** Current stored locale in mesh data type/resource.
|
|
2231
|
+
* It can be one of tree types:
|
|
2232
|
+
* - undefined - no locale stored in mesh data type/resource yet or it is not localized
|
|
2233
|
+
* - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
|
|
2234
|
+
* - variable reference - locale stored in mesh data type/resource as a variable reference (e.g. '${locale}')
|
|
2235
|
+
*
|
|
2236
|
+
* If locale is empty, fallback to dynamic locale value if it is available.
|
|
2237
|
+
*/
|
|
2238
|
+
locale: string | undefined;
|
|
2239
|
+
/** Map of dynamic inputs for current composition. Should be passed down from DataResource metadata */
|
|
2240
|
+
dynamicInputs: DynamicInputs;
|
|
2241
|
+
/** In case of empty locale value, this method is called to bind dynamic locale (sets locale to '${locale}') */
|
|
2242
|
+
setLocale?: (locale: string) => void;
|
|
2243
|
+
};
|
|
2244
|
+
declare function useContentDataResourceLocaleInfo({ locale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
2245
|
+
|
|
2246
|
+
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, type FilterEditorCommonInputProps, type FilterEditorProps, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterRowProps, FilterSingleChoiceEditor, type FiltersProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, type NoResultsProps, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SYSTEM_DATE_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, SortItems, type SortItemsProps, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, damSelectItemImage, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInfoBtn, damSelectedItemInner, damSelectedItemLinkBtn, damSelectedItemLinkContainer, damSelectedItemMediaContainer, damSelectedItemPopover, damSelectedItemPopoverLabel, damSelectedItemSmallText, damSelectedItemTitle, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, filterMapper, hasReferencedVariables, prettifyBindExpression, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemIcon, productSelectedItemImage, productSelectedItemLinkContainer, productedSelectedItemLinkBtn, productedSelectedItemSmallText, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|