@itwin/presentation-common 5.0.0-dev.40 → 5.0.0-dev.49

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
  3. package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
  4. package/lib/cjs/presentation-common/AsyncTasks.js +4 -3
  5. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  6. package/lib/cjs/presentation-common/EC.d.ts +31 -0
  7. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  8. package/lib/cjs/presentation-common/EC.js.map +1 -1
  9. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +3 -2
  10. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  11. package/lib/cjs/presentation-common/RegisteredRuleset.js +6 -1
  12. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  13. package/lib/cjs/presentation-common/Utils.d.ts +9 -0
  14. package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
  15. package/lib/cjs/presentation-common/Utils.js +17 -0
  16. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  17. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  18. package/lib/cjs/presentation-common/content/ContentTraverser.js +64 -3
  19. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  20. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  21. package/lib/cjs/presentation-common/content/Descriptor.js +22 -11
  22. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  23. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  24. package/lib/cjs/presentation-common/content/Fields.js +5 -4
  25. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  26. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  27. package/lib/cjs/presentation-common/content/Item.js +12 -7
  28. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  29. package/lib/cjs/presentation-common.d.ts +1 -1
  30. package/lib/cjs/presentation-common.d.ts.map +1 -1
  31. package/lib/cjs/presentation-common.js +4 -1
  32. package/lib/cjs/presentation-common.js.map +1 -1
  33. package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
  34. package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
  35. package/lib/esm/presentation-common/AsyncTasks.js +4 -3
  36. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  37. package/lib/esm/presentation-common/EC.d.ts +31 -0
  38. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  39. package/lib/esm/presentation-common/EC.js.map +1 -1
  40. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +3 -2
  41. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  42. package/lib/esm/presentation-common/RegisteredRuleset.js +6 -1
  43. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  44. package/lib/esm/presentation-common/Utils.d.ts +9 -0
  45. package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
  46. package/lib/esm/presentation-common/Utils.js +16 -0
  47. package/lib/esm/presentation-common/Utils.js.map +1 -1
  48. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  49. package/lib/esm/presentation-common/content/ContentTraverser.js +65 -4
  50. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  51. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  52. package/lib/esm/presentation-common/content/Descriptor.js +22 -11
  53. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  54. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  55. package/lib/esm/presentation-common/content/Fields.js +5 -4
  56. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  57. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  58. package/lib/esm/presentation-common/content/Item.js +12 -7
  59. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  60. package/lib/esm/presentation-common.d.ts +1 -1
  61. package/lib/esm/presentation-common.d.ts.map +1 -1
  62. package/lib/esm/presentation-common.js +1 -1
  63. package/lib/esm/presentation-common.js.map +1 -1
  64. package/package.json +10 -10
@@ -6,6 +6,7 @@
6
6
  * @module Content
7
7
  */
8
8
  import { LabelDefinition } from "../LabelDefinition";
9
+ import { omitUndefined } from "../Utils";
9
10
  import { DisplayValue, Value } from "./Value";
10
11
  /**
11
12
  * A data structure that represents a single content record.
@@ -26,11 +27,15 @@ export class Item {
26
27
  constructor(primaryKeys, label, imageId, classInfo, values, displayValues, mergedFieldNames, extendedData) {
27
28
  this.primaryKeys = primaryKeys;
28
29
  this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated
29
- this.classInfo = classInfo;
30
+ if (classInfo) {
31
+ this.classInfo = classInfo;
32
+ }
30
33
  this.values = values;
31
34
  this.displayValues = displayValues;
32
35
  this.mergedFieldNames = mergedFieldNames;
33
- this.extendedData = extendedData;
36
+ if (extendedData) {
37
+ this.extendedData = extendedData;
38
+ }
34
39
  this.label = typeof label === "string" ? LabelDefinition.fromLabelString(label) : label;
35
40
  }
36
41
  /**
@@ -41,16 +46,16 @@ export class Item {
41
46
  }
42
47
  /** Serialize this object to JSON */
43
48
  toJSON() {
44
- const { label, ...baseItem } = this;
45
- return {
49
+ const { label, values, displayValues, ...baseItem } = this;
50
+ return omitUndefined({
46
51
  ...baseItem,
47
52
  // eslint-disable-next-line @typescript-eslint/no-deprecated
48
- values: Value.toJSON(this.values),
53
+ values: Value.toJSON(values),
49
54
  // eslint-disable-next-line @typescript-eslint/no-deprecated
50
- displayValues: DisplayValue.toJSON(this.displayValues),
55
+ displayValues: DisplayValue.toJSON(displayValues),
51
56
  // eslint-disable-next-line @typescript-eslint/no-deprecated
52
57
  labelDefinition: LabelDefinition.toJSON(label),
53
- };
58
+ });
54
59
  }
55
60
  /** Deserialize [[Item]] from JSON */
56
61
  static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AyB;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","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 { ValuesDictionary } from \"../Utils\";\nimport { DisplayValue, DisplayValueJSON, DisplayValuesMapJSON, Value, ValueJSON, 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 * 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 */\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 this.primaryKeys = primaryKeys;\n this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated\n this.classInfo = classInfo;\n this.values = values;\n this.displayValues = displayValues;\n this.mergedFieldNames = mergedFieldNames;\n this.extendedData = extendedData;\n this.label = typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : 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 {\n ...baseItem,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.toJSON(this.values) as ValuesMapJSON,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.toJSON(this.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 item = Object.create(Item.prototype);\n const { labelDefinition, ...baseJson } = json;\n return Object.assign(item, baseJson, {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.fromJSON(json.values),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.fromJSON(json.displayValues),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n label: LabelDefinition.fromJSON(labelDefinition),\n } as Partial<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 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,OAAO,EAAE,eAAe,EAAuB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAoB,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,YAAY,EAA0C,KAAK,EAA4B,MAAM,SAAS,CAAC;AAuBhH;;;GAGG;AACH,MAAM,OAAO,IAAI;IA0Bf;;;;;;;;;;OAUG;IACH,YACE,WAA0B,EAC1B,KAA+B,EAC/B,OAAe,EACf,SAAgC,EAChC,MAA+B,EAC/B,aAA6C,EAC7C,gBAA0B,EAC1B,YAAqC;QAErC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,uDAAuD;QAC/E,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,YAAY,EAAE,CAAC;YACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1F,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,SAAiB;QACpC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,OAAO,CA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AC;IACtB,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","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, DisplayValuesMapJSON, Value, ValueJSON, 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 * 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 */\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 this.primaryKeys = primaryKeys;\n this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated\n if (classInfo) {\n this.classInfo = classInfo;\n }\n this.values = values;\n this.displayValues = displayValues;\n this.mergedFieldNames = mergedFieldNames;\n if (extendedData) {\n this.extendedData = extendedData;\n }\n this.label = typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : 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 item = Object.create(Item.prototype);\n const { labelDefinition, ...baseJson } = json;\n return Object.assign(item, baseJson, {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.fromJSON(json.values),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.fromJSON(json.displayValues),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n label: LabelDefinition.fromJSON(labelDefinition),\n } as Partial<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 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"]}
@@ -15,7 +15,7 @@ export * from "./presentation-common/RegisteredRuleset";
15
15
  export * from "./presentation-common/RulesetVariables";
16
16
  export * from "./presentation-common/RulesetsFactory";
17
17
  export * from "./presentation-common/Update";
18
- export * from "./presentation-common/Utils";
18
+ export { DEFAULT_KEYS_BATCH_SIZE, Omit, PagedResponse, PartialBy, Subtract, ValuesDictionary, getInstancesCount } from "./presentation-common/Utils";
19
19
  export * from "./presentation-common/PresentationIpcInterface";
20
20
  export * from "./presentation-common/LocalizationHelper";
21
21
  export * from "./presentation-common/InstanceFilterDefinition";
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-common.d.ts","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gDAAgD,CA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;AACzE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wEAAwE,CAAC;AACvF,cAAc,qEAAqE,CAAC;AACpF,cAAc,iFAAiF,CAAC;AAChG,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,4EAA4E,CAAC;AAC3F,cAAc,2EAA2E,CAAC;AAC1F,cAAc,8EAA8E,CAAC;AAC7F,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,mDAAmD,CAAC;AAClE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC"}
@@ -19,7 +19,7 @@ export * from "./presentation-common/RegisteredRuleset";
19
19
  export * from "./presentation-common/RulesetVariables";
20
20
  export * from "./presentation-common/RulesetsFactory";
21
21
  export * from "./presentation-common/Update";
22
- export * from "./presentation-common/Utils";
22
+ export { DEFAULT_KEYS_BATCH_SIZE, getInstancesCount } from "./presentation-common/Utils";
23
23
  export * from "./presentation-common/PresentationIpcInterface";
24
24
  export * from "./presentation-common/LocalizationHelper";
25
25
  export * from "./presentation-common/InstanceFilterDefinition";
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-common.js","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gDA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c,yDAAyD,CAAC;AACxE,cAAc,oFAAoF,CAAC;AACnG,cAAc,0EAA0E,CAAC;AACzF,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wEAAwE,CAAC;AACvF,cAAc,qEAAqE,CAAC;AACpF,cAAc,iFAAiF,CAAC;AAChG,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,4EAA4E,CAAC;AAC3F,cAAc,2EAA2E,CAAC;AAC1F,cAAc,8EAA8E,CAAC;AAC7F,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,mDAAmD,CAAC;AAClE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,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/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used all across Presentation packages.\n */\nexport * from \"./presentation-common/AsyncTasks\";\nexport * from \"./presentation-common/Diagnostics\";\nexport * from \"./presentation-common/EC\";\nexport * from \"./presentation-common/Error\";\nexport * from \"./presentation-common/KeySet\";\nexport * from \"./presentation-common/LabelDefinition\";\nexport * from \"./presentation-common/PresentationManagerOptions\";\nexport * from \"./presentation-common/RegisteredRuleset\";\nexport * from \"./presentation-common/RulesetVariables\";\nexport * from \"./presentation-common/RulesetsFactory\";\nexport * from \"./presentation-common/Update\";\nexport * from \"./presentation-common/Utils\";\nexport * from \"./presentation-common/PresentationIpcInterface\";\nexport * from \"./presentation-common/LocalizationHelper\";\nexport * from \"./presentation-common/InstanceFilterDefinition\";\nexport * from \"./presentation-common/KoqPropertyValueFormatter\";\n\n/**\n * @module RPC\n *\n * @docs-group-description RPC\n * Types used for RPC communication between frontend and backend. Generally should\n * only be used internally by presentation packages.\n */\nexport * from \"./presentation-common/PresentationRpcInterface\";\nexport * from \"./presentation-common/RpcRequestsHandler\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport * from \"./presentation-common/selection/SelectionScope\";\n\n/**\n * @module Content\n *\n * @docs-group-description Content\n * Types related to presentation [content]($docs/presentation/content/index.md).\n */\nexport * from \"./presentation-common/content/Category\";\nexport * from \"./presentation-common/content/Content\";\nexport * from \"./presentation-common/content/Descriptor\";\nexport * from \"./presentation-common/content/DisplayTypes\";\nexport * from \"./presentation-common/content/Editor\";\nexport * from \"./presentation-common/content/Fields\";\nexport * from \"./presentation-common/content/Item\";\nexport * from \"./presentation-common/content/Property\";\nexport * from \"./presentation-common/content/Renderer\";\nexport * from \"./presentation-common/content/TypeDescription\";\nexport * from \"./presentation-common/content/Value\";\nexport * from \"./presentation-common/content/ContentTraverser\";\nexport * from \"./presentation-common/content/PropertyValueFormatter\";\nexport * from \"./presentation-common/ElementProperties\";\n\n/**\n * @module Hierarchies\n *\n * @docs-group-description Hierarchies\n * Types related to presentation [hierarchies]($docs/presentation/hierarchies/index.md).\n */\nexport * from \"./presentation-common/hierarchy/HierarchyLevel\";\nexport * from \"./presentation-common/hierarchy/Key\";\nexport * from \"./presentation-common/hierarchy/Node\";\nexport * from \"./presentation-common/hierarchy/NodePathElement\";\n\n/**\n * @module PresentationRules\n *\n * @docs-group-description PresentationRules\n * Types for defining the presentation ruleset.\n */\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/NavigationRule\";\nexport * from \"./presentation-common/rules/hierarchy/NodeArtifactsRule\";\nexport * from \"./presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/RootNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/SubCondition\";\nexport * from \"./presentation-common/rules/customization/CheckBoxRule\";\nexport * from \"./presentation-common/rules/customization/CustomizationRule\";\nexport * from \"./presentation-common/rules/customization/ExtendedDataRule\";\nexport * from \"./presentation-common/rules/customization/GroupingRule\";\nexport * from \"./presentation-common/rules/customization/ImageIdOverride\";\nexport * from \"./presentation-common/rules/customization/InstanceLabelOverride\";\nexport * from \"./presentation-common/rules/customization/LabelOverride\";\nexport * from \"./presentation-common/rules/customization/SortingRule\";\nexport * from \"./presentation-common/rules/customization/StyleOverride\";\nexport * from \"./presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRelatedInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRule\";\nexport * from \"./presentation-common/rules/content/ContentSpecification\";\nexport * from \"./presentation-common/rules/content/PropertySpecification\";\nexport * from \"./presentation-common/rules/content/SelectedNodeInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/DefaultPropertyCategoryOverride\";\nexport * from \"./presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/ContentModifier\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyCategorySpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyEditorsSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/CustomRendererSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/RelatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/ClassSpecifications\";\nexport * from \"./presentation-common/rules/RelatedInstanceSpecification\";\nexport * from \"./presentation-common/rules/RelationshipDirection\";\nexport * from \"./presentation-common/rules/RelationshipPathSpecification\";\nexport * from \"./presentation-common/rules/Rule\";\nexport * from \"./presentation-common/rules/Ruleset\";\nexport * from \"./presentation-common/rules/SchemasSpecification\";\nexport * from \"./presentation-common/rules/Variables\";\n"]}
1
+ {"version":3,"file":"presentation-common.js","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAA8D,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrJ,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAEhE;;;;;;GAMG;AACH,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AAEzD;;;;;GAKG;AACH,cAAc,gDAAgD,CAAC;AAE/D;;;;;GAKG;AACH,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AA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------------------------------------------------------\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/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used all across Presentation packages.\n */\nexport * from \"./presentation-common/AsyncTasks\";\nexport * from \"./presentation-common/Diagnostics\";\nexport * from \"./presentation-common/EC\";\nexport * from \"./presentation-common/Error\";\nexport * from \"./presentation-common/KeySet\";\nexport * from \"./presentation-common/LabelDefinition\";\nexport * from \"./presentation-common/PresentationManagerOptions\";\nexport * from \"./presentation-common/RegisteredRuleset\";\nexport * from \"./presentation-common/RulesetVariables\";\nexport * from \"./presentation-common/RulesetsFactory\";\nexport * from \"./presentation-common/Update\";\nexport { DEFAULT_KEYS_BATCH_SIZE, Omit, PagedResponse, PartialBy, Subtract, ValuesDictionary, getInstancesCount } from \"./presentation-common/Utils\";\nexport * from \"./presentation-common/PresentationIpcInterface\";\nexport * from \"./presentation-common/LocalizationHelper\";\nexport * from \"./presentation-common/InstanceFilterDefinition\";\nexport * from \"./presentation-common/KoqPropertyValueFormatter\";\n\n/**\n * @module RPC\n *\n * @docs-group-description RPC\n * Types used for RPC communication between frontend and backend. Generally should\n * only be used internally by presentation packages.\n */\nexport * from \"./presentation-common/PresentationRpcInterface\";\nexport * from \"./presentation-common/RpcRequestsHandler\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport * from \"./presentation-common/selection/SelectionScope\";\n\n/**\n * @module Content\n *\n * @docs-group-description Content\n * Types related to presentation [content]($docs/presentation/content/index.md).\n */\nexport * from \"./presentation-common/content/Category\";\nexport * from \"./presentation-common/content/Content\";\nexport * from \"./presentation-common/content/Descriptor\";\nexport * from \"./presentation-common/content/DisplayTypes\";\nexport * from \"./presentation-common/content/Editor\";\nexport * from \"./presentation-common/content/Fields\";\nexport * from \"./presentation-common/content/Item\";\nexport * from \"./presentation-common/content/Property\";\nexport * from \"./presentation-common/content/Renderer\";\nexport * from \"./presentation-common/content/TypeDescription\";\nexport * from \"./presentation-common/content/Value\";\nexport * from \"./presentation-common/content/ContentTraverser\";\nexport * from \"./presentation-common/content/PropertyValueFormatter\";\nexport * from \"./presentation-common/ElementProperties\";\n\n/**\n * @module Hierarchies\n *\n * @docs-group-description Hierarchies\n * Types related to presentation [hierarchies]($docs/presentation/hierarchies/index.md).\n */\nexport * from \"./presentation-common/hierarchy/HierarchyLevel\";\nexport * from \"./presentation-common/hierarchy/Key\";\nexport * from \"./presentation-common/hierarchy/Node\";\nexport * from \"./presentation-common/hierarchy/NodePathElement\";\n\n/**\n * @module PresentationRules\n *\n * @docs-group-description PresentationRules\n * Types for defining the presentation ruleset.\n */\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/NavigationRule\";\nexport * from \"./presentation-common/rules/hierarchy/NodeArtifactsRule\";\nexport * from \"./presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/RootNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/SubCondition\";\nexport * from \"./presentation-common/rules/customization/CheckBoxRule\";\nexport * from \"./presentation-common/rules/customization/CustomizationRule\";\nexport * from \"./presentation-common/rules/customization/ExtendedDataRule\";\nexport * from \"./presentation-common/rules/customization/GroupingRule\";\nexport * from \"./presentation-common/rules/customization/ImageIdOverride\";\nexport * from \"./presentation-common/rules/customization/InstanceLabelOverride\";\nexport * from \"./presentation-common/rules/customization/LabelOverride\";\nexport * from \"./presentation-common/rules/customization/SortingRule\";\nexport * from \"./presentation-common/rules/customization/StyleOverride\";\nexport * from \"./presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRelatedInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRule\";\nexport * from \"./presentation-common/rules/content/ContentSpecification\";\nexport * from \"./presentation-common/rules/content/PropertySpecification\";\nexport * from \"./presentation-common/rules/content/SelectedNodeInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/DefaultPropertyCategoryOverride\";\nexport * from \"./presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/ContentModifier\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyCategorySpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyEditorsSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/CustomRendererSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/RelatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/ClassSpecifications\";\nexport * from \"./presentation-common/rules/RelatedInstanceSpecification\";\nexport * from \"./presentation-common/rules/RelationshipDirection\";\nexport * from \"./presentation-common/rules/RelationshipPathSpecification\";\nexport * from \"./presentation-common/rules/Rule\";\nexport * from \"./presentation-common/rules/Ruleset\";\nexport * from \"./presentation-common/rules/SchemasSpecification\";\nexport * from \"./presentation-common/rules/Variables\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/presentation-common",
3
- "version": "5.0.0-dev.40",
3
+ "version": "5.0.0-dev.49",
4
4
  "description": "Common pieces for iModel.js presentation packages",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,10 +22,10 @@
22
22
  "module": "lib/esm/presentation-common.js",
23
23
  "typings": "lib/cjs/presentation-common",
24
24
  "peerDependencies": {
25
- "@itwin/core-bentley": "5.0.0-dev.40",
26
- "@itwin/core-common": "5.0.0-dev.40",
27
- "@itwin/core-quantity": "5.0.0-dev.40",
28
- "@itwin/ecschema-metadata": "5.0.0-dev.40"
25
+ "@itwin/core-bentley": "5.0.0-dev.49",
26
+ "@itwin/core-common": "5.0.0-dev.49",
27
+ "@itwin/core-quantity": "5.0.0-dev.49",
28
+ "@itwin/ecschema-metadata": "5.0.0-dev.49"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@itwin/eslint-plugin": "5.0.0-dev.1",
@@ -61,11 +61,11 @@
61
61
  "typescript": "~5.6.2",
62
62
  "typescript-json-schema": "^0.55.0",
63
63
  "yargs": "^17.4.0",
64
- "@itwin/build-tools": "5.0.0-dev.40",
65
- "@itwin/core-bentley": "5.0.0-dev.40",
66
- "@itwin/core-common": "5.0.0-dev.40",
67
- "@itwin/core-quantity": "5.0.0-dev.40",
68
- "@itwin/ecschema-metadata": "5.0.0-dev.40"
64
+ "@itwin/build-tools": "5.0.0-dev.49",
65
+ "@itwin/core-bentley": "5.0.0-dev.49",
66
+ "@itwin/core-common": "5.0.0-dev.49",
67
+ "@itwin/ecschema-metadata": "5.0.0-dev.49",
68
+ "@itwin/core-quantity": "5.0.0-dev.49"
69
69
  },
70
70
  "nyc": {
71
71
  "extends": "./node_modules/@itwin/build-tools/.nycrc"