@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.
- package/bundles/smartsoft001-crud-shell-angular.umd.js +31 -35
- package/bundles/smartsoft001-crud-shell-angular.umd.js.map +1 -1
- package/esm2015/lib/pages/list/list.component.js +4 -8
- package/fesm2015/smartsoft001-crud-shell-angular.js +3 -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,25 +2200,21 @@
|
|
|
2200
2200
|
this.baseInstance.listOptions = this.listOptions;
|
|
2201
2201
|
};
|
|
2202
2202
|
ListComponent.prototype.ngOnInit = function () {
|
|
2203
|
-
var _a, _b
|
|
2203
|
+
var _a, _b;
|
|
2204
2204
|
return __awaiter(this, void 0, void 0, function () {
|
|
2205
|
-
var newFilter, endButtons, compiledComponents,
|
|
2205
|
+
var newFilter, endButtons, compiledComponents, _f, _g;
|
|
2206
2206
|
var _this = this;
|
|
2207
|
-
return __generator(this, function (
|
|
2208
|
-
switch (
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
2257
|
-
|
|
2258
|
-
|
|
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 (
|
|
2266
|
-
switch (
|
|
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
|
-
|
|
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
|
-
|
|
2281
|
-
|
|
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: (
|
|
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
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
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 (
|
|
2364
|
-
switch (
|
|
2359
|
+
return __generator(this, function (_f) {
|
|
2360
|
+
switch (_f.label) {
|
|
2365
2361
|
case 0: return [4 /*yield*/, this.clear()];
|
|
2366
2362
|
case 1:
|
|
2367
|
-
|
|
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 (
|
|
2376
|
-
switch (
|
|
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
|
-
|
|
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 (
|
|
2405
|
-
switch (
|
|
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
|
-
|
|
2413
|
-
|
|
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 (
|
|
2429
|
-
switch (
|
|
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
|
-
|
|
2431
|
+
_f.sent();
|
|
2436
2432
|
return [2 /*return*/];
|
|
2437
2433
|
}
|
|
2438
2434
|
});
|