@recursyve/nice-data-filter-kit 12.1.27 → 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.
Files changed (105) hide show
  1. package/_index.scss +1 -7
  2. package/{esm2015/lib/api/dto/saved-reports.dto.js → esm2020/lib/api/dto/saved-reports.dto.mjs} +0 -0
  3. package/esm2020/lib/api/filter.api.mjs +51 -0
  4. package/{esm2015/lib/api/models/saved-reports.model.js → esm2020/lib/api/models/saved-reports.model.mjs} +0 -0
  5. package/{esm2015/lib/api/public-api.js → esm2020/lib/api/public-api.mjs} +0 -0
  6. package/esm2020/lib/api/saved-report.api.mjs +48 -0
  7. package/esm2020/lib/components/base-list/base-list.component.mjs +288 -0
  8. package/{esm2015/lib/components/base-list/base-list.constant.js → esm2020/lib/components/base-list/base-list.constant.mjs} +0 -0
  9. package/esm2020/lib/components/base-list/base-list.module.mjs +171 -0
  10. 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
  11. 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
  12. 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
  13. package/esm2020/lib/components/base-list/directives/base-list-directives.module.mjs +45 -0
  14. package/esm2020/lib/components/base-list/directives/base-list-filters.directive.mjs +14 -0
  15. 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
  16. 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
  17. package/{esm2015/lib/components/base-list/models/columns.model.js → esm2020/lib/components/base-list/models/columns.model.mjs} +0 -0
  18. package/{esm2015/lib/components/base-list/models/export.model.js → esm2020/lib/components/base-list/models/export.model.mjs} +0 -0
  19. package/esm2020/lib/components/base-list/models/layout.model.mjs +149 -0
  20. package/esm2020/lib/components/base-list/providers/base-filter.service.mjs +34 -0
  21. 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
  22. package/esm2020/lib/components/base-list/public-api.mjs +17 -0
  23. package/esm2020/lib/components/base-list/store/base-list.query.mjs +35 -0
  24. package/esm2020/lib/components/base-list/store/base-list.service.mjs +341 -0
  25. package/esm2020/lib/components/base-list/store/base-list.store.mjs +81 -0
  26. 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
  27. package/esm2020/lib/components/multi-state-list/multi-state-list.component.mjs +71 -0
  28. 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
  29. 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
  30. 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
  31. package/{esm2015/lib/components/multi-state-list/public-api.js → esm2020/lib/components/multi-state-list/public-api.mjs} +0 -0
  32. 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
  33. 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
  34. package/esm2020/lib/components/multi-state-list/store/multi-state-list.store.mjs +24 -0
  35. package/{esm2015/lib/components/public-api.js → esm2020/lib/components/public-api.mjs} +0 -0
  36. package/esm2020/lib/components/query-builder/filter-selection/filter-selection.component.mjs +41 -0
  37. 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
  38. package/{esm2015/lib/components/query-builder/providers/filter-group.service.js → esm2020/lib/components/query-builder/providers/filter-group.service.mjs} +0 -0
  39. package/{esm2015/lib/components/query-builder/public-api.js → esm2020/lib/components/query-builder/public-api.mjs} +0 -0
  40. package/{esm2015/lib/components/query-builder/query-builder-trigger.directive.js → esm2020/lib/components/query-builder/query-builder-trigger.directive.mjs} +3 -3
  41. package/esm2020/lib/components/query-builder/query-builder.component.mjs +93 -0
  42. package/{esm2015/lib/components/query-builder/query-builder.form.js → esm2020/lib/components/query-builder/query-builder.form.mjs} +0 -0
  43. package/esm2020/lib/components/query-builder/query-builder.module.mjs +116 -0
  44. package/esm2020/lib/components/query-builder/rule/components/date/date-filter.component.mjs +29 -0
  45. package/{esm2015/lib/components/query-builder/rule/components/filter.component.js → esm2020/lib/components/query-builder/rule/components/filter.component.mjs} +3 -3
  46. package/esm2020/lib/components/query-builder/rule/components/number/number-filter.component.mjs +28 -0
  47. package/esm2020/lib/components/query-builder/rule/components/radio/radio-filter.component.mjs +30 -0
  48. package/esm2020/lib/components/query-builder/rule/components/select/select-filter.component.mjs +83 -0
  49. package/esm2020/lib/components/query-builder/rule/components/text/text-filter.component.mjs +31 -0
  50. package/esm2020/lib/components/query-builder/rule/rule.component.mjs +78 -0
  51. package/{esm2015/lib/components/query-builder/utils/qb-filter.utils.js → esm2020/lib/components/query-builder/utils/qb-filter.utils.mjs} +23 -9
  52. package/{esm2015/lib/models/filter.model.js → esm2020/lib/models/filter.model.mjs} +0 -0
  53. package/{esm2015/lib/models/public-api.js → esm2020/lib/models/public-api.mjs} +0 -0
  54. package/{esm2015/lib/models/query.model.js → esm2020/lib/models/query.model.mjs} +0 -0
  55. package/{esm2015/lib/utils/date.adapter.js → esm2020/lib/utils/date.adapter.mjs} +3 -3
  56. package/esm2020/lib/utils/filter.utils.mjs +40 -0
  57. package/{esm2015/lib/utils/public-api.js → esm2020/lib/utils/public-api.mjs} +0 -0
  58. package/{esm2015/lib/utils/query-params.utils.js → esm2020/lib/utils/query-params.utils.mjs} +0 -0
  59. package/{esm2015/lib/utils/string.utils.js → esm2020/lib/utils/string.utils.mjs} +0 -0
  60. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  61. package/{esm2015/recursyve-nice-data-filter-kit.js → esm2020/recursyve-nice-data-filter-kit.mjs} +0 -0
  62. package/fesm2015/recursyve-nice-data-filter-kit.mjs +2448 -0
  63. package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -0
  64. package/fesm2020/recursyve-nice-data-filter-kit.mjs +2446 -0
  65. package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -0
  66. package/lib/components/base-list/base-list.component.d.ts +3 -1
  67. package/lib/components/base-list/base-list.module.d.ts +15 -16
  68. package/lib/components/base-list/directives/base-list-directives.module.d.ts +2 -1
  69. package/lib/components/base-list/directives/base-list-filters.directive.d.ts +8 -0
  70. package/lib/components/base-list/models/layout.model.d.ts +1 -5
  71. package/lib/components/base-list/public-api.d.ts +1 -0
  72. package/lib/components/base-list/store/base-list.service.d.ts +2 -0
  73. package/lib/components/multi-state-list/multi-state-list.module.d.ts +15 -16
  74. package/lib/components/query-builder/query-builder.module.d.ts +10 -11
  75. package/package.json +30 -16
  76. package/src/lib/components/base-list/base-list.theme.scss +5 -5
  77. package/src/lib/components/query-builder/rule/rule.theme.scss +1 -1
  78. package/src/lib/nice-data-filter.theme.scss +7 -0
  79. package/bundles/recursyve-nice-data-filter-kit.umd.js +0 -3140
  80. package/bundles/recursyve-nice-data-filter-kit.umd.js.map +0 -1
  81. package/esm2015/lib/api/filter.api.js +0 -52
  82. package/esm2015/lib/api/saved-report.api.js +0 -49
  83. package/esm2015/lib/components/base-list/base-list.component.js +0 -292
  84. package/esm2015/lib/components/base-list/base-list.module.js +0 -180
  85. package/esm2015/lib/components/base-list/directives/base-list-directives.module.js +0 -40
  86. package/esm2015/lib/components/base-list/models/layout.model.js +0 -155
  87. package/esm2015/lib/components/base-list/providers/base-filter.service.js +0 -40
  88. package/esm2015/lib/components/base-list/public-api.js +0 -16
  89. package/esm2015/lib/components/base-list/store/base-list.query.js +0 -35
  90. package/esm2015/lib/components/base-list/store/base-list.service.js +0 -321
  91. package/esm2015/lib/components/base-list/store/base-list.store.js +0 -78
  92. package/esm2015/lib/components/multi-state-list/multi-state-list.component.js +0 -75
  93. package/esm2015/lib/components/multi-state-list/store/multi-state-list.store.js +0 -22
  94. package/esm2015/lib/components/query-builder/filter-selection/filter-selection.component.js +0 -48
  95. package/esm2015/lib/components/query-builder/query-builder.component.js +0 -100
  96. package/esm2015/lib/components/query-builder/query-builder.module.js +0 -120
  97. package/esm2015/lib/components/query-builder/rule/components/date/date-filter.component.js +0 -35
  98. package/esm2015/lib/components/query-builder/rule/components/number/number-filter.component.js +0 -34
  99. package/esm2015/lib/components/query-builder/rule/components/radio/radio-filter.component.js +0 -36
  100. package/esm2015/lib/components/query-builder/rule/components/select/select-filter.component.js +0 -94
  101. package/esm2015/lib/components/query-builder/rule/components/text/text-filter.component.js +0 -37
  102. package/esm2015/lib/components/query-builder/rule/rule.component.js +0 -86
  103. package/esm2015/lib/utils/filter.utils.js +0 -41
  104. package/fesm2015/recursyve-nice-data-filter-kit.js +0 -2481
  105. package/fesm2015/recursyve-nice-data-filter-kit.js.map +0 -1
@@ -1,3140 +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 NiceBaseListTableDirective = /** @class */ (function () {
534
- function NiceBaseListTableDirective(template) {
535
- this.template = template;
536
- }
537
- return NiceBaseListTableDirective;
538
- }());
539
- 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 });
540
- NiceBaseListTableDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListTableDirective, selector: "[niceListTable]", ngImport: i0__namespace });
541
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTableDirective, decorators: [{
542
- type: i0.Directive,
543
- args: [{ selector: "[niceListTable]" }]
544
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
545
-
546
- var NiceBaseListTitleDirective = /** @class */ (function () {
547
- function NiceBaseListTitleDirective(template) {
548
- this.template = template;
549
- }
550
- return NiceBaseListTitleDirective;
551
- }());
552
- 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 });
553
- NiceBaseListTitleDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: NiceBaseListTitleDirective, selector: "[niceListTitle]", ngImport: i0__namespace });
554
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListTitleDirective, decorators: [{
555
- type: i0.Directive,
556
- args: [{ selector: "[niceListTitle]" }]
557
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
558
-
559
- var NiceBaseListDirectiveModule = /** @class */ (function () {
560
- function NiceBaseListDirectiveModule() {
561
- }
562
- return NiceBaseListDirectiveModule;
563
- }());
564
- NiceBaseListDirectiveModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
565
- NiceBaseListDirectiveModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, declarations: [NiceBaseListButtonsDirective,
566
- NiceBaseListTitleDirective,
567
- NiceBaseListTableDirective,
568
- NiceBaseListCardsDirective,
569
- NiceBaseListCustomContentDirective], exports: [NiceBaseListButtonsDirective,
570
- NiceBaseListTitleDirective,
571
- NiceBaseListTableDirective,
572
- NiceBaseListCardsDirective,
573
- NiceBaseListCustomContentDirective] });
574
- NiceBaseListDirectiveModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule });
575
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListDirectiveModule, decorators: [{
576
- type: i0.NgModule,
577
- args: [{
578
- declarations: [
579
- NiceBaseListButtonsDirective,
580
- NiceBaseListTitleDirective,
581
- NiceBaseListTableDirective,
582
- NiceBaseListCardsDirective,
583
- NiceBaseListCustomContentDirective
584
- ],
585
- exports: [
586
- NiceBaseListButtonsDirective,
587
- NiceBaseListTitleDirective,
588
- NiceBaseListTableDirective,
589
- NiceBaseListCardsDirective,
590
- NiceBaseListCustomContentDirective
591
- ]
592
- }]
593
- }] });
594
-
595
- var TableColumns = /** @class */ (function () {
596
- function TableColumns(id, sortable) {
597
- if (sortable === void 0) { sortable = true; }
598
- this.id = id;
599
- this.sortable = sortable;
600
- }
601
- return TableColumns;
602
- }());
603
-
604
- exports.LayoutContent = void 0;
605
- (function (LayoutContent) {
606
- LayoutContent["Table"] = "table";
607
- LayoutContent["Cards"] = "cards";
608
- LayoutContent["Custom"] = "custom";
609
- })(exports.LayoutContent || (exports.LayoutContent = {}));
610
- var defaultLayout = {
611
- default: {
612
- type: "column",
613
- items: [
614
- {
615
- type: "row",
616
- classes: ["mb-8"],
617
- items: [
618
- {
619
- name: "title",
620
- flex: "33"
621
- },
622
- {
623
- type: "row",
624
- flex: "1 0 auto",
625
- align: "center center",
626
- items: [
627
- {
628
- name: "search",
629
- flex: "1 0 auto"
630
- },
631
- {
632
- type: "row",
633
- flex: "1 0 auto",
634
- align: "end",
635
- items: [
636
- {
637
- name: "prefixButtons",
638
- align: "end center"
639
- },
640
- {
641
- name: "exportButtons",
642
- align: "end center"
643
- },
644
- {
645
- name: "suffixButtons",
646
- align: "end center"
647
- }
648
- ]
649
- }
650
- ]
651
- }
652
- ]
653
- },
654
- {
655
- name: "queryBuilder"
656
- },
657
- {
658
- name: "content"
659
- },
660
- {
661
- name: "pagination"
662
- }
663
- ]
664
- },
665
- sm: {
666
- type: "column",
667
- items: [
668
- {
669
- type: "row",
670
- classes: ["mb-8"],
671
- align: "center center",
672
- items: [
673
- {
674
- name: "title",
675
- flex: "50"
676
- },
677
- {
678
- type: "row",
679
- flex: "1 0 auto",
680
- align: "end center",
681
- items: [
682
- {
683
- name: "prefixButtons"
684
- },
685
- {
686
- name: "exportButtons"
687
- },
688
- {
689
- name: "suffixButtons"
690
- }
691
- ]
692
- }
693
- ]
694
- },
695
- {
696
- name: "search",
697
- align: "center center",
698
- classes: ["mb-8"]
699
- },
700
- {
701
- name: "queryBuilder"
702
- },
703
- {
704
- name: "content"
705
- },
706
- {
707
- name: "pagination"
708
- }
709
- ]
710
- },
711
- xs: {
712
- type: "column",
713
- items: [
714
- {
715
- type: "row",
716
- classes: ["mb-8"],
717
- align: "center center",
718
- items: [
719
- {
720
- name: "title",
721
- flex: "50"
722
- },
723
- {
724
- type: "row",
725
- flex: "1 0 auto",
726
- align: "end center",
727
- items: [
728
- {
729
- name: "prefixButtons"
730
- },
731
- {
732
- name: "exportButtons"
733
- },
734
- {
735
- name: "suffixButtons"
736
- }
737
- ]
738
- }
739
- ]
740
- },
741
- {
742
- name: "search",
743
- align: "center center",
744
- classes: ["mb-8"]
745
- },
746
- {
747
- name: "queryBuilder"
748
- },
749
- {
750
- name: "content"
751
- },
752
- {
753
- name: "pagination"
754
- }
755
- ]
756
- }
757
- };
758
-
759
- var FilterUtils = /** @class */ (function () {
760
- function FilterUtils() {
761
- }
762
- FilterUtils.parametersToRequest = function (filterParameters) {
763
- var _a, _b, _c, _d, _e, _f;
764
- return {
765
- page: {
766
- number: Math.ceil(((_a = filterParameters.start) !== null && _a !== void 0 ? _a : 0) / ((_b = filterParameters.length) !== null && _b !== void 0 ? _b : 1)),
767
- size: (_c = filterParameters.length) !== null && _c !== void 0 ? _c : 0
768
- },
769
- search: {
770
- value: (_d = filterParameters.search) !== null && _d !== void 0 ? _d : ""
771
- },
772
- query: {
773
- condition: "and",
774
- rules: (_e = filterParameters.rules) !== null && _e !== void 0 ? _e : []
775
- },
776
- order: (_f = filterParameters.order) !== null && _f !== void 0 ? _f : undefined,
777
- data: filterParameters.data
778
- };
779
- };
780
- FilterUtils.filterChangeNeedsRefresh = function (currentFilters, newFilters) {
781
- var newFilterKeys = Object.keys(newFilters).sort();
782
- if (newFilterKeys.length === 0) {
783
- return true;
784
- }
785
- return newFilterKeys.some(function (key) {
786
- var currentValue = currentFilters[key];
787
- var newValue = currentFilters[key];
788
- if (Array.isArray(currentValue)) {
789
- return !i18.ObjectUtils.areObjectsEqual(currentValue, newValue);
790
- }
791
- else if (typeof currentValue === "object" && currentValue !== null) {
792
- return !i18.ObjectUtils.areObjectsEqual(currentValue, newValue);
793
- }
794
- else {
795
- return currentValue !== newValue;
796
- }
797
- });
798
- };
799
- return FilterUtils;
800
- }());
801
-
802
- var NiceFilterService = /** @class */ (function () {
803
- function NiceFilterService(api) {
804
- this.api = api;
805
- }
806
- NiceFilterService.prototype.filter = function (params) {
807
- var _a;
808
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.filter(FilterUtils.parametersToRequest(params));
809
- };
810
- NiceFilterService.prototype.getFile = function (type, parameters) {
811
- var _a;
812
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.downloadData(type, FilterUtils.parametersToRequest(parameters));
813
- };
814
- NiceFilterService.prototype.getPrintableHtml = function (parameters) {
815
- var _a;
816
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.getPrintableHtml(FilterUtils.parametersToRequest(parameters));
817
- };
818
- NiceFilterService.prototype.getFilterConfig = function () {
819
- var _a;
820
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.getFilterConfig();
821
- };
822
- NiceFilterService.prototype.searchFilterValue = function (filterConfig, value) {
823
- var _a;
824
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.searchFilterValue(filterConfig.id, value);
825
- };
826
- NiceFilterService.prototype.searchFilterResourceValue = function (filterConfig, resourceId) {
827
- var _a;
828
- return (_a = this.api) === null || _a === void 0 ? void 0 : _a.searchFilterResourceValue(filterConfig.id, resourceId);
829
- };
830
- return NiceFilterService;
831
- }());
832
- 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 });
833
- NiceFilterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceFilterService });
834
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceFilterService, decorators: [{
835
- type: i0.Injectable
836
- }], ctorParameters: function () { return [{ type: NiceFilterApi }]; } });
837
-
838
- var NiceSavedReportsApi = /** @class */ (function () {
839
- function NiceSavedReportsApi(filterApiUrl, path, http) {
840
- this.filterApiUrl = filterApiUrl;
841
- this.path = path;
842
- this.http = http;
843
- }
844
- NiceSavedReportsApi.prototype.create = function (dto) {
845
- return this.http.post(this.url(), dto);
846
- };
847
- NiceSavedReportsApi.prototype.getAll = function () {
848
- return this.http.get(this.url());
849
- };
850
- NiceSavedReportsApi.prototype.getByTable = function (table) {
851
- return this.http.get(this.url("" + table));
852
- };
853
- NiceSavedReportsApi.prototype.getTopByTable = function (table) {
854
- return this.http.get(this.url(table + "/top"));
855
- };
856
- NiceSavedReportsApi.prototype.hit = function (id) {
857
- return this.http.put(this.url(id + "/hit"), null);
858
- };
859
- NiceSavedReportsApi.prototype.update = function (id, dto) {
860
- return this.http.put(this.url("" + id), dto);
861
- };
862
- NiceSavedReportsApi.prototype.delete = function (id) {
863
- return this.http.delete(this.url("" + id));
864
- };
865
- NiceSavedReportsApi.prototype.url = function () {
866
- var args = [];
867
- for (var _i = 0; _i < arguments.length; _i++) {
868
- args[_i] = arguments[_i];
869
- }
870
- var _b = __read(this.transformUrlArgs(args), 2), route = _b[0], queryParams = _b[1];
871
- var params = queryParams ? "?" + QueryParamsUtils.fromObject(queryParams) : "";
872
- if (route) {
873
- return this.filterApiUrl + "/" + this.path + "/" + route + params;
874
- }
875
- return this.filterApiUrl + "/" + this.path + params;
876
- };
877
- NiceSavedReportsApi.prototype.transformUrlArgs = function (args) {
878
- var _a;
879
- var _b = __read(args, 2), routeOfQueryParams = _b[0], query = _b[1];
880
- if (args.length === 1) {
881
- if (typeof routeOfQueryParams === "string") {
882
- return [routeOfQueryParams];
883
- }
884
- return ["", routeOfQueryParams];
885
- }
886
- return [(_a = routeOfQueryParams) !== null && _a !== void 0 ? _a : "", query];
887
- };
888
- return NiceSavedReportsApi;
889
- }());
890
-
891
- var NiceSavedReportService = /** @class */ (function () {
892
- function NiceSavedReportService(api) {
893
- this.api = api;
894
- }
895
- NiceSavedReportService.prototype.create = function (report) {
896
- return this.api.create(report);
897
- };
898
- NiceSavedReportService.prototype.update = function (id, report) {
899
- return this.api.update(id, report);
900
- };
901
- NiceSavedReportService.prototype.remove = function (id) {
902
- return this.api.delete(id);
903
- };
904
- NiceSavedReportService.prototype.getByTableName = function (table) {
905
- return this.api.getByTable(table);
906
- };
907
- NiceSavedReportService.prototype.getTopByTableName = function (table) {
908
- return this.api.getTopByTable(table);
909
- };
910
- NiceSavedReportService.prototype.hit = function (id) {
911
- return this.api.hit(id);
912
- };
913
- return NiceSavedReportService;
914
- }());
915
- 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 });
916
- NiceSavedReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceSavedReportService });
917
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceSavedReportService, decorators: [{
918
- type: i0.Injectable
919
- }], ctorParameters: function () { return [{ type: NiceSavedReportsApi }]; } });
920
-
921
- var BASE_LIST_LAYOUT = new i0.InjectionToken("base_list_layout");
922
- var DEFAULT_PARAMETERS = new i0.InjectionToken("default_parameters");
923
- var LIST_TABLE = new i0.InjectionToken("list_table");
924
- var TABLE_COLUMNS = new i0.InjectionToken("table_columns");
925
- var EXPORTS_SETTINGS = new i0.InjectionToken("exports_settings");
926
- var ENABLE_QUERY_BUILDER = new i0.InjectionToken("enable_query_builder");
927
-
928
- var initialBaseListState = {
929
- disabled: false,
930
- mergePageResults: false,
931
- resetPaging: false,
932
- filterConfigLoading: false,
933
- filterResult: null,
934
- filterParameters: {
935
- start: 0,
936
- length: 10,
937
- order: {},
938
- search: "",
939
- rules: [],
940
- data: {}
941
- },
942
- filterConfig: [],
943
- showQueryBuilder: false,
944
- defaultRules: []
945
- };
946
- exports.NiceBaseListStore = /** @class */ (function (_super) {
947
- __extends(NiceBaseListStore, _super);
948
- function NiceBaseListStore(parameters) {
949
- return _super.call(this, Object.assign(Object.assign({}, initialBaseListState), { filterParameters: Object.assign(Object.assign({}, initialBaseListState.filterParameters), (parameters !== null && parameters !== void 0 ? parameters : {})) })) || this;
950
- }
951
- NiceBaseListStore.prototype.setFilterConfigLoading = function (loading) {
952
- this.update({
953
- filterConfigLoading: loading
954
- });
955
- };
956
- NiceBaseListStore.prototype.setResult = function (filterResult, reset) {
957
- if (reset === void 0) { reset = false; }
958
- var mergePageResults = this.getValue().mergePageResults;
959
- if (mergePageResults && !reset) {
960
- this.update(function (state) {
961
- var _a, _b;
962
- return ({
963
- filterResult: {
964
- page: filterResult.page,
965
- total: filterResult.total,
966
- 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))
967
- },
968
- resetPaging: false
969
- });
970
- });
971
- }
972
- else {
973
- this.update({
974
- filterResult: filterResult
975
- });
976
- }
977
- };
978
- NiceBaseListStore.prototype.setParameters = function (filterParameters) {
979
- this.update({
980
- filterParameters: filterParameters
981
- });
982
- };
983
- return NiceBaseListStore;
984
- }(akita.Store));
985
- 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 });
986
- exports.NiceBaseListStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceBaseListStore });
987
- exports.NiceBaseListStore = __decorate([
988
- akita.StoreConfig({ name: "base-list", resettable: true }),
989
- __metadata("design:paramtypes", [Object])
990
- ], exports.NiceBaseListStore);
991
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceBaseListStore, decorators: [{
992
- type: i0.Injectable
993
- }], ctorParameters: function () {
994
- return [{ type: undefined, decorators: [{
995
- type: i0.Optional
996
- }, {
997
- type: i0.Inject,
998
- args: [DEFAULT_PARAMETERS]
999
- }] }];
1000
- } });
1001
-
1002
- var NiceBaseListQuery = /** @class */ (function (_super) {
1003
- __extends(NiceBaseListQuery, _super);
1004
- function NiceBaseListQuery(store) {
1005
- var _this = _super.call(this, store) || this;
1006
- _this.store = store;
1007
- return _this;
1008
- }
1009
- NiceBaseListQuery.prototype.selectData = function () {
1010
- 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 : []; });
1011
- };
1012
- NiceBaseListQuery.prototype.selectFilterParameters = function () {
1013
- return this.select(function (s) { return s.filterParameters; });
1014
- };
1015
- NiceBaseListQuery.prototype.selectFilterResult = function () {
1016
- return this.select(function (s) { return s.filterResult; });
1017
- };
1018
- NiceBaseListQuery.prototype.selectFilterConfig = function () {
1019
- return this.select(function (s) { return s.filterConfig; });
1020
- };
1021
- NiceBaseListQuery.prototype.selectFilterConfigLoading = function () {
1022
- return this.select(function (s) { return s.filterConfigLoading; });
1023
- };
1024
- NiceBaseListQuery.prototype.selectShowQueryBuilder = function () {
1025
- return this.select(function (s) { return s.showQueryBuilder; });
1026
- };
1027
- return NiceBaseListQuery;
1028
- }(akita.Query));
1029
- 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 });
1030
- NiceBaseListQuery.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListQuery });
1031
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListQuery, decorators: [{
1032
- type: i0.Injectable
1033
- }], ctorParameters: function () { return [{ type: exports.NiceBaseListStore }]; } });
1034
-
1035
- exports.FilterType = void 0;
1036
- (function (FilterType) {
1037
- FilterType["Text"] = "text";
1038
- FilterType["Number"] = "number";
1039
- FilterType["Date"] = "date";
1040
- FilterType["Select"] = "select";
1041
- FilterType["Radio"] = "radio";
1042
- })(exports.FilterType || (exports.FilterType = {}));
1043
-
1044
- exports.FilterOperatorTypes = void 0;
1045
- (function (FilterOperatorTypes) {
1046
- FilterOperatorTypes["Equal"] = "equal";
1047
- FilterOperatorTypes["NotEqual"] = "not_equal";
1048
- FilterOperatorTypes["In"] = "in";
1049
- FilterOperatorTypes["NotIn"] = "not_in";
1050
- FilterOperatorTypes["Less"] = "less";
1051
- FilterOperatorTypes["LessOrEqual"] = "less_or_equal";
1052
- FilterOperatorTypes["Greater"] = "greater";
1053
- FilterOperatorTypes["GreaterOrEqual"] = "greater_or_equal";
1054
- FilterOperatorTypes["Between"] = "between";
1055
- FilterOperatorTypes["NotBetween"] = "not_between";
1056
- FilterOperatorTypes["IsNull"] = "is_null";
1057
- FilterOperatorTypes["IsNotNull"] = "is_not_null";
1058
- FilterOperatorTypes["BeginsWith"] = "begins_with";
1059
- FilterOperatorTypes["NotBeginsWith"] = "not_begins_with";
1060
- FilterOperatorTypes["EndsWith"] = "ends_with";
1061
- FilterOperatorTypes["NotEndsWith"] = "not_ends_with";
1062
- FilterOperatorTypes["Contains"] = "contains";
1063
- FilterOperatorTypes["NotContains"] = "not_contains";
1064
- FilterOperatorTypes["IsEmpty"] = "is_empty";
1065
- FilterOperatorTypes["IsNotEmpty"] = "is_not_empty";
1066
- FilterOperatorTypes["None"] = "none";
1067
- })(exports.FilterOperatorTypes || (exports.FilterOperatorTypes = {}));
1068
-
1069
- var QBFilterUtils = /** @class */ (function () {
1070
- function QBFilterUtils() {
1071
- }
1072
- QBFilterUtils.isSingleInput = function (filterOperator) {
1073
- if (!filterOperator) {
1074
- return false;
1075
- }
1076
- return QBFilterUtils.singleInputOperators.includes(filterOperator);
1077
- };
1078
- QBFilterUtils.isDoubleInput = function (filterOperator) {
1079
- if (!filterOperator) {
1080
- return false;
1081
- }
1082
- return QBFilterUtils.doubleInputOperators.includes(filterOperator);
1083
- };
1084
- QBFilterUtils.isNoInput = function (filterOperator) {
1085
- if (!filterOperator) {
1086
- return false;
1087
- }
1088
- return QBFilterUtils.noInputOperators.includes(filterOperator);
1089
- };
1090
- QBFilterUtils.createRule = function (config, operator) {
1091
- var _a, _b, _c;
1092
- var base = {
1093
- id: config.id,
1094
- operation: operator || config.operators[0].id
1095
- };
1096
- switch (config.type) {
1097
- case exports.FilterType.Text:
1098
- return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? ["", ""] : "" });
1099
- case exports.FilterType.Select:
1100
- return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [null, null] : null });
1101
- case exports.FilterType.Date:
1102
- return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [new Date(), new Date()] : new Date() });
1103
- case exports.FilterType.Radio:
1104
- return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator)
1105
- ? [(_a = config.options) === null || _a === void 0 ? void 0 : _a[0].key, (_b = config.options) === null || _b === void 0 ? void 0 : _b[0].key]
1106
- : (_c = config.options) === null || _c === void 0 ? void 0 : _c[0].key });
1107
- case exports.FilterType.Number:
1108
- return Object.assign(Object.assign({}, base), { value: QBFilterUtils.isDoubleInput(operator) ? [0, 0] : 0 });
1109
- }
1110
- };
1111
- QBFilterUtils.createQueryModel = function (config) {
1112
- return {
1113
- condition: "or",
1114
- rules: [QBFilterUtils.createRule(config)]
1115
- };
1116
- };
1117
- return QBFilterUtils;
1118
- }());
1119
- QBFilterUtils.noInputOperators = [
1120
- exports.FilterOperatorTypes.IsEmpty,
1121
- exports.FilterOperatorTypes.IsNotEmpty,
1122
- exports.FilterOperatorTypes.IsNull,
1123
- exports.FilterOperatorTypes.IsNotNull,
1124
- exports.FilterOperatorTypes.None
1125
- ];
1126
- QBFilterUtils.singleInputOperators = [
1127
- exports.FilterOperatorTypes.Equal,
1128
- exports.FilterOperatorTypes.NotEqual,
1129
- exports.FilterOperatorTypes.Less,
1130
- exports.FilterOperatorTypes.LessOrEqual,
1131
- exports.FilterOperatorTypes.Greater,
1132
- exports.FilterOperatorTypes.GreaterOrEqual,
1133
- exports.FilterOperatorTypes.BeginsWith,
1134
- exports.FilterOperatorTypes.NotBeginsWith,
1135
- exports.FilterOperatorTypes.EndsWith,
1136
- exports.FilterOperatorTypes.NotEndsWith,
1137
- exports.FilterOperatorTypes.Contains,
1138
- exports.FilterOperatorTypes.NotContains
1139
- ];
1140
- QBFilterUtils.doubleInputOperators = [
1141
- exports.FilterOperatorTypes.Between,
1142
- exports.FilterOperatorTypes.NotBetween
1143
- ];
1144
-
1145
- var NiceBaseListService = /** @class */ (function () {
1146
- function NiceBaseListService(store, filterService, activatedRoute, router, appRef) {
1147
- this.store = store;
1148
- this.filterService = filterService;
1149
- this.activatedRoute = activatedRoute;
1150
- this.router = router;
1151
- this.appRef = appRef;
1152
- this.queryParamsLoaded$ = new rxjs.Subject();
1153
- this.downloadFileName = "data";
1154
- this.unsubscribeAll$ = new rxjs.Subject();
1155
- this.loadingData = false;
1156
- }
1157
- NiceBaseListService.prototype.init = function () {
1158
- return __awaiter(this, void 0, void 0, function () {
1159
- var filterConfig, e_1;
1160
- return __generator(this, function (_b) {
1161
- switch (_b.label) {
1162
- case 0:
1163
- this.store.setFilterConfigLoading(true);
1164
- _b.label = 1;
1165
- case 1:
1166
- _b.trys.push([1, 3, 4, 5]);
1167
- return [4 /*yield*/, this.filterService.getFilterConfig().toPromise()];
1168
- case 2:
1169
- filterConfig = _b.sent();
1170
- this.store.update({
1171
- filterConfig: filterConfig
1172
- });
1173
- return [3 /*break*/, 5];
1174
- case 3:
1175
- e_1 = _b.sent();
1176
- this.store.setError(e_1);
1177
- return [3 /*break*/, 5];
1178
- case 4:
1179
- this.store.setFilterConfigLoading(false);
1180
- return [7 /*endfinally*/];
1181
- case 5: return [2 /*return*/];
1182
- }
1183
- });
1184
- });
1185
- };
1186
- NiceBaseListService.prototype.resetStore = function () {
1187
- this.store.reset();
1188
- };
1189
- NiceBaseListService.prototype.resetData = function () {
1190
- this.store.update({
1191
- filterResult: null
1192
- });
1193
- };
1194
- NiceBaseListService.prototype.closeSubscriptions = function () {
1195
- this.unsubscribeAll$.next();
1196
- this.unsubscribeAll$.complete();
1197
- this.queryParamsLoaded$.complete();
1198
- };
1199
- NiceBaseListService.prototype.disableList = function () {
1200
- this.store.update({
1201
- disabled: true
1202
- });
1203
- };
1204
- NiceBaseListService.prototype.enableList = function () {
1205
- this.store.update({
1206
- disabled: false
1207
- });
1208
- };
1209
- NiceBaseListService.prototype.setMode = function (mode) {
1210
- this.store.update({
1211
- mergePageResults: mode === "infinite-scroll"
1212
- });
1213
- };
1214
- NiceBaseListService.prototype.loadQueryParams = function (autoLoad) {
1215
- var _this = this;
1216
- var _a;
1217
- (_a = this.activatedRoute) === null || _a === void 0 ? void 0 : _a.queryParams.pipe(operators.takeUntil(this.unsubscribeAll$), operators.map(function (params) {
1218
- return {
1219
- params: QueryParamsUtils.extractFilterParameters(params)
1220
- };
1221
- })).subscribe(function (_b) {
1222
- var params = _b.params;
1223
- if (!params || Object.keys(params).length === 0) {
1224
- params = _this.store.getValue().filterParameters;
1225
- }
1226
- var _c = _this.store.getValue(), filterParameters = _c.filterParameters, filterResult = _c.filterResult;
1227
- if (FilterUtils.filterChangeNeedsRefresh(filterParameters, params) ||
1228
- !filterResult) {
1229
- if (autoLoad) {
1230
- _this.loadData(params, false);
1231
- }
1232
- else {
1233
- _this.setParameters(params, false);
1234
- }
1235
- }
1236
- _this.queryParamsLoaded$.next();
1237
- });
1238
- };
1239
- NiceBaseListService.prototype.resetAndLoadData = function (parameters, updateQueryParams) {
1240
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1241
- return __awaiter(this, void 0, void 0, function () {
1242
- return __generator(this, function (_b) {
1243
- return [2 /*return*/, this.loadData(parameters, updateQueryParams, true)];
1244
- });
1245
- });
1246
- };
1247
- NiceBaseListService.prototype.loadData = function (parameters, updateQueryParams, reset) {
1248
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1249
- if (reset === void 0) { reset = false; }
1250
- return __awaiter(this, void 0, void 0, function () {
1251
- var disabled, filterParameters, result, e_2;
1252
- return __generator(this, function (_b) {
1253
- switch (_b.label) {
1254
- case 0:
1255
- disabled = this.store.getValue().disabled;
1256
- _b.label = 1;
1257
- case 1:
1258
- _b.trys.push([1, 4, 5, 6]);
1259
- filterParameters = this.mergeParameters(parameters);
1260
- if (!!disabled) return [3 /*break*/, 3];
1261
- this.store.setLoading(true);
1262
- this.loadingData = true;
1263
- return [4 /*yield*/, this.filterService.filter(this.getParameters(filterParameters)).toPromise()];
1264
- case 2:
1265
- result = _b.sent();
1266
- this.store.setResult(result, reset);
1267
- _b.label = 3;
1268
- case 3:
1269
- if (filterParameters) {
1270
- this.setParameters(filterParameters, disabled ? false : updateQueryParams);
1271
- }
1272
- return [3 /*break*/, 6];
1273
- case 4:
1274
- e_2 = _b.sent();
1275
- this.store.setError(e_2);
1276
- return [3 /*break*/, 6];
1277
- case 5:
1278
- this.store.setLoading(false);
1279
- this.loadingData = false;
1280
- return [7 /*endfinally*/];
1281
- case 6: return [2 /*return*/];
1282
- }
1283
- });
1284
- });
1285
- };
1286
- NiceBaseListService.prototype.loadNewPage = function (start, length) {
1287
- return __awaiter(this, void 0, void 0, function () {
1288
- var filterParameters;
1289
- return __generator(this, function (_b) {
1290
- switch (_b.label) {
1291
- case 0:
1292
- filterParameters = this.store.getValue().filterParameters;
1293
- return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: start,
1294
- length: length }))];
1295
- case 1:
1296
- _b.sent();
1297
- return [2 /*return*/];
1298
- }
1299
- });
1300
- });
1301
- };
1302
- NiceBaseListService.prototype.loadNextPage = function () {
1303
- return __awaiter(this, void 0, void 0, function () {
1304
- var filterParameters;
1305
- return __generator(this, function (_b) {
1306
- switch (_b.label) {
1307
- case 0:
1308
- filterParameters = this.store.getValue().filterParameters;
1309
- return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: filterParameters.start + filterParameters.length }))];
1310
- case 1:
1311
- _b.sent();
1312
- return [2 /*return*/];
1313
- }
1314
- });
1315
- });
1316
- };
1317
- NiceBaseListService.prototype.resetPaging = function () {
1318
- return __awaiter(this, void 0, void 0, function () {
1319
- var filterParameters;
1320
- return __generator(this, function (_b) {
1321
- filterParameters = this.store.getValue().filterParameters;
1322
- this.store.setParameters(Object.assign(Object.assign({}, filterParameters), { start: 0 }));
1323
- this.store.update({
1324
- resetPaging: true
1325
- });
1326
- return [2 /*return*/];
1327
- });
1328
- });
1329
- };
1330
- NiceBaseListService.prototype.downloadData = function (type, parameters, updateQueryParams) {
1331
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1332
- return __awaiter(this, void 0, void 0, function () {
1333
- var filterParameters, result, e_3;
1334
- return __generator(this, function (_b) {
1335
- switch (_b.label) {
1336
- case 0:
1337
- _b.trys.push([0, 2, 3, 4]);
1338
- this.store.setLoading(true);
1339
- this.loadingData = true;
1340
- filterParameters = this.mergeParameters(parameters);
1341
- if (filterParameters) {
1342
- this.setParameters(filterParameters, updateQueryParams);
1343
- }
1344
- return [4 /*yield*/, this.filterService.getFile(type, this.getParameters(filterParameters)).toPromise()];
1345
- case 1:
1346
- result = _b.sent();
1347
- i18.FileUtils.downloadFile(this.downloadFileName + "." + type, result);
1348
- return [3 /*break*/, 4];
1349
- case 2:
1350
- e_3 = _b.sent();
1351
- this.store.setError(e_3);
1352
- return [3 /*break*/, 4];
1353
- case 3:
1354
- this.store.setLoading(false);
1355
- this.loadingData = false;
1356
- return [7 /*endfinally*/];
1357
- case 4: return [2 /*return*/];
1358
- }
1359
- });
1360
- });
1361
- };
1362
- NiceBaseListService.prototype.printData = function (parameters, updateQueryParams) {
1363
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1364
- return __awaiter(this, void 0, void 0, function () {
1365
- var filterParameters, result, e_4;
1366
- return __generator(this, function (_b) {
1367
- switch (_b.label) {
1368
- case 0:
1369
- _b.trys.push([0, 2, 3, 4]);
1370
- this.store.setLoading(true);
1371
- this.loadingData = true;
1372
- filterParameters = this.mergeParameters(parameters);
1373
- if (filterParameters) {
1374
- this.setParameters(filterParameters, updateQueryParams);
1375
- }
1376
- return [4 /*yield*/, this.filterService.getPrintableHtml(this.getParameters(filterParameters)).toPromise()];
1377
- case 1:
1378
- result = _b.sent();
1379
- i18.FileUtils.openPrintableWindow(result);
1380
- return [3 /*break*/, 4];
1381
- case 2:
1382
- e_4 = _b.sent();
1383
- this.store.setError(e_4);
1384
- return [3 /*break*/, 4];
1385
- case 3:
1386
- this.store.setLoading(false);
1387
- this.loadingData = false;
1388
- return [7 /*endfinally*/];
1389
- case 4: return [2 /*return*/];
1390
- }
1391
- });
1392
- });
1393
- };
1394
- NiceBaseListService.prototype.updateRule = function (id, newRule) {
1395
- var _a;
1396
- var filterParameters = this.store.getValue().filterParameters;
1397
- var rules = (_a = filterParameters.rules) === null || _a === void 0 ? void 0 : _a[0];
1398
- if (!rules || rules.rules.length === 0) {
1399
- this.updateRules([newRule]);
1400
- return;
1401
- }
1402
- var oldRule = rules.rules.find(function (r) { return r.id === id; });
1403
- var newRules = rules.rules;
1404
- if (oldRule) {
1405
- if (newRule) {
1406
- // Array replace
1407
- newRules = __spreadArray(__spreadArray(__spreadArray([], __read(rules.rules.slice(0, rules.rules.indexOf(oldRule)))), [
1408
- newRule
1409
- ]), __read(rules.rules.slice(rules.rules.indexOf(oldRule) + 1, rules.rules.length)));
1410
- }
1411
- else {
1412
- newRules = rules.rules.filter(function (r) { return r.id !== id; });
1413
- }
1414
- }
1415
- else {
1416
- newRules = __spreadArray(__spreadArray([], __read(newRules)), [newRule]);
1417
- }
1418
- this.updateRules(newRules);
1419
- };
1420
- NiceBaseListService.prototype.updateDefaultRules = function (rule) {
1421
- this.store.update({
1422
- defaultRules: rule
1423
- });
1424
- };
1425
- NiceBaseListService.prototype.updateGlobalRules = function (rules, updateQueryParams) {
1426
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1427
- return __awaiter(this, void 0, void 0, function () {
1428
- var filterParameters, newRules;
1429
- return __generator(this, function (_b) {
1430
- switch (_b.label) {
1431
- case 0:
1432
- filterParameters = this.store.getValue().filterParameters;
1433
- newRules = Object.assign(Object.assign({}, filterParameters), { rules: rules });
1434
- return [4 /*yield*/, this.loadData(newRules, updateQueryParams)];
1435
- case 1:
1436
- _b.sent();
1437
- return [2 /*return*/];
1438
- }
1439
- });
1440
- });
1441
- };
1442
- NiceBaseListService.prototype.addRuleFromConfig = function (config) {
1443
- var filterParameters = this.store.getValue().filterParameters;
1444
- var newRules = Object.assign(Object.assign({}, filterParameters), { rules: __spreadArray(__spreadArray([], __read(filterParameters.rules)), [
1445
- QBFilterUtils.createQueryModel(config)
1446
- ]) });
1447
- this.store.update({
1448
- showQueryBuilder: true
1449
- });
1450
- this.loadData(newRules, true);
1451
- };
1452
- NiceBaseListService.prototype.updateRules = function (rules) {
1453
- var filterParameters = this.store.getValue().filterParameters;
1454
- var newRules = {
1455
- order: filterParameters.order,
1456
- rules: [
1457
- {
1458
- condition: "and",
1459
- rules: rules
1460
- }
1461
- ]
1462
- };
1463
- this.loadData(newRules, true);
1464
- };
1465
- NiceBaseListService.prototype.toggleQueryBuilder = function () {
1466
- this.store.update(function (state) { return ({
1467
- showQueryBuilder: !state.showQueryBuilder
1468
- }); });
1469
- };
1470
- NiceBaseListService.prototype.updateListValue = function (value, key) {
1471
- if (key === void 0) { key = "id"; }
1472
- var filterResult = this.store.getValue().filterResult;
1473
- if (!filterResult) {
1474
- return;
1475
- }
1476
- this.store.update({
1477
- filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayUpsert(filterResult.values, value[key], value) })
1478
- });
1479
- };
1480
- NiceBaseListService.prototype.removeListValue = function (value, key) {
1481
- if (key === void 0) { key = "id"; }
1482
- var filterResult = this.store.getValue().filterResult;
1483
- if (!filterResult) {
1484
- return;
1485
- }
1486
- this.store.update({
1487
- filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayRemove(filterResult.values, value[key]) })
1488
- });
1489
- };
1490
- NiceBaseListService.prototype.updateQueryParams = function (queryParams) {
1491
- return __awaiter(this, void 0, void 0, function () {
1492
- return __generator(this, function (_b) {
1493
- switch (_b.label) {
1494
- case 0:
1495
- if (!this.activatedRoute) {
1496
- return [2 /*return*/];
1497
- }
1498
- return [4 /*yield*/, this.router.navigate([], {
1499
- relativeTo: this.activatedRoute,
1500
- queryParams: queryParams,
1501
- queryParamsHandling: "merge"
1502
- })];
1503
- case 1:
1504
- _b.sent();
1505
- return [2 /*return*/];
1506
- }
1507
- });
1508
- });
1509
- };
1510
- NiceBaseListService.prototype.getParameters = function (filterParameters) {
1511
- var defaultRules = this.store.getValue().defaultRules;
1512
- var parameters = Object.assign(Object.assign({}, filterParameters), { rules: (filterParameters === null || filterParameters === void 0 ? void 0 : filterParameters.rules) ? __spreadArray([], __read(filterParameters.rules)) : [] });
1513
- if (defaultRules === null || defaultRules === void 0 ? void 0 : defaultRules.length) {
1514
- parameters.rules.push({
1515
- condition: "and",
1516
- rules: defaultRules
1517
- });
1518
- }
1519
- return parameters;
1520
- };
1521
- NiceBaseListService.prototype.mergeParameters = function (parameters) {
1522
- var filterParameters = this.store.getValue().filterParameters;
1523
- if (!parameters) {
1524
- return filterParameters;
1525
- }
1526
- return Object.assign(Object.assign(Object.assign({}, filterParameters), parameters), { order: filterParameters.order && !parameters.order
1527
- ? undefined
1528
- : Object.assign(Object.assign({}, filterParameters.order), parameters.order) });
1529
- };
1530
- NiceBaseListService.prototype.setParameters = function (parameters, updateQueryParams) {
1531
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1532
- this.store.setParameters(parameters);
1533
- if (updateQueryParams) {
1534
- this.updateQueryParams(QueryParamsUtils.filterParametersToParamsMap(parameters));
1535
- }
1536
- };
1537
- return NiceBaseListService;
1538
- }());
1539
- 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 });
1540
- NiceBaseListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService });
1541
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService, decorators: [{
1542
- type: i0.Injectable
1543
- }], ctorParameters: function () { return [{ type: exports.NiceBaseListStore }, { type: NiceFilterService }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }]; } });
1544
-
1545
- var QueryRuleForm = /** @class */ (function () {
1546
- function QueryRuleForm(rule) {
1547
- if (!rule) {
1548
- return;
1549
- }
1550
- this.id = rule.id;
1551
- this.operation = rule.operation;
1552
- if (QBFilterUtils.isDoubleInput(rule.operation)) {
1553
- this.value = rule.value[0];
1554
- this.secondValue = rule.value[1];
1555
- }
1556
- else {
1557
- this.value = rule.value;
1558
- }
1559
- }
1560
- QueryRuleForm.prototype.transform = function () {
1561
- return {
1562
- id: this.id,
1563
- operation: this.operation,
1564
- value: this.secondValue === undefined ? this.value : [this.value, this.secondValue]
1565
- };
1566
- };
1567
- return QueryRuleForm;
1568
- }());
1569
- __decorate([
1570
- i1.Control(),
1571
- i1.Required(),
1572
- __metadata("design:type", String)
1573
- ], QueryRuleForm.prototype, "id", void 0);
1574
- __decorate([
1575
- i1.Control(),
1576
- i1.Required(),
1577
- __metadata("design:type", String)
1578
- ], QueryRuleForm.prototype, "operation", void 0);
1579
- __decorate([
1580
- i1.Control(),
1581
- i1.Required(),
1582
- __metadata("design:type", Object)
1583
- ], QueryRuleForm.prototype, "value", void 0);
1584
- __decorate([
1585
- i1.Control(),
1586
- i1.Required(),
1587
- __metadata("design:type", Object)
1588
- ], QueryRuleForm.prototype, "secondValue", void 0);
1589
- var QueryForm = /** @class */ (function () {
1590
- function QueryForm() {
1591
- }
1592
- return QueryForm;
1593
- }());
1594
- __decorate([
1595
- i1.Control(),
1596
- i1.Required(),
1597
- __metadata("design:type", String)
1598
- ], QueryForm.prototype, "condition", void 0);
1599
- __decorate([
1600
- i1.Array(QueryRuleForm),
1601
- __metadata("design:type", i1.Array)
1602
- ], QueryForm.prototype, "rules", void 0);
1603
- var QueryBuilderForm = /** @class */ (function () {
1604
- function QueryBuilderForm(rules) {
1605
- if (!rules) {
1606
- rules = [];
1607
- }
1608
- this.rules = rules.map(function (x) { return ({
1609
- condition: x.condition,
1610
- rules: x.rules.map(function (rule) { return new QueryRuleForm(rule); })
1611
- }); });
1612
- }
1613
- QueryBuilderForm.prototype.transform = function () {
1614
- return this.rules.map(function (x) { return ({
1615
- condition: x.condition,
1616
- rules: x.rules.map(function (rule) { return rule.transform(); })
1617
- }); });
1618
- };
1619
- return QueryBuilderForm;
1620
- }());
1621
- __decorate([
1622
- i1.Array(QueryForm),
1623
- __metadata("design:type", i1.Array)
1624
- ], QueryBuilderForm.prototype, "rules", void 0);
1625
-
1626
- var FilterComponent = /** @class */ (function () {
1627
- function FilterComponent() {
1628
- this.valueIndex = -1;
1629
- this.propagateChanges = function (_) { };
1630
- }
1631
- Object.defineProperty(FilterComponent.prototype, "value", {
1632
- get: function () {
1633
- if (this.valueIndex < 0) {
1634
- return this._value;
1635
- }
1636
- else if (this._value instanceof Array) {
1637
- return this._value[this.valueIndex];
1638
- }
1639
- return undefined;
1640
- },
1641
- enumerable: false,
1642
- configurable: true
1643
- });
1644
- FilterComponent.prototype.registerOnTouched = function (fn) {
1645
- // NO-OP
1646
- };
1647
- FilterComponent.prototype.registerOnChange = function (fn) {
1648
- this.propagateChanges = fn;
1649
- };
1650
- FilterComponent.prototype.writeValue = function (value) {
1651
- this._value = value;
1652
- };
1653
- FilterComponent.prototype.onValueChange = function (value) {
1654
- if (this.valueIndex < 0) {
1655
- this.propagateChanges(value);
1656
- }
1657
- else if (this._value instanceof Array) {
1658
- var v = __spreadArray([], __read(this._value));
1659
- v[this.valueIndex] = value;
1660
- this.propagateChanges(v);
1661
- }
1662
- };
1663
- return FilterComponent;
1664
- }());
1665
- FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1666
- FilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: FilterComponent, selector: "ng-component", inputs: { valueIndex: "valueIndex" }, ngImport: i0__namespace, template: "", isInline: true });
1667
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, decorators: [{
1668
- type: i0.Component,
1669
- args: [{ template: "" }]
1670
- }], propDecorators: { valueIndex: [{
1671
- type: i0.Input
1672
- }] } });
1673
-
1674
- var TextFilterComponent = /** @class */ (function (_super) {
1675
- __extends(TextFilterComponent, _super);
1676
- function TextFilterComponent() {
1677
- return _super !== null && _super.apply(this, arguments) || this;
1678
- }
1679
- return TextFilterComponent;
1680
- }(FilterComponent));
1681
- 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 });
1682
- TextFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: TextFilterComponent, selector: "nice-text-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1683
- {
1684
- provide: i1$1.NG_VALUE_ACCESSOR,
1685
- useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
1686
- multi: true
1687
- }
1688
- ], 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 });
1689
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: TextFilterComponent, decorators: [{
1690
- type: i0.Component,
1691
- args: [{
1692
- selector: "nice-text-filter",
1693
- templateUrl: "text-filter.template.html",
1694
- encapsulation: i0.ViewEncapsulation.None,
1695
- providers: [
1696
- {
1697
- provide: i1$1.NG_VALUE_ACCESSOR,
1698
- useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
1699
- multi: true
1700
- }
1701
- ]
1702
- }]
1703
- }], propDecorators: { filterConfig: [{
1704
- type: i0.Input
1705
- }] } });
1706
-
1707
- var NumberFilterComponent = /** @class */ (function (_super) {
1708
- __extends(NumberFilterComponent, _super);
1709
- function NumberFilterComponent() {
1710
- return _super !== null && _super.apply(this, arguments) || this;
1711
- }
1712
- return NumberFilterComponent;
1713
- }(FilterComponent));
1714
- 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 });
1715
- NumberFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NumberFilterComponent, selector: "nice-number-filter", providers: [
1716
- {
1717
- provide: i1$1.NG_VALUE_ACCESSOR,
1718
- useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
1719
- multi: true
1720
- }
1721
- ], 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 });
1722
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NumberFilterComponent, decorators: [{
1723
- type: i0.Component,
1724
- args: [{
1725
- selector: "nice-number-filter",
1726
- templateUrl: "number-filter.template.html",
1727
- encapsulation: i0.ViewEncapsulation.None,
1728
- providers: [
1729
- {
1730
- provide: i1$1.NG_VALUE_ACCESSOR,
1731
- useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
1732
- multi: true
1733
- }
1734
- ]
1735
- }]
1736
- }] });
1737
-
1738
- var RadioFilterComponent = /** @class */ (function (_super) {
1739
- __extends(RadioFilterComponent, _super);
1740
- function RadioFilterComponent() {
1741
- return _super !== null && _super.apply(this, arguments) || this;
1742
- }
1743
- return RadioFilterComponent;
1744
- }(FilterComponent));
1745
- 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 });
1746
- RadioFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1747
- {
1748
- provide: i1$1.NG_VALUE_ACCESSOR,
1749
- useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
1750
- multi: true
1751
- }
1752
- ], 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 });
1753
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RadioFilterComponent, decorators: [{
1754
- type: i0.Component,
1755
- args: [{
1756
- selector: "nice-radio-filter",
1757
- templateUrl: "radio-filter.template.html",
1758
- encapsulation: i0.ViewEncapsulation.None,
1759
- providers: [
1760
- {
1761
- provide: i1$1.NG_VALUE_ACCESSOR,
1762
- useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
1763
- multi: true
1764
- }
1765
- ]
1766
- }]
1767
- }], propDecorators: { filterConfig: [{
1768
- type: i0.Input
1769
- }] } });
1770
-
1771
- var SelectFilterComponent = /** @class */ (function (_super) {
1772
- __extends(SelectFilterComponent, _super);
1773
- function SelectFilterComponent(filterService) {
1774
- var _this = _super.call(this) || this;
1775
- _this.filterService = filterService;
1776
- _this.values = [];
1777
- _this.search$ = new rxjs.Subject();
1778
- return _this;
1779
- }
1780
- SelectFilterComponent.prototype.ngOnInit = function () {
1781
- return __awaiter(this, void 0, void 0, function () {
1782
- var _this = this;
1783
- return __generator(this, function (_a) {
1784
- if (!this.filterConfig.lazyLoading) {
1785
- this.values = this.filterConfig.values;
1786
- }
1787
- this.searchSub$ = this.search$
1788
- .pipe(operators.debounceTime(300), operators.switchMap(function (value) {
1789
- if (_this.filterConfig.lazyLoading) {
1790
- return _this.filterService.searchFilterValue(_this.filterConfig, value);
1791
- }
1792
- return rxjs.of(_this.filterConfig.values);
1793
- }))
1794
- .subscribe(function (values) {
1795
- _this.values = values;
1796
- });
1797
- return [2 /*return*/];
1798
- });
1799
- });
1800
- };
1801
- SelectFilterComponent.prototype.ngOnChanges = function (changes) {
1802
- if ("filterConfig" in changes) {
1803
- if (!this.filterConfig.lazyLoading) {
1804
- this.values = this.filterConfig.values;
1805
- }
1806
- }
1807
- };
1808
- SelectFilterComponent.prototype.searchValue = function () {
1809
- return __awaiter(this, void 0, void 0, function () {
1810
- var value;
1811
- var _this = this;
1812
- return __generator(this, function (_a) {
1813
- switch (_a.label) {
1814
- case 0:
1815
- if (!(this.value && !this.values.find(function (v) { return v.id === _this.value; }))) return [3 /*break*/, 2];
1816
- return [4 /*yield*/, this.filterService
1817
- .searchFilterResourceValue(this.filterConfig, this.value)
1818
- .toPromise()];
1819
- case 1:
1820
- value = _a.sent();
1821
- this.values = __spreadArray(__spreadArray([], __read(this.values)), [value]);
1822
- _a.label = 2;
1823
- case 2: return [2 /*return*/];
1824
- }
1825
- });
1826
- });
1827
- };
1828
- SelectFilterComponent.prototype.onValueChange = function (value) {
1829
- _super.prototype.onValueChange.call(this, value);
1830
- this.searchValue();
1831
- };
1832
- SelectFilterComponent.prototype.ngOnDestroy = function () {
1833
- this.searchSub$.unsubscribe();
1834
- };
1835
- SelectFilterComponent.prototype.writeValue = function (value) {
1836
- _super.prototype.writeValue.call(this, value);
1837
- this.searchValue();
1838
- };
1839
- return SelectFilterComponent;
1840
- }(FilterComponent));
1841
- 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 });
1842
- SelectFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: SelectFilterComponent, selector: "nice-select-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1843
- {
1844
- provide: i1$1.NG_VALUE_ACCESSOR,
1845
- useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
1846
- multi: true
1847
- }
1848
- ], 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", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "typeahead", "page$", "loading", "loadingPage", "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 });
1849
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: SelectFilterComponent, decorators: [{
1850
- type: i0.Component,
1851
- args: [{
1852
- selector: "nice-select-filter",
1853
- templateUrl: "select-filter.template.html",
1854
- encapsulation: i0.ViewEncapsulation.None,
1855
- providers: [
1856
- {
1857
- provide: i1$1.NG_VALUE_ACCESSOR,
1858
- useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
1859
- multi: true
1860
- }
1861
- ]
1862
- }]
1863
- }], ctorParameters: function () {
1864
- return [{ type: NiceFilterService, decorators: [{
1865
- type: i0.Optional
1866
- }] }];
1867
- }, propDecorators: { filterConfig: [{
1868
- type: i0.Input
1869
- }] } });
1870
-
1871
- var DateFilterComponent = /** @class */ (function (_super) {
1872
- __extends(DateFilterComponent, _super);
1873
- function DateFilterComponent() {
1874
- return _super !== null && _super.apply(this, arguments) || this;
1875
- }
1876
- return DateFilterComponent;
1877
- }(FilterComponent));
1878
- 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 });
1879
- DateFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: DateFilterComponent, selector: "nice-date-filter", providers: [
1880
- {
1881
- provide: i1$1.NG_VALUE_ACCESSOR,
1882
- useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
1883
- multi: true
1884
- }
1885
- ], 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 });
1886
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: DateFilterComponent, decorators: [{
1887
- type: i0.Component,
1888
- args: [{
1889
- selector: "nice-date-filter",
1890
- templateUrl: "date-filter.template.html",
1891
- encapsulation: i0.ViewEncapsulation.None,
1892
- providers: [
1893
- {
1894
- provide: i1$1.NG_VALUE_ACCESSOR,
1895
- useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
1896
- multi: true
1897
- }
1898
- ]
1899
- }]
1900
- }] });
1901
-
1902
- var NiceFilterGroupService = /** @class */ (function () {
1903
- function NiceFilterGroupService() {
1904
- }
1905
- return NiceFilterGroupService;
1906
- }());
1907
-
1908
- var FilterGroupIconPipe = /** @class */ (function () {
1909
- function FilterGroupIconPipe(service) {
1910
- this.service = service;
1911
- }
1912
- FilterGroupIconPipe.prototype.transform = function (value) {
1913
- return this.service.getFilterGroupIconClass(value);
1914
- };
1915
- return FilterGroupIconPipe;
1916
- }());
1917
- 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 });
1918
- FilterGroupIconPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, name: "filterGroupIcon" });
1919
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, decorators: [{
1920
- type: i0.Pipe,
1921
- args: [{
1922
- name: "filterGroupIcon"
1923
- }]
1924
- }], ctorParameters: function () { return [{ type: NiceFilterGroupService }]; } });
1925
-
1926
- var FilterSelectionComponent = /** @class */ (function () {
1927
- function FilterSelectionComponent() {
1928
- this.filterSelected = new i0.EventEmitter();
1929
- }
1930
- Object.defineProperty(FilterSelectionComponent.prototype, "filterGroups", {
1931
- get: function () {
1932
- var e_1, _b;
1933
- 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; });
1934
- var result = [];
1935
- var _loop_1 = function (group) {
1936
- if (!group) {
1937
- return "continue";
1938
- }
1939
- 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; })]);
1940
- };
1941
- var this_1 = this;
1942
- try {
1943
- for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
1944
- var group = groups_1_1.value;
1945
- _loop_1(group);
1946
- }
1947
- }
1948
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1949
- finally {
1950
- try {
1951
- if (groups_1_1 && !groups_1_1.done && (_b = groups_1.return)) _b.call(groups_1);
1952
- }
1953
- finally { if (e_1) throw e_1.error; }
1954
- }
1955
- return result.sort(function (_b, _c) {
1956
- var _d = __read(_b, 2), a = _d[1];
1957
- var _e = __read(_c, 2), b = _e[1];
1958
- return b.length - a.length;
1959
- });
1960
- },
1961
- enumerable: false,
1962
- configurable: true
1963
- });
1964
- FilterSelectionComponent.prototype.selectFilter = function (filterConfigurationModel) {
1965
- this.filterSelected.emit(filterConfigurationModel);
1966
- };
1967
- return FilterSelectionComponent;
1968
- }());
1969
- FilterSelectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1970
- 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 });
1971
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, decorators: [{
1972
- type: i0.Component,
1973
- args: [{
1974
- selector: "nice-filter-selection",
1975
- templateUrl: "filter-selection.template.html",
1976
- styleUrls: ["./filter-selection.style.scss"],
1977
- encapsulation: i0.ViewEncapsulation.None,
1978
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1979
- }]
1980
- }], propDecorators: { filterConfigs: [{
1981
- type: i0.Input
1982
- }], loading: [{
1983
- type: i0.Input
1984
- }], filterSelected: [{
1985
- type: i0.Output
1986
- }] } });
1987
-
1988
- var QueryBuilderTriggerDirective = /** @class */ (function () {
1989
- function QueryBuilderTriggerDirective(overlayPositionBuilder, elementRef, overlay, platform) {
1990
- this.overlayPositionBuilder = overlayPositionBuilder;
1991
- this.elementRef = elementRef;
1992
- this.overlay = overlay;
1993
- this.platform = platform;
1994
- this.queryBuilderFilterSelected = new i0.EventEmitter();
1995
- }
1996
- Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFilters", {
1997
- set: function (queryBuilderFilters) {
1998
- if (queryBuilderFilters) {
1999
- this._queryBuilderFilters = queryBuilderFilters;
2000
- }
2001
- this.updateFilterSelectionComponent();
2002
- },
2003
- enumerable: false,
2004
- configurable: true
2005
- });
2006
- Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFiltersLoading", {
2007
- set: function (queryBuilderFiltersLoading) {
2008
- this._queryBuilderFiltersLoading = queryBuilderFiltersLoading;
2009
- this.updateFilterSelectionComponent();
2010
- },
2011
- enumerable: false,
2012
- configurable: true
2013
- });
2014
- QueryBuilderTriggerDirective.prototype.click = function () {
2015
- var _this = this;
2016
- var positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
2017
- {
2018
- originX: "center",
2019
- originY: "bottom",
2020
- overlayX: this.isMobile() ? "end" : "center",
2021
- overlayY: "top"
2022
- }
2023
- ]);
2024
- this.overlayRef = this.overlay.create({
2025
- positionStrategy: positionStrategy,
2026
- hasBackdrop: true,
2027
- backdropClass: "cdk-overlay-transparent-backdrop"
2028
- });
2029
- var filterSelectionPortal = new portal.ComponentPortal(FilterSelectionComponent);
2030
- this.filterSelectionRef = this.overlayRef.attach(filterSelectionPortal);
2031
- this.updateFilterSelectionComponent();
2032
- this.overlayRef.backdropClick().subscribe(function () { return _this.close(); });
2033
- };
2034
- QueryBuilderTriggerDirective.prototype.close = function () {
2035
- this.overlayRef.dispose();
2036
- };
2037
- QueryBuilderTriggerDirective.prototype.updateFilterSelectionComponent = function () {
2038
- var _this = this;
2039
- if (!this.filterSelectionRef) {
2040
- return;
2041
- }
2042
- this.filterSelectionRef.instance.filterConfigs = this._queryBuilderFilters;
2043
- this.filterSelectionRef.instance.loading = this._queryBuilderFiltersLoading;
2044
- this.filterSelectionRef.instance.filterSelected.subscribe(function (filter) {
2045
- _this.queryBuilderFilterSelected.emit(filter);
2046
- _this.close();
2047
- });
2048
- };
2049
- QueryBuilderTriggerDirective.prototype.isMobile = function () {
2050
- return this.platform.ANDROID || this.platform.IOS;
2051
- };
2052
- return QueryBuilderTriggerDirective;
2053
- }());
2054
- 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 });
2055
- 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 });
2056
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderTriggerDirective, decorators: [{
2057
- type: i0.Directive,
2058
- args: [{ selector: "[niceQueryBuilderTrigger]" }]
2059
- }], ctorParameters: function () { return [{ type: i1__namespace$3.OverlayPositionBuilder }, { type: i0__namespace.ElementRef }, { type: i1__namespace$3.Overlay }, { type: i2__namespace$2.Platform }]; }, propDecorators: { queryBuilderFilters: [{
2060
- type: i0.Input
2061
- }], queryBuilderFiltersLoading: [{
2062
- type: i0.Input
2063
- }], queryBuilderFilterSelected: [{
2064
- type: i0.Output
2065
- }], click: [{
2066
- type: i0.HostListener,
2067
- args: ["click"]
2068
- }] } });
2069
-
2070
- var RuleComponent = /** @class */ (function () {
2071
- function RuleComponent(formGroupName) {
2072
- this.formGroupName = formGroupName;
2073
- this.remove = new i0.EventEmitter();
2074
- }
2075
- Object.defineProperty(RuleComponent.prototype, "filterConfig", {
2076
- get: function () {
2077
- var _a;
2078
- var rule = this.rules.at(0).value;
2079
- return (_a = this.filterConfigs) === null || _a === void 0 ? void 0 : _a.find(function (f) { return f.id === rule.id; });
2080
- },
2081
- enumerable: false,
2082
- configurable: true
2083
- });
2084
- Object.defineProperty(RuleComponent.prototype, "isSingleInput", {
2085
- get: function () {
2086
- return !this.isDoubleInput && !this.isNoInput;
2087
- },
2088
- enumerable: false,
2089
- configurable: true
2090
- });
2091
- Object.defineProperty(RuleComponent.prototype, "isDoubleInput", {
2092
- get: function () {
2093
- return QBFilterUtils.isDoubleInput(this.filterOperator);
2094
- },
2095
- enumerable: false,
2096
- configurable: true
2097
- });
2098
- Object.defineProperty(RuleComponent.prototype, "isNoInput", {
2099
- get: function () {
2100
- return QBFilterUtils.isNoInput(this.filterOperator);
2101
- },
2102
- enumerable: false,
2103
- configurable: true
2104
- });
2105
- RuleComponent.prototype.ngOnInit = function () {
2106
- this.formGroup = this.formGroupName.control;
2107
- this.rules = this.formGroup.get("rules");
2108
- this.filterOperator = this.rules.at(0).value.operation;
2109
- };
2110
- RuleComponent.prototype.onUpdateFilterConfig = function (config) {
2111
- var rule = QBFilterUtils.createRule(config);
2112
- this.rules.patchValue([rule]);
2113
- this.filterOperator = rule.operation;
2114
- };
2115
- RuleComponent.prototype.onClickOr = function () {
2116
- this.rules.push(QBFilterUtils.createRule(this.filterConfig, this.filterOperator));
2117
- };
2118
- RuleComponent.prototype.onUpdateFilterOperator = function (operator) {
2119
- var e_1, _c;
2120
- var _a, _b;
2121
- this.filterOperator = operator;
2122
- try {
2123
- for (var _d = __values(this.rules.controls), _e = _d.next(); !_e.done; _e = _d.next()) {
2124
- var rule = _e.value;
2125
- (_a = rule.get("operation")) === null || _a === void 0 ? void 0 : _a.patchValue(this.filterOperator);
2126
- if (this.isDoubleInput) {
2127
- (_b = rule.get("value")) === null || _b === void 0 ? void 0 : _b.patchValue([rule.value.value, rule.value.value]);
2128
- }
2129
- }
2130
- }
2131
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2132
- finally {
2133
- try {
2134
- if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2135
- }
2136
- finally { if (e_1) throw e_1.error; }
2137
- }
2138
- };
2139
- RuleComponent.prototype.onClickDelete = function (index) {
2140
- if (this.rules.length > 1) {
2141
- this.rules.removeAt(index);
2142
- }
2143
- else {
2144
- this.remove.emit();
2145
- }
2146
- };
2147
- return RuleComponent;
2148
- }());
2149
- 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 });
2150
- 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 [valueIndex]=\"0\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"0\"\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 [valueIndex]=\"0\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"0\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"0\"\n fxFlex\n formControlName=\"secondValue\"\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 [valueIndex]=\"1\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"1\"\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 [valueIndex]=\"1\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"1\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"1\"\n fxFlex\n formControlName=\"value\"\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 });
2151
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, decorators: [{
2152
- type: i0.Component,
2153
- args: [{
2154
- selector: "nice-rule",
2155
- templateUrl: "rule.template.html",
2156
- styleUrls: ["./rule.style.scss"],
2157
- encapsulation: i0.ViewEncapsulation.None
2158
- }]
2159
- }], ctorParameters: function () { return [{ type: i1__namespace$1.FormGroupName }]; }, propDecorators: { filterConfigs: [{
2160
- type: i0.Input
2161
- }], remove: [{
2162
- type: i0.Output
2163
- }] } });
2164
-
2165
- var QueryBuilderComponent = /** @class */ (function () {
2166
- function QueryBuilderComponent(formGroup) {
2167
- this.formGroup = formGroup;
2168
- this.close = new i0.EventEmitter();
2169
- this.createReport = new i0.EventEmitter();
2170
- this.updateReport = new i0.EventEmitter();
2171
- this.propagateChanges = function (_) { };
2172
- this.rules = this.formGroup.get("rules");
2173
- }
2174
- Object.defineProperty(QueryBuilderComponent.prototype, "canSave", {
2175
- get: function () {
2176
- return !this.currentSavedReport;
2177
- },
2178
- enumerable: false,
2179
- configurable: true
2180
- });
2181
- QueryBuilderComponent.prototype.registerOnChange = function (fn) {
2182
- this.propagateChanges = fn;
2183
- };
2184
- QueryBuilderComponent.prototype.registerOnTouched = function (fn) { };
2185
- QueryBuilderComponent.prototype.writeValue = function (rules) {
2186
- this.rules.clear();
2187
- this.formGroup.patchValue(new QueryBuilderForm(rules));
2188
- };
2189
- QueryBuilderComponent.prototype.onClickAddRule = function (filterConfigurationModel) {
2190
- this.rules.push(QBFilterUtils.createQueryModel(filterConfigurationModel));
2191
- };
2192
- QueryBuilderComponent.prototype.onClickDeleteRule = function (id) {
2193
- this.rules.removeAt(id);
2194
- if (this.rules.length === 0) {
2195
- this.close.emit();
2196
- this.onClickApply();
2197
- }
2198
- };
2199
- QueryBuilderComponent.prototype.onClickApply = function () {
2200
- this.propagateChanges(this.formGroup.getRawValue().transform());
2201
- };
2202
- QueryBuilderComponent.prototype.onClickSaveReport = function () {
2203
- this.createReport.emit();
2204
- };
2205
- QueryBuilderComponent.prototype.onClickUpdateReport = function () {
2206
- this.updateReport.emit();
2207
- };
2208
- return QueryBuilderComponent;
2209
- }());
2210
- 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 });
2211
- 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: [
2212
- {
2213
- provide: i1$1.NG_VALUE_ACCESSOR,
2214
- useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
2215
- multi: true
2216
- },
2217
- {
2218
- provide: i1.GeneratedFormGroup,
2219
- useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
2220
- }
2221
- ], 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 });
2222
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderComponent, decorators: [{
2223
- type: i0.Component,
2224
- args: [{
2225
- selector: "nice-query-builder",
2226
- templateUrl: "./query-builder.template.html",
2227
- styleUrls: ["./query-builder.style.scss"],
2228
- encapsulation: i0.ViewEncapsulation.None,
2229
- providers: [
2230
- {
2231
- provide: i1$1.NG_VALUE_ACCESSOR,
2232
- useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
2233
- multi: true
2234
- },
2235
- {
2236
- provide: i1.GeneratedFormGroup,
2237
- useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
2238
- }
2239
- ]
2240
- }]
2241
- }], ctorParameters: function () { return [{ type: i1__namespace$5.GeneratedFormGroup }]; }, propDecorators: { filterConfigs: [{
2242
- type: i0.Input
2243
- }], currentSavedReport: [{
2244
- type: i0.Input
2245
- }], loading: [{
2246
- type: i0.Input
2247
- }], close: [{
2248
- type: i0.Output
2249
- }], createReport: [{
2250
- type: i0.Output
2251
- }], updateReport: [{
2252
- type: i0.Output
2253
- }] } });
2254
-
2255
- var NiceBaseListComponent = /** @class */ (function () {
2256
- function NiceBaseListComponent(enableQueryBuilder, listLayout, columns, exportsSettings, query, service, activatedRoute, bottomSheet, router, mediaObserver) {
2257
- this.enableQueryBuilder = enableQueryBuilder;
2258
- this.listLayout = listLayout;
2259
- this.columns = columns;
2260
- this.exportsSettings = exportsSettings;
2261
- this.query = query;
2262
- this.service = service;
2263
- this.activatedRoute = activatedRoute;
2264
- this.bottomSheet = bottomSheet;
2265
- this.router = router;
2266
- this.mediaObserver = mediaObserver;
2267
- this.mode = "normal";
2268
- this.layout = "page";
2269
- this.layoutContent = exports.LayoutContent.Table;
2270
- this.autoChangeLayout = true;
2271
- this.autoLoad = true;
2272
- this.canExport = true;
2273
- this.disableRouting = false;
2274
- this.customExport = [];
2275
- this.newPage = new i0.EventEmitter();
2276
- this.defaultPageSizeOptions = [10, 25, 50, 100];
2277
- this.columnNames = [];
2278
- this.loading$ = this.query.selectLoading();
2279
- this.filterResult$ = this.query.selectFilterResult();
2280
- this.data$ = this.query.selectData();
2281
- this.recordsFiltered$ = this.filterResult$.pipe(operators.map(function (f) { return f && f.total; }));
2282
- this.showQueryBuilder$ = this.query.selectShowQueryBuilder();
2283
- this.filterParameters$ = this.query.selectFilterParameters();
2284
- 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)); }));
2285
- this.length$ = this.filterParameters$.pipe(operators.map(function (f) { return f.length; }));
2286
- this.isEmpty$ = this.recordsFiltered$.pipe(operators.map(function (r) { return r === 0; }));
2287
- this.searchQuery$ = this.filterParameters$.pipe(operators.map(function (f) { return f.search; }));
2288
- this.filterConfig$ = this.query.selectFilterConfig();
2289
- this.sortColumn$ = this.filterParameters$.pipe(operators.map(function (f) { var _a; return (_a = (f.order && f.order.column)) !== null && _a !== void 0 ? _a : ""; }));
2290
- this.sortDirection$ = this.filterParameters$.pipe(operators.map(function (f) { return f.order && f.order.direction; }));
2291
- this.filterConfigLoading$ = this.query.selectFilterConfigLoading();
2292
- this.rules$ = this.filterParameters$.pipe(operators.map(function (parameters) { return parameters.rules; }));
2293
- 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; }));
2294
- this.searchText$ = new rxjs.Subject();
2295
- this.setColumn(columns);
2296
- }
2297
- Object.defineProperty(NiceBaseListComponent.prototype, "prefixButtons", {
2298
- get: function () {
2299
- var _a, _b;
2300
- 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;
2301
- },
2302
- enumerable: false,
2303
- configurable: true
2304
- });
2305
- Object.defineProperty(NiceBaseListComponent.prototype, "suffixButtons", {
2306
- get: function () {
2307
- var _a, _b;
2308
- 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;
2309
- },
2310
- enumerable: false,
2311
- configurable: true
2312
- });
2313
- NiceBaseListComponent.prototype.ngOnInit = function () {
2314
- return __awaiter(this, void 0, void 0, function () {
2315
- var _this = this;
2316
- return __generator(this, function (_c) {
2317
- switch (_c.label) {
2318
- case 0: return [4 /*yield*/, this.service.init()];
2319
- case 1:
2320
- _c.sent();
2321
- this.service.loadQueryParams(this.autoLoad);
2322
- this.searchText$
2323
- .pipe(operators.debounceTime(300), operators.distinctUntilChanged(), operators.switchMap(function (search) {
2324
- _this.service.resetPaging();
2325
- return _this.service.loadData({
2326
- search: search
2327
- });
2328
- }))
2329
- .subscribe();
2330
- this.mediaObserver.asObservable().subscribe(function () {
2331
- if (!_this.autoChangeLayout) {
2332
- return;
2333
- }
2334
- if (_this.mediaObserver.isActive("lt-md") && _this.layoutContent === exports.LayoutContent.Table) {
2335
- _this.layoutContent = exports.LayoutContent.Cards;
2336
- }
2337
- else {
2338
- _this.layoutContent = exports.LayoutContent.Table;
2339
- }
2340
- });
2341
- return [2 /*return*/];
2342
- }
2343
- });
2344
- });
2345
- };
2346
- NiceBaseListComponent.prototype.ngOnDestroy = function () {
2347
- this.service.closeSubscriptions();
2348
- };
2349
- NiceBaseListComponent.prototype.ngOnChanges = function (changes) {
2350
- if ("mode" in changes) {
2351
- this.service.setMode(changes.mode.currentValue);
2352
- }
2353
- };
2354
- NiceBaseListComponent.prototype.clickToggleShowQueryBuilder = function () {
2355
- this.service.toggleQueryBuilder();
2356
- };
2357
- NiceBaseListComponent.prototype.onUpdateRules = function (rules) {
2358
- this.service.updateGlobalRules(rules);
2359
- };
2360
- NiceBaseListComponent.prototype.onQueryBuilderFilterSelected = function (filterConfigurationModel) {
2361
- this.service.addRuleFromConfig(filterConfigurationModel);
2362
- };
2363
- NiceBaseListComponent.prototype.onUpdatePage = function (pageEvent) {
2364
- this.service.loadNewPage(pageEvent.pageIndex * pageEvent.pageSize, pageEvent.pageSize);
2365
- this.newPage.emit(pageEvent);
2366
- };
2367
- NiceBaseListComponent.prototype.onUpdateSearch = function (search) {
2368
- this.searchText$.next(search);
2369
- };
2370
- NiceBaseListComponent.prototype.getFilterRule$ = function (id) {
2371
- return this.filterParameters$.pipe(operators.map(function (f) {
2372
- return (f.rules &&
2373
- f.rules[0] &&
2374
- f.rules[0].rules &&
2375
- f.rules[0].rules.find(function (r) { return r.id === id; }));
2376
- }));
2377
- };
2378
- NiceBaseListComponent.prototype.onUpdateSort = function (sort) {
2379
- if (!sort.active || !sort.direction) {
2380
- sort = {
2381
- active: "id",
2382
- direction: "asc"
2383
- };
2384
- }
2385
- this.service.loadData({
2386
- order: sort.active && sort.direction ? { column: sort.active, direction: sort.direction } : null
2387
- });
2388
- };
2389
- NiceBaseListComponent.prototype.updateRule = function (id, newRule) {
2390
- this.service.updateRule(id, newRule);
2391
- };
2392
- NiceBaseListComponent.prototype.updateRules = function (rules) {
2393
- this.service.updateRules(rules);
2394
- };
2395
- NiceBaseListComponent.prototype.clickExport = function () {
2396
- var _this = this;
2397
- var exports = [];
2398
- if (this.exportsSettings.xlsx) {
2399
- exports.push({
2400
- type: "xlsx",
2401
- onClickExport: function () { return _this.clickXlsx(); }
2402
- });
2403
- }
2404
- else if (this.exportsSettings.csv) {
2405
- exports.push({
2406
- type: "csv",
2407
- onClickExport: function () { return _this.clickCsv(); }
2408
- });
2409
- }
2410
- else if (this.exportsSettings.pdf) {
2411
- exports.push({
2412
- type: "pdf",
2413
- onClickExport: function () { return _this.clickPdf(); }
2414
- });
2415
- }
2416
- this.bottomSheet.open(i18.ExportBottomSheetComponent, {
2417
- data: {
2418
- exportStrategies: __spreadArray(__spreadArray([], __read(exports)), __read(this.customExport))
2419
- }
2420
- });
2421
- };
2422
- NiceBaseListComponent.prototype.navigate = function (item) {
2423
- if (this.navigateFn) {
2424
- this.navigateFn(this.baseRoute, item);
2425
- }
2426
- else {
2427
- var route = this.routeFn ? this.routeFn(item) : [(this.baseRoute || "") + (item === null || item === void 0 ? void 0 : item.id)];
2428
- this.router.navigate(typeof route === "string" ? [route] : route, { relativeTo: this.activatedRoute });
2429
- }
2430
- };
2431
- NiceBaseListComponent.prototype.clickXlsx = function () {
2432
- this.service.downloadData("xlsx");
2433
- };
2434
- NiceBaseListComponent.prototype.clickCsv = function () {
2435
- this.service.downloadData("csv");
2436
- };
2437
- NiceBaseListComponent.prototype.clickPrint = function () {
2438
- this.service.printData();
2439
- };
2440
- NiceBaseListComponent.prototype.clickPdf = function () {
2441
- this.service.downloadData("pdf");
2442
- };
2443
- NiceBaseListComponent.prototype.setColumn = function (columns) {
2444
- this.columns = columns;
2445
- this.columnNames = columns.map(function (x) { return x.id; });
2446
- };
2447
- return NiceBaseListComponent;
2448
- }());
2449
- 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 });
2450
- 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: [
2451
- NiceBaseListQuery,
2452
- NiceBaseListService,
2453
- exports.NiceBaseListStore
2454
- ], 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: "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</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 } });
2455
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListComponent, decorators: [{
2456
- type: i0.Component,
2457
- args: [{
2458
- selector: "nice-base-list",
2459
- templateUrl: "./base-list.template.html",
2460
- providers: [
2461
- NiceBaseListQuery,
2462
- NiceBaseListService,
2463
- exports.NiceBaseListStore
2464
- ]
2465
- }]
2466
- }], ctorParameters: function () {
2467
- return [{ type: undefined, decorators: [{
2468
- type: i0.Optional
2469
- }, {
2470
- type: i0.Inject,
2471
- args: [ENABLE_QUERY_BUILDER]
2472
- }] }, { type: undefined, decorators: [{
2473
- type: i0.Inject,
2474
- args: [BASE_LIST_LAYOUT]
2475
- }] }, { type: undefined, decorators: [{
2476
- type: i0.Inject,
2477
- args: [TABLE_COLUMNS]
2478
- }] }, { type: undefined, decorators: [{
2479
- type: i0.Inject,
2480
- args: [EXPORTS_SETTINGS]
2481
- }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }];
2482
- }, propDecorators: { title: [{
2483
- type: i0.ContentChild,
2484
- args: [NiceBaseListTitleDirective, { read: i0.TemplateRef }]
2485
- }], buttons: [{
2486
- type: i0.ContentChildren,
2487
- args: [NiceBaseListButtonsDirective]
2488
- }], table: [{
2489
- type: i0.ContentChild,
2490
- args: [NiceBaseListTableDirective, { read: i0.TemplateRef }]
2491
- }], cards: [{
2492
- type: i0.ContentChild,
2493
- args: [NiceBaseListCardsDirective, { read: i0.TemplateRef }]
2494
- }], customContent: [{
2495
- type: i0.ContentChild,
2496
- args: [NiceBaseListCustomContentDirective, { read: i0.TemplateRef }]
2497
- }], mode: [{
2498
- type: i0.Input
2499
- }], layout: [{
2500
- type: i0.Input
2501
- }], layoutContent: [{
2502
- type: i0.Input
2503
- }], autoChangeLayout: [{
2504
- type: i0.Input
2505
- }], baseRoute: [{
2506
- type: i0.Input
2507
- }], routeFn: [{
2508
- type: i0.Input
2509
- }], navigateFn: [{
2510
- type: i0.Input
2511
- }], autoLoad: [{
2512
- type: i0.Input
2513
- }], pageTitle: [{
2514
- type: i0.Input
2515
- }], canExport: [{
2516
- type: i0.Input
2517
- }], disableRouting: [{
2518
- type: i0.Input
2519
- }], customExport: [{
2520
- type: i0.Input
2521
- }], newPage: [{
2522
- type: i0.Output
2523
- }] } });
2524
-
2525
- var NiceCustomDateAdapter = /** @class */ (function (_super) {
2526
- __extends(NiceCustomDateAdapter, _super);
2527
- function NiceCustomDateAdapter(translateService, locale, platform) {
2528
- var _this = _super.call(this, locale, platform) || this;
2529
- _this.translateService = translateService;
2530
- _this.setLocale(_this.translateService.getDefaultLang());
2531
- // @ts-ignore
2532
- _this._format = function (dtf, date) {
2533
- return dtf.format(date);
2534
- };
2535
- return _this;
2536
- }
2537
- NiceCustomDateAdapter.prototype.format = function (date, displayFormat) {
2538
- return _super.prototype.format.call(this, date, displayFormat);
2539
- };
2540
- NiceCustomDateAdapter.prototype.getDate = function (date) {
2541
- return date.getUTCDate();
2542
- };
2543
- NiceCustomDateAdapter.prototype.getMonth = function (date) {
2544
- return date.getUTCMonth();
2545
- };
2546
- NiceCustomDateAdapter.prototype.getYear = function (date) {
2547
- return date.getUTCFullYear();
2548
- };
2549
- return NiceCustomDateAdapter;
2550
- }(i6.NativeDateAdapter));
2551
- 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 });
2552
- NiceCustomDateAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter });
2553
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter, decorators: [{
2554
- type: i0.Injectable
2555
- }], ctorParameters: function () {
2556
- return [{ type: i1__namespace$4.TranslateService }, { type: undefined, decorators: [{
2557
- type: i0.Inject,
2558
- args: [i6.MAT_DATE_LOCALE]
2559
- }] }, { type: i2__namespace$2.Platform }];
2560
- } });
2561
-
2562
- var QueryBuilderModule = /** @class */ (function () {
2563
- function QueryBuilderModule() {
2564
- }
2565
- return QueryBuilderModule;
2566
- }());
2567
- QueryBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2568
- QueryBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, declarations: [QueryBuilderComponent,
2569
- QueryBuilderTriggerDirective,
2570
- FilterSelectionComponent,
2571
- RuleComponent,
2572
- SelectFilterComponent,
2573
- TextFilterComponent,
2574
- NumberFilterComponent,
2575
- RadioFilterComponent,
2576
- DateFilterComponent,
2577
- FilterGroupIconPipe], imports: [i13.CommonModule,
2578
- i1$1.FormsModule,
2579
- i1$5.TranslateModule,
2580
- i1$4.OverlayModule,
2581
- i9.MatCardModule,
2582
- i2$1.MatListModule,
2583
- i4.FlexLayoutModule,
2584
- i7.MatButtonModule,
2585
- i6.MatRippleModule,
2586
- i6$1.MatIconModule,
2587
- i5$1.MatSelectModule,
2588
- i3$1.MatInputModule,
2589
- i2.MatDatepickerModule,
2590
- i1$3.MatRadioModule,
2591
- i18.NiceLoadingSpinnerModule,
2592
- i18.NiceTypeaheadModule,
2593
- i1$1.ReactiveFormsModule,
2594
- i5.NgxMaskModule], exports: [QueryBuilderComponent, QueryBuilderTriggerDirective] });
2595
- 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: [[
2596
- i13.CommonModule,
2597
- i1$1.FormsModule,
2598
- i1$5.TranslateModule,
2599
- i1$4.OverlayModule,
2600
- i9.MatCardModule,
2601
- i2$1.MatListModule,
2602
- i4.FlexLayoutModule,
2603
- i7.MatButtonModule,
2604
- i6.MatRippleModule,
2605
- i6$1.MatIconModule,
2606
- i5$1.MatSelectModule,
2607
- i3$1.MatInputModule,
2608
- i2.MatDatepickerModule,
2609
- i1$3.MatRadioModule,
2610
- i18.NiceLoadingSpinnerModule,
2611
- i18.NiceTypeaheadModule,
2612
- i1$1.ReactiveFormsModule,
2613
- i5.NgxMaskModule
2614
- ]] });
2615
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, decorators: [{
2616
- type: i0.NgModule,
2617
- args: [{
2618
- imports: [
2619
- i13.CommonModule,
2620
- i1$1.FormsModule,
2621
- i1$5.TranslateModule,
2622
- i1$4.OverlayModule,
2623
- i9.MatCardModule,
2624
- i2$1.MatListModule,
2625
- i4.FlexLayoutModule,
2626
- i7.MatButtonModule,
2627
- i6.MatRippleModule,
2628
- i6$1.MatIconModule,
2629
- i5$1.MatSelectModule,
2630
- i3$1.MatInputModule,
2631
- i2.MatDatepickerModule,
2632
- i1$3.MatRadioModule,
2633
- i18.NiceLoadingSpinnerModule,
2634
- i18.NiceTypeaheadModule,
2635
- i1$1.ReactiveFormsModule,
2636
- i5.NgxMaskModule
2637
- ],
2638
- declarations: [
2639
- QueryBuilderComponent,
2640
- QueryBuilderTriggerDirective,
2641
- FilterSelectionComponent,
2642
- RuleComponent,
2643
- SelectFilterComponent,
2644
- TextFilterComponent,
2645
- NumberFilterComponent,
2646
- RadioFilterComponent,
2647
- DateFilterComponent,
2648
- FilterGroupIconPipe
2649
- ],
2650
- providers: [{ provide: i6.DateAdapter, useClass: NiceCustomDateAdapter }],
2651
- exports: [QueryBuilderComponent, QueryBuilderTriggerDirective]
2652
- }]
2653
- }] });
2654
-
2655
- var NiceBaseListModule = /** @class */ (function () {
2656
- function NiceBaseListModule() {
2657
- }
2658
- NiceBaseListModule.forRoot = function (options) {
2659
- var _a;
2660
- return {
2661
- ngModule: NiceBaseListModule,
2662
- providers: __spreadArray([
2663
- {
2664
- provide: BASE_LIST_LAYOUT,
2665
- useValue: (_a = options === null || options === void 0 ? void 0 : options.layout) !== null && _a !== void 0 ? _a : defaultLayout
2666
- }
2667
- ], __read(((options === null || options === void 0 ? void 0 : options.queryBuilder) ? [
2668
- {
2669
- provide: ENABLE_QUERY_BUILDER,
2670
- useValue: true
2671
- },
2672
- {
2673
- provide: NiceFilterGroupService,
2674
- useClass: options.queryBuilder.filterGroupService
2675
- },
2676
- options.queryBuilder.savedReportService ? {
2677
- provide: NiceSavedReportService,
2678
- useClass: options.queryBuilder.savedReportService
2679
- } : undefined
2680
- ] : []))).filter(function (x) { return !!x; })
2681
- };
2682
- };
2683
- NiceBaseListModule.providerFactory = function (options) {
2684
- var _a;
2685
- return __spreadArray([
2686
- {
2687
- provide: NiceFilterService,
2688
- useClass: options.filterService
2689
- },
2690
- {
2691
- provide: LIST_TABLE,
2692
- useValue: options.table
2693
- },
2694
- {
2695
- provide: TABLE_COLUMNS,
2696
- useValue: options.columns,
2697
- },
2698
- {
2699
- provide: DEFAULT_PARAMETERS,
2700
- useValue: options.defaultParameters
2701
- },
2702
- options.layout ? {
2703
- provide: BASE_LIST_LAYOUT,
2704
- useValue: options.layout
2705
- } : undefined,
2706
- {
2707
- provide: EXPORTS_SETTINGS,
2708
- useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
2709
- pdf: true,
2710
- xlsx: true,
2711
- csv: true
2712
- }
2713
- },
2714
- options.disableQueryBuilder !== undefined ? {
2715
- provide: ENABLE_QUERY_BUILDER,
2716
- useValue: !options.disableQueryBuilder
2717
- } : null
2718
- ], __read((options.queryBuilder ? [
2719
- {
2720
- provide: NiceFilterGroupService,
2721
- useClass: options.queryBuilder.filterGroupService
2722
- },
2723
- options.queryBuilder.savedReportService ? {
2724
- provide: NiceSavedReportService,
2725
- useClass: options.queryBuilder.savedReportService
2726
- } : undefined
2727
- ] : []))).filter(function (x) { return !!x; });
2728
- };
2729
- return NiceBaseListModule;
2730
- }());
2731
- NiceBaseListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2732
- NiceBaseListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, declarations: [NiceBaseListComponent], imports: [i18.NiceExportBottomSheetModule,
2733
- NiceBaseListDirectiveModule,
2734
- i13.CommonModule,
2735
- i4.FlexModule,
2736
- i4.ExtendedModule,
2737
- i1$1.FormsModule,
2738
- i3.RouterModule,
2739
- i7.MatButtonModule,
2740
- i6$1.MatIconModule,
2741
- i16.MatTooltipModule,
2742
- i9.MatCardModule,
2743
- i8.MatPaginatorModule,
2744
- i1$5.TranslateModule,
2745
- i18.NiceLoadingSpinnerModule,
2746
- i11.MatTableModule,
2747
- i12.MatSortModule,
2748
- i6.MatRippleModule,
2749
- i4$1.MatBottomSheetModule,
2750
- QueryBuilderModule,
2751
- i17.MatBadgeModule], exports: [NiceBaseListComponent,
2752
- NiceBaseListDirectiveModule] });
2753
- NiceBaseListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, imports: [[
2754
- i18.NiceExportBottomSheetModule,
2755
- NiceBaseListDirectiveModule,
2756
- i13.CommonModule,
2757
- i4.FlexModule,
2758
- i4.ExtendedModule,
2759
- i1$1.FormsModule,
2760
- i3.RouterModule,
2761
- i7.MatButtonModule,
2762
- i6$1.MatIconModule,
2763
- i16.MatTooltipModule,
2764
- i9.MatCardModule,
2765
- i8.MatPaginatorModule,
2766
- i1$5.TranslateModule,
2767
- i18.NiceLoadingSpinnerModule,
2768
- i11.MatTableModule,
2769
- i12.MatSortModule,
2770
- i6.MatRippleModule,
2771
- i4$1.MatBottomSheetModule,
2772
- QueryBuilderModule,
2773
- i17.MatBadgeModule
2774
- ], NiceBaseListDirectiveModule] });
2775
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, decorators: [{
2776
- type: i0.NgModule,
2777
- args: [{
2778
- imports: [
2779
- i18.NiceExportBottomSheetModule,
2780
- NiceBaseListDirectiveModule,
2781
- i13.CommonModule,
2782
- i4.FlexModule,
2783
- i4.ExtendedModule,
2784
- i1$1.FormsModule,
2785
- i3.RouterModule,
2786
- i7.MatButtonModule,
2787
- i6$1.MatIconModule,
2788
- i16.MatTooltipModule,
2789
- i9.MatCardModule,
2790
- i8.MatPaginatorModule,
2791
- i1$5.TranslateModule,
2792
- i18.NiceLoadingSpinnerModule,
2793
- i11.MatTableModule,
2794
- i12.MatSortModule,
2795
- i6.MatRippleModule,
2796
- i4$1.MatBottomSheetModule,
2797
- QueryBuilderModule,
2798
- i17.MatBadgeModule
2799
- ],
2800
- declarations: [
2801
- NiceBaseListComponent
2802
- ],
2803
- exports: [
2804
- NiceBaseListComponent,
2805
- NiceBaseListDirectiveModule
2806
- ]
2807
- }]
2808
- }] });
2809
-
2810
- var NiceListState = /** @class */ (function () {
2811
- function NiceListState() {
2812
- }
2813
- return NiceListState;
2814
- }());
2815
-
2816
- var NiceMultiStateFilterService = /** @class */ (function (_super) {
2817
- __extends(NiceMultiStateFilterService, _super);
2818
- function NiceMultiStateFilterService(filters) {
2819
- var _this = _super.call(this) || this;
2820
- _this.filters = filters;
2821
- return _this;
2822
- }
2823
- NiceMultiStateFilterService.prototype.switchState = function (state) {
2824
- this.api = this.filters[state];
2825
- };
2826
- return NiceMultiStateFilterService;
2827
- }(NiceFilterService));
2828
-
2829
- var initialValue = Object.assign({}, initialBaseListState);
2830
- exports.NiceMultiStateListStore = /** @class */ (function (_super) {
2831
- __extends(NiceMultiStateListStore, _super);
2832
- function NiceMultiStateListStore() {
2833
- return _super.call(this, null) || this;
2834
- }
2835
- return NiceMultiStateListStore;
2836
- }(exports.NiceBaseListStore));
2837
- 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 });
2838
- exports.NiceMultiStateListStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore });
2839
- exports.NiceMultiStateListStore = __decorate([
2840
- akita.StoreConfig({ name: "multi-state-list", resettable: true }),
2841
- __metadata("design:paramtypes", [])
2842
- ], exports.NiceMultiStateListStore);
2843
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore, decorators: [{
2844
- type: i0.Injectable
2845
- }], ctorParameters: function () { return []; } });
2846
-
2847
- var NiceMultiStateListQuery = /** @class */ (function (_super) {
2848
- __extends(NiceMultiStateListQuery, _super);
2849
- function NiceMultiStateListQuery(store) {
2850
- var _this = _super.call(this, store) || this;
2851
- _this.store = store;
2852
- return _this;
2853
- }
2854
- return NiceMultiStateListQuery;
2855
- }(NiceBaseListQuery));
2856
- 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 });
2857
- NiceMultiStateListQuery.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery });
2858
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery, decorators: [{
2859
- type: i0.Injectable
2860
- }], ctorParameters: function () { return [{ type: exports.NiceMultiStateListStore }]; } });
2861
-
2862
- var LIST_STATES = new i0.InjectionToken("list_states");
2863
-
2864
- var NiceMultiStateListService = /** @class */ (function (_super) {
2865
- __extends(NiceMultiStateListService, _super);
2866
- function NiceMultiStateListService(states, store, activatedRoute, router, appRef, multiFilterService) {
2867
- var _this = _super.call(this, store, multiFilterService, activatedRoute, router, appRef) || this;
2868
- _this.states = states;
2869
- _this.multiFilterService = multiFilterService;
2870
- return _this;
2871
- }
2872
- NiceMultiStateListService.prototype.reset = function () {
2873
- this.store.reset();
2874
- };
2875
- NiceMultiStateListService.prototype.setStateDefaultFilter = function (state, parameters) {
2876
- this.states[state].defaultParameters = parameters;
2877
- };
2878
- NiceMultiStateListService.prototype.switchState = function (state) {
2879
- var _a;
2880
- var newState = this.states[state];
2881
- if (!state) {
2882
- return [];
2883
- }
2884
- this.multiFilterService.switchState(state);
2885
- this.reset();
2886
- this.init();
2887
- this.loadData((_a = newState.defaultParameters) !== null && _a !== void 0 ? _a : initialBaseListState.filterParameters);
2888
- return newState.columns;
2889
- };
2890
- return NiceMultiStateListService;
2891
- }(NiceBaseListService));
2892
- 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 });
2893
- NiceMultiStateListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService });
2894
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService, decorators: [{
2895
- type: i0.Injectable
2896
- }], ctorParameters: function () {
2897
- return [{ type: undefined, decorators: [{
2898
- type: i0.Inject,
2899
- args: [LIST_STATES]
2900
- }] }, { type: exports.NiceMultiStateListStore }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }, { type: NiceMultiStateFilterService }];
2901
- } });
2902
-
2903
- var NiceMultiStateListComponent = /** @class */ (function (_super) {
2904
- __extends(NiceMultiStateListComponent, _super);
2905
- function NiceMultiStateListComponent(enableQueryBuilder, listLayout, exportsSetting, query, activatedRoute, bottomSheet, router, mediaObserver, multiStateListService) {
2906
- var _this = _super.call(this, enableQueryBuilder, listLayout, [], exportsSetting, query, multiStateListService, activatedRoute, bottomSheet, router, mediaObserver) || this;
2907
- _this.multiStateListService = multiStateListService;
2908
- return _this;
2909
- }
2910
- Object.defineProperty(NiceMultiStateListComponent.prototype, "state", {
2911
- set: function (state) {
2912
- this.switchState(state);
2913
- },
2914
- enumerable: false,
2915
- configurable: true
2916
- });
2917
- NiceMultiStateListComponent.prototype.switchState = function (state) {
2918
- var columns = this.multiStateListService.switchState(state);
2919
- this.setColumn(columns);
2920
- };
2921
- return NiceMultiStateListComponent;
2922
- }(NiceBaseListComponent));
2923
- 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 });
2924
- NiceMultiStateListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NiceMultiStateListComponent, selector: "nice-multi-state-list", inputs: { state: "state" }, providers: [
2925
- NiceMultiStateListQuery,
2926
- NiceMultiStateListService,
2927
- exports.NiceMultiStateListStore
2928
- ], 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</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 } });
2929
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListComponent, decorators: [{
2930
- type: i0.Component,
2931
- args: [{
2932
- selector: "nice-multi-state-list",
2933
- templateUrl: "../base-list/base-list.template.html",
2934
- providers: [
2935
- NiceMultiStateListQuery,
2936
- NiceMultiStateListService,
2937
- exports.NiceMultiStateListStore
2938
- ]
2939
- }]
2940
- }], ctorParameters: function () {
2941
- return [{ type: undefined, decorators: [{
2942
- type: i0.Optional
2943
- }, {
2944
- type: i0.Inject,
2945
- args: [ENABLE_QUERY_BUILDER]
2946
- }] }, { type: undefined, decorators: [{
2947
- type: i0.Inject,
2948
- args: [BASE_LIST_LAYOUT]
2949
- }] }, { type: undefined, decorators: [{
2950
- type: i0.Inject,
2951
- args: [EXPORTS_SETTINGS]
2952
- }] }, { type: NiceMultiStateListQuery }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }, { type: NiceMultiStateListService }];
2953
- }, propDecorators: { state: [{
2954
- type: i0.Input
2955
- }] } });
2956
-
2957
- var NiceMultiStateListModule = /** @class */ (function () {
2958
- function NiceMultiStateListModule() {
2959
- }
2960
- NiceMultiStateListModule.providerFactory = function (options) {
2961
- var _a;
2962
- return __spreadArray([
2963
- {
2964
- provide: NiceMultiStateFilterService,
2965
- useExisting: options.filterService
2966
- },
2967
- {
2968
- provide: LIST_STATES,
2969
- useValue: options.states
2970
- },
2971
- options.layout ? {
2972
- provide: BASE_LIST_LAYOUT,
2973
- useValue: options.layout
2974
- } : undefined,
2975
- {
2976
- provide: EXPORTS_SETTINGS,
2977
- useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
2978
- pdf: true,
2979
- xlsx: true,
2980
- csv: true
2981
- }
2982
- }
2983
- ], __read((options.queryBuilder ? [
2984
- {
2985
- provide: ENABLE_QUERY_BUILDER,
2986
- useValue: true
2987
- },
2988
- {
2989
- provide: NiceFilterGroupService,
2990
- useClass: options.queryBuilder.filterGroupService
2991
- },
2992
- options.queryBuilder.savedReportService ? {
2993
- provide: NiceSavedReportService,
2994
- useClass: options.queryBuilder.savedReportService
2995
- } : undefined
2996
- ] : []))).filter(function (x) { return !!x; });
2997
- };
2998
- return NiceMultiStateListModule;
2999
- }());
3000
- NiceMultiStateListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3001
- NiceMultiStateListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, declarations: [NiceMultiStateListComponent], imports: [i18.NiceExportBottomSheetModule,
3002
- NiceBaseListDirectiveModule,
3003
- i13.CommonModule,
3004
- i4.FlexModule,
3005
- i4.ExtendedModule,
3006
- i1$1.FormsModule,
3007
- i3.RouterModule,
3008
- i7.MatButtonModule,
3009
- i6$1.MatIconModule,
3010
- i16.MatTooltipModule,
3011
- i9.MatCardModule,
3012
- i8.MatPaginatorModule,
3013
- i1$5.TranslateModule,
3014
- i18.NiceLoadingSpinnerModule,
3015
- i11.MatTableModule,
3016
- i12.MatSortModule,
3017
- i6.MatRippleModule,
3018
- i4$1.MatBottomSheetModule,
3019
- QueryBuilderModule,
3020
- i17.MatBadgeModule], exports: [NiceMultiStateListComponent,
3021
- NiceBaseListDirectiveModule] });
3022
- NiceMultiStateListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, imports: [[
3023
- i18.NiceExportBottomSheetModule,
3024
- NiceBaseListDirectiveModule,
3025
- i13.CommonModule,
3026
- i4.FlexModule,
3027
- i4.ExtendedModule,
3028
- i1$1.FormsModule,
3029
- i3.RouterModule,
3030
- i7.MatButtonModule,
3031
- i6$1.MatIconModule,
3032
- i16.MatTooltipModule,
3033
- i9.MatCardModule,
3034
- i8.MatPaginatorModule,
3035
- i1$5.TranslateModule,
3036
- i18.NiceLoadingSpinnerModule,
3037
- i11.MatTableModule,
3038
- i12.MatSortModule,
3039
- i6.MatRippleModule,
3040
- i4$1.MatBottomSheetModule,
3041
- QueryBuilderModule,
3042
- i17.MatBadgeModule
3043
- ], NiceBaseListDirectiveModule] });
3044
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, decorators: [{
3045
- type: i0.NgModule,
3046
- args: [{
3047
- imports: [
3048
- i18.NiceExportBottomSheetModule,
3049
- NiceBaseListDirectiveModule,
3050
- i13.CommonModule,
3051
- i4.FlexModule,
3052
- i4.ExtendedModule,
3053
- i1$1.FormsModule,
3054
- i3.RouterModule,
3055
- i7.MatButtonModule,
3056
- i6$1.MatIconModule,
3057
- i16.MatTooltipModule,
3058
- i9.MatCardModule,
3059
- i8.MatPaginatorModule,
3060
- i1$5.TranslateModule,
3061
- i18.NiceLoadingSpinnerModule,
3062
- i11.MatTableModule,
3063
- i12.MatSortModule,
3064
- i6.MatRippleModule,
3065
- i4$1.MatBottomSheetModule,
3066
- QueryBuilderModule,
3067
- i17.MatBadgeModule
3068
- ],
3069
- declarations: [
3070
- NiceMultiStateListComponent
3071
- ],
3072
- exports: [
3073
- NiceMultiStateListComponent,
3074
- NiceBaseListDirectiveModule
3075
- ]
3076
- }]
3077
- }] });
3078
-
3079
- var StringUtils = /** @class */ (function () {
3080
- function StringUtils() {
3081
- }
3082
- return StringUtils;
3083
- }());
3084
- String.prototype.toTableColumn = function (sortable) {
3085
- return new TableColumns(this.toString(), sortable);
3086
- };
3087
-
3088
- /*
3089
- * Public API Surface of nice-data-filter-kit
3090
- */
3091
-
3092
- /**
3093
- * Generated bundle index. Do not edit.
3094
- */
3095
-
3096
- exports.DateFilterComponent = DateFilterComponent;
3097
- exports.FilterComponent = FilterComponent;
3098
- exports.FilterGroupIconPipe = FilterGroupIconPipe;
3099
- exports.FilterSelectionComponent = FilterSelectionComponent;
3100
- exports.FilterUtils = FilterUtils;
3101
- exports.NiceBaseListButtonsDirective = NiceBaseListButtonsDirective;
3102
- exports.NiceBaseListCardsDirective = NiceBaseListCardsDirective;
3103
- exports.NiceBaseListComponent = NiceBaseListComponent;
3104
- exports.NiceBaseListCustomContentDirective = NiceBaseListCustomContentDirective;
3105
- exports.NiceBaseListDirectiveModule = NiceBaseListDirectiveModule;
3106
- exports.NiceBaseListModule = NiceBaseListModule;
3107
- exports.NiceBaseListQuery = NiceBaseListQuery;
3108
- exports.NiceBaseListService = NiceBaseListService;
3109
- exports.NiceBaseListTableDirective = NiceBaseListTableDirective;
3110
- exports.NiceBaseListTitleDirective = NiceBaseListTitleDirective;
3111
- exports.NiceCustomDateAdapter = NiceCustomDateAdapter;
3112
- exports.NiceFilterApi = NiceFilterApi;
3113
- exports.NiceFilterGroupService = NiceFilterGroupService;
3114
- exports.NiceFilterService = NiceFilterService;
3115
- exports.NiceListState = NiceListState;
3116
- exports.NiceMultiStateFilterService = NiceMultiStateFilterService;
3117
- exports.NiceMultiStateListComponent = NiceMultiStateListComponent;
3118
- exports.NiceMultiStateListModule = NiceMultiStateListModule;
3119
- exports.NiceMultiStateListQuery = NiceMultiStateListQuery;
3120
- exports.NiceMultiStateListService = NiceMultiStateListService;
3121
- exports.NiceSavedReportService = NiceSavedReportService;
3122
- exports.NumberFilterComponent = NumberFilterComponent;
3123
- exports.QBFilterUtils = QBFilterUtils;
3124
- exports.QueryBuilderComponent = QueryBuilderComponent;
3125
- exports.QueryBuilderModule = QueryBuilderModule;
3126
- exports.QueryBuilderTriggerDirective = QueryBuilderTriggerDirective;
3127
- exports.RadioFilterComponent = RadioFilterComponent;
3128
- exports.RuleComponent = RuleComponent;
3129
- exports.SelectFilterComponent = SelectFilterComponent;
3130
- exports.StringUtils = StringUtils;
3131
- exports.TableColumns = TableColumns;
3132
- exports.TextFilterComponent = TextFilterComponent;
3133
- exports.defaultLayout = defaultLayout;
3134
- exports.initialBaseListState = initialBaseListState;
3135
- exports.initialValue = initialValue;
3136
-
3137
- Object.defineProperty(exports, '__esModule', { value: true });
3138
-
3139
- })));
3140
- //# sourceMappingURL=recursyve-nice-data-filter-kit.umd.js.map