@contrail/documents 2.4.0-alpha.ce67280 → 2.4.0-alpha.d86842b

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.
@@ -52,6 +52,7 @@ export declare const HARD_CODED_TEXT: {
52
52
  };
53
53
  export declare function isContainerBinding(bindingProperty: string | null | undefined): boolean;
54
54
  export declare class DynamicTextUtil {
55
+ static componentsBoundTo(componentElements: DocumentElement[], entityType: string): DocumentElement[];
55
56
  static isDynamicText(documentElement: DocumentElement): boolean;
56
57
  static takesValueFromContainer(bindingProperty: string | null | undefined): boolean;
57
58
  static getDynamicTextValue(dynamicTextElement: DocumentElement, property: TypeProperty, propertyLevel: PropertyLevel, container: DynamicTextContainer | null, componentModels: any[], ownerReferenceModel?: any): string;
@@ -63,6 +63,12 @@ function isContainerBinding(bindingProperty) {
63
63
  return DynamicTextUtil.takesValueFromContainer(bindingProperty);
64
64
  }
65
65
  class DynamicTextUtil {
66
+ static componentsBoundTo(componentElements, entityType) {
67
+ if (CONTAINER_SOURCES.includes(entityType)) {
68
+ return componentElements;
69
+ }
70
+ return (componentElements !== null && componentElements !== void 0 ? componentElements : []).filter((element) => { var _a; return Object.keys((_a = element === null || element === void 0 ? void 0 : element.modelBindings) !== null && _a !== void 0 ? _a : {}).includes(entityType); });
71
+ }
66
72
  static isDynamicText(documentElement) {
67
73
  var _a;
68
74
  return ((documentElement === null || documentElement === void 0 ? void 0 : documentElement.type) === 'text' &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "2.4.0-alpha.ce67280",
3
+ "version": "2.4.0-alpha.d86842b",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",