@itwin/presentation-common 5.0.0-dev.57 → 5.0.0-dev.58
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/Ruleset.schema.json +3 -258
- package/lib/cjs/presentation-common/EC.d.ts +5 -80
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +1 -97
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.d.ts +2 -2
- package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js +4 -11
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +0 -48
- package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js +1 -44
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +7 -9
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +19 -15
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +7 -7
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +2 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +1 -46
- package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +2 -79
- package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Update.js +1 -104
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +7 -0
- package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +23 -0
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.d.ts +0 -7
- package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js +1 -10
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +17 -12
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +2 -31
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +3 -25
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +4 -10
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +26 -35
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +5 -31
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +5 -53
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +2 -12
- package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js +0 -18
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +0 -106
- package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js +1 -215
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +0 -23
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +0 -83
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js +6 -24
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +2 -106
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +0 -99
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +0 -117
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.d.ts +0 -14
- package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -15
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +1 -5
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +2 -5
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +5 -80
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +0 -96
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.d.ts +2 -2
- package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/esm/presentation-common/KeySet.js +4 -11
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts +0 -48
- package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js +0 -43
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +7 -9
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +19 -15
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +7 -7
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +2 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +1 -46
- package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +2 -79
- package/lib/esm/presentation-common/Update.d.ts.map +1 -1
- package/lib/esm/presentation-common/Update.js +0 -103
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +7 -0
- package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-common/Utils.js +22 -0
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.d.ts +0 -7
- package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Content.js +1 -10
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +17 -12
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +2 -31
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +3 -25
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +4 -10
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +26 -35
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +5 -31
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +5 -53
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +2 -12
- package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Property.js +0 -18
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +0 -106
- package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Value.js +0 -214
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +1 -22
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +0 -83
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js +6 -24
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +2 -106
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +1 -98
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +1 -116
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.d.ts +0 -14
- package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +0 -14
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +1 -5
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +1 -5
- package/lib/esm/presentation-common.js.map +1 -1
- package/package.json +10 -10
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +0 -9
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,wDAA0E;AAC1E,oCAA2D;AAC3D,mCAA6I;AAsC7I;;;GAGG;AACH,MAAa,IAAI;IACf;;;OAGG;IACI,SAAS,CAAiB;IACjC,6DAA6D;IACtD,WAAW,CAAgB;IAClC,gCAAgC;IACzB,KAAK,CAAkB;IAC9B;;;OAGG;IACI,OAAO,CAAS;I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EAAE,oBAAY,CAAC,QAAQ,CAAC,aAAa,CAAqB;YACvE,4DAA4D;YAC5D,KAAK,EAAE,iCAAe,CAAC,QAAQ,CAAC,eAAe,CAAC;SACjD,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QAC3C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,YAAY,CAAC,IAAyB;QAClD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,6DAA6D;YAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,CAAC;QACD,6DAA6D;QAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,KAAU;QAC/C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC;CACF;AAjKD,oBAiKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { ClassInfo, InstanceKey } from \"../EC\";\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\nimport { omitUndefined, ValuesDictionary } from \"../Utils\";\nimport { DisplayValue, DisplayValueJSON, DisplayValuesMap, DisplayValuesMapJSON, Value, ValueJSON, ValuesMap, ValuesMapJSON } from \"./Value\";\n\n/**\n * Serialized [[Item]] JSON representation.\n * @public\n */\nexport interface ItemJSON {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n // TODO: rename to `label`\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelDefinition: LabelDefinitionJSON;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n imageId: string;\n classInfo?: ClassInfo;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: ValuesDictionary<ValueJSON>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: ValuesDictionary<DisplayValueJSON>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * Props for creating [[Item]].\n * @public\n */\ninterface ItemProps {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n label: LabelDefinition;\n classInfo?: ClassInfo;\n values: ValuesDictionary<Value>;\n displayValues: ValuesDictionary<DisplayValue>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * A data structure that represents a single content record.\n * @public\n */\nexport class Item {\n /**\n * Keys of input instances that caused this item to be included in content. Only set if the content is\n * created with [[ContentFlags.IncludeInputKeys]] flag.\n */\n public inputKeys?: InstanceKey[];\n /** Keys of instances whose data is contained in this item */\n public primaryKeys: InstanceKey[];\n /** Display label of the item */\n public label: LabelDefinition;\n /**\n * ID of the image associated with this item\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n public imageId: string;\n /** For cases when item consists only of same class instances, information about the ECClass */\n public classInfo?: ClassInfo;\n /** Raw values dictionary */\n public values: ValuesDictionary<Value>;\n /** Display values dictionary */\n public displayValues: ValuesDictionary<DisplayValue>;\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\n public mergedFieldNames: string[];\n /** Extended data injected into this content item */\n public extendedData?: { [key: string]: any };\n\n /**\n * Creates an instance of Item.\n * @param primaryKeys Keys of instances whose data is contained in this item\n * @param label Display label of the item\n * @param imageId ID of the image associated with this item\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\n * @param values Raw values dictionary\n * @param displayValues Display values dictionary\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\n * @param extendedData Extended data injected into this content item\n * @deprecated in 5.0. Use an overload with `ItemProps` instead.\n */\n public constructor(\n primaryKeys: InstanceKey[],\n label: string | LabelDefinition,\n imageId: string,\n classInfo: ClassInfo | undefined,\n values: ValuesDictionary<Value>,\n displayValues: ValuesDictionary<DisplayValue>,\n mergedFieldNames: string[],\n extendedData?: { [key: string]: any },\n );\n public constructor(props: ItemProps);\n public constructor(\n primaryKeysOrProps: ItemProps | InstanceKey[],\n label?: string | LabelDefinition,\n imageId?: string,\n classInfo?: ClassInfo | undefined,\n values?: ValuesDictionary<Value>,\n displayValues?: ValuesDictionary<DisplayValue>,\n mergedFieldNames?: string[],\n extendedData?: { [key: string]: any },\n ) {\n /* istanbul ignore next */\n const props = Array.isArray(primaryKeysOrProps)\n ? {\n primaryKeys: primaryKeysOrProps,\n label: typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label!,\n imageId: imageId!,\n classInfo,\n values: values!,\n displayValues: displayValues!,\n mergedFieldNames: mergedFieldNames!,\n extendedData,\n }\n : primaryKeysOrProps;\n\n if (\"inputKeys\" in props) {\n this.inputKeys = props.inputKeys;\n }\n this.primaryKeys = props.primaryKeys;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.imageId = \"imageId\" in props ? props.imageId : \"\";\n this.classInfo = props.classInfo;\n this.values = props.values;\n this.displayValues = props.displayValues;\n this.mergedFieldNames = props.mergedFieldNames;\n this.extendedData = props.extendedData;\n this.label = props.label;\n }\n\n /**\n * Is value of field with the specified name merged in this record.\n */\n public isFieldMerged(fieldName: string): boolean {\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\n }\n\n /** Serialize this object to JSON */\n public toJSON(): ItemJSON {\n const { label, values, displayValues, ...baseItem } = this;\n return omitUndefined({\n ...baseItem,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.toJSON(values) as ValuesMapJSON,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.toJSON(displayValues) as DisplayValuesMapJSON,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelDefinition: LabelDefinition.toJSON(label),\n });\n }\n\n /** Deserialize [[Item]] from JSON */\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\n if (!json) {\n return undefined;\n }\n if (typeof json === \"string\") {\n return JSON.parse(json, (key, value) => Item.reviver(key, value));\n }\n const { labelDefinition, values, displayValues, ...baseJson } = json;\n\n return new Item({\n ...baseJson,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.fromJSON(values) as ValuesMap,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.fromJSON(displayValues) as DisplayValuesMap,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n label: LabelDefinition.fromJSON(labelDefinition),\n });\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing Item objects.\n * @internal\n */\n public static reviver(key: string, value: any): any {\n return key === \"\" ? Item.fromJSON(value) : value;\n }\n\n /**\n * Deserialize items list from JSON\n * @param json JSON or JSON serialized to string to deserialize from\n * @returns Deserialized items list\n * @internal\n */\n public static listFromJSON(json: ItemJSON[] | string): Item[] {\n if (typeof json === \"string\") {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return JSON.parse(json, Item.listReviver);\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return json.map(Item.fromJSON).filter((item): item is Item => !!item);\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[Item]][] objects.\n * @internal\n */\n public static listReviver(key: string, value: any): any {\n return key === \"\" ? Item.listFromJSON(value) : value;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,wDAAqD;AACrD,oCAA2D;AAkC3D;;;GAGG;AACH,MAAa,IAAI;IACf;;;OAGG;IACI,SAAS,CAAiB;IACjC,6DAA6D;IACtD,WAAW,CAAgB;IAClC,gCAAgC;IACzB,KAAK,CAAkB;IAC9B,+FAA+F;IACxF,SAAS,CAAa;IAC7B,4BAA4B;IACrB,MAAM,CAA0B;IACvC,gCAAgC;IACzB,aAAa,CAAiC;IACrD,+HAA+H;IACxH,gBAAgB,CAAW;IAClC,oDAAoD;IAC7C,YAAY,CAA0B;IAyB7C,YACE,kBAA6C,EAC7C,KAAgC,EAChC,OAAgB,EAChB,SAAiC,EACjC,MAAgC,EAChC,aAA8C,EAC9C,gBAA2B,EAC3B,YAAqC;QAErC,0BAA0B;QAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;YAC7C,CAAC,CAAC;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,iCAAe,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAM;gBAClF,OAAO,EAAE,OAAQ;gBACjB,SAAS;gBACT,MAAM,EAAE,MAAO;gBACf,aAAa,EAAE,aAAc;gBAC7B,gBAAgB,EAAE,gBAAiB;gBACnC,YAAY;aACb;YACH,CAAC,CAAC,kBAAkB,CAAC;QAEvB,IAAI,WAAW,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,SAAiB;QACpC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED,oCAAoC;IAC7B,MAAM;QACX,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO,IAAA,qBAAa,EAAC;YACnB,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC,CAAC;IACL,CAAC;IAED,qCAAqC;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAmC;QACxD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC9C,OAAO,IAAI,IAAI,CAAC;YACd,GAAG,QAAQ;YACX,KAAK,EAAE,eAAe;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAhHD,oBAgHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { ClassInfo, InstanceKey } from \"../EC\";\nimport { LabelDefinition } from \"../LabelDefinition\";\nimport { omitUndefined, ValuesDictionary } from \"../Utils\";\nimport { DisplayValue, Value } from \"./Value\";\n\n/**\n * Serialized [[Item]] JSON representation.\n * @public\n */\nexport interface ItemJSON {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n // TODO: rename to `label`\n labelDefinition: LabelDefinition;\n classInfo?: ClassInfo;\n values: ValuesDictionary<Value>;\n displayValues: ValuesDictionary<DisplayValue>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * Props for creating [[Item]].\n * @public\n */\ninterface ItemProps {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n label: LabelDefinition;\n classInfo?: ClassInfo;\n values: ValuesDictionary<Value>;\n displayValues: ValuesDictionary<DisplayValue>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * A data structure that represents a single content record.\n * @public\n */\nexport class Item {\n /**\n * Keys of input instances that caused this item to be included in content. Only set if the content is\n * created with [[ContentFlags.IncludeInputKeys]] flag.\n */\n public inputKeys?: InstanceKey[];\n /** Keys of instances whose data is contained in this item */\n public primaryKeys: InstanceKey[];\n /** Display label of the item */\n public label: LabelDefinition;\n /** For cases when item consists only of same class instances, information about the ECClass */\n public classInfo?: ClassInfo;\n /** Raw values dictionary */\n public values: ValuesDictionary<Value>;\n /** Display values dictionary */\n public displayValues: ValuesDictionary<DisplayValue>;\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\n public mergedFieldNames: string[];\n /** Extended data injected into this content item */\n public extendedData?: { [key: string]: any };\n\n /**\n * Creates an instance of Item.\n * @param primaryKeys Keys of instances whose data is contained in this item\n * @param label Display label of the item\n * @param imageId ID of the image associated with this item\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\n * @param values Raw values dictionary\n * @param displayValues Display values dictionary\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\n * @param extendedData Extended data injected into this content item\n * @deprecated in 5.0. Use an overload with `ItemProps` instead.\n */\n public constructor(\n primaryKeys: InstanceKey[],\n label: string | LabelDefinition,\n imageId: string,\n classInfo: ClassInfo | undefined,\n values: ValuesDictionary<Value>,\n displayValues: ValuesDictionary<DisplayValue>,\n mergedFieldNames: string[],\n extendedData?: { [key: string]: any },\n );\n public constructor(props: ItemProps);\n public constructor(\n primaryKeysOrProps: ItemProps | InstanceKey[],\n label?: string | LabelDefinition,\n imageId?: string,\n classInfo?: ClassInfo | undefined,\n values?: ValuesDictionary<Value>,\n displayValues?: ValuesDictionary<DisplayValue>,\n mergedFieldNames?: string[],\n extendedData?: { [key: string]: any },\n ) {\n /* istanbul ignore next */\n const props = Array.isArray(primaryKeysOrProps)\n ? {\n primaryKeys: primaryKeysOrProps,\n label: typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label!,\n imageId: imageId!,\n classInfo,\n values: values!,\n displayValues: displayValues!,\n mergedFieldNames: mergedFieldNames!,\n extendedData,\n }\n : primaryKeysOrProps;\n\n if (\"inputKeys\" in props) {\n this.inputKeys = props.inputKeys;\n }\n this.primaryKeys = props.primaryKeys;\n this.classInfo = props.classInfo;\n this.values = props.values;\n this.displayValues = props.displayValues;\n this.mergedFieldNames = props.mergedFieldNames;\n this.extendedData = props.extendedData;\n this.label = props.label;\n }\n\n /**\n * Is value of field with the specified name merged in this record.\n */\n public isFieldMerged(fieldName: string): boolean {\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\n }\n\n /** Serialize this object to JSON */\n public toJSON(): ItemJSON {\n const { label, ...baseItem } = this;\n return omitUndefined({\n ...baseItem,\n labelDefinition: label,\n });\n }\n\n /** Deserialize [[Item]] from JSON */\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\n if (!json) {\n return undefined;\n }\n\n if (typeof json === \"string\") {\n return Item.fromJSON(JSON.parse(json));\n }\n\n const { labelDefinition, ...baseJson } = json;\n return new Item({\n ...baseJson,\n label: labelDefinition,\n });\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Content
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from "../EC";
|
|
5
5
|
/**
|
|
6
6
|
* Data structure that describes one step of property
|
|
7
7
|
* accessor path.
|
|
@@ -33,26 +33,16 @@ export interface Property {
|
|
|
33
33
|
}
|
|
34
34
|
/** @public */
|
|
35
35
|
export declare namespace Property {
|
|
36
|
-
/**
|
|
37
|
-
* Serialize [[Property]] to JSON
|
|
38
|
-
* @deprecated in 3.x. Use [[toCompressedJSON]]
|
|
39
|
-
*/
|
|
40
|
-
function toJSON(prop: Property): PropertyJSON;
|
|
41
36
|
/** Serialize [[Property]] to compressed JSON */
|
|
42
37
|
function toCompressedJSON(prop: Property, classesMap: {
|
|
43
38
|
[id: string]: CompressedClassInfoJSON;
|
|
44
39
|
}): PropertyJSON<string>;
|
|
45
|
-
/**
|
|
46
|
-
* Deserializes [[Property]] from JSON
|
|
47
|
-
* @deprecated in 3.x. Use [[Property]]
|
|
48
|
-
*/
|
|
49
|
-
function fromJSON(json: PropertyJSON): Property;
|
|
50
40
|
}
|
|
51
41
|
/**
|
|
52
42
|
* JSON representation of [[Property]]
|
|
53
43
|
* @public
|
|
54
44
|
*/
|
|
55
|
-
export interface PropertyJSON<TClassInfoJSON =
|
|
45
|
+
export interface PropertyJSON<TClassInfoJSON = ClassInfo> {
|
|
56
46
|
property: PropertyInfoJSON<TClassInfoJSON>;
|
|
57
47
|
}
|
|
58
48
|
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,6BAA6B;IAC7B,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,cAAc;AACd,yBAAiB,QAAQ,CAAC;IACxB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAA;KAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAI5H;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,cAAc,GAAG,SAAS;IACtD,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAC5C"}
|
|
@@ -12,15 +12,6 @@ const EC_1 = require("../EC");
|
|
|
12
12
|
/** @public */
|
|
13
13
|
var Property;
|
|
14
14
|
(function (Property) {
|
|
15
|
-
/**
|
|
16
|
-
* Serialize [[Property]] to JSON
|
|
17
|
-
* @deprecated in 3.x. Use [[toCompressedJSON]]
|
|
18
|
-
*/
|
|
19
|
-
// istanbul ignore next
|
|
20
|
-
function toJSON(prop) {
|
|
21
|
-
return { ...prop };
|
|
22
|
-
}
|
|
23
|
-
Property.toJSON = toJSON;
|
|
24
15
|
/** Serialize [[Property]] to compressed JSON */
|
|
25
16
|
function toCompressedJSON(prop, classesMap) {
|
|
26
17
|
return {
|
|
@@ -28,14 +19,5 @@ var Property;
|
|
|
28
19
|
};
|
|
29
20
|
}
|
|
30
21
|
Property.toCompressedJSON = toCompressedJSON;
|
|
31
|
-
/**
|
|
32
|
-
* Deserializes [[Property]] from JSON
|
|
33
|
-
* @deprecated in 3.x. Use [[Property]]
|
|
34
|
-
*/
|
|
35
|
-
// istanbul ignore next
|
|
36
|
-
function fromJSON(json) {
|
|
37
|
-
return { ...json };
|
|
38
|
-
}
|
|
39
|
-
Property.fromJSON = fromJSON;
|
|
40
22
|
})(Property || (exports.Property = Property = {}));
|
|
41
23
|
//# sourceMappingURL=Property.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,8BAA2F;AAkC3F,cAAc;AACd,IAAiB,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACvB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,iBAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;AACH,CAAC,EAPgB,QAAQ,wBAAR,QAAQ,QAOxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC\";\n\n/**\n * Data structure that describes one step of property\n * accessor path.\n *\n * @public\n */\nexport interface PropertyAccessor {\n /** Name of ECProperty */\n propertyName: string;\n /** If the property is an array, array index. Otherwise undefined. */\n arrayIndex?: number;\n}\n\n/**\n * Describes path to a property.\n * @public\n */\nexport type PropertyAccessorPath = PropertyAccessor[];\n\n/**\n * Data structure that describes a single ECProperty that's\n * included in a [[PropertiesField]].\n *\n * TODO: Remove?\n *\n * @public\n */\nexport interface Property {\n /** ECProperty information */\n property: PropertyInfo;\n}\n\n/** @public */\nexport namespace Property {\n /** Serialize [[Property]] to compressed JSON */\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\n return {\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\n };\n }\n}\n\n/**\n * JSON representation of [[Property]]\n * @public\n */\nexport interface PropertyJSON<TClassInfoJSON = ClassInfo> {\n property: PropertyInfoJSON<TClassInfoJSON>;\n}\n"]}
|
|
@@ -21,16 +21,6 @@ export declare namespace Value {
|
|
|
21
21
|
function isNestedContent(value: Value): value is NestedContentValue[];
|
|
22
22
|
/** Is the value a navigation value */
|
|
23
23
|
function isNavigationValue(value: Value): value is NavigationPropertyValue;
|
|
24
|
-
/**
|
|
25
|
-
* Serialize [[Value]] to JSON
|
|
26
|
-
* @deprecated in 3.x. Use [[Value]]
|
|
27
|
-
*/
|
|
28
|
-
function fromJSON(json: ValueJSON): Value;
|
|
29
|
-
/**
|
|
30
|
-
* Deserialize [[Value]] from JSON
|
|
31
|
-
* @deprecated in 3.x. Use [[Value]]
|
|
32
|
-
*/
|
|
33
|
-
function toJSON(value: Value): ValueJSON;
|
|
34
24
|
}
|
|
35
25
|
/**
|
|
36
26
|
* A map of raw values
|
|
@@ -57,16 +47,6 @@ export declare namespace DisplayValue {
|
|
|
57
47
|
function isArray(value: DisplayValue): value is DisplayValuesArray;
|
|
58
48
|
/** Is the value a map / struct */
|
|
59
49
|
function isMap(value: DisplayValue): value is DisplayValuesMap;
|
|
60
|
-
/**
|
|
61
|
-
* Serialize [[DisplayValue]] to JSON
|
|
62
|
-
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
63
|
-
*/
|
|
64
|
-
function fromJSON(json: DisplayValueJSON): DisplayValue;
|
|
65
|
-
/**
|
|
66
|
-
* Deserialize [[DisplayValue]] from JSON
|
|
67
|
-
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
68
|
-
*/
|
|
69
|
-
function toJSON(value: DisplayValue): DisplayValueJSON;
|
|
70
50
|
}
|
|
71
51
|
/**
|
|
72
52
|
* A map of display values
|
|
@@ -108,70 +88,6 @@ export interface NavigationPropertyValue {
|
|
|
108
88
|
/** Id of target instance. */
|
|
109
89
|
id: InstanceId;
|
|
110
90
|
}
|
|
111
|
-
/** @public */
|
|
112
|
-
export declare namespace NestedContentValue {
|
|
113
|
-
/**
|
|
114
|
-
* Serialize [[NestedContentValue]] to JSON
|
|
115
|
-
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
116
|
-
*/
|
|
117
|
-
function toJSON(value: NestedContentValue): NestedContentValueJSON;
|
|
118
|
-
/**
|
|
119
|
-
* Deserialize [[NestedContentValue]] from JSON
|
|
120
|
-
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
121
|
-
*/
|
|
122
|
-
function fromJSON(json: NestedContentValueJSON): NestedContentValue;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* JSON representation of [[Value]]
|
|
126
|
-
* @public
|
|
127
|
-
* @deprecated in 3.x. Use [[Value]]
|
|
128
|
-
*/
|
|
129
|
-
export type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];
|
|
130
|
-
/**
|
|
131
|
-
* JSON representation of [[ValuesMap]]
|
|
132
|
-
* @public
|
|
133
|
-
* @deprecated in 3.x. Use [[ValuesMap]]
|
|
134
|
-
*/
|
|
135
|
-
export interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* JSON representation of [[ValuesArray]]
|
|
139
|
-
* @public
|
|
140
|
-
* @deprecated in 3.x. Use [[ValuesArray]]
|
|
141
|
-
*/
|
|
142
|
-
export interface ValuesArrayJSON extends Array<ValueJSON> {
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* JSON representation of [[DisplayValue]]
|
|
146
|
-
* @public
|
|
147
|
-
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
148
|
-
*/
|
|
149
|
-
export type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;
|
|
150
|
-
/**
|
|
151
|
-
* JSON representation of [[DisplayValuesMap]]
|
|
152
|
-
* @public
|
|
153
|
-
* @deprecated in 3.x. Use [[DisplayValuesMap]]
|
|
154
|
-
*/
|
|
155
|
-
export interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* JSON representation of [[DisplayValuesArray]]
|
|
159
|
-
* @public
|
|
160
|
-
* @deprecated in 3.x. Use [[DisplayValuesArray]]
|
|
161
|
-
*/
|
|
162
|
-
export interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* JSON representation of [[NestedContentValue]]
|
|
166
|
-
* @public
|
|
167
|
-
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
168
|
-
*/
|
|
169
|
-
export interface NestedContentValueJSON {
|
|
170
|
-
primaryKeys: InstanceKey[];
|
|
171
|
-
values: ValuesDictionary<ValueJSON>;
|
|
172
|
-
displayValues: ValuesDictionary<DisplayValueJSON>;
|
|
173
|
-
mergedFieldNames: string[];
|
|
174
|
-
}
|
|
175
91
|
/**
|
|
176
92
|
* A group of raw values and their common display value.
|
|
177
93
|
* @public
|
|
@@ -182,26 +98,4 @@ export interface DisplayValueGroup {
|
|
|
182
98
|
/** A list of grouped raw values */
|
|
183
99
|
groupedRawValues: Value[];
|
|
184
100
|
}
|
|
185
|
-
/**
|
|
186
|
-
* JSON representation of [[DisplayValueGroup]].
|
|
187
|
-
* @public
|
|
188
|
-
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
189
|
-
*/
|
|
190
|
-
export interface DisplayValueGroupJSON {
|
|
191
|
-
displayValue: DisplayValueJSON;
|
|
192
|
-
groupedRawValues: ValueJSON[];
|
|
193
|
-
}
|
|
194
|
-
/** @public */
|
|
195
|
-
export declare namespace DisplayValueGroup {
|
|
196
|
-
/**
|
|
197
|
-
* Serialize [[DisplayValueGroup]] to JSON
|
|
198
|
-
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
199
|
-
*/
|
|
200
|
-
function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON;
|
|
201
|
-
/**
|
|
202
|
-
* Deserialize [[DisplayValueGroup]] from JSON
|
|
203
|
-
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
204
|
-
*/
|
|
205
|
-
function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup;
|
|
206
|
-
}
|
|
207
101
|
//# sourceMappingURL=Value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,uBAAuB,GAAG,kBAAkB,EAAE,CAAC;AAErI,cAAc;AAEd,yBAAiB,KAAK,CAAC;IACrB,+BAA+B;IAC/B,SAAgB,WAAW,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,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,KAAK,EAAE,eAAe,CAAC;IACvB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,YAAY,EAAE,YAAY,CAAC;IAC3B,mCAAmC;IACnC,gBAAgB,EAAE,KAAK,EAAE,CAAC;CAC3B"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Content
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.DisplayValue = exports.Value = void 0;
|
|
11
11
|
/** @public */
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
13
13
|
var Value;
|
|
@@ -40,50 +40,6 @@ var Value;
|
|
|
40
40
|
value.label !== undefined);
|
|
41
41
|
}
|
|
42
42
|
Value.isNavigationValue = isNavigationValue;
|
|
43
|
-
/**
|
|
44
|
-
* Serialize [[Value]] to JSON
|
|
45
|
-
* @deprecated in 3.x. Use [[Value]]
|
|
46
|
-
*/
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
48
|
-
function fromJSON(json) {
|
|
49
|
-
if (json === null) {
|
|
50
|
-
return undefined;
|
|
51
|
-
}
|
|
52
|
-
if (isNestedContentValue(json)) {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
54
|
-
return json.map(NestedContentValue.fromJSON);
|
|
55
|
-
}
|
|
56
|
-
if (isArrayValue(json)) {
|
|
57
|
-
return valuesArrayFromJSON(json);
|
|
58
|
-
}
|
|
59
|
-
if (isMapValue(json)) {
|
|
60
|
-
return valuesMapFromJSON(json);
|
|
61
|
-
}
|
|
62
|
-
return json;
|
|
63
|
-
}
|
|
64
|
-
Value.fromJSON = fromJSON;
|
|
65
|
-
/**
|
|
66
|
-
* Deserialize [[Value]] from JSON
|
|
67
|
-
* @deprecated in 3.x. Use [[Value]]
|
|
68
|
-
*/
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
70
|
-
function toJSON(value) {
|
|
71
|
-
if (undefined === value) {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
if (isNestedContentValue(value)) {
|
|
75
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
76
|
-
return value.map(NestedContentValue.toJSON);
|
|
77
|
-
}
|
|
78
|
-
if (isArrayValue(value)) {
|
|
79
|
-
return valuesArrayToJSON(value);
|
|
80
|
-
}
|
|
81
|
-
if (isMapValue(value)) {
|
|
82
|
-
return valuesMapToJSON(value);
|
|
83
|
-
}
|
|
84
|
-
return value;
|
|
85
|
-
}
|
|
86
|
-
Value.toJSON = toJSON;
|
|
87
43
|
})(Value || (exports.Value = Value = {}));
|
|
88
44
|
/** @public */
|
|
89
45
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
@@ -104,106 +60,7 @@ var DisplayValue;
|
|
|
104
60
|
return isMapValue(value);
|
|
105
61
|
}
|
|
106
62
|
DisplayValue.isMap = isMap;
|
|
107
|
-
/**
|
|
108
|
-
* Serialize [[DisplayValue]] to JSON
|
|
109
|
-
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
110
|
-
*/
|
|
111
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
112
|
-
function fromJSON(json) {
|
|
113
|
-
if (json === null) {
|
|
114
|
-
return undefined;
|
|
115
|
-
}
|
|
116
|
-
if (isArrayValue(json)) {
|
|
117
|
-
return displayValuesArrayFromJSON(json);
|
|
118
|
-
}
|
|
119
|
-
if (isMapValue(json)) {
|
|
120
|
-
return displayValuesMapFromJSON(json);
|
|
121
|
-
}
|
|
122
|
-
return json;
|
|
123
|
-
}
|
|
124
|
-
DisplayValue.fromJSON = fromJSON;
|
|
125
|
-
/**
|
|
126
|
-
* Deserialize [[DisplayValue]] from JSON
|
|
127
|
-
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
128
|
-
*/
|
|
129
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
130
|
-
function toJSON(value) {
|
|
131
|
-
if (undefined === value) {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
if (isArrayValue(value)) {
|
|
135
|
-
return displayValuesArrayToJSON(value);
|
|
136
|
-
}
|
|
137
|
-
if (isMapValue(value)) {
|
|
138
|
-
return displayValuesMapToJSON(value);
|
|
139
|
-
}
|
|
140
|
-
return value;
|
|
141
|
-
}
|
|
142
|
-
DisplayValue.toJSON = toJSON;
|
|
143
63
|
})(DisplayValue || (exports.DisplayValue = DisplayValue = {}));
|
|
144
|
-
/** @public */
|
|
145
|
-
var NestedContentValue;
|
|
146
|
-
(function (NestedContentValue) {
|
|
147
|
-
/**
|
|
148
|
-
* Serialize [[NestedContentValue]] to JSON
|
|
149
|
-
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
150
|
-
*/
|
|
151
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
152
|
-
function toJSON(value) {
|
|
153
|
-
return {
|
|
154
|
-
...value,
|
|
155
|
-
values: valuesMapToJSON(value.values),
|
|
156
|
-
displayValues: displayValuesMapToJSON(value.displayValues),
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
NestedContentValue.toJSON = toJSON;
|
|
160
|
-
/**
|
|
161
|
-
* Deserialize [[NestedContentValue]] from JSON
|
|
162
|
-
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
163
|
-
*/
|
|
164
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
165
|
-
function fromJSON(json) {
|
|
166
|
-
return {
|
|
167
|
-
...json,
|
|
168
|
-
values: valuesMapFromJSON(json.values),
|
|
169
|
-
displayValues: displayValuesMapFromJSON(json.displayValues),
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
NestedContentValue.fromJSON = fromJSON;
|
|
173
|
-
})(NestedContentValue || (exports.NestedContentValue = NestedContentValue = {}));
|
|
174
|
-
/** @public */
|
|
175
|
-
var DisplayValueGroup;
|
|
176
|
-
(function (DisplayValueGroup) {
|
|
177
|
-
/**
|
|
178
|
-
* Serialize [[DisplayValueGroup]] to JSON
|
|
179
|
-
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
180
|
-
*/
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
182
|
-
function toJSON(group) {
|
|
183
|
-
return {
|
|
184
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
185
|
-
displayValue: DisplayValue.toJSON(group.displayValue),
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
187
|
-
groupedRawValues: group.groupedRawValues.map(Value.toJSON),
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
DisplayValueGroup.toJSON = toJSON;
|
|
191
|
-
/**
|
|
192
|
-
* Deserialize [[DisplayValueGroup]] from JSON
|
|
193
|
-
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
194
|
-
*/
|
|
195
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
196
|
-
function fromJSON(json) {
|
|
197
|
-
return {
|
|
198
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
199
|
-
displayValue: DisplayValue.fromJSON(json.displayValue),
|
|
200
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
201
|
-
groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
DisplayValueGroup.fromJSON = fromJSON;
|
|
205
|
-
})(DisplayValueGroup || (exports.DisplayValueGroup = DisplayValueGroup = {}));
|
|
206
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
207
64
|
function isNestedContentValue(v) {
|
|
208
65
|
return (v !== undefined &&
|
|
209
66
|
Array.isArray(v) &&
|
|
@@ -219,81 +76,10 @@ function isArrayValue(v) {
|
|
|
219
76
|
// we have other means to determine the type of value.
|
|
220
77
|
return v !== undefined && Array.isArray(v);
|
|
221
78
|
}
|
|
222
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
223
79
|
function isMapValue(v) {
|
|
224
80
|
return v !== undefined && typeof v === "object" && !Array.isArray(v);
|
|
225
81
|
}
|
|
226
82
|
function isPrimitiveValue(v) {
|
|
227
83
|
return !isArrayValue(v) && !isMapValue(v);
|
|
228
84
|
}
|
|
229
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
230
|
-
function valuesArrayFromJSON(json) {
|
|
231
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
232
|
-
return json.map(Value.fromJSON);
|
|
233
|
-
}
|
|
234
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
235
|
-
function valuesArrayToJSON(values) {
|
|
236
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
237
|
-
return values.map(Value.toJSON);
|
|
238
|
-
}
|
|
239
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
240
|
-
function valuesMapFromJSON(json) {
|
|
241
|
-
const map = {};
|
|
242
|
-
for (const key in json) {
|
|
243
|
-
/* istanbul ignore else */
|
|
244
|
-
if (json.hasOwnProperty(key)) {
|
|
245
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
246
|
-
map[key] = Value.fromJSON(json[key]);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return map;
|
|
250
|
-
}
|
|
251
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
252
|
-
function valuesMapToJSON(values) {
|
|
253
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
254
|
-
const map = {};
|
|
255
|
-
for (const key in values) {
|
|
256
|
-
/* istanbul ignore else */
|
|
257
|
-
if (values.hasOwnProperty(key)) {
|
|
258
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
259
|
-
map[key] = Value.toJSON(values[key]);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return map;
|
|
263
|
-
}
|
|
264
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
265
|
-
function displayValuesArrayFromJSON(json) {
|
|
266
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
267
|
-
return json.map(DisplayValue.fromJSON);
|
|
268
|
-
}
|
|
269
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
270
|
-
function displayValuesArrayToJSON(values) {
|
|
271
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
272
|
-
return values.map(DisplayValue.toJSON);
|
|
273
|
-
}
|
|
274
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
275
|
-
function displayValuesMapFromJSON(json) {
|
|
276
|
-
const map = {};
|
|
277
|
-
for (const key in json) {
|
|
278
|
-
/* istanbul ignore else */
|
|
279
|
-
if (json.hasOwnProperty(key)) {
|
|
280
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
281
|
-
map[key] = DisplayValue.fromJSON(json[key]);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return map;
|
|
285
|
-
}
|
|
286
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
287
|
-
function displayValuesMapToJSON(values) {
|
|
288
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
289
|
-
const map = {};
|
|
290
|
-
for (const key in values) {
|
|
291
|
-
/* istanbul ignore else */
|
|
292
|
-
if (values.hasOwnProperty(key)) {
|
|
293
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
294
|
-
map[key] = DisplayValue.toJSON(values[key]);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return map;
|
|
298
|
-
}
|
|
299
85
|
//# sourceMappingURL=Value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
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C;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,4DAA4D;AAC5D,SAAS,sBAAsB,CAAC,MAAwB;IACtD,4DAA4D;IAC5D,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { InstanceId, InstanceKey } from \"../EC\";\nimport { LabelDefinition } from \"../LabelDefinition\";\nimport { ValuesDictionary } from \"../Utils\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace Value {\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Is the value a navigation value */\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\n return (\n value !== undefined &&\n (value as NavigationPropertyValue).id !== undefined &&\n (value as NavigationPropertyValue).className !== undefined &&\n (value as NavigationPropertyValue).label !== undefined\n );\n }\n\n /**\n * Serialize [[Value]] to JSON\n * @deprecated in 3.x. Use [[Value]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: ValueJSON): Value {\n if (json === null) {\n return undefined;\n }\n if (isNestedContentValue(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(NestedContentValue.fromJSON);\n }\n if (isArrayValue(json)) {\n return valuesArrayFromJSON(json);\n }\n if (isMapValue(json)) {\n return valuesMapFromJSON(json);\n }\n return json;\n }\n\n /**\n * Deserialize [[Value]] from JSON\n * @deprecated in 3.x. Use [[Value]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: Value): ValueJSON {\n if (undefined === value) {\n return null;\n }\n if (isNestedContentValue(value)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return value.map(NestedContentValue.toJSON);\n }\n if (isArrayValue(value)) {\n return valuesArrayToJSON(value);\n }\n if (isMapValue(value)) {\n return valuesMapToJSON(value);\n }\n return value;\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace DisplayValue {\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n\n /**\n * Serialize [[DisplayValue]] to JSON\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\n if (json === null) {\n return undefined;\n }\n if (isArrayValue(json)) {\n return displayValuesArrayFromJSON(json);\n }\n if (isMapValue(json)) {\n return displayValuesMapFromJSON(json);\n }\n return json;\n }\n\n /**\n * Deserialize [[DisplayValue]] from JSON\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: DisplayValue): DisplayValueJSON {\n if (undefined === value) {\n return null;\n }\n if (isArrayValue(value)) {\n return displayValuesArrayToJSON(value);\n }\n if (isMapValue(value)) {\n return displayValuesMapToJSON(value);\n }\n return value;\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n /** Label of the ECInstance that this `NestedContentValue` is based on. */\n labelDefinition?: LabelDefinition;\n}\n\n/**\n * Data structure that describes value of the navigation property.\n * @public\n */\nexport interface NavigationPropertyValue {\n /** Label of target instance. */\n label: LabelDefinition;\n /** Full class name of target instance in format `SchemaName:ClassName` */\n className: string;\n /** Id of target instance. */\n id: InstanceId;\n}\n\n/** @public */\nexport namespace NestedContentValue {\n /**\n * Serialize [[NestedContentValue]] to JSON\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\n return {\n ...value,\n values: valuesMapToJSON(value.values),\n displayValues: displayValuesMapToJSON(value.displayValues),\n };\n }\n\n /**\n * Deserialize [[NestedContentValue]] from JSON\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\n return {\n ...json,\n values: valuesMapFromJSON(json.values),\n displayValues: displayValuesMapFromJSON(json.displayValues),\n };\n }\n}\n\n/**\n * JSON representation of [[Value]]\n * @public\n * @deprecated in 3.x. Use [[Value]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];\n/**\n * JSON representation of [[ValuesMap]]\n * @public\n * @deprecated in 3.x. Use [[ValuesMap]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[ValuesArray]]\n * @public\n * @deprecated in 3.x. Use [[ValuesArray]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ValuesArrayJSON extends Array<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[DisplayValue]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\n\n/**\n * JSON representation of [[DisplayValuesMap]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[DisplayValuesArray]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[NestedContentValue]]\n * @public\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\nexport interface NestedContentValueJSON {\n primaryKeys: InstanceKey[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: ValuesDictionary<ValueJSON>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: ValuesDictionary<DisplayValueJSON>;\n mergedFieldNames: string[];\n}\n\n/**\n * A group of raw values and their common display value.\n * @public\n */\nexport interface DisplayValueGroup {\n /** Common display value for all grouped raw values */\n displayValue: DisplayValue;\n /** A list of grouped raw values */\n groupedRawValues: Value[];\n}\n\n/**\n * JSON representation of [[DisplayValueGroup]].\n * @public\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\nexport interface DisplayValueGroupJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValueJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: ValueJSON[];\n}\n\n/** @public */\nexport namespace DisplayValueGroup {\n /**\n * Serialize [[DisplayValueGroup]] to JSON\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValue.toJSON(group.displayValue),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\n };\n }\n\n /**\n * Deserialize [[DisplayValueGroup]] from JSON\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValue.fromJSON(json.displayValue),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\n };\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\n return (\n v !== undefined &&\n Array.isArray(v) &&\n (v.length === 0 ||\n (!!v[0] &&\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\n (v[0] as NestedContentValue).values !== undefined &&\n (v[0] as NestedContentValue).displayValues !== undefined &&\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\n );\n}\n\nfunction isArrayValue(\n v: Value | ValueJSON | DisplayValue | DisplayValueJSON, // eslint-disable-line @typescript-eslint/no-deprecated\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\n // we have other means to determine the type of value.\n return v !== undefined && Array.isArray(v);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\n}\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\n return !isArrayValue(v) && !isMapValue(v);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(Value.fromJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return values.map(Value.toJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\n const map: ValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = Value.fromJSON(json[key]);\n }\n }\n return map;\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const map: ValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = Value.toJSON(values[key]);\n }\n }\n return map;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(DisplayValue.fromJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return values.map(DisplayValue.toJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\n const map: DisplayValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = DisplayValue.fromJSON(json[key]);\n }\n }\n return map;\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const map: DisplayValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = DisplayValue.toJSON(values[key]);\n }\n }\n return map;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAYH,cAAc;AACd,2DAA2D;AAC3D,IAAiB,KAAK,CA8BrB;AA9BD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,sCAAsC;IACtC,SAAgB,iBAAiB,CAAC,KAAY;QAC5C,OAAO,CACL,KAAK,KAAK,SAAS;YAClB,KAAiC,CAAC,EAAE,KAAK,SAAS;YAClD,KAAiC,CAAC,SAAS,KAAK,SAAS;YACzD,KAAiC,CAAC,KAAK,KAAK,SAAS,CACvD,CAAC;IACJ,CAAC;IAPe,uBAAiB,oBAOhC,CAAA;AACH,CAAC,EA9BgB,KAAK,qBAAL,KAAK,QA8BrB;AAoBD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,YAAY,CAe5B;AAfD,WAAiB,YAAY;IAC3B,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAmB;QAC7C,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CA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CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { InstanceId, InstanceKey } from \"../EC\";\nimport { LabelDefinition } from \"../LabelDefinition\";\nimport { ValuesDictionary } from \"../Utils\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace Value {\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Is the value a navigation value */\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\n return (\n value !== undefined &&\n (value as NavigationPropertyValue).id !== undefined &&\n (value as NavigationPropertyValue).className !== undefined &&\n (value as NavigationPropertyValue).label !== undefined\n );\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace DisplayValue {\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n /** Label of the ECInstance that this `NestedContentValue` is based on. */\n labelDefinition?: LabelDefinition;\n}\n\n/**\n * Data structure that describes value of the navigation property.\n * @public\n */\nexport interface NavigationPropertyValue {\n /** Label of target instance. */\n label: LabelDefinition;\n /** Full class name of target instance in format `SchemaName:ClassName` */\n className: string;\n /** Id of target instance. */\n id: InstanceId;\n}\n\n/**\n * A group of raw values and their common display value.\n * @public\n */\nexport interface DisplayValueGroup {\n /** Common display value for all grouped raw values */\n displayValue: DisplayValue;\n /** A list of grouped raw values */\n groupedRawValues: Value[];\n}\n\nfunction isNestedContentValue(v: Value): v is NestedContentValue[] {\n return (\n v !== undefined &&\n Array.isArray(v) &&\n (v.length === 0 ||\n (!!v[0] &&\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\n (v[0] as NestedContentValue).values !== undefined &&\n (v[0] as NestedContentValue).displayValues !== undefined &&\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\n );\n}\n\nfunction isArrayValue(v: Value | DisplayValue): v is ValuesArray | DisplayValuesArray {\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\n // we have other means to determine the type of value.\n return v !== undefined && Array.isArray(v);\n}\nfunction isMapValue(v: Value | DisplayValue): v is ValuesMap | DisplayValuesMap {\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\n}\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\n return !isArrayValue(v) && !isMapValue(v);\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Hierarchies
|
|
3
3
|
*/
|
|
4
|
-
import { Node
|
|
4
|
+
import { Node } from "./Node";
|
|
5
5
|
/**
|
|
6
6
|
* Defines a hierarchy level that consists of an array of nodes and possibly other information.
|
|
7
7
|
* @public
|
|
@@ -15,25 +15,4 @@ export interface HierarchyLevel {
|
|
|
15
15
|
*/
|
|
16
16
|
supportsFiltering?: boolean;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* JSON representation of [[HierarchyLevel]].
|
|
20
|
-
* @beta
|
|
21
|
-
* @deprecated in 3.x. Use [[HierarchyLevel]]
|
|
22
|
-
*/
|
|
23
|
-
export interface HierarchyLevelJSON {
|
|
24
|
-
nodes: NodeJSON[];
|
|
25
|
-
supportsFiltering?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Contains helper functions for working with objects of [[HierarchyLevel]] type.
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export declare namespace HierarchyLevel {
|
|
32
|
-
/**
|
|
33
|
-
* Deserialize [[HierarchyLevel]] from JSON
|
|
34
|
-
* @beta
|
|
35
|
-
* @deprecated in 3.x. Use [[HierarchyLevel]].
|
|
36
|
-
*/
|
|
37
|
-
function fromJSON(json: HierarchyLevelJSON): HierarchyLevel;
|
|
38
|
-
}
|
|
39
18
|
//# sourceMappingURL=HierarchyLevel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyLevel.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"HierarchyLevel.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
|