@itwin/presentation-common 5.0.0-dev.5 → 5.0.0-dev.52
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/CHANGELOG.md +47 -1
- package/lib/cjs/assets/locales/en/Presentation.json +19 -19
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/cjs/presentation-common/AsyncTasks.js +4 -3
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +31 -0
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +29 -8
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +4 -4
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +6 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +9 -0
- package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +17 -0
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +95 -16
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +22 -11
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +111 -8
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +137 -98
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +19 -0
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +37 -30
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +31 -23
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +1 -1
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +4 -1
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js +4 -3
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +31 -0
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +29 -8
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +4 -4
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +6 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +9 -0
- package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-common/Utils.js +16 -0
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +96 -17
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +22 -11
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +111 -8
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +137 -98
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +19 -0
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +37 -30
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js +31 -23
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +1 -1
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +1 -1
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/Presentation.json +19 -19
- package/package.json +12 -12
|
@@ -64,6 +64,32 @@ export interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> extends
|
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
66
|
export type FieldJSON<TClassInfoJSON = ClassInfoJSON> = BaseFieldJSON | PropertiesFieldJSON<TClassInfoJSON> | ArrayPropertiesFieldJSON<TClassInfoJSON> | StructPropertiesFieldJSON<TClassInfoJSON> | NestedContentFieldJSON<TClassInfoJSON>;
|
|
67
|
+
/**
|
|
68
|
+
* Props for creating [[Field]].
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
interface FieldProps {
|
|
72
|
+
/** Category information */
|
|
73
|
+
category: CategoryDescription;
|
|
74
|
+
/** Unique name */
|
|
75
|
+
name: string;
|
|
76
|
+
/** Display label */
|
|
77
|
+
label: string;
|
|
78
|
+
/** Description of this field's values data type */
|
|
79
|
+
type: TypeDescription;
|
|
80
|
+
/** Are values in this field read-only */
|
|
81
|
+
isReadonly: boolean;
|
|
82
|
+
/** Priority of the field */
|
|
83
|
+
priority: number;
|
|
84
|
+
/** Property editor used to edit values of this field */
|
|
85
|
+
editor?: EditorDescription;
|
|
86
|
+
/** Property renderer used to render values of this field */
|
|
87
|
+
renderer?: RendererDescription;
|
|
88
|
+
/** Extended data associated with this field */
|
|
89
|
+
extendedData?: {
|
|
90
|
+
[key: string]: unknown;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
67
93
|
/**
|
|
68
94
|
* Describes a single content field. A field is usually represented as a grid column
|
|
69
95
|
* or a property pane row.
|
|
@@ -94,7 +120,7 @@ export declare class Field {
|
|
|
94
120
|
/** Parent field */
|
|
95
121
|
private _parent?;
|
|
96
122
|
/**
|
|
97
|
-
* Creates an instance of Field.
|
|
123
|
+
* Creates an instance of [[Field]].
|
|
98
124
|
* @param category Category information
|
|
99
125
|
* @param name Unique name
|
|
100
126
|
* @param label Display label
|
|
@@ -104,10 +130,13 @@ export declare class Field {
|
|
|
104
130
|
* @param editor Property editor used to edit values of this field
|
|
105
131
|
* @param renderer Property renderer used to render values of this field
|
|
106
132
|
* @param extendedData Extended data associated with this field
|
|
133
|
+
* @deprecated in 5.0. Use an overload with `FieldProps` instead.
|
|
107
134
|
*/
|
|
108
135
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, editor?: EditorDescription, renderer?: RendererDescription, extendedData?: {
|
|
109
136
|
[key: string]: unknown;
|
|
110
137
|
});
|
|
138
|
+
/** Creates an instance of [[Field]]. */
|
|
139
|
+
constructor(props: FieldProps);
|
|
111
140
|
/**
|
|
112
141
|
* Is this a [[PropertiesField]]
|
|
113
142
|
*/
|
|
@@ -149,6 +178,14 @@ export declare class Field {
|
|
|
149
178
|
*/
|
|
150
179
|
matchesDescriptor(descriptor: FieldDescriptor): boolean;
|
|
151
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Props for creating [[PropertiesField]].
|
|
183
|
+
* @public
|
|
184
|
+
*/
|
|
185
|
+
interface PropertiesFieldProps extends FieldProps {
|
|
186
|
+
/** A list of properties this field is created from */
|
|
187
|
+
properties: Property[];
|
|
188
|
+
}
|
|
152
189
|
/**
|
|
153
190
|
* Describes a content field that's based on one or more similar
|
|
154
191
|
* EC properties.
|
|
@@ -159,7 +196,7 @@ export declare class PropertiesField extends Field {
|
|
|
159
196
|
/** A list of properties this field is created from */
|
|
160
197
|
properties: Property[];
|
|
161
198
|
/**
|
|
162
|
-
* Creates an instance of PropertiesField.
|
|
199
|
+
* Creates an instance of [[PropertiesField]].
|
|
163
200
|
* @param category Category information
|
|
164
201
|
* @param name Unique name
|
|
165
202
|
* @param label Display label
|
|
@@ -169,8 +206,11 @@ export declare class PropertiesField extends Field {
|
|
|
169
206
|
* @param properties A list of properties this field is created from
|
|
170
207
|
* @param editor Property editor used to edit values of this field
|
|
171
208
|
* @param renderer Property renderer used to render values of this field
|
|
209
|
+
* @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.
|
|
172
210
|
*/
|
|
173
|
-
constructor(category: CategoryDescription, name: string, label: string,
|
|
211
|
+
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
212
|
+
/** Creates an instance of [[PropertiesField]]. */
|
|
213
|
+
constructor(props: PropertiesFieldProps);
|
|
174
214
|
/** Is this a an array property field */
|
|
175
215
|
isArrayPropertiesField(): this is ArrayPropertiesField;
|
|
176
216
|
/** Is this a an struct property field */
|
|
@@ -202,13 +242,26 @@ export declare class PropertiesField extends Field {
|
|
|
202
242
|
*/
|
|
203
243
|
matchesDescriptor(descriptor: FieldDescriptor): boolean;
|
|
204
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* Props for creating [[ArrayPropertiesField]].
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
interface ArrayPropertiesFieldProps extends PropertiesFieldProps {
|
|
250
|
+
itemsField: PropertiesField;
|
|
251
|
+
}
|
|
205
252
|
/**
|
|
206
253
|
* Describes a content field that's based on one or more similar EC array properties.
|
|
207
254
|
* @public
|
|
208
255
|
*/
|
|
209
256
|
export declare class ArrayPropertiesField extends PropertiesField {
|
|
210
257
|
itemsField: PropertiesField;
|
|
211
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Creates an instance of [[ArrayPropertiesField]].
|
|
260
|
+
* @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.
|
|
261
|
+
*/
|
|
262
|
+
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
263
|
+
/** Creates an instance of [[ArrayPropertiesField]]. */
|
|
264
|
+
constructor(props: ArrayPropertiesFieldProps);
|
|
212
265
|
isArrayPropertiesField(): this is ArrayPropertiesField;
|
|
213
266
|
clone(): ArrayPropertiesField;
|
|
214
267
|
/** Serialize this object to JSON */
|
|
@@ -227,13 +280,26 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
227
280
|
[id: string]: CompressedClassInfoJSON;
|
|
228
281
|
}, categories: CategoryDescription[]): ArrayPropertiesField;
|
|
229
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Props for creating [[StructPropertiesField]].
|
|
285
|
+
* @public
|
|
286
|
+
*/
|
|
287
|
+
interface StructPropertiesFieldProps extends PropertiesFieldProps {
|
|
288
|
+
memberFields: PropertiesField[];
|
|
289
|
+
}
|
|
230
290
|
/**
|
|
231
291
|
* Describes a content field that's based on one or more similar EC struct properties.
|
|
232
292
|
* @public
|
|
233
293
|
*/
|
|
234
294
|
export declare class StructPropertiesField extends PropertiesField {
|
|
235
295
|
memberFields: PropertiesField[];
|
|
236
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Creates an instance of [[StructPropertiesField]].
|
|
298
|
+
* @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.
|
|
299
|
+
*/
|
|
300
|
+
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
301
|
+
/** Creates an instance of [[StructPropertiesField]]. */
|
|
302
|
+
constructor(props: StructPropertiesFieldProps);
|
|
237
303
|
isStructPropertiesField(): this is StructPropertiesField;
|
|
238
304
|
clone(): StructPropertiesField;
|
|
239
305
|
/** Serialize this object to JSON */
|
|
@@ -252,6 +318,39 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
252
318
|
[id: string]: CompressedClassInfoJSON;
|
|
253
319
|
}, categories: CategoryDescription[]): StructPropertiesField;
|
|
254
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Props for creating [[NestedContentField]].
|
|
323
|
+
* @public
|
|
324
|
+
*/
|
|
325
|
+
interface NestedContentFieldProps extends FieldProps {
|
|
326
|
+
/** Information about an ECClass whose properties are nested inside this field */
|
|
327
|
+
contentClassInfo: ClassInfo;
|
|
328
|
+
/** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */
|
|
329
|
+
pathToPrimaryClass: RelationshipPath;
|
|
330
|
+
/**
|
|
331
|
+
* Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)
|
|
332
|
+
* and content class of this field.
|
|
333
|
+
*
|
|
334
|
+
* The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up
|
|
335
|
+
* presentation rules for creating the content.
|
|
336
|
+
*/
|
|
337
|
+
relationshipMeaning?: RelationshipMeaning;
|
|
338
|
+
/**
|
|
339
|
+
* When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes
|
|
340
|
+
* has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is
|
|
341
|
+
* here to help.
|
|
342
|
+
*
|
|
343
|
+
* **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.
|
|
344
|
+
* When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,
|
|
345
|
+
* class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute
|
|
346
|
+
* will contain ID of class `B`, identifying that only this specific class has the relationship.
|
|
347
|
+
*/
|
|
348
|
+
actualPrimaryClassIds?: Id64String[];
|
|
349
|
+
/** Contained nested fields */
|
|
350
|
+
nestedFields: Field[];
|
|
351
|
+
/** Flag specifying whether field should be expanded */
|
|
352
|
+
autoExpand?: boolean;
|
|
353
|
+
}
|
|
255
354
|
/**
|
|
256
355
|
* Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
|
|
257
356
|
*
|
|
@@ -286,7 +385,7 @@ export declare class NestedContentField extends Field {
|
|
|
286
385
|
/** Flag specifying whether field should be expanded */
|
|
287
386
|
autoExpand?: boolean;
|
|
288
387
|
/**
|
|
289
|
-
* Creates an instance of NestedContentField.
|
|
388
|
+
* Creates an instance of [[NestedContentField]].
|
|
290
389
|
* @param category Category information
|
|
291
390
|
* @param name Unique name
|
|
292
391
|
* @param label Display label
|
|
@@ -300,8 +399,11 @@ export declare class NestedContentField extends Field {
|
|
|
300
399
|
* @param autoExpand Flag specifying whether field should be expanded
|
|
301
400
|
* @param relationshipMeaning RelationshipMeaning of the field
|
|
302
401
|
* @param renderer Property renderer used to render values of this field
|
|
402
|
+
* @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.
|
|
303
403
|
*/
|
|
304
|
-
constructor(category: CategoryDescription, name: string, label: string,
|
|
404
|
+
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, contentClassInfo: ClassInfo, pathToPrimaryClass: RelationshipPath, nestedFields: Field[], editor?: EditorDescription, autoExpand?: boolean, renderer?: RendererDescription);
|
|
405
|
+
/** Creates an instance of [[NestedContentField]]. */
|
|
406
|
+
constructor(props: NestedContentFieldProps);
|
|
305
407
|
clone(): NestedContentField;
|
|
306
408
|
/**
|
|
307
409
|
* Get field by its name
|
|
@@ -323,7 +425,7 @@ export declare class NestedContentField extends Field {
|
|
|
323
425
|
/** Deserialize a [[NestedContentField]] from compressed JSON. */
|
|
324
426
|
static fromCompressedJSON(json: NestedContentFieldJSON<Id64String>, classesMap: {
|
|
325
427
|
[id: string]: CompressedClassInfoJSON;
|
|
326
|
-
}, categories: CategoryDescription[]):
|
|
428
|
+
}, categories: CategoryDescription[]): NestedContentField;
|
|
327
429
|
private static fromCommonJSON;
|
|
328
430
|
/** Resets parent of this field and all nested fields. */
|
|
329
431
|
resetParentship(): void;
|
|
@@ -391,4 +493,5 @@ export interface PropertiesFieldDescriptor extends FieldDescriptorBase {
|
|
|
391
493
|
name: string;
|
|
392
494
|
}>;
|
|
393
495
|
}
|
|
496
|
+
export {};
|
|
394
497
|
//# sourceMappingURL=Fields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,EACT,aAAa,EACb,uBAAuB,EAKvB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"Fields.d.ts","sourceR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,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,WAAY,KAAK,EAAE,mBAAmB,eAAe,YAAY,OAAO,KAAG,KAAK,GAAG,SAcnH,CAAC;AAEF;;;GAGG;AACH,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,yBAAyB,CAAC;AAE/E,cAAc;AAEd,yBAAiB,eAAe,CAAC;IAC/B,uCAAuC;IACvC,SAAgB,OAAO,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,oBAAoB,CAErE;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,yBAAyB,CAE/E;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC;IACrC,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;QAChB,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,oBAAoB;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ"}
|
|
@@ -9,6 +9,7 @@ import { assert } from "@itwin/core-bentley";
|
|
|
9
9
|
import { NavigationPropertyInfo, RelatedClassInfo, RelationshipPath, } from "../EC";
|
|
10
10
|
import { PresentationError, PresentationStatus } from "../Error";
|
|
11
11
|
import { RelationshipMeaning } from "../rules/content/modifiers/RelatedPropertiesSpecification";
|
|
12
|
+
import { omitUndefined } from "../Utils";
|
|
12
13
|
import { Property } from "./Property";
|
|
13
14
|
function isPropertiesField(field) {
|
|
14
15
|
return !!field.properties;
|
|
@@ -29,28 +30,30 @@ function isNestedContentField(field) {
|
|
|
29
30
|
* @public
|
|
30
31
|
*/
|
|
31
32
|
export class Field {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
33
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, editor, renderer, extendedData) {
|
|
34
|
+
/* istanbul ignore next */
|
|
35
|
+
const props = "category" in categoryOrProps
|
|
36
|
+
? categoryOrProps
|
|
37
|
+
: {
|
|
38
|
+
category: categoryOrProps,
|
|
39
|
+
name: name,
|
|
40
|
+
label: label,
|
|
41
|
+
type: type,
|
|
42
|
+
isReadonly: isReadonly,
|
|
43
|
+
priority: priority,
|
|
44
|
+
editor,
|
|
45
|
+
renderer,
|
|
46
|
+
extendedData,
|
|
47
|
+
};
|
|
48
|
+
this.category = props.category;
|
|
49
|
+
this.name = props.name;
|
|
50
|
+
this.label = props.label;
|
|
51
|
+
this.type = props.type;
|
|
52
|
+
this.isReadonly = props.isReadonly;
|
|
53
|
+
this.priority = props.priority;
|
|
54
|
+
this.editor = props.editor;
|
|
55
|
+
this.renderer = props.renderer;
|
|
56
|
+
this.extendedData = props.extendedData;
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
59
|
* Is this a [[PropertiesField]]
|
|
@@ -71,13 +74,13 @@ export class Field {
|
|
|
71
74
|
return this._parent;
|
|
72
75
|
}
|
|
73
76
|
clone() {
|
|
74
|
-
const clone = new Field(this
|
|
77
|
+
const clone = new Field(this);
|
|
75
78
|
clone.rebuildParentship(this.parent);
|
|
76
79
|
return clone;
|
|
77
80
|
}
|
|
78
81
|
/** Serialize this object to JSON */
|
|
79
82
|
toJSON() {
|
|
80
|
-
return {
|
|
83
|
+
return omitUndefined({
|
|
81
84
|
category: this.category.name,
|
|
82
85
|
name: this.name,
|
|
83
86
|
label: this.label,
|
|
@@ -86,8 +89,8 @@ export class Field {
|
|
|
86
89
|
priority: this.priority,
|
|
87
90
|
renderer: this.renderer,
|
|
88
91
|
editor: this.editor,
|
|
89
|
-
extendedData: this.extendedData
|
|
90
|
-
};
|
|
92
|
+
extendedData: this.extendedData,
|
|
93
|
+
});
|
|
91
94
|
}
|
|
92
95
|
/** Serialize this object to compressed JSON */
|
|
93
96
|
toCompressedJSON(_classesMap) {
|
|
@@ -105,8 +108,8 @@ export class Field {
|
|
|
105
108
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
106
109
|
return NestedContentField.fromJSON(json, categories);
|
|
107
110
|
}
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
return new Field({
|
|
112
|
+
...json,
|
|
110
113
|
category: Field.getCategoryFromFieldJson(json, categories),
|
|
111
114
|
});
|
|
112
115
|
}
|
|
@@ -121,8 +124,8 @@ export class Field {
|
|
|
121
124
|
if (isNestedContentField(json)) {
|
|
122
125
|
return NestedContentField.fromCompressedJSON(json, classesMap, categories);
|
|
123
126
|
}
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
return new Field({
|
|
128
|
+
...json,
|
|
126
129
|
category: Field.getCategoryFromFieldJson(json, categories),
|
|
127
130
|
});
|
|
128
131
|
}
|
|
@@ -166,21 +169,23 @@ export class Field {
|
|
|
166
169
|
* @public
|
|
167
170
|
*/
|
|
168
171
|
export class PropertiesField extends Field {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
172
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, properties, editor, renderer) {
|
|
173
|
+
/* istanbul ignore next */
|
|
174
|
+
const props = "category" in categoryOrProps
|
|
175
|
+
? categoryOrProps
|
|
176
|
+
: {
|
|
177
|
+
category: categoryOrProps,
|
|
178
|
+
name: name,
|
|
179
|
+
label: label,
|
|
180
|
+
type: type,
|
|
181
|
+
isReadonly: isReadonly,
|
|
182
|
+
priority: priority,
|
|
183
|
+
editor,
|
|
184
|
+
renderer,
|
|
185
|
+
properties: properties,
|
|
186
|
+
};
|
|
187
|
+
super(props);
|
|
188
|
+
this.properties = props.properties;
|
|
184
189
|
}
|
|
185
190
|
/** Is this a an array property field */
|
|
186
191
|
isArrayPropertiesField() {
|
|
@@ -191,7 +196,7 @@ export class PropertiesField extends Field {
|
|
|
191
196
|
return false;
|
|
192
197
|
}
|
|
193
198
|
clone() {
|
|
194
|
-
const clone = new PropertiesField(this
|
|
199
|
+
const clone = new PropertiesField(this);
|
|
195
200
|
clone.rebuildParentship(this.parent);
|
|
196
201
|
return clone;
|
|
197
202
|
}
|
|
@@ -220,8 +225,8 @@ export class PropertiesField extends Field {
|
|
|
220
225
|
if (isStructPropertiesField(json)) {
|
|
221
226
|
return StructPropertiesField.fromJSON(json, categories);
|
|
222
227
|
}
|
|
223
|
-
|
|
224
|
-
|
|
228
|
+
return new PropertiesField({
|
|
229
|
+
...json,
|
|
225
230
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
226
231
|
});
|
|
227
232
|
}
|
|
@@ -236,8 +241,8 @@ export class PropertiesField extends Field {
|
|
|
236
241
|
if (isStructPropertiesField(json)) {
|
|
237
242
|
return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
238
243
|
}
|
|
239
|
-
|
|
240
|
-
|
|
244
|
+
return new PropertiesField({
|
|
245
|
+
...json,
|
|
241
246
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
242
247
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
243
248
|
});
|
|
@@ -298,15 +303,30 @@ export class PropertiesField extends Field {
|
|
|
298
303
|
* @public
|
|
299
304
|
*/
|
|
300
305
|
export class ArrayPropertiesField extends PropertiesField {
|
|
301
|
-
constructor(
|
|
302
|
-
|
|
303
|
-
|
|
306
|
+
constructor(categoryOrProps, name, label, type, itemsField, isReadonly, priority, properties, editor, renderer) {
|
|
307
|
+
/* istanbul ignore next */
|
|
308
|
+
const props = "category" in categoryOrProps
|
|
309
|
+
? categoryOrProps
|
|
310
|
+
: {
|
|
311
|
+
category: categoryOrProps,
|
|
312
|
+
name: name,
|
|
313
|
+
label: label,
|
|
314
|
+
type: type,
|
|
315
|
+
isReadonly: isReadonly,
|
|
316
|
+
priority: priority,
|
|
317
|
+
editor,
|
|
318
|
+
renderer,
|
|
319
|
+
properties: properties,
|
|
320
|
+
itemsField: itemsField,
|
|
321
|
+
};
|
|
322
|
+
super(props);
|
|
323
|
+
this.itemsField = props.itemsField;
|
|
304
324
|
}
|
|
305
325
|
isArrayPropertiesField() {
|
|
306
326
|
return true;
|
|
307
327
|
}
|
|
308
328
|
clone() {
|
|
309
|
-
const clone = new ArrayPropertiesField(this
|
|
329
|
+
const clone = new ArrayPropertiesField(this);
|
|
310
330
|
clone.rebuildParentship(this.parent);
|
|
311
331
|
return clone;
|
|
312
332
|
}
|
|
@@ -326,8 +346,8 @@ export class ArrayPropertiesField extends PropertiesField {
|
|
|
326
346
|
}
|
|
327
347
|
/** Deserialize [[ArrayPropertiesField]] from JSON */
|
|
328
348
|
static fromJSON(json, categories) {
|
|
329
|
-
|
|
330
|
-
|
|
349
|
+
return new ArrayPropertiesField({
|
|
350
|
+
...json,
|
|
331
351
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
332
352
|
itemsField: PropertiesField.fromJSON(json.itemsField, categories),
|
|
333
353
|
});
|
|
@@ -337,8 +357,8 @@ export class ArrayPropertiesField extends PropertiesField {
|
|
|
337
357
|
* @public
|
|
338
358
|
*/
|
|
339
359
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
340
|
-
|
|
341
|
-
|
|
360
|
+
return new ArrayPropertiesField({
|
|
361
|
+
...json,
|
|
342
362
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
343
363
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
344
364
|
itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),
|
|
@@ -350,15 +370,30 @@ export class ArrayPropertiesField extends PropertiesField {
|
|
|
350
370
|
* @public
|
|
351
371
|
*/
|
|
352
372
|
export class StructPropertiesField extends PropertiesField {
|
|
353
|
-
constructor(
|
|
354
|
-
|
|
355
|
-
|
|
373
|
+
constructor(categoryOrProps, name, label, type, memberFields, isReadonly, priority, properties, editor, renderer) {
|
|
374
|
+
/* istanbul ignore next */
|
|
375
|
+
const props = "category" in categoryOrProps
|
|
376
|
+
? categoryOrProps
|
|
377
|
+
: {
|
|
378
|
+
category: categoryOrProps,
|
|
379
|
+
name: name,
|
|
380
|
+
label: label,
|
|
381
|
+
type: type,
|
|
382
|
+
isReadonly: isReadonly,
|
|
383
|
+
priority: priority,
|
|
384
|
+
editor,
|
|
385
|
+
renderer,
|
|
386
|
+
properties: properties,
|
|
387
|
+
memberFields: memberFields,
|
|
388
|
+
};
|
|
389
|
+
super(props);
|
|
390
|
+
this.memberFields = props.memberFields;
|
|
356
391
|
}
|
|
357
392
|
isStructPropertiesField() {
|
|
358
393
|
return true;
|
|
359
394
|
}
|
|
360
395
|
clone() {
|
|
361
|
-
const clone = new StructPropertiesField(this
|
|
396
|
+
const clone = new StructPropertiesField(this);
|
|
362
397
|
clone.rebuildParentship(this.parent);
|
|
363
398
|
return clone;
|
|
364
399
|
}
|
|
@@ -378,8 +413,8 @@ export class StructPropertiesField extends PropertiesField {
|
|
|
378
413
|
}
|
|
379
414
|
/** Deserialize [[StructPropertiesField]] from JSON */
|
|
380
415
|
static fromJSON(json, categories) {
|
|
381
|
-
|
|
382
|
-
|
|
416
|
+
return new StructPropertiesField({
|
|
417
|
+
...json,
|
|
383
418
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
384
419
|
memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),
|
|
385
420
|
});
|
|
@@ -389,8 +424,8 @@ export class StructPropertiesField extends PropertiesField {
|
|
|
389
424
|
* @public
|
|
390
425
|
*/
|
|
391
426
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
392
|
-
|
|
393
|
-
|
|
427
|
+
return new StructPropertiesField({
|
|
428
|
+
...json,
|
|
394
429
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
395
430
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
396
431
|
memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),
|
|
@@ -403,35 +438,37 @@ export class StructPropertiesField extends PropertiesField {
|
|
|
403
438
|
* @public
|
|
404
439
|
*/
|
|
405
440
|
export class NestedContentField extends Field {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
this.
|
|
426
|
-
this.
|
|
427
|
-
this.
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
441
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, contentClassInfo, pathToPrimaryClass, nestedFields, editor, autoExpand, renderer) {
|
|
442
|
+
/* istanbul ignore next */
|
|
443
|
+
const props = "category" in categoryOrProps
|
|
444
|
+
? categoryOrProps
|
|
445
|
+
: {
|
|
446
|
+
category: categoryOrProps,
|
|
447
|
+
name: name,
|
|
448
|
+
label: label,
|
|
449
|
+
type: type,
|
|
450
|
+
isReadonly: isReadonly,
|
|
451
|
+
priority: priority,
|
|
452
|
+
editor,
|
|
453
|
+
renderer,
|
|
454
|
+
contentClassInfo: contentClassInfo,
|
|
455
|
+
pathToPrimaryClass: pathToPrimaryClass,
|
|
456
|
+
nestedFields: nestedFields,
|
|
457
|
+
autoExpand,
|
|
458
|
+
};
|
|
459
|
+
super(props);
|
|
460
|
+
this.contentClassInfo = props.contentClassInfo;
|
|
461
|
+
this.pathToPrimaryClass = props.pathToPrimaryClass;
|
|
462
|
+
this.relationshipMeaning = props.relationshipMeaning ?? RelationshipMeaning.RelatedInstance;
|
|
463
|
+
this.nestedFields = props.nestedFields;
|
|
464
|
+
this.autoExpand = props.autoExpand;
|
|
465
|
+
this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];
|
|
430
466
|
}
|
|
431
467
|
clone() {
|
|
432
|
-
const clone = new NestedContentField(
|
|
433
|
-
|
|
434
|
-
|
|
468
|
+
const clone = new NestedContentField({
|
|
469
|
+
...this,
|
|
470
|
+
nestedFields: this.nestedFields.map((n) => n.clone()),
|
|
471
|
+
});
|
|
435
472
|
clone.rebuildParentship(this.parent);
|
|
436
473
|
return clone;
|
|
437
474
|
}
|
|
@@ -452,7 +489,7 @@ export class NestedContentField extends Field {
|
|
|
452
489
|
relationshipMeaning: this.relationshipMeaning,
|
|
453
490
|
actualPrimaryClassIds: this.actualPrimaryClassIds,
|
|
454
491
|
nestedFields: this.nestedFields.map((field) => field.toJSON()),
|
|
455
|
-
autoExpand:
|
|
492
|
+
...(this.autoExpand ? { autoExpand: true } : undefined),
|
|
456
493
|
};
|
|
457
494
|
}
|
|
458
495
|
/** Serialize this object to compressed JSON */
|
|
@@ -474,8 +511,9 @@ export class NestedContentField extends Field {
|
|
|
474
511
|
if (!json) {
|
|
475
512
|
return undefined;
|
|
476
513
|
}
|
|
477
|
-
|
|
478
|
-
|
|
514
|
+
return new NestedContentField({
|
|
515
|
+
...json,
|
|
516
|
+
...this.fromCommonJSON(json, categories),
|
|
479
517
|
nestedFields: json.nestedFields
|
|
480
518
|
.map((nestedFieldJson) => Field.fromJSON(nestedFieldJson, categories))
|
|
481
519
|
.filter((nestedField) => !!nestedField),
|
|
@@ -484,8 +522,9 @@ export class NestedContentField extends Field {
|
|
|
484
522
|
/** Deserialize a [[NestedContentField]] from compressed JSON. */
|
|
485
523
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
486
524
|
assert(classesMap.hasOwnProperty(json.contentClassInfo));
|
|
487
|
-
|
|
488
|
-
|
|
525
|
+
return new NestedContentField({
|
|
526
|
+
...json,
|
|
527
|
+
...this.fromCommonJSON(json, categories),
|
|
489
528
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
490
529
|
nestedFields: json.nestedFields
|
|
491
530
|
.map((nestedFieldJson) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))
|