@m4l/testing 0.0.24 → 1.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 (235) hide show
  1. package/README.md +679 -0
  2. package/chunks/reactLeaflet-Cffkauof.js +1846 -0
  3. package/chunks/render-CsuV8xqo.js +17 -0
  4. package/chunks/userPreferences-BmOgRaIX.js +493 -0
  5. package/index.js +76 -25
  6. package/mocks/index.js +41 -0
  7. package/package.json +84 -69
  8. package/playwright/index.js +2041 -0
  9. package/rtl/index.js +180 -0
  10. package/types/libs/observability/mf/src/browserRuntimeHandles.d.ts +112 -0
  11. package/types/libs/observability/mf/src/diagnosticLogging.d.ts +2 -0
  12. package/types/libs/observability/mf/src/diagnosticPolicies/catalog.d.ts +267 -0
  13. package/types/libs/observability/mf/src/diagnosticPolicies/contracts.d.ts +64 -0
  14. package/types/libs/observability/mf/src/diagnosticPolicies/host.d.ts +139 -0
  15. package/types/libs/observability/mf/src/diagnosticPolicies/index.d.ts +6 -0
  16. package/types/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.d.ts +104 -0
  17. package/types/libs/observability/mf/src/diagnosticPolicies/sharedReportsList.d.ts +44 -0
  18. package/types/libs/observability/mf/src/diagnosticPolicyKeys.d.ts +34 -0
  19. package/types/libs/observability/mf/src/index.d.ts +14 -0
  20. package/types/libs/observability/mf/src/runtimeSmoke.d.ts +13 -0
  21. package/types/libs/observability/mf/src/telemetry.d.ts +2 -0
  22. package/types/libs/observability/shared/src/diagnosticLogging.d.ts +97 -0
  23. package/types/libs/observability/shared/src/index.d.ts +6 -0
  24. package/types/libs/observability/shared/src/runtimeHandles.d.ts +27 -0
  25. package/types/libs/observability/shared/src/telemetry.d.ts +179 -0
  26. package/types/packages/testing/mocks/src/constants.d.ts +10 -0
  27. package/types/packages/testing/mocks/src/fixtures.d.ts +258 -0
  28. package/types/packages/testing/mocks/src/helpers/environment.d.ts +44 -0
  29. package/types/packages/testing/mocks/src/helpers/hostTools.d.ts +10 -0
  30. package/types/packages/testing/mocks/src/helpers/index.d.ts +5 -0
  31. package/types/packages/testing/mocks/src/helpers/moduleDictionary.d.ts +9 -0
  32. package/types/packages/testing/mocks/src/helpers/toaster.d.ts +9 -0
  33. package/types/packages/testing/mocks/src/helpers/userPreferences.d.ts +17 -0
  34. package/types/packages/testing/mocks/src/index.d.ts +4 -0
  35. package/types/packages/testing/mocks/src/types.d.ts +233 -0
  36. package/types/packages/testing/playwright/src/fixtures/createHostAreaFixture.d.ts +5 -0
  37. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfMenuFixture.d.ts +5 -0
  38. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfModuleDictionaryFixture.d.ts +5 -0
  39. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedSessionFixture.d.ts +6 -0
  40. package/types/packages/testing/playwright/src/fixtures/createHostCookieFixture.d.ts +5 -0
  41. package/types/packages/testing/playwright/src/fixtures/createHostGuestSessionFixture.d.ts +5 -0
  42. package/types/packages/testing/playwright/src/fixtures/createHostLocaleFixture.d.ts +5 -0
  43. package/types/packages/testing/playwright/src/fixtures/createHostMfPreviewDynamicParamsFixture.d.ts +5 -0
  44. package/types/packages/testing/playwright/src/fixtures/createHostModuleDictionaryFixture.d.ts +11 -0
  45. package/types/packages/testing/playwright/src/fixtures/createHostUiConfigFixture.d.ts +7 -0
  46. package/types/packages/testing/playwright/src/fixtures/createHostUserPreferencesFixture.d.ts +6 -0
  47. package/types/packages/testing/playwright/src/fixtures/createListResponseFixture.d.ts +6 -0
  48. package/types/packages/testing/playwright/src/fixtures/index.d.ts +12 -0
  49. package/types/packages/testing/playwright/src/helpers/attachJson.d.ts +9 -0
  50. package/types/packages/testing/playwright/src/helpers/formAccess.d.ts +53 -0
  51. package/types/packages/testing/playwright/src/helpers/formSelect.d.ts +51 -0
  52. package/types/packages/testing/playwright/src/helpers/formatFailedChecks.d.ts +18 -0
  53. package/types/packages/testing/playwright/src/helpers/index.d.ts +16 -0
  54. package/types/packages/testing/playwright/src/helpers/listDatagrid.d.ts +219 -0
  55. package/types/packages/testing/playwright/src/helpers/listDetail.d.ts +65 -0
  56. package/types/packages/testing/playwright/src/helpers/listFilter.d.ts +27 -0
  57. package/types/packages/testing/playwright/src/helpers/listSort.d.ts +19 -0
  58. package/types/packages/testing/playwright/src/helpers/listStatePersistence.d.ts +15 -0
  59. package/types/packages/testing/playwright/src/helpers/openHostAccountMenuModule.d.ts +10 -0
  60. package/types/packages/testing/playwright/src/helpers/openHostAuthenticatedMfPreviewModule.d.ts +5 -0
  61. package/types/packages/testing/playwright/src/helpers/openHostMobileSidebarModule.d.ts +15 -0
  62. package/types/packages/testing/playwright/src/helpers/openHostSidebarModule.d.ts +5 -0
  63. package/types/packages/testing/playwright/src/helpers/realtimePerformanceBrowser.d.ts +144 -0
  64. package/types/packages/testing/playwright/src/helpers/viewModeDataGrid.d.ts +67 -0
  65. package/types/packages/testing/playwright/src/helpers/waitForBrowserCondition.d.ts +38 -0
  66. package/types/packages/testing/playwright/src/index.d.ts +11 -0
  67. package/types/packages/testing/playwright/src/installers/index.d.ts +20 -0
  68. package/types/packages/testing/playwright/src/installers/installHostAlarmsCountRoute.d.ts +5 -0
  69. package/types/packages/testing/playwright/src/installers/installHostAreasRoute.d.ts +5 -0
  70. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedBootstrapRoutes.d.ts +6 -0
  71. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfModuleDictionaryRoute.d.ts +5 -0
  72. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfPreviewBootstrap.d.ts +11 -0
  73. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedSessionRoute.d.ts +6 -0
  74. package/types/packages/testing/playwright/src/installers/installHostCookiesRoute.d.ts +8 -0
  75. package/types/packages/testing/playwright/src/installers/installHostGuestBootstrapRoutes.d.ts +7 -0
  76. package/types/packages/testing/playwright/src/installers/installHostGuestSessionRoute.d.ts +7 -0
  77. package/types/packages/testing/playwright/src/installers/installHostLocaleRoute.d.ts +5 -0
  78. package/types/packages/testing/playwright/src/installers/installHostMenusRoute.d.ts +11 -0
  79. package/types/packages/testing/playwright/src/installers/installHostModuleDictionaryRoute.d.ts +6 -0
  80. package/types/packages/testing/playwright/src/installers/installHostPasswordNewRoute.d.ts +6 -0
  81. package/types/packages/testing/playwright/src/installers/installHostPasswordResetRoute.d.ts +6 -0
  82. package/types/packages/testing/playwright/src/installers/installHostUiConfigAssetRoutes.d.ts +9 -0
  83. package/types/packages/testing/playwright/src/installers/installHostUiConfigRoute.d.ts +7 -0
  84. package/types/packages/testing/playwright/src/installers/installHostUserPreferencesRoute.d.ts +6 -0
  85. package/types/packages/testing/playwright/src/installers/installListEndpointRoute.d.ts +7 -0
  86. package/types/packages/testing/playwright/src/installers/installMicrofrontendRenderStub.d.ts +9 -0
  87. package/types/packages/testing/playwright/src/installers/installModulePrivilegesRoute.d.ts +11 -0
  88. package/types/packages/testing/playwright/src/types.d.ts +598 -0
  89. package/types/packages/testing/rtl/src/index.d.ts +4 -0
  90. package/types/packages/testing/rtl/src/matchMedia.d.ts +10 -0
  91. package/types/packages/testing/rtl/src/render.d.ts +17 -0
  92. package/types/packages/testing/rtl/src/resizeObserver.d.ts +33 -0
  93. package/types/packages/testing/rtl/src/storage.d.ts +10 -0
  94. package/types/packages/testing/src/index.d.ts +6 -0
  95. package/types/packages/testing/vitest/src/constants.d.ts +24 -0
  96. package/types/packages/testing/vitest/src/factories/app/index.d.ts +5 -0
  97. package/types/packages/testing/vitest/src/factories/app/m4lAppBase.d.ts +9 -0
  98. package/types/packages/testing/vitest/src/factories/app/m4lAppComponents.d.ts +20 -0
  99. package/types/packages/testing/vitest/src/factories/app/m4lAppCore.d.ts +12 -0
  100. package/types/packages/testing/vitest/src/factories/app/m4lAppGraphics.d.ts +10 -0
  101. package/types/packages/testing/vitest/src/factories/app/m4lAppLayouts.d.ts +18 -0
  102. package/types/packages/testing/vitest/src/factories/base/index.d.ts +1 -0
  103. package/types/packages/testing/vitest/src/factories/base/m4lBaseComponents.d.ts +13 -0
  104. package/types/packages/testing/vitest/src/factories/index.d.ts +7 -0
  105. package/types/packages/testing/vitest/src/factories/leaflet.d.ts +10 -0
  106. package/types/packages/testing/vitest/src/factories/packages/index.d.ts +7 -0
  107. package/types/packages/testing/vitest/src/factories/packages/m4lPackageBase.d.ts +11 -0
  108. package/types/packages/testing/vitest/src/factories/packages/m4lPackageComponents.d.ts +11 -0
  109. package/types/packages/testing/vitest/src/factories/packages/m4lPackageCore.d.ts +11 -0
  110. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclick.d.ts +10 -0
  111. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclickRealtime.d.ts +6 -0
  112. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGraphics.d.ts +9 -0
  113. package/types/packages/testing/vitest/src/factories/packages/m4lPackageLayouts.d.ts +10 -0
  114. package/types/packages/testing/vitest/src/factories/reResizable.d.ts +6 -0
  115. package/types/packages/testing/vitest/src/factories/reactHookForm.d.ts +10 -0
  116. package/types/packages/testing/vitest/src/factories/reactLeaflet.d.ts +10 -0
  117. package/types/packages/testing/vitest/src/fixtures.d.ts +71 -0
  118. package/types/packages/testing/vitest/src/helpers/columnConfigs.d.ts +184 -0
  119. package/types/packages/testing/vitest/src/helpers/elementMocks.d.ts +166 -0
  120. package/types/packages/testing/vitest/src/helpers/filterFields.d.ts +37 -0
  121. package/types/packages/testing/vitest/src/helpers/index.d.ts +9 -0
  122. package/types/packages/testing/vitest/src/helpers/mapStore.d.ts +9 -0
  123. package/types/packages/testing/vitest/src/helpers/moduleContract.d.ts +15 -0
  124. package/types/packages/testing/vitest/src/helpers/rhf.d.ts +8 -0
  125. package/types/packages/testing/vitest/src/helpers/serialization.d.ts +7 -0
  126. package/types/packages/testing/vitest/src/helpers/sortFields.d.ts +28 -0
  127. package/types/packages/testing/vitest/src/helpers/windowSizes.d.ts +1 -0
  128. package/types/packages/testing/vitest/src/index.d.ts +6 -0
  129. package/types/packages/testing/vitest/src/installers/consoleError.d.ts +9 -0
  130. package/types/packages/testing/vitest/src/installers/index.d.ts +2 -0
  131. package/types/packages/testing/vitest/src/installers/rhfSubmit.d.ts +9 -0
  132. package/types/packages/testing/vitest/src/types.d.ts +116 -0
  133. package/vitest/index.js +55 -0
  134. package/e2e/commands/components/Accordions/commands.d.ts +0 -4
  135. package/e2e/commands/components/Accordions/commands.js +0 -19
  136. package/e2e/commands/components/Accordions/types.d.ts +0 -63
  137. package/e2e/commands/components/CommonActions/commands.d.ts +0 -4
  138. package/e2e/commands/components/CommonActions/commands.js +0 -11
  139. package/e2e/commands/components/CommonActions/types.d.ts +0 -20
  140. package/e2e/commands/components/DataGrid/commands.d.ts +0 -4
  141. package/e2e/commands/components/DataGrid/commands.js +0 -42
  142. package/e2e/commands/components/DataGrid/types.d.ts +0 -140
  143. package/e2e/commands/components/DynamicFilter/commands.d.ts +0 -4
  144. package/e2e/commands/components/DynamicFilter/commands.js +0 -12
  145. package/e2e/commands/components/DynamicFilter/types.d.ts +0 -27
  146. package/e2e/commands/components/DynamicSort/commands.d.ts +0 -4
  147. package/e2e/commands/components/DynamicSort/commands.js +0 -10
  148. package/e2e/commands/components/DynamicSort/types.d.ts +0 -26
  149. package/e2e/commands/components/Filters/commands.d.ts +0 -4
  150. package/e2e/commands/components/Filters/commands.js +0 -24
  151. package/e2e/commands/components/Filters/types.d.ts +0 -91
  152. package/e2e/commands/components/Form/commands.d.ts +0 -4
  153. package/e2e/commands/components/Form/commands.js +0 -11
  154. package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.d.ts +0 -5
  155. package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.js +0 -20
  156. package/e2e/commands/components/Form/cypress/assertInitialFormState/type.d.ts +0 -105
  157. package/e2e/commands/components/Form/cypress/assertInitialFormState/type.js +0 -1
  158. package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.d.ts +0 -17
  159. package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.js +0 -14
  160. package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.d.ts +0 -28
  161. package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.js +0 -1
  162. package/e2e/commands/components/Form/cypress/constants.d.ts +0 -3
  163. package/e2e/commands/components/Form/cypress/constants.js +0 -6
  164. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.d.ts +0 -8
  165. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.js +0 -29
  166. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.d.ts +0 -5
  167. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.js +0 -1
  168. package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.d.ts +0 -20
  169. package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.js +0 -8
  170. package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.d.ts +0 -10
  171. package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.js +0 -6
  172. package/e2e/commands/components/Form/cypress/proceedFormStep/type.d.ts +0 -13
  173. package/e2e/commands/components/Form/helpers/getFieldNameDomElement.d.ts +0 -7
  174. package/e2e/commands/components/Form/helpers/getFieldNameDomElement.js +0 -13
  175. package/e2e/commands/components/Form/types.d.ts +0 -88
  176. package/e2e/commands/components/MenuActions/commands.d.ts +0 -4
  177. package/e2e/commands/components/MenuActions/commands.js +0 -8
  178. package/e2e/commands/components/MenuActions/types.d.ts +0 -24
  179. package/e2e/commands/components/Popover/commands.d.ts +0 -4
  180. package/e2e/commands/components/Popover/commands.js +0 -8
  181. package/e2e/commands/components/Popover/types.d.ts +0 -15
  182. package/e2e/commands/components/PropertyValue/commands.d.ts +0 -4
  183. package/e2e/commands/components/PropertyValue/commands.js +0 -8
  184. package/e2e/commands/components/PropertyValue/types.d.ts +0 -19
  185. package/e2e/commands/components/Tab/commands.d.ts +0 -4
  186. package/e2e/commands/components/Tab/commands.js +0 -9
  187. package/e2e/commands/components/Tab/types.d.ts +0 -29
  188. package/e2e/commands/components/WindowBase/commands.d.ts +0 -4
  189. package/e2e/commands/components/WindowBase/commands.js +0 -24
  190. package/e2e/commands/components/WindowBase/types.d.ts +0 -100
  191. package/e2e/commands/components/index.d.ts +0 -12
  192. package/e2e/commands/components/index.js +0 -1
  193. package/e2e/commands/index.d.ts +0 -7
  194. package/e2e/commands/index.js +0 -1
  195. package/e2e/commands/intercepts/index.d.ts +0 -2
  196. package/e2e/commands/intercepts/index.js +0 -1
  197. package/e2e/commands/intercepts/noPrivileges/interceptCommands.d.ts +0 -5
  198. package/e2e/commands/intercepts/noPrivileges/interceptCommands.js +0 -15
  199. package/e2e/commands/intercepts/noPrivileges/types.d.ts +0 -8
  200. package/e2e/commands/intercepts/noPrivileges/types.js +0 -1
  201. package/e2e/commands/register.d.ts +0 -4
  202. package/e2e/commands/register.js +0 -19
  203. package/e2e/cypress.d.js +0 -1
  204. package/e2e/cypress.d.ts +0 -24
  205. package/e2e/index.d.ts +0 -1
  206. package/e2e/types.d.ts +0 -4
  207. package/index.d.ts +0 -4
  208. package/index.test.d.ts +0 -1
  209. package/testComponents/DataGrid/helpers.d.ts +0 -5
  210. package/testComponents/DataGrid/helpers.js +0 -95
  211. package/testComponents/DataGrid/index.d.ts +0 -2
  212. package/testComponents/DataGrid/index.js +0 -1
  213. package/testComponents/DataGrid/types.d.ts +0 -54
  214. package/testComponents/DataGrid/types.js +0 -1
  215. package/testComponents/DynamicFilter/helpers.d.ts +0 -5
  216. package/testComponents/DynamicFilter/helpers.js +0 -18
  217. package/testComponents/DynamicFilter/index.d.ts +0 -1
  218. package/testComponents/DynamicFilter/index.js +0 -1
  219. package/testComponents/DynamicFilter/types.d.ts +0 -0
  220. package/testComponents/DynamicSort/helpers.d.ts +0 -5
  221. package/testComponents/DynamicSort/helpers.js +0 -16
  222. package/testComponents/DynamicSort/index.d.ts +0 -1
  223. package/testComponents/DynamicSort/index.js +0 -1
  224. package/testComponents/index.d.ts +0 -3
  225. package/testComponents/index.js +0 -1
  226. package/testTools/constants.d.ts +0 -0
  227. package/testTools/index.d.ts +0 -1
  228. package/testTools/index.js +0 -1
  229. package/testTools/mocks.d.ts +0 -0
  230. package/testTools/setup.d.ts +0 -0
  231. package/testTools/setup.js +0 -1
  232. package/testTools/types.d.ts +0 -0
  233. package/testTools/utils.d.ts +0 -11
  234. package/testTools/utils.js +0 -23
  235. package/vite-env.d.ts +0 -5
@@ -0,0 +1,17 @@
1
+ import { cleanup as o, render as s } from "@testing-library/react";
2
+ import c from "@testing-library/user-event";
3
+ import { afterEach as p, vi as u } from "vitest";
4
+ p(() => {
5
+ o(), u.clearAllMocks();
6
+ });
7
+ const f = (r, e = {}) => ({
8
+ ...s(r, {
9
+ // Wrap provider(s) here if needed.
10
+ wrapper: ({ children: t }) => t,
11
+ ...e
12
+ }),
13
+ user: c.setup()
14
+ });
15
+ export {
16
+ f as c
17
+ };
@@ -0,0 +1,493 @@
1
+ import { createMemoryHistory as k } from "history";
2
+ import { format as I } from "date-fns";
3
+ const z = "testing", P = "label_for_module_name", X = {
4
+ data: { module_name: P, label1: "testGetLabel1" },
5
+ comp1: { key1: "testcomp1label" }
6
+ }, Z = ["priv1"], N = {
7
+ data: { priv1: !0 }
8
+ }, R = {
9
+ data: {
10
+ name: "a",
11
+ company_logo_small_url: "b",
12
+ company_logo_normal_url: "c"
13
+ }
14
+ }, T = {
15
+ id: 1,
16
+ currency: "$",
17
+ currency_decimal_digits: 0,
18
+ decimal_symbol: ".",
19
+ thousands_symbol: ","
20
+ }, w = {
21
+ id: 2,
22
+ currency: "USD",
23
+ currency_decimal_digits: 2,
24
+ decimal_symbol: ",",
25
+ thousands_symbol: "."
26
+ }, f = {
27
+ decimalSymbol: ".",
28
+ thousandsSymbol: ",",
29
+ dateFormat: "yyyy-MM-dd",
30
+ timeFormat: "HH:mm:ss",
31
+ timeZone: {
32
+ id: 1,
33
+ name: "America/Bogota",
34
+ title: "Bogota",
35
+ baseOffset: -5,
36
+ dstOffset: -5,
37
+ countryCode: "CO"
38
+ },
39
+ locale: "en-US",
40
+ magnitudesSystemId: -1,
41
+ properties: [
42
+ {
43
+ baseMagnitudeId: "m_speed",
44
+ id: "p_gnss_speed",
45
+ magnitudeUnitBase: {
46
+ id: "mu_meters_per_second",
47
+ symbol: "m/s"
48
+ },
49
+ magnitudeUnitUser: {
50
+ id: "mu_kilometers_per_hour",
51
+ symbol: "km/h"
52
+ },
53
+ factor: {
54
+ factorX0: 0,
55
+ factorX1: 3.6,
56
+ factorX2: 0
57
+ }
58
+ },
59
+ {
60
+ baseMagnitudeId: "m_distance",
61
+ id: "p_gnss_odometer",
62
+ magnitudeUnitBase: {
63
+ id: "mu_meters",
64
+ symbol: "m"
65
+ },
66
+ magnitudeUnitUser: {
67
+ id: "mu_kilometers",
68
+ symbol: "km"
69
+ },
70
+ factor: {
71
+ factorX0: 0,
72
+ factorX1: 1e-3,
73
+ factorX2: 0
74
+ }
75
+ }
76
+ ],
77
+ currency: "USD",
78
+ currencyDecimalDigits: 2
79
+ }, n = {
80
+ locale: {
81
+ id: "en-US",
82
+ lang: "en",
83
+ region: "US",
84
+ script: "",
85
+ name: "English US",
86
+ url_icon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/commons/assets/icons/langs/lang_en.svg"
87
+ },
88
+ time_zone: {
89
+ id: 1,
90
+ name: "America/Bogota",
91
+ title: "Bogota",
92
+ base_offset: -5,
93
+ dst_offset: -5,
94
+ country_code: "CO"
95
+ },
96
+ magnitudes_system: {
97
+ id: -1,
98
+ name: "International system"
99
+ },
100
+ properties: [
101
+ {
102
+ base_magnitude_id: "m_speed",
103
+ id: "p_gnss_speed",
104
+ value: {
105
+ magnitude_unit_base: {
106
+ id: "mu_meters_per_second",
107
+ symbol: "m/s"
108
+ },
109
+ magnitude_unit_user: {
110
+ id: "mu_kilometers_per_hour",
111
+ symbol: "km/h"
112
+ },
113
+ factor: {
114
+ factor_x0: 0,
115
+ factor_x1: 3.6,
116
+ factor_x2: 0
117
+ }
118
+ }
119
+ },
120
+ {
121
+ base_magnitude_id: "m_distance",
122
+ id: "p_gnss_odometer",
123
+ value: {
124
+ magnitude_unit_base: {
125
+ id: "mu_meters",
126
+ symbol: "m"
127
+ },
128
+ magnitude_unit_user: {
129
+ id: "mu_kilometers",
130
+ symbol: "km"
131
+ },
132
+ factor: {
133
+ factor_x0: 0,
134
+ factor_x1: 1e-3,
135
+ factor_x2: 0
136
+ }
137
+ }
138
+ }
139
+ ],
140
+ date_format: {
141
+ id: -1,
142
+ format: "yyyy-MM-dd",
143
+ name: "2026-06-01 (yyyy-MM-dd)"
144
+ },
145
+ time_format: {
146
+ id: -1,
147
+ format: "HH:mm:ss",
148
+ name: "24-hour (13:04:05)"
149
+ },
150
+ decimal_symbol: ".",
151
+ thousands_symbol: ",",
152
+ currency: "USD",
153
+ currency_decimal_digits: 2
154
+ }, C = {
155
+ data: { a: 1, b: "testing" }
156
+ }, O = {
157
+ method: "GET",
158
+ endPoint: "endpoint",
159
+ parms: {}
160
+ }, D = {
161
+ isLocalhost: !0,
162
+ host: "h2",
163
+ database: "domain",
164
+ domain_token: "1",
165
+ domainToken: "1",
166
+ host_api_local: "2",
167
+ hostApiLocal: "2",
168
+ host_api_remote: "https://localhost",
169
+ hostApiRemote: "https://localhost",
170
+ hostRemote: "localhost",
171
+ hostApiIcons: "https://localhost/main/icons",
172
+ host_static_assets: "4",
173
+ environment_assets: "5",
174
+ isIsolatation: !1,
175
+ isMicroFrontend: !1,
176
+ getModuleUrlIconAsset: () => ""
177
+ }, A = {
178
+ host_static_assets: "https://s3.amazonaws.com/static.made4labs/environments",
179
+ environment_assets: "d1",
180
+ host_api_local: "http://localhost:3000/domain",
181
+ hostApiLocal: "http://localhost:3000/domain",
182
+ host_api_remote: "https://lab1.stage.made4labs.com/api/v1/domain",
183
+ hostApiRemote: "https://lab1.stage.made4labs.com/api/v1/domain",
184
+ domain_token: "lab1",
185
+ domainToken: "lab1",
186
+ hostRemote: "lab1.stage.made4labs.com",
187
+ hostApiIcons: "https://lab1.stage.made4labs.com/api/v1/main/icons"
188
+ }, E = {
189
+ a: "hellou",
190
+ b: 1
191
+ }, L = {
192
+ currencyFormatter: { decimalDigits: 0, code: "$" },
193
+ numberFormatter: { decimalSymbol: ".", thousandsSymbol: "," },
194
+ dateFormatter: {
195
+ dateFormat: "yyyy-MM-dd",
196
+ dateMask: "____-__-__",
197
+ datetimeFormat: "yyyy-MM-dd HH:mm:ss",
198
+ datetimeMask: "____-__-__ __:__:__",
199
+ timeFormat: "HH:mm:ss",
200
+ timeMask: "__:__:__",
201
+ formatDate: I
202
+ }
203
+ };
204
+ function j(e = {}) {
205
+ return {
206
+ ...D,
207
+ ...e
208
+ };
209
+ }
210
+ function q(e = {}) {
211
+ return {
212
+ ...A,
213
+ ...e
214
+ };
215
+ }
216
+ function d(e) {
217
+ return () => e;
218
+ }
219
+ function V() {
220
+ const e = d(0);
221
+ return e.info = d(1), e.success = d(2), e.warning = d(3), e.error = d(4), e;
222
+ }
223
+ const _ = () => {
224
+ };
225
+ function G(e = {}) {
226
+ return {
227
+ history: k(),
228
+ toast: V(),
229
+ startProgress: _,
230
+ stopProgress: _,
231
+ events_add_listener: _,
232
+ events_remove_listener: _,
233
+ events_emit: _,
234
+ ...e
235
+ };
236
+ }
237
+ function b(e, t) {
238
+ return {
239
+ source: "fallback",
240
+ symbol: t,
241
+ value: e
242
+ };
243
+ }
244
+ function y(e, t) {
245
+ const o = e.startsWith("-") ? "-" : "", a = o === "-" ? e.slice(1) : e;
246
+ return `${o}${a.replace(/\B(?=(\d{3})+(?!\d))/g, t)}`;
247
+ }
248
+ function B(e, t) {
249
+ const {
250
+ fallbackValue: o,
251
+ formatValue: a,
252
+ fractionDigits: s,
253
+ value: i
254
+ } = t;
255
+ if (typeof i != "number" || !Number.isFinite(i))
256
+ return o;
257
+ if (a)
258
+ return a(i);
259
+ if (typeof s == "number" && Number.isInteger(s) && s >= 0) {
260
+ const [m, c = ""] = i.toFixed(s).split("."), u = y(
261
+ m,
262
+ e.thousandsSymbol
263
+ );
264
+ return c === "" ? u : `${u}${e.decimalSymbol}${c}`;
265
+ }
266
+ const [g, r] = String(i).split("."), p = y(
267
+ g,
268
+ e.thousandsSymbol
269
+ );
270
+ return r === void 0 ? p : `${p}${e.decimalSymbol}${r}`;
271
+ }
272
+ function h(e, t) {
273
+ const o = typeof t.propertyId == "string" ? t.propertyId.trim() : "", a = typeof t.baseMagnitudeId == "string" ? t.baseMagnitudeId.trim() : "";
274
+ if (o !== "") {
275
+ const s = e.properties.find(
276
+ (i) => i.id === o
277
+ );
278
+ if (s)
279
+ return s;
280
+ }
281
+ if (a !== "")
282
+ return e.properties.find(
283
+ (s) => s.baseMagnitudeId === a
284
+ );
285
+ }
286
+ function F(e = {}) {
287
+ const t = f.properties[0];
288
+ return {
289
+ ...t,
290
+ ...e,
291
+ magnitudeUnitBase: {
292
+ ...t.magnitudeUnitBase,
293
+ ...e.magnitudeUnitBase
294
+ },
295
+ magnitudeUnitUser: {
296
+ ...t.magnitudeUnitUser,
297
+ ...e.magnitudeUnitUser
298
+ },
299
+ factor: {
300
+ ...t.factor,
301
+ ...e.factor
302
+ }
303
+ };
304
+ }
305
+ function Q(e = {}) {
306
+ let t = x(e);
307
+ const o = (r) => {
308
+ t = x(r);
309
+ }, a = (r) => h(t, r), s = (r) => B(t, r), g = {
310
+ changeUserPreferences: o,
311
+ convertMagnitude: (r) => {
312
+ const {
313
+ baseMagnitudeId: p,
314
+ baseValue: m,
315
+ fallbackSymbol: c,
316
+ fallbackValue: u,
317
+ formatValue: U,
318
+ fractionDigits: M,
319
+ propertyId: v
320
+ } = r;
321
+ if (typeof m != "number" || !Number.isFinite(m))
322
+ return b(u, c);
323
+ try {
324
+ const l = h(
325
+ t,
326
+ {
327
+ propertyId: v,
328
+ baseMagnitudeId: p
329
+ }
330
+ );
331
+ if (!l)
332
+ return b(u, c);
333
+ const S = l.factor.factorX0 + l.factor.factorX1 * m + l.factor.factorX2 * m * m;
334
+ return {
335
+ source: "user-preference",
336
+ symbol: l.magnitudeUnitUser.symbol,
337
+ value: s({
338
+ value: S,
339
+ fallbackValue: u,
340
+ fractionDigits: M,
341
+ formatValue: U
342
+ })
343
+ };
344
+ } catch {
345
+ return b(u, c);
346
+ }
347
+ },
348
+ formatNumber: s,
349
+ getMagnitudeProperty: a
350
+ };
351
+ return Object.defineProperties(g, {
352
+ decimalSymbol: {
353
+ enumerable: !0,
354
+ get: () => t.decimalSymbol
355
+ },
356
+ thousandsSymbol: {
357
+ enumerable: !0,
358
+ get: () => t.thousandsSymbol
359
+ },
360
+ dateFormat: {
361
+ enumerable: !0,
362
+ get: () => t.dateFormat
363
+ },
364
+ timeFormat: {
365
+ enumerable: !0,
366
+ get: () => t.timeFormat
367
+ },
368
+ timeZone: {
369
+ enumerable: !0,
370
+ get: () => t.timeZone
371
+ },
372
+ locale: {
373
+ enumerable: !0,
374
+ get: () => t.locale
375
+ },
376
+ magnitudesSystemId: {
377
+ enumerable: !0,
378
+ get: () => t.magnitudesSystemId
379
+ },
380
+ properties: {
381
+ enumerable: !0,
382
+ get: () => t.properties
383
+ },
384
+ currency: {
385
+ enumerable: !0,
386
+ get: () => t.currency
387
+ },
388
+ currencyDecimalDigits: {
389
+ enumerable: !0,
390
+ get: () => t.currencyDecimalDigits
391
+ }
392
+ }), g;
393
+ }
394
+ function x(e = {}) {
395
+ return {
396
+ ...f,
397
+ ...e,
398
+ timeZone: e.timeZone === null ? null : e.timeZone ? {
399
+ ...f.timeZone,
400
+ ...e.timeZone
401
+ } : f.timeZone,
402
+ properties: e.properties ? e.properties.map((t) => F(t)) : f.properties.map((t) => F(t))
403
+ };
404
+ }
405
+ function W(e = {}) {
406
+ return {
407
+ ...n,
408
+ ...e,
409
+ locale: e.locale === null ? null : e.locale ? {
410
+ ...n.locale,
411
+ ...e.locale
412
+ } : n.locale,
413
+ time_zone: e.time_zone === null ? null : e.time_zone ? {
414
+ ...n.time_zone,
415
+ ...e.time_zone
416
+ } : n.time_zone,
417
+ magnitudes_system: e.magnitudes_system === null ? null : e.magnitudes_system ? {
418
+ ...n.magnitudes_system,
419
+ ...e.magnitudes_system
420
+ } : n.magnitudes_system,
421
+ properties: e.properties ? e.properties.map((t, o) => {
422
+ const a = n.properties[o] ?? n.properties[0];
423
+ return {
424
+ ...a,
425
+ ...t,
426
+ value: {
427
+ ...a.value,
428
+ ...t.value,
429
+ magnitude_unit_base: {
430
+ ...a.value.magnitude_unit_base,
431
+ ...t.value?.magnitude_unit_base
432
+ },
433
+ magnitude_unit_user: {
434
+ ...a.value.magnitude_unit_user,
435
+ ...t.value?.magnitude_unit_user
436
+ },
437
+ factor: {
438
+ ...a.value.factor,
439
+ ...t.value?.factor
440
+ }
441
+ }
442
+ };
443
+ }) : n.properties.map((t) => ({
444
+ ...t,
445
+ value: {
446
+ ...t.value,
447
+ magnitude_unit_base: {
448
+ ...t.value.magnitude_unit_base
449
+ },
450
+ magnitude_unit_user: {
451
+ ...t.value.magnitude_unit_user
452
+ },
453
+ factor: {
454
+ ...t.value.factor
455
+ }
456
+ }
457
+ })),
458
+ date_format: e.date_format ? {
459
+ ...n.date_format,
460
+ ...e.date_format
461
+ } : n.date_format,
462
+ time_format: e.time_format ? {
463
+ ...n.time_format,
464
+ ...e.time_format
465
+ } : n.time_format
466
+ };
467
+ }
468
+ export {
469
+ z as a,
470
+ N as b,
471
+ T as c,
472
+ R as d,
473
+ w as e,
474
+ n as f,
475
+ C as g,
476
+ D as h,
477
+ A as i,
478
+ E as j,
479
+ L as k,
480
+ j as l,
481
+ X as m,
482
+ O as n,
483
+ q as o,
484
+ Z as p,
485
+ V as q,
486
+ G as r,
487
+ F as s,
488
+ P as t,
489
+ f as u,
490
+ Q as v,
491
+ x as w,
492
+ W as x
493
+ };
package/index.js CHANGED
@@ -1,27 +1,78 @@
1
- import { act as t } from "react";
2
- import { beforeEach as s, describe as f, expect as a } from "vitest";
3
- import { cleanup as p, fireEvent as i, renderHook as n, screen as x, waitFor as c, within as d } from "@testing-library/react";
4
- import { r as u } from "./e2e/commands/register.js";
5
- import { c as C } from "./testTools/utils.js";
6
- import { t as b } from "./testComponents/DataGrid/helpers.js";
7
- import { t as h } from "./testComponents/DynamicFilter/helpers.js";
8
- import { t as w } from "./testComponents/DynamicSort/helpers.js";
9
- import { default as H } from "@testing-library/user-event";
1
+ import { act as o } from "react";
2
+ import { afterAll as r, afterEach as c, beforeAll as s, beforeEach as M, describe as l, expect as n, it as i, test as k, vi as p } from "vitest";
3
+ import { cleanup as u, fireEvent as m, renderHook as C, screen as f, waitFor as g, within as A } from "@testing-library/react";
4
+ import { default as E } from "@testing-library/user-event";
5
+ import { c as S } from "./chunks/render-CsuV8xqo.js";
6
+ import { D as x, a as L, M as R, f as D, v as _, y as G, s as h, k as b, h as B, u as H, z as I, p as O, l as T, o as w, P as y, G as N, H as W, J as K, I as U, N as V, K as z, L as Y, O as Z, Q as j, R as q, S as J, T as Q, U as X, V as $, W as ee, m as ae, q as oe, j as te, n as re, Y as ce, X as se, Z as Me, i as le, t as ne, r as ie, d as ke, b as pe, c as de, e as ue, g as me, B as Ce, A as fe, C as ge, w as Ae, E as Fe, F as Ee, x as Pe } from "./chunks/reactLeaflet-Cffkauof.js";
10
7
  export {
11
- t as act,
12
- s as beforeEach,
13
- p as cleanup,
14
- f as describe,
15
- a as expect,
16
- i as fireEvent,
17
- u as registerCommands,
18
- C as render,
19
- n as renderHook,
20
- x as screen,
21
- b as testColumnConfigs,
22
- h as testFilterFields,
23
- w as testSortFields,
24
- H as userEvent,
25
- c as waitFor,
26
- d as within
8
+ x as DEFAULT_RHF_SUBMIT_REF_GLOBAL_KEY,
9
+ L as M4L_APP_DATAGRID_SEMANTIC_WIDTHS,
10
+ R as M4L_APP_WINDOW_SIZES,
11
+ o as act,
12
+ r as afterAll,
13
+ c as afterEach,
14
+ D as assertColumnConfigs,
15
+ _ as assertFilterFields,
16
+ G as assertSortFields,
17
+ s as beforeAll,
18
+ M as beforeEach,
19
+ u as cleanup,
20
+ h as createActionButtonComponentMock,
21
+ b as createChildrenContainerComponentMock,
22
+ B as createChildrenDivComponentMock,
23
+ H as createDataGridColumnHookMock,
24
+ I as createDefaultM4lPackageGclickMapStoreState,
25
+ O as createDividerComponentMock,
26
+ T as createHelmetPageComponentMock,
27
+ w as createIconComponentMock,
28
+ y as createLeafletModuleMock,
29
+ N as createM4lAppBaseModuleMock,
30
+ W as createM4lAppComponentsModuleMock,
31
+ K as createM4lAppCoreModuleMock,
32
+ U as createM4lAppFormComponentsModuleOverrides,
33
+ V as createM4lAppFormLayoutsModuleOverrides,
34
+ z as createM4lAppGraphicsModuleMock,
35
+ Y as createM4lAppLayoutsModuleMock,
36
+ Z as createM4lBaseComponentsModuleMock,
37
+ j as createM4lPackageBaseModuleMock,
38
+ q as createM4lPackageComponentsModuleMock,
39
+ J as createM4lPackageCoreModuleMock,
40
+ Q as createM4lPackageGclickModuleMock,
41
+ X as createM4lPackageGclickRealtimeModuleMock,
42
+ $ as createM4lPackageGraphicsModuleMock,
43
+ ee as createM4lPackageLayoutsModuleMock,
44
+ ae as createNamedFieldComponentMock,
45
+ oe as createNavLinkComponentMock,
46
+ te as createPaperFormComponentMock,
47
+ re as createPropertyValueComponentMock,
48
+ ce as createReResizableModuleMock,
49
+ se as createReactHookFormModuleMock,
50
+ Me as createReactLeafletModuleMock,
51
+ le as createStaticDivComponentMock,
52
+ ne as createSuspenseLoadableComponentMock,
53
+ ie as createWindowBaseComponentMock,
54
+ ke as defaultM4lAppEnvironmentOverrides,
55
+ pe as defaultM4lPackageEnvironmentOverrides,
56
+ l as describe,
57
+ de as distanceToNowFormatterFixture,
58
+ n as expect,
59
+ m as fireEvent,
60
+ ue as gclickGnssMotionStatusEnumFixture,
61
+ me as gclickGnssSignalEnumFixture,
62
+ Ce as getMissingModuleMockExports,
63
+ fe as getModuleExportContractKind,
64
+ ge as getModuleMockKindMismatches,
65
+ Ae as getRHFSubmitRef,
66
+ Fe as installConsoleErrorFilter,
67
+ Ee as installRhfOnSubmitRef,
68
+ i as it,
69
+ S as render,
70
+ C as renderHook,
71
+ f as screen,
72
+ Pe as stringifyViewerData,
73
+ k as test,
74
+ E as userEvent,
75
+ p as vi,
76
+ g as waitFor,
77
+ A as within
27
78
  };
package/mocks/index.js ADDED
@@ -0,0 +1,41 @@
1
+ import { t as o } from "../chunks/userPreferences-BmOgRaIX.js";
2
+ import { g as l, j as m, l as d, r as f, q as p, o as v, x as P, v as g, w as D, s as U, c as M, e as V, d as b, h as y, k as w, m as C, n as E, p as L, b as R, a as T, i as q, f as A, u as N } from "../chunks/userPreferences-BmOgRaIX.js";
3
+ function x({
4
+ fallbackToKey: t = !0,
5
+ getLabel: a,
6
+ labels: r = {},
7
+ moduleLabel: s = o
8
+ } = {}) {
9
+ const i = a ?? ((e) => e in r ? r[e] : t ? e : "");
10
+ return {
11
+ getLabel: (e, u) => i(e, u),
12
+ getModuleLabel: () => s
13
+ };
14
+ }
15
+ export {
16
+ l as axiosOperationResultFixture,
17
+ m as baseProviderValueFixture,
18
+ d as createEnvironmentFixture,
19
+ f as createHostToolsFixture,
20
+ p as createToasterFixture,
21
+ v as createUseEnvironmentValueFixture,
22
+ x as createUseModuleDictionaryValueFixture,
23
+ P as createUserPreferencesApiDataFixture,
24
+ g as createUserPreferencesContextValueFixture,
25
+ D as createUserPreferencesFixture,
26
+ U as createUserPreferencesMagnitudePropertyFixture,
27
+ M as domainCountryNoDecimalsFixture,
28
+ V as domainCountryTwoDecimalsFixture,
29
+ b as domainFixture,
30
+ y as environmentFixture,
31
+ w as formattersFixture,
32
+ C as moduleDictionaryFixture,
33
+ E as networkRequestFixture,
34
+ L as privilegesQueryFixture,
35
+ R as privilegesResponseFixture,
36
+ T as testModuleId,
37
+ o as testModuleName,
38
+ q as useEnvironmentValueFixture,
39
+ A as userPreferencesApiDataFixture,
40
+ N as userPreferencesFixture
41
+ };