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