@futdevpro/fsm-dynamo 1.9.51 → 1.10.2

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 (268) hide show
  1. package/.github/workflows/main.yml +3 -3
  2. package/build/_collections/utils/array.util.d.ts +1 -7
  3. package/build/_collections/utils/array.util.d.ts.map +1 -1
  4. package/build/_collections/utils/array.util.js +0 -31
  5. package/build/_collections/utils/array.util.js.map +1 -1
  6. package/build/_collections/utils/array.util.spec.js +0 -35
  7. package/build/_collections/utils/array.util.spec.js.map +1 -1
  8. package/build/_collections/utils/log.util.d.ts +1 -0
  9. package/build/_collections/utils/log.util.d.ts.map +1 -1
  10. package/build/_collections/utils/log.util.js +3 -0
  11. package/build/_collections/utils/log.util.js.map +1 -1
  12. package/build/_collections/utils/log.util.spec.d.ts +2 -0
  13. package/build/_collections/utils/log.util.spec.d.ts.map +1 -0
  14. package/build/_collections/utils/log.util.spec.js +85 -0
  15. package/build/_collections/utils/log.util.spec.js.map +1 -0
  16. package/build/_collections/utils/math/box-bounds.util.spec.d.ts +2 -0
  17. package/build/_collections/utils/math/box-bounds.util.spec.d.ts.map +1 -0
  18. package/build/_collections/utils/math/box-bounds.util.spec.js +53 -0
  19. package/build/_collections/utils/math/box-bounds.util.spec.js.map +1 -0
  20. package/build/_collections/utils/math/math.util.spec.d.ts +2 -0
  21. package/build/_collections/utils/math/math.util.spec.d.ts.map +1 -0
  22. package/build/_collections/utils/math/math.util.spec.js +89 -0
  23. package/build/_collections/utils/math/math.util.spec.js.map +1 -0
  24. package/build/_collections/utils/math/random.util.spec.d.ts +2 -0
  25. package/build/_collections/utils/math/random.util.spec.d.ts.map +1 -0
  26. package/build/_collections/utils/math/random.util.spec.js +75 -0
  27. package/build/_collections/utils/math/random.util.spec.js.map +1 -0
  28. package/build/_collections/utils/math/trigonometry.util.spec.d.ts +2 -0
  29. package/build/_collections/utils/math/trigonometry.util.spec.d.ts.map +1 -0
  30. package/build/_collections/utils/math/trigonometry.util.spec.js +49 -0
  31. package/build/_collections/utils/math/trigonometry.util.spec.js.map +1 -0
  32. package/build/_collections/utils/math/vector2.util.spec.d.ts +2 -0
  33. package/build/_collections/utils/math/vector2.util.spec.d.ts.map +1 -0
  34. package/build/_collections/utils/math/vector2.util.spec.js +82 -0
  35. package/build/_collections/utils/math/vector2.util.spec.js.map +1 -0
  36. package/build/_collections/utils/regex/password-regex.util.spec.d.ts +2 -0
  37. package/build/_collections/utils/regex/password-regex.util.spec.d.ts.map +1 -0
  38. package/build/_collections/utils/regex/password-regex.util.spec.js +44 -0
  39. package/build/_collections/utils/regex/password-regex.util.spec.js.map +1 -0
  40. package/build/_collections/utils/regex/regex.util.spec.d.ts +2 -0
  41. package/build/_collections/utils/regex/regex.util.spec.d.ts.map +1 -0
  42. package/build/_collections/utils/regex/regex.util.spec.js +40 -0
  43. package/build/_collections/utils/regex/regex.util.spec.js.map +1 -0
  44. package/build/_collections/utils/regex/username-regex.util.spec.d.ts +2 -0
  45. package/build/_collections/utils/regex/username-regex.util.spec.d.ts.map +1 -0
  46. package/build/_collections/utils/regex/username-regex.util.spec.js +59 -0
  47. package/build/_collections/utils/regex/username-regex.util.spec.js.map +1 -0
  48. package/build/_collections/utils/round-list.util.d.ts.map +1 -1
  49. package/build/_collections/utils/round-list.util.js +1 -1
  50. package/build/_collections/utils/round-list.util.js.map +1 -1
  51. package/build/_collections/utils/round-list.util.spec.d.ts +2 -0
  52. package/build/_collections/utils/round-list.util.spec.d.ts.map +1 -0
  53. package/build/_collections/utils/round-list.util.spec.js +65 -0
  54. package/build/_collections/utils/round-list.util.spec.js.map +1 -0
  55. package/build/_collections/utils/shared.util.spec.d.ts +2 -0
  56. package/build/_collections/utils/shared.util.spec.d.ts.map +1 -0
  57. package/build/_collections/utils/shared.util.spec.js +113 -0
  58. package/build/_collections/utils/shared.util.spec.js.map +1 -0
  59. package/build/_collections/utils/string.util.d.ts +5 -0
  60. package/build/_collections/utils/string.util.d.ts.map +1 -0
  61. package/build/_collections/utils/string.util.js +11 -0
  62. package/build/_collections/utils/string.util.js.map +1 -0
  63. package/build/_collections/utils/string.util.spec.d.ts +2 -0
  64. package/build/_collections/utils/string.util.spec.d.ts.map +1 -0
  65. package/build/_collections/utils/string.util.spec.js +36 -0
  66. package/build/_collections/utils/string.util.spec.js.map +1 -0
  67. package/build/_collections/utils/type-cloning-facility.util.spec.d.ts +2 -0
  68. package/build/_collections/utils/type-cloning-facility.util.spec.d.ts.map +1 -0
  69. package/build/_collections/utils/type-cloning-facility.util.spec.js +41 -0
  70. package/build/_collections/utils/type-cloning-facility.util.spec.js.map +1 -0
  71. package/build/_collections/utils/utilities.util.d.ts +0 -8
  72. package/build/_collections/utils/utilities.util.d.ts.map +1 -1
  73. package/build/_collections/utils/utilities.util.js +0 -8
  74. package/build/_collections/utils/utilities.util.js.map +1 -1
  75. package/build/_collections/utils/utilities.util.spec.d.ts +2 -0
  76. package/build/_collections/utils/utilities.util.spec.d.ts.map +1 -0
  77. package/build/_collections/utils/utilities.util.spec.js +145 -0
  78. package/build/_collections/utils/utilities.util.spec.js.map +1 -0
  79. package/build/_collections/utils/uuid.util.d.ts +0 -1
  80. package/build/_collections/utils/uuid.util.d.ts.map +1 -1
  81. package/build/_collections/utils/uuid.util.js +1 -1
  82. package/build/_collections/utils/uuid.util.js.map +1 -1
  83. package/build/_collections/utils/uuid.util.spec.d.ts +2 -0
  84. package/build/_collections/utils/uuid.util.spec.d.ts.map +1 -0
  85. package/build/_collections/utils/uuid.util.spec.js +29 -0
  86. package/build/_collections/utils/uuid.util.spec.js.map +1 -0
  87. package/build/_models/control-models/data-model-params.control-model.spec.d.ts +2 -0
  88. package/build/_models/control-models/data-model-params.control-model.spec.d.ts.map +1 -0
  89. package/build/_models/control-models/data-model-params.control-model.spec.js +53 -0
  90. package/build/_models/control-models/data-model-params.control-model.spec.js.map +1 -0
  91. package/build/_models/control-models/data-property-params.control-model.spec.d.ts +2 -0
  92. package/build/_models/control-models/data-property-params.control-model.spec.d.ts.map +1 -0
  93. package/build/_models/control-models/data-property-params.control-model.spec.js +83 -0
  94. package/build/_models/control-models/data-property-params.control-model.spec.js.map +1 -0
  95. package/build/_models/control-models/poll.control-model.d.ts +7 -7
  96. package/build/_models/control-models/poll.control-model.d.ts.map +1 -1
  97. package/build/_models/control-models/poll.control-model.js.map +1 -1
  98. package/build/_models/control-models/poll.control-model.spec.d.ts +2 -0
  99. package/build/_models/control-models/poll.control-model.spec.d.ts.map +1 -0
  100. package/build/_models/control-models/poll.control-model.spec.js +57 -0
  101. package/build/_models/control-models/poll.control-model.spec.js.map +1 -0
  102. package/build/_models/control-models/range-value.control-model.spec.d.ts +2 -0
  103. package/build/_models/control-models/range-value.control-model.spec.d.ts.map +1 -0
  104. package/build/_models/control-models/range-value.control-model.spec.js +163 -0
  105. package/build/_models/control-models/range-value.control-model.spec.js.map +1 -0
  106. package/build/_models/data-models/metadata.data-model.spec.d.ts +2 -0
  107. package/build/_models/data-models/metadata.data-model.spec.d.ts.map +1 -0
  108. package/build/_models/data-models/metadata.data-model.spec.js +102 -0
  109. package/build/_models/data-models/metadata.data-model.spec.js.map +1 -0
  110. package/build/_models/interfaces/search-query.interface.d.ts +2 -2
  111. package/build/_models/interfaces/search-query.interface.d.ts.map +1 -1
  112. package/build/_models/interfaces/search-result.interface.d.ts +5 -0
  113. package/build/_models/interfaces/search-result.interface.d.ts.map +1 -0
  114. package/build/_models/interfaces/search-result.interface.js +3 -0
  115. package/build/_models/interfaces/search-result.interface.js.map +1 -0
  116. package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts +2 -0
  117. package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts.map +1 -0
  118. package/build/_modules/custom-data/_models/cud.data-model.spec.js +34 -0
  119. package/build/_modules/custom-data/_models/cud.data-model.spec.js.map +1 -0
  120. package/build/_modules/location/_collections/loc-regions.util.spec.d.ts +2 -0
  121. package/build/_modules/location/_collections/loc-regions.util.spec.d.ts.map +1 -0
  122. package/build/_modules/location/_collections/loc-regions.util.spec.js +51 -0
  123. package/build/_modules/location/_collections/loc-regions.util.spec.js.map +1 -0
  124. package/build/_modules/location/_collections/loc.util.spec.d.ts +2 -0
  125. package/build/_modules/location/_collections/loc.util.spec.d.ts.map +1 -0
  126. package/build/_modules/location/_collections/loc.util.spec.js +39 -0
  127. package/build/_modules/location/_collections/loc.util.spec.js.map +1 -0
  128. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts +2 -0
  129. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts.map +1 -0
  130. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js +33 -0
  131. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js.map +1 -0
  132. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts +2 -0
  133. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts.map +1 -0
  134. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js +36 -0
  135. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js.map +1 -0
  136. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts +2 -0
  137. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts.map +1 -0
  138. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js +35 -0
  139. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js.map +1 -0
  140. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts +2 -0
  141. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts.map +1 -0
  142. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js +31 -0
  143. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js.map +1 -0
  144. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts +2 -0
  145. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts.map +1 -0
  146. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js +54 -0
  147. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js.map +1 -0
  148. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts +2 -0
  149. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts.map +1 -0
  150. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js +26 -0
  151. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js.map +1 -0
  152. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts +2 -0
  153. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts.map +1 -0
  154. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js +50 -0
  155. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js.map +1 -0
  156. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts +2 -0
  157. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts.map +1 -0
  158. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js +23 -0
  159. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js.map +1 -0
  160. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts +2 -0
  161. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts.map +1 -0
  162. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js +38 -0
  163. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js.map +1 -0
  164. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts +2 -0
  165. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts.map +1 -0
  166. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js +20 -0
  167. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js.map +1 -0
  168. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts +2 -0
  169. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts.map +1 -0
  170. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js +49 -0
  171. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js.map +1 -0
  172. package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts +2 -0
  173. package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts.map +1 -0
  174. package/build/_modules/socket/_models/sck-client-params.control-model.spec.js +54 -0
  175. package/build/_modules/socket/_models/sck-client-params.control-model.spec.js.map +1 -0
  176. package/build/_modules/socket/_models/sck-socket-event.control-model.d.ts +1 -1
  177. package/build/_modules/socket/_models/sck-socket-event.control-model.d.ts.map +1 -1
  178. package/build/_modules/socket/_models/sck-socket-event.control-model.js +2 -2
  179. package/build/_modules/socket/_models/sck-socket-event.control-model.js.map +1 -1
  180. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts +2 -0
  181. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts.map +1 -0
  182. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js +49 -0
  183. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js.map +1 -0
  184. package/build/_modules/socket/_services/sck-client.service-base.d.ts +3 -3
  185. package/build/_modules/socket/_services/sck-client.service-base.d.ts.map +1 -1
  186. package/build/_modules/socket/_services/sck-client.service-base.js +3 -3
  187. package/build/_modules/socket/_services/sck-client.service-base.js.map +1 -1
  188. package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts +2 -0
  189. package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts.map +1 -0
  190. package/build/_modules/socket/_services/sck-client.service-base.spec.js +82 -0
  191. package/build/_modules/socket/_services/sck-client.service-base.spec.js.map +1 -0
  192. package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts +2 -0
  193. package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts.map +1 -0
  194. package/build/_modules/usage/_models/usg-action.control-model.spec.js +24 -0
  195. package/build/_modules/usage/_models/usg-action.control-model.spec.js.map +1 -0
  196. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts +2 -0
  197. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts.map +1 -0
  198. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js +33 -0
  199. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js.map +1 -0
  200. package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts +2 -0
  201. package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts.map +1 -0
  202. package/build/_modules/usage/_models/usg-data.control-model.spec.js +37 -0
  203. package/build/_modules/usage/_models/usg-data.control-model.spec.js.map +1 -0
  204. package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts +2 -0
  205. package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts.map +1 -0
  206. package/build/_modules/usage/_models/usg-session.data-model.spec.js +66 -0
  207. package/build/_modules/usage/_models/usg-session.data-model.spec.js.map +1 -0
  208. package/build/index.d.ts +1 -0
  209. package/build/index.d.ts.map +1 -1
  210. package/build/index.js +1 -0
  211. package/build/index.js.map +1 -1
  212. package/futdevpro-fsm-dynamo-01.10.02.tgz +0 -0
  213. package/package.json +11 -23
  214. package/src/_collections/utils/array.util.spec.ts +0 -45
  215. package/src/_collections/utils/array.util.ts +2 -45
  216. package/src/_collections/utils/log.util.spec.ts +99 -0
  217. package/src/_collections/utils/log.util.ts +4 -0
  218. package/src/_collections/utils/math/box-bounds.util.spec.ts +63 -0
  219. package/src/_collections/utils/math/math.util.spec.ts +104 -0
  220. package/src/_collections/utils/math/random.util.spec.ts +82 -0
  221. package/src/_collections/utils/math/trigonometry.util.spec.ts +57 -0
  222. package/src/_collections/utils/math/vector2.util.spec.ts +94 -0
  223. package/src/_collections/utils/regex/password-regex.util.spec.ts +51 -0
  224. package/src/_collections/utils/regex/regex.util.spec.ts +42 -0
  225. package/src/_collections/utils/regex/username-regex.util.spec.ts +61 -0
  226. package/src/_collections/utils/round-list.util.spec.ts +79 -0
  227. package/src/_collections/utils/round-list.util.ts +46 -1
  228. package/src/_collections/utils/shared.util.spec.ts +143 -0
  229. package/src/_collections/utils/string.util.spec.ts +41 -0
  230. package/src/_collections/utils/string.util.ts +10 -0
  231. package/src/_collections/utils/type-cloning-facility.util.spec.ts +51 -0
  232. package/src/_collections/utils/utilities.util.spec.ts +166 -0
  233. package/src/_collections/utils/utilities.util.ts +1 -12
  234. package/src/_collections/utils/uuid.util.spec.ts +30 -0
  235. package/src/_collections/utils/uuid.util.ts +14 -1
  236. package/src/_models/control-models/data-model-params.control-model.spec.ts +67 -0
  237. package/src/_models/control-models/data-property-params.control-model.spec.ts +109 -0
  238. package/src/_models/control-models/poll.control-model.spec.ts +63 -0
  239. package/src/_models/control-models/poll.control-model.ts +8 -7
  240. package/src/_models/control-models/range-value.control-model.spec.ts +187 -0
  241. package/src/_models/data-models/metadata.data-model.spec.ts +123 -0
  242. package/src/_models/interfaces/search-query.interface.ts +2 -2
  243. package/src/_models/interfaces/search-result.interface.ts +6 -0
  244. package/src/_modules/custom-data/_models/cud.data-model.spec.ts +38 -0
  245. package/src/_modules/location/_collections/loc-regions.util.spec.ts +61 -0
  246. package/src/_modules/location/_collections/loc.util.spec.ts +52 -0
  247. package/src/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.ts +47 -0
  248. package/src/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.ts +39 -0
  249. package/src/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.ts +41 -0
  250. package/src/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.ts +34 -0
  251. package/src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts +60 -0
  252. package/src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.ts +28 -0
  253. package/src/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.ts +59 -0
  254. package/src/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.ts +31 -0
  255. package/src/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.ts +44 -0
  256. package/src/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.ts +21 -0
  257. package/src/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.ts +61 -0
  258. package/src/_modules/socket/_models/sck-client-params.control-model.spec.ts +67 -0
  259. package/src/_modules/socket/_models/sck-socket-event.control-model.spec.ts +66 -0
  260. package/src/_modules/socket/_models/sck-socket-event.control-model.ts +2 -2
  261. package/src/_modules/socket/_services/sck-client.service-base.spec.ts +99 -0
  262. package/src/_modules/socket/_services/sck-client.service-base.ts +7 -7
  263. package/src/_modules/usage/_models/usg-action.control-model.spec.ts +27 -0
  264. package/src/_modules/usage/_models/usg-daily-usage-data.control-model.spec.ts +36 -0
  265. package/src/_modules/usage/_models/usg-data.control-model.spec.ts +41 -0
  266. package/src/_modules/usage/_models/usg-session.data-model.spec.ts +73 -0
  267. package/src/index.ts +1 -0
  268. package/futdevpro-fsm-dynamo-01.09.51.tgz +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg-daily-usage-data.control-model.spec.js","sourceRoot":"","sources":["../../../../src/_modules/usage/_models/usg-daily-usage-data.control-model.spec.ts"],"names":[],"mappings":";;AACA,6FAA2E;AAG3E,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,QAAQ,GAAG,IAAI,wDAAmB,EAAE,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,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 //# sourceMappingURL=usg-data.control-model.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg-data.control-model.spec.d.ts","sourceRoot":"","sources":["../../../../src/_modules/usage/_models/usg-data.control-model.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const usg_data_control_model_1 = require("./usg-data.control-model");
4
+ describe('DyFM_UsageData', () => {
5
+ it('should create an instance with default values', () => {
6
+ const usageData = new usg_data_control_model_1.DyFM_UsageData();
7
+ expect(usageData.page).toBeUndefined();
8
+ expect(usageData.opened).toBeUndefined();
9
+ expect(usageData.timeSpentOnPage).toBeUndefined();
10
+ expect(usageData.actions).toEqual([]);
11
+ });
12
+ it('should create an instance with provided values', () => {
13
+ const actions = [{ /* mock action data */}];
14
+ const set = {
15
+ page: 'HomePage',
16
+ opened: new Date('2023-10-01T10:00:00Z'),
17
+ timeSpentOnPage: 120,
18
+ actions: actions
19
+ };
20
+ const usageData = new usg_data_control_model_1.DyFM_UsageData(set);
21
+ expect(usageData.page).toBe('HomePage');
22
+ expect(usageData.opened).toEqual(new Date('2023-10-01T10:00:00Z'));
23
+ expect(usageData.timeSpentOnPage).toBe(120);
24
+ expect(usageData.actions).toEqual(actions);
25
+ });
26
+ it('should create an instance with partial provided values', () => {
27
+ const set = {
28
+ page: 'ContactPage'
29
+ };
30
+ const usageData = new usg_data_control_model_1.DyFM_UsageData(set);
31
+ expect(usageData.page).toBe('ContactPage');
32
+ expect(usageData.opened).toBeUndefined();
33
+ expect(usageData.timeSpentOnPage).toBeUndefined();
34
+ expect(usageData.actions).toEqual([]);
35
+ });
36
+ });
37
+ //# sourceMappingURL=usg-data.control-model.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg-data.control-model.spec.js","sourceRoot":"","sources":["../../../../src/_modules/usage/_models/usg-data.control-model.spec.ts"],"names":[],"mappings":";;AACA,qEAAuE;AAGvE,QAAQ,C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F,MAAM,SAAS,GAAG,IAAI,uCAAc,CAAC,GAAqB,CAAC,CAAC;QAE5D,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,aAAa,EAAE,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=usg-session.data-model.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg-session.data-model.spec.d.ts","sourceRoot":"","sources":["../../../../src/_modules/usage/_models/usg-session.data-model.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const usg_session_data_model_1 = require("./usg-session.data-model");
4
+ describe('DyFM_UsageSession', () => {
5
+ it('should create an instance with default values', () => {
6
+ const session = new usg_session_data_model_1.DyFM_UsageSession();
7
+ expect(session.date).toBeUndefined();
8
+ expect(session.sessionStart).toBeUndefined();
9
+ expect(session.sessionEnd).toBeUndefined();
10
+ expect(session.address).toBeUndefined();
11
+ expect(session.issuer).toBeUndefined();
12
+ expect(session.locationData).toBeUndefined();
13
+ expect(session.usageData).toEqual([]);
14
+ expect(session.totalSessionTime).toBeUndefined();
15
+ expect(session.loggedInAs).toBeUndefined();
16
+ });
17
+ it('should assign values from the provided set', () => {
18
+ const set = {
19
+ date: '2023-10-01',
20
+ sessionStart: new Date('2023-10-01T10:00:00Z'),
21
+ sessionEnd: new Date('2023-10-01T12:00:00Z'),
22
+ address: '123 Main St',
23
+ issuer: 'Issuer Name',
24
+ locationData: {},
25
+ usageData: [{}],
26
+ totalSessionTime: 7200,
27
+ loggedInAs: 'user@example.com'
28
+ };
29
+ const session = new usg_session_data_model_1.DyFM_UsageSession(set);
30
+ expect(session.date).toBe('2023-10-01');
31
+ expect(session.sessionStart).toEqual(new Date('2023-10-01T10:00:00Z'));
32
+ expect(session.sessionEnd).toEqual(new Date('2023-10-01T12:00:00Z'));
33
+ expect(session.address).toBe('123 Main St');
34
+ expect(session.issuer).toBe('Issuer Name');
35
+ /* expect(session.locationData).toEqual({}); */
36
+ expect(session.usageData).toEqual([{}]);
37
+ expect(session.totalSessionTime).toBe(7200);
38
+ expect(session.loggedInAs).toBe('user@example.com');
39
+ });
40
+ it('should set the date based on sessionStart if date is not provided', () => {
41
+ const sessionStart = new Date('2023-10-01T10:00:00Z');
42
+ const set = {
43
+ sessionStart
44
+ };
45
+ const session = new usg_session_data_model_1.DyFM_UsageSession(set);
46
+ expect(session.date).toBe('2023-10-01');
47
+ });
48
+ });
49
+ describe('DyFM_usageSession_dataParams', () => {
50
+ it('should have the correct dataName', () => {
51
+ expect(usg_session_data_model_1.DyFM_usageSession_dataParams.dataName).toBe('usageSession');
52
+ });
53
+ it('should have the correct properties configuration', () => {
54
+ const properties = usg_session_data_model_1.DyFM_usageSession_dataParams.properties;
55
+ expect(properties.date).toEqual({ key: 'date', type: 'string', required: true, index: true });
56
+ expect(properties.sessionStart).toEqual({ key: 'sessionStart', type: 'Date', required: true, index: true });
57
+ expect(properties.sessionEnd).toEqual({ key: 'sessionEnd', type: 'Date' });
58
+ expect(properties.address).toEqual({ key: 'address', type: 'string' });
59
+ expect(properties.issuer).toEqual({ key: 'issuer', type: 'string' });
60
+ expect(properties.locationData).toEqual({ key: 'locationData', type: 'IpApiLocation' });
61
+ expect(properties.usageData).toEqual({ key: 'usageData', type: 'UsageData[]' });
62
+ expect(properties.totalSessionTime).toEqual({ key: 'totalSessionTime', type: 'number' });
63
+ expect(properties.loggedInAs).toEqual({ key: 'loggedInAs', type: 'string' });
64
+ });
65
+ });
66
+ //# sourceMappingURL=usg-session.data-model.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg-session.data-model.spec.js","sourceRoot":"","sources":["../../../../src/_modules/usage/_models/usg-session.data-model.spec.ts"],"names":[],"mappings":";;AAGA,qEAA2F;AAE3F,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,OAAO,GAAG,IAAI,0CAAiB,EAAE,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QACrC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,aAAa,EAAE,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,aAAa,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,GAAG,GAAsB;YAC7B,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,IAAI,IAAI,CAAC,sBAAsB,CAAC;YAC9C,UAAU,EAAE,IAAI,IAAI,CAAC,sBAAsB,CAAC;YAC5C,OAAO,EAAE,aAAa;YACtB,MAAM,EAAE,aAAa;YACrB,YAAY,EAAE,EAAwB;YACtC,SAAS,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AAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QAChF,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzF,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/build/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export * from './_models/interfaces/paged.interface';
36
36
  export * from './_models/interfaces/random-weight.interface';
37
37
  export * from './_models/interfaces/route-settings.interface';
38
38
  export * from './_models/interfaces/search-query.interface';
39
+ export * from './_models/interfaces/search-result.interface';
39
40
  export * from './_models/interfaces/vector2.interface';
40
41
  export * from './_models/interfaces/environment/global-log-settings.interface';
41
42
  export * from './_models/interfaces/environment/global-settings.interface';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gDAAgD,CAAC;AAC/D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C;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAI/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AAGxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAKjD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AAGnE,cAAc,2CAA2C,CAAC;AAG1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4DAA4D,CAAC;AAG3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC"}
package/build/index.js CHANGED
@@ -50,6 +50,7 @@ tslib_1.__exportStar(require("./_models/interfaces/paged.interface"), exports);
50
50
  tslib_1.__exportStar(require("./_models/interfaces/random-weight.interface"), exports);
51
51
  tslib_1.__exportStar(require("./_models/interfaces/route-settings.interface"), exports);
52
52
  tslib_1.__exportStar(require("./_models/interfaces/search-query.interface"), exports);
53
+ tslib_1.__exportStar(require("./_models/interfaces/search-result.interface"), exports);
53
54
  tslib_1.__exportStar(require("./_models/interfaces/vector2.interface"), exports);
54
55
  // models/interfaces/ENVIRONMENT
55
56
  tslib_1.__exportStar(require("./_models/interfaces/environment/global-log-settings.interface"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,wFAA8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AQ;AACR,4EAAkD;AAClD,wEAA8C;AAC9C,oEAA0C;AAC1C,kEAAwC;AAExC,aAAa;AACb,yEAA+C;AAC/C,mEAAyC;AACzC,2EAAiD;AAGjD,SAAS;AACT,wBAAwB;AACxB,mGAAyE;AACzE,sGAA4E;AAC5E,uFAA6D;AAC7D,sFAA4D;AAC5D,6FAAmE;AAEnE,qBAAqB;AACrB,oFAA0D;AAE1D,oBAAoB;AACpB,wFAA8D;AAC9D,+EAAqD;AACrD,uFAA6D;AAC7D,wFAA8D;AAC9D,sFAA4D;AAC5D,uFAA6D;AAC7D,iFAAuD;AAEvD,gCAAgC;AAChC,yGAA+E;AAC/E,qGAA2E;AAE3E,eAAe;AACf,yEAA+C;AAC/C,uEAA6C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.09.51",
3
+ "version": "01.10.02",
4
4
  "description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
5
5
  "scripts": {
6
6
  "prep": "npm i pnpm -g && npm i rimraf nodemon -g",
@@ -66,24 +66,12 @@
66
66
  },
67
67
  "typesVersions": {
68
68
  "*": {
69
- "custom-data": [
70
- "build/_modules/custom-data/index.d.ts"
71
- ],
72
- "location": [
73
- "build/_modules/location/index.d.ts"
74
- ],
75
- "pipe": [
76
- "build/_modules/pipe/index.d.ts"
77
- ],
78
- "socket": [
79
- "build/_modules/socket/index.d.ts"
80
- ],
81
- "test": [
82
- "build/_modules/test/index.d.ts"
83
- ],
84
- "usage": [
85
- "build/_modules/usage/index.d.ts"
86
- ]
69
+ "custom-data": [ "build/_modules/custom-data/index.d.ts" ],
70
+ "location": [ "build/_modules/location/index.d.ts" ],
71
+ "pipe": [ "build/_modules/pipe/index.d.ts" ],
72
+ "socket": [ "build/_modules/socket/index.d.ts" ],
73
+ "test": [ "build/_modules/test/index.d.ts" ],
74
+ "usage": [ "build/_modules/usage/index.d.ts" ]
87
75
  }
88
76
  },
89
77
  "keywords": [],
@@ -104,11 +92,11 @@
104
92
  },
105
93
  "devDependencies": {
106
94
  "@types/jasmine": "~4.3.5",
107
- "@typescript-eslint/eslint-plugin": "~6.7.4",
108
- "@typescript-eslint/parser": "~6.7.4",
109
- "eslint": "~9.17.0",
95
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
96
+ "@typescript-eslint/parser": "^8.18.2",
97
+ "eslint": "~8.57.0",
110
98
  "eslint-plugin-max-params-no-constructor": "~0.0.4",
111
- "eslint-plugin-unused-imports": "~3.0.0",
99
+ "eslint-plugin-unused-imports": "~4.1.4",
112
100
  "jasmine": "~5.1.0",
113
101
  "jasmine-spec-reporter": "^7.0.0"
114
102
  }
@@ -139,51 +139,6 @@ describe('DyFM_Array', (): void => {
139
139
 
140
140
  // Add more test cases as needed
141
141
  });
142
-
143
- xdescribe('getRoundListOppositeIndex', () => {
144
- it('should return the correct opposite index when roundUp is false', () => {
145
- const arrayLength = 5;
146
- const index = 2;
147
- const expectedOppositeIndex = 4; // 2 + Math.floor(5 / 2)
148
-
149
- expect(DyFM_Array.getRoundListOppositeIndex(arrayLength, index)).toBe(expectedOppositeIndex);
150
- });
151
-
152
- it('should return the correct opposite index when roundUp is true', () => {
153
- const arrayLength = 5;
154
- const index = 2;
155
- const roundUp = true;
156
- const expectedOppositeIndex = 5; // 2 + Math.ceil(5 / 2)
157
-
158
- expect(DyFM_Array.getRoundListOppositeIndex(arrayLength, index, roundUp)).toBe(expectedOppositeIndex);
159
- });
160
-
161
- it('should handle cases where oppositeIndex is greater than arrayLength', () => {
162
- const arrayLength = 5;
163
- const index = 3;
164
- const roundUp = true; // roundUp doesn't matter in this case
165
- const expectedOppositeIndex = 3; // 3
166
-
167
- expect(DyFM_Array.getRoundListOppositeIndex(arrayLength, index, roundUp)).toBe(expectedOppositeIndex);
168
- });
169
- });
170
-
171
- xdescribe('getRoundListOutboundIndex function', () => {
172
- it('should return the correct element in the array', () => {
173
- const array = [ 1, 2, 3, 4, 5 ];
174
-
175
- expect(DyFM_Array.getRoundListOutboundIndex(array, 3)).toBe(4);
176
- expect(DyFM_Array.getRoundListOutboundIndex(array, 7)).toBe(3); // index wraps around
177
- expect(DyFM_Array.getRoundListOutboundIndex(array, -2)).toBe(4); // negative index wraps around
178
- });
179
-
180
- it('should return null for invalid input', () => {
181
- const emptyArray: number[] = [];
182
-
183
- expect(DyFM_Array.getRoundListOutboundIndex(emptyArray, 0)).toBe(null); // empty array
184
- expect(DyFM_Array.getRoundListOutboundIndex(null, 0)).toBe(null); // null array
185
- });
186
- });
187
142
 
188
143
  describe('stringListHasMultiplications', () => {
189
144
  it('should return true if input string array contains duplicates', () => {
@@ -3,6 +3,8 @@ import { DyFM_Paged } from '../../_models/interfaces/paged.interface';
3
3
 
4
4
 
5
5
 
6
+ export type DyFM_List = DyFM_Array;
7
+
6
8
  export class DyFM_Array {
7
9
 
8
10
  static async asyncForEach<T>(
@@ -118,51 +120,6 @@ export class DyFM_Array {
118
120
  return array;
119
121
  }
120
122
 
121
- /**
122
- * returns the opposite index as they circular
123
- * so after the last index, the first comes next
124
- * an array that has 8 elements, the opposite of 7 is 3
125
- * */
126
- static getRoundListOppositeIndex(
127
- arrayLength: number,
128
- index: number,
129
- roundUp: boolean = false
130
- ): number {
131
- const oppositeIndex = index + (
132
- roundUp ?
133
- Math.ceil(arrayLength / 2) :
134
- Math.floor(arrayLength / 2)
135
- );
136
-
137
- if (arrayLength <= oppositeIndex) {
138
- return oppositeIndex - arrayLength;
139
- } else {
140
- return oppositeIndex;
141
- }
142
- }
143
-
144
- static getRoundListOutboundIndex<T>(array: T[], index: number): T {
145
- try {
146
- while (array.length <= index) {
147
- index -= array.length;
148
- }
149
-
150
- while (index < 0) {
151
- index += array.length;
152
- }
153
-
154
- return array[index];
155
- } catch (error) {
156
- console.error(
157
- 'DyFM_Array.getRoundListOutboundIndex error:', error,
158
- '\narray:', array,
159
- '\nindex:', index
160
- );
161
-
162
- return null;
163
- }
164
- }
165
-
166
123
  static stringListHasMultiplications(stringList: string[]): boolean {
167
124
  return stringList.some((str: string, index: number): boolean => {
168
125
  return stringList.findIndex((strItem: string): boolean => strItem === str) !== index;
@@ -0,0 +1,99 @@
1
+
2
+ import { DyFM_LogStyle } from '../../_enums/log-style.enum';
3
+ import { DyFM_Log } from './log.util';
4
+
5
+ describe('DyFM_Log', () => {
6
+
7
+ beforeEach(() => {
8
+ spyOn(console, 'log');
9
+ spyOn(console, 'error');
10
+ spyOn(console, 'warn');
11
+ spyOn(console, 'info');
12
+ });
13
+
14
+ it('should set styles correctly using setStyle', () => {
15
+ DyFM_Log.setStyle([DyFM_LogStyle.green, DyFM_LogStyle.bright]);
16
+ expect(console.log).toHaveBeenCalledWith(DyFM_LogStyle.green + DyFM_LogStyle.bright);
17
+ });
18
+
19
+ it('should reset styles correctly using resetStyle', () => {
20
+ DyFM_Log.resetStyle();
21
+ expect(console.log).toHaveBeenCalledWith(DyFM_LogStyle.reset);
22
+ });
23
+
24
+ it('should add styles to input string using addStyle', () => {
25
+ const result = DyFM_Log.addStyle('Hello', [DyFM_LogStyle.green, DyFM_LogStyle.bright]);
26
+ expect(result).toBe(DyFM_LogStyle.green + DyFM_LogStyle.bright + 'Hello' + DyFM_LogStyle.reset);
27
+ });
28
+
29
+ it('should not reset styles if dontReset is true in addStyle', () => {
30
+ const result = DyFM_Log.addStyle('Hello', [DyFM_LogStyle.green], true);
31
+ expect(result).toBe(DyFM_LogStyle.green + 'Hello');
32
+ });
33
+
34
+ it('should log success message with styles', () => {
35
+ DyFM_Log.success('Success message');
36
+ expect(console.log).toHaveBeenCalledWith(`${DyFM_LogStyle.green}Success message${DyFM_LogStyle.reset}`);
37
+ });
38
+
39
+ it('should log error message with styles', () => {
40
+ DyFM_Log.error('Error message');
41
+ expect(console.error).toHaveBeenCalledWith(`${DyFM_LogStyle.red}Error message${DyFM_LogStyle.reset}`);
42
+ });
43
+
44
+ it('should log warning message with styles', () => {
45
+ DyFM_Log.warn('Warning message');
46
+ expect(console.warn).toHaveBeenCalledWith(`${DyFM_LogStyle.yellow}Warning message${DyFM_LogStyle.reset}`);
47
+ });
48
+
49
+ it('should log info message without styles', () => {
50
+ DyFM_Log.info('Info message');
51
+ expect(console.info).toHaveBeenCalledWith('Info message');
52
+ });
53
+
54
+ it('should log message without styles using log', () => {
55
+ DyFM_Log.log('Log message');
56
+ expect(console.log).toHaveBeenCalledWith('Log message');
57
+ });
58
+
59
+ it('should return highlighted message with styles', () => {
60
+ const result = DyFM_Log.getHighlighted('Highlighted message');
61
+ expect(result).toBe(`${DyFM_LogStyle.white}${DyFM_LogStyle.bright}Highlighted message${DyFM_LogStyle.reset}`);
62
+ });
63
+
64
+ xit('should remove log styles from message', () => {
65
+ const styledMessage = `${DyFM_LogStyle.green}Styled message${DyFM_LogStyle.reset}`;
66
+ const result = DyFM_Log.removeLogStyles(styledMessage);
67
+ expect(result).toBe('Styled message');
68
+ });
69
+
70
+ xit('should silence all logs', () => {
71
+ DyFM_Log.silenceConsole();
72
+ console.log('Test');
73
+ console.info('Test');
74
+ console.warn('Test');
75
+ console.error('Test');
76
+ expect(console.log).not.toHaveBeenCalled();
77
+ expect(console.info).not.toHaveBeenCalled();
78
+ expect(console.warn).not.toHaveBeenCalled();
79
+ expect(console.error).not.toHaveBeenCalled();
80
+ });
81
+
82
+ xit('should silence non-error logs', () => {
83
+ DyFM_Log.silenceNonErrorLogs();
84
+ console.log('Test');
85
+ console.info('Test');
86
+ console.warn('Test');
87
+ console.error('Test');
88
+ expect(console.log).not.toHaveBeenCalled();
89
+ expect(console.info).not.toHaveBeenCalled();
90
+ expect(console.warn).not.toHaveBeenCalled();
91
+ expect(console.error).toHaveBeenCalled();
92
+ });
93
+
94
+ it('should add breaks and tabs to string parameters', () => {
95
+ const params = ['param1', 'param2', 123];
96
+ const result = DyFM_Log.addBreaksAndTabsToStringParams(params);
97
+ expect(result).toEqual(['\n param1', '\n param2', 123]);
98
+ });
99
+ });
@@ -101,6 +101,10 @@ export class DyFM_Log {
101
101
  console.log(message, ...optionalParams);
102
102
  }
103
103
 
104
+ static getHighlighted(message: string, ...optionalParams: any[]): string {
105
+ return `${DyFM_LogStyle.white}${DyFM_LogStyle.bright}${message}${DyFM_LogStyle.reset}`;
106
+ }
107
+
104
108
  static highlighted(message: string, ...optionalParams: any[]): void {
105
109
  if (0 < optionalParams.length) {
106
110
  console.log(
@@ -0,0 +1,63 @@
1
+
2
+ import { DyFM_BoxBounds } from './box-bounds.util';
3
+ import { DyFM_Vector2_Util } from './vector2.util';
4
+ import { DyFM_Vector2 } from '../../../_models/interfaces/vector2.interface';
5
+
6
+ describe('DyFM_BoxBounds', () => {
7
+ let boxBounds: DyFM_BoxBounds;
8
+ const position: DyFM_Vector2 = { x: 10, y: 20 };
9
+ const size: DyFM_Vector2 = { x: 30, y: 40 };
10
+
11
+ beforeEach(() => {
12
+ boxBounds = new DyFM_BoxBounds(position, size);
13
+ });
14
+
15
+ it('should initialize with given position and size', () => {
16
+ expect(boxBounds.pos.x).toBe(position.x);
17
+ expect(boxBounds.pos.y).toBe(position.y);
18
+ expect(boxBounds.size.x).toBe(size.x);
19
+ expect(boxBounds.size.y).toBe(size.y);
20
+ });
21
+
22
+ it('should calculate center correctly', () => {
23
+ const expectedCenter = DyFM_Vector2_Util.plus(position, DyFM_Vector2_Util.divide(size, 2));
24
+ expect(boxBounds.center.x).toBe(expectedCenter.x);
25
+ expect(boxBounds.center.y).toBe(expectedCenter.y);
26
+ });
27
+
28
+ it('should update position and size with newValues method', () => {
29
+ const newPosition: DyFM_Vector2 = { x: 50, y: 60 };
30
+ const newSize: DyFM_Vector2 = { x: 70, y: 80 };
31
+ boxBounds.newValues(newPosition, newSize);
32
+
33
+ expect(boxBounds.pos.x).toBe(newPosition.x);
34
+ expect(boxBounds.pos.y).toBe(newPosition.y);
35
+ expect(boxBounds.size.x).toBe(newSize.x);
36
+ expect(boxBounds.size.y).toBe(newSize.y);
37
+ });
38
+
39
+ it('should throw error if newValues is called with undefined position', () => {
40
+ expect(() => boxBounds.newValues(undefined as any, size)).toThrowError('new position is undefined!');
41
+ });
42
+
43
+ it('should throw error if newValues is called with undefined size', () => {
44
+ expect(() => boxBounds.newValues(position, undefined as any)).toThrowError('new size is undefined!');
45
+ });
46
+
47
+ it('should correctly determine if a position is within bounds', () => {
48
+ const insidePosition: DyFM_Vector2 = { x: 20, y: 30 };
49
+ const outsidePosition: DyFM_Vector2 = { x: 100, y: 100 };
50
+
51
+ expect(boxBounds.bounds(insidePosition)).toBeTrue();
52
+ expect(boxBounds.bounds(outsidePosition)).toBeFalse();
53
+ });
54
+
55
+ it('should clone itself correctly', () => {
56
+ const clone = boxBounds.clone();
57
+ expect(clone.pos.x).toBe(boxBounds.pos.x);
58
+ expect(clone.pos.y).toBe(boxBounds.pos.y);
59
+ expect(clone.size.x).toBe(boxBounds.size.x);
60
+ expect(clone.size.y).toBe(boxBounds.size.y);
61
+ expect(clone).not.toBe(boxBounds);
62
+ });
63
+ });
@@ -0,0 +1,104 @@
1
+
2
+ import { DyFM_Math } from './math.util';
3
+
4
+ describe('DyFM_Math', () => {
5
+
6
+ describe('between', () => {
7
+ it('should return true if value is between minExclusive and maxExclusive', () => {
8
+ expect(DyFM_Math.between(5, 1, 10)).toBeTrue();
9
+ });
10
+
11
+ it('should return false if value is equal to minExclusive', () => {
12
+ expect(DyFM_Math.between(1, 1, 10)).toBeFalse();
13
+ });
14
+
15
+ it('should return false if value is equal to maxExclusive', () => {
16
+ expect(DyFM_Math.between(10, 1, 10)).toBeFalse();
17
+ });
18
+
19
+ it('should return false if value is outside the range', () => {
20
+ expect(DyFM_Math.between(0, 1, 10)).toBeFalse();
21
+ expect(DyFM_Math.between(11, 1, 10)).toBeFalse();
22
+ });
23
+ });
24
+
25
+ describe('around', () => {
26
+ xit('should return true if value is within the range of target', () => {
27
+ expect(DyFM_Math.around(5, 5, 0)).toBeTrue();
28
+ expect(DyFM_Math.around(5, 5, 1)).toBeTrue();
29
+ expect(DyFM_Math.around(4, 5, 1)).toBeTrue();
30
+ expect(DyFM_Math.around(6, 5, 1)).toBeTrue();
31
+ });
32
+
33
+ it('should return false if value is outside the range of target', () => {
34
+ expect(DyFM_Math.around(3, 5, 1)).toBeFalse();
35
+ expect(DyFM_Math.around(7, 5, 1)).toBeFalse();
36
+ });
37
+ });
38
+
39
+ describe('getRandomInt', () => {
40
+ it('should return an integer within the specified range', () => {
41
+ const min = 1;
42
+ const max = 10;
43
+ const result = DyFM_Math.getRandomInt(min, max);
44
+ expect(result).toBeGreaterThanOrEqual(min);
45
+ expect(result).toBeLessThanOrEqual(max);
46
+ });
47
+ });
48
+
49
+ describe('round', () => {
50
+ it('should round a number to the specified number of decimals', () => {
51
+ expect(DyFM_Math.round(1.2345, 2)).toBe(1.23);
52
+ expect(DyFM_Math.round(1.2355, 2)).toBe(1.24);
53
+ });
54
+
55
+ it('should round a number to the nearest integer if decimals is 0', () => {
56
+ expect(DyFM_Math.round(1.5, 0)).toBe(2);
57
+ expect(DyFM_Math.round(1.4, 0)).toBe(1);
58
+ });
59
+
60
+ it('should round a number to the nearest multiple of 10 if decimals is negative', () => {
61
+ expect(DyFM_Math.round(123, -1)).toBe(120);
62
+ expect(DyFM_Math.round(125, -1)).toBe(130);
63
+ });
64
+ });
65
+
66
+ describe('numberWithSpaces', () => {
67
+ it('should format a number with spaces as thousand separators', () => {
68
+ expect(DyFM_Math.numberWithSpaces(1000)).toBe('1 000');
69
+ expect(DyFM_Math.numberWithSpaces(1000000)).toBe('1 000 000');
70
+ });
71
+ });
72
+
73
+ describe('numberWithShorters', () => {
74
+ it('should format a number with k, M, or B as appropriate', () => {
75
+ expect(DyFM_Math.numberWithShorters(999)).toBe('999');
76
+ expect(DyFM_Math.numberWithShorters(1000)).toBe('1.0k');
77
+ expect(DyFM_Math.numberWithShorters(1000000)).toBe('1.00M');
78
+ expect(DyFM_Math.numberWithShorters(1000000000)).toBe('1.000B');
79
+ });
80
+ });
81
+
82
+ describe('numberWithShortersAndSpaces', () => {
83
+ it('should format a number with shorters and spaces', () => {
84
+ expect(DyFM_Math.numberWithShortersAndSpaces(1000)).toBe('1.0k');
85
+ expect(DyFM_Math.numberWithShortersAndSpaces(1000000)).toBe('1.00M');
86
+ expect(DyFM_Math.numberWithShortersAndSpaces(1000000000)).toBe('1.000B');
87
+ });
88
+ });
89
+
90
+ describe('floatingNumberWithSpaces', () => {
91
+ it('should format a floating number with spaces as thousand separators', () => {
92
+ expect(DyFM_Math.floatingNumberWithSpaces(1234.567)).toBe('1 234.567');
93
+ expect(DyFM_Math.floatingNumberWithSpaces(1234567.89)).toBe('1 234 567.89');
94
+ });
95
+ });
96
+
97
+ describe('decimals', () => {
98
+ it('should format a number with a custom spacer', () => {
99
+ expect(DyFM_Math.decimals(1234.567, ',')).toBe('1,234.567');
100
+ expect(DyFM_Math.decimals(1234567.89, '.')).toBe('1.234.567.89');
101
+ });
102
+ });
103
+
104
+ });