zek 14.2.38 → 14.2.48

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 (72) hide show
  1. package/esm2020/lib/components/base.component.mjs +3 -2
  2. package/esm2020/lib/components/core-ui.component.mjs +20 -5
  3. package/esm2020/lib/modules/age/age.pipe.mjs +2 -3
  4. package/esm2020/lib/modules/alert/alert/alert.component.mjs +1 -1
  5. package/esm2020/lib/modules/bb/bb-modal-base.component.mjs +9 -2
  6. package/esm2020/lib/modules/bb/bb-modal-toolbar.mjs +9 -2
  7. package/esm2020/lib/modules/bb/bb.component.mjs +32 -8
  8. package/esm2020/lib/modules/card/card/card.component.mjs +1 -1
  9. package/esm2020/lib/modules/edit-toolbar/edit-toolbar.component.mjs +23 -4
  10. package/esm2020/lib/modules/file/file-size.pipe.mjs +3 -3
  11. package/esm2020/lib/modules/grid-toolbar/grid-toolbar/grid-toolbar.component.mjs +72 -11
  12. package/esm2020/lib/modules/index.mjs +3 -1
  13. package/esm2020/lib/modules/list-toolbar/list-toolbar.component.mjs +44 -7
  14. package/esm2020/lib/modules/modal/modal/modal.component.mjs +72 -8
  15. package/esm2020/lib/modules/page-title/page-title.component.mjs +11 -1
  16. package/esm2020/lib/modules/pager/pager/pager.component.mjs +9 -2
  17. package/esm2020/lib/modules/password/password.component.mjs +9 -2
  18. package/esm2020/lib/modules/radio/radio-button.component.mjs +3 -3
  19. package/esm2020/lib/modules/readonly/readonly.directive.mjs +5 -5
  20. package/esm2020/lib/modules/select/index.mjs +3 -0
  21. package/esm2020/lib/modules/select/model.mjs +4 -0
  22. package/esm2020/lib/modules/select/module.mjs +28 -0
  23. package/esm2020/lib/modules/select/select.mjs +198 -0
  24. package/esm2020/lib/modules/select2/select2.component.mjs +1 -1
  25. package/esm2020/lib/modules/select2-multiple/select2-multiple.component.mjs +1 -1
  26. package/esm2020/lib/modules/validator/field-validator.component.mjs +1 -1
  27. package/esm2020/lib/modules/validators/directive.mjs +75 -0
  28. package/esm2020/lib/modules/validators/index.mjs +4 -0
  29. package/esm2020/lib/modules/validators/module.mjs +22 -0
  30. package/esm2020/lib/modules/validators/validator.mjs +72 -0
  31. package/esm2020/lib/modules/wizard/wizard/wizard.component.mjs +1 -1
  32. package/esm2020/lib/services/auth.service.mjs +2 -2
  33. package/esm2020/lib/utils/array-helper.mjs +25 -9
  34. package/esm2020/lib/utils/bitwise-helper.mjs +3 -3
  35. package/esm2020/lib/utils/convert.mjs +1 -1
  36. package/esm2020/lib/utils/date-helper.mjs +2 -2
  37. package/esm2020/lib/utils/filter-helper.mjs +2 -2
  38. package/esm2020/lib/utils/object-helper.mjs +17 -4
  39. package/esm2020/lib/utils/string-helper.mjs +9 -18
  40. package/esm2020/lib/utils/time-helper.mjs +2 -2
  41. package/fesm2015/zek.mjs +734 -91
  42. package/fesm2015/zek.mjs.map +1 -1
  43. package/fesm2020/zek.mjs +734 -91
  44. package/fesm2020/zek.mjs.map +1 -1
  45. package/lib/components/base.component.d.ts +3 -2
  46. package/lib/components/core-ui.component.d.ts +9 -4
  47. package/lib/modules/bb/bb-modal-base.component.d.ts +4 -2
  48. package/lib/modules/bb/bb-modal-toolbar.d.ts +4 -1
  49. package/lib/modules/bb/bb.component.d.ts +13 -10
  50. package/lib/modules/edit-toolbar/edit-toolbar.component.d.ts +10 -3
  51. package/lib/modules/grid-toolbar/grid-toolbar/grid-toolbar.component.d.ts +31 -10
  52. package/lib/modules/index.d.ts +2 -0
  53. package/lib/modules/list-toolbar/list-toolbar.component.d.ts +19 -6
  54. package/lib/modules/modal/modal/modal.component.d.ts +31 -11
  55. package/lib/modules/page-title/page-title.component.d.ts +4 -1
  56. package/lib/modules/pager/pager/pager.component.d.ts +4 -1
  57. package/lib/modules/password/password.component.d.ts +4 -1
  58. package/lib/modules/radio/radio-button.component.d.ts +0 -6
  59. package/lib/modules/readonly/readonly.directive.d.ts +3 -2
  60. package/lib/modules/select/index.d.ts +2 -0
  61. package/lib/modules/select/model.d.ts +5 -0
  62. package/lib/modules/select/module.d.ts +9 -0
  63. package/lib/modules/select/select.d.ts +42 -0
  64. package/lib/modules/validators/directive.d.ts +67 -0
  65. package/lib/modules/validators/index.d.ts +3 -0
  66. package/lib/modules/validators/module.d.ts +8 -0
  67. package/lib/modules/validators/validator.d.ts +33 -0
  68. package/lib/utils/array-helper.d.ts +2 -1
  69. package/lib/utils/bitwise-helper.d.ts +2 -2
  70. package/lib/utils/object-helper.d.ts +6 -0
  71. package/lib/utils/string-helper.d.ts +3 -3
  72. package/package.json +1 -1
package/fesm2020/zek.mjs CHANGED
@@ -10,7 +10,7 @@ import { HttpParams, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http
10
10
  import * as i1$3 from '@angular/common';
11
11
  import { CommonModule, DatePipe } from '@angular/common';
12
12
  import * as i1$5 from '@angular/forms';
13
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
13
+ import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS } from '@angular/forms';
14
14
  import * as i1$4 from '@angular/platform-browser';
15
15
  import { finalize, map, takeWhile } from 'rxjs/operators';
16
16
 
@@ -29,15 +29,31 @@ class ArrayHelper {
29
29
  return false;
30
30
  }
31
31
  ;
32
- static distinct(value) {
33
- var arr = [];
34
- for (var i = 0; i < value.length; i++) {
35
- let val = value[i];
36
- if (!this.contains(arr, val)) {
37
- arr.push(val);
38
- }
32
+ // static distinct(value: any[]) {
33
+ // var arr: any[] = [];
34
+ // for (var i = 0; i < value.length; i++) {
35
+ // let val = value[i];
36
+ // if (!this.contains(arr, val)) {
37
+ // arr.push(val);
38
+ // }
39
+ // }
40
+ // return arr;
41
+ // }
42
+ static distinct(source) {
43
+ let length = source.length, result = [], seen = new Set();
44
+ for (let index = 0; index < length; index++) {
45
+ let value = source[index];
46
+ if (seen.has(value))
47
+ continue;
48
+ seen.add(value);
49
+ result.push(value);
39
50
  }
40
- return arr;
51
+ return result;
52
+ }
53
+ static filterByKey(filterValue, key, array) {
54
+ if (typeof filterValue === 'undefined' || filterValue == null || (typeof key === 'string' && key.length === 0))
55
+ return array;
56
+ return array.filter(x => x !== undefined && x !== null && x[key] === filterValue);
41
57
  }
42
58
  static flattenArray(value) {
43
59
  let result = [];
@@ -122,10 +138,10 @@ class Base64Helper {
122
138
  }
123
139
 
124
140
  class BitwiseHelper {
125
- static HasFlag(flags, flagToCheck) {
141
+ static hasFlag(flags, flagToCheck) {
126
142
  return (flags & flagToCheck) === flagToCheck;
127
143
  }
128
- static AddFlags(flags, ...flagsToAdd) {
144
+ static addFlags(flags, ...flagsToAdd) {
129
145
  if (!flagsToAdd)
130
146
  return flags;
131
147
  flagsToAdd.forEach(flag => {
@@ -153,17 +169,11 @@ class StringHelper {
153
169
  return v;
154
170
  return v.charAt(0).toUpperCase() + v.slice(1);
155
171
  }
156
- static isNullOrEmpty(val) {
157
- if (val === undefined || val === null || val === '') {
158
- return true;
159
- }
160
- return false;
172
+ static isNullOrEmpty(value) {
173
+ return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.length === 0);
161
174
  }
162
- static isNullOrWhiteSpace(val) {
163
- if (val === undefined || val === null || val.trim() === '') {
164
- return true;
165
- }
166
- return false;
175
+ static isNullOrWhiteSpace(value) {
176
+ return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.trim().length === 0);
167
177
  }
168
178
  static tryTrim(val) {
169
179
  if (val === undefined || val === null) {
@@ -171,17 +181,14 @@ class StringHelper {
171
181
  }
172
182
  return val.trim();
173
183
  }
174
- static ifNullEmpty(val) {
175
- if (val === undefined || val === null || val === '') {
176
- return '';
177
- }
178
- return val;
184
+ static ifNullEmpty(value) {
185
+ return typeof value === 'undefined' || value == null ? '' : value;
179
186
  }
180
187
  static join(val, separator, part) {
181
- if (val === undefined || val === null || val === '') {
188
+ if (this.isNullOrEmpty(val)) {
182
189
  return part;
183
190
  }
184
- if (part === undefined || part === null || part === '') {
191
+ if (this.isNullOrEmpty(part)) {
185
192
  return val;
186
193
  }
187
194
  return val + separator + part;
@@ -445,7 +452,7 @@ class OverlapHelper {
445
452
 
446
453
  class TimeHelper {
447
454
  static parseTime(value) {
448
- if (value == null || value === undefined || value === '')
455
+ if (typeof value === 'undefined' || value == null || value === '')
449
456
  return null;
450
457
  return this.toTime(value);
451
458
  }
@@ -623,7 +630,7 @@ class DateHelper {
623
630
  ;
624
631
  // 1 2 3 4 5 6 7 8 9 10 11
625
632
  static parseDate(value) {
626
- if (value == null || value === undefined || value === '')
633
+ if (typeof value === 'undefined' || value == null || value === '')
627
634
  return null;
628
635
  return this.toDate(value);
629
636
  }
@@ -740,13 +747,26 @@ class ObjectHelper {
740
747
  static isObject(value) {
741
748
  return this.isDefined(value) && typeof value === 'object';
742
749
  }
750
+ /**
751
+ * Check if the object is a string or array before evaluating the length attribute.
752
+ * This avoids falsely rejecting objects that contain a custom length attribute.
753
+ * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.
754
+ */
755
+ static isEmptyValue(value) {
756
+ return !this.isDefined(value) || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0);
757
+ }
743
758
  static isEmpty(obj) {
744
- if (obj === undefined || obj === null)
759
+ if (!this.isDefined(obj))
745
760
  return true;
761
+ // if (typeof obj === 'undefined' || obj === null)
762
+ // return true;
746
763
  for (let prop in obj) {
747
- if (obj[prop] !== undefined && obj[prop] !== null && obj[prop] != '') {
764
+ let v = obj[prop];
765
+ if (!this.isEmptyValue(v))
748
766
  return false;
749
- }
767
+ // if (typeof (obj[prop]) !== undefined && obj[prop] !== null && obj[prop] !== '') {
768
+ // return false;
769
+ // }
750
770
  }
751
771
  return true;
752
772
  }
@@ -789,7 +809,7 @@ class ObjectHelper {
789
809
 
790
810
  class FilterHelper {
791
811
  static isEmpty(obj) {
792
- if (obj === undefined || obj === null)
812
+ if (typeof obj === 'undefined' || obj === null)
793
813
  return true;
794
814
  let tmp = Object.assign({}, obj);
795
815
  delete tmp.page;
@@ -1158,7 +1178,7 @@ class AuthService {
1158
1178
  const p = permissions[i];
1159
1179
  let found = userPermissions[p];
1160
1180
  if (found) {
1161
- let hasPermission = BitwiseHelper.HasFlag(found, value);
1181
+ let hasPermission = BitwiseHelper.hasFlag(found, value);
1162
1182
  if (hasPermission)
1163
1183
  return true;
1164
1184
  }
@@ -1768,7 +1788,7 @@ class BaseComponent extends CoreComponent {
1768
1788
  return this._readOnly;
1769
1789
  }
1770
1790
  set readOnly(v) {
1771
- this._readOnly = v;
1791
+ this._readOnly = Convert.toBoolean(v);
1772
1792
  }
1773
1793
  getParam(name) {
1774
1794
  return this.route.snapshot.paramMap.get(name);
@@ -1838,7 +1858,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1838
1858
  type: Input
1839
1859
  }] } });
1840
1860
 
1841
- let uniqueId$2 = 0;
1861
+ let uniqueId$3 = 0;
1842
1862
  class CoreUiComponent extends CoreComponent {
1843
1863
  constructor(_renderer, _elementRef
1844
1864
  //private _changeDetector: ChangeDetectorRef
@@ -1846,9 +1866,6 @@ class CoreUiComponent extends CoreComponent {
1846
1866
  super();
1847
1867
  this._renderer = _renderer;
1848
1868
  this._elementRef = _elementRef;
1849
- this._isInitialized = false;
1850
- this._disabled = false;
1851
- this._required = false;
1852
1869
  /** The method to be called in order to update ngModel */
1853
1870
  this._onChange = () => { };
1854
1871
  /**
@@ -1858,8 +1875,12 @@ class CoreUiComponent extends CoreComponent {
1858
1875
  this._onTouched = () => { };
1859
1876
  this.change = new EventEmitter();
1860
1877
  this.changing = new EventEmitter();
1861
- this._name = `zek-${++uniqueId$2}`;
1878
+ this._name = `zek-${++uniqueId$3}`;
1879
+ this._isInitialized = false;
1862
1880
  this._value = null;
1881
+ this._readonly = false;
1882
+ this._disabled = false;
1883
+ this._required = false;
1863
1884
  }
1864
1885
  /**
1865
1886
  * Helper method that sets a property on a target element using the current Renderer
@@ -1917,6 +1938,18 @@ class CoreUiComponent extends CoreComponent {
1917
1938
  }
1918
1939
  }
1919
1940
  /** Whether the component is disabled */
1941
+ get readonly() {
1942
+ return this._readonly;
1943
+ }
1944
+ set readonly(value) {
1945
+ let v = Convert.toBoolean(value);
1946
+ if (this._readonly !== v) {
1947
+ this._readonly = v;
1948
+ this.onReadOnlyChanged();
1949
+ }
1950
+ }
1951
+ onReadOnlyChanged() { }
1952
+ /** Whether the component is disabled */
1920
1953
  get disabled() {
1921
1954
  return this._disabled;
1922
1955
  }
@@ -1996,7 +2029,7 @@ class CoreUiComponent extends CoreComponent {
1996
2029
  }
1997
2030
  }
1998
2031
  CoreUiComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: CoreUiComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1999
- CoreUiComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: CoreUiComponent, inputs: { name: "name", value: "value", disabled: "disabled", required: "required" }, outputs: { change: "change", changing: "changing" }, usesInheritance: true, ngImport: i0 });
2032
+ CoreUiComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: CoreUiComponent, inputs: { name: "name", value: "value", readonly: "readonly", disabled: "disabled", required: "required" }, outputs: { change: "change", changing: "changing" }, usesInheritance: true, ngImport: i0 });
2000
2033
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: CoreUiComponent, decorators: [{
2001
2034
  type: Directive
2002
2035
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { change: [{
@@ -2007,6 +2040,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2007
2040
  type: Input
2008
2041
  }], value: [{
2009
2042
  type: Input
2043
+ }], readonly: [{
2044
+ type: Input
2010
2045
  }], disabled: [{
2011
2046
  type: Input
2012
2047
  }], required: [{
@@ -2490,12 +2525,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2490
2525
 
2491
2526
  class AgePipe {
2492
2527
  transform(value, now) {
2493
- if (value === undefined || value === null || value === '' || value !== value)
2528
+ if (typeof value === 'undefined' || value === null || value === '' || value !== value)
2494
2529
  return null;
2495
2530
  const date = DateHelper.toDate(value);
2496
2531
  let timeDiff = (now ? DateHelper.toDate(now).getTime() : Date.now()) - date.getTime();
2497
2532
  return Math.floor((timeDiff / (1000 * 3600 * 24)) / 365.25);
2498
- //return value.getAge();
2499
2533
  }
2500
2534
  }
2501
2535
  AgePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AgePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -2815,9 +2849,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2815
2849
  }]
2816
2850
  }] });
2817
2851
 
2818
- let uniqueId$1 = 0;
2852
+ let uniqueId$2 = 0;
2819
2853
  /**
2820
- * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
2854
+ * Provider Expression that allows bb to register as a ControlValueAccessor. This
2821
2855
  * allows it to support [(ngModel)] and ngControl.
2822
2856
  * @docs-private
2823
2857
  */
@@ -2829,16 +2863,16 @@ const ZEK_BB_CONTROL_VALUE_ACCESSOR = {
2829
2863
  class ButtonBrowseComponent extends CoreUiComponent {
2830
2864
  constructor() {
2831
2865
  super(...arguments);
2832
- this._uniqueId = `zek-bb-${++uniqueId$1}`;
2866
+ this._uniqueId = `zek-bb-${++uniqueId$2}`;
2833
2867
  /** The unique ID for the bb. */
2834
2868
  this.id = this._uniqueId;
2835
2869
  this.filter = {};
2836
2870
  this.data = new PagedList();
2837
2871
  this._text = null;
2838
- this.readOnly = false;
2839
- this.hide = false;
2840
- this.showInput = true;
2841
- this.multiSelect = false;
2872
+ this._readOnly = false;
2873
+ this._hide = false;
2874
+ this._showInput = true;
2875
+ this._multiSelect = false;
2842
2876
  this.onShowModal = new EventEmitter();
2843
2877
  this.onChooseAll = new EventEmitter();
2844
2878
  this.onKeyPairChange = new EventEmitter();
@@ -2874,6 +2908,30 @@ class ButtonBrowseComponent extends CoreUiComponent {
2874
2908
  onTextChanged() {
2875
2909
  this.onKeyPairChange.emit({ key: this._value, value: this._text });
2876
2910
  }
2911
+ get readOnly() {
2912
+ return this._readOnly;
2913
+ }
2914
+ set readOnly(v) {
2915
+ this._readOnly = Convert.toBoolean(v);
2916
+ }
2917
+ get hide() {
2918
+ return this._hide;
2919
+ }
2920
+ set hide(v) {
2921
+ this._hide = Convert.toBoolean(v);
2922
+ }
2923
+ get showInput() {
2924
+ return this._showInput;
2925
+ }
2926
+ set showInput(v) {
2927
+ this._showInput = Convert.toBoolean(v);
2928
+ }
2929
+ get multiSelect() {
2930
+ return this._multiSelect;
2931
+ }
2932
+ set multiSelect(v) {
2933
+ this._multiSelect = Convert.toBoolean(v);
2934
+ }
2877
2935
  get modal() {
2878
2936
  if (!this._modal) {
2879
2937
  let modalEl = document.getElementById(this.modalId);
@@ -2932,7 +2990,6 @@ class ButtonBrowseComponent extends CoreUiComponent {
2932
2990
  onValueChanged() {
2933
2991
  if (typeof this._value !== 'undefined' && this._value !== null &&
2934
2992
  typeof this._type !== 'undefined' && this._type !== null) {
2935
- console.log('onValueChanged', this._value);
2936
2993
  this.bindText();
2937
2994
  }
2938
2995
  else {
@@ -2976,7 +3033,7 @@ class ButtonBrowseModalToolbarComponent {
2976
3033
  constructor() {
2977
3034
  this.onSearch = new EventEmitter();
2978
3035
  this.onReset = new EventEmitter();
2979
- this.multiSelect = false;
3036
+ this._multiSelect = false;
2980
3037
  this.onChooseAll = new EventEmitter();
2981
3038
  }
2982
3039
  search() {
@@ -2985,6 +3042,12 @@ class ButtonBrowseModalToolbarComponent {
2985
3042
  reset() {
2986
3043
  this.onReset.emit();
2987
3044
  }
3045
+ get multiSelect() {
3046
+ return this._multiSelect;
3047
+ }
3048
+ set multiSelect(v) {
3049
+ this._multiSelect = Convert.toBoolean(v);
3050
+ }
2988
3051
  chooseAll() {
2989
3052
  if (!this.multiSelect)
2990
3053
  return;
@@ -3040,10 +3103,16 @@ class ButtonBrowseModalBaseComponent extends CoreComponent {
3040
3103
  constructor() {
3041
3104
  super(...arguments);
3042
3105
  this.filter = {};
3043
- this.multiSelect = false;
3106
+ this._multiSelect = false;
3044
3107
  this.onChoose = new EventEmitter();
3045
3108
  this.onChooseAll = new EventEmitter();
3046
3109
  }
3110
+ get multiSelect() {
3111
+ return this._multiSelect;
3112
+ }
3113
+ set multiSelect(v) {
3114
+ this._multiSelect = Convert.toBoolean(v);
3115
+ }
3047
3116
  choose(value) {
3048
3117
  this.onChoose.emit(value);
3049
3118
  }
@@ -3470,9 +3539,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
3470
3539
  class EditToolbarComponent {
3471
3540
  constructor() {
3472
3541
  this.printType = PrintType;
3473
- this.showExport = false;
3474
- this.showPrint = false;
3475
- this.readOnly = false;
3542
+ this._showExport = false;
3543
+ this._showPrint = false;
3544
+ this._readOnly = false;
3476
3545
  this.onSave = new EventEmitter();
3477
3546
  // save(navigateToReturnUrl: boolean) {
3478
3547
  // this.onSave.emit(navigateToReturnUrl);
@@ -3486,6 +3555,24 @@ class EditToolbarComponent {
3486
3555
  this.onPrint = new EventEmitter();
3487
3556
  this.onExport = new EventEmitter();
3488
3557
  }
3558
+ get showExport() {
3559
+ return this._showExport;
3560
+ }
3561
+ set showExport(v) {
3562
+ this._showExport = Convert.toBoolean(v);
3563
+ }
3564
+ get showPrint() {
3565
+ return this._showPrint;
3566
+ }
3567
+ set showPrint(v) {
3568
+ this._showPrint = Convert.toBoolean(v);
3569
+ }
3570
+ get readOnly() {
3571
+ return this._readOnly;
3572
+ }
3573
+ set readOnly(v) {
3574
+ this._readOnly = Convert.toBoolean(v);
3575
+ }
3489
3576
  cancel() {
3490
3577
  this.onCancel.emit();
3491
3578
  }
@@ -3562,9 +3649,9 @@ class FileSizePipe {
3562
3649
  ];
3563
3650
  }
3564
3651
  transform(bytes = 0, precision = 0) {
3565
- if (bytes == null || bytes == undefined)
3652
+ if (typeof bytes === 'undefined' || bytes == null)
3566
3653
  bytes = 0;
3567
- if (precision == null || precision == undefined)
3654
+ if (typeof precision === 'undefined' || precision == null)
3568
3655
  precision = 0;
3569
3656
  if (isNaN(parseFloat(String(bytes))) || !isFinite(bytes))
3570
3657
  return '?';
@@ -3606,16 +3693,20 @@ class ModalComponent extends CoreComponent {
3606
3693
  constructor(translate) {
3607
3694
  super();
3608
3695
  this.translate = translate;
3609
- this.showOk = true;
3610
- this.disabledOk = false;
3611
- this.showCancel = true;
3612
- this.autoHide = true;
3696
+ this._showOk = true;
3697
+ this._disabledOk = false;
3698
+ this._showCancel = true;
3699
+ this._autoHide = true;
3613
3700
  this.onShown = new EventEmitter();
3614
3701
  this.onHidden = new EventEmitter();
3615
3702
  this.onOk = new EventEmitter();
3616
3703
  this.componentType = ComponentType.Primary;
3617
- this.showHeader = true;
3618
- this.showFooter = true;
3704
+ this._large = false;
3705
+ this._xl = false;
3706
+ this._scrollable = false;
3707
+ this._fullscreen = false;
3708
+ this._showHeader = true;
3709
+ this._showFooter = true;
3619
3710
  this.onValidating = new EventEmitter(false);
3620
3711
  this.elementId = RandomHelper.randomHex();
3621
3712
  }
@@ -3649,6 +3740,66 @@ class ModalComponent extends CoreComponent {
3649
3740
  }
3650
3741
  }, 1);
3651
3742
  }
3743
+ get showOk() {
3744
+ return this._showOk;
3745
+ }
3746
+ set showOk(v) {
3747
+ this._showOk = Convert.toBoolean(v);
3748
+ }
3749
+ get disabledOk() {
3750
+ return this._disabledOk;
3751
+ }
3752
+ set disabledOk(v) {
3753
+ this._disabledOk = Convert.toBoolean(v);
3754
+ }
3755
+ get showCancel() {
3756
+ return this._showCancel;
3757
+ }
3758
+ set showCancel(v) {
3759
+ this._showCancel = Convert.toBoolean(v);
3760
+ }
3761
+ get autoHide() {
3762
+ return this._autoHide;
3763
+ }
3764
+ set autoHide(v) {
3765
+ this._autoHide = Convert.toBoolean(v);
3766
+ }
3767
+ get large() {
3768
+ return this._large;
3769
+ }
3770
+ set large(v) {
3771
+ this._large = Convert.toBoolean(v);
3772
+ }
3773
+ get xl() {
3774
+ return this._xl;
3775
+ }
3776
+ set xl(v) {
3777
+ this._xl = Convert.toBoolean(v);
3778
+ }
3779
+ get scrollable() {
3780
+ return this._scrollable;
3781
+ }
3782
+ set scrollable(v) {
3783
+ this._scrollable = Convert.toBoolean(v);
3784
+ }
3785
+ get fullscreen() {
3786
+ return this._fullscreen;
3787
+ }
3788
+ set fullscreen(v) {
3789
+ this._fullscreen = Convert.toBoolean(v);
3790
+ }
3791
+ get showHeader() {
3792
+ return this._showHeader;
3793
+ }
3794
+ set showHeader(v) {
3795
+ this._showHeader = Convert.toBoolean(v);
3796
+ }
3797
+ get showFooter() {
3798
+ return this._showFooter;
3799
+ }
3800
+ set showFooter(v) {
3801
+ this._showFooter = Convert.toBoolean(v);
3802
+ }
3652
3803
  // public get modal(): any {
3653
3804
  // if (!this._modal) {
3654
3805
  // this.getModal();
@@ -4054,24 +4205,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4054
4205
 
4055
4206
  class GridToolbarComponent {
4056
4207
  constructor() {
4057
- this.showEdit = true;
4058
- this.editEnabled = true;
4059
- this.showDelete = true;
4060
- this.deleteEnabled = true;
4061
- this.showRestore = false;
4062
- this.restoreEnabled = true;
4208
+ this._showEdit = true;
4209
+ this._editEnabled = true;
4210
+ this._showDelete = true;
4211
+ this._deleteEnabled = true;
4212
+ this._showRestore = false;
4213
+ this._restoreEnabled = true;
4063
4214
  this.approveText = 'Action.Approve';
4064
- this.showApprove = false;
4065
- this.approveEnabled = false;
4215
+ this._showApprove = false;
4216
+ this._approveEnabled = false;
4066
4217
  this.disapproveText = 'Action.Disapprove';
4067
- this.showDisapprove = false;
4068
- this.disapproveEnabled = false;
4218
+ this._showDisapprove = false;
4219
+ this._disapproveEnabled = false;
4069
4220
  this.onEdit = new EventEmitter();
4070
4221
  this.onDelete = new EventEmitter();
4071
4222
  this.onApprove = new EventEmitter();
4072
4223
  this.onDisapprove = new EventEmitter();
4073
4224
  this.onRestore = new EventEmitter();
4074
4225
  }
4226
+ get showEdit() {
4227
+ return this._showEdit;
4228
+ }
4229
+ set showEdit(v) {
4230
+ this._showEdit = Convert.toBoolean(v);
4231
+ }
4232
+ get editEnabled() {
4233
+ return this._editEnabled;
4234
+ }
4235
+ set editEnabled(v) {
4236
+ this._editEnabled = Convert.toBoolean(v);
4237
+ }
4238
+ get showDelete() {
4239
+ return this._showDelete;
4240
+ }
4241
+ set showDelete(v) {
4242
+ this._showDelete = Convert.toBoolean(v);
4243
+ }
4244
+ get deleteEnabled() {
4245
+ return this._deleteEnabled;
4246
+ }
4247
+ set deleteEnabled(v) {
4248
+ this._deleteEnabled = Convert.toBoolean(v);
4249
+ }
4250
+ get showRestore() {
4251
+ return this._showRestore;
4252
+ }
4253
+ set showRestore(v) {
4254
+ this._showRestore = Convert.toBoolean(v);
4255
+ }
4256
+ get restoreEnabled() {
4257
+ return this._restoreEnabled;
4258
+ }
4259
+ set restoreEnabled(v) {
4260
+ this._restoreEnabled = Convert.toBoolean(v);
4261
+ }
4262
+ get showApprove() {
4263
+ return this._showApprove;
4264
+ }
4265
+ set showApprove(v) {
4266
+ this._showApprove = Convert.toBoolean(v);
4267
+ }
4268
+ get approveEnabled() {
4269
+ return this._approveEnabled;
4270
+ }
4271
+ set approveEnabled(v) {
4272
+ this._approveEnabled = Convert.toBoolean(v);
4273
+ }
4274
+ get showDisapprove() {
4275
+ return this._showDisapprove;
4276
+ }
4277
+ set showDisapprove(v) {
4278
+ this._showDisapprove = Convert.toBoolean(v);
4279
+ }
4280
+ get disapproveEnabled() {
4281
+ return this._disapproveEnabled;
4282
+ }
4283
+ set disapproveEnabled(v) {
4284
+ this._disapproveEnabled = Convert.toBoolean(v);
4285
+ }
4075
4286
  edit() {
4076
4287
  //this.router.navigate([this.router.url, this.model]);
4077
4288
  this.onEdit.emit(this.model);
@@ -4172,18 +4383,54 @@ class ListToolbarComponent {
4172
4383
  constructor(router) {
4173
4384
  this.router = router;
4174
4385
  this.printType = PrintType;
4175
- this.isFiltered = false;
4176
- this.showCreate = true;
4177
- this.showFilter = true;
4178
- this.showPrint = false;
4179
- this.showSum = false;
4180
- this.showExport = false;
4386
+ this._isFiltered = false;
4387
+ this._showCreate = true;
4388
+ this._showFilter = true;
4389
+ this._showPrint = false;
4390
+ this._showSum = false;
4391
+ this._showExport = false;
4181
4392
  this.onRefresh = new EventEmitter();
4182
4393
  this.onFilter = new EventEmitter();
4183
4394
  this.onPrint = new EventEmitter();
4184
4395
  this.onSum = new EventEmitter();
4185
4396
  this.onExport = new EventEmitter();
4186
4397
  }
4398
+ get isFiltered() {
4399
+ return this._isFiltered;
4400
+ }
4401
+ set isFiltered(v) {
4402
+ this._isFiltered = Convert.toBoolean(v);
4403
+ }
4404
+ get showCreate() {
4405
+ return this._showCreate;
4406
+ }
4407
+ set showCreate(v) {
4408
+ this._showCreate = Convert.toBoolean(v);
4409
+ }
4410
+ get showFilter() {
4411
+ return this._showFilter;
4412
+ }
4413
+ set showFilter(v) {
4414
+ this._showFilter = Convert.toBoolean(v);
4415
+ }
4416
+ get showPrint() {
4417
+ return this._showPrint;
4418
+ }
4419
+ set showPrint(v) {
4420
+ this._showPrint = Convert.toBoolean(v);
4421
+ }
4422
+ get showSum() {
4423
+ return this._showSum;
4424
+ }
4425
+ set showSum(v) {
4426
+ this._showSum = Convert.toBoolean(v);
4427
+ }
4428
+ get showExport() {
4429
+ return this._showExport;
4430
+ }
4431
+ set showExport(v) {
4432
+ this._showExport = Convert.toBoolean(v);
4433
+ }
4187
4434
  refresh() {
4188
4435
  this.onRefresh.emit();
4189
4436
  }
@@ -4387,6 +4634,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4387
4634
  // export * from './loading-interceptor';
4388
4635
 
4389
4636
  class PageTitleComponent {
4637
+ constructor() {
4638
+ this._isEditPage = true;
4639
+ }
4640
+ get isEditPage() {
4641
+ return this._isEditPage;
4642
+ }
4643
+ set isEditPage(v) {
4644
+ this._isEditPage = Convert.toBoolean(v);
4645
+ }
4390
4646
  }
4391
4647
  PageTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PageTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4392
4648
  PageTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PageTitleComponent, selector: "zek-page-title", inputs: { icon: "icon", title: "title", isEditPage: "isEditPage", modelId: "modelId" }, ngImport: i0, template: "<h1 class=\"h2 pt-3 pb-2 mb-3 border-bottom\">\r\n <i *ngIf=\"icon\" class=\"{{icon}}\"></i><ng-container *ngIf=\"icon\">&nbsp;</ng-container>{{ title }}&nbsp;<ng-container *ngIf=\"isEditPage\">\r\n <small class=\"text-muted\" *ngIf=\"modelId && modelId > 0 else elseBlock\">[<ng-container>{{ 'Action.Edit' | translate }}</ng-container>]</small>\r\n <ng-template #elseBlock>\r\n <small class=\"text-muted\">[<ng-container>{{ 'Action.Create' | translate }}</ng-container>]</small>\r\n </ng-template>\r\n </ng-container>\r\n</h1>", dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
@@ -4427,11 +4683,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4427
4683
  class PagerComponent {
4428
4684
  constructor() {
4429
4685
  this.pager = new Pager();
4430
- this.showPageSize = true;
4686
+ this._showPageSize = true;
4431
4687
  this.pagerAlign = 'start';
4432
4688
  this.onPageChange = new EventEmitter();
4433
4689
  this.onPageSizeChange = new EventEmitter();
4434
4690
  }
4691
+ get showPageSize() {
4692
+ return this._showPageSize;
4693
+ }
4694
+ set showPageSize(v) {
4695
+ this._showPageSize = Convert.toBoolean(v);
4696
+ }
4435
4697
  setPage(page) {
4436
4698
  // if (!this.pager) return;
4437
4699
  if (page === this.pager.pageNumber)
@@ -4502,12 +4764,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4502
4764
  class PasswordComponent {
4503
4765
  constructor() {
4504
4766
  this.name = 'Password';
4505
- this.required = false;
4767
+ this._required = false;
4506
4768
  this.minlength = null;
4507
4769
  this.maxlength = null;
4508
4770
  this.onChange = new EventEmitter();
4509
4771
  this._type = 'password';
4510
4772
  }
4773
+ get required() {
4774
+ return this._required;
4775
+ }
4776
+ set required(v) {
4777
+ this._required = Convert.toBoolean(v);
4778
+ }
4511
4779
  get type() {
4512
4780
  return this._type;
4513
4781
  }
@@ -4580,9 +4848,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4580
4848
  }]
4581
4849
  }] });
4582
4850
 
4583
- let uniqueId = 0;
4851
+ let uniqueId$1 = 0;
4584
4852
  /**
4585
- * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
4853
+ * Provider Expression that allows zek-radio to register as a ControlValueAccessor. This
4586
4854
  * allows it to support [(ngModel)] and ngControl.
4587
4855
  * @docs-private
4588
4856
  */
@@ -4595,7 +4863,7 @@ class RadioComponent extends CoreUiComponent {
4595
4863
  constructor(_changeDetector, _renderer, _elementRef) {
4596
4864
  super(_renderer, _elementRef);
4597
4865
  this._changeDetector = _changeDetector;
4598
- this._uniqueId = `zek-radio-${++uniqueId}`;
4866
+ this._uniqueId = `zek-radio-${++uniqueId$1}`;
4599
4867
  /** The unique ID for the radio button. */
4600
4868
  this.id = this._uniqueId;
4601
4869
  this.inline = false;
@@ -4718,12 +4986,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4718
4986
 
4719
4987
  class ReadOnlyDirective {
4720
4988
  constructor() {
4721
- this._isReadonly = false;
4989
+ this._readonly = false;
4722
4990
  }
4723
- set readonly(v) {
4724
- this._isReadonly = v == true || v == '';
4991
+ readonly(v) {
4992
+ this._readonly = Convert.toBoolean(v);
4725
4993
  }
4726
- ;
4727
4994
  }
4728
4995
  ReadOnlyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReadOnlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4729
4996
  ReadOnlyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ReadOnlyDirective, selector: "[readonly],[readOnly]", inputs: { readonly: "readonly" }, host: { properties: { "attr.readonly": "_isReadonly ? \"\" : null" } }, ngImport: i0 });
@@ -4911,6 +5178,221 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4911
5178
  }]
4912
5179
  }] });
4913
5180
 
5181
+ let uniqueId = 0;
5182
+ const ZEK_SELECT_MULTIPLE_CONTROL_VALUE_ACCESSOR = {
5183
+ provide: NG_VALUE_ACCESSOR,
5184
+ useExisting: forwardRef(() => ZekSelectMultiple),
5185
+ multi: true,
5186
+ };
5187
+ class ZekSelectMultiple extends CoreUiComponent {
5188
+ constructor(renderer, elementRef) {
5189
+ super(renderer, elementRef);
5190
+ this._uniqueId = `zek-select-${++uniqueId}`;
5191
+ /** The unique ID for the radio button. */
5192
+ this.id = this._uniqueId;
5193
+ this.css = 'primary';
5194
+ this._placeholder = '';
5195
+ this._label = '';
5196
+ this._multiple = true;
5197
+ this._selected = [];
5198
+ this._data = [];
5199
+ this.normalized = [];
5200
+ this._text = '';
5201
+ }
5202
+ get placeholder() {
5203
+ return this._placeholder;
5204
+ }
5205
+ set placeholder(value) {
5206
+ if (value)
5207
+ this._placeholder = value;
5208
+ else
5209
+ this._placeholder = '';
5210
+ }
5211
+ get label() {
5212
+ return this._label;
5213
+ }
5214
+ set label(value) {
5215
+ if (value)
5216
+ this._label = value;
5217
+ else
5218
+ this._label = '';
5219
+ }
5220
+ get multiple() {
5221
+ return this._multiple;
5222
+ }
5223
+ set multiple(value) {
5224
+ this._multiple = Convert.toBoolean(value);
5225
+ }
5226
+ get data() {
5227
+ return this._data;
5228
+ }
5229
+ set data(value) {
5230
+ if (this._data !== value) {
5231
+ this._data = value;
5232
+ this.onDataChanged();
5233
+ }
5234
+ }
5235
+ onDataChanged() {
5236
+ this._setSelectionByValue(this._value);
5237
+ if (this.isInitialized) {
5238
+ this._normalizeData();
5239
+ }
5240
+ }
5241
+ onValueChanged() {
5242
+ if (Array.isArray(this._data)) {
5243
+ this._setSelectionByValue(this._value);
5244
+ }
5245
+ }
5246
+ init() {
5247
+ this._normalizeData();
5248
+ }
5249
+ _normalizeData() {
5250
+ this.normalized = [];
5251
+ if (Array.isArray(this._data)) {
5252
+ if (this.valueField && this.textField) {
5253
+ for (const item of this._data) {
5254
+ this.normalized.push({ key: item[this.valueField], value: item[this.textField], checked: this._selected.includes(item), item: item });
5255
+ }
5256
+ }
5257
+ else {
5258
+ for (const item of this._data) {
5259
+ this.normalized.push({ key: item, value: item, checked: this._selected.includes(item), item });
5260
+ }
5261
+ }
5262
+ }
5263
+ }
5264
+ /**
5265
+ * Sets the selected option based on a value. If no option can be
5266
+ * found with the designated value, the select trigger is cleared.
5267
+ */
5268
+ _setSelectionByValue(value) {
5269
+ this._selected = [];
5270
+ if (this.multiple && value) {
5271
+ if (!Array.isArray(value)) {
5272
+ throw new Error("value is not array");
5273
+ }
5274
+ if (Array.isArray(this._data)) {
5275
+ let notUnique = [];
5276
+ if (this.valueField) {
5277
+ for (const currentValue of value) {
5278
+ let items = ArrayHelper.filterByKey(currentValue, this.valueField, this._data);
5279
+ notUnique = notUnique.concat(items);
5280
+ }
5281
+ }
5282
+ else {
5283
+ for (const currentValue of value) {
5284
+ let items = this._data.filter(x => x === currentValue);
5285
+ notUnique = notUnique.concat(items);
5286
+ }
5287
+ }
5288
+ this._selected = ArrayHelper.distinct(notUnique);
5289
+ }
5290
+ }
5291
+ else {
5292
+ if (Array.isArray(this._data)) {
5293
+ if (this.valueField) {
5294
+ this._selected = ArrayHelper.filterByKey(value, this.valueField, this._data);
5295
+ }
5296
+ else {
5297
+ this._selected = this._data.filter(x => x === value);
5298
+ }
5299
+ }
5300
+ }
5301
+ for (const norm of this.normalized) {
5302
+ norm.checked = this._selected.includes(norm.item);
5303
+ }
5304
+ this._initText();
5305
+ }
5306
+ toggleChecked(v) {
5307
+ if (v && !this.disabled && !this.readonly) {
5308
+ if (!v.checked) {
5309
+ v.checked = true;
5310
+ if (this.multiple) {
5311
+ let tmp = [];
5312
+ for (const item of this.normalized) {
5313
+ if (item.checked) {
5314
+ tmp.push(item.key);
5315
+ }
5316
+ }
5317
+ this.setNgModel(tmp);
5318
+ // this.value = tmp;
5319
+ }
5320
+ else {
5321
+ //this.value = v.key;
5322
+ this.setNgModel(v.key);
5323
+ }
5324
+ }
5325
+ else {
5326
+ v.checked = false;
5327
+ if (this.multiple) {
5328
+ if (Array.isArray(this._value)) {
5329
+ this.setNgModel(this._value.filter(x => x !== v.key));
5330
+ }
5331
+ }
5332
+ else {
5333
+ this.setNgModel(null);
5334
+ }
5335
+ }
5336
+ }
5337
+ }
5338
+ _initText() {
5339
+ let field = this.checkedTextField || this.textField || '';
5340
+ if (field) {
5341
+ this._text = this._selected.filter(x => x !== undefined && x !== null).map(x => x[field]).join(', ');
5342
+ }
5343
+ else {
5344
+ this._text = this._selected.join(', ');
5345
+ }
5346
+ }
5347
+ }
5348
+ ZekSelectMultiple.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectMultiple, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5349
+ ZekSelectMultiple.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekSelectMultiple, selector: "zek-select,[zek-select]", inputs: { id: "id", valueField: "valueField", textField: "textField", checkedTextField: "checkedTextField", css: "css", placeholder: "placeholder", label: "label", multiple: "multiple", data: "data" }, providers: [ZEK_SELECT_MULTIPLE_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<div class=\"dropdown\" id=\"dropdown-{{id}}\">\r\n <button class=\"btn btn-{{css}} dropdown-toggle\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\">\r\n {{label}} <ng-container *ngIf=\"!_text\">{{placeholder}}</ng-container> {{_text}}\r\n </button>\r\n <ul class=\"dropdown-menu\">\r\n <ng-container *ngIf=\"normalized\">\r\n <li><a class=\"dropdown-item\" href=\"javascript:void(0)\" *ngFor=\"let item of normalized\" (click)=\"toggleChecked(item)\">\r\n <span *ngIf=\"item.checked\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.checked\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item.value}}\r\n </a></li>\r\n </ng-container>\r\n </ul>\r\n</div>", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectMultiple, decorators: [{
5351
+ type: Component,
5352
+ args: [{ selector: 'zek-select,[zek-select]', providers: [ZEK_SELECT_MULTIPLE_CONTROL_VALUE_ACCESSOR], template: "<div class=\"dropdown\" id=\"dropdown-{{id}}\">\r\n <button class=\"btn btn-{{css}} dropdown-toggle\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\">\r\n {{label}} <ng-container *ngIf=\"!_text\">{{placeholder}}</ng-container> {{_text}}\r\n </button>\r\n <ul class=\"dropdown-menu\">\r\n <ng-container *ngIf=\"normalized\">\r\n <li><a class=\"dropdown-item\" href=\"javascript:void(0)\" *ngFor=\"let item of normalized\" (click)=\"toggleChecked(item)\">\r\n <span *ngIf=\"item.checked\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.checked\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item.value}}\r\n </a></li>\r\n </ng-container>\r\n </ul>\r\n</div>" }]
5353
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { id: [{
5354
+ type: Input
5355
+ }], valueField: [{
5356
+ type: Input
5357
+ }], textField: [{
5358
+ type: Input
5359
+ }], checkedTextField: [{
5360
+ type: Input
5361
+ }], css: [{
5362
+ type: Input
5363
+ }], placeholder: [{
5364
+ type: Input
5365
+ }], label: [{
5366
+ type: Input
5367
+ }], multiple: [{
5368
+ type: Input
5369
+ }], data: [{
5370
+ type: Input
5371
+ }] } });
5372
+
5373
+ class ZekSelectModule {
5374
+ }
5375
+ ZekSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5376
+ ZekSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectModule, declarations: [ZekSelectMultiple], imports: [CommonModule,
5377
+ FormsModule], exports: [ZekSelectMultiple] });
5378
+ ZekSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectModule, imports: [CommonModule,
5379
+ FormsModule] });
5380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekSelectModule, decorators: [{
5381
+ type: NgModule,
5382
+ args: [{
5383
+ imports: [
5384
+ CommonModule,
5385
+ FormsModule
5386
+ ],
5387
+ declarations: [
5388
+ ZekSelectMultiple
5389
+ ],
5390
+ exports: [
5391
+ ZekSelectMultiple
5392
+ ],
5393
+ }]
5394
+ }] });
5395
+
4914
5396
  class Select2Component {
4915
5397
  constructor() {
4916
5398
  this.elementId = RandomHelper.randomHex();
@@ -5609,6 +6091,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
5609
6091
  type: Input
5610
6092
  }] } });
5611
6093
 
6094
+ // import { AbstractControl, Validators, ValidatorFn, ValidationErrors } from '@angular/forms'
6095
+ // export const range = (range?: Array<number> | null): ValidatorFn => {
6096
+ // return (control: AbstractControl): { [key: string]: any } | null => {
6097
+ // if (!range) return null;
6098
+ // if (Validators.required(control)) return null;
6099
+ // let v: number = +control.value;
6100
+ // return v >= range[0] && v <= range[1] ? null : { actualValue: v, requiredValue: range, range: true };
6101
+ // };
6102
+ // };
6103
+ // export function blue(): ValidatorFn {
6104
+ // return (control: AbstractControl): { [key: string]: any } | null =>
6105
+ // control.value?.toLowerCase() === 'blue'
6106
+ // ? null : { wrongColor: control.value };
6107
+ // }
6108
+ function isEmptyInputValue(value) {
6109
+ /**
6110
+ * Check if the object is a string or array before evaluating the length attribute.
6111
+ * This avoids falsely rejecting objects that contain a custom length attribute.
6112
+ * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.
6113
+ */
6114
+ return typeof value === 'undefined' || value == null || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0);
6115
+ }
6116
+ /**
6117
+ * Function that has `ValidatorFn` shape, but performs no operation.
6118
+ */
6119
+ function nullValidator(control) {
6120
+ return null;
6121
+ }
6122
+ class Validators {
6123
+ /**
6124
+ * @description
6125
+ * Validator that requires the control's value to be less than or equal to the provided number.
6126
+ *
6127
+ * @usageNotes
6128
+ *
6129
+ * ### Validate against a range 0 - 15
6130
+ *
6131
+ * ```typescript
6132
+ * const control = new FormControl(16, Validators.max([0,15]));
6133
+ *
6134
+ * console.log(control.errors); // {range: {min: 0, max: 15, actual: 16}}
6135
+ * ```
6136
+ *
6137
+ * @returns A validator function that returns an error map with the
6138
+ * `range` property if the validation check fails, otherwise `null`.
6139
+ *
6140
+ * @see `updateValueAndValidity()`
6141
+ *
6142
+ */
6143
+ static range(min, max) {
6144
+ return rangeValidator([min, max]);
6145
+ }
6146
+ }
6147
+ /**
6148
+ * Validator that requires the control's value to be between provided numbers.
6149
+ * See `Validators.range` for additional information.
6150
+ */
6151
+ function rangeValidator(range) {
6152
+ return (control) => {
6153
+ if (isEmptyInputValue(control.value) || isEmptyInputValue(range) || range.length < 2) {
6154
+ return null; // don't validate empty values to allow optional controls
6155
+ }
6156
+ const value = parseFloat(control.value);
6157
+ let max = range[0];
6158
+ let min = range[1];
6159
+ if (!isNaN(value) && (value < min || value > max)) {
6160
+ return { 'range': { 'min': min, 'max': max, 'actual': control.value } };
6161
+ }
6162
+ return null;
6163
+ };
6164
+ }
6165
+
6166
+ const RANGE_VALIDATOR = {
6167
+ provide: NG_VALIDATORS,
6168
+ useExisting: forwardRef(() => RangeValidator),
6169
+ multi: true
6170
+ };
6171
+ function toFloat(value) {
6172
+ return typeof value === 'number' ? value : parseFloat(value);
6173
+ }
6174
+ class AbstractValidatorDirective {
6175
+ constructor() {
6176
+ this._validator = nullValidator;
6177
+ }
6178
+ /** @nodoc */
6179
+ ngOnChanges(changes) {
6180
+ if (this.inputName in changes) {
6181
+ const input = this.normalizeInput(changes[this.inputName].currentValue);
6182
+ this._enabled = this.enabled(input);
6183
+ this._validator = this._enabled ? this.createValidator(input) : nullValidator;
6184
+ if (this._onChange) {
6185
+ this._onChange();
6186
+ }
6187
+ }
6188
+ }
6189
+ /** @nodoc */
6190
+ validate(control) {
6191
+ return this._validator(control);
6192
+ }
6193
+ /** @nodoc */
6194
+ registerOnValidatorChange(fn) {
6195
+ this._onChange = fn;
6196
+ }
6197
+ /**
6198
+ * @description
6199
+ * Determines whether this validator should be active or not based on an input.
6200
+ * Base class implementation checks whether an input is defined (if the value is different from
6201
+ * `null` and `undefined`). Validator classes that extend this base class can override this
6202
+ * function with the logic specific to a particular validator directive.
6203
+ */
6204
+ enabled(input) {
6205
+ return input != null /* both `null` and `undefined` */;
6206
+ }
6207
+ }
6208
+ AbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6209
+ AbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });
6210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AbstractValidatorDirective, decorators: [{
6211
+ type: Directive
6212
+ }] });
6213
+ class RangeValidator extends AbstractValidatorDirective {
6214
+ constructor() {
6215
+ super(...arguments);
6216
+ /** @internal */
6217
+ this.inputName = 'range';
6218
+ /** @internal */
6219
+ this.normalizeInput = (input) => toFloat(input);
6220
+ /** @internal */
6221
+ this.createValidator = (range) => rangeValidator(range);
6222
+ }
6223
+ }
6224
+ RangeValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RangeValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6225
+ RangeValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: RangeValidator, selector: "input[type=number][range][formControlName],input[type=number][range][formControl],input[type=number][range][ngModel]", inputs: { range: "range" }, host: { properties: { "attr.range": "_enabled ? range : null" } }, providers: [RANGE_VALIDATOR], usesInheritance: true, ngImport: i0 });
6226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RangeValidator, decorators: [{
6227
+ type: Directive,
6228
+ args: [{
6229
+ selector: 'input[type=number][range][formControlName],input[type=number][range][formControl],input[type=number][range][ngModel]',
6230
+ providers: [RANGE_VALIDATOR],
6231
+ host: { '[attr.range]': '_enabled ? range : null' }
6232
+ }]
6233
+ }], propDecorators: { range: [{
6234
+ type: Input
6235
+ }] } });
6236
+
6237
+ class ValidatorsModule {
6238
+ }
6239
+ ValidatorsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6240
+ ValidatorsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ValidatorsModule, declarations: [RangeValidator], imports: [CommonModule], exports: [RangeValidator] });
6241
+ ValidatorsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorsModule, imports: [CommonModule] });
6242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorsModule, decorators: [{
6243
+ type: NgModule,
6244
+ args: [{
6245
+ imports: [
6246
+ CommonModule
6247
+ ],
6248
+ declarations: [
6249
+ RangeValidator,
6250
+ ],
6251
+ exports: [RangeValidator]
6252
+ }]
6253
+ }] });
6254
+
5612
6255
  class WizardComponent {
5613
6256
  constructor() {
5614
6257
  this.progress = 0;
@@ -5716,5 +6359,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
5716
6359
  * Generated bundle index. Do not edit.
5717
6360
  */
5718
6361
 
5719
- export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, ValidEventArgs, ValidationComponent, ValidatorModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZEK_BB_CONTROL_VALUE_ACCESSOR, ZEK_RADIO_CONTROL_VALUE_ACCESSOR, firstBy, handler };
6362
+ export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
5720
6363
  //# sourceMappingURL=zek.mjs.map