@m4l/components 9.25.0 → 9.25.1-beta-feature-731-code-editor.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.
Files changed (52) 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 +80 -76
  4. package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts +5 -0
  5. package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts.map +1 -0
  6. package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.js +14 -0
  7. package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts +2 -0
  8. package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts.map +1 -0
  9. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +6 -0
  10. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +1 -0
  11. package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +380 -0
  12. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +3 -0
  13. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +1 -0
  14. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +344 -0
  15. package/components/extended/ReactSimpleCodeEditor/constants.d.ts +83 -0
  16. package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +1 -0
  17. package/components/extended/ReactSimpleCodeEditor/constants.js +149 -0
  18. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +12 -0
  19. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +1 -0
  20. package/components/extended/ReactSimpleCodeEditor/dictionary.js +8 -0
  21. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +58 -0
  22. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +1 -0
  23. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +1063 -0
  24. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +6 -0
  25. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +1 -0
  26. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +7 -0
  27. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts +6 -0
  28. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts.map +1 -0
  29. package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.js +9 -0
  30. package/components/extended/ReactSimpleCodeEditor/index.d.ts +4 -0
  31. package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +1 -0
  32. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +20 -0
  33. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +1 -0
  34. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +4 -0
  35. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +90 -0
  36. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +1 -0
  37. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +73 -0
  38. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +3 -0
  39. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +1 -0
  40. package/components/extended/ReactSimpleCodeEditor/types.d.ts +460 -0
  41. package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +1 -0
  42. package/components/extended/index.d.ts +1 -0
  43. package/components/extended/index.d.ts.map +1 -1
  44. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +7 -0
  45. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +1 -0
  46. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +6 -0
  47. package/components/hook-form/RHFCodeEditor/index.d.ts +3 -0
  48. package/components/hook-form/RHFCodeEditor/index.d.ts.map +1 -0
  49. package/components/hook-form/index.d.ts +1 -0
  50. package/components/hook-form/index.d.ts.map +1 -1
  51. package/index.js +572 -559
  52. package/package.json +11 -8
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,oDAkLxD"}
@@ -1,9 +1,9 @@
1
- import { jsx as o, jsxs as g } from "@emotion/react/jsx-runtime";
2
- import { useMemo as h, useCallback as A, useId as X } from "react";
1
+ import { jsx as o, jsxs as A } from "@emotion/react/jsx-runtime";
2
+ import { useMemo as h, useCallback as _, 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
- import _ from "nprogress";
6
+ import P from "nprogress";
7
7
  import { DeviceTypeProvider as to, ThemeSettingsProvider as ro, LocalesProvider as so, getLocaleFromNetwork as io, 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";
@@ -11,14 +11,15 @@ import { MFIsolationAppErrorBoundary as _o } from "./MFIsolationAppErrorBoundary
11
11
  import Po from "../ToastContainer/helpers/toaster.js";
12
12
  import { ShellObservabilityProvider as Io } from "../../contexts/ShellObservabilityContext/ShellObservabilityContext.js";
13
13
  import { MFAuthApp as bo } from "./subcomponents/MFAuthApp/MFAuthApp.js";
14
- import { BaseModule as yo } from "../BaseModule/BaseModule.js";
14
+ import { ThemeSettingsHostToolsBridge as yo } from "./subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.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 { 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";
18
+ import { PopupsProvider as Ro } from "../popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
19
+ import { AreasProvider as Fo } from "../areas/contexts/AreasContext/index.js";
20
+ import { AppBarSettings as Lo } from "./subcomponents/AppBarSettings/AppBarSettings.js";
21
+ import { HostRuntimeProvider as So } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
22
+ import { MFObservabilityProvider as To } from "../WindowBase/contexts/MFObservabilityContext/MFObservabilityContext.js";
22
23
  const R = oo({ window });
23
24
  function Co(u) {
24
25
  const { children: v, hostRuntime: s, resolveHostRuntime: i } = u, { user: n } = ho(), {
@@ -43,9 +44,9 @@ function Co(u) {
43
44
  i,
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
52
  user: s,
@@ -60,31 +61,31 @@ function Xo(u) {
60
61
  host_api_remote: f,
61
62
  host_static_assets: F,
62
63
  environment_assets: L,
63
- moduleId: P,
64
+ moduleId: I,
64
65
  skeletonFlags: S,
65
- moduleNameField: C,
66
- privileges: E,
67
- componentsDictionary: M,
68
- onLoad: T,
69
- activeAreasNetwork: x = !1,
70
- activeCookiesFromNetwork: H = !1,
66
+ moduleNameField: T,
67
+ privileges: C,
68
+ componentsDictionary: E,
69
+ onLoad: H,
70
+ activeAreasNetwork: M = !1,
71
+ activeCookiesFromNetwork: x = !1,
71
72
  // observedDivRef,
72
- moduleDictionaryLoaded: N,
73
- forcedDeviceType: B,
74
- areasStoreId: I,
75
- areasStoreDevtoolsEnabled: b,
73
+ moduleDictionaryLoaded: B,
74
+ forcedDeviceType: N,
75
+ areasStoreId: b,
76
+ areasStoreDevtoolsEnabled: y,
76
77
  appBarSettings: D = !0,
77
78
  axiosOperation: O = ao,
78
79
  googleMapsApiKey: j,
79
80
  hostRuntime: W,
80
- observability: y,
81
+ observability: g,
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, k = a ?? m ?? "", c = d ?? f ?? "", K = l ?? p ?? `${c}/main/icons`, e = h(() => new eo(), []), Z = _(
83
84
  (t, r) => {
84
85
  e.on(t, r);
85
86
  },
86
87
  [e]
87
- ), q = A(
88
+ ), q = _(
88
89
  (t, r) => {
89
90
  if (r === null) {
90
91
  e.removeListener(t);
@@ -93,17 +94,17 @@ function Xo(u) {
93
94
  e.removeListener(t, r);
94
95
  },
95
96
  [e]
96
- ), z = A(
97
+ ), z = _(
97
98
  (t, r) => {
98
99
  e.emit(t, r);
99
100
  },
100
101
  [e]
101
102
  ), G = () => {
102
- _.configure({
103
+ P.configure({
103
104
  showSpinner: !0
104
- }), _.start();
105
+ }), P.start();
105
106
  }, J = () => {
106
- _.done();
107
+ P.done();
107
108
  }, Q = h(
108
109
  () => ({
109
110
  host: "",
@@ -136,59 +137,62 @@ 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: g, children: /* @__PURE__ */ o(To, { value: g, children: /* @__PURE__ */ o(
140
141
  Y,
141
142
  {
142
143
  history: R,
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,
146
- {
147
- moduleId: P,
148
- privileges: E,
149
- skeletonFlags: S,
150
- componentsDictionary: M,
151
- moduleNameField: C,
152
- moduleDictionaryLoaded: N,
153
- children: /* @__PURE__ */ o(_o, { moduleId: P, children: /* @__PURE__ */ g(no, { children: [
154
- /* @__PURE__ */ o(ko, {}),
155
- /* @__PURE__ */ o(wo, { containerId: w }),
156
- " ",
157
- /* @__PURE__ */ o(
158
- Co,
159
- {
160
- hostRuntime: W,
161
- resolveHostRuntime: $,
162
- children: /* @__PURE__ */ o(
163
- go,
164
- {
165
- baseZindex: 1e3,
166
- storeId: I,
167
- storeDevtoolsEnabled: b,
168
- children: /* @__PURE__ */ o(
169
- Ro,
170
- {
171
- storeId: I,
172
- storeDevtoolsEnabled: b,
173
- onLoad: T,
174
- loadAreasFromNetwork: x,
175
- loadCookiesFromNetwork: H,
176
- children: /* @__PURE__ */ g(fo, { children: [
177
- D && /* @__PURE__ */ o(Fo, {}),
178
- /* @__PURE__ */ o(Ao, { children: v })
179
- ] })
180
- }
181
- )
182
- }
183
- )
184
- }
185
- )
186
- ] }) })
187
- }
188
- ) }) }) }) }) })
145
+ children: /* @__PURE__ */ o(to, { forcedDeviceType: N, children: /* @__PURE__ */ o(co, { children: /* @__PURE__ */ o(bo, { user: s, pwd: i, children: /* @__PURE__ */ A(ro, { children: [
146
+ /* @__PURE__ */ o(yo, {}),
147
+ /* @__PURE__ */ o(so, { isMicroFrontEnd: !1, getLocaleFromNetwork: io, children: /* @__PURE__ */ o(
148
+ go,
149
+ {
150
+ moduleId: I,
151
+ privileges: C,
152
+ skeletonFlags: S,
153
+ componentsDictionary: E,
154
+ moduleNameField: T,
155
+ moduleDictionaryLoaded: B,
156
+ children: /* @__PURE__ */ o(_o, { moduleId: I, children: /* @__PURE__ */ A(no, { children: [
157
+ /* @__PURE__ */ o(ko, {}),
158
+ /* @__PURE__ */ o(wo, { containerId: w }),
159
+ " ",
160
+ /* @__PURE__ */ o(
161
+ Co,
162
+ {
163
+ hostRuntime: W,
164
+ resolveHostRuntime: $,
165
+ children: /* @__PURE__ */ o(
166
+ Ro,
167
+ {
168
+ baseZindex: 1e3,
169
+ storeId: b,
170
+ storeDevtoolsEnabled: y,
171
+ children: /* @__PURE__ */ o(
172
+ Fo,
173
+ {
174
+ storeId: b,
175
+ storeDevtoolsEnabled: y,
176
+ onLoad: H,
177
+ loadAreasFromNetwork: M,
178
+ loadCookiesFromNetwork: x,
179
+ children: /* @__PURE__ */ A(fo, { children: [
180
+ D && /* @__PURE__ */ o(Lo, {}),
181
+ /* @__PURE__ */ o(Ao, { children: v })
182
+ ] })
183
+ }
184
+ )
185
+ }
186
+ )
187
+ }
188
+ )
189
+ ] }) })
190
+ }
191
+ ) })
192
+ ] }) }) }) })
189
193
  }
190
194
  ) }) }) }) }) });
191
195
  }
192
196
  export {
193
- Xo as MFIsolationApp
197
+ oe as MFIsolationApp
194
198
  };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Register the isolation host-tools emitter inside the shared theme settings store.
3
+ */
4
+ export declare function ThemeSettingsHostToolsBridge(): null;
5
+ //# sourceMappingURL=ThemeSettingsHostToolsBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeSettingsHostToolsBridge.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,4BAA4B,SAe3C"}
@@ -0,0 +1,14 @@
1
+ import { useEffect as s } from "react";
2
+ import { useHostTools as r } from "@m4l/core";
3
+ import { useThemeSettingsStore as i } from "@m4l/graphics";
4
+ function f() {
5
+ const { events_emit: e } = r(), t = i(
6
+ (o) => o.settingsActions.registerHostToolsEventsEmit
7
+ );
8
+ return s(() => (t(e), () => {
9
+ t(void 0);
10
+ }), [e, t]), null;
11
+ }
12
+ export {
13
+ f as ThemeSettingsHostToolsBridge
14
+ };
@@ -0,0 +1,2 @@
1
+ export { ThemeSettingsHostToolsBridge } from './ThemeSettingsHostToolsBridge';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,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":"AA6DA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,SAAS,CAAC;AAmDjB;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,oDAmiBhD"}