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