@m4l/components 9.25.0 → 9.25.1-beta-feature-731-code-editor.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +11 -0
- package/components/MFIsolationApp/MFIsolationApp.d.ts.map +1 -1
- package/components/MFIsolationApp/MFIsolationApp.js +80 -76
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts +5 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts.map +1 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.js +14 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts +2 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +6 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +380 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +3 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +344 -0
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +83 -0
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/constants.js +149 -0
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +12 -0
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/dictionary.js +8 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +58 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +1063 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +6 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +7 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts +6 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/helpers/resolveEditorComponent.js +9 -0
- package/components/extended/ReactSimpleCodeEditor/index.d.ts +4 -0
- package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +20 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +4 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +90 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +73 -0
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +3 -0
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +1 -0
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +460 -0
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +1 -0
- package/components/extended/index.d.ts +1 -0
- package/components/extended/index.d.ts.map +1 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +7 -0
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +1 -0
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +6 -0
- package/components/hook-form/RHFCodeEditor/index.d.ts +3 -0
- package/components/hook-form/RHFCodeEditor/index.d.ts.map +1 -0
- package/components/hook-form/index.d.ts +1 -0
- package/components/hook-form/index.d.ts.map +1 -1
- package/index.js +572 -559
- 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;
|
|
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
|
|
2
|
-
import { useMemo as h, useCallback as
|
|
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
|
|
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 {
|
|
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
|
|
18
|
-
import { AreasProvider as
|
|
19
|
-
import { AppBarSettings as
|
|
20
|
-
import { HostRuntimeProvider as
|
|
21
|
-
import { MFObservabilityProvider as
|
|
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(
|
|
47
|
+
return /* @__PURE__ */ o(So, { value: f, children: v });
|
|
47
48
|
}
|
|
48
|
-
function
|
|
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:
|
|
64
|
+
moduleId: I,
|
|
64
65
|
skeletonFlags: S,
|
|
65
|
-
moduleNameField:
|
|
66
|
-
privileges:
|
|
67
|
-
componentsDictionary:
|
|
68
|
-
onLoad:
|
|
69
|
-
activeAreasNetwork:
|
|
70
|
-
activeCookiesFromNetwork:
|
|
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:
|
|
73
|
-
forcedDeviceType:
|
|
74
|
-
areasStoreId:
|
|
75
|
-
areasStoreDevtoolsEnabled:
|
|
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:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
97
|
+
), z = _(
|
|
97
98
|
(t, r) => {
|
|
98
99
|
e.emit(t, r);
|
|
99
100
|
},
|
|
100
101
|
[e]
|
|
101
102
|
), G = () => {
|
|
102
|
-
|
|
103
|
+
P.configure({
|
|
103
104
|
showSpinner: !0
|
|
104
|
-
}),
|
|
105
|
+
}), P.start();
|
|
105
106
|
}, J = () => {
|
|
106
|
-
|
|
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:
|
|
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:
|
|
145
|
-
yo,
|
|
146
|
-
{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/* @__PURE__ */ o(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
197
|
+
oe as MFIsolationApp
|
|
194
198
|
};
|
|
@@ -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 @@
|
|
|
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"}
|