@sd-angular/core 1.1.95 → 1.1.96

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.
@@ -10,8 +10,7 @@ import { Subject, Subscription, isObservable } from 'rxjs';
10
10
  import { SdNotifyService } from '@sd-angular/core/notify';
11
11
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
12
12
  import { startWith, debounceTime, map, switchMap } from 'rxjs/operators';
13
- import * as hash from 'object-hash';
14
- import hash__default from 'object-hash';
13
+ import hash from 'object-hash';
15
14
  import { SdSettingService } from '@sd-angular/core/setting';
16
15
  import { DeviceDetectorService } from 'ngx-device-detector';
17
16
  import { SdLoadingService } from '@sd-angular/core/loading';
@@ -237,7 +236,7 @@ class SdGridFilterService {
237
236
  prefix: __classPrivateFieldGet(this, _prefix),
238
237
  key
239
238
  });
240
- key = hash__default({
239
+ key = hash({
241
240
  prefix: __classPrivateFieldGet(this, _prefix),
242
241
  key
243
242
  });
@@ -694,7 +693,7 @@ class SdPopupExport {
694
693
  if (!((_b = (_a = this.gridOption) === null || _a === void 0 ? void 0 : _a.export) === null || _b === void 0 ? void 0 : _b.key)) {
695
694
  return null;
696
695
  }
697
- return hash__default({
696
+ return hash({
698
697
  prefix,
699
698
  key: (_d = (_c = this.gridOption) === null || _c === void 0 ? void 0 : _c.export) === null || _d === void 0 ? void 0 : _d.key
700
699
  });
@@ -766,7 +765,7 @@ class SdGridConfigurationService {
766
765
  if (!((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _a === void 0 ? void 0 : _a.key) && !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
767
766
  return null;
768
767
  }
769
- return hash__default({
768
+ return hash({
770
769
  prefix,
771
770
  key: ((_b = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _b === void 0 ? void 0 : _b.key) || !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)
772
771
  });
@@ -1120,7 +1119,7 @@ class SdColumnValuesPipe {
1120
1119
  return value;
1121
1120
  }
1122
1121
  const _f = column.option, { items, valueField, displayField } = _f, remain = __rest(_f, ["items", "valueField", "displayField"]);
1123
- let key = hash({
1122
+ const key = hash({
1124
1123
  prefix: __classPrivateFieldGet(this, _prefix$1),
1125
1124
  valueField,
1126
1125
  displayField,
@@ -1172,7 +1171,7 @@ class SdEditorHandlerColumnPipe {
1172
1171
  }
1173
1172
  transform(value, item, gridOption) {
1174
1173
  const { sdId, editorHandlerColumn, expandDetail, isExpanded, isExpanding, isSelected, sdGroup, selectable, actions, groupedActions, originItem, editorErrorMessage, editorHandlerRow } = item, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "groupedActions", "originItem", "editorErrorMessage", "editorHandlerRow"]);
1175
- const key = hash__default(remain);
1174
+ const key = hash(remain);
1176
1175
  if (sdId === key && editorHandlerColumn) {
1177
1176
  return true;
1178
1177
  }
@@ -1588,7 +1587,13 @@ class SdGridMaterial {
1588
1587
  return;
1589
1588
  }
1590
1589
  if (column.transform) {
1591
- obj[column.field] = column.transform(item[column.field], item);
1590
+ const transform = column.transform(item[column.field], item);
1591
+ if (transform instanceof Promise) {
1592
+ obj[column.field] = yield transform;
1593
+ }
1594
+ else {
1595
+ obj[column.field] = transform;
1596
+ }
1592
1597
  }
1593
1598
  else if (item[column.field] === undefined || item[column.field] === null || item[column.field] === '') {
1594
1599
  obj[column.field] = '';
@@ -2639,7 +2644,7 @@ class SdSelectionActionFilterPipe {
2639
2644
  if ('children' in action) {
2640
2645
  const children = [];
2641
2646
  for (const childAction of action.children) {
2642
- const key = hash__default(childAction);
2647
+ const key = hash(childAction);
2643
2648
  if (selectedItems.every(e => e.actions.includes(key))) {
2644
2649
  children.push(childAction);
2645
2650
  }
@@ -2649,7 +2654,7 @@ class SdSelectionActionFilterPipe {
2649
2654
  }
2650
2655
  }
2651
2656
  else {
2652
- const key = hash__default(action);
2657
+ const key = hash(action);
2653
2658
  if (selectedItems.every(e => e.actions.includes(key))) {
2654
2659
  results.push(action);
2655
2660
  }
@@ -2682,7 +2687,7 @@ class SdSelectionDisablePipe {
2682
2687
  const availableActions = actions.filter(action => {
2683
2688
  if ('children' in action) {
2684
2689
  for (const childAction of action.children) {
2685
- const key = hash__default(childAction);
2690
+ const key = hash(childAction);
2686
2691
  if (selectedItems.every(e => e.actions.includes(key))) {
2687
2692
  return true;
2688
2693
  }
@@ -2690,7 +2695,7 @@ class SdSelectionDisablePipe {
2690
2695
  return false;
2691
2696
  }
2692
2697
  else {
2693
- const key = hash__default(action);
2698
+ const key = hash(action);
2694
2699
  return selectedItems.every(e => e.actions.includes(key));
2695
2700
  }
2696
2701
  });
@@ -2698,13 +2703,13 @@ class SdSelectionDisablePipe {
2698
2703
  for (const action of availableActions) {
2699
2704
  if ('children' in action) {
2700
2705
  for (const childAction of action.children) {
2701
- if (rowData.actions.includes(hash__default(childAction))) {
2706
+ if (rowData.actions.includes(hash(childAction))) {
2702
2707
  return false;
2703
2708
  }
2704
2709
  }
2705
2710
  }
2706
2711
  else {
2707
- if (rowData.actions.includes(hash__default(action))) {
2712
+ if (rowData.actions.includes(hash(action))) {
2708
2713
  return false;
2709
2714
  }
2710
2715
  }
@@ -2760,7 +2765,7 @@ class SdGeneratedColumnService {
2760
2765
  if (!(configuration === null || configuration === void 0 ? void 0 : configuration.key)) {
2761
2766
  return null;
2762
2767
  }
2763
- const key = hash__default({
2768
+ const key = hash({
2764
2769
  prefix: '260f5e94-5865-4425-8ced-b9c083c390dd',
2765
2770
  key: configuration.key
2766
2771
  });
@@ -2789,7 +2794,7 @@ class SdGeneratedColumnService {
2789
2794
  if (!(configuration === null || configuration === void 0 ? void 0 : configuration.systemColumn)) {
2790
2795
  return null;
2791
2796
  }
2792
- const key = hash__default({
2797
+ const key = hash({
2793
2798
  prefix: '8b8050ca-1f44-4860-bad3-20e646c0d68f',
2794
2799
  key: configuration.key
2795
2800
  });
@@ -3004,7 +3009,7 @@ class SdEditorHandlerRowPipe {
3004
3009
  }
3005
3010
  // const { sdId, editorHandlerColumn, ...remain } = item;
3006
3011
  const { sdId, editorHandlerColumn, expandDetail, isExpanded, isExpanding, isSelected, sdGroup, selectable, actions, groupedActions, originItem, editorErrorMessage, editorHandlerRow } = item, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "groupedActions", "originItem", "editorErrorMessage", "editorHandlerRow"]);
3007
- item.sdId = hash__default(remain);
3012
+ item.sdId = hash(remain);
3008
3013
  item.editorHandlerColumn = item.editorHandlerColumn || {};
3009
3014
  const { columns } = gridOption;
3010
3015
  for (const col of columns) {
@@ -3158,7 +3163,7 @@ class SdSelectionVisiblePipe {
3158
3163
  let hasGroup = false;
3159
3164
  for (const childAction of action.children) {
3160
3165
  const { hidden, isGrouped } = childAction;
3161
- const key = hash__default(childAction);
3166
+ const key = hash(childAction);
3162
3167
  if (isGrouped) {
3163
3168
  hasGroup = true;
3164
3169
  }
@@ -3180,15 +3185,15 @@ class SdSelectionVisiblePipe {
3180
3185
  }
3181
3186
  }
3182
3187
  if (flag) {
3183
- rowData.actions.push(hash__default(action));
3188
+ rowData.actions.push(hash(action));
3184
3189
  if (hasGroup) {
3185
- groupedActions.push(hash__default(action));
3190
+ groupedActions.push(hash(action));
3186
3191
  }
3187
3192
  }
3188
3193
  }
3189
3194
  else {
3190
3195
  const { hidden, isGrouped } = action;
3191
- const key = hash__default(action);
3196
+ const key = hash(action);
3192
3197
  if (typeof (hidden) === 'function') {
3193
3198
  if (!hidden(rowData)) {
3194
3199
  rowData.actions.push(key);
@@ -3429,7 +3434,7 @@ class SdGroupPipe {
3429
3434
  for (const field of fields) {
3430
3435
  obj = Object.assign(Object.assign({}, obj), ((_a = item[field]) !== null && _a !== void 0 ? _a : { [field]: item[field] }));
3431
3436
  }
3432
- const key = hash__default(obj);
3437
+ const key = hash(obj);
3433
3438
  if (!groupItem[key]) {
3434
3439
  groupItem[key] = [];
3435
3440
  }