@headless-adminapp/fluent 1.0.1 → 1.0.2
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.
|
@@ -19,6 +19,16 @@ function TableCellChoice(props) {
|
|
|
19
19
|
}
|
|
20
20
|
return (0, color_1.isColorDark)(bgColor) ? '#FFFFFF' : '#000000';
|
|
21
21
|
}, [bgColor]);
|
|
22
|
+
if (!props.formattedValue) {
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
|
|
24
|
+
textOverflow: 'ellipsis',
|
|
25
|
+
overflow: 'hidden',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
width: props.width,
|
|
28
|
+
minWidth: props.width,
|
|
29
|
+
maxWidth: props.width,
|
|
30
|
+
} }));
|
|
31
|
+
}
|
|
22
32
|
return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
|
|
23
33
|
textOverflow: 'ellipsis',
|
|
24
34
|
overflow: 'hidden',
|
|
@@ -27,8 +37,8 @@ function TableCellChoice(props) {
|
|
|
27
37
|
minWidth: props.width,
|
|
28
38
|
maxWidth: props.width,
|
|
29
39
|
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Badge, { style: {
|
|
30
|
-
backgroundColor: bgColor,
|
|
31
|
-
color,
|
|
40
|
+
backgroundColor: bgColor ?? react_components_1.tokens.colorNeutralBackground3,
|
|
41
|
+
color: color ?? react_components_1.tokens.colorNeutralForeground2,
|
|
32
42
|
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
33
43
|
}, children: props.formattedValue }) }));
|
|
34
44
|
}
|
|
@@ -5,13 +5,14 @@ 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
|
+
const RecordSetNavigatorContainer_1 = require("./RecordSetNavigatorContainer");
|
|
8
9
|
const PageCustomEntityForm = ({ recordId, commands, form, schema, retriveRecordFn, saveRecordFn, }) => {
|
|
9
|
-
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.
|
|
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: {
|
|
10
11
|
display: 'flex',
|
|
11
12
|
flex: 1,
|
|
12
13
|
flexDirection: 'row',
|
|
13
14
|
backgroundColor: react_components_1.tokens.colorNeutralBackground2,
|
|
14
15
|
overflow: 'hidden',
|
|
15
|
-
}, children: (0, jsx_runtime_1.jsx)(PageEntityFormDesktopContainer_1.PageEntityFormDesktopContainer, {}) }) }));
|
|
16
|
+
}, children: [(0, jsx_runtime_1.jsx)(RecordSetNavigatorContainer_1.RecordSetNavigatorContainer, {}), (0, jsx_runtime_1.jsx)(PageEntityFormDesktopContainer_1.PageEntityFormDesktopContainer, {})] }) }));
|
|
16
17
|
};
|
|
17
18
|
exports.PageCustomEntityForm = PageCustomEntityForm;
|
|
@@ -56,8 +56,11 @@ const RecordAvatar = () => {
|
|
|
56
56
|
hideProgressIndicator();
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
+
const experienceSchema = schemaMetadataDic[schema.logicalName];
|
|
60
|
+
if (!experienceSchema) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
59
63
|
if (isPlaceholder && !value) {
|
|
60
|
-
const experienceSchema = schemaMetadataDic[schema.logicalName];
|
|
61
64
|
const Icon = experienceSchema.icon ?? icons_1.Icons.Entity ?? icons_1.IconPlaceholder;
|
|
62
65
|
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
63
66
|
display: 'flex',
|
|
@@ -79,8 +79,9 @@ function SectionContainer({ section }) {
|
|
|
79
79
|
control.label ??
|
|
80
80
|
attribute.label;
|
|
81
81
|
return ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: label, labelPosition: section.labelPosition, required: required, isError: isError, errorMessage: errorMessage, children: (0, jsx_runtime_1.jsx)(Control, { attribute: attribute, name: control.attributeName, value: field.value, onChange: (value) => {
|
|
82
|
+
const previousValue = field.value;
|
|
82
83
|
field.onChange(value);
|
|
83
|
-
eventManager.emit(constants_1.EVENT_KEY_ON_FIELD_CHANGE, control.attributeName, value);
|
|
84
|
+
eventManager.emit(constants_1.EVENT_KEY_ON_FIELD_CHANGE, control.attributeName, value, previousValue);
|
|
84
85
|
}, onBlur: field.onBlur, errorMessage: errorMessage, isError: isError, readOnly: disabled, label: label, placeholder: label, allowNavigation: true, allowNewRecord: true, fileServiceContext: {
|
|
85
86
|
type: 'entity-form',
|
|
86
87
|
recordId,
|
|
@@ -48,6 +48,8 @@ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
48
48
|
.tz(timezone)
|
|
49
49
|
.set('hour', (0, dayjs_1.default)(value).tz(timezone).hour())
|
|
50
50
|
.set('minute', (0, dayjs_1.default)(value).tz(timezone).minute())
|
|
51
|
+
.set('second', 0)
|
|
52
|
+
.set('millisecond', 0)
|
|
51
53
|
.toISOString());
|
|
52
54
|
}
|
|
53
55
|
},
|
|
@@ -78,6 +80,8 @@ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
78
80
|
onChange?.(dateValue
|
|
79
81
|
.set('hour', (0, dayjs_1.default)(data.selectedTime).tz(timezone, true).hour())
|
|
80
82
|
.set('minute', (0, dayjs_1.default)(data.selectedTime).tz(timezone, true).minute())
|
|
83
|
+
.set('second', 0)
|
|
84
|
+
.set('millisecond', 0)
|
|
81
85
|
.toISOString());
|
|
82
86
|
}
|
|
83
87
|
else if (data.selectedTimeText) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/fluent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,19 +20,21 @@
|
|
|
20
20
|
"keywords": [],
|
|
21
21
|
"author": "",
|
|
22
22
|
"license": "ISC",
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@fluentui/react-calendar-compat": "^0.1.20",
|
|
25
|
+
"@fluentui/react-components": "^9.54.4",
|
|
26
|
+
"@fluentui/react-datepicker-compat": "^0.4.43",
|
|
27
|
+
"@fluentui/react-nav-preview": "^0.5.1",
|
|
28
|
+
"@fluentui/react-timepicker-compat": "^0.2.46",
|
|
29
|
+
"@tanstack/react-query": "^5.51.1"
|
|
30
|
+
},
|
|
23
31
|
"dependencies": {
|
|
24
|
-
"@fluentui/react-calendar-compat": "0.1.20",
|
|
25
|
-
"@fluentui/react-components": "9.54.4",
|
|
26
|
-
"@fluentui/react-datepicker-compat": "0.4.43",
|
|
27
|
-
"@fluentui/react-nav-preview": "0.5.1",
|
|
28
|
-
"@fluentui/react-timepicker-compat": "0.2.46",
|
|
29
32
|
"@fullcalendar/core": "6.1.15",
|
|
30
33
|
"@fullcalendar/daygrid": "6.1.15",
|
|
31
34
|
"@fullcalendar/interaction": "6.1.15",
|
|
32
35
|
"@fullcalendar/react": "6.1.15",
|
|
33
36
|
"@fullcalendar/timegrid": "6.1.15",
|
|
34
37
|
"@hookform/resolvers": "^3.9.0",
|
|
35
|
-
"@tanstack/react-query": "5.51.1",
|
|
36
38
|
"@tanstack/react-table": "^8.20.1",
|
|
37
39
|
"@tanstack/react-virtual": "^3.8.6",
|
|
38
40
|
"dayjs": "^1.11.13",
|
|
@@ -48,5 +50,5 @@
|
|
|
48
50
|
"uuid": "11.0.3",
|
|
49
51
|
"yup": "^1.4.0"
|
|
50
52
|
},
|
|
51
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "fc167255beb567e4557fa7024f8db669db8aaa33"
|
|
52
54
|
}
|