@itwin/presentation-components
Version:
React components based on iTwin.js Presentation library
72 lines • 2.21 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/**
* @packageDocumentation
* @module Properties
*/
import { InternalPropertyRecordsBuilder } from "./ContentBuilder.js";
/**
* A `Content` visitor that traverses all content, creates a `PropertyRecord` for each property
* and streams them into the given callback function.
*
* @public
*/
export class PropertyRecordsBuilder {
_internal;
constructor(visitPropertyRecord) {
this._internal = new InternalPropertyRecordsBuilder((item) => ({
item,
append(entry) {
visitPropertyRecord(entry.record);
},
}));
}
startContent(props) {
return this._internal.startContent(props);
}
finishContent() {
return this._internal.finishContent();
}
startItem(props) {
return this._internal.startItem(props);
}
finishItem() {
return this._internal.finishItem();
}
processFieldHierarchies(props) {
return this._internal.processFieldHierarchies(props);
}
startCategory(props) {
return this._internal.startCategory(props);
}
finishCategory() {
return this._internal.finishCategory();
}
startField(props) {
return this._internal.startField(props);
}
finishField() {
return this._internal.finishField();
}
startStruct(props) {
return this._internal.startStruct(props);
}
finishStruct() {
return this._internal.finishStruct();
}
startArray(props) {
return this._internal.startArray(props);
}
finishArray() {
return this._internal.finishArray();
}
processMergedValue(props) {
return this._internal.processMergedValue(props);
}
processPrimitiveValue(props) {
return this._internal.processPrimitiveValue(props);
}
}
//# sourceMappingURL=PropertyRecordsBuilder.js.map