@firestitch/common 8.0.11 → 12.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 (224) hide show
  1. package/app/directives/autofocus.directive.d.ts +3 -0
  2. package/app/directives/prevent-default.directive.d.ts +3 -0
  3. package/app/directives/stop-propagation.directive.d.ts +3 -0
  4. package/app/fs-common.module.d.ts +15 -1
  5. package/app/pipes/bytes.pipe.d.ts +3 -0
  6. package/app/pipes/currency.pipe.d.ts +3 -0
  7. package/app/pipes/number.pipe.d.ts +3 -0
  8. package/app/pipes/ordinal-number.pipe.d.ts +3 -0
  9. package/app/pipes/truncate.pipe.d.ts +3 -0
  10. package/app/pipes/util.pipe.d.ts +9 -0
  11. package/app/services/array.service.d.ts +3 -0
  12. package/app/services/math.service.d.ts +3 -0
  13. package/app/services/util.service.d.ts +3 -0
  14. package/app/services/vaildate.service.d.ts +3 -0
  15. package/bundles/firestitch-common.umd.js +821 -2453
  16. package/bundles/firestitch-common.umd.js.map +1 -1
  17. package/esm2015/app/directives/autofocus.directive.js +12 -33
  18. package/esm2015/app/directives/prevent-default.directive.js +13 -18
  19. package/esm2015/app/directives/stop-propagation.directive.js +13 -18
  20. package/esm2015/app/fs-common.module.js +65 -44
  21. package/esm2015/app/pipes/bytes.pipe.js +10 -15
  22. package/esm2015/app/pipes/currency.pipe.js +13 -28
  23. package/esm2015/app/pipes/number.pipe.js +10 -16
  24. package/esm2015/app/pipes/ordinal-number.pipe.js +10 -15
  25. package/esm2015/app/pipes/truncate.pipe.js +10 -20
  26. package/esm2015/app/pipes/util.pipe.js +34 -45
  27. package/esm2015/app/services/array.service.js +63 -190
  28. package/esm2015/app/services/math.service.js +9 -17
  29. package/esm2015/app/services/util.service.js +65 -244
  30. package/esm2015/app/services/vaildate.service.js +12 -32
  31. package/esm2015/firestitch-common.js +2 -16
  32. package/esm2015/libs/array/compare/compare.js +1 -12
  33. package/esm2015/libs/array/compare/index.js +2 -7
  34. package/esm2015/libs/array/filter/filter.js +7 -33
  35. package/esm2015/libs/array/filter/index.js +2 -7
  36. package/esm2015/libs/array/find/find.js +1 -12
  37. package/esm2015/libs/array/find/index.js +2 -7
  38. package/esm2015/libs/array/inArray/inArray.js +1 -11
  39. package/esm2015/libs/array/inArray/index.js +2 -7
  40. package/esm2015/libs/array/index/index.js +5 -21
  41. package/esm2015/libs/array/index.js +14 -19
  42. package/esm2015/libs/array/indexOf/index.js +2 -7
  43. package/esm2015/libs/array/indexOf/indexOf.js +3 -18
  44. package/esm2015/libs/array/keyExists/index.js +2 -7
  45. package/esm2015/libs/array/keyExists/keyExists.js +1 -11
  46. package/esm2015/libs/array/ksort/index.js +2 -7
  47. package/esm2015/libs/array/ksort/ksort.js +3 -17
  48. package/esm2015/libs/array/list/index.js +2 -7
  49. package/esm2015/libs/array/list/list.js +3 -20
  50. package/esm2015/libs/array/nameValue/index.js +2 -7
  51. package/esm2015/libs/array/nameValue/nameValue.js +9 -40
  52. package/esm2015/libs/array/remove/index.js +2 -7
  53. package/esm2015/libs/array/remove/remove.js +1 -12
  54. package/esm2015/libs/array/rsort/index.js +2 -7
  55. package/esm2015/libs/array/rsort/rsort.js +1 -11
  56. package/esm2015/libs/array/sort/index.js +2 -7
  57. package/esm2015/libs/array/sort/sort.js +3 -20
  58. package/esm2015/libs/format/acronym/acronym.js +1 -13
  59. package/esm2015/libs/format/acronym/index.js +2 -7
  60. package/esm2015/libs/format/bytes/bytes.js +1 -12
  61. package/esm2015/libs/format/bytes/index.js +2 -7
  62. package/esm2015/libs/format/currency/currency.js +1 -14
  63. package/esm2015/libs/format/currency/index.js +2 -7
  64. package/esm2015/libs/format/index.js +6 -11
  65. package/esm2015/libs/format/number/index.js +2 -7
  66. package/esm2015/libs/format/number/number.js +1 -11
  67. package/esm2015/libs/format/truncate/index.js +2 -7
  68. package/esm2015/libs/format/truncate/truncate.js +1 -14
  69. package/esm2015/libs/index.js +5 -10
  70. package/esm2015/libs/rxjs/delayedRetry.js +5 -43
  71. package/esm2015/libs/util/boolean/boolean.js +1 -10
  72. package/esm2015/libs/util/boolean/index.js +2 -7
  73. package/esm2015/libs/util/debounce/debounce.js +6 -29
  74. package/esm2015/libs/util/debounce/index.js +2 -7
  75. package/esm2015/libs/util/get-normalized-path/get-normalized-path.js +1 -11
  76. package/esm2015/libs/util/get-normalized-path/index.js +1 -6
  77. package/esm2015/libs/util/guid/guid.js +3 -20
  78. package/esm2015/libs/util/guid/index.js +2 -7
  79. package/esm2015/libs/util/index.js +15 -20
  80. package/esm2015/libs/util/isClass/index.js +2 -7
  81. package/esm2015/libs/util/isClass/isClass.js +1 -11
  82. package/esm2015/libs/util/isEmpty/index.js +2 -7
  83. package/esm2015/libs/util/isEmpty/isEmpty.js +1 -11
  84. package/esm2015/libs/util/isNumeric/index.js +2 -7
  85. package/esm2015/libs/util/isNumeric/isNumeric.js +1 -11
  86. package/esm2015/libs/util/keys/index.js +2 -7
  87. package/esm2015/libs/util/keys/keys.js +1 -43
  88. package/esm2015/libs/util/length/index.js +2 -7
  89. package/esm2015/libs/util/length/length.js +1 -10
  90. package/esm2015/libs/util/ordinal-number/ordinal-number.js +1 -13
  91. package/esm2015/libs/util/queue/index.js +2 -7
  92. package/esm2015/libs/util/queue/operation.js +1 -18
  93. package/esm2015/libs/util/queue/queue.enum.js +6 -12
  94. package/esm2015/libs/util/queue/queue.js +14 -168
  95. package/esm2015/libs/util/remove-query-params/index.js +1 -6
  96. package/esm2015/libs/util/remove-query-params/remove-query-params.js +1 -10
  97. package/esm2015/libs/util/resolve/index.js +2 -7
  98. package/esm2015/libs/util/resolve/resolve.js +6 -29
  99. package/esm2015/libs/util/stringify/index.js +2 -7
  100. package/esm2015/libs/util/stringify/stringify.js +1 -10
  101. package/esm2015/libs/util/throttle/index.js +2 -7
  102. package/esm2015/libs/util/throttle/throttle.js +6 -23
  103. package/esm2015/libs/util/uuid/index.js +2 -7
  104. package/esm2015/libs/util/uuid/uuid.js +1 -9
  105. package/esm2015/libs/util/value/index.js +2 -7
  106. package/esm2015/libs/util/value/value.js +1 -12
  107. package/esm2015/libs/validate/email/email.js +1 -10
  108. package/esm2015/libs/validate/email/index.js +2 -7
  109. package/esm2015/libs/validate/index.js +4 -9
  110. package/esm2015/libs/validate/phone/index.js +2 -7
  111. package/esm2015/libs/validate/phone/phone.js +1 -11
  112. package/esm2015/libs/validate/url/index.js +2 -7
  113. package/esm2015/libs/validate/url/url.js +1 -12
  114. package/esm2015/public_api.js +11 -7
  115. package/fesm2015/firestitch-common.js +418 -1808
  116. package/fesm2015/firestitch-common.js.map +1 -1
  117. package/firestitch-common.d.ts +1 -9
  118. package/libs/array/index/index.d.ts +1 -1
  119. package/libs/util/queue/queue.d.ts +9 -9
  120. package/package.json +7 -11
  121. package/public_api.d.ts +9 -0
  122. package/bundles/firestitch-common.umd.min.js +0 -16
  123. package/bundles/firestitch-common.umd.min.js.map +0 -1
  124. package/esm5/app/directives/autofocus.directive.js +0 -45
  125. package/esm5/app/directives/prevent-default.directive.js +0 -32
  126. package/esm5/app/directives/stop-propagation.directive.js +0 -32
  127. package/esm5/app/fs-common.module.js +0 -79
  128. package/esm5/app/pipes/bytes.pipe.js +0 -30
  129. package/esm5/app/pipes/currency.pipe.js +0 -43
  130. package/esm5/app/pipes/number.pipe.js +0 -32
  131. package/esm5/app/pipes/ordinal-number.pipe.js +0 -30
  132. package/esm5/app/pipes/truncate.pipe.js +0 -38
  133. package/esm5/app/pipes/util.pipe.js +0 -100
  134. package/esm5/app/services/array.service.js +0 -491
  135. package/esm5/app/services/math.service.js +0 -42
  136. package/esm5/app/services/util.service.js +0 -608
  137. package/esm5/app/services/vaildate.service.js +0 -63
  138. package/esm5/firestitch-common.js +0 -19
  139. package/esm5/libs/array/compare/compare.js +0 -19
  140. package/esm5/libs/array/compare/index.js +0 -7
  141. package/esm5/libs/array/filter/filter.js +0 -53
  142. package/esm5/libs/array/filter/index.js +0 -7
  143. package/esm5/libs/array/find/find.js +0 -17
  144. package/esm5/libs/array/find/index.js +0 -7
  145. package/esm5/libs/array/inArray/inArray.js +0 -22
  146. package/esm5/libs/array/inArray/index.js +0 -7
  147. package/esm5/libs/array/index/index.js +0 -24
  148. package/esm5/libs/array/index.js +0 -19
  149. package/esm5/libs/array/indexOf/index.js +0 -7
  150. package/esm5/libs/array/indexOf/indexOf.js +0 -31
  151. package/esm5/libs/array/keyExists/index.js +0 -7
  152. package/esm5/libs/array/keyExists/keyExists.js +0 -14
  153. package/esm5/libs/array/ksort/index.js +0 -7
  154. package/esm5/libs/array/ksort/ksort.js +0 -22
  155. package/esm5/libs/array/list/index.js +0 -7
  156. package/esm5/libs/array/list/list.js +0 -31
  157. package/esm5/libs/array/nameValue/index.js +0 -7
  158. package/esm5/libs/array/nameValue/nameValue.js +0 -52
  159. package/esm5/libs/array/remove/index.js +0 -7
  160. package/esm5/libs/array/remove/remove.js +0 -20
  161. package/esm5/libs/array/rsort/index.js +0 -7
  162. package/esm5/libs/array/rsort/rsort.js +0 -15
  163. package/esm5/libs/array/sort/index.js +0 -7
  164. package/esm5/libs/array/sort/sort.js +0 -45
  165. package/esm5/libs/format/acronym/acronym.js +0 -35
  166. package/esm5/libs/format/acronym/index.js +0 -7
  167. package/esm5/libs/format/bytes/bytes.js +0 -23
  168. package/esm5/libs/format/bytes/index.js +0 -7
  169. package/esm5/libs/format/currency/currency.js +0 -23
  170. package/esm5/libs/format/currency/index.js +0 -7
  171. package/esm5/libs/format/index.js +0 -11
  172. package/esm5/libs/format/number/index.js +0 -7
  173. package/esm5/libs/format/number/number.js +0 -14
  174. package/esm5/libs/format/truncate/index.js +0 -7
  175. package/esm5/libs/format/truncate/truncate.js +0 -28
  176. package/esm5/libs/index.js +0 -11
  177. package/esm5/libs/rxjs/delayedRetry.js +0 -65
  178. package/esm5/libs/util/boolean/boolean.js +0 -14
  179. package/esm5/libs/util/boolean/index.js +0 -7
  180. package/esm5/libs/util/debounce/debounce.js +0 -40
  181. package/esm5/libs/util/debounce/index.js +0 -7
  182. package/esm5/libs/util/get-normalized-path/get-normalized-path.js +0 -16
  183. package/esm5/libs/util/get-normalized-path/index.js +0 -7
  184. package/esm5/libs/util/guid/guid.js +0 -37
  185. package/esm5/libs/util/guid/index.js +0 -7
  186. package/esm5/libs/util/index.js +0 -23
  187. package/esm5/libs/util/isClass/index.js +0 -7
  188. package/esm5/libs/util/isClass/isClass.js +0 -28
  189. package/esm5/libs/util/isEmpty/index.js +0 -7
  190. package/esm5/libs/util/isEmpty/isEmpty.js +0 -23
  191. package/esm5/libs/util/isNumeric/index.js +0 -7
  192. package/esm5/libs/util/isNumeric/isNumeric.js +0 -16
  193. package/esm5/libs/util/keys/index.js +0 -7
  194. package/esm5/libs/util/keys/keys.js +0 -80
  195. package/esm5/libs/util/length/index.js +0 -7
  196. package/esm5/libs/util/length/length.js +0 -20
  197. package/esm5/libs/util/ordinal-number/ordinal-number.js +0 -22
  198. package/esm5/libs/util/queue/index.js +0 -8
  199. package/esm5/libs/util/queue/operation.js +0 -30
  200. package/esm5/libs/util/queue/queue.enum.js +0 -12
  201. package/esm5/libs/util/queue/queue.js +0 -367
  202. package/esm5/libs/util/remove-query-params/index.js +0 -7
  203. package/esm5/libs/util/remove-query-params/remove-query-params.js +0 -13
  204. package/esm5/libs/util/resolve/index.js +0 -7
  205. package/esm5/libs/util/resolve/resolve.js +0 -34
  206. package/esm5/libs/util/stringify/index.js +0 -7
  207. package/esm5/libs/util/stringify/stringify.js +0 -13
  208. package/esm5/libs/util/throttle/index.js +0 -7
  209. package/esm5/libs/util/throttle/throttle.js +0 -30
  210. package/esm5/libs/util/uuid/index.js +0 -7
  211. package/esm5/libs/util/uuid/uuid.js +0 -13
  212. package/esm5/libs/util/value/index.js +0 -7
  213. package/esm5/libs/util/value/value.js +0 -20
  214. package/esm5/libs/validate/email/email.js +0 -13
  215. package/esm5/libs/validate/email/index.js +0 -7
  216. package/esm5/libs/validate/index.js +0 -9
  217. package/esm5/libs/validate/phone/index.js +0 -7
  218. package/esm5/libs/validate/phone/phone.js +0 -15
  219. package/esm5/libs/validate/url/index.js +0 -7
  220. package/esm5/libs/validate/url/url.js +0 -23
  221. package/esm5/public_api.js +0 -17
  222. package/fesm5/firestitch-common.js +0 -3284
  223. package/fesm5/firestitch-common.js.map +0 -1
  224. package/firestitch-common.metadata.json +0 -1
@@ -1,3284 +0,0 @@
1
- import { Injectable, Pipe, Inject, LOCALE_ID, Directive, HostListener, ElementRef, NgModule } from '@angular/core';
2
- import { CurrencyPipe, CommonModule } from '@angular/common';
3
- import { toString, isObject, isArray } from 'lodash-es';
4
- import { __makeTemplateObject } from 'tslib';
5
- import { Subject, Observable, of, iif, throwError, timer } from 'rxjs';
6
- import { takeUntil, delay, retryWhen, tap, concatMap } from 'rxjs/operators';
7
-
8
- /**
9
- * @fileoverview added by tsickle
10
- * Generated from: app/services/array.service.ts
11
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12
- */
13
- var FsArray = /** @class */ (function () {
14
- function FsArray() {
15
- }
16
- /**
17
- * @deprecated use import { nameValue } from @firestitch/common/array; instead
18
- */
19
- /**
20
- * @deprecated use import { nameValue } from \@firestitch/common/array; instead
21
- * @param {?} array
22
- * @param {?} name
23
- * @param {?} value
24
- * @return {?}
25
- */
26
- FsArray.prototype.nameValue = /**
27
- * @deprecated use import { nameValue } from \@firestitch/common/array; instead
28
- * @param {?} array
29
- * @param {?} name
30
- * @param {?} value
31
- * @return {?}
32
- */
33
- function (array, name, value) {
34
- console.warn('@deprecated use import { nameValue } from @firestitch/common/array; instead');
35
- /** @type {?} */
36
- var list = [];
37
- if (name || value) {
38
- /** @type {?} */
39
- var nameFn_1 = typeof name === 'function' ? name : (/**
40
- * @param {?} item
41
- * @return {?}
42
- */
43
- function (item) { return item[name]; });
44
- /** @type {?} */
45
- var valueFn_1 = typeof value === 'function' ? value : (/**
46
- * @param {?} item
47
- * @return {?}
48
- */
49
- function (item) { return item[value]; });
50
- array.forEach((/**
51
- * @param {?} item
52
- * @return {?}
53
- */
54
- function (item) {
55
- list.push({ name: nameFn_1(item), value: valueFn_1(item) });
56
- }));
57
- }
58
- else {
59
- array.forEach((/**
60
- * @param {?} name
61
- * @param {?} value
62
- * @return {?}
63
- */
64
- function (name, value) {
65
- list.push({ name: name, value: value });
66
- }));
67
- }
68
- return list;
69
- };
70
- /**
71
- * @deprecated use import { remove } from @firestitch/common/array; instead
72
- */
73
- /**
74
- * @deprecated use import { remove } from \@firestitch/common/array; instead
75
- * @param {?} array
76
- * @param {?} query
77
- * @return {?}
78
- */
79
- FsArray.prototype.remove = /**
80
- * @deprecated use import { remove } from \@firestitch/common/array; instead
81
- * @param {?} array
82
- * @param {?} query
83
- * @return {?}
84
- */
85
- function (array, query) {
86
- console.warn('@deprecated use import { remove } from @firestitch/common/array; instead');
87
- /** @type {?} */
88
- var idx = this.indexOf(array, query);
89
- if (idx >= 0) {
90
- return array.splice(idx, 1);
91
- }
92
- return idx;
93
- };
94
- /**
95
- * @deprecated use import { indexOf } from @firestitch/common/array; instead
96
- */
97
- /**
98
- * @deprecated use import { indexOf } from \@firestitch/common/array; instead
99
- * @param {?} array
100
- * @param {?} query
101
- * @return {?}
102
- */
103
- FsArray.prototype.indexOf = /**
104
- * @deprecated use import { indexOf } from \@firestitch/common/array; instead
105
- * @param {?} array
106
- * @param {?} query
107
- * @return {?}
108
- */
109
- function (array, query) {
110
- var _this = this;
111
- console.warn('@deprecated use import { indexOf } from @firestitch/common/array; instead');
112
- if (typeof query !== 'function') {
113
- /** @type {?} */
114
- var queryObj_1 = query;
115
- query = (/**
116
- * @param {?} item
117
- * @return {?}
118
- */
119
- function (item) {
120
- return _this.compare(queryObj_1, item);
121
- });
122
- }
123
- for (var i = 0, len = array.length; i < len; i++) {
124
- if (query(array[i])) {
125
- return i;
126
- }
127
- }
128
- return -1;
129
- };
130
- /**
131
- * @deprecated use import { compare } from @firestitch/common/array; instead
132
- */
133
- /**
134
- * @deprecated use import { compare } from \@firestitch/common/array; instead
135
- * @param {?} query
136
- * @param {?} item
137
- * @return {?}
138
- */
139
- FsArray.prototype.compare = /**
140
- * @deprecated use import { compare } from \@firestitch/common/array; instead
141
- * @param {?} query
142
- * @param {?} item
143
- * @return {?}
144
- */
145
- function (query, item) {
146
- console.warn('@deprecated use import { compare } from @firestitch/common/array; instead');
147
- /** @type {?} */
148
- var value = true;
149
- for (var key in query) {
150
- value = value && item[key] == query[key];
151
- }
152
- return value;
153
- };
154
- /**
155
- * @deprecated use import { filter } from @firestitch/common/array; instead
156
- */
157
- /**
158
- * @deprecated use import { filter } from \@firestitch/common/array; instead
159
- * @param {?} array
160
- * @param {?} query
161
- * @return {?}
162
- */
163
- FsArray.prototype.filter = /**
164
- * @deprecated use import { filter } from \@firestitch/common/array; instead
165
- * @param {?} array
166
- * @param {?} query
167
- * @return {?}
168
- */
169
- function (array, query) {
170
- var _this = this;
171
- console.warn('@deprecated use import { filter } from @firestitch/common/array; instead');
172
- if (typeof query !== 'function') {
173
- /** @type {?} */
174
- var queryObj_2 = query;
175
- query = (/**
176
- * @param {?} item
177
- * @return {?}
178
- */
179
- function (item) {
180
- return _this.compare(queryObj_2, item);
181
- });
182
- }
183
- /** @type {?} */
184
- var isarray = Array.isArray(array);
185
- /** @type {?} */
186
- var list = isarray ? [] : {};
187
- if (isarray)
188
- array.forEach((/**
189
- * @param {?} item
190
- * @param {?} idx
191
- * @return {?}
192
- */
193
- function (item, idx) {
194
- if (query(item)) {
195
- list.push(item);
196
- }
197
- }));
198
- else
199
- Object.keys(array).forEach((/**
200
- * @param {?} key
201
- * @return {?}
202
- */
203
- function (key) {
204
- if (query(array[key])) {
205
- list[key] = array[key];
206
- }
207
- }));
208
- return list;
209
- };
210
- /**
211
- * @deprecated use import { index } from @firestitch/common/array; instead
212
- */
213
- /**
214
- * @deprecated use import { index } from \@firestitch/common/array; instead
215
- * @param {?} array
216
- * @param {?} property
217
- * @return {?}
218
- */
219
- FsArray.prototype.index = /**
220
- * @deprecated use import { index } from \@firestitch/common/array; instead
221
- * @param {?} array
222
- * @param {?} property
223
- * @return {?}
224
- */
225
- function (array, property) {
226
- console.warn('@deprecated use import { index } from @firestitch/common/array; instead');
227
- /** @type {?} */
228
- var list = {};
229
- array.forEach((/**
230
- * @param {?} item
231
- * @param {?} idx
232
- * @return {?}
233
- */
234
- function (item, idx) {
235
- list[item[property]] = item;
236
- }));
237
- return list;
238
- };
239
- /**
240
- * @deprecated use import { sort } from @firestitch/common/array; instead
241
- */
242
- /**
243
- * @deprecated use import { sort } from \@firestitch/common/array; instead
244
- * @param {?} array
245
- * @param {?} query
246
- * @param {?=} reverse
247
- * @return {?}
248
- */
249
- FsArray.prototype.sort = /**
250
- * @deprecated use import { sort } from \@firestitch/common/array; instead
251
- * @param {?} array
252
- * @param {?} query
253
- * @param {?=} reverse
254
- * @return {?}
255
- */
256
- function (array, query, reverse) {
257
- if (reverse === void 0) { reverse = false; }
258
- console.warn('@deprecated use import { sort } from @firestitch/common/array; instead');
259
- if (typeof query !== 'function') {
260
- /** @type {?} */
261
- var queryStr_1 = query;
262
- query = (/**
263
- * @param {?} a
264
- * @param {?} b
265
- * @return {?}
266
- */
267
- function (a, b) {
268
- if (reverse) {
269
- if (a[queryStr_1] < b[queryStr_1]) {
270
- return 1;
271
- }
272
- else if (a[queryStr_1] > b[queryStr_1]) {
273
- return -1;
274
- }
275
- }
276
- else {
277
- if (a[queryStr_1] > b[queryStr_1]) {
278
- return 1;
279
- }
280
- else if (a[queryStr_1] < b[queryStr_1]) {
281
- return -1;
282
- }
283
- }
284
- return 0;
285
- });
286
- }
287
- array.sort(query);
288
- return array;
289
- };
290
- /**
291
- * @deprecated use import { rsort } from @firestitch/common/array; instead
292
- */
293
- /**
294
- * @deprecated use import { rsort } from \@firestitch/common/array; instead
295
- * @param {?} array
296
- * @param {?} query
297
- * @return {?}
298
- */
299
- FsArray.prototype.rsort = /**
300
- * @deprecated use import { rsort } from \@firestitch/common/array; instead
301
- * @param {?} array
302
- * @param {?} query
303
- * @return {?}
304
- */
305
- function (array, query) {
306
- console.warn('@deprecated use import { rsort } from @firestitch/common/array; instead');
307
- return this.sort(array, query, true);
308
- };
309
- /**
310
- * @deprecated use import { list } from @firestitch/common/array; instead
311
- */
312
- /**
313
- * @deprecated use import { list } from \@firestitch/common/array; instead
314
- * @param {?} array
315
- * @param {?} property
316
- * @param {?=} index
317
- * @return {?}
318
- */
319
- FsArray.prototype.list = /**
320
- * @deprecated use import { list } from \@firestitch/common/array; instead
321
- * @param {?} array
322
- * @param {?} property
323
- * @param {?=} index
324
- * @return {?}
325
- */
326
- function (array, property, index) {
327
- if (index === void 0) { index = null; }
328
- console.warn('@deprecated use import { list } from @firestitch/common/array; instead');
329
- /** @type {?} */
330
- var list = index ? {} : [];
331
- array.forEach((/**
332
- * @param {?} item
333
- * @param {?} idx
334
- * @return {?}
335
- */
336
- function (item, idx) {
337
- if (index) {
338
- list[item[index]] = item[property];
339
- }
340
- else {
341
- list.push(item[property]);
342
- }
343
- }));
344
- return list;
345
- };
346
- /**
347
- * @deprecated use import { applyDepth } from @firestitch/common/array; instead
348
- */
349
- /**
350
- * @deprecated use import { applyDepth } from \@firestitch/common/array; instead
351
- * @param {?} objects
352
- * @param {?} parent_property
353
- * @param {?=} id_property
354
- * @param {?=} depth_property
355
- * @return {?}
356
- */
357
- FsArray.prototype.applyDepth = /**
358
- * @deprecated use import { applyDepth } from \@firestitch/common/array; instead
359
- * @param {?} objects
360
- * @param {?} parent_property
361
- * @param {?=} id_property
362
- * @param {?=} depth_property
363
- * @return {?}
364
- */
365
- function (objects, parent_property, id_property, depth_property) {
366
- if (id_property === void 0) { id_property = 'id'; }
367
- if (depth_property === void 0) { depth_property = 'depth'; }
368
- console.warn('@deprecated use import { applyDepth } from @firestitch/common/array; instead');
369
- /** @type {?} */
370
- var keyed = {};
371
- objects.forEach((/**
372
- * @param {?} object
373
- * @return {?}
374
- */
375
- function (object) {
376
- if (!object[parent_property]) {
377
- object[depth_property] = 0;
378
- }
379
- keyed[object[id_property]] = object;
380
- }));
381
- Object.keys(keyed).forEach((/**
382
- * @param {?} key
383
- * @return {?}
384
- */
385
- function (key) {
386
- Object.keys(keyed).forEach((/**
387
- * @param {?} key
388
- * @return {?}
389
- */
390
- function (key) {
391
- /** @type {?} */
392
- var object = keyed[key];
393
- if (!keyed[key][depth_property]) {
394
- if (keyed[key][parent_property]) {
395
- keyed[key][depth_property] = keyed[keyed[key][parent_property]][depth_property] + 1;
396
- }
397
- }
398
- }));
399
- }));
400
- return keyed;
401
- };
402
- /**
403
- * @deprecated use import { inArray } from @firestitch/common/array; instead
404
- */
405
- /**
406
- * @deprecated use import { inArray } from \@firestitch/common/array; instead
407
- * @param {?} values
408
- * @param {?} array
409
- * @return {?}
410
- */
411
- FsArray.prototype.inArray = /**
412
- * @deprecated use import { inArray } from \@firestitch/common/array; instead
413
- * @param {?} values
414
- * @param {?} array
415
- * @return {?}
416
- */
417
- function (values, array) {
418
- console.warn('@deprecated use import { inArray } from @firestitch/common/array; instead');
419
- if (!Array.isArray(values)) {
420
- values = [values];
421
- }
422
- for (var i = 0, len = values.length; i < len; i++) {
423
- if (array.indexOf(values[i]) >= 0) {
424
- return true;
425
- }
426
- }
427
- return false;
428
- };
429
- /**
430
- * @deprecated use import { keyExists } from @firestitch/common/array; instead
431
- */
432
- /**
433
- * @deprecated use import { keyExists } from \@firestitch/common/array; instead
434
- * @param {?} array
435
- * @param {?} key
436
- * @return {?}
437
- */
438
- FsArray.prototype.keyExists = /**
439
- * @deprecated use import { keyExists } from \@firestitch/common/array; instead
440
- * @param {?} array
441
- * @param {?} key
442
- * @return {?}
443
- */
444
- function (array, key) {
445
- console.warn('@deprecated use import { keyExists } from @firestitch/common/array; instead');
446
- return array.hasOwnProperty(key);
447
- };
448
- /**
449
- * @deprecated use import { length } from @firestitch/common/array; instead
450
- */
451
- /**
452
- * @deprecated use import { length } from \@firestitch/common/array; instead
453
- * @param {?} array
454
- * @return {?}
455
- */
456
- FsArray.prototype.length = /**
457
- * @deprecated use import { length } from \@firestitch/common/array; instead
458
- * @param {?} array
459
- * @return {?}
460
- */
461
- function (array) {
462
- console.warn('@deprecated use import { length } from @firestitch/common/array; instead');
463
- return array.length;
464
- };
465
- /**
466
- * @deprecated use import { ksort } from @firestitch/common/array; instead
467
- */
468
- /**
469
- * @deprecated use import { ksort } from \@firestitch/common/array; instead
470
- * @param {?} unordered
471
- * @return {?}
472
- */
473
- FsArray.prototype.ksort = /**
474
- * @deprecated use import { ksort } from \@firestitch/common/array; instead
475
- * @param {?} unordered
476
- * @return {?}
477
- */
478
- function (unordered) {
479
- console.warn('@deprecated use import { ksort } from @firestitch/common/array; instead');
480
- Object.keys(unordered).sort().forEach((/**
481
- * @param {?} key
482
- * @return {?}
483
- */
484
- function (key) {
485
- /** @type {?} */
486
- var value = unordered[key];
487
- delete unordered[key];
488
- unordered[key] = value;
489
- }));
490
- };
491
- FsArray.decorators = [
492
- { type: Injectable }
493
- ];
494
- return FsArray;
495
- }());
496
-
497
- /**
498
- * @fileoverview added by tsickle
499
- * Generated from: app/services/math.service.ts
500
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
501
- */
502
- var FsMath = /** @class */ (function () {
503
- function FsMath() {
504
- }
505
- /**
506
- * @deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}
507
- */
508
- /**
509
- * @deprecated use _.round() instead {\@link https://lodash.com/docs/4.17.5#round}
510
- * @param {?} number
511
- * @param {?} precision
512
- * @return {?}
513
- */
514
- FsMath.prototype.round = /**
515
- * @deprecated use _.round() instead {\@link https://lodash.com/docs/4.17.5#round}
516
- * @param {?} number
517
- * @param {?} precision
518
- * @return {?}
519
- */
520
- function (number, precision) {
521
- console.warn('@deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}');
522
- precision = precision || 0;
523
- /** @type {?} */
524
- var factor = Math.pow(10, precision);
525
- /** @type {?} */
526
- var tempNumber = number * factor;
527
- /** @type {?} */
528
- var roundedTempNumber = Math.round(tempNumber);
529
- return roundedTempNumber / factor;
530
- };
531
- FsMath.decorators = [
532
- { type: Injectable }
533
- ];
534
- return FsMath;
535
- }());
536
-
537
- /**
538
- * @fileoverview added by tsickle
539
- * Generated from: app/services/util.service.ts
540
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
541
- */
542
- /** @type {?} */
543
- var KEY_CANCEL = 3;
544
- /** @type {?} */
545
- var KEY_HELP = 6;
546
- /** @type {?} */
547
- var KEY_BACKSPACE = 8;
548
- /** @type {?} */
549
- var KEY_TAB = 9;
550
- /** @type {?} */
551
- var KEY_CLEAR = 12;
552
- /** @type {?} */
553
- var KEY_RETURN = 13;
554
- /** @type {?} */
555
- var KEY_ENTER = 14;
556
- /** @type {?} */
557
- var KEY_SHIFT = 16;
558
- /** @type {?} */
559
- var KEY_CONTROL = 17;
560
- /** @type {?} */
561
- var KEY_ALT = 18;
562
- /** @type {?} */
563
- var KEY_PAUSE = 19;
564
- /** @type {?} */
565
- var KEY_CAPS_LOCK = 20;
566
- /** @type {?} */
567
- var KEY_ESCAPE = 27;
568
- /** @type {?} */
569
- var KEY_SPACE = 32;
570
- /** @type {?} */
571
- var KEY_PAGE_UP = 33;
572
- /** @type {?} */
573
- var KEY_PAGE_DOWN = 34;
574
- /** @type {?} */
575
- var KEY_END = 35;
576
- /** @type {?} */
577
- var KEY_HOME = 36;
578
- /** @type {?} */
579
- var KEY_LEFT = 37;
580
- /** @type {?} */
581
- var KEY_UP = 38;
582
- /** @type {?} */
583
- var KEY_RIGHT = 39;
584
- /** @type {?} */
585
- var KEY_DOWN = 40;
586
- /** @type {?} */
587
- var KEY_PRINTSCREEN = 44;
588
- /** @type {?} */
589
- var KEY_INSERT = 45;
590
- /** @type {?} */
591
- var KEY_DELETE = 46;
592
- /** @type {?} */
593
- var KEY_0 = 48;
594
- /** @type {?} */
595
- var KEY_1 = 49;
596
- /** @type {?} */
597
- var KEY_2 = 50;
598
- /** @type {?} */
599
- var KEY_3 = 51;
600
- /** @type {?} */
601
- var KEY_4 = 52;
602
- /** @type {?} */
603
- var KEY_5 = 53;
604
- /** @type {?} */
605
- var KEY_6 = 54;
606
- /** @type {?} */
607
- var KEY_7 = 55;
608
- /** @type {?} */
609
- var KEY_8 = 56;
610
- /** @type {?} */
611
- var KEY_9 = 57;
612
- /** @type {?} */
613
- var KEY_SEMICOLON = 59;
614
- /** @type {?} */
615
- var KEY_EQUALS = 61;
616
- /*
617
- 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)
618
- There might be a better way to organise constatns but I need to know use-cases
619
- */
620
- var FsUtil = /** @class */ (function () {
621
- function FsUtil() {
622
- this.intervals = {};
623
- }
624
- /**
625
- * @deprecated use @firestitch/common/util/guid instead
626
- */
627
- /**
628
- * @deprecated use \@firestitch/common/util/guid instead
629
- * @param {?=} pattern
630
- * @return {?}
631
- */
632
- FsUtil.prototype.guid = /**
633
- * @deprecated use \@firestitch/common/util/guid instead
634
- * @param {?=} pattern
635
- * @return {?}
636
- */
637
- function (pattern) {
638
- console.warn('@deprecated use @firestitch/common/util/guid instead');
639
- pattern = pattern || 'xxxxxx';
640
- return pattern.replace(/[xy]/g, (/**
641
- * @param {?} c
642
- * @return {?}
643
- */
644
- function (c) {
645
- /** @type {?} */
646
- var r = Math.random() * 16 | 0;
647
- /** @type {?} */
648
- var v = c == 'x' ? r : (r & 0x3 | 0x8);
649
- return v.toString(16);
650
- }));
651
- };
652
- /**
653
- * @deprecated use import { uuid } from @firestitch/common/util; instead
654
- */
655
- /**
656
- * @deprecated use import { uuid } from \@firestitch/common/util; instead
657
- * @return {?}
658
- */
659
- FsUtil.prototype.uuid = /**
660
- * @deprecated use import { uuid } from \@firestitch/common/util; instead
661
- * @return {?}
662
- */
663
- function () {
664
- console.warn('@deprecated use @firestitch/common/util/uuid instead');
665
- return this.guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
666
- };
667
- /**
668
- * @deprecated use import { resolve } from @firestitch/common/util; instead
669
- */
670
- /**
671
- * @deprecated use import { resolve } from \@firestitch/common/util; instead
672
- * @param {?} promise
673
- * @param {?=} defaults
674
- * @return {?}
675
- */
676
- FsUtil.prototype.resolve = /**
677
- * @deprecated use import { resolve } from \@firestitch/common/util; instead
678
- * @param {?} promise
679
- * @param {?=} defaults
680
- * @return {?}
681
- */
682
- function (promise, defaults) {
683
- if (defaults === void 0) { defaults = []; }
684
- console.warn('@deprecated use @firestitch/common/util/resolve instead');
685
- /** @type {?} */
686
- var result = defaults;
687
- return new Promise((/**
688
- * @param {?} resolve
689
- * @return {?}
690
- */
691
- function (resolve) {
692
- promise.then((/**
693
- * @param {?} data
694
- * @return {?}
695
- */
696
- function (data) {
697
- Object.keys(data).forEach((/**
698
- * @param {?} key
699
- * @return {?}
700
- */
701
- function (key) { return result[key] = data[key]; }));
702
- resolve(result);
703
- }));
704
- }));
705
- };
706
- /**
707
- * @deprecated use _.toInteger() instead
708
- */
709
- /**
710
- * @deprecated use _.toInteger() instead
711
- * @param {?} value
712
- * @return {?}
713
- */
714
- FsUtil.prototype.int = /**
715
- * @deprecated use _.toInteger() instead
716
- * @param {?} value
717
- * @return {?}
718
- */
719
- function (value) {
720
- console.warn('@deprecated use _.toInteger() instead');
721
- value = parseInt(value);
722
- if (isNaN(value)) {
723
- value = 0;
724
- }
725
- return value;
726
- };
727
- /**
728
- * @deprecated use _.toFinite() instead
729
- */
730
- /**
731
- * @deprecated use _.toFinite() instead
732
- * @param {?} value
733
- * @return {?}
734
- */
735
- FsUtil.prototype.float = /**
736
- * @deprecated use _.toFinite() instead
737
- * @param {?} value
738
- * @return {?}
739
- */
740
- function (value) {
741
- console.warn('@deprecated use _.toFinite() instead');
742
- value = parseFloat(value);
743
- if (isNaN(value)) {
744
- value = 0;
745
- }
746
- return value;
747
- };
748
- /**
749
- * @deprecated use _.toString() instead
750
- */
751
- /**
752
- * @deprecated use _.toString() instead
753
- * @param {?} string
754
- * @return {?}
755
- */
756
- FsUtil.prototype.string = /**
757
- * @deprecated use _.toString() instead
758
- * @param {?} string
759
- * @return {?}
760
- */
761
- function (string) {
762
- console.warn('@deprecated use _.toString() instead');
763
- if (string === null || string === undefined) {
764
- string = '';
765
- }
766
- return (string).toString();
767
- };
768
- /**
769
- * @deprecated use import { isEmpty } from @firestitch/common/util; instead
770
- */
771
- /**
772
- * @deprecated use import { isEmpty } from \@firestitch/common/util; instead
773
- * @param {?} value
774
- * @param {?=} options
775
- * @return {?}
776
- */
777
- FsUtil.prototype.isEmpty = /**
778
- * @deprecated use import { isEmpty } from \@firestitch/common/util; instead
779
- * @param {?} value
780
- * @param {?=} options
781
- * @return {?}
782
- */
783
- function (value, options) {
784
- console.warn('@deprecated use import { isEmpty } from @firestitch/common/util; instead');
785
- options = options || {};
786
- return value === undefined ||
787
- value === null ||
788
- value === false ||
789
- value === '' ||
790
- !this.string(value).length ||
791
- (this.isObject(value) &&
792
- (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
793
- (!options.zero && (value === 0 || value === '0'));
794
- };
795
- /**
796
- * @deprecated use _.isInteger() instead
797
- */
798
- /**
799
- * @deprecated use _.isInteger() instead
800
- * @param {?} value
801
- * @param {?=} type
802
- * @return {?}
803
- */
804
- FsUtil.prototype.isInt = /**
805
- * @deprecated use _.isInteger() instead
806
- * @param {?} value
807
- * @param {?=} type
808
- * @return {?}
809
- */
810
- function (value, type) {
811
- console.warn('@deprecated use _.isInteger() instead');
812
- /** @type {?} */
813
- var int = !!this.string(value).match(/^\d+$/);
814
- if (!int) {
815
- return false;
816
- }
817
- if (type) {
818
- return Number.isInteger(value);
819
- }
820
- return true;
821
- };
822
- /**
823
- * @deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}
824
- */
825
- /**
826
- * @deprecated use _.each() instead {\@link https://lodash.com/docs/4.17.5#forEach}
827
- * @param {?} object
828
- * @param {?} func
829
- * @return {?}
830
- */
831
- FsUtil.prototype.each = /**
832
- * @deprecated use _.each() instead {\@link https://lodash.com/docs/4.17.5#forEach}
833
- * @param {?} object
834
- * @param {?} func
835
- * @return {?}
836
- */
837
- function (object, func) {
838
- console.warn('@deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}');
839
- if (!this.isArray(object) && !this.isObject(object)) {
840
- return;
841
- }
842
- Object.keys(object).forEach((/**
843
- * @param {?} key
844
- * @return {?}
845
- */
846
- function (key) {
847
- func(object[key], key);
848
- }));
849
- };
850
- /**
851
- * @deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
852
- * or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead
853
- */
854
- /**
855
- * @deprecated use _.isArrayLikeObject() {\@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
856
- * or _.isObject() {\@link https://lodash.com/docs/4.17.5#isObject} instead
857
- * @param {?} value
858
- * @return {?}
859
- */
860
- FsUtil.prototype.isObject = /**
861
- * @deprecated use _.isArrayLikeObject() {\@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
862
- * or _.isObject() {\@link https://lodash.com/docs/4.17.5#isObject} instead
863
- * @param {?} value
864
- * @return {?}
865
- */
866
- function (value) {
867
- 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');
868
- return value !== null && typeof value === 'object' && !this.isArray(value);
869
- };
870
- /**
871
- * @deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}
872
- */
873
- /**
874
- * @deprecated use _.isString() instead {\@link https://lodash.com/docs/4.17.5#isString}
875
- * @param {?} value
876
- * @return {?}
877
- */
878
- FsUtil.prototype.isString = /**
879
- * @deprecated use _.isString() instead {\@link https://lodash.com/docs/4.17.5#isString}
880
- * @param {?} value
881
- * @return {?}
882
- */
883
- function (value) {
884
- console.warn('@deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}');
885
- return typeof value === 'string' || value instanceof String;
886
- };
887
- /**
888
- * @deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}
889
- */
890
- /**
891
- * @deprecated use _.isArray() instead {\@link https://lodash.com/docs/4.17.5#isArray}
892
- * @param {?} value
893
- * @return {?}
894
- */
895
- FsUtil.prototype.isArray = /**
896
- * @deprecated use _.isArray() instead {\@link https://lodash.com/docs/4.17.5#isArray}
897
- * @param {?} value
898
- * @return {?}
899
- */
900
- function (value) {
901
- console.warn('@deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}');
902
- return value instanceof Array;
903
- };
904
- /**
905
- * @deprecated use import { isNumeric } from @firestitch/common/util; instead
906
- */
907
- /**
908
- * @deprecated use import { isNumeric } from \@firestitch/common/util; instead
909
- * @param {?} value
910
- * @return {?}
911
- */
912
- FsUtil.prototype.isNumeric = /**
913
- * @deprecated use import { isNumeric } from \@firestitch/common/util; instead
914
- * @param {?} value
915
- * @return {?}
916
- */
917
- function (value) {
918
- console.warn('@deprecated use import { isNumeric } from @firestitch/common/util; instead');
919
- return this.string(value).length && !!this.string(value).match(/^-?\d*\.?\d*$/);
920
- };
921
- /**
922
- * @deprecated use import { isClass } from @firestitch/common/util; instead
923
- */
924
- /**
925
- * @deprecated use import { isClass } from \@firestitch/common/util; instead
926
- * @param {?} value
927
- * @param {?} cls
928
- * @return {?}
929
- */
930
- FsUtil.prototype.isClass = /**
931
- * @deprecated use import { isClass } from \@firestitch/common/util; instead
932
- * @param {?} value
933
- * @param {?} cls
934
- * @return {?}
935
- */
936
- function (value, cls) {
937
- console.warn('@deprecated use import { isClass } from @firestitch/common/util; instead');
938
- if (this.isObject(value)) {
939
- if (this.isString(cls)) {
940
- if (value.constructor) {
941
- if (value.constructor.name === cls) {
942
- return true;
943
- }
944
- }
945
- }
946
- else {
947
- if (value instanceof cls) {
948
- return true;
949
- }
950
- }
951
- }
952
- return false;
953
- };
954
- /**
955
- * @deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}
956
- */
957
- /**
958
- * @deprecated use _.isBoolean() instead {\@link https://lodash.com/docs/4.17.5#isBoolean}
959
- * @param {?} value
960
- * @return {?}
961
- */
962
- FsUtil.prototype.isBoolean = /**
963
- * @deprecated use _.isBoolean() instead {\@link https://lodash.com/docs/4.17.5#isBoolean}
964
- * @param {?} value
965
- * @return {?}
966
- */
967
- function (value) {
968
- console.warn('@deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}');
969
- return value === true || value === false;
970
- };
971
- /**
972
- * @deprecated use import { value } from @firestitch/common/util; instead
973
- */
974
- /**
975
- * @deprecated use import { value } from \@firestitch/common/util; instead
976
- * @param {?} object
977
- * @param {?} key
978
- * @param {?} def
979
- * @return {?}
980
- */
981
- FsUtil.prototype.value = /**
982
- * @deprecated use import { value } from \@firestitch/common/util; instead
983
- * @param {?} object
984
- * @param {?} key
985
- * @param {?} def
986
- * @return {?}
987
- */
988
- function (object, key, def) {
989
- console.warn('@deprecated use import { value } from @firestitch/common/util; instead');
990
- if (this.isObject(object) || this.isArray(object)) {
991
- if (object.hasOwnProperty(key)) {
992
- return object[key];
993
- }
994
- }
995
- return def;
996
- };
997
- /**
998
- * @param {?} func
999
- * @param {?} wait
1000
- * @return {?}
1001
- */
1002
- FsUtil.prototype.throttle = /**
1003
- * @param {?} func
1004
- * @param {?} wait
1005
- * @return {?}
1006
- */
1007
- function (func, wait) {
1008
- console.warn('@deprecated use import { throttle } from @firestitch/common/util; instead');
1009
- /** @type {?} */
1010
- var waiting = false;
1011
- return (/**
1012
- * @return {?}
1013
- */
1014
- function () {
1015
- if (!waiting) { // If we're not waiting
1016
- func.apply(null, arguments); // Execute users function
1017
- waiting = true; // Prevent future invocations
1018
- setTimeout((/**
1019
- * @return {?}
1020
- */
1021
- function () {
1022
- waiting = false; // And allow future invocations
1023
- }), wait);
1024
- }
1025
- });
1026
- };
1027
- /**
1028
- * @deprecated use import { debounce } from @firestitch/common/util; instead
1029
- */
1030
- /**
1031
- * @deprecated use import { debounce } from \@firestitch/common/util; instead
1032
- * @param {?} func
1033
- * @param {?} wait
1034
- * @param {?} immediate
1035
- * @return {?}
1036
- */
1037
- FsUtil.prototype.debounce = /**
1038
- * @deprecated use import { debounce } from \@firestitch/common/util; instead
1039
- * @param {?} func
1040
- * @param {?} wait
1041
- * @param {?} immediate
1042
- * @return {?}
1043
- */
1044
- function (func, wait, immediate) {
1045
- console.warn('@deprecated use import { debounce } from @firestitch/common/util; instead');
1046
- /** @type {?} */
1047
- var timeout;
1048
- return (/**
1049
- * @return {?}
1050
- */
1051
- function () {
1052
- /** @type {?} */
1053
- var context = this;
1054
- /** @type {?} */
1055
- var args = arguments;
1056
- /** @type {?} */
1057
- var later = (/**
1058
- * @return {?}
1059
- */
1060
- function () {
1061
- timeout = null;
1062
- if (!immediate)
1063
- func.apply(context, args);
1064
- });
1065
- /** @type {?} */
1066
- var callNow = immediate && !timeout;
1067
- clearTimeout(timeout);
1068
- timeout = setTimeout(later, wait);
1069
- if (callNow)
1070
- func.apply(context, args);
1071
- });
1072
- };
1073
- /**
1074
- * @deprecated use import { length } from @firestitch/common/util; instead
1075
- */
1076
- /**
1077
- * @deprecated use import { length } from \@firestitch/common/util; instead
1078
- * @param {?} object
1079
- * @return {?}
1080
- */
1081
- FsUtil.prototype.length = /**
1082
- * @deprecated use import { length } from \@firestitch/common/util; instead
1083
- * @param {?} object
1084
- * @return {?}
1085
- */
1086
- function (object) {
1087
- console.warn('@deprecated use import { length } from @firestitch/common/util; instead');
1088
- if (this.isObject(object)) {
1089
- return Object.keys(object).length;
1090
- }
1091
- if (this.isArray(object)) {
1092
- return object.length;
1093
- }
1094
- return 0;
1095
- };
1096
- /**
1097
- * @deprecated use import { boolean } from @firestitch/common/util; instead
1098
- */
1099
- /**
1100
- * @deprecated use import { boolean } from \@firestitch/common/util; instead
1101
- * @param {?} value
1102
- * @return {?}
1103
- */
1104
- FsUtil.prototype.boolean = /**
1105
- * @deprecated use import { boolean } from \@firestitch/common/util; instead
1106
- * @param {?} value
1107
- * @return {?}
1108
- */
1109
- function (value) {
1110
- console.warn('@deprecated use import { boolean } from @firestitch/common/util; instead');
1111
- return this.string(value).toLowerCase() !== 'false' && !!value;
1112
- };
1113
- /**
1114
- * @deprecated use import { stringify } from @firestitch/common/util; instead
1115
- */
1116
- /**
1117
- * @deprecated use import { stringify } from \@firestitch/common/util; instead
1118
- * @param {?} value
1119
- * @return {?}
1120
- */
1121
- FsUtil.prototype.stringify = /**
1122
- * @deprecated use import { stringify } from \@firestitch/common/util; instead
1123
- * @param {?} value
1124
- * @return {?}
1125
- */
1126
- function (value) {
1127
- console.warn('@deprecated use import { stringify } from @firestitch/common/util; instead');
1128
- return JSON.stringify(value);
1129
- };
1130
- FsUtil.decorators = [
1131
- { type: Injectable }
1132
- ];
1133
- return FsUtil;
1134
- }());
1135
- if (false) {
1136
- /**
1137
- * @type {?}
1138
- * @private
1139
- */
1140
- FsUtil.prototype.intervals;
1141
- }
1142
-
1143
- /**
1144
- * @fileoverview added by tsickle
1145
- * Generated from: app/services/vaildate.service.ts
1146
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1147
- */
1148
- var FsValidate = /** @class */ (function () {
1149
- function FsValidate(fsUtil) {
1150
- this.fsUtil = fsUtil;
1151
- }
1152
- /**
1153
- * @deprecated use import { email } from @firestitch/common/validate; instead
1154
- */
1155
- /**
1156
- * @deprecated use import { email } from \@firestitch/common/validate; instead
1157
- * @param {?} value
1158
- * @return {?}
1159
- */
1160
- FsValidate.prototype.phone = /**
1161
- * @deprecated use import { email } from \@firestitch/common/validate; instead
1162
- * @param {?} value
1163
- * @return {?}
1164
- */
1165
- function (value) {
1166
- /** @type {?} */
1167
- var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/.test(value);
1168
- return valid || !String(value).length;
1169
- };
1170
- /**
1171
- * @deprecated use import { email } from @firestitch/common/validate; instead
1172
- */
1173
- /**
1174
- * @deprecated use import { email } from \@firestitch/common/validate; instead
1175
- * @param {?} value
1176
- * @return {?}
1177
- */
1178
- FsValidate.prototype.email = /**
1179
- * @deprecated use import { email } from \@firestitch/common/validate; instead
1180
- * @param {?} value
1181
- * @return {?}
1182
- */
1183
- function (value) {
1184
- 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,}))$/);
1185
- };
1186
- FsValidate.decorators = [
1187
- { type: Injectable }
1188
- ];
1189
- /** @nocollapse */
1190
- FsValidate.ctorParameters = function () { return [
1191
- { type: FsUtil }
1192
- ]; };
1193
- return FsValidate;
1194
- }());
1195
- if (false) {
1196
- /**
1197
- * @type {?}
1198
- * @private
1199
- */
1200
- FsValidate.prototype.fsUtil;
1201
- }
1202
-
1203
- /**
1204
- * @fileoverview added by tsickle
1205
- * Generated from: libs/util/stringify/stringify.ts
1206
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1207
- */
1208
- /**
1209
- * @param {?} value
1210
- * @return {?}
1211
- */
1212
- function stringify(value) {
1213
- return JSON.stringify(value);
1214
- }
1215
-
1216
- /**
1217
- * @fileoverview added by tsickle
1218
- * Generated from: libs/util/guid/guid.ts
1219
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1220
- */
1221
- /**
1222
- * @param {?=} pattern
1223
- * @param {?=} options
1224
- * @return {?}
1225
- */
1226
- function guid(pattern, options) {
1227
- if (options === void 0) { options = { case: 'lower', numbers: true }; }
1228
- pattern = pattern || 'xxxxxx';
1229
- /** @type {?} */
1230
- var s = '';
1231
- if (options.numbers !== false) {
1232
- s = '0123456789';
1233
- }
1234
- if (!options.case || options.case === 'lower' || options.case === 'mixed') {
1235
- s = s.concat('abcdefghijklmnopqrstuvwxyz');
1236
- }
1237
- if (options.case === 'upper' || options.case === 'mixed') {
1238
- s = s.concat('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
1239
- }
1240
- /** @type {?} */
1241
- var chars = s.match(/(.{1,1})/g);
1242
- return pattern.replace(/[x]/g, (/**
1243
- * @param {?} c
1244
- * @return {?}
1245
- */
1246
- function (c) {
1247
- /** @type {?} */
1248
- var i = (Math.random() * chars.length) | 0;
1249
- return chars[i];
1250
- }));
1251
- }
1252
-
1253
- /**
1254
- * @fileoverview added by tsickle
1255
- * Generated from: libs/util/isEmpty/isEmpty.ts
1256
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1257
- */
1258
- /**
1259
- * @param {?} value
1260
- * @param {?=} options
1261
- * @return {?}
1262
- */
1263
- function isEmpty(value, options) {
1264
- options = options || {};
1265
- return value === undefined ||
1266
- value === null ||
1267
- value === false ||
1268
- value === '' ||
1269
- !toString(value).length ||
1270
- (isObject(value) &&
1271
- (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
1272
- (!options.zero && (value === 0 || value === '0'));
1273
- }
1274
-
1275
- /**
1276
- * @fileoverview added by tsickle
1277
- * Generated from: app/pipes/util.pipe.ts
1278
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1279
- */
1280
- var FsUtilStringifyPipe = /** @class */ (function () {
1281
- function FsUtilStringifyPipe() {
1282
- }
1283
- /**
1284
- * @param {?} value
1285
- * @return {?}
1286
- */
1287
- FsUtilStringifyPipe.prototype.transform = /**
1288
- * @param {?} value
1289
- * @return {?}
1290
- */
1291
- function (value) {
1292
- return stringify(value);
1293
- };
1294
- FsUtilStringifyPipe.decorators = [
1295
- { type: Pipe, args: [{
1296
- name: 'fsUtilStringify'
1297
- },] }
1298
- ];
1299
- /** @nocollapse */
1300
- FsUtilStringifyPipe.ctorParameters = function () { return []; };
1301
- return FsUtilStringifyPipe;
1302
- }());
1303
- var FsUtilGuidPipe = /** @class */ (function () {
1304
- function FsUtilGuidPipe() {
1305
- }
1306
- /**
1307
- * @return {?}
1308
- */
1309
- FsUtilGuidPipe.prototype.transform = /**
1310
- * @return {?}
1311
- */
1312
- function () {
1313
- return guid();
1314
- };
1315
- FsUtilGuidPipe.decorators = [
1316
- { type: Pipe, args: [{
1317
- name: 'fsUtilGuid'
1318
- },] }
1319
- ];
1320
- /** @nocollapse */
1321
- FsUtilGuidPipe.ctorParameters = function () { return []; };
1322
- return FsUtilGuidPipe;
1323
- }());
1324
- var FsUtilIsEmptyPipe = /** @class */ (function () {
1325
- function FsUtilIsEmptyPipe() {
1326
- }
1327
- /**
1328
- * @param {?} value
1329
- * @return {?}
1330
- */
1331
- FsUtilIsEmptyPipe.prototype.transform = /**
1332
- * @param {?} value
1333
- * @return {?}
1334
- */
1335
- function (value) {
1336
- return isEmpty(value);
1337
- };
1338
- FsUtilIsEmptyPipe.decorators = [
1339
- { type: Pipe, args: [{
1340
- name: 'fsUtilIsEmpty'
1341
- },] }
1342
- ];
1343
- return FsUtilIsEmptyPipe;
1344
- }());
1345
- var FsUtilIsNotEmptyPipe = /** @class */ (function () {
1346
- function FsUtilIsNotEmptyPipe() {
1347
- }
1348
- /**
1349
- * @param {?} value
1350
- * @return {?}
1351
- */
1352
- FsUtilIsNotEmptyPipe.prototype.transform = /**
1353
- * @param {?} value
1354
- * @return {?}
1355
- */
1356
- function (value) {
1357
- return !isEmpty(value);
1358
- };
1359
- FsUtilIsNotEmptyPipe.decorators = [
1360
- { type: Pipe, args: [{
1361
- name: 'fsUtilIsNotEmpty'
1362
- },] }
1363
- ];
1364
- return FsUtilIsNotEmptyPipe;
1365
- }());
1366
-
1367
- /**
1368
- * @fileoverview added by tsickle
1369
- * Generated from: libs/format/number/number.ts
1370
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1371
- */
1372
- /**
1373
- * @param {?} value
1374
- * @param {?=} decimals
1375
- * @return {?}
1376
- */
1377
- function number(value, decimals) {
1378
- return Number(value || 0).toLocaleString(undefined, { maximumFractionDigits: decimals });
1379
- }
1380
-
1381
- /**
1382
- * @fileoverview added by tsickle
1383
- * Generated from: app/pipes/number.pipe.ts
1384
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1385
- */
1386
- var FsFormatNumberPipe = /** @class */ (function () {
1387
- function FsFormatNumberPipe() {
1388
- }
1389
- /**
1390
- * @param {?} value
1391
- * @param {?=} decimals
1392
- * @return {?}
1393
- */
1394
- FsFormatNumberPipe.prototype.transform = /**
1395
- * @param {?} value
1396
- * @param {?=} decimals
1397
- * @return {?}
1398
- */
1399
- function (value, decimals) {
1400
- return number(value, decimals);
1401
- };
1402
- FsFormatNumberPipe.decorators = [
1403
- { type: Pipe, args: [{
1404
- name: 'fsFormatNumber'
1405
- },] }
1406
- ];
1407
- return FsFormatNumberPipe;
1408
- }());
1409
-
1410
- /**
1411
- * @fileoverview added by tsickle
1412
- * Generated from: libs/format/currency/currency.ts
1413
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1414
- */
1415
- /**
1416
- * @param {?} amount
1417
- * @param {?=} precision
1418
- * @param {?=} currencyCode
1419
- * @param {?=} locale
1420
- * @return {?}
1421
- */
1422
- function currency(amount, precision, currencyCode, locale) {
1423
- if (precision === void 0) { precision = [2, 10]; }
1424
- if (currencyCode === void 0) { currencyCode = 'USD'; }
1425
- if (locale === void 0) { locale = 'en-US'; }
1426
- /** @type {?} */
1427
- var digitsInfo = isArray(precision) ? precision : [precision, precision];
1428
- return new CurrencyPipe(locale).transform(amount, currencyCode, 'symbol', "1." + digitsInfo[0] + "-" + digitsInfo[1]);
1429
- }
1430
-
1431
- /**
1432
- * @fileoverview added by tsickle
1433
- * Generated from: app/pipes/currency.pipe.ts
1434
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1435
- */
1436
- var FsFormatCurrencyPipe = /** @class */ (function () {
1437
- function FsFormatCurrencyPipe(locale) {
1438
- this.locale = locale;
1439
- }
1440
- /**
1441
- * @param {?} amount
1442
- * @param {?=} precision
1443
- * @param {?=} currencyCode
1444
- * @return {?}
1445
- */
1446
- FsFormatCurrencyPipe.prototype.transform = /**
1447
- * @param {?} amount
1448
- * @param {?=} precision
1449
- * @param {?=} currencyCode
1450
- * @return {?}
1451
- */
1452
- function (amount, precision, currencyCode) {
1453
- return currency(amount, precision, currencyCode);
1454
- };
1455
- FsFormatCurrencyPipe.decorators = [
1456
- { type: Pipe, args: [{
1457
- name: 'fsFormatCurrency'
1458
- },] }
1459
- ];
1460
- /** @nocollapse */
1461
- FsFormatCurrencyPipe.ctorParameters = function () { return [
1462
- { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }
1463
- ]; };
1464
- return FsFormatCurrencyPipe;
1465
- }());
1466
- if (false) {
1467
- /** @type {?} */
1468
- FsFormatCurrencyPipe.prototype.locale;
1469
- }
1470
-
1471
- /**
1472
- * @fileoverview added by tsickle
1473
- * Generated from: libs/format/truncate/truncate.ts
1474
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1475
- */
1476
- /**
1477
- * @param {?} value
1478
- * @param {?=} limit
1479
- * @param {?=} completeWords
1480
- * @param {?=} ellipsis
1481
- * @return {?}
1482
- */
1483
- function truncate(value, limit, completeWords, ellipsis) {
1484
- if (limit === void 0) { limit = 100; }
1485
- if (completeWords === void 0) { completeWords = false; }
1486
- if (ellipsis === void 0) { ellipsis = '...'; }
1487
- value = value || '';
1488
- if (completeWords) {
1489
- limit = value.substr(0, limit).lastIndexOf(' ');
1490
- }
1491
- /** @type {?} */
1492
- var result = "" + value.substr(0, limit);
1493
- if (result !== value) {
1494
- result += ellipsis;
1495
- }
1496
- return result;
1497
- }
1498
-
1499
- /**
1500
- * @fileoverview added by tsickle
1501
- * Generated from: app/pipes/truncate.pipe.ts
1502
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1503
- */
1504
- var FsFormatTruncatePipe = /** @class */ (function () {
1505
- function FsFormatTruncatePipe() {
1506
- }
1507
- /**
1508
- * @param {?} value
1509
- * @param {?=} limit
1510
- * @param {?=} completeWords
1511
- * @param {?=} ellipsis
1512
- * @return {?}
1513
- */
1514
- FsFormatTruncatePipe.prototype.transform = /**
1515
- * @param {?} value
1516
- * @param {?=} limit
1517
- * @param {?=} completeWords
1518
- * @param {?=} ellipsis
1519
- * @return {?}
1520
- */
1521
- function (value, limit, completeWords, ellipsis) {
1522
- return truncate(value, limit, completeWords, ellipsis);
1523
- };
1524
- FsFormatTruncatePipe.decorators = [
1525
- { type: Pipe, args: [{
1526
- name: 'fsFormatTruncate'
1527
- },] }
1528
- ];
1529
- /** @nocollapse */
1530
- FsFormatTruncatePipe.ctorParameters = function () { return []; };
1531
- return FsFormatTruncatePipe;
1532
- }());
1533
-
1534
- /**
1535
- * @fileoverview added by tsickle
1536
- * Generated from: libs/format/bytes/bytes.ts
1537
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1538
- */
1539
- /**
1540
- * @param {?} bytes
1541
- * @return {?}
1542
- */
1543
- function bytes(bytes) {
1544
- if (!bytes) {
1545
- return '0.00 B';
1546
- }
1547
- /** @type {?} */
1548
- var e = Math.floor(Math.log(bytes) / Math.log(1024));
1549
- /** @type {?} */
1550
- var decimals = (bytes / 1024) > 1000 ? 2 : 0;
1551
- console.log(bytes, (bytes / 1024), decimals);
1552
- return ("" + (bytes / Math.pow(1024, e)).toFixed(decimals)).replace(/\.00/, '')
1553
- + ' '
1554
- + (e ? ' KMGTP'.charAt(e) : '') + 'B';
1555
- }
1556
-
1557
- /**
1558
- * @fileoverview added by tsickle
1559
- * Generated from: app/pipes/bytes.pipe.ts
1560
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1561
- */
1562
- var FsFormatBytesPipe = /** @class */ (function () {
1563
- function FsFormatBytesPipe() {
1564
- }
1565
- /**
1566
- * @param {?} value
1567
- * @return {?}
1568
- */
1569
- FsFormatBytesPipe.prototype.transform = /**
1570
- * @param {?} value
1571
- * @return {?}
1572
- */
1573
- function (value) {
1574
- return bytes(value);
1575
- };
1576
- FsFormatBytesPipe.decorators = [
1577
- { type: Pipe, args: [{
1578
- name: 'fsFormatBytes',
1579
- },] }
1580
- ];
1581
- return FsFormatBytesPipe;
1582
- }());
1583
-
1584
- /**
1585
- * @fileoverview added by tsickle
1586
- * Generated from: app/directives/stop-propagation.directive.ts
1587
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1588
- */
1589
- var FsStopPropagationDirective = /** @class */ (function () {
1590
- function FsStopPropagationDirective() {
1591
- }
1592
- /**
1593
- * @param {?} event
1594
- * @return {?}
1595
- */
1596
- FsStopPropagationDirective.prototype.preventClick = /**
1597
- * @param {?} event
1598
- * @return {?}
1599
- */
1600
- function (event) {
1601
- event.stopPropagation();
1602
- };
1603
- FsStopPropagationDirective.decorators = [
1604
- { type: Directive, args: [{
1605
- selector: '[fsStopPropagation]',
1606
- },] }
1607
- ];
1608
- FsStopPropagationDirective.propDecorators = {
1609
- preventClick: [{ type: HostListener, args: ['click', ['$event'],] }]
1610
- };
1611
- return FsStopPropagationDirective;
1612
- }());
1613
-
1614
- /**
1615
- * @fileoverview added by tsickle
1616
- * Generated from: app/directives/prevent-default.directive.ts
1617
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1618
- */
1619
- var FsPreventDefaultDirective = /** @class */ (function () {
1620
- function FsPreventDefaultDirective() {
1621
- }
1622
- /**
1623
- * @param {?} event
1624
- * @return {?}
1625
- */
1626
- FsPreventDefaultDirective.prototype.preventClick = /**
1627
- * @param {?} event
1628
- * @return {?}
1629
- */
1630
- function (event) {
1631
- event.preventDefault();
1632
- };
1633
- FsPreventDefaultDirective.decorators = [
1634
- { type: Directive, args: [{
1635
- selector: '[fsPreventDefault]',
1636
- },] }
1637
- ];
1638
- FsPreventDefaultDirective.propDecorators = {
1639
- preventClick: [{ type: HostListener, args: ['click', ['$event'],] }]
1640
- };
1641
- return FsPreventDefaultDirective;
1642
- }());
1643
-
1644
- /**
1645
- * @fileoverview added by tsickle
1646
- * Generated from: app/directives/autofocus.directive.ts
1647
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1648
- */
1649
- var FsAutofocusDirective = /** @class */ (function () {
1650
- function FsAutofocusDirective(_el) {
1651
- this._el = _el;
1652
- }
1653
- /**
1654
- * @return {?}
1655
- */
1656
- FsAutofocusDirective.prototype.ngAfterViewInit = /**
1657
- * @return {?}
1658
- */
1659
- function () {
1660
- var _this = this;
1661
- setTimeout((/**
1662
- * @return {?}
1663
- */
1664
- function () {
1665
- _this._el.nativeElement.focus();
1666
- }));
1667
- };
1668
- FsAutofocusDirective.decorators = [
1669
- { type: Directive, args: [{
1670
- selector: '[autofocus]',
1671
- },] }
1672
- ];
1673
- /** @nocollapse */
1674
- FsAutofocusDirective.ctorParameters = function () { return [
1675
- { type: ElementRef }
1676
- ]; };
1677
- return FsAutofocusDirective;
1678
- }());
1679
- if (false) {
1680
- /**
1681
- * @type {?}
1682
- * @private
1683
- */
1684
- FsAutofocusDirective.prototype._el;
1685
- }
1686
-
1687
- /**
1688
- * @fileoverview added by tsickle
1689
- * Generated from: libs/util/ordinal-number/ordinal-number.ts
1690
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1691
- */
1692
- /**
1693
- * @param {?} value
1694
- * @return {?}
1695
- */
1696
- function ordinalNumber(value) {
1697
- value = String(value);
1698
- /** @type {?} */
1699
- var index = value.match(templateObject_1 || (templateObject_1 = __makeTemplateObject(["1?.$"], ["1?.$"])));
1700
- /** @type {?} */
1701
- var endings = [, 'st', 'nd', 'rd'];
1702
- /** @type {?} */
1703
- var ending = endings[index] || 'th';
1704
- return value + ending;
1705
- }
1706
- var templateObject_1;
1707
-
1708
- /**
1709
- * @fileoverview added by tsickle
1710
- * Generated from: app/pipes/ordinal-number.pipe.ts
1711
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1712
- */
1713
- var FsFormatOrdinalNumberPipe = /** @class */ (function () {
1714
- function FsFormatOrdinalNumberPipe() {
1715
- }
1716
- /**
1717
- * @param {?} value
1718
- * @return {?}
1719
- */
1720
- FsFormatOrdinalNumberPipe.prototype.transform = /**
1721
- * @param {?} value
1722
- * @return {?}
1723
- */
1724
- function (value) {
1725
- return ordinalNumber(value);
1726
- };
1727
- FsFormatOrdinalNumberPipe.decorators = [
1728
- { type: Pipe, args: [{
1729
- name: 'fsFormatOrdinalNumber',
1730
- },] }
1731
- ];
1732
- return FsFormatOrdinalNumberPipe;
1733
- }());
1734
-
1735
- /**
1736
- * @fileoverview added by tsickle
1737
- * Generated from: app/fs-common.module.ts
1738
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1739
- */
1740
- var FsCommonModule = /** @class */ (function () {
1741
- function FsCommonModule() {
1742
- }
1743
- /**
1744
- * @return {?}
1745
- */
1746
- FsCommonModule.forRoot = /**
1747
- * @return {?}
1748
- */
1749
- function () {
1750
- return {
1751
- ngModule: FsCommonModule,
1752
- providers: [
1753
- FsArray,
1754
- FsMath,
1755
- FsUtil,
1756
- FsValidate
1757
- ]
1758
- };
1759
- };
1760
- FsCommonModule.decorators = [
1761
- { type: NgModule, args: [{
1762
- imports: [
1763
- CommonModule,
1764
- ],
1765
- exports: [
1766
- FsStopPropagationDirective,
1767
- FsPreventDefaultDirective,
1768
- FsAutofocusDirective,
1769
- FsUtilGuidPipe,
1770
- FsUtilStringifyPipe,
1771
- FsFormatNumberPipe,
1772
- FsFormatCurrencyPipe,
1773
- FsFormatTruncatePipe,
1774
- FsUtilIsEmptyPipe,
1775
- FsUtilIsNotEmptyPipe,
1776
- FsFormatBytesPipe,
1777
- FsFormatOrdinalNumberPipe,
1778
- ],
1779
- declarations: [
1780
- FsStopPropagationDirective,
1781
- FsPreventDefaultDirective,
1782
- FsAutofocusDirective,
1783
- FsUtilGuidPipe,
1784
- FsUtilIsEmptyPipe,
1785
- FsUtilIsNotEmptyPipe,
1786
- FsUtilStringifyPipe,
1787
- FsFormatNumberPipe,
1788
- FsFormatCurrencyPipe,
1789
- FsFormatTruncatePipe,
1790
- FsFormatBytesPipe,
1791
- FsFormatOrdinalNumberPipe,
1792
- ],
1793
- },] }
1794
- ];
1795
- return FsCommonModule;
1796
- }());
1797
-
1798
- /**
1799
- * @fileoverview added by tsickle
1800
- * Generated from: libs/validate/email/email.ts
1801
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1802
- */
1803
- /**
1804
- * @param {?} value
1805
- * @return {?}
1806
- */
1807
- function email(value) {
1808
- 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,}))$/);
1809
- }
1810
-
1811
- /**
1812
- * @fileoverview added by tsickle
1813
- * Generated from: libs/validate/email/index.ts
1814
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1815
- */
1816
-
1817
- /**
1818
- * @fileoverview added by tsickle
1819
- * Generated from: libs/validate/phone/phone.ts
1820
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1821
- */
1822
- /**
1823
- * @param {?} value
1824
- * @return {?}
1825
- */
1826
- function phone(value) {
1827
- /** @type {?} */
1828
- var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}/.test(value);
1829
- return valid || !String(value).length;
1830
- }
1831
-
1832
- /**
1833
- * @fileoverview added by tsickle
1834
- * Generated from: libs/validate/phone/index.ts
1835
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1836
- */
1837
-
1838
- /**
1839
- * @fileoverview added by tsickle
1840
- * Generated from: libs/validate/url/url.ts
1841
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1842
- */
1843
- /**
1844
- * Check validity of the url.
1845
- * Protocol (http/https) isn't required.
1846
- * @param value
1847
- * @returns {boolean}
1848
- */
1849
- /**
1850
- * @param {?} value
1851
- * @return {?}
1852
- */
1853
- function url(value) {
1854
- /** @type {?} */
1855
- var expression = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#%[\]@!\$&'\(\)\*\+,;=.]+$/gm;
1856
- /** @type {?} */
1857
- var regexp = new RegExp(expression);
1858
- return !!String(value).match(regexp);
1859
- }
1860
-
1861
- /**
1862
- * @fileoverview added by tsickle
1863
- * Generated from: libs/validate/url/index.ts
1864
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1865
- */
1866
-
1867
- /**
1868
- * @fileoverview added by tsickle
1869
- * Generated from: libs/validate/index.ts
1870
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1871
- */
1872
-
1873
- /**
1874
- * @fileoverview added by tsickle
1875
- * Generated from: libs/array/compare/compare.ts
1876
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1877
- */
1878
- /**
1879
- * @param {?} query
1880
- * @param {?} item
1881
- * @return {?}
1882
- */
1883
- function compare(query, item) {
1884
- /** @type {?} */
1885
- var value = true;
1886
- for (var key in query) {
1887
- value = value && item[key] == query[key];
1888
- }
1889
- return value;
1890
- }
1891
-
1892
- /**
1893
- * @fileoverview added by tsickle
1894
- * Generated from: libs/array/compare/index.ts
1895
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1896
- */
1897
-
1898
- /**
1899
- * @fileoverview added by tsickle
1900
- * Generated from: libs/array/filter/filter.ts
1901
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1902
- */
1903
- /**
1904
- * @param {?} array
1905
- * @param {?} query
1906
- * @return {?}
1907
- */
1908
- function filter(array, query) {
1909
- if (typeof query !== 'function') {
1910
- /** @type {?} */
1911
- var queryObj_1 = query;
1912
- query = (/**
1913
- * @param {?} item
1914
- * @return {?}
1915
- */
1916
- function (item) {
1917
- return compare(queryObj_1, item);
1918
- });
1919
- }
1920
- /** @type {?} */
1921
- var isarray = Array.isArray(array);
1922
- /** @type {?} */
1923
- var list = isarray ? [] : {};
1924
- if (isarray) {
1925
- array.forEach((/**
1926
- * @param {?} item
1927
- * @param {?} idx
1928
- * @return {?}
1929
- */
1930
- function (item, idx) {
1931
- if (query(item)) {
1932
- list.push(item);
1933
- }
1934
- }));
1935
- }
1936
- else {
1937
- Object.keys(array).forEach((/**
1938
- * @param {?} key
1939
- * @return {?}
1940
- */
1941
- function (key) {
1942
- if (query(array[key])) {
1943
- list[key] = array[key];
1944
- }
1945
- }));
1946
- }
1947
- return list;
1948
- }
1949
-
1950
- /**
1951
- * @fileoverview added by tsickle
1952
- * Generated from: libs/array/filter/index.ts
1953
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1954
- */
1955
-
1956
- /**
1957
- * @fileoverview added by tsickle
1958
- * Generated from: libs/array/inArray/inArray.ts
1959
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1960
- */
1961
- /**
1962
- * @param {?} values
1963
- * @param {?} array
1964
- * @return {?}
1965
- */
1966
- function inArray(values, array) {
1967
- if (!Array.isArray(values)) {
1968
- values = [values];
1969
- }
1970
- for (var i = 0, len = values.length; i < len; i++) {
1971
- if (array.indexOf(values[i]) >= 0) {
1972
- return true;
1973
- }
1974
- }
1975
- return false;
1976
- }
1977
-
1978
- /**
1979
- * @fileoverview added by tsickle
1980
- * Generated from: libs/array/inArray/index.ts
1981
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1982
- */
1983
-
1984
- /**
1985
- * @fileoverview added by tsickle
1986
- * Generated from: libs/array/index/index.ts
1987
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1988
- */
1989
- /**
1990
- * @param {?} array
1991
- * @param {?} property
1992
- * @return {?}
1993
- */
1994
- function index(array, property) {
1995
- /** @type {?} */
1996
- var list = {};
1997
- array.forEach((/**
1998
- * @param {?} item
1999
- * @param {?} idx
2000
- * @return {?}
2001
- */
2002
- function (item, idx) {
2003
- list[item[property]] = item;
2004
- }));
2005
- return list;
2006
- }
2007
-
2008
- /**
2009
- * @fileoverview added by tsickle
2010
- * Generated from: libs/array/indexOf/indexOf.ts
2011
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2012
- */
2013
- /**
2014
- * @param {?} array
2015
- * @param {?} query
2016
- * @return {?}
2017
- */
2018
- function indexOf(array, query) {
2019
- if (typeof query !== 'function') {
2020
- /** @type {?} */
2021
- var queryObj_1 = query;
2022
- query = (/**
2023
- * @param {?} item
2024
- * @return {?}
2025
- */
2026
- function (item) {
2027
- return compare(queryObj_1, item);
2028
- });
2029
- }
2030
- for (var i = 0, len = array.length; i < len; i++) {
2031
- if (query(array[i])) {
2032
- return i;
2033
- }
2034
- }
2035
- return -1;
2036
- }
2037
-
2038
- /**
2039
- * @fileoverview added by tsickle
2040
- * Generated from: libs/array/indexOf/index.ts
2041
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2042
- */
2043
-
2044
- /**
2045
- * @fileoverview added by tsickle
2046
- * Generated from: libs/array/keyExists/keyExists.ts
2047
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2048
- */
2049
- /**
2050
- * @param {?} array
2051
- * @param {?} key
2052
- * @return {?}
2053
- */
2054
- function keyExists(array, key) {
2055
- return array.hasOwnProperty(key);
2056
- }
2057
-
2058
- /**
2059
- * @fileoverview added by tsickle
2060
- * Generated from: libs/array/keyExists/index.ts
2061
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2062
- */
2063
-
2064
- /**
2065
- * @fileoverview added by tsickle
2066
- * Generated from: libs/array/ksort/ksort.ts
2067
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2068
- */
2069
- /**
2070
- * @param {?} unordered
2071
- * @return {?}
2072
- */
2073
- function ksort(unordered) {
2074
- Object.keys(unordered).sort().forEach((/**
2075
- * @param {?} key
2076
- * @return {?}
2077
- */
2078
- function (key) {
2079
- /** @type {?} */
2080
- var value = unordered[key];
2081
- delete unordered[key];
2082
- unordered[key] = value;
2083
- }));
2084
- }
2085
-
2086
- /**
2087
- * @fileoverview added by tsickle
2088
- * Generated from: libs/array/ksort/index.ts
2089
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2090
- */
2091
-
2092
- /**
2093
- * @fileoverview added by tsickle
2094
- * Generated from: libs/array/list/list.ts
2095
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2096
- */
2097
- /**
2098
- * @param {?} array
2099
- * @param {?} property
2100
- * @param {?=} index
2101
- * @return {?}
2102
- */
2103
- function list(array, property, index) {
2104
- if (index === void 0) { index = null; }
2105
- /** @type {?} */
2106
- var resultList = index ? {} : [];
2107
- array.forEach((/**
2108
- * @param {?} item
2109
- * @param {?} idx
2110
- * @return {?}
2111
- */
2112
- function (item, idx) {
2113
- if (index) {
2114
- resultList[item[index]] = item[property];
2115
- }
2116
- else {
2117
- resultList.push(item[property]);
2118
- }
2119
- }));
2120
- return resultList;
2121
- }
2122
-
2123
- /**
2124
- * @fileoverview added by tsickle
2125
- * Generated from: libs/array/list/index.ts
2126
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2127
- */
2128
-
2129
- /**
2130
- * @fileoverview added by tsickle
2131
- * Generated from: libs/array/nameValue/nameValue.ts
2132
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2133
- */
2134
- /**
2135
- * @param {?} array
2136
- * @param {?} name
2137
- * @param {?} value
2138
- * @return {?}
2139
- */
2140
- function nameValue(array, name, value) {
2141
- /** @type {?} */
2142
- var list = [];
2143
- if (name || value) {
2144
- /** @type {?} */
2145
- var nameFn_1 = typeof name === 'function' ? name : (/**
2146
- * @param {?} item
2147
- * @return {?}
2148
- */
2149
- function (item) {
2150
- return item[name];
2151
- });
2152
- /** @type {?} */
2153
- var valueFn_1 = typeof value === 'function' ? value : (/**
2154
- * @param {?} item
2155
- * @return {?}
2156
- */
2157
- function (item) {
2158
- return item[value];
2159
- });
2160
- array.forEach((/**
2161
- * @param {?} item
2162
- * @return {?}
2163
- */
2164
- function (item) {
2165
- list.push({ name: nameFn_1(item), value: valueFn_1(item) });
2166
- }));
2167
- }
2168
- else {
2169
- array.forEach((/**
2170
- * @param {?} n
2171
- * @param {?} v
2172
- * @return {?}
2173
- */
2174
- function (n, v) {
2175
- list.push({ name: n, value: v });
2176
- }));
2177
- }
2178
- return list;
2179
- }
2180
-
2181
- /**
2182
- * @fileoverview added by tsickle
2183
- * Generated from: libs/array/nameValue/index.ts
2184
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2185
- */
2186
-
2187
- /**
2188
- * @fileoverview added by tsickle
2189
- * Generated from: libs/array/remove/remove.ts
2190
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2191
- */
2192
- /**
2193
- * @param {?} array
2194
- * @param {?} query
2195
- * @return {?}
2196
- */
2197
- function remove(array, query) {
2198
- /** @type {?} */
2199
- var idx = indexOf(array, query);
2200
- if (idx >= 0) {
2201
- return array.splice(idx, 1);
2202
- }
2203
- return idx;
2204
- }
2205
-
2206
- /**
2207
- * @fileoverview added by tsickle
2208
- * Generated from: libs/array/remove/index.ts
2209
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2210
- */
2211
-
2212
- /**
2213
- * @fileoverview added by tsickle
2214
- * Generated from: libs/array/sort/sort.ts
2215
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2216
- */
2217
- /**
2218
- * @param {?} array
2219
- * @param {?} query
2220
- * @param {?=} reverse
2221
- * @return {?}
2222
- */
2223
- function sort(array, query, reverse) {
2224
- if (reverse === void 0) { reverse = false; }
2225
- if (typeof query !== 'function') {
2226
- /** @type {?} */
2227
- var queryStr_1 = query;
2228
- query = (/**
2229
- * @param {?} a
2230
- * @param {?} b
2231
- * @return {?}
2232
- */
2233
- function (a, b) {
2234
- if (reverse) {
2235
- if (a[queryStr_1] < b[queryStr_1]) {
2236
- return 1;
2237
- }
2238
- else if (a[queryStr_1] > b[queryStr_1]) {
2239
- return -1;
2240
- }
2241
- }
2242
- else {
2243
- if (a[queryStr_1] > b[queryStr_1]) {
2244
- return 1;
2245
- }
2246
- else if (a[queryStr_1] < b[queryStr_1]) {
2247
- return -1;
2248
- }
2249
- }
2250
- return 0;
2251
- });
2252
- }
2253
- array.sort(query);
2254
- return array;
2255
- }
2256
-
2257
- /**
2258
- * @fileoverview added by tsickle
2259
- * Generated from: libs/array/sort/index.ts
2260
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2261
- */
2262
-
2263
- /**
2264
- * @fileoverview added by tsickle
2265
- * Generated from: libs/array/rsort/rsort.ts
2266
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2267
- */
2268
- /**
2269
- * @param {?} array
2270
- * @param {?} query
2271
- * @return {?}
2272
- */
2273
- function rsort(array, query) {
2274
- return sort(array, query, true);
2275
- }
2276
-
2277
- /**
2278
- * @fileoverview added by tsickle
2279
- * Generated from: libs/array/rsort/index.ts
2280
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2281
- */
2282
-
2283
- /**
2284
- * @fileoverview added by tsickle
2285
- * Generated from: libs/array/find/find.ts
2286
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2287
- */
2288
- /**
2289
- * @param {?} array
2290
- * @param {?} query
2291
- * @return {?}
2292
- */
2293
- function find(array, query) {
2294
- /** @type {?} */
2295
- var data = filter(array, query);
2296
- return data.length ? data[0] : null;
2297
- }
2298
-
2299
- /**
2300
- * @fileoverview added by tsickle
2301
- * Generated from: libs/array/find/index.ts
2302
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2303
- */
2304
-
2305
- /**
2306
- * @fileoverview added by tsickle
2307
- * Generated from: libs/array/index.ts
2308
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2309
- */
2310
-
2311
- /**
2312
- * @fileoverview added by tsickle
2313
- * Generated from: libs/util/boolean/boolean.ts
2314
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2315
- */
2316
- /**
2317
- * @param {?} value
2318
- * @return {?}
2319
- */
2320
- function boolean(value) {
2321
- return toString(value).toLowerCase() !== 'false' && !!value;
2322
- }
2323
-
2324
- /**
2325
- * @fileoverview added by tsickle
2326
- * Generated from: libs/util/boolean/index.ts
2327
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2328
- */
2329
-
2330
- /**
2331
- * @fileoverview added by tsickle
2332
- * Generated from: libs/util/debounce/debounce.ts
2333
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2334
- */
2335
- /**
2336
- * @param {?} func
2337
- * @param {?} wait
2338
- * @param {?} immediate
2339
- * @return {?}
2340
- */
2341
- function debounce(func, wait, immediate) {
2342
- /** @type {?} */
2343
- var timeout;
2344
- return (/**
2345
- * @return {?}
2346
- */
2347
- function () {
2348
- /** @type {?} */
2349
- var context = this;
2350
- /** @type {?} */
2351
- var args = arguments;
2352
- /** @type {?} */
2353
- var later = (/**
2354
- * @return {?}
2355
- */
2356
- function () {
2357
- timeout = null;
2358
- if (!immediate)
2359
- func.apply(context, args);
2360
- });
2361
- /** @type {?} */
2362
- var callNow = immediate && !timeout;
2363
- clearTimeout(timeout);
2364
- timeout = setTimeout(later, wait);
2365
- if (callNow)
2366
- func.apply(context, args);
2367
- });
2368
- }
2369
-
2370
- /**
2371
- * @fileoverview added by tsickle
2372
- * Generated from: libs/util/debounce/index.ts
2373
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2374
- */
2375
-
2376
- /**
2377
- * @fileoverview added by tsickle
2378
- * Generated from: libs/util/guid/index.ts
2379
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2380
- */
2381
-
2382
- /**
2383
- * @fileoverview added by tsickle
2384
- * Generated from: libs/util/keys/keys.ts
2385
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2386
- */
2387
- /** @type {?} */
2388
- var KEY_CANCEL$1 = 3;
2389
- /** @type {?} */
2390
- var KEY_HELP$1 = 6;
2391
- /** @type {?} */
2392
- var KEY_BACKSPACE$1 = 8;
2393
- /** @type {?} */
2394
- var KEY_TAB$1 = 9;
2395
- /** @type {?} */
2396
- var KEY_CLEAR$1 = 12;
2397
- /** @type {?} */
2398
- var KEY_RETURN$1 = 13;
2399
- /** @type {?} */
2400
- var KEY_ENTER$1 = 14;
2401
- /** @type {?} */
2402
- var KEY_SHIFT$1 = 16;
2403
- /** @type {?} */
2404
- var KEY_CONTROL$1 = 17;
2405
- /** @type {?} */
2406
- var KEY_ALT$1 = 18;
2407
- /** @type {?} */
2408
- var KEY_PAUSE$1 = 19;
2409
- /** @type {?} */
2410
- var KEY_CAPS_LOCK$1 = 20;
2411
- /** @type {?} */
2412
- var KEY_ESCAPE$1 = 27;
2413
- /** @type {?} */
2414
- var KEY_SPACE$1 = 32;
2415
- /** @type {?} */
2416
- var KEY_PAGE_UP$1 = 33;
2417
- /** @type {?} */
2418
- var KEY_PAGE_DOWN$1 = 34;
2419
- /** @type {?} */
2420
- var KEY_END$1 = 35;
2421
- /** @type {?} */
2422
- var KEY_HOME$1 = 36;
2423
- /** @type {?} */
2424
- var KEY_LEFT$1 = 37;
2425
- /** @type {?} */
2426
- var KEY_UP$1 = 38;
2427
- /** @type {?} */
2428
- var KEY_RIGHT$1 = 39;
2429
- /** @type {?} */
2430
- var KEY_DOWN$1 = 40;
2431
- /** @type {?} */
2432
- var KEY_PRINTSCREEN$1 = 44;
2433
- /** @type {?} */
2434
- var KEY_INSERT$1 = 45;
2435
- /** @type {?} */
2436
- var KEY_DELETE$1 = 46;
2437
- /** @type {?} */
2438
- var KEY_0$1 = 48;
2439
- /** @type {?} */
2440
- var KEY_1$1 = 49;
2441
- /** @type {?} */
2442
- var KEY_2$1 = 50;
2443
- /** @type {?} */
2444
- var KEY_3$1 = 51;
2445
- /** @type {?} */
2446
- var KEY_4$1 = 52;
2447
- /** @type {?} */
2448
- var KEY_5$1 = 53;
2449
- /** @type {?} */
2450
- var KEY_6$1 = 54;
2451
- /** @type {?} */
2452
- var KEY_7$1 = 55;
2453
- /** @type {?} */
2454
- var KEY_8$1 = 56;
2455
- /** @type {?} */
2456
- var KEY_9$1 = 57;
2457
- /** @type {?} */
2458
- var KEY_SEMICOLON$1 = 59;
2459
- /** @type {?} */
2460
- var KEY_EQUALS$1 = 61;
2461
-
2462
- /**
2463
- * @fileoverview added by tsickle
2464
- * Generated from: libs/util/keys/index.ts
2465
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2466
- */
2467
-
2468
- /**
2469
- * @fileoverview added by tsickle
2470
- * Generated from: libs/util/length/length.ts
2471
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2472
- */
2473
- /**
2474
- * @param {?} object
2475
- * @return {?}
2476
- */
2477
- function length(object) {
2478
- if (isObject(object)) {
2479
- return Object.keys(object).length;
2480
- }
2481
- if (isArray(object)) {
2482
- return object.length;
2483
- }
2484
- return 0;
2485
- }
2486
-
2487
- /**
2488
- * @fileoverview added by tsickle
2489
- * Generated from: libs/util/length/index.ts
2490
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2491
- */
2492
-
2493
- /**
2494
- * @fileoverview added by tsickle
2495
- * Generated from: libs/util/resolve/resolve.ts
2496
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2497
- */
2498
- /**
2499
- * @param {?} promise
2500
- * @param {?=} defaults
2501
- * @return {?}
2502
- */
2503
- function resolve(promise, defaults) {
2504
- if (defaults === void 0) { defaults = []; }
2505
- /** @type {?} */
2506
- var result = defaults;
2507
- return new Promise((/**
2508
- * @param {?} resolve
2509
- * @return {?}
2510
- */
2511
- function (resolve) {
2512
- promise.then((/**
2513
- * @param {?} data
2514
- * @return {?}
2515
- */
2516
- function (data) {
2517
- Object.keys(data).forEach((/**
2518
- * @param {?} key
2519
- * @return {?}
2520
- */
2521
- function (key) { return result[key] = data[key]; }));
2522
- resolve(result);
2523
- }));
2524
- }));
2525
- }
2526
-
2527
- /**
2528
- * @fileoverview added by tsickle
2529
- * Generated from: libs/util/resolve/index.ts
2530
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2531
- */
2532
-
2533
- /**
2534
- * @fileoverview added by tsickle
2535
- * Generated from: libs/util/stringify/index.ts
2536
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2537
- */
2538
-
2539
- /**
2540
- * @fileoverview added by tsickle
2541
- * Generated from: libs/util/uuid/uuid.ts
2542
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2543
- */
2544
- /**
2545
- * @return {?}
2546
- */
2547
- function uuid() {
2548
- return guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
2549
- }
2550
-
2551
- /**
2552
- * @fileoverview added by tsickle
2553
- * Generated from: libs/util/uuid/index.ts
2554
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2555
- */
2556
-
2557
- /**
2558
- * @fileoverview added by tsickle
2559
- * Generated from: libs/util/value/value.ts
2560
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2561
- */
2562
- /**
2563
- * @param {?} object
2564
- * @param {?} key
2565
- * @param {?} def
2566
- * @return {?}
2567
- */
2568
- function value(object, key, def) {
2569
- if (typeof object === 'object' || Array.isArray(object)) {
2570
- if (object.hasOwnProperty(key)) {
2571
- return object[key];
2572
- }
2573
- }
2574
- return def;
2575
- }
2576
-
2577
- /**
2578
- * @fileoverview added by tsickle
2579
- * Generated from: libs/util/value/index.ts
2580
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2581
- */
2582
-
2583
- /**
2584
- * @fileoverview added by tsickle
2585
- * Generated from: libs/util/isClass/isClass.ts
2586
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2587
- */
2588
- /**
2589
- * @param {?} value
2590
- * @param {?} cls
2591
- * @return {?}
2592
- */
2593
- function isClass(value, cls) {
2594
- if (typeof value === 'object') {
2595
- if (typeof cls === 'string') {
2596
- if (value.constructor) {
2597
- if (value.constructor.name === cls) {
2598
- return true;
2599
- }
2600
- }
2601
- }
2602
- else {
2603
- if (value instanceof cls) {
2604
- return true;
2605
- }
2606
- }
2607
- }
2608
- return false;
2609
- }
2610
-
2611
- /**
2612
- * @fileoverview added by tsickle
2613
- * Generated from: libs/util/isClass/index.ts
2614
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2615
- */
2616
-
2617
- /**
2618
- * @fileoverview added by tsickle
2619
- * Generated from: libs/util/isNumeric/isNumeric.ts
2620
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2621
- */
2622
- /**
2623
- * @param {?} value
2624
- * @return {?}
2625
- */
2626
- function isNumeric(value) {
2627
- /** @type {?} */
2628
- var str = toString(value);
2629
- return str.length && !!str.match(/^-?\d*\.?\d*$/);
2630
- }
2631
-
2632
- /**
2633
- * @fileoverview added by tsickle
2634
- * Generated from: libs/util/isNumeric/index.ts
2635
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2636
- */
2637
-
2638
- /**
2639
- * @fileoverview added by tsickle
2640
- * Generated from: libs/util/isEmpty/index.ts
2641
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2642
- */
2643
-
2644
- /**
2645
- * @fileoverview added by tsickle
2646
- * Generated from: libs/util/throttle/throttle.ts
2647
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2648
- */
2649
- /**
2650
- * @param {?} func
2651
- * @param {?} wait
2652
- * @return {?}
2653
- */
2654
- function throttle(func, wait) {
2655
- /** @type {?} */
2656
- var waiting = false;
2657
- return (/**
2658
- * @return {?}
2659
- */
2660
- function () {
2661
- if (!waiting) { // If we're not waiting
2662
- func.apply(null, arguments); // Execute users function
2663
- waiting = true; // Prevent future invocations
2664
- setTimeout((/**
2665
- * @return {?}
2666
- */
2667
- function () {
2668
- waiting = false; // And allow future invocations
2669
- }), wait);
2670
- }
2671
- });
2672
- }
2673
-
2674
- /**
2675
- * @fileoverview added by tsickle
2676
- * Generated from: libs/util/throttle/index.ts
2677
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2678
- */
2679
-
2680
- /**
2681
- * @fileoverview added by tsickle
2682
- * Generated from: libs/util/queue/operation.ts
2683
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2684
- */
2685
- var Operation = /** @class */ (function () {
2686
- function Operation(target, name) {
2687
- this.ready$ = new Subject();
2688
- this.name = name ? name : guid();
2689
- if (target instanceof Observable) {
2690
- this.target = target;
2691
- }
2692
- else {
2693
- this.target = of(target);
2694
- }
2695
- }
2696
- return Operation;
2697
- }());
2698
- if (false) {
2699
- /** @type {?} */
2700
- Operation.prototype.name;
2701
- /** @type {?} */
2702
- Operation.prototype.target;
2703
- /** @type {?} */
2704
- Operation.prototype.ready$;
2705
- }
2706
-
2707
- /**
2708
- * @fileoverview added by tsickle
2709
- * Generated from: libs/util/queue/queue.enum.ts
2710
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2711
- */
2712
- /** @enum {string} */
2713
- var QueueState = {
2714
- Idle: "idle",
2715
- Processing: "processing",
2716
- };
2717
-
2718
- /**
2719
- * @fileoverview added by tsickle
2720
- * Generated from: libs/util/queue/queue.ts
2721
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2722
- */
2723
- var Queue = /** @class */ (function () {
2724
- function Queue(_limit) {
2725
- if (_limit === void 0) { _limit = Infinity; }
2726
- this._limit = _limit;
2727
- this._done = new Subject();
2728
- this._queue = [];
2729
- this._inProgress = [];
2730
- this._total = 0;
2731
- this._completed = 0;
2732
- this._errors = 0;
2733
- this._state = QueueState.Idle;
2734
- this._destroy$ = new Subject();
2735
- }
2736
- Object.defineProperty(Queue.prototype, "total", {
2737
- get: /**
2738
- * @return {?}
2739
- */
2740
- function () {
2741
- return this._total;
2742
- },
2743
- enumerable: true,
2744
- configurable: true
2745
- });
2746
- Object.defineProperty(Queue.prototype, "completed", {
2747
- get: /**
2748
- * @return {?}
2749
- */
2750
- function () {
2751
- return this._completed;
2752
- },
2753
- enumerable: true,
2754
- configurable: true
2755
- });
2756
- Object.defineProperty(Queue.prototype, "pending", {
2757
- get: /**
2758
- * @return {?}
2759
- */
2760
- function () {
2761
- return this._queue.length;
2762
- },
2763
- enumerable: true,
2764
- configurable: true
2765
- });
2766
- Object.defineProperty(Queue.prototype, "inProgress", {
2767
- get: /**
2768
- * @return {?}
2769
- */
2770
- function () {
2771
- return this._inProgress.length;
2772
- },
2773
- enumerable: true,
2774
- configurable: true
2775
- });
2776
- Object.defineProperty(Queue.prototype, "errors", {
2777
- get: /**
2778
- * @return {?}
2779
- */
2780
- function () {
2781
- return this._errors;
2782
- },
2783
- enumerable: true,
2784
- configurable: true
2785
- });
2786
- Object.defineProperty(Queue.prototype, "state", {
2787
- get: /**
2788
- * @return {?}
2789
- */
2790
- function () {
2791
- return this._state;
2792
- },
2793
- enumerable: true,
2794
- configurable: true
2795
- });
2796
- Object.defineProperty(Queue.prototype, "empty", {
2797
- get: /**
2798
- * @return {?}
2799
- */
2800
- function () {
2801
- return !this._queue.length && !this._inProgress.length;
2802
- },
2803
- enumerable: true,
2804
- configurable: true
2805
- });
2806
- Object.defineProperty(Queue.prototype, "pendingOperations", {
2807
- get: /**
2808
- * @return {?}
2809
- */
2810
- function () {
2811
- return this._queue
2812
- .map((/**
2813
- * @param {?} operation
2814
- * @return {?}
2815
- */
2816
- function (operation) { return operation.name; }));
2817
- },
2818
- enumerable: true,
2819
- configurable: true
2820
- });
2821
- Object.defineProperty(Queue.prototype, "inProgressOperations", {
2822
- get: /**
2823
- * @return {?}
2824
- */
2825
- function () {
2826
- return this._inProgress
2827
- .map((/**
2828
- * @param {?} operation
2829
- * @return {?}
2830
- */
2831
- function (operation) { return operation.name; }));
2832
- },
2833
- enumerable: true,
2834
- configurable: true
2835
- });
2836
- /**
2837
- * @return {?}
2838
- */
2839
- Queue.prototype.isProcessing = /**
2840
- * @return {?}
2841
- */
2842
- function () {
2843
- return this._state === QueueState.Processing;
2844
- };
2845
- /**
2846
- * @return {?}
2847
- */
2848
- Queue.prototype.isIdle = /**
2849
- * @return {?}
2850
- */
2851
- function () {
2852
- return this._state === QueueState.Idle;
2853
- };
2854
- /**
2855
- * @param {?} value
2856
- * @return {?}
2857
- */
2858
- Queue.prototype.setLimit = /**
2859
- * @param {?} value
2860
- * @return {?}
2861
- */
2862
- function (value) {
2863
- this._limit = value;
2864
- };
2865
- /**
2866
- * @param {?} fun
2867
- * @param {?=} err
2868
- * @param {?=} complete
2869
- * @return {?}
2870
- */
2871
- Queue.prototype.subscribe = /**
2872
- * @param {?} fun
2873
- * @param {?=} err
2874
- * @param {?=} complete
2875
- * @return {?}
2876
- */
2877
- function (fun, err, complete) {
2878
- this._done
2879
- .pipe(takeUntil(this._destroy$))
2880
- .subscribe(fun, err, complete);
2881
- };
2882
- /**
2883
- * @param {?} fun
2884
- * @param {?=} err
2885
- * @param {?=} complete
2886
- * @return {?}
2887
- */
2888
- Queue.prototype.complete = /**
2889
- * @param {?} fun
2890
- * @param {?=} err
2891
- * @param {?=} complete
2892
- * @return {?}
2893
- */
2894
- function (fun, err, complete) {
2895
- var _this = this;
2896
- Observable.create((/**
2897
- * @param {?} observer
2898
- * @return {?}
2899
- */
2900
- function (observer) {
2901
- if (!_this.isProcessing()) {
2902
- observer.next();
2903
- observer.complete();
2904
- return;
2905
- }
2906
- _this.subscribe((/**
2907
- * @return {?}
2908
- */
2909
- function () {
2910
- observer.next();
2911
- observer.complete();
2912
- }), (/**
2913
- * @param {?} error
2914
- * @return {?}
2915
- */
2916
- function (error) {
2917
- observer.error(error);
2918
- _this.clear();
2919
- }));
2920
- })).subscribe(fun, err, complete);
2921
- };
2922
- /**
2923
- * @param {?} target
2924
- * @param {?=} name
2925
- * @return {?}
2926
- */
2927
- Queue.prototype.push = /**
2928
- * @param {?} target
2929
- * @param {?=} name
2930
- * @return {?}
2931
- */
2932
- function (target, name) {
2933
- /** @type {?} */
2934
- var operation = new Operation(target, name);
2935
- this._total++;
2936
- this._state = QueueState.Processing;
2937
- if (this._inProgress.length < this._limit) {
2938
- this._processOperation(operation);
2939
- }
2940
- else {
2941
- this._queue.push(operation);
2942
- }
2943
- return operation.ready$;
2944
- };
2945
- /**
2946
- * @return {?}
2947
- */
2948
- Queue.prototype.clear = /**
2949
- * @return {?}
2950
- */
2951
- function () {
2952
- this._queue = [];
2953
- this._total = 0;
2954
- this._errors = 0;
2955
- this._completed = 0;
2956
- this._state = QueueState.Idle;
2957
- this._done = new Subject();
2958
- };
2959
- /**
2960
- * @return {?}
2961
- */
2962
- Queue.prototype.destroy = /**
2963
- * @return {?}
2964
- */
2965
- function () {
2966
- this.clear();
2967
- this._done.complete();
2968
- };
2969
- /**
2970
- * @private
2971
- * @param {?} operation
2972
- * @return {?}
2973
- */
2974
- Queue.prototype._processOperation = /**
2975
- * @private
2976
- * @param {?} operation
2977
- * @return {?}
2978
- */
2979
- function (operation) {
2980
- var _this = this;
2981
- this._inProgress.push(operation);
2982
- operation.target
2983
- .pipe(delay(200), // Hack to prevent extra quick proccess execution
2984
- takeUntil(this._destroy$)).subscribe({
2985
- next: (/**
2986
- * @param {?} data
2987
- * @return {?}
2988
- */
2989
- function (data) {
2990
- operation.ready$.next(data);
2991
- }),
2992
- error: (/**
2993
- * @param {?} error
2994
- * @return {?}
2995
- */
2996
- function (error) {
2997
- /** @type {?} */
2998
- var opIndex = _this._inProgress.indexOf(operation);
2999
- _this._inProgress.splice(opIndex, 1);
3000
- _this._errors++;
3001
- operation.ready$.error(error);
3002
- if (_this.empty) {
3003
- _this._state = QueueState.Idle;
3004
- _this._done.error(error);
3005
- }
3006
- }),
3007
- complete: (/**
3008
- * @return {?}
3009
- */
3010
- function () {
3011
- /** @type {?} */
3012
- var opIndex = _this._inProgress.indexOf(operation);
3013
- _this._inProgress.splice(opIndex, 1);
3014
- _this._completed++;
3015
- operation.ready$.complete();
3016
- if (_this.empty) {
3017
- _this._state = QueueState.Idle;
3018
- _this._done.next();
3019
- }
3020
- else {
3021
- if (_this._queue.length) {
3022
- /** @type {?} */
3023
- var queueItem = _this._queue.shift();
3024
- _this._processOperation(queueItem);
3025
- }
3026
- }
3027
- })
3028
- });
3029
- };
3030
- return Queue;
3031
- }());
3032
- if (false) {
3033
- /**
3034
- * @type {?}
3035
- * @private
3036
- */
3037
- Queue.prototype._done;
3038
- /**
3039
- * @type {?}
3040
- * @private
3041
- */
3042
- Queue.prototype._queue;
3043
- /**
3044
- * @type {?}
3045
- * @private
3046
- */
3047
- Queue.prototype._inProgress;
3048
- /**
3049
- * @type {?}
3050
- * @private
3051
- */
3052
- Queue.prototype._total;
3053
- /**
3054
- * @type {?}
3055
- * @private
3056
- */
3057
- Queue.prototype._completed;
3058
- /**
3059
- * @type {?}
3060
- * @private
3061
- */
3062
- Queue.prototype._errors;
3063
- /**
3064
- * @type {?}
3065
- * @private
3066
- */
3067
- Queue.prototype._state;
3068
- /**
3069
- * @type {?}
3070
- * @private
3071
- */
3072
- Queue.prototype._destroy$;
3073
- /**
3074
- * @type {?}
3075
- * @private
3076
- */
3077
- Queue.prototype._limit;
3078
- }
3079
-
3080
- /**
3081
- * @fileoverview added by tsickle
3082
- * Generated from: libs/util/queue/index.ts
3083
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3084
- */
3085
-
3086
- /**
3087
- * @fileoverview added by tsickle
3088
- * Generated from: libs/util/remove-query-params/remove-query-params.ts
3089
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3090
- */
3091
- /**
3092
- * @param {?} path
3093
- * @return {?}
3094
- */
3095
- function removeQueryParams(path) {
3096
- return path.split('?')[0];
3097
- }
3098
-
3099
- /**
3100
- * @fileoverview added by tsickle
3101
- * Generated from: libs/util/remove-query-params/index.ts
3102
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3103
- */
3104
-
3105
- /**
3106
- * @fileoverview added by tsickle
3107
- * Generated from: libs/util/get-normalized-path/get-normalized-path.ts
3108
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3109
- */
3110
- /**
3111
- * @param {?} locationSrv
3112
- * @return {?}
3113
- */
3114
- function getNormalizedPath(locationSrv) {
3115
- /** @type {?} */
3116
- var path = locationSrv.prepareExternalUrl(locationSrv.path());
3117
- return removeQueryParams(path);
3118
- }
3119
-
3120
- /**
3121
- * @fileoverview added by tsickle
3122
- * Generated from: libs/util/get-normalized-path/index.ts
3123
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3124
- */
3125
-
3126
- /**
3127
- * @fileoverview added by tsickle
3128
- * Generated from: libs/util/index.ts
3129
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3130
- */
3131
-
3132
- /**
3133
- * @fileoverview added by tsickle
3134
- * Generated from: libs/format/number/index.ts
3135
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3136
- */
3137
-
3138
- /**
3139
- * @fileoverview added by tsickle
3140
- * Generated from: libs/format/acronym/acronym.ts
3141
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3142
- */
3143
- /**
3144
- * @param {?} str
3145
- * @param {?=} length
3146
- * @return {?}
3147
- */
3148
- function acronym(str, length) {
3149
- if (length === void 0) { length = 2; }
3150
- /** @type {?} */
3151
- var splittedString = str
3152
- .replace(/[^a-zA-Z0-9]+/g, ' ')
3153
- .split(' ');
3154
- /** @type {?} */
3155
- var result = '';
3156
- for (var i = 0; i < length; i++) {
3157
- if (!splittedString[i]) {
3158
- if (splittedString.length === 1) {
3159
- for (var j = 1; j < length; j++) {
3160
- if (!splittedString[i - 1][j]) {
3161
- break;
3162
- }
3163
- result += splittedString[i - 1][j].toUpperCase();
3164
- }
3165
- }
3166
- break;
3167
- }
3168
- result += splittedString[i][0].toUpperCase();
3169
- }
3170
- return result;
3171
- }
3172
-
3173
- /**
3174
- * @fileoverview added by tsickle
3175
- * Generated from: libs/format/acronym/index.ts
3176
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3177
- */
3178
-
3179
- /**
3180
- * @fileoverview added by tsickle
3181
- * Generated from: libs/format/currency/index.ts
3182
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3183
- */
3184
-
3185
- /**
3186
- * @fileoverview added by tsickle
3187
- * Generated from: libs/format/truncate/index.ts
3188
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3189
- */
3190
-
3191
- /**
3192
- * @fileoverview added by tsickle
3193
- * Generated from: libs/format/bytes/index.ts
3194
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3195
- */
3196
-
3197
- /**
3198
- * @fileoverview added by tsickle
3199
- * Generated from: libs/format/index.ts
3200
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3201
- */
3202
-
3203
- /**
3204
- * @fileoverview added by tsickle
3205
- * Generated from: libs/rxjs/delayedRetry.ts
3206
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3207
- */
3208
- /**
3209
- * @param {?} delayMs
3210
- * @param {?=} maxRetry
3211
- * @param {?=} message
3212
- * @return {?}
3213
- */
3214
- function delayedRetry(delayMs, maxRetry, message) {
3215
- if (maxRetry === void 0) { maxRetry = 5; }
3216
- /** @type {?} */
3217
- var retries = 0;
3218
- return (/**
3219
- * @param {?} src
3220
- * @return {?}
3221
- */
3222
- function (src) {
3223
- return src.pipe(retryWhen((/**
3224
- * @param {?} errors
3225
- * @return {?}
3226
- */
3227
- function (errors) {
3228
- return errors.pipe(tap((/**
3229
- * @return {?}
3230
- */
3231
- function () {
3232
- retries++;
3233
- if (retries <= maxRetry) {
3234
- console.info("Failed to load Resource. Retry in " + delayMs / 1000 + " sec. " + retries + "/" + maxRetry + " times...");
3235
- }
3236
- })), concatMap((/**
3237
- * @param {?} error
3238
- * @return {?}
3239
- */
3240
- function (error) {
3241
- return iif((/**
3242
- * @return {?}
3243
- */
3244
- function () { return retries > maxRetry; }), throwError(getErrorMessage(maxRetry, message)), timer(delayMs));
3245
- })));
3246
- })));
3247
- });
3248
- }
3249
- /** @type {?} */
3250
- var getErrorMessage = (/**
3251
- * @param {?} maxRetry
3252
- * @param {?} defaultMessage
3253
- * @return {?}
3254
- */
3255
- function (maxRetry, defaultMessage) {
3256
- if (!defaultMessage) {
3257
- return "Failed to load Resource for " + maxRetry + " times. Giving up.";
3258
- }
3259
- else {
3260
- return defaultMessage;
3261
- }
3262
- });
3263
- var ɵ0 = getErrorMessage;
3264
-
3265
- /**
3266
- * @fileoverview added by tsickle
3267
- * Generated from: libs/index.ts
3268
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3269
- */
3270
-
3271
- /**
3272
- * @fileoverview added by tsickle
3273
- * Generated from: public_api.ts
3274
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3275
- */
3276
-
3277
- /**
3278
- * @fileoverview added by tsickle
3279
- * Generated from: firestitch-common.ts
3280
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3281
- */
3282
-
3283
- export { FsArray, FsCommonModule, FsMath, FsUtil, 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, compare, currency, debounce, delayedRetry, email, filter, find, getNormalizedPath, guid, inArray, index, indexOf, isClass, isEmpty, isNumeric, keyExists, ksort, length, list, nameValue, number, ordinalNumber, phone, remove, removeQueryParams, resolve, rsort, sort, stringify, throttle, truncate, url, uuid, value, FsStopPropagationDirective as ɵa, FsPreventDefaultDirective as ɵb, FsAutofocusDirective as ɵc, FsUtilStringifyPipe as ɵd, FsUtilGuidPipe as ɵe, FsUtilIsEmptyPipe as ɵf, FsUtilIsNotEmptyPipe as ɵg, FsFormatNumberPipe as ɵh, FsFormatCurrencyPipe as ɵi, FsFormatTruncatePipe as ɵj, FsFormatBytesPipe as ɵk, FsFormatOrdinalNumberPipe as ɵl };
3284
- //# sourceMappingURL=firestitch-common.js.map