How to use the @alfresco/adf-core.ObjectUtils.getValue function in @alfresco/adf-core

To help you get started, we’ve selected a few @alfresco/adf-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-ng2-components / lib / content-services / src / lib / document-list / data / share-data-row.model.ts View on Github external
getValue(key: string): any {
        if (this.cache[key] !== undefined) {
            return this.cache[key];
        }
        return ObjectUtils.getValue(this.obj.entry, key);
    }
github Alfresco / alfresco-content-app / src / app / components / viewer / viewer.component.ts View on Github external
items.sort((a: any, b: any) => {
      let left = ObjectUtils.getValue(a, key);
      if (left) {
        left =
          left instanceof Date ? left.valueOf().toString() : left.toString();
      } else {
        left = '';
      }

      let right = ObjectUtils.getValue(b, key);
      if (right) {
        right =
          right instanceof Date ? right.valueOf().toString() : right.toString();
      } else {
        right = '';
      }

      return direction === 'asc'
        ? left.localeCompare(right, undefined, options)
        : right.localeCompare(left, undefined, options);
    });
  }
github Alfresco / alfresco-content-app / src / app / components / preview / preview.component.ts View on Github external
items.sort((a: any, b: any) => {
      let left = ObjectUtils.getValue(a, key);
      if (left) {
        left =
          left instanceof Date ? left.valueOf().toString() : left.toString();
      } else {
        left = '';
      }

      let right = ObjectUtils.getValue(b, key);
      if (right) {
        right =
          right instanceof Date ? right.valueOf().toString() : right.toString();
      } else {
        right = '';
      }

      return direction === 'asc'
github Alfresco / alfresco-content-app / src / app / components / viewer / viewer.component.ts View on Github external
items.sort((a: any, b: any) => {
      let left = ObjectUtils.getValue(a, key);
      if (left) {
        left =
          left instanceof Date ? left.valueOf().toString() : left.toString();
      } else {
        left = '';
      }

      let right = ObjectUtils.getValue(b, key);
      if (right) {
        right =
          right instanceof Date ? right.valueOf().toString() : right.toString();
      } else {
        right = '';
      }

      return direction === 'asc'
github Alfresco / alfresco-content-app / src / app / components / preview / preview.component.ts View on Github external
items.sort((a: any, b: any) => {
      let left = ObjectUtils.getValue(a, key);
      if (left) {
        left =
          left instanceof Date ? left.valueOf().toString() : left.toString();
      } else {
        left = '';
      }

      let right = ObjectUtils.getValue(b, key);
      if (right) {
        right =
          right instanceof Date ? right.valueOf().toString() : right.toString();
      } else {
        right = '';
      }

      return direction === 'asc'
        ? left.localeCompare(right, undefined, options)
        : right.localeCompare(left, undefined, options);
    });
  }