@itwin/presentation-common 5.0.0-dev.50 → 5.0.0-dev.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
  2. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  3. package/lib/cjs/presentation-common/content/ContentTraverser.js +31 -13
  4. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  5. package/lib/cjs/presentation-common/content/Fields.d.ts +111 -8
  6. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  7. package/lib/cjs/presentation-common/content/Fields.js +133 -95
  8. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  9. package/lib/cjs/presentation-common/content/Item.d.ts +19 -0
  10. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  11. package/lib/cjs/presentation-common/content/Item.js +30 -28
  12. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  13. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
  14. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  15. package/lib/esm/presentation-common/content/ContentTraverser.js +31 -13
  16. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  17. package/lib/esm/presentation-common/content/Fields.d.ts +111 -8
  18. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  19. package/lib/esm/presentation-common/content/Fields.js +133 -95
  20. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  21. package/lib/esm/presentation-common/content/Item.d.ts +19 -0
  22. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  23. package/lib/esm/presentation-common/content/Item.js +30 -28
  24. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  25. package/package.json +10 -10
@@ -1,6 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Content
3
3
  */
4
+ import { LabelDefinition } from "../LabelDefinition";
4
5
  import { CategoryDescription } from "./Category";
5
6
  import { Content } from "./Content";
6
7
  import { Descriptor } from "./Descriptor";
@@ -8,7 +9,6 @@ import { Field } from "./Fields";
8
9
  import { Item } from "./Item";
9
10
  import { TypeDescription } from "./TypeDescription";
10
11
  import { DisplayValue, DisplayValuesArray, DisplayValuesMap, Value as PresentationValue, ValuesArray as PresentationValuesArray, ValuesMap as PresentationValuesMap } from "./Value";
11
- import { LabelDefinition } from "../LabelDefinition";
12
12
  /**
13
13
  * A data structure to define a hierarchy of [[Field]] objects.
14
14
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAEhB,KAAK,IAAI,iBAAiB,EAC1B,WAAW,IAAI,uBAAuB,EACtC,SAAS,IAAI,qBAAqB,EACnC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAYrD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,oBAAoB;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,qBAAqB;IACrB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,4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,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,QAInG;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAczE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAE/F;AA+OD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,EAAE,OAAO,oBAgCjF;AAoED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAapG;AAaD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAE5E;AACD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,YAE3D"}
1
+ {"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,gBA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,GAAG,OAAO,CAAC;IAC9C,2DAA2D;IAC3D,YAAY,IAAI,IAAI,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;IAC5C,0DAA0D;IAC1D,WAAW,IAAI,IAAI,CAAC;IAEpB,mGAAmG;IACnG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzD,2CAA2C;IAC3C,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,QAInG;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAczE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAE/F;AAiPD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,EAAE,OAAO,oBAgCjF;AAoED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAapG;AAaD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAE5E;AACD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,YAE3D"}
@@ -204,13 +204,15 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
204
204
  else if (pathUpToField.length > 0) {
205
205
  fieldHierarchy = {
206
206
  ...fieldHierarchy,
207
- field: Object.assign(fieldHierarchy.field.clone(), {
208
- type: {
207
+ field: (function () {
208
+ const clone = fieldHierarchy.field.clone();
209
+ clone.type = {
209
210
  valueFormat: TypeDescription_1.PropertyValueFormat.Array,
210
211
  typeName: `${fieldHierarchy.field.type.typeName}[]`,
211
212
  memberType: fieldHierarchy.field.type,
212
- },
213
- }),
213
+ };
214
+ return clone;
215
+ })(),
214
216
  };
215
217
  }
216
218
  traverseContentItemFieldValue(visitor, fieldHierarchy, item.mergedFieldNames, fieldHierarchy.field.type, parentFieldName, item.values[fieldHierarchy.field.name], item.displayValues[fieldHierarchy.field.name]);
@@ -266,7 +268,14 @@ function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFiel
266
268
  // Not finding a member field means we're traversing an ECStruct. We still need to carry member information, so we
267
269
  // create a fake field to represent the member
268
270
  memberField = {
269
- field: new Fields_1.Field(fieldHierarchy.field.category, memberDescription.name, memberDescription.label, memberDescription.type, fieldHierarchy.field.isReadonly, 0),
271
+ field: new Fields_1.Field({
272
+ category: fieldHierarchy.field.category,
273
+ name: memberDescription.name,
274
+ label: memberDescription.label,
275
+ type: memberDescription.type,
276
+ isReadonly: fieldHierarchy.field.isReadonly,
277
+ priority: 0,
278
+ }),
270
279
  childFields: [],
271
280
  };
272
281
  }
@@ -450,8 +459,11 @@ function convertNestedContentItemToStructArrayItem(item, field, nextField) {
450
459
  nextFieldValues.display.push(nextDisplayValue);
451
460
  }
452
461
  });
453
- const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line @typescript-eslint/no-deprecated
454
- item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData);
462
+ const convertedItem = new Item_1.Item({
463
+ ...item,
464
+ values: { [nextField.name]: nextFieldValues.raw },
465
+ displayValues: { [nextField.name]: nextFieldValues.display },
466
+ });
455
467
  return { emptyNestedItem: false, convertedItem };
456
468
  }
457
469
  function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName) {
@@ -463,8 +475,9 @@ function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy
463
475
  return child;
464
476
  });
465
477
  const convertedFieldHierarchy = {
466
- field: Object.assign(fieldHierarchy.field.clone(), {
467
- type: {
478
+ field: (function () {
479
+ const clone = fieldHierarchy.field.clone();
480
+ clone.type = {
468
481
  valueFormat: TypeDescription_1.PropertyValueFormat.Array,
469
482
  typeName: `${fieldHierarchy.field.type.typeName}[]`,
470
483
  memberType: {
@@ -476,8 +489,9 @@ function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy
476
489
  type: member.field.type,
477
490
  })),
478
491
  },
479
- },
480
- }),
492
+ };
493
+ return clone;
494
+ })(),
481
495
  childFields: convertedChildFieldHierarchies,
482
496
  };
483
497
  return convertedFieldHierarchy;
@@ -517,8 +531,12 @@ function convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHier
517
531
  return { emptyNestedItem: true, convertedItem: item };
518
532
  }
519
533
  const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);
520
- const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line @typescript-eslint/no-deprecated
521
- item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData);
534
+ const convertedItem = new Item_1.Item({
535
+ ...item,
536
+ values: { [fieldName]: converted.raw },
537
+ displayValues: { [fieldName]: converted.display },
538
+ mergedFieldNames: converted.mergedFieldNames,
539
+ });
522
540
  return { emptyNestedItem: false, convertedItem };
523
541
  }
524
542
  //# sourceMappingURL=ContentTraverser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTraverser.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAi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C,IAAI,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACxC,IAAA,qBAAM,EAAC,aAAiB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,SAAS,GAAG,sDAAsD,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,IAAI,WAAI,CAC5B,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,OAAO,EAAE,uDAAuD;IACrE,IAAI,CAAC,SAAS,EACd,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,EAC9B,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,EAClC,SAAS,CAAC,gBAAgB,EAC1B,IAAI,CAAC,YAAY,CAClB,CAAC;IACF,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AACnD,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 { assert } from \"@itwin/core-bentley\";\nimport { CategoryDescription } from \"./Category\";\nimport { Content } from \"./Content\";\nimport { Descriptor } from \"./Descriptor\";\nimport { Field, NestedContentField } from \"./Fields\";\nimport { Item } from \"./Item\";\nimport { PropertyValueFormat, TypeDescription } from \"./TypeDescription\";\nimport {\n DisplayValue,\n DisplayValuesArray,\n DisplayValuesMap,\n NestedContentValue,\n Value as PresentationValue,\n ValuesArray as PresentationValuesArray,\n ValuesMap as PresentationValuesMap,\n} from \"./Value\";\nimport { LabelDefinition } from \"../LabelDefinition\";\n\nconst NESTED_CONTENT_LABEL_SYMBOL = Symbol();\n\ntype ValuesMap = PresentationValuesMap & {\n [NESTED_CONTENT_LABEL_SYMBOL]?: LabelDefinition;\n};\n\ntype Value = Exclude<PresentationValue, PresentationValuesMap> | ValuesMap;\n\ntype ValuesArray = Array<Value>;\n\n/**\n * A data structure to define a hierarchy of [[Field]] objects.\n * @public\n */\nexport interface FieldHierarchy {\n /** Parent field. */\n field: Field;\n /** Nested fields. */\n childFields: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startContent]] call.\n * @public\n */\nexport interface StartContentProps {\n /** Descriptor of the visited content. */\n descriptor: Descriptor;\n}\n\n/**\n * Props for the [[IContentVisitor.processFieldHierarchies]] call.\n * @public\n */\nexport interface ProcessFieldHierarchiesProps {\n /**\n * The root list of fields, which may be mutated by the visitor to change order or the fields,\n * add new fields, etc.\n */\n hierarchies: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startItem]] call.\n * @public\n */\nexport interface StartItemProps {\n /** The content item that's about to be visited. */\n item: Item;\n}\n\n/**\n * Props for the [[IContentVisitor.startCategory]] call.\n * @public\n */\nexport interface StartCategoryProps {\n /** The content category that's about to be visited. */\n category: CategoryDescription;\n}\n\n/**\n * Props for the [[IContentVisitor.startField]] call.\n * @public\n */\nexport interface StartFieldProps {\n /** The field that's about to be visited. */\n hierarchy: FieldHierarchy;\n}\n\n/**\n * Props for the [[IContentVisitor.startStruct]] call.\n * @public\n */\nexport interface StartStructProps {\n /** Field that describes the struct. */\n hierarchy: FieldHierarchy;\n /** Type of the struct. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Member raw values. */\n rawValues: PresentationValuesMap;\n /** Member display values. */\n displayValues: DisplayValuesMap;\n /** Label definition of the ECInstance that the struct represents. */\n label?: LabelDefinition;\n}\n\n/**\n * Props for the [[IContentVisitor.startArray]] call.\n * @public\n */\nexport interface StartArrayProps {\n /** Field that describes the array. */\n hierarchy: FieldHierarchy;\n /** Type of the array. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Item raw values. */\n rawValues: PresentationValuesArray;\n /** Item display values. */\n displayValues: DisplayValuesArray;\n}\n\n/**\n * Props for the [[IContentVisitor.processMergedValue]] call.\n * @public\n */\nexport interface ProcessMergedValueProps {\n /** The field whose values are merged. */\n mergedField: Field;\n /**\n * Generally this matches the [[mergedField]], but there are situations when a nested field is propagated\n * up to display it as if it wasn't nested its parent fields. In those cases, if one of the parent fields\n * is merged, the merged parent is going to be represented by [[mergedField]] and the field we wanted to\n * process is going to be represented by [[requestedField]].\n */\n requestedField: Field;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n}\n\n/**\n * Props for the [[IContentVisitor.processPrimitiveValue]] call.\n * @public\n */\nexport interface ProcessPrimitiveValueProps {\n /** Field whose value is being processed. */\n field: Field;\n /** Type of the value. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Raw value. */\n rawValue: PresentationValue;\n /** Display value. */\n displayValue: DisplayValue;\n}\n\n/**\n * An interface for a visitor that can be passed to the [[traverseContent]] function\n * to be called on each piece of content.\n *\n * The order of calls when using the visitor with [[traverseContent]] or [[traverseContentItem]]:\n *\n * ```\n * startContent\n * processFieldHierarchies\n * for each content item:\n * startItem\n * for each field in root level:\n * for each category in field's category stack from root to field's category:\n * startCategory\n * startField\n * valueProcessing:\n * if item's value for this field is merged:\n * processMergedValue\n * else if the field is struct:\n * startStruct\n * for each struct member:\n * recurse into the valueProcessing step\n * finishStruct\n * else if the field is array:\n * startArray\n * for each array item:\n * recurse into the valueProcessing step\n * finishArray\n * else if the field is primitive:\n * processPrimitiveValue\n * finishField\n * finishItem\n * finishContent\n * ```\n * @public\n */\nexport interface IContentVisitor {\n /**\n * Called before starting [[Content]] processing. This is a good place to initialize various caches and prepare\n * for parsing content.\n *\n * Processing is skipped if the function returns `false` and [[finishContent]] is not called in that case.\n */\n startContent(props: StartContentProps): boolean;\n /** Called after processing of [[Content]] is complete. */\n finishContent(): void;\n\n /** Called to post-process field hierarchies after they're extracted from [[Descriptor]] in processed [[Content]]. */\n processFieldHierarchies(props: ProcessFieldHierarchiesProps): void;\n\n /**\n * Called before starting each [[Item]] processing. This is a good place to initialize for a new content item, e.g.\n * set up a new row in table.\n *\n * Processing is skipped if the function returns `false` and [[finishItem]] is not called in that case.\n */\n startItem(props: StartItemProps): boolean;\n /**\n * Called after processing of [[Item]] is complete. May be used to do any kind of post-processing after all\n * values for one content item have been processed.\n */\n finishItem(): void;\n\n /**\n * Called before processing a content item field ([[startField]] call) for each category in the field's\n * category stack, starting from the root and finishing with the field's category.\n *\n * Processing is skipped if the function returns `false` and [[finishCategory]] is not called in that case.\n */\n startCategory(props: StartCategoryProps): boolean;\n /** Called after processing of field is complete for every category in the field's category stack. */\n finishCategory(): void;\n\n /**\n * Called before starting [[Field]] processing for each individual [[Item]]. This is a good callback\n * to skip a field if it doesn't need to be handled.\n *\n * Processing is skipped if the function returns `false` and [[finishField]] is not called in that case.\n */\n startField(props: StartFieldProps): boolean;\n /** Called after processing of [[Field]] for individual [[Item]] is complete. */\n finishField(): void;\n\n /**\n * Called before processing a struct value. This is a good callback to skip handling the value or set up\n * for struct member values handling.\n *\n * Processing is skipped if the function returns `false` and [[finishStruct]] is not called in that case.\n */\n startStruct(props: StartStructProps): boolean;\n /** Called after processing of struct value is complete. */\n finishStruct(): void;\n\n /**\n * Called before processing an array value. This is a good callback to skip handling the value or set up\n * for array items handling.\n *\n * Processing is skipped if the function returns `false` and [[finishArray]] is not called in that case.\n */\n startArray(props: StartArrayProps): boolean;\n /** Called after processing of array value is complete. */\n finishArray(): void;\n\n /** Called to process a [merged value]($docs/presentation/content/Terminology.md#value-merging). */\n processMergedValue(props: ProcessMergedValueProps): void;\n /** Called to process a primitive value. */\n processPrimitiveValue(props: ProcessPrimitiveValueProps): void;\n}\n\n/**\n * An utility for traversing field hierarchy. Stops traversal as soon as `cb` returns `false`.\n * @public\n */\nexport function traverseFieldHierarchy(hierarchy: FieldHierarchy, cb: (h: FieldHierarchy) => boolean) {\n if (cb(hierarchy)) {\n hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));\n }\n}\n\n/**\n * An utility to traverse content using provided visitor. Provides means to parse content into different formats,\n * for different components.\n * @public\n */\nexport function traverseContent(visitor: IContentVisitor, content: Content) {\n if (!visitor.startContent({ descriptor: content.descriptor })) {\n return;\n }\n\n try {\n const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);\n visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });\n content.contentSet.forEach((item) => {\n traverseContentItemFields(visitor, fieldHierarchies, item);\n });\n } finally {\n visitor.finishContent();\n }\n}\n\n/**\n * An utility for calling [[traverseContent]] when there's only one content item.\n * @public\n */\nexport function traverseContentItem(visitor: IContentVisitor, descriptor: Descriptor, item: Item) {\n traverseContent(visitor, new Content(descriptor, [item]));\n}\n\nclass VisitedCategories implements Disposable {\n private _visitedCategories: CategoryDescription[];\n private _didVisitAllHierarchy: boolean;\n constructor(\n private _visitor: IContentVisitor,\n category: CategoryDescription,\n ) {\n const stack: CategoryDescription[] = [];\n let curr: CategoryDescription | undefined = category;\n while (curr) {\n stack.push(curr);\n curr = curr.parent;\n }\n stack.reverse();\n\n this._didVisitAllHierarchy = true;\n this._visitedCategories = [];\n for (curr of stack) {\n if (this._visitor.startCategory({ category: curr })) {\n this._visitedCategories.push(curr);\n } else {\n this._didVisitAllHierarchy = false;\n break;\n }\n }\n }\n public [Symbol.dispose]() {\n while (this._visitedCategories.pop()) {\n this._visitor.finishCategory();\n }\n }\n public get shouldContinue(): boolean {\n return this._didVisitAllHierarchy;\n }\n}\n\nfunction traverseContentItemFields(visitor: IContentVisitor, fieldHierarchies: FieldHierarchy[], item: Item) {\n if (!visitor.startItem({ item })) {\n return;\n }\n\n try {\n fieldHierarchies.forEach((fieldHierarchy) => {\n using res = new VisitedCategories(visitor, fieldHierarchy.field.category)\n if (res.shouldContinue) {\n traverseContentItemField(visitor, fieldHierarchy, item);\n }\n });\n } finally {\n visitor.finishItem();\n }\n}\n\nfunction traverseContentItemField(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, item: Item) {\n if (!visitor.startField({ hierarchy: fieldHierarchy })) {\n return;\n }\n\n try {\n const rootToThisField = createFieldPath(fieldHierarchy.field);\n let parentFieldName: string | undefined;\n const pathUpToField = rootToThisField.slice(undefined, -1);\n for (let i = 0; i < pathUpToField.length; ++i) {\n const parentField = pathUpToField[i] as NestedContentField;\n const nextField = rootToThisField[i + 1];\n\n if (item.isFieldMerged(parentField.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField, parentFieldName });\n return;\n }\n\n const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);\n if (emptyNestedItem) {\n return;\n }\n\n item = convertedItem;\n parentFieldName = combineFieldNames(parentField.name, parentFieldName);\n }\n\n if (item.isFieldMerged(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n if (fieldHierarchy.field.isNestedContentField()) {\n fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);\n const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);\n if (emptyNestedItem) {\n return;\n }\n item = convertedItem;\n } else if (pathUpToField.length > 0) {\n fieldHierarchy = {\n ...fieldHierarchy,\n field: Object.assign(fieldHierarchy.field.clone(), {\n type: {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: fieldHierarchy.field.type,\n },\n }),\n };\n }\n\n traverseContentItemFieldValue(\n visitor,\n fieldHierarchy,\n item.mergedFieldNames,\n fieldHierarchy.field.type,\n parentFieldName,\n item.values[fieldHierarchy.field.name],\n item.displayValues[fieldHierarchy.field.name],\n );\n } finally {\n visitor.finishField();\n }\n}\n\nfunction traverseContentItemFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValue: Value,\n displayValue: DisplayValue,\n) {\n if (rawValue !== undefined) {\n if (valueType.valueFormat === PropertyValueFormat.Array) {\n assert(PresentationValue.isArray(rawValue));\n assert(DisplayValue.isArray(displayValue));\n return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n if (valueType.valueFormat === PropertyValueFormat.Struct) {\n assert(PresentationValue.isMap(rawValue));\n assert(DisplayValue.isMap(displayValue));\n return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n }\n traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n}\n\nfunction traverseContentItemArrayFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValues: ValuesArray,\n displayValues: DisplayValuesArray,\n) {\n assert(rawValues.length === displayValues.length);\n assert(valueType.valueFormat === PropertyValueFormat.Array);\n if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {\n return;\n }\n\n try {\n const itemType = valueType.memberType;\n rawValues.forEach((_, i) => {\n traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType, parentFieldName, rawValues[i], displayValues[i]);\n });\n } finally {\n visitor.finishArray();\n }\n}\n\nfunction traverseContentItemStructFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValues: ValuesMap,\n displayValues: DisplayValuesMap,\n) {\n assert(valueType.valueFormat === PropertyValueFormat.Struct);\n const label = rawValues[NESTED_CONTENT_LABEL_SYMBOL];\n if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues, label })) {\n return;\n }\n\n try {\n if (fieldHierarchy.field.isNestedContentField()) {\n parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);\n }\n\n valueType.members.forEach((memberDescription) => {\n let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);\n if (!memberField) {\n // Not finding a member field means we're traversing an ECStruct. We still need to carry member information, so we\n // create a fake field to represent the member\n memberField = {\n field: new Field(\n fieldHierarchy.field.category,\n memberDescription.name,\n memberDescription.label,\n memberDescription.type,\n fieldHierarchy.field.isReadonly,\n 0,\n ),\n childFields: [],\n };\n }\n traverseContentItemFieldValue(\n visitor,\n memberField,\n mergedFieldNames,\n memberDescription.type,\n parentFieldName,\n rawValues[memberDescription.name],\n displayValues[memberDescription.name],\n );\n });\n } finally {\n visitor.finishStruct();\n }\n}\n\nfunction traverseContentItemPrimitiveFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValue: Value,\n displayValue: DisplayValue,\n) {\n if (-1 !== mergedFieldNames.indexOf(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType, parentFieldName, rawValue, displayValue });\n}\n\n/**\n * Parses a list of [[Field]] objects into a list of [[FieldHierarchy]].\n *\n * @param ignoreCategories Enables adding all of the `nestedFields` to parent field's `childFields`\n * without considering categories.\n *\n * @public\n */\nexport function createFieldHierarchies(fields: Field[], ignoreCategories?: boolean) {\n const hierarchies = new Array<FieldHierarchy>();\n const visitField = (category: CategoryDescription, field: Field, parentField: Field | undefined): FieldHierarchy | undefined => {\n let childFields: FieldHierarchy[] = [];\n if (field.isNestedContentField()) {\n // visit all nested fields\n childFields = visitFields(field.nestedFields, field);\n if (0 === childFields.length) {\n return undefined;\n }\n }\n const fieldHierarchy = { field, childFields };\n if (category === parentField?.category || (ignoreCategories && parentField)) {\n // if categories of this field and its parent field match - return the field hierarchy without\n // including it as a top level field\n return fieldHierarchy;\n }\n addFieldHierarchy(hierarchies, fieldHierarchy);\n return undefined;\n };\n const visitFields = (visitedFields: Field[], parentField: NestedContentField | undefined) => {\n const includedFields: FieldHierarchy[] = [];\n visitedFields.forEach((field) => {\n const visitedField = visitField(field.category, field, parentField);\n if (visitedField) {\n includedFields.push(visitedField);\n }\n });\n return includedFields;\n };\n visitFields(fields, undefined);\n return hierarchies;\n}\n\nfunction findRelatedFields(rootFields: FieldHierarchy[], hierarchy: FieldHierarchy) {\n // build a list of parent fields in hierarchy\n const fields: Field[] = [];\n let currField: Field | undefined = hierarchy.field;\n while (currField) {\n fields.push(currField);\n currField = currField.parent;\n }\n\n for (let rootIndex = 0; rootIndex < rootFields.length; ++rootIndex) {\n const rootFieldHierarchy = rootFields[rootIndex];\n if (rootFieldHierarchy.field.category !== hierarchy.field.category) {\n // only interested in fields with the same category\n continue;\n }\n\n let first = true;\n currField = rootFieldHierarchy.field;\n while (currField) {\n const index = fields.findIndex((f) => f.name === currField!.name);\n if (-1 !== index) {\n return {\n existing: {\n field: currField,\n hierarchy: first ? rootFieldHierarchy : undefined,\n index: rootIndex,\n },\n matchingField: fields[index],\n };\n }\n currField = currField.parent;\n first = false;\n }\n }\n\n return undefined;\n}\n\nfunction buildParentHierarchy(hierarchy: FieldHierarchy, parentField: Field) {\n // note: parentField is found by walking up the parentship relationship\n // from hierarchy.field, so we expect to always find it here\n while (hierarchy.field !== parentField) {\n const hierarchyParent = hierarchy.field.parent;\n assert(hierarchyParent !== undefined);\n hierarchy = { field: hierarchyParent, childFields: [hierarchy] };\n }\n return hierarchy;\n}\n\nfunction mergeHierarchies(lhs: FieldHierarchy, rhs: FieldHierarchy) {\n assert(lhs.field.name === rhs.field.name);\n const result: FieldHierarchy = {\n field: lhs.field.clone(),\n childFields: [...lhs.childFields],\n };\n rhs.childFields.forEach((rhsChildHierarchy) => {\n const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);\n if (indexInResult !== -1) {\n result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);\n } else {\n result.childFields.push(rhsChildHierarchy);\n }\n });\n return result;\n}\n\n/**\n * Adds a field hierarchy into root field hierarchies list. *\n * @public\n */\nexport function addFieldHierarchy(rootHierarchies: FieldHierarchy[], hierarchy: FieldHierarchy): void {\n const match = findRelatedFields(rootHierarchies, hierarchy);\n if (!match) {\n rootHierarchies.push(hierarchy);\n return;\n }\n\n const targetHierarchy = rootHierarchies[match.existing.index];\n const existingHierarchy = match.existing.hierarchy ?? buildParentHierarchy(targetHierarchy, match.existing.field);\n const insertHierarchy = buildParentHierarchy(hierarchy, match.matchingField);\n const mergedHierarchy = mergeHierarchies(existingHierarchy, insertHierarchy);\n mergedHierarchy.field.category = hierarchy.field.category;\n rootHierarchies[match.existing.index] = mergedHierarchy;\n}\n\nfunction createFieldPath(field: Field): Field[] {\n const path = [field];\n let currField = field;\n while (currField.parent) {\n currField = currField.parent;\n path.push(currField);\n }\n path.reverse();\n return path;\n}\n\n/** @internal */\nexport const FIELD_NAMES_SEPARATOR = \"$\";\n/**\n * Combines given field names in a way that allows them to be parsed back into a list of individual names using the [[parseCombinedFieldNames]] function.\n * @public\n */\nexport function combineFieldNames(fieldName: string, parentFieldName?: string) {\n return parentFieldName ? `${parentFieldName}${FIELD_NAMES_SEPARATOR}${fieldName}` : fieldName;\n}\n/**\n * Parses given combined field names string, constructed using [[combineFieldNames]], into a list of individual field names.\n * @public\n */\nexport function parseCombinedFieldNames(combinedName: string) {\n return combinedName ? combinedName.split(FIELD_NAMES_SEPARATOR) : [];\n}\n\ninterface NestedItemConversionResult {\n emptyNestedItem: boolean;\n convertedItem: Item;\n}\n\nfunction convertNestedContentItemToStructArrayItem(item: Readonly<Item>, field: Field, nextField: Field): NestedItemConversionResult {\n const value = item.values[field.name] ?? [];\n assert(PresentationValue.isNestedContent(value));\n if (value.length === 0) {\n return { emptyNestedItem: true, convertedItem: item };\n }\n\n const nextFieldValues: { raw: ValuesArray; display: DisplayValuesArray } = { raw: [], display: [] };\n value.forEach((ncv) => {\n const nextRawValue = ncv.values[nextField.name];\n const nextDisplayValue = ncv.displayValues[nextField.name];\n if (nextField.isNestedContentField()) {\n if (nextRawValue) {\n assert(PresentationValue.isNestedContent(nextRawValue));\n nextFieldValues.raw.push(...nextRawValue);\n }\n } else {\n nextFieldValues.raw.push(nextRawValue);\n nextFieldValues.display.push(nextDisplayValue);\n }\n });\n const convertedItem = new Item(\n item.primaryKeys,\n item.label,\n item.imageId, // eslint-disable-line @typescript-eslint/no-deprecated\n item.classInfo,\n { [nextField.name]: nextFieldValues.raw },\n { [nextField.name]: nextFieldValues.display },\n item.mergedFieldNames,\n item.extendedData,\n );\n return { emptyNestedItem: false, convertedItem };\n}\n\nfunction convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy: FieldHierarchy, parentFieldName: string | undefined) {\n const fieldName = fieldHierarchy.field.name;\n const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {\n if (child.field.isNestedContentField()) {\n return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));\n }\n return child;\n });\n const convertedFieldHierarchy: FieldHierarchy = {\n field: Object.assign(fieldHierarchy.field.clone(), {\n type: {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: {\n valueFormat: PropertyValueFormat.Struct,\n typeName: fieldHierarchy.field.type.typeName,\n members: convertedChildFieldHierarchies.map((member) => ({\n name: member.field.name,\n label: member.field.label,\n type: member.field.type,\n })),\n },\n } as TypeDescription,\n }),\n childFields: convertedChildFieldHierarchies,\n };\n return convertedFieldHierarchy;\n}\n\nfunction convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy: FieldHierarchy, ncvs: ReadonlyArray<NestedContentValue>) {\n const result: {\n raw: ValuesArray;\n display: DisplayValuesArray;\n mergedFieldNames: string[];\n } = { raw: [], display: [], mergedFieldNames: [] };\n\n ncvs.forEach((ncv) => {\n const values: ValuesMap = { ...ncv.values };\n const displayValues: DisplayValuesMap = { ...ncv.displayValues };\n const mergedFieldNames: string[] = [...ncv.mergedFieldNames];\n values[NESTED_CONTENT_LABEL_SYMBOL] = ncv.labelDefinition;\n\n fieldHierarchy.childFields.forEach((childFieldHierarchy) => {\n const childFieldName = childFieldHierarchy.field.name;\n if (-1 !== ncv.mergedFieldNames.indexOf(childFieldName)) {\n return;\n }\n if (childFieldHierarchy.field.isNestedContentField()) {\n const value = values[childFieldName];\n assert(PresentationValue.isNestedContent(value));\n const convertedValues = convertNestedContentValuesToStructArrayValuesRecursive(childFieldHierarchy, value);\n values[childFieldName] = convertedValues.raw;\n displayValues[childFieldName] = convertedValues.display;\n mergedFieldNames.push(...convertedValues.mergedFieldNames);\n }\n });\n result.raw.push(values);\n result.display.push(displayValues);\n result.mergedFieldNames.push(...mergedFieldNames);\n });\n return result;\n}\n\nfunction convertNestedContentFieldHierarchyItemToStructArrayItem(item: Readonly<Item>, fieldHierarchy: FieldHierarchy): NestedItemConversionResult {\n const fieldName = fieldHierarchy.field.name;\n const rawValue = item.values[fieldName];\n assert(PresentationValue.isNestedContent(rawValue));\n if (rawValue.length === 0) {\n return { emptyNestedItem: true, convertedItem: item };\n }\n\n const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);\n const convertedItem = new Item(\n item.primaryKeys,\n item.label,\n item.imageId, // eslint-disable-line @typescript-eslint/no-deprecated\n item.classInfo,\n { [fieldName]: converted.raw },\n { [fieldName]: converted.display },\n converted.mergedFieldNames,\n item.extendedData,\n );\n return { emptyNestedItem: false, convertedItem };\n}\n"]}
1
+ {"version":3,"file":"ContentTraverser.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiRH,wDAIC;AAOD,0CAcC;AAMD,kDAEC;AAyPD,wDAgCC;AAwED,8CAaC;AAmBD,8CAEC;AAKD,0DAEC;AA1rBD,sDAA6C;AAG7C,uCAAoC;AAEpC,qCAAqD;AACrD,iCAA8B;AAC9B,uDAAyE;AACzE,mCAQiB;AAEjB,MAAM,2BAA2B,GAAG,MAAM,EAAE,CAAC;AAyP7C;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,SAAyB,EAAE,EAAkC;IAClG,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QAClB,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,sBAAsB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC;IAChG,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,OAAwB,EAAE,OAAgB;IACxE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3E,OAAO,CAAC,uBAAuB,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACnE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAClC,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC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H,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACnC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,uDAAuD,CAAC,IAAoB,EAAE,cAA8B;IACnH,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACxC,IAAA,qBAAM,EAAC,aAAiB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,SAAS,GAAG,sDAAsD,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,IAAI,WAAI,CAAC;QAC7B,GAAG,IAAI;QACP,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE;QACtC,aAAa,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE;QACjD,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;KAC7C,CAAC,CAAC;IACH,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AACnD,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 { assert } from \"@itwin/core-bentley\";\nimport { LabelDefinition } from \"../LabelDefinition\";\nimport { CategoryDescription } from \"./Category\";\nimport { Content } from \"./Content\";\nimport { Descriptor } from \"./Descriptor\";\nimport { Field, NestedContentField } from \"./Fields\";\nimport { Item } from \"./Item\";\nimport { PropertyValueFormat, TypeDescription } from \"./TypeDescription\";\nimport {\n DisplayValue,\n DisplayValuesArray,\n DisplayValuesMap,\n NestedContentValue,\n Value as PresentationValue,\n ValuesArray as PresentationValuesArray,\n ValuesMap as PresentationValuesMap,\n} from \"./Value\";\n\nconst NESTED_CONTENT_LABEL_SYMBOL = Symbol();\n\ntype ValuesMap = PresentationValuesMap & {\n [NESTED_CONTENT_LABEL_SYMBOL]?: LabelDefinition;\n};\n\ntype Value = Exclude<PresentationValue, PresentationValuesMap> | ValuesMap;\n\ntype ValuesArray = Array<Value>;\n\n/**\n * A data structure to define a hierarchy of [[Field]] objects.\n * @public\n */\nexport interface FieldHierarchy {\n /** Parent field. */\n field: Field;\n /** Nested fields. */\n childFields: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startContent]] call.\n * @public\n */\nexport interface StartContentProps {\n /** Descriptor of the visited content. */\n descriptor: Descriptor;\n}\n\n/**\n * Props for the [[IContentVisitor.processFieldHierarchies]] call.\n * @public\n */\nexport interface ProcessFieldHierarchiesProps {\n /**\n * The root list of fields, which may be mutated by the visitor to change order or the fields,\n * add new fields, etc.\n */\n hierarchies: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startItem]] call.\n * @public\n */\nexport interface StartItemProps {\n /** The content item that's about to be visited. */\n item: Item;\n}\n\n/**\n * Props for the [[IContentVisitor.startCategory]] call.\n * @public\n */\nexport interface StartCategoryProps {\n /** The content category that's about to be visited. */\n category: CategoryDescription;\n}\n\n/**\n * Props for the [[IContentVisitor.startField]] call.\n * @public\n */\nexport interface StartFieldProps {\n /** The field that's about to be visited. */\n hierarchy: FieldHierarchy;\n}\n\n/**\n * Props for the [[IContentVisitor.startStruct]] call.\n * @public\n */\nexport interface StartStructProps {\n /** Field that describes the struct. */\n hierarchy: FieldHierarchy;\n /** Type of the struct. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Member raw values. */\n rawValues: PresentationValuesMap;\n /** Member display values. */\n displayValues: DisplayValuesMap;\n /** Label definition of the ECInstance that the struct represents. */\n label?: LabelDefinition;\n}\n\n/**\n * Props for the [[IContentVisitor.startArray]] call.\n * @public\n */\nexport interface StartArrayProps {\n /** Field that describes the array. */\n hierarchy: FieldHierarchy;\n /** Type of the array. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Item raw values. */\n rawValues: PresentationValuesArray;\n /** Item display values. */\n displayValues: DisplayValuesArray;\n}\n\n/**\n * Props for the [[IContentVisitor.processMergedValue]] call.\n * @public\n */\nexport interface ProcessMergedValueProps {\n /** The field whose values are merged. */\n mergedField: Field;\n /**\n * Generally this matches the [[mergedField]], but there are situations when a nested field is propagated\n * up to display it as if it wasn't nested its parent fields. In those cases, if one of the parent fields\n * is merged, the merged parent is going to be represented by [[mergedField]] and the field we wanted to\n * process is going to be represented by [[requestedField]].\n */\n requestedField: Field;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n}\n\n/**\n * Props for the [[IContentVisitor.processPrimitiveValue]] call.\n * @public\n */\nexport interface ProcessPrimitiveValueProps {\n /** Field whose value is being processed. */\n field: Field;\n /** Type of the value. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Raw value. */\n rawValue: PresentationValue;\n /** Display value. */\n displayValue: DisplayValue;\n}\n\n/**\n * An interface for a visitor that can be passed to the [[traverseContent]] function\n * to be called on each piece of content.\n *\n * The order of calls when using the visitor with [[traverseContent]] or [[traverseContentItem]]:\n *\n * ```\n * startContent\n * processFieldHierarchies\n * for each content item:\n * startItem\n * for each field in root level:\n * for each category in field's category stack from root to field's category:\n * startCategory\n * startField\n * valueProcessing:\n * if item's value for this field is merged:\n * processMergedValue\n * else if the field is struct:\n * startStruct\n * for each struct member:\n * recurse into the valueProcessing step\n * finishStruct\n * else if the field is array:\n * startArray\n * for each array item:\n * recurse into the valueProcessing step\n * finishArray\n * else if the field is primitive:\n * processPrimitiveValue\n * finishField\n * finishItem\n * finishContent\n * ```\n * @public\n */\nexport interface IContentVisitor {\n /**\n * Called before starting [[Content]] processing. This is a good place to initialize various caches and prepare\n * for parsing content.\n *\n * Processing is skipped if the function returns `false` and [[finishContent]] is not called in that case.\n */\n startContent(props: StartContentProps): boolean;\n /** Called after processing of [[Content]] is complete. */\n finishContent(): void;\n\n /** Called to post-process field hierarchies after they're extracted from [[Descriptor]] in processed [[Content]]. */\n processFieldHierarchies(props: ProcessFieldHierarchiesProps): void;\n\n /**\n * Called before starting each [[Item]] processing. This is a good place to initialize for a new content item, e.g.\n * set up a new row in table.\n *\n * Processing is skipped if the function returns `false` and [[finishItem]] is not called in that case.\n */\n startItem(props: StartItemProps): boolean;\n /**\n * Called after processing of [[Item]] is complete. May be used to do any kind of post-processing after all\n * values for one content item have been processed.\n */\n finishItem(): void;\n\n /**\n * Called before processing a content item field ([[startField]] call) for each category in the field's\n * category stack, starting from the root and finishing with the field's category.\n *\n * Processing is skipped if the function returns `false` and [[finishCategory]] is not called in that case.\n */\n startCategory(props: StartCategoryProps): boolean;\n /** Called after processing of field is complete for every category in the field's category stack. */\n finishCategory(): void;\n\n /**\n * Called before starting [[Field]] processing for each individual [[Item]]. This is a good callback\n * to skip a field if it doesn't need to be handled.\n *\n * Processing is skipped if the function returns `false` and [[finishField]] is not called in that case.\n */\n startField(props: StartFieldProps): boolean;\n /** Called after processing of [[Field]] for individual [[Item]] is complete. */\n finishField(): void;\n\n /**\n * Called before processing a struct value. This is a good callback to skip handling the value or set up\n * for struct member values handling.\n *\n * Processing is skipped if the function returns `false` and [[finishStruct]] is not called in that case.\n */\n startStruct(props: StartStructProps): boolean;\n /** Called after processing of struct value is complete. */\n finishStruct(): void;\n\n /**\n * Called before processing an array value. This is a good callback to skip handling the value or set up\n * for array items handling.\n *\n * Processing is skipped if the function returns `false` and [[finishArray]] is not called in that case.\n */\n startArray(props: StartArrayProps): boolean;\n /** Called after processing of array value is complete. */\n finishArray(): void;\n\n /** Called to process a [merged value]($docs/presentation/content/Terminology.md#value-merging). */\n processMergedValue(props: ProcessMergedValueProps): void;\n /** Called to process a primitive value. */\n processPrimitiveValue(props: ProcessPrimitiveValueProps): void;\n}\n\n/**\n * An utility for traversing field hierarchy. Stops traversal as soon as `cb` returns `false`.\n * @public\n */\nexport function traverseFieldHierarchy(hierarchy: FieldHierarchy, cb: (h: FieldHierarchy) => boolean) {\n if (cb(hierarchy)) {\n hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));\n }\n}\n\n/**\n * An utility to traverse content using provided visitor. Provides means to parse content into different formats,\n * for different components.\n * @public\n */\nexport function traverseContent(visitor: IContentVisitor, content: Content) {\n if (!visitor.startContent({ descriptor: content.descriptor })) {\n return;\n }\n\n try {\n const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);\n visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });\n content.contentSet.forEach((item) => {\n traverseContentItemFields(visitor, fieldHierarchies, item);\n });\n } finally {\n visitor.finishContent();\n }\n}\n\n/**\n * An utility for calling [[traverseContent]] when there's only one content item.\n * @public\n */\nexport function traverseContentItem(visitor: IContentVisitor, descriptor: Descriptor, item: Item) {\n traverseContent(visitor, new Content(descriptor, [item]));\n}\n\nclass VisitedCategories implements Disposable {\n private _visitedCategories: CategoryDescription[];\n private _didVisitAllHierarchy: boolean;\n constructor(\n private _visitor: IContentVisitor,\n category: CategoryDescription,\n ) {\n const stack: CategoryDescription[] = [];\n let curr: CategoryDescription | undefined = category;\n while (curr) {\n stack.push(curr);\n curr = curr.parent;\n }\n stack.reverse();\n\n this._didVisitAllHierarchy = true;\n this._visitedCategories = [];\n for (curr of stack) {\n if (this._visitor.startCategory({ category: curr })) {\n this._visitedCategories.push(curr);\n } else {\n this._didVisitAllHierarchy = false;\n break;\n }\n }\n }\n public [Symbol.dispose]() {\n while (this._visitedCategories.pop()) {\n this._visitor.finishCategory();\n }\n }\n public get shouldContinue(): boolean {\n return this._didVisitAllHierarchy;\n }\n}\n\nfunction traverseContentItemFields(visitor: IContentVisitor, fieldHierarchies: FieldHierarchy[], item: Item) {\n if (!visitor.startItem({ item })) {\n return;\n }\n\n try {\n fieldHierarchies.forEach((fieldHierarchy) => {\n using res = new VisitedCategories(visitor, fieldHierarchy.field.category);\n if (res.shouldContinue) {\n traverseContentItemField(visitor, fieldHierarchy, item);\n }\n });\n } finally {\n visitor.finishItem();\n }\n}\n\nfunction traverseContentItemField(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, item: Item) {\n if (!visitor.startField({ hierarchy: fieldHierarchy })) {\n return;\n }\n\n try {\n const rootToThisField = createFieldPath(fieldHierarchy.field);\n let parentFieldName: string | undefined;\n const pathUpToField = rootToThisField.slice(undefined, -1);\n for (let i = 0; i < pathUpToField.length; ++i) {\n const parentField = pathUpToField[i] as NestedContentField;\n const nextField = rootToThisField[i + 1];\n\n if (item.isFieldMerged(parentField.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField, parentFieldName });\n return;\n }\n\n const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);\n if (emptyNestedItem) {\n return;\n }\n\n item = convertedItem;\n parentFieldName = combineFieldNames(parentField.name, parentFieldName);\n }\n\n if (item.isFieldMerged(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n if (fieldHierarchy.field.isNestedContentField()) {\n fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);\n const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);\n if (emptyNestedItem) {\n return;\n }\n item = convertedItem;\n } else if (pathUpToField.length > 0) {\n fieldHierarchy = {\n ...fieldHierarchy,\n field: (function () {\n const clone = fieldHierarchy.field.clone();\n clone.type = {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: fieldHierarchy.field.type,\n };\n return clone;\n })(),\n };\n }\n\n traverseContentItemFieldValue(\n visitor,\n fieldHierarchy,\n item.mergedFieldNames,\n fieldHierarchy.field.type,\n parentFieldName,\n item.values[fieldHierarchy.field.name],\n item.displayValues[fieldHierarchy.field.name],\n );\n } finally {\n visitor.finishField();\n }\n}\n\nfunction traverseContentItemFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValue: Value,\n displayValue: DisplayValue,\n) {\n if (rawValue !== undefined) {\n if (valueType.valueFormat === PropertyValueFormat.Array) {\n assert(PresentationValue.isArray(rawValue));\n assert(DisplayValue.isArray(displayValue));\n return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n if (valueType.valueFormat === PropertyValueFormat.Struct) {\n assert(PresentationValue.isMap(rawValue));\n assert(DisplayValue.isMap(displayValue));\n return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n }\n traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n}\n\nfunction traverseContentItemArrayFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValues: ValuesArray,\n displayValues: DisplayValuesArray,\n) {\n assert(rawValues.length === displayValues.length);\n assert(valueType.valueFormat === PropertyValueFormat.Array);\n if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {\n return;\n }\n\n try {\n const itemType = valueType.memberType;\n rawValues.forEach((_, i) => {\n traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType, parentFieldName, rawValues[i], displayValues[i]);\n });\n } finally {\n visitor.finishArray();\n }\n}\n\nfunction traverseContentItemStructFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValues: ValuesMap,\n displayValues: DisplayValuesMap,\n) {\n assert(valueType.valueFormat === PropertyValueFormat.Struct);\n const label = rawValues[NESTED_CONTENT_LABEL_SYMBOL];\n if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues, label })) {\n return;\n }\n\n try {\n if (fieldHierarchy.field.isNestedContentField()) {\n parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);\n }\n\n valueType.members.forEach((memberDescription) => {\n let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);\n if (!memberField) {\n // Not finding a member field means we're traversing an ECStruct. We still need to carry member information, so we\n // create a fake field to represent the member\n memberField = {\n field: new Field({\n category: fieldHierarchy.field.category,\n name: memberDescription.name,\n label: memberDescription.label,\n type: memberDescription.type,\n isReadonly: fieldHierarchy.field.isReadonly,\n priority: 0,\n }),\n childFields: [],\n };\n }\n traverseContentItemFieldValue(\n visitor,\n memberField,\n mergedFieldNames,\n memberDescription.type,\n parentFieldName,\n rawValues[memberDescription.name],\n displayValues[memberDescription.name],\n );\n });\n } finally {\n visitor.finishStruct();\n }\n}\n\nfunction traverseContentItemPrimitiveFieldValue(\n visitor: IContentVisitor,\n fieldHierarchy: FieldHierarchy,\n mergedFieldNames: string[],\n valueType: TypeDescription,\n parentFieldName: string | undefined,\n rawValue: Value,\n displayValue: DisplayValue,\n) {\n if (-1 !== mergedFieldNames.indexOf(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType, parentFieldName, rawValue, displayValue });\n}\n\n/**\n * Parses a list of [[Field]] objects into a list of [[FieldHierarchy]].\n *\n * @param ignoreCategories Enables adding all of the `nestedFields` to parent field's `childFields`\n * without considering categories.\n *\n * @public\n */\nexport function createFieldHierarchies(fields: Field[], ignoreCategories?: boolean) {\n const hierarchies = new Array<FieldHierarchy>();\n const visitField = (category: CategoryDescription, field: Field, parentField: Field | undefined): FieldHierarchy | undefined => {\n let childFields: FieldHierarchy[] = [];\n if (field.isNestedContentField()) {\n // visit all nested fields\n childFields = visitFields(field.nestedFields, field);\n if (0 === childFields.length) {\n return undefined;\n }\n }\n const fieldHierarchy = { field, childFields };\n if (category === parentField?.category || (ignoreCategories && parentField)) {\n // if categories of this field and its parent field match - return the field hierarchy without\n // including it as a top level field\n return fieldHierarchy;\n }\n addFieldHierarchy(hierarchies, fieldHierarchy);\n return undefined;\n };\n const visitFields = (visitedFields: Field[], parentField: NestedContentField | undefined) => {\n const includedFields: FieldHierarchy[] = [];\n visitedFields.forEach((field) => {\n const visitedField = visitField(field.category, field, parentField);\n if (visitedField) {\n includedFields.push(visitedField);\n }\n });\n return includedFields;\n };\n visitFields(fields, undefined);\n return hierarchies;\n}\n\nfunction findRelatedFields(rootFields: FieldHierarchy[], hierarchy: FieldHierarchy) {\n // build a list of parent fields in hierarchy\n const fields: Field[] = [];\n let currField: Field | undefined = hierarchy.field;\n while (currField) {\n fields.push(currField);\n currField = currField.parent;\n }\n\n for (let rootIndex = 0; rootIndex < rootFields.length; ++rootIndex) {\n const rootFieldHierarchy = rootFields[rootIndex];\n if (rootFieldHierarchy.field.category !== hierarchy.field.category) {\n // only interested in fields with the same category\n continue;\n }\n\n let first = true;\n currField = rootFieldHierarchy.field;\n while (currField) {\n const index = fields.findIndex((f) => f.name === currField!.name);\n if (-1 !== index) {\n return {\n existing: {\n field: currField,\n hierarchy: first ? rootFieldHierarchy : undefined,\n index: rootIndex,\n },\n matchingField: fields[index],\n };\n }\n currField = currField.parent;\n first = false;\n }\n }\n\n return undefined;\n}\n\nfunction buildParentHierarchy(hierarchy: FieldHierarchy, parentField: Field) {\n // note: parentField is found by walking up the parentship relationship\n // from hierarchy.field, so we expect to always find it here\n while (hierarchy.field !== parentField) {\n const hierarchyParent = hierarchy.field.parent;\n assert(hierarchyParent !== undefined);\n hierarchy = { field: hierarchyParent, childFields: [hierarchy] };\n }\n return hierarchy;\n}\n\nfunction mergeHierarchies(lhs: FieldHierarchy, rhs: FieldHierarchy) {\n assert(lhs.field.name === rhs.field.name);\n const result: FieldHierarchy = {\n field: lhs.field.clone(),\n childFields: [...lhs.childFields],\n };\n rhs.childFields.forEach((rhsChildHierarchy) => {\n const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);\n if (indexInResult !== -1) {\n result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);\n } else {\n result.childFields.push(rhsChildHierarchy);\n }\n });\n return result;\n}\n\n/**\n * Adds a field hierarchy into root field hierarchies list. *\n * @public\n */\nexport function addFieldHierarchy(rootHierarchies: FieldHierarchy[], hierarchy: FieldHierarchy): void {\n const match = findRelatedFields(rootHierarchies, hierarchy);\n if (!match) {\n rootHierarchies.push(hierarchy);\n return;\n }\n\n const targetHierarchy = rootHierarchies[match.existing.index];\n const existingHierarchy = match.existing.hierarchy ?? buildParentHierarchy(targetHierarchy, match.existing.field);\n const insertHierarchy = buildParentHierarchy(hierarchy, match.matchingField);\n const mergedHierarchy = mergeHierarchies(existingHierarchy, insertHierarchy);\n mergedHierarchy.field.category = hierarchy.field.category;\n rootHierarchies[match.existing.index] = mergedHierarchy;\n}\n\nfunction createFieldPath(field: Field): Field[] {\n const path = [field];\n let currField = field;\n while (currField.parent) {\n currField = currField.parent;\n path.push(currField);\n }\n path.reverse();\n return path;\n}\n\n/** @internal */\nexport const FIELD_NAMES_SEPARATOR = \"$\";\n/**\n * Combines given field names in a way that allows them to be parsed back into a list of individual names using the [[parseCombinedFieldNames]] function.\n * @public\n */\nexport function combineFieldNames(fieldName: string, parentFieldName?: string) {\n return parentFieldName ? `${parentFieldName}${FIELD_NAMES_SEPARATOR}${fieldName}` : fieldName;\n}\n/**\n * Parses given combined field names string, constructed using [[combineFieldNames]], into a list of individual field names.\n * @public\n */\nexport function parseCombinedFieldNames(combinedName: string) {\n return combinedName ? combinedName.split(FIELD_NAMES_SEPARATOR) : [];\n}\n\ninterface NestedItemConversionResult {\n emptyNestedItem: boolean;\n convertedItem: Item;\n}\n\nfunction convertNestedContentItemToStructArrayItem(item: Readonly<Item>, field: Field, nextField: Field): NestedItemConversionResult {\n const value = item.values[field.name] ?? [];\n assert(PresentationValue.isNestedContent(value));\n if (value.length === 0) {\n return { emptyNestedItem: true, convertedItem: item };\n }\n\n const nextFieldValues: { raw: ValuesArray; display: DisplayValuesArray } = { raw: [], display: [] };\n value.forEach((ncv) => {\n const nextRawValue = ncv.values[nextField.name];\n const nextDisplayValue = ncv.displayValues[nextField.name];\n if (nextField.isNestedContentField()) {\n if (nextRawValue) {\n assert(PresentationValue.isNestedContent(nextRawValue));\n nextFieldValues.raw.push(...nextRawValue);\n }\n } else {\n nextFieldValues.raw.push(nextRawValue);\n nextFieldValues.display.push(nextDisplayValue);\n }\n });\n const convertedItem = new Item({\n ...item,\n values: { [nextField.name]: nextFieldValues.raw },\n displayValues: { [nextField.name]: nextFieldValues.display },\n });\n return { emptyNestedItem: false, convertedItem };\n}\n\nfunction convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy: FieldHierarchy, parentFieldName: string | undefined) {\n const fieldName = fieldHierarchy.field.name;\n const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {\n if (child.field.isNestedContentField()) {\n return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));\n }\n return child;\n });\n const convertedFieldHierarchy: FieldHierarchy = {\n field: (function () {\n const clone = fieldHierarchy.field.clone();\n clone.type = {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: {\n valueFormat: PropertyValueFormat.Struct,\n typeName: fieldHierarchy.field.type.typeName,\n members: convertedChildFieldHierarchies.map((member) => ({\n name: member.field.name,\n label: member.field.label,\n type: member.field.type,\n })),\n },\n };\n return clone;\n })(),\n childFields: convertedChildFieldHierarchies,\n };\n return convertedFieldHierarchy;\n}\n\nfunction convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy: FieldHierarchy, ncvs: ReadonlyArray<NestedContentValue>) {\n const result: {\n raw: ValuesArray;\n display: DisplayValuesArray;\n mergedFieldNames: string[];\n } = { raw: [], display: [], mergedFieldNames: [] };\n\n ncvs.forEach((ncv) => {\n const values: ValuesMap = { ...ncv.values };\n const displayValues: DisplayValuesMap = { ...ncv.displayValues };\n const mergedFieldNames: string[] = [...ncv.mergedFieldNames];\n values[NESTED_CONTENT_LABEL_SYMBOL] = ncv.labelDefinition;\n\n fieldHierarchy.childFields.forEach((childFieldHierarchy) => {\n const childFieldName = childFieldHierarchy.field.name;\n if (-1 !== ncv.mergedFieldNames.indexOf(childFieldName)) {\n return;\n }\n if (childFieldHierarchy.field.isNestedContentField()) {\n const value = values[childFieldName];\n assert(PresentationValue.isNestedContent(value));\n const convertedValues = convertNestedContentValuesToStructArrayValuesRecursive(childFieldHierarchy, value);\n values[childFieldName] = convertedValues.raw;\n displayValues[childFieldName] = convertedValues.display;\n mergedFieldNames.push(...convertedValues.mergedFieldNames);\n }\n });\n result.raw.push(values);\n result.display.push(displayValues);\n result.mergedFieldNames.push(...mergedFieldNames);\n });\n return result;\n}\n\nfunction convertNestedContentFieldHierarchyItemToStructArrayItem(item: Readonly<Item>, fieldHierarchy: FieldHierarchy): NestedItemConversionResult {\n const fieldName = fieldHierarchy.field.name;\n const rawValue = item.values[fieldName];\n assert(PresentationValue.isNestedContent(rawValue));\n if (rawValue.length === 0) {\n return { emptyNestedItem: true, convertedItem: item };\n }\n\n const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);\n const convertedItem = new Item({\n ...item,\n values: { [fieldName]: converted.raw },\n displayValues: { [fieldName]: converted.display },\n mergedFieldNames: converted.mergedFieldNames,\n });\n return { emptyNestedItem: false, convertedItem };\n}\n"]}
@@ -64,6 +64,32 @@ export interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> extends
64
64
  * @public
65
65
  */
66
66
  export type FieldJSON<TClassInfoJSON = ClassInfoJSON> = BaseFieldJSON | PropertiesFieldJSON<TClassInfoJSON> | ArrayPropertiesFieldJSON<TClassInfoJSON> | StructPropertiesFieldJSON<TClassInfoJSON> | NestedContentFieldJSON<TClassInfoJSON>;
67
+ /**
68
+ * Props for creating [[Field]].
69
+ * @public
70
+ */
71
+ interface FieldProps {
72
+ /** Category information */
73
+ category: CategoryDescription;
74
+ /** Unique name */
75
+ name: string;
76
+ /** Display label */
77
+ label: string;
78
+ /** Description of this field's values data type */
79
+ type: TypeDescription;
80
+ /** Are values in this field read-only */
81
+ isReadonly: boolean;
82
+ /** Priority of the field */
83
+ priority: number;
84
+ /** Property editor used to edit values of this field */
85
+ editor?: EditorDescription;
86
+ /** Property renderer used to render values of this field */
87
+ renderer?: RendererDescription;
88
+ /** Extended data associated with this field */
89
+ extendedData?: {
90
+ [key: string]: unknown;
91
+ };
92
+ }
67
93
  /**
68
94
  * Describes a single content field. A field is usually represented as a grid column
69
95
  * or a property pane row.
@@ -94,7 +120,7 @@ export declare class Field {
94
120
  /** Parent field */
95
121
  private _parent?;
96
122
  /**
97
- * Creates an instance of Field.
123
+ * Creates an instance of [[Field]].
98
124
  * @param category Category information
99
125
  * @param name Unique name
100
126
  * @param label Display label
@@ -104,10 +130,13 @@ export declare class Field {
104
130
  * @param editor Property editor used to edit values of this field
105
131
  * @param renderer Property renderer used to render values of this field
106
132
  * @param extendedData Extended data associated with this field
133
+ * @deprecated in 5.0. Use an overload with `FieldProps` instead.
107
134
  */
108
135
  constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, editor?: EditorDescription, renderer?: RendererDescription, extendedData?: {
109
136
  [key: string]: unknown;
110
137
  });
138
+ /** Creates an instance of [[Field]]. */
139
+ constructor(props: FieldProps);
111
140
  /**
112
141
  * Is this a [[PropertiesField]]
113
142
  */
@@ -149,6 +178,14 @@ export declare class Field {
149
178
  */
150
179
  matchesDescriptor(descriptor: FieldDescriptor): boolean;
151
180
  }
181
+ /**
182
+ * Props for creating [[PropertiesField]].
183
+ * @public
184
+ */
185
+ interface PropertiesFieldProps extends FieldProps {
186
+ /** A list of properties this field is created from */
187
+ properties: Property[];
188
+ }
152
189
  /**
153
190
  * Describes a content field that's based on one or more similar
154
191
  * EC properties.
@@ -159,7 +196,7 @@ export declare class PropertiesField extends Field {
159
196
  /** A list of properties this field is created from */
160
197
  properties: Property[];
161
198
  /**
162
- * Creates an instance of PropertiesField.
199
+ * Creates an instance of [[PropertiesField]].
163
200
  * @param category Category information
164
201
  * @param name Unique name
165
202
  * @param label Display label
@@ -169,8 +206,11 @@ export declare class PropertiesField extends Field {
169
206
  * @param properties A list of properties this field is created from
170
207
  * @param editor Property editor used to edit values of this field
171
208
  * @param renderer Property renderer used to render values of this field
209
+ * @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.
172
210
  */
173
- constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
211
+ constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
212
+ /** Creates an instance of [[PropertiesField]]. */
213
+ constructor(props: PropertiesFieldProps);
174
214
  /** Is this a an array property field */
175
215
  isArrayPropertiesField(): this is ArrayPropertiesField;
176
216
  /** Is this a an struct property field */
@@ -202,13 +242,26 @@ export declare class PropertiesField extends Field {
202
242
  */
203
243
  matchesDescriptor(descriptor: FieldDescriptor): boolean;
204
244
  }
245
+ /**
246
+ * Props for creating [[ArrayPropertiesField]].
247
+ * @public
248
+ */
249
+ interface ArrayPropertiesFieldProps extends PropertiesFieldProps {
250
+ itemsField: PropertiesField;
251
+ }
205
252
  /**
206
253
  * Describes a content field that's based on one or more similar EC array properties.
207
254
  * @public
208
255
  */
209
256
  export declare class ArrayPropertiesField extends PropertiesField {
210
257
  itemsField: PropertiesField;
211
- constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
258
+ /**
259
+ * Creates an instance of [[ArrayPropertiesField]].
260
+ * @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.
261
+ */
262
+ constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
263
+ /** Creates an instance of [[ArrayPropertiesField]]. */
264
+ constructor(props: ArrayPropertiesFieldProps);
212
265
  isArrayPropertiesField(): this is ArrayPropertiesField;
213
266
  clone(): ArrayPropertiesField;
214
267
  /** Serialize this object to JSON */
@@ -227,13 +280,26 @@ export declare class ArrayPropertiesField extends PropertiesField {
227
280
  [id: string]: CompressedClassInfoJSON;
228
281
  }, categories: CategoryDescription[]): ArrayPropertiesField;
229
282
  }
283
+ /**
284
+ * Props for creating [[StructPropertiesField]].
285
+ * @public
286
+ */
287
+ interface StructPropertiesFieldProps extends PropertiesFieldProps {
288
+ memberFields: PropertiesField[];
289
+ }
230
290
  /**
231
291
  * Describes a content field that's based on one or more similar EC struct properties.
232
292
  * @public
233
293
  */
234
294
  export declare class StructPropertiesField extends PropertiesField {
235
295
  memberFields: PropertiesField[];
236
- constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
296
+ /**
297
+ * Creates an instance of [[StructPropertiesField]].
298
+ * @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.
299
+ */
300
+ constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
301
+ /** Creates an instance of [[StructPropertiesField]]. */
302
+ constructor(props: StructPropertiesFieldProps);
237
303
  isStructPropertiesField(): this is StructPropertiesField;
238
304
  clone(): StructPropertiesField;
239
305
  /** Serialize this object to JSON */
@@ -252,6 +318,39 @@ export declare class StructPropertiesField extends PropertiesField {
252
318
  [id: string]: CompressedClassInfoJSON;
253
319
  }, categories: CategoryDescription[]): StructPropertiesField;
254
320
  }
321
+ /**
322
+ * Props for creating [[NestedContentField]].
323
+ * @public
324
+ */
325
+ interface NestedContentFieldProps extends FieldProps {
326
+ /** Information about an ECClass whose properties are nested inside this field */
327
+ contentClassInfo: ClassInfo;
328
+ /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */
329
+ pathToPrimaryClass: RelationshipPath;
330
+ /**
331
+ * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)
332
+ * and content class of this field.
333
+ *
334
+ * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up
335
+ * presentation rules for creating the content.
336
+ */
337
+ relationshipMeaning?: RelationshipMeaning;
338
+ /**
339
+ * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes
340
+ * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is
341
+ * here to help.
342
+ *
343
+ * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.
344
+ * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,
345
+ * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute
346
+ * will contain ID of class `B`, identifying that only this specific class has the relationship.
347
+ */
348
+ actualPrimaryClassIds?: Id64String[];
349
+ /** Contained nested fields */
350
+ nestedFields: Field[];
351
+ /** Flag specifying whether field should be expanded */
352
+ autoExpand?: boolean;
353
+ }
255
354
  /**
256
355
  * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
257
356
  *
@@ -286,7 +385,7 @@ export declare class NestedContentField extends Field {
286
385
  /** Flag specifying whether field should be expanded */
287
386
  autoExpand?: boolean;
288
387
  /**
289
- * Creates an instance of NestedContentField.
388
+ * Creates an instance of [[NestedContentField]].
290
389
  * @param category Category information
291
390
  * @param name Unique name
292
391
  * @param label Display label
@@ -300,8 +399,11 @@ export declare class NestedContentField extends Field {
300
399
  * @param autoExpand Flag specifying whether field should be expanded
301
400
  * @param relationshipMeaning RelationshipMeaning of the field
302
401
  * @param renderer Property renderer used to render values of this field
402
+ * @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.
303
403
  */
304
- constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, isReadonly: boolean, priority: number, contentClassInfo: ClassInfo, pathToPrimaryClass: RelationshipPath, nestedFields: Field[], editor?: EditorDescription, autoExpand?: boolean, renderer?: RendererDescription);
404
+ constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, contentClassInfo: ClassInfo, pathToPrimaryClass: RelationshipPath, nestedFields: Field[], editor?: EditorDescription, autoExpand?: boolean, renderer?: RendererDescription);
405
+ /** Creates an instance of [[NestedContentField]]. */
406
+ constructor(props: NestedContentFieldProps);
305
407
  clone(): NestedContentField;
306
408
  /**
307
409
  * Get field by its name
@@ -323,7 +425,7 @@ export declare class NestedContentField extends Field {
323
425
  /** Deserialize a [[NestedContentField]] from compressed JSON. */
324
426
  static fromCompressedJSON(json: NestedContentFieldJSON<Id64String>, classesMap: {
325
427
  [id: string]: CompressedClassInfoJSON;
326
- }, categories: CategoryDescription[]): any;
428
+ }, categories: CategoryDescription[]): NestedContentField;
327
429
  private static fromCommonJSON;
328
430
  /** Resets parent of this field and all nested fields. */
329
431
  resetParentship(): void;
@@ -391,4 +493,5 @@ export interface PropertiesFieldDescriptor extends FieldDescriptorBase {
391
493
  name: string;
392
494
  }>;
393
495
  }
496
+ export {};
394
497
  //# sourceMappingURL=Fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,EACT,aAAa,EACb,uBAAuB,EAKvB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC3C;AAED;;;GAGG;AAEH,MAAM,WAAW,mBAAmB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,GAAG,SAAS,YAAY,OAAO,KAAG,KAAK,GAAG,SAgBrG,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,WAAY,KAAK,EAAE,mBAAmB,eAAe,YAAY,OAAO,KAAG,KAAK,GAAG,SAcnH,CAAC;AAEF;;;GAGG;AACH,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,yBAAyB,CAAC;AAE/E,cAAc;AAEd,yBAAiB,eAAe,CAAC;IAC/B,uCAAuC;IACvC,SAAgB,OAAO,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,oBAAoB,CAErE;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,yBAAyB,CAE/E;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC;IACrC,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;QAChB,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,oBAAoB;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ"}
1
+ {"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,EACT,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