@smartsoft001/crud-shell-angular 1.1.691 → 1.1.692

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.
@@ -2200,25 +2200,21 @@
2200
2200
  this.baseInstance.listOptions = this.listOptions;
2201
2201
  };
2202
2202
  ListComponent.prototype.ngOnInit = function () {
2203
- var _a, _b, _c, _d, _e, _f, _g, _h;
2203
+ var _a, _b;
2204
2204
  return __awaiter(this, void 0, void 0, function () {
2205
- var newFilter, endButtons, compiledComponents, _j, _k;
2205
+ var newFilter, endButtons, compiledComponents, _f, _g;
2206
2206
  var _this = this;
2207
- return __generator(this, function (_l) {
2208
- switch (_l.label) {
2207
+ return __generator(this, function (_h) {
2208
+ switch (_h.label) {
2209
2209
  case 0: return [4 /*yield*/, this.pageService.checkPermissions()];
2210
2210
  case 1:
2211
- _l.sent();
2211
+ _h.sent();
2212
2212
  newFilter = null;
2213
2213
  if (((_a = this.config.list) === null || _a === void 0 ? void 0 : _a.resetQuery) === 'beforeInit') {
2214
2214
  newFilter = Object.assign({ query: this.config.baseQuery ? __spreadArray([], __read(this.config.baseQuery)) : [], paginationMode: this.config.list.paginationMode, limit: this.config.pagination ? this.config.pagination.limit : null, offset: this.config.pagination ? 0 : null, sortBy: this.config.sort ? this.config.sort["default"] : null, sortDesc: this.config.sort ? this.config.sort["defaultDesc"] : null }, this.searchService.filter);
2215
2215
  }
2216
2216
  else {
2217
- newFilter = Object.assign({ paginationMode: this.config.list.paginationMode, limit: ((_b = this.searchService.filter) === null || _b === void 0 ? void 0 : _b.limit) ? this.searchService.filter.limit : this.config.pagination
2218
- ? this.config.pagination.limit : null, offset: ((_c = this.searchService.filter) === null || _c === void 0 ? void 0 : _c.offset) || ((_d = this.searchService.filter) === null || _d === void 0 ? void 0 : _d.offset) === 0
2219
- ? this.searchService.filter.offset : this.config.pagination ? 0 : null, sortBy: ((_e = this.searchService.filter) === null || _e === void 0 ? void 0 : _e.sortBy) ? this.searchService.filter.sortBy : this.config.sort
2220
- ? this.config.sort["default"] : null, sortDesc: ((_f = this.searchService.filter) === null || _f === void 0 ? void 0 : _f.sortDesc) ? this.searchService.filter.sortDesc : this.config.sort
2221
- ? this.config.sort["defaultDesc"] : null, query: ((_g = this.searchService.filter) === null || _g === void 0 ? void 0 : _g.query) ? this.searchService : [] }, this.searchService.filter);
2217
+ newFilter = this.filter;
2222
2218
  }
2223
2219
  if (!this.searchService.filter || !___namespace.isEqual(newFilter, this.filter)) {
2224
2220
  this.facade.read(newFilter);
@@ -2253,17 +2249,17 @@
2253
2249
  : []))),
2254
2250
  })];
2255
2251
  case 2:
2256
- compiledComponents = _l.sent();
2257
- _j = this;
2258
- _k = {
2252
+ compiledComponents = _h.sent();
2253
+ _f = this;
2254
+ _g = {
2259
2255
  provider: {
2260
2256
  getData: function (filter) {
2261
2257
  var global = Object.assign(Object.assign({}, _this.filter), filter);
2262
2258
  _this.facade.read(global);
2263
2259
  },
2264
2260
  onChangeMultiSelected: function (list) { return __awaiter(_this, void 0, void 0, function () {
2265
- return __generator(this, function (_j) {
2266
- switch (_j.label) {
2261
+ return __generator(this, function (_f) {
2262
+ switch (_f.label) {
2267
2263
  case 0:
2268
2264
  if (!(list.length && !this.menuService.openedEnd)) return [3 /*break*/, 2];
2269
2265
  return [4 /*yield*/, this.menuService.openEnd({
@@ -2271,14 +2267,14 @@
2271
2267
  component: MultiselectComponent,
2272
2268
  })];
2273
2269
  case 1:
2274
- _j.sent();
2270
+ _f.sent();
2275
2271
  return [3 /*break*/, 4];
2276
2272
  case 2:
2277
2273
  if (!(!list.length && this.menuService.openedEnd)) return [3 /*break*/, 4];
2278
2274
  return [4 /*yield*/, this.menuService.closeEnd()];
2279
2275
  case 3:
2280
- _j.sent();
2281
- _j.label = 4;
2276
+ _f.sent();
2277
+ _f.label = 4;
2282
2278
  case 4:
2283
2279
  this.facade.multiSelect(list);
2284
2280
  return [2 /*return*/];
@@ -2289,7 +2285,7 @@
2289
2285
  loading$: this.facade.loaded$.pipe(operators.map(function (l) { return !l; })),
2290
2286
  },
2291
2287
  cellPipe: this.config.list ? this.config.list.cellPipe : null,
2292
- mode: (_h = this.config.list) === null || _h === void 0 ? void 0 : _h.mode,
2288
+ mode: (_b = this.config.list) === null || _b === void 0 ? void 0 : _b.mode,
2293
2289
  type: this.config.type,
2294
2290
  details: this.config.details
2295
2291
  ? {
@@ -2345,9 +2341,9 @@
2345
2341
  },
2346
2342
  })];
2347
2343
  case 3:
2348
- _j.listOptions = (_k.pagination = _l.sent(),
2349
- _k.sort = this.config.sort,
2350
- _k);
2344
+ _f.listOptions = (_g.pagination = _h.sent(),
2345
+ _g.sort = this.config.sort,
2346
+ _g);
2351
2347
  this.cd.detectChanges();
2352
2348
  this.initCloseMenu();
2353
2349
  this.initTopComponent(compiledComponents);
@@ -2360,11 +2356,11 @@
2360
2356
  ListComponent.prototype.initCloseMenu = function () {
2361
2357
  var _this = this;
2362
2358
  this.router.events.pipe(this.takeUntilDestroy).subscribe(function () { return __awaiter(_this, void 0, void 0, function () {
2363
- return __generator(this, function (_j) {
2364
- switch (_j.label) {
2359
+ return __generator(this, function (_f) {
2360
+ switch (_f.label) {
2365
2361
  case 0: return [4 /*yield*/, this.clear()];
2366
2362
  case 1:
2367
- _j.sent();
2363
+ _f.sent();
2368
2364
  return [2 /*return*/];
2369
2365
  }
2370
2366
  });
@@ -2372,11 +2368,11 @@
2372
2368
  };
2373
2369
  ListComponent.prototype.clear = function () {
2374
2370
  return __awaiter(this, void 0, void 0, function () {
2375
- return __generator(this, function (_j) {
2376
- switch (_j.label) {
2371
+ return __generator(this, function (_f) {
2372
+ switch (_f.label) {
2377
2373
  case 0: return [4 /*yield*/, this.menuService.closeEnd()];
2378
2374
  case 1:
2379
- _j.sent();
2375
+ _f.sent();
2380
2376
  this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: null });
2381
2377
  this.facade.multiSelect([]);
2382
2378
  return [2 /*return*/];
@@ -2401,16 +2397,16 @@
2401
2397
  icon: "checkbox-outline",
2402
2398
  text: "multi",
2403
2399
  handler: function () { return __awaiter(_this, void 0, void 0, function () {
2404
- return __generator(this, function (_j) {
2405
- switch (_j.label) {
2400
+ return __generator(this, function (_f) {
2401
+ switch (_f.label) {
2406
2402
  case 0:
2407
2403
  this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: this.listOptions.select === "multi" ? null : "multi" });
2408
2404
  this.facade.multiSelect([]);
2409
2405
  if (!this.menuService.openedEnd) return [3 /*break*/, 2];
2410
2406
  return [4 /*yield*/, this.menuService.closeEnd()];
2411
2407
  case 1:
2412
- _j.sent();
2413
- _j.label = 2;
2408
+ _f.sent();
2409
+ _f.label = 2;
2414
2410
  case 2:
2415
2411
  this.cd.detectChanges();
2416
2412
  return [2 /*return*/];
@@ -2425,14 +2421,14 @@
2425
2421
  icon: "filter-outline",
2426
2422
  text: "filters",
2427
2423
  handler: function () { return __awaiter(_this, void 0, void 0, function () {
2428
- return __generator(this, function (_j) {
2429
- switch (_j.label) {
2424
+ return __generator(this, function (_f) {
2425
+ switch (_f.label) {
2430
2426
  case 0: return [4 /*yield*/, this.menuService.openEnd({
2431
2427
  injector: this.injector,
2432
2428
  component: FiltersComponent,
2433
2429
  })];
2434
2430
  case 1:
2435
- _j.sent();
2431
+ _f.sent();
2436
2432
  return [2 /*return*/];
2437
2433
  }
2438
2434
  });