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