tnp-helpers 16.0.8 → 16.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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/base-project.mjs +309 -0
- package/browser/esm2022/lib/for-browser/angular.helper.mjs +89 -0
- package/browser/esm2022/lib/for-browser/helpers-browser.mjs +48 -0
- package/browser/esm2022/lib/helpers-array-obj.mjs +3 -4
- package/browser/esm2022/lib/helpers-binary.mjs +93 -0
- package/browser/esm2022/lib/helpers-numbers.mjs +5 -1
- package/browser/esm2022/lib/helpers-strings.mjs +8 -3
- package/browser/esm2022/lib/helpers.mjs +28 -16
- package/browser/esm2022/lib/index.mjs +9 -12
- package/browser/esm2022/lib/models.mjs +4 -0
- package/browser/esm2022/lib/project.mjs +9 -25
- package/browser/esm2022/lib/validators/validators-git.mjs +12 -0
- package/browser/esm2022/lib/validators/validators-network.mjs +18 -0
- package/browser/esm2022/lib/validators/validators.mjs +10 -0
- package/browser/fesm2022/tnp-helpers.mjs +551 -594
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base-project.d.ts +55 -0
- package/{client/lib → browser/lib/for-browser}/angular.helper.d.ts +5 -5
- package/{client/lib → browser/lib/for-browser}/helpers-browser.d.ts +3 -3
- package/browser/lib/helpers-binary.d.ts +27 -0
- package/browser/lib/helpers-numbers.d.ts +4 -0
- package/browser/lib/helpers-strings.d.ts +5 -0
- package/browser/lib/helpers.d.ts +26 -12
- package/browser/lib/index.d.ts +8 -10
- package/browser/lib/models.d.ts +11 -0
- package/browser/lib/project.d.ts +30 -33
- package/browser/lib/validators/validators-git.d.ts +4 -0
- package/browser/lib/validators/validators-network.d.ts +4 -0
- package/browser/lib/validators/validators.d.ts +7 -0
- package/client/esm2022/lib/base-project.mjs +309 -0
- package/client/esm2022/lib/for-browser/angular.helper.mjs +89 -0
- package/client/esm2022/lib/for-browser/helpers-browser.mjs +48 -0
- package/client/esm2022/lib/helpers-array-obj.mjs +3 -4
- package/client/esm2022/lib/helpers-binary.mjs +93 -0
- package/client/esm2022/lib/helpers-numbers.mjs +5 -1
- package/client/esm2022/lib/helpers-strings.mjs +8 -3
- package/client/esm2022/lib/helpers.mjs +28 -16
- package/client/esm2022/lib/index.mjs +9 -12
- package/client/esm2022/lib/models.mjs +4 -0
- package/client/esm2022/lib/project.mjs +9 -25
- package/client/esm2022/lib/validators/validators-git.mjs +12 -0
- package/client/esm2022/lib/validators/validators-network.mjs +18 -0
- package/client/esm2022/lib/validators/validators.mjs +10 -0
- package/client/fesm2022/tnp-helpers.mjs +551 -594
- package/client/fesm2022/tnp-helpers.mjs.map +1 -1
- package/client/lib/base-project.d.ts +55 -0
- package/{browser/lib → client/lib/for-browser}/angular.helper.d.ts +5 -5
- package/{websql/lib → client/lib/for-browser}/helpers-browser.d.ts +3 -3
- package/client/lib/helpers-binary.d.ts +27 -0
- package/client/lib/helpers-numbers.d.ts +4 -0
- package/client/lib/helpers-strings.d.ts +5 -0
- package/client/lib/helpers.d.ts +26 -12
- package/client/lib/index.d.ts +8 -10
- package/client/lib/models.d.ts +11 -0
- package/client/lib/project.d.ts +30 -33
- package/client/lib/validators/validators-git.d.ts +4 -0
- package/client/lib/validators/validators-network.d.ts +4 -0
- package/client/lib/validators/validators.d.ts +7 -0
- package/client/package.json +27 -21
- package/lib/base-project.d.ts +64 -0
- package/lib/base-project.js +365 -0
- package/lib/base-project.js.map +1 -0
- package/lib/{helpers-cli-tool.backend.d.ts → for-backend/helpers-cli-tool.backend.d.ts} +1 -1
- package/lib/{helpers-cli-tool.backend.js → for-backend/helpers-cli-tool.backend.js} +1 -1
- package/lib/for-backend/helpers-cli-tool.backend.js.map +1 -0
- package/lib/{helpers-console-gui.js → for-backend/helpers-console-gui.js} +1 -1
- package/lib/for-backend/helpers-console-gui.js.map +1 -0
- package/lib/{helpers-dependencies.backend.d.ts → for-backend/helpers-dependencies.backend.d.ts} +1 -1
- package/lib/{helpers-dependencies.backend.js → for-backend/helpers-dependencies.backend.js} +1 -1
- package/lib/for-backend/helpers-dependencies.backend.js.map +1 -0
- package/lib/{helpers-file-folders.backend.d.ts → for-backend/helpers-file-folders.backend.d.ts} +7 -1
- package/lib/{helpers-file-folders.backend.js → for-backend/helpers-file-folders.backend.js} +13 -2
- package/lib/for-backend/helpers-file-folders.backend.js.map +1 -0
- package/lib/{helpers-git.backend.d.ts → for-backend/helpers-git.backend.d.ts} +1 -1
- package/lib/{helpers-git.backend.js → for-backend/helpers-git.backend.js} +10 -1
- package/lib/for-backend/helpers-git.backend.js.map +1 -0
- package/lib/for-backend/helpers-network.backend.js.map +1 -0
- package/lib/for-backend/helpers-npm.backend.js.map +1 -0
- package/lib/{helpers-path.backend.js → for-backend/helpers-path.backend.js} +3 -3
- package/lib/for-backend/helpers-path.backend.js.map +1 -0
- package/lib/{helpers-process.backend.js → for-backend/helpers-process.backend.js} +1 -1
- package/lib/for-backend/helpers-process.backend.js.map +1 -0
- package/lib/{helpers-system-terminal.backend.js → for-backend/helpers-system-terminal.backend.js} +1 -1
- package/lib/for-backend/helpers-system-terminal.backend.js.map +1 -0
- package/lib/for-backend/helpers-vscode.backend.d.ts +5 -0
- package/lib/{helpers-vscode.backend.js → for-backend/helpers-vscode.backend.js} +1 -1
- package/lib/for-backend/helpers-vscode.backend.js.map +1 -0
- package/lib/for-backend/ts-code/index.js.map +1 -0
- package/lib/{ts-code → for-backend/ts-code}/ts-code-extractor.js +1 -1
- package/lib/for-backend/ts-code/ts-code-extractor.js.map +1 -0
- package/lib/{ts-code → for-backend/ts-code}/ts-code-modifier.backend.js +1 -1
- package/lib/for-backend/ts-code/ts-code-modifier.backend.js.map +1 -0
- package/lib/{angular.helper.d.ts → for-browser/angular.helper.d.ts} +5 -5
- package/lib/for-browser/angular.helper.js +6 -0
- package/lib/for-browser/angular.helper.js.map +1 -0
- package/lib/{helpers-browser.d.ts → for-browser/helpers-browser.d.ts} +3 -3
- package/lib/{helpers-browser.js → for-browser/helpers-browser.js} +12 -12
- package/lib/for-browser/helpers-browser.js.map +1 -0
- package/lib/git-project.d.ts +2 -1
- package/lib/git-project.js +4 -1
- package/lib/git-project.js.map +1 -1
- package/lib/helpers-array-obj.js +3 -3
- package/lib/helpers-array-obj.js.map +1 -1
- package/lib/helpers-binary.d.ts +28 -0
- package/lib/helpers-binary.js +127 -0
- package/lib/helpers-binary.js.map +1 -0
- package/lib/helpers-json5.backend.js +3 -3
- package/lib/helpers-json5.backend.js.map +1 -1
- package/lib/helpers-numbers.d.ts +4 -0
- package/lib/helpers-numbers.js +4 -0
- package/lib/helpers-numbers.js.map +1 -1
- package/lib/helpers-strings.d.ts +5 -0
- package/lib/helpers-strings.js +7 -2
- package/lib/helpers-strings.js.map +1 -1
- package/lib/helpers.d.ts +40 -26
- package/lib/helpers.js +61 -51
- package/lib/helpers.js.map +1 -1
- package/lib/index.d.ts +8 -11
- package/lib/index.js +9 -14
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +10 -0
- package/lib/{firedev-models.js → models.js} +1 -1
- package/lib/models.js.map +1 -0
- package/lib/old/base-component.d.ts +0 -0
- package/lib/old/base-component.js +6 -0
- package/lib/old/base-component.js.map +1 -0
- package/lib/old/base-formly-component.d.ts +0 -0
- package/lib/old/base-formly-component.js +6 -0
- package/lib/old/base-formly-component.js.map +1 -0
- package/lib/old/condition-wait.d.ts +0 -0
- package/lib/old/condition-wait.js +58 -0
- package/lib/old/condition-wait.js.map +1 -0
- package/lib/old/dual-component-ctrl.d.ts +0 -0
- package/lib/old/dual-component-ctrl.js +6 -0
- package/lib/old/dual-component-ctrl.js.map +1 -0
- package/lib/project.d.ts +29 -32
- package/lib/project.js +19 -32
- package/lib/project.js.map +1 -1
- package/lib/validators/validators-firedev.d.ts +3 -0
- package/lib/validators/validators-firedev.js +34 -0
- package/lib/validators/validators-firedev.js.map +1 -0
- package/lib/validators/validators-git.d.ts +3 -0
- package/lib/validators/validators-git.js +13 -0
- package/lib/validators/validators-git.js.map +1 -0
- package/lib/validators/validators-network.d.ts +3 -0
- package/lib/validators/validators-network.js +19 -0
- package/lib/validators/validators-network.js.map +1 -0
- package/lib/validators/validators.d.ts +6 -0
- package/lib/validators/validators.js +11 -0
- package/lib/validators/validators.js.map +1 -0
- package/package.json +3 -3
- package/tmp-environment.json +31 -25
- package/websql/esm2022/lib/base-project.mjs +296 -0
- package/websql/esm2022/lib/for-browser/angular.helper.mjs +89 -0
- package/websql/esm2022/lib/for-browser/helpers-browser.mjs +48 -0
- package/websql/esm2022/lib/helpers-array-obj.mjs +3 -4
- package/websql/esm2022/lib/helpers-binary.mjs +93 -0
- package/websql/esm2022/lib/helpers-numbers.mjs +5 -1
- package/websql/esm2022/lib/helpers-strings.mjs +8 -3
- package/websql/esm2022/lib/helpers.mjs +28 -16
- package/websql/esm2022/lib/index.mjs +9 -12
- package/websql/esm2022/lib/models.mjs +4 -0
- package/websql/esm2022/lib/project.mjs +9 -25
- package/websql/esm2022/lib/validators/validators-git.mjs +12 -0
- package/websql/esm2022/lib/validators/validators-network.mjs +18 -0
- package/websql/esm2022/lib/validators/validators.mjs +10 -0
- package/websql/fesm2022/tnp-helpers.mjs +534 -592
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base-project.d.ts +55 -0
- package/websql/lib/{angular.helper.d.ts → for-browser/angular.helper.d.ts} +5 -5
- package/{browser/lib → websql/lib/for-browser}/helpers-browser.d.ts +3 -3
- package/websql/lib/helpers-binary.d.ts +27 -0
- package/websql/lib/helpers-numbers.d.ts +4 -0
- package/websql/lib/helpers-strings.d.ts +5 -0
- package/websql/lib/helpers.d.ts +26 -12
- package/websql/lib/index.d.ts +8 -10
- package/websql/lib/models.d.ts +11 -0
- package/websql/lib/project.d.ts +30 -33
- package/websql/lib/validators/validators-git.d.ts +4 -0
- package/websql/lib/validators/validators-network.d.ts +4 -0
- package/websql/lib/validators/validators.d.ts +7 -0
- package/browser/esm2022/lib/angular.helper.mjs +0 -88
- package/browser/esm2022/lib/base-component.mjs +0 -51
- package/browser/esm2022/lib/base-formly-component.mjs +0 -114
- package/browser/esm2022/lib/condition-wait.mjs +0 -46
- package/browser/esm2022/lib/constants.mjs +0 -9
- package/browser/esm2022/lib/dual-component-ctrl.mjs +0 -119
- package/browser/esm2022/lib/firedev-models.mjs +0 -4
- package/browser/esm2022/lib/helpers-browser.mjs +0 -48
- package/browser/esm2022/lib/helpers-console-gui.mjs +0 -10
- package/browser/esm2022/lib/helpers-environment.mjs +0 -33
- package/browser/esm2022/lib/long-press.directive.mjs +0 -114
- package/browser/esm2022/lib/resize-service.mjs +0 -23
- package/browser/lib/base-component.d.ts +0 -18
- package/browser/lib/base-formly-component.d.ts +0 -32
- package/browser/lib/condition-wait.d.ts +0 -9
- package/browser/lib/constants.d.ts +0 -8
- package/browser/lib/dual-component-ctrl.d.ts +0 -26
- package/browser/lib/firedev-models.d.ts +0 -14
- package/browser/lib/helpers-console-gui.d.ts +0 -7
- package/browser/lib/helpers-environment.d.ts +0 -6
- package/browser/lib/long-press.directive.d.ts +0 -26
- package/browser/lib/resize-service.d.ts +0 -10
- package/client/esm2022/lib/angular.helper.mjs +0 -88
- package/client/esm2022/lib/base-component.mjs +0 -51
- package/client/esm2022/lib/base-formly-component.mjs +0 -114
- package/client/esm2022/lib/condition-wait.mjs +0 -46
- package/client/esm2022/lib/constants.mjs +0 -9
- package/client/esm2022/lib/dual-component-ctrl.mjs +0 -119
- package/client/esm2022/lib/firedev-models.mjs +0 -4
- package/client/esm2022/lib/helpers-browser.mjs +0 -48
- package/client/esm2022/lib/helpers-console-gui.mjs +0 -10
- package/client/esm2022/lib/helpers-environment.mjs +0 -33
- package/client/esm2022/lib/long-press.directive.mjs +0 -114
- package/client/esm2022/lib/resize-service.mjs +0 -23
- package/client/lib/base-component.d.ts +0 -18
- package/client/lib/base-formly-component.d.ts +0 -32
- package/client/lib/condition-wait.d.ts +0 -9
- package/client/lib/constants.d.ts +0 -8
- package/client/lib/dual-component-ctrl.d.ts +0 -26
- package/client/lib/firedev-models.d.ts +0 -14
- package/client/lib/helpers-console-gui.d.ts +0 -7
- package/client/lib/helpers-environment.d.ts +0 -6
- package/client/lib/long-press.directive.d.ts +0 -26
- package/client/lib/resize-service.d.ts +0 -10
- package/lib/angular.helper.js +0 -6
- package/lib/angular.helper.js.map +0 -1
- package/lib/base-component.d.ts +0 -14
- package/lib/base-component.js +0 -6
- package/lib/base-component.js.map +0 -1
- package/lib/base-formly-component.d.ts +0 -28
- package/lib/base-formly-component.js +0 -6
- package/lib/base-formly-component.js.map +0 -1
- package/lib/condition-wait.d.ts +0 -8
- package/lib/condition-wait.js +0 -94
- package/lib/condition-wait.js.map +0 -1
- package/lib/constants.d.ts +0 -7
- package/lib/constants.js +0 -11
- package/lib/constants.js.map +0 -1
- package/lib/dual-component-ctrl.d.ts +0 -25
- package/lib/dual-component-ctrl.js +0 -6
- package/lib/dual-component-ctrl.js.map +0 -1
- package/lib/firedev-models.d.ts +0 -13
- package/lib/firedev-models.js.map +0 -1
- package/lib/helpers-browser.js.map +0 -1
- package/lib/helpers-cli-tool.backend.js.map +0 -1
- package/lib/helpers-console-gui.js.map +0 -1
- package/lib/helpers-dependencies.backend.js.map +0 -1
- package/lib/helpers-environment.d.ts +0 -5
- package/lib/helpers-environment.js +0 -35
- package/lib/helpers-environment.js.map +0 -1
- package/lib/helpers-file-folders.backend.js.map +0 -1
- package/lib/helpers-git.backend.js.map +0 -1
- package/lib/helpers-morphi-framework.backend.d.ts +0 -4
- package/lib/helpers-morphi-framework.backend.js +0 -58
- package/lib/helpers-morphi-framework.backend.js.map +0 -1
- package/lib/helpers-network.backend.js.map +0 -1
- package/lib/helpers-npm.backend.js.map +0 -1
- package/lib/helpers-path.backend.js.map +0 -1
- package/lib/helpers-process.backend.js.map +0 -1
- package/lib/helpers-system-terminal.backend.js.map +0 -1
- package/lib/helpers-vscode.backend.d.ts +0 -5
- package/lib/helpers-vscode.backend.js.map +0 -1
- package/lib/long-press.directive.d.ts +0 -22
- package/lib/merge-helpers.backend.d.ts +0 -23
- package/lib/merge-helpers.backend.js +0 -108
- package/lib/merge-helpers.backend.js.map +0 -1
- package/lib/resize-service.d.ts +0 -6
- package/lib/resize-service.js +0 -23
- package/lib/resize-service.js.map +0 -1
- package/lib/ts-code/index.js.map +0 -1
- package/lib/ts-code/ts-code-extractor.js.map +0 -1
- package/lib/ts-code/ts-code-modifier.backend.js.map +0 -1
- package/websql/esm2022/lib/angular.helper.mjs +0 -88
- package/websql/esm2022/lib/base-component.mjs +0 -51
- package/websql/esm2022/lib/base-formly-component.mjs +0 -114
- package/websql/esm2022/lib/condition-wait.mjs +0 -46
- package/websql/esm2022/lib/constants.mjs +0 -9
- package/websql/esm2022/lib/dual-component-ctrl.mjs +0 -119
- package/websql/esm2022/lib/firedev-models.mjs +0 -4
- package/websql/esm2022/lib/helpers-browser.mjs +0 -48
- package/websql/esm2022/lib/helpers-console-gui.mjs +0 -10
- package/websql/esm2022/lib/helpers-environment.mjs +0 -33
- package/websql/esm2022/lib/long-press.directive.mjs +0 -114
- package/websql/esm2022/lib/resize-service.mjs +0 -23
- package/websql/lib/base-component.d.ts +0 -18
- package/websql/lib/base-formly-component.d.ts +0 -32
- package/websql/lib/condition-wait.d.ts +0 -9
- package/websql/lib/constants.d.ts +0 -8
- package/websql/lib/dual-component-ctrl.d.ts +0 -26
- package/websql/lib/firedev-models.d.ts +0 -14
- package/websql/lib/helpers-console-gui.d.ts +0 -7
- package/websql/lib/helpers-environment.d.ts +0 -6
- package/websql/lib/long-press.directive.d.ts +0 -26
- package/websql/lib/resize-service.d.ts +0 -10
- /package/lib/{helpers-console-gui.d.ts → for-backend/helpers-console-gui.d.ts} +0 -0
- /package/lib/{helpers-network.backend.d.ts → for-backend/helpers-network.backend.d.ts} +0 -0
- /package/lib/{helpers-network.backend.js → for-backend/helpers-network.backend.js} +0 -0
- /package/lib/{helpers-npm.backend.d.ts → for-backend/helpers-npm.backend.d.ts} +0 -0
- /package/lib/{helpers-npm.backend.js → for-backend/helpers-npm.backend.js} +0 -0
- /package/lib/{helpers-path.backend.d.ts → for-backend/helpers-path.backend.d.ts} +0 -0
- /package/lib/{helpers-process.backend.d.ts → for-backend/helpers-process.backend.d.ts} +0 -0
- /package/lib/{helpers-system-terminal.backend.d.ts → for-backend/helpers-system-terminal.backend.d.ts} +0 -0
- /package/lib/{ts-code → for-backend/ts-code}/index.d.ts +0 -0
- /package/lib/{ts-code → for-backend/ts-code}/index.js +0 -0
- /package/lib/{ts-code → for-backend/ts-code}/ts-code-extractor.d.ts +0 -0
- /package/lib/{ts-code → for-backend/ts-code}/ts-code-modifier.backend.d.ts +0 -0
|
@@ -1,14 +1,134 @@
|
|
|
1
1
|
import { _, CoreHelpers } from 'tnp-core/browser';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
2
3
|
import * as fuzzy from 'fuzzy';
|
|
4
|
+
import axios from 'axios';
|
|
3
5
|
import { CLASS } from 'typescript-class-helpers/browser';
|
|
4
6
|
import { Morphi } from 'morphi/browser';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
|
|
8
|
+
var ValidatorsGit;
|
|
9
|
+
(function (ValidatorsGit) {
|
|
10
|
+
function isValidRepoUrl(url) {
|
|
11
|
+
const regex = /^([A-Za-z0-9]+@|http(|s)\:\/\/)([A-Za-z0-9.]+(:\d+)?)(?::|\/)([\d\/\w.-]+?)(\.git)?$/;
|
|
12
|
+
const res = regex.test(url);
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
ValidatorsGit.isValidRepoUrl = isValidRepoUrl;
|
|
16
|
+
})(ValidatorsGit || (ValidatorsGit = {}));
|
|
17
|
+
;
|
|
18
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/validators/validators-git.ts
|
|
19
|
+
|
|
20
|
+
var ValidatorsNetwork;
|
|
21
|
+
(function (ValidatorsNetwork) {
|
|
22
|
+
function isValidIp(ip) {
|
|
23
|
+
if (!_.isString(ip)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
ip = ip.trim();
|
|
27
|
+
if (ip === 'localhost') {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ip);
|
|
31
|
+
}
|
|
32
|
+
ValidatorsNetwork.isValidIp = isValidIp;
|
|
33
|
+
})(ValidatorsNetwork || (ValidatorsNetwork = {}));
|
|
34
|
+
;
|
|
35
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/validators/validators-network.ts
|
|
36
|
+
|
|
37
|
+
var Validators;
|
|
38
|
+
(function (Validators) {
|
|
39
|
+
Validators.git = ValidatorsGit;
|
|
40
|
+
Validators.network = ValidatorsNetwork;
|
|
41
|
+
})(Validators || (Validators = {}));
|
|
42
|
+
;
|
|
43
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/validators/validators.ts
|
|
44
|
+
|
|
45
|
+
const componentContextSymbol = Symbol();
|
|
46
|
+
const componentsDestroy$Subjects = {};
|
|
47
|
+
var HelpersAngular;
|
|
48
|
+
(function (HelpersAngular) {
|
|
49
|
+
class SerializedSubject {
|
|
50
|
+
constructor(id) {
|
|
51
|
+
this.id = id;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
HelpersAngular.SerializedSubject = SerializedSubject;
|
|
55
|
+
function subjectId(destroySubject) {
|
|
56
|
+
const id = Math.random().toString(36).substring(2);
|
|
57
|
+
if (!destroySubject[componentContextSymbol]) {
|
|
58
|
+
destroySubject[componentContextSymbol] = new SerializedSubject(id);
|
|
59
|
+
componentsDestroy$Subjects[id] = destroySubject;
|
|
60
|
+
}
|
|
61
|
+
return destroySubject[componentContextSymbol];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
65
|
+
*/
|
|
66
|
+
function serialize(destroy$) {
|
|
67
|
+
return subjectId(destroy$);
|
|
68
|
+
}
|
|
69
|
+
HelpersAngular.serialize = serialize;
|
|
70
|
+
/**
|
|
71
|
+
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
72
|
+
*/
|
|
73
|
+
function deserialize(destroy$) {
|
|
74
|
+
if (destroy$?.id) {
|
|
75
|
+
const realDestroySubject = componentsDestroy$Subjects[destroy$.id];
|
|
76
|
+
return realDestroySubject;
|
|
77
|
+
}
|
|
78
|
+
return new Subject();
|
|
79
|
+
}
|
|
80
|
+
HelpersAngular.deserialize = deserialize;
|
|
81
|
+
function unsubscribe(destroy$) {
|
|
82
|
+
const destroySubject = subjectId(destroy$);
|
|
83
|
+
if (destroySubject?.id) {
|
|
84
|
+
delete componentsDestroy$Subjects[destroySubject.id];
|
|
85
|
+
delete destroySubject[componentContextSymbol];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
HelpersAngular.unsubscribe = unsubscribe;
|
|
89
|
+
/**
|
|
90
|
+
get properties from scss file
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
import styles from './tasks-ngrx-data.component.scss';
|
|
94
|
+
|
|
95
|
+
export class ExampleComponent {
|
|
96
|
+
sassFile = sassFile(styles);
|
|
97
|
+
|
|
98
|
+
async ngOnInit() {
|
|
99
|
+
this.tasksService.getAll();
|
|
100
|
+
console.log(this.sassFile.stringValue('--max-container-size'))
|
|
101
|
+
console.log(this.sassFile.numberValue('--max-container-size'))
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
*/
|
|
105
|
+
function sassFile(styles) {
|
|
106
|
+
const lines = (styles.split('\n'));
|
|
107
|
+
return {
|
|
108
|
+
stringValue: (name) => {
|
|
109
|
+
for (let index = 0; index < lines.length; index++) {
|
|
110
|
+
const l = lines[index];
|
|
111
|
+
const [varName, value] = l.trim().split(':');
|
|
112
|
+
if (varName === name) {
|
|
113
|
+
return value.replace(';', '');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
numberValue: (name) => {
|
|
118
|
+
for (let index = 0; index < lines.length; index++) {
|
|
119
|
+
const l = lines[index];
|
|
120
|
+
const [varName, value] = l.trim().split(':');
|
|
121
|
+
if (varName === name) {
|
|
122
|
+
return Number(value.replace('px', '').replace(';', ''));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
HelpersAngular.sassFile = sassFile;
|
|
129
|
+
})(HelpersAngular || (HelpersAngular = {}));
|
|
130
|
+
;
|
|
131
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/for-browser/angular.helper.ts
|
|
12
132
|
|
|
13
133
|
class HelpersArrayObj {
|
|
14
134
|
from(s) {
|
|
@@ -60,10 +180,10 @@ class HelpersArrayObj {
|
|
|
60
180
|
}
|
|
61
181
|
sortKeys(obj) {
|
|
62
182
|
if (_.isArray(obj)) {
|
|
63
|
-
return obj.map(
|
|
183
|
+
return obj.map(this.sortKeys);
|
|
64
184
|
}
|
|
65
185
|
if (_.isObject(obj)) {
|
|
66
|
-
return _.fromPairs(_.keys(obj).sort().map(key => [key,
|
|
186
|
+
return _.fromPairs(_.keys(obj).sort().map(key => [key, this.sortKeys(obj[key])]));
|
|
67
187
|
}
|
|
68
188
|
return obj;
|
|
69
189
|
}
|
|
@@ -140,38 +260,6 @@ class HelpersStringsRegexes {
|
|
|
140
260
|
;
|
|
141
261
|
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-strings-regexes.ts
|
|
142
262
|
|
|
143
|
-
/* */
|
|
144
|
-
/* */
|
|
145
|
-
/* */
|
|
146
|
-
/* */
|
|
147
|
-
class HelpersEnvironment {
|
|
148
|
-
environmentName(filename, local_env_name) {
|
|
149
|
-
/* */
|
|
150
|
-
/* */
|
|
151
|
-
/* */
|
|
152
|
-
/* */
|
|
153
|
-
/* */
|
|
154
|
-
/* */
|
|
155
|
-
}
|
|
156
|
-
isValidGitRepuUrl(url) {
|
|
157
|
-
const regex = /^([A-Za-z0-9]+@|http(|s)\:\/\/)([A-Za-z0-9.]+(:\d+)?)(?::|\/)([\d\/\w.-]+?)(\.git)?$/;
|
|
158
|
-
const res = regex.test(url);
|
|
159
|
-
return res;
|
|
160
|
-
}
|
|
161
|
-
isValidIp(ip) {
|
|
162
|
-
if (!_.isString(ip)) {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
ip = ip.trim();
|
|
166
|
-
if (ip === 'localhost') {
|
|
167
|
-
return true;
|
|
168
|
-
}
|
|
169
|
-
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ip);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
;
|
|
173
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-environment.ts
|
|
174
|
-
|
|
175
263
|
class HelpersStrings {
|
|
176
264
|
/**
|
|
177
265
|
* Example:
|
|
@@ -188,14 +276,14 @@ class HelpersStrings {
|
|
|
188
276
|
*/
|
|
189
277
|
interpolateString(value) {
|
|
190
278
|
if (typeof value !== 'string') {
|
|
191
|
-
Helpers.warn('[
|
|
279
|
+
Helpers.warn('[firedev-heleprs] Value for interpolation is not string: ', value);
|
|
192
280
|
return value;
|
|
193
281
|
}
|
|
194
282
|
return {
|
|
195
283
|
withParameters(parameters) {
|
|
196
284
|
if (typeof parameters !== 'object') {
|
|
197
285
|
Helpers.log(parameters);
|
|
198
|
-
Helpers.warn('[
|
|
286
|
+
Helpers.warn('[firedev-heleprs] Parameters are not a object: ');
|
|
199
287
|
return value;
|
|
200
288
|
}
|
|
201
289
|
return value.replace(/{([^{}]*)}/g, function (a, b) {
|
|
@@ -205,6 +293,11 @@ class HelpersStrings {
|
|
|
205
293
|
}
|
|
206
294
|
};
|
|
207
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
*
|
|
298
|
+
* @param pixelsCss exmaple: 100px
|
|
299
|
+
* @returns number value
|
|
300
|
+
*/
|
|
208
301
|
numValue(pixelsCss) {
|
|
209
302
|
return parseInt(pixelsCss.replace('px', ''));
|
|
210
303
|
}
|
|
@@ -423,62 +516,104 @@ class HelpersStrings {
|
|
|
423
516
|
;
|
|
424
517
|
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-strings.ts
|
|
425
518
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
519
|
+
/* */
|
|
520
|
+
/* */
|
|
521
|
+
/* */
|
|
522
|
+
/**
|
|
523
|
+
* Blob -> in file transmission storage
|
|
524
|
+
* base64(Blob) -> in file transmission storage (slow)
|
|
525
|
+
* File -> on browser side for easy manipulation, download link
|
|
526
|
+
*/
|
|
527
|
+
class HelpersBinary {
|
|
528
|
+
arrayBufferToBlob(buffer, contentType) {
|
|
529
|
+
return new Blob([buffer], { type: contentType });
|
|
530
|
+
}
|
|
531
|
+
blobToArrayBuffer(blob) {
|
|
532
|
+
return new Promise((resolve, reject) => {
|
|
533
|
+
const reader = new FileReader();
|
|
534
|
+
reader.addEventListener('loadend', () => {
|
|
535
|
+
resolve(reader.result);
|
|
536
|
+
});
|
|
537
|
+
reader.addEventListener('error', reject); // @ts-ignore
|
|
538
|
+
reader.readAsArrayBuffer(blob);
|
|
539
|
+
});
|
|
431
540
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
if (resultTrue) {
|
|
455
|
-
setTimeout(async () => {
|
|
456
|
-
await waitFor(arr).then(() => {
|
|
457
|
-
resolve(void 0);
|
|
458
|
-
});
|
|
459
|
-
}, timeoutNext);
|
|
541
|
+
/**
|
|
542
|
+
* it is revers to base64toBlob
|
|
543
|
+
* @param blob
|
|
544
|
+
* @returns
|
|
545
|
+
*/
|
|
546
|
+
blobToBase64(blob) {
|
|
547
|
+
return new Promise((resolve, _) => {
|
|
548
|
+
const reader = new FileReader();
|
|
549
|
+
reader.onloadend = () => resolve(reader.result); // @ts-ignore
|
|
550
|
+
reader.readAsDataURL(blob);
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* it is revers to blobToBase64()
|
|
555
|
+
* @param base64Data
|
|
556
|
+
* @returns
|
|
557
|
+
*/
|
|
558
|
+
base64toBlob(base64Data, contentTypeOverride) {
|
|
559
|
+
if (!contentTypeOverride) {
|
|
560
|
+
const m = /^data:(.+?);base64,(.+)$/.exec(base64Data);
|
|
561
|
+
if (!m) {
|
|
562
|
+
throw new Error(`[firedev-framework][base64toBlob] Not a base64 blob [${base64Data}]`);
|
|
460
563
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
564
|
+
var [__, content_type, file_base64] = m;
|
|
565
|
+
}
|
|
566
|
+
content_type = (contentTypeOverride ? contentTypeOverride : content_type || '');
|
|
567
|
+
base64Data = contentTypeOverride ? base64Data : file_base64;
|
|
568
|
+
const sliceSize = 1024;
|
|
569
|
+
const byteCharacters = atob(base64Data);
|
|
570
|
+
const bytesLength = byteCharacters.length;
|
|
571
|
+
const slicesCount = Math.ceil(bytesLength / sliceSize);
|
|
572
|
+
const byteArrays = new Array(slicesCount);
|
|
573
|
+
for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
|
|
574
|
+
const begin = sliceIndex * sliceSize;
|
|
575
|
+
const end = Math.min(begin + sliceSize, bytesLength);
|
|
576
|
+
const bytes = new Array(end - begin);
|
|
577
|
+
for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
|
|
578
|
+
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
|
473
579
|
}
|
|
580
|
+
byteArrays[sliceIndex] = new Uint8Array(bytes);
|
|
474
581
|
}
|
|
475
|
-
|
|
582
|
+
return new Blob(byteArrays, { type: content_type });
|
|
583
|
+
}
|
|
584
|
+
async fileToBlob(file) {
|
|
585
|
+
return new Blob([new Uint8Array(await file.arrayBuffer())], { type: file.type });
|
|
586
|
+
}
|
|
587
|
+
;
|
|
588
|
+
async blobToFile(blob, nameForFile = 'my-file-name') {
|
|
589
|
+
if (!nameForFile) {
|
|
590
|
+
nameForFile = nameForFile + (new Date()).getTime();
|
|
591
|
+
// @ts-ignore
|
|
592
|
+
return new File([blob], nameForFile);
|
|
593
|
+
}
|
|
594
|
+
;
|
|
595
|
+
}
|
|
596
|
+
async getBlobFrom(url) {
|
|
597
|
+
const response = await axios({
|
|
598
|
+
url,
|
|
599
|
+
method: 'get',
|
|
600
|
+
responseType: 'blob'
|
|
601
|
+
});
|
|
602
|
+
return response.data;
|
|
603
|
+
}
|
|
604
|
+
numValue(pixelsCss) {
|
|
605
|
+
return parseInt(pixelsCss.replace('px', ''));
|
|
606
|
+
}
|
|
476
607
|
}
|
|
477
608
|
;
|
|
478
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/
|
|
609
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-binary.ts
|
|
479
610
|
|
|
480
611
|
class HelpersNumber {
|
|
481
612
|
constructor() {
|
|
613
|
+
/**
|
|
614
|
+
* @deprecated
|
|
615
|
+
* use _.random()
|
|
616
|
+
*/
|
|
482
617
|
this.randomInteger = (max, min) => Math.round(Math.random() * (max - min)) + min;
|
|
483
618
|
}
|
|
484
619
|
}
|
|
@@ -486,7 +621,7 @@ class HelpersNumber {
|
|
|
486
621
|
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-numbers.ts
|
|
487
622
|
|
|
488
623
|
const key = Symbol('[firedev-helpers] helper browser key');
|
|
489
|
-
class
|
|
624
|
+
class HelpersBrowser {
|
|
490
625
|
static { this.callbacks = []; }
|
|
491
626
|
static onInit(callback) {
|
|
492
627
|
this.callbacks.push(callback);
|
|
@@ -502,9 +637,9 @@ class HelpersBrowaser {
|
|
|
502
637
|
this.init = (() => {
|
|
503
638
|
const win = this.win;
|
|
504
639
|
if (!win[key]) {
|
|
505
|
-
win[key] = new
|
|
640
|
+
win[key] = new HelpersBrowser(win);
|
|
506
641
|
}
|
|
507
|
-
|
|
642
|
+
HelpersBrowser.inst = win[key];
|
|
508
643
|
})();
|
|
509
644
|
win.addEventListener("beforeunload", (e) => {
|
|
510
645
|
win.sessionStorage.tabId = this.tabId;
|
|
@@ -520,105 +655,32 @@ class HelpersBrowaser {
|
|
|
520
655
|
// @ts-ignore
|
|
521
656
|
this.tabId = Math.floor(Math.random() * 1000000) + (new Date()).getTime();
|
|
522
657
|
}
|
|
523
|
-
|
|
658
|
+
HelpersBrowser.callbacks.forEach((c) => {
|
|
524
659
|
c(this);
|
|
525
660
|
});
|
|
526
661
|
});
|
|
527
662
|
}
|
|
528
663
|
static get instance() {
|
|
529
|
-
return
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
;
|
|
533
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-browser.ts
|
|
534
|
-
|
|
535
|
-
const componentContextSymbol = Symbol();
|
|
536
|
-
const componentsDestroy$Subjects = {};
|
|
537
|
-
class SerializedSubject {
|
|
538
|
-
constructor(id) {
|
|
539
|
-
this.id = id;
|
|
664
|
+
return HelpersBrowser.inst;
|
|
540
665
|
}
|
|
541
666
|
}
|
|
542
|
-
var NgHelpers;
|
|
543
|
-
(function (NgHelpers) {
|
|
544
|
-
function subjectId(destroySubject) {
|
|
545
|
-
const id = Math.random().toString(36).substring(2);
|
|
546
|
-
if (!destroySubject[componentContextSymbol]) {
|
|
547
|
-
destroySubject[componentContextSymbol] = new SerializedSubject(id);
|
|
548
|
-
componentsDestroy$Subjects[id] = destroySubject;
|
|
549
|
-
}
|
|
550
|
-
return destroySubject[componentContextSymbol];
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
554
|
-
*/
|
|
555
|
-
function serialize(destroy$) {
|
|
556
|
-
return subjectId(destroy$);
|
|
557
|
-
}
|
|
558
|
-
NgHelpers.serialize = serialize;
|
|
559
|
-
/**
|
|
560
|
-
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
561
|
-
*/
|
|
562
|
-
function deserialize(destroy$) {
|
|
563
|
-
if (destroy$?.id) {
|
|
564
|
-
const realDestroySubject = componentsDestroy$Subjects[destroy$.id];
|
|
565
|
-
return realDestroySubject;
|
|
566
|
-
}
|
|
567
|
-
return new Subject();
|
|
568
|
-
}
|
|
569
|
-
NgHelpers.deserialize = deserialize;
|
|
570
|
-
function unsubscribe(destroy$) {
|
|
571
|
-
const destroySubject = subjectId(destroy$);
|
|
572
|
-
if (destroySubject?.id) {
|
|
573
|
-
delete componentsDestroy$Subjects[destroySubject.id];
|
|
574
|
-
delete destroySubject[componentContextSymbol];
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
NgHelpers.unsubscribe = unsubscribe;
|
|
578
|
-
/**
|
|
579
|
-
get properties from scss file
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
import styles from './tasks-ngrx-data.component.scss';
|
|
583
|
-
|
|
584
|
-
export class ExampleComponent {
|
|
585
|
-
sassFile = sassFile(styles);
|
|
586
|
-
|
|
587
|
-
async ngOnInit() {
|
|
588
|
-
this.tasksService.getAll();
|
|
589
|
-
console.log(this.sassFile.stringValue('--max-container-size'))
|
|
590
|
-
console.log(this.sassFile.numberValue('--max-container-size'))
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
*/
|
|
594
|
-
function sassFile(styles) {
|
|
595
|
-
const lines = (styles.split('\n'));
|
|
596
|
-
return {
|
|
597
|
-
stringValue: (name) => {
|
|
598
|
-
for (let index = 0; index < lines.length; index++) {
|
|
599
|
-
const l = lines[index];
|
|
600
|
-
const [varName, value] = l.trim().split(':');
|
|
601
|
-
if (varName === name) {
|
|
602
|
-
return value.replace(';', '');
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
numberValue: (name) => {
|
|
607
|
-
for (let index = 0; index < lines.length; index++) {
|
|
608
|
-
const l = lines[index];
|
|
609
|
-
const [varName, value] = l.trim().split(':');
|
|
610
|
-
if (varName === name) {
|
|
611
|
-
return Number(value.replace('px', '').replace(';', ''));
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
NgHelpers.sassFile = sassFile;
|
|
618
|
-
})(NgHelpers || (NgHelpers = {}));
|
|
619
667
|
;
|
|
620
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/
|
|
668
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/for-browser/helpers-browser.ts
|
|
621
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Mixing for multiclass inheritance
|
|
672
|
+
*
|
|
673
|
+
* How to use It:
|
|
674
|
+
*
|
|
675
|
+
* class Wolverine {}
|
|
676
|
+
* class Jean {}
|
|
677
|
+
* export class Child {}
|
|
678
|
+
* export interface MyChild implements Wolverine, Jean {}
|
|
679
|
+
* applyMixing(Child,[Wolverine, Jean]);
|
|
680
|
+
*
|
|
681
|
+
* @param derivedCtor Target Class
|
|
682
|
+
* @param baseCtors Base Classes
|
|
683
|
+
*/
|
|
622
684
|
function applyMixins(derivedCtor, baseCtors) {
|
|
623
685
|
baseCtors.forEach(baseCtor => {
|
|
624
686
|
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
@@ -627,12 +689,12 @@ function applyMixins(derivedCtor, baseCtors) {
|
|
|
627
689
|
});
|
|
628
690
|
}
|
|
629
691
|
// @ts-ignore
|
|
630
|
-
class
|
|
692
|
+
class HelpersFiredev extends CoreHelpers {
|
|
631
693
|
static get Instance() {
|
|
632
|
-
if (!
|
|
633
|
-
|
|
694
|
+
if (!HelpersFiredev._instance) {
|
|
695
|
+
HelpersFiredev._instance = new HelpersFiredev();
|
|
634
696
|
}
|
|
635
|
-
return
|
|
697
|
+
return HelpersFiredev._instance;
|
|
636
698
|
}
|
|
637
699
|
constructor(
|
|
638
700
|
/* */
|
|
@@ -648,15 +710,14 @@ class HelpersTnp extends CoreHelpers {
|
|
|
648
710
|
/* */
|
|
649
711
|
/* */
|
|
650
712
|
/* */
|
|
651
|
-
arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(),
|
|
713
|
+
arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(), binary = new HelpersBinary(), browser = HelpersBrowser.instance, ng = HelpersAngular) {
|
|
652
714
|
super();
|
|
653
715
|
this.arrays = arrays;
|
|
654
716
|
this.strings = strings;
|
|
655
717
|
this.numbers = numbers;
|
|
656
|
-
this.
|
|
718
|
+
this.binary = binary;
|
|
657
719
|
this.browser = browser;
|
|
658
720
|
this.ng = ng;
|
|
659
|
-
this.conditionWait = conditionWait;
|
|
660
721
|
/* */
|
|
661
722
|
/* */
|
|
662
723
|
/* */
|
|
@@ -736,6 +797,8 @@ class HelpersTnp extends CoreHelpers {
|
|
|
736
797
|
/* */
|
|
737
798
|
/* */
|
|
738
799
|
this.applyMixins = applyMixins;
|
|
800
|
+
this.isValidIp = Validators.network.isValidIp;
|
|
801
|
+
this.isValidGitRepuUrl = Validators.git.isValidRepoUrl;
|
|
739
802
|
}
|
|
740
803
|
CLIWRAP(f, name) {
|
|
741
804
|
CLASS.setName(f, name);
|
|
@@ -881,9 +944,8 @@ class HelpersTnp extends CoreHelpers {
|
|
|
881
944
|
});
|
|
882
945
|
}
|
|
883
946
|
}
|
|
884
|
-
applyMixins(
|
|
947
|
+
applyMixins(HelpersFiredev, [
|
|
885
948
|
HelpersStringsRegexes,
|
|
886
|
-
HelpersEnvironment,
|
|
887
949
|
/* */
|
|
888
950
|
/* */
|
|
889
951
|
/* */
|
|
@@ -891,25 +953,20 @@ applyMixins(HelpersTnp, [
|
|
|
891
953
|
;
|
|
892
954
|
({}); // @--end-of-file-for-module=tnp-helpers lib/helpers.ts
|
|
893
955
|
|
|
894
|
-
const BaselineSiteJoinprefix = '__';
|
|
895
|
-
const PREFIXES = {
|
|
896
|
-
BASELINE: BaselineSiteJoinprefix,
|
|
897
|
-
DELETED: '____DELETED____',
|
|
898
|
-
ORIGINAL: '____ORIGINAL____',
|
|
899
|
-
RESTORE_NPM: '____',
|
|
900
|
-
};
|
|
901
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/constants.ts
|
|
902
|
-
|
|
903
956
|
/* */
|
|
904
957
|
/* */
|
|
905
958
|
/* */
|
|
906
959
|
/* */
|
|
907
960
|
/* */
|
|
908
|
-
|
|
961
|
+
/* */
|
|
962
|
+
const Helpers$2 = HelpersFiredev.Instance;
|
|
963
|
+
/**
|
|
964
|
+
* @deprecated
|
|
965
|
+
*
|
|
966
|
+
* use BaseProject instead
|
|
967
|
+
*/
|
|
909
968
|
class Project {
|
|
910
969
|
constructor() {
|
|
911
|
-
/* */
|
|
912
|
-
/* */
|
|
913
970
|
this.cache = {};
|
|
914
971
|
this.browser = {};
|
|
915
972
|
}
|
|
@@ -1170,7 +1227,7 @@ class Project {
|
|
|
1170
1227
|
}
|
|
1171
1228
|
}
|
|
1172
1229
|
static get isBundleMode() {
|
|
1173
|
-
if (Helpers$
|
|
1230
|
+
if (Helpers$2.isBrowser) {
|
|
1174
1231
|
return true;
|
|
1175
1232
|
}
|
|
1176
1233
|
/* */
|
|
@@ -1306,423 +1363,323 @@ class Project {
|
|
|
1306
1363
|
/* */
|
|
1307
1364
|
/* */
|
|
1308
1365
|
/* */
|
|
1366
|
+
;
|
|
1367
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/project.ts
|
|
1368
|
+
|
|
1309
1369
|
/* */
|
|
1310
1370
|
/* */
|
|
1311
1371
|
/* */
|
|
1312
1372
|
/* */
|
|
1313
1373
|
/* */
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
/* */
|
|
1323
|
-
/* */
|
|
1324
|
-
/* */
|
|
1325
|
-
/* */
|
|
1326
|
-
/* */
|
|
1327
|
-
/* */
|
|
1328
|
-
/* */
|
|
1329
|
-
;
|
|
1330
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/project.ts
|
|
1331
|
-
|
|
1332
|
-
;
|
|
1333
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/firedev-models.ts
|
|
1334
|
-
|
|
1335
|
-
class BaseComponent {
|
|
1336
|
-
constructor() {
|
|
1337
|
-
// @ts-ignore
|
|
1338
|
-
this.model = {};
|
|
1339
|
-
this.handlers = [];
|
|
1340
|
-
}
|
|
1341
|
-
ngOnDestroy() {
|
|
1342
|
-
this.handlers.forEach(h => h.unsubscribe());
|
|
1343
|
-
this.handlers.length = 0;
|
|
1344
|
-
}
|
|
1345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: BaseComponent, selector: "app-base-component-meta", inputs: { model: "model" }, ngImport: i0, template: '<div></div>', isInline: true }); }
|
|
1347
|
-
}
|
|
1348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: BaseComponent, decorators: [{
|
|
1349
|
-
type: Component,
|
|
1350
|
-
args: [{
|
|
1351
|
-
selector: 'app-base-component-meta',
|
|
1352
|
-
template: '<div></div>'
|
|
1353
|
-
}]
|
|
1354
|
-
}], propDecorators: { model: [{
|
|
1355
|
-
type: Input
|
|
1356
|
-
}] } });
|
|
1357
|
-
const isCalledNgInitAfterInternalRefresh = Symbol();
|
|
1358
|
-
class BaseComponentForRouter extends BaseComponent {
|
|
1359
|
-
constructor(__router) {
|
|
1360
|
-
super();
|
|
1361
|
-
this.__router = __router;
|
|
1362
|
-
this[isCalledNgInitAfterInternalRefresh] = false;
|
|
1363
|
-
}
|
|
1364
|
-
isCalledNgInitAfterInternalRefresh() {
|
|
1365
|
-
return !!this[isCalledNgInitAfterInternalRefresh];
|
|
1366
|
-
}
|
|
1367
|
-
reloadNgOninitOnUrlChange() {
|
|
1368
|
-
this.handlers.push(this.__router.events.subscribe(event => {
|
|
1369
|
-
if (event instanceof NavigationEnd && this['ngOnInit']) {
|
|
1370
|
-
this[isCalledNgInitAfterInternalRefresh] = true;
|
|
1371
|
-
this['ngOnInit']();
|
|
1372
|
-
if (this[isCalledNgInitAfterInternalRefresh]) {
|
|
1373
|
-
this[isCalledNgInitAfterInternalRefresh] = false;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
}));
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
;
|
|
1380
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/base-component.ts
|
|
1381
|
-
|
|
1382
|
-
const log$2 = Log.create(`DualComponentController`);
|
|
1383
|
-
class DualComponentController {
|
|
1384
|
-
constructor(cmp, isFormlyMode = false) {
|
|
1385
|
-
this.cmp = cmp;
|
|
1386
|
-
this.isFormlyMode = isFormlyMode;
|
|
1387
|
-
}
|
|
1388
|
-
getValTemplateOptions(propertyName) {
|
|
1389
|
-
if (this.isFormlyMode) {
|
|
1390
|
-
const res = this.cmp.field?.templateOptions[propertyName];
|
|
1391
|
-
if (res === void 0 && this.cmp[propertyName]) {
|
|
1392
|
-
return this.cmp[propertyName];
|
|
1393
|
-
}
|
|
1394
|
-
return res;
|
|
1395
|
-
}
|
|
1396
|
-
return this.cmp[propertyName];
|
|
1397
|
-
}
|
|
1398
|
-
getValContext(propertyName) {
|
|
1399
|
-
if (this.isFormlyMode) {
|
|
1400
|
-
const res = this.cmp?.field[propertyName];
|
|
1401
|
-
if (res === void 0 && this.cmp[propertyName]) {
|
|
1402
|
-
return this.cmp[propertyName];
|
|
1403
|
-
}
|
|
1404
|
-
return res;
|
|
1405
|
-
}
|
|
1406
|
-
return this.cmp[propertyName];
|
|
1407
|
-
}
|
|
1408
|
-
get disabled() {
|
|
1409
|
-
return this.getValTemplateOptions('disabled');
|
|
1410
|
-
}
|
|
1411
|
-
get required() {
|
|
1412
|
-
return this.getValTemplateOptions('required');
|
|
1413
|
-
}
|
|
1414
|
-
get type() {
|
|
1415
|
-
if (!this.isFormlyMode) {
|
|
1416
|
-
return CLASS.getNameFromObject(this.cmp);
|
|
1417
|
-
}
|
|
1418
|
-
return this.getValContext('type');
|
|
1419
|
-
}
|
|
1420
|
-
get label() {
|
|
1421
|
-
return this.getValTemplateOptions('label');
|
|
1422
|
-
}
|
|
1423
|
-
get placeholder() {
|
|
1424
|
-
return this.getValTemplateOptions('placeholder');
|
|
1425
|
-
}
|
|
1426
|
-
get defaultValue() {
|
|
1427
|
-
return this.getValContext('defaultValue');
|
|
1374
|
+
const Helpers$1 = HelpersFiredev.Instance;
|
|
1375
|
+
const takenPorts = [];
|
|
1376
|
+
class BaseProjectResolver {
|
|
1377
|
+
constructor(classFn) {
|
|
1378
|
+
this.classFn = classFn;
|
|
1379
|
+
this.NPM_PROJECT_KEY = 'npm';
|
|
1380
|
+
this.projects = [];
|
|
1381
|
+
this.emptyLocations = [];
|
|
1428
1382
|
}
|
|
1429
|
-
get
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
return
|
|
1434
|
-
}
|
|
1435
|
-
get path() {
|
|
1436
|
-
return this.getValContext('path');
|
|
1383
|
+
get allowedTypes() {
|
|
1384
|
+
/* */
|
|
1385
|
+
/* */
|
|
1386
|
+
/* */
|
|
1387
|
+
return (void 0);
|
|
1437
1388
|
}
|
|
1438
|
-
get
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1389
|
+
get Current() {
|
|
1390
|
+
/* */
|
|
1391
|
+
/* */
|
|
1392
|
+
/* */
|
|
1393
|
+
/* */
|
|
1394
|
+
/* */
|
|
1395
|
+
/* */
|
|
1396
|
+
/* */
|
|
1397
|
+
/* */
|
|
1398
|
+
/* */
|
|
1399
|
+
/* */
|
|
1400
|
+
/* */
|
|
1401
|
+
return (void 0);
|
|
1445
1402
|
}
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1403
|
+
/**
|
|
1404
|
+
* override this
|
|
1405
|
+
*/
|
|
1406
|
+
typeFrom(location) {
|
|
1407
|
+
/* */
|
|
1408
|
+
/* */
|
|
1409
|
+
/* */
|
|
1410
|
+
/* */
|
|
1411
|
+
/* */
|
|
1412
|
+
return (void 0);
|
|
1453
1413
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1414
|
+
From(locationOfProject) {
|
|
1415
|
+
/* */
|
|
1416
|
+
/* */
|
|
1417
|
+
/* */
|
|
1418
|
+
/* */
|
|
1419
|
+
/* */
|
|
1420
|
+
/* */
|
|
1421
|
+
/* */
|
|
1422
|
+
/* */
|
|
1423
|
+
/* */
|
|
1424
|
+
/* */
|
|
1425
|
+
/* */
|
|
1426
|
+
/* */
|
|
1427
|
+
/* */
|
|
1428
|
+
/* */
|
|
1429
|
+
/* */
|
|
1430
|
+
/* */
|
|
1431
|
+
/* */
|
|
1432
|
+
/* */
|
|
1433
|
+
/* */
|
|
1434
|
+
/* */
|
|
1435
|
+
/* */
|
|
1436
|
+
/* */
|
|
1437
|
+
/* */
|
|
1438
|
+
/* */
|
|
1439
|
+
/* */
|
|
1440
|
+
/* */
|
|
1441
|
+
/* */
|
|
1442
|
+
/* */
|
|
1443
|
+
/* */
|
|
1444
|
+
/* */
|
|
1445
|
+
/* */
|
|
1446
|
+
/* */
|
|
1447
|
+
/* */
|
|
1448
|
+
/* */
|
|
1449
|
+
/* */
|
|
1450
|
+
/* */
|
|
1451
|
+
/* */
|
|
1452
|
+
/* */
|
|
1453
|
+
/* */
|
|
1454
|
+
/* */
|
|
1455
|
+
/* */
|
|
1456
|
+
/* */
|
|
1457
|
+
/* */
|
|
1458
|
+
/* */
|
|
1459
|
+
/* */
|
|
1460
|
+
/* */
|
|
1461
|
+
/* */
|
|
1462
|
+
/* */
|
|
1463
|
+
/* */
|
|
1464
|
+
return (void 0);
|
|
1461
1465
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1466
|
+
nearestTo(absoluteLocation, options) {
|
|
1467
|
+
/* */
|
|
1468
|
+
/* */
|
|
1469
|
+
/* */
|
|
1470
|
+
/* */
|
|
1471
|
+
/* */
|
|
1472
|
+
/* */
|
|
1473
|
+
/* */
|
|
1474
|
+
/* */
|
|
1475
|
+
/* */
|
|
1476
|
+
/* */
|
|
1477
|
+
/* */
|
|
1478
|
+
/* */
|
|
1479
|
+
/* */
|
|
1480
|
+
/* */
|
|
1481
|
+
/* */
|
|
1482
|
+
/* */
|
|
1483
|
+
/* */
|
|
1484
|
+
/* */
|
|
1485
|
+
/* */
|
|
1486
|
+
/* */
|
|
1487
|
+
/* */
|
|
1488
|
+
/* */
|
|
1489
|
+
/* */
|
|
1490
|
+
/* */
|
|
1491
|
+
/* */
|
|
1492
|
+
/* */
|
|
1493
|
+
/* */
|
|
1494
|
+
/* */
|
|
1495
|
+
/* */
|
|
1496
|
+
/* */
|
|
1497
|
+
/* */
|
|
1498
|
+
/* */
|
|
1499
|
+
/* */
|
|
1500
|
+
/* */
|
|
1501
|
+
/* */
|
|
1502
|
+
/* */
|
|
1503
|
+
/* */
|
|
1504
|
+
/* */
|
|
1505
|
+
/* */
|
|
1506
|
+
/* */
|
|
1507
|
+
/* */
|
|
1508
|
+
/* */
|
|
1509
|
+
/* */
|
|
1510
|
+
/* */
|
|
1511
|
+
/* */
|
|
1512
|
+
/* */
|
|
1513
|
+
/* */
|
|
1514
|
+
/* */
|
|
1515
|
+
/* */
|
|
1516
|
+
/* */
|
|
1517
|
+
/* */
|
|
1518
|
+
/* */
|
|
1519
|
+
/* */
|
|
1520
|
+
/* */
|
|
1521
|
+
/* */
|
|
1522
|
+
/* */
|
|
1523
|
+
/* */
|
|
1524
|
+
/* */
|
|
1525
|
+
return (void 0);
|
|
1468
1526
|
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
return this.cmp.field.formControl.value;
|
|
1472
|
-
}
|
|
1473
|
-
if (_.isString(this.path)) {
|
|
1474
|
-
return _.get(this.cmp.model, this.path);
|
|
1475
|
-
}
|
|
1476
|
-
return this.cmp.model;
|
|
1527
|
+
unload(project) {
|
|
1528
|
+
this.projects = this.projects.filter(f => f !== project);
|
|
1477
1529
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1530
|
+
allProjectFrom(absoluteLocation, stopOnCwd = '/') {
|
|
1531
|
+
/* */
|
|
1532
|
+
/* */
|
|
1533
|
+
/* */
|
|
1534
|
+
/* */
|
|
1535
|
+
/* */
|
|
1536
|
+
/* */
|
|
1537
|
+
/* */
|
|
1538
|
+
/* */
|
|
1539
|
+
/* */
|
|
1540
|
+
/* */
|
|
1541
|
+
/* */
|
|
1542
|
+
/* */
|
|
1543
|
+
/* */
|
|
1544
|
+
/* */
|
|
1545
|
+
/* */
|
|
1546
|
+
/* */
|
|
1547
|
+
/* */
|
|
1548
|
+
/* */
|
|
1549
|
+
/* */
|
|
1550
|
+
/* */
|
|
1551
|
+
/* */
|
|
1552
|
+
/* */
|
|
1553
|
+
/* */
|
|
1554
|
+
/* */
|
|
1555
|
+
/* */
|
|
1556
|
+
/* */
|
|
1557
|
+
return (void 0);
|
|
1491
1558
|
}
|
|
1492
1559
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
class BaseFormlyComponent extends FieldType {
|
|
1498
|
-
constructor() {
|
|
1499
|
-
super(...arguments);
|
|
1500
|
-
this.DualComponentController = DualComponentController;
|
|
1501
|
-
this.ctrl = {};
|
|
1502
|
-
this.change = new EventEmitter();
|
|
1503
|
-
// @ts-ignore
|
|
1504
|
-
this.handlers = [];
|
|
1505
|
-
this.__field = {
|
|
1506
|
-
templateOptions: {}
|
|
1507
|
-
};
|
|
1560
|
+
class BaseProject {
|
|
1561
|
+
static { this.ins = new BaseProjectResolver(BaseProject); }
|
|
1562
|
+
get name() {
|
|
1563
|
+
return this.packageJSON?.name;
|
|
1508
1564
|
}
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
return this.ctrl.mode;
|
|
1565
|
+
get version() {
|
|
1566
|
+
return this.packageJSON?.version;
|
|
1512
1567
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1568
|
+
get parent() {
|
|
1569
|
+
/* */
|
|
1570
|
+
/* */
|
|
1571
|
+
return (void 0);
|
|
1516
1572
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1573
|
+
get genericName() {
|
|
1574
|
+
/* */
|
|
1575
|
+
/* */
|
|
1576
|
+
/* */
|
|
1577
|
+
/* */
|
|
1578
|
+
/* */
|
|
1579
|
+
/* */
|
|
1580
|
+
/* */
|
|
1581
|
+
/* */
|
|
1582
|
+
/* */
|
|
1583
|
+
/* */
|
|
1584
|
+
/* */
|
|
1585
|
+
/* */
|
|
1586
|
+
return (void 0);
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* try run but continue when it fails
|
|
1590
|
+
* @param command
|
|
1591
|
+
* @param options
|
|
1592
|
+
* @returns
|
|
1593
|
+
*/
|
|
1594
|
+
tryRunSync(command
|
|
1595
|
+
/* */
|
|
1596
|
+
/* */
|
|
1597
|
+
) {
|
|
1598
|
+
/* */
|
|
1599
|
+
/* */
|
|
1600
|
+
/* */
|
|
1601
|
+
/* */
|
|
1602
|
+
/* */
|
|
1603
|
+
/* */
|
|
1604
|
+
return (void 0);
|
|
1520
1605
|
}
|
|
1521
|
-
|
|
1522
|
-
|
|
1606
|
+
pathFor(relativePath) {
|
|
1607
|
+
/* */
|
|
1608
|
+
/* */
|
|
1609
|
+
/* */
|
|
1610
|
+
/* */
|
|
1611
|
+
/* */
|
|
1612
|
+
return (void 0);
|
|
1523
1613
|
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1614
|
+
writeJson(relativePath, json) {
|
|
1615
|
+
/* */
|
|
1616
|
+
/* */
|
|
1617
|
+
/* */
|
|
1618
|
+
/* */
|
|
1619
|
+
/* */
|
|
1620
|
+
return (void 0);
|
|
1530
1621
|
}
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
ngAfterViewInit() {
|
|
1542
|
-
}
|
|
1543
|
-
ngOnInit() {
|
|
1544
|
-
const isFormlyMode = !!this.field;
|
|
1545
|
-
log$1.i(`isFormlyMode: ${isFormlyMode}`);
|
|
1546
|
-
if (!isFormlyMode) {
|
|
1547
|
-
const that = this;
|
|
1548
|
-
Object.defineProperty(this, 'field', {
|
|
1549
|
-
get: function () {
|
|
1550
|
-
return that.__field;
|
|
1551
|
-
},
|
|
1552
|
-
set: function (v) {
|
|
1553
|
-
that.__field = v;
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
const existed = this.ctrl;
|
|
1558
|
-
this.ctrl = new this.DualComponentController(this, isFormlyMode);
|
|
1559
|
-
// @ts-ignore
|
|
1560
|
-
Object.keys(existed).forEach(key => {
|
|
1561
|
-
this.ctrl[key] = existed[key];
|
|
1562
|
-
});
|
|
1563
|
-
// @ts-ignore
|
|
1564
|
-
this.change.next(this.ctrl.value);
|
|
1622
|
+
run(command
|
|
1623
|
+
/* */
|
|
1624
|
+
/* */
|
|
1625
|
+
) {
|
|
1626
|
+
/* */
|
|
1627
|
+
/* */
|
|
1628
|
+
/* */
|
|
1629
|
+
/* */
|
|
1630
|
+
/* */
|
|
1631
|
+
return (void 0);
|
|
1565
1632
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
template: `<div></div>`
|
|
1574
|
-
}]
|
|
1575
|
-
}], propDecorators: { pizda: [{
|
|
1576
|
-
type: Input
|
|
1577
|
-
}], mode: [{
|
|
1578
|
-
type: Input
|
|
1579
|
-
}], disabled: [{
|
|
1580
|
-
type: Input
|
|
1581
|
-
}], required: [{
|
|
1582
|
-
type: Input
|
|
1583
|
-
}], label: [{
|
|
1584
|
-
type: Input
|
|
1585
|
-
}], placeholder: [{
|
|
1586
|
-
type: Input
|
|
1587
|
-
}], defaultValue: [{
|
|
1588
|
-
type: Input
|
|
1589
|
-
}], model: [{
|
|
1590
|
-
type: Input
|
|
1591
|
-
}], path: [{
|
|
1592
|
-
type: Input
|
|
1593
|
-
}], change: [{
|
|
1594
|
-
type: Output
|
|
1595
|
-
}], key: [{
|
|
1596
|
-
type: Input
|
|
1597
|
-
}] } });
|
|
1598
|
-
;
|
|
1599
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/base-formly-component.ts
|
|
1600
|
-
|
|
1601
|
-
class ResizeService {
|
|
1602
|
-
constructor() {
|
|
1603
|
-
this.resizeDetector = elementResizeDetectorMaker({ strategy: 'scroll' });
|
|
1633
|
+
outputFrom(command
|
|
1634
|
+
/* */
|
|
1635
|
+
/* */
|
|
1636
|
+
) {
|
|
1637
|
+
/* */
|
|
1638
|
+
/* */
|
|
1639
|
+
return (void 0);
|
|
1604
1640
|
}
|
|
1605
|
-
|
|
1606
|
-
|
|
1641
|
+
remove(relativePath, exactPath = true) {
|
|
1642
|
+
/* */
|
|
1643
|
+
/* */
|
|
1644
|
+
return (void 0);
|
|
1607
1645
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1646
|
+
async assignFreePort(startFrom = 4200) {
|
|
1647
|
+
/* */
|
|
1648
|
+
/* */
|
|
1649
|
+
/* */
|
|
1650
|
+
/* */
|
|
1651
|
+
/* */
|
|
1652
|
+
/* */
|
|
1653
|
+
/* */
|
|
1654
|
+
/* */
|
|
1655
|
+
/* */
|
|
1656
|
+
/* */
|
|
1657
|
+
/* */
|
|
1658
|
+
/* */
|
|
1659
|
+
/* */
|
|
1660
|
+
/* */
|
|
1661
|
+
/* */
|
|
1662
|
+
/* */
|
|
1663
|
+
/* */
|
|
1664
|
+
/* */
|
|
1665
|
+
/* */
|
|
1666
|
+
/* */
|
|
1667
|
+
/* */
|
|
1668
|
+
/* */
|
|
1669
|
+
/* */
|
|
1670
|
+
return (void 0);
|
|
1610
1671
|
}
|
|
1611
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1612
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ResizeService }); }
|
|
1613
1672
|
}
|
|
1614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ResizeService, decorators: [{
|
|
1615
|
-
type: Injectable
|
|
1616
|
-
}], ctorParameters: function () { return []; } });
|
|
1617
1673
|
;
|
|
1618
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/
|
|
1674
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/base-project.ts
|
|
1619
1675
|
|
|
1620
|
-
const log = Log.create(`[firedev-helpers] long-press`, Level.__NOTHING);
|
|
1621
|
-
class LongPress {
|
|
1622
|
-
constructor() {
|
|
1623
|
-
this.pressDuration = 1000;
|
|
1624
|
-
this.onLongPress = new EventEmitter();
|
|
1625
|
-
this.onLongPressing = new EventEmitter();
|
|
1626
|
-
this.onLongPressEnd = new EventEmitter();
|
|
1627
|
-
this.mouseX = 0;
|
|
1628
|
-
this.mouseY = 0;
|
|
1629
|
-
this.allowTrigger = false;
|
|
1630
|
-
this.triggerEnd = _.debounce(() => {
|
|
1631
|
-
this.endPress();
|
|
1632
|
-
}, 500);
|
|
1633
|
-
}
|
|
1634
|
-
get press() { return this.pressing; }
|
|
1635
|
-
get longPress() { return this.longPressing; }
|
|
1636
|
-
onMouseDown(event) {
|
|
1637
|
-
log.d(`MOUSE DOWN `);
|
|
1638
|
-
if (event.which !== 1)
|
|
1639
|
-
return;
|
|
1640
|
-
this.allowTrigger = true;
|
|
1641
|
-
this.mouseX = event.clientX;
|
|
1642
|
-
this.mouseY = event.clientY;
|
|
1643
|
-
this.pressing = true;
|
|
1644
|
-
this.longPressing = false;
|
|
1645
|
-
this.timeout = setTimeout(() => {
|
|
1646
|
-
if (this.allowTrigger) {
|
|
1647
|
-
this.longPressing = true;
|
|
1648
|
-
log.d(`long pressing start pressDuration:${this.pressDuration} `);
|
|
1649
|
-
this.onLongPress.emit(event);
|
|
1650
|
-
this.loop(event);
|
|
1651
|
-
}
|
|
1652
|
-
}, this.pressDuration);
|
|
1653
|
-
this.loop(event);
|
|
1654
|
-
}
|
|
1655
|
-
onMouseMove(event) {
|
|
1656
|
-
if (this.pressing && !this.longPressing) {
|
|
1657
|
-
const xThres = (event.clientX - this.mouseX) > 10;
|
|
1658
|
-
const yThres = (event.clientY - this.mouseY) > 10;
|
|
1659
|
-
if (xThres || yThres) {
|
|
1660
|
-
this.endPress();
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
loop(event) {
|
|
1665
|
-
if (this.longPressing) {
|
|
1666
|
-
this.timeout = setTimeout(() => {
|
|
1667
|
-
log.d(`emil longpressing`);
|
|
1668
|
-
this.triggerEnd();
|
|
1669
|
-
this.onLongPressing.emit(event);
|
|
1670
|
-
this.loop(event);
|
|
1671
|
-
}, 50);
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
endPress(emit = true) {
|
|
1675
|
-
this.allowTrigger = false;
|
|
1676
|
-
clearTimeout(this.timeout);
|
|
1677
|
-
this.longPressing = false;
|
|
1678
|
-
this.pressing = false;
|
|
1679
|
-
if (emit) {
|
|
1680
|
-
log.d(`EMIT END`);
|
|
1681
|
-
this.onLongPressEnd.emit(true);
|
|
1682
|
-
}
|
|
1683
|
-
else {
|
|
1684
|
-
log.d(`NOT EMIT END`);
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
onMouseUp() {
|
|
1688
|
-
this.endPress(false);
|
|
1689
|
-
}
|
|
1690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: LongPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1691
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.6", type: LongPress, selector: "[long-press]", inputs: { pressDuration: "pressDuration" }, outputs: { onLongPress: "onLongPress", onLongPressing: "onLongPressing", onLongPressEnd: "onLongPressEnd" }, host: { listeners: { "mousedown": "onMouseDown($event)", "mousemove": "onMouseMove($event)", "mouseup": "onMouseUp()" }, properties: { "class.press": "this.press", "class.longpress": "this.longPress" } }, ngImport: i0 }); }
|
|
1692
|
-
}
|
|
1693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: LongPress, decorators: [{
|
|
1694
|
-
type: Directive,
|
|
1695
|
-
args: [{ selector: '[long-press]' }]
|
|
1696
|
-
}], propDecorators: { pressDuration: [{
|
|
1697
|
-
type: Input
|
|
1698
|
-
}], onLongPress: [{
|
|
1699
|
-
type: Output
|
|
1700
|
-
}], onLongPressing: [{
|
|
1701
|
-
type: Output
|
|
1702
|
-
}], onLongPressEnd: [{
|
|
1703
|
-
type: Output
|
|
1704
|
-
}], press: [{
|
|
1705
|
-
type: HostBinding,
|
|
1706
|
-
args: ['class.press']
|
|
1707
|
-
}], longPress: [{
|
|
1708
|
-
type: HostBinding,
|
|
1709
|
-
args: ['class.longpress']
|
|
1710
|
-
}], onMouseDown: [{
|
|
1711
|
-
type: HostListener,
|
|
1712
|
-
args: ['mousedown', ['$event']]
|
|
1713
|
-
}], onMouseMove: [{
|
|
1714
|
-
type: HostListener,
|
|
1715
|
-
args: ['mousemove', ['$event']]
|
|
1716
|
-
}], onMouseUp: [{
|
|
1717
|
-
type: HostListener,
|
|
1718
|
-
args: ['mouseup']
|
|
1719
|
-
}] } });
|
|
1720
1676
|
;
|
|
1721
|
-
({}); // @--end-of-file-for-module=tnp-helpers lib/
|
|
1677
|
+
({}); // @--end-of-file-for-module=tnp-helpers lib/models.ts
|
|
1722
1678
|
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1679
|
+
/**
|
|
1680
|
+
* Firedev helpers
|
|
1681
|
+
*/
|
|
1682
|
+
const Helpers = HelpersFiredev.Instance;
|
|
1726
1683
|
;
|
|
1727
1684
|
({}); // @--end-of-file-for-module=tnp-helpers lib/index.ts
|
|
1728
1685
|
|
|
@@ -1730,5 +1687,5 @@ const Helpers = HelpersTnp.Instance;
|
|
|
1730
1687
|
* Generated bundle index. Do not edit.
|
|
1731
1688
|
*/
|
|
1732
1689
|
|
|
1733
|
-
export {
|
|
1690
|
+
export { BaseProject, BaseProjectResolver, Helpers, HelpersAngular, Project, Validators };
|
|
1734
1691
|
//# sourceMappingURL=tnp-helpers.mjs.map
|