@m4l/components 9.24.0-beta-feature-724-add-icons.0 → 9.24.0-beta-feature-731-m4l-components-code-editor.8

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 (54) hide show
  1. package/@types/types.d.ts +11 -0
  2. package/components/MFIsolationApp/MFIsolationApp.d.ts.map +1 -1
  3. package/components/MFIsolationApp/MFIsolationApp.js +44 -43
  4. package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.d.ts.map +1 -1
  5. package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +24 -35
  6. package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.d.ts +10 -0
  7. package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.d.ts.map +1 -0
  8. package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.js +19 -0
  9. package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/index.d.ts +2 -0
  10. package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/index.d.ts.map +1 -0
  11. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +6 -0
  12. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +1 -0
  13. package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +263 -0
  14. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +3 -0
  15. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +1 -0
  16. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +311 -0
  17. package/components/extended/ReactSimpleCodeEditor/constants.d.ts +82 -0
  18. package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +1 -0
  19. package/components/extended/ReactSimpleCodeEditor/constants.js +148 -0
  20. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +11 -0
  21. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +1 -0
  22. package/components/extended/ReactSimpleCodeEditor/dictionary.js +7 -0
  23. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +58 -0
  24. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +1 -0
  25. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +1063 -0
  26. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +6 -0
  27. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +1 -0
  28. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +7 -0
  29. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts +6 -0
  30. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts.map +1 -0
  31. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.js +9 -0
  32. package/components/extended/ReactSimpleCodeEditor/index.d.ts +4 -0
  33. package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +1 -0
  34. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +18 -0
  35. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +1 -0
  36. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +4 -0
  37. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +84 -0
  38. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +1 -0
  39. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +64 -0
  40. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +3 -0
  41. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +1 -0
  42. package/components/extended/ReactSimpleCodeEditor/types.d.ts +446 -0
  43. package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +1 -0
  44. package/components/extended/index.d.ts +1 -0
  45. package/components/extended/index.d.ts.map +1 -1
  46. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +7 -0
  47. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +1 -0
  48. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +6 -0
  49. package/components/hook-form/RHFCodeEditor/index.d.ts +3 -0
  50. package/components/hook-form/RHFCodeEditor/index.d.ts.map +1 -0
  51. package/components/hook-form/index.d.ts +1 -0
  52. package/components/hook-form/index.d.ts.map +1 -1
  53. package/index.js +572 -559
  54. package/package.json +9 -6
package/@types/types.d.ts CHANGED
@@ -373,6 +373,10 @@ import {
373
373
  ReactJsonViewerOwnerState,
374
374
  ReactJsonViewerSlotsType,
375
375
  } from '../components/extended/React-Json-Viewer/types';
376
+ import {
377
+ CodeEditorOwnerState,
378
+ CodeEditorSlotsType,
379
+ } from '../components/extended/ReactSimpleCodeEditor/types';
376
380
  import {
377
381
  ResizableOwnerState as ReactResizableOwnerState,
378
382
  ResizableSlotsType,
@@ -499,6 +503,7 @@ declare module '@mui/material/styles' {
499
503
  M4LFixedSizeList: FixedSizeListSlotsType;
500
504
  M4LVariableSizeList: VariableSizeListSlotsType;
501
505
  M4LReactJsonViewer: ReactJsonViewerSlotsType;
506
+ M4LCodeEditor: CodeEditorSlotsType;
502
507
  M4LResizable: ResizableSlotsType;
503
508
  M4LResizableBox: ResizableBoxSlotsType;
504
509
  M4LImageSelector: ImageSelectorSlotsType;
@@ -614,6 +619,7 @@ declare module '@mui/material/styles' {
614
619
  M4LFixedSizeList: Partial<FixedSizeListOwnerState>;
615
620
  M4LVariableSizeList: Partial<VariableSizeListOwnerState>;
616
621
  M4LReactJsonViewer: Partial<ReactJsonViewerOwnerState>;
622
+ M4LCodeEditor: Partial<CodeEditorOwnerState>;
617
623
  M4LResizable: Partial<ReactResizableOwnerState>;
618
624
  M4LResizableBox: Partial<ResizableBoxOwnerState>;
619
625
  M4LImageSelector: Partial<ImageSelectorOwnerState>;
@@ -1168,6 +1174,11 @@ declare module '@mui/material/styles' {
1168
1174
  styleOverrides?: ComponentsOverrides<Theme>['M4LReactJsonViewer'];
1169
1175
  variants?: ComponentsVariants['M4LReactJsonViewer'];
1170
1176
  };
1177
+ M4LCodeEditor?: {
1178
+ defaultProps?: ComponentsPropsList['M4LCodeEditor'];
1179
+ styleOverrides?: ComponentsOverrides<Theme>['M4LCodeEditor'];
1180
+ variants?: ComponentsVariants['M4LCodeEditor'];
1181
+ };
1171
1182
  M4LResizable?: {
1172
1183
  defaultProps?: ComponentsPropsList['M4LResizable'];
1173
1184
  styleOverrides?: ComponentsOverrides<Theme>['M4LResizable'];
@@ -1 +1 @@
1
- {"version":3,"file":"MFIsolationApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFIsolationApp/MFIsolationApp.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAoEjB;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,oDAiLxD"}
1
+ {"version":3,"file":"MFIsolationApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFIsolationApp/MFIsolationApp.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAqEjB;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,oDAmLxD"}
@@ -1,55 +1,56 @@
1
- import { jsx as o, jsxs as g } from "@emotion/react/jsx-runtime";
1
+ import { jsx as o, jsxs as w } from "@emotion/react/jsx-runtime";
2
2
  import { useMemo as h, useCallback as A, useId as X } from "react";
3
3
  import { unstable_HistoryRouter as Y } from "react-router-dom";
4
4
  import { createBrowserHistory as oo } from "history";
5
5
  import eo from "eventemitter3";
6
6
  import _ from "nprogress";
7
- import { DeviceTypeProvider as to, ThemeSettingsProvider as ro, LocalesProvider as so, getLocaleFromNetwork as io, AppearanceComponentProvider as no } from "@m4l/graphics";
7
+ import { DeviceTypeProvider as to, ThemeSettingsProvider as ro, LocalesProvider as io, getLocaleFromNetwork as so, AppearanceComponentProvider as no } from "@m4l/graphics";
8
8
  import { axiosOperation as ao, EnvironmentProvider as mo, HostToolsProvider as lo, NetworkProvider as po, AuthProvider as co, useAuth as ho, useEnvironment as uo, useNetwork as vo } from "@m4l/core";
9
9
  import { WrapperAppBarContentChildrenStyled as fo, WrapperContentChildrenStyled as Ao } from "./slots/MFIsolationAppSlots.js";
10
10
  import { MFIsolationAppErrorBoundary as _o } from "./MFIsolationAppErrorBoundary.js";
11
11
  import Po from "../ToastContainer/helpers/toaster.js";
12
12
  import { ShellObservabilityProvider as Io } from "../../contexts/ShellObservabilityContext/ShellObservabilityContext.js";
13
- import { MFAuthApp as bo } from "./subcomponents/MFAuthApp/MFAuthApp.js";
14
- import { BaseModule as yo } from "../BaseModule/BaseModule.js";
13
+ import { MFIsolationThemeBridge as bo } from "./subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.js";
14
+ import { MFAuthApp as yo } from "./subcomponents/MFAuthApp/MFAuthApp.js";
15
+ import { BaseModule as go } from "../BaseModule/BaseModule.js";
15
16
  import { SettingsLayout as ko } from "../SettingsLayout/SettingsLayout.js";
16
17
  import { ToastContainer as wo } from "../ToastContainer/ToastContainer.js";
17
- import { PopupsProvider as go } from "../popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
18
+ import { PopupsProvider as Fo } from "../popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
18
19
  import { AreasProvider as Ro } from "../areas/contexts/AreasContext/index.js";
19
- import { AppBarSettings as Fo } from "./subcomponents/AppBarSettings/AppBarSettings.js";
20
- import { HostRuntimeProvider as Lo } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
21
- import { MFObservabilityProvider as So } from "../WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.js";
22
- const R = oo({ window });
23
- function Co(u) {
24
- const { children: v, hostRuntime: s, resolveHostRuntime: i } = u, { user: n } = ho(), {
20
+ import { AppBarSettings as Lo } from "./subcomponents/AppBarSettings/AppBarSettings.js";
21
+ import { HostRuntimeProvider as So } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
22
+ import { MFObservabilityProvider as Co } from "../WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.js";
23
+ const F = oo({ window });
24
+ function Eo(u) {
25
+ const { children: v, hostRuntime: i, resolveHostRuntime: s } = u, { user: n } = ho(), {
25
26
  database: a,
26
27
  hostApiIcons: m,
27
28
  hostApiLocal: l,
28
29
  hostApiRemote: p
29
- } = uo(), { networkOperation: d } = vo(), f = h(() => i ? i({
30
+ } = uo(), { networkOperation: d } = vo(), f = h(() => s ? s({
30
31
  database: a,
31
32
  hostApiIcons: m,
32
33
  hostApiLocal: l,
33
34
  hostApiRemote: p,
34
35
  networkOperation: d,
35
36
  sessionId: n?.sessionId
36
- }) ?? s : s, [
37
+ }) ?? i : i, [
37
38
  a,
38
39
  m,
39
40
  l,
40
41
  p,
41
- s,
42
- d,
43
42
  i,
43
+ d,
44
+ s,
44
45
  n?.sessionId
45
46
  ]);
46
- return /* @__PURE__ */ o(Lo, { value: f, children: v });
47
+ return /* @__PURE__ */ o(So, { value: f, children: v });
47
48
  }
48
- function Xo(u) {
49
+ function oe(u) {
49
50
  const {
50
51
  children: v,
51
- user: s,
52
- pwd: i,
52
+ user: i,
53
+ pwd: s,
53
54
  database: n = "domain",
54
55
  // 'domain
55
56
  hostApiLocal: a,
@@ -58,7 +59,7 @@ function Xo(u) {
58
59
  host_api_icons: p,
59
60
  hostApiRemote: d,
60
61
  host_api_remote: f,
61
- host_static_assets: F,
62
+ host_static_assets: R,
62
63
  environment_assets: L,
63
64
  moduleId: P,
64
65
  skeletonFlags: S,
@@ -67,10 +68,10 @@ function Xo(u) {
67
68
  componentsDictionary: M,
68
69
  onLoad: T,
69
70
  activeAreasNetwork: x = !1,
70
- activeCookiesFromNetwork: H = !1,
71
+ activeCookiesFromNetwork: B = !1,
71
72
  // observedDivRef,
72
- moduleDictionaryLoaded: N,
73
- forcedDeviceType: B,
73
+ moduleDictionaryLoaded: H,
74
+ forcedDeviceType: N,
74
75
  areasStoreId: I,
75
76
  areasStoreDevtoolsEnabled: b,
76
77
  appBarSettings: D = !0,
@@ -79,7 +80,7 @@ function Xo(u) {
79
80
  hostRuntime: W,
80
81
  observability: y,
81
82
  resolveHostRuntime: $
82
- } = u, k = a ?? m ?? "", c = d ?? f ?? "", K = l ?? p ?? `${c}/main/icons`, e = h(() => new eo(), []), Z = A(
83
+ } = u, g = a ?? m ?? "", c = d ?? f ?? "", K = l ?? p ?? `${c}/main/icons`, e = h(() => new eo(), []), Z = A(
83
84
  (t, r) => {
84
85
  e.on(t, r);
85
86
  },
@@ -111,21 +112,21 @@ function Xo(u) {
111
112
  domain_token: "lab1",
112
113
  domainToken: "lab1",
113
114
  database: n,
114
- host_api_local: k,
115
- hostApiLocal: k,
115
+ host_api_local: g,
116
+ hostApiLocal: g,
116
117
  host_api_remote: c,
117
118
  hostApiRemote: c,
118
119
  hostRemote: c,
119
- host_static_assets: F,
120
+ host_static_assets: R,
120
121
  environment_assets: L,
121
122
  hostApiIcons: K,
122
123
  googleMapsApiKey: j
123
124
  }),
124
125
  // eslint-disable-next-line react-hooks/exhaustive-deps
125
126
  []
126
- ), w = X(), U = Po(w), V = h(
127
+ ), k = X(), U = Po(k), V = h(
127
128
  () => ({
128
- history: R,
129
+ history: F,
129
130
  toast: U,
130
131
  startProgress: G,
131
132
  stopProgress: J,
@@ -136,31 +137,31 @@ function Xo(u) {
136
137
  // eslint-disable-next-line react-hooks/exhaustive-deps
137
138
  []
138
139
  );
139
- return /* @__PURE__ */ o(mo, { ...Q, children: /* @__PURE__ */ o(lo, { ...V, children: /* @__PURE__ */ o(po, { axiosOperation: O, children: /* @__PURE__ */ o(Io, { value: y, children: /* @__PURE__ */ o(So, { value: y, children: /* @__PURE__ */ o(
140
+ return /* @__PURE__ */ o(mo, { ...Q, children: /* @__PURE__ */ o(lo, { ...V, children: /* @__PURE__ */ o(po, { axiosOperation: O, children: /* @__PURE__ */ o(Io, { value: y, children: /* @__PURE__ */ o(Co, { value: y, children: /* @__PURE__ */ o(
140
141
  Y,
141
142
  {
142
- history: R,
143
+ history: F,
143
144
  future: { v7_startTransition: !0, v7_relativeSplatPath: !0 },
144
- children: /* @__PURE__ */ o(to, { forcedDeviceType: B, children: /* @__PURE__ */ o(co, { children: /* @__PURE__ */ o(bo, { user: s, pwd: i, children: /* @__PURE__ */ o(ro, { children: /* @__PURE__ */ o(so, { isMicroFrontEnd: !1, getLocaleFromNetwork: io, children: /* @__PURE__ */ o(
145
- yo,
145
+ children: /* @__PURE__ */ o(to, { forcedDeviceType: N, children: /* @__PURE__ */ o(co, { children: /* @__PURE__ */ o(ro, { children: /* @__PURE__ */ o(bo, { children: /* @__PURE__ */ o(yo, { user: i, pwd: s, children: /* @__PURE__ */ o(io, { isMicroFrontEnd: !1, getLocaleFromNetwork: so, children: /* @__PURE__ */ o(
146
+ go,
146
147
  {
147
148
  moduleId: P,
148
149
  privileges: E,
149
150
  skeletonFlags: S,
150
151
  componentsDictionary: M,
151
152
  moduleNameField: C,
152
- moduleDictionaryLoaded: N,
153
- children: /* @__PURE__ */ o(_o, { moduleId: P, children: /* @__PURE__ */ g(no, { children: [
153
+ moduleDictionaryLoaded: H,
154
+ children: /* @__PURE__ */ o(_o, { moduleId: P, children: /* @__PURE__ */ w(no, { children: [
154
155
  /* @__PURE__ */ o(ko, {}),
155
- /* @__PURE__ */ o(wo, { containerId: w }),
156
+ /* @__PURE__ */ o(wo, { containerId: k }),
156
157
  " ",
157
158
  /* @__PURE__ */ o(
158
- Co,
159
+ Eo,
159
160
  {
160
161
  hostRuntime: W,
161
162
  resolveHostRuntime: $,
162
163
  children: /* @__PURE__ */ o(
163
- go,
164
+ Fo,
164
165
  {
165
166
  baseZindex: 1e3,
166
167
  storeId: I,
@@ -172,9 +173,9 @@ function Xo(u) {
172
173
  storeDevtoolsEnabled: b,
173
174
  onLoad: T,
174
175
  loadAreasFromNetwork: x,
175
- loadCookiesFromNetwork: H,
176
- children: /* @__PURE__ */ g(fo, { children: [
177
- D && /* @__PURE__ */ o(Fo, {}),
176
+ loadCookiesFromNetwork: B,
177
+ children: /* @__PURE__ */ w(fo, { children: [
178
+ D && /* @__PURE__ */ o(Lo, {}),
178
179
  /* @__PURE__ */ o(Ao, { children: v })
179
180
  ] })
180
181
  }
@@ -185,10 +186,10 @@ function Xo(u) {
185
186
  )
186
187
  ] }) })
187
188
  }
188
- ) }) }) }) }) })
189
+ ) }) }) }) }) }) })
189
190
  }
190
191
  ) }) }) }) }) });
191
192
  }
192
193
  export {
193
- Xo as MFIsolationApp
194
+ oe as MFIsolationApp
194
195
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MFAuthApp.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDAsD9C"}
1
+ {"version":3,"file":"MFAuthApp.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDA6C9C"}
@@ -1,15 +1,14 @@
1
- import { jsx as o } from "@emotion/react/jsx-runtime";
2
- import { useEffect as l } from "react";
3
- import { format as y } from "date-fns";
4
- import { useAuth as _, useLocalStorage as f, DomainCountryProvider as h } from "@m4l/core";
5
- import { KEY_LOCAL_STORAGE_THEME_SETTINGS as p, defaultThemeSettings as g, HostThemeProvider as C, FormatterProvider as E } from "@m4l/graphics";
6
- import { getUserThemeOptions as b, fnComponentsOverrides as T } from "@m4l/styles";
7
- function D(s) {
8
- const { children: m, user: c, pwd: d } = s, { isAuthenticated: t, isInitialized: i, login: a, user: e } = _(), [n] = f(p, g);
9
- if (l(() => {
10
- i && t === !1 && a(c, d, !1);
11
- }, [i, t]), !t)
12
- return /* @__PURE__ */ o("div", { children: "Pendiente por autenticarse" });
1
+ import { jsx as e } from "@emotion/react/jsx-runtime";
2
+ import { useEffect as a } from "react";
3
+ import { format as u } from "date-fns";
4
+ import { useAuth as l, DomainCountryProvider as y } from "@m4l/core";
5
+ import { FormatterProvider as _ } from "@m4l/graphics";
6
+ function g(n) {
7
+ const { children: c, user: d, pwd: m } = n, { isAuthenticated: o, isInitialized: t, login: s, user: i } = l();
8
+ if (a(() => {
9
+ t && o === !1 && s(d, m, !1);
10
+ }, [t, o]), !o)
11
+ return /* @__PURE__ */ e("div", { children: "Pendiente por autenticarse" });
13
12
  const r = {
14
13
  id: 1,
15
14
  currency: "USD",
@@ -17,31 +16,21 @@ function D(s) {
17
16
  decimal_symbol: ".",
18
17
  thousands_symbol: ","
19
18
  };
20
- e?.domainCountry && (r.id = e?.domainCountry.id ?? r.id, r.currency = e?.domainCountry.currency ?? r.currency, r.currency_decimal_digits = e?.domainCountry.currency_decimal_digits ?? r.currency_decimal_digits, r.decimal_symbol = e?.domainCountry.decimal_symbol ?? r.decimal_symbol, r.thousands_symbol = e?.domainCountry?.thousands_symbol ?? r.thousands_symbol);
21
- const u = b(n.themeMode, n.themeColor);
22
- return /* @__PURE__ */ o(
23
- C,
19
+ return i?.domainCountry && (r.id = i?.domainCountry.id ?? r.id, r.currency = i?.domainCountry.currency ?? r.currency, r.currency_decimal_digits = i?.domainCountry.currency_decimal_digits ?? r.currency_decimal_digits, r.decimal_symbol = i?.domainCountry.decimal_symbol ?? r.decimal_symbol, r.thousands_symbol = i?.domainCountry?.thousands_symbol ?? r.thousands_symbol), /* @__PURE__ */ e(y, { ...r, isMicroFrontEnd: !1, children: /* @__PURE__ */ e(
20
+ _,
24
21
  {
25
- hostThemeOptions: u,
26
- fnComponentsOverrides: T,
27
- isMicroFrontEnd: !0,
28
- children: /* @__PURE__ */ o(h, { ...r, isMicroFrontEnd: !1, children: /* @__PURE__ */ o(
29
- E,
30
- {
31
- isMicroFrontEnd: !1,
32
- dateFormatter: {
33
- formatDate: y
34
- },
35
- currencyFormatter: {
36
- code: r.currency,
37
- decimalDigits: r.currency_decimal_digits
38
- },
39
- children: m
40
- }
41
- ) })
22
+ isMicroFrontEnd: !1,
23
+ dateFormatter: {
24
+ formatDate: u
25
+ },
26
+ currencyFormatter: {
27
+ code: r.currency,
28
+ decimalDigits: r.currency_decimal_digits
29
+ },
30
+ children: c
42
31
  }
43
- );
32
+ ) });
44
33
  }
45
34
  export {
46
- D as MFAuthApp
35
+ g as MFAuthApp
47
36
  };
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ type MFIsolationThemeBridgeProps = {
3
+ children: ReactNode;
4
+ };
5
+ /**
6
+ * Bridge the isolation theme-settings store into the shared host theme provider.
7
+ */
8
+ export declare function MFIsolationThemeBridge(props: MFIsolationThemeBridgeProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=MFIsolationThemeBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MFIsolationThemeBridge.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,oDAaxE"}
@@ -0,0 +1,19 @@
1
+ import { jsx as i } from "@emotion/react/jsx-runtime";
2
+ import { shallow as n } from "zustand/shallow";
3
+ import { useThemeSettingsStore as m, HostThemeProvider as s } from "@m4l/graphics";
4
+ import { fnComponentsOverrides as h } from "@m4l/styles";
5
+ function l(o) {
6
+ const { children: e } = o, t = m((r) => r.themeOptions, n);
7
+ return /* @__PURE__ */ i(
8
+ s,
9
+ {
10
+ isMicroFrontEnd: !0,
11
+ hostThemeOptions: t,
12
+ fnComponentsOverrides: h,
13
+ children: e
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ l as MFIsolationThemeBridge
19
+ };
@@ -0,0 +1,2 @@
1
+ export { MFIsolationThemeBridge } from './MFIsolationThemeBridge';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CodeEditorProps } from './types';
2
+ /**
3
+ * Render a syntax-highlighted code editor with optional self-managed fallback state.
4
+ */
5
+ export declare function CodeEditor(props: CodeEditorProps): import("@emotion/react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=CodeEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,SAAS,CAAC;AAgBjB;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,oDAuXhD"}
@@ -0,0 +1,263 @@
1
+ import { jsx as a, jsxs as D } from "@emotion/react/jsx-runtime";
2
+ import { useModuleDictionary as Ae, useModuleSkeleton as Me } from "@m4l/core";
3
+ import { useThemeMode as Ve } from "@m4l/graphics";
4
+ import _ from "clsx";
5
+ import { useId as Pe, useState as J, useRef as ke, useMemo as E, useEffect as Q, useCallback as z } from "react";
6
+ import { getPropDataTestId as x, getNameDataTestId as ze } from "../../../test/getNameDataTestId.js";
7
+ import { CODE_EDITOR_DEFAULT_MAX_LINES as Be, CODE_EDITOR_DEFAULT_MIN_LINES as He, CODE_EDITOR_DEFAULT_LANGUAGE as we, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as Ge, CODE_EDITOR_CLASSES as C, CODE_EDITOR_KEY_COMPONENT as p, CODE_EDITOR_READ_ONLY_LABEL as Ue, CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID as Ye } from "./constants.js";
8
+ import { CODE_EDITOR_DICTIONARY as W } from "./dictionary.js";
9
+ import { resolveCodeEditorLanguageIcon as Fe } from "./helpers/languageIcon.js";
10
+ import { ensureCodeEditorRuntimeDependencies as je, getCodeEditorLineCount as qe, createCodeEditorPrismTheme as Ke, resolveCodeEditorLanguageTemplate as Xe, validateCodeEditorSyntax as Ze, highlightCode as $e } from "./helpers/highlighting.js";
11
+ import { SkeletonStyled as Je, RootStyled as Qe, HeaderStyled as We, LanguageChipStyled as et, LanguageChipIconStyled as tt, HeaderBadgesStyled as at, ReadOnlyChipStyled as nt, BodyStyled as rt, LineNumbersStyled as ot, LineNumberStyled as lt, EditorScrollerStyled as it, PlaceholderStyled as st, EditorStyled as dt } from "./slots/CodeEditorSlots.js";
12
+ import { CodeEditorSlots as f } from "./slots/CodeEditorEnum.js";
13
+ function ct(L, y) {
14
+ return L.length !== y.length ? !1 : L.every((S, o) => S === y[o]);
15
+ }
16
+ function Dt(L) {
17
+ const {
18
+ className: y,
19
+ customLanguages: S,
20
+ dataTestId: o,
21
+ defaultValue: ee,
22
+ disabled: I = !1,
23
+ editorClassName: te,
24
+ error: ae = !1,
25
+ highlightTheme: B,
26
+ id: ne,
27
+ insertSpaces: re,
28
+ languageIcon: oe,
29
+ languageLabel: le,
30
+ languageTemplate: n,
31
+ languageText: ie,
32
+ maxLines: se = Be,
33
+ minLines: O = He,
34
+ onBlur: de,
35
+ onChange: v,
36
+ placeholder: R,
37
+ preClassName: ce,
38
+ readOnly: d = !1,
39
+ readOnlyLabel: ue,
40
+ runtimeDependencies: c,
41
+ showLineNumbers: H = !1,
42
+ showPlaceholder: w = !0,
43
+ size: G = "medium",
44
+ syntaxValidator: N,
45
+ skeleton: me = !1,
46
+ textareaClassName: ge,
47
+ validateSyntax: U = !1,
48
+ value: u,
49
+ variant: he = "outlined",
50
+ ...T
51
+ } = L, Ee = Pe(), Ce = ne || Ee, { getLabel: pe } = Ae(), fe = Me() || me, b = Ve(), m = v === void 0, [A, Le] = J(0), M = ke([]), [ye, Y] = J(
52
+ u ?? ee ?? ""
53
+ ), F = E(() => c ? Array.isArray(c) ? c : [c] : [], [c]);
54
+ ct(
55
+ M.current,
56
+ F
57
+ ) || (M.current = F);
58
+ const V = M.current;
59
+ Q(() => {
60
+ m && u !== void 0 && Y(u);
61
+ }, [m, u]), Q(() => {
62
+ if (!V.length)
63
+ return;
64
+ let e = !0;
65
+ return je(V).catch(() => {
66
+ }).then(() => {
67
+ e && Le((s) => s + 1);
68
+ }), () => {
69
+ e = !1;
70
+ };
71
+ }, [V]);
72
+ const r = m ? ye : u ?? "", Se = w && r.length === 0 && !!R, Ie = Ge[G], j = qe(r), q = Math.max(j, O), P = Math.max(O, se), Te = Math.min(q, P), De = j >= P, K = E(
73
+ () => B ?? Ke(b),
74
+ [b, B]
75
+ ), l = E(
76
+ () => Xe(n),
77
+ [n, A]
78
+ ), g = ie ?? l?.languageText ?? we, X = le ?? l?.languageLabel, Z = !!X, _e = Fe(
79
+ oe ?? l?.languageIcon
80
+ ), k = d ? pe(W.readOnly) : void 0, xe = ue ?? (k && k !== W.readOnly ? k : Ue), h = E(() => {
81
+ if (N)
82
+ return N({
83
+ code: r,
84
+ languageTemplate: l ?? n,
85
+ languageText: g
86
+ });
87
+ if (U)
88
+ return Ze({
89
+ code: r,
90
+ languageTemplate: l ?? n,
91
+ languageText: g
92
+ });
93
+ }, [
94
+ n,
95
+ l,
96
+ g,
97
+ r,
98
+ A,
99
+ N,
100
+ U
101
+ ]), $ = ae || !!h && !h.isValid, i = h && !h.isValid ? h.errorRange : void 0, Oe = E(() => {
102
+ if (!i)
103
+ return /* @__PURE__ */ new Set();
104
+ const e = i.start.line, s = i.end?.line ?? e;
105
+ return new Set(
106
+ Array.from(
107
+ { length: Math.max(s - e + 1, 1) },
108
+ (ut, be) => e + be
109
+ )
110
+ );
111
+ }, [i]), t = {
112
+ colorMode: b,
113
+ disabled: I,
114
+ error: $,
115
+ isLineCapped: De,
116
+ isEmpty: r.length === 0,
117
+ isPlaceholderVisible: Se,
118
+ lineHeight: Ie,
119
+ maxLines: P,
120
+ minLines: O,
121
+ readOnly: d,
122
+ showLineNumbers: H,
123
+ size: G,
124
+ variant: he,
125
+ visibleLineCount: Te
126
+ }, ve = z(
127
+ (e) => $e({
128
+ code: e,
129
+ customLanguages: S,
130
+ languageTemplate: n,
131
+ languageText: g,
132
+ prismTheme: K,
133
+ syntaxErrorRange: i
134
+ }),
135
+ [
136
+ S,
137
+ n,
138
+ K,
139
+ g,
140
+ A,
141
+ i
142
+ ]
143
+ ), Re = z(
144
+ (e) => {
145
+ m && Y(e), v?.(e);
146
+ },
147
+ [v, m]
148
+ ), Ne = z(
149
+ (e) => {
150
+ if (I || e.target instanceof Element && e.target.closest("textarea"))
151
+ return;
152
+ e.currentTarget.querySelector("textarea")?.focus();
153
+ },
154
+ [I]
155
+ );
156
+ return fe ? /* @__PURE__ */ a(Je, { ownerState: t }) : /* @__PURE__ */ D(
157
+ Qe,
158
+ {
159
+ ownerState: t,
160
+ "aria-disabled": t.disabled || void 0,
161
+ className: _(C.root, y),
162
+ ...x(p, f.root, o),
163
+ children: [
164
+ Z || d ? /* @__PURE__ */ D(We, { ownerState: t, className: C.header, children: [
165
+ Z ? /* @__PURE__ */ a(
166
+ et,
167
+ {
168
+ label: X,
169
+ size: "small",
170
+ variant: "outlined",
171
+ color: "default",
172
+ startIcon: /* @__PURE__ */ a(
173
+ tt,
174
+ {
175
+ ...x(
176
+ p,
177
+ f.languageChipIcon,
178
+ Ye
179
+ ),
180
+ children: /* @__PURE__ */ a(_e, { fontSize: "small" })
181
+ }
182
+ )
183
+ }
184
+ ) : null,
185
+ /* @__PURE__ */ a(at, { ownerState: t, children: d ? /* @__PURE__ */ a(
186
+ nt,
187
+ {
188
+ label: xe,
189
+ size: "small"
190
+ }
191
+ ) : null })
192
+ ] }) : null,
193
+ /* @__PURE__ */ D(
194
+ rt,
195
+ {
196
+ ownerState: t,
197
+ onClick: Ne,
198
+ ...x(p, f.body, o),
199
+ children: [
200
+ H ? /* @__PURE__ */ a(ot, { ownerState: t, "aria-hidden": "true", children: Array.from({ length: q }, (e, s) => s + 1).map(
201
+ (e) => /* @__PURE__ */ a(
202
+ lt,
203
+ {
204
+ ownerState: t,
205
+ "data-code-editor-error-line": Oe.has(e) || void 0,
206
+ children: e
207
+ },
208
+ `code-editor-line-${e}`
209
+ )
210
+ ) }) : null,
211
+ /* @__PURE__ */ D(it, { ownerState: t, children: [
212
+ w && t.isEmpty && R ? /* @__PURE__ */ a(
213
+ st,
214
+ {
215
+ ownerState: t,
216
+ ...x(
217
+ p,
218
+ f.placeholder,
219
+ o
220
+ ),
221
+ children: R
222
+ }
223
+ ) : null,
224
+ /* @__PURE__ */ a(
225
+ dt,
226
+ {
227
+ ...T,
228
+ ownerState: t,
229
+ "aria-label": T["aria-label"] ?? "Code editor",
230
+ "aria-invalid": T["aria-invalid"] ?? ($ || void 0),
231
+ className: _(C.editor, te),
232
+ "data-testid": ze(
233
+ p,
234
+ f.textarea,
235
+ o
236
+ ),
237
+ disabled: I,
238
+ highlight: ve,
239
+ insertSpaces: re,
240
+ onBlur: de,
241
+ onValueChange: Re,
242
+ preClassName: _(C.pre, ce),
243
+ readOnly: d,
244
+ tabSize: T.tabSize,
245
+ textareaClassName: _(
246
+ C.textarea,
247
+ ge
248
+ ),
249
+ textareaId: Ce,
250
+ value: r
251
+ }
252
+ )
253
+ ] })
254
+ ]
255
+ }
256
+ )
257
+ ]
258
+ }
259
+ );
260
+ }
261
+ export {
262
+ Dt as CodeEditor
263
+ };
@@ -0,0 +1,3 @@
1
+ import { CodeEditorStyles } from './types';
2
+ export declare const codeEditorStyles: CodeEditorStyles;
3
+ //# sourceMappingURL=CodeEditor.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,eAAO,MAAM,gBAAgB,EAAE,gBAyV9B,CAAC"}