@smartsoft001/crud-shell-angular 1.1.686 → 1.1.688
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 +32 -34
- package/bundles/smartsoft001-crud-shell-angular.umd.js.map +1 -1
- package/esm2015/lib/pages/list/list.component.js +5 -7
- package/fesm2015/smartsoft001-crud-shell-angular.js +4 -6
- 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,23 +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, _c, _d, _e, _f, _g;
|
|
2204
2204
|
return __awaiter(this, void 0, void 0, function () {
|
|
2205
|
-
var endButtons, compiledComponents,
|
|
2205
|
+
var endButtons, compiledComponents, _h, _j;
|
|
2206
2206
|
var _this = this;
|
|
2207
|
-
return __generator(this, function (
|
|
2208
|
-
switch (
|
|
2207
|
+
return __generator(this, function (_k) {
|
|
2208
|
+
switch (_k.label) {
|
|
2209
2209
|
case 0: return [4 /*yield*/, this.pageService.checkPermissions()];
|
|
2210
2210
|
case 1:
|
|
2211
|
-
|
|
2211
|
+
_k.sent();
|
|
2212
2212
|
if (((_a = this.config.list) === null || _a === void 0 ? void 0 : _a.resetQuery) === 'beforeInit') {
|
|
2213
2213
|
this.facade.read(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));
|
|
2214
2214
|
}
|
|
2215
|
-
else if (!this.searchService.filter) {
|
|
2216
|
-
this.facade.read(Object.assign({ 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));
|
|
2217
|
-
}
|
|
2218
2215
|
else {
|
|
2219
|
-
this.facade.read(Object.assign({
|
|
2216
|
+
this.facade.read(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 ? 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
|
|
2217
|
+
? 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));
|
|
2220
2218
|
}
|
|
2221
2219
|
endButtons = this.getEndButtons();
|
|
2222
2220
|
this.pageOptions = {
|
|
@@ -2248,17 +2246,17 @@
|
|
|
2248
2246
|
: []))),
|
|
2249
2247
|
})];
|
|
2250
2248
|
case 2:
|
|
2251
|
-
compiledComponents =
|
|
2252
|
-
|
|
2253
|
-
|
|
2249
|
+
compiledComponents = _k.sent();
|
|
2250
|
+
_h = this;
|
|
2251
|
+
_j = {
|
|
2254
2252
|
provider: {
|
|
2255
2253
|
getData: function (filter) {
|
|
2256
2254
|
var global = Object.assign(Object.assign({}, _this.filter), filter);
|
|
2257
2255
|
_this.facade.read(global);
|
|
2258
2256
|
},
|
|
2259
2257
|
onChangeMultiSelected: function (list) { return __awaiter(_this, void 0, void 0, function () {
|
|
2260
|
-
return __generator(this, function (
|
|
2261
|
-
switch (
|
|
2258
|
+
return __generator(this, function (_h) {
|
|
2259
|
+
switch (_h.label) {
|
|
2262
2260
|
case 0:
|
|
2263
2261
|
if (!(list.length && !this.menuService.openedEnd)) return [3 /*break*/, 2];
|
|
2264
2262
|
return [4 /*yield*/, this.menuService.openEnd({
|
|
@@ -2266,14 +2264,14 @@
|
|
|
2266
2264
|
component: MultiselectComponent,
|
|
2267
2265
|
})];
|
|
2268
2266
|
case 1:
|
|
2269
|
-
|
|
2267
|
+
_h.sent();
|
|
2270
2268
|
return [3 /*break*/, 4];
|
|
2271
2269
|
case 2:
|
|
2272
2270
|
if (!(!list.length && this.menuService.openedEnd)) return [3 /*break*/, 4];
|
|
2273
2271
|
return [4 /*yield*/, this.menuService.closeEnd()];
|
|
2274
2272
|
case 3:
|
|
2275
|
-
|
|
2276
|
-
|
|
2273
|
+
_h.sent();
|
|
2274
|
+
_h.label = 4;
|
|
2277
2275
|
case 4:
|
|
2278
2276
|
this.facade.multiSelect(list);
|
|
2279
2277
|
return [2 /*return*/];
|
|
@@ -2284,7 +2282,7 @@
|
|
|
2284
2282
|
loading$: this.facade.loaded$.pipe(operators.map(function (l) { return !l; })),
|
|
2285
2283
|
},
|
|
2286
2284
|
cellPipe: this.config.list ? this.config.list.cellPipe : null,
|
|
2287
|
-
mode: (
|
|
2285
|
+
mode: (_g = this.config.list) === null || _g === void 0 ? void 0 : _g.mode,
|
|
2288
2286
|
type: this.config.type,
|
|
2289
2287
|
details: this.config.details
|
|
2290
2288
|
? {
|
|
@@ -2340,9 +2338,9 @@
|
|
|
2340
2338
|
},
|
|
2341
2339
|
})];
|
|
2342
2340
|
case 3:
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2341
|
+
_h.listOptions = (_j.pagination = _k.sent(),
|
|
2342
|
+
_j.sort = this.config.sort,
|
|
2343
|
+
_j);
|
|
2346
2344
|
this.cd.detectChanges();
|
|
2347
2345
|
this.initCloseMenu();
|
|
2348
2346
|
this.initTopComponent(compiledComponents);
|
|
@@ -2355,11 +2353,11 @@
|
|
|
2355
2353
|
ListComponent.prototype.initCloseMenu = function () {
|
|
2356
2354
|
var _this = this;
|
|
2357
2355
|
this.router.events.pipe(this.takeUntilDestroy).subscribe(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2358
|
-
return __generator(this, function (
|
|
2359
|
-
switch (
|
|
2356
|
+
return __generator(this, function (_h) {
|
|
2357
|
+
switch (_h.label) {
|
|
2360
2358
|
case 0: return [4 /*yield*/, this.clear()];
|
|
2361
2359
|
case 1:
|
|
2362
|
-
|
|
2360
|
+
_h.sent();
|
|
2363
2361
|
return [2 /*return*/];
|
|
2364
2362
|
}
|
|
2365
2363
|
});
|
|
@@ -2367,11 +2365,11 @@
|
|
|
2367
2365
|
};
|
|
2368
2366
|
ListComponent.prototype.clear = function () {
|
|
2369
2367
|
return __awaiter(this, void 0, void 0, function () {
|
|
2370
|
-
return __generator(this, function (
|
|
2371
|
-
switch (
|
|
2368
|
+
return __generator(this, function (_h) {
|
|
2369
|
+
switch (_h.label) {
|
|
2372
2370
|
case 0: return [4 /*yield*/, this.menuService.closeEnd()];
|
|
2373
2371
|
case 1:
|
|
2374
|
-
|
|
2372
|
+
_h.sent();
|
|
2375
2373
|
this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: null });
|
|
2376
2374
|
this.facade.multiSelect([]);
|
|
2377
2375
|
return [2 /*return*/];
|
|
@@ -2396,16 +2394,16 @@
|
|
|
2396
2394
|
icon: "checkbox-outline",
|
|
2397
2395
|
text: "multi",
|
|
2398
2396
|
handler: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2399
|
-
return __generator(this, function (
|
|
2400
|
-
switch (
|
|
2397
|
+
return __generator(this, function (_h) {
|
|
2398
|
+
switch (_h.label) {
|
|
2401
2399
|
case 0:
|
|
2402
2400
|
this.listOptions = Object.assign(Object.assign({}, this.listOptions), { select: this.listOptions.select === "multi" ? null : "multi" });
|
|
2403
2401
|
this.facade.multiSelect([]);
|
|
2404
2402
|
if (!this.menuService.openedEnd) return [3 /*break*/, 2];
|
|
2405
2403
|
return [4 /*yield*/, this.menuService.closeEnd()];
|
|
2406
2404
|
case 1:
|
|
2407
|
-
|
|
2408
|
-
|
|
2405
|
+
_h.sent();
|
|
2406
|
+
_h.label = 2;
|
|
2409
2407
|
case 2:
|
|
2410
2408
|
this.cd.detectChanges();
|
|
2411
2409
|
return [2 /*return*/];
|
|
@@ -2420,14 +2418,14 @@
|
|
|
2420
2418
|
icon: "filter-outline",
|
|
2421
2419
|
text: "filters",
|
|
2422
2420
|
handler: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2423
|
-
return __generator(this, function (
|
|
2424
|
-
switch (
|
|
2421
|
+
return __generator(this, function (_h) {
|
|
2422
|
+
switch (_h.label) {
|
|
2425
2423
|
case 0: return [4 /*yield*/, this.menuService.openEnd({
|
|
2426
2424
|
injector: this.injector,
|
|
2427
2425
|
component: FiltersComponent,
|
|
2428
2426
|
})];
|
|
2429
2427
|
case 1:
|
|
2430
|
-
|
|
2428
|
+
_h.sent();
|
|
2431
2429
|
return [2 /*return*/];
|
|
2432
2430
|
}
|
|
2433
2431
|
});
|