@m4l/components 9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.0 → 9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/components/MFLoader/MFLoader.d.ts.map +1 -1
  2. package/components/MFLoader/MFLoader.js +112 -124
  3. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
  4. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +47 -49
  5. package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
  6. package/components/areas/contexts/AreasContext/index.js +28 -29
  7. package/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.d.ts +2 -2
  8. package/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.d.ts.map +1 -1
  9. package/index.d.ts +0 -1
  10. package/index.d.ts.map +1 -1
  11. package/index.js +222 -235
  12. package/package.json +9 -9
  13. package/components/MFLoader/hooks/useMFCallbackLifecycle.d.ts +0 -6
  14. package/components/MFLoader/hooks/useMFCallbackLifecycle.d.ts.map +0 -1
  15. package/components/MFLoader/hooks/useMFCallbackLifecycle.js +0 -25
  16. package/components/areas/components/AreasViewer/test/popupAuthenticationConstants.d.ts +0 -4
  17. package/components/areas/components/AreasViewer/test/popupAuthenticationConstants.d.ts.map +0 -1
  18. package/components/areas/contexts/AreasContext/tests/mfActionSupport.d.ts +0 -22
  19. package/components/areas/contexts/AreasContext/tests/mfActionSupport.d.ts.map +0 -1
  20. package/components/areas/contexts/AreasContext/useMFActionLifecycle.d.ts +0 -4
  21. package/components/areas/contexts/AreasContext/useMFActionLifecycle.d.ts.map +0 -1
  22. package/components/areas/contexts/AreasContext/useMFActionLifecycle.js +0 -49
  23. package/utils/mfActions/constants.d.ts +0 -6
  24. package/utils/mfActions/constants.d.ts.map +0 -1
  25. package/utils/mfActions/constants.js +0 -8
  26. package/utils/mfActions/index.d.ts +0 -5
  27. package/utils/mfActions/index.d.ts.map +0 -1
  28. package/utils/mfActions/mfActions.d.ts +0 -10
  29. package/utils/mfActions/mfActions.d.ts.map +0 -1
  30. package/utils/mfActions/mfActions.js +0 -47
  31. package/utils/mfActions/openMFCallbackAction.d.ts +0 -4
  32. package/utils/mfActions/openMFCallbackAction.d.ts.map +0 -1
  33. package/utils/mfActions/openMFCallbackAction.js +0 -36
  34. package/utils/mfActions/tests/callbackHelpers.d.ts +0 -9
  35. package/utils/mfActions/tests/callbackHelpers.d.ts.map +0 -1
  36. package/utils/mfActions/tests/constants.d.ts +0 -6
  37. package/utils/mfActions/tests/constants.d.ts.map +0 -1
  38. package/utils/mfActions/tests/helpers.d.ts +0 -4
  39. package/utils/mfActions/tests/helpers.d.ts.map +0 -1
  40. package/utils/mfActions/tests/types.d.ts +0 -8
  41. package/utils/mfActions/tests/types.d.ts.map +0 -1
  42. package/utils/mfActions/types.d.ts +0 -47
  43. package/utils/mfActions/types.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MFLoader.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/MFLoader.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,aAAa,EAAU,MAAM,SAAS,CAAC;AAiBhD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,oDAgQ5C;AACD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"MFLoader.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/MFLoader.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,aAAa,EAAU,MAAM,SAAS,CAAC;AAehD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,oDAoP5C;AACD,eAAe,QAAQ,CAAC"}
@@ -1,158 +1,146 @@
1
- import { jsxs as te, jsx as t } from "@emotion/react/jsx-runtime";
2
- import { useRef as d, useEffect as I } from "react";
3
- import { useNetwork as oe, useEnvironment as se, useHostTools as ne, useUserPreferences as ie, resolveLocalLoopbackOrigin as ce } from "@m4l/core";
4
- import { useHostTheme as ae, useFormatter as de, useLocales as le } from "@m4l/graphics";
5
- import { ProggessLoadingMF as me } from "./subcomponents/ProggessLoadingMF/index.js";
1
+ import { jsxs as ee, jsx as r } from "@emotion/react/jsx-runtime";
2
+ import { useRef as c, useEffect as te } from "react";
3
+ import { useNetwork as re, useEnvironment as oe, useHostTools as se, useUserPreferences as ne, resolveLocalLoopbackOrigin as ie } from "@m4l/core";
4
+ import { useHostTheme as ce, useFormatter as de, useLocales as ae } from "@m4l/graphics";
5
+ import { ProggessLoadingMF as le } from "./subcomponents/ProggessLoadingMF/index.js";
6
6
  import { LoadingError as ue } from "../LoadingError/LoadingError.js";
7
- import { useMFCallbackLifecycle as fe } from "./hooks/useMFCallbackLifecycle.js";
8
- import { useHostRuntime as pe } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
9
- import { useShellObservability as Se } from "../../contexts/ShellObservabilityContext/ShellObservabilityContext.js";
10
- import { projectMFHostRuntimeTools as Le } from "./helpers/projectMFHostRuntimeTools/projectMFHostRuntimeTools.js";
11
- import { useMFTelemetry as Me } from "./hooks/useMFTelemetry/useMFTelemetry.js";
12
- import { useMFSwap as Re } from "./hooks/useMFSwap/useMFSwap.js";
13
- import { useMFLifecycle as ge } from "./hooks/useMFLifecycle/useMFLifecycle.js";
14
- import { MF_ACTION_CALLBACKS_PARAM as he, MF_ACTION_REQUEST_PARAM as Fe } from "../../utils/mfActions/constants.js";
15
- import { useMFRender as ye } from "./hooks/useMFRender/useMFRender.js";
16
- import { MFLoaderRootStyled as ve, MFLoaderMountContainerStyled as P, MFLoaderOverlayStyled as _ } from "./slots/MFLoaderSlots.js";
17
- import { isMFActionRequest as be, completeMFAction as Te } from "../../utils/mfActions/mfActions.js";
18
- function Ve(E) {
7
+ import { useHostRuntime as me } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
8
+ import { useShellObservability as pe } from "../../contexts/ShellObservabilityContext/ShellObservabilityContext.js";
9
+ import { projectMFHostRuntimeTools as fe } from "./helpers/projectMFHostRuntimeTools/projectMFHostRuntimeTools.js";
10
+ import { useMFTelemetry as Le } from "./hooks/useMFTelemetry/useMFTelemetry.js";
11
+ import { useMFSwap as Se } from "./hooks/useMFSwap/useMFSwap.js";
12
+ import { useMFLifecycle as he } from "./hooks/useMFLifecycle/useMFLifecycle.js";
13
+ import { useMFRender as ge } from "./hooks/useMFRender/useMFRender.js";
14
+ import { MFLoaderRootStyled as ve, MFLoaderMountContainerStyled as T, MFLoaderOverlayStyled as O } from "./slots/MFLoaderSlots.js";
15
+ function je(I) {
19
16
  const {
20
17
  prefix: o,
21
- moduleId: H,
22
- cache: l = !0,
18
+ moduleId: C,
19
+ cache: d = !0,
23
20
  debugPort: s,
24
- hostRuntime: q,
25
- observability: x,
26
- dynamicMFStore: n,
27
- windowTools: i,
28
- emergeType: k,
29
- loggedUser: N
30
- } = E, j = pe(), B = Se(), G = Le(q ?? j), U = x ?? B, { hostThemeOptions: V, fnComponentsOverrides: $ } = ae(), { networkOperation: D } = oe(), c = se(), m = ne(), K = ie(), Q = de(), z = { hostThemeOptions: V, fnComponentsOverrides: $ }, M = d(null), R = d(null), g = d("progress"), h = d(
21
+ hostRuntime: H,
22
+ observability: P,
23
+ dynamicMFStore: x,
24
+ windowTools: E,
25
+ emergeType: q,
26
+ loggedUser: j
27
+ } = I, k = me(), G = pe(), V = fe(H ?? k), A = P ?? G, { hostThemeOptions: B, fnComponentsOverrides: N } = ce(), { networkOperation: U } = re(), n = oe(), $ = se(), D = ne(), z = de(), J = { hostThemeOptions: B, fnComponentsOverrides: N }, p = c(null), f = c(null), L = c("progress"), S = c(
31
28
  null
32
- ), { currentLocale: J } = le(), W = !c.isLocalhost || Number.isInteger(s) && s > 0, {
33
- activeSwapRef: F,
34
- createTelemetryContext: u,
35
- emitAbandonedLoadTelemetry: X,
36
- emitSwapStartedTelemetry: y,
37
- emitSwapFailedTelemetry: f,
29
+ ), { currentLocale: K } = ae(), Q = !n.isLocalhost || Number.isInteger(s) && s > 0, {
30
+ activeSwapRef: h,
31
+ createTelemetryContext: a,
32
+ emitAbandonedLoadTelemetry: W,
33
+ emitSwapStartedTelemetry: g,
34
+ emitSwapFailedTelemetry: l,
38
35
  reportLoaderError: v
39
- } = Me({
40
- cache: l,
36
+ } = Le({
37
+ cache: d,
41
38
  prefix: o,
42
- mountedScriptRefBridge: M,
43
- requestedScriptRefBridge: R,
44
- setStatusLoaderRef: h,
45
- statusLoaderRef: g
39
+ mountedScriptRefBridge: p,
40
+ requestedScriptRefBridge: f,
41
+ setStatusLoaderRef: S,
42
+ statusLoaderRef: L
46
43
  }), {
47
- mountedScript: p,
48
- requestedScript: r,
49
- isSwappingModule: Y,
50
- mountedScriptRef: b,
51
- requestedScriptRef: T,
52
- promoteRequestedScript: w
53
- } = Re({
54
- activeSwapRef: F,
55
- cache: l,
56
- createTelemetryContext: u,
57
- emitAbandonedLoadTelemetry: X,
58
- emitSwapFailedTelemetry: f,
59
- emitSwapStartedTelemetry: y,
60
- moduleId: H,
44
+ mountedScript: u,
45
+ requestedScript: e,
46
+ isSwappingModule: X,
47
+ mountedScriptRef: R,
48
+ requestedScriptRef: y,
49
+ promoteRequestedScript: b
50
+ } = Se({
51
+ activeSwapRef: h,
52
+ cache: d,
53
+ createTelemetryContext: a,
54
+ emitAbandonedLoadTelemetry: W,
55
+ emitSwapFailedTelemetry: l,
56
+ emitSwapStartedTelemetry: g,
57
+ moduleId: C,
61
58
  prefix: o,
62
59
  reportLoaderError: v
63
60
  });
64
- M.current = b, R.current = T;
65
- const Z = c.isLocalhost ? ce(s) : `https://${window.location.host}/mf/${r.moduleId}`, {
66
- statusLoader: e,
67
- setStatusLoader: C,
68
- loadingProgress: ee,
69
- tryAgainOnError: re,
70
- loadGeneration: a,
71
- completedGeneration: A,
72
- renderedGeneration: S
73
- } = ge({
74
- activeHost: Z,
75
- cache: l,
76
- createTelemetryContext: u,
77
- environmentIsLocalhost: c.isLocalhost,
78
- hasValidLocalDebugPort: W,
79
- mountedScriptRef: b,
80
- networkOperation: D,
61
+ p.current = R, f.current = y;
62
+ const Y = n.isLocalhost ? ie(s) : `https://${window.location.host}/mf/${e.moduleId}`, {
63
+ statusLoader: t,
64
+ setStatusLoader: F,
65
+ loadingProgress: Z,
66
+ tryAgainOnError: _,
67
+ loadGeneration: i,
68
+ completedGeneration: M,
69
+ renderedGeneration: m
70
+ } = he({
71
+ activeHost: Y,
72
+ cache: d,
73
+ createTelemetryContext: a,
74
+ environmentIsLocalhost: n.isLocalhost,
75
+ hasValidLocalDebugPort: Q,
76
+ mountedScriptRef: R,
77
+ networkOperation: U,
81
78
  prefix: o,
82
- requestedScript: r,
83
- requestedScriptRef: T,
84
- activeSwapRef: F,
85
- emitSwapFailedTelemetry: f,
86
- emitSwapStartedTelemetry: y
79
+ requestedScript: e,
80
+ requestedScriptRef: y,
81
+ activeSwapRef: h,
82
+ emitSwapFailedTelemetry: l,
83
+ emitSwapStartedTelemetry: g
87
84
  });
88
- g.current = e, h.current = C, fe(
89
- n?.getState().dynamicMFParameters?.[he],
90
- e === "error",
91
- i.close
92
- ), I(() => {
93
- if (e !== "error")
94
- return;
95
- const L = n?.getState().dynamicMFParameters?.[Fe];
96
- be(L) && (Te(m, L, { status: "failed", errorCode: "mf_load_failed" }), i?.close(!1));
97
- }, [e, n, m, i]);
98
- const { renderMicroFrontend: O } = ye({
85
+ L.current = t, S.current = F;
86
+ const { renderMicroFrontend: w } = ge({
99
87
  prefix: o,
100
88
  debugPort: s,
101
- dynamicMFStore: n,
102
- windowTools: i,
103
- emergeType: k,
104
- loggedUser: N,
105
- environment: c,
106
- hostTools: m,
107
- currentLocale: J,
108
- hostTheme: z,
109
- formatter: Q,
110
- userPreferences: K,
111
- resolvedHostRuntime: G,
112
- resolvedObservability: U,
89
+ dynamicMFStore: x,
90
+ windowTools: E,
91
+ emergeType: q,
92
+ loggedUser: j,
93
+ environment: n,
94
+ hostTools: $,
95
+ currentLocale: K,
96
+ hostTheme: J,
97
+ formatter: z,
98
+ userPreferences: D,
99
+ resolvedHostRuntime: V,
100
+ resolvedObservability: A,
113
101
  reportLoaderError: v,
114
- emitSwapFailedTelemetry: f,
115
- setStatusLoader: C,
116
- createTelemetryContext: u
102
+ emitSwapFailedTelemetry: l,
103
+ setStatusLoader: F,
104
+ createTelemetryContext: a
117
105
  });
118
- return I(() => {
119
- if (e === "complete" && A.current === a.current && S.current !== a.current) {
120
- if (!O(r))
106
+ return te(() => {
107
+ if (t === "complete" && M.current === i.current && m.current !== i.current) {
108
+ if (!w(e))
121
109
  return;
122
- S.current = a.current, w();
110
+ m.current = i.current, b();
123
111
  }
124
112
  }, [
125
- A,
126
- a,
127
- p,
113
+ M,
114
+ i,
115
+ u,
128
116
  o,
117
+ b,
129
118
  w,
130
- O,
131
- S,
132
- r,
133
- e
134
- ]), /* @__PURE__ */ te(ve, { children: [
135
- /* @__PURE__ */ t(
136
- P,
119
+ m,
120
+ e,
121
+ t
122
+ ]), /* @__PURE__ */ ee(ve, { children: [
123
+ /* @__PURE__ */ r(
124
+ T,
137
125
  {
138
- id: p.divContainerId,
126
+ id: u.divContainerId,
139
127
  ownerState: { isVisible: !0 }
140
128
  },
141
- p.divContainerId
129
+ u.divContainerId
142
130
  ),
143
- Y ? /* @__PURE__ */ t(
144
- P,
131
+ X ? /* @__PURE__ */ r(
132
+ T,
145
133
  {
146
- id: r.divContainerId,
134
+ id: e.divContainerId,
147
135
  ownerState: { isVisible: !1 }
148
136
  },
149
- r.divContainerId
137
+ e.divContainerId
150
138
  ) : null,
151
- e === "progress" ? /* @__PURE__ */ t(_, { children: /* @__PURE__ */ t(me, { loadingProgress: ee }) }) : null,
152
- e === "error" ? /* @__PURE__ */ t(_, { children: /* @__PURE__ */ t(ue, { status: e, action: re }) }) : null
139
+ t === "progress" ? /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(le, { loadingProgress: Z }) }) : null,
140
+ t === "error" ? /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(ue, { status: t, action: _ }) }) : null
153
141
  ] });
154
142
  }
155
143
  export {
156
- Ve as MFLoader,
157
- Ve as default
144
+ je as MFLoader,
145
+ je as default
158
146
  };
@@ -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":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAc1C;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,eAAe,qDAgLpD,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,33 +1,32 @@
1
- import { jsx as m, Fragment as M } from "@emotion/react/jsx-runtime";
2
- import { shallow as s } from "zustand/shallow";
3
- import { useAuth as N } from "@m4l/core";
4
- import { Window as O } from "../Window/Window.js";
5
- import { useAreasStore as i } from "../../../../../../hooks/useAreas/index.js";
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";
6
5
  import { areasViewerClasses as g } from "../../../../classes/index.js";
7
- import T from "clsx";
8
- import { PADDING_GRIDLAYOUT as p, MARGIN_GRIDLAYOUT as f, RESPONSIVE_ROW_HEIGHTS as D } from "../../../../../../contexts/AreasContext/helpers/helper.js";
9
- import { MemonizePopupsViewer as F } from "../../../../../../../popups/components/PopupsViewer/PopupsViewer.js";
10
- import { useState as P, useMemo as U, useEffect as V } from "react";
11
- import { dragResizeWindowRNDClasses as n } from "../../../../../../../DragResizeWindowRND/classes/index.js";
12
- import { useTheme as k } from "@mui/material";
13
- import { useComponentSize as $ } from "../../../../../../../../hooks/useComponentSize/index.js";
14
- import { withSizeProvider as Y } from "../../../../../../../GridLayout/subcomponents/withSizeProvider/index.js";
15
- import { Responsive as q } from "../../../../../../../GridLayout/subcomponents/Responsive/index.js";
16
- const W = Y(q), B = 10, ce = (h) => {
17
- const { areaId: r, size: I } = h, { user: A } = N(), y = i((e) => e.hashAreas[r].layoutItemsIds, s), L = i((e) => e.hashAreas[r].layouts, s), S = i((e) => e.hashAreas[r].breakpoints, s), c = i((e) => e.hashAreas[r].currentLayoutId, s), w = i((e) => e.hashAreas[r].maximizedId, s), R = i((e) => e.hashAreas[r].cols, s), { onBreakpointsLayoutsChange: z, onContainerChange: C } = i(
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
+ import { dragResizeWindowRNDClasses as s } from "../../../../../../../DragResizeWindowRND/classes/index.js";
11
+ import { useTheme as V } from "@mui/material";
12
+ import { useComponentSize as k } from "../../../../../../../../hooks/useComponentSize/index.js";
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(
18
17
  (e) => e.areaActions,
19
- s
20
- ), d = k(), { currentSize: l } = $(I), [t, H] = P(void 0), E = () => {
21
- t && t.classList.add(n.resizing);
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);
22
23
  }, G = () => {
23
- t && t.classList.remove(n.resizing);
24
+ t && t.classList.add(s.dragging);
24
25
  }, v = () => {
25
- t && t.classList.add(n.dragging);
26
- }, x = () => {
27
- t && t.classList.remove(n.dragging);
28
- }, _ = (e) => {
29
- e && e !== t && H(e);
30
- }, b = U(() => {
26
+ t && t.classList.remove(s.dragging);
27
+ }, x = (e) => {
28
+ e && e !== t && C(e);
29
+ }, _ = F(() => {
31
30
  const e = d?.size?.[d?.generalSettings?.isMobile ? "mobile" : "desktop"]?.[l]?.container, a = parseInt(e), o = isNaN(a) ? 32 : a;
32
31
  return {
33
32
  xxs: o,
@@ -37,10 +36,10 @@ const W = Y(q), B = 10, ce = (h) => {
37
36
  lg: o
38
37
  };
39
38
  }, [d, l]);
40
- return V(() => {
39
+ return P(() => {
41
40
  if (!t || !c)
42
41
  return;
43
- let e = 0, a = B;
42
+ let e = 0, a = q;
44
43
  const o = () => {
45
44
  const u = t.querySelector(
46
45
  `[data-grid-item-id="${c}"]`
@@ -58,48 +57,47 @@ const W = Y(q), B = 10, ce = (h) => {
58
57
  window.cancelAnimationFrame(e);
59
58
  };
60
59
  }, [c, t]), /* @__PURE__ */ m(
61
- W,
60
+ Y,
62
61
  {
63
- ref: _,
62
+ ref: x,
64
63
  autoSize: !1,
65
64
  compactType: "vertical",
66
65
  measureBeforeMount: !0,
67
66
  resizeHandles: ["nw", "se"],
68
- className: T(
67
+ className: N(
69
68
  g.areaGridLayout,
70
69
  `${g.areaGridLayout}-${r}`
71
70
  ),
72
- layouts: L,
73
- onLayoutChange: (e, a) => z(r, e, a),
74
- draggableHandle: `.${n.draggableHandle}`,
75
- draggableCancel: `.${n.draggableCancel}`,
76
- layoutItemRender: (e) => y.indexOf(e.i) === -1 ? /* @__PURE__ */ m(M, {}) : e.type === "placeholder" ? /* @__PURE__ */ m("div", {}) : /* @__PURE__ */ m(O, { windowId: e.i, areaId: r }),
77
- breakpoints: S,
78
- colapsedHeight: b,
79
- rowHeight: D,
80
- cols: R,
71
+ layouts: A,
72
+ onLayoutChange: (e, a) => R(r, e, a),
73
+ draggableHandle: `.${s.draggableHandle}`,
74
+ draggableCancel: `.${s.draggableCancel}`,
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 }),
76
+ breakpoints: L,
77
+ colapsedHeight: _,
78
+ rowHeight: O,
79
+ cols: w,
81
80
  containerMargin: [f, f],
82
81
  containerPadding: [p, p],
83
82
  onContainerChange: (e) => {
84
- C(r, e);
83
+ z(r, e);
85
84
  },
86
85
  preventCollision: !1,
87
- maximizeId: w,
86
+ maximizeId: S,
88
87
  children: /* @__PURE__ */ m(
89
- F,
88
+ T,
90
89
  {
91
90
  groupId: r,
92
- loggedUser: A,
93
91
  containerElement: t,
94
- onResizeStart: E,
95
- onResizeStop: G,
96
- onDragStart: v,
97
- onDragStop: x
92
+ onResizeStart: H,
93
+ onResizeStop: E,
94
+ onDragStart: G,
95
+ onDragStop: v
98
96
  }
99
97
  )
100
98
  }
101
99
  );
102
100
  };
103
101
  export {
104
- ce as AreaGridLayout
102
+ ne as AreaGridLayout
105
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD,QAAA,MAAM,YAAY;;;;;;;;UAAyC,CAAC;AAC5D;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDAsH/C;AACD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,QAAA,MAAM,YAAY;;;;;;;;UAAyC,CAAC;AAC5D;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDAqH/C;AACD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
@@ -5,36 +5,35 @@ import { shallow as u } from "zustand/shallow";
5
5
  import { useFirstRender as B } from "@m4l/graphics";
6
6
  import { useHostTools as V, useModuleDictionary as j, useNetwork as q, useFlagsStore as z, CommonFlags as J, EmitEvents as S } from "@m4l/core";
7
7
  import { createAreasStore as K } from "./store.js";
8
- import { useMFActionLifecycle as Q } from "./useMFActionLifecycle.js";
9
- import { usePopupsStore as U } from "../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
10
- const X = x(null);
11
- function ae(A) {
8
+ import { usePopupsStore as Q } from "../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
9
+ const U = x(null);
10
+ function se(A) {
12
11
  const {
13
- children: F,
14
- loadAreasFromNetwork: I,
12
+ children: I,
13
+ loadAreasFromNetwork: F,
15
14
  loadCookiesFromNetwork: _,
16
15
  onLoad: i,
17
16
  onReady: c,
18
17
  onSelectLayout: l,
19
- storeId: y,
20
- storeDevtoolsEnabled: M
21
- } = A, { events_add_listener: P, events_remove_listener: k } = V(), { getLabel: s } = j(), { networkOperation: v } = q(), g = B([s]), { addFlag: w } = z((e) => e.flagsActions), r = d(null), {
18
+ storeId: P,
19
+ storeDevtoolsEnabled: k
20
+ } = A, { events_add_listener: v, events_remove_listener: y } = V(), { getLabel: s } = j(), { networkOperation: M } = q(), g = B([s]), { addFlag: w } = z((e) => e.flagsActions), r = d(null), {
22
21
  addPopup: R,
23
22
  removePopup: H,
24
23
  closePopupsByGroupId: C,
25
- bringPopupOnFront: L,
26
- closeAllPopupsByParentId: N,
27
- setSelectedPopupId: O
28
- } = U(
24
+ bringPopupOnFront: N,
25
+ closeAllPopupsByParentId: O,
26
+ setSelectedPopupId: T
27
+ } = Q(
29
28
  (e) => e.popupsActions,
30
29
  u
31
30
  );
32
31
  r.current || (r.current = K({
33
- storeId: y,
32
+ storeId: P,
34
33
  getLabel: s,
35
- loadAreasFromNetwork: I,
34
+ loadAreasFromNetwork: F,
36
35
  loadCookiesFromNetwork: _,
37
- networkOperation: v,
36
+ networkOperation: M,
38
37
  ownerState: {
39
38
  status: "init",
40
39
  readyForHooks: !1
@@ -43,18 +42,18 @@ function ae(A) {
43
42
  addPopup: R,
44
43
  removePopup: H,
45
44
  removePopupsByGroupId: C,
46
- bringPopupOnFront: L,
47
- closeAllPopupsByParentId: N,
48
- setSelectedPopupId: O
45
+ bringPopupOnFront: N,
46
+ closeAllPopupsByParentId: O,
47
+ setSelectedPopupId: T
49
48
  }
50
- }, M), r.current?.getState().areasActions.init()), Q(r.current);
51
- const t = a(r.current, (e) => e.ownerState?.status, u), p = a(r.current, (e) => e.ownerState?.readyForHooks, u), n = a(r.current, (e) => e.currentModuleId), f = d(""), m = d(!1), { setHandlerGetLabel: T, setExternalState: b } = a(
49
+ }, k), r.current?.getState().areasActions.init());
50
+ const t = a(r.current, (e) => e.ownerState?.status, u), p = a(r.current, (e) => e.ownerState?.readyForHooks, u), n = a(r.current, (e) => e.currentModuleId), f = d(""), m = d(!1), { setHandlerGetLabel: b, setExternalState: D } = a(
52
51
  r.current,
53
52
  (e) => e.areasActions,
54
53
  u
55
54
  ), E = h((e) => {
56
- const D = r.current?.getState().currentAreaId, G = r.current?.getState().areasIds;
57
- D && G && r.current?.getState().areaActions.addWindow(e);
55
+ const G = r.current?.getState().currentAreaId, L = r.current?.getState().areasIds;
56
+ G && L && r.current?.getState().areaActions.addWindow(e);
58
57
  }, []);
59
58
  return o(() => {
60
59
  t === "loaded" && (i && i(), w(J.FLAG_AREAS_LOADED));
@@ -63,12 +62,12 @@ function ae(A) {
63
62
  }, [c, p, t]), o(() => {
64
63
  t === "loaded" && n !== f.current && (l && l(n), f.current = n);
65
64
  }, [n, t]), o(() => {
66
- g || T(s);
67
- }, [s]), o(() => (P(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E), b({ readyForHooks: !0 }), () => {
68
- k(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E);
69
- }), []), /* @__PURE__ */ W(X.Provider, { value: r.current, children: F });
65
+ g || b(s);
66
+ }, [s]), o(() => (v(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E), D({ readyForHooks: !0 }), () => {
67
+ y(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E);
68
+ }), []), /* @__PURE__ */ W(U.Provider, { value: r.current, children: I });
70
69
  }
71
70
  export {
72
- X as AreasContext,
73
- ae as AreasProvider
71
+ U as AreasContext,
72
+ se as AreasProvider
74
73
  };
@@ -1,3 +1,3 @@
1
- /** Supply the input wrapper's layout box because happy-dom returns an empty rectangle for every element. */
2
- export declare function mockAutocompleteAnchor(input: HTMLElement): void;
1
+ /** Supply the dropdown and optional Add tooltip anchors with layout boxes that happy-dom cannot calculate. */
2
+ export declare function mockAutocompleteAnchor(input: HTMLElement, addButton?: HTMLElement | null): void;
3
3
  //# sourceMappingURL=mockAutocompleteAnchor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockAutocompleteAnchor.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.ts"],"names":[],"mappings":"AAEA,4GAA4G;AAC5G,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,QAIxD"}
1
+ {"version":3,"file":"mockAutocompleteAnchor.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.ts"],"names":[],"mappings":"AAEA,8GAA8G;AAC9G,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,QAWxF"}
package/index.d.ts CHANGED
@@ -9,7 +9,6 @@ export * from './contexts/form';
9
9
  export * from './hooks';
10
10
  export * from './hocs';
11
11
  export * from './utils';
12
- export * from './utils/mfActions';
13
12
  export { getCookie, setCookie } from './helpers/cookies';
14
13
  export type { CookieParams, CookiesGetProps, CookiesPutProps } from './helpers/cookies/types';
15
14
  export * from './@types/types.d';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/components/src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9F,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/components/src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9F,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}