@contrail/documents 1.1.14 → 1.1.15

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.
@@ -1,3 +1,4 @@
1
+ import { TypeProperty } from '@contrail/types';
1
2
  import { DocumentElement } from '../../types/document-element';
2
3
  export declare enum DynamicTextDisplayFunction {
3
4
  VALUE = "value",
@@ -29,7 +30,10 @@ export declare const HARD_CODED_TEXT: {
29
30
  'frame.colorCount': string;
30
31
  };
31
32
  export declare class DynamicTextUtil {
32
- static getDynamicTextValue(dynamicTextElement: DocumentElement, property: any, frame: any, componentModels: any[], ownerReferenceModel?: any): string;
33
+ static getDynamicTextValue(dynamicTextElement: DocumentElement, property: TypeProperty, frame: {
34
+ name: string;
35
+ id?: string;
36
+ }, componentModels: any[], ownerReferenceModel?: any): string;
33
37
  static getTextFromFrameMemberValues(displayFunction: string, property: any, memberValues: any[]): string;
34
38
  private static getItemCount;
35
39
  }
@@ -51,8 +51,7 @@ class DynamicTextUtil {
51
51
  const displayFunction = ((_c = dynamicTextElement.propertyBindingsMetaData) === null || _c === void 0 ? void 0 : _c.displayFunction) || DynamicTextDisplayFunction.VALUE;
52
52
  const displayLabel = (_d = dynamicTextElement.propertyBindingsMetaData) === null || _d === void 0 ? void 0 : _d.displayLabel;
53
53
  const bindingProperty = dynamicTextElement.propertyBindings.text;
54
- const entityType = bindingProperty === null || bindingProperty === void 0 ? void 0 : bindingProperty.split('.')[0];
55
- const propertySlug = bindingProperty === null || bindingProperty === void 0 ? void 0 : bindingProperty.split('.')[1];
54
+ const [entityType, propertySlug] = bindingProperty === null || bindingProperty === void 0 ? void 0 : bindingProperty.split('.');
56
55
  let text = '';
57
56
  if (['showcase', 'board', 'project'].includes(entityType)) {
58
57
  if (!ownerReferenceModel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",