@headless-adminapp/fluent 1.0.2 → 1.0.3
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DataGridWidgetExperience } from '@headless-adminapp/core/experience/insights';
|
|
2
|
-
export declare function WidgetDataGridContainer({ content, }: {
|
|
2
|
+
export declare function WidgetDataGridContainer({ content, }: Readonly<{
|
|
3
3
|
content: DataGridWidgetExperience;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,6 +36,7 @@ function WidgetDataGridContainer({ content, }) {
|
|
|
36
36
|
const FormSubgridContainer = ({ content, }) => {
|
|
37
37
|
const baseCommandHandleContext = (0, hooks_1.useBaseCommandHandlerContext)();
|
|
38
38
|
const primaryControl = (0, hooks_2.useGridControlContext)();
|
|
39
|
+
const widgetState = (0, mutable_1.useContextSelector)(widget_1.WidgetContext, (state) => state);
|
|
39
40
|
const widgetSetValue = (0, mutable_1.useContextSetValue)(widget_1.WidgetContext);
|
|
40
41
|
const updateStateValue = (0, react_1.useCallback)(
|
|
41
42
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -60,7 +61,7 @@ const FormSubgridContainer = ({ content, }) => {
|
|
|
60
61
|
// backgroundColor: tokens.colorNeutralBackground2,
|
|
61
62
|
// padding: 2,
|
|
62
63
|
overflow: 'hidden',
|
|
63
|
-
}, children: [(0, jsx_runtime_1.jsx)(WidgetTitleBar_1.WidgetTitleBar, { title:
|
|
64
|
+
}, children: [(0, jsx_runtime_1.jsx)(WidgetTitleBar_1.WidgetTitleBar, { title: widgetState.widget.title, commands: transformedCommands }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
64
65
|
// gap: 12,
|
|
65
66
|
flex: 1,
|
|
66
67
|
display: 'flex',
|
|
@@ -2,7 +2,6 @@ import { RetriveRecordFn } from '@headless-adminapp/app/dataform/DataFormProvide
|
|
|
2
2
|
import { SaveRecordFn } from '@headless-adminapp/app/dataform/utils/saveRecord';
|
|
3
3
|
import { EntityMainFormCommandItemExperience, Form } from '@headless-adminapp/core/experience/form';
|
|
4
4
|
import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
5
|
-
import { FC } from 'react';
|
|
6
5
|
interface PageCustomEntityFormProps<SA extends SchemaAttributes = SchemaAttributes> {
|
|
7
6
|
recordId?: string;
|
|
8
7
|
schema: Schema<SA>;
|
|
@@ -11,5 +10,5 @@ interface PageCustomEntityFormProps<SA extends SchemaAttributes = SchemaAttribut
|
|
|
11
10
|
retriveRecordFn?: RetriveRecordFn<SA>;
|
|
12
11
|
saveRecordFn?: SaveRecordFn;
|
|
13
12
|
}
|
|
14
|
-
export declare
|
|
13
|
+
export declare function PageCustomEntityForm<SA extends SchemaAttributes = SchemaAttributes>({ recordId, commands, form, schema, retriveRecordFn, saveRecordFn, }: Readonly<PageCustomEntityFormProps<SA>>): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageCustomEntityForm =
|
|
3
|
+
exports.PageCustomEntityForm = PageCustomEntityForm;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const PageEntityFormProvider_1 = require("@headless-adminapp/app/providers/PageEntityFormProvider");
|
|
7
7
|
const PageEntityFormDesktopContainer_1 = require("./PageEntityFormDesktopContainer");
|
|
8
8
|
const RecordSetNavigatorContainer_1 = require("./RecordSetNavigatorContainer");
|
|
9
|
-
|
|
9
|
+
function PageCustomEntityForm({ recordId, commands, form, schema, retriveRecordFn, saveRecordFn, }) {
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)(PageEntityFormProvider_1.PageEntityFormProvider, { schema: schema, form: form, recordId: recordId, commands: commands, retriveRecordFn: retriveRecordFn, saveRecordFn: saveRecordFn, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
11
11
|
display: 'flex',
|
|
12
12
|
flex: 1,
|
|
@@ -14,5 +14,4 @@ const PageCustomEntityForm = ({ recordId, commands, form, schema, retriveRecordF
|
|
|
14
14
|
backgroundColor: react_components_1.tokens.colorNeutralBackground2,
|
|
15
15
|
overflow: 'hidden',
|
|
16
16
|
}, children: [(0, jsx_runtime_1.jsx)(RecordSetNavigatorContainer_1.RecordSetNavigatorContainer, {}), (0, jsx_runtime_1.jsx)(PageEntityFormDesktopContainer_1.PageEntityFormDesktopContainer, {})] }) }));
|
|
17
|
-
}
|
|
18
|
-
exports.PageCustomEntityForm = PageCustomEntityForm;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/fluent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"uuid": "11.0.3",
|
|
51
51
|
"yup": "^1.4.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "45555f94b55424957cf6a0487c74d6a5f8856795"
|
|
54
54
|
}
|