@verisoft/ui-core 20.0.0 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/.eslintrc.json +48 -0
  2. package/jest.config.ts +21 -0
  3. package/ng-package.json +11 -0
  4. package/package.json +6 -18
  5. package/project.json +36 -0
  6. package/src/index.ts +6 -0
  7. package/src/lib/common/angular-helper.ts +44 -0
  8. package/src/lib/common/constants.ts +5 -0
  9. package/src/lib/common/control.models.ts +80 -0
  10. package/src/lib/common/datasource-component.model.spec.ts +42 -0
  11. package/src/lib/common/datasource-component.model.ts +43 -0
  12. package/src/lib/common/deactivate-guard.model.ts +5 -0
  13. package/src/lib/common/download-file.ts +20 -0
  14. package/src/lib/common/filter.ts +7 -0
  15. package/src/lib/common/icons.ts +34 -0
  16. package/src/lib/common/index.ts +10 -0
  17. package/src/lib/common/notificable-property.model.ts +5 -0
  18. package/src/lib/common/rxjs.spec.ts +58 -0
  19. package/src/lib/common/rxjs.ts +21 -0
  20. package/src/lib/components/action-button-group/action-button-group.model.ts +15 -0
  21. package/src/lib/components/action-button-group/action-button.model.ts +15 -0
  22. package/src/lib/components/action-button-group/index.ts +2 -0
  23. package/src/lib/components/base-form/base-form-input.component.ts +120 -0
  24. package/src/lib/components/base-form/base-form.component.ts +236 -0
  25. package/src/lib/components/base-form/directives/detail-store.directive.ts +219 -0
  26. package/src/lib/components/base-form/index.ts +4 -0
  27. package/src/lib/components/base-form/models/base-form-input.models.ts +11 -0
  28. package/src/lib/components/base-form/models/base-form.models.ts +31 -0
  29. package/src/lib/components/base-form/models/index.ts +2 -0
  30. package/src/lib/components/breadcrumb/breadcrumb.model.ts +21 -0
  31. package/src/lib/components/breadcrumb/breadcrumb.service.ts +9 -0
  32. package/src/lib/components/breadcrumb/breadcrumbcore.component.ts +117 -0
  33. package/src/lib/components/breadcrumb/index.ts +3 -0
  34. package/src/lib/components/button/button.model.ts +21 -0
  35. package/src/lib/components/button/index.ts +1 -0
  36. package/src/lib/components/calendar/calendar.model.ts +16 -0
  37. package/src/lib/components/calendar/index.ts +1 -0
  38. package/src/lib/components/checkbox/checkbox.model.ts +10 -0
  39. package/src/lib/components/checkbox/index.ts +1 -0
  40. package/src/lib/components/confirm-dialog/confirm-dialog.model.ts +31 -0
  41. package/src/lib/components/confirm-dialog/index.ts +1 -0
  42. package/src/lib/components/dropdown/dropdown.model.ts +16 -0
  43. package/src/lib/components/dropdown/index.ts +1 -0
  44. package/src/lib/components/dropdown-button/dropdown-button.model.ts +18 -0
  45. package/src/lib/components/dropdown-button/index.ts +1 -0
  46. package/src/lib/components/dynamic-component/dynamic-component.model.ts +2 -0
  47. package/src/lib/components/dynamic-component/index.ts +1 -0
  48. package/src/lib/components/filter/filter.model.ts +17 -0
  49. package/src/lib/components/filter/index.ts +1 -0
  50. package/src/lib/components/form-field/form-field.model.ts +15 -0
  51. package/src/lib/components/form-field/index.ts +1 -0
  52. package/src/lib/components/generic-field/generic-field.model.ts +10 -0
  53. package/src/lib/components/generic-field/index.ts +1 -0
  54. package/src/lib/components/generic-form/generic-form.component.ts +33 -0
  55. package/src/lib/components/generic-form/index.ts +1 -0
  56. package/src/lib/components/header/header.model.ts +18 -0
  57. package/src/lib/components/header/index.ts +1 -0
  58. package/src/lib/components/icons/icons.component.ts +22 -0
  59. package/src/lib/components/icons/icons.model.ts +16 -0
  60. package/src/lib/components/icons/index.ts +2 -0
  61. package/src/lib/components/index.ts +37 -0
  62. package/src/lib/components/input-group/index.ts +1 -0
  63. package/src/lib/components/input-group/input-group.model.ts +17 -0
  64. package/src/lib/components/loader/index.ts +1 -0
  65. package/src/lib/components/loader/loader.model.ts +7 -0
  66. package/src/lib/components/multiselect/index.ts +1 -0
  67. package/src/lib/components/multiselect/mutiselect.model.ts +13 -0
  68. package/src/lib/components/number-input/index.ts +1 -0
  69. package/src/lib/components/number-input/number-input.model.ts +14 -0
  70. package/src/lib/components/page-header/index.ts +3 -0
  71. package/src/lib/components/page-header/page-header.model.ts +11 -0
  72. package/src/lib/components/page-header/page-header.service.ts +9 -0
  73. package/src/lib/components/page-header/page-headercore.component.ts +42 -0
  74. package/src/lib/components/password/index.ts +1 -0
  75. package/src/lib/components/password/password.model.ts +25 -0
  76. package/src/lib/components/radiobutton/index.ts +1 -0
  77. package/src/lib/components/radiobutton/radiobutton.model.ts +16 -0
  78. package/src/lib/components/section/index.ts +1 -0
  79. package/src/lib/components/section/section.model.ts +11 -0
  80. package/src/lib/components/side-menu/directives/side-menu-service.directive.ts +31 -0
  81. package/src/lib/components/side-menu/index.ts +4 -0
  82. package/src/lib/components/side-menu/services/side-menu-provider.service.ts +13 -0
  83. package/src/lib/components/side-menu/services/side-menu.service.ts +62 -0
  84. package/src/lib/components/side-menu/side-menu.model.ts +67 -0
  85. package/src/lib/components/slider/index.ts +1 -0
  86. package/src/lib/components/slider/slider.model.ts +13 -0
  87. package/src/lib/components/snackbar/index.ts +1 -0
  88. package/src/lib/components/snackbar/snackbar.model.ts +7 -0
  89. package/src/lib/components/stepper/index.ts +1 -0
  90. package/src/lib/components/stepper/stepper.model.ts +24 -0
  91. package/src/lib/components/switch/index.ts +1 -0
  92. package/src/lib/components/switch/switch.model.ts +8 -0
  93. package/src/lib/components/tab-view/index.ts +1 -0
  94. package/src/lib/components/tab-view/tab-view.model.ts +22 -0
  95. package/src/lib/components/table/column-configuration.ts +38 -0
  96. package/src/lib/components/table/index.ts +4 -0
  97. package/src/lib/components/table/table-builder.ts +93 -0
  98. package/src/lib/components/table/table-column.directive.ts +62 -0
  99. package/src/lib/components/table/table.models.ts +261 -0
  100. package/src/lib/components/table-filter/index.ts +1 -0
  101. package/src/lib/components/table-filter/table-filter.model.ts +22 -0
  102. package/src/lib/components/tag/index.ts +1 -0
  103. package/src/lib/components/tag/tag.model.ts +13 -0
  104. package/src/lib/components/textarea/index.ts +1 -0
  105. package/src/lib/components/textarea/textarea.model.ts +13 -0
  106. package/src/lib/components/textfield/index.ts +1 -0
  107. package/src/lib/components/textfield/textfield.model.ts +13 -0
  108. package/src/lib/components/tooltip/index.ts +1 -0
  109. package/src/lib/components/tooltip/tooltip.model.ts +13 -0
  110. package/src/lib/components/unsubscribe.component.ts +12 -0
  111. package/src/lib/directives/datasource.directive.ts +275 -0
  112. package/src/lib/directives/index.ts +4 -0
  113. package/src/lib/directives/shortcut.directive.ts +37 -0
  114. package/src/lib/directives/table-datasource.directive.ts +184 -0
  115. package/src/lib/directives/table-filter.directive.ts +69 -0
  116. package/src/lib/format/format.ts +74 -0
  117. package/src/lib/pipes/error/error.codes.ts +11 -0
  118. package/src/lib/pipes/error/error.models.ts +27 -0
  119. package/src/lib/pipes/error/error.pipe.ts +27 -0
  120. package/src/lib/pipes/error/warning.codes.ts +5 -0
  121. package/src/lib/pipes/error/warning.pipe.ts +27 -0
  122. package/src/lib/pipes/helper/enumToList.pipe.ts +16 -0
  123. package/src/lib/pipes/index.ts +7 -0
  124. package/src/lib/pipes/keyOrFn/keyOrFn.pipe.ts +23 -0
  125. package/src/lib/services/confirm-dialog.service.ts +44 -0
  126. package/src/lib/services/index.ts +4 -0
  127. package/src/lib/services/leave-form.service.ts +53 -0
  128. package/src/lib/services/screen-size.service.ts +25 -0
  129. package/src/lib/services/table.service.ts +22 -0
  130. package/src/test-setup.ts +8 -0
  131. package/tsconfig.json +28 -0
  132. package/tsconfig.lib.json +17 -0
  133. package/tsconfig.lib.prod.json +9 -0
  134. package/tsconfig.spec.json +16 -0
  135. package/fesm2022/verisoft-ui-core.mjs +0 -2021
  136. package/fesm2022/verisoft-ui-core.mjs.map +0 -1
  137. package/index.d.ts +0 -1107
@@ -1,2021 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { SimpleChange, InjectionToken, inject, Input, Component, Injectable, EventEmitter, Output, signal, ChangeDetectorRef, HostListener, Directive, Optional, Inject, TemplateRef, ContentChild, Pipe } from '@angular/core';
3
- import { startWith, switchMap, merge, map, debounceTime, BehaviorSubject, Subject, takeUntil, filter, tap, of, catchError } from 'rxjs';
4
- import * as i1 from '@angular/forms';
5
- import { FormControlName, FormControlDirective, NgModel, FormControl, ReactiveFormsModule } from '@angular/forms';
6
- import { ERROR_PROVIDER_TOKEN, BASE_URL_PATH, normalizeRequest, DEFAULT_SEARCH_LIMIT, convertDatasource, BaseHttpService, toCzechDateTimeString } from '@verisoft/core';
7
- import { cloneDeep } from 'lodash-es';
8
- import { TranslateService } from '@ngx-translate/core';
9
- import * as i1$1 from '@angular/router';
10
- import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
11
- import { Store, createSelector, createFeatureSelector } from '@ngrx/store';
12
- import { createResetStateAction, createInitNewDetailAction, createInitDetailAction, createUpdateDetailAction, createUpdateFormStateAction, createUpdateDetailSetErrorsAction } from '@verisoft/store';
13
- import { v4 } from 'uuid';
14
- import { HttpClient } from '@angular/common/http';
15
-
16
- function setComponentProperties(component, value, firstChange = false) {
17
- if (!value || !component) {
18
- return;
19
- }
20
- const simpleChanges = Object.keys(value).reduce((changes, property) => {
21
- const indexedComponent = component;
22
- const indexedValue = value;
23
- const previousValue = indexedComponent[property];
24
- const currentValue = indexedValue[property];
25
- if (currentValue !== previousValue) {
26
- indexedComponent[property] = currentValue;
27
- const change = new SimpleChange(previousValue, currentValue, firstChange);
28
- return { ...changes, [property]: change };
29
- }
30
- return changes;
31
- }, {});
32
- const changeableComponent = component;
33
- if (changeableComponent['ngOnChanges']) {
34
- changeableComponent.ngOnChanges(simpleChanges);
35
- }
36
- }
37
-
38
- var ControlSeverity;
39
- (function (ControlSeverity) {
40
- ControlSeverity["success"] = "success";
41
- ControlSeverity["info"] = "info";
42
- ControlSeverity["warning"] = "warning";
43
- ControlSeverity["danger"] = "danger";
44
- ControlSeverity["help"] = "help";
45
- ControlSeverity["primary"] = "primary";
46
- ControlSeverity["secondary"] = "secondary";
47
- ControlSeverity["contrast"] = "contrast";
48
- })(ControlSeverity || (ControlSeverity = {}));
49
- var GovControlSeverity;
50
- (function (GovControlSeverity) {
51
- GovControlSeverity["primary"] = "primary";
52
- GovControlSeverity["secondary"] = "secondary";
53
- GovControlSeverity["neutral"] = "neutral";
54
- GovControlSeverity["error"] = "error";
55
- GovControlSeverity["success"] = "success";
56
- GovControlSeverity["warning"] = "warning";
57
- })(GovControlSeverity || (GovControlSeverity = {}));
58
- var GovButtonType;
59
- (function (GovButtonType) {
60
- GovButtonType["solid"] = "solid";
61
- GovButtonType["outlined"] = "outlined";
62
- GovButtonType["base"] = "base";
63
- GovButtonType["link"] = "link";
64
- })(GovButtonType || (GovButtonType = {}));
65
- var IconPosition;
66
- (function (IconPosition) {
67
- IconPosition["left"] = "left";
68
- IconPosition["right"] = "right";
69
- })(IconPosition || (IconPosition = {}));
70
- var SlotPosition;
71
- (function (SlotPosition) {
72
- SlotPosition["top"] = "top";
73
- SlotPosition["bottom"] = "bottom";
74
- })(SlotPosition || (SlotPosition = {}));
75
- var Position;
76
- (function (Position) {
77
- Position["top"] = "top";
78
- Position["bottom"] = "bottom";
79
- Position["left"] = "left";
80
- Position["right"] = "right";
81
- })(Position || (Position = {}));
82
- var FieldSize;
83
- (function (FieldSize) {
84
- FieldSize["small"] = "small";
85
- FieldSize["medium"] = "medium";
86
- FieldSize["large"] = "large";
87
- })(FieldSize || (FieldSize = {}));
88
- var FieldAlign;
89
- (function (FieldAlign) {
90
- FieldAlign["left"] = "left";
91
- FieldAlign["center"] = "center";
92
- FieldAlign["right"] = "right";
93
- })(FieldAlign || (FieldAlign = {}));
94
- var FieldType;
95
- (function (FieldType) {
96
- FieldType["text"] = "text";
97
- FieldType["number"] = "number";
98
- FieldType["password"] = "password";
99
- FieldType["search"] = "search";
100
- FieldType["date"] = "date";
101
- })(FieldType || (FieldType = {}));
102
- var LayoutType;
103
- (function (LayoutType) {
104
- LayoutType["horizontal"] = "horizontal";
105
- LayoutType["vertical"] = "vertical";
106
- })(LayoutType || (LayoutType = {}));
107
-
108
- const DEFAULT_DEBOUNCE_TIME = 300;
109
- const DEFAULT_PAGINATION = [10, 25, 50, 100];
110
- const MAX_COLUMN_CHAR_COUNT = 30;
111
-
112
- function setDataToArray(targetArray, data, offset = 0, total = undefined, defaultItem = undefined) {
113
- const totalItems = total ?? data.length + offset;
114
- if (!targetArray) {
115
- targetArray = Array(totalItems).fill(defaultItem);
116
- }
117
- if (targetArray.length < totalItems) {
118
- targetArray = targetArray.concat(new Array(totalItems - targetArray.length).fill(defaultItem));
119
- }
120
- for (let i = 0; i < data.length; i++) {
121
- targetArray[i + offset] = data[i] ?? defaultItem;
122
- }
123
- return targetArray;
124
- }
125
-
126
- function isFilterEmpty(filter) {
127
- if (filter == undefined) {
128
- return true;
129
- }
130
- return !Object.entries(filter).some((x) => x[1] != undefined);
131
- }
132
-
133
- function queryListChanged(list) {
134
- return list.changes.pipe(startWith({}), switchMap(() => {
135
- const actionPropertyChanges$ = list
136
- .toArray()
137
- .filter((action) => action.propertyChanged)
138
- .map((action) => action.propertyChanged);
139
- return merge(...actionPropertyChanges$).pipe(startWith({}), map(() => list.toArray()));
140
- }), debounceTime(50));
141
- }
142
-
143
- function downloadText(filename, text, mimeType = 'text/plain') {
144
- const blob = new Blob([text], { type: mimeType });
145
- downloadFile(filename, blob);
146
- }
147
- function downloadFile(filename, blob) {
148
- const url = window.URL.createObjectURL(blob);
149
- const a = document.createElement('a');
150
- a.href = url;
151
- a.download = filename;
152
- a.click();
153
- window.URL.revokeObjectURL(url);
154
- }
155
-
156
- const ACTION_BUTTON_GROUP_COMPONENT_TOKEN = new InjectionToken('ActionButtonGroupComponentToken');
157
-
158
- const noop = () => {
159
- /* */
160
- };
161
- class BaseFormInputComponent {
162
- control;
163
- ngControl;
164
- errorService = inject(ERROR_PROVIDER_TOKEN);
165
- formControl;
166
- constructor(control) {
167
- this.control = control;
168
- this.ngControl = control;
169
- if (this.control) {
170
- this.ngControl.valueAccessor = this;
171
- }
172
- }
173
- label;
174
- required = false;
175
- readonly;
176
- disabled;
177
- tooltip;
178
- formDisplay = 'flex';
179
- clearable = true;
180
- placeholder = '';
181
- testId;
182
- inputId = Math.random().toString(36).substring(2);
183
- selectionChanged = noop;
184
- onTouch = noop;
185
- registerOnChange(fn) {
186
- this.selectionChanged = fn;
187
- }
188
- registerOnTouched(fn) {
189
- this.onTouch = fn;
190
- }
191
- // eslint-disable-next-line @typescript-eslint/no-empty-function
192
- writeValue(value) { }
193
- ngOnInit() {
194
- if (this.ngControl) {
195
- if (this.ngControl instanceof FormControlName) {
196
- this.formControl =
197
- this.ngControl.control ||
198
- this.ngControl.formDirective?.form.controls[this.ngControl.name];
199
- }
200
- else if (this.ngControl instanceof FormControlDirective ||
201
- this.ngControl instanceof NgModel) {
202
- this.formControl = this.ngControl.control;
203
- if (this.ngControl instanceof NgModel) {
204
- this.formControl.valueChanges.subscribe(() => this.ngControl?.viewToModelUpdate(this.control?.value));
205
- }
206
- }
207
- else {
208
- this.formControl = new FormControl();
209
- }
210
- }
211
- else {
212
- this.formControl = new FormControl();
213
- }
214
- }
215
- isRequired() {
216
- if (this.ngControl) {
217
- const validator = this.ngControl?.control?.validator?.({});
218
- return this.required || (validator && validator['required']);
219
- }
220
- return this.required;
221
- }
222
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BaseFormInputComponent, deps: [{ token: i1.NgControl }], target: i0.ɵɵFactoryTarget.Component });
223
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: BaseFormInputComponent, isStandalone: true, selector: "ng-component", inputs: { label: "label", required: "required", readonly: "readonly", disabled: "disabled", tooltip: "tooltip", formDisplay: "formDisplay", clearable: "clearable", placeholder: "placeholder", testId: "testId" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }] });
224
- }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BaseFormInputComponent, decorators: [{
226
- type: Component,
227
- args: [{
228
- template: '',
229
- imports: [ReactiveFormsModule]
230
- }]
231
- }], ctorParameters: () => [{ type: i1.NgControl }], propDecorators: { label: [{
232
- type: Input
233
- }], required: [{
234
- type: Input
235
- }], readonly: [{
236
- type: Input
237
- }], disabled: [{
238
- type: Input
239
- }], tooltip: [{
240
- type: Input
241
- }], formDisplay: [{
242
- type: Input
243
- }], clearable: [{
244
- type: Input
245
- }], placeholder: [{
246
- type: Input
247
- }], testId: [{
248
- type: Input
249
- }] } });
250
-
251
- class ScreenSizeService {
252
- isMobileBlock = new BehaviorSubject(false);
253
- prevState = false;
254
- constructor() {
255
- this.checkScreenSize();
256
- window.addEventListener('resize', async () => {
257
- await this.checkScreenSize();
258
- });
259
- }
260
- async checkScreenSize() {
261
- const isMobile = window.matchMedia('(max-width: 768px)').matches;
262
- if (isMobile !== this.prevState) {
263
- this.prevState = isMobile;
264
- this.isMobileBlock.next(isMobile);
265
- }
266
- }
267
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ScreenSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
268
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ScreenSizeService, providedIn: 'root' });
269
- }
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ScreenSizeService, decorators: [{
271
- type: Injectable,
272
- args: [{
273
- providedIn: 'root',
274
- }]
275
- }], ctorParameters: () => [] });
276
-
277
- class DialogService {
278
- showEvent = new EventEmitter();
279
- closeEvent = new EventEmitter();
280
- showDialog(data) {
281
- const mappedData = this.mapInputAndOutpus(data);
282
- this.showEvent.emit({
283
- ...data,
284
- data: mappedData,
285
- });
286
- }
287
- mapInputAndOutpus(data) {
288
- const inputsAndOutputs = data.data;
289
- return {
290
- ...data.data,
291
- ...(Object.keys(inputsAndOutputs ?? {})
292
- .filter((key) => typeof inputsAndOutputs[key] === 'function')
293
- .reduce((acc, key) => {
294
- acc[key] = (value) => {
295
- if (typeof inputsAndOutputs[key] === 'function') {
296
- inputsAndOutputs[key](value);
297
- }
298
- };
299
- return acc;
300
- }, {})),
301
- };
302
- }
303
- closeModal() {
304
- this.closeEvent.emit();
305
- }
306
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
307
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DialogService, providedIn: 'root' });
308
- }
309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DialogService, decorators: [{
310
- type: Injectable,
311
- args: [{
312
- providedIn: 'root',
313
- }]
314
- }], propDecorators: { showEvent: [{
315
- type: Output
316
- }], closeEvent: [{
317
- type: Output
318
- }] } });
319
-
320
- class PreventUnsavedChangesDirective {
321
- dialogService = inject(DialogService);
322
- translateService = inject(TranslateService);
323
- Icons;
324
- canDeactivate(component) {
325
- if (!component || !component.canDeactivate) {
326
- return true;
327
- }
328
- const result = component.canDeactivate();
329
- return result;
330
- }
331
- showConfirmationDialog() {
332
- const resultSubject = new Subject();
333
- const title = this.translateService.instant('VALIDATIONS.UNSAVED_CHANGES');
334
- const message = this.translateService.instant('VALIDATIONS.LEAVING_UNSAVED_FORM');
335
- const leaveButton = this.translateService.instant('BUTTONS.LEAVE');
336
- const stayButton = this.translateService.instant('BUTTONS.STAY');
337
- this.dialogService.showDialog({
338
- title: title,
339
- headerIcon: this.Icons.infoCircle,
340
- innerHTML: `<p>${message}</p>`,
341
- showCancelButton: true,
342
- confirmButtonText: stayButton,
343
- cancelButtonText: leaveButton,
344
- confirmButtonFn: () => {
345
- resultSubject.next(false);
346
- resultSubject.complete();
347
- this.dialogService.closeModal();
348
- },
349
- cancelButtonFn: () => {
350
- resultSubject.next(true);
351
- resultSubject.complete();
352
- this.dialogService.closeModal();
353
- },
354
- });
355
- return resultSubject.asObservable();
356
- }
357
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PreventUnsavedChangesDirective, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
358
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PreventUnsavedChangesDirective, providedIn: 'root' });
359
- }
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PreventUnsavedChangesDirective, decorators: [{
361
- type: Injectable,
362
- args: [{
363
- providedIn: 'root',
364
- }]
365
- }] });
366
-
367
- class TableService {
368
- reload = signal(Symbol(), ...(ngDevMode ? [{ debugName: "reload" }] : []));
369
- /**
370
- * If name is set, reload a specific table with the set`[tableName]`
371
- *
372
- * If name is NOT set, reload all tables in the current DOM
373
- * */
374
- forceReload(name) {
375
- if (name) {
376
- this.reload.set({ name: name, symbol: Symbol() });
377
- }
378
- else {
379
- this.reload.set(Symbol());
380
- }
381
- }
382
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
383
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableService, providedIn: 'root' });
384
- }
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableService, decorators: [{
386
- type: Injectable,
387
- args: [{
388
- providedIn: 'root'
389
- }]
390
- }] });
391
-
392
- class BaseInputControls {
393
- value;
394
- ngControl;
395
- label;
396
- required;
397
- }
398
-
399
- function isFormStateEqual(current, other) {
400
- if (!current && !other) {
401
- return true;
402
- }
403
- if (current && other) {
404
- return current.dirty === other.dirty && current.valid === other.valid;
405
- }
406
- return false;
407
- }
408
-
409
- class BaseFormDirective {
410
- data;
411
- dataChange = new EventEmitter();
412
- statusChange = new EventEmitter();
413
- formSubmit = new EventEmitter();
414
- formClear = new EventEmitter();
415
- formDestroyed$ = new Subject();
416
- keys = [];
417
- formGroup;
418
- cd = inject(ChangeDetectorRef);
419
- valueInitialization = false;
420
- lastState;
421
- guardViewChild;
422
- formSubmitted = false;
423
- guard = inject(PreventUnsavedChangesDirective);
424
- unloadHandler(event) {
425
- if (this.formGroup.dirty) {
426
- event.preventDefault();
427
- }
428
- }
429
- canDeactivate() {
430
- if (this.formGroup.dirty && !this.formSubmitted) {
431
- const result = this.guard.showConfirmationDialog();
432
- return result;
433
- }
434
- return true;
435
- }
436
- ngOnInit() {
437
- this.initializeFormGroup();
438
- }
439
- ngOnChanges(changes) {
440
- if (changes['data'] && this.formGroup) {
441
- this.valueInitialization = true;
442
- const dirty = this.formGroup.dirty;
443
- this.formGroup.patchValue(this.fromModel(this.data), {
444
- emitEvent: false,
445
- onlySelf: true,
446
- });
447
- this.formGroup.updateValueAndValidity();
448
- if (!dirty) {
449
- this.formGroup.markAsPristine();
450
- }
451
- this.valueInitialization = false;
452
- this.createAndEmitIfFormStateChanged();
453
- }
454
- }
455
- ngAfterViewInit() {
456
- this.cd.detectChanges();
457
- }
458
- ngOnDestroy() {
459
- this.formDestroyed$.next();
460
- this.formDestroyed$.complete();
461
- }
462
- createCompleteData() {
463
- const change = this.toModel(this.formGroup?.value);
464
- this.recursiveObjectAttributesTransformation(change);
465
- const updatedData = this.applyChanges(cloneDeep(this.data), cloneDeep(change));
466
- return updatedData;
467
- }
468
- submit() {
469
- this.formSubmitted = true;
470
- this.formGroup.markAllAsTouched();
471
- if (!this.formGroup.invalid) {
472
- this.formSubmit.emit(this.createCompleteData());
473
- }
474
- this.formGroup.markAsPristine();
475
- }
476
- clear() {
477
- this.formClear.emit();
478
- }
479
- initializeFormGroup() {
480
- this.formGroup = this.createFormGroup();
481
- this.valueInitialization = true;
482
- this.formGroup.patchValue(this.fromModel(this.data), {
483
- emitEvent: false,
484
- onlySelf: true,
485
- });
486
- this.formGroup.markAsPristine();
487
- this.initValueChanges();
488
- this.initStatusChanges();
489
- this.valueInitialization = false;
490
- }
491
- initValueChanges() {
492
- this.formGroup.valueChanges
493
- .pipe(takeUntil(this.formDestroyed$), filter(() => !this.valueInitialization), map((value) => {
494
- const change = this.toModel(value);
495
- this.recursiveObjectAttributesTransformation(change);
496
- const updatedData = this.applyChanges(cloneDeep(this.data), cloneDeep(change));
497
- return updatedData;
498
- }))
499
- .subscribe((updatedData) => {
500
- this.dataChange.emit(updatedData);
501
- });
502
- }
503
- initStatusChanges() {
504
- this.formGroup.statusChanges
505
- .pipe(takeUntil(this.formDestroyed$))
506
- .subscribe(() => {
507
- if (!this.valueInitialization) {
508
- this.createAndEmitIfFormStateChanged();
509
- }
510
- });
511
- this.createAndEmitIfFormStateChanged();
512
- }
513
- createAndEmitIfFormStateChanged() {
514
- const formState = {
515
- valid: !this.formGroup.invalid,
516
- dirty: this.formGroup.dirty,
517
- };
518
- if (!isFormStateEqual(formState, this.lastState)) {
519
- this.lastState = formState;
520
- this.statusChange.emit(formState);
521
- }
522
- }
523
- applyChanges(data, changes) {
524
- return Object.assign(data || {}, changes);
525
- }
526
- toModel(data) {
527
- return data || {};
528
- }
529
- fromModel(data) {
530
- return { ...(data || {}) };
531
- }
532
- recursiveObjectAttributesTransformation(obj) {
533
- this.recursiveObjectAttributesTraversal(obj, this.transformEmptyStringToNullStringFn);
534
- }
535
- recursiveObjectAttributesTraversal(obj, transformationFn) {
536
- if (obj === null ||
537
- transformationFn === null ||
538
- typeof transformationFn !== 'function') {
539
- return;
540
- }
541
- const traverse = (obj) => {
542
- for (const key in obj) {
543
- // eslint-disable-next-line no-prototype-builtins
544
- if (obj.hasOwnProperty(key)) {
545
- transformationFn(obj, key);
546
- if (typeof obj[key] === 'object') {
547
- traverse(obj[key]);
548
- }
549
- }
550
- }
551
- };
552
- traverse(obj);
553
- }
554
- transformEmptyStringToNullStringFn(obj, key) {
555
- // if empty string - transformation to null string
556
- if (typeof obj[key] === 'string' && obj[key] === '') {
557
- try {
558
- obj[key] = null;
559
- }
560
- catch (error) {
561
- console.error(`Cannot modify ${key}: ${error}`);
562
- }
563
- }
564
- }
565
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BaseFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
566
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: BaseFormDirective, isStandalone: true, selector: "[v-baseForm]", inputs: { data: "data" }, outputs: { dataChange: "dataChange", statusChange: "statusChange", formSubmit: "formSubmit", formClear: "formClear" }, host: { listeners: { "window:beforeunload": "unloadHandler($event)" } }, usesOnChanges: true, ngImport: i0 });
567
- }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BaseFormDirective, decorators: [{
569
- type: Directive,
570
- args: [{
571
- // eslint-disable-next-line @angular-eslint/directive-selector
572
- selector: '[v-baseForm]',
573
- standalone: true,
574
- }]
575
- }], propDecorators: { data: [{
576
- type: Input
577
- }], dataChange: [{
578
- type: Output
579
- }], statusChange: [{
580
- type: Output
581
- }], formSubmit: [{
582
- type: Output
583
- }], formClear: [{
584
- type: Output
585
- }], unloadHandler: [{
586
- type: HostListener,
587
- args: ['window:beforeunload', ['$event']]
588
- }] } });
589
-
590
- class UnsubscribeComponent {
591
- destroyed$ = new Subject();
592
- ngOnDestroy() {
593
- this.destroyed$.next();
594
- this.destroyed$.complete();
595
- }
596
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: UnsubscribeComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
597
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: UnsubscribeComponent, isStandalone: true, ngImport: i0 });
598
- }
599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: UnsubscribeComponent, decorators: [{
600
- type: Directive
601
- }] });
602
-
603
- class DetailStoreDirective extends UnsubscribeComponent {
604
- form;
605
- detailsRepository;
606
- autoBind = true;
607
- detailId;
608
- ngrxFeatureKey;
609
- destroyForm = true;
610
- readonly = false;
611
- readonlyControlNames = [];
612
- store = inject(Store);
613
- cdr = inject(ChangeDetectorRef);
614
- route = inject(ActivatedRoute);
615
- itemCache = null;
616
- loaded;
617
- ngOnInit() {
618
- if (!this.loaded) {
619
- this.listenFormState();
620
- }
621
- this.listenFormChange();
622
- this.listenFormStatusChange();
623
- }
624
- ngAfterViewInit() {
625
- if (this.autoBind && !this.loaded) {
626
- this.initForm();
627
- }
628
- }
629
- ngOnDestroy() {
630
- super.ngOnDestroy();
631
- if (this.destroyForm) {
632
- this.store.dispatch(createResetStateAction(this.detailsRepository)());
633
- }
634
- }
635
- initForm() {
636
- if (this.detailId === 'create') {
637
- this.store.dispatch(createInitNewDetailAction(this.detailsRepository)());
638
- }
639
- else {
640
- this.store.dispatch(createInitDetailAction(this.detailsRepository)({ obj: this.detailId }));
641
- }
642
- if (this.readonly) {
643
- this.form.formGroup.disable();
644
- return;
645
- }
646
- this.readonlyControlNames.forEach(x => {
647
- this.form.formGroup.get(x)?.disable();
648
- });
649
- }
650
- listenFormState() {
651
- const selectIncomeData = createSelector(createFeatureSelector(this.ngrxFeatureKey), (state) => state?.[this.detailsRepository]);
652
- this.store
653
- .select(selectIncomeData)
654
- .pipe(takeUntil(this.destroyed$))
655
- .subscribe(({ item, loaded, backendValidationErrors } = {
656
- item: undefined,
657
- loaded: false,
658
- saveItemState: { saveInProgress: false },
659
- backendValidationErrors: []
660
- }) => {
661
- if (item
662
- && ((item.validationErrors || item.validationWarnings) && !this.form.formGroup.dirty)
663
- || backendValidationErrors.length) {
664
- this.handleValidation('propertyName', item.validationWarnings || [], 'validationWarning', 'warningMessage');
665
- this.handleValidation('propertyName', item.validationErrors || [], 'validationError', 'errorMessage');
666
- if (this.itemCache && this.isStateChanged(item) && backendValidationErrors.length) {
667
- backendValidationErrors = this.dispatchErrors(item, backendValidationErrors);
668
- }
669
- this.handleBackendValidation(backendValidationErrors);
670
- this.cdr.markForCheck();
671
- }
672
- this.itemCache = item;
673
- this.loaded = loaded;
674
- this.cdr.detectChanges();
675
- });
676
- }
677
- listenFormChange() {
678
- this.form.dataChange.pipe(takeUntil(this.destroyed$)).subscribe((item) => {
679
- this.store.dispatch(createUpdateDetailAction(this.detailsRepository)({ item }));
680
- });
681
- }
682
- listenFormStatusChange() {
683
- this.form.statusChange
684
- .pipe(takeUntil(this.destroyed$))
685
- .subscribe((formState) => {
686
- this.store.dispatch(createUpdateFormStateAction(this.detailsRepository)({ formState }));
687
- });
688
- }
689
- handleValidation = (controlName, errors, errorKey, messageKey) => {
690
- if (errors.length > 0)
691
- return;
692
- errors.forEach((error) => {
693
- const control = this.form.formGroup.get(error[controlName]);
694
- if (control) {
695
- control.disabled
696
- ? control.disable({ emitEvent: false, onlySelf: true })
697
- : control.enable({ emitEvent: false, onlySelf: true });
698
- control.setErrors({ [errorKey]: error[messageKey] }, { emitEvent: true });
699
- control.markAsDirty();
700
- }
701
- });
702
- };
703
- handleBackendValidation(errors) {
704
- errors.forEach(({ parameters, code }) => {
705
- const control = this.form.formGroup.get(this.normalizePropertyNames(parameters));
706
- if (!control)
707
- return;
708
- control[control.disabled ? "disable" : "enable"]({ emitEvent: false, onlySelf: true });
709
- control.setErrors({ "validationError": code }, { emitEvent: true });
710
- control.markAsDirty();
711
- });
712
- }
713
- dispatchErrors(item, errors) {
714
- const error = errors.filter((e) => {
715
- return this.itemCache[this.normalizePropertyNames(e.parameters)] === item[this.normalizePropertyNames(e.parameters)];
716
- });
717
- this.store.dispatch(createUpdateDetailSetErrorsAction(this.detailsRepository)({ error }));
718
- return error;
719
- }
720
- normalizePropertyNames(input) {
721
- return String(input[0]).toLocaleLowerCase() + String(input).slice(1);
722
- }
723
- isStateChanged(item) {
724
- return item !== this.itemCache;
725
- }
726
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DetailStoreDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
727
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: DetailStoreDirective, isStandalone: true, selector: "[v-useDetailStore]", inputs: { form: "form", detailsRepository: "detailsRepository", autoBind: "autoBind", detailId: "detailId", ngrxFeatureKey: "ngrxFeatureKey", destroyForm: "destroyForm", readonly: "readonly", readonlyControlNames: "readonlyControlNames" }, exportAs: ["useDetailStore"], usesInheritance: true, ngImport: i0 });
728
- }
729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DetailStoreDirective, decorators: [{
730
- type: Directive,
731
- args: [{
732
- // eslint-disable-next-line @angular-eslint/directive-selector
733
- selector: '[v-useDetailStore]',
734
- exportAs: 'useDetailStore',
735
- standalone: true,
736
- }]
737
- }], propDecorators: { form: [{
738
- type: Input,
739
- args: [{ required: true }]
740
- }], detailsRepository: [{
741
- type: Input,
742
- args: [{ required: true }]
743
- }], autoBind: [{
744
- type: Input
745
- }], detailId: [{
746
- type: Input
747
- }], ngrxFeatureKey: [{
748
- type: Input,
749
- args: [{ required: true }]
750
- }], destroyForm: [{
751
- type: Input
752
- }], readonly: [{
753
- type: Input
754
- }], readonlyControlNames: [{
755
- type: Input
756
- }] } });
757
-
758
- const BREADCRUMB_COMPONENT_TOKEN = new InjectionToken('BreadcrumbComponentToken');
759
-
760
- class BreadcrumbService {
761
- routeChange = new EventEmitter();
762
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
763
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbService, providedIn: 'root' });
764
- }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbService, decorators: [{
766
- type: Injectable,
767
- args: [{
768
- providedIn: 'root',
769
- }]
770
- }], propDecorators: { routeChange: [{
771
- type: Output
772
- }] } });
773
-
774
- class BreadcrumbCoreComponent extends UnsubscribeComponent {
775
- items = [];
776
- homeRoute = '/';
777
- useHomeRoute = false;
778
- static ROUTE_DATA_BREADCRUMB = 'breadcrumb';
779
- static ROUTE_DATA_BREADCRUMB_URL = 'breadcrumb_url';
780
- static ROUTE_DATA_NO_BREADCRUMB_ROUTE = 'breadcrumb_no_route';
781
- static BREADCRUMB_HIDE = 'breadcrumb_hide';
782
- home = { icon: 'pi pi-home', routerLink: this.homeRoute };
783
- router = inject(Router);
784
- activatedRoute = inject(ActivatedRoute);
785
- breadcrumbService = inject(BreadcrumbService);
786
- cdr = inject(ChangeDetectorRef);
787
- ngOnInit() {
788
- this.initBreadcrumbsCreation();
789
- this.initRouteChangeListen();
790
- }
791
- initBreadcrumbsCreation() {
792
- this.router.events
793
- .pipe(filter((event) => event instanceof NavigationEnd), takeUntil(this.destroyed$))
794
- .subscribe(() => (this.items = this.createBreadcrumbs(this.activatedRoute.root)));
795
- }
796
- initRouteChangeListen() {
797
- this.breadcrumbService.routeChange
798
- .pipe(filter((x) => x.label !== 'Undefined'), takeUntil(this.destroyed$))
799
- .subscribe((x) => {
800
- this.items = [
801
- ...this.items,
802
- {
803
- label: x.label,
804
- routerLink: x.routerLink,
805
- url: x.url,
806
- class: 'breadcrumb',
807
- },
808
- ];
809
- this.cdr.detectChanges();
810
- });
811
- }
812
- createBreadcrumbs(route, routerLink = '', breadcrumbs = []) {
813
- const children = route.children;
814
- if (children.length === 0) {
815
- return breadcrumbs;
816
- }
817
- for (const child of children) {
818
- const routeURL = child.snapshot.url
819
- .map((segment) => segment.path)
820
- .join('/');
821
- if (!child.snapshot.data[BreadcrumbCoreComponent.BREADCRUMB_HIDE]) {
822
- if (BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL !== undefined) {
823
- const route = child.snapshot.data[BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL];
824
- routerLink += `/${route}`;
825
- }
826
- if (!BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL && routeURL !== '') {
827
- routerLink += `/${routeURL}`;
828
- }
829
- const label = child.snapshot.data[BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB];
830
- if (label &&
831
- BreadcrumbCoreComponent.ROUTE_DATA_NO_BREADCRUMB_ROUTE &&
832
- child.snapshot.data[BreadcrumbCoreComponent.ROUTE_DATA_NO_BREADCRUMB_ROUTE]) {
833
- breadcrumbs.push({ label, routerLink: undefined });
834
- }
835
- else if (label && child.snapshot.routeConfig?.path !== '') {
836
- breadcrumbs.push({ label, routerLink: routerLink });
837
- }
838
- }
839
- return this.createBreadcrumbs(child, routerLink, breadcrumbs);
840
- }
841
- }
842
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbCoreComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
843
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: BreadcrumbCoreComponent, isStandalone: true, inputs: { items: "items", homeRoute: "homeRoute", useHomeRoute: "useHomeRoute" }, usesInheritance: true, ngImport: i0 });
844
- }
845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbCoreComponent, decorators: [{
846
- type: Directive,
847
- args: [{}]
848
- }], propDecorators: { items: [{
849
- type: Input
850
- }], homeRoute: [{
851
- type: Input
852
- }], useHomeRoute: [{
853
- type: Input
854
- }] } });
855
-
856
- const BUTTON_COMPONENT_TOKEN = new InjectionToken('ButtonComponentToken');
857
-
858
- const DROPDOWN_BUTTON_COMPONENT_TOKEN = new InjectionToken('DropdownButtonComponentToken');
859
-
860
- const CALENDAR_COMPONENT_TOKEN = new InjectionToken('CalendarComponentToken');
861
-
862
- const CHECKBOX_COMPONENT_TOKEN = new InjectionToken('CheckboxComponentToken');
863
-
864
- const CONFIRM_DIALOG_COMPONENT_TOKEN = new InjectionToken('ConfirmDialogComponentToken');
865
-
866
- const DROPDOWN_COMPONENT_TOKEN = new InjectionToken('DropdownComponentToken');
867
-
868
- const FILTER_COMPONENT_TOKEN = new InjectionToken('FilterComponentToken');
869
-
870
- const FORM_FIELD_COMPONENT_TOKEN = new InjectionToken('FormFieldComponentToken');
871
-
872
- const GENERIC_FIELD_COMPONENT_TOKEN = new InjectionToken('GenericFieldComponentToken');
873
-
874
- var GenericFieldType;
875
- (function (GenericFieldType) {
876
- GenericFieldType["dropdown"] = "dropdown";
877
- GenericFieldType["checkbox"] = "checkbox";
878
- GenericFieldType["simplecheckbox"] = "simplecheckbox";
879
- GenericFieldType["calendar"] = "calendar";
880
- GenericFieldType["multiselect"] = "multiselect";
881
- GenericFieldType["text"] = "text";
882
- })(GenericFieldType || (GenericFieldType = {}));
883
-
884
- const HEADER_COMPONENT_TOKEN = new InjectionToken('HeaderComponentToken');
885
- const SETTINGS_MENU = new InjectionToken('SETTINGS_MENU');
886
-
887
- const INPUT_GROUP_COMPONENT_TOKEN = new InjectionToken('HeaderComponentToken');
888
-
889
- const LOADER_COMPONENT_TOKEN = new InjectionToken('LoaderComponentToken');
890
-
891
- const MULTISELECT_COMPONENT_TOKEN = new InjectionToken('MultiselectComponentToken');
892
-
893
- const NUMBER_INPUT_COMPONENT_TOKEN = new InjectionToken('NumberInputComponentToken');
894
-
895
- const PAGE_HEADER_COMPONENT_TOKEN = new InjectionToken('PageHeaderComponentToken');
896
-
897
- class PageHeaderService {
898
- pageHeader = new EventEmitter();
899
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
900
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderService, providedIn: 'root' });
901
- }
902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderService, decorators: [{
903
- type: Injectable,
904
- args: [{
905
- providedIn: 'root',
906
- }]
907
- }], propDecorators: { pageHeader: [{
908
- type: Output
909
- }] } });
910
-
911
- class PageHeaderCoreComponent extends UnsubscribeComponent {
912
- router;
913
- cdr;
914
- headerService;
915
- title;
916
- subtitle;
917
- showBackButton;
918
- size = FieldSize.small;
919
- constructor(router, cdr, headerService) {
920
- super();
921
- this.router = router;
922
- this.cdr = cdr;
923
- this.headerService = headerService;
924
- }
925
- ngOnInit() {
926
- this.headerService.pageHeader
927
- .pipe(takeUntil(this.destroyed$))
928
- .subscribe((x) => {
929
- this.title = x.title;
930
- this.subtitle = x.subtitle;
931
- this.showBackButton = x.showBackButton ?? false;
932
- this.cdr.detectChanges();
933
- });
934
- }
935
- locationBack() {
936
- history.back();
937
- }
938
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderCoreComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: PageHeaderService }], target: i0.ɵɵFactoryTarget.Directive });
939
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: PageHeaderCoreComponent, isStandalone: true, inputs: { title: "title", subtitle: "subtitle", showBackButton: "showBackButton", size: "size" }, usesInheritance: true, ngImport: i0 });
940
- }
941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderCoreComponent, decorators: [{
942
- type: Directive,
943
- args: [{}]
944
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: PageHeaderService }], propDecorators: { title: [{
945
- type: Input
946
- }], subtitle: [{
947
- type: Input
948
- }], showBackButton: [{
949
- type: Input
950
- }], size: [{
951
- type: Input
952
- }] } });
953
-
954
- const PASSWORD_COMPONENT_TOKEN = new InjectionToken('PasswordComponentToken');
955
- var PasswordStrength;
956
- (function (PasswordStrength) {
957
- PasswordStrength[PasswordStrength["None"] = 0] = "None";
958
- PasswordStrength[PasswordStrength["Low"] = 1] = "Low";
959
- PasswordStrength[PasswordStrength["Medium"] = 2] = "Medium";
960
- PasswordStrength[PasswordStrength["High"] = 3] = "High";
961
- PasswordStrength[PasswordStrength["Superb"] = 4] = "Superb";
962
- })(PasswordStrength || (PasswordStrength = {}));
963
-
964
- const RADIOBUTTON_COMPONENT_TOKEN = new InjectionToken('RadiobuttonComponentToken');
965
-
966
- const SECTION_COMPONENT_TOKEN = new InjectionToken('SectionComponentToken');
967
-
968
- const MENU_TOKEN = new InjectionToken('MENU');
969
- const LOGO_ROUTER_ROUTE = new InjectionToken('LOGO_ROUTER_ROUTE');
970
- const SIDE_MENU_COMPONENT_TOKEN = new InjectionToken('SideMenuComponentToken');
971
- const SIDE_MENU_STATE_TOKEN = new InjectionToken('SideMenuStateToken');
972
-
973
- class SideMenuService {
974
- _menuItems = new BehaviorSubject([]);
975
- stateToken = inject(SIDE_MENU_STATE_TOKEN);
976
- menuItems$ = this._menuItems.asObservable();
977
- menuMinimalized = false;
978
- setMenu(items) {
979
- this.resetSidemenuState(items);
980
- this._menuItems.next(items);
981
- }
982
- saveMinimalizedState(minimalized) {
983
- this.stateToken.minimalized = minimalized;
984
- localStorage.setItem('SideMenuStateToken', JSON.stringify(this.stateToken));
985
- }
986
- saveExpandedState(item) {
987
- const expanded = this.stateToken.expanded?.find((i) => i === item.label);
988
- if (!expanded) {
989
- this.stateToken.expanded?.push(item.label);
990
- localStorage.setItem('SideMenuStateToken', JSON.stringify(this.stateToken));
991
- return;
992
- }
993
- this.stateToken.expanded = this.stateToken.expanded?.filter((i) => i !== item.label);
994
- localStorage.setItem('SideMenuStateToken', JSON.stringify(this.stateToken));
995
- }
996
- resetSidemenuState(items) {
997
- if (typeof this.stateToken === 'string') {
998
- this.stateToken = JSON.parse(this.stateToken);
999
- }
1000
- this.menuMinimalized = this.stateToken.minimalized;
1001
- const localStorageValue = this.stateToken.expanded;
1002
- if (!localStorageValue)
1003
- return;
1004
- if (items) {
1005
- for (let index = 0; index < items.length; index++) {
1006
- const element = items[index];
1007
- element.expanded = !!localStorageValue.find((i) => i === element.label);
1008
- }
1009
- }
1010
- }
1011
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1012
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuService, providedIn: 'root' });
1013
- }
1014
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuService, decorators: [{
1015
- type: Injectable,
1016
- args: [{ providedIn: 'root' }]
1017
- }] });
1018
-
1019
- class SideMenuProviderService {
1020
- menu;
1021
- menuService;
1022
- constructor(menu = [], menuService) {
1023
- this.menu = menu;
1024
- this.menuService = menuService;
1025
- menuService.setMenu(menu);
1026
- }
1027
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuProviderService, deps: [{ token: MENU_TOKEN, optional: true }, { token: SideMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
1028
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuProviderService });
1029
- }
1030
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuProviderService, decorators: [{
1031
- type: Injectable
1032
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1033
- type: Optional
1034
- }, {
1035
- type: Inject,
1036
- args: [MENU_TOKEN]
1037
- }] }, { type: SideMenuService }] });
1038
-
1039
- class MenuServiceDirective extends UnsubscribeComponent {
1040
- menuService = inject(SideMenuService);
1041
- cdr = inject(ChangeDetectorRef);
1042
- sideMenu = inject(SIDE_MENU_COMPONENT_TOKEN);
1043
- ngAfterViewInit() {
1044
- this.menuService.menuItems$.pipe(takeUntil(this.destroyed$)).subscribe((items) => {
1045
- if (this.sideMenu) {
1046
- this.sideMenu.items = items;
1047
- }
1048
- });
1049
- this.cdr.detectChanges();
1050
- }
1051
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MenuServiceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1052
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: MenuServiceDirective, isStandalone: true, selector: "v-side-menu[useMenuService]", exportAs: ["useMenuService"], usesInheritance: true, ngImport: i0 });
1053
- }
1054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MenuServiceDirective, decorators: [{
1055
- type: Directive,
1056
- args: [{
1057
- // eslint-disable-next-line @angular-eslint/directive-selector
1058
- selector: 'v-side-menu[useMenuService]',
1059
- exportAs: 'useMenuService',
1060
- standalone: true,
1061
- }]
1062
- }] });
1063
-
1064
- const SLIDER_COMPONENT_TOKEN = new InjectionToken('SliderComponentToken');
1065
-
1066
- const SNACKBAR_COMPONENT_TOKEN = new InjectionToken('SnackbarComponentToken');
1067
-
1068
- const STEPPER_COMPONENT_TOKEN = new InjectionToken('StepperComponentToken');
1069
-
1070
- const SWITCH_COMPONENT_TOKEN = new InjectionToken('SwitchComponentToken');
1071
-
1072
- const TAB_VIEW_COMPONENT_TOKEN = new InjectionToken('TabVIewComponentToken');
1073
-
1074
- const TABLE_COMPONENT_TOKEN = new InjectionToken('TabVIewComponentToken');
1075
- const TABLE_COLUMN_PROVIDER = new InjectionToken('TABLE_COLUMN_PROVIDER');
1076
- var TableSelectionMode;
1077
- (function (TableSelectionMode) {
1078
- TableSelectionMode["single"] = "single";
1079
- TableSelectionMode["multiple"] = "multiple";
1080
- })(TableSelectionMode || (TableSelectionMode = {}));
1081
- var TableButtonSeverity;
1082
- (function (TableButtonSeverity) {
1083
- TableButtonSeverity["success"] = "success";
1084
- TableButtonSeverity["info"] = "info";
1085
- TableButtonSeverity["warning"] = "warning";
1086
- TableButtonSeverity["danger"] = "danger";
1087
- TableButtonSeverity["help"] = "help";
1088
- TableButtonSeverity["primary"] = "primary";
1089
- TableButtonSeverity["secondary"] = "secondary";
1090
- TableButtonSeverity["contrast"] = "contrast";
1091
- })(TableButtonSeverity || (TableButtonSeverity = {}));
1092
- var ColumnVisibility;
1093
- (function (ColumnVisibility) {
1094
- ColumnVisibility["visible"] = "visible";
1095
- ColumnVisibility["hidden"] = "hidden";
1096
- ColumnVisibility["default"] = "default";
1097
- })(ColumnVisibility || (ColumnVisibility = {}));
1098
- function LinkRenderer(text, href) {
1099
- return (row, index) => {
1100
- return '<a href="' + href + '">' + text + '</a>';
1101
- };
1102
- }
1103
- function routerRenderer(link, text) {
1104
- return (row, index) => {
1105
- return { text: text, link: link };
1106
- };
1107
- }
1108
- function Renderer(fnc) {
1109
- return (row) => {
1110
- return fnc(row);
1111
- };
1112
- }
1113
- class ColumnModel {
1114
- configuration;
1115
- sortDirection = undefined;
1116
- columnClass;
1117
- queryParams;
1118
- routerLink;
1119
- valueGetter;
1120
- headerGetter;
1121
- template;
1122
- actions;
1123
- sortable;
1124
- id;
1125
- // eslint-disable-next-line @typescript-eslint/ban-types
1126
- format;
1127
- textAlign;
1128
- width;
1129
- forceVisibility = ColumnVisibility.default;
1130
- visible = true;
1131
- constructor(configuration) {
1132
- this.configuration = configuration;
1133
- this.id = this.configuration.id;
1134
- if (this.configuration.format) {
1135
- this.format = this.configuration.format;
1136
- }
1137
- if (this.configuration.value) {
1138
- this.valueGetter = (row, index) => {
1139
- const value = this.configuration.value?.(row, index) ?? '-';
1140
- return this.format ? this.format(value, row) : value;
1141
- };
1142
- }
1143
- else {
1144
- this.valueGetter = (row) => {
1145
- const value = (row?.[this.configuration.id]) ?? '';
1146
- return this.format ? this.format(value, row) : value;
1147
- };
1148
- }
1149
- if (this.configuration.actions) {
1150
- this.actions = this.configuration.actions;
1151
- }
1152
- if (this.configuration.routerLink) {
1153
- this.routerLink = this.configuration.routerLink;
1154
- }
1155
- if (this.configuration.columnClass) {
1156
- this.columnClass = this.configuration.columnClass;
1157
- }
1158
- if (this.configuration.template) {
1159
- this.template = this.configuration.template;
1160
- }
1161
- if (this.configuration.headerName) {
1162
- this.headerGetter = (typeof this.configuration.headerName === 'string'
1163
- ? () => this.configuration.headerName ?? ''
1164
- : (columnId, index) => (this.configuration.headerName)?.(columnId, index) ?? this.id);
1165
- }
1166
- else {
1167
- this.headerGetter = () => "";
1168
- }
1169
- if (this.configuration.queryParams) {
1170
- this.queryParams = this.configuration.queryParams;
1171
- }
1172
- if (this.routerLink) {
1173
- this.columnClass += ' ' + 'link';
1174
- }
1175
- if (this.configuration.sortable !== undefined) {
1176
- this.sortable = this.configuration.sortable;
1177
- }
1178
- else {
1179
- this.sortable = true;
1180
- }
1181
- if (this.configuration.width) {
1182
- this.width = typeof this.configuration.width === "number" ? this.configuration.width + 'px' : this.configuration.width;
1183
- }
1184
- if (this.configuration.textAlign !== undefined) {
1185
- this.textAlign = this.configuration.textAlign;
1186
- }
1187
- if (this.configuration.forceVisibility) {
1188
- this.forceVisibility = this.configuration.forceVisibility;
1189
- }
1190
- if (this.configuration.visible !== undefined) {
1191
- this.visible = this.configuration.visible;
1192
- }
1193
- }
1194
- }
1195
- class RowModel {
1196
- row;
1197
- index;
1198
- id;
1199
- selected;
1200
- marked;
1201
- focused;
1202
- expanded;
1203
- fnc;
1204
- customRoute;
1205
- constructor(row, selected, expanded, marked, index, fnc, customRoute, entityKey) {
1206
- this.row = row;
1207
- this.id = row['id'] ?? v4();
1208
- this.index = index;
1209
- this.selected = selected;
1210
- this.expanded = expanded;
1211
- this.marked = marked;
1212
- this.fnc = fnc;
1213
- this.customRoute = createCustomRoute(row, entityKey, customRoute);
1214
- }
1215
- }
1216
- function createCustomRoute(row, entityKey, customRoute) {
1217
- return customRoute && entityKey
1218
- ? `${customRoute}/` + row[entityKey]
1219
- : undefined;
1220
- }
1221
-
1222
- class TableColumnDirective {
1223
- template;
1224
- index = 0;
1225
- id;
1226
- columnClass;
1227
- sortable;
1228
- routerLink;
1229
- queryParams;
1230
- headerName;
1231
- width;
1232
- textAlign = FieldAlign.left;
1233
- format;
1234
- forceVisibility = ColumnVisibility.default;
1235
- visible = true;
1236
- getDefinition() {
1237
- return {
1238
- id: this.id,
1239
- columnClass: this.columnClass,
1240
- template: this.template,
1241
- headerName: this.headerName,
1242
- routerLink: this.routerLink,
1243
- queryParams: this.queryParams,
1244
- sortable: this.sortable,
1245
- width: this.width,
1246
- format: this.format,
1247
- textAlign: this.textAlign,
1248
- forceVisibility: this.forceVisibility,
1249
- visible: this.visible,
1250
- };
1251
- }
1252
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1253
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: TableColumnDirective, isStandalone: true, selector: "v-table-column", inputs: { index: "index", id: "id", columnClass: "columnClass", sortable: "sortable", routerLink: "routerLink", queryParams: "queryParams", headerName: "headerName", width: "width", textAlign: "textAlign", format: "format", forceVisibility: "forceVisibility", visible: "visible" }, providers: [
1254
- {
1255
- provide: TABLE_COLUMN_PROVIDER,
1256
- useExisting: TableColumnDirective,
1257
- multi: true,
1258
- },
1259
- ], queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });
1260
- }
1261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableColumnDirective, decorators: [{
1262
- type: Directive,
1263
- args: [{
1264
- // eslint-disable-next-line @angular-eslint/directive-selector
1265
- selector: 'v-table-column',
1266
- standalone: true,
1267
- providers: [
1268
- {
1269
- provide: TABLE_COLUMN_PROVIDER,
1270
- useExisting: TableColumnDirective,
1271
- multi: true,
1272
- },
1273
- ],
1274
- }]
1275
- }], propDecorators: { template: [{
1276
- type: ContentChild,
1277
- args: [TemplateRef]
1278
- }], index: [{
1279
- type: Input
1280
- }], id: [{
1281
- type: Input
1282
- }], columnClass: [{
1283
- type: Input
1284
- }], sortable: [{
1285
- type: Input
1286
- }], routerLink: [{
1287
- type: Input
1288
- }], queryParams: [{
1289
- type: Input
1290
- }], headerName: [{
1291
- type: Input
1292
- }], width: [{
1293
- type: Input
1294
- }], textAlign: [{
1295
- type: Input
1296
- }], format: [{
1297
- type: Input
1298
- }], forceVisibility: [{
1299
- type: Input
1300
- }], visible: [{
1301
- type: Input
1302
- }] } });
1303
-
1304
- class ColumnConfiguration {
1305
- id;
1306
- column = {};
1307
- constructor(id) {
1308
- this.id = id;
1309
- this.column.id = id;
1310
- }
1311
- headerName(headerName) {
1312
- this.column.headerName = headerName;
1313
- return this;
1314
- }
1315
- sortable(sortable) {
1316
- this.column.sortable = sortable;
1317
- return this;
1318
- }
1319
- columnClass(columnClass) {
1320
- this.column.columnClass = columnClass;
1321
- return this;
1322
- }
1323
- valueFunction(value) {
1324
- this.column.value = value;
1325
- return this;
1326
- }
1327
- type(type) {
1328
- this.column.type = type;
1329
- return this;
1330
- }
1331
- build() {
1332
- return this.column;
1333
- }
1334
- }
1335
-
1336
- class TableBuilder {
1337
- columns = [];
1338
- addColumn(id, config) {
1339
- const columnConfig = new ColumnConfiguration(id);
1340
- config?.(columnConfig);
1341
- this.columns.push(columnConfig.build());
1342
- return this;
1343
- }
1344
- addTextColumn(id, config) {
1345
- return this.addColumn(id, (x) => {
1346
- config?.(x);
1347
- x.type('text');
1348
- });
1349
- }
1350
- addNumberColumn(id, config) {
1351
- return this.addColumn(id, (x) => {
1352
- config?.(x);
1353
- x.type('number').columnClass('text-end');
1354
- });
1355
- }
1356
- addDateColumn(id, config) {
1357
- return this.addColumn(id, (x) => {
1358
- config?.(x);
1359
- x.type('date').valueFunction((row) => covertFromDateToUserLocale(row, id));
1360
- });
1361
- }
1362
- addBooleanColumn(id, config) {
1363
- return this.addColumn(id, (x) => {
1364
- config?.(x);
1365
- x.type('boolean');
1366
- });
1367
- }
1368
- addEnumColumn(id, config) {
1369
- return this.addColumn(id, (x) => {
1370
- config?.(x);
1371
- x.type('enum');
1372
- });
1373
- }
1374
- build() {
1375
- return this.columns;
1376
- }
1377
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1378
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableBuilder, providedIn: 'root' });
1379
- }
1380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableBuilder, decorators: [{
1381
- type: Injectable,
1382
- args: [{
1383
- providedIn: 'root',
1384
- }]
1385
- }] });
1386
- function covertFromDateToUserLocale(row, id) {
1387
- const value = row[id];
1388
- if (value === undefined) {
1389
- return '';
1390
- }
1391
- const locale = navigator.language;
1392
- if (value instanceof Date) {
1393
- return value.toLocaleDateString(locale);
1394
- }
1395
- if (typeof value === 'string' && !isNaN(Date.parse(value))) {
1396
- return new Date(value).toLocaleDateString(locale);
1397
- }
1398
- return value;
1399
- }
1400
-
1401
- const TABLE_FILTER_COMPONENT_TOKEN = new InjectionToken('TableFilterComponentToken');
1402
-
1403
- const TEXTAREA_COMPONENT_TOKEN = new InjectionToken('TextareaComponentToken');
1404
-
1405
- const TEXTFIELD_COMPONENT_TOKEN = new InjectionToken('TextfieldComponentToken');
1406
-
1407
- const TOOLTIP_COMPONENT_TOKEN = new InjectionToken('TooltipComponentToken');
1408
-
1409
- const ICONS_COMPONENT_TOKEN = new InjectionToken('IconsComponentToken');
1410
-
1411
- class IconsComponent {
1412
- name;
1413
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1414
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: IconsComponent, isStandalone: true, selector: "ng-component", inputs: { name: "name" }, providers: [
1415
- {
1416
- provide: ICONS_COMPONENT_TOKEN,
1417
- useExisting: IconsComponent
1418
- }
1419
- ], ngImport: i0, template: '', isInline: true });
1420
- }
1421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconsComponent, decorators: [{
1422
- type: Component,
1423
- args: [{
1424
- standalone: true,
1425
- template: '',
1426
- providers: [
1427
- {
1428
- provide: ICONS_COMPONENT_TOKEN,
1429
- useExisting: IconsComponent
1430
- }
1431
- ]
1432
- }]
1433
- }], propDecorators: { name: [{
1434
- type: Input
1435
- }] } });
1436
-
1437
- class DatasourceDirective extends UnsubscribeComponent {
1438
- datasource;
1439
- autoBind = true;
1440
- loadingText = '... loading ...';
1441
- filterField = 'fulltext';
1442
- transformFn;
1443
- extraFilter;
1444
- get activeComponent() {
1445
- return (this.dropdownComponent ??
1446
- this.multiSelectComponent ??
1447
- this.genericField);
1448
- }
1449
- httpClient = inject(HttpClient);
1450
- baseUrl = inject(BASE_URL_PATH);
1451
- changeDetectorRef = inject(ChangeDetectorRef);
1452
- isAllDataLoaded = false;
1453
- parameters$ = new BehaviorSubject({});
1454
- lastParameter = {};
1455
- dropdownComponent = inject(DROPDOWN_COMPONENT_TOKEN, { optional: true });
1456
- multiSelectComponent = inject(MULTISELECT_COMPONENT_TOKEN, {
1457
- optional: true,
1458
- });
1459
- genericField = inject(GENERIC_FIELD_COMPONENT_TOKEN, { optional: true });
1460
- dataSourceService;
1461
- loadingPlaceholderItem = {};
1462
- ngOnInit() {
1463
- this.activeComponent.showed
1464
- .pipe(takeUntil(this.destroyed$))
1465
- .subscribe(() => {
1466
- if (!this.autoBind &&
1467
- !this.activeComponent.options &&
1468
- !this.activeComponent.loading) {
1469
- this.parameters$.next({});
1470
- }
1471
- });
1472
- this.activeComponent.lazyLoad
1473
- .pipe(takeUntil(this.destroyed$))
1474
- .subscribe((value) => {
1475
- this.parameters$.next({ offset: value?.offset, limit: value?.limit });
1476
- });
1477
- this.activeComponent.filtered
1478
- .pipe(takeUntil(this.destroyed$))
1479
- .subscribe((value) => {
1480
- const property = this.filterField ?? this.activeComponent.optionLabel;
1481
- if (property) {
1482
- this.parameters$.next({
1483
- offset: 0,
1484
- filter: {
1485
- [property]: value.filter ? value.filter : undefined,
1486
- ...(this.extraFilter ?? {})
1487
- },
1488
- useNewData: true,
1489
- });
1490
- }
1491
- });
1492
- this.parameters$
1493
- .pipe(takeUntil(this.destroyed$), filter(request => !this.isDataForRequestLoaded(request)), map((request) => {
1494
- const extendedParams = normalizeRequest({ ...this.lastParameter, ...request }, DEFAULT_SEARCH_LIMIT);
1495
- extendedParams.useNewData = request.useNewData ?? false;
1496
- return extendedParams;
1497
- }), tap((request) => {
1498
- this.lastParameter = request;
1499
- }), debounceTime(DEFAULT_DEBOUNCE_TIME), tap(() => {
1500
- this.changeComponent(this.activeComponent, {
1501
- loading: true,
1502
- });
1503
- }), switchMap((request) => this.dataSourceService
1504
- ? this.dataSourceService(request).pipe(map((response) => ({ request, response })))
1505
- : of({
1506
- request,
1507
- response: {
1508
- data: [],
1509
- total: 0,
1510
- limit: request.limit,
1511
- offset: request.offset,
1512
- },
1513
- })), catchError((request) => {
1514
- this.changeComponent(this.activeComponent, {
1515
- loading: false,
1516
- });
1517
- return of({
1518
- request: request,
1519
- response: {
1520
- data: [],
1521
- total: 0,
1522
- limit: request.limit,
1523
- offset: request.offset,
1524
- },
1525
- });
1526
- }))
1527
- .subscribe(({ request, response }) => this.setDataToControl(request, response));
1528
- }
1529
- ngOnChanges(changes) {
1530
- if (changes['datasource']) {
1531
- this.dataSourceService = convertDatasource(this.datasource, this.baseUrl, this.httpClient);
1532
- if (this.autoBind) {
1533
- this.parameters$.next({ offset: 0 });
1534
- }
1535
- }
1536
- }
1537
- isDataForRequestLoaded(request) {
1538
- if (request.useNewData) {
1539
- return false;
1540
- }
1541
- const offset = request.offset ?? 0;
1542
- const limit = request.limit ?? DEFAULT_SEARCH_LIMIT;
1543
- const options = this.activeComponent.options;
1544
- if (!options) {
1545
- return false;
1546
- }
1547
- if (options.length < offset + limit) {
1548
- return false;
1549
- }
1550
- const allItemsFilled = options.slice(offset, offset + limit).every(item => item !== undefined && item != this.loadingPlaceholderItem);
1551
- return allItemsFilled;
1552
- }
1553
- setDataToControl(request, result) {
1554
- this.isAllDataLoaded = result.total <= result.data.length;
1555
- const data = result.data;
1556
- const total = result.total;
1557
- const offset = request.offset;
1558
- const transferedData = this.transformFn
1559
- ? data.map((x) => this.transformFn?.(x))
1560
- : data;
1561
- if (this.activeComponent.optionLabel) {
1562
- this.loadingPlaceholderItem[this.activeComponent.optionLabel] =
1563
- this.loadingText;
1564
- }
1565
- if (this.activeComponent.optionValue) {
1566
- this.loadingPlaceholderItem[this.activeComponent.optionValue] = -1;
1567
- }
1568
- const options = request.useNewData ? undefined : this.activeComponent.options;
1569
- const newOptions = setDataToArray(options, transferedData, offset, total, this.loadingPlaceholderItem);
1570
- this.changeComponent(this.activeComponent, {
1571
- options: newOptions,
1572
- loading: false,
1573
- lazy: !this.isAllDataLoaded,
1574
- });
1575
- }
1576
- changeComponent(component, value) {
1577
- setComponentProperties(component, value);
1578
- this.changeDetectorRef.detectChanges();
1579
- }
1580
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DatasourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1581
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: DatasourceDirective, isStandalone: true, selector: "v-dropdown[useDatasource], v-multiselect[useDatasource], v-generic-field[useDatasource]", inputs: { datasource: "datasource", autoBind: "autoBind", loadingText: "loadingText", filterField: "filterField", transformFn: "transformFn", extraFilter: "extraFilter" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
1582
- }
1583
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DatasourceDirective, decorators: [{
1584
- type: Directive,
1585
- args: [{
1586
- selector:
1587
- // eslint-disable-next-line @angular-eslint/directive-selector
1588
- 'v-dropdown[useDatasource], v-multiselect[useDatasource], v-generic-field[useDatasource]',
1589
- standalone: true,
1590
- }]
1591
- }], propDecorators: { datasource: [{
1592
- type: Input
1593
- }], autoBind: [{
1594
- type: Input
1595
- }], loadingText: [{
1596
- type: Input
1597
- }], filterField: [{
1598
- type: Input
1599
- }], transformFn: [{
1600
- type: Input
1601
- }], extraFilter: [{
1602
- type: Input
1603
- }] } });
1604
-
1605
- class TableDatasourceDirective extends UnsubscribeComponent {
1606
- store = inject(Store);
1607
- autoBind = true;
1608
- tableName;
1609
- debounceTime = DEFAULT_DEBOUNCE_TIME;
1610
- datasource;
1611
- extraFilter;
1612
- transformFn;
1613
- tableComponent = inject(TABLE_COMPONENT_TOKEN, {
1614
- self: true,
1615
- });
1616
- changeDetectorRef = inject(ChangeDetectorRef);
1617
- httpClient = inject(HttpClient);
1618
- baseUrl = inject(BASE_URL_PATH);
1619
- dataSourceService;
1620
- parameters$ = new BehaviorSubject({});
1621
- params$ = this.parameters$.asObservable();
1622
- ngOnInit() {
1623
- if (!this.tableName) {
1624
- throw new Error('Property tableName must be defined.');
1625
- }
1626
- this.tableComponent.lazyLoad.pipe(takeUntil(this.destroyed$)).subscribe((value) => {
1627
- this.parameters$.next({
1628
- offset: value?.offset,
1629
- limit: value?.limit,
1630
- filter: { ...value?.filter, ...this.extraFilter },
1631
- sort: value?.sort,
1632
- });
1633
- });
1634
- this.parameters$
1635
- .pipe(takeUntil(this.destroyed$), map((request) => normalizeRequest({
1636
- ...request,
1637
- filter: { ...request.filter, ...this.extraFilter },
1638
- })), debounceTime(this.debounceTime), tap(() => {
1639
- this.changeComponent(this.tableComponent, {
1640
- lazy: true,
1641
- loading: true,
1642
- });
1643
- }), switchMap((request) => this.dataSourceService
1644
- ? this.dataSourceService(request).pipe(map((response) => ({ request, response })))
1645
- : of({
1646
- request,
1647
- response: {
1648
- data: [],
1649
- total: 0,
1650
- limit: request.limit,
1651
- offset: request.offset,
1652
- },
1653
- })), catchError((request) => {
1654
- this.changeComponent(this.tableComponent, {
1655
- loading: false,
1656
- });
1657
- return of({
1658
- request: request,
1659
- response: {
1660
- data: [],
1661
- total: 0,
1662
- limit: request.limit,
1663
- offset: request.offset,
1664
- },
1665
- });
1666
- }))
1667
- .subscribe(({ request, response }) => this.setDataToControl(request, response));
1668
- }
1669
- ngOnChanges(changes) {
1670
- if (changes['datasource']) {
1671
- this.dataSourceService = convertDatasource(this.datasource, this.baseUrl, this.httpClient);
1672
- if (this.autoBind) {
1673
- this.parameters$.next({ offset: 0 });
1674
- }
1675
- }
1676
- }
1677
- reload() {
1678
- this.parameters$.next({ ...this.parameters$.value });
1679
- }
1680
- changeComponent(component, value) {
1681
- setComponentProperties(component, value);
1682
- this.changeDetectorRef.detectChanges();
1683
- }
1684
- setDataToControl(request, result) {
1685
- const data = result.data;
1686
- const total = result.total;
1687
- const transferedData = this.transformFn ? data.map((x) => this.transformFn?.(x)) : data;
1688
- this.changeComponent(this.tableComponent, {
1689
- lazy: !isFilterEmpty(request.filter) || data?.length < total || this.datasource instanceof BaseHttpService,
1690
- data: transferedData,
1691
- loading: false,
1692
- total,
1693
- });
1694
- }
1695
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableDatasourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1696
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: TableDatasourceDirective, isStandalone: true, selector: "v-table[useDatasource]", inputs: { autoBind: "autoBind", tableName: "tableName", debounceTime: "debounceTime", datasource: "datasource", extraFilter: "extraFilter", transformFn: "transformFn" }, exportAs: ["useDatasource"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
1697
- }
1698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableDatasourceDirective, decorators: [{
1699
- type: Directive,
1700
- args: [{
1701
- // eslint-disable-next-line @angular-eslint/directive-selector
1702
- selector: 'v-table[useDatasource]',
1703
- exportAs: 'useDatasource',
1704
- standalone: true,
1705
- }]
1706
- }], propDecorators: { autoBind: [{
1707
- type: Input
1708
- }], tableName: [{
1709
- type: Input,
1710
- args: [{ required: true }]
1711
- }], debounceTime: [{
1712
- type: Input
1713
- }], datasource: [{
1714
- type: Input
1715
- }], extraFilter: [{
1716
- type: Input
1717
- }], transformFn: [{
1718
- type: Input
1719
- }] } });
1720
-
1721
- class ButtonShortCutDirective {
1722
- shortCutFn;
1723
- shortCutKey;
1724
- keyMap = {};
1725
- onKeyDown(event) {
1726
- this.keyMap[event.key.toLowerCase()] = true;
1727
- this.checkShortcut();
1728
- }
1729
- onKeyUp(event) {
1730
- this.keyMap[event.key.toLowerCase()] = false;
1731
- }
1732
- checkShortcut() {
1733
- if (this.shortCutKey && this.shortCutFn) {
1734
- const keys = this.shortCutKey.toLowerCase().split('+');
1735
- const isShortcutPressed = keys.every((key) => this.keyMap[key]);
1736
- if (isShortcutPressed) {
1737
- this.shortCutFn?.();
1738
- keys.forEach((key) => (this.keyMap[key] = false));
1739
- }
1740
- }
1741
- }
1742
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonShortCutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1743
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: ButtonShortCutDirective, isStandalone: true, selector: "v-button[useShortCut]", inputs: { shortCutFn: "shortCutFn", shortCutKey: "shortCutKey" }, host: { listeners: { "document:keydown": "onKeyDown($event)", "document:keyup": "onKeyUp($event)" } }, exportAs: ["useShortCut"], ngImport: i0 });
1744
- }
1745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonShortCutDirective, decorators: [{
1746
- type: Directive,
1747
- args: [{
1748
- // eslint-disable-next-line @angular-eslint/directive-selector
1749
- selector: 'v-button[useShortCut]',
1750
- exportAs: 'useShortCut',
1751
- standalone: true,
1752
- }]
1753
- }], propDecorators: { shortCutFn: [{
1754
- type: Input
1755
- }], shortCutKey: [{
1756
- type: Input
1757
- }], onKeyDown: [{
1758
- type: HostListener,
1759
- args: ['document:keydown', ['$event']]
1760
- }], onKeyUp: [{
1761
- type: HostListener,
1762
- args: ['document:keyup', ['$event']]
1763
- }] } });
1764
-
1765
- class TableFilterDirective {
1766
- filterComponent;
1767
- filterChange$ = new Subject();
1768
- subscription = undefined;
1769
- tableComponent = inject(TABLE_COMPONENT_TOKEN);
1770
- changeDetectorRef = inject(ChangeDetectorRef);
1771
- ngOnChanges(changes) {
1772
- if (changes['filterComponent']) {
1773
- this.unRegister();
1774
- this.register();
1775
- }
1776
- }
1777
- onFilterChange(value) {
1778
- if (this.tableComponent?.filter !== value) {
1779
- setComponentProperties(this.tableComponent, {
1780
- filter: value,
1781
- currentPage: 1,
1782
- });
1783
- this.changeDetectorRef.detectChanges();
1784
- }
1785
- }
1786
- ngOnDestroy() {
1787
- this.unRegister();
1788
- }
1789
- unRegister() {
1790
- this.subscription?.unsubscribe();
1791
- }
1792
- register() {
1793
- this.filterComponent.registerOnChange((value) => {
1794
- this.filterChange$.next(value);
1795
- });
1796
- this.subscription = this.filterChange$
1797
- .pipe(debounceTime(this.filterComponent.debounceTime ? 0 : DEFAULT_DEBOUNCE_TIME))
1798
- .subscribe((value) => this.onFilterChange(value));
1799
- }
1800
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1801
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: TableFilterDirective, isStandalone: true, selector: "v-table[useFilter]", inputs: { filterComponent: "filterComponent" }, exportAs: ["tableFilterDirective"], usesOnChanges: true, ngImport: i0 });
1802
- }
1803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableFilterDirective, decorators: [{
1804
- type: Directive,
1805
- args: [{
1806
- // eslint-disable-next-line @angular-eslint/directive-selector
1807
- selector: 'v-table[useFilter]',
1808
- standalone: true,
1809
- exportAs: 'tableFilterDirective',
1810
- }]
1811
- }], propDecorators: { filterComponent: [{
1812
- type: Input,
1813
- args: [{ required: true }]
1814
- }] } });
1815
-
1816
- const ErrorCodesFns = {
1817
- required: () => `This field is required!`,
1818
- email: () => `Email is in wrong format!`,
1819
- iban: () => `IBAN is in wrong format!`,
1820
- lowStrength: () => `Password too weak!`,
1821
- customPasswordRequirements: () => `Password does not meet minimal requirements.`,
1822
- fieldsNotMatching: () => `Passwords are not the same!`,
1823
- validationError: (value) => `${value}`,
1824
- };
1825
-
1826
- function getFirstErrorFromControl(control) {
1827
- if (!control || !control.errors) {
1828
- return null;
1829
- }
1830
- const errors = control.errors ?? false;
1831
- if (errors) {
1832
- const key = Object.keys(control.errors)[0];
1833
- const value = control.errors[key];
1834
- return { key, value };
1835
- }
1836
- return null;
1837
- }
1838
- function getFirstError(errors) {
1839
- if (errors) {
1840
- const key = Object.keys(errors)[0];
1841
- const value = errors[key];
1842
- return { key, value };
1843
- }
1844
- return null;
1845
- }
1846
-
1847
- const EMPTY$1 = '';
1848
- class ErrorPipe {
1849
- transform(errors) {
1850
- if (!errors) {
1851
- return EMPTY$1;
1852
- }
1853
- const error = getFirstError(errors);
1854
- if (error) {
1855
- const errorFn = ErrorCodesFns[error.key];
1856
- if (!errorFn) {
1857
- return EMPTY$1;
1858
- }
1859
- return ErrorCodesFns[error.key](error.value);
1860
- }
1861
- return EMPTY$1;
1862
- }
1863
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1864
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: ErrorPipe, isStandalone: true, name: "error" });
1865
- }
1866
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorPipe, decorators: [{
1867
- type: Pipe,
1868
- args: [{
1869
- name: 'error',
1870
- standalone: true,
1871
- }]
1872
- }] });
1873
-
1874
- const WarningCodesFns = {
1875
- validationWarning: (value) => `${value}`,
1876
- };
1877
-
1878
- const EMPTY = '';
1879
- class WarningPipe {
1880
- transform(warnings) {
1881
- if (!warnings) {
1882
- return EMPTY;
1883
- }
1884
- const error = getFirstError(warnings);
1885
- if (error) {
1886
- const errorFn = WarningCodesFns[error.key];
1887
- if (!errorFn) {
1888
- return EMPTY;
1889
- }
1890
- return WarningCodesFns[error.key](error.value);
1891
- }
1892
- return EMPTY;
1893
- }
1894
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: WarningPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1895
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: WarningPipe, isStandalone: true, name: "warning" });
1896
- }
1897
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: WarningPipe, decorators: [{
1898
- type: Pipe,
1899
- args: [{
1900
- name: 'warning',
1901
- standalone: true,
1902
- }]
1903
- }] });
1904
-
1905
- /* eslint-disable @typescript-eslint/no-explicit-any */
1906
- class KeyOrFunctionPipe {
1907
- transform(keyOrFn, row) {
1908
- if (keyOrFn instanceof Function) {
1909
- return keyOrFn(row);
1910
- }
1911
- else if (typeof keyOrFn === 'string') {
1912
- const value = row[keyOrFn];
1913
- if (value) {
1914
- return value;
1915
- }
1916
- }
1917
- else if (typeof keyOrFn === 'boolean') {
1918
- return keyOrFn;
1919
- }
1920
- return '';
1921
- }
1922
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: KeyOrFunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1923
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: KeyOrFunctionPipe, isStandalone: true, name: "keyOrFn", pure: false });
1924
- }
1925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: KeyOrFunctionPipe, decorators: [{
1926
- type: Pipe,
1927
- args: [{
1928
- name: 'keyOrFn',
1929
- pure: false,
1930
- standalone: true,
1931
- }]
1932
- }] });
1933
-
1934
- class EnumToListPipe {
1935
- transform(data) {
1936
- return Object.keys(data)
1937
- .filter(key => isNaN(Number(key)))
1938
- .map(key => ({
1939
- label: key,
1940
- value: data[key],
1941
- }));
1942
- }
1943
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: EnumToListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1944
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: EnumToListPipe, isStandalone: true, name: "enumToList" });
1945
- }
1946
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: EnumToListPipe, decorators: [{
1947
- type: Pipe,
1948
- args: [{
1949
- name: 'enumToList',
1950
- standalone: true,
1951
- }]
1952
- }] });
1953
-
1954
- /* eslint-disable @typescript-eslint/ban-types */
1955
- class Format {
1956
- static concatArray(value, itemFormatter, delimeter = ';') {
1957
- if (!value) {
1958
- return '';
1959
- }
1960
- return value
1961
- .map(item => itemFormatter ? itemFormatter(item) : item)
1962
- .filter(item => item !== undefined && item !== null)
1963
- .join(`${delimeter} `);
1964
- }
1965
- static czechDate(value) {
1966
- return toCzechDateTimeString(value);
1967
- }
1968
- static date(value) {
1969
- if (!value) {
1970
- return '';
1971
- }
1972
- if (typeof value === 'string') {
1973
- value = new Date(value);
1974
- }
1975
- return value.getDate() + '. ' + (value.getMonth() + 1) + '. ' + value.getFullYear();
1976
- }
1977
- static dateAndTime(value) {
1978
- if (!value) {
1979
- return '';
1980
- }
1981
- if (typeof value === 'string') {
1982
- value = new Date(value);
1983
- }
1984
- return ('0' + value.getDate()).slice(-2)
1985
- + '.' + ('0' + (value.getMonth() + 1)).slice(-2)
1986
- + '.' + value.getFullYear() + ' ' + ('0' + value.getHours()).slice(-2)
1987
- + ':' + ('0' + value.getMinutes()).slice(-2) + ':' + ('0' + value.getSeconds()).slice(-2);
1988
- }
1989
- static convertToUserLocaleDate(value) {
1990
- if (!value) {
1991
- return '';
1992
- }
1993
- if (typeof value === 'string') {
1994
- value = new Date(value);
1995
- }
1996
- return value.toLocaleDateString(navigator.language, { timeZone: 'UTC' });
1997
- }
1998
- static bool(value) {
1999
- if (value) {
2000
- return 'Yes';
2001
- }
2002
- else {
2003
- return 'No';
2004
- }
2005
- }
2006
- static boolWithIcon(value) {
2007
- if (value) {
2008
- return `<span>✓</span>`;
2009
- }
2010
- else {
2011
- return `<span>⨯</span>`;
2012
- }
2013
- }
2014
- }
2015
-
2016
- /**
2017
- * Generated bundle index. Do not edit.
2018
- */
2019
-
2020
- export { ACTION_BUTTON_GROUP_COMPONENT_TOKEN, BREADCRUMB_COMPONENT_TOKEN, BUTTON_COMPONENT_TOKEN, BaseFormDirective, BaseFormInputComponent, BaseInputControls, BreadcrumbCoreComponent, BreadcrumbService, ButtonShortCutDirective, CALENDAR_COMPONENT_TOKEN, CHECKBOX_COMPONENT_TOKEN, CONFIRM_DIALOG_COMPONENT_TOKEN, ColumnConfiguration, ColumnModel, ColumnVisibility, ControlSeverity, DEFAULT_DEBOUNCE_TIME, DEFAULT_PAGINATION, DROPDOWN_BUTTON_COMPONENT_TOKEN, DROPDOWN_COMPONENT_TOKEN, DatasourceDirective, DetailStoreDirective, DialogService, EnumToListPipe, ErrorCodesFns, ErrorPipe, FILTER_COMPONENT_TOKEN, FORM_FIELD_COMPONENT_TOKEN, FieldAlign, FieldSize, FieldType, Format, GENERIC_FIELD_COMPONENT_TOKEN, GenericFieldType, GovButtonType, GovControlSeverity, HEADER_COMPONENT_TOKEN, ICONS_COMPONENT_TOKEN, INPUT_GROUP_COMPONENT_TOKEN, IconPosition, IconsComponent, KeyOrFunctionPipe, LOADER_COMPONENT_TOKEN, LOGO_ROUTER_ROUTE, LayoutType, LinkRenderer, MAX_COLUMN_CHAR_COUNT, MENU_TOKEN, MULTISELECT_COMPONENT_TOKEN, MenuServiceDirective, NUMBER_INPUT_COMPONENT_TOKEN, PAGE_HEADER_COMPONENT_TOKEN, PASSWORD_COMPONENT_TOKEN, PageHeaderCoreComponent, PageHeaderService, PasswordStrength, Position, PreventUnsavedChangesDirective, RADIOBUTTON_COMPONENT_TOKEN, Renderer, RowModel, SECTION_COMPONENT_TOKEN, SETTINGS_MENU, SIDE_MENU_COMPONENT_TOKEN, SIDE_MENU_STATE_TOKEN, SLIDER_COMPONENT_TOKEN, SNACKBAR_COMPONENT_TOKEN, STEPPER_COMPONENT_TOKEN, SWITCH_COMPONENT_TOKEN, ScreenSizeService, SideMenuProviderService, SideMenuService, SlotPosition, TABLE_COLUMN_PROVIDER, TABLE_COMPONENT_TOKEN, TABLE_FILTER_COMPONENT_TOKEN, TAB_VIEW_COMPONENT_TOKEN, TEXTAREA_COMPONENT_TOKEN, TEXTFIELD_COMPONENT_TOKEN, TOOLTIP_COMPONENT_TOKEN, TableBuilder, TableButtonSeverity, TableColumnDirective, TableDatasourceDirective, TableFilterDirective, TableSelectionMode, TableService, UnsubscribeComponent, WarningCodesFns, WarningPipe, downloadFile, downloadText, getFirstError, getFirstErrorFromControl, isFilterEmpty, isFormStateEqual, queryListChanged, routerRenderer, setComponentProperties, setDataToArray };
2021
- //# sourceMappingURL=verisoft-ui-core.mjs.map