@recursyve/nice-data-filter-kit 12.1.28 → 13.0.1

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 +1 -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 -3153
  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 -290
  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 -327
  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 -2485
  105. package/fesm2015/recursyve-nice-data-filter-kit.js.map +0 -1
@@ -1,3153 +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.searchData = function (search) {
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), { search: search }))];
1294
- case 1:
1295
- _b.sent();
1296
- return [2 /*return*/];
1297
- }
1298
- });
1299
- });
1300
- };
1301
- NiceBaseListService.prototype.loadNewPage = function (start, length) {
1302
- return __awaiter(this, void 0, void 0, function () {
1303
- var filterParameters;
1304
- return __generator(this, function (_b) {
1305
- switch (_b.label) {
1306
- case 0:
1307
- filterParameters = this.store.getValue().filterParameters;
1308
- return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: start,
1309
- length: length }))];
1310
- case 1:
1311
- _b.sent();
1312
- return [2 /*return*/];
1313
- }
1314
- });
1315
- });
1316
- };
1317
- NiceBaseListService.prototype.loadNextPage = function () {
1318
- return __awaiter(this, void 0, void 0, function () {
1319
- var filterParameters;
1320
- return __generator(this, function (_b) {
1321
- switch (_b.label) {
1322
- case 0:
1323
- filterParameters = this.store.getValue().filterParameters;
1324
- return [4 /*yield*/, this.loadData(Object.assign(Object.assign({}, filterParameters), { start: filterParameters.start + filterParameters.length }))];
1325
- case 1:
1326
- _b.sent();
1327
- return [2 /*return*/];
1328
- }
1329
- });
1330
- });
1331
- };
1332
- NiceBaseListService.prototype.resetPaging = function () {
1333
- return __awaiter(this, void 0, void 0, function () {
1334
- var filterParameters;
1335
- return __generator(this, function (_b) {
1336
- filterParameters = this.store.getValue().filterParameters;
1337
- this.store.setParameters(Object.assign(Object.assign({}, filterParameters), { start: 0 }));
1338
- this.store.update({
1339
- resetPaging: true
1340
- });
1341
- return [2 /*return*/];
1342
- });
1343
- });
1344
- };
1345
- NiceBaseListService.prototype.downloadData = function (type, parameters, updateQueryParams) {
1346
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1347
- return __awaiter(this, void 0, void 0, function () {
1348
- var filterParameters, result, e_3;
1349
- return __generator(this, function (_b) {
1350
- switch (_b.label) {
1351
- case 0:
1352
- _b.trys.push([0, 2, 3, 4]);
1353
- this.store.setLoading(true);
1354
- this.loadingData = true;
1355
- filterParameters = this.mergeParameters(parameters);
1356
- if (filterParameters) {
1357
- this.setParameters(filterParameters, updateQueryParams);
1358
- }
1359
- return [4 /*yield*/, this.filterService.getFile(type, this.getParameters(filterParameters)).toPromise()];
1360
- case 1:
1361
- result = _b.sent();
1362
- i18.FileUtils.downloadFile(this.downloadFileName + "." + type, result);
1363
- return [3 /*break*/, 4];
1364
- case 2:
1365
- e_3 = _b.sent();
1366
- this.store.setError(e_3);
1367
- return [3 /*break*/, 4];
1368
- case 3:
1369
- this.store.setLoading(false);
1370
- this.loadingData = false;
1371
- return [7 /*endfinally*/];
1372
- case 4: return [2 /*return*/];
1373
- }
1374
- });
1375
- });
1376
- };
1377
- NiceBaseListService.prototype.printData = function (parameters, updateQueryParams) {
1378
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1379
- return __awaiter(this, void 0, void 0, function () {
1380
- var filterParameters, result, e_4;
1381
- return __generator(this, function (_b) {
1382
- switch (_b.label) {
1383
- case 0:
1384
- _b.trys.push([0, 2, 3, 4]);
1385
- this.store.setLoading(true);
1386
- this.loadingData = true;
1387
- filterParameters = this.mergeParameters(parameters);
1388
- if (filterParameters) {
1389
- this.setParameters(filterParameters, updateQueryParams);
1390
- }
1391
- return [4 /*yield*/, this.filterService.getPrintableHtml(this.getParameters(filterParameters)).toPromise()];
1392
- case 1:
1393
- result = _b.sent();
1394
- i18.FileUtils.openPrintableWindow(result);
1395
- return [3 /*break*/, 4];
1396
- case 2:
1397
- e_4 = _b.sent();
1398
- this.store.setError(e_4);
1399
- return [3 /*break*/, 4];
1400
- case 3:
1401
- this.store.setLoading(false);
1402
- this.loadingData = false;
1403
- return [7 /*endfinally*/];
1404
- case 4: return [2 /*return*/];
1405
- }
1406
- });
1407
- });
1408
- };
1409
- NiceBaseListService.prototype.updateRule = function (id, newRule) {
1410
- var _a;
1411
- var filterParameters = this.store.getValue().filterParameters;
1412
- var rules = (_a = filterParameters.rules) === null || _a === void 0 ? void 0 : _a[0];
1413
- if (!rules || rules.rules.length === 0) {
1414
- this.updateRules([newRule]);
1415
- return;
1416
- }
1417
- var oldRule = rules.rules.find(function (r) { return r.id === id; });
1418
- var newRules = rules.rules;
1419
- if (oldRule) {
1420
- if (newRule) {
1421
- // Array replace
1422
- newRules = __spreadArray(__spreadArray(__spreadArray([], __read(rules.rules.slice(0, rules.rules.indexOf(oldRule)))), [
1423
- newRule
1424
- ]), __read(rules.rules.slice(rules.rules.indexOf(oldRule) + 1, rules.rules.length)));
1425
- }
1426
- else {
1427
- newRules = rules.rules.filter(function (r) { return r.id !== id; });
1428
- }
1429
- }
1430
- else {
1431
- newRules = __spreadArray(__spreadArray([], __read(newRules)), [newRule]);
1432
- }
1433
- this.updateRules(newRules);
1434
- };
1435
- NiceBaseListService.prototype.updateDefaultRules = function (rule) {
1436
- this.store.update({
1437
- defaultRules: rule
1438
- });
1439
- };
1440
- NiceBaseListService.prototype.updateGlobalRules = function (rules, updateQueryParams) {
1441
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1442
- return __awaiter(this, void 0, void 0, function () {
1443
- var filterParameters, newRules;
1444
- return __generator(this, function (_b) {
1445
- switch (_b.label) {
1446
- case 0:
1447
- filterParameters = this.store.getValue().filterParameters;
1448
- newRules = Object.assign(Object.assign({}, filterParameters), { rules: rules });
1449
- return [4 /*yield*/, this.loadData(newRules, updateQueryParams)];
1450
- case 1:
1451
- _b.sent();
1452
- return [2 /*return*/];
1453
- }
1454
- });
1455
- });
1456
- };
1457
- NiceBaseListService.prototype.addRuleFromConfig = function (config) {
1458
- var filterParameters = this.store.getValue().filterParameters;
1459
- var newRules = Object.assign(Object.assign({}, filterParameters), { rules: __spreadArray(__spreadArray([], __read(filterParameters.rules)), [
1460
- QBFilterUtils.createQueryModel(config)
1461
- ]) });
1462
- this.store.update({
1463
- showQueryBuilder: true
1464
- });
1465
- this.loadData(newRules, true);
1466
- };
1467
- NiceBaseListService.prototype.updateRules = function (rules) {
1468
- var filterParameters = this.store.getValue().filterParameters;
1469
- var newRules = {
1470
- order: filterParameters.order,
1471
- rules: [
1472
- {
1473
- condition: "and",
1474
- rules: rules
1475
- }
1476
- ]
1477
- };
1478
- this.loadData(newRules, true);
1479
- };
1480
- NiceBaseListService.prototype.toggleQueryBuilder = function () {
1481
- this.store.update(function (state) { return ({
1482
- showQueryBuilder: !state.showQueryBuilder
1483
- }); });
1484
- };
1485
- NiceBaseListService.prototype.updateListValue = function (value, key) {
1486
- if (key === void 0) { key = "id"; }
1487
- var filterResult = this.store.getValue().filterResult;
1488
- if (!filterResult) {
1489
- return;
1490
- }
1491
- this.store.update({
1492
- filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayUpsert(filterResult.values, value[key], value) })
1493
- });
1494
- };
1495
- NiceBaseListService.prototype.removeListValue = function (value, key) {
1496
- if (key === void 0) { key = "id"; }
1497
- var filterResult = this.store.getValue().filterResult;
1498
- if (!filterResult) {
1499
- return;
1500
- }
1501
- this.store.update({
1502
- filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayRemove(filterResult.values, value[key]) })
1503
- });
1504
- };
1505
- NiceBaseListService.prototype.updateQueryParams = function (queryParams) {
1506
- return __awaiter(this, void 0, void 0, function () {
1507
- return __generator(this, function (_b) {
1508
- switch (_b.label) {
1509
- case 0:
1510
- if (!this.activatedRoute) {
1511
- return [2 /*return*/];
1512
- }
1513
- return [4 /*yield*/, this.router.navigate([], {
1514
- relativeTo: this.activatedRoute,
1515
- queryParams: queryParams,
1516
- queryParamsHandling: "merge"
1517
- })];
1518
- case 1:
1519
- _b.sent();
1520
- return [2 /*return*/];
1521
- }
1522
- });
1523
- });
1524
- };
1525
- NiceBaseListService.prototype.getParameters = function (filterParameters) {
1526
- var defaultRules = this.store.getValue().defaultRules;
1527
- var parameters = Object.assign(Object.assign({}, filterParameters), { rules: (filterParameters === null || filterParameters === void 0 ? void 0 : filterParameters.rules) ? __spreadArray([], __read(filterParameters.rules)) : [] });
1528
- if (defaultRules === null || defaultRules === void 0 ? void 0 : defaultRules.length) {
1529
- parameters.rules.push({
1530
- condition: "and",
1531
- rules: defaultRules
1532
- });
1533
- }
1534
- return parameters;
1535
- };
1536
- NiceBaseListService.prototype.mergeParameters = function (parameters) {
1537
- var filterParameters = this.store.getValue().filterParameters;
1538
- if (!parameters) {
1539
- return filterParameters;
1540
- }
1541
- return Object.assign(Object.assign(Object.assign({}, filterParameters), parameters), { order: filterParameters.order && !parameters.order
1542
- ? undefined
1543
- : Object.assign(Object.assign({}, filterParameters.order), parameters.order) });
1544
- };
1545
- NiceBaseListService.prototype.setParameters = function (parameters, updateQueryParams) {
1546
- if (updateQueryParams === void 0) { updateQueryParams = true; }
1547
- this.store.setParameters(parameters);
1548
- if (updateQueryParams) {
1549
- this.updateQueryParams(QueryParamsUtils.filterParametersToParamsMap(parameters));
1550
- }
1551
- };
1552
- return NiceBaseListService;
1553
- }());
1554
- 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 });
1555
- NiceBaseListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService });
1556
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListService, decorators: [{
1557
- type: i0.Injectable
1558
- }], ctorParameters: function () { return [{ type: exports.NiceBaseListStore }, { type: NiceFilterService }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }]; } });
1559
-
1560
- var QueryRuleForm = /** @class */ (function () {
1561
- function QueryRuleForm(rule) {
1562
- if (!rule) {
1563
- return;
1564
- }
1565
- this.id = rule.id;
1566
- this.operation = rule.operation;
1567
- if (QBFilterUtils.isDoubleInput(rule.operation)) {
1568
- this.value = rule.value[0];
1569
- this.secondValue = rule.value[1];
1570
- }
1571
- else {
1572
- this.value = rule.value;
1573
- }
1574
- }
1575
- QueryRuleForm.prototype.transform = function () {
1576
- return {
1577
- id: this.id,
1578
- operation: this.operation,
1579
- value: this.secondValue === undefined ? this.value : [this.value, this.secondValue]
1580
- };
1581
- };
1582
- return QueryRuleForm;
1583
- }());
1584
- __decorate([
1585
- i1.Control(),
1586
- i1.Required(),
1587
- __metadata("design:type", String)
1588
- ], QueryRuleForm.prototype, "id", void 0);
1589
- __decorate([
1590
- i1.Control(),
1591
- i1.Required(),
1592
- __metadata("design:type", String)
1593
- ], QueryRuleForm.prototype, "operation", void 0);
1594
- __decorate([
1595
- i1.Control(),
1596
- i1.Required(),
1597
- __metadata("design:type", Object)
1598
- ], QueryRuleForm.prototype, "value", void 0);
1599
- __decorate([
1600
- i1.Control(),
1601
- i1.Required(),
1602
- __metadata("design:type", Object)
1603
- ], QueryRuleForm.prototype, "secondValue", void 0);
1604
- var QueryForm = /** @class */ (function () {
1605
- function QueryForm() {
1606
- }
1607
- return QueryForm;
1608
- }());
1609
- __decorate([
1610
- i1.Control(),
1611
- i1.Required(),
1612
- __metadata("design:type", String)
1613
- ], QueryForm.prototype, "condition", void 0);
1614
- __decorate([
1615
- i1.Array(QueryRuleForm),
1616
- __metadata("design:type", i1.Array)
1617
- ], QueryForm.prototype, "rules", void 0);
1618
- var QueryBuilderForm = /** @class */ (function () {
1619
- function QueryBuilderForm(rules) {
1620
- if (!rules) {
1621
- rules = [];
1622
- }
1623
- this.rules = rules.map(function (x) { return ({
1624
- condition: x.condition,
1625
- rules: x.rules.map(function (rule) { return new QueryRuleForm(rule); })
1626
- }); });
1627
- }
1628
- QueryBuilderForm.prototype.transform = function () {
1629
- return this.rules.map(function (x) { return ({
1630
- condition: x.condition,
1631
- rules: x.rules.map(function (rule) { return rule.transform(); })
1632
- }); });
1633
- };
1634
- return QueryBuilderForm;
1635
- }());
1636
- __decorate([
1637
- i1.Array(QueryForm),
1638
- __metadata("design:type", i1.Array)
1639
- ], QueryBuilderForm.prototype, "rules", void 0);
1640
-
1641
- var FilterComponent = /** @class */ (function () {
1642
- function FilterComponent() {
1643
- this.valueIndex = -1;
1644
- this.propagateChanges = function (_) { };
1645
- }
1646
- Object.defineProperty(FilterComponent.prototype, "value", {
1647
- get: function () {
1648
- if (this.valueIndex < 0) {
1649
- return this._value;
1650
- }
1651
- else if (this._value instanceof Array) {
1652
- return this._value[this.valueIndex];
1653
- }
1654
- return undefined;
1655
- },
1656
- enumerable: false,
1657
- configurable: true
1658
- });
1659
- FilterComponent.prototype.registerOnTouched = function (fn) {
1660
- // NO-OP
1661
- };
1662
- FilterComponent.prototype.registerOnChange = function (fn) {
1663
- this.propagateChanges = fn;
1664
- };
1665
- FilterComponent.prototype.writeValue = function (value) {
1666
- this._value = value;
1667
- };
1668
- FilterComponent.prototype.onValueChange = function (value) {
1669
- if (this.valueIndex < 0) {
1670
- this.propagateChanges(value);
1671
- }
1672
- else if (this._value instanceof Array) {
1673
- var v = __spreadArray([], __read(this._value));
1674
- v[this.valueIndex] = value;
1675
- this.propagateChanges(v);
1676
- }
1677
- };
1678
- return FilterComponent;
1679
- }());
1680
- FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1681
- 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 });
1682
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterComponent, decorators: [{
1683
- type: i0.Component,
1684
- args: [{ template: "" }]
1685
- }], propDecorators: { valueIndex: [{
1686
- type: i0.Input
1687
- }] } });
1688
-
1689
- var TextFilterComponent = /** @class */ (function (_super) {
1690
- __extends(TextFilterComponent, _super);
1691
- function TextFilterComponent() {
1692
- return _super !== null && _super.apply(this, arguments) || this;
1693
- }
1694
- return TextFilterComponent;
1695
- }(FilterComponent));
1696
- 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 });
1697
- TextFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: TextFilterComponent, selector: "nice-text-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1698
- {
1699
- provide: i1$1.NG_VALUE_ACCESSOR,
1700
- useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
1701
- multi: true
1702
- }
1703
- ], 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 });
1704
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: TextFilterComponent, decorators: [{
1705
- type: i0.Component,
1706
- args: [{
1707
- selector: "nice-text-filter",
1708
- templateUrl: "text-filter.template.html",
1709
- encapsulation: i0.ViewEncapsulation.None,
1710
- providers: [
1711
- {
1712
- provide: i1$1.NG_VALUE_ACCESSOR,
1713
- useExisting: i0.forwardRef(function () { return TextFilterComponent; }),
1714
- multi: true
1715
- }
1716
- ]
1717
- }]
1718
- }], propDecorators: { filterConfig: [{
1719
- type: i0.Input
1720
- }] } });
1721
-
1722
- var NumberFilterComponent = /** @class */ (function (_super) {
1723
- __extends(NumberFilterComponent, _super);
1724
- function NumberFilterComponent() {
1725
- return _super !== null && _super.apply(this, arguments) || this;
1726
- }
1727
- return NumberFilterComponent;
1728
- }(FilterComponent));
1729
- 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 });
1730
- NumberFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NumberFilterComponent, selector: "nice-number-filter", providers: [
1731
- {
1732
- provide: i1$1.NG_VALUE_ACCESSOR,
1733
- useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
1734
- multi: true
1735
- }
1736
- ], 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 });
1737
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NumberFilterComponent, decorators: [{
1738
- type: i0.Component,
1739
- args: [{
1740
- selector: "nice-number-filter",
1741
- templateUrl: "number-filter.template.html",
1742
- encapsulation: i0.ViewEncapsulation.None,
1743
- providers: [
1744
- {
1745
- provide: i1$1.NG_VALUE_ACCESSOR,
1746
- useExisting: i0.forwardRef(function () { return NumberFilterComponent; }),
1747
- multi: true
1748
- }
1749
- ]
1750
- }]
1751
- }] });
1752
-
1753
- var RadioFilterComponent = /** @class */ (function (_super) {
1754
- __extends(RadioFilterComponent, _super);
1755
- function RadioFilterComponent() {
1756
- return _super !== null && _super.apply(this, arguments) || this;
1757
- }
1758
- return RadioFilterComponent;
1759
- }(FilterComponent));
1760
- 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 });
1761
- RadioFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1762
- {
1763
- provide: i1$1.NG_VALUE_ACCESSOR,
1764
- useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
1765
- multi: true
1766
- }
1767
- ], 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 });
1768
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RadioFilterComponent, decorators: [{
1769
- type: i0.Component,
1770
- args: [{
1771
- selector: "nice-radio-filter",
1772
- templateUrl: "radio-filter.template.html",
1773
- encapsulation: i0.ViewEncapsulation.None,
1774
- providers: [
1775
- {
1776
- provide: i1$1.NG_VALUE_ACCESSOR,
1777
- useExisting: i0.forwardRef(function () { return RadioFilterComponent; }),
1778
- multi: true
1779
- }
1780
- ]
1781
- }]
1782
- }], propDecorators: { filterConfig: [{
1783
- type: i0.Input
1784
- }] } });
1785
-
1786
- var SelectFilterComponent = /** @class */ (function (_super) {
1787
- __extends(SelectFilterComponent, _super);
1788
- function SelectFilterComponent(filterService) {
1789
- var _this = _super.call(this) || this;
1790
- _this.filterService = filterService;
1791
- _this.values = [];
1792
- _this.search$ = new rxjs.Subject();
1793
- return _this;
1794
- }
1795
- SelectFilterComponent.prototype.ngOnInit = function () {
1796
- return __awaiter(this, void 0, void 0, function () {
1797
- var _this = this;
1798
- return __generator(this, function (_a) {
1799
- if (!this.filterConfig.lazyLoading) {
1800
- this.values = this.filterConfig.values;
1801
- }
1802
- this.searchSub$ = this.search$
1803
- .pipe(operators.debounceTime(300), operators.switchMap(function (value) {
1804
- if (_this.filterConfig.lazyLoading) {
1805
- return _this.filterService.searchFilterValue(_this.filterConfig, value);
1806
- }
1807
- return rxjs.of(_this.filterConfig.values);
1808
- }))
1809
- .subscribe(function (values) {
1810
- _this.values = values;
1811
- });
1812
- return [2 /*return*/];
1813
- });
1814
- });
1815
- };
1816
- SelectFilterComponent.prototype.ngOnChanges = function (changes) {
1817
- if ("filterConfig" in changes) {
1818
- if (!this.filterConfig.lazyLoading) {
1819
- this.values = this.filterConfig.values;
1820
- }
1821
- }
1822
- };
1823
- SelectFilterComponent.prototype.searchValue = function () {
1824
- return __awaiter(this, void 0, void 0, function () {
1825
- var value;
1826
- var _this = this;
1827
- return __generator(this, function (_a) {
1828
- switch (_a.label) {
1829
- case 0:
1830
- if (!(this.value && !this.values.find(function (v) { return v.id === _this.value; }))) return [3 /*break*/, 2];
1831
- return [4 /*yield*/, this.filterService
1832
- .searchFilterResourceValue(this.filterConfig, this.value)
1833
- .toPromise()];
1834
- case 1:
1835
- value = _a.sent();
1836
- this.values = __spreadArray(__spreadArray([], __read(this.values)), [value]);
1837
- _a.label = 2;
1838
- case 2: return [2 /*return*/];
1839
- }
1840
- });
1841
- });
1842
- };
1843
- SelectFilterComponent.prototype.onValueChange = function (value) {
1844
- _super.prototype.onValueChange.call(this, value);
1845
- this.searchValue();
1846
- };
1847
- SelectFilterComponent.prototype.ngOnDestroy = function () {
1848
- this.searchSub$.unsubscribe();
1849
- };
1850
- SelectFilterComponent.prototype.writeValue = function (value) {
1851
- _super.prototype.writeValue.call(this, value);
1852
- this.searchValue();
1853
- };
1854
- return SelectFilterComponent;
1855
- }(FilterComponent));
1856
- 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 });
1857
- SelectFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: SelectFilterComponent, selector: "nice-select-filter", inputs: { filterConfig: "filterConfig" }, providers: [
1858
- {
1859
- provide: i1$1.NG_VALUE_ACCESSOR,
1860
- useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
1861
- multi: true
1862
- }
1863
- ], 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 });
1864
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: SelectFilterComponent, decorators: [{
1865
- type: i0.Component,
1866
- args: [{
1867
- selector: "nice-select-filter",
1868
- templateUrl: "select-filter.template.html",
1869
- encapsulation: i0.ViewEncapsulation.None,
1870
- providers: [
1871
- {
1872
- provide: i1$1.NG_VALUE_ACCESSOR,
1873
- useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
1874
- multi: true
1875
- }
1876
- ]
1877
- }]
1878
- }], ctorParameters: function () {
1879
- return [{ type: NiceFilterService, decorators: [{
1880
- type: i0.Optional
1881
- }] }];
1882
- }, propDecorators: { filterConfig: [{
1883
- type: i0.Input
1884
- }] } });
1885
-
1886
- var DateFilterComponent = /** @class */ (function (_super) {
1887
- __extends(DateFilterComponent, _super);
1888
- function DateFilterComponent() {
1889
- return _super !== null && _super.apply(this, arguments) || this;
1890
- }
1891
- return DateFilterComponent;
1892
- }(FilterComponent));
1893
- 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 });
1894
- DateFilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: DateFilterComponent, selector: "nice-date-filter", providers: [
1895
- {
1896
- provide: i1$1.NG_VALUE_ACCESSOR,
1897
- useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
1898
- multi: true
1899
- }
1900
- ], 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 });
1901
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: DateFilterComponent, decorators: [{
1902
- type: i0.Component,
1903
- args: [{
1904
- selector: "nice-date-filter",
1905
- templateUrl: "date-filter.template.html",
1906
- encapsulation: i0.ViewEncapsulation.None,
1907
- providers: [
1908
- {
1909
- provide: i1$1.NG_VALUE_ACCESSOR,
1910
- useExisting: i0.forwardRef(function () { return DateFilterComponent; }),
1911
- multi: true
1912
- }
1913
- ]
1914
- }]
1915
- }] });
1916
-
1917
- var NiceFilterGroupService = /** @class */ (function () {
1918
- function NiceFilterGroupService() {
1919
- }
1920
- return NiceFilterGroupService;
1921
- }());
1922
-
1923
- var FilterGroupIconPipe = /** @class */ (function () {
1924
- function FilterGroupIconPipe(service) {
1925
- this.service = service;
1926
- }
1927
- FilterGroupIconPipe.prototype.transform = function (value) {
1928
- return this.service.getFilterGroupIconClass(value);
1929
- };
1930
- return FilterGroupIconPipe;
1931
- }());
1932
- 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 });
1933
- FilterGroupIconPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, name: "filterGroupIcon" });
1934
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterGroupIconPipe, decorators: [{
1935
- type: i0.Pipe,
1936
- args: [{
1937
- name: "filterGroupIcon"
1938
- }]
1939
- }], ctorParameters: function () { return [{ type: NiceFilterGroupService }]; } });
1940
-
1941
- var FilterSelectionComponent = /** @class */ (function () {
1942
- function FilterSelectionComponent() {
1943
- this.filterSelected = new i0.EventEmitter();
1944
- }
1945
- Object.defineProperty(FilterSelectionComponent.prototype, "filterGroups", {
1946
- get: function () {
1947
- var e_1, _b;
1948
- 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; });
1949
- var result = [];
1950
- var _loop_1 = function (group) {
1951
- if (!group) {
1952
- return "continue";
1953
- }
1954
- 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; })]);
1955
- };
1956
- var this_1 = this;
1957
- try {
1958
- for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
1959
- var group = groups_1_1.value;
1960
- _loop_1(group);
1961
- }
1962
- }
1963
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1964
- finally {
1965
- try {
1966
- if (groups_1_1 && !groups_1_1.done && (_b = groups_1.return)) _b.call(groups_1);
1967
- }
1968
- finally { if (e_1) throw e_1.error; }
1969
- }
1970
- return result.sort(function (_b, _c) {
1971
- var _d = __read(_b, 2), a = _d[1];
1972
- var _e = __read(_c, 2), b = _e[1];
1973
- return b.length - a.length;
1974
- });
1975
- },
1976
- enumerable: false,
1977
- configurable: true
1978
- });
1979
- FilterSelectionComponent.prototype.selectFilter = function (filterConfigurationModel) {
1980
- this.filterSelected.emit(filterConfigurationModel);
1981
- };
1982
- return FilterSelectionComponent;
1983
- }());
1984
- FilterSelectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1985
- 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 });
1986
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: FilterSelectionComponent, decorators: [{
1987
- type: i0.Component,
1988
- args: [{
1989
- selector: "nice-filter-selection",
1990
- templateUrl: "filter-selection.template.html",
1991
- styleUrls: ["./filter-selection.style.scss"],
1992
- encapsulation: i0.ViewEncapsulation.None,
1993
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1994
- }]
1995
- }], propDecorators: { filterConfigs: [{
1996
- type: i0.Input
1997
- }], loading: [{
1998
- type: i0.Input
1999
- }], filterSelected: [{
2000
- type: i0.Output
2001
- }] } });
2002
-
2003
- var QueryBuilderTriggerDirective = /** @class */ (function () {
2004
- function QueryBuilderTriggerDirective(overlayPositionBuilder, elementRef, overlay, platform) {
2005
- this.overlayPositionBuilder = overlayPositionBuilder;
2006
- this.elementRef = elementRef;
2007
- this.overlay = overlay;
2008
- this.platform = platform;
2009
- this.queryBuilderFilterSelected = new i0.EventEmitter();
2010
- }
2011
- Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFilters", {
2012
- set: function (queryBuilderFilters) {
2013
- if (queryBuilderFilters) {
2014
- this._queryBuilderFilters = queryBuilderFilters;
2015
- }
2016
- this.updateFilterSelectionComponent();
2017
- },
2018
- enumerable: false,
2019
- configurable: true
2020
- });
2021
- Object.defineProperty(QueryBuilderTriggerDirective.prototype, "queryBuilderFiltersLoading", {
2022
- set: function (queryBuilderFiltersLoading) {
2023
- this._queryBuilderFiltersLoading = queryBuilderFiltersLoading;
2024
- this.updateFilterSelectionComponent();
2025
- },
2026
- enumerable: false,
2027
- configurable: true
2028
- });
2029
- QueryBuilderTriggerDirective.prototype.click = function () {
2030
- var _this = this;
2031
- var positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
2032
- {
2033
- originX: "center",
2034
- originY: "bottom",
2035
- overlayX: this.isMobile() ? "end" : "center",
2036
- overlayY: "top"
2037
- }
2038
- ]);
2039
- this.overlayRef = this.overlay.create({
2040
- positionStrategy: positionStrategy,
2041
- hasBackdrop: true,
2042
- backdropClass: "cdk-overlay-transparent-backdrop"
2043
- });
2044
- var filterSelectionPortal = new portal.ComponentPortal(FilterSelectionComponent);
2045
- this.filterSelectionRef = this.overlayRef.attach(filterSelectionPortal);
2046
- this.updateFilterSelectionComponent();
2047
- this.overlayRef.backdropClick().subscribe(function () { return _this.close(); });
2048
- };
2049
- QueryBuilderTriggerDirective.prototype.close = function () {
2050
- this.overlayRef.dispose();
2051
- };
2052
- QueryBuilderTriggerDirective.prototype.updateFilterSelectionComponent = function () {
2053
- var _this = this;
2054
- if (!this.filterSelectionRef) {
2055
- return;
2056
- }
2057
- this.filterSelectionRef.instance.filterConfigs = this._queryBuilderFilters;
2058
- this.filterSelectionRef.instance.loading = this._queryBuilderFiltersLoading;
2059
- this.filterSelectionRef.instance.filterSelected.subscribe(function (filter) {
2060
- _this.queryBuilderFilterSelected.emit(filter);
2061
- _this.close();
2062
- });
2063
- };
2064
- QueryBuilderTriggerDirective.prototype.isMobile = function () {
2065
- return this.platform.ANDROID || this.platform.IOS;
2066
- };
2067
- return QueryBuilderTriggerDirective;
2068
- }());
2069
- 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 });
2070
- 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 });
2071
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderTriggerDirective, decorators: [{
2072
- type: i0.Directive,
2073
- args: [{ selector: "[niceQueryBuilderTrigger]" }]
2074
- }], ctorParameters: function () { return [{ type: i1__namespace$3.OverlayPositionBuilder }, { type: i0__namespace.ElementRef }, { type: i1__namespace$3.Overlay }, { type: i2__namespace$2.Platform }]; }, propDecorators: { queryBuilderFilters: [{
2075
- type: i0.Input
2076
- }], queryBuilderFiltersLoading: [{
2077
- type: i0.Input
2078
- }], queryBuilderFilterSelected: [{
2079
- type: i0.Output
2080
- }], click: [{
2081
- type: i0.HostListener,
2082
- args: ["click"]
2083
- }] } });
2084
-
2085
- var RuleComponent = /** @class */ (function () {
2086
- function RuleComponent(formGroupName) {
2087
- this.formGroupName = formGroupName;
2088
- this.remove = new i0.EventEmitter();
2089
- }
2090
- Object.defineProperty(RuleComponent.prototype, "filterConfig", {
2091
- get: function () {
2092
- var _a;
2093
- var rule = this.rules.at(0).value;
2094
- return (_a = this.filterConfigs) === null || _a === void 0 ? void 0 : _a.find(function (f) { return f.id === rule.id; });
2095
- },
2096
- enumerable: false,
2097
- configurable: true
2098
- });
2099
- Object.defineProperty(RuleComponent.prototype, "isSingleInput", {
2100
- get: function () {
2101
- return !this.isDoubleInput && !this.isNoInput;
2102
- },
2103
- enumerable: false,
2104
- configurable: true
2105
- });
2106
- Object.defineProperty(RuleComponent.prototype, "isDoubleInput", {
2107
- get: function () {
2108
- return QBFilterUtils.isDoubleInput(this.filterOperator);
2109
- },
2110
- enumerable: false,
2111
- configurable: true
2112
- });
2113
- Object.defineProperty(RuleComponent.prototype, "isNoInput", {
2114
- get: function () {
2115
- return QBFilterUtils.isNoInput(this.filterOperator);
2116
- },
2117
- enumerable: false,
2118
- configurable: true
2119
- });
2120
- RuleComponent.prototype.ngOnInit = function () {
2121
- this.formGroup = this.formGroupName.control;
2122
- this.rules = this.formGroup.get("rules");
2123
- this.filterOperator = this.rules.at(0).value.operation;
2124
- };
2125
- RuleComponent.prototype.onUpdateFilterConfig = function (config) {
2126
- var rule = QBFilterUtils.createRule(config);
2127
- this.rules.patchValue([rule]);
2128
- this.filterOperator = rule.operation;
2129
- };
2130
- RuleComponent.prototype.onClickOr = function () {
2131
- this.rules.push(QBFilterUtils.createRule(this.filterConfig, this.filterOperator));
2132
- };
2133
- RuleComponent.prototype.onUpdateFilterOperator = function (operator) {
2134
- var e_1, _c;
2135
- var _a, _b;
2136
- this.filterOperator = operator;
2137
- try {
2138
- for (var _d = __values(this.rules.controls), _e = _d.next(); !_e.done; _e = _d.next()) {
2139
- var rule = _e.value;
2140
- (_a = rule.get("operation")) === null || _a === void 0 ? void 0 : _a.patchValue(this.filterOperator);
2141
- if (this.isDoubleInput) {
2142
- (_b = rule.get("value")) === null || _b === void 0 ? void 0 : _b.patchValue([rule.value.value, rule.value.value]);
2143
- }
2144
- }
2145
- }
2146
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2147
- finally {
2148
- try {
2149
- if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2150
- }
2151
- finally { if (e_1) throw e_1.error; }
2152
- }
2153
- };
2154
- RuleComponent.prototype.onClickDelete = function (index) {
2155
- if (this.rules.length > 1) {
2156
- this.rules.removeAt(index);
2157
- }
2158
- else {
2159
- this.remove.emit();
2160
- }
2161
- };
2162
- return RuleComponent;
2163
- }());
2164
- 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 });
2165
- 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 });
2166
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, decorators: [{
2167
- type: i0.Component,
2168
- args: [{
2169
- selector: "nice-rule",
2170
- templateUrl: "rule.template.html",
2171
- styleUrls: ["./rule.style.scss"],
2172
- encapsulation: i0.ViewEncapsulation.None
2173
- }]
2174
- }], ctorParameters: function () { return [{ type: i1__namespace$1.FormGroupName }]; }, propDecorators: { filterConfigs: [{
2175
- type: i0.Input
2176
- }], remove: [{
2177
- type: i0.Output
2178
- }] } });
2179
-
2180
- var QueryBuilderComponent = /** @class */ (function () {
2181
- function QueryBuilderComponent(formGroup) {
2182
- this.formGroup = formGroup;
2183
- this.close = new i0.EventEmitter();
2184
- this.createReport = new i0.EventEmitter();
2185
- this.updateReport = new i0.EventEmitter();
2186
- this.propagateChanges = function (_) { };
2187
- this.rules = this.formGroup.get("rules");
2188
- }
2189
- Object.defineProperty(QueryBuilderComponent.prototype, "canSave", {
2190
- get: function () {
2191
- return !this.currentSavedReport;
2192
- },
2193
- enumerable: false,
2194
- configurable: true
2195
- });
2196
- QueryBuilderComponent.prototype.registerOnChange = function (fn) {
2197
- this.propagateChanges = fn;
2198
- };
2199
- QueryBuilderComponent.prototype.registerOnTouched = function (fn) { };
2200
- QueryBuilderComponent.prototype.writeValue = function (rules) {
2201
- this.rules.clear();
2202
- this.formGroup.patchValue(new QueryBuilderForm(rules));
2203
- };
2204
- QueryBuilderComponent.prototype.onClickAddRule = function (filterConfigurationModel) {
2205
- this.rules.push(QBFilterUtils.createQueryModel(filterConfigurationModel));
2206
- };
2207
- QueryBuilderComponent.prototype.onClickDeleteRule = function (id) {
2208
- this.rules.removeAt(id);
2209
- if (this.rules.length === 0) {
2210
- this.close.emit();
2211
- this.onClickApply();
2212
- }
2213
- };
2214
- QueryBuilderComponent.prototype.onClickApply = function () {
2215
- this.propagateChanges(this.formGroup.getRawValue().transform());
2216
- };
2217
- QueryBuilderComponent.prototype.onClickSaveReport = function () {
2218
- this.createReport.emit();
2219
- };
2220
- QueryBuilderComponent.prototype.onClickUpdateReport = function () {
2221
- this.updateReport.emit();
2222
- };
2223
- return QueryBuilderComponent;
2224
- }());
2225
- 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 });
2226
- 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: [
2227
- {
2228
- provide: i1$1.NG_VALUE_ACCESSOR,
2229
- useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
2230
- multi: true
2231
- },
2232
- {
2233
- provide: i1.GeneratedFormGroup,
2234
- useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
2235
- }
2236
- ], 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 });
2237
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderComponent, decorators: [{
2238
- type: i0.Component,
2239
- args: [{
2240
- selector: "nice-query-builder",
2241
- templateUrl: "./query-builder.template.html",
2242
- styleUrls: ["./query-builder.style.scss"],
2243
- encapsulation: i0.ViewEncapsulation.None,
2244
- providers: [
2245
- {
2246
- provide: i1$1.NG_VALUE_ACCESSOR,
2247
- useExisting: i0.forwardRef(function () { return QueryBuilderComponent; }),
2248
- multi: true
2249
- },
2250
- {
2251
- provide: i1.GeneratedFormGroup,
2252
- useFactory: i1.ngxFormGeneratorFactory(QueryBuilderForm)
2253
- }
2254
- ]
2255
- }]
2256
- }], ctorParameters: function () { return [{ type: i1__namespace$5.GeneratedFormGroup }]; }, propDecorators: { filterConfigs: [{
2257
- type: i0.Input
2258
- }], currentSavedReport: [{
2259
- type: i0.Input
2260
- }], loading: [{
2261
- type: i0.Input
2262
- }], close: [{
2263
- type: i0.Output
2264
- }], createReport: [{
2265
- type: i0.Output
2266
- }], updateReport: [{
2267
- type: i0.Output
2268
- }] } });
2269
-
2270
- var NiceBaseListComponent = /** @class */ (function () {
2271
- function NiceBaseListComponent(enableQueryBuilder, listLayout, columns, exportsSettings, query, service, activatedRoute, bottomSheet, router, mediaObserver) {
2272
- this.enableQueryBuilder = enableQueryBuilder;
2273
- this.listLayout = listLayout;
2274
- this.columns = columns;
2275
- this.exportsSettings = exportsSettings;
2276
- this.query = query;
2277
- this.service = service;
2278
- this.activatedRoute = activatedRoute;
2279
- this.bottomSheet = bottomSheet;
2280
- this.router = router;
2281
- this.mediaObserver = mediaObserver;
2282
- this.mode = "normal";
2283
- this.layout = "page";
2284
- this.layoutContent = exports.LayoutContent.Table;
2285
- this.autoChangeLayout = true;
2286
- this.autoLoad = true;
2287
- this.canExport = true;
2288
- this.disableRouting = false;
2289
- this.customExport = [];
2290
- this.newPage = new i0.EventEmitter();
2291
- this.defaultPageSizeOptions = [10, 25, 50, 100];
2292
- this.columnNames = [];
2293
- this.loading$ = this.query.selectLoading();
2294
- this.filterResult$ = this.query.selectFilterResult();
2295
- this.data$ = this.query.selectData();
2296
- this.recordsFiltered$ = this.filterResult$.pipe(operators.map(function (f) { return f && f.total; }));
2297
- this.showQueryBuilder$ = this.query.selectShowQueryBuilder();
2298
- this.filterParameters$ = this.query.selectFilterParameters();
2299
- 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)); }));
2300
- this.length$ = this.filterParameters$.pipe(operators.map(function (f) { return f.length; }));
2301
- this.isEmpty$ = this.recordsFiltered$.pipe(operators.map(function (r) { return r === 0; }));
2302
- this.searchQuery$ = this.filterParameters$.pipe(operators.map(function (f) { return f.search; }));
2303
- this.filterConfig$ = this.query.selectFilterConfig();
2304
- this.sortColumn$ = this.filterParameters$.pipe(operators.map(function (f) { var _a; return (_a = (f.order && f.order.column)) !== null && _a !== void 0 ? _a : ""; }));
2305
- this.sortDirection$ = this.filterParameters$.pipe(operators.map(function (f) { return f.order && f.order.direction; }));
2306
- this.filterConfigLoading$ = this.query.selectFilterConfigLoading();
2307
- this.rules$ = this.filterParameters$.pipe(operators.map(function (parameters) { return parameters.rules; }));
2308
- 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; }));
2309
- this.searchText$ = new rxjs.Subject();
2310
- this.setColumn(columns);
2311
- }
2312
- Object.defineProperty(NiceBaseListComponent.prototype, "prefixButtons", {
2313
- get: function () {
2314
- var _a, _b;
2315
- 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;
2316
- },
2317
- enumerable: false,
2318
- configurable: true
2319
- });
2320
- Object.defineProperty(NiceBaseListComponent.prototype, "suffixButtons", {
2321
- get: function () {
2322
- var _a, _b;
2323
- 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;
2324
- },
2325
- enumerable: false,
2326
- configurable: true
2327
- });
2328
- NiceBaseListComponent.prototype.ngOnInit = function () {
2329
- return __awaiter(this, void 0, void 0, function () {
2330
- var _this = this;
2331
- return __generator(this, function (_c) {
2332
- switch (_c.label) {
2333
- case 0: return [4 /*yield*/, this.service.init()];
2334
- case 1:
2335
- _c.sent();
2336
- this.service.loadQueryParams(this.autoLoad);
2337
- this.searchText$
2338
- .pipe(operators.debounceTime(300), operators.distinctUntilChanged(), operators.switchMap(function (search) {
2339
- _this.service.resetPaging();
2340
- return _this.service.searchData(search);
2341
- }))
2342
- .subscribe();
2343
- this.mediaObserver.asObservable().subscribe(function () {
2344
- if (!_this.autoChangeLayout) {
2345
- return;
2346
- }
2347
- if (_this.mediaObserver.isActive("lt-md") && _this.layoutContent === exports.LayoutContent.Table) {
2348
- _this.layoutContent = exports.LayoutContent.Cards;
2349
- }
2350
- else {
2351
- _this.layoutContent = exports.LayoutContent.Table;
2352
- }
2353
- });
2354
- return [2 /*return*/];
2355
- }
2356
- });
2357
- });
2358
- };
2359
- NiceBaseListComponent.prototype.ngOnDestroy = function () {
2360
- this.service.closeSubscriptions();
2361
- };
2362
- NiceBaseListComponent.prototype.ngOnChanges = function (changes) {
2363
- if ("mode" in changes) {
2364
- this.service.setMode(changes.mode.currentValue);
2365
- }
2366
- };
2367
- NiceBaseListComponent.prototype.clickToggleShowQueryBuilder = function () {
2368
- this.service.toggleQueryBuilder();
2369
- };
2370
- NiceBaseListComponent.prototype.onUpdateRules = function (rules) {
2371
- this.service.updateGlobalRules(rules);
2372
- };
2373
- NiceBaseListComponent.prototype.onQueryBuilderFilterSelected = function (filterConfigurationModel) {
2374
- this.service.addRuleFromConfig(filterConfigurationModel);
2375
- };
2376
- NiceBaseListComponent.prototype.onUpdatePage = function (pageEvent) {
2377
- this.service.loadNewPage(pageEvent.pageIndex * pageEvent.pageSize, pageEvent.pageSize);
2378
- this.newPage.emit(pageEvent);
2379
- };
2380
- NiceBaseListComponent.prototype.onUpdateSearch = function (search) {
2381
- this.searchText$.next(search);
2382
- };
2383
- NiceBaseListComponent.prototype.getFilterRule$ = function (id) {
2384
- return this.filterParameters$.pipe(operators.map(function (f) {
2385
- return (f.rules &&
2386
- f.rules[0] &&
2387
- f.rules[0].rules &&
2388
- f.rules[0].rules.find(function (r) { return r.id === id; }));
2389
- }));
2390
- };
2391
- NiceBaseListComponent.prototype.onUpdateSort = function (sort) {
2392
- if (!sort.active || !sort.direction) {
2393
- sort = {
2394
- active: "id",
2395
- direction: "asc"
2396
- };
2397
- }
2398
- this.service.loadData({
2399
- order: sort.active && sort.direction ? { column: sort.active, direction: sort.direction } : null
2400
- });
2401
- };
2402
- NiceBaseListComponent.prototype.updateRule = function (id, newRule) {
2403
- this.service.updateRule(id, newRule);
2404
- };
2405
- NiceBaseListComponent.prototype.updateRules = function (rules) {
2406
- this.service.updateRules(rules);
2407
- };
2408
- NiceBaseListComponent.prototype.clickExport = function () {
2409
- var _this = this;
2410
- var exports = [];
2411
- if (this.exportsSettings.xlsx) {
2412
- exports.push({
2413
- type: "xlsx",
2414
- onClickExport: function () { return _this.clickXlsx(); }
2415
- });
2416
- }
2417
- else if (this.exportsSettings.csv) {
2418
- exports.push({
2419
- type: "csv",
2420
- onClickExport: function () { return _this.clickCsv(); }
2421
- });
2422
- }
2423
- else if (this.exportsSettings.pdf) {
2424
- exports.push({
2425
- type: "pdf",
2426
- onClickExport: function () { return _this.clickPdf(); }
2427
- });
2428
- }
2429
- this.bottomSheet.open(i18.ExportBottomSheetComponent, {
2430
- data: {
2431
- exportStrategies: __spreadArray(__spreadArray([], __read(exports)), __read(this.customExport))
2432
- }
2433
- });
2434
- };
2435
- NiceBaseListComponent.prototype.navigate = function (item) {
2436
- if (this.navigateFn) {
2437
- this.navigateFn(this.baseRoute, item);
2438
- }
2439
- else {
2440
- var route = this.routeFn ? this.routeFn(item) : [(this.baseRoute || "") + (item === null || item === void 0 ? void 0 : item.id)];
2441
- this.router.navigate(typeof route === "string" ? [route] : route, { relativeTo: this.activatedRoute });
2442
- }
2443
- };
2444
- NiceBaseListComponent.prototype.clickXlsx = function () {
2445
- this.service.downloadData("xlsx");
2446
- };
2447
- NiceBaseListComponent.prototype.clickCsv = function () {
2448
- this.service.downloadData("csv");
2449
- };
2450
- NiceBaseListComponent.prototype.clickPrint = function () {
2451
- this.service.printData();
2452
- };
2453
- NiceBaseListComponent.prototype.clickPdf = function () {
2454
- this.service.downloadData("pdf");
2455
- };
2456
- NiceBaseListComponent.prototype.setColumn = function (columns) {
2457
- this.columns = columns;
2458
- this.columnNames = columns.map(function (x) { return x.id; });
2459
- };
2460
- return NiceBaseListComponent;
2461
- }());
2462
- 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 });
2463
- 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: [
2464
- NiceBaseListQuery,
2465
- NiceBaseListService,
2466
- exports.NiceBaseListStore
2467
- ], 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 } });
2468
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListComponent, decorators: [{
2469
- type: i0.Component,
2470
- args: [{
2471
- selector: "nice-base-list",
2472
- templateUrl: "./base-list.template.html",
2473
- providers: [
2474
- NiceBaseListQuery,
2475
- NiceBaseListService,
2476
- exports.NiceBaseListStore
2477
- ]
2478
- }]
2479
- }], ctorParameters: function () {
2480
- return [{ type: undefined, decorators: [{
2481
- type: i0.Optional
2482
- }, {
2483
- type: i0.Inject,
2484
- args: [ENABLE_QUERY_BUILDER]
2485
- }] }, { type: undefined, decorators: [{
2486
- type: i0.Inject,
2487
- args: [BASE_LIST_LAYOUT]
2488
- }] }, { type: undefined, decorators: [{
2489
- type: i0.Inject,
2490
- args: [TABLE_COLUMNS]
2491
- }] }, { type: undefined, decorators: [{
2492
- type: i0.Inject,
2493
- args: [EXPORTS_SETTINGS]
2494
- }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }];
2495
- }, propDecorators: { title: [{
2496
- type: i0.ContentChild,
2497
- args: [NiceBaseListTitleDirective, { read: i0.TemplateRef }]
2498
- }], buttons: [{
2499
- type: i0.ContentChildren,
2500
- args: [NiceBaseListButtonsDirective]
2501
- }], table: [{
2502
- type: i0.ContentChild,
2503
- args: [NiceBaseListTableDirective, { read: i0.TemplateRef }]
2504
- }], cards: [{
2505
- type: i0.ContentChild,
2506
- args: [NiceBaseListCardsDirective, { read: i0.TemplateRef }]
2507
- }], customContent: [{
2508
- type: i0.ContentChild,
2509
- args: [NiceBaseListCustomContentDirective, { read: i0.TemplateRef }]
2510
- }], mode: [{
2511
- type: i0.Input
2512
- }], layout: [{
2513
- type: i0.Input
2514
- }], layoutContent: [{
2515
- type: i0.Input
2516
- }], autoChangeLayout: [{
2517
- type: i0.Input
2518
- }], baseRoute: [{
2519
- type: i0.Input
2520
- }], routeFn: [{
2521
- type: i0.Input
2522
- }], navigateFn: [{
2523
- type: i0.Input
2524
- }], autoLoad: [{
2525
- type: i0.Input
2526
- }], pageTitle: [{
2527
- type: i0.Input
2528
- }], canExport: [{
2529
- type: i0.Input
2530
- }], disableRouting: [{
2531
- type: i0.Input
2532
- }], customExport: [{
2533
- type: i0.Input
2534
- }], newPage: [{
2535
- type: i0.Output
2536
- }] } });
2537
-
2538
- var NiceCustomDateAdapter = /** @class */ (function (_super) {
2539
- __extends(NiceCustomDateAdapter, _super);
2540
- function NiceCustomDateAdapter(translateService, locale, platform) {
2541
- var _this = _super.call(this, locale, platform) || this;
2542
- _this.translateService = translateService;
2543
- _this.setLocale(_this.translateService.getDefaultLang());
2544
- // @ts-ignore
2545
- _this._format = function (dtf, date) {
2546
- return dtf.format(date);
2547
- };
2548
- return _this;
2549
- }
2550
- NiceCustomDateAdapter.prototype.format = function (date, displayFormat) {
2551
- return _super.prototype.format.call(this, date, displayFormat);
2552
- };
2553
- NiceCustomDateAdapter.prototype.getDate = function (date) {
2554
- return date.getUTCDate();
2555
- };
2556
- NiceCustomDateAdapter.prototype.getMonth = function (date) {
2557
- return date.getUTCMonth();
2558
- };
2559
- NiceCustomDateAdapter.prototype.getYear = function (date) {
2560
- return date.getUTCFullYear();
2561
- };
2562
- return NiceCustomDateAdapter;
2563
- }(i6.NativeDateAdapter));
2564
- 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 });
2565
- NiceCustomDateAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter });
2566
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceCustomDateAdapter, decorators: [{
2567
- type: i0.Injectable
2568
- }], ctorParameters: function () {
2569
- return [{ type: i1__namespace$4.TranslateService }, { type: undefined, decorators: [{
2570
- type: i0.Inject,
2571
- args: [i6.MAT_DATE_LOCALE]
2572
- }] }, { type: i2__namespace$2.Platform }];
2573
- } });
2574
-
2575
- var QueryBuilderModule = /** @class */ (function () {
2576
- function QueryBuilderModule() {
2577
- }
2578
- return QueryBuilderModule;
2579
- }());
2580
- QueryBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2581
- QueryBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, declarations: [QueryBuilderComponent,
2582
- QueryBuilderTriggerDirective,
2583
- FilterSelectionComponent,
2584
- RuleComponent,
2585
- SelectFilterComponent,
2586
- TextFilterComponent,
2587
- NumberFilterComponent,
2588
- RadioFilterComponent,
2589
- DateFilterComponent,
2590
- FilterGroupIconPipe], imports: [i13.CommonModule,
2591
- i1$1.FormsModule,
2592
- i1$5.TranslateModule,
2593
- i1$4.OverlayModule,
2594
- i9.MatCardModule,
2595
- i2$1.MatListModule,
2596
- i4.FlexLayoutModule,
2597
- i7.MatButtonModule,
2598
- i6.MatRippleModule,
2599
- i6$1.MatIconModule,
2600
- i5$1.MatSelectModule,
2601
- i3$1.MatInputModule,
2602
- i2.MatDatepickerModule,
2603
- i1$3.MatRadioModule,
2604
- i18.NiceLoadingSpinnerModule,
2605
- i18.NiceTypeaheadModule,
2606
- i1$1.ReactiveFormsModule,
2607
- i5.NgxMaskModule], exports: [QueryBuilderComponent, QueryBuilderTriggerDirective] });
2608
- 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: [[
2609
- i13.CommonModule,
2610
- i1$1.FormsModule,
2611
- i1$5.TranslateModule,
2612
- i1$4.OverlayModule,
2613
- i9.MatCardModule,
2614
- i2$1.MatListModule,
2615
- i4.FlexLayoutModule,
2616
- i7.MatButtonModule,
2617
- i6.MatRippleModule,
2618
- i6$1.MatIconModule,
2619
- i5$1.MatSelectModule,
2620
- i3$1.MatInputModule,
2621
- i2.MatDatepickerModule,
2622
- i1$3.MatRadioModule,
2623
- i18.NiceLoadingSpinnerModule,
2624
- i18.NiceTypeaheadModule,
2625
- i1$1.ReactiveFormsModule,
2626
- i5.NgxMaskModule
2627
- ]] });
2628
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: QueryBuilderModule, decorators: [{
2629
- type: i0.NgModule,
2630
- args: [{
2631
- imports: [
2632
- i13.CommonModule,
2633
- i1$1.FormsModule,
2634
- i1$5.TranslateModule,
2635
- i1$4.OverlayModule,
2636
- i9.MatCardModule,
2637
- i2$1.MatListModule,
2638
- i4.FlexLayoutModule,
2639
- i7.MatButtonModule,
2640
- i6.MatRippleModule,
2641
- i6$1.MatIconModule,
2642
- i5$1.MatSelectModule,
2643
- i3$1.MatInputModule,
2644
- i2.MatDatepickerModule,
2645
- i1$3.MatRadioModule,
2646
- i18.NiceLoadingSpinnerModule,
2647
- i18.NiceTypeaheadModule,
2648
- i1$1.ReactiveFormsModule,
2649
- i5.NgxMaskModule
2650
- ],
2651
- declarations: [
2652
- QueryBuilderComponent,
2653
- QueryBuilderTriggerDirective,
2654
- FilterSelectionComponent,
2655
- RuleComponent,
2656
- SelectFilterComponent,
2657
- TextFilterComponent,
2658
- NumberFilterComponent,
2659
- RadioFilterComponent,
2660
- DateFilterComponent,
2661
- FilterGroupIconPipe
2662
- ],
2663
- providers: [{ provide: i6.DateAdapter, useClass: NiceCustomDateAdapter }],
2664
- exports: [QueryBuilderComponent, QueryBuilderTriggerDirective]
2665
- }]
2666
- }] });
2667
-
2668
- var NiceBaseListModule = /** @class */ (function () {
2669
- function NiceBaseListModule() {
2670
- }
2671
- NiceBaseListModule.forRoot = function (options) {
2672
- var _a;
2673
- return {
2674
- ngModule: NiceBaseListModule,
2675
- providers: __spreadArray([
2676
- {
2677
- provide: BASE_LIST_LAYOUT,
2678
- useValue: (_a = options === null || options === void 0 ? void 0 : options.layout) !== null && _a !== void 0 ? _a : defaultLayout
2679
- }
2680
- ], __read(((options === null || options === void 0 ? void 0 : options.queryBuilder) ? [
2681
- {
2682
- provide: ENABLE_QUERY_BUILDER,
2683
- useValue: true
2684
- },
2685
- {
2686
- provide: NiceFilterGroupService,
2687
- useClass: options.queryBuilder.filterGroupService
2688
- },
2689
- options.queryBuilder.savedReportService ? {
2690
- provide: NiceSavedReportService,
2691
- useClass: options.queryBuilder.savedReportService
2692
- } : undefined
2693
- ] : []))).filter(function (x) { return !!x; })
2694
- };
2695
- };
2696
- NiceBaseListModule.providerFactory = function (options) {
2697
- var _a;
2698
- return __spreadArray([
2699
- {
2700
- provide: NiceFilterService,
2701
- useClass: options.filterService
2702
- },
2703
- {
2704
- provide: LIST_TABLE,
2705
- useValue: options.table
2706
- },
2707
- {
2708
- provide: TABLE_COLUMNS,
2709
- useValue: options.columns,
2710
- },
2711
- {
2712
- provide: DEFAULT_PARAMETERS,
2713
- useValue: options.defaultParameters
2714
- },
2715
- options.layout ? {
2716
- provide: BASE_LIST_LAYOUT,
2717
- useValue: options.layout
2718
- } : undefined,
2719
- {
2720
- provide: EXPORTS_SETTINGS,
2721
- useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
2722
- pdf: true,
2723
- xlsx: true,
2724
- csv: true
2725
- }
2726
- },
2727
- options.disableQueryBuilder !== undefined ? {
2728
- provide: ENABLE_QUERY_BUILDER,
2729
- useValue: !options.disableQueryBuilder
2730
- } : null
2731
- ], __read((options.queryBuilder ? [
2732
- {
2733
- provide: NiceFilterGroupService,
2734
- useClass: options.queryBuilder.filterGroupService
2735
- },
2736
- options.queryBuilder.savedReportService ? {
2737
- provide: NiceSavedReportService,
2738
- useClass: options.queryBuilder.savedReportService
2739
- } : undefined
2740
- ] : []))).filter(function (x) { return !!x; });
2741
- };
2742
- return NiceBaseListModule;
2743
- }());
2744
- NiceBaseListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2745
- NiceBaseListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, declarations: [NiceBaseListComponent], imports: [i18.NiceExportBottomSheetModule,
2746
- NiceBaseListDirectiveModule,
2747
- i13.CommonModule,
2748
- i4.FlexModule,
2749
- i4.ExtendedModule,
2750
- i1$1.FormsModule,
2751
- i3.RouterModule,
2752
- i7.MatButtonModule,
2753
- i6$1.MatIconModule,
2754
- i16.MatTooltipModule,
2755
- i9.MatCardModule,
2756
- i8.MatPaginatorModule,
2757
- i1$5.TranslateModule,
2758
- i18.NiceLoadingSpinnerModule,
2759
- i11.MatTableModule,
2760
- i12.MatSortModule,
2761
- i6.MatRippleModule,
2762
- i4$1.MatBottomSheetModule,
2763
- QueryBuilderModule,
2764
- i17.MatBadgeModule], exports: [NiceBaseListComponent,
2765
- NiceBaseListDirectiveModule] });
2766
- NiceBaseListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, imports: [[
2767
- i18.NiceExportBottomSheetModule,
2768
- NiceBaseListDirectiveModule,
2769
- i13.CommonModule,
2770
- i4.FlexModule,
2771
- i4.ExtendedModule,
2772
- i1$1.FormsModule,
2773
- i3.RouterModule,
2774
- i7.MatButtonModule,
2775
- i6$1.MatIconModule,
2776
- i16.MatTooltipModule,
2777
- i9.MatCardModule,
2778
- i8.MatPaginatorModule,
2779
- i1$5.TranslateModule,
2780
- i18.NiceLoadingSpinnerModule,
2781
- i11.MatTableModule,
2782
- i12.MatSortModule,
2783
- i6.MatRippleModule,
2784
- i4$1.MatBottomSheetModule,
2785
- QueryBuilderModule,
2786
- i17.MatBadgeModule
2787
- ], NiceBaseListDirectiveModule] });
2788
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceBaseListModule, decorators: [{
2789
- type: i0.NgModule,
2790
- args: [{
2791
- imports: [
2792
- i18.NiceExportBottomSheetModule,
2793
- NiceBaseListDirectiveModule,
2794
- i13.CommonModule,
2795
- i4.FlexModule,
2796
- i4.ExtendedModule,
2797
- i1$1.FormsModule,
2798
- i3.RouterModule,
2799
- i7.MatButtonModule,
2800
- i6$1.MatIconModule,
2801
- i16.MatTooltipModule,
2802
- i9.MatCardModule,
2803
- i8.MatPaginatorModule,
2804
- i1$5.TranslateModule,
2805
- i18.NiceLoadingSpinnerModule,
2806
- i11.MatTableModule,
2807
- i12.MatSortModule,
2808
- i6.MatRippleModule,
2809
- i4$1.MatBottomSheetModule,
2810
- QueryBuilderModule,
2811
- i17.MatBadgeModule
2812
- ],
2813
- declarations: [
2814
- NiceBaseListComponent
2815
- ],
2816
- exports: [
2817
- NiceBaseListComponent,
2818
- NiceBaseListDirectiveModule
2819
- ]
2820
- }]
2821
- }] });
2822
-
2823
- var NiceListState = /** @class */ (function () {
2824
- function NiceListState() {
2825
- }
2826
- return NiceListState;
2827
- }());
2828
-
2829
- var NiceMultiStateFilterService = /** @class */ (function (_super) {
2830
- __extends(NiceMultiStateFilterService, _super);
2831
- function NiceMultiStateFilterService(filters) {
2832
- var _this = _super.call(this) || this;
2833
- _this.filters = filters;
2834
- return _this;
2835
- }
2836
- NiceMultiStateFilterService.prototype.switchState = function (state) {
2837
- this.api = this.filters[state];
2838
- };
2839
- return NiceMultiStateFilterService;
2840
- }(NiceFilterService));
2841
-
2842
- var initialValue = Object.assign({}, initialBaseListState);
2843
- exports.NiceMultiStateListStore = /** @class */ (function (_super) {
2844
- __extends(NiceMultiStateListStore, _super);
2845
- function NiceMultiStateListStore() {
2846
- return _super.call(this, null) || this;
2847
- }
2848
- return NiceMultiStateListStore;
2849
- }(exports.NiceBaseListStore));
2850
- 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 });
2851
- exports.NiceMultiStateListStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore });
2852
- exports.NiceMultiStateListStore = __decorate([
2853
- akita.StoreConfig({ name: "multi-state-list", resettable: true }),
2854
- __metadata("design:paramtypes", [])
2855
- ], exports.NiceMultiStateListStore);
2856
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: exports.NiceMultiStateListStore, decorators: [{
2857
- type: i0.Injectable
2858
- }], ctorParameters: function () { return []; } });
2859
-
2860
- var NiceMultiStateListQuery = /** @class */ (function (_super) {
2861
- __extends(NiceMultiStateListQuery, _super);
2862
- function NiceMultiStateListQuery(store) {
2863
- var _this = _super.call(this, store) || this;
2864
- _this.store = store;
2865
- return _this;
2866
- }
2867
- return NiceMultiStateListQuery;
2868
- }(NiceBaseListQuery));
2869
- 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 });
2870
- NiceMultiStateListQuery.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery });
2871
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListQuery, decorators: [{
2872
- type: i0.Injectable
2873
- }], ctorParameters: function () { return [{ type: exports.NiceMultiStateListStore }]; } });
2874
-
2875
- var LIST_STATES = new i0.InjectionToken("list_states");
2876
-
2877
- var NiceMultiStateListService = /** @class */ (function (_super) {
2878
- __extends(NiceMultiStateListService, _super);
2879
- function NiceMultiStateListService(states, store, activatedRoute, router, appRef, multiFilterService) {
2880
- var _this = _super.call(this, store, multiFilterService, activatedRoute, router, appRef) || this;
2881
- _this.states = states;
2882
- _this.multiFilterService = multiFilterService;
2883
- return _this;
2884
- }
2885
- NiceMultiStateListService.prototype.reset = function () {
2886
- this.store.reset();
2887
- };
2888
- NiceMultiStateListService.prototype.setStateDefaultFilter = function (state, parameters) {
2889
- this.states[state].defaultParameters = parameters;
2890
- };
2891
- NiceMultiStateListService.prototype.switchState = function (state) {
2892
- var _a;
2893
- var newState = this.states[state];
2894
- if (!state) {
2895
- return [];
2896
- }
2897
- this.multiFilterService.switchState(state);
2898
- this.reset();
2899
- this.init();
2900
- this.loadData((_a = newState.defaultParameters) !== null && _a !== void 0 ? _a : initialBaseListState.filterParameters);
2901
- return newState.columns;
2902
- };
2903
- return NiceMultiStateListService;
2904
- }(NiceBaseListService));
2905
- 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 });
2906
- NiceMultiStateListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService });
2907
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListService, decorators: [{
2908
- type: i0.Injectable
2909
- }], ctorParameters: function () {
2910
- return [{ type: undefined, decorators: [{
2911
- type: i0.Inject,
2912
- args: [LIST_STATES]
2913
- }] }, { type: exports.NiceMultiStateListStore }, { type: i3__namespace.ActivatedRoute }, { type: i3__namespace.Router }, { type: i0__namespace.ApplicationRef }, { type: NiceMultiStateFilterService }];
2914
- } });
2915
-
2916
- var NiceMultiStateListComponent = /** @class */ (function (_super) {
2917
- __extends(NiceMultiStateListComponent, _super);
2918
- function NiceMultiStateListComponent(enableQueryBuilder, listLayout, exportsSetting, query, activatedRoute, bottomSheet, router, mediaObserver, multiStateListService) {
2919
- var _this = _super.call(this, enableQueryBuilder, listLayout, [], exportsSetting, query, multiStateListService, activatedRoute, bottomSheet, router, mediaObserver) || this;
2920
- _this.multiStateListService = multiStateListService;
2921
- return _this;
2922
- }
2923
- Object.defineProperty(NiceMultiStateListComponent.prototype, "state", {
2924
- set: function (state) {
2925
- this.switchState(state);
2926
- },
2927
- enumerable: false,
2928
- configurable: true
2929
- });
2930
- NiceMultiStateListComponent.prototype.switchState = function (state) {
2931
- var columns = this.multiStateListService.switchState(state);
2932
- this.setColumn(columns);
2933
- };
2934
- return NiceMultiStateListComponent;
2935
- }(NiceBaseListComponent));
2936
- 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 });
2937
- NiceMultiStateListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: NiceMultiStateListComponent, selector: "nice-multi-state-list", inputs: { state: "state" }, providers: [
2938
- NiceMultiStateListQuery,
2939
- NiceMultiStateListService,
2940
- exports.NiceMultiStateListStore
2941
- ], 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 } });
2942
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListComponent, decorators: [{
2943
- type: i0.Component,
2944
- args: [{
2945
- selector: "nice-multi-state-list",
2946
- templateUrl: "../base-list/base-list.template.html",
2947
- providers: [
2948
- NiceMultiStateListQuery,
2949
- NiceMultiStateListService,
2950
- exports.NiceMultiStateListStore
2951
- ]
2952
- }]
2953
- }], ctorParameters: function () {
2954
- return [{ type: undefined, decorators: [{
2955
- type: i0.Optional
2956
- }, {
2957
- type: i0.Inject,
2958
- args: [ENABLE_QUERY_BUILDER]
2959
- }] }, { type: undefined, decorators: [{
2960
- type: i0.Inject,
2961
- args: [BASE_LIST_LAYOUT]
2962
- }] }, { type: undefined, decorators: [{
2963
- type: i0.Inject,
2964
- args: [EXPORTS_SETTINGS]
2965
- }] }, { type: NiceMultiStateListQuery }, { type: i3__namespace.ActivatedRoute }, { type: i4__namespace$1.MatBottomSheet }, { type: i3__namespace.Router }, { type: i4__namespace.MediaObserver }, { type: NiceMultiStateListService }];
2966
- }, propDecorators: { state: [{
2967
- type: i0.Input
2968
- }] } });
2969
-
2970
- var NiceMultiStateListModule = /** @class */ (function () {
2971
- function NiceMultiStateListModule() {
2972
- }
2973
- NiceMultiStateListModule.providerFactory = function (options) {
2974
- var _a;
2975
- return __spreadArray([
2976
- {
2977
- provide: NiceMultiStateFilterService,
2978
- useExisting: options.filterService
2979
- },
2980
- {
2981
- provide: LIST_STATES,
2982
- useValue: options.states
2983
- },
2984
- options.layout ? {
2985
- provide: BASE_LIST_LAYOUT,
2986
- useValue: options.layout
2987
- } : undefined,
2988
- {
2989
- provide: EXPORTS_SETTINGS,
2990
- useValue: (_a = options.exports) !== null && _a !== void 0 ? _a : {
2991
- pdf: true,
2992
- xlsx: true,
2993
- csv: true
2994
- }
2995
- }
2996
- ], __read((options.queryBuilder ? [
2997
- {
2998
- provide: ENABLE_QUERY_BUILDER,
2999
- useValue: true
3000
- },
3001
- {
3002
- provide: NiceFilterGroupService,
3003
- useClass: options.queryBuilder.filterGroupService
3004
- },
3005
- options.queryBuilder.savedReportService ? {
3006
- provide: NiceSavedReportService,
3007
- useClass: options.queryBuilder.savedReportService
3008
- } : undefined
3009
- ] : []))).filter(function (x) { return !!x; });
3010
- };
3011
- return NiceMultiStateListModule;
3012
- }());
3013
- NiceMultiStateListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3014
- NiceMultiStateListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, declarations: [NiceMultiStateListComponent], imports: [i18.NiceExportBottomSheetModule,
3015
- NiceBaseListDirectiveModule,
3016
- i13.CommonModule,
3017
- i4.FlexModule,
3018
- i4.ExtendedModule,
3019
- i1$1.FormsModule,
3020
- i3.RouterModule,
3021
- i7.MatButtonModule,
3022
- i6$1.MatIconModule,
3023
- i16.MatTooltipModule,
3024
- i9.MatCardModule,
3025
- i8.MatPaginatorModule,
3026
- i1$5.TranslateModule,
3027
- i18.NiceLoadingSpinnerModule,
3028
- i11.MatTableModule,
3029
- i12.MatSortModule,
3030
- i6.MatRippleModule,
3031
- i4$1.MatBottomSheetModule,
3032
- QueryBuilderModule,
3033
- i17.MatBadgeModule], exports: [NiceMultiStateListComponent,
3034
- NiceBaseListDirectiveModule] });
3035
- NiceMultiStateListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, imports: [[
3036
- i18.NiceExportBottomSheetModule,
3037
- NiceBaseListDirectiveModule,
3038
- i13.CommonModule,
3039
- i4.FlexModule,
3040
- i4.ExtendedModule,
3041
- i1$1.FormsModule,
3042
- i3.RouterModule,
3043
- i7.MatButtonModule,
3044
- i6$1.MatIconModule,
3045
- i16.MatTooltipModule,
3046
- i9.MatCardModule,
3047
- i8.MatPaginatorModule,
3048
- i1$5.TranslateModule,
3049
- i18.NiceLoadingSpinnerModule,
3050
- i11.MatTableModule,
3051
- i12.MatSortModule,
3052
- i6.MatRippleModule,
3053
- i4$1.MatBottomSheetModule,
3054
- QueryBuilderModule,
3055
- i17.MatBadgeModule
3056
- ], NiceBaseListDirectiveModule] });
3057
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: NiceMultiStateListModule, decorators: [{
3058
- type: i0.NgModule,
3059
- args: [{
3060
- imports: [
3061
- i18.NiceExportBottomSheetModule,
3062
- NiceBaseListDirectiveModule,
3063
- i13.CommonModule,
3064
- i4.FlexModule,
3065
- i4.ExtendedModule,
3066
- i1$1.FormsModule,
3067
- i3.RouterModule,
3068
- i7.MatButtonModule,
3069
- i6$1.MatIconModule,
3070
- i16.MatTooltipModule,
3071
- i9.MatCardModule,
3072
- i8.MatPaginatorModule,
3073
- i1$5.TranslateModule,
3074
- i18.NiceLoadingSpinnerModule,
3075
- i11.MatTableModule,
3076
- i12.MatSortModule,
3077
- i6.MatRippleModule,
3078
- i4$1.MatBottomSheetModule,
3079
- QueryBuilderModule,
3080
- i17.MatBadgeModule
3081
- ],
3082
- declarations: [
3083
- NiceMultiStateListComponent
3084
- ],
3085
- exports: [
3086
- NiceMultiStateListComponent,
3087
- NiceBaseListDirectiveModule
3088
- ]
3089
- }]
3090
- }] });
3091
-
3092
- var StringUtils = /** @class */ (function () {
3093
- function StringUtils() {
3094
- }
3095
- return StringUtils;
3096
- }());
3097
- String.prototype.toTableColumn = function (sortable) {
3098
- return new TableColumns(this.toString(), sortable);
3099
- };
3100
-
3101
- /*
3102
- * Public API Surface of nice-data-filter-kit
3103
- */
3104
-
3105
- /**
3106
- * Generated bundle index. Do not edit.
3107
- */
3108
-
3109
- exports.DateFilterComponent = DateFilterComponent;
3110
- exports.FilterComponent = FilterComponent;
3111
- exports.FilterGroupIconPipe = FilterGroupIconPipe;
3112
- exports.FilterSelectionComponent = FilterSelectionComponent;
3113
- exports.FilterUtils = FilterUtils;
3114
- exports.NiceBaseListButtonsDirective = NiceBaseListButtonsDirective;
3115
- exports.NiceBaseListCardsDirective = NiceBaseListCardsDirective;
3116
- exports.NiceBaseListComponent = NiceBaseListComponent;
3117
- exports.NiceBaseListCustomContentDirective = NiceBaseListCustomContentDirective;
3118
- exports.NiceBaseListDirectiveModule = NiceBaseListDirectiveModule;
3119
- exports.NiceBaseListModule = NiceBaseListModule;
3120
- exports.NiceBaseListQuery = NiceBaseListQuery;
3121
- exports.NiceBaseListService = NiceBaseListService;
3122
- exports.NiceBaseListTableDirective = NiceBaseListTableDirective;
3123
- exports.NiceBaseListTitleDirective = NiceBaseListTitleDirective;
3124
- exports.NiceCustomDateAdapter = NiceCustomDateAdapter;
3125
- exports.NiceFilterApi = NiceFilterApi;
3126
- exports.NiceFilterGroupService = NiceFilterGroupService;
3127
- exports.NiceFilterService = NiceFilterService;
3128
- exports.NiceListState = NiceListState;
3129
- exports.NiceMultiStateFilterService = NiceMultiStateFilterService;
3130
- exports.NiceMultiStateListComponent = NiceMultiStateListComponent;
3131
- exports.NiceMultiStateListModule = NiceMultiStateListModule;
3132
- exports.NiceMultiStateListQuery = NiceMultiStateListQuery;
3133
- exports.NiceMultiStateListService = NiceMultiStateListService;
3134
- exports.NiceSavedReportService = NiceSavedReportService;
3135
- exports.NumberFilterComponent = NumberFilterComponent;
3136
- exports.QBFilterUtils = QBFilterUtils;
3137
- exports.QueryBuilderComponent = QueryBuilderComponent;
3138
- exports.QueryBuilderModule = QueryBuilderModule;
3139
- exports.QueryBuilderTriggerDirective = QueryBuilderTriggerDirective;
3140
- exports.RadioFilterComponent = RadioFilterComponent;
3141
- exports.RuleComponent = RuleComponent;
3142
- exports.SelectFilterComponent = SelectFilterComponent;
3143
- exports.StringUtils = StringUtils;
3144
- exports.TableColumns = TableColumns;
3145
- exports.TextFilterComponent = TextFilterComponent;
3146
- exports.defaultLayout = defaultLayout;
3147
- exports.initialBaseListState = initialBaseListState;
3148
- exports.initialValue = initialValue;
3149
-
3150
- Object.defineProperty(exports, '__esModule', { value: true });
3151
-
3152
- })));
3153
- //# sourceMappingURL=recursyve-nice-data-filter-kit.umd.js.map