@itwin/presentation-common
Version:
Common pieces for iModel.js presentation packages
37 lines • 1.44 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 Hierarchies
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelDefinition = exports.COMPOSITE_LABEL_DEFINITION_TYPENAME = void 0;
/** @internal */
exports.COMPOSITE_LABEL_DEFINITION_TYPENAME = "composite";
/** @public */
var LabelDefinition;
(function (LabelDefinition) {
/**
* Checks if provided [[LabelDefinition]] has raw value of type [[LabelCompositeValue]].
* @public
*/
function isCompositeDefinition(def) {
return def.typeName === exports.COMPOSITE_LABEL_DEFINITION_TYPENAME;
}
LabelDefinition.isCompositeDefinition = isCompositeDefinition;
/**
* Creates [[LabelDefinition]] from string value.
* @public
*/
function fromLabelString(label) {
return {
displayValue: label,
rawValue: label,
typeName: "string",
};
}
LabelDefinition.fromLabelString = fromLabelString;
})(LabelDefinition || (exports.LabelDefinition = LabelDefinition = {}));
//# sourceMappingURL=LabelDefinition.js.map