@recursyve/nice-data-filter-kit 12.1.30 → 13.0.0
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/_index.scss +1 -7
- package/{esm2015/lib/api/dto/saved-reports.dto.js → esm2020/lib/api/dto/saved-reports.dto.mjs} +0 -0
- package/esm2020/lib/api/filter.api.mjs +51 -0
- package/{esm2015/lib/api/models/saved-reports.model.js → esm2020/lib/api/models/saved-reports.model.mjs} +0 -0
- package/{esm2015/lib/api/public-api.js → esm2020/lib/api/public-api.mjs} +0 -0
- package/esm2020/lib/api/saved-report.api.mjs +48 -0
- package/esm2020/lib/components/base-list/base-list.component.mjs +288 -0
- package/{esm2015/lib/components/base-list/base-list.constant.js → esm2020/lib/components/base-list/base-list.constant.mjs} +0 -0
- package/esm2020/lib/components/base-list/base-list.module.mjs +171 -0
- package/{esm2015/lib/components/base-list/directives/base-list-buttons.directive.js → esm2020/lib/components/base-list/directives/base-list-buttons.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/directives/base-list-cards.directive.js → esm2020/lib/components/base-list/directives/base-list-cards.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/directives/base-list-custom-content.directive.js → esm2020/lib/components/base-list/directives/base-list-custom-content.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/directives/base-list-directives.module.js → esm2020/lib/components/base-list/directives/base-list-directives.module.mjs} +4 -4
- package/{esm2015/lib/components/base-list/directives/base-list-filters.directive.js → esm2020/lib/components/base-list/directives/base-list-filters.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/directives/base-list-table.directive.js → esm2020/lib/components/base-list/directives/base-list-table.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/directives/base-list-title.directive.js → esm2020/lib/components/base-list/directives/base-list-title.directive.mjs} +3 -3
- package/{esm2015/lib/components/base-list/models/columns.model.js → esm2020/lib/components/base-list/models/columns.model.mjs} +0 -0
- package/{esm2015/lib/components/base-list/models/export.model.js → esm2020/lib/components/base-list/models/export.model.mjs} +0 -0
- package/esm2020/lib/components/base-list/models/layout.model.mjs +149 -0
- package/esm2020/lib/components/base-list/providers/base-filter.service.mjs +34 -0
- package/{esm2015/lib/components/base-list/providers/base-list-saved-report.service.js → esm2020/lib/components/base-list/providers/base-list-saved-report.service.mjs} +3 -3
- package/{esm2015/lib/components/base-list/public-api.js → esm2020/lib/components/base-list/public-api.mjs} +0 -0
- package/esm2020/lib/components/base-list/store/base-list.query.mjs +35 -0
- package/esm2020/lib/components/base-list/store/base-list.service.mjs +341 -0
- package/esm2020/lib/components/base-list/store/base-list.store.mjs +81 -0
- package/{esm2015/lib/components/multi-state-list/models/list-states.model.js → esm2020/lib/components/multi-state-list/models/list-states.model.mjs} +0 -0
- package/esm2020/lib/components/multi-state-list/multi-state-list.component.mjs +71 -0
- package/{esm2015/lib/components/multi-state-list/multi-state-list.constant.js → esm2020/lib/components/multi-state-list/multi-state-list.constant.mjs} +0 -0
- package/{esm2015/lib/components/multi-state-list/multi-state-list.module.js → esm2020/lib/components/multi-state-list/multi-state-list.module.mjs} +6 -14
- package/{esm2015/lib/components/multi-state-list/providers/multi-state-filter.service.js → esm2020/lib/components/multi-state-list/providers/multi-state-filter.service.mjs} +0 -0
- package/{esm2015/lib/components/multi-state-list/public-api.js → esm2020/lib/components/multi-state-list/public-api.mjs} +0 -0
- package/{esm2015/lib/components/multi-state-list/store/multi-state-list.query.js → esm2020/lib/components/multi-state-list/store/multi-state-list.query.mjs} +3 -3
- package/{esm2015/lib/components/multi-state-list/store/multi-state-list.service.js → esm2020/lib/components/multi-state-list/store/multi-state-list.service.mjs} +5 -6
- package/esm2020/lib/components/multi-state-list/store/multi-state-list.store.mjs +24 -0
- package/{esm2015/lib/components/public-api.js → esm2020/lib/components/public-api.mjs} +0 -0
- package/esm2020/lib/components/query-builder/filter-selection/filter-selection.component.mjs +41 -0
- package/{esm2015/lib/components/query-builder/pipes/filter-group-icon.pipe.js → esm2020/lib/components/query-builder/pipes/filter-group-icon.pipe.mjs} +3 -3
- package/{esm2015/lib/components/query-builder/providers/filter-group.service.js → esm2020/lib/components/query-builder/providers/filter-group.service.mjs} +0 -0
- package/{esm2015/lib/components/query-builder/public-api.js → esm2020/lib/components/query-builder/public-api.mjs} +0 -0
- package/{esm2015/lib/components/query-builder/query-builder-trigger.directive.js → esm2020/lib/components/query-builder/query-builder-trigger.directive.mjs} +3 -3
- package/esm2020/lib/components/query-builder/query-builder.component.mjs +93 -0
- package/{esm2015/lib/components/query-builder/query-builder.form.js → esm2020/lib/components/query-builder/query-builder.form.mjs} +0 -0
- package/esm2020/lib/components/query-builder/query-builder.module.mjs +116 -0
- package/esm2020/lib/components/query-builder/rule/components/date/date-filter.component.mjs +29 -0
- package/esm2020/lib/components/query-builder/rule/components/filter.component.mjs +45 -0
- package/esm2020/lib/components/query-builder/rule/components/number/number-filter.component.mjs +28 -0
- package/esm2020/lib/components/query-builder/rule/components/radio/radio-filter.component.mjs +30 -0
- package/esm2020/lib/components/query-builder/rule/components/select/select-filter.component.mjs +83 -0
- package/esm2020/lib/components/query-builder/rule/components/text/text-filter.component.mjs +31 -0
- package/esm2020/lib/components/query-builder/rule/rule.component.mjs +78 -0
- package/{esm2015/lib/components/query-builder/utils/qb-filter.utils.js → esm2020/lib/components/query-builder/utils/qb-filter.utils.mjs} +23 -9
- package/{esm2015/lib/models/filter.model.js → esm2020/lib/models/filter.model.mjs} +0 -0
- package/{esm2015/lib/models/public-api.js → esm2020/lib/models/public-api.mjs} +0 -0
- package/{esm2015/lib/models/query.model.js → esm2020/lib/models/query.model.mjs} +0 -0
- package/{esm2015/lib/utils/date.adapter.js → esm2020/lib/utils/date.adapter.mjs} +3 -3
- package/esm2020/lib/utils/filter.utils.mjs +40 -0
- package/{esm2015/lib/utils/public-api.js → esm2020/lib/utils/public-api.mjs} +0 -0
- package/{esm2015/lib/utils/query-params.utils.js → esm2020/lib/utils/query-params.utils.mjs} +0 -0
- package/{esm2015/lib/utils/string.utils.js → esm2020/lib/utils/string.utils.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/recursyve-nice-data-filter-kit.js → esm2020/recursyve-nice-data-filter-kit.mjs} +0 -0
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +2448 -0
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -0
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +2446 -0
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -0
- package/lib/components/base-list/base-list.module.d.ts +15 -16
- package/lib/components/base-list/models/layout.model.d.ts +0 -4
- package/lib/components/multi-state-list/multi-state-list.module.d.ts +15 -16
- package/lib/components/query-builder/query-builder.module.d.ts +10 -11
- package/lib/components/query-builder/rule/components/filter.component.d.ts +2 -1
- package/package.json +30 -16
- package/src/lib/components/base-list/base-list.theme.scss +5 -5
- package/src/lib/components/query-builder/rule/rule.theme.scss +1 -1
- package/src/lib/nice-data-filter.theme.scss +7 -0
- package/bundles/recursyve-nice-data-filter-kit.umd.js +0 -3173
- package/bundles/recursyve-nice-data-filter-kit.umd.js.map +0 -1
- package/esm2015/lib/api/filter.api.js +0 -52
- package/esm2015/lib/api/saved-report.api.js +0 -49
- package/esm2015/lib/components/base-list/base-list.component.js +0 -297
- package/esm2015/lib/components/base-list/base-list.module.js +0 -180
- package/esm2015/lib/components/base-list/models/layout.model.js +0 -164
- package/esm2015/lib/components/base-list/providers/base-filter.service.js +0 -40
- package/esm2015/lib/components/base-list/store/base-list.query.js +0 -35
- package/esm2015/lib/components/base-list/store/base-list.service.js +0 -330
- package/esm2015/lib/components/base-list/store/base-list.store.js +0 -78
- package/esm2015/lib/components/multi-state-list/multi-state-list.component.js +0 -75
- package/esm2015/lib/components/multi-state-list/store/multi-state-list.store.js +0 -22
- package/esm2015/lib/components/query-builder/filter-selection/filter-selection.component.js +0 -48
- package/esm2015/lib/components/query-builder/query-builder.component.js +0 -100
- package/esm2015/lib/components/query-builder/query-builder.module.js +0 -120
- package/esm2015/lib/components/query-builder/rule/components/date/date-filter.component.js +0 -35
- package/esm2015/lib/components/query-builder/rule/components/filter.component.js +0 -29
- package/esm2015/lib/components/query-builder/rule/components/number/number-filter.component.js +0 -34
- package/esm2015/lib/components/query-builder/rule/components/radio/radio-filter.component.js +0 -36
- package/esm2015/lib/components/query-builder/rule/components/select/select-filter.component.js +0 -94
- package/esm2015/lib/components/query-builder/rule/components/text/text-filter.component.js +0 -37
- package/esm2015/lib/components/query-builder/rule/rule.component.js +0 -86
- package/esm2015/lib/utils/filter.utils.js +0 -41
- package/fesm2015/recursyve-nice-data-filter-kit.js +0 -2503
- package/fesm2015/recursyve-nice-data-filter-kit.js.map +0 -1
|
@@ -1,3173 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@recursyve/nice-ui-kit.v2'), require('@angular/core'), require('@datorama/akita'), require('rxjs'), require('rxjs/operators'), require('@angular/router'), require('@angular/material/bottom-sheet'), require('@angular/flex-layout'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/paginator'), require('@angular/material/card'), require('@angular/forms'), require('@recursyve/ngx-form-generator'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/core'), require('@angular/material/input'), require('ngx-mask'), require('@angular/material/radio'), require('@angular/common'), require('@angular/material/datepicker'), require('@angular/cdk/portal'), require('@angular/material/list'), require('@angular/cdk/overlay'), require('@angular/cdk/platform'), require('@ngx-translate/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/tooltip'), require('@angular/material/badge')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@recursyve/nice-data-filter-kit', ['exports', '@angular/common/http', '@recursyve/nice-ui-kit.v2', '@angular/core', '@datorama/akita', 'rxjs', 'rxjs/operators', '@angular/router', '@angular/material/bottom-sheet', '@angular/flex-layout', '@angular/material/icon', '@angular/material/button', '@angular/material/paginator', '@angular/material/card', '@angular/forms', '@recursyve/ngx-form-generator', '@angular/material/form-field', '@angular/material/select', '@angular/material/core', '@angular/material/input', 'ngx-mask', '@angular/material/radio', '@angular/common', '@angular/material/datepicker', '@angular/cdk/portal', '@angular/material/list', '@angular/cdk/overlay', '@angular/cdk/platform', '@ngx-translate/core', '@angular/material/table', '@angular/material/sort', '@angular/material/tooltip', '@angular/material/badge'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.recursyve = global.recursyve || {}, global.recursyve['nice-data-filter-kit'] = {}), global.ng.common.http, global['@recursyve/nice-ui-kit'].v2, global.ng.core, global['@datorama/akita'], global.rxjs, global.rxjs.operators, global.ng.router, global.ng.material.bottomSheet, global.ng.flexLayout, global.ng.material.icon, global.ng.material.button, global.ng.material.paginator, global.ng.material.card, global.ng.forms, global['@recursyve/nice-ui-kit'].v2, global.ng.material.formField, global.ng.material.select, global.ng.material.core, global.ng.material.input, global.i5, global.ng.material.radio, global.ng.common, global.ng.material.datepicker, global.ng.cdk.portal, global.ng.material.list, global.ng.cdk.overlay, global.ng.cdk.platform, global['@ngx-translate/core'], global.ng.material.table, global.ng.material.sort, global.ng.material.tooltip, global.ng.material.badge));
|
|
5
|
-
}(this, (function (exports, http, i18, i0, akita, rxjs, operators, i3, i4$1, i4, i6$1, i7, i8, i9, i1$1, i1, i1$2, i5$1, i6, i3$1, i5, i1$3, i13, i2, portal, i2$1, i1$4, i2$2, i1$5, i11, i12, i16, i17) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
|
|
28
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
29
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
30
|
-
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
31
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
32
|
-
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
33
|
-
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
34
|
-
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
35
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
36
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
37
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1);
|
|
38
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$2);
|
|
39
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
40
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
41
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
42
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
43
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
44
|
-
var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
|
|
45
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
46
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
47
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
48
|
-
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
49
|
-
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
50
|
-
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
51
|
-
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
|
|
52
|
-
var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
|
|
53
|
-
var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
|
|
54
|
-
|
|
55
|
-
/*! *****************************************************************************
|
|
56
|
-
Copyright (c) Microsoft Corporation.
|
|
57
|
-
|
|
58
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
59
|
-
purpose with or without fee is hereby granted.
|
|
60
|
-
|
|
61
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
62
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
63
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
64
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
65
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
66
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
67
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
68
|
-
***************************************************************************** */
|
|
69
|
-
/* global Reflect, Promise */
|
|
70
|
-
var extendStatics = function (d, b) {
|
|
71
|
-
extendStatics = Object.setPrototypeOf ||
|
|
72
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
73
|
-
function (d, b) { for (var p in b)
|
|
74
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
75
|
-
d[p] = b[p]; };
|
|
76
|
-
return extendStatics(d, b);
|
|
77
|
-
};
|
|
78
|
-
function __extends(d, b) {
|
|
79
|
-
if (typeof b !== "function" && b !== null)
|
|
80
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
81
|
-
extendStatics(d, b);
|
|
82
|
-
function __() { this.constructor = d; }
|
|
83
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
84
|
-
}
|
|
85
|
-
var __assign = function () {
|
|
86
|
-
__assign = Object.assign || function __assign(t) {
|
|
87
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
88
|
-
s = arguments[i];
|
|
89
|
-
for (var p in s)
|
|
90
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
91
|
-
t[p] = s[p];
|
|
92
|
-
}
|
|
93
|
-
return t;
|
|
94
|
-
};
|
|
95
|
-
return __assign.apply(this, arguments);
|
|
96
|
-
};
|
|
97
|
-
function __rest(s, e) {
|
|
98
|
-
var t = {};
|
|
99
|
-
for (var p in s)
|
|
100
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
101
|
-
t[p] = s[p];
|
|
102
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
103
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
104
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
105
|
-
t[p[i]] = s[p[i]];
|
|
106
|
-
}
|
|
107
|
-
return t;
|
|
108
|
-
}
|
|
109
|
-
function __decorate(decorators, target, key, desc) {
|
|
110
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
111
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
112
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
113
|
-
else
|
|
114
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
115
|
-
if (d = decorators[i])
|
|
116
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
117
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
118
|
-
}
|
|
119
|
-
function __param(paramIndex, decorator) {
|
|
120
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
121
|
-
}
|
|
122
|
-
function __metadata(metadataKey, metadataValue) {
|
|
123
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
124
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
125
|
-
}
|
|
126
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
127
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
128
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
129
|
-
function fulfilled(value) { try {
|
|
130
|
-
step(generator.next(value));
|
|
131
|
-
}
|
|
132
|
-
catch (e) {
|
|
133
|
-
reject(e);
|
|
134
|
-
} }
|
|
135
|
-
function rejected(value) { try {
|
|
136
|
-
step(generator["throw"](value));
|
|
137
|
-
}
|
|
138
|
-
catch (e) {
|
|
139
|
-
reject(e);
|
|
140
|
-
} }
|
|
141
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
142
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
function __generator(thisArg, body) {
|
|
146
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
147
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
148
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
149
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
150
|
-
function step(op) {
|
|
151
|
-
if (f)
|
|
152
|
-
throw new TypeError("Generator is already executing.");
|
|
153
|
-
while (_)
|
|
154
|
-
try {
|
|
155
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
156
|
-
return t;
|
|
157
|
-
if (y = 0, t)
|
|
158
|
-
op = [op[0] & 2, t.value];
|
|
159
|
-
switch (op[0]) {
|
|
160
|
-
case 0:
|
|
161
|
-
case 1:
|
|
162
|
-
t = op;
|
|
163
|
-
break;
|
|
164
|
-
case 4:
|
|
165
|
-
_.label++;
|
|
166
|
-
return { value: op[1], done: false };
|
|
167
|
-
case 5:
|
|
168
|
-
_.label++;
|
|
169
|
-
y = op[1];
|
|
170
|
-
op = [0];
|
|
171
|
-
continue;
|
|
172
|
-
case 7:
|
|
173
|
-
op = _.ops.pop();
|
|
174
|
-
_.trys.pop();
|
|
175
|
-
continue;
|
|
176
|
-
default:
|
|
177
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
178
|
-
_ = 0;
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
182
|
-
_.label = op[1];
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
186
|
-
_.label = t[1];
|
|
187
|
-
t = op;
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
if (t && _.label < t[2]) {
|
|
191
|
-
_.label = t[2];
|
|
192
|
-
_.ops.push(op);
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
if (t[2])
|
|
196
|
-
_.ops.pop();
|
|
197
|
-
_.trys.pop();
|
|
198
|
-
continue;
|
|
199
|
-
}
|
|
200
|
-
op = body.call(thisArg, _);
|
|
201
|
-
}
|
|
202
|
-
catch (e) {
|
|
203
|
-
op = [6, e];
|
|
204
|
-
y = 0;
|
|
205
|
-
}
|
|
206
|
-
finally {
|
|
207
|
-
f = t = 0;
|
|
208
|
-
}
|
|
209
|
-
if (op[0] & 5)
|
|
210
|
-
throw op[1];
|
|
211
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
215
|
-
if (k2 === undefined)
|
|
216
|
-
k2 = k;
|
|
217
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
218
|
-
}) : (function (o, m, k, k2) {
|
|
219
|
-
if (k2 === undefined)
|
|
220
|
-
k2 = k;
|
|
221
|
-
o[k2] = m[k];
|
|
222
|
-
});
|
|
223
|
-
function __exportStar(m, o) {
|
|
224
|
-
for (var p in m)
|
|
225
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
226
|
-
__createBinding(o, m, p);
|
|
227
|
-
}
|
|
228
|
-
function __values(o) {
|
|
229
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
230
|
-
if (m)
|
|
231
|
-
return m.call(o);
|
|
232
|
-
if (o && typeof o.length === "number")
|
|
233
|
-
return {
|
|
234
|
-
next: function () {
|
|
235
|
-
if (o && i >= o.length)
|
|
236
|
-
o = void 0;
|
|
237
|
-
return { value: o && o[i++], done: !o };
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
241
|
-
}
|
|
242
|
-
function __read(o, n) {
|
|
243
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
244
|
-
if (!m)
|
|
245
|
-
return o;
|
|
246
|
-
var i = m.call(o), r, ar = [], e;
|
|
247
|
-
try {
|
|
248
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
249
|
-
ar.push(r.value);
|
|
250
|
-
}
|
|
251
|
-
catch (error) {
|
|
252
|
-
e = { error: error };
|
|
253
|
-
}
|
|
254
|
-
finally {
|
|
255
|
-
try {
|
|
256
|
-
if (r && !r.done && (m = i["return"]))
|
|
257
|
-
m.call(i);
|
|
258
|
-
}
|
|
259
|
-
finally {
|
|
260
|
-
if (e)
|
|
261
|
-
throw e.error;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
return ar;
|
|
265
|
-
}
|
|
266
|
-
/** @deprecated */
|
|
267
|
-
function __spread() {
|
|
268
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
269
|
-
ar = ar.concat(__read(arguments[i]));
|
|
270
|
-
return ar;
|
|
271
|
-
}
|
|
272
|
-
/** @deprecated */
|
|
273
|
-
function __spreadArrays() {
|
|
274
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
275
|
-
s += arguments[i].length;
|
|
276
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
277
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
278
|
-
r[k] = a[j];
|
|
279
|
-
return r;
|
|
280
|
-
}
|
|
281
|
-
function __spreadArray(to, from) {
|
|
282
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
283
|
-
to[j] = from[i];
|
|
284
|
-
return to;
|
|
285
|
-
}
|
|
286
|
-
function __await(v) {
|
|
287
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
288
|
-
}
|
|
289
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
290
|
-
if (!Symbol.asyncIterator)
|
|
291
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
292
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
293
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
294
|
-
function verb(n) { if (g[n])
|
|
295
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
296
|
-
function resume(n, v) { try {
|
|
297
|
-
step(g[n](v));
|
|
298
|
-
}
|
|
299
|
-
catch (e) {
|
|
300
|
-
settle(q[0][3], e);
|
|
301
|
-
} }
|
|
302
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
303
|
-
function fulfill(value) { resume("next", value); }
|
|
304
|
-
function reject(value) { resume("throw", value); }
|
|
305
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
306
|
-
resume(q[0][0], q[0][1]); }
|
|
307
|
-
}
|
|
308
|
-
function __asyncDelegator(o) {
|
|
309
|
-
var i, p;
|
|
310
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
311
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
312
|
-
}
|
|
313
|
-
function __asyncValues(o) {
|
|
314
|
-
if (!Symbol.asyncIterator)
|
|
315
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
316
|
-
var m = o[Symbol.asyncIterator], i;
|
|
317
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
318
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
319
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
320
|
-
}
|
|
321
|
-
function __makeTemplateObject(cooked, raw) {
|
|
322
|
-
if (Object.defineProperty) {
|
|
323
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
cooked.raw = raw;
|
|
327
|
-
}
|
|
328
|
-
return cooked;
|
|
329
|
-
}
|
|
330
|
-
;
|
|
331
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
332
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
333
|
-
}) : function (o, v) {
|
|
334
|
-
o["default"] = v;
|
|
335
|
-
};
|
|
336
|
-
function __importStar(mod) {
|
|
337
|
-
if (mod && mod.__esModule)
|
|
338
|
-
return mod;
|
|
339
|
-
var result = {};
|
|
340
|
-
if (mod != null)
|
|
341
|
-
for (var k in mod)
|
|
342
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
343
|
-
__createBinding(result, mod, k);
|
|
344
|
-
__setModuleDefault(result, mod);
|
|
345
|
-
return result;
|
|
346
|
-
}
|
|
347
|
-
function __importDefault(mod) {
|
|
348
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
349
|
-
}
|
|
350
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
351
|
-
if (kind === "a" && !f)
|
|
352
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
353
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
354
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
355
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
356
|
-
}
|
|
357
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
358
|
-
if (kind === "m")
|
|
359
|
-
throw new TypeError("Private method is not writable");
|
|
360
|
-
if (kind === "a" && !f)
|
|
361
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
362
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
363
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
364
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
var QueryParamsUtils = /** @class */ (function () {
|
|
368
|
-
function QueryParamsUtils() {
|
|
369
|
-
}
|
|
370
|
-
QueryParamsUtils.extractFilterParameters = function (params) {
|
|
371
|
-
var filters = {};
|
|
372
|
-
if (!i18.isNullOrUndefined(params.start)) {
|
|
373
|
-
filters.start = Number(params.start);
|
|
374
|
-
}
|
|
375
|
-
if (!i18.isNullOrUndefined(params.length)) {
|
|
376
|
-
filters.length = Number(params.length);
|
|
377
|
-
}
|
|
378
|
-
if (!i18.isNullOrUndefined(params.order)) {
|
|
379
|
-
try {
|
|
380
|
-
filters.order = JSON.parse(params.order);
|
|
381
|
-
}
|
|
382
|
-
catch (e) {
|
|
383
|
-
delete filters.order;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
if (!i18.isNullOrUndefined(params.search)) {
|
|
387
|
-
filters.search = params.search;
|
|
388
|
-
}
|
|
389
|
-
if (!i18.isNullOrUndefined(params.rules)) {
|
|
390
|
-
try {
|
|
391
|
-
filters.rules = JSON.parse(params.rules);
|
|
392
|
-
}
|
|
393
|
-
catch (e) {
|
|
394
|
-
delete filters.rules;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
return filters;
|
|
398
|
-
};
|
|
399
|
-
QueryParamsUtils.filterParametersToParamsMap = function (filterParameters) {
|
|
400
|
-
var params = {};
|
|
401
|
-
if (!i18.isNullOrUndefined(filterParameters.start)) {
|
|
402
|
-
params.start = filterParameters.start;
|
|
403
|
-
}
|
|
404
|
-
if (!i18.isNullOrUndefined(filterParameters.length)) {
|
|
405
|
-
params.length = filterParameters.length;
|
|
406
|
-
}
|
|
407
|
-
if (!i18.isNullOrUndefined(filterParameters.order)) {
|
|
408
|
-
params.order = JSON.stringify(filterParameters.order);
|
|
409
|
-
}
|
|
410
|
-
else {
|
|
411
|
-
params.order = null;
|
|
412
|
-
}
|
|
413
|
-
if (!i18.isNullOrUndefined(filterParameters.search)) {
|
|
414
|
-
params.search = filterParameters.search;
|
|
415
|
-
}
|
|
416
|
-
if (!i18.isNullOrUndefined(filterParameters.rules)) {
|
|
417
|
-
params.rules = JSON.stringify(filterParameters.rules);
|
|
418
|
-
}
|
|
419
|
-
return params;
|
|
420
|
-
};
|
|
421
|
-
QueryParamsUtils.fromObject = function (obj) {
|
|
422
|
-
Object.entries(obj).forEach(function (_a) {
|
|
423
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
424
|
-
if (value === undefined) {
|
|
425
|
-
delete obj[key];
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
return new http.HttpParams({
|
|
429
|
-
fromObject: obj
|
|
430
|
-
}).toString();
|
|
431
|
-
};
|
|
432
|
-
return QueryParamsUtils;
|
|
433
|
-
}());
|
|
434
|
-
|
|
435
|
-
var NiceFilterApi = /** @class */ (function () {
|
|
436
|
-
function NiceFilterApi(filterApiUrl, path, http) {
|
|
437
|
-
this.filterApiUrl = filterApiUrl;
|
|
438
|
-
this.path = path;
|
|
439
|
-
this.http = http;
|
|
440
|
-
}
|
|
441
|
-
NiceFilterApi.prototype.filter = function (queryModel) {
|
|
442
|
-
return this.http.post(this.url("filter"), queryModel);
|
|
443
|
-
};
|
|
444
|
-
NiceFilterApi.prototype.filterCount = function (queryModel) {
|
|
445
|
-
return this.http.post(this.url("filter-count"), queryModel);
|
|
446
|
-
};
|
|
447
|
-
NiceFilterApi.prototype.downloadData = function (type, queryModel) {
|
|
448
|
-
return this.http.post(this.url("download/" + type), queryModel, { responseType: "blob" });
|
|
449
|
-
};
|
|
450
|
-
NiceFilterApi.prototype.getPrintableHtml = function (queryModel) {
|
|
451
|
-
return this.http.post(this.url("download/html"), queryModel, { responseType: "text" });
|
|
452
|
-
};
|
|
453
|
-
NiceFilterApi.prototype.getFilterConfig = function () {
|
|
454
|
-
return this.http.get(this.url("filter/config"));
|
|
455
|
-
};
|
|
456
|
-
NiceFilterApi.prototype.searchFilterValue = function (id, value) {
|
|
457
|
-
if (value === undefined) {
|
|
458
|
-
value = "";
|
|
459
|
-
}
|
|
460
|
-
return this.http.get(this.url("filter/config/value?id=" + id + "&value=" + value));
|
|
461
|
-
};
|
|
462
|
-
NiceFilterApi.prototype.searchFilterResourceValue = function (id, resourceId) {
|
|
463
|
-
return this.http.get(this.url("filter/config/id?id=" + id + "&resourceId=" + resourceId));
|
|
464
|
-
};
|
|
465
|
-
NiceFilterApi.prototype.url = function () {
|
|
466
|
-
var args = [];
|
|
467
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
468
|
-
args[_i] = arguments[_i];
|
|
469
|
-
}
|
|
470
|
-
var _b = __read(this.transformUrlArgs(args), 2), route = _b[0], queryParams = _b[1];
|
|
471
|
-
var params = queryParams ? "?" + QueryParamsUtils.fromObject(queryParams) : "";
|
|
472
|
-
if (route) {
|
|
473
|
-
return this.filterApiUrl + "/" + this.path + "/" + route + params;
|
|
474
|
-
}
|
|
475
|
-
return this.filterApiUrl + "/" + this.path + params;
|
|
476
|
-
};
|
|
477
|
-
NiceFilterApi.prototype.transformUrlArgs = function (args) {
|
|
478
|
-
var _a;
|
|
479
|
-
var _b = __read(args, 2), routeOfQueryParams = _b[0], query = _b[1];
|
|
480
|
-
if (args.length === 1) {
|
|
481
|
-
if (typeof routeOfQueryParams === "string") {
|
|
482
|
-
return [routeOfQueryParams];
|
|
483
|
-
}
|
|
484
|
-
return ["", routeOfQueryParams];
|
|
485
|
-
}
|
|
486
|
-
return [(_a = routeOfQueryParams) !== null && _a !== void 0 ? _a : "", query];
|
|
487
|
-
};
|
|
488
|
-
return NiceFilterApi;
|
|
489
|
-
}());
|
|
490
|
-
|
|
491
|
-
var NiceBaseListButtonsDirective = /** @class */ (function () {
|
|
492
|
-
function NiceBaseListButtonsDirective(template) {
|
|
493
|
-
this.template = template;
|
|
494
|
-
this.position = "suffix";
|
|
495
|
-
}
|
|
496
|
-
return NiceBaseListButtonsDirective;
|
|
497
|
-
}());
|
|
498
|
-
NiceBaseListButtonsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListButtonsDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
499
|
-
NiceBaseListButtonsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListButtonsDirective, selector: "[niceListButton]", inputs: { position: "position" }, ngImport: i0__namespace });
|
|
500
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListButtonsDirective, decorators: [{
|
|
501
|
-
type: i0.Directive,
|
|
502
|
-
args: [{ selector: "[niceListButton]" }]
|
|
503
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { position: [{
|
|
504
|
-
type: i0.Input
|
|
505
|
-
}] } });
|
|
506
|
-
|
|
507
|
-
var NiceBaseListCardsDirective = /** @class */ (function () {
|
|
508
|
-
function NiceBaseListCardsDirective(template) {
|
|
509
|
-
this.template = template;
|
|
510
|
-
}
|
|
511
|
-
return NiceBaseListCardsDirective;
|
|
512
|
-
}());
|
|
513
|
-
NiceBaseListCardsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListCardsDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
514
|
-
NiceBaseListCardsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListCardsDirective, selector: "[niceListCards]", ngImport: i0__namespace });
|
|
515
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListCardsDirective, decorators: [{
|
|
516
|
-
type: i0.Directive,
|
|
517
|
-
args: [{ selector: "[niceListCards]" }]
|
|
518
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
|
|
519
|
-
|
|
520
|
-
var NiceBaseListCustomContentDirective = /** @class */ (function () {
|
|
521
|
-
function NiceBaseListCustomContentDirective(template) {
|
|
522
|
-
this.template = template;
|
|
523
|
-
}
|
|
524
|
-
return NiceBaseListCustomContentDirective;
|
|
525
|
-
}());
|
|
526
|
-
NiceBaseListCustomContentDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListCustomContentDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
527
|
-
NiceBaseListCustomContentDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListCustomContentDirective, selector: "[niceListContent]", ngImport: i0__namespace });
|
|
528
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListCustomContentDirective, decorators: [{
|
|
529
|
-
type: i0.Directive,
|
|
530
|
-
args: [{ selector: "[niceListContent]" }]
|
|
531
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
|
|
532
|
-
|
|
533
|
-
var NiceBaseListFiltersDirective = /** @class */ (function () {
|
|
534
|
-
function NiceBaseListFiltersDirective(template) {
|
|
535
|
-
this.template = template;
|
|
536
|
-
}
|
|
537
|
-
return NiceBaseListFiltersDirective;
|
|
538
|
-
}());
|
|
539
|
-
NiceBaseListFiltersDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListFiltersDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
540
|
-
NiceBaseListFiltersDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListFiltersDirective, selector: "[niceListFilters]", ngImport: i0__namespace });
|
|
541
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListFiltersDirective, decorators: [{
|
|
542
|
-
type: i0.Directive,
|
|
543
|
-
args: [{ selector: "[niceListFilters]" }]
|
|
544
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
|
|
545
|
-
|
|
546
|
-
var NiceBaseListTableDirective = /** @class */ (function () {
|
|
547
|
-
function NiceBaseListTableDirective(template) {
|
|
548
|
-
this.template = template;
|
|
549
|
-
}
|
|
550
|
-
return NiceBaseListTableDirective;
|
|
551
|
-
}());
|
|
552
|
-
NiceBaseListTableDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTableDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
553
|
-
NiceBaseListTableDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListTableDirective, selector: "[niceListTable]", ngImport: i0__namespace });
|
|
554
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTableDirective, decorators: [{
|
|
555
|
-
type: i0.Directive,
|
|
556
|
-
args: [{ selector: "[niceListTable]" }]
|
|
557
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
|
|
558
|
-
|
|
559
|
-
var NiceBaseListTitleDirective = /** @class */ (function () {
|
|
560
|
-
function NiceBaseListTitleDirective(template) {
|
|
561
|
-
this.template = template;
|
|
562
|
-
}
|
|
563
|
-
return NiceBaseListTitleDirective;
|
|
564
|
-
}());
|
|
565
|
-
NiceBaseListTitleDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTitleDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
566
|
-
NiceBaseListTitleDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListTitleDirective, selector: "[niceListTitle]", ngImport: i0__namespace });
|
|
567
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTitleDirective, decorators: [{
|
|
568
|
-
type: i0.Directive,
|
|
569
|
-
args: [{ selector: "[niceListTitle]" }]
|
|
570
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
|
|
571
|
-
|
|
572
|
-
var NiceBaseListDirectiveModule = /** @class */ (function () {
|
|
573
|
-
function NiceBaseListDirectiveModule() {
|
|
574
|
-
}
|
|
575
|
-
return NiceBaseListDirectiveModule;
|
|
576
|
-
}());
|
|
577
|
-
NiceBaseListDirectiveModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
578
|
-
NiceBaseListDirectiveModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, declarations: [NiceBaseListButtonsDirective,
|
|
579
|
-
NiceBaseListTitleDirective,
|
|
580
|
-
NiceBaseListTableDirective,
|
|
581
|
-
NiceBaseListCardsDirective,
|
|
582
|
-
NiceBaseListCustomContentDirective,
|
|
583
|
-
NiceBaseListFiltersDirective], exports: [NiceBaseListButtonsDirective,
|
|
584
|
-
NiceBaseListTitleDirective,
|
|
585
|
-
NiceBaseListTableDirective,
|
|
586
|
-
NiceBaseListCardsDirective,
|
|
587
|
-
NiceBaseListCustomContentDirective,
|
|
588
|
-
NiceBaseListFiltersDirective] });
|
|
589
|
-
NiceBaseListDirectiveModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule });
|
|
590
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, decorators: [{
|
|
591
|
-
type: i0.NgModule,
|
|
592
|
-
args: [{
|
|
593
|
-
declarations: [
|
|
594
|
-
NiceBaseListButtonsDirective,
|
|
595
|
-
NiceBaseListTitleDirective,
|
|
596
|
-
NiceBaseListTableDirective,
|
|
597
|
-
NiceBaseListCardsDirective,
|
|
598
|
-
NiceBaseListCustomContentDirective,
|
|
599
|
-
NiceBaseListFiltersDirective
|
|
600
|
-
],
|
|
601
|
-
exports: [
|
|
602
|
-
NiceBaseListButtonsDirective,
|
|
603
|
-
NiceBaseListTitleDirective,
|
|
604
|
-
NiceBaseListTableDirective,
|
|
605
|
-
NiceBaseListCardsDirective,
|
|
606
|
-
NiceBaseListCustomContentDirective,
|
|
607
|
-
NiceBaseListFiltersDirective
|
|
608
|
-
]
|
|
609
|
-
}]
|
|
610
|
-
}] });
|
|
611
|
-
|
|
612
|
-
var TableColumns = /** @class */ (function () {
|
|
613
|
-
function TableColumns(id, sortable) {
|
|
614
|
-
if (sortable === void 0) { sortable = true; }
|
|
615
|
-
this.id = id;
|
|
616
|
-
this.sortable = sortable;
|
|
617
|
-
}
|
|
618
|
-
return TableColumns;
|
|
619
|
-
}());
|
|
620
|
-
|
|
621
|
-
exports.LayoutContent = void 0;
|
|
622
|
-
(function (LayoutContent) {
|
|
623
|
-
LayoutContent["Table"] = "table";
|
|
624
|
-
LayoutContent["Cards"] = "cards";
|
|
625
|
-
LayoutContent["Custom"] = "custom";
|
|
626
|
-
})(exports.LayoutContent || (exports.LayoutContent = {}));
|
|
627
|
-
var defaultLayout = {
|
|
628
|
-
default: {
|
|
629
|
-
type: "column",
|
|
630
|
-
items: [
|
|
631
|
-
{
|
|
632
|
-
type: "row",
|
|
633
|
-
classes: ["mb-8"],
|
|
634
|
-
items: [
|
|
635
|
-
{
|
|
636
|
-
name: "title",
|
|
637
|
-
flex: "33"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
type: "row",
|
|
641
|
-
flex: "1 0 auto",
|
|
642
|
-
align: "center center",
|
|
643
|
-
items: [
|
|
644
|
-
{
|
|
645
|
-
name: "search",
|
|
646
|
-
flex: "1 0 auto"
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
type: "row",
|
|
650
|
-
flex: "1 0 auto",
|
|
651
|
-
align: "end",
|
|
652
|
-
items: [
|
|
653
|
-
{
|
|
654
|
-
name: "prefixButtons",
|
|
655
|
-
align: "end center"
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: "exportButtons",
|
|
659
|
-
align: "end center"
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
name: "suffixButtons",
|
|
663
|
-
align: "end center"
|
|
664
|
-
}
|
|
665
|
-
]
|
|
666
|
-
}
|
|
667
|
-
]
|
|
668
|
-
}
|
|
669
|
-
]
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
name: "queryBuilder"
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
name: "filters"
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
name: "content"
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
name: "pagination"
|
|
682
|
-
}
|
|
683
|
-
]
|
|
684
|
-
},
|
|
685
|
-
sm: {
|
|
686
|
-
type: "column",
|
|
687
|
-
items: [
|
|
688
|
-
{
|
|
689
|
-
type: "row",
|
|
690
|
-
classes: ["mb-8"],
|
|
691
|
-
align: "center center",
|
|
692
|
-
items: [
|
|
693
|
-
{
|
|
694
|
-
name: "title",
|
|
695
|
-
flex: "50"
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
type: "row",
|
|
699
|
-
flex: "1 0 auto",
|
|
700
|
-
align: "end center",
|
|
701
|
-
items: [
|
|
702
|
-
{
|
|
703
|
-
name: "prefixButtons"
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
name: "exportButtons"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
name: "suffixButtons"
|
|
710
|
-
}
|
|
711
|
-
]
|
|
712
|
-
}
|
|
713
|
-
]
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
name: "search",
|
|
717
|
-
align: "center center",
|
|
718
|
-
classes: ["mb-8"]
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
name: "queryBuilder"
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
name: "filters"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: "content"
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
name: "pagination"
|
|
731
|
-
}
|
|
732
|
-
]
|
|
733
|
-
},
|
|
734
|
-
xs: {
|
|
735
|
-
type: "column",
|
|
736
|
-
items: [
|
|
737
|
-
{
|
|
738
|
-
type: "row",
|
|
739
|
-
classes: ["mb-8"],
|
|
740
|
-
align: "center center",
|
|
741
|
-
items: [
|
|
742
|
-
{
|
|
743
|
-
name: "title",
|
|
744
|
-
flex: "50"
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
type: "row",
|
|
748
|
-
flex: "1 0 auto",
|
|
749
|
-
align: "end center",
|
|
750
|
-
items: [
|
|
751
|
-
{
|
|
752
|
-
name: "prefixButtons"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
name: "exportButtons"
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
name: "suffixButtons"
|
|
759
|
-
}
|
|
760
|
-
]
|
|
761
|
-
}
|
|
762
|
-
]
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
name: "search",
|
|
766
|
-
align: "center center",
|
|
767
|
-
classes: ["mb-8"]
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
name: "queryBuilder"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
name: "filters"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
name: "content"
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
name: "pagination"
|
|
780
|
-
}
|
|
781
|
-
]
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
var FilterUtils = /** @class */ (function () {
|
|
786
|
-
function FilterUtils() {
|
|
787
|
-
}
|
|
788
|
-
FilterUtils.parametersToRequest = function (filterParameters) {
|
|
789
|
-
var _a, _b, _c, _d, _e, _f;
|
|
790
|
-
return {
|
|
791
|
-
page: {
|
|
792
|
-
number: Math.ceil(((_a = filterParameters.start) !== null && _a !== void 0 ? _a : 0) / ((_b = filterParameters.length) !== null && _b !== void 0 ? _b : 1)),
|
|
793
|
-
size: (_c = filterParameters.length) !== null && _c !== void 0 ? _c : 0
|
|
794
|
-
},
|
|
795
|
-
search: {
|
|
796
|
-
value: (_d = filterParameters.search) !== null && _d !== void 0 ? _d : ""
|
|
797
|
-
},
|
|
798
|
-
query: {
|
|
799
|
-
condition: "and",
|
|
800
|
-
rules: (_e = filterParameters.rules) !== null && _e !== void 0 ? _e : []
|
|
801
|
-
},
|
|
802
|
-
order: (_f = filterParameters.order) !== null && _f !== void 0 ? _f : undefined,
|
|
803
|
-
data: filterParameters.data
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
FilterUtils.filterChangeNeedsRefresh = function (currentFilters, newFilters) {
|
|
807
|
-
var newFilterKeys = Object.keys(newFilters).sort();
|
|
808
|
-
if (newFilterKeys.length === 0) {
|
|
809
|
-
return true;
|
|
810
|
-
}
|
|
811
|
-
return newFilterKeys.some(function (key) {
|
|
812
|
-
var currentValue = currentFilters[key];
|
|
813
|
-
var newValue = currentFilters[key];
|
|
814
|
-
if (Array.isArray(currentValue)) {
|
|
815
|
-
return !i18.ObjectUtils.areObjectsEqual(currentValue, newValue);
|
|
816
|
-
}
|
|
817
|
-
else if (typeof currentValue === "object" && currentValue !== null) {
|
|
818
|
-
return !i18.ObjectUtils.areObjectsEqual(currentValue, newValue);
|
|
819
|
-
}
|
|
820
|
-
else {
|
|
821
|
-
return currentValue !== newValue;
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
};
|
|
825
|
-
return FilterUtils;
|
|
826
|
-
}());
|
|
827
|
-
|
|
828
|
-
var NiceFilterService = /** @class */ (function () {
|
|
829
|
-
function NiceFilterService(api) {
|
|
830
|
-
this.api = api;
|
|
831
|
-
}
|
|
832
|
-
NiceFilterService.prototype.filter = function (params) {
|
|
833
|
-
var _a;
|
|
834
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.filter(FilterUtils.parametersToRequest(params));
|
|
835
|
-
};
|
|
836
|
-
NiceFilterService.prototype.getFile = function (type, parameters) {
|
|
837
|
-
var _a;
|
|
838
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.downloadData(type, FilterUtils.parametersToRequest(parameters));
|
|
839
|
-
};
|
|
840
|
-
NiceFilterService.prototype.getPrintableHtml = function (parameters) {
|
|
841
|
-
var _a;
|
|
842
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.getPrintableHtml(FilterUtils.parametersToRequest(parameters));
|
|
843
|
-
};
|
|
844
|
-
NiceFilterService.prototype.getFilterConfig = function () {
|
|
845
|
-
var _a;
|
|
846
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.getFilterConfig();
|
|
847
|
-
};
|
|
848
|
-
NiceFilterService.prototype.searchFilterValue = function (filterConfig, value) {
|
|
849
|
-
var _a;
|
|
850
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.searchFilterValue(filterConfig.id, value);
|
|
851
|
-
};
|
|
852
|
-
NiceFilterService.prototype.searchFilterResourceValue = function (filterConfig, resourceId) {
|
|
853
|
-
var _a;
|
|
854
|
-
return (_a = this.api) === null || _a === void 0 ? void 0 : _a.searchFilterResourceValue(filterConfig.id, resourceId);
|
|
855
|
-
};
|
|
856
|
-
return NiceFilterService;
|
|
857
|
-
}());
|
|
858
|
-
NiceFilterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceFilterService, deps: [{ token: NiceFilterApi }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
859
|
-
NiceFilterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceFilterService });
|
|
860
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceFilterService, decorators: [{
|
|
861
|
-
type: i0.Injectable
|
|
862
|
-
}], ctorParameters: function () { return [{ type: NiceFilterApi }]; } });
|
|
863
|
-
|
|
864
|
-
var NiceSavedReportsApi = /** @class */ (function () {
|
|
865
|
-
function NiceSavedReportsApi(filterApiUrl, path, http) {
|
|
866
|
-
this.filterApiUrl = filterApiUrl;
|
|
867
|
-
this.path = path;
|
|
868
|
-
this.http = http;
|
|
869
|
-
}
|
|
870
|
-
NiceSavedReportsApi.prototype.create = function (dto) {
|
|
871
|
-
return this.http.post(this.url(), dto);
|
|
872
|
-
};
|
|
873
|
-
NiceSavedReportsApi.prototype.getAll = function () {
|
|
874
|
-
return this.http.get(this.url());
|
|
875
|
-
};
|
|
876
|
-
NiceSavedReportsApi.prototype.getByTable = function (table) {
|
|
877
|
-
return this.http.get(this.url("" + table));
|
|
878
|
-
};
|
|
879
|
-
NiceSavedReportsApi.prototype.getTopByTable = function (table) {
|
|
880
|
-
return this.http.get(this.url(table + "/top"));
|
|
881
|
-
};
|
|
882
|
-
NiceSavedReportsApi.prototype.hit = function (id) {
|
|
883
|
-
return this.http.put(this.url(id + "/hit"), null);
|
|
884
|
-
};
|
|
885
|
-
NiceSavedReportsApi.prototype.update = function (id, dto) {
|
|
886
|
-
return this.http.put(this.url("" + id), dto);
|
|
887
|
-
};
|
|
888
|
-
NiceSavedReportsApi.prototype.delete = function (id) {
|
|
889
|
-
return this.http.delete(this.url("" + id));
|
|
890
|
-
};
|
|
891
|
-
NiceSavedReportsApi.prototype.url = function () {
|
|
892
|
-
var args = [];
|
|
893
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
894
|
-
args[_i] = arguments[_i];
|
|
895
|
-
}
|
|
896
|
-
var _b = __read(this.transformUrlArgs(args), 2), route = _b[0], queryParams = _b[1];
|
|
897
|
-
var params = queryParams ? "?" + QueryParamsUtils.fromObject(queryParams) : "";
|
|
898
|
-
if (route) {
|
|
899
|
-
return this.filterApiUrl + "/" + this.path + "/" + route + params;
|
|
900
|
-
}
|
|
901
|
-
return this.filterApiUrl + "/" + this.path + params;
|
|
902
|
-
};
|
|
903
|
-
NiceSavedReportsApi.prototype.transformUrlArgs = function (args) {
|
|
904
|
-
var _a;
|
|
905
|
-
var _b = __read(args, 2), routeOfQueryParams = _b[0], query = _b[1];
|
|
906
|
-
if (args.length === 1) {
|
|
907
|
-
if (typeof routeOfQueryParams === "string") {
|
|
908
|
-
return [routeOfQueryParams];
|
|
909
|
-
}
|
|
910
|
-
return ["", routeOfQueryParams];
|
|
911
|
-
}
|
|
912
|
-
return [(_a = routeOfQueryParams) !== null && _a !== void 0 ? _a : "", query];
|
|
913
|
-
};
|
|
914
|
-
return NiceSavedReportsApi;
|
|
915
|
-
}());
|
|
916
|
-
|
|
917
|
-
var NiceSavedReportService = /** @class */ (function () {
|
|
918
|
-
function NiceSavedReportService(api) {
|
|
919
|
-
this.api = api;
|
|
920
|
-
}
|
|
921
|
-
NiceSavedReportService.prototype.create = function (report) {
|
|
922
|
-
return this.api.create(report);
|
|
923
|
-
};
|
|
924
|
-
NiceSavedReportService.prototype.update = function (id, report) {
|
|
925
|
-
return this.api.update(id, report);
|
|
926
|
-
};
|
|
927
|
-
NiceSavedReportService.prototype.remove = function (id) {
|
|
928
|
-
return this.api.delete(id);
|
|
929
|
-
};
|
|
930
|
-
NiceSavedReportService.prototype.getByTableName = function (table) {
|
|
931
|
-
return this.api.getByTable(table);
|
|
932
|
-
};
|
|
933
|
-
NiceSavedReportService.prototype.getTopByTableName = function (table) {
|
|
934
|
-
return this.api.getTopByTable(table);
|
|
935
|
-
};
|
|
936
|
-
NiceSavedReportService.prototype.hit = function (id) {
|
|
937
|
-
return this.api.hit(id);
|
|
938
|
-
};
|
|
939
|
-
return NiceSavedReportService;
|
|
940
|
-
}());
|
|
941
|
-
NiceSavedReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceSavedReportService, deps: [{ token: NiceSavedReportsApi }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
942
|
-
NiceSavedReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceSavedReportService });
|
|
943
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceSavedReportService, decorators: [{
|
|
944
|
-
type: i0.Injectable
|
|
945
|
-
}], ctorParameters: function () { return [{ type: NiceSavedReportsApi }]; } });
|
|
946
|
-
|
|
947
|
-
var BASE_LIST_LAYOUT = new i0.InjectionToken("base_list_layout");
|
|
948
|
-
var DEFAULT_PARAMETERS = new i0.InjectionToken("default_parameters");
|
|
949
|
-
var LIST_TABLE = new i0.InjectionToken("list_table");
|
|
950
|
-
var TABLE_COLUMNS = new i0.InjectionToken("table_columns");
|
|
951
|
-
var EXPORTS_SETTINGS = new i0.InjectionToken("exports_settings");
|
|
952
|
-
var ENABLE_QUERY_BUILDER = new i0.InjectionToken("enable_query_builder");
|
|
953
|
-
|
|
954
|
-
var initialBaseListState = {
|
|
955
|
-
disabled: false,
|
|
956
|
-
mergePageResults: false,
|
|
957
|
-
resetPaging: false,
|
|
958
|
-
filterConfigLoading: false,
|
|
959
|
-
filterResult: null,
|
|
960
|
-
filterParameters: {
|
|
961
|
-
start: 0,
|
|
962
|
-
length: 10,
|
|
963
|
-
order: {},
|
|
964
|
-
search: "",
|
|
965
|
-
rules: [],
|
|
966
|
-
data: {}
|
|
967
|
-
},
|
|
968
|
-
filterConfig: [],
|
|
969
|
-
showQueryBuilder: false,
|
|
970
|
-
defaultRules: []
|
|
971
|
-
};
|
|
972
|
-
exports.NiceBaseListStore = /** @class */ (function (_super) {
|
|
973
|
-
__extends(NiceBaseListStore, _super);
|
|
974
|
-
function NiceBaseListStore(parameters) {
|
|
975
|
-
return _super.call(this, Object.assign(Object.assign({}, initialBaseListState), { filterParameters: Object.assign(Object.assign({}, initialBaseListState.filterParameters), (parameters !== null && parameters !== void 0 ? parameters : {})) })) || this;
|
|
976
|
-
}
|
|
977
|
-
NiceBaseListStore.prototype.setFilterConfigLoading = function (loading) {
|
|
978
|
-
this.update({
|
|
979
|
-
filterConfigLoading: loading
|
|
980
|
-
});
|
|
981
|
-
};
|
|
982
|
-
NiceBaseListStore.prototype.setResult = function (filterResult, reset) {
|
|
983
|
-
if (reset === void 0) { reset = false; }
|
|
984
|
-
var mergePageResults = this.getValue().mergePageResults;
|
|
985
|
-
if (mergePageResults && !reset) {
|
|
986
|
-
this.update(function (state) {
|
|
987
|
-
var _a, _b;
|
|
988
|
-
return ({
|
|
989
|
-
filterResult: {
|
|
990
|
-
page: filterResult.page,
|
|
991
|
-
total: filterResult.total,
|
|
992
|
-
values: state.resetPaging ? filterResult.values : __spreadArray(__spreadArray([], __read(((_b = (_a = state.filterResult) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []))), __read(filterResult.values))
|
|
993
|
-
},
|
|
994
|
-
resetPaging: false
|
|
995
|
-
});
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
else {
|
|
999
|
-
this.update({
|
|
1000
|
-
filterResult: filterResult
|
|
1001
|
-
});
|
|
1002
|
-
}
|
|
1003
|
-
};
|
|
1004
|
-
NiceBaseListStore.prototype.setParameters = function (filterParameters) {
|
|
1005
|
-
this.update({
|
|
1006
|
-
filterParameters: filterParameters
|
|
1007
|
-
});
|
|
1008
|
-
};
|
|
1009
|
-
return NiceBaseListStore;
|
|
1010
|
-
}(akita.Store));
|
|
1011
|
-
exports.NiceBaseListStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceBaseListStore, deps: [{ token: DEFAULT_PARAMETERS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1012
|
-
exports.NiceBaseListStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceBaseListStore });
|
|
1013
|
-
exports.NiceBaseListStore = __decorate([
|
|
1014
|
-
akita.StoreConfig({ name: "base-list", resettable: true }),
|
|
1015
|
-
__metadata("design:paramtypes", [Object])
|
|
1016
|
-
], exports.NiceBaseListStore);
|
|
1017
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceBaseListStore, decorators: [{
|
|
1018
|
-
type: i0.Injectable
|
|
1019
|
-
}], ctorParameters: function () {
|
|
1020
|
-
return [{ type: undefined, decorators: [{
|
|
1021
|
-
type: i0.Optional
|
|
1022
|
-
}, {
|
|
1023
|
-
type: i0.Inject,
|
|
1024
|
-
args: [DEFAULT_PARAMETERS]
|
|
1025
|
-
}] }];
|
|
1026
|
-
} });
|
|
1027
|
-
|
|
1028
|
-
var NiceBaseListQuery = /** @class */ (function (_super) {
|
|
1029
|
-
__extends(NiceBaseListQuery, _super);
|
|
1030
|
-
function NiceBaseListQuery(store) {
|
|
1031
|
-
var _this = _super.call(this, store) || this;
|
|
1032
|
-
_this.store = store;
|
|
1033
|
-
return _this;
|
|
1034
|
-
}
|
|
1035
|
-
NiceBaseListQuery.prototype.selectData = function () {
|
|
1036
|
-
return this.select(function (s) { var _a, _b; return (_b = (_a = s.filterResult) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []; });
|
|
1037
|
-
};
|
|
1038
|
-
NiceBaseListQuery.prototype.selectFilterParameters = function () {
|
|
1039
|
-
return this.select(function (s) { return s.filterParameters; });
|
|
1040
|
-
};
|
|
1041
|
-
NiceBaseListQuery.prototype.selectFilterResult = function () {
|
|
1042
|
-
return this.select(function (s) { return s.filterResult; });
|
|
1043
|
-
};
|
|
1044
|
-
NiceBaseListQuery.prototype.selectFilterConfig = function () {
|
|
1045
|
-
return this.select(function (s) { return s.filterConfig; });
|
|
1046
|
-
};
|
|
1047
|
-
NiceBaseListQuery.prototype.selectFilterConfigLoading = function () {
|
|
1048
|
-
return this.select(function (s) { return s.filterConfigLoading; });
|
|
1049
|
-
};
|
|
1050
|
-
NiceBaseListQuery.prototype.selectShowQueryBuilder = function () {
|
|
1051
|
-
return this.select(function (s) { return s.showQueryBuilder; });
|
|
1052
|
-
};
|
|
1053
|
-
return NiceBaseListQuery;
|
|
1054
|
-
}(akita.Query));
|
|
1055
|
-
NiceBaseListQuery.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListQuery, deps: [{ token: exports.NiceBaseListStore }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1056
|
-
NiceBaseListQuery.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListQuery });
|
|
1057
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListQuery, decorators: [{
|
|
1058
|
-
type: i0.Injectable
|
|
1059
|
-
}], ctorParameters: function () { return [{ type: exports.NiceBaseListStore }]; } });
|
|
1060
|
-
|
|
1061
|
-
exports.FilterType = void 0;
|
|
1062
|
-
(function (FilterType) {
|
|
1063
|
-
FilterType["Text"] = "text";
|
|
1064
|
-
FilterType["Number"] = "number";
|
|
1065
|
-
FilterType["Date"] = "date";
|
|
1066
|
-
FilterType["Select"] = "select";
|
|
1067
|
-
FilterType["Radio"] = "radio";
|
|
1068
|
-
})(exports.FilterType || (exports.FilterType = {}));
|
|
1069
|
-
|
|
1070
|
-
exports.FilterOperatorTypes = void 0;
|
|
1071
|
-
(function (FilterOperatorTypes) {
|
|
1072
|
-
FilterOperatorTypes["Equal"] = "equal";
|
|
1073
|
-
FilterOperatorTypes["NotEqual"] = "not_equal";
|
|
1074
|
-
FilterOperatorTypes["In"] = "in";
|
|
1075
|
-
FilterOperatorTypes["NotIn"] = "not_in";
|
|
1076
|
-
FilterOperatorTypes["Less"] = "less";
|
|
1077
|
-
FilterOperatorTypes["LessOrEqual"] = "less_or_equal";
|
|
1078
|
-
FilterOperatorTypes["Greater"] = "greater";
|
|
1079
|
-
FilterOperatorTypes["GreaterOrEqual"] = "greater_or_equal";
|
|
1080
|
-
FilterOperatorTypes["Between"] = "between";
|
|
1081
|
-
FilterOperatorTypes["NotBetween"] = "not_between";
|
|
1082
|
-
FilterOperatorTypes["IsNull"] = "is_null";
|
|
1083
|
-
FilterOperatorTypes["IsNotNull"] = "is_not_null";
|
|
1084
|
-
FilterOperatorTypes["BeginsWith"] = "begins_with";
|
|
1085
|
-
FilterOperatorTypes["NotBeginsWith"] = "not_begins_with";
|
|
1086
|
-
FilterOperatorTypes["EndsWith"] = "ends_with";
|
|
1087
|
-
FilterOperatorTypes["NotEndsWith"] = "not_ends_with";
|
|
1088
|
-
FilterOperatorTypes["Contains"] = "contains";
|
|
1089
|
-
FilterOperatorTypes["NotContains"] = "not_contains";
|
|
1090
|
-
FilterOperatorTypes["IsEmpty"] = "is_empty";
|
|
1091
|
-
FilterOperatorTypes["IsNotEmpty"] = "is_not_empty";
|
|
1092
|
-
FilterOperatorTypes["None"] = "none";
|
|
1093
|
-
})(exports.FilterOperatorTypes || (exports.FilterOperatorTypes = {}));
|
|
1094
|
-
|
|
1095
|
-
var QBFilterUtils = /** @class */ (function () {
|
|
1096
|
-
function QBFilterUtils() {
|
|
1097
|
-
}
|
|
1098
|
-
QBFilterUtils.isSingleInput = function (filterOperator) {
|
|
1099
|
-
if (!filterOperator) {
|
|
1100
|
-
return false;
|
|
1101
|
-
}
|
|
1102
|
-
return QBFilterUtils.singleInputOperators.includes(filterOperator);
|
|
1103
|
-
};
|
|
1104
|
-
QBFilterUtils.isDoubleInput = function (filterOperator) {
|
|
1105
|
-
if (!filterOperator) {
|
|
1106
|
-
return false;
|
|
1107
|
-
}
|
|
1108
|
-
return QBFilterUtils.doubleInputOperators.includes(filterOperator);
|
|
1109
|
-
};
|
|
1110
|
-
QBFilterUtils.isNoInput = function (filterOperator) {
|
|
1111
|
-
if (!filterOperator) {
|
|
1112
|
-
return false;
|
|
1113
|
-
}
|
|
1114
|
-
return QBFilterUtils.noInputOperators.includes(filterOperator);
|
|
1115
|
-
};
|
|
1116
|
-
QBFilterUtils.createRule = function (config, operator) {
|
|
1117
|
-
var _a, _b, _c;
|
|
1118
|
-
var base = {
|
|
1119
|
-
id: config.id,
|
|
1120
|
-
operation: operator || config.operators[0].id
|
|
1121
|
-
};
|
|
1122
|
-
switch (config.type) {
|
|
1123
|
-
case exports.FilterType.Text:
|
|
1124
|
-
return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? ["", ""] : "" });
|
|
1125
|
-
case exports.FilterType.Select:
|
|
1126
|
-
return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [null, null] : null });
|
|
1127
|
-
case exports.FilterType.Date:
|
|
1128
|
-
return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [new Date(), new Date()] : new Date() });
|
|
1129
|
-
case exports.FilterType.Radio:
|
|
1130
|
-
return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator)
|
|
1131
|
-
? [(_a = config.options) === null || _a === void 0 ? void 0 : _a[0].key, (_b = config.options) === null || _b === void 0 ? void 0 : _b[0].key]
|
|
1132
|
-
: (_c = config.options) === null || _c === void 0 ? void 0 : _c[0].key });
|
|
1133
|
-
case exports.FilterType.Number:
|
|
1134
|
-
return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [0, 0] : 0 });
|
|
1135
|
-
}
|
|
1136
|
-
};
|
|
1137
|
-
QBFilterUtils.createQueryModel = function (config) {
|
|
1138
|
-
return {
|
|
1139
|
-
condition: "or",
|
|
1140
|
-
rules: [QBFilterUtils.createRule(config)]
|
|
1141
|
-
};
|
|
1142
|
-
};
|
|
1143
|
-
return QBFilterUtils;
|
|
1144
|
-
}());
|
|
1145
|
-
QBFilterUtils.noInputOperators = [
|
|
1146
|
-
exports.FilterOperatorTypes.IsEmpty,
|
|
1147
|
-
exports.FilterOperatorTypes.IsNotEmpty,
|
|
1148
|
-
exports.FilterOperatorTypes.IsNull,
|
|
1149
|
-
exports.FilterOperatorTypes.IsNotNull,
|
|
1150
|
-
exports.FilterOperatorTypes.None
|
|
1151
|
-
];
|
|
1152
|
-
QBFilterUtils.singleInputOperators = [
|
|
1153
|
-
exports.FilterOperatorTypes.Equal,
|
|
1154
|
-
exports.FilterOperatorTypes.NotEqual,
|
|
1155
|
-
exports.FilterOperatorTypes.Less,
|
|
1156
|
-
exports.FilterOperatorTypes.LessOrEqual,
|
|
1157
|
-
exports.FilterOperatorTypes.Greater,
|
|
1158
|
-
exports.FilterOperatorTypes.GreaterOrEqual,
|
|
1159
|
-
exports.FilterOperatorTypes.BeginsWith,
|
|
1160
|
-
exports.FilterOperatorTypes.NotBeginsWith,
|
|
1161
|
-
exports.FilterOperatorTypes.EndsWith,
|
|
1162
|
-
exports.FilterOperatorTypes.NotEndsWith,
|
|
1163
|
-
exports.FilterOperatorTypes.Contains,
|
|
1164
|
-
exports.FilterOperatorTypes.NotContains
|
|
1165
|
-
];
|
|
1166
|
-
QBFilterUtils.doubleInputOperators = [
|
|
1167
|
-
exports.FilterOperatorTypes.Between,
|
|
1168
|
-
exports.FilterOperatorTypes.NotBetween
|
|
1169
|
-
];
|
|
1170
|
-
|
|
1171
|
-
var NiceBaseListService = /** @class */ (function () {
|
|
1172
|
-
function NiceBaseListService(store, filterService, activatedRoute, router, appRef) {
|
|
1173
|
-
this.store = store;
|
|
1174
|
-
this.filterService = filterService;
|
|
1175
|
-
this.activatedRoute = activatedRoute;
|
|
1176
|
-
this.router = router;
|
|
1177
|
-
this.appRef = appRef;
|
|
1178
|
-
this.queryParamsLoaded$ = new rxjs.Subject();
|
|
1179
|
-
this.downloadFileName = "data";
|
|
1180
|
-
this.unsubscribeAll$ = new rxjs.Subject();
|
|
1181
|
-
this.loadingData = false;
|
|
1182
|
-
}
|
|
1183
|
-
NiceBaseListService.prototype.init = function () {
|
|
1184
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1185
|
-
var filterConfig, e_1;
|
|
1186
|
-
return __generator(this, function (_b) {
|
|
1187
|
-
switch (_b.label) {
|
|
1188
|
-
case 0:
|
|
1189
|
-
this.store.setFilterConfigLoading(true);
|
|
1190
|
-
_b.label = 1;
|
|
1191
|
-
case 1:
|
|
1192
|
-
_b.trys.push([1, 3, 4, 5]);
|
|
1193
|
-
return [4 /*yield*/, this.filterService.getFilterConfig().toPromise()];
|
|
1194
|
-
case 2:
|
|
1195
|
-
filterConfig = _b.sent();
|
|
1196
|
-
this.store.update({
|
|
1197
|
-
filterConfig: filterConfig
|
|
1198
|
-
});
|
|
1199
|
-
return [3 /*break*/, 5];
|
|
1200
|
-
case 3:
|
|
1201
|
-
e_1 = _b.sent();
|
|
1202
|
-
this.store.setError(e_1);
|
|
1203
|
-
return [3 /*break*/, 5];
|
|
1204
|
-
case 4:
|
|
1205
|
-
this.store.setFilterConfigLoading(false);
|
|
1206
|
-
return [7 /*endfinally*/];
|
|
1207
|
-
case 5: return [2 /*return*/];
|
|
1208
|
-
}
|
|
1209
|
-
});
|
|
1210
|
-
});
|
|
1211
|
-
};
|
|
1212
|
-
NiceBaseListService.prototype.resetStore = function () {
|
|
1213
|
-
this.store.reset();
|
|
1214
|
-
};
|
|
1215
|
-
NiceBaseListService.prototype.resetData = function () {
|
|
1216
|
-
this.store.update({
|
|
1217
|
-
filterResult: null
|
|
1218
|
-
});
|
|
1219
|
-
};
|
|
1220
|
-
NiceBaseListService.prototype.closeSubscriptions = function () {
|
|
1221
|
-
this.unsubscribeAll$.next();
|
|
1222
|
-
this.unsubscribeAll$.complete();
|
|
1223
|
-
this.queryParamsLoaded$.complete();
|
|
1224
|
-
};
|
|
1225
|
-
NiceBaseListService.prototype.disableList = function () {
|
|
1226
|
-
this.store.update({
|
|
1227
|
-
disabled: true
|
|
1228
|
-
});
|
|
1229
|
-
};
|
|
1230
|
-
NiceBaseListService.prototype.enableList = function () {
|
|
1231
|
-
this.store.update({
|
|
1232
|
-
disabled: false
|
|
1233
|
-
});
|
|
1234
|
-
};
|
|
1235
|
-
NiceBaseListService.prototype.setLoading = function (loading) {
|
|
1236
|
-
this.store.setLoading(loading);
|
|
1237
|
-
};
|
|
1238
|
-
NiceBaseListService.prototype.setMode = function (mode) {
|
|
1239
|
-
this.store.update({
|
|
1240
|
-
mergePageResults: mode === "infinite-scroll"
|
|
1241
|
-
});
|
|
1242
|
-
};
|
|
1243
|
-
NiceBaseListService.prototype.loadQueryParams = function (autoLoad) {
|
|
1244
|
-
var _this = this;
|
|
1245
|
-
var _a;
|
|
1246
|
-
(_a = this.activatedRoute) === null || _a === void 0 ? void 0 : _a.queryParams.pipe(operators.takeUntil(this.unsubscribeAll$), operators.map(function (params) {
|
|
1247
|
-
return {
|
|
1248
|
-
params: QueryParamsUtils.extractFilterParameters(params)
|
|
1249
|
-
};
|
|
1250
|
-
})).subscribe(function (_b) {
|
|
1251
|
-
var params = _b.params;
|
|
1252
|
-
if (!params || Object.keys(params).length === 0) {
|
|
1253
|
-
params = _this.store.getValue().filterParameters;
|
|
1254
|
-
}
|
|
1255
|
-
var _c = _this.store.getValue(), filterParameters = _c.filterParameters, filterResult = _c.filterResult;
|
|
1256
|
-
if (FilterUtils.filterChangeNeedsRefresh(filterParameters, params) ||
|
|
1257
|
-
!filterResult) {
|
|
1258
|
-
if (autoLoad) {
|
|
1259
|
-
_this.loadData(params, false);
|
|
1260
|
-
}
|
|
1261
|
-
else {
|
|
1262
|
-
_this.setParameters(params, false);
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
_this.queryParamsLoaded$.next();
|
|
1266
|
-
});
|
|
1267
|
-
};
|
|
1268
|
-
NiceBaseListService.prototype.resetAndLoadData = function (parameters, updateQueryParams) {
|
|
1269
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1270
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1271
|
-
return __generator(this, function (_b) {
|
|
1272
|
-
return [2 /*return*/, this.loadData(parameters, updateQueryParams, true)];
|
|
1273
|
-
});
|
|
1274
|
-
});
|
|
1275
|
-
};
|
|
1276
|
-
NiceBaseListService.prototype.loadData = function (parameters, updateQueryParams, reset) {
|
|
1277
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1278
|
-
if (reset === void 0) { reset = false; }
|
|
1279
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1280
|
-
var disabled, filterParameters, result, e_2;
|
|
1281
|
-
return __generator(this, function (_b) {
|
|
1282
|
-
switch (_b.label) {
|
|
1283
|
-
case 0:
|
|
1284
|
-
disabled = this.store.getValue().disabled;
|
|
1285
|
-
_b.label = 1;
|
|
1286
|
-
case 1:
|
|
1287
|
-
_b.trys.push([1, 4, 5, 6]);
|
|
1288
|
-
filterParameters = this.mergeParameters(parameters);
|
|
1289
|
-
if (!!disabled) return [3 /*break*/, 3];
|
|
1290
|
-
this.store.setLoading(true);
|
|
1291
|
-
this.loadingData = true;
|
|
1292
|
-
return [4 /*yield*/, this.filterService.filter(this.getParameters(filterParameters)).toPromise()];
|
|
1293
|
-
case 2:
|
|
1294
|
-
result = _b.sent();
|
|
1295
|
-
this.store.setResult(result, reset);
|
|
1296
|
-
_b.label = 3;
|
|
1297
|
-
case 3:
|
|
1298
|
-
if (filterParameters) {
|
|
1299
|
-
this.setParameters(filterParameters, disabled ? false : updateQueryParams);
|
|
1300
|
-
}
|
|
1301
|
-
return [3 /*break*/, 6];
|
|
1302
|
-
case 4:
|
|
1303
|
-
e_2 = _b.sent();
|
|
1304
|
-
this.store.setError(e_2);
|
|
1305
|
-
return [3 /*break*/, 6];
|
|
1306
|
-
case 5:
|
|
1307
|
-
this.store.setLoading(false);
|
|
1308
|
-
this.loadingData = false;
|
|
1309
|
-
return [7 /*endfinally*/];
|
|
1310
|
-
case 6: return [2 /*return*/];
|
|
1311
|
-
}
|
|
1312
|
-
});
|
|
1313
|
-
});
|
|
1314
|
-
};
|
|
1315
|
-
NiceBaseListService.prototype.searchData = function (search) {
|
|
1316
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1317
|
-
var filterParameters;
|
|
1318
|
-
return __generator(this, function (_b) {
|
|
1319
|
-
switch (_b.label) {
|
|
1320
|
-
case 0:
|
|
1321
|
-
filterParameters = this.store.getValue().filterParameters;
|
|
1322
|
-
return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { search: search }))];
|
|
1323
|
-
case 1:
|
|
1324
|
-
_b.sent();
|
|
1325
|
-
return [2 /*return*/];
|
|
1326
|
-
}
|
|
1327
|
-
});
|
|
1328
|
-
});
|
|
1329
|
-
};
|
|
1330
|
-
NiceBaseListService.prototype.loadNewPage = function (start, length) {
|
|
1331
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1332
|
-
var filterParameters;
|
|
1333
|
-
return __generator(this, function (_b) {
|
|
1334
|
-
switch (_b.label) {
|
|
1335
|
-
case 0:
|
|
1336
|
-
filterParameters = this.store.getValue().filterParameters;
|
|
1337
|
-
return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: start,
|
|
1338
|
-
length: length }))];
|
|
1339
|
-
case 1:
|
|
1340
|
-
_b.sent();
|
|
1341
|
-
return [2 /*return*/];
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
});
|
|
1345
|
-
};
|
|
1346
|
-
NiceBaseListService.prototype.loadNextPage = function () {
|
|
1347
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1348
|
-
var filterParameters;
|
|
1349
|
-
return __generator(this, function (_b) {
|
|
1350
|
-
switch (_b.label) {
|
|
1351
|
-
case 0:
|
|
1352
|
-
filterParameters = this.store.getValue().filterParameters;
|
|
1353
|
-
return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: filterParameters.start + filterParameters.length }))];
|
|
1354
|
-
case 1:
|
|
1355
|
-
_b.sent();
|
|
1356
|
-
return [2 /*return*/];
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
});
|
|
1360
|
-
};
|
|
1361
|
-
NiceBaseListService.prototype.resetPaging = function () {
|
|
1362
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1363
|
-
var filterParameters;
|
|
1364
|
-
return __generator(this, function (_b) {
|
|
1365
|
-
filterParameters = this.store.getValue().filterParameters;
|
|
1366
|
-
this.store.setParameters(Object.assign(Object.assign({}, filterParameters), { start: 0 }));
|
|
1367
|
-
this.store.update({
|
|
1368
|
-
resetPaging: true
|
|
1369
|
-
});
|
|
1370
|
-
return [2 /*return*/];
|
|
1371
|
-
});
|
|
1372
|
-
});
|
|
1373
|
-
};
|
|
1374
|
-
NiceBaseListService.prototype.downloadData = function (type, parameters, updateQueryParams) {
|
|
1375
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1376
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1377
|
-
var filterParameters, result, e_3;
|
|
1378
|
-
return __generator(this, function (_b) {
|
|
1379
|
-
switch (_b.label) {
|
|
1380
|
-
case 0:
|
|
1381
|
-
_b.trys.push([0, 2, 3, 4]);
|
|
1382
|
-
this.store.setLoading(true);
|
|
1383
|
-
this.loadingData = true;
|
|
1384
|
-
filterParameters = this.mergeParameters(parameters);
|
|
1385
|
-
if (filterParameters) {
|
|
1386
|
-
this.setParameters(filterParameters, updateQueryParams);
|
|
1387
|
-
}
|
|
1388
|
-
return [4 /*yield*/, this.filterService.getFile(type, this.getParameters(filterParameters)).toPromise()];
|
|
1389
|
-
case 1:
|
|
1390
|
-
result = _b.sent();
|
|
1391
|
-
i18.FileUtils.downloadFile(this.downloadFileName + "." + type, result);
|
|
1392
|
-
return [3 /*break*/, 4];
|
|
1393
|
-
case 2:
|
|
1394
|
-
e_3 = _b.sent();
|
|
1395
|
-
this.store.setError(e_3);
|
|
1396
|
-
return [3 /*break*/, 4];
|
|
1397
|
-
case 3:
|
|
1398
|
-
this.store.setLoading(false);
|
|
1399
|
-
this.loadingData = false;
|
|
1400
|
-
return [7 /*endfinally*/];
|
|
1401
|
-
case 4: return [2 /*return*/];
|
|
1402
|
-
}
|
|
1403
|
-
});
|
|
1404
|
-
});
|
|
1405
|
-
};
|
|
1406
|
-
NiceBaseListService.prototype.printData = function (parameters, updateQueryParams) {
|
|
1407
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1408
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1409
|
-
var filterParameters, result, e_4;
|
|
1410
|
-
return __generator(this, function (_b) {
|
|
1411
|
-
switch (_b.label) {
|
|
1412
|
-
case 0:
|
|
1413
|
-
_b.trys.push([0, 2, 3, 4]);
|
|
1414
|
-
this.store.setLoading(true);
|
|
1415
|
-
this.loadingData = true;
|
|
1416
|
-
filterParameters = this.mergeParameters(parameters);
|
|
1417
|
-
if (filterParameters) {
|
|
1418
|
-
this.setParameters(filterParameters, updateQueryParams);
|
|
1419
|
-
}
|
|
1420
|
-
return [4 /*yield*/, this.filterService.getPrintableHtml(this.getParameters(filterParameters)).toPromise()];
|
|
1421
|
-
case 1:
|
|
1422
|
-
result = _b.sent();
|
|
1423
|
-
i18.FileUtils.openPrintableWindow(result);
|
|
1424
|
-
return [3 /*break*/, 4];
|
|
1425
|
-
case 2:
|
|
1426
|
-
e_4 = _b.sent();
|
|
1427
|
-
this.store.setError(e_4);
|
|
1428
|
-
return [3 /*break*/, 4];
|
|
1429
|
-
case 3:
|
|
1430
|
-
this.store.setLoading(false);
|
|
1431
|
-
this.loadingData = false;
|
|
1432
|
-
return [7 /*endfinally*/];
|
|
1433
|
-
case 4: return [2 /*return*/];
|
|
1434
|
-
}
|
|
1435
|
-
});
|
|
1436
|
-
});
|
|
1437
|
-
};
|
|
1438
|
-
NiceBaseListService.prototype.updateRule = function (id, newRule) {
|
|
1439
|
-
var _a;
|
|
1440
|
-
var filterParameters = this.store.getValue().filterParameters;
|
|
1441
|
-
var rules = (_a = filterParameters.rules) === null || _a === void 0 ? void 0 : _a[0];
|
|
1442
|
-
if (!rules || rules.rules.length === 0) {
|
|
1443
|
-
this.updateRules([newRule]);
|
|
1444
|
-
return;
|
|
1445
|
-
}
|
|
1446
|
-
var oldRule = rules.rules.find(function (r) { return r.id === id; });
|
|
1447
|
-
var newRules = rules.rules;
|
|
1448
|
-
if (oldRule) {
|
|
1449
|
-
if (newRule) {
|
|
1450
|
-
// Array replace
|
|
1451
|
-
newRules = __spreadArray(__spreadArray(__spreadArray([], __read(rules.rules.slice(0, rules.rules.indexOf(oldRule)))), [
|
|
1452
|
-
newRule
|
|
1453
|
-
]), __read(rules.rules.slice(rules.rules.indexOf(oldRule) + 1, rules.rules.length)));
|
|
1454
|
-
}
|
|
1455
|
-
else {
|
|
1456
|
-
newRules = rules.rules.filter(function (r) { return r.id !== id; });
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
else {
|
|
1460
|
-
newRules = __spreadArray(__spreadArray([], __read(newRules)), [newRule]);
|
|
1461
|
-
}
|
|
1462
|
-
this.updateRules(newRules);
|
|
1463
|
-
};
|
|
1464
|
-
NiceBaseListService.prototype.updateDefaultRules = function (rule) {
|
|
1465
|
-
this.store.update({
|
|
1466
|
-
defaultRules: rule
|
|
1467
|
-
});
|
|
1468
|
-
};
|
|
1469
|
-
NiceBaseListService.prototype.updateGlobalRules = function (rules, updateQueryParams) {
|
|
1470
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1471
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1472
|
-
var filterParameters, newRules;
|
|
1473
|
-
return __generator(this, function (_b) {
|
|
1474
|
-
switch (_b.label) {
|
|
1475
|
-
case 0:
|
|
1476
|
-
filterParameters = this.store.getValue().filterParameters;
|
|
1477
|
-
newRules = Object.assign(Object.assign({}, filterParameters), { rules: rules });
|
|
1478
|
-
return [4 /*yield*/, this.loadData(newRules, updateQueryParams)];
|
|
1479
|
-
case 1:
|
|
1480
|
-
_b.sent();
|
|
1481
|
-
return [2 /*return*/];
|
|
1482
|
-
}
|
|
1483
|
-
});
|
|
1484
|
-
});
|
|
1485
|
-
};
|
|
1486
|
-
NiceBaseListService.prototype.addRuleFromConfig = function (config) {
|
|
1487
|
-
var filterParameters = this.store.getValue().filterParameters;
|
|
1488
|
-
var newRules = Object.assign(Object.assign({}, filterParameters), { rules: __spreadArray(__spreadArray([], __read(filterParameters.rules)), [
|
|
1489
|
-
QBFilterUtils.createQueryModel(config)
|
|
1490
|
-
]) });
|
|
1491
|
-
this.store.update({
|
|
1492
|
-
showQueryBuilder: true
|
|
1493
|
-
});
|
|
1494
|
-
this.loadData(newRules, true);
|
|
1495
|
-
};
|
|
1496
|
-
NiceBaseListService.prototype.updateRules = function (rules) {
|
|
1497
|
-
var filterParameters = this.store.getValue().filterParameters;
|
|
1498
|
-
var newRules = {
|
|
1499
|
-
order: filterParameters.order,
|
|
1500
|
-
rules: [
|
|
1501
|
-
{
|
|
1502
|
-
condition: "and",
|
|
1503
|
-
rules: rules
|
|
1504
|
-
}
|
|
1505
|
-
]
|
|
1506
|
-
};
|
|
1507
|
-
this.loadData(newRules, true);
|
|
1508
|
-
};
|
|
1509
|
-
NiceBaseListService.prototype.toggleQueryBuilder = function () {
|
|
1510
|
-
this.store.update(function (state) { return ({
|
|
1511
|
-
showQueryBuilder: !state.showQueryBuilder
|
|
1512
|
-
}); });
|
|
1513
|
-
};
|
|
1514
|
-
NiceBaseListService.prototype.updateListValue = function (value, key) {
|
|
1515
|
-
if (key === void 0) { key = "id"; }
|
|
1516
|
-
var filterResult = this.store.getValue().filterResult;
|
|
1517
|
-
if (!filterResult) {
|
|
1518
|
-
return;
|
|
1519
|
-
}
|
|
1520
|
-
this.store.update({
|
|
1521
|
-
filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayUpsert(filterResult.values, value[key], value) })
|
|
1522
|
-
});
|
|
1523
|
-
};
|
|
1524
|
-
NiceBaseListService.prototype.removeListValue = function (value, key) {
|
|
1525
|
-
if (key === void 0) { key = "id"; }
|
|
1526
|
-
var filterResult = this.store.getValue().filterResult;
|
|
1527
|
-
if (!filterResult) {
|
|
1528
|
-
return;
|
|
1529
|
-
}
|
|
1530
|
-
this.store.update({
|
|
1531
|
-
filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayRemove(filterResult.values, value[key]) })
|
|
1532
|
-
});
|
|
1533
|
-
};
|
|
1534
|
-
NiceBaseListService.prototype.updateQueryParams = function (queryParams) {
|
|
1535
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1536
|
-
return __generator(this, function (_b) {
|
|
1537
|
-
switch (_b.label) {
|
|
1538
|
-
case 0:
|
|
1539
|
-
if (!this.activatedRoute) {
|
|
1540
|
-
return [2 /*return*/];
|
|
1541
|
-
}
|
|
1542
|
-
return [4 /*yield*/, this.router.navigate([], {
|
|
1543
|
-
relativeTo: this.activatedRoute,
|
|
1544
|
-
queryParams: queryParams,
|
|
1545
|
-
queryParamsHandling: "merge"
|
|
1546
|
-
})];
|
|
1547
|
-
case 1:
|
|
1548
|
-
_b.sent();
|
|
1549
|
-
return [2 /*return*/];
|
|
1550
|
-
}
|
|
1551
|
-
});
|
|
1552
|
-
});
|
|
1553
|
-
};
|
|
1554
|
-
NiceBaseListService.prototype.getParameters = function (filterParameters) {
|
|
1555
|
-
var defaultRules = this.store.getValue().defaultRules;
|
|
1556
|
-
var parameters = Object.assign(Object.assign({}, filterParameters), { rules: (filterParameters === null || filterParameters === void 0 ? void 0 : filterParameters.rules) ? __spreadArray([], __read(filterParameters.rules)) : [] });
|
|
1557
|
-
if (defaultRules === null || defaultRules === void 0 ? void 0 : defaultRules.length) {
|
|
1558
|
-
parameters.rules.push({
|
|
1559
|
-
condition: "and",
|
|
1560
|
-
rules: defaultRules
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
return parameters;
|
|
1564
|
-
};
|
|
1565
|
-
NiceBaseListService.prototype.mergeParameters = function (parameters) {
|
|
1566
|
-
var filterParameters = this.store.getValue().filterParameters;
|
|
1567
|
-
if (!parameters) {
|
|
1568
|
-
return filterParameters;
|
|
1569
|
-
}
|
|
1570
|
-
return Object.assign(Object.assign(Object.assign({}, filterParameters), parameters), { order: filterParameters.order && !parameters.order
|
|
1571
|
-
? undefined
|
|
1572
|
-
: Object.assign(Object.assign({}, filterParameters.order), parameters.order) });
|
|
1573
|
-
};
|
|
1574
|
-
NiceBaseListService.prototype.setParameters = function (parameters, updateQueryParams) {
|
|
1575
|
-
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1576
|
-
this.store.setParameters(parameters);
|
|
1577
|
-
if (updateQueryParams) {
|
|
1578
|
-
this.updateQueryParams(QueryParamsUtils.filterParametersToParamsMap(parameters));
|
|
1579
|
-
}
|
|
1580
|
-
};
|
|
1581
|
-
return NiceBaseListService;
|
|
1582
|
-
}());
|
|
1583
|
-
NiceBaseListService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService, deps: [{ token: exports.NiceBaseListStore }, { token: NiceFilterService }, { token: i3__namespace.ActivatedRoute }, { token: i3__namespace.Router }, { token: i0__namespace.ApplicationRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1584
|
-
NiceBaseListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService });
|
|
1585
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService, decorators: [{
|
|
1586
|
-
type: i0.Injectable
|
|
1587
|
-
}], ctorParameters: function () { return [{ type: exports.NiceBaseListStore }, { type: NiceFilterService }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }]; } });
|
|
1588
|
-
|
|
1589
|
-
var QueryRuleForm = /** @class */ (function () {
|
|
1590
|
-
function QueryRuleForm(rule) {
|
|
1591
|
-
if (!rule) {
|
|
1592
|
-
return;
|
|
1593
|
-
}
|
|
1594
|
-
this.id = rule.id;
|
|
1595
|
-
this.operation = rule.operation;
|
|
1596
|
-
if (QBFilterUtils.isDoubleInput(rule.operation)) {
|
|
1597
|
-
this.value = rule.value[0];
|
|
1598
|
-
this.secondValue = rule.value[1];
|
|
1599
|
-
}
|
|
1600
|
-
else {
|
|
1601
|
-
this.value = rule.value;
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
QueryRuleForm.prototype.transform = function () {
|
|
1605
|
-
return {
|
|
1606
|
-
id: this.id,
|
|
1607
|
-
operation: this.operation,
|
|
1608
|
-
value: this.secondValue === undefined ? this.value : [this.value, this.secondValue]
|
|
1609
|
-
};
|
|
1610
|
-
};
|
|
1611
|
-
return QueryRuleForm;
|
|
1612
|
-
}());
|
|
1613
|
-
__decorate([
|
|
1614
|
-
i1.Control(),
|
|
1615
|
-
i1.Required(),
|
|
1616
|
-
__metadata("design:type", String)
|
|
1617
|
-
], QueryRuleForm.prototype, "id", void 0);
|
|
1618
|
-
__decorate([
|
|
1619
|
-
i1.Control(),
|
|
1620
|
-
i1.Required(),
|
|
1621
|
-
__metadata("design:type", String)
|
|
1622
|
-
], QueryRuleForm.prototype, "operation", void 0);
|
|
1623
|
-
__decorate([
|
|
1624
|
-
i1.Control(),
|
|
1625
|
-
i1.Required(),
|
|
1626
|
-
__metadata("design:type", Object)
|
|
1627
|
-
], QueryRuleForm.prototype, "value", void 0);
|
|
1628
|
-
__decorate([
|
|
1629
|
-
i1.Control(),
|
|
1630
|
-
i1.Required(),
|
|
1631
|
-
__metadata("design:type", Object)
|
|
1632
|
-
], QueryRuleForm.prototype, "secondValue", void 0);
|
|
1633
|
-
var QueryForm = /** @class */ (function () {
|
|
1634
|
-
function QueryForm() {
|
|
1635
|
-
}
|
|
1636
|
-
return QueryForm;
|
|
1637
|
-
}());
|
|
1638
|
-
__decorate([
|
|
1639
|
-
i1.Control(),
|
|
1640
|
-
i1.Required(),
|
|
1641
|
-
__metadata("design:type", String)
|
|
1642
|
-
], QueryForm.prototype, "condition", void 0);
|
|
1643
|
-
__decorate([
|
|
1644
|
-
i1.Array(QueryRuleForm),
|
|
1645
|
-
__metadata("design:type", i1.Array)
|
|
1646
|
-
], QueryForm.prototype, "rules", void 0);
|
|
1647
|
-
var QueryBuilderForm = /** @class */ (function () {
|
|
1648
|
-
function QueryBuilderForm(rules) {
|
|
1649
|
-
if (!rules) {
|
|
1650
|
-
rules = [];
|
|
1651
|
-
}
|
|
1652
|
-
this.rules = rules.map(function (x) { return ({
|
|
1653
|
-
condition: x.condition,
|
|
1654
|
-
rules: x.rules.map(function (rule) { return new QueryRuleForm(rule); })
|
|
1655
|
-
}); });
|
|
1656
|
-
}
|
|
1657
|
-
QueryBuilderForm.prototype.transform = function () {
|
|
1658
|
-
return this.rules.map(function (x) { return ({
|
|
1659
|
-
condition: x.condition,
|
|
1660
|
-
rules: x.rules.map(function (rule) { return rule.transform(); })
|
|
1661
|
-
}); });
|
|
1662
|
-
};
|
|
1663
|
-
return QueryBuilderForm;
|
|
1664
|
-
}());
|
|
1665
|
-
__decorate([
|
|
1666
|
-
i1.Array(QueryForm),
|
|
1667
|
-
__metadata("design:type", i1.Array)
|
|
1668
|
-
], QueryBuilderForm.prototype, "rules", void 0);
|
|
1669
|
-
|
|
1670
|
-
var FilterComponent = /** @class */ (function () {
|
|
1671
|
-
function FilterComponent() {
|
|
1672
|
-
this.propagateChanges = function (_) { };
|
|
1673
|
-
}
|
|
1674
|
-
Object.defineProperty(FilterComponent.prototype, "value", {
|
|
1675
|
-
get: function () {
|
|
1676
|
-
return this._value;
|
|
1677
|
-
},
|
|
1678
|
-
enumerable: false,
|
|
1679
|
-
configurable: true
|
|
1680
|
-
});
|
|
1681
|
-
FilterComponent.prototype.registerOnTouched = function (fn) {
|
|
1682
|
-
// NO-OP
|
|
1683
|
-
};
|
|
1684
|
-
FilterComponent.prototype.registerOnChange = function (fn) {
|
|
1685
|
-
this.propagateChanges = fn;
|
|
1686
|
-
};
|
|
1687
|
-
FilterComponent.prototype.writeValue = function (value) {
|
|
1688
|
-
this._value = value;
|
|
1689
|
-
};
|
|
1690
|
-
FilterComponent.prototype.onValueChange = function (value) {
|
|
1691
|
-
this.propagateChanges(value);
|
|
1692
|
-
};
|
|
1693
|
-
return FilterComponent;
|
|
1694
|
-
}());
|
|
1695
|
-
FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1696
|
-
FilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: FilterComponent, selector: "ng-component", ngImport: i0__namespace, template: "", isInline: true });
|
|
1697
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, decorators: [{
|
|
1698
|
-
type: i0.Component,
|
|
1699
|
-
args: [{ template: "" }]
|
|
1700
|
-
}] });
|
|
1701
|
-
|
|
1702
|
-
var TextFilterComponent = /** @class */ (function (_super) {
|
|
1703
|
-
__extends(TextFilterComponent, _super);
|
|
1704
|
-
function TextFilterComponent() {
|
|
1705
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1706
|
-
}
|
|
1707
|
-
return TextFilterComponent;
|
|
1708
|
-
}(FilterComponent));
|
|
1709
|
-
TextFilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: TextFilterComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1710
|
-
TextFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: TextFilterComponent, selector: "nice-text-filter", inputs: { filterConfig: "filterConfig" }, providers: [
|
|
1711
|
-
{
|
|
1712
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1713
|
-
useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
|
|
1714
|
-
multi: true
|
|
1715
|
-
}
|
|
1716
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" [mask]=\"(filterConfig?.mask) || ''\" [validation]=\"false\" type=\"text\" />\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1717
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: TextFilterComponent, decorators: [{
|
|
1718
|
-
type: i0.Component,
|
|
1719
|
-
args: [{
|
|
1720
|
-
selector: "nice-text-filter",
|
|
1721
|
-
templateUrl: "text-filter.template.html",
|
|
1722
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1723
|
-
providers: [
|
|
1724
|
-
{
|
|
1725
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1726
|
-
useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
|
|
1727
|
-
multi: true
|
|
1728
|
-
}
|
|
1729
|
-
]
|
|
1730
|
-
}]
|
|
1731
|
-
}], propDecorators: { filterConfig: [{
|
|
1732
|
-
type: i0.Input
|
|
1733
|
-
}] } });
|
|
1734
|
-
|
|
1735
|
-
var NumberFilterComponent = /** @class */ (function (_super) {
|
|
1736
|
-
__extends(NumberFilterComponent, _super);
|
|
1737
|
-
function NumberFilterComponent() {
|
|
1738
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1739
|
-
}
|
|
1740
|
-
return NumberFilterComponent;
|
|
1741
|
-
}(FilterComponent));
|
|
1742
|
-
NumberFilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NumberFilterComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1743
|
-
NumberFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NumberFilterComponent, selector: "nice-number-filter", providers: [
|
|
1744
|
-
{
|
|
1745
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1746
|
-
useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
|
|
1747
|
-
multi: true
|
|
1748
|
-
}
|
|
1749
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i1__namespace$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1750
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NumberFilterComponent, decorators: [{
|
|
1751
|
-
type: i0.Component,
|
|
1752
|
-
args: [{
|
|
1753
|
-
selector: "nice-number-filter",
|
|
1754
|
-
templateUrl: "number-filter.template.html",
|
|
1755
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1756
|
-
providers: [
|
|
1757
|
-
{
|
|
1758
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1759
|
-
useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
|
|
1760
|
-
multi: true
|
|
1761
|
-
}
|
|
1762
|
-
]
|
|
1763
|
-
}]
|
|
1764
|
-
}] });
|
|
1765
|
-
|
|
1766
|
-
var RadioFilterComponent = /** @class */ (function (_super) {
|
|
1767
|
-
__extends(RadioFilterComponent, _super);
|
|
1768
|
-
function RadioFilterComponent() {
|
|
1769
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1770
|
-
}
|
|
1771
|
-
return RadioFilterComponent;
|
|
1772
|
-
}(FilterComponent));
|
|
1773
|
-
RadioFilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RadioFilterComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1774
|
-
RadioFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: { filterConfig: "filterConfig" }, providers: [
|
|
1775
|
-
{
|
|
1776
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1777
|
-
useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
|
|
1778
|
-
multi: true
|
|
1779
|
-
}
|
|
1780
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<mat-radio-group fxFlex [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\">\n <mat-radio-button class=\"mx-16\" *ngFor=\"let option of filterConfig.options\" [value]=\"option?.key\">\n {{ option?.name }}\n </mat-radio-button>\n</mat-radio-group>\n", components: [{ type: i1__namespace$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], directives: [{ type: i1__namespace$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1781
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RadioFilterComponent, decorators: [{
|
|
1782
|
-
type: i0.Component,
|
|
1783
|
-
args: [{
|
|
1784
|
-
selector: "nice-radio-filter",
|
|
1785
|
-
templateUrl: "radio-filter.template.html",
|
|
1786
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1787
|
-
providers: [
|
|
1788
|
-
{
|
|
1789
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1790
|
-
useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
|
|
1791
|
-
multi: true
|
|
1792
|
-
}
|
|
1793
|
-
]
|
|
1794
|
-
}]
|
|
1795
|
-
}], propDecorators: { filterConfig: [{
|
|
1796
|
-
type: i0.Input
|
|
1797
|
-
}] } });
|
|
1798
|
-
|
|
1799
|
-
var SelectFilterComponent = /** @class */ (function (_super) {
|
|
1800
|
-
__extends(SelectFilterComponent, _super);
|
|
1801
|
-
function SelectFilterComponent(filterService) {
|
|
1802
|
-
var _this = _super.call(this) || this;
|
|
1803
|
-
_this.filterService = filterService;
|
|
1804
|
-
_this.values = [];
|
|
1805
|
-
_this.search$ = new rxjs.Subject();
|
|
1806
|
-
return _this;
|
|
1807
|
-
}
|
|
1808
|
-
SelectFilterComponent.prototype.ngOnInit = function () {
|
|
1809
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1810
|
-
var _this = this;
|
|
1811
|
-
return __generator(this, function (_a) {
|
|
1812
|
-
if (!this.filterConfig.lazyLoading) {
|
|
1813
|
-
this.values = this.filterConfig.values;
|
|
1814
|
-
}
|
|
1815
|
-
this.searchSub$ = this.search$
|
|
1816
|
-
.pipe(operators.debounceTime(300), operators.switchMap(function (value) {
|
|
1817
|
-
if (_this.filterConfig.lazyLoading) {
|
|
1818
|
-
return _this.filterService.searchFilterValue(_this.filterConfig, value);
|
|
1819
|
-
}
|
|
1820
|
-
return rxjs.of(_this.filterConfig.values);
|
|
1821
|
-
}))
|
|
1822
|
-
.subscribe(function (values) {
|
|
1823
|
-
_this.values = values;
|
|
1824
|
-
});
|
|
1825
|
-
return [2 /*return*/];
|
|
1826
|
-
});
|
|
1827
|
-
});
|
|
1828
|
-
};
|
|
1829
|
-
SelectFilterComponent.prototype.ngOnChanges = function (changes) {
|
|
1830
|
-
if ("filterConfig" in changes) {
|
|
1831
|
-
if (!this.filterConfig.lazyLoading) {
|
|
1832
|
-
this.values = this.filterConfig.values;
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
};
|
|
1836
|
-
SelectFilterComponent.prototype.searchValue = function () {
|
|
1837
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1838
|
-
var value;
|
|
1839
|
-
var _this = this;
|
|
1840
|
-
return __generator(this, function (_a) {
|
|
1841
|
-
switch (_a.label) {
|
|
1842
|
-
case 0:
|
|
1843
|
-
if (!(this.value && !this.values.find(function (v) { return v.id === _this.value; }))) return [3 /*break*/, 2];
|
|
1844
|
-
return [4 /*yield*/, this.filterService
|
|
1845
|
-
.searchFilterResourceValue(this.filterConfig, this.value)
|
|
1846
|
-
.toPromise()];
|
|
1847
|
-
case 1:
|
|
1848
|
-
value = _a.sent();
|
|
1849
|
-
this.values = __spreadArray(__spreadArray([], __read(this.values)), [value]);
|
|
1850
|
-
_a.label = 2;
|
|
1851
|
-
case 2: return [2 /*return*/];
|
|
1852
|
-
}
|
|
1853
|
-
});
|
|
1854
|
-
});
|
|
1855
|
-
};
|
|
1856
|
-
SelectFilterComponent.prototype.onValueChange = function (value) {
|
|
1857
|
-
_super.prototype.onValueChange.call(this, value);
|
|
1858
|
-
this.searchValue();
|
|
1859
|
-
};
|
|
1860
|
-
SelectFilterComponent.prototype.ngOnDestroy = function () {
|
|
1861
|
-
this.searchSub$.unsubscribe();
|
|
1862
|
-
};
|
|
1863
|
-
SelectFilterComponent.prototype.writeValue = function (value) {
|
|
1864
|
-
_super.prototype.writeValue.call(this, value);
|
|
1865
|
-
this.searchValue();
|
|
1866
|
-
};
|
|
1867
|
-
return SelectFilterComponent;
|
|
1868
|
-
}(FilterComponent));
|
|
1869
|
-
SelectFilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: SelectFilterComponent, deps: [{ token: NiceFilterService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1870
|
-
SelectFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: SelectFilterComponent, selector: "nice-select-filter", inputs: { filterConfig: "filterConfig" }, providers: [
|
|
1871
|
-
{
|
|
1872
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1873
|
-
useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
|
|
1874
|
-
multi: true
|
|
1875
|
-
}
|
|
1876
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <nice-typeahead\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n [typeahead]=\"search$\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i18__namespace.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "loading", "loadingPage", "bindValue", "bindLabel", "typeahead", "page$", "searchFn", "optionTemplate"], outputs: ["change"] }], directives: [{ type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1877
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: SelectFilterComponent, decorators: [{
|
|
1878
|
-
type: i0.Component,
|
|
1879
|
-
args: [{
|
|
1880
|
-
selector: "nice-select-filter",
|
|
1881
|
-
templateUrl: "select-filter.template.html",
|
|
1882
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1883
|
-
providers: [
|
|
1884
|
-
{
|
|
1885
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1886
|
-
useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
|
|
1887
|
-
multi: true
|
|
1888
|
-
}
|
|
1889
|
-
]
|
|
1890
|
-
}]
|
|
1891
|
-
}], ctorParameters: function () {
|
|
1892
|
-
return [{ type: NiceFilterService, decorators: [{
|
|
1893
|
-
type: i0.Optional
|
|
1894
|
-
}] }];
|
|
1895
|
-
}, propDecorators: { filterConfig: [{
|
|
1896
|
-
type: i0.Input
|
|
1897
|
-
}] } });
|
|
1898
|
-
|
|
1899
|
-
var DateFilterComponent = /** @class */ (function (_super) {
|
|
1900
|
-
__extends(DateFilterComponent, _super);
|
|
1901
|
-
function DateFilterComponent() {
|
|
1902
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1903
|
-
}
|
|
1904
|
-
return DateFilterComponent;
|
|
1905
|
-
}(FilterComponent));
|
|
1906
|
-
DateFilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: DateFilterComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1907
|
-
DateFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: DateFilterComponent, selector: "nice-date-filter", providers: [
|
|
1908
|
-
{
|
|
1909
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1910
|
-
useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
|
|
1911
|
-
multi: true
|
|
1912
|
-
}
|
|
1913
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <input matInput [matDatepicker]=\"picker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2__namespace.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["tabIndex", "disabled", "for", "aria-label", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i2__namespace.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2__namespace.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace.MatSuffix, selector: "[matSuffix]" }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1914
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: DateFilterComponent, decorators: [{
|
|
1915
|
-
type: i0.Component,
|
|
1916
|
-
args: [{
|
|
1917
|
-
selector: "nice-date-filter",
|
|
1918
|
-
templateUrl: "date-filter.template.html",
|
|
1919
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1920
|
-
providers: [
|
|
1921
|
-
{
|
|
1922
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
1923
|
-
useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
|
|
1924
|
-
multi: true
|
|
1925
|
-
}
|
|
1926
|
-
]
|
|
1927
|
-
}]
|
|
1928
|
-
}] });
|
|
1929
|
-
|
|
1930
|
-
var NiceFilterGroupService = /** @class */ (function () {
|
|
1931
|
-
function NiceFilterGroupService() {
|
|
1932
|
-
}
|
|
1933
|
-
return NiceFilterGroupService;
|
|
1934
|
-
}());
|
|
1935
|
-
|
|
1936
|
-
var FilterGroupIconPipe = /** @class */ (function () {
|
|
1937
|
-
function FilterGroupIconPipe(service) {
|
|
1938
|
-
this.service = service;
|
|
1939
|
-
}
|
|
1940
|
-
FilterGroupIconPipe.prototype.transform = function (value) {
|
|
1941
|
-
return this.service.getFilterGroupIconClass(value);
|
|
1942
|
-
};
|
|
1943
|
-
return FilterGroupIconPipe;
|
|
1944
|
-
}());
|
|
1945
|
-
FilterGroupIconPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, deps: [{ token: NiceFilterGroupService }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
1946
|
-
FilterGroupIconPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, name: "filterGroupIcon" });
|
|
1947
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, decorators: [{
|
|
1948
|
-
type: i0.Pipe,
|
|
1949
|
-
args: [{
|
|
1950
|
-
name: "filterGroupIcon"
|
|
1951
|
-
}]
|
|
1952
|
-
}], ctorParameters: function () { return [{ type: NiceFilterGroupService }]; } });
|
|
1953
|
-
|
|
1954
|
-
var FilterSelectionComponent = /** @class */ (function () {
|
|
1955
|
-
function FilterSelectionComponent() {
|
|
1956
|
-
this.filterSelected = new i0.EventEmitter();
|
|
1957
|
-
}
|
|
1958
|
-
Object.defineProperty(FilterSelectionComponent.prototype, "filterGroups", {
|
|
1959
|
-
get: function () {
|
|
1960
|
-
var e_1, _b;
|
|
1961
|
-
var groups = i18.ArrayUtils.uniqueObjects(this.filterConfigs.map(function (x) { return x.group; }), function (x) { return x === null || x === void 0 ? void 0 : x.key; });
|
|
1962
|
-
var result = [];
|
|
1963
|
-
var _loop_1 = function (group) {
|
|
1964
|
-
if (!group) {
|
|
1965
|
-
return "continue";
|
|
1966
|
-
}
|
|
1967
|
-
result.push([group, this_1.filterConfigs.filter(function (x) { var _a; return ((_a = x.group) === null || _a === void 0 ? void 0 : _a.key) === group.key; })]);
|
|
1968
|
-
};
|
|
1969
|
-
var this_1 = this;
|
|
1970
|
-
try {
|
|
1971
|
-
for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
|
|
1972
|
-
var group = groups_1_1.value;
|
|
1973
|
-
_loop_1(group);
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1977
|
-
finally {
|
|
1978
|
-
try {
|
|
1979
|
-
if (groups_1_1 && !groups_1_1.done && (_b = groups_1.return)) _b.call(groups_1);
|
|
1980
|
-
}
|
|
1981
|
-
finally { if (e_1) throw e_1.error; }
|
|
1982
|
-
}
|
|
1983
|
-
return result.sort(function (_b, _c) {
|
|
1984
|
-
var _d = __read(_b, 2), a = _d[1];
|
|
1985
|
-
var _e = __read(_c, 2), b = _e[1];
|
|
1986
|
-
return b.length - a.length;
|
|
1987
|
-
});
|
|
1988
|
-
},
|
|
1989
|
-
enumerable: false,
|
|
1990
|
-
configurable: true
|
|
1991
|
-
});
|
|
1992
|
-
FilterSelectionComponent.prototype.selectFilter = function (filterConfigurationModel) {
|
|
1993
|
-
this.filterSelected.emit(filterConfigurationModel);
|
|
1994
|
-
};
|
|
1995
|
-
return FilterSelectionComponent;
|
|
1996
|
-
}());
|
|
1997
|
-
FilterSelectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1998
|
-
FilterSelectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: FilterSelectionComponent, selector: "nice-filter-selection", inputs: { filterConfigs: "filterConfigs", loading: "loading" }, outputs: { filterSelected: "filterSelected" }, ngImport: i0__namespace, template: "<mat-card fxLayout=\"row wrap\" class=\"filter-selection-container\" [niceLoadingOverlay]=\"loading\">\n <mat-list [fxFlex]=\"filterGroups.length > 1 ? 50 : 100\" *ngFor=\"let group of filterGroups\">\n <mat-list-item>\n <i mat-list-icon class=\"text-accent fal\" [ngClass]=\"group[0].key | filterGroupIcon\"></i>\n <strong mat-line>{{ group[0].name }}</strong>\n </mat-list-item>\n <mat-list-item (click)=\"selectFilter(filter)\" mat-ripple class=\"filter\" *ngFor=\"let filter of group[1]\">\n {{ filter?.name }}\n </mat-list-item>\n </mat-list>\n</mat-card>\n", styles: ["nice-filter-selection .filter-selection-container{min-width:150px;min-height:150px;max-width:600px;padding:8px}nice-filter-selection .mat-list-item{height:auto!important;min-height:32px!important;padding:16px}nice-filter-selection .mat-list-item strong{font-weight:700!important}nice-filter-selection .mat-list-item.filter{padding:8px 48px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px!important}@media screen and (max-width:959px){nice-filter-selection .mat-list-item.filter{padding:8px 24px}}"], components: [{ type: i9__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace$1.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i2__namespace$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }], directives: [{ type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i18__namespace.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2__namespace$1.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { type: i13__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i6__namespace.MatLine, selector: "[mat-line], [matLine]" }, { type: i6__namespace.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleRadius", "matRippleDisabled", "matRippleTrigger", "matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleAnimation"], exportAs: ["matRipple"] }], pipes: { "filterGroupIcon": FilterGroupIconPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1999
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, decorators: [{
|
|
2000
|
-
type: i0.Component,
|
|
2001
|
-
args: [{
|
|
2002
|
-
selector: "nice-filter-selection",
|
|
2003
|
-
templateUrl: "filter-selection.template.html",
|
|
2004
|
-
styleUrls: ["./filter-selection.style.scss"],
|
|
2005
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2006
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2007
|
-
}]
|
|
2008
|
-
}], propDecorators: { filterConfigs: [{
|
|
2009
|
-
type: i0.Input
|
|
2010
|
-
}], loading: [{
|
|
2011
|
-
type: i0.Input
|
|
2012
|
-
}], filterSelected: [{
|
|
2013
|
-
type: i0.Output
|
|
2014
|
-
}] } });
|
|
2015
|
-
|
|
2016
|
-
var QueryBuilderTriggerDirective = /** @class */ (function () {
|
|
2017
|
-
function QueryBuilderTriggerDirective(overlayPositionBuilder, elementRef, overlay, platform) {
|
|
2018
|
-
this.overlayPositionBuilder = overlayPositionBuilder;
|
|
2019
|
-
this.elementRef = elementRef;
|
|
2020
|
-
this.overlay = overlay;
|
|
2021
|
-
this.platform = platform;
|
|
2022
|
-
this.queryBuilderFilterSelected = new i0.EventEmitter();
|
|
2023
|
-
}
|
|
2024
|
-
Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFilters", {
|
|
2025
|
-
set: function (queryBuilderFilters) {
|
|
2026
|
-
if (queryBuilderFilters) {
|
|
2027
|
-
this._queryBuilderFilters = queryBuilderFilters;
|
|
2028
|
-
}
|
|
2029
|
-
this.updateFilterSelectionComponent();
|
|
2030
|
-
},
|
|
2031
|
-
enumerable: false,
|
|
2032
|
-
configurable: true
|
|
2033
|
-
});
|
|
2034
|
-
Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFiltersLoading", {
|
|
2035
|
-
set: function (queryBuilderFiltersLoading) {
|
|
2036
|
-
this._queryBuilderFiltersLoading = queryBuilderFiltersLoading;
|
|
2037
|
-
this.updateFilterSelectionComponent();
|
|
2038
|
-
},
|
|
2039
|
-
enumerable: false,
|
|
2040
|
-
configurable: true
|
|
2041
|
-
});
|
|
2042
|
-
QueryBuilderTriggerDirective.prototype.click = function () {
|
|
2043
|
-
var _this = this;
|
|
2044
|
-
var positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
|
|
2045
|
-
{
|
|
2046
|
-
originX: "center",
|
|
2047
|
-
originY: "bottom",
|
|
2048
|
-
overlayX: this.isMobile() ? "end" : "center",
|
|
2049
|
-
overlayY: "top"
|
|
2050
|
-
}
|
|
2051
|
-
]);
|
|
2052
|
-
this.overlayRef = this.overlay.create({
|
|
2053
|
-
positionStrategy: positionStrategy,
|
|
2054
|
-
hasBackdrop: true,
|
|
2055
|
-
backdropClass: "cdk-overlay-transparent-backdrop"
|
|
2056
|
-
});
|
|
2057
|
-
var filterSelectionPortal = new portal.ComponentPortal(FilterSelectionComponent);
|
|
2058
|
-
this.filterSelectionRef = this.overlayRef.attach(filterSelectionPortal);
|
|
2059
|
-
this.updateFilterSelectionComponent();
|
|
2060
|
-
this.overlayRef.backdropClick().subscribe(function () { return _this.close(); });
|
|
2061
|
-
};
|
|
2062
|
-
QueryBuilderTriggerDirective.prototype.close = function () {
|
|
2063
|
-
this.overlayRef.dispose();
|
|
2064
|
-
};
|
|
2065
|
-
QueryBuilderTriggerDirective.prototype.updateFilterSelectionComponent = function () {
|
|
2066
|
-
var _this = this;
|
|
2067
|
-
if (!this.filterSelectionRef) {
|
|
2068
|
-
return;
|
|
2069
|
-
}
|
|
2070
|
-
this.filterSelectionRef.instance.filterConfigs = this._queryBuilderFilters;
|
|
2071
|
-
this.filterSelectionRef.instance.loading = this._queryBuilderFiltersLoading;
|
|
2072
|
-
this.filterSelectionRef.instance.filterSelected.subscribe(function (filter) {
|
|
2073
|
-
_this.queryBuilderFilterSelected.emit(filter);
|
|
2074
|
-
_this.close();
|
|
2075
|
-
});
|
|
2076
|
-
};
|
|
2077
|
-
QueryBuilderTriggerDirective.prototype.isMobile = function () {
|
|
2078
|
-
return this.platform.ANDROID || this.platform.IOS;
|
|
2079
|
-
};
|
|
2080
|
-
return QueryBuilderTriggerDirective;
|
|
2081
|
-
}());
|
|
2082
|
-
QueryBuilderTriggerDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderTriggerDirective, deps: [{ token: i1__namespace$3.OverlayPositionBuilder }, { token: i0__namespace.ElementRef }, { token: i1__namespace$3.Overlay }, { token: i2__namespace$2.Platform }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2083
|
-
QueryBuilderTriggerDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: { queryBuilderFilters: "queryBuilderFilters", queryBuilderFiltersLoading: "queryBuilderFiltersLoading" }, outputs: { queryBuilderFilterSelected: "queryBuilderFilterSelected" }, host: { listeners: { "click": "click()" } }, ngImport: i0__namespace });
|
|
2084
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderTriggerDirective, decorators: [{
|
|
2085
|
-
type: i0.Directive,
|
|
2086
|
-
args: [{ selector: "[niceQueryBuilderTrigger]" }]
|
|
2087
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$3.OverlayPositionBuilder }, { type: i0__namespace.ElementRef }, { type: i1__namespace$3.Overlay }, { type: i2__namespace$2.Platform }]; }, propDecorators: { queryBuilderFilters: [{
|
|
2088
|
-
type: i0.Input
|
|
2089
|
-
}], queryBuilderFiltersLoading: [{
|
|
2090
|
-
type: i0.Input
|
|
2091
|
-
}], queryBuilderFilterSelected: [{
|
|
2092
|
-
type: i0.Output
|
|
2093
|
-
}], click: [{
|
|
2094
|
-
type: i0.HostListener,
|
|
2095
|
-
args: ["click"]
|
|
2096
|
-
}] } });
|
|
2097
|
-
|
|
2098
|
-
var RuleComponent = /** @class */ (function () {
|
|
2099
|
-
function RuleComponent(formGroupName) {
|
|
2100
|
-
this.formGroupName = formGroupName;
|
|
2101
|
-
this.remove = new i0.EventEmitter();
|
|
2102
|
-
}
|
|
2103
|
-
Object.defineProperty(RuleComponent.prototype, "filterConfig", {
|
|
2104
|
-
get: function () {
|
|
2105
|
-
var _a;
|
|
2106
|
-
var rule = this.rules.at(0).value;
|
|
2107
|
-
return (_a = this.filterConfigs) === null || _a === void 0 ? void 0 : _a.find(function (f) { return f.id === rule.id; });
|
|
2108
|
-
},
|
|
2109
|
-
enumerable: false,
|
|
2110
|
-
configurable: true
|
|
2111
|
-
});
|
|
2112
|
-
Object.defineProperty(RuleComponent.prototype, "isSingleInput", {
|
|
2113
|
-
get: function () {
|
|
2114
|
-
return !this.isDoubleInput && !this.isNoInput;
|
|
2115
|
-
},
|
|
2116
|
-
enumerable: false,
|
|
2117
|
-
configurable: true
|
|
2118
|
-
});
|
|
2119
|
-
Object.defineProperty(RuleComponent.prototype, "isDoubleInput", {
|
|
2120
|
-
get: function () {
|
|
2121
|
-
return QBFilterUtils.isDoubleInput(this.filterOperator);
|
|
2122
|
-
},
|
|
2123
|
-
enumerable: false,
|
|
2124
|
-
configurable: true
|
|
2125
|
-
});
|
|
2126
|
-
Object.defineProperty(RuleComponent.prototype, "isNoInput", {
|
|
2127
|
-
get: function () {
|
|
2128
|
-
return QBFilterUtils.isNoInput(this.filterOperator);
|
|
2129
|
-
},
|
|
2130
|
-
enumerable: false,
|
|
2131
|
-
configurable: true
|
|
2132
|
-
});
|
|
2133
|
-
RuleComponent.prototype.ngOnInit = function () {
|
|
2134
|
-
this.formGroup = this.formGroupName.control;
|
|
2135
|
-
this.rules = this.formGroup.get("rules");
|
|
2136
|
-
this.filterOperator = this.rules.at(0).value.operation;
|
|
2137
|
-
};
|
|
2138
|
-
RuleComponent.prototype.onUpdateFilterConfig = function (config) {
|
|
2139
|
-
var rule = QBFilterUtils.createRule(config);
|
|
2140
|
-
this.rules.patchValue([rule]);
|
|
2141
|
-
this.filterOperator = rule.operation;
|
|
2142
|
-
};
|
|
2143
|
-
RuleComponent.prototype.onClickOr = function () {
|
|
2144
|
-
this.rules.push(QBFilterUtils.createRule(this.filterConfig, this.filterOperator));
|
|
2145
|
-
};
|
|
2146
|
-
RuleComponent.prototype.onUpdateFilterOperator = function (operator) {
|
|
2147
|
-
var e_1, _c;
|
|
2148
|
-
var _a, _b;
|
|
2149
|
-
this.filterOperator = operator;
|
|
2150
|
-
try {
|
|
2151
|
-
for (var _d = __values(this.rules.controls), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
2152
|
-
var rule = _e.value;
|
|
2153
|
-
(_a = rule.get("operation")) === null || _a === void 0 ? void 0 : _a.patchValue(this.filterOperator);
|
|
2154
|
-
if (this.isDoubleInput) {
|
|
2155
|
-
(_b = rule.get("value")) === null || _b === void 0 ? void 0 : _b.patchValue([rule.value.value, rule.value.value]);
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2160
|
-
finally {
|
|
2161
|
-
try {
|
|
2162
|
-
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
2163
|
-
}
|
|
2164
|
-
finally { if (e_1) throw e_1.error; }
|
|
2165
|
-
}
|
|
2166
|
-
};
|
|
2167
|
-
RuleComponent.prototype.onClickDelete = function (index) {
|
|
2168
|
-
if (this.rules.length > 1) {
|
|
2169
|
-
this.rules.removeAt(index);
|
|
2170
|
-
}
|
|
2171
|
-
else {
|
|
2172
|
-
this.remove.emit();
|
|
2173
|
-
}
|
|
2174
|
-
};
|
|
2175
|
-
return RuleComponent;
|
|
2176
|
-
}());
|
|
2177
|
-
RuleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, deps: [{ token: i1__namespace$1.FormGroupName }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2178
|
-
RuleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RuleComponent, selector: "nice-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0__namespace, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <button\n fxFlex=\"150px\"\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div fxFlex=\"row\" fxLayoutAlign=\"space-between center\">\n <div class=\"truncate\" fxFlex=\"0 1 90px\">{{ filterConfig?.name }}</div>\n <mat-icon fxFlex=\"24px\">arrow_drop_down</mat-icon>\n </div>\n </button>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxFlex=\"1 1 auto\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field ngClass.lt-md=\"w-90-p\" fxFlex=\"0 0 188px\">\n <mat-select\n fxFlex=\"150px\"\n fxFlex.lt-md=\"100%\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxFlex fxLayout=\"row wrap\" fxLayout.lt-md=\"column\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container\"\n [fxFlex]=\"isDoubleInput ? '100%' : '50%'\"\n [formGroupName]=\"i\"\n fxFlex.lt-md=\"100%\"\n fxLayout.lt-md=\"column\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" fxFlex formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" fxFlex formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" fxFlex formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n fxFlex\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n fxFlex\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div fxLayout=\"row\" fxLayoutGap=\"8px\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["nice-rule{background:transparent}nice-rule .select-filter{height:36px}nice-rule .aligned-button,nice-rule .select-filter{margin-bottom:1.25em}nice-rule .aligned-text{margin-bottom:2em}nice-rule .filter-select{margin-top:-14px}nice-rule .mat-form-field-infix{border:none}@media screen and (max-width:959px){nice-rule .mat-form-field-infix{max-width:150px}}nice-rule .rule-container{padding-left:12px;padding-right:12px}@media screen and (max-width:959px){nice-rule .rule-container{padding:0}}"], components: [{ type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: TextFilterComponent, selector: "nice-text-filter", inputs: ["filterConfig"] }, { type: NumberFilterComponent, selector: "nice-number-filter" }, { type: RadioFilterComponent, selector: "nice-radio-filter", inputs: ["filterConfig"] }, { type: SelectFilterComponent, selector: "nice-select-filter", inputs: ["filterConfig"] }, { type: DateFilterComponent, selector: "nice-date-filter" }], directives: [{ type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i1__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$4.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2179
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, decorators: [{
|
|
2180
|
-
type: i0.Component,
|
|
2181
|
-
args: [{
|
|
2182
|
-
selector: "nice-rule",
|
|
2183
|
-
templateUrl: "rule.template.html",
|
|
2184
|
-
styleUrls: ["./rule.style.scss"],
|
|
2185
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
2186
|
-
}]
|
|
2187
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.FormGroupName }]; }, propDecorators: { filterConfigs: [{
|
|
2188
|
-
type: i0.Input
|
|
2189
|
-
}], remove: [{
|
|
2190
|
-
type: i0.Output
|
|
2191
|
-
}] } });
|
|
2192
|
-
|
|
2193
|
-
var QueryBuilderComponent = /** @class */ (function () {
|
|
2194
|
-
function QueryBuilderComponent(formGroup) {
|
|
2195
|
-
this.formGroup = formGroup;
|
|
2196
|
-
this.close = new i0.EventEmitter();
|
|
2197
|
-
this.createReport = new i0.EventEmitter();
|
|
2198
|
-
this.updateReport = new i0.EventEmitter();
|
|
2199
|
-
this.propagateChanges = function (_) { };
|
|
2200
|
-
this.rules = this.formGroup.get("rules");
|
|
2201
|
-
}
|
|
2202
|
-
Object.defineProperty(QueryBuilderComponent.prototype, "canSave", {
|
|
2203
|
-
get: function () {
|
|
2204
|
-
return !this.currentSavedReport;
|
|
2205
|
-
},
|
|
2206
|
-
enumerable: false,
|
|
2207
|
-
configurable: true
|
|
2208
|
-
});
|
|
2209
|
-
QueryBuilderComponent.prototype.registerOnChange = function (fn) {
|
|
2210
|
-
this.propagateChanges = fn;
|
|
2211
|
-
};
|
|
2212
|
-
QueryBuilderComponent.prototype.registerOnTouched = function (fn) { };
|
|
2213
|
-
QueryBuilderComponent.prototype.writeValue = function (rules) {
|
|
2214
|
-
this.rules.clear();
|
|
2215
|
-
this.formGroup.patchValue(new QueryBuilderForm(rules));
|
|
2216
|
-
};
|
|
2217
|
-
QueryBuilderComponent.prototype.onClickAddRule = function (filterConfigurationModel) {
|
|
2218
|
-
this.rules.push(QBFilterUtils.createQueryModel(filterConfigurationModel));
|
|
2219
|
-
};
|
|
2220
|
-
QueryBuilderComponent.prototype.onClickDeleteRule = function (id) {
|
|
2221
|
-
this.rules.removeAt(id);
|
|
2222
|
-
if (this.rules.length === 0) {
|
|
2223
|
-
this.close.emit();
|
|
2224
|
-
this.onClickApply();
|
|
2225
|
-
}
|
|
2226
|
-
};
|
|
2227
|
-
QueryBuilderComponent.prototype.onClickApply = function () {
|
|
2228
|
-
this.propagateChanges(this.formGroup.getRawValue().transform());
|
|
2229
|
-
};
|
|
2230
|
-
QueryBuilderComponent.prototype.onClickSaveReport = function () {
|
|
2231
|
-
this.createReport.emit();
|
|
2232
|
-
};
|
|
2233
|
-
QueryBuilderComponent.prototype.onClickUpdateReport = function () {
|
|
2234
|
-
this.updateReport.emit();
|
|
2235
|
-
};
|
|
2236
|
-
return QueryBuilderComponent;
|
|
2237
|
-
}());
|
|
2238
|
-
QueryBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderComponent, deps: [{ token: i1__namespace$5.GeneratedFormGroup }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2239
|
-
QueryBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: QueryBuilderComponent, selector: "nice-query-builder", inputs: { filterConfigs: "filterConfigs", currentSavedReport: "currentSavedReport", loading: "loading" }, outputs: { close: "close", createReport: "createReport", updateReport: "updateReport" }, providers: [
|
|
2240
|
-
{
|
|
2241
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
2242
|
-
useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
|
|
2243
|
-
multi: true
|
|
2244
|
-
},
|
|
2245
|
-
{
|
|
2246
|
-
provide: i1.GeneratedFormGroup,
|
|
2247
|
-
useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
|
|
2248
|
-
}
|
|
2249
|
-
], ngImport: i0__namespace, template: "<div class=\"rules-container\" fxLayout=\"column\" *ngIf=\"!loading\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <nice-rule\n *ngFor=\"let rule of rules.controls; let i = index\"\n (remove)=\"onClickDeleteRule(i)\"\n [filterConfigs]=\"filterConfigs\"\n [formGroupName]=\"i\"\n ></nice-rule>\n </ng-container>\n <div fxLayoutAlign=\"space-between\">\n <button\n class=\"add-button add-rule-button\"\n mat-mini-fab\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onClickAddRule($event)\"\n >\n <mat-icon>add</mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxLayoutGap=\"16px\">\n <!-- TODO: Support saved reports -->\n <!--<button mat-button color=\"primary\" (click)=\"onClickSaveReport()\" *ngIf=\"canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.save_report\" | translate }}\n </button>\n <button mat-button color=\"primary\" (click)=\"onClickUpdateReport()\" *ngIf=\"!canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.update_report\" | translate }}\n </button>-->\n <button mat-stroked-button color=\"accent\" (click)=\"onClickApply()\">\n {{ \"components.query_builder.update\" | translate }}\n <mat-icon class=\"ml-8\">refresh</mat-icon>\n </button>\n </div>\n </div>\n</div>\n", styles: ["nice-query-builder .rules-container{position:relative}nice-query-builder .rules-container:before{content:\"\";position:absolute;top:32px;bottom:32px;left:46px;width:4px;background:rgba(0,0,0,.12)}nice-query-builder .save-report-button{height:36px}nice-query-builder .add-rule-button{margin-left:28px;margin-right:28px}"], components: [{ type: RuleComponent, selector: "nice-rule", inputs: ["filterConfigs"], outputs: ["remove"] }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i1__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i4__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }], pipes: { "translate": i1__namespace$4.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2250
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderComponent, decorators: [{
|
|
2251
|
-
type: i0.Component,
|
|
2252
|
-
args: [{
|
|
2253
|
-
selector: "nice-query-builder",
|
|
2254
|
-
templateUrl: "./query-builder.template.html",
|
|
2255
|
-
styleUrls: ["./query-builder.style.scss"],
|
|
2256
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2257
|
-
providers: [
|
|
2258
|
-
{
|
|
2259
|
-
provide: i1$1.NG_VALUE_ACCESSOR,
|
|
2260
|
-
useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
|
|
2261
|
-
multi: true
|
|
2262
|
-
},
|
|
2263
|
-
{
|
|
2264
|
-
provide: i1.GeneratedFormGroup,
|
|
2265
|
-
useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
|
|
2266
|
-
}
|
|
2267
|
-
]
|
|
2268
|
-
}]
|
|
2269
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$5.GeneratedFormGroup }]; }, propDecorators: { filterConfigs: [{
|
|
2270
|
-
type: i0.Input
|
|
2271
|
-
}], currentSavedReport: [{
|
|
2272
|
-
type: i0.Input
|
|
2273
|
-
}], loading: [{
|
|
2274
|
-
type: i0.Input
|
|
2275
|
-
}], close: [{
|
|
2276
|
-
type: i0.Output
|
|
2277
|
-
}], createReport: [{
|
|
2278
|
-
type: i0.Output
|
|
2279
|
-
}], updateReport: [{
|
|
2280
|
-
type: i0.Output
|
|
2281
|
-
}] } });
|
|
2282
|
-
|
|
2283
|
-
var NiceBaseListComponent = /** @class */ (function () {
|
|
2284
|
-
function NiceBaseListComponent(enableQueryBuilder, listLayout, columns, exportsSettings, query, service, activatedRoute, bottomSheet, router, mediaObserver) {
|
|
2285
|
-
this.enableQueryBuilder = enableQueryBuilder;
|
|
2286
|
-
this.listLayout = listLayout;
|
|
2287
|
-
this.columns = columns;
|
|
2288
|
-
this.exportsSettings = exportsSettings;
|
|
2289
|
-
this.query = query;
|
|
2290
|
-
this.service = service;
|
|
2291
|
-
this.activatedRoute = activatedRoute;
|
|
2292
|
-
this.bottomSheet = bottomSheet;
|
|
2293
|
-
this.router = router;
|
|
2294
|
-
this.mediaObserver = mediaObserver;
|
|
2295
|
-
this.mode = "normal";
|
|
2296
|
-
this.layout = "page";
|
|
2297
|
-
this.layoutContent = exports.LayoutContent.Table;
|
|
2298
|
-
this.autoChangeLayout = true;
|
|
2299
|
-
this.autoLoad = true;
|
|
2300
|
-
this.canExport = true;
|
|
2301
|
-
this.disableRouting = false;
|
|
2302
|
-
this.customExport = [];
|
|
2303
|
-
this.newPage = new i0.EventEmitter();
|
|
2304
|
-
this.defaultPageSizeOptions = [10, 25, 50, 100];
|
|
2305
|
-
this.columnNames = [];
|
|
2306
|
-
this.loading$ = this.query.selectLoading();
|
|
2307
|
-
this.filterResult$ = this.query.selectFilterResult();
|
|
2308
|
-
this.data$ = this.query.selectData();
|
|
2309
|
-
this.recordsFiltered$ = this.filterResult$.pipe(operators.map(function (f) { return f && f.total; }));
|
|
2310
|
-
this.showQueryBuilder$ = this.query.selectShowQueryBuilder();
|
|
2311
|
-
this.filterParameters$ = this.query.selectFilterParameters();
|
|
2312
|
-
this.index$ = this.filterParameters$.pipe(operators.map(function (f) { var _a, _b; return Math.floor(((_a = f.start) !== null && _a !== void 0 ? _a : 0) / ((_b = f.length) !== null && _b !== void 0 ? _b : 1)); }));
|
|
2313
|
-
this.length$ = this.filterParameters$.pipe(operators.map(function (f) { return f.length; }));
|
|
2314
|
-
this.isEmpty$ = this.recordsFiltered$.pipe(operators.map(function (r) { return r === 0; }));
|
|
2315
|
-
this.searchQuery$ = this.filterParameters$.pipe(operators.map(function (f) { return f.search; }));
|
|
2316
|
-
this.filterConfig$ = this.query.selectFilterConfig();
|
|
2317
|
-
this.sortColumn$ = this.filterParameters$.pipe(operators.map(function (f) { var _a; return (_a = (f.order && f.order.column)) !== null && _a !== void 0 ? _a : ""; }));
|
|
2318
|
-
this.sortDirection$ = this.filterParameters$.pipe(operators.map(function (f) { return f.order && f.order.direction; }));
|
|
2319
|
-
this.filterConfigLoading$ = this.query.selectFilterConfigLoading();
|
|
2320
|
-
this.rules$ = this.filterParameters$.pipe(operators.map(function (parameters) { return parameters.rules; }));
|
|
2321
|
-
this.rulesCount$ = this.filterParameters$.pipe(operators.map(function (parameters) { var _a, _b; return (_b = (_a = parameters.rules) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; }));
|
|
2322
|
-
this.searchText$ = new rxjs.Subject();
|
|
2323
|
-
this.setColumn(columns);
|
|
2324
|
-
}
|
|
2325
|
-
Object.defineProperty(NiceBaseListComponent.prototype, "prefixButtons", {
|
|
2326
|
-
get: function () {
|
|
2327
|
-
var _a, _b;
|
|
2328
|
-
return (_b = (_a = this.buttons) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.position === "prefix"; })) === null || _b === void 0 ? void 0 : _b.template;
|
|
2329
|
-
},
|
|
2330
|
-
enumerable: false,
|
|
2331
|
-
configurable: true
|
|
2332
|
-
});
|
|
2333
|
-
Object.defineProperty(NiceBaseListComponent.prototype, "suffixButtons", {
|
|
2334
|
-
get: function () {
|
|
2335
|
-
var _a, _b;
|
|
2336
|
-
return (_b = (_a = this.buttons) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.position === "suffix"; })) === null || _b === void 0 ? void 0 : _b.template;
|
|
2337
|
-
},
|
|
2338
|
-
enumerable: false,
|
|
2339
|
-
configurable: true
|
|
2340
|
-
});
|
|
2341
|
-
NiceBaseListComponent.prototype.ngOnInit = function () {
|
|
2342
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2343
|
-
var _this = this;
|
|
2344
|
-
return __generator(this, function (_c) {
|
|
2345
|
-
switch (_c.label) {
|
|
2346
|
-
case 0: return [4 /*yield*/, this.service.init()];
|
|
2347
|
-
case 1:
|
|
2348
|
-
_c.sent();
|
|
2349
|
-
this.service.loadQueryParams(this.autoLoad);
|
|
2350
|
-
this.searchText$
|
|
2351
|
-
.pipe(operators.debounceTime(300), operators.distinctUntilChanged(), operators.switchMap(function (search) {
|
|
2352
|
-
_this.service.resetPaging();
|
|
2353
|
-
return _this.service.searchData(search);
|
|
2354
|
-
}))
|
|
2355
|
-
.subscribe();
|
|
2356
|
-
this.mediaObserver.asObservable().subscribe(function () {
|
|
2357
|
-
if (!_this.autoChangeLayout) {
|
|
2358
|
-
return;
|
|
2359
|
-
}
|
|
2360
|
-
if (_this.mediaObserver.isActive("lt-md") && _this.layoutContent === exports.LayoutContent.Table) {
|
|
2361
|
-
_this.layoutContent = exports.LayoutContent.Cards;
|
|
2362
|
-
}
|
|
2363
|
-
else {
|
|
2364
|
-
_this.layoutContent = exports.LayoutContent.Table;
|
|
2365
|
-
}
|
|
2366
|
-
});
|
|
2367
|
-
return [2 /*return*/];
|
|
2368
|
-
}
|
|
2369
|
-
});
|
|
2370
|
-
});
|
|
2371
|
-
};
|
|
2372
|
-
NiceBaseListComponent.prototype.ngOnDestroy = function () {
|
|
2373
|
-
this.service.closeSubscriptions();
|
|
2374
|
-
};
|
|
2375
|
-
NiceBaseListComponent.prototype.ngOnChanges = function (changes) {
|
|
2376
|
-
if ("mode" in changes) {
|
|
2377
|
-
this.service.setMode(changes.mode.currentValue);
|
|
2378
|
-
}
|
|
2379
|
-
};
|
|
2380
|
-
NiceBaseListComponent.prototype.setLoading = function (loading) {
|
|
2381
|
-
this.service.setLoading(loading);
|
|
2382
|
-
};
|
|
2383
|
-
NiceBaseListComponent.prototype.clickToggleShowQueryBuilder = function () {
|
|
2384
|
-
this.service.toggleQueryBuilder();
|
|
2385
|
-
};
|
|
2386
|
-
NiceBaseListComponent.prototype.onUpdateRules = function (rules) {
|
|
2387
|
-
this.service.updateGlobalRules(rules);
|
|
2388
|
-
};
|
|
2389
|
-
NiceBaseListComponent.prototype.onQueryBuilderFilterSelected = function (filterConfigurationModel) {
|
|
2390
|
-
this.service.addRuleFromConfig(filterConfigurationModel);
|
|
2391
|
-
};
|
|
2392
|
-
NiceBaseListComponent.prototype.onUpdatePage = function (pageEvent) {
|
|
2393
|
-
this.service.loadNewPage(pageEvent.pageIndex * pageEvent.pageSize, pageEvent.pageSize);
|
|
2394
|
-
this.newPage.emit(pageEvent);
|
|
2395
|
-
};
|
|
2396
|
-
NiceBaseListComponent.prototype.onUpdateSearch = function (search) {
|
|
2397
|
-
this.searchText$.next(search);
|
|
2398
|
-
};
|
|
2399
|
-
NiceBaseListComponent.prototype.getFilterRule$ = function (id) {
|
|
2400
|
-
return this.filterParameters$.pipe(operators.map(function (f) {
|
|
2401
|
-
return (f.rules &&
|
|
2402
|
-
f.rules[0] &&
|
|
2403
|
-
f.rules[0].rules &&
|
|
2404
|
-
f.rules[0].rules.find(function (r) { return r.id === id; }));
|
|
2405
|
-
}));
|
|
2406
|
-
};
|
|
2407
|
-
NiceBaseListComponent.prototype.onUpdateSort = function (sort) {
|
|
2408
|
-
if (!sort.active || !sort.direction) {
|
|
2409
|
-
sort = {
|
|
2410
|
-
active: "id",
|
|
2411
|
-
direction: "asc"
|
|
2412
|
-
};
|
|
2413
|
-
}
|
|
2414
|
-
this.service.loadData({
|
|
2415
|
-
order: sort.active && sort.direction ? { column: sort.active, direction: sort.direction } : null
|
|
2416
|
-
});
|
|
2417
|
-
};
|
|
2418
|
-
NiceBaseListComponent.prototype.updateRule = function (id, newRule) {
|
|
2419
|
-
this.service.updateRule(id, newRule);
|
|
2420
|
-
};
|
|
2421
|
-
NiceBaseListComponent.prototype.updateRules = function (rules) {
|
|
2422
|
-
this.service.updateRules(rules);
|
|
2423
|
-
};
|
|
2424
|
-
NiceBaseListComponent.prototype.clickExport = function () {
|
|
2425
|
-
var _this = this;
|
|
2426
|
-
var exports = [];
|
|
2427
|
-
if (this.exportsSettings.xlsx) {
|
|
2428
|
-
exports.push({
|
|
2429
|
-
type: "xlsx",
|
|
2430
|
-
onClickExport: function () { return _this.clickXlsx(); }
|
|
2431
|
-
});
|
|
2432
|
-
}
|
|
2433
|
-
else if (this.exportsSettings.csv) {
|
|
2434
|
-
exports.push({
|
|
2435
|
-
type: "csv",
|
|
2436
|
-
onClickExport: function () { return _this.clickCsv(); }
|
|
2437
|
-
});
|
|
2438
|
-
}
|
|
2439
|
-
else if (this.exportsSettings.pdf) {
|
|
2440
|
-
exports.push({
|
|
2441
|
-
type: "pdf",
|
|
2442
|
-
onClickExport: function () { return _this.clickPdf(); }
|
|
2443
|
-
});
|
|
2444
|
-
}
|
|
2445
|
-
this.bottomSheet.open(i18.ExportBottomSheetComponent, {
|
|
2446
|
-
data: {
|
|
2447
|
-
exportStrategies: __spreadArray(__spreadArray([], __read(exports)), __read(this.customExport))
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
};
|
|
2451
|
-
NiceBaseListComponent.prototype.navigate = function (item) {
|
|
2452
|
-
if (this.navigateFn) {
|
|
2453
|
-
this.navigateFn(this.baseRoute, item);
|
|
2454
|
-
}
|
|
2455
|
-
else {
|
|
2456
|
-
var route = this.routeFn ? this.routeFn(item) : [(this.baseRoute || "") + (item === null || item === void 0 ? void 0 : item.id)];
|
|
2457
|
-
this.router.navigate(typeof route === "string" ? [route] : route, { relativeTo: this.activatedRoute });
|
|
2458
|
-
}
|
|
2459
|
-
};
|
|
2460
|
-
NiceBaseListComponent.prototype.clickXlsx = function () {
|
|
2461
|
-
this.service.downloadData("xlsx");
|
|
2462
|
-
};
|
|
2463
|
-
NiceBaseListComponent.prototype.clickCsv = function () {
|
|
2464
|
-
this.service.downloadData("csv");
|
|
2465
|
-
};
|
|
2466
|
-
NiceBaseListComponent.prototype.clickPrint = function () {
|
|
2467
|
-
this.service.printData();
|
|
2468
|
-
};
|
|
2469
|
-
NiceBaseListComponent.prototype.clickPdf = function () {
|
|
2470
|
-
this.service.downloadData("pdf");
|
|
2471
|
-
};
|
|
2472
|
-
NiceBaseListComponent.prototype.setColumn = function (columns) {
|
|
2473
|
-
this.columns = columns;
|
|
2474
|
-
this.columnNames = columns.map(function (x) { return x.id; });
|
|
2475
|
-
};
|
|
2476
|
-
return NiceBaseListComponent;
|
|
2477
|
-
}());
|
|
2478
|
-
NiceBaseListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_LAYOUT }, { token: TABLE_COLUMNS }, { token: EXPORTS_SETTINGS }, { token: NiceBaseListQuery }, { token: NiceBaseListService }, { token: i3__namespace.ActivatedRoute }, { token: i4__namespace$1.MatBottomSheet }, { token: i3__namespace.Router }, { token: i4__namespace.MediaObserver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2479
|
-
NiceBaseListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListComponent, selector: "nice-base-list", inputs: { mode: "mode", layout: "layout", layoutContent: "layoutContent", autoChangeLayout: "autoChangeLayout", baseRoute: "baseRoute", routeFn: "routeFn", navigateFn: "navigateFn", autoLoad: "autoLoad", pageTitle: "pageTitle", canExport: "canExport", disableRouting: "disableRouting", customExport: "customExport" }, outputs: { newPage: "newPage" }, providers: [
|
|
2480
|
-
NiceBaseListQuery,
|
|
2481
|
-
NiceBaseListService,
|
|
2482
|
-
exports.NiceBaseListStore
|
|
2483
|
-
], queries: [{ propertyName: "title", first: true, predicate: NiceBaseListTitleDirective, descendants: true, read: i0.TemplateRef }, { propertyName: "table", first: true, predicate: NiceBaseListTableDirective, descendants: true, read: i0.TemplateRef }, { propertyName: "cards", first: true, predicate: NiceBaseListCardsDirective, descendants: true, read: i0.TemplateRef }, { propertyName: "customContent", first: true, predicate: NiceBaseListCustomContentDirective, descendants: true, read: i0.TemplateRef }, { propertyName: "filters", first: true, predicate: NiceBaseListFiltersDirective, descendants: true, read: i0.TemplateRef }, { propertyName: "buttons", predicate: NiceBaseListButtonsDirective }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div fxHide fxShow.xl>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div fxHide fxShow.lg>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div fxHide fxShow.md>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div fxHide fxShow.sm>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div fxHide fxShow.xs>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [fxHide.xs]=\"!!listLayout.xs\"\n [fxHide.sm]=\"!!listLayout.sm\"\n [fxHide.md]=\"!!listLayout.md\"\n [fxHide.lg]=\"!!listLayout.lg\"\n [fxHide.xl]=\"!!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { type: 'column', items: layout } }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\">\n <div [fxFlex]=\"layout.flex\" [fxLayout]=\"layout.type\" [fxLayoutAlign]=\"layout.align || ''\" [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>search</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async)\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n filter_list\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n filter_list\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon>\n clear\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon>print</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon>cloud_download</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div fxLayout=\"column\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content fxLayout=\"column\">\n <div fxFlex>\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list\"\n fxLayout=\"column\"\n fxLayoutAlign=\"space-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n fxFlex=\"1 1 auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: true\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { data: data$ | async }\"></ng-container>\n </div>\n</ng-template>\n", components: [{ type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { type: i9__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: QueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { type: i11__namespace.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i11__namespace.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i12__namespace.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i11__namespace.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }], directives: [{ type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i13__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i16__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i17__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i18__namespace.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { type: i9__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i12__namespace.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i11__namespace.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i11__namespace.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i11__namespace.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i11__namespace.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i11__namespace.MatCellDef, selector: "[matCellDef]" }, { type: i11__namespace.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i11__namespace.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i6__namespace.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleRadius", "matRippleDisabled", "matRippleTrigger", "matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleAnimation"], exportAs: ["matRipple"] }], pipes: { "async": i13__namespace.AsyncPipe, "translate": i1__namespace$4.TranslatePipe } });
|
|
2484
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListComponent, decorators: [{
|
|
2485
|
-
type: i0.Component,
|
|
2486
|
-
args: [{
|
|
2487
|
-
selector: "nice-base-list",
|
|
2488
|
-
templateUrl: "./base-list.template.html",
|
|
2489
|
-
providers: [
|
|
2490
|
-
NiceBaseListQuery,
|
|
2491
|
-
NiceBaseListService,
|
|
2492
|
-
exports.NiceBaseListStore
|
|
2493
|
-
]
|
|
2494
|
-
}]
|
|
2495
|
-
}], ctorParameters: function () {
|
|
2496
|
-
return [{ type: undefined, decorators: [{
|
|
2497
|
-
type: i0.Optional
|
|
2498
|
-
}, {
|
|
2499
|
-
type: i0.Inject,
|
|
2500
|
-
args: [ENABLE_QUERY_BUILDER]
|
|
2501
|
-
}] }, { type: undefined, decorators: [{
|
|
2502
|
-
type: i0.Inject,
|
|
2503
|
-
args: [BASE_LIST_LAYOUT]
|
|
2504
|
-
}] }, { type: undefined, decorators: [{
|
|
2505
|
-
type: i0.Inject,
|
|
2506
|
-
args: [TABLE_COLUMNS]
|
|
2507
|
-
}] }, { type: undefined, decorators: [{
|
|
2508
|
-
type: i0.Inject,
|
|
2509
|
-
args: [EXPORTS_SETTINGS]
|
|
2510
|
-
}] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }];
|
|
2511
|
-
}, propDecorators: { title: [{
|
|
2512
|
-
type: i0.ContentChild,
|
|
2513
|
-
args: [NiceBaseListTitleDirective, { read: i0.TemplateRef }]
|
|
2514
|
-
}], buttons: [{
|
|
2515
|
-
type: i0.ContentChildren,
|
|
2516
|
-
args: [NiceBaseListButtonsDirective]
|
|
2517
|
-
}], table: [{
|
|
2518
|
-
type: i0.ContentChild,
|
|
2519
|
-
args: [NiceBaseListTableDirective, { read: i0.TemplateRef }]
|
|
2520
|
-
}], cards: [{
|
|
2521
|
-
type: i0.ContentChild,
|
|
2522
|
-
args: [NiceBaseListCardsDirective, { read: i0.TemplateRef }]
|
|
2523
|
-
}], customContent: [{
|
|
2524
|
-
type: i0.ContentChild,
|
|
2525
|
-
args: [NiceBaseListCustomContentDirective, { read: i0.TemplateRef }]
|
|
2526
|
-
}], filters: [{
|
|
2527
|
-
type: i0.ContentChild,
|
|
2528
|
-
args: [NiceBaseListFiltersDirective, { read: i0.TemplateRef }]
|
|
2529
|
-
}], mode: [{
|
|
2530
|
-
type: i0.Input
|
|
2531
|
-
}], layout: [{
|
|
2532
|
-
type: i0.Input
|
|
2533
|
-
}], layoutContent: [{
|
|
2534
|
-
type: i0.Input
|
|
2535
|
-
}], autoChangeLayout: [{
|
|
2536
|
-
type: i0.Input
|
|
2537
|
-
}], baseRoute: [{
|
|
2538
|
-
type: i0.Input
|
|
2539
|
-
}], routeFn: [{
|
|
2540
|
-
type: i0.Input
|
|
2541
|
-
}], navigateFn: [{
|
|
2542
|
-
type: i0.Input
|
|
2543
|
-
}], autoLoad: [{
|
|
2544
|
-
type: i0.Input
|
|
2545
|
-
}], pageTitle: [{
|
|
2546
|
-
type: i0.Input
|
|
2547
|
-
}], canExport: [{
|
|
2548
|
-
type: i0.Input
|
|
2549
|
-
}], disableRouting: [{
|
|
2550
|
-
type: i0.Input
|
|
2551
|
-
}], customExport: [{
|
|
2552
|
-
type: i0.Input
|
|
2553
|
-
}], newPage: [{
|
|
2554
|
-
type: i0.Output
|
|
2555
|
-
}] } });
|
|
2556
|
-
|
|
2557
|
-
var NiceCustomDateAdapter = /** @class */ (function (_super) {
|
|
2558
|
-
__extends(NiceCustomDateAdapter, _super);
|
|
2559
|
-
function NiceCustomDateAdapter(translateService, locale, platform) {
|
|
2560
|
-
var _this = _super.call(this, locale, platform) || this;
|
|
2561
|
-
_this.translateService = translateService;
|
|
2562
|
-
_this.setLocale(_this.translateService.getDefaultLang());
|
|
2563
|
-
// @ts-ignore
|
|
2564
|
-
_this._format = function (dtf, date) {
|
|
2565
|
-
return dtf.format(date);
|
|
2566
|
-
};
|
|
2567
|
-
return _this;
|
|
2568
|
-
}
|
|
2569
|
-
NiceCustomDateAdapter.prototype.format = function (date, displayFormat) {
|
|
2570
|
-
return _super.prototype.format.call(this, date, displayFormat);
|
|
2571
|
-
};
|
|
2572
|
-
NiceCustomDateAdapter.prototype.getDate = function (date) {
|
|
2573
|
-
return date.getUTCDate();
|
|
2574
|
-
};
|
|
2575
|
-
NiceCustomDateAdapter.prototype.getMonth = function (date) {
|
|
2576
|
-
return date.getUTCMonth();
|
|
2577
|
-
};
|
|
2578
|
-
NiceCustomDateAdapter.prototype.getYear = function (date) {
|
|
2579
|
-
return date.getUTCFullYear();
|
|
2580
|
-
};
|
|
2581
|
-
return NiceCustomDateAdapter;
|
|
2582
|
-
}(i6.NativeDateAdapter));
|
|
2583
|
-
NiceCustomDateAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter, deps: [{ token: i1__namespace$4.TranslateService }, { token: i6.MAT_DATE_LOCALE }, { token: i2__namespace$2.Platform }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2584
|
-
NiceCustomDateAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter });
|
|
2585
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter, decorators: [{
|
|
2586
|
-
type: i0.Injectable
|
|
2587
|
-
}], ctorParameters: function () {
|
|
2588
|
-
return [{ type: i1__namespace$4.TranslateService }, { type: undefined, decorators: [{
|
|
2589
|
-
type: i0.Inject,
|
|
2590
|
-
args: [i6.MAT_DATE_LOCALE]
|
|
2591
|
-
}] }, { type: i2__namespace$2.Platform }];
|
|
2592
|
-
} });
|
|
2593
|
-
|
|
2594
|
-
var QueryBuilderModule = /** @class */ (function () {
|
|
2595
|
-
function QueryBuilderModule() {
|
|
2596
|
-
}
|
|
2597
|
-
return QueryBuilderModule;
|
|
2598
|
-
}());
|
|
2599
|
-
QueryBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2600
|
-
QueryBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, declarations: [QueryBuilderComponent,
|
|
2601
|
-
QueryBuilderTriggerDirective,
|
|
2602
|
-
FilterSelectionComponent,
|
|
2603
|
-
RuleComponent,
|
|
2604
|
-
SelectFilterComponent,
|
|
2605
|
-
TextFilterComponent,
|
|
2606
|
-
NumberFilterComponent,
|
|
2607
|
-
RadioFilterComponent,
|
|
2608
|
-
DateFilterComponent,
|
|
2609
|
-
FilterGroupIconPipe], imports: [i13.CommonModule,
|
|
2610
|
-
i1$1.FormsModule,
|
|
2611
|
-
i1$5.TranslateModule,
|
|
2612
|
-
i1$4.OverlayModule,
|
|
2613
|
-
i9.MatCardModule,
|
|
2614
|
-
i2$1.MatListModule,
|
|
2615
|
-
i4.FlexLayoutModule,
|
|
2616
|
-
i7.MatButtonModule,
|
|
2617
|
-
i6.MatRippleModule,
|
|
2618
|
-
i6$1.MatIconModule,
|
|
2619
|
-
i5$1.MatSelectModule,
|
|
2620
|
-
i3$1.MatInputModule,
|
|
2621
|
-
i2.MatDatepickerModule,
|
|
2622
|
-
i1$3.MatRadioModule,
|
|
2623
|
-
i18.NiceLoadingSpinnerModule,
|
|
2624
|
-
i18.NiceTypeaheadModule,
|
|
2625
|
-
i1$1.ReactiveFormsModule,
|
|
2626
|
-
i5.NgxMaskModule], exports: [QueryBuilderComponent, QueryBuilderTriggerDirective] });
|
|
2627
|
-
QueryBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, providers: [{ provide: i6.DateAdapter, useClass: NiceCustomDateAdapter }], imports: [[
|
|
2628
|
-
i13.CommonModule,
|
|
2629
|
-
i1$1.FormsModule,
|
|
2630
|
-
i1$5.TranslateModule,
|
|
2631
|
-
i1$4.OverlayModule,
|
|
2632
|
-
i9.MatCardModule,
|
|
2633
|
-
i2$1.MatListModule,
|
|
2634
|
-
i4.FlexLayoutModule,
|
|
2635
|
-
i7.MatButtonModule,
|
|
2636
|
-
i6.MatRippleModule,
|
|
2637
|
-
i6$1.MatIconModule,
|
|
2638
|
-
i5$1.MatSelectModule,
|
|
2639
|
-
i3$1.MatInputModule,
|
|
2640
|
-
i2.MatDatepickerModule,
|
|
2641
|
-
i1$3.MatRadioModule,
|
|
2642
|
-
i18.NiceLoadingSpinnerModule,
|
|
2643
|
-
i18.NiceTypeaheadModule,
|
|
2644
|
-
i1$1.ReactiveFormsModule,
|
|
2645
|
-
i5.NgxMaskModule
|
|
2646
|
-
]] });
|
|
2647
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, decorators: [{
|
|
2648
|
-
type: i0.NgModule,
|
|
2649
|
-
args: [{
|
|
2650
|
-
imports: [
|
|
2651
|
-
i13.CommonModule,
|
|
2652
|
-
i1$1.FormsModule,
|
|
2653
|
-
i1$5.TranslateModule,
|
|
2654
|
-
i1$4.OverlayModule,
|
|
2655
|
-
i9.MatCardModule,
|
|
2656
|
-
i2$1.MatListModule,
|
|
2657
|
-
i4.FlexLayoutModule,
|
|
2658
|
-
i7.MatButtonModule,
|
|
2659
|
-
i6.MatRippleModule,
|
|
2660
|
-
i6$1.MatIconModule,
|
|
2661
|
-
i5$1.MatSelectModule,
|
|
2662
|
-
i3$1.MatInputModule,
|
|
2663
|
-
i2.MatDatepickerModule,
|
|
2664
|
-
i1$3.MatRadioModule,
|
|
2665
|
-
i18.NiceLoadingSpinnerModule,
|
|
2666
|
-
i18.NiceTypeaheadModule,
|
|
2667
|
-
i1$1.ReactiveFormsModule,
|
|
2668
|
-
i5.NgxMaskModule
|
|
2669
|
-
],
|
|
2670
|
-
declarations: [
|
|
2671
|
-
QueryBuilderComponent,
|
|
2672
|
-
QueryBuilderTriggerDirective,
|
|
2673
|
-
FilterSelectionComponent,
|
|
2674
|
-
RuleComponent,
|
|
2675
|
-
SelectFilterComponent,
|
|
2676
|
-
TextFilterComponent,
|
|
2677
|
-
NumberFilterComponent,
|
|
2678
|
-
RadioFilterComponent,
|
|
2679
|
-
DateFilterComponent,
|
|
2680
|
-
FilterGroupIconPipe
|
|
2681
|
-
],
|
|
2682
|
-
providers: [{ provide: i6.DateAdapter, useClass: NiceCustomDateAdapter }],
|
|
2683
|
-
exports: [QueryBuilderComponent, QueryBuilderTriggerDirective]
|
|
2684
|
-
}]
|
|
2685
|
-
}] });
|
|
2686
|
-
|
|
2687
|
-
var NiceBaseListModule = /** @class */ (function () {
|
|
2688
|
-
function NiceBaseListModule() {
|
|
2689
|
-
}
|
|
2690
|
-
NiceBaseListModule.forRoot = function (options) {
|
|
2691
|
-
var _a;
|
|
2692
|
-
return {
|
|
2693
|
-
ngModule: NiceBaseListModule,
|
|
2694
|
-
providers: __spreadArray([
|
|
2695
|
-
{
|
|
2696
|
-
provide: BASE_LIST_LAYOUT,
|
|
2697
|
-
useValue: (_a = options === null || options === void 0 ? void 0 : options.layout) !== null && _a !== void 0 ? _a : defaultLayout
|
|
2698
|
-
}
|
|
2699
|
-
], __read(((options === null || options === void 0 ? void 0 : options.queryBuilder) ? [
|
|
2700
|
-
{
|
|
2701
|
-
provide: ENABLE_QUERY_BUILDER,
|
|
2702
|
-
useValue: true
|
|
2703
|
-
},
|
|
2704
|
-
{
|
|
2705
|
-
provide: NiceFilterGroupService,
|
|
2706
|
-
useClass: options.queryBuilder.filterGroupService
|
|
2707
|
-
},
|
|
2708
|
-
options.queryBuilder.savedReportService ? {
|
|
2709
|
-
provide: NiceSavedReportService,
|
|
2710
|
-
useClass: options.queryBuilder.savedReportService
|
|
2711
|
-
} : undefined
|
|
2712
|
-
] : []))).filter(function (x) { return !!x; })
|
|
2713
|
-
};
|
|
2714
|
-
};
|
|
2715
|
-
NiceBaseListModule.providerFactory = function (options) {
|
|
2716
|
-
var _a;
|
|
2717
|
-
return __spreadArray([
|
|
2718
|
-
{
|
|
2719
|
-
provide: NiceFilterService,
|
|
2720
|
-
useClass: options.filterService
|
|
2721
|
-
},
|
|
2722
|
-
{
|
|
2723
|
-
provide: LIST_TABLE,
|
|
2724
|
-
useValue: options.table
|
|
2725
|
-
},
|
|
2726
|
-
{
|
|
2727
|
-
provide: TABLE_COLUMNS,
|
|
2728
|
-
useValue: options.columns,
|
|
2729
|
-
},
|
|
2730
|
-
{
|
|
2731
|
-
provide: DEFAULT_PARAMETERS,
|
|
2732
|
-
useValue: options.defaultParameters
|
|
2733
|
-
},
|
|
2734
|
-
options.layout ? {
|
|
2735
|
-
provide: BASE_LIST_LAYOUT,
|
|
2736
|
-
useValue: options.layout
|
|
2737
|
-
} : undefined,
|
|
2738
|
-
{
|
|
2739
|
-
provide: EXPORTS_SETTINGS,
|
|
2740
|
-
useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
|
|
2741
|
-
pdf: true,
|
|
2742
|
-
xlsx: true,
|
|
2743
|
-
csv: true
|
|
2744
|
-
}
|
|
2745
|
-
},
|
|
2746
|
-
options.disableQueryBuilder !== undefined ? {
|
|
2747
|
-
provide: ENABLE_QUERY_BUILDER,
|
|
2748
|
-
useValue: !options.disableQueryBuilder
|
|
2749
|
-
} : null
|
|
2750
|
-
], __read((options.queryBuilder ? [
|
|
2751
|
-
{
|
|
2752
|
-
provide: NiceFilterGroupService,
|
|
2753
|
-
useClass: options.queryBuilder.filterGroupService
|
|
2754
|
-
},
|
|
2755
|
-
options.queryBuilder.savedReportService ? {
|
|
2756
|
-
provide: NiceSavedReportService,
|
|
2757
|
-
useClass: options.queryBuilder.savedReportService
|
|
2758
|
-
} : undefined
|
|
2759
|
-
] : []))).filter(function (x) { return !!x; });
|
|
2760
|
-
};
|
|
2761
|
-
return NiceBaseListModule;
|
|
2762
|
-
}());
|
|
2763
|
-
NiceBaseListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2764
|
-
NiceBaseListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, declarations: [NiceBaseListComponent], imports: [i18.NiceExportBottomSheetModule,
|
|
2765
|
-
NiceBaseListDirectiveModule,
|
|
2766
|
-
i13.CommonModule,
|
|
2767
|
-
i4.FlexModule,
|
|
2768
|
-
i4.ExtendedModule,
|
|
2769
|
-
i1$1.FormsModule,
|
|
2770
|
-
i3.RouterModule,
|
|
2771
|
-
i7.MatButtonModule,
|
|
2772
|
-
i6$1.MatIconModule,
|
|
2773
|
-
i16.MatTooltipModule,
|
|
2774
|
-
i9.MatCardModule,
|
|
2775
|
-
i8.MatPaginatorModule,
|
|
2776
|
-
i1$5.TranslateModule,
|
|
2777
|
-
i18.NiceLoadingSpinnerModule,
|
|
2778
|
-
i11.MatTableModule,
|
|
2779
|
-
i12.MatSortModule,
|
|
2780
|
-
i6.MatRippleModule,
|
|
2781
|
-
i4$1.MatBottomSheetModule,
|
|
2782
|
-
QueryBuilderModule,
|
|
2783
|
-
i17.MatBadgeModule], exports: [NiceBaseListComponent,
|
|
2784
|
-
NiceBaseListDirectiveModule] });
|
|
2785
|
-
NiceBaseListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, imports: [[
|
|
2786
|
-
i18.NiceExportBottomSheetModule,
|
|
2787
|
-
NiceBaseListDirectiveModule,
|
|
2788
|
-
i13.CommonModule,
|
|
2789
|
-
i4.FlexModule,
|
|
2790
|
-
i4.ExtendedModule,
|
|
2791
|
-
i1$1.FormsModule,
|
|
2792
|
-
i3.RouterModule,
|
|
2793
|
-
i7.MatButtonModule,
|
|
2794
|
-
i6$1.MatIconModule,
|
|
2795
|
-
i16.MatTooltipModule,
|
|
2796
|
-
i9.MatCardModule,
|
|
2797
|
-
i8.MatPaginatorModule,
|
|
2798
|
-
i1$5.TranslateModule,
|
|
2799
|
-
i18.NiceLoadingSpinnerModule,
|
|
2800
|
-
i11.MatTableModule,
|
|
2801
|
-
i12.MatSortModule,
|
|
2802
|
-
i6.MatRippleModule,
|
|
2803
|
-
i4$1.MatBottomSheetModule,
|
|
2804
|
-
QueryBuilderModule,
|
|
2805
|
-
i17.MatBadgeModule
|
|
2806
|
-
], NiceBaseListDirectiveModule] });
|
|
2807
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, decorators: [{
|
|
2808
|
-
type: i0.NgModule,
|
|
2809
|
-
args: [{
|
|
2810
|
-
imports: [
|
|
2811
|
-
i18.NiceExportBottomSheetModule,
|
|
2812
|
-
NiceBaseListDirectiveModule,
|
|
2813
|
-
i13.CommonModule,
|
|
2814
|
-
i4.FlexModule,
|
|
2815
|
-
i4.ExtendedModule,
|
|
2816
|
-
i1$1.FormsModule,
|
|
2817
|
-
i3.RouterModule,
|
|
2818
|
-
i7.MatButtonModule,
|
|
2819
|
-
i6$1.MatIconModule,
|
|
2820
|
-
i16.MatTooltipModule,
|
|
2821
|
-
i9.MatCardModule,
|
|
2822
|
-
i8.MatPaginatorModule,
|
|
2823
|
-
i1$5.TranslateModule,
|
|
2824
|
-
i18.NiceLoadingSpinnerModule,
|
|
2825
|
-
i11.MatTableModule,
|
|
2826
|
-
i12.MatSortModule,
|
|
2827
|
-
i6.MatRippleModule,
|
|
2828
|
-
i4$1.MatBottomSheetModule,
|
|
2829
|
-
QueryBuilderModule,
|
|
2830
|
-
i17.MatBadgeModule
|
|
2831
|
-
],
|
|
2832
|
-
declarations: [
|
|
2833
|
-
NiceBaseListComponent
|
|
2834
|
-
],
|
|
2835
|
-
exports: [
|
|
2836
|
-
NiceBaseListComponent,
|
|
2837
|
-
NiceBaseListDirectiveModule
|
|
2838
|
-
]
|
|
2839
|
-
}]
|
|
2840
|
-
}] });
|
|
2841
|
-
|
|
2842
|
-
var NiceListState = /** @class */ (function () {
|
|
2843
|
-
function NiceListState() {
|
|
2844
|
-
}
|
|
2845
|
-
return NiceListState;
|
|
2846
|
-
}());
|
|
2847
|
-
|
|
2848
|
-
var NiceMultiStateFilterService = /** @class */ (function (_super) {
|
|
2849
|
-
__extends(NiceMultiStateFilterService, _super);
|
|
2850
|
-
function NiceMultiStateFilterService(filters) {
|
|
2851
|
-
var _this = _super.call(this) || this;
|
|
2852
|
-
_this.filters = filters;
|
|
2853
|
-
return _this;
|
|
2854
|
-
}
|
|
2855
|
-
NiceMultiStateFilterService.prototype.switchState = function (state) {
|
|
2856
|
-
this.api = this.filters[state];
|
|
2857
|
-
};
|
|
2858
|
-
return NiceMultiStateFilterService;
|
|
2859
|
-
}(NiceFilterService));
|
|
2860
|
-
|
|
2861
|
-
var initialValue = Object.assign({}, initialBaseListState);
|
|
2862
|
-
exports.NiceMultiStateListStore = /** @class */ (function (_super) {
|
|
2863
|
-
__extends(NiceMultiStateListStore, _super);
|
|
2864
|
-
function NiceMultiStateListStore() {
|
|
2865
|
-
return _super.call(this, null) || this;
|
|
2866
|
-
}
|
|
2867
|
-
return NiceMultiStateListStore;
|
|
2868
|
-
}(exports.NiceBaseListStore));
|
|
2869
|
-
exports.NiceMultiStateListStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2870
|
-
exports.NiceMultiStateListStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore });
|
|
2871
|
-
exports.NiceMultiStateListStore = __decorate([
|
|
2872
|
-
akita.StoreConfig({ name: "multi-state-list", resettable: true }),
|
|
2873
|
-
__metadata("design:paramtypes", [])
|
|
2874
|
-
], exports.NiceMultiStateListStore);
|
|
2875
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore, decorators: [{
|
|
2876
|
-
type: i0.Injectable
|
|
2877
|
-
}], ctorParameters: function () { return []; } });
|
|
2878
|
-
|
|
2879
|
-
var NiceMultiStateListQuery = /** @class */ (function (_super) {
|
|
2880
|
-
__extends(NiceMultiStateListQuery, _super);
|
|
2881
|
-
function NiceMultiStateListQuery(store) {
|
|
2882
|
-
var _this = _super.call(this, store) || this;
|
|
2883
|
-
_this.store = store;
|
|
2884
|
-
return _this;
|
|
2885
|
-
}
|
|
2886
|
-
return NiceMultiStateListQuery;
|
|
2887
|
-
}(NiceBaseListQuery));
|
|
2888
|
-
NiceMultiStateListQuery.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery, deps: [{ token: exports.NiceMultiStateListStore }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2889
|
-
NiceMultiStateListQuery.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery });
|
|
2890
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery, decorators: [{
|
|
2891
|
-
type: i0.Injectable
|
|
2892
|
-
}], ctorParameters: function () { return [{ type: exports.NiceMultiStateListStore }]; } });
|
|
2893
|
-
|
|
2894
|
-
var LIST_STATES = new i0.InjectionToken("list_states");
|
|
2895
|
-
|
|
2896
|
-
var NiceMultiStateListService = /** @class */ (function (_super) {
|
|
2897
|
-
__extends(NiceMultiStateListService, _super);
|
|
2898
|
-
function NiceMultiStateListService(states, store, activatedRoute, router, appRef, multiFilterService) {
|
|
2899
|
-
var _this = _super.call(this, store, multiFilterService, activatedRoute, router, appRef) || this;
|
|
2900
|
-
_this.states = states;
|
|
2901
|
-
_this.multiFilterService = multiFilterService;
|
|
2902
|
-
return _this;
|
|
2903
|
-
}
|
|
2904
|
-
NiceMultiStateListService.prototype.reset = function () {
|
|
2905
|
-
this.store.reset();
|
|
2906
|
-
};
|
|
2907
|
-
NiceMultiStateListService.prototype.setStateDefaultFilter = function (state, parameters) {
|
|
2908
|
-
this.states[state].defaultParameters = parameters;
|
|
2909
|
-
};
|
|
2910
|
-
NiceMultiStateListService.prototype.switchState = function (state) {
|
|
2911
|
-
var _a;
|
|
2912
|
-
var newState = this.states[state];
|
|
2913
|
-
if (!state) {
|
|
2914
|
-
return [];
|
|
2915
|
-
}
|
|
2916
|
-
this.multiFilterService.switchState(state);
|
|
2917
|
-
this.reset();
|
|
2918
|
-
this.init();
|
|
2919
|
-
this.loadData((_a = newState.defaultParameters) !== null && _a !== void 0 ? _a : initialBaseListState.filterParameters);
|
|
2920
|
-
return newState.columns;
|
|
2921
|
-
};
|
|
2922
|
-
return NiceMultiStateListService;
|
|
2923
|
-
}(NiceBaseListService));
|
|
2924
|
-
NiceMultiStateListService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService, deps: [{ token: LIST_STATES }, { token: exports.NiceMultiStateListStore }, { token: i3__namespace.ActivatedRoute }, { token: i3__namespace.Router }, { token: i0__namespace.ApplicationRef }, { token: NiceMultiStateFilterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2925
|
-
NiceMultiStateListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService });
|
|
2926
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService, decorators: [{
|
|
2927
|
-
type: i0.Injectable
|
|
2928
|
-
}], ctorParameters: function () {
|
|
2929
|
-
return [{ type: undefined, decorators: [{
|
|
2930
|
-
type: i0.Inject,
|
|
2931
|
-
args: [LIST_STATES]
|
|
2932
|
-
}] }, { type: exports.NiceMultiStateListStore }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }, { type: NiceMultiStateFilterService }];
|
|
2933
|
-
} });
|
|
2934
|
-
|
|
2935
|
-
var NiceMultiStateListComponent = /** @class */ (function (_super) {
|
|
2936
|
-
__extends(NiceMultiStateListComponent, _super);
|
|
2937
|
-
function NiceMultiStateListComponent(enableQueryBuilder, listLayout, exportsSetting, query, activatedRoute, bottomSheet, router, mediaObserver, multiStateListService) {
|
|
2938
|
-
var _this = _super.call(this, enableQueryBuilder, listLayout, [], exportsSetting, query, multiStateListService, activatedRoute, bottomSheet, router, mediaObserver) || this;
|
|
2939
|
-
_this.multiStateListService = multiStateListService;
|
|
2940
|
-
return _this;
|
|
2941
|
-
}
|
|
2942
|
-
Object.defineProperty(NiceMultiStateListComponent.prototype, "state", {
|
|
2943
|
-
set: function (state) {
|
|
2944
|
-
this.switchState(state);
|
|
2945
|
-
},
|
|
2946
|
-
enumerable: false,
|
|
2947
|
-
configurable: true
|
|
2948
|
-
});
|
|
2949
|
-
NiceMultiStateListComponent.prototype.switchState = function (state) {
|
|
2950
|
-
var columns = this.multiStateListService.switchState(state);
|
|
2951
|
-
this.setColumn(columns);
|
|
2952
|
-
};
|
|
2953
|
-
return NiceMultiStateListComponent;
|
|
2954
|
-
}(NiceBaseListComponent));
|
|
2955
|
-
NiceMultiStateListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_LAYOUT }, { token: EXPORTS_SETTINGS }, { token: NiceMultiStateListQuery }, { token: i3__namespace.ActivatedRoute }, { token: i4__namespace$1.MatBottomSheet }, { token: i3__namespace.Router }, { token: i4__namespace.MediaObserver }, { token: NiceMultiStateListService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2956
|
-
NiceMultiStateListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NiceMultiStateListComponent, selector: "nice-multi-state-list", inputs: { state: "state" }, providers: [
|
|
2957
|
-
NiceMultiStateListQuery,
|
|
2958
|
-
NiceMultiStateListService,
|
|
2959
|
-
exports.NiceMultiStateListStore
|
|
2960
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div fxHide fxShow.xl>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div fxHide fxShow.lg>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div fxHide fxShow.md>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div fxHide fxShow.sm>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div fxHide fxShow.xs>\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [fxHide.xs]=\"!!listLayout.xs\"\n [fxHide.sm]=\"!!listLayout.sm\"\n [fxHide.md]=\"!!listLayout.md\"\n [fxHide.lg]=\"!!listLayout.lg\"\n [fxHide.xl]=\"!!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { type: 'column', items: layout } }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\">\n <div [fxFlex]=\"layout.flex\" [fxLayout]=\"layout.type\" [fxLayoutAlign]=\"layout.align || ''\" [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>search</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async)\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n filter_list\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n filter_list\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon>\n clear\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon>print</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon>cloud_download</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div fxLayout=\"column\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content fxLayout=\"column\">\n <div fxFlex>\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [fxFlex]=\"item.flex\" [fxLayoutAlign]=\"item.align || ''\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list\"\n fxLayout=\"column\"\n fxLayoutAlign=\"space-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n fxFlex=\"1 1 auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: true\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\">\n <div [fxFlex]=\"item.flex\" [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { data: data$ | async }\"></ng-container>\n </div>\n</ng-template>\n", components: [{ type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { type: i9__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: QueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { type: i11__namespace.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i11__namespace.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i12__namespace.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i11__namespace.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }], directives: [{ type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i13__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i16__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i17__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i18__namespace.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { type: i9__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i12__namespace.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i11__namespace.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i11__namespace.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i11__namespace.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i11__namespace.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i11__namespace.MatCellDef, selector: "[matCellDef]" }, { type: i11__namespace.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i11__namespace.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i6__namespace.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleRadius", "matRippleDisabled", "matRippleTrigger", "matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleAnimation"], exportAs: ["matRipple"] }], pipes: { "async": i13__namespace.AsyncPipe, "translate": i1__namespace$4.TranslatePipe } });
|
|
2961
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListComponent, decorators: [{
|
|
2962
|
-
type: i0.Component,
|
|
2963
|
-
args: [{
|
|
2964
|
-
selector: "nice-multi-state-list",
|
|
2965
|
-
templateUrl: "../base-list/base-list.template.html",
|
|
2966
|
-
providers: [
|
|
2967
|
-
NiceMultiStateListQuery,
|
|
2968
|
-
NiceMultiStateListService,
|
|
2969
|
-
exports.NiceMultiStateListStore
|
|
2970
|
-
]
|
|
2971
|
-
}]
|
|
2972
|
-
}], ctorParameters: function () {
|
|
2973
|
-
return [{ type: undefined, decorators: [{
|
|
2974
|
-
type: i0.Optional
|
|
2975
|
-
}, {
|
|
2976
|
-
type: i0.Inject,
|
|
2977
|
-
args: [ENABLE_QUERY_BUILDER]
|
|
2978
|
-
}] }, { type: undefined, decorators: [{
|
|
2979
|
-
type: i0.Inject,
|
|
2980
|
-
args: [BASE_LIST_LAYOUT]
|
|
2981
|
-
}] }, { type: undefined, decorators: [{
|
|
2982
|
-
type: i0.Inject,
|
|
2983
|
-
args: [EXPORTS_SETTINGS]
|
|
2984
|
-
}] }, { type: NiceMultiStateListQuery }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }, { type: NiceMultiStateListService }];
|
|
2985
|
-
}, propDecorators: { state: [{
|
|
2986
|
-
type: i0.Input
|
|
2987
|
-
}] } });
|
|
2988
|
-
|
|
2989
|
-
var NiceMultiStateListModule = /** @class */ (function () {
|
|
2990
|
-
function NiceMultiStateListModule() {
|
|
2991
|
-
}
|
|
2992
|
-
NiceMultiStateListModule.providerFactory = function (options) {
|
|
2993
|
-
var _a;
|
|
2994
|
-
return __spreadArray([
|
|
2995
|
-
{
|
|
2996
|
-
provide: NiceMultiStateFilterService,
|
|
2997
|
-
useExisting: options.filterService
|
|
2998
|
-
},
|
|
2999
|
-
{
|
|
3000
|
-
provide: LIST_STATES,
|
|
3001
|
-
useValue: options.states
|
|
3002
|
-
},
|
|
3003
|
-
options.layout ? {
|
|
3004
|
-
provide: BASE_LIST_LAYOUT,
|
|
3005
|
-
useValue: options.layout
|
|
3006
|
-
} : undefined,
|
|
3007
|
-
{
|
|
3008
|
-
provide: EXPORTS_SETTINGS,
|
|
3009
|
-
useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
|
|
3010
|
-
pdf: true,
|
|
3011
|
-
xlsx: true,
|
|
3012
|
-
csv: true
|
|
3013
|
-
}
|
|
3014
|
-
}
|
|
3015
|
-
], __read((options.queryBuilder ? [
|
|
3016
|
-
{
|
|
3017
|
-
provide: ENABLE_QUERY_BUILDER,
|
|
3018
|
-
useValue: true
|
|
3019
|
-
},
|
|
3020
|
-
{
|
|
3021
|
-
provide: NiceFilterGroupService,
|
|
3022
|
-
useClass: options.queryBuilder.filterGroupService
|
|
3023
|
-
},
|
|
3024
|
-
options.queryBuilder.savedReportService ? {
|
|
3025
|
-
provide: NiceSavedReportService,
|
|
3026
|
-
useClass: options.queryBuilder.savedReportService
|
|
3027
|
-
} : undefined
|
|
3028
|
-
] : []))).filter(function (x) { return !!x; });
|
|
3029
|
-
};
|
|
3030
|
-
return NiceMultiStateListModule;
|
|
3031
|
-
}());
|
|
3032
|
-
NiceMultiStateListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3033
|
-
NiceMultiStateListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, declarations: [NiceMultiStateListComponent], imports: [i18.NiceExportBottomSheetModule,
|
|
3034
|
-
NiceBaseListDirectiveModule,
|
|
3035
|
-
i13.CommonModule,
|
|
3036
|
-
i4.FlexModule,
|
|
3037
|
-
i4.ExtendedModule,
|
|
3038
|
-
i1$1.FormsModule,
|
|
3039
|
-
i3.RouterModule,
|
|
3040
|
-
i7.MatButtonModule,
|
|
3041
|
-
i6$1.MatIconModule,
|
|
3042
|
-
i16.MatTooltipModule,
|
|
3043
|
-
i9.MatCardModule,
|
|
3044
|
-
i8.MatPaginatorModule,
|
|
3045
|
-
i1$5.TranslateModule,
|
|
3046
|
-
i18.NiceLoadingSpinnerModule,
|
|
3047
|
-
i11.MatTableModule,
|
|
3048
|
-
i12.MatSortModule,
|
|
3049
|
-
i6.MatRippleModule,
|
|
3050
|
-
i4$1.MatBottomSheetModule,
|
|
3051
|
-
QueryBuilderModule,
|
|
3052
|
-
i17.MatBadgeModule], exports: [NiceMultiStateListComponent,
|
|
3053
|
-
NiceBaseListDirectiveModule] });
|
|
3054
|
-
NiceMultiStateListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, imports: [[
|
|
3055
|
-
i18.NiceExportBottomSheetModule,
|
|
3056
|
-
NiceBaseListDirectiveModule,
|
|
3057
|
-
i13.CommonModule,
|
|
3058
|
-
i4.FlexModule,
|
|
3059
|
-
i4.ExtendedModule,
|
|
3060
|
-
i1$1.FormsModule,
|
|
3061
|
-
i3.RouterModule,
|
|
3062
|
-
i7.MatButtonModule,
|
|
3063
|
-
i6$1.MatIconModule,
|
|
3064
|
-
i16.MatTooltipModule,
|
|
3065
|
-
i9.MatCardModule,
|
|
3066
|
-
i8.MatPaginatorModule,
|
|
3067
|
-
i1$5.TranslateModule,
|
|
3068
|
-
i18.NiceLoadingSpinnerModule,
|
|
3069
|
-
i11.MatTableModule,
|
|
3070
|
-
i12.MatSortModule,
|
|
3071
|
-
i6.MatRippleModule,
|
|
3072
|
-
i4$1.MatBottomSheetModule,
|
|
3073
|
-
QueryBuilderModule,
|
|
3074
|
-
i17.MatBadgeModule
|
|
3075
|
-
], NiceBaseListDirectiveModule] });
|
|
3076
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, decorators: [{
|
|
3077
|
-
type: i0.NgModule,
|
|
3078
|
-
args: [{
|
|
3079
|
-
imports: [
|
|
3080
|
-
i18.NiceExportBottomSheetModule,
|
|
3081
|
-
NiceBaseListDirectiveModule,
|
|
3082
|
-
i13.CommonModule,
|
|
3083
|
-
i4.FlexModule,
|
|
3084
|
-
i4.ExtendedModule,
|
|
3085
|
-
i1$1.FormsModule,
|
|
3086
|
-
i3.RouterModule,
|
|
3087
|
-
i7.MatButtonModule,
|
|
3088
|
-
i6$1.MatIconModule,
|
|
3089
|
-
i16.MatTooltipModule,
|
|
3090
|
-
i9.MatCardModule,
|
|
3091
|
-
i8.MatPaginatorModule,
|
|
3092
|
-
i1$5.TranslateModule,
|
|
3093
|
-
i18.NiceLoadingSpinnerModule,
|
|
3094
|
-
i11.MatTableModule,
|
|
3095
|
-
i12.MatSortModule,
|
|
3096
|
-
i6.MatRippleModule,
|
|
3097
|
-
i4$1.MatBottomSheetModule,
|
|
3098
|
-
QueryBuilderModule,
|
|
3099
|
-
i17.MatBadgeModule
|
|
3100
|
-
],
|
|
3101
|
-
declarations: [
|
|
3102
|
-
NiceMultiStateListComponent
|
|
3103
|
-
],
|
|
3104
|
-
exports: [
|
|
3105
|
-
NiceMultiStateListComponent,
|
|
3106
|
-
NiceBaseListDirectiveModule
|
|
3107
|
-
]
|
|
3108
|
-
}]
|
|
3109
|
-
}] });
|
|
3110
|
-
|
|
3111
|
-
var StringUtils = /** @class */ (function () {
|
|
3112
|
-
function StringUtils() {
|
|
3113
|
-
}
|
|
3114
|
-
return StringUtils;
|
|
3115
|
-
}());
|
|
3116
|
-
String.prototype.toTableColumn = function (sortable) {
|
|
3117
|
-
return new TableColumns(this.toString(), sortable);
|
|
3118
|
-
};
|
|
3119
|
-
|
|
3120
|
-
/*
|
|
3121
|
-
* Public API Surface of nice-data-filter-kit
|
|
3122
|
-
*/
|
|
3123
|
-
|
|
3124
|
-
/**
|
|
3125
|
-
* Generated bundle index. Do not edit.
|
|
3126
|
-
*/
|
|
3127
|
-
|
|
3128
|
-
exports.DateFilterComponent = DateFilterComponent;
|
|
3129
|
-
exports.FilterComponent = FilterComponent;
|
|
3130
|
-
exports.FilterGroupIconPipe = FilterGroupIconPipe;
|
|
3131
|
-
exports.FilterSelectionComponent = FilterSelectionComponent;
|
|
3132
|
-
exports.FilterUtils = FilterUtils;
|
|
3133
|
-
exports.NiceBaseListButtonsDirective = NiceBaseListButtonsDirective;
|
|
3134
|
-
exports.NiceBaseListCardsDirective = NiceBaseListCardsDirective;
|
|
3135
|
-
exports.NiceBaseListComponent = NiceBaseListComponent;
|
|
3136
|
-
exports.NiceBaseListCustomContentDirective = NiceBaseListCustomContentDirective;
|
|
3137
|
-
exports.NiceBaseListDirectiveModule = NiceBaseListDirectiveModule;
|
|
3138
|
-
exports.NiceBaseListFiltersDirective = NiceBaseListFiltersDirective;
|
|
3139
|
-
exports.NiceBaseListModule = NiceBaseListModule;
|
|
3140
|
-
exports.NiceBaseListQuery = NiceBaseListQuery;
|
|
3141
|
-
exports.NiceBaseListService = NiceBaseListService;
|
|
3142
|
-
exports.NiceBaseListTableDirective = NiceBaseListTableDirective;
|
|
3143
|
-
exports.NiceBaseListTitleDirective = NiceBaseListTitleDirective;
|
|
3144
|
-
exports.NiceCustomDateAdapter = NiceCustomDateAdapter;
|
|
3145
|
-
exports.NiceFilterApi = NiceFilterApi;
|
|
3146
|
-
exports.NiceFilterGroupService = NiceFilterGroupService;
|
|
3147
|
-
exports.NiceFilterService = NiceFilterService;
|
|
3148
|
-
exports.NiceListState = NiceListState;
|
|
3149
|
-
exports.NiceMultiStateFilterService = NiceMultiStateFilterService;
|
|
3150
|
-
exports.NiceMultiStateListComponent = NiceMultiStateListComponent;
|
|
3151
|
-
exports.NiceMultiStateListModule = NiceMultiStateListModule;
|
|
3152
|
-
exports.NiceMultiStateListQuery = NiceMultiStateListQuery;
|
|
3153
|
-
exports.NiceMultiStateListService = NiceMultiStateListService;
|
|
3154
|
-
exports.NiceSavedReportService = NiceSavedReportService;
|
|
3155
|
-
exports.NumberFilterComponent = NumberFilterComponent;
|
|
3156
|
-
exports.QBFilterUtils = QBFilterUtils;
|
|
3157
|
-
exports.QueryBuilderComponent = QueryBuilderComponent;
|
|
3158
|
-
exports.QueryBuilderModule = QueryBuilderModule;
|
|
3159
|
-
exports.QueryBuilderTriggerDirective = QueryBuilderTriggerDirective;
|
|
3160
|
-
exports.RadioFilterComponent = RadioFilterComponent;
|
|
3161
|
-
exports.RuleComponent = RuleComponent;
|
|
3162
|
-
exports.SelectFilterComponent = SelectFilterComponent;
|
|
3163
|
-
exports.StringUtils = StringUtils;
|
|
3164
|
-
exports.TableColumns = TableColumns;
|
|
3165
|
-
exports.TextFilterComponent = TextFilterComponent;
|
|
3166
|
-
exports.defaultLayout = defaultLayout;
|
|
3167
|
-
exports.initialBaseListState = initialBaseListState;
|
|
3168
|
-
exports.initialValue = initialValue;
|
|
3169
|
-
|
|
3170
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3171
|
-
|
|
3172
|
-
})));
|
|
3173
|
-
//# sourceMappingURL=recursyve-nice-data-filter-kit.umd.js.map
|