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