@sd-angular/core 1.1.51 → 1.1.52

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.
@@ -2490,7 +2490,8 @@
2490
2490
  this.onSelectAll = function () {
2491
2491
  var _a, _b, _c;
2492
2492
  (_a = _this.items) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {
2493
- if (e.selectable) {
2493
+ var _a;
2494
+ if (e.selectable && ((_a = e.actions) === null || _a === void 0 ? void 0 : _a.length)) {
2494
2495
  e.isSelected = _this.isSelectAll;
2495
2496
  }
2496
2497
  });
@@ -3711,10 +3712,10 @@
3711
3712
  function SdSelectionVisibleSelectAllPipe() {
3712
3713
  var _this = this;
3713
3714
  this.transform = function (items, selection) { return __awaiter(_this, void 0, void 0, function () {
3714
- var actions, first, _loop_1, _a, _b, action, state_1;
3715
- var e_1, _c;
3716
- return __generator(this, function (_d) {
3717
- switch (_d.label) {
3715
+ var actions, first, _loop_1, _b, _c, action, state_1;
3716
+ var e_1, _d;
3717
+ return __generator(this, function (_e) {
3718
+ switch (_e.label) {
3718
3719
  case 0:
3719
3720
  actions = selection.actions;
3720
3721
  if (!(actions === null || actions === void 0 ? void 0 : actions.length)) {
@@ -3728,16 +3729,16 @@
3728
3729
  }
3729
3730
  return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 500); })];
3730
3731
  case 1:
3731
- _d.sent();
3732
- first = items[0];
3732
+ _e.sent();
3733
+ first = items.find(function (t) { var _a; return (_a = t.actions) === null || _a === void 0 ? void 0 : _a.length; });
3733
3734
  _loop_1 = function (action) {
3734
- if (items.every(function (e) { return e.actions.includes(action); })) {
3735
+ if (items.filter(function (t) { var _a; return (_a = t.actions) === null || _a === void 0 ? void 0 : _a.length; }).every(function (e) { return e.actions.includes(action); })) {
3735
3736
  return { value: true };
3736
3737
  }
3737
3738
  };
3738
3739
  try {
3739
- for (_a = __values(first.actions), _b = _a.next(); !_b.done; _b = _a.next()) {
3740
- action = _b.value;
3740
+ for (_b = __values(first.actions), _c = _b.next(); !_c.done; _c = _b.next()) {
3741
+ action = _c.value;
3741
3742
  state_1 = _loop_1(action);
3742
3743
  if (typeof state_1 === "object")
3743
3744
  return [2 /*return*/, state_1.value];
@@ -3746,7 +3747,7 @@
3746
3747
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
3747
3748
  finally {
3748
3749
  try {
3749
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
3750
+ if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
3750
3751
  }
3751
3752
  finally { if (e_1) throw e_1.error; }
3752
3753
  }