@gisce/react-ooui 1.2.0-rc.76 → 1.2.0-rc.78
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/dist/react-ooui.es.js +591 -589
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +9 -9
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/views/ActionView.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/views/ActionView.tsx +6 -2
- package/src/widgets/custom/Markdown.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionView.d.ts","sourceRoot":"","sources":["ActionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,EAIL,eAAe,EAGf,QAAQ,EACT,MAAM,eAAe,CAAC;AAkBvB,aAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;
|
|
1
|
+
{"version":3,"file":"ActionView.d.ts","sourceRoot":"","sources":["ActionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,EAIL,eAAe,EAGf,QAAQ,EACT,MAAM,eAAe,CAAC;AAkBvB,aAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;AAgcF,wBAAsC"}
|
package/package.json
CHANGED
package/src/views/ActionView.tsx
CHANGED
|
@@ -107,6 +107,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
107
107
|
tabs,
|
|
108
108
|
activeKey,
|
|
109
109
|
openAction,
|
|
110
|
+
onRemoveTab,
|
|
110
111
|
} = tabManagerContext || {};
|
|
111
112
|
|
|
112
113
|
useHotkeys(
|
|
@@ -240,8 +241,9 @@ function ActionView(props: Props, ref: any) {
|
|
|
240
241
|
|
|
241
242
|
if (!currentViewToAssign) {
|
|
242
243
|
showErrorDialog(
|
|
243
|
-
|
|
244
|
+
`Error determining the first view to show for model ${model}.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
244
245
|
);
|
|
246
|
+
onRemoveTab?.(tabKey);
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
setCurrentView(currentViewToAssign);
|
|
@@ -279,7 +281,9 @@ function ActionView(props: Props, ref: any) {
|
|
|
279
281
|
}, [tabs, activeKey]);
|
|
280
282
|
|
|
281
283
|
async function canWeClose() {
|
|
282
|
-
if (currentView
|
|
284
|
+
if (!currentView) {
|
|
285
|
+
return true;
|
|
286
|
+
} else if (currentView!.type === "form") {
|
|
283
287
|
return await (formRef.current as any).cancelUnsavedChanges();
|
|
284
288
|
} else {
|
|
285
289
|
return true;
|
|
@@ -14,7 +14,7 @@ export const Markdown = (props: WidgetProps) => {
|
|
|
14
14
|
export const MarkdownInput = (props: any) => {
|
|
15
15
|
const {value, ooui} = props;
|
|
16
16
|
return (
|
|
17
|
-
<div style={{height: ooui.height ? ooui.height + 'px' : '100%'}}>
|
|
17
|
+
<div style={{height: ooui.height ? ooui.height + 'px' : '100%', overflow: 'auto'}}>
|
|
18
18
|
<ReactMarkdown children={value} className="ant-typography"/>
|
|
19
19
|
</div>
|
|
20
20
|
|