@firestitch/common 12.6.5 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/app/directives/index.d.ts +4 -0
  2. package/app/directives/model-change.directive.d.ts +16 -0
  3. package/app/fs-common.module.d.ts +3 -2
  4. package/{esm2015/app/directives/autofocus.directive.js → esm2020/app/directives/autofocus.directive.mjs} +4 -4
  5. package/esm2020/app/directives/index.mjs +5 -0
  6. package/esm2020/app/directives/model-change.directive.mjs +37 -0
  7. package/{esm2015/app/directives/prevent-default.directive.js → esm2020/app/directives/prevent-default.directive.mjs} +4 -4
  8. package/{esm2015/app/directives/stop-propagation.directive.js → esm2020/app/directives/stop-propagation.directive.mjs} +4 -4
  9. package/esm2020/app/fs-common.module.mjs +98 -0
  10. package/{esm2015/app/pipes/bytes.pipe.js → esm2020/app/pipes/bytes.pipe.mjs} +4 -4
  11. package/{esm2015/app/pipes/currency.pipe.js → esm2020/app/pipes/currency.pipe.mjs} +4 -4
  12. package/{esm2015/app/pipes/number.pipe.js → esm2020/app/pipes/number.pipe.mjs} +4 -4
  13. package/{esm2015/app/pipes/ordinal-number.pipe.js → esm2020/app/pipes/ordinal-number.pipe.mjs} +4 -4
  14. package/{esm2015/app/pipes/truncate.pipe.js → esm2020/app/pipes/truncate.pipe.mjs} +4 -4
  15. package/esm2020/app/pipes/util.pipe.mjs +60 -0
  16. package/{esm2015/app/services/array.service.js → esm2020/app/services/array.service.mjs} +4 -4
  17. package/{esm2015/app/services/math.service.js → esm2020/app/services/math.service.mjs} +4 -4
  18. package/{esm2015/app/services/util.service.js → esm2020/app/services/util.service.mjs} +4 -4
  19. package/{esm2015/app/services/vaildate.service.js → esm2020/app/services/vaildate.service.mjs} +4 -4
  20. package/{esm2015/libs/index.js → esm2020/libs/index.mjs} +3 -3
  21. package/esm2020/libs/util/index.mjs +24 -0
  22. package/esm2020/libs/util/is-array-equal/index.mjs +2 -0
  23. package/esm2020/libs/util/is-class/index.mjs +2 -0
  24. package/esm2020/libs/util/is-class/is-class.mjs +18 -0
  25. package/esm2020/libs/util/is-empty/index.mjs +2 -0
  26. package/esm2020/libs/util/is-empty/is-empty.mjs +12 -0
  27. package/esm2020/libs/util/is-numeric/index.mjs +2 -0
  28. package/esm2020/libs/util/is-numeric/is-numeric.mjs +5 -0
  29. package/esm2020/libs/util/ordinal-number/index.mjs +2 -0
  30. package/esm2020/libs/util/source-loader/index.mjs +2 -0
  31. package/esm2020/libs/util/source-loader/source-loader.mjs +155 -0
  32. package/esm2020/public_api.mjs +17 -0
  33. package/fesm2015/firestitch-common.mjs +1712 -0
  34. package/fesm2015/firestitch-common.mjs.map +1 -0
  35. package/{fesm2015/firestitch-common.js → fesm2020/firestitch-common.mjs} +1047 -1001
  36. package/fesm2020/firestitch-common.mjs.map +1 -0
  37. package/libs/index.d.ts +2 -2
  38. package/libs/util/index.d.ts +14 -14
  39. package/libs/util/is-array-equal/index.d.ts +1 -0
  40. package/libs/util/is-class/index.d.ts +1 -0
  41. package/libs/util/is-empty/index.d.ts +1 -0
  42. package/libs/util/is-numeric/index.d.ts +1 -0
  43. package/libs/util/ordinal-number/index.d.ts +1 -0
  44. package/libs/util/source-loader/index.d.ts +1 -0
  45. package/libs/util/source-loader/source-loader.d.ts +4 -0
  46. package/package.json +20 -7
  47. package/public_api.d.ts +5 -7
  48. package/bundles/firestitch-common.umd.js +0 -2219
  49. package/bundles/firestitch-common.umd.js.map +0 -1
  50. package/esm2015/app/fs-common.module.js +0 -93
  51. package/esm2015/app/pipes/util.pipe.js +0 -60
  52. package/esm2015/libs/util/index.js +0 -24
  53. package/esm2015/libs/util/isClass/index.js +0 -2
  54. package/esm2015/libs/util/isClass/isClass.js +0 -18
  55. package/esm2015/libs/util/isEmpty/index.js +0 -2
  56. package/esm2015/libs/util/isEmpty/isEmpty.js +0 -12
  57. package/esm2015/libs/util/isNumeric/index.js +0 -2
  58. package/esm2015/libs/util/isNumeric/isNumeric.js +0 -5
  59. package/esm2015/libs/util/source-loader/source-loader.js +0 -145
  60. package/esm2015/public_api.js +0 -19
  61. package/fesm2015/firestitch-common.js.map +0 -1
  62. package/libs/util/isClass/index.d.ts +0 -1
  63. package/libs/util/isEmpty/index.d.ts +0 -1
  64. package/libs/util/isNumeric/index.d.ts +0 -1
  65. /package/{esm2015/app/pipes/index.js → esm2020/app/pipes/index.mjs} +0 -0
  66. /package/{esm2015/firestitch-common.js → esm2020/firestitch-common.mjs} +0 -0
  67. /package/{esm2015/libs/array/compare/compare.js → esm2020/libs/array/compare/compare.mjs} +0 -0
  68. /package/{esm2015/libs/array/compare/index.js → esm2020/libs/array/compare/index.mjs} +0 -0
  69. /package/{esm2015/libs/array/filter/filter.js → esm2020/libs/array/filter/filter.mjs} +0 -0
  70. /package/{esm2015/libs/array/filter/index.js → esm2020/libs/array/filter/index.mjs} +0 -0
  71. /package/{esm2015/libs/array/find/find.js → esm2020/libs/array/find/find.mjs} +0 -0
  72. /package/{esm2015/libs/array/find/index.js → esm2020/libs/array/find/index.mjs} +0 -0
  73. /package/{esm2015/libs/array/inArray/inArray.js → esm2020/libs/array/inArray/inArray.mjs} +0 -0
  74. /package/{esm2015/libs/array/inArray/index.js → esm2020/libs/array/inArray/index.mjs} +0 -0
  75. /package/{esm2015/libs/array/index/index.js → esm2020/libs/array/index/index.mjs} +0 -0
  76. /package/{esm2015/libs/array/index.js → esm2020/libs/array/index.mjs} +0 -0
  77. /package/{esm2015/libs/array/indexOf/index.js → esm2020/libs/array/indexOf/index.mjs} +0 -0
  78. /package/{esm2015/libs/array/indexOf/indexOf.js → esm2020/libs/array/indexOf/indexOf.mjs} +0 -0
  79. /package/{esm2015/libs/array/keyExists/index.js → esm2020/libs/array/keyExists/index.mjs} +0 -0
  80. /package/{esm2015/libs/array/keyExists/keyExists.js → esm2020/libs/array/keyExists/keyExists.mjs} +0 -0
  81. /package/{esm2015/libs/array/ksort/index.js → esm2020/libs/array/ksort/index.mjs} +0 -0
  82. /package/{esm2015/libs/array/ksort/ksort.js → esm2020/libs/array/ksort/ksort.mjs} +0 -0
  83. /package/{esm2015/libs/array/list/index.js → esm2020/libs/array/list/index.mjs} +0 -0
  84. /package/{esm2015/libs/array/list/list.js → esm2020/libs/array/list/list.mjs} +0 -0
  85. /package/{esm2015/libs/array/nameValue/index.js → esm2020/libs/array/nameValue/index.mjs} +0 -0
  86. /package/{esm2015/libs/array/nameValue/nameValue.js → esm2020/libs/array/nameValue/nameValue.mjs} +0 -0
  87. /package/{esm2015/libs/array/remove/index.js → esm2020/libs/array/remove/index.mjs} +0 -0
  88. /package/{esm2015/libs/array/remove/remove.js → esm2020/libs/array/remove/remove.mjs} +0 -0
  89. /package/{esm2015/libs/array/rsort/index.js → esm2020/libs/array/rsort/index.mjs} +0 -0
  90. /package/{esm2015/libs/array/rsort/rsort.js → esm2020/libs/array/rsort/rsort.mjs} +0 -0
  91. /package/{esm2015/libs/array/sort/index.js → esm2020/libs/array/sort/index.mjs} +0 -0
  92. /package/{esm2015/libs/array/sort/sort.js → esm2020/libs/array/sort/sort.mjs} +0 -0
  93. /package/{esm2015/libs/format/acronym/acronym.js → esm2020/libs/format/acronym/acronym.mjs} +0 -0
  94. /package/{esm2015/libs/format/acronym/index.js → esm2020/libs/format/acronym/index.mjs} +0 -0
  95. /package/{esm2015/libs/format/bytes/bytes.js → esm2020/libs/format/bytes/bytes.mjs} +0 -0
  96. /package/{esm2015/libs/format/bytes/index.js → esm2020/libs/format/bytes/index.mjs} +0 -0
  97. /package/{esm2015/libs/format/currency/currency.js → esm2020/libs/format/currency/currency.mjs} +0 -0
  98. /package/{esm2015/libs/format/currency/index.js → esm2020/libs/format/currency/index.mjs} +0 -0
  99. /package/{esm2015/libs/format/index.js → esm2020/libs/format/index.mjs} +0 -0
  100. /package/{esm2015/libs/format/number/index.js → esm2020/libs/format/number/index.mjs} +0 -0
  101. /package/{esm2015/libs/format/number/number.js → esm2020/libs/format/number/number.mjs} +0 -0
  102. /package/{esm2015/libs/format/truncate/index.js → esm2020/libs/format/truncate/index.mjs} +0 -0
  103. /package/{esm2015/libs/format/truncate/truncate.js → esm2020/libs/format/truncate/truncate.mjs} +0 -0
  104. /package/{esm2015/libs/rxjs/delayedRetry.js → esm2020/libs/rxjs/delayedRetry.mjs} +0 -0
  105. /package/{esm2015/libs/rxjs/keyboard-shortcut.js → esm2020/libs/rxjs/keyboard-shortcut.mjs} +0 -0
  106. /package/{esm2015/libs/util/boolean/boolean.js → esm2020/libs/util/boolean/boolean.mjs} +0 -0
  107. /package/{esm2015/libs/util/boolean/index.js → esm2020/libs/util/boolean/index.mjs} +0 -0
  108. /package/{esm2015/libs/util/clone/clone.js → esm2020/libs/util/clone/clone.mjs} +0 -0
  109. /package/{esm2015/libs/util/clone/index.js → esm2020/libs/util/clone/index.mjs} +0 -0
  110. /package/{esm2015/libs/util/debounce/debounce.js → esm2020/libs/util/debounce/debounce.mjs} +0 -0
  111. /package/{esm2015/libs/util/debounce/index.js → esm2020/libs/util/debounce/index.mjs} +0 -0
  112. /package/{esm2015/libs/util/get-normalized-path/get-normalized-path.js → esm2020/libs/util/get-normalized-path/get-normalized-path.mjs} +0 -0
  113. /package/{esm2015/libs/util/get-normalized-path/index.js → esm2020/libs/util/get-normalized-path/index.mjs} +0 -0
  114. /package/{esm2015/libs/util/guid/guid.js → esm2020/libs/util/guid/guid.mjs} +0 -0
  115. /package/{esm2015/libs/util/guid/index.js → esm2020/libs/util/guid/index.mjs} +0 -0
  116. /package/{esm2015/libs/util/is-array-equal/is-array-equal.js → esm2020/libs/util/is-array-equal/is-array-equal.mjs} +0 -0
  117. /package/{esm2015/libs/util/is-object/index.js → esm2020/libs/util/is-object/index.mjs} +0 -0
  118. /package/{esm2015/libs/util/is-object/is-object.js → esm2020/libs/util/is-object/is-object.mjs} +0 -0
  119. /package/{esm2015/libs/util/keys/index.js → esm2020/libs/util/keys/index.mjs} +0 -0
  120. /package/{esm2015/libs/util/keys/keys.js → esm2020/libs/util/keys/keys.mjs} +0 -0
  121. /package/{esm2015/libs/util/length/index.js → esm2020/libs/util/length/index.mjs} +0 -0
  122. /package/{esm2015/libs/util/length/length.js → esm2020/libs/util/length/length.mjs} +0 -0
  123. /package/{esm2015/libs/util/ordinal-number/ordinal-number.js → esm2020/libs/util/ordinal-number/ordinal-number.mjs} +0 -0
  124. /package/{esm2015/libs/util/queue/index.js → esm2020/libs/util/queue/index.mjs} +0 -0
  125. /package/{esm2015/libs/util/queue/operation.js → esm2020/libs/util/queue/operation.mjs} +0 -0
  126. /package/{esm2015/libs/util/queue/queue-stats.js → esm2020/libs/util/queue/queue-stats.mjs} +0 -0
  127. /package/{esm2015/libs/util/queue/queue.enum.js → esm2020/libs/util/queue/queue.enum.mjs} +0 -0
  128. /package/{esm2015/libs/util/queue/queue.js → esm2020/libs/util/queue/queue.mjs} +0 -0
  129. /package/{esm2015/libs/util/remove-query-params/index.js → esm2020/libs/util/remove-query-params/index.mjs} +0 -0
  130. /package/{esm2015/libs/util/remove-query-params/remove-query-params.js → esm2020/libs/util/remove-query-params/remove-query-params.mjs} +0 -0
  131. /package/{esm2015/libs/util/resolve/index.js → esm2020/libs/util/resolve/index.mjs} +0 -0
  132. /package/{esm2015/libs/util/resolve/resolve.js → esm2020/libs/util/resolve/resolve.mjs} +0 -0
  133. /package/{esm2015/libs/util/round/index.js → esm2020/libs/util/round/index.mjs} +0 -0
  134. /package/{esm2015/libs/util/round/round.js → esm2020/libs/util/round/round.mjs} +0 -0
  135. /package/{esm2015/libs/util/stringify/index.js → esm2020/libs/util/stringify/index.mjs} +0 -0
  136. /package/{esm2015/libs/util/stringify/stringify.js → esm2020/libs/util/stringify/stringify.mjs} +0 -0
  137. /package/{esm2015/libs/util/throttle/index.js → esm2020/libs/util/throttle/index.mjs} +0 -0
  138. /package/{esm2015/libs/util/throttle/throttle.js → esm2020/libs/util/throttle/throttle.mjs} +0 -0
  139. /package/{esm2015/libs/util/to-string/index.js → esm2020/libs/util/to-string/index.mjs} +0 -0
  140. /package/{esm2015/libs/util/to-string/to-string.js → esm2020/libs/util/to-string/to-string.mjs} +0 -0
  141. /package/{esm2015/libs/util/uuid/index.js → esm2020/libs/util/uuid/index.mjs} +0 -0
  142. /package/{esm2015/libs/util/uuid/uuid.js → esm2020/libs/util/uuid/uuid.mjs} +0 -0
  143. /package/{esm2015/libs/util/value/index.js → esm2020/libs/util/value/index.mjs} +0 -0
  144. /package/{esm2015/libs/util/value/value.js → esm2020/libs/util/value/value.mjs} +0 -0
  145. /package/{esm2015/libs/validate/email/email.js → esm2020/libs/validate/email/email.mjs} +0 -0
  146. /package/{esm2015/libs/validate/email/index.js → esm2020/libs/validate/email/index.mjs} +0 -0
  147. /package/{esm2015/libs/validate/index.js → esm2020/libs/validate/index.mjs} +0 -0
  148. /package/{esm2015/libs/validate/phone/index.js → esm2020/libs/validate/phone/index.mjs} +0 -0
  149. /package/{esm2015/libs/validate/phone/phone.js → esm2020/libs/validate/phone/phone.mjs} +0 -0
  150. /package/{esm2015/libs/validate/url/index.js → esm2020/libs/validate/url/index.mjs} +0 -0
  151. /package/{esm2015/libs/validate/url/url.js → esm2020/libs/validate/url/url.mjs} +0 -0
  152. /package/libs/util/{isClass/isClass.d.ts → is-class/is-class.d.ts} +0 -0
  153. /package/libs/util/{isEmpty/isEmpty.d.ts → is-empty/is-empty.d.ts} +0 -0
  154. /package/libs/util/{isNumeric/isNumeric.d.ts → is-numeric/is-numeric.d.ts} +0 -0
@@ -1,528 +1,122 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, LOCALE_ID, Inject, Directive, HostListener, Optional, Host, Input, NgModule } from '@angular/core';
3
1
  import { CurrencyPipe, CommonModule } from '@angular/common';
4
- import { Subject, Observable, of, combineLatest, iif, throwError, timer, fromEvent, merge } from 'rxjs';
5
- import { takeUntil, take, map, delay, finalize, shareReplay, retryWhen, tap, concatMap, distinctUntilChanged, share, filter as filter$1 } from 'rxjs/operators';
2
+ import * as i0 from '@angular/core';
3
+ import { Directive, Optional, Host, Input, EventEmitter, Output, HostListener, Pipe, LOCALE_ID, Inject, Injectable, NgModule } from '@angular/core';
6
4
  import * as i1 from '@angular/material/input';
5
+ import * as i1$1 from '@angular/forms';
6
+ import { Subject, Observable, of, combineLatest, iif, throwError, timer, fromEvent, merge } from 'rxjs';
7
+ import { debounceTime, takeUntil, take, map, delay, finalize, shareReplay, retryWhen, tap, concatMap, distinctUntilChanged, share, filter as filter$1 } from 'rxjs/operators';
7
8
 
8
- class FsArray {
9
- /**
10
- * @deprecated use import { nameValue } from @firestitch/common/array; instead
11
- */
12
- nameValue(array, name, value) {
13
- console.warn('@deprecated use import { nameValue } from @firestitch/common/array; instead');
14
- let list = [];
15
- if (name || value) {
16
- let nameFn = typeof name === 'function' ? name : function (item) { return item[name]; };
17
- let valueFn = typeof value === 'function' ? value : function (item) { return item[value]; };
18
- array.forEach(function (item) {
19
- list.push({ name: nameFn(item), value: valueFn(item) });
20
- });
21
- }
22
- else {
23
- array.forEach(function (name, value) {
24
- list.push({ name: name, value: value });
25
- });
26
- }
27
- return list;
28
- }
29
- /**
30
- * @deprecated use import { remove } from @firestitch/common/array; instead
31
- */
32
- remove(array, query) {
33
- console.warn('@deprecated use import { remove } from @firestitch/common/array; instead');
34
- let idx = this.indexOf(array, query);
35
- if (idx >= 0) {
36
- return array.splice(idx, 1);
37
- }
38
- return idx;
39
- }
40
- /**
41
- * @deprecated use import { indexOf } from @firestitch/common/array; instead
42
- */
43
- indexOf(array, query) {
44
- console.warn('@deprecated use import { indexOf } from @firestitch/common/array; instead');
45
- if (typeof query !== 'function') {
46
- let queryObj = query;
47
- query = (item) => {
48
- return this.compare(queryObj, item);
49
- };
50
- }
51
- for (let i = 0, len = array.length; i < len; i++) {
52
- if (query(array[i])) {
53
- return i;
54
- }
55
- }
56
- return -1;
57
- }
58
- /**
59
- * @deprecated use import { compare } from @firestitch/common/array; instead
60
- */
61
- compare(query, item) {
62
- console.warn('@deprecated use import { compare } from @firestitch/common/array; instead');
63
- let value = true;
64
- for (let key in query) {
65
- value = value && item[key] == query[key];
66
- }
67
- return value;
68
- }
69
- /**
70
- * @deprecated use import { filter } from @firestitch/common/array; instead
71
- */
72
- filter(array, query) {
73
- console.warn('@deprecated use import { filter } from @firestitch/common/array; instead');
74
- if (typeof query !== 'function') {
75
- let queryObj = query;
76
- query = (item) => {
77
- return this.compare(queryObj, item);
78
- };
79
- }
80
- let isarray = Array.isArray(array);
81
- let list = isarray ? [] : {};
82
- if (isarray)
83
- array.forEach(function (item, idx) {
84
- if (query(item)) {
85
- list.push(item);
86
- }
87
- });
88
- else
89
- Object.keys(array).forEach(key => {
90
- if (query(array[key])) {
91
- list[key] = array[key];
92
- }
93
- });
94
- return list;
95
- }
96
- /**
97
- * @deprecated use import { index } from @firestitch/common/array; instead
98
- */
99
- index(array, property) {
100
- console.warn('@deprecated use import { index } from @firestitch/common/array; instead');
101
- let list = {};
102
- array.forEach(function (item, idx) {
103
- list[item[property]] = item;
104
- });
105
- return list;
9
+ class FsAutofocusDirective {
10
+ constructor(_matInput, _el) {
11
+ this._matInput = _matInput;
12
+ this._el = _el;
13
+ this.fsAutofocus = true;
106
14
  }
107
- /**
108
- * @deprecated use import { sort } from @firestitch/common/array; instead
109
- */
110
- sort(array, query, reverse = false) {
111
- console.warn('@deprecated use import { sort } from @firestitch/common/array; instead');
112
- if (typeof query !== 'function') {
113
- let queryStr = query;
114
- query = function (a, b) {
115
- if (reverse) {
116
- if (a[queryStr] < b[queryStr]) {
117
- return 1;
118
- }
119
- else if (a[queryStr] > b[queryStr]) {
120
- return -1;
121
- }
122
- }
123
- else {
124
- if (a[queryStr] > b[queryStr]) {
125
- return 1;
126
- }
127
- else if (a[queryStr] < b[queryStr]) {
128
- return -1;
129
- }
130
- }
131
- return 0;
132
- };
15
+ ngAfterViewInit() {
16
+ if (this.fsAutofocus || this.fsAutofocus === undefined) {
17
+ this.focus();
133
18
  }
134
- array.sort(query);
135
- return array;
136
- }
137
- /**
138
- * @deprecated use import { rsort } from @firestitch/common/array; instead
139
- */
140
- rsort(array, query) {
141
- console.warn('@deprecated use import { rsort } from @firestitch/common/array; instead');
142
- return this.sort(array, query, true);
143
- }
144
- /**
145
- * @deprecated use import { list } from @firestitch/common/array; instead
146
- */
147
- list(array, property, index = null) {
148
- console.warn('@deprecated use import { list } from @firestitch/common/array; instead');
149
- let list = index ? {} : [];
150
- array.forEach(function (item, idx) {
151
- if (index) {
152
- list[item[index]] = item[property];
153
- }
154
- else {
155
- list.push(item[property]);
156
- }
157
- });
158
- return list;
159
19
  }
160
- /**
161
- * @deprecated use import { applyDepth } from @firestitch/common/array; instead
162
- */
163
- applyDepth(objects, parent_property, id_property = 'id', depth_property = 'depth') {
164
- console.warn('@deprecated use import { applyDepth } from @firestitch/common/array; instead');
165
- let keyed = {};
166
- objects.forEach(function (object) {
167
- if (!object[parent_property]) {
168
- object[depth_property] = 0;
20
+ focus() {
21
+ setTimeout(() => {
22
+ const tmpEl = document.createElement('input');
23
+ tmpEl.style.width = '0';
24
+ tmpEl.style.height = '0';
25
+ tmpEl.style.margin = '0';
26
+ tmpEl.style.padding = '0';
27
+ tmpEl.style.border = '0';
28
+ tmpEl.style.opacity = '0';
29
+ document.body.appendChild(tmpEl);
30
+ tmpEl.focus();
31
+ if (this._matInput) {
32
+ this._matInput.focus();
169
33
  }
170
- keyed[object[id_property]] = object;
171
- });
172
- Object.keys(keyed).forEach(key => {
173
- Object.keys(keyed).forEach(key => {
174
- let object = keyed[key];
175
- if (!keyed[key][depth_property]) {
176
- if (keyed[key][parent_property]) {
177
- keyed[key][depth_property] = keyed[keyed[key][parent_property]][depth_property] + 1;
178
- }
179
- }
180
- });
181
- });
182
- return keyed;
183
- }
184
- /**
185
- * @deprecated use import { inArray } from @firestitch/common/array; instead
186
- */
187
- inArray(values, array) {
188
- console.warn('@deprecated use import { inArray } from @firestitch/common/array; instead');
189
- if (!Array.isArray(values)) {
190
- values = [values];
191
- }
192
- for (let i = 0, len = values.length; i < len; i++) {
193
- if (array.indexOf(values[i]) >= 0) {
194
- return true;
34
+ else if (this._el.nativeElement.focus) {
35
+ this._el.nativeElement.focus();
195
36
  }
196
- }
197
- return false;
198
- }
199
- /**
200
- * @deprecated use import { keyExists } from @firestitch/common/array; instead
201
- */
202
- keyExists(array, key) {
203
- console.warn('@deprecated use import { keyExists } from @firestitch/common/array; instead');
204
- return array.hasOwnProperty(key);
37
+ document.body.removeChild(tmpEl);
38
+ }, 50);
205
39
  }
206
- /**
207
- * @deprecated use import { length } from @firestitch/common/array; instead
208
- */
209
- length(array) {
210
- console.warn('@deprecated use import { length } from @firestitch/common/array; instead');
211
- return array.length;
40
+ }
41
+ FsAutofocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutofocusDirective, deps: [{ token: i1.MatInput, host: true, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
42
+ FsAutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsAutofocusDirective, selector: "[fsAutofocus],[autofocus]", inputs: { fsAutofocus: "fsAutofocus" }, ngImport: i0 });
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsAutofocusDirective, decorators: [{
44
+ type: Directive,
45
+ args: [{
46
+ selector: '[fsAutofocus],[autofocus]',
47
+ }]
48
+ }], ctorParameters: function () { return [{ type: i1.MatInput, decorators: [{
49
+ type: Optional
50
+ }, {
51
+ type: Host
52
+ }] }, { type: i0.ElementRef }]; }, propDecorators: { fsAutofocus: [{
53
+ type: Input
54
+ }] } });
55
+
56
+ class FsModelChangeDirective {
57
+ constructor(_ngModel) {
58
+ this._ngModel = _ngModel;
59
+ this.fsModelChange = new EventEmitter();
60
+ this._destroy$ = new Subject();
212
61
  }
213
- /**
214
- * @deprecated use import { ksort } from @firestitch/common/array; instead
215
- */
216
- ksort(unordered) {
217
- console.warn('@deprecated use import { ksort } from @firestitch/common/array; instead');
218
- Object.keys(unordered).sort().forEach(function (key) {
219
- let value = unordered[key];
220
- delete unordered[key];
221
- unordered[key] = value;
62
+ ngOnInit() {
63
+ this._ngModel.update
64
+ .pipe(debounceTime(this.fsModelChangeOptions.debounce), takeUntil(this._destroy$))
65
+ .subscribe((value) => {
66
+ this.fsModelChange.emit(value);
222
67
  });
223
68
  }
224
- }
225
- FsArray.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsArray, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
226
- FsArray.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsArray });
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsArray, decorators: [{
228
- type: Injectable
229
- }] });
230
-
231
- class FsMath {
232
- /**
233
- * @deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}
234
- */
235
- round(number, precision) {
236
- console.warn('@deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}');
237
- precision = precision || 0;
238
- let factor = Math.pow(10, precision);
239
- let tempNumber = number * factor;
240
- let roundedTempNumber = Math.round(tempNumber);
241
- return roundedTempNumber / factor;
242
- }
243
- }
244
- FsMath.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMath, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
245
- FsMath.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMath });
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMath, decorators: [{
247
- type: Injectable
248
- }] });
249
-
250
- const KEY_CANCEL$1 = 3, KEY_HELP$1 = 6, KEY_BACKSPACE$1 = 8, KEY_TAB$1 = 9, KEY_CLEAR$1 = 12, KEY_RETURN$1 = 13, KEY_ENTER$1 = 14, KEY_SHIFT$1 = 16, KEY_CONTROL$1 = 17, KEY_ALT$1 = 18, KEY_PAUSE$1 = 19, KEY_CAPS_LOCK$1 = 20, KEY_ESCAPE$1 = 27, KEY_SPACE$1 = 32, KEY_PAGE_UP$1 = 33, KEY_PAGE_DOWN$1 = 34, KEY_END$1 = 35, KEY_HOME$1 = 36, KEY_LEFT$1 = 37, KEY_UP$1 = 38, KEY_RIGHT$1 = 39, KEY_DOWN$1 = 40, KEY_PRINTSCREEN$1 = 44, KEY_INSERT$1 = 45, KEY_DELETE$1 = 46, KEY_0$1 = 48, KEY_1$1 = 49, KEY_2$1 = 50, KEY_3$1 = 51, KEY_4$1 = 52, KEY_5$1 = 53, KEY_6$1 = 54, KEY_7$1 = 55, KEY_8$1 = 56, KEY_9$1 = 57, KEY_SEMICOLON$1 = 59, KEY_EQUALS$1 = 61;
251
- /*
252
- Basically, just copy-pasted functionality from fs-boilerplate v1.x, with some small changes (like we dont have angular.bind anymore, had to go with a workaround)
253
- There might be a better way to organise constatns but I need to know use-cases
254
- */
255
- class FsUtil {
256
- constructor() {
257
- this.intervals = {};
258
- }
259
- /**
260
- * @deprecated use @firestitch/common/util/guid instead
261
- */
262
- guid(pattern) {
263
- console.warn('@deprecated use @firestitch/common/util/guid instead');
264
- pattern = pattern || 'xxxxxx';
265
- return pattern.replace(/[xy]/g, function (c) {
266
- var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
267
- return v.toString(16);
268
- });
269
- }
270
- /**
271
- * @deprecated use import { uuid } from @firestitch/common/util; instead
272
- */
273
- uuid() {
274
- console.warn('@deprecated use @firestitch/common/util/uuid instead');
275
- return this.guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
276
- }
277
- /**
278
- * @deprecated use import { resolve } from @firestitch/common/util; instead
279
- */
280
- resolve(promise, defaults = []) {
281
- console.warn('@deprecated use @firestitch/common/util/resolve instead');
282
- const result = defaults;
283
- return new Promise(resolve => {
284
- promise.then(function (data) {
285
- Object.keys(data).forEach(key => result[key] = data[key]);
286
- resolve(result);
287
- });
288
- });
289
- }
290
- /**
291
- * @deprecated use _.toInteger() instead
292
- */
293
- int(value) {
294
- console.warn('@deprecated use _.toInteger() instead');
295
- value = parseInt(value);
296
- if (isNaN(value)) {
297
- value = 0;
298
- }
299
- return value;
300
- }
301
- /**
302
- * @deprecated use _.toFinite() instead
303
- */
304
- float(value) {
305
- console.warn('@deprecated use _.toFinite() instead');
306
- value = parseFloat(value);
307
- if (isNaN(value)) {
308
- value = 0;
309
- }
310
- return value;
311
- }
312
- /**
313
- * @deprecated use _.toString() instead
314
- */
315
- string(string) {
316
- console.warn('@deprecated use _.toString() instead');
317
- if (string === null || string === undefined) {
318
- string = '';
319
- }
320
- return (string).toString();
321
- }
322
- /**
323
- * @deprecated use import { isEmpty } from @firestitch/common/util; instead
324
- */
325
- isEmpty(value, options) {
326
- console.warn('@deprecated use import { isEmpty } from @firestitch/common/util; instead');
327
- options = options || {};
328
- return value === undefined ||
329
- value === null ||
330
- value === false ||
331
- value === '' ||
332
- !this.string(value).length ||
333
- (this.isObject(value) &&
334
- (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
335
- (!options.zero && (value === 0 || value === '0'));
336
- }
337
- /**
338
- * @deprecated use _.isInteger() instead
339
- */
340
- isInt(value, type) {
341
- console.warn('@deprecated use _.isInteger() instead');
342
- const int = !!this.string(value).match(/^\d+$/);
343
- if (!int) {
344
- return false;
345
- }
346
- if (type) {
347
- return Number.isInteger(value);
348
- }
349
- return true;
350
- }
351
- /**
352
- * @deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}
353
- */
354
- each(object, func) {
355
- console.warn('@deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}');
356
- if (!this.isArray(object) && !this.isObject(object)) {
357
- return;
358
- }
359
- Object.keys(object).forEach(function (key) {
360
- func(object[key], key);
361
- });
362
- }
363
- /**
364
- * @deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
365
- * or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead
366
- */
367
- isObject(value) {
368
- console.warn('@deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject} or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead');
369
- return value !== null && typeof value === 'object' && !this.isArray(value);
370
- }
371
- /**
372
- * @deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}
373
- */
374
- isString(value) {
375
- console.warn('@deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}');
376
- return typeof value === 'string' || value instanceof String;
377
- }
378
- /**
379
- * @deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}
380
- */
381
- isArray(value) {
382
- console.warn('@deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}');
383
- return value instanceof Array;
69
+ ngOnDestroy() {
70
+ this._destroy$.next();
71
+ this._destroy$.complete();
384
72
  }
385
- /**
386
- * @deprecated use import { isNumeric } from @firestitch/common/util; instead
387
- */
388
- isNumeric(value) {
389
- console.warn('@deprecated use import { isNumeric } from @firestitch/common/util; instead');
390
- return this.string(value).length && !!this.string(value).match(/^-?\d*\.?\d*$/);
391
- }
392
- /**
393
- * @deprecated use import { isClass } from @firestitch/common/util; instead
394
- */
395
- isClass(value, cls) {
396
- console.warn('@deprecated use import { isClass } from @firestitch/common/util; instead');
397
- if (this.isObject(value)) {
398
- if (this.isString(cls)) {
399
- if (value.constructor) {
400
- if (value.constructor.name === cls) {
401
- return true;
402
- }
403
- }
404
- }
405
- else {
406
- if (value instanceof cls) {
407
- return true;
408
- }
409
- }
410
- }
411
- return false;
412
- }
413
- /**
414
- * @deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}
415
- */
416
- isBoolean(value) {
417
- console.warn('@deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}');
418
- return value === true || value === false;
419
- }
420
- /**
421
- * @deprecated use import { value } from @firestitch/common/util; instead
422
- */
423
- value(object, key, def) {
424
- console.warn('@deprecated use import { value } from @firestitch/common/util; instead');
425
- if (this.isObject(object) || this.isArray(object)) {
426
- if (object.hasOwnProperty(key)) {
427
- return object[key];
428
- }
429
- }
430
- return def;
431
- }
432
- throttle(func, wait) {
433
- console.warn('@deprecated use import { throttle } from @firestitch/common/util; instead');
434
- let waiting = false; // Initially, we're not waiting
435
- return function () {
436
- if (!waiting) { // If we're not waiting
437
- func.apply(null, arguments); // Execute users function
438
- waiting = true; // Prevent future invocations
439
- setTimeout(function () {
440
- waiting = false; // And allow future invocations
441
- }, wait);
442
- }
443
- };
444
- }
445
- /**
446
- * @deprecated use import { debounce } from @firestitch/common/util; instead
447
- */
448
- debounce(func, wait, immediate) {
449
- console.warn('@deprecated use import { debounce } from @firestitch/common/util; instead');
450
- var timeout;
451
- return function () {
452
- var context = this, args = arguments;
453
- var later = function () {
454
- timeout = null;
455
- if (!immediate)
456
- func.apply(context, args);
457
- };
458
- var callNow = immediate && !timeout;
459
- clearTimeout(timeout);
460
- timeout = setTimeout(later, wait);
461
- if (callNow)
462
- func.apply(context, args);
463
- };
464
- }
465
- /**
466
- * @deprecated use import { length } from @firestitch/common/util; instead
467
- */
468
- length(object) {
469
- console.warn('@deprecated use import { length } from @firestitch/common/util; instead');
470
- if (this.isObject(object)) {
471
- return Object.keys(object).length;
472
- }
473
- if (this.isArray(object)) {
474
- return object.length;
475
- }
476
- return 0;
477
- }
478
- /**
479
- * @deprecated use import { boolean } from @firestitch/common/util; instead
480
- */
481
- boolean(value) {
482
- console.warn('@deprecated use import { boolean } from @firestitch/common/util; instead');
483
- return this.string(value).toLowerCase() !== 'false' && !!value;
484
- }
485
- /**
486
- * @deprecated use import { stringify } from @firestitch/common/util; instead
487
- */
488
- stringify(value) {
489
- console.warn('@deprecated use import { stringify } from @firestitch/common/util; instead');
490
- return JSON.stringify(value);
491
- }
492
- }
493
- FsUtil.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtil, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
494
- FsUtil.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtil });
495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtil, decorators: [{
496
- type: Injectable
497
- }] });
498
-
499
- class FsValidate {
500
- constructor(fsUtil) {
501
- this.fsUtil = fsUtil;
502
- }
503
- /**
504
- * @deprecated use import { email } from @firestitch/common/validate; instead
505
- */
506
- phone(value) {
507
- const valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/.test(value);
508
- return valid || !String(value).length;
509
- }
510
- /**
511
- * @deprecated use import { email } from @firestitch/common/validate; instead
512
- */
513
- email(value) {
514
- return !!this.fsUtil.string(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
73
+ }
74
+ FsModelChangeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsModelChangeDirective, deps: [{ token: i1$1.NgModel }], target: i0.ɵɵFactoryTarget.Directive });
75
+ FsModelChangeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsModelChangeDirective, selector: "[fsModelChange]", inputs: { fsModelChangeOptions: "fsModelChangeOptions" }, outputs: { fsModelChange: "fsModelChange" }, ngImport: i0 });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsModelChangeDirective, decorators: [{
77
+ type: Directive,
78
+ args: [{
79
+ selector: '[fsModelChange]',
80
+ }]
81
+ }], ctorParameters: function () { return [{ type: i1$1.NgModel }]; }, propDecorators: { fsModelChangeOptions: [{
82
+ type: Input
83
+ }], fsModelChange: [{
84
+ type: Output
85
+ }] } });
86
+
87
+ class FsPreventDefaultDirective {
88
+ preventClick(event) {
89
+ event.preventDefault();
515
90
  }
516
91
  }
517
- FsValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsValidate, deps: [{ token: FsUtil }], target: i0.ɵɵFactoryTarget.Injectable });
518
- FsValidateprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsValidate });
519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsValidate, decorators: [{
520
- type: Injectable
521
- }], ctorParameters: function () { return [{ type: FsUtil }]; } });
92
+ FsPreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsPreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
93
+ FsPreventDefaultDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsPreventDefaultDirective, selector: "[fsPreventDefault]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0 });
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsPreventDefaultDirective, decorators: [{
95
+ type: Directive,
96
+ args: [{
97
+ selector: '[fsPreventDefault]',
98
+ }]
99
+ }], propDecorators: { preventClick: [{
100
+ type: HostListener,
101
+ args: ['click', ['$event']]
102
+ }] } });
522
103
 
523
- function stringify(value) {
524
- return JSON.stringify(value);
525
- }
104
+ class FsStopPropagationDirective {
105
+ preventClick(event) {
106
+ event.stopPropagation();
107
+ }
108
+ }
109
+ FsStopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsStopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
110
+ FsStopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: FsStopPropagationDirective, selector: "[fsStopPropagation]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0 });
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsStopPropagationDirective, decorators: [{
112
+ type: Directive,
113
+ args: [{
114
+ selector: '[fsStopPropagation]',
115
+ }]
116
+ }], propDecorators: { preventClick: [{
117
+ type: HostListener,
118
+ args: ['click', ['$event']]
119
+ }] } });
526
120
 
527
121
  function guid(pattern, options = { case: 'lower', numbers: true }) {
528
122
  pattern = pattern || 'xxxxxx';
@@ -555,18 +149,22 @@ function isEmpty(value, options) {
555
149
  (!options.zero && (value === 0 || value === '0'));
556
150
  }
557
151
 
152
+ function stringify(value) {
153
+ return JSON.stringify(value);
154
+ }
155
+
558
156
  class FsUtilStringifyPipe {
559
157
  constructor() { }
560
158
  transform(value) {
561
159
  return stringify(value);
562
160
  }
563
161
  }
564
- FsUtilStringifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilStringifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
565
- FsUtilStringifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilStringifyPipe, name: "fsUtilStringify" });
566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilStringifyPipe, decorators: [{
162
+ FsUtilStringifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilStringifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
163
+ FsUtilStringifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilStringifyPipe, name: "fsUtilStringify" });
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilStringifyPipe, decorators: [{
567
165
  type: Pipe,
568
166
  args: [{
569
- name: 'fsUtilStringify'
167
+ name: 'fsUtilStringify',
570
168
  }]
571
169
  }], ctorParameters: function () { return []; } });
572
170
  class FsUtilGuidPipe {
@@ -575,12 +173,12 @@ class FsUtilGuidPipe {
575
173
  return guid();
576
174
  }
577
175
  }
578
- FsUtilGuidPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilGuidPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
579
- FsUtilGuidPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilGuidPipe, name: "fsUtilGuid" });
580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilGuidPipe, decorators: [{
176
+ FsUtilGuidPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilGuidPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
177
+ FsUtilGuidPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilGuidPipe, name: "fsUtilGuid" });
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilGuidPipe, decorators: [{
581
179
  type: Pipe,
582
180
  args: [{
583
- name: 'fsUtilGuid'
181
+ name: 'fsUtilGuid',
584
182
  }]
585
183
  }], ctorParameters: function () { return []; } });
586
184
  class FsUtilIsEmptyPipe {
@@ -588,12 +186,12 @@ class FsUtilIsEmptyPipe {
588
186
  return isEmpty(value);
589
187
  }
590
188
  }
591
- FsUtilIsEmptyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
592
- FsUtilIsEmptyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsEmptyPipe, name: "fsUtilIsEmpty" });
593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsEmptyPipe, decorators: [{
189
+ FsUtilIsEmptyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
190
+ FsUtilIsEmptyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsEmptyPipe, name: "fsUtilIsEmpty" });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsEmptyPipe, decorators: [{
594
192
  type: Pipe,
595
193
  args: [{
596
- name: 'fsUtilIsEmpty'
194
+ name: 'fsUtilIsEmpty',
597
195
  }]
598
196
  }] });
599
197
  class FsUtilIsNotEmptyPipe {
@@ -601,19 +199,199 @@ class FsUtilIsNotEmptyPipe {
601
199
  return !isEmpty(value);
602
200
  }
603
201
  }
604
- FsUtilIsNotEmptyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsNotEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
605
- FsUtilIsNotEmptyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsNotEmptyPipe, name: "fsUtilIsNotEmpty" });
606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsUtilIsNotEmptyPipe, decorators: [{
202
+ FsUtilIsNotEmptyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsNotEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
203
+ FsUtilIsNotEmptyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsNotEmptyPipe, name: "fsUtilIsNotEmpty" });
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtilIsNotEmptyPipe, decorators: [{
607
205
  type: Pipe,
608
206
  args: [{
609
- name: 'fsUtilIsNotEmpty'
207
+ name: 'fsUtilIsNotEmpty',
610
208
  }]
611
209
  }] });
612
210
 
211
+ function compare(query, item) {
212
+ let value = true;
213
+ for (const key in query) {
214
+ value = value && item[key] == query[key];
215
+ }
216
+ return value;
217
+ }
218
+
219
+ function filter(array, query) {
220
+ if (typeof query !== 'function') {
221
+ const queryObj = query;
222
+ query = (item) => {
223
+ return compare(queryObj, item);
224
+ };
225
+ }
226
+ const isarray = Array.isArray(array);
227
+ const list = isarray ? [] : {};
228
+ if (isarray) {
229
+ array.forEach(function (item, idx) {
230
+ if (query(item)) {
231
+ list.push(item);
232
+ }
233
+ });
234
+ }
235
+ else {
236
+ Object.keys(array).forEach(key => {
237
+ if (query(array[key])) {
238
+ list[key] = array[key];
239
+ }
240
+ });
241
+ }
242
+ return list;
243
+ }
244
+
245
+ function inArray(values, array) {
246
+ if (!Array.isArray(values)) {
247
+ values = [values];
248
+ }
249
+ for (let i = 0, len = values.length; i < len; i++) {
250
+ if (array.indexOf(values[i]) >= 0) {
251
+ return true;
252
+ }
253
+ }
254
+ return false;
255
+ }
256
+
257
+ function index(array, name, value = null) {
258
+ const list = {};
259
+ array.forEach(function (item) {
260
+ list[item[name]] = value ? item[value] : item;
261
+ });
262
+ return list;
263
+ }
264
+
265
+ function indexOf(array, query) {
266
+ if (typeof query !== 'function') {
267
+ const queryObj = query;
268
+ query = (item) => {
269
+ return compare(queryObj, item);
270
+ };
271
+ }
272
+ for (let i = 0, len = array.length; i < len; i++) {
273
+ if (query(array[i])) {
274
+ return i;
275
+ }
276
+ }
277
+ return -1;
278
+ }
279
+
280
+ function keyExists(array, key) {
281
+ return array.hasOwnProperty(key);
282
+ }
283
+
284
+ function ksort(unordered) {
285
+ Object.keys(unordered).sort().forEach(function (key) {
286
+ const value = unordered[key];
287
+ delete unordered[key];
288
+ unordered[key] = value;
289
+ });
290
+ }
291
+
292
+ function list(array, property, index = null) {
293
+ const resultList = index ? {} : [];
294
+ array.forEach(function (item, idx) {
295
+ if (index) {
296
+ resultList[item[index]] = item[property];
297
+ }
298
+ else {
299
+ resultList.push(item[property]);
300
+ }
301
+ });
302
+ return resultList;
303
+ }
304
+
305
+ function nameValue(array, name, value) {
306
+ const list = [];
307
+ if (name || value) {
308
+ const nameFn = typeof name === 'function' ? name : function (item) {
309
+ return item[name];
310
+ };
311
+ const valueFn = typeof value === 'function' ? value : function (item) {
312
+ return item[value];
313
+ };
314
+ array.forEach(function (item) {
315
+ list.push({ name: nameFn(item), value: valueFn(item) });
316
+ });
317
+ }
318
+ else {
319
+ array.forEach(function (n, v) {
320
+ list.push({ name: n, value: v });
321
+ });
322
+ }
323
+ return list;
324
+ }
325
+
326
+ function remove(array, query) {
327
+ const idx = indexOf(array, query);
328
+ if (idx >= 0) {
329
+ return array.splice(idx, 1);
330
+ }
331
+ return idx;
332
+ }
333
+
334
+ function sort(array, query, reverse = false) {
335
+ if (typeof query !== 'function') {
336
+ const queryStr = query;
337
+ query = function (a, b) {
338
+ if (reverse) {
339
+ if (a[queryStr] < b[queryStr]) {
340
+ return 1;
341
+ }
342
+ else if (a[queryStr] > b[queryStr]) {
343
+ return -1;
344
+ }
345
+ }
346
+ else {
347
+ if (a[queryStr] > b[queryStr]) {
348
+ return 1;
349
+ }
350
+ else if (a[queryStr] < b[queryStr]) {
351
+ return -1;
352
+ }
353
+ }
354
+ return 0;
355
+ };
356
+ }
357
+ array.sort(query);
358
+ return array;
359
+ }
360
+
361
+ function rsort(array, query) {
362
+ return sort(array, query, true);
363
+ }
364
+
365
+ function find(array, query) {
366
+ const data = filter(array, query);
367
+ return data.length ? data[0] : null;
368
+ }
369
+
613
370
  function boolean(value) {
614
371
  return String(value).toLowerCase() !== 'false' && !!value;
615
372
  }
616
373
 
374
+ function clone(obj) {
375
+ if (obj instanceof Date) {
376
+ return new Date(obj);
377
+ }
378
+ else if (Array.isArray(obj)) {
379
+ const arr = [];
380
+ for (let i = 0; i < obj.length; i++) {
381
+ arr[i] = clone(obj[i]);
382
+ }
383
+ return arr;
384
+ }
385
+ else if (typeof (obj) === 'object') {
386
+ const cloned = {};
387
+ for (let key in obj) {
388
+ cloned[key] = clone(obj[key]);
389
+ }
390
+ return cloned;
391
+ }
392
+ return obj;
393
+ }
394
+
617
395
  function debounce(func, wait, immediate) {
618
396
  let timeout;
619
397
  return function () {
@@ -631,75 +409,35 @@ function debounce(func, wait, immediate) {
631
409
  };
632
410
  }
633
411
 
634
- const KEY_CANCEL = 3;
635
- const KEY_HELP = 6;
636
- const KEY_BACKSPACE = 8;
637
- const KEY_TAB = 9;
638
- const KEY_CLEAR = 12;
639
- const KEY_RETURN = 13;
640
- const KEY_ENTER = 14;
641
- const KEY_SHIFT = 16;
642
- const KEY_CONTROL = 17;
643
- const KEY_ALT = 18;
644
- const KEY_PAUSE = 19;
645
- const KEY_CAPS_LOCK = 20;
646
- const KEY_ESCAPE = 27;
647
- const KEY_SPACE = 32;
648
- const KEY_PAGE_UP = 33;
649
- const KEY_PAGE_DOWN = 34;
650
- const KEY_END = 35;
651
- const KEY_HOME = 36;
652
- const KEY_LEFT = 37;
653
- const KEY_UP = 38;
654
- const KEY_RIGHT = 39;
655
- const KEY_DOWN = 40;
656
- const KEY_PRINTSCREEN = 44;
657
- const KEY_INSERT = 45;
658
- const KEY_DELETE = 46;
659
- const KEY_0 = 48;
660
- const KEY_1 = 49;
661
- const KEY_2 = 50;
662
- const KEY_3 = 51;
663
- const KEY_4 = 52;
664
- const KEY_5 = 53;
665
- const KEY_6 = 54;
666
- const KEY_7 = 55;
667
- const KEY_8 = 56;
668
- const KEY_9 = 57;
669
- const KEY_SEMICOLON = 59;
670
- const KEY_EQUALS = 61;
671
-
672
- function length(object) {
673
- if (Array.isArray(object)) {
674
- return object.length;
675
- }
676
- if (object instanceof Object) {
677
- return Object.keys(object).length;
678
- }
679
- return 0;
680
- }
681
-
682
- function resolve(promise, defaults = []) {
683
- const result = defaults;
684
- return new Promise(resolve => {
685
- promise.then(function (data) {
686
- Object.keys(data).forEach(key => result[key] = data[key]);
687
- resolve(result);
688
- });
689
- });
412
+ function removeQueryParams(path) {
413
+ return path.split('?')[0];
690
414
  }
691
415
 
692
- function uuid() {
693
- return guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
416
+ function getNormalizedPath(locationSrv) {
417
+ const path = locationSrv.prepareExternalUrl(locationSrv.path());
418
+ return removeQueryParams(path);
694
419
  }
695
420
 
696
- function value(object, key, def) {
697
- if (typeof object === 'object' || Array.isArray(object)) {
698
- if (object.hasOwnProperty(key)) {
699
- return object[key];
421
+ function isArrayEqual(arr1, arr2) {
422
+ if (!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length !== arr2.length) {
423
+ return false;
424
+ }
425
+ const sortFn = (a, b) => {
426
+ if (a < b) {
427
+ return -1;
700
428
  }
701
- }
702
- return def;
429
+ else if (a > b) {
430
+ return 1;
431
+ }
432
+ else {
433
+ return 0;
434
+ }
435
+ };
436
+ arr1 = [...arr1].sort(sortFn);
437
+ arr2 = [...arr2].sort(sortFn);
438
+ return arr1.every((value, index) => {
439
+ return value === arr2[index];
440
+ });
703
441
  }
704
442
 
705
443
  function isClass(value, cls) {
@@ -729,17 +467,60 @@ function isObject(value) {
729
467
  return !!value && typeof value === 'object' && !Array.isArray(value);
730
468
  }
731
469
 
732
- function throttle(func, wait) {
733
- let waiting = false; // Initially, we're not waiting
734
- return function () {
735
- if (!waiting) { // If we're not waiting
736
- func.apply(null, arguments); // Execute users function
737
- waiting = true; // Prevent future invocations
738
- setTimeout(function () {
739
- waiting = false; // And allow future invocations
740
- }, wait);
741
- }
742
- };
470
+ const KEY_CANCEL$1 = 3;
471
+ const KEY_HELP$1 = 6;
472
+ const KEY_BACKSPACE$1 = 8;
473
+ const KEY_TAB$1 = 9;
474
+ const KEY_CLEAR$1 = 12;
475
+ const KEY_RETURN$1 = 13;
476
+ const KEY_ENTER$1 = 14;
477
+ const KEY_SHIFT$1 = 16;
478
+ const KEY_CONTROL$1 = 17;
479
+ const KEY_ALT$1 = 18;
480
+ const KEY_PAUSE$1 = 19;
481
+ const KEY_CAPS_LOCK$1 = 20;
482
+ const KEY_ESCAPE$1 = 27;
483
+ const KEY_SPACE$1 = 32;
484
+ const KEY_PAGE_UP$1 = 33;
485
+ const KEY_PAGE_DOWN$1 = 34;
486
+ const KEY_END$1 = 35;
487
+ const KEY_HOME$1 = 36;
488
+ const KEY_LEFT$1 = 37;
489
+ const KEY_UP$1 = 38;
490
+ const KEY_RIGHT$1 = 39;
491
+ const KEY_DOWN$1 = 40;
492
+ const KEY_PRINTSCREEN$1 = 44;
493
+ const KEY_INSERT$1 = 45;
494
+ const KEY_DELETE$1 = 46;
495
+ const KEY_0$1 = 48;
496
+ const KEY_1$1 = 49;
497
+ const KEY_2$1 = 50;
498
+ const KEY_3$1 = 51;
499
+ const KEY_4$1 = 52;
500
+ const KEY_5$1 = 53;
501
+ const KEY_6$1 = 54;
502
+ const KEY_7$1 = 55;
503
+ const KEY_8$1 = 56;
504
+ const KEY_9$1 = 57;
505
+ const KEY_SEMICOLON$1 = 59;
506
+ const KEY_EQUALS$1 = 61;
507
+
508
+ function length(object) {
509
+ if (Array.isArray(object)) {
510
+ return object.length;
511
+ }
512
+ if (object instanceof Object) {
513
+ return Object.keys(object).length;
514
+ }
515
+ return 0;
516
+ }
517
+
518
+ function ordinalNumber(value) {
519
+ value = String(value);
520
+ const index = value.match `1?.$`;
521
+ const endings = [, 'st', 'nd', 'rd'];
522
+ const ending = endings[index] || 'th';
523
+ return value + ending;
743
524
  }
744
525
 
745
526
  class Operation {
@@ -922,21 +703,14 @@ class Queue {
922
703
  }
923
704
  }
924
705
 
925
- function removeQueryParams(path) {
926
- return path.split('?')[0];
927
- }
928
-
929
- function getNormalizedPath(locationSrv) {
930
- const path = locationSrv.prepareExternalUrl(locationSrv.path());
931
- return removeQueryParams(path);
932
- }
933
-
934
- function ordinalNumber(value) {
935
- value = String(value);
936
- const index = value.match `1?.$`;
937
- const endings = [, 'st', 'nd', 'rd'];
938
- const ending = endings[index] || 'th';
939
- return value + ending;
706
+ function resolve(promise, defaults = []) {
707
+ const result = defaults;
708
+ return new Promise(resolve => {
709
+ promise.then(function (data) {
710
+ Object.keys(data).forEach(key => result[key] = data[key]);
711
+ resolve(result);
712
+ });
713
+ });
940
714
  }
941
715
 
942
716
  function round(num, decimalPlaces = 0) {
@@ -945,56 +719,6 @@ function round(num, decimalPlaces = 0) {
945
719
  return Math.round(num * p) / p;
946
720
  }
947
721
 
948
- function clone(obj) {
949
- if (obj instanceof Date) {
950
- return new Date(obj);
951
- }
952
- else if (Array.isArray(obj)) {
953
- const arr = [];
954
- for (let i = 0; i < obj.length; i++) {
955
- arr[i] = clone(obj[i]);
956
- }
957
- return arr;
958
- }
959
- else if (typeof (obj) === 'object') {
960
- const cloned = {};
961
- for (let key in obj) {
962
- cloned[key] = clone(obj[key]);
963
- }
964
- return cloned;
965
- }
966
- return obj;
967
- }
968
-
969
- function toString(value) {
970
- if (value === null || value === undefined) {
971
- return '';
972
- }
973
- return `${value}`;
974
- }
975
-
976
- function isArrayEqual(arr1, arr2) {
977
- if (!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length !== arr2.length) {
978
- return false;
979
- }
980
- const sortFn = (a, b) => {
981
- if (a < b) {
982
- return -1;
983
- }
984
- else if (a > b) {
985
- return 1;
986
- }
987
- else {
988
- return 0;
989
- }
990
- };
991
- arr1 = [...arr1].sort(sortFn);
992
- arr2 = [...arr2].sort(sortFn);
993
- return arr1.every((value, index) => {
994
- return value === arr2[index];
995
- });
996
- }
997
-
998
722
  const fsSourceLoader = (function () {
999
723
  let _document;
1000
724
  let _headElement;
@@ -1005,7 +729,7 @@ const fsSourceLoader = (function () {
1005
729
  // but developer can set document at any time
1006
730
  function setDocument(document) {
1007
731
  _document = document;
1008
- _headElement = _document === null || _document === void 0 ? void 0 : _document.head;
732
+ _headElement = _document?.head;
1009
733
  }
1010
734
  /**
1011
735
  * register a list of the resources for future loading
@@ -1135,8 +859,51 @@ const fsSourceLoader = (function () {
1135
859
  registerResources,
1136
860
  loadResource,
1137
861
  loadResources,
862
+ loadJs: _loadJs,
863
+ loadStyles: _loadStyles,
864
+ };
865
+ })();
866
+ function loadStyles(path) {
867
+ return fsSourceLoader.loadStyles(path);
868
+ }
869
+ ;
870
+ function loadJs(path) {
871
+ return fsSourceLoader.loadJs(path);
872
+ }
873
+ ;
874
+
875
+ function throttle(func, wait) {
876
+ let waiting = false; // Initially, we're not waiting
877
+ return function () {
878
+ if (!waiting) { // If we're not waiting
879
+ func.apply(null, arguments); // Execute users function
880
+ waiting = true; // Prevent future invocations
881
+ setTimeout(function () {
882
+ waiting = false; // And allow future invocations
883
+ }, wait);
884
+ }
1138
885
  };
1139
- })();
886
+ }
887
+
888
+ function toString(value) {
889
+ if (value === null || value === undefined) {
890
+ return '';
891
+ }
892
+ return `${value}`;
893
+ }
894
+
895
+ function uuid() {
896
+ return guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
897
+ }
898
+
899
+ function value(object, key, def) {
900
+ if (typeof object === 'object' || Array.isArray(object)) {
901
+ if (object.hasOwnProperty(key)) {
902
+ return object[key];
903
+ }
904
+ }
905
+ return def;
906
+ }
1140
907
 
1141
908
  function number(value, decimals) {
1142
909
  if (isNumeric(decimals)) {
@@ -1145,19 +912,27 @@ function number(value, decimals) {
1145
912
  return Number(value || 0).toLocaleString(undefined, { maximumFractionDigits: decimals });
1146
913
  }
1147
914
 
1148
- class FsFormatNumberPipe {
1149
- transform(value, decimals) {
1150
- return number(value, decimals);
915
+ function acronym(str, length = 2) {
916
+ const splittedString = str
917
+ .replace(/[^a-zA-Z0-9]+/g, ' ')
918
+ .split(' ');
919
+ let result = '';
920
+ for (let i = 0; i < length; i++) {
921
+ if (!splittedString[i]) {
922
+ if (splittedString.length === 1) {
923
+ for (let j = 1; j < length; j++) {
924
+ if (!splittedString[i - 1][j]) {
925
+ break;
926
+ }
927
+ result += splittedString[i - 1][j].toUpperCase();
928
+ }
929
+ }
930
+ break;
931
+ }
932
+ result += splittedString[i][0].toUpperCase();
1151
933
  }
1152
- }
1153
- FsFormatNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1154
- FsFormatNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatNumberPipe, name: "fsFormatNumber" });
1155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatNumberPipe, decorators: [{
1156
- type: Pipe,
1157
- args: [{
1158
- name: 'fsFormatNumber'
1159
- }]
1160
- }] });
934
+ return result;
935
+ }
1161
936
 
1162
937
  function currency(amount, precision = [2, 10], currencyCode = 'USD', locale = 'en-US') {
1163
938
  const digitsInfo = Array.isArray(precision) ? precision : [precision, precision];
@@ -1166,6 +941,88 @@ function currency(amount, precision = [2, 10], currencyCode = 'USD', locale = 'e
1166
941
  .transform(amount, currencyCode, 'symbol', `1.${digitsInfo[0]}-${digitsInfo[1]}`);
1167
942
  }
1168
943
 
944
+ function truncate(value, limit = 100, completeWords = false, ellipsis = '...') {
945
+ value = value || '';
946
+ if (completeWords) {
947
+ limit = value.substr(0, limit).lastIndexOf(' ');
948
+ }
949
+ let result = `${value.substr(0, limit)}`;
950
+ if (result !== value) {
951
+ result += ellipsis;
952
+ }
953
+ return result;
954
+ }
955
+
956
+ function email(value) {
957
+ return !!String(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
958
+ }
959
+
960
+ function phone(value) {
961
+ const valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}/.test(value);
962
+ return valid || !String(value).length;
963
+ }
964
+
965
+ /**
966
+ * Check validity of the url.
967
+ * Protocol (http/https) isn't required.
968
+ * @param value
969
+ * @returns {boolean}
970
+ */
971
+ function url(value) {
972
+ const expression = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#%[\]@!\$&'\(\)\*\+,;=.]+$/gm;
973
+ const regexp = new RegExp(expression);
974
+ return !!String(value).match(regexp);
975
+ }
976
+
977
+ function delayedRetry(delayMs, maxRetry = 5, message) {
978
+ let retries = 0;
979
+ return (src) => src.pipe(retryWhen((errors) => errors.pipe(tap(() => {
980
+ retries++;
981
+ if (retries <= maxRetry) {
982
+ console.info(`Failed to load Resource. Retry in ${delayMs / 1000} sec. ${retries}/${maxRetry} times...`);
983
+ }
984
+ }), concatMap((error) => iif(() => retries > maxRetry, throwError(getErrorMessage(maxRetry, message)), timer(delayMs))))));
985
+ }
986
+ const getErrorMessage = (maxRetry, defaultMessage) => {
987
+ if (!defaultMessage) {
988
+ return `Failed to load Resource for ${maxRetry} times. Giving up.`;
989
+ }
990
+ else {
991
+ return defaultMessage;
992
+ }
993
+ };
994
+
995
+ function bytes(bytes, decimals, unit) {
996
+ if (!bytes) {
997
+ return '0 MB';
998
+ }
999
+ const e = typeof unit === 'string' ?
1000
+ 'KMGTP'.indexOf(unit.replace('B', '')) + 1 :
1001
+ Math.floor(Math.log(bytes) / Math.log(1024));
1002
+ if (!isNumeric(decimals)) {
1003
+ decimals = (bytes / 1024) > 1000 ? 2 : 0;
1004
+ }
1005
+ return `${(bytes / Math.pow(1024, e))
1006
+ .toFixed(decimals)}`
1007
+ .replace(/\.00/, '')
1008
+ + ' '
1009
+ + (e ? ' KMGTP'.charAt(e) : '') + 'B';
1010
+ }
1011
+
1012
+ class FsFormatBytesPipe {
1013
+ transform(value, decimals, unit) {
1014
+ return bytes(value, decimals, unit);
1015
+ }
1016
+ }
1017
+ FsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1018
+ FsFormatBytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatBytesPipe, name: "fsFormatBytes" });
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatBytesPipe, decorators: [{
1020
+ type: Pipe,
1021
+ args: [{
1022
+ name: 'fsFormatBytes',
1023
+ }]
1024
+ }] });
1025
+
1169
1026
  class FsFormatCurrencyPipe {
1170
1027
  constructor(locale) {
1171
1028
  this.locale = locale;
@@ -1174,9 +1031,9 @@ class FsFormatCurrencyPipe {
1174
1031
  return currency(amount, precision, currencyCode);
1175
1032
  }
1176
1033
  }
1177
- FsFormatCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatCurrencyPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
1178
- FsFormatCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatCurrencyPipe, name: "fsFormatCurrency" });
1179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatCurrencyPipe, decorators: [{
1034
+ FsFormatCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatCurrencyPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
1035
+ FsFormatCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatCurrencyPipe, name: "fsFormatCurrency" });
1036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatCurrencyPipe, decorators: [{
1180
1037
  type: Pipe,
1181
1038
  args: [{
1182
1039
  name: 'fsFormatCurrency',
@@ -1186,17 +1043,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1186
1043
  args: [LOCALE_ID]
1187
1044
  }] }]; } });
1188
1045
 
1189
- function truncate(value, limit = 100, completeWords = false, ellipsis = '...') {
1190
- value = value || '';
1191
- if (completeWords) {
1192
- limit = value.substr(0, limit).lastIndexOf(' ');
1046
+ class FsFormatNumberPipe {
1047
+ transform(value, decimals) {
1048
+ return number(value, decimals);
1193
1049
  }
1194
- let result = `${value.substr(0, limit)}`;
1195
- if (result !== value) {
1196
- result += ellipsis;
1050
+ }
1051
+ FsFormatNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1052
+ FsFormatNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatNumberPipe, name: "fsFormatNumber" });
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatNumberPipe, decorators: [{
1054
+ type: Pipe,
1055
+ args: [{
1056
+ name: 'fsFormatNumber'
1057
+ }]
1058
+ }] });
1059
+
1060
+ class FsFormatOrdinalNumberPipe {
1061
+ transform(value) {
1062
+ return ordinalNumber(value);
1197
1063
  }
1198
- return result;
1199
- }
1064
+ }
1065
+ FsFormatOrdinalNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatOrdinalNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1066
+ FsFormatOrdinalNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatOrdinalNumberPipe, name: "fsFormatOrdinalNumber" });
1067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatOrdinalNumberPipe, decorators: [{
1068
+ type: Pipe,
1069
+ args: [{
1070
+ name: 'fsFormatOrdinalNumber',
1071
+ }]
1072
+ }] });
1200
1073
 
1201
1074
  class FsFormatTruncatePipe {
1202
1075
  constructor() { }
@@ -1204,360 +1077,529 @@ class FsFormatTruncatePipe {
1204
1077
  return truncate(value, limit, completeWords, ellipsis);
1205
1078
  }
1206
1079
  }
1207
- FsFormatTruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatTruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1208
- FsFormatTruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatTruncatePipe, name: "fsFormatTruncate" });
1209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatTruncatePipe, decorators: [{
1080
+ FsFormatTruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatTruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1081
+ FsFormatTruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatTruncatePipe, name: "fsFormatTruncate" });
1082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFormatTruncatePipe, decorators: [{
1210
1083
  type: Pipe,
1211
1084
  args: [{
1212
1085
  name: 'fsFormatTruncate'
1213
1086
  }]
1214
1087
  }], ctorParameters: function () { return []; } });
1215
1088
 
1216
- class FsStopPropagationDirective {
1217
- preventClick(event) {
1218
- event.stopPropagation();
1089
+ class FsArray {
1090
+ /**
1091
+ * @deprecated use import { nameValue } from @firestitch/common/array; instead
1092
+ */
1093
+ nameValue(array, name, value) {
1094
+ console.warn('@deprecated use import { nameValue } from @firestitch/common/array; instead');
1095
+ let list = [];
1096
+ if (name || value) {
1097
+ let nameFn = typeof name === 'function' ? name : function (item) { return item[name]; };
1098
+ let valueFn = typeof value === 'function' ? value : function (item) { return item[value]; };
1099
+ array.forEach(function (item) {
1100
+ list.push({ name: nameFn(item), value: valueFn(item) });
1101
+ });
1102
+ }
1103
+ else {
1104
+ array.forEach(function (name, value) {
1105
+ list.push({ name: name, value: value });
1106
+ });
1107
+ }
1108
+ return list;
1219
1109
  }
1220
- }
1221
- FsStopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsStopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1222
- FsStopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsStopPropagationDirective, selector: "[fsStopPropagation]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0 });
1223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsStopPropagationDirective, decorators: [{
1224
- type: Directive,
1225
- args: [{
1226
- selector: '[fsStopPropagation]',
1227
- }]
1228
- }], propDecorators: { preventClick: [{
1229
- type: HostListener,
1230
- args: ['click', ['$event']]
1231
- }] } });
1232
-
1233
- class FsPreventDefaultDirective {
1234
- preventClick(event) {
1235
- event.preventDefault();
1110
+ /**
1111
+ * @deprecated use import { remove } from @firestitch/common/array; instead
1112
+ */
1113
+ remove(array, query) {
1114
+ console.warn('@deprecated use import { remove } from @firestitch/common/array; instead');
1115
+ let idx = this.indexOf(array, query);
1116
+ if (idx >= 0) {
1117
+ return array.splice(idx, 1);
1118
+ }
1119
+ return idx;
1236
1120
  }
1237
- }
1238
- FsPreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsPreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1239
- FsPreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsPreventDefaultDirective, selector: "[fsPreventDefault]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0 });
1240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsPreventDefaultDirective, decorators: [{
1241
- type: Directive,
1242
- args: [{
1243
- selector: '[fsPreventDefault]',
1244
- }]
1245
- }], propDecorators: { preventClick: [{
1246
- type: HostListener,
1247
- args: ['click', ['$event']]
1248
- }] } });
1249
-
1250
- class FsAutofocusDirective {
1251
- constructor(_matInput, _el) {
1252
- this._matInput = _matInput;
1253
- this._el = _el;
1254
- this.fsAutofocus = true;
1121
+ /**
1122
+ * @deprecated use import { indexOf } from @firestitch/common/array; instead
1123
+ */
1124
+ indexOf(array, query) {
1125
+ console.warn('@deprecated use import { indexOf } from @firestitch/common/array; instead');
1126
+ if (typeof query !== 'function') {
1127
+ let queryObj = query;
1128
+ query = (item) => {
1129
+ return this.compare(queryObj, item);
1130
+ };
1131
+ }
1132
+ for (let i = 0, len = array.length; i < len; i++) {
1133
+ if (query(array[i])) {
1134
+ return i;
1135
+ }
1136
+ }
1137
+ return -1;
1255
1138
  }
1256
- ngAfterViewInit() {
1257
- if (this.fsAutofocus || this.fsAutofocus === undefined) {
1258
- this.focus();
1139
+ /**
1140
+ * @deprecated use import { compare } from @firestitch/common/array; instead
1141
+ */
1142
+ compare(query, item) {
1143
+ console.warn('@deprecated use import { compare } from @firestitch/common/array; instead');
1144
+ let value = true;
1145
+ for (let key in query) {
1146
+ value = value && item[key] == query[key];
1259
1147
  }
1148
+ return value;
1260
1149
  }
1261
- focus() {
1262
- setTimeout(() => {
1263
- const tmpEl = document.createElement('input');
1264
- tmpEl.style.width = '0';
1265
- tmpEl.style.height = '0';
1266
- tmpEl.style.margin = '0';
1267
- tmpEl.style.padding = '0';
1268
- tmpEl.style.border = '0';
1269
- tmpEl.style.opacity = '0';
1270
- document.body.appendChild(tmpEl);
1271
- tmpEl.focus();
1272
- if (this._matInput) {
1273
- this._matInput.focus();
1150
+ /**
1151
+ * @deprecated use import { filter } from @firestitch/common/array; instead
1152
+ */
1153
+ filter(array, query) {
1154
+ console.warn('@deprecated use import { filter } from @firestitch/common/array; instead');
1155
+ if (typeof query !== 'function') {
1156
+ let queryObj = query;
1157
+ query = (item) => {
1158
+ return this.compare(queryObj, item);
1159
+ };
1160
+ }
1161
+ let isarray = Array.isArray(array);
1162
+ let list = isarray ? [] : {};
1163
+ if (isarray)
1164
+ array.forEach(function (item, idx) {
1165
+ if (query(item)) {
1166
+ list.push(item);
1167
+ }
1168
+ });
1169
+ else
1170
+ Object.keys(array).forEach(key => {
1171
+ if (query(array[key])) {
1172
+ list[key] = array[key];
1173
+ }
1174
+ });
1175
+ return list;
1176
+ }
1177
+ /**
1178
+ * @deprecated use import { index } from @firestitch/common/array; instead
1179
+ */
1180
+ index(array, property) {
1181
+ console.warn('@deprecated use import { index } from @firestitch/common/array; instead');
1182
+ let list = {};
1183
+ array.forEach(function (item, idx) {
1184
+ list[item[property]] = item;
1185
+ });
1186
+ return list;
1187
+ }
1188
+ /**
1189
+ * @deprecated use import { sort } from @firestitch/common/array; instead
1190
+ */
1191
+ sort(array, query, reverse = false) {
1192
+ console.warn('@deprecated use import { sort } from @firestitch/common/array; instead');
1193
+ if (typeof query !== 'function') {
1194
+ let queryStr = query;
1195
+ query = function (a, b) {
1196
+ if (reverse) {
1197
+ if (a[queryStr] < b[queryStr]) {
1198
+ return 1;
1199
+ }
1200
+ else if (a[queryStr] > b[queryStr]) {
1201
+ return -1;
1202
+ }
1203
+ }
1204
+ else {
1205
+ if (a[queryStr] > b[queryStr]) {
1206
+ return 1;
1207
+ }
1208
+ else if (a[queryStr] < b[queryStr]) {
1209
+ return -1;
1210
+ }
1211
+ }
1212
+ return 0;
1213
+ };
1214
+ }
1215
+ array.sort(query);
1216
+ return array;
1217
+ }
1218
+ /**
1219
+ * @deprecated use import { rsort } from @firestitch/common/array; instead
1220
+ */
1221
+ rsort(array, query) {
1222
+ console.warn('@deprecated use import { rsort } from @firestitch/common/array; instead');
1223
+ return this.sort(array, query, true);
1224
+ }
1225
+ /**
1226
+ * @deprecated use import { list } from @firestitch/common/array; instead
1227
+ */
1228
+ list(array, property, index = null) {
1229
+ console.warn('@deprecated use import { list } from @firestitch/common/array; instead');
1230
+ let list = index ? {} : [];
1231
+ array.forEach(function (item, idx) {
1232
+ if (index) {
1233
+ list[item[index]] = item[property];
1274
1234
  }
1275
- else if (this._el.nativeElement.focus) {
1276
- this._el.nativeElement.focus();
1235
+ else {
1236
+ list.push(item[property]);
1237
+ }
1238
+ });
1239
+ return list;
1240
+ }
1241
+ /**
1242
+ * @deprecated use import { applyDepth } from @firestitch/common/array; instead
1243
+ */
1244
+ applyDepth(objects, parent_property, id_property = 'id', depth_property = 'depth') {
1245
+ console.warn('@deprecated use import { applyDepth } from @firestitch/common/array; instead');
1246
+ let keyed = {};
1247
+ objects.forEach(function (object) {
1248
+ if (!object[parent_property]) {
1249
+ object[depth_property] = 0;
1250
+ }
1251
+ keyed[object[id_property]] = object;
1252
+ });
1253
+ Object.keys(keyed).forEach(key => {
1254
+ Object.keys(keyed).forEach(key => {
1255
+ let object = keyed[key];
1256
+ if (!keyed[key][depth_property]) {
1257
+ if (keyed[key][parent_property]) {
1258
+ keyed[key][depth_property] = keyed[keyed[key][parent_property]][depth_property] + 1;
1259
+ }
1260
+ }
1261
+ });
1262
+ });
1263
+ return keyed;
1264
+ }
1265
+ /**
1266
+ * @deprecated use import { inArray } from @firestitch/common/array; instead
1267
+ */
1268
+ inArray(values, array) {
1269
+ console.warn('@deprecated use import { inArray } from @firestitch/common/array; instead');
1270
+ if (!Array.isArray(values)) {
1271
+ values = [values];
1272
+ }
1273
+ for (let i = 0, len = values.length; i < len; i++) {
1274
+ if (array.indexOf(values[i]) >= 0) {
1275
+ return true;
1277
1276
  }
1278
- document.body.removeChild(tmpEl);
1279
- }, 50);
1277
+ }
1278
+ return false;
1280
1279
  }
1281
- }
1282
- FsAutofocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAutofocusDirective, deps: [{ token: i1.MatInput, host: true, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1283
- FsAutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsAutofocusDirective, selector: "[fsAutofocus],[autofocus]", inputs: { fsAutofocus: "fsAutofocus" }, ngImport: i0 });
1284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAutofocusDirective, decorators: [{
1285
- type: Directive,
1286
- args: [{
1287
- selector: '[fsAutofocus],[autofocus]',
1288
- }]
1289
- }], ctorParameters: function () { return [{ type: i1.MatInput, decorators: [{
1290
- type: Optional
1291
- }, {
1292
- type: Host
1293
- }] }, { type: i0.ElementRef }]; }, propDecorators: { fsAutofocus: [{
1294
- type: Input
1295
- }] } });
1296
-
1297
- class FsFormatOrdinalNumberPipe {
1298
- transform(value) {
1299
- return ordinalNumber(value);
1280
+ /**
1281
+ * @deprecated use import { keyExists } from @firestitch/common/array; instead
1282
+ */
1283
+ keyExists(array, key) {
1284
+ console.warn('@deprecated use import { keyExists } from @firestitch/common/array; instead');
1285
+ return array.hasOwnProperty(key);
1286
+ }
1287
+ /**
1288
+ * @deprecated use import { length } from @firestitch/common/array; instead
1289
+ */
1290
+ length(array) {
1291
+ console.warn('@deprecated use import { length } from @firestitch/common/array; instead');
1292
+ return array.length;
1293
+ }
1294
+ /**
1295
+ * @deprecated use import { ksort } from @firestitch/common/array; instead
1296
+ */
1297
+ ksort(unordered) {
1298
+ console.warn('@deprecated use import { ksort } from @firestitch/common/array; instead');
1299
+ Object.keys(unordered).sort().forEach(function (key) {
1300
+ let value = unordered[key];
1301
+ delete unordered[key];
1302
+ unordered[key] = value;
1303
+ });
1300
1304
  }
1301
1305
  }
1302
- FsFormatOrdinalNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatOrdinalNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1303
- FsFormatOrdinalNumberPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatOrdinalNumberPipe, name: "fsFormatOrdinalNumber" });
1304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatOrdinalNumberPipe, decorators: [{
1305
- type: Pipe,
1306
- args: [{
1307
- name: 'fsFormatOrdinalNumber',
1308
- }]
1306
+ FsArray.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsArray, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1307
+ FsArrayprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsArray });
1308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsArray, decorators: [{
1309
+ type: Injectable
1309
1310
  }] });
1310
1311
 
1311
- function email(value) {
1312
- return !!String(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
1313
- }
1314
-
1315
- function phone(value) {
1316
- const valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}/.test(value);
1317
- return valid || !String(value).length;
1318
- }
1319
-
1320
- /**
1321
- * Check validity of the url.
1322
- * Protocol (http/https) isn't required.
1323
- * @param value
1324
- * @returns {boolean}
1325
- */
1326
- function url(value) {
1327
- const expression = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#%[\]@!\$&'\(\)\*\+,;=.]+$/gm;
1328
- const regexp = new RegExp(expression);
1329
- return !!String(value).match(regexp);
1330
- }
1331
-
1332
- function compare(query, item) {
1333
- let value = true;
1334
- for (const key in query) {
1335
- value = value && item[key] == query[key];
1312
+ class FsMath {
1313
+ /**
1314
+ * @deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}
1315
+ */
1316
+ round(number, precision) {
1317
+ console.warn('@deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}');
1318
+ precision = precision || 0;
1319
+ let factor = Math.pow(10, precision);
1320
+ let tempNumber = number * factor;
1321
+ let roundedTempNumber = Math.round(tempNumber);
1322
+ return roundedTempNumber / factor;
1336
1323
  }
1337
- return value;
1338
- }
1324
+ }
1325
+ FsMath.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsMath, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1326
+ FsMath.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsMath });
1327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsMath, decorators: [{
1328
+ type: Injectable
1329
+ }] });
1339
1330
 
1340
- function filter(array, query) {
1341
- if (typeof query !== 'function') {
1342
- const queryObj = query;
1343
- query = (item) => {
1344
- return compare(queryObj, item);
1345
- };
1331
+ const KEY_CANCEL = 3, KEY_HELP = 6, KEY_BACKSPACE = 8, KEY_TAB = 9, KEY_CLEAR = 12, KEY_RETURN = 13, KEY_ENTER = 14, KEY_SHIFT = 16, KEY_CONTROL = 17, KEY_ALT = 18, KEY_PAUSE = 19, KEY_CAPS_LOCK = 20, KEY_ESCAPE = 27, KEY_SPACE = 32, KEY_PAGE_UP = 33, KEY_PAGE_DOWN = 34, KEY_END = 35, KEY_HOME = 36, KEY_LEFT = 37, KEY_UP = 38, KEY_RIGHT = 39, KEY_DOWN = 40, KEY_PRINTSCREEN = 44, KEY_INSERT = 45, KEY_DELETE = 46, KEY_0 = 48, KEY_1 = 49, KEY_2 = 50, KEY_3 = 51, KEY_4 = 52, KEY_5 = 53, KEY_6 = 54, KEY_7 = 55, KEY_8 = 56, KEY_9 = 57, KEY_SEMICOLON = 59, KEY_EQUALS = 61;
1332
+ /*
1333
+ Basically, just copy-pasted functionality from fs-boilerplate v1.x, with some small changes (like we dont have angular.bind anymore, had to go with a workaround)
1334
+ There might be a better way to organise constatns but I need to know use-cases
1335
+ */
1336
+ class FsUtil {
1337
+ constructor() {
1338
+ this.intervals = {};
1346
1339
  }
1347
- const isarray = Array.isArray(array);
1348
- const list = isarray ? [] : {};
1349
- if (isarray) {
1350
- array.forEach(function (item, idx) {
1351
- if (query(item)) {
1352
- list.push(item);
1353
- }
1340
+ /**
1341
+ * @deprecated use @firestitch/common/util/guid instead
1342
+ */
1343
+ guid(pattern) {
1344
+ console.warn('@deprecated use @firestitch/common/util/guid instead');
1345
+ pattern = pattern || 'xxxxxx';
1346
+ return pattern.replace(/[xy]/g, function (c) {
1347
+ var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
1348
+ return v.toString(16);
1354
1349
  });
1355
1350
  }
1356
- else {
1357
- Object.keys(array).forEach(key => {
1358
- if (query(array[key])) {
1359
- list[key] = array[key];
1360
- }
1361
- });
1351
+ /**
1352
+ * @deprecated use import { uuid } from @firestitch/common/util; instead
1353
+ */
1354
+ uuid() {
1355
+ console.warn('@deprecated use @firestitch/common/util/uuid instead');
1356
+ return this.guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
1362
1357
  }
1363
- return list;
1364
- }
1365
-
1366
- function inArray(values, array) {
1367
- if (!Array.isArray(values)) {
1368
- values = [values];
1358
+ /**
1359
+ * @deprecated use import { resolve } from @firestitch/common/util; instead
1360
+ */
1361
+ resolve(promise, defaults = []) {
1362
+ console.warn('@deprecated use @firestitch/common/util/resolve instead');
1363
+ const result = defaults;
1364
+ return new Promise(resolve => {
1365
+ promise.then(function (data) {
1366
+ Object.keys(data).forEach(key => result[key] = data[key]);
1367
+ resolve(result);
1368
+ });
1369
+ });
1369
1370
  }
1370
- for (let i = 0, len = values.length; i < len; i++) {
1371
- if (array.indexOf(values[i]) >= 0) {
1372
- return true;
1371
+ /**
1372
+ * @deprecated use _.toInteger() instead
1373
+ */
1374
+ int(value) {
1375
+ console.warn('@deprecated use _.toInteger() instead');
1376
+ value = parseInt(value);
1377
+ if (isNaN(value)) {
1378
+ value = 0;
1373
1379
  }
1380
+ return value;
1374
1381
  }
1375
- return false;
1376
- }
1377
-
1378
- function index(array, name, value = null) {
1379
- const list = {};
1380
- array.forEach(function (item) {
1381
- list[item[name]] = value ? item[value] : item;
1382
- });
1383
- return list;
1384
- }
1385
-
1386
- function indexOf(array, query) {
1387
- if (typeof query !== 'function') {
1388
- const queryObj = query;
1389
- query = (item) => {
1390
- return compare(queryObj, item);
1391
- };
1382
+ /**
1383
+ * @deprecated use _.toFinite() instead
1384
+ */
1385
+ float(value) {
1386
+ console.warn('@deprecated use _.toFinite() instead');
1387
+ value = parseFloat(value);
1388
+ if (isNaN(value)) {
1389
+ value = 0;
1390
+ }
1391
+ return value;
1392
1392
  }
1393
- for (let i = 0, len = array.length; i < len; i++) {
1394
- if (query(array[i])) {
1395
- return i;
1393
+ /**
1394
+ * @deprecated use _.toString() instead
1395
+ */
1396
+ string(string) {
1397
+ console.warn('@deprecated use _.toString() instead');
1398
+ if (string === null || string === undefined) {
1399
+ string = '';
1396
1400
  }
1401
+ return (string).toString();
1397
1402
  }
1398
- return -1;
1399
- }
1400
-
1401
- function keyExists(array, key) {
1402
- return array.hasOwnProperty(key);
1403
- }
1404
-
1405
- function ksort(unordered) {
1406
- Object.keys(unordered).sort().forEach(function (key) {
1407
- const value = unordered[key];
1408
- delete unordered[key];
1409
- unordered[key] = value;
1410
- });
1411
- }
1412
-
1413
- function list(array, property, index = null) {
1414
- const resultList = index ? {} : [];
1415
- array.forEach(function (item, idx) {
1416
- if (index) {
1417
- resultList[item[index]] = item[property];
1403
+ /**
1404
+ * @deprecated use import { isEmpty } from @firestitch/common/util; instead
1405
+ */
1406
+ isEmpty(value, options) {
1407
+ console.warn('@deprecated use import { isEmpty } from @firestitch/common/util; instead');
1408
+ options = options || {};
1409
+ return value === undefined ||
1410
+ value === null ||
1411
+ value === false ||
1412
+ value === '' ||
1413
+ !this.string(value).length ||
1414
+ (this.isObject(value) &&
1415
+ (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
1416
+ (!options.zero && (value === 0 || value === '0'));
1417
+ }
1418
+ /**
1419
+ * @deprecated use _.isInteger() instead
1420
+ */
1421
+ isInt(value, type) {
1422
+ console.warn('@deprecated use _.isInteger() instead');
1423
+ const int = !!this.string(value).match(/^\d+$/);
1424
+ if (!int) {
1425
+ return false;
1418
1426
  }
1419
- else {
1420
- resultList.push(item[property]);
1427
+ if (type) {
1428
+ return Number.isInteger(value);
1429
+ }
1430
+ return true;
1431
+ }
1432
+ /**
1433
+ * @deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}
1434
+ */
1435
+ each(object, func) {
1436
+ console.warn('@deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}');
1437
+ if (!this.isArray(object) && !this.isObject(object)) {
1438
+ return;
1421
1439
  }
1422
- });
1423
- return resultList;
1424
- }
1425
-
1426
- function nameValue(array, name, value) {
1427
- const list = [];
1428
- if (name || value) {
1429
- const nameFn = typeof name === 'function' ? name : function (item) {
1430
- return item[name];
1431
- };
1432
- const valueFn = typeof value === 'function' ? value : function (item) {
1433
- return item[value];
1434
- };
1435
- array.forEach(function (item) {
1436
- list.push({ name: nameFn(item), value: valueFn(item) });
1440
+ Object.keys(object).forEach(function (key) {
1441
+ func(object[key], key);
1437
1442
  });
1438
1443
  }
1439
- else {
1440
- array.forEach(function (n, v) {
1441
- list.push({ name: n, value: v });
1442
- });
1444
+ /**
1445
+ * @deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
1446
+ * or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead
1447
+ */
1448
+ isObject(value) {
1449
+ console.warn('@deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject} or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead');
1450
+ return value !== null && typeof value === 'object' && !this.isArray(value);
1443
1451
  }
1444
- return list;
1445
- }
1446
-
1447
- function remove(array, query) {
1448
- const idx = indexOf(array, query);
1449
- if (idx >= 0) {
1450
- return array.splice(idx, 1);
1452
+ /**
1453
+ * @deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}
1454
+ */
1455
+ isString(value) {
1456
+ console.warn('@deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}');
1457
+ return typeof value === 'string' || value instanceof String;
1451
1458
  }
1452
- return idx;
1453
- }
1454
-
1455
- function sort(array, query, reverse = false) {
1456
- if (typeof query !== 'function') {
1457
- const queryStr = query;
1458
- query = function (a, b) {
1459
- if (reverse) {
1460
- if (a[queryStr] < b[queryStr]) {
1461
- return 1;
1462
- }
1463
- else if (a[queryStr] > b[queryStr]) {
1464
- return -1;
1459
+ /**
1460
+ * @deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}
1461
+ */
1462
+ isArray(value) {
1463
+ console.warn('@deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}');
1464
+ return value instanceof Array;
1465
+ }
1466
+ /**
1467
+ * @deprecated use import { isNumeric } from @firestitch/common/util; instead
1468
+ */
1469
+ isNumeric(value) {
1470
+ console.warn('@deprecated use import { isNumeric } from @firestitch/common/util; instead');
1471
+ return this.string(value).length && !!this.string(value).match(/^-?\d*\.?\d*$/);
1472
+ }
1473
+ /**
1474
+ * @deprecated use import { isClass } from @firestitch/common/util; instead
1475
+ */
1476
+ isClass(value, cls) {
1477
+ console.warn('@deprecated use import { isClass } from @firestitch/common/util; instead');
1478
+ if (this.isObject(value)) {
1479
+ if (this.isString(cls)) {
1480
+ if (value.constructor) {
1481
+ if (value.constructor.name === cls) {
1482
+ return true;
1483
+ }
1465
1484
  }
1466
1485
  }
1467
1486
  else {
1468
- if (a[queryStr] > b[queryStr]) {
1469
- return 1;
1470
- }
1471
- else if (a[queryStr] < b[queryStr]) {
1472
- return -1;
1487
+ if (value instanceof cls) {
1488
+ return true;
1473
1489
  }
1474
1490
  }
1475
- return 0;
1476
- };
1491
+ }
1492
+ return false;
1477
1493
  }
1478
- array.sort(query);
1479
- return array;
1480
- }
1481
-
1482
- function rsort(array, query) {
1483
- return sort(array, query, true);
1484
- }
1485
-
1486
- function find(array, query) {
1487
- const data = filter(array, query);
1488
- return data.length ? data[0] : null;
1489
- }
1490
-
1491
- function acronym(str, length = 2) {
1492
- const splittedString = str
1493
- .replace(/[^a-zA-Z0-9]+/g, ' ')
1494
- .split(' ');
1495
- let result = '';
1496
- for (let i = 0; i < length; i++) {
1497
- if (!splittedString[i]) {
1498
- if (splittedString.length === 1) {
1499
- for (let j = 1; j < length; j++) {
1500
- if (!splittedString[i - 1][j]) {
1501
- break;
1502
- }
1503
- result += splittedString[i - 1][j].toUpperCase();
1504
- }
1494
+ /**
1495
+ * @deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}
1496
+ */
1497
+ isBoolean(value) {
1498
+ console.warn('@deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}');
1499
+ return value === true || value === false;
1500
+ }
1501
+ /**
1502
+ * @deprecated use import { value } from @firestitch/common/util; instead
1503
+ */
1504
+ value(object, key, def) {
1505
+ console.warn('@deprecated use import { value } from @firestitch/common/util; instead');
1506
+ if (this.isObject(object) || this.isArray(object)) {
1507
+ if (object.hasOwnProperty(key)) {
1508
+ return object[key];
1505
1509
  }
1506
- break;
1507
1510
  }
1508
- result += splittedString[i][0].toUpperCase();
1511
+ return def;
1509
1512
  }
1510
- return result;
1511
- }
1512
-
1513
- function delayedRetry(delayMs, maxRetry = 5, message) {
1514
- let retries = 0;
1515
- return (src) => src.pipe(retryWhen((errors) => errors.pipe(tap(() => {
1516
- retries++;
1517
- if (retries <= maxRetry) {
1518
- console.info(`Failed to load Resource. Retry in ${delayMs / 1000} sec. ${retries}/${maxRetry} times...`);
1513
+ throttle(func, wait) {
1514
+ console.warn('@deprecated use import { throttle } from @firestitch/common/util; instead');
1515
+ let waiting = false; // Initially, we're not waiting
1516
+ return function () {
1517
+ if (!waiting) { // If we're not waiting
1518
+ func.apply(null, arguments); // Execute users function
1519
+ waiting = true; // Prevent future invocations
1520
+ setTimeout(function () {
1521
+ waiting = false; // And allow future invocations
1522
+ }, wait);
1523
+ }
1524
+ };
1525
+ }
1526
+ /**
1527
+ * @deprecated use import { debounce } from @firestitch/common/util; instead
1528
+ */
1529
+ debounce(func, wait, immediate) {
1530
+ console.warn('@deprecated use import { debounce } from @firestitch/common/util; instead');
1531
+ var timeout;
1532
+ return function () {
1533
+ var context = this, args = arguments;
1534
+ var later = function () {
1535
+ timeout = null;
1536
+ if (!immediate)
1537
+ func.apply(context, args);
1538
+ };
1539
+ var callNow = immediate && !timeout;
1540
+ clearTimeout(timeout);
1541
+ timeout = setTimeout(later, wait);
1542
+ if (callNow)
1543
+ func.apply(context, args);
1544
+ };
1545
+ }
1546
+ /**
1547
+ * @deprecated use import { length } from @firestitch/common/util; instead
1548
+ */
1549
+ length(object) {
1550
+ console.warn('@deprecated use import { length } from @firestitch/common/util; instead');
1551
+ if (this.isObject(object)) {
1552
+ return Object.keys(object).length;
1519
1553
  }
1520
- }), concatMap((error) => iif(() => retries > maxRetry, throwError(getErrorMessage(maxRetry, message)), timer(delayMs))))));
1521
- }
1522
- const getErrorMessage = (maxRetry, defaultMessage) => {
1523
- if (!defaultMessage) {
1524
- return `Failed to load Resource for ${maxRetry} times. Giving up.`;
1554
+ if (this.isArray(object)) {
1555
+ return object.length;
1556
+ }
1557
+ return 0;
1525
1558
  }
1526
- else {
1527
- return defaultMessage;
1559
+ /**
1560
+ * @deprecated use import { boolean } from @firestitch/common/util; instead
1561
+ */
1562
+ boolean(value) {
1563
+ console.warn('@deprecated use import { boolean } from @firestitch/common/util; instead');
1564
+ return this.string(value).toLowerCase() !== 'false' && !!value;
1528
1565
  }
1529
- };
1566
+ /**
1567
+ * @deprecated use import { stringify } from @firestitch/common/util; instead
1568
+ */
1569
+ stringify(value) {
1570
+ console.warn('@deprecated use import { stringify } from @firestitch/common/util; instead');
1571
+ return JSON.stringify(value);
1572
+ }
1573
+ }
1574
+ FsUtil.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtil, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1575
+ FsUtil.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtil });
1576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsUtil, decorators: [{
1577
+ type: Injectable
1578
+ }] });
1530
1579
 
1531
- function bytes(bytes, decimals, unit) {
1532
- if (!bytes) {
1533
- return '0 MB';
1580
+ class FsValidate {
1581
+ constructor(fsUtil) {
1582
+ this.fsUtil = fsUtil;
1534
1583
  }
1535
- const e = typeof unit === 'string' ?
1536
- 'KMGTP'.indexOf(unit.replace('B', '')) + 1 :
1537
- Math.floor(Math.log(bytes) / Math.log(1024));
1538
- if (!isNumeric(decimals)) {
1539
- decimals = (bytes / 1024) > 1000 ? 2 : 0;
1584
+ /**
1585
+ * @deprecated use import { email } from @firestitch/common/validate; instead
1586
+ */
1587
+ phone(value) {
1588
+ const valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/.test(value);
1589
+ return valid || !String(value).length;
1540
1590
  }
1541
- return `${(bytes / Math.pow(1024, e))
1542
- .toFixed(decimals)}`
1543
- .replace(/\.00/, '')
1544
- + ' '
1545
- + (e ? ' KMGTP'.charAt(e) : '') + 'B';
1546
- }
1547
-
1548
- class FsFormatBytesPipe {
1549
- transform(value, decimals, unit) {
1550
- return bytes(value, decimals, unit);
1591
+ /**
1592
+ * @deprecated use import { email } from @firestitch/common/validate; instead
1593
+ */
1594
+ email(value) {
1595
+ return !!this.fsUtil.string(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
1551
1596
  }
1552
1597
  }
1553
- FsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1554
- FsFormatBytesPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatBytesPipe, name: "fsFormatBytes" });
1555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFormatBytesPipe, decorators: [{
1556
- type: Pipe,
1557
- args: [{
1558
- name: 'fsFormatBytes',
1559
- }]
1560
- }] });
1598
+ FsValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsValidate, deps: [{ token: FsUtil }], target: i0.ɵɵFactoryTarget.Injectable });
1599
+ FsValidateprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsValidate });
1600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsValidate, decorators: [{
1601
+ type: Injectable
1602
+ }], ctorParameters: function () { return [{ type: FsUtil }]; } });
1561
1603
 
1562
1604
  class FsCommonModule {
1563
1605
  static forRoot() {
@@ -1567,13 +1609,13 @@ class FsCommonModule {
1567
1609
  FsArray,
1568
1610
  FsMath,
1569
1611
  FsUtil,
1570
- FsValidate
1571
- ]
1612
+ FsValidate,
1613
+ ],
1572
1614
  };
1573
1615
  }
1574
1616
  }
1575
- FsCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1576
- FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCommonModule, declarations: [FsStopPropagationDirective,
1617
+ FsCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1618
+ FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, declarations: [FsStopPropagationDirective,
1577
1619
  FsPreventDefaultDirective,
1578
1620
  FsAutofocusDirective,
1579
1621
  FsUtilGuidPipe,
@@ -1584,7 +1626,8 @@ FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
1584
1626
  FsFormatCurrencyPipe,
1585
1627
  FsFormatTruncatePipe,
1586
1628
  FsFormatBytesPipe,
1587
- FsFormatOrdinalNumberPipe], imports: [CommonModule], exports: [FsStopPropagationDirective,
1629
+ FsFormatOrdinalNumberPipe,
1630
+ FsModelChangeDirective], imports: [CommonModule], exports: [FsStopPropagationDirective,
1588
1631
  FsPreventDefaultDirective,
1589
1632
  FsAutofocusDirective,
1590
1633
  FsUtilGuidPipe,
@@ -1595,11 +1638,12 @@ FsCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
1595
1638
  FsUtilIsEmptyPipe,
1596
1639
  FsUtilIsNotEmptyPipe,
1597
1640
  FsFormatBytesPipe,
1641
+ FsModelChangeDirective,
1598
1642
  FsFormatOrdinalNumberPipe] });
1599
- FsCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCommonModule, imports: [[
1643
+ FsCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, imports: [[
1600
1644
  CommonModule,
1601
1645
  ]] });
1602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCommonModule, decorators: [{
1646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsCommonModule, decorators: [{
1603
1647
  type: NgModule,
1604
1648
  args: [{
1605
1649
  imports: [
@@ -1618,6 +1662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1618
1662
  FsFormatTruncatePipe,
1619
1663
  FsFormatBytesPipe,
1620
1664
  FsFormatOrdinalNumberPipe,
1665
+ FsModelChangeDirective,
1621
1666
  ],
1622
1667
  exports: [
1623
1668
  FsStopPropagationDirective,
@@ -1631,6 +1676,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1631
1676
  FsUtilIsEmptyPipe,
1632
1677
  FsUtilIsNotEmptyPipe,
1633
1678
  FsFormatBytesPipe,
1679
+ FsModelChangeDirective,
1634
1680
  FsFormatOrdinalNumberPipe,
1635
1681
  ],
1636
1682
  }]
@@ -1658,5 +1704,5 @@ const keyboardShortcut = (shortcut) => {
1658
1704
  * Generated bundle index. Do not edit.
1659
1705
  */
1660
1706
 
1661
- export { FsArray, FsAutofocusDirective, FsCommonModule, FsFormatBytesPipe, FsFormatCurrencyPipe, FsFormatNumberPipe, FsFormatOrdinalNumberPipe, FsFormatTruncatePipe, FsMath, FsPreventDefaultDirective, FsStopPropagationDirective, FsUtil, FsUtilGuidPipe, FsUtilIsEmptyPipe, FsUtilIsNotEmptyPipe, FsUtilStringifyPipe, FsValidate, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_ALT, KEY_BACKSPACE, KEY_CANCEL, KEY_CAPS_LOCK, KEY_CLEAR, KEY_CONTROL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_EQUALS, KEY_ESCAPE, KEY_HELP, KEY_HOME, KEY_INSERT, KEY_LEFT, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_PAUSE, KEY_PRINTSCREEN, KEY_RETURN, KEY_RIGHT, KEY_SEMICOLON, KEY_SHIFT, KEY_SPACE, KEY_TAB, KEY_UP, Queue, QueueState, acronym, boolean, bytes, clone, compare, currency, debounce, delayedRetry, email, filter, find, fsSourceLoader, getNormalizedPath, guid, inArray, index, indexOf, isArrayEqual, isClass, isEmpty, isNumeric, isObject, keyExists, keyboardShortcut, ksort, length, list, nameValue, number, ordinalNumber, phone, remove, removeQueryParams, resolve, round, rsort, sort, stringify, throttle, toString, truncate, url, uuid, value };
1662
- //# sourceMappingURL=firestitch-common.js.map
1707
+ export { FsArray, FsAutofocusDirective, FsCommonModule, FsFormatBytesPipe, FsFormatCurrencyPipe, FsFormatNumberPipe, FsFormatOrdinalNumberPipe, FsFormatTruncatePipe, FsMath, FsModelChangeDirective, FsPreventDefaultDirective, FsStopPropagationDirective, FsUtil, FsUtilGuidPipe, FsUtilIsEmptyPipe, FsUtilIsNotEmptyPipe, FsUtilStringifyPipe, FsValidate, KEY_0$1 as KEY_0, KEY_1$1 as KEY_1, KEY_2$1 as KEY_2, KEY_3$1 as KEY_3, KEY_4$1 as KEY_4, KEY_5$1 as KEY_5, KEY_6$1 as KEY_6, KEY_7$1 as KEY_7, KEY_8$1 as KEY_8, KEY_9$1 as KEY_9, KEY_ALT$1 as KEY_ALT, KEY_BACKSPACE$1 as KEY_BACKSPACE, KEY_CANCEL$1 as KEY_CANCEL, KEY_CAPS_LOCK$1 as KEY_CAPS_LOCK, KEY_CLEAR$1 as KEY_CLEAR, KEY_CONTROL$1 as KEY_CONTROL, KEY_DELETE$1 as KEY_DELETE, KEY_DOWN$1 as KEY_DOWN, KEY_END$1 as KEY_END, KEY_ENTER$1 as KEY_ENTER, KEY_EQUALS$1 as KEY_EQUALS, KEY_ESCAPE$1 as KEY_ESCAPE, KEY_HELP$1 as KEY_HELP, KEY_HOME$1 as KEY_HOME, KEY_INSERT$1 as KEY_INSERT, KEY_LEFT$1 as KEY_LEFT, KEY_PAGE_DOWN$1 as KEY_PAGE_DOWN, KEY_PAGE_UP$1 as KEY_PAGE_UP, KEY_PAUSE$1 as KEY_PAUSE, KEY_PRINTSCREEN$1 as KEY_PRINTSCREEN, KEY_RETURN$1 as KEY_RETURN, KEY_RIGHT$1 as KEY_RIGHT, KEY_SEMICOLON$1 as KEY_SEMICOLON, KEY_SHIFT$1 as KEY_SHIFT, KEY_SPACE$1 as KEY_SPACE, KEY_TAB$1 as KEY_TAB, KEY_UP$1 as KEY_UP, Queue, QueueState, acronym, boolean, bytes, clone, compare, currency, debounce, delayedRetry, email, filter, find, fsSourceLoader, getNormalizedPath, guid, inArray, index, indexOf, isArrayEqual, isClass, isEmpty, isNumeric, isObject, keyExists, keyboardShortcut, ksort, length, list, loadJs, loadStyles, nameValue, number, ordinalNumber, phone, remove, removeQueryParams, resolve, round, rsort, sort, stringify, throttle, toString, truncate, url, uuid, value };
1708
+ //# sourceMappingURL=firestitch-common.mjs.map