tnp-helpers 13.1.38 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/{esm2020 → esm2022}/lib/angular.helper.mjs +87 -87
  3. package/browser/esm2022/lib/base-component.mjs +51 -0
  4. package/browser/esm2022/lib/base-formly-component.mjs +114 -0
  5. package/{client/esm2020 → browser/esm2022}/lib/condition-wait.mjs +45 -45
  6. package/browser/{esm2020 → esm2022}/lib/constants.mjs +8 -8
  7. package/{client/esm2020 → browser/esm2022}/lib/dual-component-ctrl.mjs +118 -118
  8. package/{client/esm2020 → browser/esm2022}/lib/firedev-models.mjs +3 -3
  9. package/{client/esm2020 → browser/esm2022}/lib/helpers-array-obj.mjs +82 -82
  10. package/browser/esm2022/lib/helpers-browser.mjs +48 -0
  11. package/{client/esm2020 → browser/esm2022}/lib/helpers-console-gui.mjs +9 -9
  12. package/{client/esm2020 → browser/esm2022}/lib/helpers-environment.mjs +32 -32
  13. package/{client/esm2020 → browser/esm2022}/lib/helpers-numbers.mjs +7 -7
  14. package/{client/esm2020 → browser/esm2022}/lib/helpers-strings-regexes.mjs +50 -50
  15. package/browser/{esm2020 → esm2022}/lib/helpers-strings.mjs +252 -252
  16. package/browser/esm2022/lib/helpers.mjs +286 -0
  17. package/browser/{esm2020 → esm2022}/lib/index.mjs +15 -15
  18. package/{websql/esm2020 → browser/esm2022}/lib/long-press.directive.mjs +114 -113
  19. package/browser/esm2022/lib/project.mjs +431 -0
  20. package/browser/esm2022/lib/resize-service.mjs +23 -0
  21. package/browser/{esm2020 → esm2022}/public-api.mjs +1 -1
  22. package/browser/{esm2020 → esm2022}/tnp-helpers.mjs +4 -4
  23. package/{client/fesm2020 → browser/fesm2022}/tnp-helpers.mjs +1680 -1676
  24. package/{client/fesm2020 → browser/fesm2022}/tnp-helpers.mjs.map +1 -1
  25. package/browser/{tnp-helpers.d.ts → index.d.ts} +4 -4
  26. package/browser/lib/angular.helper.d.ts +35 -35
  27. package/browser/lib/base-component.d.ts +16 -16
  28. package/browser/lib/base-formly-component.d.ts +30 -30
  29. package/browser/lib/condition-wait.d.ts +7 -7
  30. package/browser/lib/constants.d.ts +6 -6
  31. package/browser/lib/dual-component-ctrl.d.ts +24 -24
  32. package/browser/lib/firedev-models.d.ts +12 -12
  33. package/browser/lib/helpers-array-obj.d.ts +14 -14
  34. package/browser/lib/helpers-browser.d.ts +10 -10
  35. package/browser/lib/helpers-console-gui.d.ts +5 -5
  36. package/browser/lib/helpers-environment.d.ts +4 -4
  37. package/browser/lib/helpers-numbers.d.ts +2 -2
  38. package/browser/lib/helpers-strings-regexes.d.ts +27 -27
  39. package/browser/lib/helpers-strings.d.ts +49 -49
  40. package/browser/lib/helpers.d.ts +33 -33
  41. package/browser/lib/index.d.ts +11 -11
  42. package/browser/lib/long-press.directive.d.ts +24 -24
  43. package/browser/lib/project.d.ts +93 -93
  44. package/browser/lib/resize-service.d.ts +8 -8
  45. package/browser/package.json +6 -12
  46. package/client/{esm2020 → esm2022}/lib/angular.helper.mjs +87 -87
  47. package/client/esm2022/lib/base-component.mjs +51 -0
  48. package/client/esm2022/lib/base-formly-component.mjs +114 -0
  49. package/{browser/esm2020 → client/esm2022}/lib/condition-wait.mjs +45 -45
  50. package/client/{esm2020 → esm2022}/lib/constants.mjs +8 -8
  51. package/{browser/esm2020 → client/esm2022}/lib/dual-component-ctrl.mjs +118 -118
  52. package/{browser/esm2020 → client/esm2022}/lib/firedev-models.mjs +3 -3
  53. package/{browser/esm2020 → client/esm2022}/lib/helpers-array-obj.mjs +82 -82
  54. package/client/esm2022/lib/helpers-browser.mjs +48 -0
  55. package/{browser/esm2020 → client/esm2022}/lib/helpers-console-gui.mjs +9 -9
  56. package/{browser/esm2020 → client/esm2022}/lib/helpers-environment.mjs +32 -32
  57. package/{browser/esm2020 → client/esm2022}/lib/helpers-numbers.mjs +7 -7
  58. package/{browser/esm2020 → client/esm2022}/lib/helpers-strings-regexes.mjs +50 -50
  59. package/client/{esm2020 → esm2022}/lib/helpers-strings.mjs +252 -252
  60. package/client/esm2022/lib/helpers.mjs +286 -0
  61. package/client/{esm2020 → esm2022}/lib/index.mjs +15 -15
  62. package/client/esm2022/lib/long-press.directive.mjs +114 -0
  63. package/client/esm2022/lib/project.mjs +431 -0
  64. package/client/esm2022/lib/resize-service.mjs +23 -0
  65. package/client/{esm2020 → esm2022}/public-api.mjs +1 -1
  66. package/client/{esm2020 → esm2022}/tnp-helpers.mjs +4 -4
  67. package/{browser/fesm2020 → client/fesm2022}/tnp-helpers.mjs +1680 -1676
  68. package/{browser/fesm2020 → client/fesm2022}/tnp-helpers.mjs.map +1 -1
  69. package/client/{tnp-helpers.d.ts → index.d.ts} +4 -4
  70. package/client/lib/angular.helper.d.ts +35 -35
  71. package/client/lib/base-component.d.ts +16 -16
  72. package/client/lib/base-formly-component.d.ts +30 -30
  73. package/client/lib/condition-wait.d.ts +7 -7
  74. package/client/lib/constants.d.ts +6 -6
  75. package/client/lib/dual-component-ctrl.d.ts +24 -24
  76. package/client/lib/firedev-models.d.ts +12 -12
  77. package/client/lib/helpers-array-obj.d.ts +14 -14
  78. package/client/lib/helpers-browser.d.ts +10 -10
  79. package/client/lib/helpers-console-gui.d.ts +5 -5
  80. package/client/lib/helpers-environment.d.ts +4 -4
  81. package/client/lib/helpers-numbers.d.ts +2 -2
  82. package/client/lib/helpers-strings-regexes.d.ts +27 -27
  83. package/client/lib/helpers-strings.d.ts +49 -49
  84. package/client/lib/helpers.d.ts +33 -33
  85. package/client/lib/index.d.ts +11 -11
  86. package/client/lib/long-press.directive.d.ts +24 -24
  87. package/client/lib/project.d.ts +93 -93
  88. package/client/lib/resize-service.d.ts +8 -8
  89. package/client/package.json +89 -85
  90. package/index.d.ts +1 -1
  91. package/lib/angular.helper.d.ts +35 -35
  92. package/lib/angular.helper.js +3 -3
  93. package/lib/base-component.d.ts +13 -13
  94. package/lib/base-component.js +3 -3
  95. package/lib/base-formly-component.d.ts +27 -27
  96. package/lib/base-formly-component.js +3 -3
  97. package/lib/condition-wait.d.ts +8 -8
  98. package/lib/constants.d.ts +7 -7
  99. package/lib/dual-component-ctrl.d.ts +24 -24
  100. package/lib/dual-component-ctrl.js +3 -3
  101. package/lib/firedev-models.d.ts +13 -13
  102. package/lib/git-project.d.ts +52 -52
  103. package/lib/git-project.js.map +1 -1
  104. package/lib/helpers-array-obj.d.ts +15 -15
  105. package/lib/helpers-browser.d.ts +11 -11
  106. package/lib/helpers-browser.js +1 -2
  107. package/lib/helpers-browser.js.map +1 -1
  108. package/lib/helpers-cli-tool.backend.d.ts +55 -55
  109. package/lib/helpers-console-gui.d.ts +17 -17
  110. package/lib/helpers-dependencies.backend.d.ts +11 -11
  111. package/lib/helpers-environment.d.ts +5 -5
  112. package/lib/helpers-file-folders.backend.d.ts +85 -85
  113. package/lib/helpers-git.backend.d.ts +50 -50
  114. package/lib/helpers-git.backend.js +20 -1
  115. package/lib/helpers-git.backend.js.map +1 -1
  116. package/lib/helpers-json5.backend.d.ts +16 -16
  117. package/lib/helpers-morphi-framework.backend.d.ts +4 -4
  118. package/lib/helpers-network.backend.d.ts +8 -8
  119. package/lib/helpers-network.backend.js.map +1 -1
  120. package/lib/helpers-npm.backend.d.ts +3 -3
  121. package/lib/helpers-numbers.d.ts +3 -3
  122. package/lib/helpers-path.backend.d.ts +7 -7
  123. package/lib/helpers-process.backend.d.ts +58 -58
  124. package/lib/helpers-process.backend.js.map +1 -1
  125. package/lib/helpers-strings-regexes.d.ts +28 -28
  126. package/lib/helpers-strings.d.ts +50 -50
  127. package/lib/helpers-strings.js.map +1 -1
  128. package/lib/helpers-system-terminal.backend.d.ts +5 -5
  129. package/lib/helpers-vscode.backend.d.ts +5 -5
  130. package/lib/helpers.d.ts +74 -74
  131. package/lib/index.d.ts +12 -12
  132. package/lib/long-press.directive.d.ts +22 -22
  133. package/lib/long-press.directive.js +1 -2
  134. package/lib/long-press.directive.js.map +1 -1
  135. package/lib/merge-helpers.backend.d.ts +23 -23
  136. package/lib/project.d.ts +96 -96
  137. package/lib/project.js +4 -3
  138. package/lib/project.js.map +1 -1
  139. package/lib/resize-service.d.ts +6 -6
  140. package/lib/resize-service.js +1 -2
  141. package/lib/resize-service.js.map +1 -1
  142. package/lib/ts-code/index.d.ts +1 -1
  143. package/lib/ts-code/ts-code-extractor.d.ts +14 -14
  144. package/lib/ts-code/ts-code-modifier.backend.d.ts +12 -12
  145. package/package.json +5 -5
  146. package/package.json_tnp.json5 +2 -2
  147. package/tmp-environment.json +94 -90
  148. package/websql/{esm2020 → esm2022}/lib/angular.helper.mjs +87 -87
  149. package/websql/esm2022/lib/base-component.mjs +51 -0
  150. package/websql/esm2022/lib/base-formly-component.mjs +114 -0
  151. package/websql/{esm2020 → esm2022}/lib/condition-wait.mjs +45 -45
  152. package/websql/{esm2020 → esm2022}/lib/constants.mjs +8 -8
  153. package/websql/{esm2020 → esm2022}/lib/dual-component-ctrl.mjs +118 -118
  154. package/websql/{esm2020 → esm2022}/lib/firedev-models.mjs +3 -3
  155. package/websql/{esm2020 → esm2022}/lib/helpers-array-obj.mjs +82 -82
  156. package/websql/esm2022/lib/helpers-browser.mjs +48 -0
  157. package/websql/{esm2020 → esm2022}/lib/helpers-console-gui.mjs +9 -9
  158. package/websql/{esm2020 → esm2022}/lib/helpers-environment.mjs +32 -32
  159. package/websql/{esm2020 → esm2022}/lib/helpers-numbers.mjs +7 -7
  160. package/websql/{esm2020 → esm2022}/lib/helpers-strings-regexes.mjs +50 -50
  161. package/websql/{esm2020 → esm2022}/lib/helpers-strings.mjs +252 -252
  162. package/websql/esm2022/lib/helpers.mjs +286 -0
  163. package/websql/{esm2020 → esm2022}/lib/index.mjs +15 -15
  164. package/websql/esm2022/lib/long-press.directive.mjs +114 -0
  165. package/websql/esm2022/lib/project.mjs +431 -0
  166. package/websql/esm2022/lib/resize-service.mjs +23 -0
  167. package/websql/{esm2020 → esm2022}/public-api.mjs +1 -1
  168. package/websql/{esm2020 → esm2022}/tnp-helpers.mjs +4 -4
  169. package/websql/{fesm2020 → fesm2022}/tnp-helpers.mjs +1680 -1676
  170. package/websql/{fesm2020 → fesm2022}/tnp-helpers.mjs.map +1 -1
  171. package/websql/{tnp-helpers.d.ts → index.d.ts} +4 -4
  172. package/websql/lib/angular.helper.d.ts +35 -35
  173. package/websql/lib/base-component.d.ts +16 -16
  174. package/websql/lib/base-formly-component.d.ts +30 -30
  175. package/websql/lib/condition-wait.d.ts +7 -7
  176. package/websql/lib/constants.d.ts +6 -6
  177. package/websql/lib/dual-component-ctrl.d.ts +24 -24
  178. package/websql/lib/firedev-models.d.ts +12 -12
  179. package/websql/lib/helpers-array-obj.d.ts +14 -14
  180. package/websql/lib/helpers-browser.d.ts +10 -10
  181. package/websql/lib/helpers-console-gui.d.ts +5 -5
  182. package/websql/lib/helpers-environment.d.ts +4 -4
  183. package/websql/lib/helpers-numbers.d.ts +2 -2
  184. package/websql/lib/helpers-strings-regexes.d.ts +27 -27
  185. package/websql/lib/helpers-strings.d.ts +49 -49
  186. package/websql/lib/helpers.d.ts +33 -33
  187. package/websql/lib/index.d.ts +11 -11
  188. package/websql/lib/long-press.directive.d.ts +24 -24
  189. package/websql/lib/project.d.ts +93 -93
  190. package/websql/lib/resize-service.d.ts +8 -8
  191. package/websql/package.json +6 -12
  192. package/browser/esm2020/lib/base-component.mjs +0 -50
  193. package/browser/esm2020/lib/base-formly-component.mjs +0 -113
  194. package/browser/esm2020/lib/helpers-browser.mjs +0 -47
  195. package/browser/esm2020/lib/helpers.mjs +0 -286
  196. package/browser/esm2020/lib/long-press.directive.mjs +0 -113
  197. package/browser/esm2020/lib/project.mjs +0 -430
  198. package/browser/esm2020/lib/resize-service.mjs +0 -22
  199. package/browser/fesm2015/tnp-helpers.mjs +0 -1741
  200. package/browser/fesm2015/tnp-helpers.mjs.map +0 -1
  201. package/client/esm2020/lib/base-component.mjs +0 -50
  202. package/client/esm2020/lib/base-formly-component.mjs +0 -113
  203. package/client/esm2020/lib/helpers-browser.mjs +0 -47
  204. package/client/esm2020/lib/helpers.mjs +0 -286
  205. package/client/esm2020/lib/long-press.directive.mjs +0 -113
  206. package/client/esm2020/lib/project.mjs +0 -430
  207. package/client/esm2020/lib/resize-service.mjs +0 -22
  208. package/client/fesm2015/tnp-helpers.mjs +0 -1741
  209. package/client/fesm2015/tnp-helpers.mjs.map +0 -1
  210. package/websql/esm2020/lib/base-component.mjs +0 -50
  211. package/websql/esm2020/lib/base-formly-component.mjs +0 -113
  212. package/websql/esm2020/lib/helpers-browser.mjs +0 -47
  213. package/websql/esm2020/lib/helpers.mjs +0 -286
  214. package/websql/esm2020/lib/project.mjs +0 -430
  215. package/websql/esm2020/lib/resize-service.mjs +0 -22
  216. package/websql/fesm2015/tnp-helpers.mjs +0 -1741
  217. package/websql/fesm2015/tnp-helpers.mjs.map +0 -1
@@ -10,1720 +10,1724 @@ import { FieldType } from '@ngx-formly/core';
10
10
  import { Log, Level } from 'ng2-logger/browser';
11
11
  import * as elementResizeDetectorMaker from 'element-resize-detector';
12
12
 
13
- class HelpersArrayObj {
14
- from(s) {
15
- if (_.isArray(s)) {
16
- return s;
17
- }
18
- if (_.isString(s)) {
19
- return s.split(' ');
20
- }
21
- }
22
- second(arr) {
23
- if (!Array.isArray(arr) || arr.length < 2) {
24
- return void 0;
25
- }
26
- return arr[1];
27
- }
28
- arrayMoveElementBefore(arr, a, b, prop) {
29
- let indexA = prop ? arr.findIndex(elem => elem[prop] === a[prop]) : arr.indexOf(a);
30
- _.pullAt(arr, indexA);
31
- let indexB = prop ? arr.findIndex(elem => elem[prop] === b[prop]) : arr.indexOf(b);
32
- if (indexB === 0) {
33
- arr.unshift(a);
34
- }
35
- else {
36
- arr.splice(indexB - 1, 0, a);
37
- }
38
- return arr;
39
- }
40
- arrayMoveElementAfterB(arr, a, b, prop) {
41
- let indexA = prop ? arr.findIndex(elem => elem[prop] === a[prop]) : arr.indexOf(a);
42
- _.pullAt(arr, indexA);
43
- let indexB = prop ? arr.findIndex(elem => elem[prop] === b[prop]) : arr.indexOf(b);
44
- if (indexB === arr.length - 1) {
45
- arr.push(a);
46
- }
47
- else {
48
- arr.splice(indexB + 1, 0, a);
49
- }
50
- return arr;
51
- }
52
- uniqArray(array, uniqueProperty) {
53
- var seen = {};
54
- return array
55
- .filter(f => !!f)
56
- .filter(function (item) {
57
- return seen.hasOwnProperty(uniqueProperty ? item[uniqueProperty] : item) ? false
58
- : (seen[uniqueProperty ? item[uniqueProperty] : item] = true);
59
- });
60
- }
61
- sortKeys(obj) {
62
- if (_.isArray(obj)) {
63
- return obj.map(Helpers.arrays.sortKeys);
64
- }
65
- if (_.isObject(obj)) {
66
- return _.fromPairs(_.keys(obj).sort().map(key => [key, Helpers.arrays.sortKeys(obj[key])]));
67
- }
68
- return obj;
69
- }
70
- ;
71
- /**
72
- * Fuzzy search
73
- */
74
- fuzzy(query, list, valueFn) {
75
- const resultsFuzzy = fuzzy.filter(query, list.map(k => valueFn ? valueFn(k) : k));
76
- const resultsFuzzyKebab = fuzzy.filter(_.kebabCase(query), list.map(k => _.kebabCase((valueFn ? valueFn(k) : k))));
77
- const matches = resultsFuzzy.map((el) => el.string);
78
- const matchesKebab = resultsFuzzyKebab.map((el) => el.string);
79
- const results = (resultsFuzzy.length === 0) ? [] : list.filter(k => {
80
- return matches.includes((valueFn ? valueFn(k) : k));
81
- });
82
- if (matches.length === 0 && matchesKebab.length > 0) {
83
- const m = list.find(k => _.kebabCase((valueFn ? valueFn(k) : k)) === _.first(matchesKebab));
84
- results.push(m);
85
- matches.push((valueFn ? valueFn(m) : m));
86
- }
87
- return { matches, results };
88
- }
89
- }
90
- ;
13
+ class HelpersArrayObj {
14
+ from(s) {
15
+ if (_.isArray(s)) {
16
+ return s;
17
+ }
18
+ if (_.isString(s)) {
19
+ return s.split(' ');
20
+ }
21
+ }
22
+ second(arr) {
23
+ if (!Array.isArray(arr) || arr.length < 2) {
24
+ return void 0;
25
+ }
26
+ return arr[1];
27
+ }
28
+ arrayMoveElementBefore(arr, a, b, prop) {
29
+ let indexA = prop ? arr.findIndex(elem => elem[prop] === a[prop]) : arr.indexOf(a);
30
+ _.pullAt(arr, indexA);
31
+ let indexB = prop ? arr.findIndex(elem => elem[prop] === b[prop]) : arr.indexOf(b);
32
+ if (indexB === 0) {
33
+ arr.unshift(a);
34
+ }
35
+ else {
36
+ arr.splice(indexB - 1, 0, a);
37
+ }
38
+ return arr;
39
+ }
40
+ arrayMoveElementAfterB(arr, a, b, prop) {
41
+ let indexA = prop ? arr.findIndex(elem => elem[prop] === a[prop]) : arr.indexOf(a);
42
+ _.pullAt(arr, indexA);
43
+ let indexB = prop ? arr.findIndex(elem => elem[prop] === b[prop]) : arr.indexOf(b);
44
+ if (indexB === arr.length - 1) {
45
+ arr.push(a);
46
+ }
47
+ else {
48
+ arr.splice(indexB + 1, 0, a);
49
+ }
50
+ return arr;
51
+ }
52
+ uniqArray(array, uniqueProperty) {
53
+ var seen = {};
54
+ return array
55
+ .filter(f => !!f)
56
+ .filter(function (item) {
57
+ return seen.hasOwnProperty(uniqueProperty ? item[uniqueProperty] : item) ? false
58
+ : (seen[uniqueProperty ? item[uniqueProperty] : item] = true);
59
+ });
60
+ }
61
+ sortKeys(obj) {
62
+ if (_.isArray(obj)) {
63
+ return obj.map(Helpers.arrays.sortKeys);
64
+ }
65
+ if (_.isObject(obj)) {
66
+ return _.fromPairs(_.keys(obj).sort().map(key => [key, Helpers.arrays.sortKeys(obj[key])]));
67
+ }
68
+ return obj;
69
+ }
70
+ ;
71
+ /**
72
+ * Fuzzy search
73
+ */
74
+ fuzzy(query, list, valueFn) {
75
+ const resultsFuzzy = fuzzy.filter(query, list.map(k => valueFn ? valueFn(k) : k));
76
+ const resultsFuzzyKebab = fuzzy.filter(_.kebabCase(query), list.map(k => _.kebabCase((valueFn ? valueFn(k) : k))));
77
+ const matches = resultsFuzzy.map((el) => el.string);
78
+ const matchesKebab = resultsFuzzyKebab.map((el) => el.string);
79
+ const results = (resultsFuzzy.length === 0) ? [] : list.filter(k => {
80
+ return matches.includes((valueFn ? valueFn(k) : k));
81
+ });
82
+ if (matches.length === 0 && matchesKebab.length > 0) {
83
+ const m = list.find(k => _.kebabCase((valueFn ? valueFn(k) : k)) === _.first(matchesKebab));
84
+ results.push(m);
85
+ matches.push((valueFn ? valueFn(m) : m));
86
+ }
87
+ return { matches, results };
88
+ }
89
+ }
90
+ ;
91
91
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-array-obj.ts
92
92
 
93
- class HelpersStringsRegexes {
94
- escapeStringForRegEx(s) {
95
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
96
- }
97
- matchExactOnce(s, regex) {
98
- if (!_.isString(s) || !_.isRegExp(regex)) {
99
- return void 0;
100
- }
101
- const result = s.match(regex);
102
- if (_.isNil(result)) {
103
- return void 0;
104
- }
105
- return result.length >= 1 ? _.first(result) : void 0;
106
- }
107
- get regex() {
108
- return {
109
- /**
110
- * mathes
111
- * xxx.xxx.xxx.xxx
112
- * xxx.xxx.xxx.xxx:port
113
- * http://xxx.xxx.xxx.xxx:port
114
- * http://xxx.xxx.xxx.xxx
115
- * https://xxx.xxx.xxx.xxx:port
116
- * https://xxx.xxx.xxx.xxx *
117
- */
118
- get forStringWithIpHost() {
119
- const regex = /(http(s)?\:\/\/)?(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]?)(\:[0-9]+)?/;
120
- return regex;
121
- },
122
- /**
123
- * mathes
124
- * http://domain.com:port
125
- * http://domain.com
126
- * http://domain:port
127
- * http://domain
128
- * https://domain.com:port
129
- * https://domain.com
130
- * https://domain:port
131
- * https://domain
132
- */
133
- get forStringWithDomainHost() {
134
- const regex = /(((http(s)?\:\/\/)?[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+(\:[0-9]+)?)|((http(s)?\:\/\/)[a-zA-Z0-9-]{1,61}))/;
135
- return regex;
136
- }
137
- };
138
- }
139
- }
140
- ;
93
+ class HelpersStringsRegexes {
94
+ escapeStringForRegEx(s) {
95
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
96
+ }
97
+ matchExactOnce(s, regex) {
98
+ if (!_.isString(s) || !_.isRegExp(regex)) {
99
+ return void 0;
100
+ }
101
+ const result = s.match(regex);
102
+ if (_.isNil(result)) {
103
+ return void 0;
104
+ }
105
+ return result.length >= 1 ? _.first(result) : void 0;
106
+ }
107
+ get regex() {
108
+ return {
109
+ /**
110
+ * mathes
111
+ * xxx.xxx.xxx.xxx
112
+ * xxx.xxx.xxx.xxx:port
113
+ * http://xxx.xxx.xxx.xxx:port
114
+ * http://xxx.xxx.xxx.xxx
115
+ * https://xxx.xxx.xxx.xxx:port
116
+ * https://xxx.xxx.xxx.xxx *
117
+ */
118
+ get forStringWithIpHost() {
119
+ const regex = /(http(s)?\:\/\/)?(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]?)(\:[0-9]+)?/;
120
+ return regex;
121
+ },
122
+ /**
123
+ * mathes
124
+ * http://domain.com:port
125
+ * http://domain.com
126
+ * http://domain:port
127
+ * http://domain
128
+ * https://domain.com:port
129
+ * https://domain.com
130
+ * https://domain:port
131
+ * https://domain
132
+ */
133
+ get forStringWithDomainHost() {
134
+ const regex = /(((http(s)?\:\/\/)?[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+(\:[0-9]+)?)|((http(s)?\:\/\/)[a-zA-Z0-9-]{1,61}))/;
135
+ return regex;
136
+ }
137
+ };
138
+ }
139
+ }
140
+ ;
141
141
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-strings-regexes.ts
142
142
 
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
- ;
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
173
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-environment.ts
174
174
 
175
- class HelpersStrings {
176
- /**
177
- * Example:
178
- *
179
- * const result = interpolateString("I'm {age} years old!")
180
- * .withParameters({ age: 29 });
181
- *
182
- * const result = interpolateString("The {a} says {n}, {n}, {n}!")
183
- * .withParameters({ a: 'cow', n: 'moo' });
184
- *
185
- *
186
- * @param value string to interpolate
187
- * @param parameters object with parametes
188
- */
189
- interpolateString(value) {
190
- if (typeof value !== 'string') {
191
- Helpers.warn('[ss-logic][helper] Value for interpolation is not string: ', value);
192
- return value;
193
- }
194
- return {
195
- withParameters(parameters) {
196
- if (typeof parameters !== 'object') {
197
- Helpers.log(parameters);
198
- Helpers.warn('[ss-logic][helper] Parameters are not a object: ');
199
- return value;
200
- }
201
- return value.replace(/{([^{}]*)}/g, function (a, b) {
202
- var r = parameters[b];
203
- return typeof r === 'string' || typeof r === 'number' ? r : a;
204
- });
205
- }
206
- };
207
- }
208
- numValue(pixelsCss) {
209
- return parseInt(pixelsCss.replace('px', ''));
210
- }
211
- /**
212
- * examples:
213
- * 'aa bb bb' => ['aa','bb','cc'],
214
- * 'aa' => ['aa']
215
- * ['aa'] => ['aa']
216
- */
217
- splitIfNeed(stringOrArr) {
218
- let res = [];
219
- if (_.isArray(stringOrArr)) {
220
- res = stringOrArr.map(s => {
221
- return s.trim();
222
- });
223
- }
224
- if (_.isString(stringOrArr)) {
225
- res = stringOrArr.split(/\s*[\s,]\s*/);
226
- }
227
- return res.filter(f => !!f && (f.trim() !== ''));
228
- }
229
- removeDoubleOrMoreEmptyLines(s) {
230
- s = s?.split('\n').map(f => f.trimRight()).join('\n');
231
- return s?.replace(/(\r\n|\r|\n){2,}/g, '$1\n');
232
- }
233
- /**
234
- *
235
- * https://stackoverflow.com/a/57129703/1345101
236
- *
237
- * Returns the plural of an English word.
238
- *
239
- * @export
240
- * @param {string} word
241
- * @param {number} [amount]
242
- * @returns {string}
243
- */
244
- plural(word, amount) {
245
- if (amount !== undefined && amount === 1) {
246
- return word;
247
- }
248
- const plural = {
249
- '(quiz)$': "$1zes",
250
- '^(ox)$': "$1en",
251
- '([m|l])ouse$': "$1ice",
252
- '(matr|vert|ind)ix|ex$': "$1ices",
253
- '(x|ch|ss|sh)$': "$1es",
254
- '([^aeiouy]|qu)y$': "$1ies",
255
- '(hive)$': "$1s",
256
- '(?:([^f])fe|([lr])f)$': "$1$2ves",
257
- '(shea|lea|loa|thie)f$': "$1ves",
258
- 'sis$': "ses",
259
- '([ti])um$': "$1a",
260
- '(tomat|potat|ech|her|vet)o$': "$1oes",
261
- '(bu)s$': "$1ses",
262
- '(alias)$': "$1es",
263
- '(octop)us$': "$1i",
264
- '(ax|test)is$': "$1es",
265
- '(us)$': "$1es",
266
- '([^s]+)$': "$1s"
267
- };
268
- const irregular = {
269
- 'move': 'moves',
270
- 'foot': 'feet',
271
- 'goose': 'geese',
272
- 'sex': 'sexes',
273
- 'child': 'children',
274
- 'man': 'men',
275
- 'tooth': 'teeth',
276
- 'person': 'people'
277
- };
278
- const uncountable = [
279
- 'sheep',
280
- 'fish',
281
- 'deer',
282
- 'moose',
283
- 'series',
284
- 'species',
285
- 'money',
286
- 'rice',
287
- 'information',
288
- 'equipment',
289
- 'bison',
290
- 'cod',
291
- 'offspring',
292
- 'pike',
293
- 'salmon',
294
- 'shrimp',
295
- 'swine',
296
- 'trout',
297
- 'aircraft',
298
- 'hovercraft',
299
- 'spacecraft',
300
- 'sugar',
301
- 'tuna',
302
- 'you',
303
- 'wood'
304
- ];
305
- if (uncountable.indexOf(word.toLowerCase()) >= 0) {
306
- return word;
307
- }
308
- for (const w in irregular) {
309
- const pattern = new RegExp(`${w}$`, 'i');
310
- const replace = irregular[w];
311
- if (pattern.test(word)) {
312
- return word.replace(pattern, replace);
313
- }
314
- }
315
- for (const reg in plural) {
316
- const pattern = new RegExp(reg, 'i');
317
- if (pattern.test(word)) {
318
- return word.replace(pattern, plural[reg]);
319
- }
320
- }
321
- return word;
322
- }
323
- /**
324
- * https://stackoverflow.com/a/57129703/1345101
325
- *
326
- * Returns the singular of an English word.
327
- *
328
- * @export
329
- * @param {string} word
330
- * @param {number} [amount]
331
- * @returns {string}
332
- */
333
- singular(word, amount) {
334
- if (amount !== undefined && amount !== 1) {
335
- return word;
336
- }
337
- const singular = {
338
- '(quiz)zes$': "$1",
339
- '(matr)ices$': "$1ix",
340
- '(vert|ind)ices$': "$1ex",
341
- '^(ox)en$': "$1",
342
- '(alias)es$': "$1",
343
- '(octop|vir)i$': "$1us",
344
- '(cris|ax|test)es$': "$1is",
345
- '(shoe)s$': "$1",
346
- '(o)es$': "$1",
347
- '(bus)es$': "$1",
348
- '([m|l])ice$': "$1ouse",
349
- '(x|ch|ss|sh)es$': "$1",
350
- '(m)ovies$': "$1ovie",
351
- '(s)eries$': "$1eries",
352
- '([^aeiouy]|qu)ies$': "$1y",
353
- '([lr])ves$': "$1f",
354
- '(tive)s$': "$1",
355
- '(hive)s$': "$1",
356
- '(li|wi|kni)ves$': "$1fe",
357
- '(shea|loa|lea|thie)ves$': "$1f",
358
- '(^analy)ses$': "$1sis",
359
- '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$': "$1$2sis",
360
- '([ti])a$': "$1um",
361
- '(n)ews$': "$1ews",
362
- '(h|bl)ouses$': "$1ouse",
363
- '(corpse)s$': "$1",
364
- '(us)es$': "$1",
365
- 's$': ""
366
- };
367
- const irregular = {
368
- 'move': 'moves',
369
- 'foot': 'feet',
370
- 'goose': 'geese',
371
- 'sex': 'sexes',
372
- 'child': 'children',
373
- 'man': 'men',
374
- 'tooth': 'teeth',
375
- 'person': 'people'
376
- };
377
- const uncountable = [
378
- 'sheep',
379
- 'fish',
380
- 'deer',
381
- 'moose',
382
- 'series',
383
- 'species',
384
- 'money',
385
- 'rice',
386
- 'information',
387
- 'equipment',
388
- 'bison',
389
- 'cod',
390
- 'offspring',
391
- 'pike',
392
- 'salmon',
393
- 'shrimp',
394
- 'swine',
395
- 'trout',
396
- 'aircraft',
397
- 'hovercraft',
398
- 'spacecraft',
399
- 'sugar',
400
- 'tuna',
401
- 'you',
402
- 'wood'
403
- ];
404
- if (uncountable.indexOf(word.toLowerCase()) >= 0) {
405
- return word;
406
- }
407
- for (const w in irregular) {
408
- const pattern = new RegExp(`${irregular[w]}$`, 'i');
409
- const replace = w;
410
- if (pattern.test(word)) {
411
- return word.replace(pattern, replace);
412
- }
413
- }
414
- for (const reg in singular) {
415
- const pattern = new RegExp(reg, 'i');
416
- if (pattern.test(word)) {
417
- return word.replace(pattern, singular[reg]);
418
- }
419
- }
420
- return word;
421
- }
422
- }
423
- ;
175
+ class HelpersStrings {
176
+ /**
177
+ * Example:
178
+ *
179
+ * const result = interpolateString("I'm {age} years old!")
180
+ * .withParameters({ age: 29 });
181
+ *
182
+ * const result = interpolateString("The {a} says {n}, {n}, {n}!")
183
+ * .withParameters({ a: 'cow', n: 'moo' });
184
+ *
185
+ *
186
+ * @param value string to interpolate
187
+ * @param parameters object with parametes
188
+ */
189
+ interpolateString(value) {
190
+ if (typeof value !== 'string') {
191
+ Helpers.warn('[ss-logic][helper] Value for interpolation is not string: ', value);
192
+ return value;
193
+ }
194
+ return {
195
+ withParameters(parameters) {
196
+ if (typeof parameters !== 'object') {
197
+ Helpers.log(parameters);
198
+ Helpers.warn('[ss-logic][helper] Parameters are not a object: ');
199
+ return value;
200
+ }
201
+ return value.replace(/{([^{}]*)}/g, function (a, b) {
202
+ var r = parameters[b];
203
+ return typeof r === 'string' || typeof r === 'number' ? r : a;
204
+ });
205
+ }
206
+ };
207
+ }
208
+ numValue(pixelsCss) {
209
+ return parseInt(pixelsCss.replace('px', ''));
210
+ }
211
+ /**
212
+ * examples:
213
+ * 'aa bb bb' => ['aa','bb','cc'],
214
+ * 'aa' => ['aa']
215
+ * ['aa'] => ['aa']
216
+ */
217
+ splitIfNeed(stringOrArr) {
218
+ let res = [];
219
+ if (_.isArray(stringOrArr)) {
220
+ res = stringOrArr.map(s => {
221
+ return s.trim();
222
+ });
223
+ }
224
+ if (_.isString(stringOrArr)) {
225
+ res = stringOrArr.split(/\s*[\s,]\s*/);
226
+ }
227
+ return res.filter(f => !!f && (f.trim() !== ''));
228
+ }
229
+ removeDoubleOrMoreEmptyLines(s) {
230
+ s = s?.split('\n').map(f => f.trimRight()).join('\n');
231
+ return s?.replace(/(\r\n|\r|\n){2,}/g, '$1\n');
232
+ }
233
+ /**
234
+ *
235
+ * https://stackoverflow.com/a/57129703/1345101
236
+ *
237
+ * Returns the plural of an English word.
238
+ *
239
+ * @export
240
+ * @param {string} word
241
+ * @param {number} [amount]
242
+ * @returns {string}
243
+ */
244
+ plural(word, amount) {
245
+ if (amount !== undefined && amount === 1) {
246
+ return word;
247
+ }
248
+ const plural = {
249
+ '(quiz)$': "$1zes",
250
+ '^(ox)$': "$1en",
251
+ '([m|l])ouse$': "$1ice",
252
+ '(matr|vert|ind)ix|ex$': "$1ices",
253
+ '(x|ch|ss|sh)$': "$1es",
254
+ '([^aeiouy]|qu)y$': "$1ies",
255
+ '(hive)$': "$1s",
256
+ '(?:([^f])fe|([lr])f)$': "$1$2ves",
257
+ '(shea|lea|loa|thie)f$': "$1ves",
258
+ 'sis$': "ses",
259
+ '([ti])um$': "$1a",
260
+ '(tomat|potat|ech|her|vet)o$': "$1oes",
261
+ '(bu)s$': "$1ses",
262
+ '(alias)$': "$1es",
263
+ '(octop)us$': "$1i",
264
+ '(ax|test)is$': "$1es",
265
+ '(us)$': "$1es",
266
+ '([^s]+)$': "$1s"
267
+ };
268
+ const irregular = {
269
+ 'move': 'moves',
270
+ 'foot': 'feet',
271
+ 'goose': 'geese',
272
+ 'sex': 'sexes',
273
+ 'child': 'children',
274
+ 'man': 'men',
275
+ 'tooth': 'teeth',
276
+ 'person': 'people'
277
+ };
278
+ const uncountable = [
279
+ 'sheep',
280
+ 'fish',
281
+ 'deer',
282
+ 'moose',
283
+ 'series',
284
+ 'species',
285
+ 'money',
286
+ 'rice',
287
+ 'information',
288
+ 'equipment',
289
+ 'bison',
290
+ 'cod',
291
+ 'offspring',
292
+ 'pike',
293
+ 'salmon',
294
+ 'shrimp',
295
+ 'swine',
296
+ 'trout',
297
+ 'aircraft',
298
+ 'hovercraft',
299
+ 'spacecraft',
300
+ 'sugar',
301
+ 'tuna',
302
+ 'you',
303
+ 'wood'
304
+ ];
305
+ if (uncountable.indexOf(word.toLowerCase()) >= 0) {
306
+ return word;
307
+ }
308
+ for (const w in irregular) {
309
+ const pattern = new RegExp(`${w}$`, 'i');
310
+ const replace = irregular[w];
311
+ if (pattern.test(word)) {
312
+ return word.replace(pattern, replace);
313
+ }
314
+ }
315
+ for (const reg in plural) {
316
+ const pattern = new RegExp(reg, 'i');
317
+ if (pattern.test(word)) {
318
+ return word.replace(pattern, plural[reg]);
319
+ }
320
+ }
321
+ return word;
322
+ }
323
+ /**
324
+ * https://stackoverflow.com/a/57129703/1345101
325
+ *
326
+ * Returns the singular of an English word.
327
+ *
328
+ * @export
329
+ * @param {string} word
330
+ * @param {number} [amount]
331
+ * @returns {string}
332
+ */
333
+ singular(word, amount) {
334
+ if (amount !== undefined && amount !== 1) {
335
+ return word;
336
+ }
337
+ const singular = {
338
+ '(quiz)zes$': "$1",
339
+ '(matr)ices$': "$1ix",
340
+ '(vert|ind)ices$': "$1ex",
341
+ '^(ox)en$': "$1",
342
+ '(alias)es$': "$1",
343
+ '(octop|vir)i$': "$1us",
344
+ '(cris|ax|test)es$': "$1is",
345
+ '(shoe)s$': "$1",
346
+ '(o)es$': "$1",
347
+ '(bus)es$': "$1",
348
+ '([m|l])ice$': "$1ouse",
349
+ '(x|ch|ss|sh)es$': "$1",
350
+ '(m)ovies$': "$1ovie",
351
+ '(s)eries$': "$1eries",
352
+ '([^aeiouy]|qu)ies$': "$1y",
353
+ '([lr])ves$': "$1f",
354
+ '(tive)s$': "$1",
355
+ '(hive)s$': "$1",
356
+ '(li|wi|kni)ves$': "$1fe",
357
+ '(shea|loa|lea|thie)ves$': "$1f",
358
+ '(^analy)ses$': "$1sis",
359
+ '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$': "$1$2sis",
360
+ '([ti])a$': "$1um",
361
+ '(n)ews$': "$1ews",
362
+ '(h|bl)ouses$': "$1ouse",
363
+ '(corpse)s$': "$1",
364
+ '(us)es$': "$1",
365
+ 's$': ""
366
+ };
367
+ const irregular = {
368
+ 'move': 'moves',
369
+ 'foot': 'feet',
370
+ 'goose': 'geese',
371
+ 'sex': 'sexes',
372
+ 'child': 'children',
373
+ 'man': 'men',
374
+ 'tooth': 'teeth',
375
+ 'person': 'people'
376
+ };
377
+ const uncountable = [
378
+ 'sheep',
379
+ 'fish',
380
+ 'deer',
381
+ 'moose',
382
+ 'series',
383
+ 'species',
384
+ 'money',
385
+ 'rice',
386
+ 'information',
387
+ 'equipment',
388
+ 'bison',
389
+ 'cod',
390
+ 'offspring',
391
+ 'pike',
392
+ 'salmon',
393
+ 'shrimp',
394
+ 'swine',
395
+ 'trout',
396
+ 'aircraft',
397
+ 'hovercraft',
398
+ 'spacecraft',
399
+ 'sugar',
400
+ 'tuna',
401
+ 'you',
402
+ 'wood'
403
+ ];
404
+ if (uncountable.indexOf(word.toLowerCase()) >= 0) {
405
+ return word;
406
+ }
407
+ for (const w in irregular) {
408
+ const pattern = new RegExp(`${irregular[w]}$`, 'i');
409
+ const replace = w;
410
+ if (pattern.test(word)) {
411
+ return word.replace(pattern, replace);
412
+ }
413
+ }
414
+ for (const reg in singular) {
415
+ const pattern = new RegExp(reg, 'i');
416
+ if (pattern.test(word)) {
417
+ return word.replace(pattern, singular[reg]);
418
+ }
419
+ }
420
+ return word;
421
+ }
422
+ }
423
+ ;
424
424
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-strings.ts
425
425
 
426
- class HelpersConsoleGuiQuestion {
427
- }
428
- class HelpersConsoleGui {
429
- constructor() {
430
- this.question = new HelpersConsoleGuiQuestion();
431
- }
432
- }
433
- ;
426
+ class HelpersConsoleGuiQuestion {
427
+ }
428
+ class HelpersConsoleGui {
429
+ constructor() {
430
+ this.question = new HelpersConsoleGuiQuestion();
431
+ }
432
+ }
433
+ ;
434
434
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-console-gui.ts
435
435
 
436
- async function conditionWait(conditionAndTimeout) {
437
- await waitFor(conditionAndTimeout);
438
- }
439
- function waitFor(arr, messageToShow = void 0) {
440
- return new Promise(async (resolve, reject) => {
441
- if (arr.length === 0) {
442
- resolve(void 0);
443
- }
444
- else {
445
- const check = arr.shift();
446
- if (_.isUndefined(check.timeoutCheck)) {
447
- check.timeoutCheck = 2000;
448
- }
449
- if (_.isUndefined(check.timeoutNext)) {
450
- check.timeoutNext = 4000;
451
- }
452
- const { timeoutCheck, timeoutNext, name } = check;
453
- const resultTrue = await Helpers.runSyncOrAsync(check.callback, check);
454
- if (resultTrue) {
455
- setTimeout(async () => {
456
- await waitFor(arr).then(() => {
457
- resolve(void 0);
458
- });
459
- }, timeoutNext);
460
- }
461
- else {
462
- arr.unshift(check);
463
- if (!messageToShow || check.errorMessage !== messageToShow) {
464
- Helpers.info(check.errorMessage);
465
- }
466
- else {
467
- }
468
- setTimeout(async () => {
469
- await waitFor(arr, check.errorMessage).then(() => {
470
- resolve(void 0);
471
- });
472
- }, timeoutCheck);
473
- }
474
- }
475
- });
476
- }
477
- ;
436
+ async function conditionWait(conditionAndTimeout) {
437
+ await waitFor(conditionAndTimeout);
438
+ }
439
+ function waitFor(arr, messageToShow = void 0) {
440
+ return new Promise(async (resolve, reject) => {
441
+ if (arr.length === 0) {
442
+ resolve(void 0);
443
+ }
444
+ else {
445
+ const check = arr.shift();
446
+ if (_.isUndefined(check.timeoutCheck)) {
447
+ check.timeoutCheck = 2000;
448
+ }
449
+ if (_.isUndefined(check.timeoutNext)) {
450
+ check.timeoutNext = 4000;
451
+ }
452
+ const { timeoutCheck, timeoutNext, name } = check;
453
+ const resultTrue = await Helpers.runSyncOrAsync(check.callback, check);
454
+ if (resultTrue) {
455
+ setTimeout(async () => {
456
+ await waitFor(arr).then(() => {
457
+ resolve(void 0);
458
+ });
459
+ }, timeoutNext);
460
+ }
461
+ else {
462
+ arr.unshift(check);
463
+ if (!messageToShow || check.errorMessage !== messageToShow) {
464
+ Helpers.info(check.errorMessage);
465
+ }
466
+ else {
467
+ }
468
+ setTimeout(async () => {
469
+ await waitFor(arr, check.errorMessage).then(() => {
470
+ resolve(void 0);
471
+ });
472
+ }, timeoutCheck);
473
+ }
474
+ }
475
+ });
476
+ }
477
+ ;
478
478
  ({}); // @--end-of-file-for-module=tnp-helpers lib/condition-wait.ts
479
479
 
480
- class HelpersNumber {
481
- constructor() {
482
- this.randomInteger = (max, min) => Math.round(Math.random() * (max - min)) + min;
483
- }
484
- }
485
- ;
480
+ class HelpersNumber {
481
+ constructor() {
482
+ this.randomInteger = (max, min) => Math.round(Math.random() * (max - min)) + min;
483
+ }
484
+ }
485
+ ;
486
486
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-numbers.ts
487
487
 
488
- const key = Symbol('[firedev-helpers] helper browser key');
489
- class HelpersBrowaser {
490
- constructor(win) {
491
- this.init = (() => {
492
- const win = this.win;
493
- if (!win[key]) {
494
- win[key] = new HelpersBrowaser(win);
495
- }
496
- HelpersBrowaser.inst = win[key];
497
- })();
498
- win.addEventListener("beforeunload", (e) => {
499
- win.sessionStorage.tabId = this.tabId;
500
- return null;
501
- });
502
- setTimeout(() => {
503
- if (win.sessionStorage?.tabId) {
504
- // @ts-ignore
505
- this.tabId = Number(win.sessionStorage.tabId);
506
- win.sessionStorage.removeItem("tabId");
507
- }
508
- else {
509
- // @ts-ignore
510
- this.tabId = Math.floor(Math.random() * 1000000) + (new Date()).getTime();
511
- }
512
- HelpersBrowaser.callbacks.forEach((c) => {
513
- c(this);
514
- });
515
- });
516
- }
517
- static onInit(callback) {
518
- this.callbacks.push(callback);
519
- }
520
- get win() {
521
- let win = window;
522
- return win;
523
- }
524
- get tabIdSessionStorage() {
525
- return Number(this.win.sessionStorage?.tabId) || 0;
526
- }
527
- static get instance() {
528
- return HelpersBrowaser.inst;
529
- }
530
- }
531
- HelpersBrowaser.callbacks = [];
532
- ;
488
+ const key = Symbol('[firedev-helpers] helper browser key');
489
+ class HelpersBrowaser {
490
+ static { this.callbacks = []; }
491
+ static onInit(callback) {
492
+ this.callbacks.push(callback);
493
+ }
494
+ get win() {
495
+ let win = window;
496
+ return win;
497
+ }
498
+ get tabIdSessionStorage() {
499
+ return Number(this.win.sessionStorage?.tabId) || 0;
500
+ }
501
+ constructor(win) {
502
+ this.init = (() => {
503
+ const win = this.win;
504
+ if (!win[key]) {
505
+ win[key] = new HelpersBrowaser(win);
506
+ }
507
+ HelpersBrowaser.inst = win[key];
508
+ })();
509
+ win.addEventListener("beforeunload", (e) => {
510
+ win.sessionStorage.tabId = this.tabId;
511
+ return null;
512
+ });
513
+ setTimeout(() => {
514
+ if (win.sessionStorage?.tabId) {
515
+ // @ts-ignore
516
+ this.tabId = Number(win.sessionStorage.tabId);
517
+ win.sessionStorage.removeItem("tabId");
518
+ }
519
+ else {
520
+ // @ts-ignore
521
+ this.tabId = Math.floor(Math.random() * 1000000) + (new Date()).getTime();
522
+ }
523
+ HelpersBrowaser.callbacks.forEach((c) => {
524
+ c(this);
525
+ });
526
+ });
527
+ }
528
+ static get instance() {
529
+ return HelpersBrowaser.inst;
530
+ }
531
+ }
532
+ ;
533
533
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers-browser.ts
534
534
 
535
- const componentContextSymbol = Symbol();
536
- const componentsDestroy$Subjects = {};
537
- class SerializedSubject {
538
- constructor(id) {
539
- this.id = id;
540
- }
541
- }
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
- ;
535
+ const componentContextSymbol = Symbol();
536
+ const componentsDestroy$Subjects = {};
537
+ class SerializedSubject {
538
+ constructor(id) {
539
+ this.id = id;
540
+ }
541
+ }
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
+ ;
620
620
  ({}); // @--end-of-file-for-module=tnp-helpers lib/angular.helper.ts
621
621
 
622
- function applyMixins(derivedCtor, baseCtors) {
623
- baseCtors.forEach(baseCtor => {
624
- Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
625
- Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
626
- });
627
- });
628
- }
629
- // @ts-ignore
630
- class HelpersTnp extends CoreHelpers {
631
- constructor(
632
- /* */
633
- /* */
634
- /* */
635
- /* */
636
- /* */
637
- /* */
638
- /* */
639
- /* */
640
- /* */
641
- /* */
642
- /* */
643
- /* */
644
- /* */
645
- arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(), consoleGui = new HelpersConsoleGui(), browser = HelpersBrowaser.instance, ng = NgHelpers) {
646
- super();
647
- this.arrays = arrays;
648
- this.strings = strings;
649
- this.numbers = numbers;
650
- this.consoleGui = consoleGui;
651
- this.browser = browser;
652
- this.ng = ng;
653
- this.conditionWait = conditionWait;
654
- /* */
655
- /* */
656
- /* */
657
- /* */
658
- /* */
659
- /* */
660
- /* */
661
- /* */
662
- /* */
663
- /* */
664
- /* */
665
- /* */
666
- /* */
667
- /* */
668
- /* */
669
- /* */
670
- /* */
671
- /* */
672
- /* */
673
- /* */
674
- /* */
675
- /* */
676
- /* */
677
- /* */
678
- /* */
679
- /* */
680
- /* */
681
- /* */
682
- /* */
683
- /* */
684
- /* */
685
- /* */
686
- /* */
687
- /* */
688
- /* */
689
- /* */
690
- /* */
691
- /* */
692
- /* */
693
- /* */
694
- /* */
695
- /* */
696
- /* */
697
- /* */
698
- /* */
699
- /* */
700
- /* */
701
- /* */
702
- /* */
703
- /* */
704
- /* */
705
- /* */
706
- /* */
707
- /* */
708
- /* */
709
- /* */
710
- /* */
711
- /* */
712
- /* */
713
- /* */
714
- /* */
715
- /* */
716
- /* */
717
- /* */
718
- /* */
719
- /* */
720
- /* */
721
- /* */
722
- /* */
723
- /* */
724
- /* */
725
- /* */
726
- /* */
727
- /* */
728
- /* */
729
- /* */
730
- /* */
731
- /* */
732
- this.applyMixins = applyMixins;
733
- }
734
- static get Instance() {
735
- if (!HelpersTnp._instance) {
736
- HelpersTnp._instance = new HelpersTnp();
737
- }
738
- return HelpersTnp._instance;
739
- }
740
- CLIWRAP(f, name) {
741
- CLASS.setName(f, name);
742
- return f;
743
- }
744
- /* */
745
- /* */
746
- /* */
747
- /* */
748
- /* */
749
- /* */
750
- /* */
751
- /* */
752
- /* */
753
- /* */
754
- /* */
755
- /* */
756
- /* */
757
- /* */
758
- /* */
759
- /* */
760
- /* */
761
- /* */
762
- /* */
763
- /* */
764
- /* */
765
- /* */
766
- /* */
767
- /* */
768
- /* */
769
- /* */
770
- /* */
771
- /* */
772
- /* */
773
- /* */
774
- /* */
775
- /* */
776
- /* */
777
- /* */
778
- /* */
779
- /* */
780
- /* */
781
- /* */
782
- async isElevated() {
783
- /* */
784
- /* */
785
- /* */
786
- /* */
787
- }
788
- /* */
789
- /* */
790
- /* */
791
- /* */
792
- /* */
793
- /* */
794
- /* */
795
- /* */
796
- /* */
797
- /* */
798
- /* */
799
- /* */
800
- /* */
801
- /* */
802
- /* */
803
- /* */
804
- /* */
805
- /* */
806
- /* */
807
- /* */
808
- /* */
809
- /* */
810
- /* */
811
- /* */
812
- async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
813
- var start = new Date();
814
- await Helpers.runSyncOrAsync(functionToExecute, ...functionArguments);
815
- //@ts-ignore
816
- var end = new Date() - start;
817
- if (Morphi.IsBrowser) {
818
- Helpers.info(`Execution time: ${end.toString()}ms for "${description}"`);
819
- }
820
- /* */
821
- /* */
822
- return end;
823
- }
824
- mesureExectionInMsSync(description, functionToExecute) {
825
- var start = new Date();
826
- functionToExecute();
827
- //@ts-ignore
828
- var end = new Date() - start;
829
- if (Morphi.IsBrowser) {
830
- Helpers.log(`Execution time: ${end.toString()}ms for "${description}"`);
831
- }
832
- /* */
833
- /* */
834
- return end;
835
- }
836
- waitForCondition(conditionFn, howOfftenCheckInMs = 1000) {
837
- return new Promise(async (resolve, reject) => {
838
- const result = await Helpers.runSyncOrAsync(conditionFn);
839
- if (result) {
840
- resolve(void 0);
841
- }
842
- else {
843
- setTimeout(() => {
844
- Helpers.waitForCondition(conditionFn, howOfftenCheckInMs).then(() => {
845
- resolve(void 0);
846
- });
847
- }, howOfftenCheckInMs);
848
- }
849
- });
850
- }
851
- getBrowserVerPath(moduleName, websql = false) {
852
- /* */
853
- /* */
854
- /* */
855
- /* */
856
- /* */
857
- }
858
- getMethodName(obj, method) {
859
- var methodName = null;
860
- Object.getOwnPropertyNames(obj).forEach(prop => {
861
- if (obj[prop] === method) {
862
- methodName = prop;
863
- }
864
- });
865
- if (methodName !== null) {
866
- return methodName;
867
- }
868
- var proto = Object.getPrototypeOf(obj);
869
- if (proto) {
870
- return Helpers.getMethodName(proto, method);
871
- }
872
- return null;
873
- }
874
- fixWebpackEnv(env) {
875
- _.forIn(env, (v, k) => {
876
- const value = v;
877
- if (value === 'true')
878
- env[k] = true;
879
- if (value === 'false')
880
- env[k] = false;
881
- });
882
- }
883
- }
884
- applyMixins(HelpersTnp, [
885
- HelpersStringsRegexes,
886
- HelpersEnvironment,
887
- /* */
888
- /* */
889
- /* */
890
- ]);
891
- ;
622
+ function applyMixins(derivedCtor, baseCtors) {
623
+ baseCtors.forEach(baseCtor => {
624
+ Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
625
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
626
+ });
627
+ });
628
+ }
629
+ // @ts-ignore
630
+ class HelpersTnp extends CoreHelpers {
631
+ static get Instance() {
632
+ if (!HelpersTnp._instance) {
633
+ HelpersTnp._instance = new HelpersTnp();
634
+ }
635
+ return HelpersTnp._instance;
636
+ }
637
+ constructor(
638
+ /* */
639
+ /* */
640
+ /* */
641
+ /* */
642
+ /* */
643
+ /* */
644
+ /* */
645
+ /* */
646
+ /* */
647
+ /* */
648
+ /* */
649
+ /* */
650
+ /* */
651
+ arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(), consoleGui = new HelpersConsoleGui(), browser = HelpersBrowaser.instance, ng = NgHelpers) {
652
+ super();
653
+ this.arrays = arrays;
654
+ this.strings = strings;
655
+ this.numbers = numbers;
656
+ this.consoleGui = consoleGui;
657
+ this.browser = browser;
658
+ this.ng = ng;
659
+ this.conditionWait = conditionWait;
660
+ /* */
661
+ /* */
662
+ /* */
663
+ /* */
664
+ /* */
665
+ /* */
666
+ /* */
667
+ /* */
668
+ /* */
669
+ /* */
670
+ /* */
671
+ /* */
672
+ /* */
673
+ /* */
674
+ /* */
675
+ /* */
676
+ /* */
677
+ /* */
678
+ /* */
679
+ /* */
680
+ /* */
681
+ /* */
682
+ /* */
683
+ /* */
684
+ /* */
685
+ /* */
686
+ /* */
687
+ /* */
688
+ /* */
689
+ /* */
690
+ /* */
691
+ /* */
692
+ /* */
693
+ /* */
694
+ /* */
695
+ /* */
696
+ /* */
697
+ /* */
698
+ /* */
699
+ /* */
700
+ /* */
701
+ /* */
702
+ /* */
703
+ /* */
704
+ /* */
705
+ /* */
706
+ /* */
707
+ /* */
708
+ /* */
709
+ /* */
710
+ /* */
711
+ /* */
712
+ /* */
713
+ /* */
714
+ /* */
715
+ /* */
716
+ /* */
717
+ /* */
718
+ /* */
719
+ /* */
720
+ /* */
721
+ /* */
722
+ /* */
723
+ /* */
724
+ /* */
725
+ /* */
726
+ /* */
727
+ /* */
728
+ /* */
729
+ /* */
730
+ /* */
731
+ /* */
732
+ /* */
733
+ /* */
734
+ /* */
735
+ /* */
736
+ /* */
737
+ /* */
738
+ this.applyMixins = applyMixins;
739
+ }
740
+ CLIWRAP(f, name) {
741
+ CLASS.setName(f, name);
742
+ return f;
743
+ }
744
+ /* */
745
+ /* */
746
+ /* */
747
+ /* */
748
+ /* */
749
+ /* */
750
+ /* */
751
+ /* */
752
+ /* */
753
+ /* */
754
+ /* */
755
+ /* */
756
+ /* */
757
+ /* */
758
+ /* */
759
+ /* */
760
+ /* */
761
+ /* */
762
+ /* */
763
+ /* */
764
+ /* */
765
+ /* */
766
+ /* */
767
+ /* */
768
+ /* */
769
+ /* */
770
+ /* */
771
+ /* */
772
+ /* */
773
+ /* */
774
+ /* */
775
+ /* */
776
+ /* */
777
+ /* */
778
+ /* */
779
+ /* */
780
+ /* */
781
+ /* */
782
+ async isElevated() {
783
+ /* */
784
+ /* */
785
+ /* */
786
+ /* */
787
+ }
788
+ /* */
789
+ /* */
790
+ /* */
791
+ /* */
792
+ /* */
793
+ /* */
794
+ /* */
795
+ /* */
796
+ /* */
797
+ /* */
798
+ /* */
799
+ /* */
800
+ /* */
801
+ /* */
802
+ /* */
803
+ /* */
804
+ /* */
805
+ /* */
806
+ /* */
807
+ /* */
808
+ /* */
809
+ /* */
810
+ /* */
811
+ /* */
812
+ async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
813
+ var start = new Date();
814
+ await Helpers.runSyncOrAsync(functionToExecute, ...functionArguments);
815
+ //@ts-ignore
816
+ var end = new Date() - start;
817
+ if (Morphi.IsBrowser) {
818
+ Helpers.info(`Execution time: ${end.toString()}ms for "${description}"`);
819
+ }
820
+ /* */
821
+ /* */
822
+ return end;
823
+ }
824
+ mesureExectionInMsSync(description, functionToExecute) {
825
+ var start = new Date();
826
+ functionToExecute();
827
+ //@ts-ignore
828
+ var end = new Date() - start;
829
+ if (Morphi.IsBrowser) {
830
+ Helpers.log(`Execution time: ${end.toString()}ms for "${description}"`);
831
+ }
832
+ /* */
833
+ /* */
834
+ return end;
835
+ }
836
+ waitForCondition(conditionFn, howOfftenCheckInMs = 1000) {
837
+ return new Promise(async (resolve, reject) => {
838
+ const result = await Helpers.runSyncOrAsync(conditionFn);
839
+ if (result) {
840
+ resolve(void 0);
841
+ }
842
+ else {
843
+ setTimeout(() => {
844
+ Helpers.waitForCondition(conditionFn, howOfftenCheckInMs).then(() => {
845
+ resolve(void 0);
846
+ });
847
+ }, howOfftenCheckInMs);
848
+ }
849
+ });
850
+ }
851
+ getBrowserVerPath(moduleName, websql = false) {
852
+ /* */
853
+ /* */
854
+ /* */
855
+ /* */
856
+ /* */
857
+ }
858
+ getMethodName(obj, method) {
859
+ var methodName = null;
860
+ Object.getOwnPropertyNames(obj).forEach(prop => {
861
+ if (obj[prop] === method) {
862
+ methodName = prop;
863
+ }
864
+ });
865
+ if (methodName !== null) {
866
+ return methodName;
867
+ }
868
+ var proto = Object.getPrototypeOf(obj);
869
+ if (proto) {
870
+ return Helpers.getMethodName(proto, method);
871
+ }
872
+ return null;
873
+ }
874
+ fixWebpackEnv(env) {
875
+ _.forIn(env, (v, k) => {
876
+ const value = v;
877
+ if (value === 'true')
878
+ env[k] = true;
879
+ if (value === 'false')
880
+ env[k] = false;
881
+ });
882
+ }
883
+ }
884
+ applyMixins(HelpersTnp, [
885
+ HelpersStringsRegexes,
886
+ HelpersEnvironment,
887
+ /* */
888
+ /* */
889
+ /* */
890
+ ]);
891
+ ;
892
892
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers.ts
893
893
 
894
- const BaselineSiteJoinprefix = '__';
895
- const PREFIXES = {
896
- BASELINE: BaselineSiteJoinprefix,
897
- DELETED: '____DELETED____',
898
- ORIGINAL: '____ORIGINAL____',
899
- RESTORE_NPM: '____',
900
- };
894
+ const BaselineSiteJoinprefix = '__';
895
+ const PREFIXES = {
896
+ BASELINE: BaselineSiteJoinprefix,
897
+ DELETED: '____DELETED____',
898
+ ORIGINAL: '____ORIGINAL____',
899
+ RESTORE_NPM: '____',
900
+ };
901
901
  ({}); // @--end-of-file-for-module=tnp-helpers lib/constants.ts
902
902
 
903
- /* */
904
- const Helpers$1 = HelpersTnp.Instance;
905
- class Project {
906
- constructor() {
907
- /* */
908
- /* */
909
- this.cache = {};
910
- this.browser = {};
911
- }
912
- static typeFrom(location) {
913
- /* */
914
- /* */
915
- /* */
916
- /* */
917
- /* */
918
- /* */
919
- /* */
920
- /* */
921
- /* */
922
- /* */
923
- /* */
924
- /* */
925
- return (void 0);
926
- }
927
- static unload(project) {
928
- Project.projects = Project.projects.filter(f => f !== project);
929
- }
930
- static From(locationOfProj) {
931
- /* */
932
- /* */
933
- /* */
934
- /* */
935
- /* */
936
- /* */
937
- /* */
938
- /* */
939
- /* */
940
- /* */
941
- /* */
942
- /* */
943
- /* */
944
- /* */
945
- /* */
946
- /* */
947
- /* */
948
- /* */
949
- /* */
950
- /* */
951
- /* */
952
- /* */
953
- /* */
954
- /* */
955
- /* */
956
- /* */
957
- /* */
958
- /* */
959
- /* */
960
- /* */
961
- /* */
962
- /* */
963
- /* */
964
- /* */
965
- /* */
966
- /* */
967
- /* */
968
- /* */
969
- /* */
970
- /* */
971
- /* */
972
- /* */
973
- /* */
974
- /* */
975
- /* */
976
- /* */
977
- /* */
978
- /* */
979
- /* */
980
- /* */
981
- /* */
982
- /* */
983
- /* */
984
- /* */
985
- /* */
986
- /* */
987
- /* */
988
- /* */
989
- /* */
990
- /* */
991
- /* */
992
- /* */
993
- /* */
994
- /* */
995
- /* */
996
- /* */
997
- /* */
998
- /* */
999
- /* */
1000
- /* */
1001
- /* */
1002
- /* */
1003
- /* */
1004
- /* */
1005
- /* */
1006
- /* */
1007
- /* */
1008
- /* */
1009
- /* */
1010
- /* */
1011
- /* */
1012
- /* */
1013
- /* */
1014
- /* */
1015
- /* */
1016
- /* */
1017
- /* */
1018
- /* */
1019
- /* */
1020
- /* */
1021
- /* */
1022
- /* */
1023
- /* */
1024
- /* */
1025
- /* */
1026
- /* */
1027
- /* */
1028
- /* */
1029
- /* */
1030
- /* */
1031
- /* */
1032
- /* */
1033
- /* */
1034
- /* */
1035
- /* */
1036
- /* */
1037
- /* */
1038
- /* */
1039
- /* */
1040
- /* */
1041
- /* */
1042
- /* */
1043
- /* */
1044
- /* */
1045
- /* */
1046
- /* */
1047
- /* */
1048
- return (void 0);
1049
- }
1050
- static nearestTo(absoluteLocation, options) {
1051
- /* */
1052
- /* */
1053
- /* */
1054
- /* */
1055
- /* */
1056
- /* */
1057
- /* */
1058
- /* */
1059
- /* */
1060
- /* */
1061
- /* */
1062
- /* */
1063
- /* */
1064
- /* */
1065
- /* */
1066
- /* */
1067
- /* */
1068
- /* */
1069
- /* */
1070
- /* */
1071
- /* */
1072
- /* */
1073
- /* */
1074
- /* */
1075
- /* */
1076
- /* */
1077
- /* */
1078
- /* */
1079
- /* */
1080
- /* */
1081
- /* */
1082
- /* */
1083
- /* */
1084
- /* */
1085
- /* */
1086
- /* */
1087
- /* */
1088
- /* */
1089
- /* */
1090
- /* */
1091
- /* */
1092
- /* */
1093
- /* */
1094
- /* */
1095
- /* */
1096
- /* */
1097
- /* */
1098
- /* */
1099
- /* */
1100
- /* */
1101
- /* */
1102
- /* */
1103
- /* */
1104
- /* */
1105
- /* */
1106
- /* */
1107
- /* */
1108
- /* */
1109
- return (void 0);
1110
- }
1111
- static allProjectFrom(absoluteLocation, stopOnCwd = '/') {
1112
- /* */
1113
- /* */
1114
- /* */
1115
- /* */
1116
- /* */
1117
- /* */
1118
- /* */
1119
- /* */
1120
- /* */
1121
- /* */
1122
- /* */
1123
- /* */
1124
- /* */
1125
- /* */
1126
- /* */
1127
- /* */
1128
- /* */
1129
- /* */
1130
- /* */
1131
- /* */
1132
- /* */
1133
- /* */
1134
- return (void 0);
1135
- }
1136
- static DefaultPortByType(type) {
1137
- if (type === 'workspace') {
1138
- return 5000;
1139
- }
1140
- if (type === 'angular-client') {
1141
- return 4300;
1142
- }
1143
- if (type === 'angular-lib') {
1144
- return 4250;
1145
- }
1146
- if (type === 'electron-client') {
1147
- return 4350;
1148
- }
1149
- if (type === 'ionic-client') {
1150
- return 8080;
1151
- }
1152
- if (type === 'docker') {
1153
- return 5000;
1154
- }
1155
- if (type === 'isomorphic-lib') {
1156
- return 4000;
1157
- }
1158
- if (type === 'container' || type === 'unknow-npm-project') {
1159
- return;
1160
- }
1161
- }
1162
- static get isBundleMode() {
1163
- if (Helpers$1.isBrowser) {
1164
- return true;
1165
- }
1166
- /* */
1167
- /* */
1168
- }
1169
- static get Current() {
1170
- /* */
1171
- /* */
1172
- /* */
1173
- /* */
1174
- /* */
1175
- /* */
1176
- /* */
1177
- /* */
1178
- /* */
1179
- /* */
1180
- /* */
1181
- return (void 0);
1182
- }
1183
- /**
1184
- * @deprecated
1185
- */
1186
- static get Tnp() {
1187
- /* */
1188
- /* */
1189
- /* */
1190
- /* */
1191
- /* */
1192
- /* */
1193
- /* */
1194
- return (void 0);
1195
- }
1196
- static by(libraryType, version
1197
- /* */
1198
- /* */
1199
- ) {
1200
- /* */
1201
- /* */
1202
- /* */
1203
- /* */
1204
- /* */
1205
- /* */
1206
- /* */
1207
- /* */
1208
- /* */
1209
- /* */
1210
- /* */
1211
- /* */
1212
- /* */
1213
- /* */
1214
- /* */
1215
- /* */
1216
- /* */
1217
- /* */
1218
- /* */
1219
- /* */
1220
- /* */
1221
- /* */
1222
- /* */
1223
- /* */
1224
- /* */
1225
- /* */
1226
- /* */
1227
- return (void 0);
1228
- }
1229
- defineProperty(variableName, classFn) {
1230
- /* */
1231
- /* */
1232
- /* */
1233
- /* */
1234
- /* */
1235
- /* */
1236
- /* */
1237
- /* */
1238
- /* */
1239
- /* */
1240
- /* */
1241
- /* */
1242
- /* */
1243
- /* */
1244
- /* */
1245
- /* */
1246
- /* */
1247
- /* */
1248
- /* */
1249
- /* */
1250
- /* */
1251
- /* */
1252
- /* */
1253
- /* */
1254
- return (void 0);
1255
- }
1256
- setType(type) {
1257
- // @ts-ignore
1258
- this._type = type;
1259
- }
1260
- typeIs(...types) {
1261
- return this._type && types.includes(this._type);
1262
- }
1263
- typeIsNot(...types) {
1264
- return !this.typeIs(...types);
1265
- }
1266
- forEmptyStructure() {
1267
- /* */
1268
- /* */
1269
- /* */
1270
- /* */
1271
- /* */
1272
- return (void 0);
1273
- }
1274
- }
1275
- Project.projects = [];
1276
- /**
1277
- * To speed up checking folder I am keeping pathes for alterdy checked folder
1278
- * This may break things that are creating new projects
1279
- */
1280
- Project.emptyLocations = [];
1281
- /* */
1282
- /* */
1283
- /* */
1284
- /* */
1285
- /* */
1286
- /* */
1287
- /* */
1288
- /* */
1289
- /* */
1290
- /* */
1291
- /* */
1292
- /* */
1293
- /* */
1294
- /* */
1295
- /* */
1296
- /* */
1297
- /* */
1298
- /* */
1299
- /* */
1300
- /* */
1301
- /* */
1302
- /* */
1303
- /* */
1304
- /* */
1305
- /* */
1306
- /* */
1307
- /* */
1308
- /* */
1309
- /* */
1310
- /* */
1311
- /* */
1312
- /* */
1313
- /* */
1314
- /* */
1315
- /* */
1316
- /* */
1317
- /* */
1318
- /* */
1319
- /* */
1320
- /* */
1321
- /* */
1322
- /* */
1323
- /* */
1324
- /* */
1325
- ;
903
+ /* */
904
+ /* */
905
+ /* */
906
+ /* */
907
+ /* */
908
+ const Helpers$1 = HelpersTnp.Instance;
909
+ class Project {
910
+ constructor() {
911
+ /* */
912
+ /* */
913
+ this.cache = {};
914
+ this.browser = {};
915
+ }
916
+ static { this.projects = []; }
917
+ /**
918
+ * To speed up checking folder I am keeping pathes for alterdy checked folder
919
+ * This may break things that are creating new projects
920
+ */
921
+ static { this.emptyLocations = []; }
922
+ static typeFrom(location) {
923
+ /* */
924
+ /* */
925
+ /* */
926
+ /* */
927
+ /* */
928
+ /* */
929
+ /* */
930
+ /* */
931
+ /* */
932
+ /* */
933
+ /* */
934
+ /* */
935
+ return (void 0);
936
+ }
937
+ static unload(project) {
938
+ Project.projects = Project.projects.filter(f => f !== project);
939
+ }
940
+ static From(locationOfProj) {
941
+ /* */
942
+ /* */
943
+ /* */
944
+ /* */
945
+ /* */
946
+ /* */
947
+ /* */
948
+ /* */
949
+ /* */
950
+ /* */
951
+ /* */
952
+ /* */
953
+ /* */
954
+ /* */
955
+ /* */
956
+ /* */
957
+ /* */
958
+ /* */
959
+ /* */
960
+ /* */
961
+ /* */
962
+ /* */
963
+ /* */
964
+ /* */
965
+ /* */
966
+ /* */
967
+ /* */
968
+ /* */
969
+ /* */
970
+ /* */
971
+ /* */
972
+ /* */
973
+ /* */
974
+ /* */
975
+ /* */
976
+ /* */
977
+ /* */
978
+ /* */
979
+ /* */
980
+ /* */
981
+ /* */
982
+ /* */
983
+ /* */
984
+ /* */
985
+ /* */
986
+ /* */
987
+ /* */
988
+ /* */
989
+ /* */
990
+ /* */
991
+ /* */
992
+ /* */
993
+ /* */
994
+ /* */
995
+ /* */
996
+ /* */
997
+ /* */
998
+ /* */
999
+ /* */
1000
+ /* */
1001
+ /* */
1002
+ /* */
1003
+ /* */
1004
+ /* */
1005
+ /* */
1006
+ /* */
1007
+ /* */
1008
+ /* */
1009
+ /* */
1010
+ /* */
1011
+ /* */
1012
+ /* */
1013
+ /* */
1014
+ /* */
1015
+ /* */
1016
+ /* */
1017
+ /* */
1018
+ /* */
1019
+ /* */
1020
+ /* */
1021
+ /* */
1022
+ /* */
1023
+ /* */
1024
+ /* */
1025
+ /* */
1026
+ /* */
1027
+ /* */
1028
+ /* */
1029
+ /* */
1030
+ /* */
1031
+ /* */
1032
+ /* */
1033
+ /* */
1034
+ /* */
1035
+ /* */
1036
+ /* */
1037
+ /* */
1038
+ /* */
1039
+ /* */
1040
+ /* */
1041
+ /* */
1042
+ /* */
1043
+ /* */
1044
+ /* */
1045
+ /* */
1046
+ /* */
1047
+ /* */
1048
+ /* */
1049
+ /* */
1050
+ /* */
1051
+ /* */
1052
+ /* */
1053
+ /* */
1054
+ /* */
1055
+ /* */
1056
+ /* */
1057
+ /* */
1058
+ return (void 0);
1059
+ }
1060
+ static nearestTo(absoluteLocation, options) {
1061
+ /* */
1062
+ /* */
1063
+ /* */
1064
+ /* */
1065
+ /* */
1066
+ /* */
1067
+ /* */
1068
+ /* */
1069
+ /* */
1070
+ /* */
1071
+ /* */
1072
+ /* */
1073
+ /* */
1074
+ /* */
1075
+ /* */
1076
+ /* */
1077
+ /* */
1078
+ /* */
1079
+ /* */
1080
+ /* */
1081
+ /* */
1082
+ /* */
1083
+ /* */
1084
+ /* */
1085
+ /* */
1086
+ /* */
1087
+ /* */
1088
+ /* */
1089
+ /* */
1090
+ /* */
1091
+ /* */
1092
+ /* */
1093
+ /* */
1094
+ /* */
1095
+ /* */
1096
+ /* */
1097
+ /* */
1098
+ /* */
1099
+ /* */
1100
+ /* */
1101
+ /* */
1102
+ /* */
1103
+ /* */
1104
+ /* */
1105
+ /* */
1106
+ /* */
1107
+ /* */
1108
+ /* */
1109
+ /* */
1110
+ /* */
1111
+ /* */
1112
+ /* */
1113
+ /* */
1114
+ /* */
1115
+ /* */
1116
+ /* */
1117
+ /* */
1118
+ /* */
1119
+ return (void 0);
1120
+ }
1121
+ static allProjectFrom(absoluteLocation, stopOnCwd = '/') {
1122
+ /* */
1123
+ /* */
1124
+ /* */
1125
+ /* */
1126
+ /* */
1127
+ /* */
1128
+ /* */
1129
+ /* */
1130
+ /* */
1131
+ /* */
1132
+ /* */
1133
+ /* */
1134
+ /* */
1135
+ /* */
1136
+ /* */
1137
+ /* */
1138
+ /* */
1139
+ /* */
1140
+ /* */
1141
+ /* */
1142
+ /* */
1143
+ /* */
1144
+ return (void 0);
1145
+ }
1146
+ static DefaultPortByType(type) {
1147
+ if (type === 'workspace') {
1148
+ return 5000;
1149
+ }
1150
+ if (type === 'angular-client') {
1151
+ return 4300;
1152
+ }
1153
+ if (type === 'angular-lib') {
1154
+ return 4250;
1155
+ }
1156
+ if (type === 'electron-client') {
1157
+ return 4350;
1158
+ }
1159
+ if (type === 'ionic-client') {
1160
+ return 8080;
1161
+ }
1162
+ if (type === 'docker') {
1163
+ return 5000;
1164
+ }
1165
+ if (type === 'isomorphic-lib') {
1166
+ return 4000;
1167
+ }
1168
+ if (type === 'container' || type === 'unknow-npm-project') {
1169
+ return;
1170
+ }
1171
+ }
1172
+ static get isBundleMode() {
1173
+ if (Helpers$1.isBrowser) {
1174
+ return true;
1175
+ }
1176
+ /* */
1177
+ /* */
1178
+ }
1179
+ static get Current() {
1180
+ /* */
1181
+ /* */
1182
+ /* */
1183
+ /* */
1184
+ /* */
1185
+ /* */
1186
+ /* */
1187
+ /* */
1188
+ /* */
1189
+ /* */
1190
+ /* */
1191
+ return (void 0);
1192
+ }
1193
+ /**
1194
+ * @deprecated
1195
+ */
1196
+ static get Tnp() {
1197
+ /* */
1198
+ /* */
1199
+ /* */
1200
+ /* */
1201
+ /* */
1202
+ /* */
1203
+ /* */
1204
+ return (void 0);
1205
+ }
1206
+ static by(libraryType, version
1207
+ /* */
1208
+ /* */
1209
+ ) {
1210
+ /* */
1211
+ /* */
1212
+ /* */
1213
+ /* */
1214
+ /* */
1215
+ /* */
1216
+ /* */
1217
+ /* */
1218
+ /* */
1219
+ /* */
1220
+ /* */
1221
+ /* */
1222
+ /* */
1223
+ /* */
1224
+ /* */
1225
+ /* */
1226
+ /* */
1227
+ /* */
1228
+ /* */
1229
+ /* */
1230
+ /* */
1231
+ /* */
1232
+ /* */
1233
+ /* */
1234
+ /* */
1235
+ /* */
1236
+ /* */
1237
+ return (void 0);
1238
+ }
1239
+ defineProperty(variableName, classFn) {
1240
+ /* */
1241
+ /* */
1242
+ /* */
1243
+ /* */
1244
+ /* */
1245
+ /* */
1246
+ /* */
1247
+ /* */
1248
+ /* */
1249
+ /* */
1250
+ /* */
1251
+ /* */
1252
+ /* */
1253
+ /* */
1254
+ /* */
1255
+ /* */
1256
+ /* */
1257
+ /* */
1258
+ /* */
1259
+ /* */
1260
+ /* */
1261
+ /* */
1262
+ /* */
1263
+ /* */
1264
+ return (void 0);
1265
+ }
1266
+ setType(type) {
1267
+ // @ts-ignore
1268
+ this._type = type;
1269
+ }
1270
+ typeIs(...types) {
1271
+ return this._type && types.includes(this._type);
1272
+ }
1273
+ typeIsNot(...types) {
1274
+ return !this.typeIs(...types);
1275
+ }
1276
+ forEmptyStructure() {
1277
+ /* */
1278
+ /* */
1279
+ /* */
1280
+ /* */
1281
+ /* */
1282
+ return (void 0);
1283
+ }
1284
+ }
1285
+ /* */
1286
+ /* */
1287
+ /* */
1288
+ /* */
1289
+ /* */
1290
+ /* */
1291
+ /* */
1292
+ /* */
1293
+ /* */
1294
+ /* */
1295
+ /* */
1296
+ /* */
1297
+ /* */
1298
+ /* */
1299
+ /* */
1300
+ /* */
1301
+ /* */
1302
+ /* */
1303
+ /* */
1304
+ /* */
1305
+ /* */
1306
+ /* */
1307
+ /* */
1308
+ /* */
1309
+ /* */
1310
+ /* */
1311
+ /* */
1312
+ /* */
1313
+ /* */
1314
+ /* */
1315
+ /* */
1316
+ /* */
1317
+ /* */
1318
+ /* */
1319
+ /* */
1320
+ /* */
1321
+ /* */
1322
+ /* */
1323
+ /* */
1324
+ /* */
1325
+ /* */
1326
+ /* */
1327
+ /* */
1328
+ /* */
1329
+ ;
1326
1330
  ({}); // @--end-of-file-for-module=tnp-helpers lib/project.ts
1327
1331
 
1328
- ;
1332
+ ;
1329
1333
  ({}); // @--end-of-file-for-module=tnp-helpers lib/firedev-models.ts
1330
1334
 
1331
- class BaseComponent {
1332
- constructor() {
1333
- // @ts-ignore
1334
- this.model = {};
1335
- this.handlers = [];
1336
- }
1337
- ngOnDestroy() {
1338
- this.handlers.forEach(h => h.unsubscribe());
1339
- this.handlers.length = 0;
1340
- }
1341
- }
1342
- BaseComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1343
- BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaseComponent, selector: "app-base-component-meta", inputs: { model: "model" }, ngImport: i0, template: '<div></div>', isInline: true });
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseComponent, decorators: [{
1345
- type: Component,
1346
- args: [{
1347
- selector: 'app-base-component-meta',
1348
- template: '<div></div>'
1349
- }]
1350
- }], propDecorators: { model: [{
1351
- type: Input
1352
- }] } });
1353
- const isCalledNgInitAfterInternalRefresh = Symbol();
1354
- class BaseComponentForRouter extends BaseComponent {
1355
- constructor(__router) {
1356
- super();
1357
- this.__router = __router;
1358
- this[isCalledNgInitAfterInternalRefresh] = false;
1359
- }
1360
- isCalledNgInitAfterInternalRefresh() {
1361
- return !!this[isCalledNgInitAfterInternalRefresh];
1362
- }
1363
- reloadNgOninitOnUrlChange() {
1364
- this.handlers.push(this.__router.events.subscribe(event => {
1365
- if (event instanceof NavigationEnd && this['ngOnInit']) {
1366
- this[isCalledNgInitAfterInternalRefresh] = true;
1367
- this['ngOnInit']();
1368
- if (this[isCalledNgInitAfterInternalRefresh]) {
1369
- this[isCalledNgInitAfterInternalRefresh] = false;
1370
- }
1371
- }
1372
- }));
1373
- }
1374
- }
1375
- ;
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.4", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1346
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", 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.4", 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
+ ;
1376
1380
  ({}); // @--end-of-file-for-module=tnp-helpers lib/base-component.ts
1377
1381
 
1378
- const log$2 = Log.create(`DualComponentController`);
1379
- class DualComponentController {
1380
- constructor(cmp, isFormlyMode = false) {
1381
- this.cmp = cmp;
1382
- this.isFormlyMode = isFormlyMode;
1383
- }
1384
- getValTemplateOptions(propertyName) {
1385
- if (this.isFormlyMode) {
1386
- const res = this.cmp.field?.templateOptions[propertyName];
1387
- if (res === void 0 && this.cmp[propertyName]) {
1388
- return this.cmp[propertyName];
1389
- }
1390
- return res;
1391
- }
1392
- return this.cmp[propertyName];
1393
- }
1394
- getValContext(propertyName) {
1395
- if (this.isFormlyMode) {
1396
- const res = this.cmp?.field[propertyName];
1397
- if (res === void 0 && this.cmp[propertyName]) {
1398
- return this.cmp[propertyName];
1399
- }
1400
- return res;
1401
- }
1402
- return this.cmp[propertyName];
1403
- }
1404
- get disabled() {
1405
- return this.getValTemplateOptions('disabled');
1406
- }
1407
- get required() {
1408
- return this.getValTemplateOptions('required');
1409
- }
1410
- get type() {
1411
- if (!this.isFormlyMode) {
1412
- return CLASS.getNameFromObject(this.cmp);
1413
- }
1414
- return this.getValContext('type');
1415
- }
1416
- get label() {
1417
- return this.getValTemplateOptions('label');
1418
- }
1419
- get placeholder() {
1420
- return this.getValTemplateOptions('placeholder');
1421
- }
1422
- get defaultValue() {
1423
- return this.getValContext('defaultValue');
1424
- }
1425
- get formControl() {
1426
- return this.getValContext('formControl');
1427
- }
1428
- get key() {
1429
- return this.getValContext('key');
1430
- }
1431
- get path() {
1432
- return this.getValContext('path');
1433
- }
1434
- get model() {
1435
- if (this.isFormlyMode) {
1436
- return this.getValContext('model');
1437
- }
1438
- else {
1439
- return this.__model;
1440
- }
1441
- }
1442
- set model(v) {
1443
- if (this.isFormlyMode) {
1444
- log$2.w(`[DualComponentController] You can't set model in formly component mode`);
1445
- }
1446
- else {
1447
- this.__model = v;
1448
- }
1449
- }
1450
- get mode() {
1451
- if (this.isFormlyMode) {
1452
- return this.getValContext('mode');
1453
- }
1454
- else {
1455
- return this.__mode;
1456
- }
1457
- }
1458
- set mode(v) {
1459
- if (this.isFormlyMode) {
1460
- }
1461
- else {
1462
- this.__mode = v;
1463
- }
1464
- }
1465
- get value() {
1466
- if (this.isFormlyMode) {
1467
- return this.cmp.field.formControl.value;
1468
- }
1469
- if (_.isString(this.path)) {
1470
- return _.get(this.cmp.model, this.path);
1471
- }
1472
- return this.cmp.model;
1473
- }
1474
- set value(v) {
1475
- if (this.isFormlyMode) {
1476
- this.cmp.field.formControl.setValue(v);
1477
- // @ts-ignore
1478
- this.cmp.change.next(v);
1479
- return;
1480
- }
1481
- if (_.isString(this.path)) {
1482
- _.set(this.cmp.model, this.path, v);
1483
- }
1484
- else {
1485
- this.cmp.model = v;
1486
- }
1487
- }
1488
- }
1489
- ;
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');
1428
+ }
1429
+ get formControl() {
1430
+ return this.getValContext('formControl');
1431
+ }
1432
+ get key() {
1433
+ return this.getValContext('key');
1434
+ }
1435
+ get path() {
1436
+ return this.getValContext('path');
1437
+ }
1438
+ get model() {
1439
+ if (this.isFormlyMode) {
1440
+ return this.getValContext('model');
1441
+ }
1442
+ else {
1443
+ return this.__model;
1444
+ }
1445
+ }
1446
+ set model(v) {
1447
+ if (this.isFormlyMode) {
1448
+ log$2.w(`[DualComponentController] You can't set model in formly component mode`);
1449
+ }
1450
+ else {
1451
+ this.__model = v;
1452
+ }
1453
+ }
1454
+ get mode() {
1455
+ if (this.isFormlyMode) {
1456
+ return this.getValContext('mode');
1457
+ }
1458
+ else {
1459
+ return this.__mode;
1460
+ }
1461
+ }
1462
+ set mode(v) {
1463
+ if (this.isFormlyMode) {
1464
+ }
1465
+ else {
1466
+ this.__mode = v;
1467
+ }
1468
+ }
1469
+ get value() {
1470
+ if (this.isFormlyMode) {
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;
1477
+ }
1478
+ set value(v) {
1479
+ if (this.isFormlyMode) {
1480
+ this.cmp.field.formControl.setValue(v);
1481
+ // @ts-ignore
1482
+ this.cmp.change.next(v);
1483
+ return;
1484
+ }
1485
+ if (_.isString(this.path)) {
1486
+ _.set(this.cmp.model, this.path, v);
1487
+ }
1488
+ else {
1489
+ this.cmp.model = v;
1490
+ }
1491
+ }
1492
+ }
1493
+ ;
1490
1494
  ({}); // @--end-of-file-for-module=tnp-helpers lib/dual-component-ctrl.ts
1491
1495
 
1492
- const log$1 = Log.create('base formly component', Level.__NOTHING);
1493
- class BaseFormlyComponent extends FieldType {
1494
- constructor() {
1495
- super(...arguments);
1496
- this.DualComponentController = DualComponentController;
1497
- this.ctrl = {};
1498
- this.change = new EventEmitter();
1499
- // @ts-ignore
1500
- this.handlers = [];
1501
- this.__field = {
1502
- templateOptions: {}
1503
- };
1504
- }
1505
- // @ts-ignore
1506
- get mode() {
1507
- return this.ctrl.mode;
1508
- }
1509
- // @ts-ignore
1510
- set mode(v) {
1511
- this.ctrl.mode = v;
1512
- }
1513
- // @ts-ignore
1514
- set model(v) {
1515
- this.ctrl.model = v;
1516
- }
1517
- get model() {
1518
- return this.ctrl.model;
1519
- }
1520
- // @ts-ignore
1521
- set key(value) {
1522
- if (this.ctrl && this.ctrl.isFormlyMode) {
1523
- return;
1524
- }
1525
- this.path = value;
1526
- }
1527
- get key() {
1528
- if (this.ctrl && this.ctrl.isFormlyMode) {
1529
- return this.field.key;
1530
- }
1531
- return this.path;
1532
- }
1533
- ngOnDestroy() {
1534
- this.handlers.forEach(h => h.unsubscribe());
1535
- this.handlers.length = 0;
1536
- }
1537
- ngAfterViewInit() {
1538
- }
1539
- ngOnInit() {
1540
- const isFormlyMode = !!this.field;
1541
- log$1.i(`isFormlyMode: ${isFormlyMode}`);
1542
- if (!isFormlyMode) {
1543
- const that = this;
1544
- Object.defineProperty(this, 'field', {
1545
- get: function () {
1546
- return that.__field;
1547
- },
1548
- set: function (v) {
1549
- that.__field = v;
1550
- }
1551
- });
1552
- }
1553
- const existed = this.ctrl;
1554
- this.ctrl = new this.DualComponentController(this, isFormlyMode);
1555
- // @ts-ignore
1556
- Object.keys(existed).forEach(key => {
1557
- this.ctrl[key] = existed[key];
1558
- });
1559
- // @ts-ignore
1560
- this.change.next(this.ctrl.value);
1561
- }
1562
- }
1563
- BaseFormlyComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseFormlyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1564
- BaseFormlyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaseFormlyComponent, selector: "app-base-formly-component-meta", inputs: { pizda: "pizda", mode: "mode", disabled: "disabled", required: "required", label: "label", placeholder: "placeholder", defaultValue: "defaultValue", model: "model", path: "path", key: "key" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true });
1565
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseFormlyComponent, decorators: [{
1566
- type: Component,
1567
- args: [{
1568
- selector: 'app-base-formly-component-meta',
1569
- template: `<div></div>`
1570
- }]
1571
- }], propDecorators: { pizda: [{
1572
- type: Input
1573
- }], mode: [{
1574
- type: Input
1575
- }], disabled: [{
1576
- type: Input
1577
- }], required: [{
1578
- type: Input
1579
- }], label: [{
1580
- type: Input
1581
- }], placeholder: [{
1582
- type: Input
1583
- }], defaultValue: [{
1584
- type: Input
1585
- }], model: [{
1586
- type: Input
1587
- }], path: [{
1588
- type: Input
1589
- }], change: [{
1590
- type: Output
1591
- }], key: [{
1592
- type: Input
1593
- }] } });
1594
- ;
1496
+ const log$1 = Log.create('base formly component', Level.__NOTHING);
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
+ };
1508
+ }
1509
+ // @ts-ignore
1510
+ get mode() {
1511
+ return this.ctrl.mode;
1512
+ }
1513
+ // @ts-ignore
1514
+ set mode(v) {
1515
+ this.ctrl.mode = v;
1516
+ }
1517
+ // @ts-ignore
1518
+ set model(v) {
1519
+ this.ctrl.model = v;
1520
+ }
1521
+ get model() {
1522
+ return this.ctrl.model;
1523
+ }
1524
+ // @ts-ignore
1525
+ set key(value) {
1526
+ if (this.ctrl && this.ctrl.isFormlyMode) {
1527
+ return;
1528
+ }
1529
+ this.path = value;
1530
+ }
1531
+ get key() {
1532
+ if (this.ctrl && this.ctrl.isFormlyMode) {
1533
+ return this.field.key;
1534
+ }
1535
+ return this.path;
1536
+ }
1537
+ ngOnDestroy() {
1538
+ this.handlers.forEach(h => h.unsubscribe());
1539
+ this.handlers.length = 0;
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);
1565
+ }
1566
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: BaseFormlyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1567
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: BaseFormlyComponent, selector: "app-base-formly-component-meta", inputs: { pizda: "pizda", mode: "mode", disabled: "disabled", required: "required", label: "label", placeholder: "placeholder", defaultValue: "defaultValue", model: "model", path: "path", key: "key" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
1568
+ }
1569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: BaseFormlyComponent, decorators: [{
1570
+ type: Component,
1571
+ args: [{
1572
+ selector: 'app-base-formly-component-meta',
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
+ ;
1595
1599
  ({}); // @--end-of-file-for-module=tnp-helpers lib/base-formly-component.ts
1596
1600
 
1597
- class ResizeService {
1598
- constructor() {
1599
- this.resizeDetector = elementResizeDetectorMaker({ strategy: 'scroll' });
1600
- }
1601
- addResizeEventListener(element, handler) {
1602
- this.resizeDetector.listenTo(element, handler);
1603
- }
1604
- removeResizeEventListener(element) {
1605
- this.resizeDetector.uninstall(element);
1606
- }
1607
- }
1608
- ResizeServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1609
- ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ResizeService });
1610
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ResizeService, decorators: [{
1611
- type: Injectable
1612
- }], ctorParameters: function () { return []; } });
1613
- ;
1601
+ class ResizeService {
1602
+ constructor() {
1603
+ this.resizeDetector = elementResizeDetectorMaker({ strategy: 'scroll' });
1604
+ }
1605
+ addResizeEventListener(element, handler) {
1606
+ this.resizeDetector.listenTo(element, handler);
1607
+ }
1608
+ removeResizeEventListener(element) {
1609
+ this.resizeDetector.uninstall(element);
1610
+ }
1611
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1612
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ResizeService }); }
1613
+ }
1614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ResizeService, decorators: [{
1615
+ type: Injectable
1616
+ }], ctorParameters: function () { return []; } });
1617
+ ;
1614
1618
  ({}); // @--end-of-file-for-module=tnp-helpers lib/resize-service.ts
1615
1619
 
1616
- const log = Log.create(`[firedev-helpers] long-press`, Level.__NOTHING);
1617
- class LongPress {
1618
- constructor() {
1619
- this.pressDuration = 1000;
1620
- this.onLongPress = new EventEmitter();
1621
- this.onLongPressing = new EventEmitter();
1622
- this.onLongPressEnd = new EventEmitter();
1623
- this.mouseX = 0;
1624
- this.mouseY = 0;
1625
- this.allowTrigger = false;
1626
- this.triggerEnd = _.debounce(() => {
1627
- this.endPress();
1628
- }, 500);
1629
- }
1630
- get press() { return this.pressing; }
1631
- get longPress() { return this.longPressing; }
1632
- onMouseDown(event) {
1633
- log.d(`MOUSE DOWN `);
1634
- if (event.which !== 1)
1635
- return;
1636
- this.allowTrigger = true;
1637
- this.mouseX = event.clientX;
1638
- this.mouseY = event.clientY;
1639
- this.pressing = true;
1640
- this.longPressing = false;
1641
- this.timeout = setTimeout(() => {
1642
- if (this.allowTrigger) {
1643
- this.longPressing = true;
1644
- log.d(`long pressing start pressDuration:${this.pressDuration} `);
1645
- this.onLongPress.emit(event);
1646
- this.loop(event);
1647
- }
1648
- }, this.pressDuration);
1649
- this.loop(event);
1650
- }
1651
- onMouseMove(event) {
1652
- if (this.pressing && !this.longPressing) {
1653
- const xThres = (event.clientX - this.mouseX) > 10;
1654
- const yThres = (event.clientY - this.mouseY) > 10;
1655
- if (xThres || yThres) {
1656
- this.endPress();
1657
- }
1658
- }
1659
- }
1660
- loop(event) {
1661
- if (this.longPressing) {
1662
- this.timeout = setTimeout(() => {
1663
- log.d(`emil longpressing`);
1664
- this.triggerEnd();
1665
- this.onLongPressing.emit(event);
1666
- this.loop(event);
1667
- }, 50);
1668
- }
1669
- }
1670
- endPress(emit = true) {
1671
- this.allowTrigger = false;
1672
- clearTimeout(this.timeout);
1673
- this.longPressing = false;
1674
- this.pressing = false;
1675
- if (emit) {
1676
- log.d(`EMIT END`);
1677
- this.onLongPressEnd.emit(true);
1678
- }
1679
- else {
1680
- log.d(`NOT EMIT END`);
1681
- }
1682
- }
1683
- onMouseUp() {
1684
- this.endPress(false);
1685
- }
1686
- }
1687
- LongPressfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LongPress, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1688
- LongPress.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", 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 });
1689
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LongPress, decorators: [{
1690
- type: Directive,
1691
- args: [{ selector: '[long-press]' }]
1692
- }], propDecorators: { pressDuration: [{
1693
- type: Input
1694
- }], onLongPress: [{
1695
- type: Output
1696
- }], onLongPressing: [{
1697
- type: Output
1698
- }], onLongPressEnd: [{
1699
- type: Output
1700
- }], press: [{
1701
- type: HostBinding,
1702
- args: ['class.press']
1703
- }], longPress: [{
1704
- type: HostBinding,
1705
- args: ['class.longpress']
1706
- }], onMouseDown: [{
1707
- type: HostListener,
1708
- args: ['mousedown', ['$event']]
1709
- }], onMouseMove: [{
1710
- type: HostListener,
1711
- args: ['mousemove', ['$event']]
1712
- }], onMouseUp: [{
1713
- type: HostListener,
1714
- args: ['mouseup']
1715
- }] } });
1716
- ;
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.4", ngImport: i0, type: LongPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1691
+ static { thisdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", 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.4", 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
+ ;
1717
1721
  ({}); // @--end-of-file-for-module=tnp-helpers lib/long-press.directive.ts
1718
1722
 
1719
- /* */
1720
- /* */
1721
- const Helpers = HelpersTnp.Instance;
1722
- ;
1723
+ /* */
1724
+ /* */
1725
+ const Helpers = HelpersTnp.Instance;
1726
+ ;
1723
1727
  ({}); // @--end-of-file-for-module=tnp-helpers lib/index.ts
1724
1728
 
1725
- /**
1726
- * Generated bundle index. Do not edit.
1729
+ /**
1730
+ * Generated bundle index. Do not edit.
1727
1731
  */
1728
1732
 
1729
1733
  export { BaseComponent, BaseComponentForRouter, BaseFormlyComponent, BaselineSiteJoinprefix, DualComponentController, Helpers, LongPress, PREFIXES, Project, ResizeService, SerializedSubject };