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