@smartsoft001/crud-shell-angular 1.1.693 → 1.1.697

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.
@@ -1670,7 +1670,11 @@
1670
1670
  }
1671
1671
  if (filter && filter.query) {
1672
1672
  filter.query.forEach(function (q) {
1673
- if (q.value && (typeof q.value === 'string') && q.value[0] !== "'" && q.value[0] !== '"') {
1673
+ if (q.value
1674
+ && (typeof q.value === 'string')
1675
+ && q.value.match(/^-?\d+$/)
1676
+ && q.value[0] !== "'"
1677
+ && q.value[0] !== '"') {
1674
1678
  query += "&" + q.key + q.type + ("'" + q.value + "'");
1675
1679
  }
1676
1680
  else {
@@ -2200,15 +2204,15 @@
2200
2204
  this.baseInstance.listOptions = this.listOptions;
2201
2205
  };
2202
2206
  ListComponent.prototype.ngOnInit = function () {
2203
- var _a, _b, _c, _d, _e, _f, _g, _h;
2207
+ var _a, _b, _c, _d, _e, _f, _g;
2204
2208
  return __awaiter(this, void 0, void 0, function () {
2205
- var newFilter, endButtons, compiledComponents, _j, _k;
2209
+ var newFilter, endButtons, compiledComponents, _h, _j;
2206
2210
  var _this = this;
2207
- return __generator(this, function (_l) {
2208
- switch (_l.label) {
2211
+ return __generator(this, function (_k) {
2212
+ switch (_k.label) {
2209
2213
  case 0: return [4 /*yield*/, this.pageService.checkPermissions()];
2210
2214
  case 1:
2211
- _l.sent();
2215
+ _k.sent();
2212
2216
  newFilter = null;
2213
2217
  if (((_a = this.config.list) === null || _a === void 0 ? void 0 : _a.resetQuery) === 'beforeInit') {
2214
2218
  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);
@@ -2221,7 +2225,7 @@
2221
2225
  ? 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
2222
2226
  ? 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
2223
2227
  ? 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
2224
- ? this.config.sort["defaultDesc"] : null, query: ((_g = this.searchService.filter) === null || _g === void 0 ? void 0 : _g.query) ? this.searchService.filter : [] }, this.searchService.filter);
2228
+ ? this.config.sort["defaultDesc"] : null, query: this.config.baseQuery ? __spreadArray([], __read(this.config.baseQuery)) : [] }, this.searchService.filter);
2225
2229
  }
2226
2230
  this.facade.read(newFilter);
2227
2231
  endButtons = this.getEndButtons();
@@ -2254,17 +2258,17 @@
2254
2258
  : []))),
2255
2259
  })];
2256
2260
  case 2:
2257
- compiledComponents = _l.sent();
2258
- _j = this;
2259
- _k = {
2261
+ compiledComponents = _k.sent();
2262
+ _h = this;
2263
+ _j = {
2260
2264
  provider: {
2261
2265
  getData: function (filter) {
2262
2266
  var global = Object.assign(Object.assign({}, _this.filter), filter);
2263
2267
  _this.facade.read(global);
2264
2268
  },
2265
2269
  onChangeMultiSelected: function (list) { return __awaiter(_this, void 0, void 0, function () {
2266
- return __generator(this, function (_j) {
2267
- switch (_j.label) {
2270
+ return __generator(this, function (_h) {
2271
+ switch (_h.label) {
2268
2272
  case 0:
2269
2273
  if (!(list.length && !this.menuService.openedEnd)) return [3 /*break*/, 2];
2270
2274
  return [4 /*yield*/, this.menuService.openEnd({
@@ -2272,14 +2276,14 @@
2272
2276
  component: MultiselectComponent,
2273
2277
  })];
2274
2278
  case 1:
2275
- _j.sent();
2279
+ _h.sent();
2276
2280
  return [3 /*break*/, 4];
2277
2281
  case 2:
2278
2282
  if (!(!list.length && this.menuService.openedEnd)) return [3 /*break*/, 4];
2279
2283
  return [4 /*yield*/, this.menuService.closeEnd()];
2280
2284
  case 3:
2281
- _j.sent();
2282
- _j.label = 4;
2285
+ _h.sent();
2286
+ _h.label = 4;
2283
2287
  case 4:
2284
2288
  this.facade.multiSelect(list);
2285
2289
  return [2 /*return*/];
@@ -2290,7 +2294,7 @@
2290
2294
  loading$: this.facade.loaded$.pipe(operators.map(function (l) { return !l; })),
2291
2295
  },
2292
2296
  cellPipe: this.config.list ? this.config.list.cellPipe : null,
2293
- mode: (_h = this.config.list) === null || _h === void 0 ? void 0 : _h.mode,
2297
+ mode: (_g = this.config.list) === null || _g === void 0 ? void 0 : _g.mode,
2294
2298
  type: this.config.type,
2295
2299
  details: this.config.details
2296
2300
  ? {
@@ -2346,9 +2350,9 @@
2346
2350
  },
2347
2351
  })];
2348
2352
  case 3:
2349
- _j.listOptions = (_k.pagination = _l.sent(),
2350
- _k.sort = this.config.sort,
2351
- _k);
2353
+ _h.listOptions = (_j.pagination = _k.sent(),
2354
+ _j.sort = this.config.sort,
2355
+ _j);
2352
2356
  this.cd.detectChanges();
2353
2357
  this.initCloseMenu();
2354
2358
  this.initTopComponent(compiledComponents);
@@ -2361,11 +2365,11 @@
2361
2365
  ListComponent.prototype.initCloseMenu = function () {
2362
2366
  var _this = this;
2363
2367
  this.router.events.pipe(this.takeUntilDestroy).subscribe(function () { return __awaiter(_this, void 0, void 0, function () {
2364
- return __generator(this, function (_j) {
2365
- switch (_j.label) {
2368
+ return __generator(this, function (_h) {
2369
+ switch (_h.label) {
2366
2370
  case 0: return [4 /*yield*/, this.clear()];
2367
2371
  case 1:
2368
- _j.sent();
2372
+ _h.sent();
2369
2373
  return [2 /*return*/];
2370
2374
  }
2371
2375
  });
@@ -2373,11 +2377,11 @@
2373
2377
  };
2374
2378
  ListComponent.prototype.clear = function () {
2375
2379
  return __awaiter(this, void 0, void 0, function () {
2376
- return __generator(this, function (_j) {
2377
- switch (_j.label) {
2380
+ return __generator(this, function (_h) {
2381
+ switch (_h.label) {
2378
2382
  case 0: return [4 /*yield*/, this.menuService.closeEnd()];
2379
2383
  case 1:
2380
- _j.sent();
2384
+ _h.sent();
2381
2385
  this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: null });
2382
2386
  this.facade.multiSelect([]);
2383
2387
  return [2 /*return*/];
@@ -2402,16 +2406,16 @@
2402
2406
  icon: "checkbox-outline",
2403
2407
  text: "multi",
2404
2408
  handler: function () { return __awaiter(_this, void 0, void 0, function () {
2405
- return __generator(this, function (_j) {
2406
- switch (_j.label) {
2409
+ return __generator(this, function (_h) {
2410
+ switch (_h.label) {
2407
2411
  case 0:
2408
2412
  this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: this.listOptions.select === "multi" ? null : "multi" });
2409
2413
  this.facade.multiSelect([]);
2410
2414
  if (!this.menuService.openedEnd) return [3 /*break*/, 2];
2411
2415
  return [4 /*yield*/, this.menuService.closeEnd()];
2412
2416
  case 1:
2413
- _j.sent();
2414
- _j.label = 2;
2417
+ _h.sent();
2418
+ _h.label = 2;
2415
2419
  case 2:
2416
2420
  this.cd.detectChanges();
2417
2421
  return [2 /*return*/];
@@ -2426,14 +2430,14 @@
2426
2430
  icon: "filter-outline",
2427
2431
  text: "filters",
2428
2432
  handler: function () { return __awaiter(_this, void 0, void 0, function () {
2429
- return __generator(this, function (_j) {
2430
- switch (_j.label) {
2433
+ return __generator(this, function (_h) {
2434
+ switch (_h.label) {
2431
2435
  case 0: return [4 /*yield*/, this.menuService.openEnd({
2432
2436
  injector: this.injector,
2433
2437
  component: FiltersComponent,
2434
2438
  })];
2435
2439
  case 1:
2436
- _j.sent();
2440
+ _h.sent();
2437
2441
  return [2 /*return*/];
2438
2442
  }
2439
2443
  });