@m4l/components 9.36.1-beta-pkg-754-nuevos-hooks-compartidos-para-shared-export-datagrid.1 → 9.37.0
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/components/MFLoader/helpers/createObservableLoaderMF/createObservableLoaderMF.js +8 -8
- package/components/MFLoader/helpers/createObservableLoaderMF/types.d.ts +4 -4
- package/components/MFLoader/helpers/createObservableLoaderMF/types.d.ts.map +1 -1
- package/components/MFLoader/helpers/emitWebTelemetry/emitWebTelemetry.d.ts +7 -0
- package/components/MFLoader/helpers/emitWebTelemetry/emitWebTelemetry.d.ts.map +1 -0
- package/components/MFLoader/helpers/{emitFrontendTelemetry/emitFrontendTelemetry.js → emitWebTelemetry/emitWebTelemetry.js} +2 -2
- package/components/MFLoader/helpers/emitWebTelemetry/index.d.ts +2 -0
- package/components/MFLoader/helpers/{emitFrontendTelemetry → emitWebTelemetry}/index.d.ts.map +1 -1
- package/components/MFLoader/hooks/useMFRender/useMFRender.js +20 -20
- package/components/MFLoader/hooks/useMFSwap/useMFSwap.js +9 -9
- package/components/MFLoader/hooks/useMFTelemetry/useMFTelemetry.js +5 -5
- package/components/MFLoader/types.d.ts +2 -2
- package/components/MFLoader/types.d.ts.map +1 -1
- package/components/WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.d.ts +1 -1
- package/components/WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +69 -63
- package/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.d.ts +1 -4
- package/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.d.ts.map +1 -1
- package/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.js +15 -22
- package/contexts/ShellObservabilityContext/ShellObservabilityContext.d.ts +1 -1
- package/contexts/ShellObservabilityContext/ShellObservabilityContext.d.ts.map +1 -1
- package/hooks/index.d.ts +0 -1
- package/hooks/index.d.ts.map +1 -1
- package/index.js +35 -39
- package/package.json +7 -7
- package/components/MFLoader/helpers/emitFrontendTelemetry/emitFrontendTelemetry.d.ts +0 -7
- package/components/MFLoader/helpers/emitFrontendTelemetry/emitFrontendTelemetry.d.ts.map +0 -1
- package/components/MFLoader/helpers/emitFrontendTelemetry/index.d.ts +0 -2
- package/hooks/useExportDatagridColumns/index.d.ts +0 -4
- package/hooks/useExportDatagridColumns/index.d.ts.map +0 -1
- package/hooks/useExportDatagridColumns/types.d.ts +0 -47
- package/hooks/useExportDatagridColumns/types.d.ts.map +0 -1
- package/hooks/useExportDatagridColumns/useExportColumns.d.ts +0 -16
- package/hooks/useExportDatagridColumns/useExportColumns.d.ts.map +0 -1
- package/hooks/useExportDatagridColumns/useExportColumns.js +0 -23
- package/hooks/useExportDatagridColumns/useVisibleColumnNames.d.ts +0 -9
- package/hooks/useExportDatagridColumns/useVisibleColumnNames.d.ts.map +0 -1
- package/hooks/useExportDatagridColumns/useVisibleColumnNames.js +0 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { buildManifestUrl as
|
|
2
|
-
import {
|
|
1
|
+
import { buildManifestUrl as W, isMFManifest as z, shouldUseLocalDevEntryFallback as H, buildLocalDevEntryUrl as K, isAbortLikeError as N, getFailureDetail as k } from "../mfRuntimeUtils/mfRuntimeUtils.js";
|
|
2
|
+
import { emitWebTelemetry as Q } from "../emitWebTelemetry/emitWebTelemetry.js";
|
|
3
3
|
function C(c, q, U, T, r) {
|
|
4
4
|
let u, f = !1, y = "progress", m, S = 0, n;
|
|
5
5
|
const p = [];
|
|
6
6
|
function v(e) {
|
|
7
|
-
r &&
|
|
7
|
+
r && Q(e);
|
|
8
8
|
}
|
|
9
9
|
function g(e) {
|
|
10
10
|
r && (u = {
|
|
@@ -87,7 +87,7 @@ function C(c, q, U, T, r) {
|
|
|
87
87
|
g(e), i("progress", b);
|
|
88
88
|
const F = new AbortController(), R = window.setTimeout(() => {
|
|
89
89
|
F.abort();
|
|
90
|
-
}, s), G = performance.now(), _ =
|
|
90
|
+
}, s), G = performance.now(), _ = W(c);
|
|
91
91
|
let l;
|
|
92
92
|
try {
|
|
93
93
|
const o = await fetch(
|
|
@@ -99,17 +99,17 @@ function C(c, q, U, T, r) {
|
|
|
99
99
|
if (!o.ok)
|
|
100
100
|
throw new Error(`Manifest request failed with status ${o.status}`);
|
|
101
101
|
const d = await o.json();
|
|
102
|
-
if (!
|
|
102
|
+
if (!z(d))
|
|
103
103
|
throw new Error("Manifest is missing the required src/index.tsx entry");
|
|
104
104
|
l = M ? `${c}/${d["src/index.tsx"].file}?rnd=${Math.random()}` : `${c}/${d["src/index.tsx"].file}`;
|
|
105
105
|
} catch (o) {
|
|
106
|
-
if (!T &&
|
|
107
|
-
l =
|
|
106
|
+
if (!T && H(o))
|
|
107
|
+
l = K(c, M), console.warn(
|
|
108
108
|
`MFLoader manifest request fell back to the Vite dev entry for ${c}`,
|
|
109
109
|
o
|
|
110
110
|
);
|
|
111
111
|
else {
|
|
112
|
-
const d =
|
|
112
|
+
const d = N(o) ? "manifest_fetch_timeout" : "manifest_fetch_error";
|
|
113
113
|
L(
|
|
114
114
|
e,
|
|
115
115
|
performance.now() - t,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WebTelemetryContext, ModuleLoadFailureReason, ModuleLoadSource } from '../../../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
2
2
|
import { EventType, NetworkOperation, ObservableHandler } from '../mfRuntimeUtils/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Describe the telemetry payload attached to one observable loader instance.
|
|
@@ -6,10 +6,10 @@ import { EventType, NetworkOperation, ObservableHandler } from '../mfRuntimeUtil
|
|
|
6
6
|
*/
|
|
7
7
|
export type ObservableLoaderTelemetryConfig = {
|
|
8
8
|
/**
|
|
9
|
-
* Shared
|
|
10
|
-
* Contexto compartido de telemetría
|
|
9
|
+
* Shared web telemetry context for all load events emitted by this helper.
|
|
10
|
+
* Contexto compartido de telemetría web para todos los eventos de carga emitidos por este helper.
|
|
11
11
|
*/
|
|
12
|
-
context:
|
|
12
|
+
context: WebTelemetryContext & {
|
|
13
13
|
/**
|
|
14
14
|
* Module id associated with the current MF load attempt.
|
|
15
15
|
* Id del módulo asociado al intento actual de carga del MF.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/createObservableLoaderMF/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/createObservableLoaderMF/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEjG;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,OAAO,EAAE,mBAAmB,GAAG;QAC7B;;;WAGG;QACH,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF;;;OAGG;IACH,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,EAAE,uBAAuB,CAAC;CACxC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,2BAA2B,EAAE,MAAM,yBAAyB,GAAG,SAAS,CAAC;IACzE;;;OAGG;IACH,2BAA2B,EAAE,MAAM,0BAA0B,GAAG,SAAS,CAAC;IAC1E;;;OAGG;IACH,4BAA4B,EAAE,MAAM,2BAA2B,GAAG,SAAS,CAAC;IAC5E;;;OAGG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B;;;OAGG;IACH,SAAS,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,KACE,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,OAAO,EACjB,eAAe,CAAC,EAAE,+BAA+B,GAChD,0BAA0B,CAAC;CAC/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WebTelemetryEvent } from '../../../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Emit one web telemetry event through the browser event bus, if available.
|
|
4
|
+
* Emite un evento de telemetría web a través del bus de eventos del navegador, si está disponible.
|
|
5
|
+
*/
|
|
6
|
+
export declare function emitWebTelemetry(event: WebTelemetryEvent): void;
|
|
7
|
+
//# sourceMappingURL=emitWebTelemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitWebTelemetry.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/emitWebTelemetry/emitWebTelemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAY/D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAiB/D"}
|
package/components/MFLoader/helpers/{emitFrontendTelemetry → emitWebTelemetry}/index.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/emitWebTelemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCallback as k } from "react";
|
|
2
2
|
import { axiosOperation as C } from "@m4l/core";
|
|
3
|
-
import { getMFObservableLoader as $, getMFRenderFunction as
|
|
4
|
-
import {
|
|
3
|
+
import { getMFObservableLoader as $, getMFRenderFunction as b } from "../../helpers/mfWindowRegistry/mfWindowRegistry.js";
|
|
4
|
+
import { emitWebTelemetry as m } from "../../helpers/emitWebTelemetry/emitWebTelemetry.js";
|
|
5
5
|
function V(e) {
|
|
6
6
|
const n = Reflect.get(e, "__version");
|
|
7
7
|
return typeof n == "string" ? n : void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function q({
|
|
10
10
|
prefix: e,
|
|
11
11
|
debugPort: n,
|
|
12
12
|
dynamicMFStore: s,
|
|
@@ -17,18 +17,18 @@ function z({
|
|
|
17
17
|
hostTools: D,
|
|
18
18
|
currentLocale: I,
|
|
19
19
|
hostTheme: g,
|
|
20
|
-
formatter:
|
|
21
|
-
userPreferences:
|
|
20
|
+
formatter: R,
|
|
21
|
+
userPreferences: S,
|
|
22
22
|
resolvedHostRuntime: u,
|
|
23
23
|
resolvedObservability: c,
|
|
24
|
-
reportLoaderError:
|
|
24
|
+
reportLoaderError: v,
|
|
25
25
|
emitSwapFailedTelemetry: i,
|
|
26
|
-
setStatusLoader:
|
|
27
|
-
createTelemetryContext:
|
|
26
|
+
setStatusLoader: A,
|
|
27
|
+
createTelemetryContext: F
|
|
28
28
|
}) {
|
|
29
29
|
return { renderMicroFrontend: k(
|
|
30
30
|
(r) => {
|
|
31
|
-
const l =
|
|
31
|
+
const l = F(r.moduleId, e), o = $(
|
|
32
32
|
e,
|
|
33
33
|
r.moduleId
|
|
34
34
|
)?.consumeResolvedLoadTelemetry(), x = {
|
|
@@ -42,15 +42,15 @@ function z({
|
|
|
42
42
|
currentLocale: I,
|
|
43
43
|
hostTheme: g,
|
|
44
44
|
axiosOperation: C,
|
|
45
|
-
formatter:
|
|
46
|
-
userPreferences:
|
|
45
|
+
formatter: R,
|
|
46
|
+
userPreferences: S,
|
|
47
47
|
dynamicMFStore: s,
|
|
48
48
|
windowTools: f,
|
|
49
49
|
...u ? { hostRuntime: u } : {},
|
|
50
50
|
...c ? { observability: c } : {},
|
|
51
51
|
loggedUser: M,
|
|
52
52
|
emergeType: p
|
|
53
|
-
}, a =
|
|
53
|
+
}, a = b(e, r.moduleId);
|
|
54
54
|
if (typeof a != "function")
|
|
55
55
|
return o && m({
|
|
56
56
|
type: "module_load_failed",
|
|
@@ -59,7 +59,7 @@ function z({
|
|
|
59
59
|
attempt: o.attempt,
|
|
60
60
|
totalDurationMs: performance.now() - o.loadStartedAt,
|
|
61
61
|
failureReason: "render_function_missing"
|
|
62
|
-
}), i("render_function_missing"),
|
|
62
|
+
}), i("render_function_missing"), A("error"), !1;
|
|
63
63
|
try {
|
|
64
64
|
const t = performance.now();
|
|
65
65
|
if (a(x), o) {
|
|
@@ -98,34 +98,34 @@ function z({
|
|
|
98
98
|
return i(
|
|
99
99
|
"render_exception",
|
|
100
100
|
t instanceof Error ? t.message : void 0
|
|
101
|
-
),
|
|
101
|
+
), v(
|
|
102
102
|
`MFLoader render contract execution failed for ${e}/${r.moduleId}`,
|
|
103
103
|
t
|
|
104
104
|
), !1;
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
[
|
|
108
|
-
|
|
108
|
+
F,
|
|
109
109
|
I,
|
|
110
110
|
n,
|
|
111
111
|
s,
|
|
112
112
|
i,
|
|
113
113
|
p,
|
|
114
114
|
_,
|
|
115
|
-
|
|
115
|
+
R,
|
|
116
116
|
g,
|
|
117
117
|
D,
|
|
118
118
|
M,
|
|
119
119
|
e,
|
|
120
|
-
|
|
120
|
+
v,
|
|
121
121
|
c,
|
|
122
122
|
u,
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
A,
|
|
124
|
+
S,
|
|
125
125
|
f
|
|
126
126
|
]
|
|
127
127
|
) };
|
|
128
128
|
}
|
|
129
129
|
export {
|
|
130
|
-
|
|
130
|
+
q as useMFRender
|
|
131
131
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useState as q, useRef as d, useCallback as
|
|
2
|
-
import { buildMFInstanceIds as
|
|
3
|
-
import {
|
|
1
|
+
import { useState as q, useRef as d, useCallback as v, useEffect as C } from "react";
|
|
2
|
+
import { buildMFInstanceIds as _ } from "../../helpers/mfRuntimeUtils/mfRuntimeUtils.js";
|
|
3
|
+
import { emitWebTelemetry as $ } from "../../helpers/emitWebTelemetry/emitWebTelemetry.js";
|
|
4
4
|
import { cleanUpMFInstance as g } from "../../helpers/mfWindowRegistry/mfWindowRegistry.js";
|
|
5
5
|
function U({
|
|
6
6
|
activeSwapRef: o,
|
|
@@ -13,13 +13,13 @@ function U({
|
|
|
13
13
|
prefix: t,
|
|
14
14
|
reportLoaderError: f
|
|
15
15
|
}) {
|
|
16
|
-
const [e,
|
|
16
|
+
const [e, F] = q(() => _(t, r)), [s, R] = q(e), n = d(e), u = d(s), l = d({ prefix: t, moduleId: r }), i = d(null);
|
|
17
17
|
n.current = e, u.current = s;
|
|
18
|
-
const
|
|
18
|
+
const b = v(() => {
|
|
19
19
|
if (n.current.divContainerId !== u.current.divContainerId) {
|
|
20
20
|
if (n.current.moduleId !== u.current.moduleId) {
|
|
21
21
|
const c = o.current;
|
|
22
|
-
|
|
22
|
+
$({
|
|
23
23
|
type: "module_swap_succeeded",
|
|
24
24
|
context: m(u.current.moduleId, t),
|
|
25
25
|
fromModuleId: n.current.moduleId,
|
|
@@ -27,11 +27,11 @@ function U({
|
|
|
27
27
|
totalDurationMs: c === null ? 0 : performance.now() - c.startedAt
|
|
28
28
|
}), o.current = null;
|
|
29
29
|
}
|
|
30
|
-
i.current = n.current,
|
|
30
|
+
i.current = n.current, F(u.current);
|
|
31
31
|
}
|
|
32
32
|
}, [o, m, t]);
|
|
33
33
|
return C(() => {
|
|
34
|
-
l.current.moduleId === r && l.current.prefix === t || (I(u.current, "swap_race"), l.current = { prefix: t, moduleId: r }, n.current.moduleId !== r && (o.current && p("swap_race"), M(n.current.moduleId, r, t)), R(
|
|
34
|
+
l.current.moduleId === r && l.current.prefix === t || (I(u.current, "swap_race"), l.current = { prefix: t, moduleId: r }, n.current.moduleId !== r && (o.current && p("swap_race"), M(n.current.moduleId, r, t)), R(_(t, r)));
|
|
35
35
|
}, [
|
|
36
36
|
o,
|
|
37
37
|
I,
|
|
@@ -55,7 +55,7 @@ function U({
|
|
|
55
55
|
isSwappingModule: e.divContainerId !== s.divContainerId,
|
|
56
56
|
mountedScriptRef: n,
|
|
57
57
|
requestedScriptRef: u,
|
|
58
|
-
promoteRequestedScript:
|
|
58
|
+
promoteRequestedScript: b
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef as s, useCallback as u, useEffect as R } from "react";
|
|
2
|
-
import { getMFObservableLoader as C, cleanUpMFInstance as
|
|
3
|
-
import {
|
|
2
|
+
import { getMFObservableLoader as C, cleanUpMFInstance as F } from "../../helpers/mfWindowRegistry/mfWindowRegistry.js";
|
|
3
|
+
import { emitWebTelemetry as l } from "../../helpers/emitWebTelemetry/emitWebTelemetry.js";
|
|
4
4
|
function E({
|
|
5
5
|
cache: f,
|
|
6
6
|
prefix: p,
|
|
@@ -35,7 +35,7 @@ function E({
|
|
|
35
35
|
});
|
|
36
36
|
},
|
|
37
37
|
[n]
|
|
38
|
-
),
|
|
38
|
+
), b = u(
|
|
39
39
|
(t, e, r) => {
|
|
40
40
|
a.current = {
|
|
41
41
|
fromModuleId: t,
|
|
@@ -90,7 +90,7 @@ function E({
|
|
|
90
90
|
context: n(d.moduleId, o.current),
|
|
91
91
|
reason: "host-dispose"
|
|
92
92
|
});
|
|
93
|
-
const M =
|
|
93
|
+
const M = F(d, o.current, T.current);
|
|
94
94
|
M && console.error(M);
|
|
95
95
|
}), c("component_unmounted");
|
|
96
96
|
}, [
|
|
@@ -116,7 +116,7 @@ function E({
|
|
|
116
116
|
activeSwapRef: a,
|
|
117
117
|
createTelemetryContext: n,
|
|
118
118
|
emitAbandonedLoadTelemetry: m,
|
|
119
|
-
emitSwapStartedTelemetry:
|
|
119
|
+
emitSwapStartedTelemetry: b,
|
|
120
120
|
emitSwapFailedTelemetry: c,
|
|
121
121
|
reportLoaderError: x
|
|
122
122
|
};
|
|
@@ -4,7 +4,7 @@ import { EmergeType } from '../areas/types';
|
|
|
4
4
|
import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType, UserPreferences } from '@m4l/core';
|
|
5
5
|
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
6
6
|
import { Theme } from '@mui/material';
|
|
7
|
-
import {
|
|
7
|
+
import { WebTelemetryContext, MFObservabilityService } from '../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
8
8
|
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
9
9
|
import { MF_LOADER_KEY_COMPONENT } from './constants';
|
|
10
10
|
import { MFLoaderSlots } from './slots/MFLoaderEnum';
|
|
@@ -283,7 +283,7 @@ export type MFUnmountFunction = (containerId: string) => void;
|
|
|
283
283
|
* Build the shared host-side web telemetry context for one MF runtime event.
|
|
284
284
|
* Construye el contexto compartido de telemetría web del lado del host para un evento de runtime del MF.
|
|
285
285
|
*/
|
|
286
|
-
export type BuildWebTelemetryContext = (moduleId: string, moduleNamespace: string) =>
|
|
286
|
+
export type BuildWebTelemetryContext = (moduleId: string, moduleNamespace: string) => WebTelemetryContext & {
|
|
287
287
|
moduleId: string;
|
|
288
288
|
moduleNamespace: string;
|
|
289
289
|
runtimeKind: 'web';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,7 +3,7 @@ import { MFObservabilityProviderProps } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Context carrying the MF-facing observability service for one mounted module tree.
|
|
5
5
|
*/
|
|
6
|
-
declare const MFObservabilityContext: React.Context<
|
|
6
|
+
declare const MFObservabilityContext: React.Context<MFObservabilityService>;
|
|
7
7
|
/**
|
|
8
8
|
* Provide the MF-facing observability service to one mounted module tree.
|
|
9
9
|
*/
|
package/components/WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MFObservabilityContext.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,QAAA,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"MFObservabilityContext.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,QAAA,MAAM,sBAAsB,uCAE3B,CAAC;AAEF;;GAEG;AACH,iBAAS,uBAAuB,CAC9B,KAAK,EAAE,4BAA4B,oDAUpC;AAED,QAAA,MAAM,+BAA+B,2DAAsC,CAAC;AAE5E,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,GAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaGridLayout.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"AreaGridLayout.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAc1C;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,eAAe,qDA8KpD,CAAC"}
|
|
@@ -1,97 +1,103 @@
|
|
|
1
|
-
import { jsx as m, Fragment as
|
|
2
|
-
import { shallow as
|
|
3
|
-
import { Window as
|
|
4
|
-
import { useAreasStore as
|
|
5
|
-
import { areasViewerClasses as
|
|
6
|
-
import
|
|
7
|
-
import { PADDING_GRIDLAYOUT as
|
|
8
|
-
import { MemonizePopupsViewer as
|
|
9
|
-
import { useState as
|
|
1
|
+
import { jsx as m, Fragment as b } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { shallow as i } from "zustand/shallow";
|
|
3
|
+
import { Window as M } from "../Window/Window.js";
|
|
4
|
+
import { useAreasStore as n } from "../../../../../../hooks/useAreas/index.js";
|
|
5
|
+
import { areasViewerClasses as g } from "../../../../classes/index.js";
|
|
6
|
+
import N from "clsx";
|
|
7
|
+
import { PADDING_GRIDLAYOUT as p, MARGIN_GRIDLAYOUT as f, RESPONSIVE_ROW_HEIGHTS as O } from "../../../../../../contexts/AreasContext/helpers/helper.js";
|
|
8
|
+
import { MemonizePopupsViewer as T } from "../../../../../../../popups/components/PopupsViewer/PopupsViewer.js";
|
|
9
|
+
import { useState as D, useMemo as F, useEffect as P } from "react";
|
|
10
10
|
import { dragResizeWindowRNDClasses as s } from "../../../../../../../DragResizeWindowRND/classes/index.js";
|
|
11
|
-
import { useTheme as
|
|
11
|
+
import { useTheme as V } from "@mui/material";
|
|
12
12
|
import { useComponentSize as k } from "../../../../../../../../hooks/useComponentSize/index.js";
|
|
13
|
-
import { withSizeProvider as
|
|
14
|
-
import { Responsive as
|
|
15
|
-
const
|
|
16
|
-
const { areaId:
|
|
13
|
+
import { withSizeProvider as U } from "../../../../../../../GridLayout/subcomponents/withSizeProvider/index.js";
|
|
14
|
+
import { Responsive as $ } from "../../../../../../../GridLayout/subcomponents/Responsive/index.js";
|
|
15
|
+
const Y = U($), q = 10, ne = (h) => {
|
|
16
|
+
const { areaId: r, size: I } = h, y = n((e) => e.hashAreas[r].layoutItemsIds, i), A = n((e) => e.hashAreas[r].layouts, i), L = n((e) => e.hashAreas[r].breakpoints, i), c = n((e) => e.hashAreas[r].currentLayoutId, i), S = n((e) => e.hashAreas[r].maximizedId, i), w = n((e) => e.hashAreas[r].cols, i), { onBreakpointsLayoutsChange: R, onContainerChange: z } = n(
|
|
17
17
|
(e) => e.areaActions,
|
|
18
|
-
|
|
19
|
-
), d =
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
18
|
+
i
|
|
19
|
+
), d = V(), { currentSize: l } = k(I), [t, C] = D(void 0), H = () => {
|
|
20
|
+
t && t.classList.add(s.resizing);
|
|
21
|
+
}, E = () => {
|
|
22
|
+
t && t.classList.remove(s.resizing);
|
|
23
23
|
}, G = () => {
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
e && e !==
|
|
29
|
-
},
|
|
30
|
-
const e = d?.size?.[d?.generalSettings?.isMobile ? "mobile" : "desktop"]?.[l]?.container,
|
|
24
|
+
t && t.classList.add(s.dragging);
|
|
25
|
+
}, v = () => {
|
|
26
|
+
t && t.classList.remove(s.dragging);
|
|
27
|
+
}, x = (e) => {
|
|
28
|
+
e && e !== t && C(e);
|
|
29
|
+
}, _ = F(() => {
|
|
30
|
+
const e = d?.size?.[d?.generalSettings?.isMobile ? "mobile" : "desktop"]?.[l]?.container, a = parseInt(e), o = isNaN(a) ? 32 : a;
|
|
31
31
|
return {
|
|
32
|
-
xxs:
|
|
33
|
-
xs:
|
|
34
|
-
sm:
|
|
35
|
-
md:
|
|
36
|
-
lg:
|
|
32
|
+
xxs: o,
|
|
33
|
+
xs: o,
|
|
34
|
+
sm: o,
|
|
35
|
+
md: o,
|
|
36
|
+
lg: o
|
|
37
37
|
};
|
|
38
38
|
}, [d, l]);
|
|
39
|
-
return
|
|
40
|
-
if (!
|
|
39
|
+
return P(() => {
|
|
40
|
+
if (!t || !c)
|
|
41
41
|
return;
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
let e = 0, a = q;
|
|
43
|
+
const o = () => {
|
|
44
|
+
const u = t.querySelector(
|
|
44
45
|
`[data-grid-item-id="${c}"]`
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
);
|
|
47
|
+
if (u) {
|
|
48
|
+
u.scrollIntoView?.({
|
|
49
|
+
block: "nearest",
|
|
50
|
+
inline: "nearest"
|
|
51
|
+
});
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
a <= 0 || (a -= 1, e = window.requestAnimationFrame(o));
|
|
55
|
+
};
|
|
56
|
+
return e = window.requestAnimationFrame(o), () => {
|
|
51
57
|
window.cancelAnimationFrame(e);
|
|
52
58
|
};
|
|
53
|
-
}, [c,
|
|
54
|
-
|
|
59
|
+
}, [c, t]), /* @__PURE__ */ m(
|
|
60
|
+
Y,
|
|
55
61
|
{
|
|
56
|
-
ref:
|
|
62
|
+
ref: x,
|
|
57
63
|
autoSize: !1,
|
|
58
64
|
compactType: "vertical",
|
|
59
65
|
measureBeforeMount: !0,
|
|
60
66
|
resizeHandles: ["nw", "se"],
|
|
61
|
-
className:
|
|
62
|
-
|
|
63
|
-
`${
|
|
67
|
+
className: N(
|
|
68
|
+
g.areaGridLayout,
|
|
69
|
+
`${g.areaGridLayout}-${r}`
|
|
64
70
|
),
|
|
65
|
-
layouts:
|
|
66
|
-
onLayoutChange: (e,
|
|
71
|
+
layouts: A,
|
|
72
|
+
onLayoutChange: (e, a) => R(r, e, a),
|
|
67
73
|
draggableHandle: `.${s.draggableHandle}`,
|
|
68
74
|
draggableCancel: `.${s.draggableCancel}`,
|
|
69
|
-
layoutItemRender: (e) =>
|
|
75
|
+
layoutItemRender: (e) => y.indexOf(e.i) === -1 ? /* @__PURE__ */ m(b, {}) : e.type === "placeholder" ? /* @__PURE__ */ m("div", {}) : /* @__PURE__ */ m(M, { windowId: e.i, areaId: r }),
|
|
70
76
|
breakpoints: L,
|
|
71
|
-
colapsedHeight:
|
|
72
|
-
rowHeight:
|
|
73
|
-
cols:
|
|
74
|
-
containerMargin: [
|
|
75
|
-
containerPadding: [
|
|
77
|
+
colapsedHeight: _,
|
|
78
|
+
rowHeight: O,
|
|
79
|
+
cols: w,
|
|
80
|
+
containerMargin: [f, f],
|
|
81
|
+
containerPadding: [p, p],
|
|
76
82
|
onContainerChange: (e) => {
|
|
77
|
-
|
|
83
|
+
z(r, e);
|
|
78
84
|
},
|
|
79
85
|
preventCollision: !1,
|
|
80
86
|
maximizeId: S,
|
|
81
87
|
children: /* @__PURE__ */ m(
|
|
82
|
-
|
|
88
|
+
T,
|
|
83
89
|
{
|
|
84
|
-
groupId:
|
|
85
|
-
containerElement:
|
|
86
|
-
onResizeStart:
|
|
87
|
-
onResizeStop:
|
|
90
|
+
groupId: r,
|
|
91
|
+
containerElement: t,
|
|
92
|
+
onResizeStart: H,
|
|
93
|
+
onResizeStop: E,
|
|
88
94
|
onDragStart: G,
|
|
89
|
-
onDragStop:
|
|
95
|
+
onDragStop: v
|
|
90
96
|
}
|
|
91
97
|
)
|
|
92
98
|
}
|
|
93
99
|
);
|
|
94
100
|
};
|
|
95
101
|
export {
|
|
96
|
-
|
|
102
|
+
ne as AreaGridLayout
|
|
97
103
|
};
|
|
@@ -7,13 +7,10 @@ export declare const useCustomDateFilter: <TRow>(props: ColumnDateFormatterProps
|
|
|
7
7
|
* Function helper that returns the formatter,
|
|
8
8
|
* customFilter and customSort of a date column
|
|
9
9
|
*/
|
|
10
|
-
export declare const useColumnDate: <TRow>(props: ColumnDateFormatterProps<TRow>) =>
|
|
10
|
+
export declare const useColumnDate: <TRow>(props: ColumnDateFormatterProps<TRow>) => {
|
|
11
11
|
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
12
|
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
13
|
customFilter: (row: TRow, value: string) => boolean;
|
|
14
14
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
15
|
-
exportDataType: string;
|
|
16
|
-
}, "exportDataType"> & {
|
|
17
|
-
exportDataType?: string;
|
|
18
15
|
};
|
|
19
16
|
//# sourceMappingURL=useColumnDate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColumnDate.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useColumnDate.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAWnD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,IAAI,EAAE,OAAO,wBAAwB,CAAC,IAAI,CAAC,WAG9C,IAAI,SAAS,MAAM,YAqBnD,CAAC;AAwBF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,IAAI,EAAE,OAAO,wBAAwB,CAAC,IAAI,CAAC;;;qCAjD3B,MAAM;;CAqEnD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useUserPreferences as l, getPropertyByString as i } from "@m4l/core";
|
|
2
2
|
import { ColumnDateFormatter as c } from "./formatter.js";
|
|
3
|
-
import { ColumnDateGroupFormatter as
|
|
3
|
+
import { ColumnDateGroupFormatter as g } from "./ColumnDateGroupFormatter.js";
|
|
4
4
|
import { getValidDate as s } from "../../../../utils/getValidDate.js";
|
|
5
|
-
import { useState as
|
|
6
|
-
import { deepEqual as
|
|
5
|
+
import { useState as D, useRef as d, useEffect as y, useMemo as C, useCallback as T } from "react";
|
|
6
|
+
import { deepEqual as V } from "fast-equals";
|
|
7
7
|
import { getColumnKey as f } from "../../helpers/shared/getColumnKey/getColumnKey.js";
|
|
8
|
-
const
|
|
8
|
+
const S = (e) => {
|
|
9
9
|
const { formatDate: t } = l();
|
|
10
|
-
return
|
|
10
|
+
return T((a, n) => {
|
|
11
11
|
const m = f(e.fieldValue), o = i(a, m);
|
|
12
12
|
let r = null;
|
|
13
13
|
return typeof o == "string" ? r = new Date(o) : o instanceof Date && (r = o), !r || isNaN(r.getTime()) ? !1 : t({
|
|
@@ -16,28 +16,21 @@ const P = (e) => {
|
|
|
16
16
|
format: e.format
|
|
17
17
|
}).includes(n);
|
|
18
18
|
}, [e.presentationType, e.format, t]);
|
|
19
|
-
},
|
|
19
|
+
}, b = (e) => (t, u) => {
|
|
20
20
|
const a = f(e.fieldValue), n = i(t, a), m = i(u, a), o = s(n), r = s(m);
|
|
21
21
|
return !o || !r ? 0 : o.getTime() > r.getTime() ? 1 : o.getTime() < r.getTime() ? -1 : 0;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const [t, u] = T(e), a = P(t), n = D({ ...e });
|
|
28
|
-
return g(() => {
|
|
29
|
-
C(n.current, e) || (n.current = e, u(e));
|
|
30
|
-
}, [e]), y(() => ({
|
|
22
|
+
}, k = (e) => {
|
|
23
|
+
const [t, u] = D(e), a = S(t), n = d({ ...e });
|
|
24
|
+
return y(() => {
|
|
25
|
+
V(n.current, e) || (n.current = e, u(e));
|
|
26
|
+
}, [e]), C(() => ({
|
|
31
27
|
formatter: c(t),
|
|
32
|
-
renderGroupCell:
|
|
28
|
+
renderGroupCell: g(t),
|
|
33
29
|
customFilter: a,
|
|
34
|
-
customSort:
|
|
35
|
-
// Export dataType derived from the presentation mode (date / datetime / time),
|
|
36
|
-
// since the DataGrid ColumnType cannot carry it. useExportColumns reads it.
|
|
37
|
-
exportDataType: V[t.presentationType]
|
|
30
|
+
customSort: b(t)
|
|
38
31
|
}), [t, a]);
|
|
39
32
|
};
|
|
40
33
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
k as useColumnDate,
|
|
35
|
+
S as useCustomDateFilter
|
|
43
36
|
};
|
|
@@ -11,7 +11,7 @@ export interface ShellObservabilityProviderProps {
|
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
value?: ShellObservabilityContextValue;
|
|
13
13
|
}
|
|
14
|
-
declare const ShellObservabilityContext: import('react').Context<
|
|
14
|
+
declare const ShellObservabilityContext: import('react').Context<any>;
|
|
15
15
|
/**
|
|
16
16
|
* Publish one shell-owned observability service to shell-local consumers.
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellObservabilityContext.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/contexts/ShellObservabilityContext/ShellObservabilityContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,sBAAsB,GAAG,SAAS,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,8BAA8B,CAAC;CACxC;AAED,QAAA,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ShellObservabilityContext.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/contexts/ShellObservabilityContext/ShellObservabilityContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,sBAAsB,GAAG,SAAS,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,8BAA8B,CAAC;CACxC;AAED,QAAA,MAAM,yBAAyB,8BAE9B,CAAC;AAEF;;GAEG;AACH,iBAAS,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,oDASzE;AAED;;GAEG;AACH,iBAAS,qBAAqB,IAAI,8BAA8B,CAE/D;AAED,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,CAAC"}
|
package/hooks/index.d.ts
CHANGED
package/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
package/index.js
CHANGED
|
@@ -318,24 +318,22 @@ import { resolvePopoverPaperProps as gl, usePopoverPaperProps as Tl } from "./ho
|
|
|
318
318
|
import { useIsVisible as Dl } from "./hooks/useIsVisible/useIsVisible.js";
|
|
319
319
|
import { useSizeContainer as Sl } from "./hooks/useSizeContainer/index.js";
|
|
320
320
|
import { useWatchTyped as yl } from "./hooks/useWatchTyped/useTypedWatch.js";
|
|
321
|
-
import {
|
|
322
|
-
import {
|
|
323
|
-
import {
|
|
324
|
-
import {
|
|
325
|
-
import {
|
|
326
|
-
import {
|
|
327
|
-
import {
|
|
328
|
-
import {
|
|
329
|
-
import {
|
|
330
|
-
import {
|
|
331
|
-
import {
|
|
332
|
-
import {
|
|
333
|
-
import {
|
|
334
|
-
import {
|
|
335
|
-
import {
|
|
336
|
-
import {
|
|
337
|
-
import { getNullGuard as iu } from "./utils/getNullGuard.js";
|
|
338
|
-
import { createCustomDeepShallow as fu, deepShallow as su } from "./utils/deepShallow.js";
|
|
321
|
+
import { withToggle as _l } from "./hocs/withToggle/index.js";
|
|
322
|
+
import { withRHFController as Nl } from "./hocs/withRHFController/index.js";
|
|
323
|
+
import { capitalizeFirstLetter as Ll } from "./utils/capitalizeFirstLetter.js";
|
|
324
|
+
import { isValidDate as vl } from "./utils/isValidDate.js";
|
|
325
|
+
import { getComponentUtilityClass as bl } from "./utils/getComponentUtilityClass.js";
|
|
326
|
+
import { getPaletteColor as kl } from "./utils/getPaletteColor.js";
|
|
327
|
+
import { getTypographyStyles as Vl } from "./utils/getTypographyStyles.js";
|
|
328
|
+
import { getIconColor as Yl } from "./utils/getIconColor.js";
|
|
329
|
+
import { getHeightSizeStyles as Ul, getSizeStyles as Wl } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
330
|
+
import { getInputAlignmentIconButtonOverrides as jl } from "./utils/getInputAlignmentIconButtonOverrides/getInputAlignmentIconButtonOverrides.js";
|
|
331
|
+
import { ObjectQueue as ql } from "./utils/ObjectQueue.js";
|
|
332
|
+
import { getComponentClasses as Xl, getComponentSlotRoot as Zl } from "./utils/getComponentSlotRoot.js";
|
|
333
|
+
import { formatDistanceToNow as ou } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
334
|
+
import { getValidDate as eu } from "./utils/getValidDate.js";
|
|
335
|
+
import { getNullGuard as mu } from "./utils/getNullGuard.js";
|
|
336
|
+
import { createCustomDeepShallow as au, deepShallow as nu } from "./utils/deepShallow.js";
|
|
339
337
|
export {
|
|
340
338
|
U as AREAS_DICCTIONARY,
|
|
341
339
|
W as AREAS_DICTIONARY_ID,
|
|
@@ -492,7 +490,7 @@ export {
|
|
|
492
490
|
Ko as NumberEditor,
|
|
493
491
|
$n as NumberInputStyled,
|
|
494
492
|
Ex as ObjectLogs,
|
|
495
|
-
|
|
493
|
+
ql as ObjectQueue,
|
|
496
494
|
Ox as PDFViewer,
|
|
497
495
|
Cl as POPOVER_CONTAINER_ID,
|
|
498
496
|
cl as POPOVER_OVERLAY_ROOT_ATTRIBUTE,
|
|
@@ -611,25 +609,25 @@ export {
|
|
|
611
609
|
Pf as WindowToolsMFProvider,
|
|
612
610
|
Ba as addLayoutItemToBreakPointIfNoExists,
|
|
613
611
|
ba as addLayoutItemToBreakPoints,
|
|
614
|
-
|
|
612
|
+
Ll as capitalizeFirstLetter,
|
|
615
613
|
Ga as cloneLayouts,
|
|
616
614
|
qt as createCodeEditorLezerSyntaxValidator,
|
|
617
615
|
px as createComponentsMFIsolationAppStorybookProps,
|
|
618
|
-
|
|
616
|
+
au as createCustomDeepShallow,
|
|
619
617
|
Tf as createDynamicMFStore,
|
|
620
618
|
di as createEmptyValidationSchema,
|
|
621
619
|
e as createToaster,
|
|
622
620
|
Fi as createValidationFullObject,
|
|
623
621
|
Pi as createValidationPartialObject,
|
|
624
622
|
gi as createValidationSchema,
|
|
625
|
-
|
|
623
|
+
nu as deepShallow,
|
|
626
624
|
Bo as defaultCommonActionsDictionary,
|
|
627
625
|
Ye as defaultDateRangeCalendarPickerDictionary,
|
|
628
626
|
ot as defaultDateTimeRangePickerDictionary,
|
|
629
627
|
He as dragResizeWindowRNDClasses,
|
|
630
628
|
Qt as ensureCodeEditorRuntimeDependencies,
|
|
631
629
|
Fs as evaluateVisibilityStepCondition,
|
|
632
|
-
|
|
630
|
+
ou as formatDistanceToNow,
|
|
633
631
|
a as getAccountPopoverDictionary,
|
|
634
632
|
L as getAppBarDictionary,
|
|
635
633
|
j as getAreasComponentsDictionary,
|
|
@@ -637,9 +635,9 @@ export {
|
|
|
637
635
|
Fa as getBooleanFormatterComponentsDictionary,
|
|
638
636
|
eo as getCheckableListComponentsDictionary,
|
|
639
637
|
bo as getCommonActionsDictionary,
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
638
|
+
Xl as getComponentClasses,
|
|
639
|
+
Zl as getComponentSlotRoot,
|
|
640
|
+
bl as getComponentUtilityClass,
|
|
643
641
|
Uo as getDataGridComponentsDictionary,
|
|
644
642
|
qo as getDataGridRowsFromSet,
|
|
645
643
|
ze as getDateRangeCalendarPickerComponentsDictionary,
|
|
@@ -656,10 +654,10 @@ export {
|
|
|
656
654
|
Qp as getFormatPoints,
|
|
657
655
|
pa as getFormatPrice,
|
|
658
656
|
Ia as getFormattersComponentsDictionary,
|
|
659
|
-
|
|
660
|
-
|
|
657
|
+
Ul as getHeightSizeStyles,
|
|
658
|
+
Yl as getIconColor,
|
|
661
659
|
Oi as getImageSelectorComponentsDictionary,
|
|
662
|
-
|
|
660
|
+
jl as getInputAlignmentIconButtonOverrides,
|
|
663
661
|
at as getIsIfInDynamicFilter,
|
|
664
662
|
zi as getLoadingErrorComponentsDictionary,
|
|
665
663
|
xx as getMFLoaderComponentsDictionary,
|
|
@@ -668,26 +666,26 @@ export {
|
|
|
668
666
|
wf as getModalDictionary,
|
|
669
667
|
Rx as getNoItemPrivilegesComponentsDictionary,
|
|
670
668
|
Fx as getNoItemSelectedComponentsDictionary,
|
|
671
|
-
|
|
669
|
+
mu as getNullGuard,
|
|
672
670
|
Ax as getObjectLogsComponentsDictionary,
|
|
673
671
|
gm as getPagerComponentsDictionary,
|
|
674
|
-
|
|
672
|
+
kl as getPaletteColor,
|
|
675
673
|
zn as getPeriodComponetsDictionary,
|
|
676
674
|
on as getRHFAutocompleteAsyncComponentsDictionary,
|
|
677
675
|
Qa as getRHFAutocompleteComponentsDictionary,
|
|
678
676
|
it as getRawFiltersForNetwork,
|
|
679
677
|
_t as getRawSortsForNetwork,
|
|
680
|
-
|
|
678
|
+
Wl as getSizeStyles,
|
|
681
679
|
Rs as getStepperComponentsDictionary,
|
|
682
680
|
gs as getStepsAndValidationSchema,
|
|
683
681
|
Zx as getTabsNavigatorComponentsDictionary,
|
|
684
|
-
|
|
682
|
+
Vl as getTypographyStyles,
|
|
685
683
|
jp as getUncertaintyFormat,
|
|
686
|
-
|
|
684
|
+
eu as getValidDate,
|
|
687
685
|
Ws as getformAddEditDictionary,
|
|
688
686
|
ha as isEqualLayout,
|
|
689
687
|
Va as isEqualLayouts,
|
|
690
|
-
|
|
688
|
+
vl as isValidDate,
|
|
691
689
|
sx as projectMFHostRuntimeTools,
|
|
692
690
|
Xt as registerCodeEditorLanguage,
|
|
693
691
|
Zt as registerCodeEditorLanguageTemplate,
|
|
@@ -729,7 +727,6 @@ export {
|
|
|
729
727
|
Pt as useDynamicFormData,
|
|
730
728
|
af as useDynamicMFParameters,
|
|
731
729
|
nf as useDynamicMFParametersStore,
|
|
732
|
-
_l as useExportColumns,
|
|
733
730
|
hs as useFormAddEdit,
|
|
734
731
|
js as useFormFocus,
|
|
735
732
|
$s as useFormReadyForUpdate,
|
|
@@ -750,7 +747,6 @@ export {
|
|
|
750
747
|
qf as useStepper,
|
|
751
748
|
pl as useSvgColor,
|
|
752
749
|
zs as useTab,
|
|
753
|
-
Nl as useVisibleColumnNames,
|
|
754
750
|
yl as useWatchTyped,
|
|
755
751
|
Lo as useWindowCloseGuard,
|
|
756
752
|
mf as useWindowToolsMF,
|
|
@@ -760,7 +756,7 @@ export {
|
|
|
760
756
|
y as varTranEnter,
|
|
761
757
|
I as varTranExit,
|
|
762
758
|
_ as varTranHover,
|
|
763
|
-
|
|
759
|
+
Nl as withRHFController,
|
|
764
760
|
Ya as withSizeProvider,
|
|
765
|
-
|
|
761
|
+
_l as withToggle
|
|
766
762
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.37.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@m4l/icons": "^1.0.0",
|
|
37
37
|
"@emotion/react": "11.14.0",
|
|
38
38
|
"react-toastify": "10.0.5",
|
|
39
|
-
"react": "19.
|
|
39
|
+
"react": "19.1.0",
|
|
40
40
|
"clsx": "2.1.1",
|
|
41
41
|
"framer-motion": "6.5.1",
|
|
42
42
|
"@mui/material": "5.16.7",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"@hookform/resolvers": "2.9.11",
|
|
53
53
|
"nprogress": "0.2.0",
|
|
54
54
|
"react-transition-group": "4.4.5",
|
|
55
|
+
"@mui/x-date-pickers": "6.20.2",
|
|
55
56
|
"react-rnd": "10.5.2",
|
|
56
57
|
"react-color": "2.19.3",
|
|
57
|
-
"@mui/x-date-pickers": "6.20.2",
|
|
58
|
-
"react-spinners": "0.13.8",
|
|
59
58
|
"react-dropzone": "14.4.1",
|
|
60
59
|
"react-draggable": "4.5.0",
|
|
61
|
-
"
|
|
62
|
-
"react-resizable-panels": "2.1.9",
|
|
63
|
-
"react-simple-code-editor": "0.14.1",
|
|
60
|
+
"react-spinners": "0.13.8",
|
|
64
61
|
"chart.js": "4.5.1",
|
|
65
62
|
"chartjs-chart-error-bars": "4.4.5",
|
|
66
63
|
"qrcode.react": "3.2.0",
|
|
64
|
+
"simplebar-react": "3.2.6",
|
|
65
|
+
"react-resizable-panels": "2.1.9",
|
|
66
|
+
"react-simple-code-editor": "0.14.1",
|
|
67
67
|
"react-data-grid": "7.0.0-beta.47",
|
|
68
68
|
"react-dnd": "16.0.1",
|
|
69
69
|
"react-dnd-html5-backend": "16.0.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FrontendTelemetryEvent } from '../../../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Emit one frontend telemetry event through the browser event bus, if available.
|
|
4
|
-
* Emite un evento de telemetría frontend a través del bus de eventos del navegador, si está disponible.
|
|
5
|
-
*/
|
|
6
|
-
export declare function emitFrontendTelemetry(event: FrontendTelemetryEvent): void;
|
|
7
|
-
//# sourceMappingURL=emitFrontendTelemetry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emitFrontendTelemetry.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/emitFrontendTelemetry/emitFrontendTelemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAYpE;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAiBzE"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { useExportColumns } from './useExportColumns';
|
|
2
|
-
export { useVisibleColumnNames } from './useVisibleColumnNames';
|
|
3
|
-
export type { DataGridColumn, ColumnVisibilityConfig, ExportableColumnConfig, ExportableColumnsMap, ExportColumn, } from './types';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/hooks/useExportDatagridColumns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared type contracts for the Shared Export DataGrid column hooks.
|
|
3
|
-
*
|
|
4
|
-
* Consumed by list modules to build the params passed to the export
|
|
5
|
-
* microfrontend. Modules inject only what varies (their `EXPORTABLE_COLUMNS`
|
|
6
|
-
* map); the hooks and these contracts live once in `@m4l/components`.
|
|
7
|
-
*/
|
|
8
|
-
/** Minimal DataGrid column shape the export hooks read. */
|
|
9
|
-
export interface DataGridColumn {
|
|
10
|
-
key: string;
|
|
11
|
-
name: string | unknown;
|
|
12
|
-
type: string;
|
|
13
|
-
visible?: boolean;
|
|
14
|
-
exportable?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Optional export dataType resolved from the column's presentation mode
|
|
17
|
-
* (e.g. a date column's `datetime` → `date_time`). When present it overrides
|
|
18
|
-
* `type` for export, because the DataGrid ColumnType is always `date`.
|
|
19
|
-
*/
|
|
20
|
-
exportDataType?: string;
|
|
21
|
-
}
|
|
22
|
-
/** Persisted per-user column visibility entry (from the saved cookie config). */
|
|
23
|
-
export interface ColumnVisibilityConfig {
|
|
24
|
-
key: string;
|
|
25
|
-
visible: boolean;
|
|
26
|
-
}
|
|
27
|
-
/** Per-module mapping value: backend field name plus optional formatter props. */
|
|
28
|
-
export interface ExportableColumnConfig {
|
|
29
|
-
/** Backend API field name (snake_case). */
|
|
30
|
-
name: string;
|
|
31
|
-
/** Optional formatter options forwarded to the export worker. */
|
|
32
|
-
formatterProps?: Record<string, unknown>;
|
|
33
|
-
}
|
|
34
|
-
/** Per-module map of DataGrid column key (camelCase) to backend export config. */
|
|
35
|
-
export type ExportableColumnsMap = Record<string, ExportableColumnConfig>;
|
|
36
|
-
/** Export column metadata entry expected by the shared export microfrontend. */
|
|
37
|
-
export interface ExportColumn {
|
|
38
|
-
/** Backend API field name sent to the export worker. */
|
|
39
|
-
name: string;
|
|
40
|
-
/** Optional formatter options forwarded to the export worker. */
|
|
41
|
-
formatterProps?: Record<string, unknown>;
|
|
42
|
-
/** Translated DataGrid label rendered as the column title in the export form. */
|
|
43
|
-
title: string;
|
|
44
|
-
/** DataGrid column data type (string, number, date, ...). */
|
|
45
|
-
dataType: string;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/hooks/useExportDatagridColumns/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,iFAAiF;AACjF,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,kFAAkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAE1E,gFAAgF;AAChF,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DataGridColumn, ExportColumn, ExportableColumnsMap } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Builds the exportable column metadata passed to the shared export datagrid MF.
|
|
4
|
-
*
|
|
5
|
-
* Filters columns flagged with `exportable: true` and maps each one to the shape the
|
|
6
|
-
* export microfrontend expects:
|
|
7
|
-
* - name: backend API field (from the injected `exportableColumns` map, falls back to the grid key)
|
|
8
|
-
* - formatterProps: optional format options forwarded to the export worker
|
|
9
|
-
* - title: the translated column label rendered in the export form's column list
|
|
10
|
-
* - dataType: the column's `exportDataType` when present (e.g. a date column's
|
|
11
|
-
* date_time / time), otherwise the grid `type` (string, number, date, ...)
|
|
12
|
-
* @param columns DataGrid columns; only those with `exportable: true` are emitted.
|
|
13
|
-
* @param exportableColumns Per-module map of grid key to backend field (+ optional formatter props).
|
|
14
|
-
*/
|
|
15
|
-
export declare function useExportColumns(columns?: DataGridColumn[], exportableColumns?: ExportableColumnsMap): ExportColumn[];
|
|
16
|
-
//# sourceMappingURL=useExportColumns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExportColumns.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/hooks/useExportDatagridColumns/useExportColumns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,cAAc,EAAO,EAC9B,iBAAiB,GAAE,oBAAyB,GAC3C,YAAY,EAAE,CAwBhB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useMemo as a } from "react";
|
|
2
|
-
function f(r = [], p = {}) {
|
|
3
|
-
return a(
|
|
4
|
-
() => r.filter((e) => e.exportable === !0).map((e) => {
|
|
5
|
-
const t = p[e.key];
|
|
6
|
-
return {
|
|
7
|
-
// Backend API field name: use the mapped value if present, otherwise the grid key
|
|
8
|
-
name: t?.name ?? e.key,
|
|
9
|
-
// Additional format options (when they apply)
|
|
10
|
-
...t?.formatterProps ? { formatterProps: t.formatterProps } : {},
|
|
11
|
-
// Translated DataGrid label used as the column title in the export form
|
|
12
|
-
title: e.name,
|
|
13
|
-
// Prefer the resolved export dataType (date columns carry date_time/time
|
|
14
|
-
// here since the grid `type` is always 'date'); fall back to the grid type.
|
|
15
|
-
dataType: e.exportDataType ?? e.type
|
|
16
|
-
};
|
|
17
|
-
}),
|
|
18
|
-
[r, p]
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
f as useExportColumns
|
|
23
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ColumnVisibilityConfig, DataGridColumn, ExportableColumnsMap } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the API field names that should be pre-selected in the export form.
|
|
4
|
-
* @param columns DataGrid columns.
|
|
5
|
-
* @param exportableColumns Per-module map of grid key to backend field name.
|
|
6
|
-
* @param defaultConfigColumns Persisted per-user visibility config (may be an empty array).
|
|
7
|
-
*/
|
|
8
|
-
export declare function useVisibleColumnNames(columns?: DataGridColumn[], exportableColumns?: ExportableColumnsMap, defaultConfigColumns?: ColumnVisibilityConfig[]): string[];
|
|
9
|
-
//# sourceMappingURL=useVisibleColumnNames.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useVisibleColumnNames.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/hooks/useExportDatagridColumns/useVisibleColumnNames.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE5F;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,cAAc,EAAO,EAC9B,iBAAiB,GAAE,oBAAyB,EAC5C,oBAAoB,CAAC,EAAE,sBAAsB,EAAE,GAC9C,MAAM,EAAE,CAiBV"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useMemo as a } from "react";
|
|
2
|
-
function y(r = [], s = {}, i) {
|
|
3
|
-
return a(() => (i !== void 0 && i.length > 0 ? i.filter((e) => e.visible).map((e) => e.key) : r.filter((e) => e.visible !== !1).map((e) => e.key)).filter((e) => r.find((t) => t.key === e)?.exportable === !0).map((e) => s[e]?.name ?? e), [r, s, i]);
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
y as useVisibleColumnNames
|
|
7
|
-
};
|