@m4l/testing 0.0.23 → 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.
- package/README.md +679 -0
- package/chunks/reactLeaflet-Cffkauof.js +1846 -0
- package/chunks/render-CsuV8xqo.js +17 -0
- package/chunks/userPreferences-BmOgRaIX.js +493 -0
- package/index.js +76 -25
- package/mocks/index.js +41 -0
- package/package.json +85 -102
- package/playwright/index.js +2041 -0
- package/rtl/index.js +180 -0
- package/types/libs/observability/mf/src/browserRuntimeHandles.d.ts +112 -0
- package/types/libs/observability/mf/src/diagnosticLogging.d.ts +2 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/catalog.d.ts +267 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/contracts.d.ts +64 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/host.d.ts +139 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/index.d.ts +6 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.d.ts +104 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/sharedReportsList.d.ts +44 -0
- package/types/libs/observability/mf/src/diagnosticPolicyKeys.d.ts +34 -0
- package/types/libs/observability/mf/src/index.d.ts +14 -0
- package/types/libs/observability/mf/src/runtimeSmoke.d.ts +13 -0
- package/types/libs/observability/mf/src/telemetry.d.ts +2 -0
- package/types/libs/observability/shared/src/diagnosticLogging.d.ts +97 -0
- package/types/libs/observability/shared/src/index.d.ts +6 -0
- package/types/libs/observability/shared/src/runtimeHandles.d.ts +27 -0
- package/types/libs/observability/shared/src/telemetry.d.ts +179 -0
- package/types/packages/testing/mocks/src/constants.d.ts +10 -0
- package/types/packages/testing/mocks/src/fixtures.d.ts +258 -0
- package/types/packages/testing/mocks/src/helpers/environment.d.ts +44 -0
- package/types/packages/testing/mocks/src/helpers/hostTools.d.ts +10 -0
- package/types/packages/testing/mocks/src/helpers/index.d.ts +5 -0
- package/types/packages/testing/mocks/src/helpers/moduleDictionary.d.ts +9 -0
- package/types/packages/testing/mocks/src/helpers/toaster.d.ts +9 -0
- package/types/packages/testing/mocks/src/helpers/userPreferences.d.ts +17 -0
- package/types/packages/testing/mocks/src/index.d.ts +4 -0
- package/types/packages/testing/mocks/src/types.d.ts +233 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAreaFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfMenuFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfModuleDictionaryFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedSessionFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/createHostCookieFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostGuestSessionFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostLocaleFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostMfPreviewDynamicParamsFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostModuleDictionaryFixture.d.ts +11 -0
- package/types/packages/testing/playwright/src/fixtures/createHostUiConfigFixture.d.ts +7 -0
- package/types/packages/testing/playwright/src/fixtures/createHostUserPreferencesFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/createListResponseFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/index.d.ts +12 -0
- package/types/packages/testing/playwright/src/helpers/attachJson.d.ts +9 -0
- package/types/packages/testing/playwright/src/helpers/formAccess.d.ts +53 -0
- package/types/packages/testing/playwright/src/helpers/formSelect.d.ts +51 -0
- package/types/packages/testing/playwright/src/helpers/formatFailedChecks.d.ts +18 -0
- package/types/packages/testing/playwright/src/helpers/index.d.ts +16 -0
- package/types/packages/testing/playwright/src/helpers/listDatagrid.d.ts +219 -0
- package/types/packages/testing/playwright/src/helpers/listDetail.d.ts +65 -0
- package/types/packages/testing/playwright/src/helpers/listFilter.d.ts +27 -0
- package/types/packages/testing/playwright/src/helpers/listSort.d.ts +19 -0
- package/types/packages/testing/playwright/src/helpers/listStatePersistence.d.ts +15 -0
- package/types/packages/testing/playwright/src/helpers/openHostAccountMenuModule.d.ts +10 -0
- package/types/packages/testing/playwright/src/helpers/openHostAuthenticatedMfPreviewModule.d.ts +5 -0
- package/types/packages/testing/playwright/src/helpers/openHostMobileSidebarModule.d.ts +15 -0
- package/types/packages/testing/playwright/src/helpers/openHostSidebarModule.d.ts +5 -0
- package/types/packages/testing/playwright/src/helpers/realtimePerformanceBrowser.d.ts +144 -0
- package/types/packages/testing/playwright/src/helpers/viewModeDataGrid.d.ts +67 -0
- package/types/packages/testing/playwright/src/helpers/waitForBrowserCondition.d.ts +38 -0
- package/types/packages/testing/playwright/src/index.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/index.d.ts +20 -0
- package/types/packages/testing/playwright/src/installers/installHostAlarmsCountRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAreasRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedBootstrapRoutes.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfModuleDictionaryRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfPreviewBootstrap.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedSessionRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostCookiesRoute.d.ts +8 -0
- package/types/packages/testing/playwright/src/installers/installHostGuestBootstrapRoutes.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostGuestSessionRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostLocaleRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostMenusRoute.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/installHostModuleDictionaryRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostPasswordNewRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostPasswordResetRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostUiConfigAssetRoutes.d.ts +9 -0
- package/types/packages/testing/playwright/src/installers/installHostUiConfigRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostUserPreferencesRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installListEndpointRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installMicrofrontendRenderStub.d.ts +9 -0
- package/types/packages/testing/playwright/src/installers/installModulePrivilegesRoute.d.ts +11 -0
- package/types/packages/testing/playwright/src/types.d.ts +598 -0
- package/types/packages/testing/rtl/src/index.d.ts +4 -0
- package/types/packages/testing/rtl/src/matchMedia.d.ts +10 -0
- package/types/packages/testing/rtl/src/render.d.ts +17 -0
- package/types/packages/testing/rtl/src/resizeObserver.d.ts +33 -0
- package/types/packages/testing/rtl/src/storage.d.ts +10 -0
- package/types/packages/testing/src/index.d.ts +6 -0
- package/types/packages/testing/vitest/src/constants.d.ts +24 -0
- package/types/packages/testing/vitest/src/factories/app/index.d.ts +5 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppBase.d.ts +9 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppComponents.d.ts +20 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppCore.d.ts +12 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppGraphics.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppLayouts.d.ts +18 -0
- package/types/packages/testing/vitest/src/factories/base/index.d.ts +1 -0
- package/types/packages/testing/vitest/src/factories/base/m4lBaseComponents.d.ts +13 -0
- package/types/packages/testing/vitest/src/factories/index.d.ts +7 -0
- package/types/packages/testing/vitest/src/factories/leaflet.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/packages/index.d.ts +7 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageBase.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageComponents.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageCore.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclick.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclickRealtime.d.ts +6 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGraphics.d.ts +9 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageLayouts.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/reResizable.d.ts +6 -0
- package/types/packages/testing/vitest/src/factories/reactHookForm.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/reactLeaflet.d.ts +10 -0
- package/types/packages/testing/vitest/src/fixtures.d.ts +71 -0
- package/types/packages/testing/vitest/src/helpers/columnConfigs.d.ts +184 -0
- package/types/packages/testing/vitest/src/helpers/elementMocks.d.ts +166 -0
- package/types/packages/testing/vitest/src/helpers/filterFields.d.ts +37 -0
- package/types/packages/testing/vitest/src/helpers/index.d.ts +9 -0
- package/types/packages/testing/vitest/src/helpers/mapStore.d.ts +9 -0
- package/types/packages/testing/vitest/src/helpers/moduleContract.d.ts +15 -0
- package/types/packages/testing/vitest/src/helpers/rhf.d.ts +8 -0
- package/types/packages/testing/vitest/src/helpers/serialization.d.ts +7 -0
- package/types/packages/testing/vitest/src/helpers/sortFields.d.ts +28 -0
- package/types/packages/testing/vitest/src/helpers/windowSizes.d.ts +1 -0
- package/types/packages/testing/vitest/src/index.d.ts +6 -0
- package/types/packages/testing/vitest/src/installers/consoleError.d.ts +9 -0
- package/types/packages/testing/vitest/src/installers/index.d.ts +2 -0
- package/types/packages/testing/vitest/src/installers/rhfSubmit.d.ts +9 -0
- package/types/packages/testing/vitest/src/types.d.ts +116 -0
- package/vitest/index.js +55 -0
- package/e2e/commands/components/Accordions/commands.d.ts +0 -4
- package/e2e/commands/components/Accordions/commands.js +0 -19
- package/e2e/commands/components/Accordions/types.d.ts +0 -63
- package/e2e/commands/components/CommonActions/commands.d.ts +0 -4
- package/e2e/commands/components/CommonActions/commands.js +0 -11
- package/e2e/commands/components/CommonActions/types.d.ts +0 -20
- package/e2e/commands/components/DataGrid/commands.d.ts +0 -4
- package/e2e/commands/components/DataGrid/commands.js +0 -42
- package/e2e/commands/components/DataGrid/types.d.ts +0 -140
- package/e2e/commands/components/DynamicFilter/commands.d.ts +0 -4
- package/e2e/commands/components/DynamicFilter/commands.js +0 -12
- package/e2e/commands/components/DynamicFilter/types.d.ts +0 -27
- package/e2e/commands/components/DynamicSort/commands.d.ts +0 -4
- package/e2e/commands/components/DynamicSort/commands.js +0 -10
- package/e2e/commands/components/DynamicSort/types.d.ts +0 -26
- package/e2e/commands/components/Filters/commands.d.ts +0 -4
- package/e2e/commands/components/Filters/commands.js +0 -24
- package/e2e/commands/components/Filters/types.d.ts +0 -91
- package/e2e/commands/components/MenuActions/commands.d.ts +0 -4
- package/e2e/commands/components/MenuActions/commands.js +0 -8
- package/e2e/commands/components/MenuActions/types.d.ts +0 -24
- package/e2e/commands/components/Popover/commands.d.ts +0 -4
- package/e2e/commands/components/Popover/commands.js +0 -8
- package/e2e/commands/components/Popover/types.d.ts +0 -15
- package/e2e/commands/components/PropertyValue/commands.d.ts +0 -4
- package/e2e/commands/components/PropertyValue/commands.js +0 -8
- package/e2e/commands/components/PropertyValue/types.d.ts +0 -19
- package/e2e/commands/components/Tab/commands.d.ts +0 -4
- package/e2e/commands/components/Tab/commands.js +0 -9
- package/e2e/commands/components/Tab/types.d.ts +0 -29
- package/e2e/commands/components/WindowBase/commands.d.ts +0 -4
- package/e2e/commands/components/WindowBase/commands.js +0 -20
- package/e2e/commands/components/WindowBase/types.d.ts +0 -84
- package/e2e/commands/components/index.d.ts +0 -11
- package/e2e/commands/components/index.js +0 -1
- package/e2e/commands/index.d.ts +0 -4
- package/e2e/commands/index.js +0 -1
- package/e2e/commands/intercepts/index.d.ts +0 -2
- package/e2e/commands/intercepts/index.js +0 -1
- package/e2e/commands/intercepts/noPrivileges/interceptCommands.d.ts +0 -5
- package/e2e/commands/intercepts/noPrivileges/interceptCommands.js +0 -15
- package/e2e/commands/intercepts/noPrivileges/types.d.ts +0 -8
- package/e2e/commands/intercepts/noPrivileges/types.js +0 -1
- package/e2e/commands/register.d.ts +0 -4
- package/e2e/commands/register.js +0 -18
- package/e2e/cypress.d.js +0 -1
- package/e2e/cypress.d.ts +0 -23
- package/e2e/index.d.ts +0 -1
- package/e2e/types.d.ts +0 -4
- package/index.d.ts +0 -4
- package/index.test.d.ts +0 -1
- package/testComponents/DataGrid/helpers.d.ts +0 -5
- package/testComponents/DataGrid/helpers.js +0 -95
- package/testComponents/DataGrid/index.d.ts +0 -2
- package/testComponents/DataGrid/index.js +0 -1
- package/testComponents/DataGrid/types.d.ts +0 -54
- package/testComponents/DataGrid/types.js +0 -1
- package/testComponents/DynamicFilter/helpers.d.ts +0 -5
- package/testComponents/DynamicFilter/helpers.js +0 -18
- package/testComponents/DynamicFilter/index.d.ts +0 -1
- package/testComponents/DynamicFilter/index.js +0 -1
- package/testComponents/DynamicFilter/types.d.ts +0 -0
- package/testComponents/DynamicSort/helpers.d.ts +0 -5
- package/testComponents/DynamicSort/helpers.js +0 -16
- package/testComponents/DynamicSort/index.d.ts +0 -1
- package/testComponents/DynamicSort/index.js +0 -1
- package/testComponents/index.d.ts +0 -3
- package/testComponents/index.js +0 -1
- package/testTools/constants.d.ts +0 -0
- package/testTools/index.d.ts +0 -1
- package/testTools/index.js +0 -1
- package/testTools/mocks.d.ts +0 -0
- package/testTools/setup.d.ts +0 -0
- package/testTools/setup.js +0 -1
- package/testTools/types.d.ts +0 -0
- package/testTools/utils.d.ts +0 -11
- package/testTools/utils.js +0 -23
- package/vite-env.d.ts +0 -5
|
@@ -0,0 +1,1846 @@
|
|
|
1
|
+
import { isDeepStrictEqual as g, inspect as $ } from "node:util";
|
|
2
|
+
import { jsx as u, jsxs as q } from "react/jsx-runtime";
|
|
3
|
+
import { vi as t } from "vitest";
|
|
4
|
+
import { q as Q, l as x, r as B, w as ee, v as te, u as re } from "./userPreferences-BmOgRaIX.js";
|
|
5
|
+
import "date-fns";
|
|
6
|
+
import "history";
|
|
7
|
+
import y from "react";
|
|
8
|
+
const O = "__rhfOnSubmitRef", ne = {
|
|
9
|
+
square: {
|
|
10
|
+
large: {
|
|
11
|
+
width: 800,
|
|
12
|
+
height: 800
|
|
13
|
+
},
|
|
14
|
+
medium: {
|
|
15
|
+
width: 600,
|
|
16
|
+
height: 600
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, oe = {
|
|
20
|
+
date: 180,
|
|
21
|
+
smallId: 50,
|
|
22
|
+
smallName: 130,
|
|
23
|
+
mediumId: 130,
|
|
24
|
+
mediumName: 180,
|
|
25
|
+
mediumNumber: 120,
|
|
26
|
+
mediumChip: 100,
|
|
27
|
+
mediumDescription: 280,
|
|
28
|
+
smallDescription: 160
|
|
29
|
+
}, U = {
|
|
30
|
+
database: "test-db",
|
|
31
|
+
domain_token: "test-token",
|
|
32
|
+
domainToken: "test-token",
|
|
33
|
+
environment_assets: "test-env",
|
|
34
|
+
host: "http://test-host.com",
|
|
35
|
+
host_api_local: "http://test-api-local.com",
|
|
36
|
+
hostApiLocal: "http://test-api-local.com",
|
|
37
|
+
host_api_remote: "http://test-api.com",
|
|
38
|
+
hostApiRemote: "http://test-api.com",
|
|
39
|
+
hostRemote: "test-host.com",
|
|
40
|
+
hostApiIcons: "http://test-api.com/main/icons",
|
|
41
|
+
host_static_assets: "http://test-assets.com",
|
|
42
|
+
isLocalhost: !1
|
|
43
|
+
}, ie = {
|
|
44
|
+
...U,
|
|
45
|
+
environment_assets: "env",
|
|
46
|
+
host: "https://app.example.com",
|
|
47
|
+
host_api_local: "https://api.example.com/local",
|
|
48
|
+
hostApiLocal: "https://api.example.com/local",
|
|
49
|
+
host_api_remote: "https://api.example.com",
|
|
50
|
+
hostApiRemote: "https://api.example.com",
|
|
51
|
+
hostApiIcons: "https://static.example.com/icons",
|
|
52
|
+
hostRemote: "api.example.com",
|
|
53
|
+
host_static_assets: "https://static.example.com"
|
|
54
|
+
}, ae = {
|
|
55
|
+
value: "5",
|
|
56
|
+
unit: "m"
|
|
57
|
+
}, Xe = {
|
|
58
|
+
noSignal: 0,
|
|
59
|
+
reliable: 1,
|
|
60
|
+
acceptable: 2
|
|
61
|
+
}, Qe = {
|
|
62
|
+
off: 0,
|
|
63
|
+
moving: 1,
|
|
64
|
+
maxSpeed: 2
|
|
65
|
+
}, D = /* @__PURE__ */ Symbol("expected-function-value");
|
|
66
|
+
function se(e) {
|
|
67
|
+
return e?.type === "nested";
|
|
68
|
+
}
|
|
69
|
+
function ce(e) {
|
|
70
|
+
return e?.type === "date";
|
|
71
|
+
}
|
|
72
|
+
function de(e) {
|
|
73
|
+
return e?.type === "boolean";
|
|
74
|
+
}
|
|
75
|
+
function ue(e) {
|
|
76
|
+
return e?.type === "price";
|
|
77
|
+
}
|
|
78
|
+
function fe(e) {
|
|
79
|
+
return e?.type === "points";
|
|
80
|
+
}
|
|
81
|
+
function le(e) {
|
|
82
|
+
return e?.type === "number";
|
|
83
|
+
}
|
|
84
|
+
function pe(e) {
|
|
85
|
+
return e?.type === "interactiveCheck";
|
|
86
|
+
}
|
|
87
|
+
function me(e) {
|
|
88
|
+
return e?.type === "setCheck";
|
|
89
|
+
}
|
|
90
|
+
function ye(e) {
|
|
91
|
+
return e?.type === "uncertainty";
|
|
92
|
+
}
|
|
93
|
+
function ge(e) {
|
|
94
|
+
return e?.type === "concatenated";
|
|
95
|
+
}
|
|
96
|
+
function ve(e) {
|
|
97
|
+
return e?.type === "chipStatus";
|
|
98
|
+
}
|
|
99
|
+
function he(e) {
|
|
100
|
+
return e?.type === "tags";
|
|
101
|
+
}
|
|
102
|
+
function Se(e) {
|
|
103
|
+
return e?.type === "icon";
|
|
104
|
+
}
|
|
105
|
+
function Ae(e) {
|
|
106
|
+
return e?.type === "color";
|
|
107
|
+
}
|
|
108
|
+
function Pe(e) {
|
|
109
|
+
return e?.type === "image";
|
|
110
|
+
}
|
|
111
|
+
function k(e) {
|
|
112
|
+
return typeof e == "string" ? JSON.stringify(e) : typeof e == "symbol" ? e.toString() : $(e, {
|
|
113
|
+
depth: 4,
|
|
114
|
+
breakLength: 1 / 0,
|
|
115
|
+
compact: !0,
|
|
116
|
+
sorted: !0
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function b(e, n, o, r, a) {
|
|
120
|
+
e.push(
|
|
121
|
+
`${n} ${o}: expected ${k(r)}, got ${k(a)}`
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function _(e, n, o) {
|
|
125
|
+
e.push(`${n} ${o}: expected a function, got undefined`);
|
|
126
|
+
}
|
|
127
|
+
function w(e, n, o) {
|
|
128
|
+
e.push(
|
|
129
|
+
`${n} ${o}: expected undefined, got ${k("function")}`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function be(e, n, o, r) {
|
|
133
|
+
if (!o) {
|
|
134
|
+
e.push(`${n} testProps: expected an object, got undefined`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const a = Object.keys(o).sort(), i = Object.keys(r).sort();
|
|
138
|
+
g(a, i) || e.push(
|
|
139
|
+
`${n} testProps keys: expected ${k(i)}, got ${k(a)}`
|
|
140
|
+
), i.forEach((s) => {
|
|
141
|
+
const c = r[s], d = o[s];
|
|
142
|
+
if (c === D) {
|
|
143
|
+
typeof d != "function" && b(
|
|
144
|
+
e,
|
|
145
|
+
n,
|
|
146
|
+
`testProps.${s}`,
|
|
147
|
+
"[function]",
|
|
148
|
+
d
|
|
149
|
+
);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
g(d, c) || b(
|
|
153
|
+
e,
|
|
154
|
+
n,
|
|
155
|
+
`testProps.${s}`,
|
|
156
|
+
c,
|
|
157
|
+
d
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function Me(e) {
|
|
162
|
+
return se(e) ? {
|
|
163
|
+
expectedTestProps: {
|
|
164
|
+
fieldValue: e.fieldValue,
|
|
165
|
+
defaultValue: e.defaultValue,
|
|
166
|
+
Component: e.Component
|
|
167
|
+
},
|
|
168
|
+
requiresFormatter: !0,
|
|
169
|
+
requiresFilter: !0,
|
|
170
|
+
requiresSort: !0
|
|
171
|
+
} : ce(e) ? {
|
|
172
|
+
expectedTestProps: {
|
|
173
|
+
fieldValue: e.fieldValue,
|
|
174
|
+
presentationType: e.presentationType
|
|
175
|
+
},
|
|
176
|
+
requiresFormatter: !0,
|
|
177
|
+
requiresFilter: !0,
|
|
178
|
+
requiresSort: !0
|
|
179
|
+
} : de(e) ? {
|
|
180
|
+
expectedTestProps: {
|
|
181
|
+
fieldValue: e.fieldValue,
|
|
182
|
+
presentationType: e.presentationType
|
|
183
|
+
},
|
|
184
|
+
requiresFormatter: !0,
|
|
185
|
+
requiresFilter: !0,
|
|
186
|
+
requiresSort: !0
|
|
187
|
+
} : ue(e) ? {
|
|
188
|
+
expectedTestProps: {
|
|
189
|
+
fieldValue: e.fieldValue
|
|
190
|
+
},
|
|
191
|
+
requiresFormatter: !0,
|
|
192
|
+
requiresFilter: !0,
|
|
193
|
+
requiresSort: !0
|
|
194
|
+
} : fe(e) ? {
|
|
195
|
+
expectedTestProps: {
|
|
196
|
+
fieldValue: e.fieldValue,
|
|
197
|
+
fieldUnit: e.fieldUnit
|
|
198
|
+
},
|
|
199
|
+
requiresFormatter: !0,
|
|
200
|
+
requiresFilter: !0,
|
|
201
|
+
requiresSort: !0
|
|
202
|
+
} : le(e) ? {
|
|
203
|
+
expectedTestProps: {
|
|
204
|
+
fieldValue: e.fieldValue,
|
|
205
|
+
// Only assert fractionDigits when the hook call declares it, so the
|
|
206
|
+
// exact testProps key match works whether or not the caller passes it.
|
|
207
|
+
...e.fractionDigits !== void 0 ? { fractionDigits: e.fractionDigits } : {}
|
|
208
|
+
},
|
|
209
|
+
requiresFormatter: !0,
|
|
210
|
+
requiresFilter: !0,
|
|
211
|
+
requiresSort: !0
|
|
212
|
+
} : pe(e) ? {
|
|
213
|
+
requiresFormatter: !0,
|
|
214
|
+
requiresFilter: !0,
|
|
215
|
+
requiresSort: !0
|
|
216
|
+
} : me(e) ? {
|
|
217
|
+
expectedTestProps: {
|
|
218
|
+
field: e.field,
|
|
219
|
+
disabledGetter: D,
|
|
220
|
+
rowKeyGetter: D,
|
|
221
|
+
useHook: D
|
|
222
|
+
},
|
|
223
|
+
requiresFormatter: !0,
|
|
224
|
+
requiresFilter: !1,
|
|
225
|
+
requiresSort: !1
|
|
226
|
+
} : ye(e) ? {
|
|
227
|
+
expectedTestProps: {
|
|
228
|
+
fieldValue: e.fieldValue,
|
|
229
|
+
fieldUnit: e.fieldUnit,
|
|
230
|
+
fieldSymbol: e.fieldSymbol
|
|
231
|
+
},
|
|
232
|
+
requiresFormatter: !0,
|
|
233
|
+
requiresFilter: !0,
|
|
234
|
+
requiresSort: !0
|
|
235
|
+
} : ge(e) ? {
|
|
236
|
+
expectedTestProps: {
|
|
237
|
+
fieldValue: e.fieldValue,
|
|
238
|
+
fieldSeparator: e.fieldSeparator
|
|
239
|
+
},
|
|
240
|
+
requiresFormatter: !0,
|
|
241
|
+
requiresFilter: !0,
|
|
242
|
+
requiresSort: !0
|
|
243
|
+
} : ve(e) ? {
|
|
244
|
+
expectedTestProps: {
|
|
245
|
+
fieldLabel: typeof e.fieldLabel == "function" ? D : e.fieldLabel,
|
|
246
|
+
fieldStatus: e.fieldStatus,
|
|
247
|
+
statusesColors: e.statusesColors,
|
|
248
|
+
fallbackColor: e.fallbackColor
|
|
249
|
+
},
|
|
250
|
+
requiresFormatter: !0,
|
|
251
|
+
requiresFilter: !0,
|
|
252
|
+
requiresSort: !0
|
|
253
|
+
} : he(e) ? {
|
|
254
|
+
expectedTestProps: {
|
|
255
|
+
fieldValue: e.fieldValue
|
|
256
|
+
},
|
|
257
|
+
requiresFormatter: !0,
|
|
258
|
+
requiresFilter: !0,
|
|
259
|
+
requiresSort: !0
|
|
260
|
+
} : Se(e) ? {
|
|
261
|
+
expectedTestProps: {
|
|
262
|
+
getIconProps: D
|
|
263
|
+
},
|
|
264
|
+
requiresFormatter: !0,
|
|
265
|
+
requiresFilter: !1,
|
|
266
|
+
requiresSort: !1
|
|
267
|
+
} : Ae(e) ? {
|
|
268
|
+
expectedTestProps: {
|
|
269
|
+
fieldValue: e.fieldValue
|
|
270
|
+
},
|
|
271
|
+
requiresFormatter: !0,
|
|
272
|
+
requiresFilter: !1,
|
|
273
|
+
requiresSort: !1
|
|
274
|
+
} : Pe(e) ? {
|
|
275
|
+
expectedTestProps: {
|
|
276
|
+
fieldValue: e.fieldValue,
|
|
277
|
+
fieldText: e.fieldText,
|
|
278
|
+
cover: e.cover,
|
|
279
|
+
width: e.width,
|
|
280
|
+
height: e.height
|
|
281
|
+
},
|
|
282
|
+
requiresFormatter: !0,
|
|
283
|
+
requiresFilter: !1,
|
|
284
|
+
requiresSort: !1
|
|
285
|
+
} : Te(e);
|
|
286
|
+
}
|
|
287
|
+
function Te(e) {
|
|
288
|
+
return {
|
|
289
|
+
expectedTestProps: {
|
|
290
|
+
unsupportedHookCall: k(e)
|
|
291
|
+
},
|
|
292
|
+
requiresFormatter: !0,
|
|
293
|
+
requiresFilter: !0,
|
|
294
|
+
requiresSort: !0
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function et(e, n) {
|
|
298
|
+
const o = [];
|
|
299
|
+
return e.length !== n.length && o.push(
|
|
300
|
+
`[columns] length: expected ${n.length}, got ${e.length}`
|
|
301
|
+
), n.forEach((r, a) => {
|
|
302
|
+
const i = e[a], s = `[col ${a + 1} ${JSON.stringify(r.key)}]`;
|
|
303
|
+
if (!i) {
|
|
304
|
+
o.push(`${s} missing column at index ${a}`);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (i.key !== r.key && b(o, s, "key", r.key, i.key), i.name !== r.name && b(o, s, "name", r.name, i.name), i.type !== r.type && b(o, s, "type", r.type, i.type), g(i.align, r.align) || b(
|
|
308
|
+
o,
|
|
309
|
+
s,
|
|
310
|
+
"align",
|
|
311
|
+
r.align,
|
|
312
|
+
i.align
|
|
313
|
+
), g(i.width, r.width) || b(
|
|
314
|
+
o,
|
|
315
|
+
s,
|
|
316
|
+
"width",
|
|
317
|
+
r.width,
|
|
318
|
+
i.width
|
|
319
|
+
), g(i.visible, r.visible) || b(
|
|
320
|
+
o,
|
|
321
|
+
s,
|
|
322
|
+
"visible",
|
|
323
|
+
r.visible,
|
|
324
|
+
i.visible
|
|
325
|
+
), r.fixed !== void 0 && !g(i.fixed, r.fixed) && b(
|
|
326
|
+
o,
|
|
327
|
+
s,
|
|
328
|
+
"fixed",
|
|
329
|
+
r.fixed,
|
|
330
|
+
i.fixed
|
|
331
|
+
), r.hookCall) {
|
|
332
|
+
const c = Me(r.hookCall);
|
|
333
|
+
c.expectedTestProps && be(
|
|
334
|
+
o,
|
|
335
|
+
s,
|
|
336
|
+
i.testProps,
|
|
337
|
+
c.expectedTestProps
|
|
338
|
+
), i.formatter === void 0 && _(o, s, "formatter"), c.requiresFilter && i.customFilter === void 0 && _(o, s, "customFilter"), c.requiresSort && i.customSort === void 0 && _(o, s, "customSort");
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
i.formatter !== void 0 && w(o, s, "formatter"), i.customFilter !== void 0 && w(o, s, "customFilter"), i.customSort !== void 0 && w(o, s, "customSort");
|
|
342
|
+
}), o;
|
|
343
|
+
}
|
|
344
|
+
function p(e) {
|
|
345
|
+
return t.fn(
|
|
346
|
+
({ children: n, ...o }) => y.createElement("div", { "data-testid": e, ...o }, n)
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
function S(e, n) {
|
|
350
|
+
return t.fn(() => y.createElement("div", { "data-testid": e }, n));
|
|
351
|
+
}
|
|
352
|
+
function Ce(e = "paper-form") {
|
|
353
|
+
return t.fn(
|
|
354
|
+
({ children: n, title: o }) => y.createElement(
|
|
355
|
+
"div",
|
|
356
|
+
{
|
|
357
|
+
"data-testid": e,
|
|
358
|
+
"data-title": String(o)
|
|
359
|
+
},
|
|
360
|
+
n
|
|
361
|
+
)
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
function v(e) {
|
|
365
|
+
return t.fn(
|
|
366
|
+
({ children: n }) => y.createElement("div", { "data-testid": e }, n)
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
function De(e = "helmet-page") {
|
|
370
|
+
return t.fn(
|
|
371
|
+
({ children: n, subtitle: o, title: r, titlePrefix: a }) => y.createElement(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
"data-testid": e,
|
|
375
|
+
"data-title": String(r ?? ""),
|
|
376
|
+
"data-title-prefix": String(a ?? ""),
|
|
377
|
+
"data-subtitle": String(o ?? "")
|
|
378
|
+
},
|
|
379
|
+
n
|
|
380
|
+
)
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
function T(e) {
|
|
384
|
+
return t.fn(
|
|
385
|
+
({ name: n }) => y.createElement("div", {
|
|
386
|
+
"data-testid": `${e}-${String(n)}`
|
|
387
|
+
})
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
function ke(e = "property") {
|
|
391
|
+
return t.fn(
|
|
392
|
+
({ property: n }) => y.createElement("div", {
|
|
393
|
+
"data-testid": `${e}-${String(n)}`
|
|
394
|
+
})
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
function Fe(e = "data-src") {
|
|
398
|
+
return t.fn(
|
|
399
|
+
({ src: n }) => y.createElement("span", {
|
|
400
|
+
[e]: String(n)
|
|
401
|
+
})
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
function Ee(e = "divider") {
|
|
405
|
+
return t.fn(
|
|
406
|
+
({ customVariant: n, orientation: o }) => y.createElement("div", {
|
|
407
|
+
"data-testid": e,
|
|
408
|
+
"data-orientation": String(o ?? ""),
|
|
409
|
+
"data-variant": String(n ?? "")
|
|
410
|
+
})
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
function Oe(e = "nav-link") {
|
|
414
|
+
return t.fn(
|
|
415
|
+
({ children: n, reloadDocument: o, text: r, to: a, ...i }) => y.createElement(
|
|
416
|
+
"a",
|
|
417
|
+
{
|
|
418
|
+
"data-testid": e,
|
|
419
|
+
href: String(a ?? ""),
|
|
420
|
+
"data-reload-document": String(o ?? ""),
|
|
421
|
+
...i
|
|
422
|
+
},
|
|
423
|
+
n ?? r ?? ""
|
|
424
|
+
)
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
function Ie(e = "window-base") {
|
|
428
|
+
return t.fn(
|
|
429
|
+
({ children: n, onClose: o, title: r }) => y.createElement(
|
|
430
|
+
"section",
|
|
431
|
+
{
|
|
432
|
+
"data-testid": e,
|
|
433
|
+
"data-title": String(r ?? "")
|
|
434
|
+
},
|
|
435
|
+
y.createElement(
|
|
436
|
+
"button",
|
|
437
|
+
{
|
|
438
|
+
type: "button",
|
|
439
|
+
onClick: o
|
|
440
|
+
},
|
|
441
|
+
"Close"
|
|
442
|
+
),
|
|
443
|
+
n
|
|
444
|
+
)
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
function Le({
|
|
448
|
+
testId: e,
|
|
449
|
+
disabledProp: n = "disabled",
|
|
450
|
+
handlerProp: o = "onClick",
|
|
451
|
+
labelProp: r = "label"
|
|
452
|
+
}) {
|
|
453
|
+
return t.fn(
|
|
454
|
+
(a) => y.createElement(
|
|
455
|
+
"button",
|
|
456
|
+
{
|
|
457
|
+
"data-testid": e,
|
|
458
|
+
disabled: !!a[n],
|
|
459
|
+
onClick: a[o]
|
|
460
|
+
},
|
|
461
|
+
String(a[r])
|
|
462
|
+
)
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
function tt(e, n = `${e}-fallback`) {
|
|
466
|
+
return t.fn(
|
|
467
|
+
(o) => function() {
|
|
468
|
+
return y.createElement(
|
|
469
|
+
y.Suspense,
|
|
470
|
+
{
|
|
471
|
+
fallback: y.createElement("div", {
|
|
472
|
+
"data-testid": n
|
|
473
|
+
})
|
|
474
|
+
},
|
|
475
|
+
y.createElement(
|
|
476
|
+
"div",
|
|
477
|
+
{ "data-testid": e },
|
|
478
|
+
y.createElement(o)
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
function C() {
|
|
485
|
+
return t.fn((e) => ({
|
|
486
|
+
formatter: t.fn(),
|
|
487
|
+
customFilter: t.fn(),
|
|
488
|
+
customSort: t.fn(),
|
|
489
|
+
getIconProps: e.getIconProps,
|
|
490
|
+
testProps: e
|
|
491
|
+
}));
|
|
492
|
+
}
|
|
493
|
+
function R(e) {
|
|
494
|
+
return typeof e == "string" ? JSON.stringify(e) : $(e, {
|
|
495
|
+
depth: 4,
|
|
496
|
+
breakLength: 1 / 0,
|
|
497
|
+
compact: !0,
|
|
498
|
+
sorted: !0
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function P(e, n, o, r, a) {
|
|
502
|
+
e.push(
|
|
503
|
+
`${n} ${o}: expected ${R(r)}, got ${R(a)}`
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
function rt(e, n) {
|
|
507
|
+
const o = [];
|
|
508
|
+
return Array.isArray(e) ? (e.length !== n.length && o.push(
|
|
509
|
+
`[fields] length: expected ${n.length}, got ${e.length}`
|
|
510
|
+
), n.forEach((r, a) => {
|
|
511
|
+
const i = e[a], s = `[field ${a + 1} ${JSON.stringify(r.name)}]`;
|
|
512
|
+
if (!i) {
|
|
513
|
+
o.push(`${s} missing field at index ${a}`);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (i.name !== r.name && P(
|
|
517
|
+
o,
|
|
518
|
+
s,
|
|
519
|
+
"name",
|
|
520
|
+
r.name,
|
|
521
|
+
i.name
|
|
522
|
+
), g(i.dictionaryId, r.dictionaryId) || P(
|
|
523
|
+
o,
|
|
524
|
+
s,
|
|
525
|
+
"dictionaryId",
|
|
526
|
+
r.dictionaryId,
|
|
527
|
+
i.dictionaryId
|
|
528
|
+
), i.type !== r.type && P(
|
|
529
|
+
o,
|
|
530
|
+
s,
|
|
531
|
+
"type",
|
|
532
|
+
r.type,
|
|
533
|
+
i.type
|
|
534
|
+
), g(i.multiple, r.multiple) || P(
|
|
535
|
+
o,
|
|
536
|
+
s,
|
|
537
|
+
"multiple",
|
|
538
|
+
r.multiple,
|
|
539
|
+
i.multiple
|
|
540
|
+
), g(i.presence, r.presence) || P(
|
|
541
|
+
o,
|
|
542
|
+
s,
|
|
543
|
+
"presence",
|
|
544
|
+
r.presence,
|
|
545
|
+
i.presence
|
|
546
|
+
), r.defaultOperator !== void 0 && !g(i.defaultOperator, r.defaultOperator) && P(
|
|
547
|
+
o,
|
|
548
|
+
s,
|
|
549
|
+
"defaultOperator",
|
|
550
|
+
r.defaultOperator,
|
|
551
|
+
i.defaultOperator
|
|
552
|
+
), r.restritcOperatorsTo !== void 0 && !g(
|
|
553
|
+
i.restritcOperatorsTo,
|
|
554
|
+
r.restritcOperatorsTo
|
|
555
|
+
) && P(
|
|
556
|
+
o,
|
|
557
|
+
s,
|
|
558
|
+
"restritcOperatorsTo",
|
|
559
|
+
r.restritcOperatorsTo,
|
|
560
|
+
i.restritcOperatorsTo
|
|
561
|
+
), r.defaultOperand1 !== void 0 && !g(i.defaultOperand1, r.defaultOperand1) && P(
|
|
562
|
+
o,
|
|
563
|
+
s,
|
|
564
|
+
"defaultOperand1",
|
|
565
|
+
r.defaultOperand1,
|
|
566
|
+
i.defaultOperand1
|
|
567
|
+
), r.urlIcon !== void 0 && !g(i.urlIcon, r.urlIcon) && P(
|
|
568
|
+
o,
|
|
569
|
+
s,
|
|
570
|
+
"urlIcon",
|
|
571
|
+
r.urlIcon,
|
|
572
|
+
i.urlIcon
|
|
573
|
+
), r.type === "selectAsync") {
|
|
574
|
+
if (!i.selectAsyncOptions) {
|
|
575
|
+
o.push(
|
|
576
|
+
`${s} selectAsyncOptions: expected to be defined, got undefined`
|
|
577
|
+
);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
r.selectAsyncOptions && !g(
|
|
581
|
+
i.selectAsyncOptions,
|
|
582
|
+
r.selectAsyncOptions
|
|
583
|
+
) && P(
|
|
584
|
+
o,
|
|
585
|
+
s,
|
|
586
|
+
"selectAsyncOptions",
|
|
587
|
+
r.selectAsyncOptions,
|
|
588
|
+
i.selectAsyncOptions
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
}), o) : (o.push(
|
|
592
|
+
`[fields] type: expected "array", got ${R(typeof e)}`
|
|
593
|
+
), o);
|
|
594
|
+
}
|
|
595
|
+
function _e(e = O) {
|
|
596
|
+
return globalThis[e];
|
|
597
|
+
}
|
|
598
|
+
function we(e) {
|
|
599
|
+
return e === void 0 ? "" : JSON.stringify(e);
|
|
600
|
+
}
|
|
601
|
+
function V(e) {
|
|
602
|
+
return typeof e == "string" ? JSON.stringify(e) : $(e, {
|
|
603
|
+
depth: 4,
|
|
604
|
+
breakLength: 1 / 0,
|
|
605
|
+
compact: !0,
|
|
606
|
+
sorted: !0
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
function F(e, n, o, r, a) {
|
|
610
|
+
e.push(
|
|
611
|
+
`${n} ${o}: expected ${V(r)}, got ${V(a)}`
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
function nt(e, n) {
|
|
615
|
+
const o = [];
|
|
616
|
+
return Array.isArray(e) ? (e.length !== n.length && o.push(
|
|
617
|
+
`[fields] length: expected ${n.length}, got ${e.length}`
|
|
618
|
+
), n.forEach((r, a) => {
|
|
619
|
+
const i = e[a], s = `[field ${a + 1} ${JSON.stringify(r.name)}]`;
|
|
620
|
+
if (!i) {
|
|
621
|
+
o.push(`${s} missing field at index ${a}`);
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
i.name !== r.name && F(
|
|
625
|
+
o,
|
|
626
|
+
s,
|
|
627
|
+
"name",
|
|
628
|
+
r.name,
|
|
629
|
+
i.name
|
|
630
|
+
), g(i.dictionaryId, r.dictionaryId) || F(
|
|
631
|
+
o,
|
|
632
|
+
s,
|
|
633
|
+
"dictionaryId",
|
|
634
|
+
r.dictionaryId,
|
|
635
|
+
i.dictionaryId
|
|
636
|
+
), i.type !== r.type && F(
|
|
637
|
+
o,
|
|
638
|
+
s,
|
|
639
|
+
"type",
|
|
640
|
+
r.type,
|
|
641
|
+
i.type
|
|
642
|
+
), g(i.presence, r.presence) || F(
|
|
643
|
+
o,
|
|
644
|
+
s,
|
|
645
|
+
"presence",
|
|
646
|
+
r.presence,
|
|
647
|
+
i.presence
|
|
648
|
+
), r.urlIcon !== void 0 && !g(i.urlIcon, r.urlIcon) && F(
|
|
649
|
+
o,
|
|
650
|
+
s,
|
|
651
|
+
"urlIcon",
|
|
652
|
+
r.urlIcon,
|
|
653
|
+
i.urlIcon
|
|
654
|
+
);
|
|
655
|
+
}), o) : (o.push(
|
|
656
|
+
`[fields] type: expected "array", got ${V(typeof e)}`
|
|
657
|
+
), o);
|
|
658
|
+
}
|
|
659
|
+
function Re() {
|
|
660
|
+
return {
|
|
661
|
+
hashLayers: {},
|
|
662
|
+
mapActions: {
|
|
663
|
+
getMap: () => null,
|
|
664
|
+
smartMoveToPoint: t.fn(),
|
|
665
|
+
setDataLayer: t.fn(),
|
|
666
|
+
addLayer: t.fn(),
|
|
667
|
+
removeLayer: t.fn()
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
function H(e) {
|
|
672
|
+
return typeof e == "function" || e && typeof e == "object" && "$$typeof" in e ? "callable" : "value";
|
|
673
|
+
}
|
|
674
|
+
function ot(e, n) {
|
|
675
|
+
return Object.keys(e).filter((o) => !(o in n));
|
|
676
|
+
}
|
|
677
|
+
function it(e, n) {
|
|
678
|
+
const o = [];
|
|
679
|
+
for (const r of Object.keys(e)) {
|
|
680
|
+
if (!(r in n))
|
|
681
|
+
continue;
|
|
682
|
+
const a = H(n[r]), i = H(e[r]);
|
|
683
|
+
a !== i && o.push(`"${r}": real is ${a}, mock is ${i}`);
|
|
684
|
+
}
|
|
685
|
+
return o;
|
|
686
|
+
}
|
|
687
|
+
function Ve(e) {
|
|
688
|
+
return e.flatMap((n) => {
|
|
689
|
+
if (typeof n == "string")
|
|
690
|
+
return [n];
|
|
691
|
+
if (n && typeof n == "object") {
|
|
692
|
+
const o = n;
|
|
693
|
+
return [o.stack, o.message].filter(
|
|
694
|
+
(r) => typeof r == "string"
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
return [];
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
function at({
|
|
701
|
+
patterns: e
|
|
702
|
+
}) {
|
|
703
|
+
const n = console.error;
|
|
704
|
+
beforeEach(() => {
|
|
705
|
+
console.error = (...o) => {
|
|
706
|
+
Ve(o).some(
|
|
707
|
+
(a) => e.some((i) => i.test(a))
|
|
708
|
+
) || n.call(console, ...o);
|
|
709
|
+
};
|
|
710
|
+
}), afterEach(() => {
|
|
711
|
+
console.error = n;
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
function st(e = O) {
|
|
715
|
+
globalThis[e] = {
|
|
716
|
+
current: null
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
function $e({
|
|
720
|
+
baseModule: e = {},
|
|
721
|
+
moduleOverrides: n = {}
|
|
722
|
+
} = {}) {
|
|
723
|
+
const o = t.fn(
|
|
724
|
+
({ ariaLabel: r, className: a, disabled: i, icon: s, onClick: c, src: d }) => {
|
|
725
|
+
const l = typeof d == "string" ? d : typeof s == "string" ? s : "";
|
|
726
|
+
return /* @__PURE__ */ u(
|
|
727
|
+
"span",
|
|
728
|
+
{
|
|
729
|
+
"data-testid": "base-icon",
|
|
730
|
+
className: a,
|
|
731
|
+
"data-disabled": String(!!i),
|
|
732
|
+
"data-src": l,
|
|
733
|
+
"aria-hidden": r ? void 0 : !0,
|
|
734
|
+
"aria-label": r,
|
|
735
|
+
onClick: i ? void 0 : c
|
|
736
|
+
}
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
);
|
|
740
|
+
return {
|
|
741
|
+
...e,
|
|
742
|
+
// ButtonBase is consumed at module-load time as a styled() target by
|
|
743
|
+
// @m4l/components (e.g. DateRangeCalendarPickerSlots), so the base mock
|
|
744
|
+
// must always expose it even when tests never render it directly.
|
|
745
|
+
ButtonBase: t.fn(
|
|
746
|
+
({ children: r, className: a, disabled: i, onClick: s }) => /* @__PURE__ */ u(
|
|
747
|
+
"button",
|
|
748
|
+
{
|
|
749
|
+
"data-testid": "base-button-base",
|
|
750
|
+
className: a,
|
|
751
|
+
disabled: i,
|
|
752
|
+
onClick: s,
|
|
753
|
+
type: "button",
|
|
754
|
+
children: r
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
),
|
|
758
|
+
Icon: o,
|
|
759
|
+
Tooltip: t.fn(
|
|
760
|
+
({ children: r, className: a, placement: i, size: s, title: c }) => /* @__PURE__ */ u(
|
|
761
|
+
"div",
|
|
762
|
+
{
|
|
763
|
+
"data-testid": "base-tooltip",
|
|
764
|
+
className: a,
|
|
765
|
+
"data-has-node-title": String(c !== void 0 && typeof c != "string"),
|
|
766
|
+
"data-placement": String(i ?? ""),
|
|
767
|
+
"data-size": String(s ?? ""),
|
|
768
|
+
"data-title": typeof c == "string" ? c : "",
|
|
769
|
+
children: r
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
),
|
|
773
|
+
Typography: t.fn(
|
|
774
|
+
({ children: r, className: a, dataTestid: i }) => /* @__PURE__ */ u(
|
|
775
|
+
"span",
|
|
776
|
+
{
|
|
777
|
+
"data-testid": typeof i == "string" && i.length > 0 ? i : "base-typography",
|
|
778
|
+
className: a,
|
|
779
|
+
children: r
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
),
|
|
783
|
+
...n
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function ct({
|
|
787
|
+
baseModule: e = {},
|
|
788
|
+
moduleOverrides: n = {}
|
|
789
|
+
} = {}) {
|
|
790
|
+
return $e({
|
|
791
|
+
baseModule: e,
|
|
792
|
+
moduleOverrides: n
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
function W({
|
|
796
|
+
baseModule: e = {},
|
|
797
|
+
moduleOverrides: n = {},
|
|
798
|
+
submitRefGlobalKey: o = O
|
|
799
|
+
} = {}) {
|
|
800
|
+
const r = e.createValidationPartialObject, a = e.createValidationFullObject, i = e.createValidationSchema, s = e.getStepsAndValidationSchema;
|
|
801
|
+
return {
|
|
802
|
+
...e,
|
|
803
|
+
Accordion: p("accordion"),
|
|
804
|
+
ContainerFlow: S("container-flow"),
|
|
805
|
+
ActionsGroup: p("actions-group"),
|
|
806
|
+
Divider: Ee(),
|
|
807
|
+
ChipStatusFormatter: t.fn(({ label: c }) => /* @__PURE__ */ u("div", { "data-testid": "chip-status-formatter", children: c ?? "" })),
|
|
808
|
+
BooleanFormatter: t.fn(({ value: c }) => /* @__PURE__ */ u("div", { "data-testid": "boolean-formatter", children: `${c ?? ""}` })),
|
|
809
|
+
DateFormatter: t.fn(({ value: c }) => `${c ?? ""}`),
|
|
810
|
+
NumberFormatter: t.fn(
|
|
811
|
+
({ obProps: c, fieldValue: d }) => `${c?.[d] ?? ""}`
|
|
812
|
+
),
|
|
813
|
+
getTypographyStyles: t.fn(() => ({})),
|
|
814
|
+
getComponentClasses: t.fn(
|
|
815
|
+
(c, d) => (Array.isArray(d) ? d : Object.keys(d)).reduce(
|
|
816
|
+
(m, A) => ({
|
|
817
|
+
...m,
|
|
818
|
+
[A]: A
|
|
819
|
+
}),
|
|
820
|
+
{}
|
|
821
|
+
)
|
|
822
|
+
),
|
|
823
|
+
Chip: t.fn(
|
|
824
|
+
({
|
|
825
|
+
label: c,
|
|
826
|
+
startIcon: d,
|
|
827
|
+
color: l
|
|
828
|
+
}) => /* @__PURE__ */ u(
|
|
829
|
+
"div",
|
|
830
|
+
{
|
|
831
|
+
"data-testid": "chip",
|
|
832
|
+
"data-label": c ?? "",
|
|
833
|
+
"data-start-icon": d ?? "",
|
|
834
|
+
"data-color": l ?? ""
|
|
835
|
+
}
|
|
836
|
+
)
|
|
837
|
+
),
|
|
838
|
+
Image: t.fn(
|
|
839
|
+
({
|
|
840
|
+
src: c,
|
|
841
|
+
alt: d
|
|
842
|
+
}) => /* @__PURE__ */ u("img", { "data-testid": "mock-image", src: c ?? "", alt: d ?? "" })
|
|
843
|
+
),
|
|
844
|
+
RHFormProvider: t.fn(
|
|
845
|
+
({
|
|
846
|
+
children: c,
|
|
847
|
+
onSubmit: d,
|
|
848
|
+
statusLoad: l
|
|
849
|
+
}) => {
|
|
850
|
+
const m = _e(o);
|
|
851
|
+
return m && d && (m.current = d), /* @__PURE__ */ u(
|
|
852
|
+
"div",
|
|
853
|
+
{
|
|
854
|
+
"data-testid": "rhf-provider",
|
|
855
|
+
"data-status-load": String(l ?? ""),
|
|
856
|
+
children: c
|
|
857
|
+
}
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
createValidationPartialObject: t.fn(
|
|
862
|
+
(...c) => r ? r(...c) : {}
|
|
863
|
+
),
|
|
864
|
+
createValidationFullObject: t.fn(
|
|
865
|
+
(...c) => a ? a(...c) : c[0]
|
|
866
|
+
),
|
|
867
|
+
createValidationSchema: t.fn(
|
|
868
|
+
(...c) => i ? i(...c) : {}
|
|
869
|
+
),
|
|
870
|
+
getObjectLogsComponentsDictionary: t.fn(() => []),
|
|
871
|
+
getNoItemSelectedComponentsDictionary: t.fn(() => []),
|
|
872
|
+
getFormattersComponentsDictionary: t.fn(() => []),
|
|
873
|
+
getDynamicSortComponentsDictionary: t.fn(() => []),
|
|
874
|
+
getDynamicFilterComponentsDictionary: t.fn(() => []),
|
|
875
|
+
getDataGridComponentsDictionary: t.fn(() => []),
|
|
876
|
+
getCheckableListComponentsDictionary: t.fn(() => []),
|
|
877
|
+
getRHFAutocompleteComponentsDictionary: t.fn(() => []),
|
|
878
|
+
getStepperComponentsDictionary: t.fn(() => []),
|
|
879
|
+
LinearProgress: t.fn(
|
|
880
|
+
({
|
|
881
|
+
"data-testid": c
|
|
882
|
+
}) => /* @__PURE__ */ u("div", { "data-testid": c ?? "linear-progress" })
|
|
883
|
+
),
|
|
884
|
+
DataGrid: t.fn(({ children: c }) => /* @__PURE__ */ u("div", { "data-testid": "data-grid", children: c })),
|
|
885
|
+
Stack: v("stack"),
|
|
886
|
+
Button: t.fn(
|
|
887
|
+
({ children: c, disabled: d, label: l, onClick: m, "data-testid": A }) => /* @__PURE__ */ u(
|
|
888
|
+
"button",
|
|
889
|
+
{
|
|
890
|
+
"data-testid": typeof A == "string" ? A : "button",
|
|
891
|
+
disabled: !!d,
|
|
892
|
+
onClick: m,
|
|
893
|
+
children: String(l ?? c ?? "")
|
|
894
|
+
}
|
|
895
|
+
)
|
|
896
|
+
),
|
|
897
|
+
WindowConfirm: v("window-confirm"),
|
|
898
|
+
WindowBase: Ie(),
|
|
899
|
+
Card: v("card"),
|
|
900
|
+
Typography: v("typography"),
|
|
901
|
+
NavLink: Oe(),
|
|
902
|
+
Tooltip: t.fn(
|
|
903
|
+
({
|
|
904
|
+
children: c,
|
|
905
|
+
title: d
|
|
906
|
+
}) => /* @__PURE__ */ u(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
"data-testid": "tooltip",
|
|
910
|
+
"data-title": typeof d == "string" ? d : void 0,
|
|
911
|
+
children: c
|
|
912
|
+
}
|
|
913
|
+
)
|
|
914
|
+
),
|
|
915
|
+
NoItemSelected: t.fn(
|
|
916
|
+
({ title: c, message: d }) => /* @__PURE__ */ q("div", { "data-testid": "no-item-selected", children: [
|
|
917
|
+
/* @__PURE__ */ u("div", { "data-testid": "no-item-title", children: c }),
|
|
918
|
+
/* @__PURE__ */ u("div", { "data-testid": "no-item-message", children: d })
|
|
919
|
+
] })
|
|
920
|
+
),
|
|
921
|
+
DATAGRID_SEMANTIC_WIDTHS: oe,
|
|
922
|
+
IconButton: t.fn(
|
|
923
|
+
({ children: c, className: d, disabled: l, onClick: m }) => /* @__PURE__ */ u(
|
|
924
|
+
"button",
|
|
925
|
+
{
|
|
926
|
+
"data-testid": "icon-button",
|
|
927
|
+
className: typeof d == "string" ? d : void 0,
|
|
928
|
+
disabled: !!l,
|
|
929
|
+
onClick: m,
|
|
930
|
+
children: c
|
|
931
|
+
}
|
|
932
|
+
)
|
|
933
|
+
),
|
|
934
|
+
Icon: Fe(),
|
|
935
|
+
ReactJsonViewer: t.fn(({ data: c }) => /* @__PURE__ */ u("div", { "data-testid": "react-json-view", children: we(c) })),
|
|
936
|
+
TabsNavigator: S("tabs-navigator", "TabsNavigator"),
|
|
937
|
+
DistanceToNowFormatter: t.fn(
|
|
938
|
+
({
|
|
939
|
+
value: c
|
|
940
|
+
}) => /* @__PURE__ */ u("span", { "data-testid": "distance-to-now-formatter", children: c ?? "" })
|
|
941
|
+
),
|
|
942
|
+
useDistanceToNowFormatter: t.fn(() => ae),
|
|
943
|
+
Tabs: v("tabs"),
|
|
944
|
+
Tab: t.fn(({ children: c, label: d, ...l }) => /* @__PURE__ */ u(
|
|
945
|
+
"button",
|
|
946
|
+
{
|
|
947
|
+
"data-testid": "tab",
|
|
948
|
+
"data-label": String(d ?? ""),
|
|
949
|
+
...l,
|
|
950
|
+
children: c
|
|
951
|
+
}
|
|
952
|
+
)),
|
|
953
|
+
PropagateLoaderSpinner: S(
|
|
954
|
+
"propagate-loader-spinner"
|
|
955
|
+
),
|
|
956
|
+
createToaster: t.fn(() => Q()),
|
|
957
|
+
deepShallow: t.fn(Object.is),
|
|
958
|
+
getRawFiltersForNetwork: t.fn(() => []),
|
|
959
|
+
getRawSortsForNetwork: t.fn(() => []),
|
|
960
|
+
useColumnBoolean: C(),
|
|
961
|
+
useColumnChipStatus: C(),
|
|
962
|
+
useColumnDate: C(),
|
|
963
|
+
useColumnIcon: C(),
|
|
964
|
+
useColumnNestedValue: C(),
|
|
965
|
+
useColumnNumber: C(),
|
|
966
|
+
getDataGridRowsFromSet: t.fn(
|
|
967
|
+
(c, d, l) => d.filter((m) => c.has(l(m)))
|
|
968
|
+
),
|
|
969
|
+
PaperForm: Ce(),
|
|
970
|
+
PropertyValue: ke(),
|
|
971
|
+
RHFColorPicker: T("rhf-color"),
|
|
972
|
+
RHFCheckbox: T("rhf-checkbox"),
|
|
973
|
+
RHFHelperError: T("rhf-helper"),
|
|
974
|
+
RHFSelect: T("rhf-select"),
|
|
975
|
+
RHFTextField: T("rhf-field"),
|
|
976
|
+
RHFNumberInput: T("rhf-number"),
|
|
977
|
+
RHFRadioGroup: t.fn(({ name: c }) => /* @__PURE__ */ u("div", { "data-testid": `rhf-radio-group-${String(c ?? "")}` })),
|
|
978
|
+
RHFCheckableList: t.fn(({ name: c }) => /* @__PURE__ */ u(
|
|
979
|
+
"div",
|
|
980
|
+
{
|
|
981
|
+
"data-testid": `rhf-checkable-list-${String(c ?? "")}`,
|
|
982
|
+
"data-name": String(c ?? "")
|
|
983
|
+
}
|
|
984
|
+
)),
|
|
985
|
+
Step: v("step"),
|
|
986
|
+
Stepper: v("stepper"),
|
|
987
|
+
StepperContent: v("stepper-content"),
|
|
988
|
+
StepperFooter: v("stepper-footer"),
|
|
989
|
+
StepperFooterLeftActions: v(
|
|
990
|
+
"stepper-footer-left-actions"
|
|
991
|
+
),
|
|
992
|
+
StepperFooterRightActions: v(
|
|
993
|
+
"stepper-footer-right-actions"
|
|
994
|
+
),
|
|
995
|
+
StepperNextButton: S("stepper-next"),
|
|
996
|
+
StepperPrevButton: S("stepper-prev"),
|
|
997
|
+
StepperSubmitButton: S("stepper-submit"),
|
|
998
|
+
StepperCancelButton: Le({
|
|
999
|
+
testId: "stepper-cancel-button",
|
|
1000
|
+
handlerProp: "onClose",
|
|
1001
|
+
labelProp: "children"
|
|
1002
|
+
}),
|
|
1003
|
+
useFormReadyForUpdate: t.fn(() => !0),
|
|
1004
|
+
getStepsAndValidationSchema: t.fn(
|
|
1005
|
+
(c) => s ? s(c) : {
|
|
1006
|
+
steps: c.steps,
|
|
1007
|
+
validationSchema: c.validationSchema
|
|
1008
|
+
}
|
|
1009
|
+
),
|
|
1010
|
+
...n
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
function dt({
|
|
1014
|
+
baseModule: e = {},
|
|
1015
|
+
moduleOverrides: n = {},
|
|
1016
|
+
submitRefGlobalKey: o = O
|
|
1017
|
+
} = {}) {
|
|
1018
|
+
return {
|
|
1019
|
+
...W({ baseModule: e, submitRefGlobalKey: o }),
|
|
1020
|
+
SideBar: p("mock-side-bar"),
|
|
1021
|
+
AppBar: p("mock-app-bar"),
|
|
1022
|
+
ModalProvider: p("mock-modal-provider"),
|
|
1023
|
+
PopupsProvider: p("mock-popups-provider"),
|
|
1024
|
+
AreasProvider: p("mock-areas-provider"),
|
|
1025
|
+
Loadable: t.fn((r) => r),
|
|
1026
|
+
MFLoader: t.fn(
|
|
1027
|
+
({
|
|
1028
|
+
moduleId: r,
|
|
1029
|
+
debugPort: a
|
|
1030
|
+
}) => /* @__PURE__ */ u(
|
|
1031
|
+
"div",
|
|
1032
|
+
{
|
|
1033
|
+
"data-testid": "mock-mf-loader",
|
|
1034
|
+
"data-module-id": r ?? "",
|
|
1035
|
+
"data-debug-port": `${a ?? ""}`
|
|
1036
|
+
}
|
|
1037
|
+
)
|
|
1038
|
+
),
|
|
1039
|
+
SplitLayout: t.fn(
|
|
1040
|
+
({
|
|
1041
|
+
firstPart: r,
|
|
1042
|
+
secondPart: a
|
|
1043
|
+
}) => /* @__PURE__ */ q("div", { "data-testid": "split-layout", children: [
|
|
1044
|
+
r,
|
|
1045
|
+
a
|
|
1046
|
+
] })
|
|
1047
|
+
),
|
|
1048
|
+
WINDOW_SIZES: ne,
|
|
1049
|
+
createDynamicMFStore: t.fn(
|
|
1050
|
+
({
|
|
1051
|
+
dynamicMFParameters: r
|
|
1052
|
+
}) => ({
|
|
1053
|
+
dynamicMFParameters: r
|
|
1054
|
+
})
|
|
1055
|
+
),
|
|
1056
|
+
getMFLoaderComponentsDictionary: t.fn(() => []),
|
|
1057
|
+
getLoadingErrorComponentsDictionary: t.fn(() => []),
|
|
1058
|
+
AreasAdmin: S("mock-areas-admin"),
|
|
1059
|
+
LanguagePopover: S("mock-language-popover"),
|
|
1060
|
+
AccountPopover: S("mock-account-popover"),
|
|
1061
|
+
HelmetPage: De(),
|
|
1062
|
+
useDataGridPersistence: t.fn(),
|
|
1063
|
+
// Shared export-datagrid hooks; export tests restore real impl via vi.importActual.
|
|
1064
|
+
useExportColumns: t.fn(),
|
|
1065
|
+
useVisibleColumnNames: t.fn(),
|
|
1066
|
+
useWatchTyped: t.fn(
|
|
1067
|
+
({ name: r }) => r === "color" ? "#64748B" : !1
|
|
1068
|
+
),
|
|
1069
|
+
RowKey: void 0,
|
|
1070
|
+
useWindowToolsMF: t.fn(() => ({
|
|
1071
|
+
getCookie: t.fn(),
|
|
1072
|
+
getWindowId: t.fn(() => "test-window-id"),
|
|
1073
|
+
setCookie: t.fn()
|
|
1074
|
+
})),
|
|
1075
|
+
useSizeContainer: t.fn(() => ({ containerWidth: 1200, containerHeight: 800 })),
|
|
1076
|
+
useDynamicFilterAndSort: t.fn(
|
|
1077
|
+
({
|
|
1078
|
+
onChangeFilterSort: r,
|
|
1079
|
+
rightActions: a
|
|
1080
|
+
}) => ({
|
|
1081
|
+
leftActions: /* @__PURE__ */ u("div", { children: "LeftActions" }),
|
|
1082
|
+
visibleCustomHeader: !1,
|
|
1083
|
+
customHeaderComponent: /* @__PURE__ */ u("div", { children: "CustomHeaderComponent" }),
|
|
1084
|
+
rightActions: a,
|
|
1085
|
+
onChangeFilterSort: r
|
|
1086
|
+
})
|
|
1087
|
+
),
|
|
1088
|
+
useModal: t.fn(),
|
|
1089
|
+
MFIsolationApp: v("mock-mf-isolation-app"),
|
|
1090
|
+
AreasViewer: S("mock-areas-viewer"),
|
|
1091
|
+
...n
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
function ut({
|
|
1095
|
+
dynamicMFParameters: e = { objectId: 99 }
|
|
1096
|
+
} = {}) {
|
|
1097
|
+
return {
|
|
1098
|
+
useDynamicMFParametersStore: t.fn(
|
|
1099
|
+
(n) => n({ dynamicMFParameters: e })
|
|
1100
|
+
),
|
|
1101
|
+
FormContainer: t.fn(({ children: n }) => n),
|
|
1102
|
+
ActionsContainer: t.fn(({ children: n }) => n),
|
|
1103
|
+
ActionFormCancel: t.fn(() => null),
|
|
1104
|
+
ActionFormIntro: t.fn(() => null),
|
|
1105
|
+
RHFAutocompleteAsync: t.fn(() => null),
|
|
1106
|
+
RHFRadioGroup: t.fn(() => null)
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
function ft({
|
|
1110
|
+
baseModule: e = {},
|
|
1111
|
+
baseStoreState: n,
|
|
1112
|
+
environmentData: o,
|
|
1113
|
+
hostToolsData: r,
|
|
1114
|
+
moduleLabel: a = "Test Module",
|
|
1115
|
+
getLabel: i = (m) => m,
|
|
1116
|
+
userPreferencesData: s,
|
|
1117
|
+
moduleOverrides: c = {},
|
|
1118
|
+
authState: d = {
|
|
1119
|
+
isAuthenticated: !1,
|
|
1120
|
+
isInitialized: !0
|
|
1121
|
+
},
|
|
1122
|
+
flagsStoreState: l
|
|
1123
|
+
} = {}) {
|
|
1124
|
+
const m = x({
|
|
1125
|
+
...U,
|
|
1126
|
+
...o
|
|
1127
|
+
}), A = r ?? B(), h = ee(
|
|
1128
|
+
s
|
|
1129
|
+
), M = te(s), z = n ?? {}, K = l ?? {
|
|
1130
|
+
flagsActions: {
|
|
1131
|
+
addFlag: t.fn()
|
|
1132
|
+
}
|
|
1133
|
+
}, Y = d ? {
|
|
1134
|
+
isAuthenticated: d.isAuthenticated,
|
|
1135
|
+
isInitialized: d.isInitialized,
|
|
1136
|
+
user: d.user ?? null,
|
|
1137
|
+
login: d.login ?? t.fn(),
|
|
1138
|
+
logout: d.logout ?? t.fn(async () => {
|
|
1139
|
+
})
|
|
1140
|
+
} : {
|
|
1141
|
+
isAuthenticated: !1,
|
|
1142
|
+
isInitialized: !0,
|
|
1143
|
+
user: null,
|
|
1144
|
+
login: t.fn(),
|
|
1145
|
+
logout: t.fn(async () => {
|
|
1146
|
+
})
|
|
1147
|
+
};
|
|
1148
|
+
return {
|
|
1149
|
+
...e,
|
|
1150
|
+
BaseProvider: t.fn(({ children: f }) => /* @__PURE__ */ u("div", { "data-testid": "base-provider", children: f })),
|
|
1151
|
+
AuthProvider: p("auth-provider"),
|
|
1152
|
+
EnvironmentProvider: p("environment-provider"),
|
|
1153
|
+
FlagsProvider: p("flags-provider"),
|
|
1154
|
+
HostToolsProvider: p("host-tools-provider"),
|
|
1155
|
+
NetworkProvider: p("network-provider"),
|
|
1156
|
+
UserPreferencesProvider: p("user-preferences-provider"),
|
|
1157
|
+
useBaseStore: t.fn(
|
|
1158
|
+
(f) => f(z)
|
|
1159
|
+
),
|
|
1160
|
+
useAuth: t.fn(() => Y),
|
|
1161
|
+
DomainCountryProvider: p("domain-country-provider"),
|
|
1162
|
+
ModuleDictionaryProvider: p("module-dictionary-provider"),
|
|
1163
|
+
ModuleSkeletonProvider: p("module-skeleton-provider"),
|
|
1164
|
+
CommonFlags: {
|
|
1165
|
+
FLAG_DOMAIN_LOADED: "FLAG_DOMAIN_LOADED",
|
|
1166
|
+
FLAG_DICTIONARY_LOADED: "FLAG_DICTIONARY_LOADED",
|
|
1167
|
+
FLAG_PRIVILEGES_LOADED: "FLAG_PRIVILEGES_LOADED"
|
|
1168
|
+
},
|
|
1169
|
+
EmitEvents: {
|
|
1170
|
+
EMMIT_EVENT_HOST_EMERGE_WINDOW: "EMMIT_EVENT_HOST_EMERGE_WINDOW"
|
|
1171
|
+
},
|
|
1172
|
+
getPropertyByString: t.fn(
|
|
1173
|
+
(f, I, L) => {
|
|
1174
|
+
if (f == null)
|
|
1175
|
+
return L;
|
|
1176
|
+
try {
|
|
1177
|
+
return I.split(".").reduce(
|
|
1178
|
+
(Z, X) => Z?.[X],
|
|
1179
|
+
f
|
|
1180
|
+
) ?? L;
|
|
1181
|
+
} catch {
|
|
1182
|
+
return L;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
),
|
|
1186
|
+
useEnvironment: t.fn(() => m),
|
|
1187
|
+
useDomainCountry: t.fn(() => ({
|
|
1188
|
+
id: 1,
|
|
1189
|
+
currency: "USD",
|
|
1190
|
+
currency_decimal_digits: 2,
|
|
1191
|
+
decimal_symbol: ".",
|
|
1192
|
+
thousands_symbol: ","
|
|
1193
|
+
})),
|
|
1194
|
+
useFlagsPresent: t.fn().mockReturnValue(!0),
|
|
1195
|
+
useFlagsStore: t.fn(
|
|
1196
|
+
(f) => f(K)
|
|
1197
|
+
),
|
|
1198
|
+
useHostTools: t.fn(() => A),
|
|
1199
|
+
useModuleDictionary: t.fn(() => ({
|
|
1200
|
+
getLabel: t.fn(i),
|
|
1201
|
+
getModuleLabel: t.fn(() => a)
|
|
1202
|
+
})),
|
|
1203
|
+
useModulePrivileges: t.fn(),
|
|
1204
|
+
useModuleSkeleton: t.fn(() => !1),
|
|
1205
|
+
useLocalStorage: t.fn(
|
|
1206
|
+
(f, I) => [I, t.fn()]
|
|
1207
|
+
),
|
|
1208
|
+
useNetwork: t.fn(),
|
|
1209
|
+
DEFAULT_USER_PREFERENCES: re,
|
|
1210
|
+
normalizeUserPreferences: t.fn((f) => ({
|
|
1211
|
+
decimalSymbol: typeof f?.decimalSymbol == "string" ? f.decimalSymbol : h.decimalSymbol,
|
|
1212
|
+
thousandsSymbol: typeof f?.thousandsSymbol == "string" ? f.thousandsSymbol : h.thousandsSymbol,
|
|
1213
|
+
dateFormat: typeof f?.dateFormat == "string" ? f.dateFormat : typeof f?.dateFormat?.format == "string" ? (f?.dateFormat).format : h.dateFormat,
|
|
1214
|
+
timeFormat: typeof f?.timeFormat == "string" ? f.timeFormat : typeof f?.timeFormat?.format == "string" ? (f?.timeFormat).format : h.timeFormat,
|
|
1215
|
+
timeZone: f?.timeZone !== void 0 ? f.timeZone : h.timeZone,
|
|
1216
|
+
locale: typeof f?.locale == "string" ? f.locale : typeof f?.locale?.id == "string" ? (f?.locale).id : h.locale,
|
|
1217
|
+
magnitudesSystemId: typeof f?.magnitudesSystemId == "number" ? f.magnitudesSystemId : typeof f?.magnitudesSystem?.id == "number" ? (f?.magnitudesSystem).id : h.magnitudesSystemId,
|
|
1218
|
+
properties: Array.isArray(f?.properties) ? f.properties : h.properties,
|
|
1219
|
+
currency: typeof f?.currency == "string" ? f.currency : h.currency,
|
|
1220
|
+
currencyDecimalDigits: typeof f?.currencyDecimalDigits == "number" ? f.currencyDecimalDigits : h.currencyDecimalDigits
|
|
1221
|
+
})),
|
|
1222
|
+
useUserPreferences: t.fn(() => ({
|
|
1223
|
+
...M,
|
|
1224
|
+
changeUserPreferences: t.fn(
|
|
1225
|
+
M.changeUserPreferences
|
|
1226
|
+
),
|
|
1227
|
+
convertMagnitude: t.fn(
|
|
1228
|
+
M.convertMagnitude
|
|
1229
|
+
),
|
|
1230
|
+
formatNumber: t.fn(
|
|
1231
|
+
M.formatNumber
|
|
1232
|
+
),
|
|
1233
|
+
getMagnitudeProperty: t.fn(
|
|
1234
|
+
M.getMagnitudeProperty
|
|
1235
|
+
)
|
|
1236
|
+
})),
|
|
1237
|
+
voidFunction: t.fn(),
|
|
1238
|
+
...c
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
function lt({
|
|
1242
|
+
baseModule: e = {},
|
|
1243
|
+
moduleOverrides: n = {}
|
|
1244
|
+
} = {}) {
|
|
1245
|
+
return {
|
|
1246
|
+
...e,
|
|
1247
|
+
getContrastTextColor: t.fn(() => "#000000"),
|
|
1248
|
+
useIsMobile: t.fn(() => !1),
|
|
1249
|
+
usePaginate: t.fn(() => ({
|
|
1250
|
+
pagerState: {
|
|
1251
|
+
page: 1,
|
|
1252
|
+
rowsPerPage: 10,
|
|
1253
|
+
totalRows: 0
|
|
1254
|
+
},
|
|
1255
|
+
rows: [],
|
|
1256
|
+
onPageChange: t.fn(),
|
|
1257
|
+
onRowsPerPageChange: t.fn(),
|
|
1258
|
+
Refresh: t.fn()
|
|
1259
|
+
})),
|
|
1260
|
+
useRows: t.fn(() => ({
|
|
1261
|
+
rows: [],
|
|
1262
|
+
refresh: t.fn()
|
|
1263
|
+
})),
|
|
1264
|
+
getLocaleFromNetwork: t.fn(),
|
|
1265
|
+
useLocales: t.fn(() => ({
|
|
1266
|
+
currentLocale: {
|
|
1267
|
+
localeString: "en"
|
|
1268
|
+
}
|
|
1269
|
+
})),
|
|
1270
|
+
useThemeSettingsStore: t.fn(
|
|
1271
|
+
(o) => o({
|
|
1272
|
+
settingsActions: {
|
|
1273
|
+
handleOpen: t.fn()
|
|
1274
|
+
}
|
|
1275
|
+
})
|
|
1276
|
+
),
|
|
1277
|
+
FormatterProvider: p("formatter-provider"),
|
|
1278
|
+
HostThemeProvider: p("host-theme-provider"),
|
|
1279
|
+
LocalesProvider: p("locales-provider"),
|
|
1280
|
+
ThemeSettingsProvider: p("theme-settings-provider"),
|
|
1281
|
+
DeviceTypeProvider: p("device-type-provider"),
|
|
1282
|
+
...n
|
|
1283
|
+
};
|
|
1284
|
+
}
|
|
1285
|
+
function pt({
|
|
1286
|
+
baseModule: e = {},
|
|
1287
|
+
moduleOverrides: n = {}
|
|
1288
|
+
} = {}) {
|
|
1289
|
+
return {
|
|
1290
|
+
...e,
|
|
1291
|
+
EnvironmentType: {
|
|
1292
|
+
DEVELOPMENT: "development",
|
|
1293
|
+
PRODUCTION: "production",
|
|
1294
|
+
STAGING: "staging"
|
|
1295
|
+
},
|
|
1296
|
+
MasterDetailLayout: t.fn(({ children: o, ...r }) => /* @__PURE__ */ u("div", { "data-testid": "master-detail-layout", ...r, children: o })),
|
|
1297
|
+
MFHostApp: t.fn(({ children: o }) => o),
|
|
1298
|
+
ModuleDetailTabs: t.fn(
|
|
1299
|
+
({
|
|
1300
|
+
tabs: o
|
|
1301
|
+
}) => /* @__PURE__ */ u("div", { children: o.map((r) => /* @__PURE__ */ u("div", { children: typeof r.tabContent == "function" ? r.tabContent() : r.tabContent }, r.value)) })
|
|
1302
|
+
),
|
|
1303
|
+
ModuleLayout: t.fn(({ children: o }) => /* @__PURE__ */ u("div", { "data-testid": "module-layout", children: o })),
|
|
1304
|
+
MFNoAuthApp: p("mock-mf-no-auth-app"),
|
|
1305
|
+
NoAuthModuleLayout: t.fn(() => /* @__PURE__ */ u("div", { "data-testid": "no-auth-layout" })),
|
|
1306
|
+
createAppMF: t.fn(),
|
|
1307
|
+
getMasterDetailLayoutComponentsDictionary: t.fn(() => []),
|
|
1308
|
+
useModule: t.fn(),
|
|
1309
|
+
useMasterDetail: t.fn(() => ({
|
|
1310
|
+
onChangeMasterSelection: t.fn(),
|
|
1311
|
+
onClickViewDetail: t.fn()
|
|
1312
|
+
})),
|
|
1313
|
+
useDynamicAccordions: t.fn(() => ({
|
|
1314
|
+
configDynamicAccordions: t.fn(() => ({
|
|
1315
|
+
detailInventory: t.fn(() => ({}))
|
|
1316
|
+
}))
|
|
1317
|
+
})),
|
|
1318
|
+
useNetworkActionConfirm: t.fn(() => ({
|
|
1319
|
+
onAction: t.fn()
|
|
1320
|
+
})),
|
|
1321
|
+
...n
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
function mt({
|
|
1325
|
+
createComponentFieldImplementation: e
|
|
1326
|
+
} = {}) {
|
|
1327
|
+
return {
|
|
1328
|
+
useDynamicPaperForm: t.fn(),
|
|
1329
|
+
useFormAddEdit: t.fn(),
|
|
1330
|
+
createComponentField: t.fn(
|
|
1331
|
+
e ?? ((n) => n)
|
|
1332
|
+
)
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
function yt({
|
|
1336
|
+
baseModule: e = {},
|
|
1337
|
+
domEventData: n,
|
|
1338
|
+
moduleOverrides: o = {},
|
|
1339
|
+
scaleControlFactory: r
|
|
1340
|
+
} = {}) {
|
|
1341
|
+
const a = e, i = a.default ?? a, s = i.DomEvent ?? {}, c = i.control ?? {};
|
|
1342
|
+
return {
|
|
1343
|
+
...a,
|
|
1344
|
+
default: {
|
|
1345
|
+
...i,
|
|
1346
|
+
DomEvent: {
|
|
1347
|
+
...s,
|
|
1348
|
+
disableClickPropagation: n?.disableClickPropagation ?? t.fn(),
|
|
1349
|
+
disableScrollPropagation: n?.disableScrollPropagation ?? t.fn()
|
|
1350
|
+
},
|
|
1351
|
+
control: {
|
|
1352
|
+
...c,
|
|
1353
|
+
scale: r !== void 0 ? t.fn(() => r()) : c.scale ?? t.fn()
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
...o
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
function gt({
|
|
1360
|
+
baseModule: e = {},
|
|
1361
|
+
dataGridPersistenceData: n,
|
|
1362
|
+
dynamicFilterAndSortData: o,
|
|
1363
|
+
modalData: r,
|
|
1364
|
+
moduleOverrides: a = {},
|
|
1365
|
+
popupsStoreData: i,
|
|
1366
|
+
windowToolsData: s
|
|
1367
|
+
} = {}) {
|
|
1368
|
+
const c = n ?? {
|
|
1369
|
+
defaultUserColumns: void 0,
|
|
1370
|
+
onChangeUserColumns: t.fn()
|
|
1371
|
+
}, d = o ?? {
|
|
1372
|
+
customHeaderComponent: null,
|
|
1373
|
+
externalFilterSettings: void 0,
|
|
1374
|
+
externalSortSettings: void 0,
|
|
1375
|
+
leftActions: null,
|
|
1376
|
+
rightActions: null,
|
|
1377
|
+
visibleCustomHeader: !1
|
|
1378
|
+
}, l = r ?? {
|
|
1379
|
+
closeModal: t.fn(),
|
|
1380
|
+
openModal: t.fn()
|
|
1381
|
+
}, m = i ?? {
|
|
1382
|
+
popupActions: {
|
|
1383
|
+
close: t.fn(),
|
|
1384
|
+
hide: t.fn(),
|
|
1385
|
+
show: t.fn()
|
|
1386
|
+
},
|
|
1387
|
+
popupsActions: {
|
|
1388
|
+
addPopup: t.fn()
|
|
1389
|
+
}
|
|
1390
|
+
}, A = s ?? {
|
|
1391
|
+
getCookie: t.fn(),
|
|
1392
|
+
getWindowId: t.fn(() => "test-window-id"),
|
|
1393
|
+
setCookie: t.fn(),
|
|
1394
|
+
startProgress: t.fn(),
|
|
1395
|
+
stopProgress: t.fn()
|
|
1396
|
+
};
|
|
1397
|
+
return {
|
|
1398
|
+
...W({ baseModule: e }),
|
|
1399
|
+
PopupsProvider: v("mock-popups-provider"),
|
|
1400
|
+
useDataGridPersistence: t.fn(() => c),
|
|
1401
|
+
useDynamicFilterAndSort: t.fn(() => d),
|
|
1402
|
+
useModal: t.fn(() => l),
|
|
1403
|
+
usePopupsStore: t.fn(
|
|
1404
|
+
(h) => h(m)
|
|
1405
|
+
),
|
|
1406
|
+
useWatchTyped: t.fn(() => {
|
|
1407
|
+
}),
|
|
1408
|
+
useWindowToolsMF: t.fn(() => A),
|
|
1409
|
+
...a
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
function vt({
|
|
1413
|
+
baseModule: e = {},
|
|
1414
|
+
environmentData: n,
|
|
1415
|
+
getLabel: o = (d, l) => l ? `label:${d}:${l}` : `label:${d}`,
|
|
1416
|
+
hostToolsData: r,
|
|
1417
|
+
moduleOverrides: a = {},
|
|
1418
|
+
moduleLabel: i = "Test Module",
|
|
1419
|
+
modulePrivilegesData: s,
|
|
1420
|
+
networkData: c
|
|
1421
|
+
} = {}) {
|
|
1422
|
+
const d = x({
|
|
1423
|
+
...ie,
|
|
1424
|
+
...n
|
|
1425
|
+
}), l = r ?? B(), m = s ?? {
|
|
1426
|
+
hasPrivilege: t.fn(() => !0)
|
|
1427
|
+
}, A = c ?? {
|
|
1428
|
+
networkOperation: t.fn()
|
|
1429
|
+
};
|
|
1430
|
+
return {
|
|
1431
|
+
...e,
|
|
1432
|
+
useLocalStorageWithListener: t.fn(
|
|
1433
|
+
(h, M) => [M, t.fn()]
|
|
1434
|
+
),
|
|
1435
|
+
useEnvironment: t.fn(() => d),
|
|
1436
|
+
useHostTools: t.fn(() => l),
|
|
1437
|
+
useModuleDictionary: t.fn(() => ({
|
|
1438
|
+
getLabel: t.fn(o),
|
|
1439
|
+
getModuleLabel: t.fn(() => i)
|
|
1440
|
+
})),
|
|
1441
|
+
useModulePrivileges: t.fn(() => m),
|
|
1442
|
+
useModuleSkeleton: t.fn(() => !1),
|
|
1443
|
+
useNetwork: t.fn(() => A),
|
|
1444
|
+
...a
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
function ht({
|
|
1448
|
+
baseModule: e = {},
|
|
1449
|
+
mapStoreState: n,
|
|
1450
|
+
moduleOverrides: o = {}
|
|
1451
|
+
} = {}) {
|
|
1452
|
+
const r = {
|
|
1453
|
+
...Re(),
|
|
1454
|
+
...n
|
|
1455
|
+
};
|
|
1456
|
+
return {
|
|
1457
|
+
...e,
|
|
1458
|
+
LAT_LON_FIXED_DIGITS: 6,
|
|
1459
|
+
createPixelPathDecimationFilter: t.fn(() => t.fn()),
|
|
1460
|
+
courseToCartesianAngle: t.fn((a) => a),
|
|
1461
|
+
getCourseDirection: t.fn(
|
|
1462
|
+
(a, i, s = 5) => i >= 0 + s && i < 90 - s ? a("LABEL_NORTH_EAST") : i >= 90 - s && i < 90 + s ? a("LABEL_NORTH") : i >= 90 + s && i < 180 - s ? a("LABEL_NORTH_WEST") : i >= 180 - s && i < 180 + s ? a("LABEL_WEST") : i >= 180 + s && i < 270 - s ? a("LABEL_SOUTH_WEST") : i >= 270 - s && i < 270 + s ? a("LABEL_SOUTH") : i >= 270 + s && i < 360 - s ? a("LABEL_SOUTH_EAST") : a("LABEL_EAST")
|
|
1463
|
+
),
|
|
1464
|
+
IndicatorValueAndMagnitude: t.fn(
|
|
1465
|
+
({
|
|
1466
|
+
value: a,
|
|
1467
|
+
magnitude: i,
|
|
1468
|
+
minWidth: s
|
|
1469
|
+
}) => /* @__PURE__ */ u(
|
|
1470
|
+
"div",
|
|
1471
|
+
{
|
|
1472
|
+
"data-testid": "mock-indicator-value-and-magnitude",
|
|
1473
|
+
"data-value": String(a),
|
|
1474
|
+
"data-magnitude": i ?? "",
|
|
1475
|
+
"data-min-width": s ?? ""
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
),
|
|
1479
|
+
getMapComponentsDictionary: t.fn(() => []),
|
|
1480
|
+
getDeviceComponentsDictionary: t.fn(() => []),
|
|
1481
|
+
getCourseFormatterComponentsDictionary: t.fn(() => []),
|
|
1482
|
+
getIndicatorCSQComponentsDictionary: t.fn(() => []),
|
|
1483
|
+
getGpsMapToolsComponentsDictionary: t.fn(() => []),
|
|
1484
|
+
getDevicesPickerComponentsDictionary: t.fn(() => []),
|
|
1485
|
+
getCheckableDevicesPickerComponentsDictionary: t.fn(() => []),
|
|
1486
|
+
/**
|
|
1487
|
+
* Catalog of components that can be rendered in place of
|
|
1488
|
+
* `RHFAutocompleteAsync`. A suite that builds filter fields only needs the
|
|
1489
|
+
* entry to resolve; the rendered picker itself is a placeholder.
|
|
1490
|
+
*/
|
|
1491
|
+
RHF_AUTOCOMPLETE_ASYNC_RENDER_AS_REGISTRY: {
|
|
1492
|
+
devices: T("rhf-devices-picker")
|
|
1493
|
+
},
|
|
1494
|
+
/**
|
|
1495
|
+
* Device label contract mirrored from `@m4l/gclick`: alias first, name
|
|
1496
|
+
* when there is none.
|
|
1497
|
+
*/
|
|
1498
|
+
resolveDeviceTitle: t.fn(
|
|
1499
|
+
(a) => a?.alias?.trim() || a?.name?.trim() || ""
|
|
1500
|
+
),
|
|
1501
|
+
GpsMap: S("mock-gps-map", "GpsMap"),
|
|
1502
|
+
IndicatorValueStatus: S(
|
|
1503
|
+
"mock-indicator-value-status",
|
|
1504
|
+
"IndicatorValueStatus"
|
|
1505
|
+
),
|
|
1506
|
+
MapProvider: t.fn(({ children: a }) => /* @__PURE__ */ u("div", { "data-testid": "map-provider", children: a })),
|
|
1507
|
+
getHdopPresentation: t.fn(
|
|
1508
|
+
({ hdop: a }) => a < 0 ? { precisionMeters: void 0, status: "UNKNOWN", color: "warning" } : a === 0 ? { precisionMeters: 0, status: "EXCELLENT", color: "success" } : a < 3 ? { precisionMeters: 2.5, status: "GOOD", color: "primary" } : { precisionMeters: 10, status: "POOR", color: "error" }
|
|
1509
|
+
),
|
|
1510
|
+
useDeviceStatus: t.fn(() => ({
|
|
1511
|
+
label: "Test status",
|
|
1512
|
+
palletColor: "primary",
|
|
1513
|
+
iconKey: "online"
|
|
1514
|
+
})),
|
|
1515
|
+
useMapStore: t.fn(
|
|
1516
|
+
(a) => a(r)
|
|
1517
|
+
),
|
|
1518
|
+
...o
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
const He = "#1E96DC", Ne = /* @__PURE__ */ new Set(["state", "updatedAt", "value"]);
|
|
1522
|
+
var G = /* @__PURE__ */ ((e) => (e[e.off = 0] = "off", e[e.moving = 1] = "moving", e[e.stopped = 2] = "stopped", e[e.stoppedRalenti = 3] = "stoppedRalenti", e[e.stoppedExcesiveRalenti = 4] = "stoppedExcesiveRalenti", e[e.towing = 5] = "towing", e[e.powerSaving = 6] = "powerSaving", e[e.maxSpeed = 7] = "maxSpeed", e[e.notDetectable = 250] = "notDetectable", e))(G || {}), J = /* @__PURE__ */ ((e) => (e[e.reliable = 0] = "reliable", e[e.acceptable = 1] = "acceptable", e[e.noSignal = 2] = "noSignal", e))(J || {});
|
|
1523
|
+
function E(e) {
|
|
1524
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
1525
|
+
return !1;
|
|
1526
|
+
const n = Object.getPrototypeOf(e);
|
|
1527
|
+
return n === Object.prototype || n === null;
|
|
1528
|
+
}
|
|
1529
|
+
function N(e) {
|
|
1530
|
+
return E(e) ? Object.keys(e).some((n) => Ne.has(n)) : !1;
|
|
1531
|
+
}
|
|
1532
|
+
function qe(e, n) {
|
|
1533
|
+
const o = e.updatedAt, r = n.updatedAt;
|
|
1534
|
+
if (typeof o != "string" || typeof r != "string")
|
|
1535
|
+
return !1;
|
|
1536
|
+
const a = new Date(o).getTime(), i = new Date(r).getTime();
|
|
1537
|
+
return !Number.isFinite(a) || !Number.isFinite(i) ? !1 : i < a;
|
|
1538
|
+
}
|
|
1539
|
+
function xe(e, n) {
|
|
1540
|
+
try {
|
|
1541
|
+
return e == null ? n : typeof e == "object" ? e?.value ?? n : e;
|
|
1542
|
+
} catch {
|
|
1543
|
+
return n;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
function Be(e, n = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
1547
|
+
try {
|
|
1548
|
+
if (typeof e == "object")
|
|
1549
|
+
return e?.updatedAt ?? n;
|
|
1550
|
+
} catch {
|
|
1551
|
+
return n;
|
|
1552
|
+
}
|
|
1553
|
+
return n;
|
|
1554
|
+
}
|
|
1555
|
+
function j(e, n) {
|
|
1556
|
+
if (n !== void 0) {
|
|
1557
|
+
if (N(e) && N(n))
|
|
1558
|
+
return qe(e, n) ? { ...e } : {
|
|
1559
|
+
...e,
|
|
1560
|
+
...n
|
|
1561
|
+
};
|
|
1562
|
+
if (Array.isArray(n))
|
|
1563
|
+
return n;
|
|
1564
|
+
if (E(e) && E(n)) {
|
|
1565
|
+
let o = n, r = !1;
|
|
1566
|
+
return Object.entries(n).forEach(([a, i]) => {
|
|
1567
|
+
const s = j(
|
|
1568
|
+
e[a],
|
|
1569
|
+
i
|
|
1570
|
+
);
|
|
1571
|
+
s === i && s !== void 0 || (r || (o = { ...n }, r = !0), s === void 0 ? delete o[a] : o[a] = s);
|
|
1572
|
+
}), o;
|
|
1573
|
+
}
|
|
1574
|
+
return n;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
function Ue(e, n) {
|
|
1578
|
+
const o = j(
|
|
1579
|
+
e,
|
|
1580
|
+
n
|
|
1581
|
+
);
|
|
1582
|
+
return E(o) ? o : n;
|
|
1583
|
+
}
|
|
1584
|
+
function St({
|
|
1585
|
+
baseModule: e = {},
|
|
1586
|
+
moduleOverrides: n = {},
|
|
1587
|
+
surface: o = "root"
|
|
1588
|
+
} = {}) {
|
|
1589
|
+
const r = {
|
|
1590
|
+
BASE_SVG_COLOR: He,
|
|
1591
|
+
GNSSEnumMotionStatus: G,
|
|
1592
|
+
GNSSEnumSignal: J
|
|
1593
|
+
}, a = {
|
|
1594
|
+
getVptValueWithGuard: t.fn(xe),
|
|
1595
|
+
getVptUpdatedAtWithGuard: t.fn(Be),
|
|
1596
|
+
mergeDevicePayloadWithUpdatedAtGuard: t.fn(
|
|
1597
|
+
Ue
|
|
1598
|
+
)
|
|
1599
|
+
};
|
|
1600
|
+
return {
|
|
1601
|
+
...e,
|
|
1602
|
+
...o === "payload" ? a : r,
|
|
1603
|
+
...n
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
function At({
|
|
1607
|
+
baseModule: e = {},
|
|
1608
|
+
moduleOverrides: n = {}
|
|
1609
|
+
} = {}) {
|
|
1610
|
+
return {
|
|
1611
|
+
...e,
|
|
1612
|
+
getContrastTextColor: t.fn(() => "#000000"),
|
|
1613
|
+
useIsMobile: t.fn(() => !1),
|
|
1614
|
+
usePaginate: t.fn(() => ({
|
|
1615
|
+
pagerState: {
|
|
1616
|
+
page: 1,
|
|
1617
|
+
rowsPerPage: 10,
|
|
1618
|
+
totalRecords: 0
|
|
1619
|
+
},
|
|
1620
|
+
rows: [],
|
|
1621
|
+
onPageChange: t.fn(),
|
|
1622
|
+
onRowsPerPageChange: t.fn(),
|
|
1623
|
+
Refresh: t.fn()
|
|
1624
|
+
})),
|
|
1625
|
+
useRows: t.fn(() => ({
|
|
1626
|
+
rows: [],
|
|
1627
|
+
refresh: t.fn()
|
|
1628
|
+
})),
|
|
1629
|
+
...n
|
|
1630
|
+
};
|
|
1631
|
+
}
|
|
1632
|
+
function Pt({
|
|
1633
|
+
baseModule: e = {},
|
|
1634
|
+
moduleOverrides: n = {}
|
|
1635
|
+
} = {}) {
|
|
1636
|
+
return {
|
|
1637
|
+
...e,
|
|
1638
|
+
DynamicTabs: S("dynamic-tabs"),
|
|
1639
|
+
MasterDetailLayout: v(
|
|
1640
|
+
"master-detail-layout"
|
|
1641
|
+
),
|
|
1642
|
+
ModuleDetailTabs: t.fn(
|
|
1643
|
+
({
|
|
1644
|
+
tabs: o
|
|
1645
|
+
}) => /* @__PURE__ */ u("div", { "data-testid": "module-detail-tabs", children: o?.map((r) => /* @__PURE__ */ u("div", { children: typeof r.tabContent == "function" ? r.tabContent() : r.tabContent }, r.value)) })
|
|
1646
|
+
),
|
|
1647
|
+
ModuleLayout: v("module-layout"),
|
|
1648
|
+
useFormAddEdit: t.fn(() => ({
|
|
1649
|
+
formValues: {},
|
|
1650
|
+
statusLoad: "idle"
|
|
1651
|
+
})),
|
|
1652
|
+
useMasterDetail: t.fn(() => ({
|
|
1653
|
+
onChangeMasterSelection: t.fn(),
|
|
1654
|
+
onClickViewDetail: t.fn(),
|
|
1655
|
+
refreshMaster: t.fn(),
|
|
1656
|
+
setRefreshMaster: t.fn()
|
|
1657
|
+
})),
|
|
1658
|
+
useModule: t.fn(() => ({
|
|
1659
|
+
setDynamicActions: t.fn()
|
|
1660
|
+
})),
|
|
1661
|
+
useNetworkActionConfirm: t.fn(() => ({
|
|
1662
|
+
onAction: t.fn()
|
|
1663
|
+
})),
|
|
1664
|
+
MFHostApp: t.fn(({ children: o }) => o),
|
|
1665
|
+
...n
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
function bt({
|
|
1669
|
+
baseModule: e = {},
|
|
1670
|
+
moduleOverrides: n = {},
|
|
1671
|
+
useFormContextData: o = {}
|
|
1672
|
+
} = {}) {
|
|
1673
|
+
return {
|
|
1674
|
+
...e,
|
|
1675
|
+
useFormContext: t.fn(() => ({
|
|
1676
|
+
control: {},
|
|
1677
|
+
getValues: t.fn(),
|
|
1678
|
+
reset: t.fn(),
|
|
1679
|
+
setValue: t.fn(),
|
|
1680
|
+
trigger: t.fn(),
|
|
1681
|
+
watch: t.fn(),
|
|
1682
|
+
formState: {
|
|
1683
|
+
dirtyFields: {},
|
|
1684
|
+
errors: {}
|
|
1685
|
+
},
|
|
1686
|
+
...o
|
|
1687
|
+
})),
|
|
1688
|
+
...n
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
function Mt() {
|
|
1692
|
+
return {
|
|
1693
|
+
Resizable: t.fn(({ children: e }) => /* @__PURE__ */ u("div", { "data-testid": "resizable", children: e }))
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
function Tt({
|
|
1697
|
+
baseModule: e = {},
|
|
1698
|
+
moduleOverrides: n = {},
|
|
1699
|
+
useMapData: o,
|
|
1700
|
+
useMapImplementation: r
|
|
1701
|
+
} = {}) {
|
|
1702
|
+
return {
|
|
1703
|
+
...e,
|
|
1704
|
+
Circle: t.fn(
|
|
1705
|
+
({
|
|
1706
|
+
center: a,
|
|
1707
|
+
radius: i,
|
|
1708
|
+
eventHandlers: s,
|
|
1709
|
+
...c
|
|
1710
|
+
}) => /* @__PURE__ */ u(
|
|
1711
|
+
"div",
|
|
1712
|
+
{
|
|
1713
|
+
"data-testid": "circle",
|
|
1714
|
+
"data-center": JSON.stringify(a ?? null),
|
|
1715
|
+
"data-radius": String(i ?? ""),
|
|
1716
|
+
"data-event-handlers": JSON.stringify(s ?? {}),
|
|
1717
|
+
"data-props": JSON.stringify(c)
|
|
1718
|
+
}
|
|
1719
|
+
)
|
|
1720
|
+
),
|
|
1721
|
+
GeoJSON: t.fn(
|
|
1722
|
+
({
|
|
1723
|
+
data: a,
|
|
1724
|
+
eventHandlers: i,
|
|
1725
|
+
...s
|
|
1726
|
+
}) => /* @__PURE__ */ u(
|
|
1727
|
+
"div",
|
|
1728
|
+
{
|
|
1729
|
+
"data-testid": "geojson",
|
|
1730
|
+
"data-geojson": JSON.stringify(a ?? null),
|
|
1731
|
+
"data-event-handlers": JSON.stringify(i ?? {}),
|
|
1732
|
+
"data-props": JSON.stringify(s)
|
|
1733
|
+
}
|
|
1734
|
+
)
|
|
1735
|
+
),
|
|
1736
|
+
LayerGroup: t.fn(({ children: a }) => /* @__PURE__ */ u("div", { "data-testid": "layer-group", children: a })),
|
|
1737
|
+
Polyline: t.fn(
|
|
1738
|
+
({
|
|
1739
|
+
positions: a,
|
|
1740
|
+
eventHandlers: i,
|
|
1741
|
+
...s
|
|
1742
|
+
}) => /* @__PURE__ */ u(
|
|
1743
|
+
"div",
|
|
1744
|
+
{
|
|
1745
|
+
"data-testid": "polyline",
|
|
1746
|
+
"data-positions": JSON.stringify(a ?? []),
|
|
1747
|
+
"data-event-handlers": JSON.stringify(i ?? {}),
|
|
1748
|
+
"data-props": JSON.stringify(s)
|
|
1749
|
+
}
|
|
1750
|
+
)
|
|
1751
|
+
),
|
|
1752
|
+
Polygon: t.fn(
|
|
1753
|
+
({
|
|
1754
|
+
positions: a,
|
|
1755
|
+
eventHandlers: i,
|
|
1756
|
+
...s
|
|
1757
|
+
}) => /* @__PURE__ */ u(
|
|
1758
|
+
"div",
|
|
1759
|
+
{
|
|
1760
|
+
"data-testid": "polygon",
|
|
1761
|
+
"data-positions": JSON.stringify(a ?? []),
|
|
1762
|
+
"data-event-handlers": JSON.stringify(i ?? {}),
|
|
1763
|
+
"data-props": JSON.stringify(s)
|
|
1764
|
+
}
|
|
1765
|
+
)
|
|
1766
|
+
),
|
|
1767
|
+
Marker: t.fn(
|
|
1768
|
+
({
|
|
1769
|
+
children: a,
|
|
1770
|
+
position: i,
|
|
1771
|
+
icon: s,
|
|
1772
|
+
eventHandlers: c,
|
|
1773
|
+
...d
|
|
1774
|
+
}) => /* @__PURE__ */ u(
|
|
1775
|
+
"div",
|
|
1776
|
+
{
|
|
1777
|
+
"data-testid": "marker",
|
|
1778
|
+
"data-position": JSON.stringify(i),
|
|
1779
|
+
"data-icon": JSON.stringify(s),
|
|
1780
|
+
"data-event-handlers": JSON.stringify(c ?? {}),
|
|
1781
|
+
"data-props": JSON.stringify(d),
|
|
1782
|
+
children: a
|
|
1783
|
+
}
|
|
1784
|
+
)
|
|
1785
|
+
),
|
|
1786
|
+
Popup: t.fn(({ children: a }) => /* @__PURE__ */ u("div", { "data-testid": "popup", children: a })),
|
|
1787
|
+
useMap: t.fn(
|
|
1788
|
+
() => r ? r() : o
|
|
1789
|
+
),
|
|
1790
|
+
...n
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
export {
|
|
1794
|
+
H as A,
|
|
1795
|
+
ot as B,
|
|
1796
|
+
it as C,
|
|
1797
|
+
O as D,
|
|
1798
|
+
at as E,
|
|
1799
|
+
st as F,
|
|
1800
|
+
ct as G,
|
|
1801
|
+
dt as H,
|
|
1802
|
+
ut as I,
|
|
1803
|
+
ft as J,
|
|
1804
|
+
lt as K,
|
|
1805
|
+
pt as L,
|
|
1806
|
+
ne as M,
|
|
1807
|
+
mt as N,
|
|
1808
|
+
W as O,
|
|
1809
|
+
yt as P,
|
|
1810
|
+
$e as Q,
|
|
1811
|
+
gt as R,
|
|
1812
|
+
vt as S,
|
|
1813
|
+
ht as T,
|
|
1814
|
+
St as U,
|
|
1815
|
+
At as V,
|
|
1816
|
+
Pt as W,
|
|
1817
|
+
bt as X,
|
|
1818
|
+
Mt as Y,
|
|
1819
|
+
Tt as Z,
|
|
1820
|
+
oe as a,
|
|
1821
|
+
ie as b,
|
|
1822
|
+
ae as c,
|
|
1823
|
+
U as d,
|
|
1824
|
+
Qe as e,
|
|
1825
|
+
et as f,
|
|
1826
|
+
Xe as g,
|
|
1827
|
+
p as h,
|
|
1828
|
+
S as i,
|
|
1829
|
+
Ce as j,
|
|
1830
|
+
v as k,
|
|
1831
|
+
De as l,
|
|
1832
|
+
T as m,
|
|
1833
|
+
ke as n,
|
|
1834
|
+
Fe as o,
|
|
1835
|
+
Ee as p,
|
|
1836
|
+
Oe as q,
|
|
1837
|
+
Ie as r,
|
|
1838
|
+
Le as s,
|
|
1839
|
+
tt as t,
|
|
1840
|
+
C as u,
|
|
1841
|
+
rt as v,
|
|
1842
|
+
_e as w,
|
|
1843
|
+
we as x,
|
|
1844
|
+
nt as y,
|
|
1845
|
+
Re as z
|
|
1846
|
+
};
|