@headless-adminapp/fluent 1.4.24 → 1.4.26
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/App/AppHeaderContianer.js +33 -16
- package/App/LayoutProvider.d.ts +2 -1
- package/App/LayoutProvider.js +3 -2
- package/App/Navigation/NavCategoryItemComponent.js +4 -1
- package/App/Navigation/NavItemComponent.js +4 -1
- package/App/Navigation/NavMiniCategoryMenu.js +3 -2
- package/App/QuickActionItem.js +5 -4
- package/CommandBar/Button.js +2 -3
- package/CommandBar/IconButton.js +2 -1
- package/CommandBar/Label.js +2 -2
- package/CommandBar/MenuButton.js +5 -2
- package/CommandBar/MenuItem.js +3 -2
- package/CommandBar/MenuList.js +2 -1
- package/CommandBar/Wrapper.js +1 -0
- package/DataGrid/CustomFilter/ColumnFilterItem.js +4 -2
- package/DataGrid/CustomFilter/CustomFilter.js +2 -1
- package/DataGrid/CustomizeColumns/AddColumns.js +5 -5
- package/DataGrid/CustomizeColumns/ColumnItem.js +4 -3
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +4 -3
- package/DataGrid/FormSubgridViewSelector.js +3 -2
- package/DataGrid/GridColumnHeader/FilterForm.js +2 -1
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +4 -3
- package/DataGrid/GridHeaderDesktop.js +3 -2
- package/DataGrid/GridHeaderDesktopV2.js +8 -7
- package/DataGrid/GridHeaderMobile.js +3 -2
- package/DataGrid/GridListContainer.js +6 -5
- package/DataGrid/MobileHeaderTitleContainer.js +3 -2
- package/DataGrid/TableCell/TableCellAction.js +3 -2
- package/DataGrid/TableCell/TableCellCheckbox.js +2 -1
- package/DataGrid/useTableColumns.js +10 -1
- package/DialogContainer/AlertDialog.js +2 -1
- package/DialogContainer/ConfirmDialog.js +3 -2
- package/DialogContainer/ErrorDialog.js +3 -2
- package/DialogContainer/PromptDialog.js +4 -3
- package/Header/MobileHeaderCommandContainer.js +11 -10
- package/Header/MobileHeaderQuickActionButton.js +2 -2
- package/Insights/Header.js +7 -2
- package/Insights/InsightsContainer.js +22 -20
- package/Insights/WidgetDataGridContainer.js +8 -5
- package/Insights/WidgetSection.js +2 -1
- package/Insights/WidgetTileContainer.js +2 -1
- package/OverflowCommandBar/OverflowMenu.js +2 -1
- package/PageBoard/BoardColumnCard.js +2 -1
- package/PageBoard/BoardColumnUI.js +3 -2
- package/PageBoard/BoardingColumnCardLoading.js +2 -1
- package/PageBoard/Header.js +2 -1
- package/PageBoard/PageBoard.js +2 -1
- package/PageCalendar/CalendarSection.js +3 -2
- package/PageCalendar/EventDialog/EventDialog.js +2 -1
- package/PageCalendar/EventDialog/EventFormBody.js +3 -2
- package/PageCalendar/Header.js +4 -2
- package/PageCalendar/TitleSelector.js +3 -2
- package/PageCalendar/ViewSelector.js +2 -1
- package/PageCalendar/renderEventContent.js +5 -4
- package/PageEntityForm/EditableGridControl/CardUi.js +4 -4
- package/PageEntityForm/EditableGridControl/EditableGridControl.js +2 -1
- package/PageEntityForm/EditableGridControl/TableUi.js +3 -2
- package/PageEntityForm/FormTabRelated.js +2 -1
- package/PageEntityForm/PageCustomEntityForm.js +2 -0
- package/PageEntityForm/PageEntityFormDesktopContainer.js +8 -4
- package/PageEntityForm/RecordSetNavigatorContainer.js +2 -1
- package/PageEntityForm/RelatedViewSelector.js +2 -2
- package/PageEntityForm/TabContainer.js +5 -1
- package/PageEntityForm/UploadImageDialog.js +6 -5
- package/PageEntityView/FormSubgridContainer.js +3 -2
- package/PageEntityView/PageEntityViewDesktopFrame.js +3 -2
- package/PageEntityView/PageEntityViewDesktopFrameV2.js +2 -1
- package/PageEntityView/PageEntityViewMobileFrame.js +2 -1
- package/ProgressIndicatorContainer/index.js +2 -1
- package/QuickCreateContainer/FormContainer.js +2 -1
- package/components/ComponentErrorBoundary.d.ts +1 -1
- package/components/DialogLogin.js +2 -1
- package/components/DrawerHeader.js +3 -2
- package/components/LoginForm.js +2 -1
- package/components/PageBroken.js +2 -1
- package/components/PageLogin.js +2 -1
- package/components/fluent/Button.d.ts +4 -0
- package/components/fluent/Button.js +38 -0
- package/components/fluent/Checkbox.d.ts +4 -0
- package/components/fluent/Checkbox.js +18 -0
- package/components/fluent/Combobox.d.ts +4 -0
- package/components/fluent/Combobox.js +22 -0
- package/components/fluent/DialogSurface.d.ts +4 -0
- package/components/fluent/DialogSurface.js +16 -0
- package/components/fluent/Dropdown.d.ts +4 -0
- package/components/fluent/Dropdown.js +43 -0
- package/components/fluent/FluentProvider.d.ts +12 -0
- package/components/fluent/FluentProvider.js +179 -0
- package/components/fluent/Input.d.ts +4 -0
- package/components/fluent/Input.js +43 -0
- package/components/fluent/MenuItem.d.ts +4 -0
- package/components/fluent/MenuItem.js +17 -0
- package/components/fluent/MenuPopover.d.ts +4 -0
- package/components/fluent/MenuPopover.js +17 -0
- package/components/fluent/Option.d.ts +4 -0
- package/components/fluent/Option.js +17 -0
- package/components/fluent/PopoverSurface.d.ts +4 -0
- package/components/fluent/PopoverSurface.js +16 -0
- package/components/fluent/SearchBox.d.ts +4 -0
- package/components/fluent/SearchBox.js +42 -0
- package/components/fluent/SpinButton.d.ts +4 -0
- package/components/fluent/SpinButton.js +17 -0
- package/components/fluent/Tag.d.ts +4 -0
- package/components/fluent/Tag.js +16 -0
- package/components/fluent/Textarea.d.ts +4 -0
- package/components/fluent/Textarea.js +30 -0
- package/components/fluent/ToolbarButton.d.ts +6 -0
- package/components/fluent/ToolbarButton.js +22 -0
- package/components/fluent/index.d.ts +17 -0
- package/components/fluent/index.js +38 -0
- package/components/fluent/tokens.d.ts +29 -0
- package/components/fluent/tokens.js +32 -0
- package/form/controls/AttachmentControl.js +9 -8
- package/form/controls/AttachmentsControl.js +6 -2
- package/form/controls/CurrencyControl.js +2 -2
- package/form/controls/DateControl.js +7 -0
- package/form/controls/DateRangeControl/DateRangeControl.js +3 -2
- package/form/controls/DateRangeControl/PopoverContent.js +3 -2
- package/form/controls/DateTimeControl.js +17 -2
- package/form/controls/DecimalControl.js +2 -2
- package/form/controls/DurationControl.js +8 -2
- package/form/controls/EmailControl.js +3 -2
- package/form/controls/IntegerControl.js +2 -2
- package/form/controls/LookupControl.js +10 -4
- package/form/controls/MultiSelectControl.js +11 -2
- package/form/controls/MultiSelectLookupControl.js +12 -5
- package/form/controls/PasswordControl.js +6 -2
- package/form/controls/RegardingControl.js +7 -5
- package/form/controls/SelectControl.js +12 -2
- package/form/controls/SkeletonControl.js +6 -1
- package/form/controls/TelephoneControl.js +3 -2
- package/form/controls/TextAreaControl.js +2 -2
- package/form/controls/TextControl.js +6 -5
- package/form/controls/TimeControl/TimeControl.js +8 -1
- package/form/controls/UrlControl.js +3 -2
- package/form/layout/FormSection/FormSection.js +2 -2
- package/package.json +2 -2
- package/styles.css +1 -5
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const DndProvider_1 = require("../components/DndProvider");
|
|
8
|
+
const fluent_1 = require("../components/fluent");
|
|
8
9
|
function BoardColumnCard({ record, canDrag, columnId, PreviewComponent, schema, }) {
|
|
9
10
|
const ref = (0, react_1.useRef)(null);
|
|
10
11
|
const { useDrag } = (0, DndProvider_1.useDndContext)();
|
|
@@ -22,7 +23,7 @@ function BoardColumnCard({ record, canDrag, columnId, PreviewComponent, schema,
|
|
|
22
23
|
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: {
|
|
23
24
|
display: 'flex',
|
|
24
25
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
25
|
-
borderRadius:
|
|
26
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
26
27
|
boxShadow: react_components_1.tokens.shadow4,
|
|
27
28
|
opacity: isDragging ? 0.5 : 1,
|
|
28
29
|
}, children: (0, jsx_runtime_1.jsx)(PreviewComponent, { record: record }) }));
|
|
@@ -11,6 +11,7 @@ const context_2 = require("@headless-adminapp/app/mutable/context");
|
|
|
11
11
|
const icons_1 = require("@headless-adminapp/icons");
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
const DndProvider_1 = require("../components/DndProvider");
|
|
14
|
+
const fluent_1 = require("../components/fluent");
|
|
14
15
|
const BoardColumnCard_1 = require("./BoardColumnCard");
|
|
15
16
|
const BoardingColumnCardLoading_1 = require("./BoardingColumnCardLoading");
|
|
16
17
|
const BoardColumnUI = () => {
|
|
@@ -53,7 +54,7 @@ const BoardColumnUI = () => {
|
|
|
53
54
|
display: 'flex',
|
|
54
55
|
flexDirection: 'column',
|
|
55
56
|
flex: 1,
|
|
56
|
-
borderRadius:
|
|
57
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
57
58
|
outline: over
|
|
58
59
|
? `2px dashed ${react_components_1.tokens.colorBrandBackground}`
|
|
59
60
|
: canDrop
|
|
@@ -76,7 +77,7 @@ const BoardColumnUI = () => {
|
|
|
76
77
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
77
78
|
color: react_components_1.tokens.colorNeutralForeground3,
|
|
78
79
|
padding: react_components_1.tokens.spacingVerticalXXXL,
|
|
79
|
-
borderRadius:
|
|
80
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
80
81
|
backgroundColor: react_components_1.tokens.colorNeutralBackground1,
|
|
81
82
|
}, children: [(0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 56, opacity: 0.8 }), (0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { textAlign: 'center' }, children: emptyMessage })] }) })), !isEmpty && ((0, jsx_runtime_1.jsx)(ScrollbarWithMoreDataRequest_1.ScrollbarWithMoreDataRequest, { data: data?.records, hasMore: dataState?.hasNextPage, onRequestMore: () => {
|
|
82
83
|
fetchNextPage();
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BoardingColumnCardLoading = BoardingColumnCardLoading;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const fluent_1 = require("../components/fluent");
|
|
6
7
|
function BoardingColumnCardLoading() {
|
|
7
8
|
return ((0, jsx_runtime_1.jsxs)(react_components_1.Skeleton, { style: {
|
|
8
9
|
backgroundColor: react_components_1.tokens.colorNeutralBackground1,
|
|
9
|
-
borderRadius:
|
|
10
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
10
11
|
padding: react_components_1.tokens.spacingHorizontalM,
|
|
11
12
|
display: 'flex',
|
|
12
13
|
flexDirection: 'column',
|
package/PageBoard/Header.js
CHANGED
|
@@ -8,6 +8,7 @@ const hooks_2 = require("@headless-adminapp/app/hooks");
|
|
|
8
8
|
const icons_1 = require("@headless-adminapp/icons");
|
|
9
9
|
const react_query_1 = require("@tanstack/react-query");
|
|
10
10
|
const AppStringContext_1 = require("../App/AppStringContext");
|
|
11
|
+
const fluent_1 = require("../components/fluent");
|
|
11
12
|
const HeaderQuickFilter_1 = require("./HeaderQuickFilter");
|
|
12
13
|
const Header = ({ title, subtitle }) => {
|
|
13
14
|
const client = (0, react_query_1.useQueryClient)();
|
|
@@ -33,6 +34,6 @@ const Header = ({ title, subtitle }) => {
|
|
|
33
34
|
display: 'flex',
|
|
34
35
|
alignItems: 'center',
|
|
35
36
|
gap: react_components_1.tokens.spacingHorizontalS,
|
|
36
|
-
}, children: [(0, jsx_runtime_1.jsx)(
|
|
37
|
+
}, children: [(0, jsx_runtime_1.jsx)(fluent_1.SearchBox, { appearance: "filled-darker", placeholder: appStrings.searchPlaceholder, value: searchText, onChange: (e, data) => setSearchText(data.value) }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Refresh, { size: 20 }), onClick: refresh })] })] }), (0, jsx_runtime_1.jsx)(HeaderQuickFilter_1.HeaderQuickFilter, {})] }));
|
|
37
38
|
};
|
|
38
39
|
exports.Header = Header;
|
package/PageBoard/PageBoard.js
CHANGED
|
@@ -8,6 +8,7 @@ const ScrollView_1 = require("@headless-adminapp/app/components/ScrollView");
|
|
|
8
8
|
const context_2 = require("@headless-adminapp/app/mutable/context");
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const DndProvider_1 = require("../components/DndProvider");
|
|
11
|
+
const fluent_1 = require("../components/fluent");
|
|
11
12
|
const BoardColumn_1 = require("./BoardColumn");
|
|
12
13
|
const Header_1 = require("./Header");
|
|
13
14
|
function PageBoard(props) {
|
|
@@ -34,7 +35,7 @@ function PageBoard(props) {
|
|
|
34
35
|
display: 'flex',
|
|
35
36
|
flexDirection: 'column',
|
|
36
37
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
37
|
-
borderRadius:
|
|
38
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
38
39
|
paddingBlock: react_components_1.tokens.spacingVerticalM,
|
|
39
40
|
paddingInline: react_components_1.tokens.spacingHorizontalM,
|
|
40
41
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
@@ -20,6 +20,7 @@ const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
|
20
20
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
21
21
|
const react_2 = require("react");
|
|
22
22
|
const BodyLoading_1 = require("../components/BodyLoading");
|
|
23
|
+
const fluent_1 = require("../components/fluent");
|
|
23
24
|
const renderEventContent_1 = require("./renderEventContent");
|
|
24
25
|
const TitleSelector_1 = require("./TitleSelector");
|
|
25
26
|
const types_1 = require("./types");
|
|
@@ -99,14 +100,14 @@ const CalendarSection = ({ startDate, endDate, viewType, onRangeChange, events,
|
|
|
99
100
|
position: 'relative',
|
|
100
101
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
101
102
|
padding: react_components_1.tokens.spacingHorizontalL,
|
|
102
|
-
borderRadius:
|
|
103
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
103
104
|
boxShadow: react_components_1.tokens.shadow2,
|
|
104
105
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
105
106
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
106
107
|
display: 'flex',
|
|
107
108
|
gap: react_components_1.tokens.spacingHorizontalS,
|
|
108
109
|
flexDirection: isMobile ? 'column' : 'row',
|
|
109
|
-
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1, display: 'flex', gap: react_components_1.tokens.spacingHorizontalS }, children: [(0, jsx_runtime_1.jsx)(
|
|
110
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1, display: 'flex', gap: react_components_1.tokens.spacingHorizontalS }, children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "outline", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Calendar, {}), onClick: () => calendarRef.current?.getApi().today(), disabled: isToday, children: "Today" }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronLeft, {}), onClick: () => calendarRef.current?.getApi().prev() }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronRight, {}), onClick: () => calendarRef.current?.getApi().next() }), isMobile && ((0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: 'flex', justifyContent: 'flex-end' }, children: (0, jsx_runtime_1.jsx)(TitleSelector_1.TitleSelector, { start: startDate, end: endDate, onChange: (start) => {
|
|
110
111
|
const api = calendarRef.current?.getApi();
|
|
111
112
|
if (!api) {
|
|
112
113
|
return;
|
|
@@ -6,6 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const react_components_1 = require("@fluentui/react-components");
|
|
7
7
|
const baseEventAttributes_1 = require("@headless-adminapp/app/calendar/baseEventAttributes");
|
|
8
8
|
const utils_1 = require("@headless-adminapp/core/schema/utils");
|
|
9
|
+
const fluent_1 = require("../../components/fluent");
|
|
9
10
|
const EventFormBody_1 = require("./EventFormBody");
|
|
10
11
|
function defineEventAttributes(beforeDescriptionAttributes, afterDescriptionAttributes) {
|
|
11
12
|
return (0, utils_1.defineSchemaAttributes)({
|
|
@@ -17,5 +18,5 @@ function defineEventAttributes(beforeDescriptionAttributes, afterDescriptionAttr
|
|
|
17
18
|
function EventDialog(props) {
|
|
18
19
|
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.isOpen, onOpenChange: () => {
|
|
19
20
|
props.onDismiss?.();
|
|
20
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
21
|
+
}, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsx)(EventFormBody_1.EventFormBody, { values: props.values, config: props.config, onCancel: props.onCancel, onSubmit: props.onSubmit }) }) }));
|
|
21
22
|
}
|
|
@@ -12,6 +12,7 @@ const react_query_1 = require("@tanstack/react-query");
|
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
const react_hook_form_1 = require("react-hook-form");
|
|
14
14
|
const BodyLoading_1 = require("../../components/BodyLoading");
|
|
15
|
+
const fluent_1 = require("../../components/fluent");
|
|
15
16
|
const EventFormContent_1 = require("./EventFormContent");
|
|
16
17
|
function EventFormBody(props) {
|
|
17
18
|
const { language, region } = (0, locale_1.useLocale)();
|
|
@@ -58,7 +59,7 @@ function EventFormBody(props) {
|
|
|
58
59
|
if (props.values.id) {
|
|
59
60
|
title = props.config.eventLabel;
|
|
60
61
|
}
|
|
61
|
-
return ((0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(EventFormContent_1.EventFormContent, { form: form, afterDescriptionAttributes: props.config.afterDescriptionAttributes, beforeDescriptionAttributes: props.config.beforeDescriptionAttributes, config: props.config }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(EventFormContent_1.EventFormContent, { form: form, afterDescriptionAttributes: props.config.afterDescriptionAttributes, beforeDescriptionAttributes: props.config.beforeDescriptionAttributes, config: props.config }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", disabled: form.formState.submitCount > 0 && !form.formState.isValid, onClick: async () => {
|
|
62
63
|
await form.handleSubmit(async (values) => {
|
|
63
64
|
await props.onSubmit?.({
|
|
64
65
|
modifiedValues: values.id
|
|
@@ -67,7 +68,7 @@ function EventFormBody(props) {
|
|
|
67
68
|
values,
|
|
68
69
|
});
|
|
69
70
|
})();
|
|
70
|
-
}, children: props.values.id ? 'Save' : 'Create' }), (0, jsx_runtime_1.jsx)(
|
|
71
|
+
}, children: props.values.id ? 'Save' : 'Create' }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "secondary", type: "button", onClick: () => {
|
|
71
72
|
props.onCancel?.();
|
|
72
73
|
}, children: props.values.id ? 'Close' : 'Cancel' })] }), (0, jsx_runtime_1.jsx)(BodyLoading_1.BodyLoading, { loading: isPending })] }));
|
|
73
74
|
}
|
package/PageCalendar/Header.js
CHANGED
|
@@ -8,6 +8,8 @@ const icons_1 = require("@headless-adminapp/icons");
|
|
|
8
8
|
const react_query_1 = require("@tanstack/react-query");
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const react_hook_form_1 = require("react-hook-form");
|
|
11
|
+
const fluent_1 = require("../components/fluent");
|
|
12
|
+
const Button_1 = require("../components/fluent/Button");
|
|
11
13
|
const StandardControl_1 = require("../PageEntityForm/StandardControl");
|
|
12
14
|
function Header({ filterForm, onCreateButtonClick, }) {
|
|
13
15
|
const config = (0, useConfig_1.useConfig)();
|
|
@@ -16,7 +18,7 @@ function Header({ filterForm, onCreateButtonClick, }) {
|
|
|
16
18
|
display: 'flex',
|
|
17
19
|
flexDirection: 'column',
|
|
18
20
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
19
|
-
borderRadius:
|
|
21
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
20
22
|
paddingBlock: react_components_1.tokens.spacingVerticalS,
|
|
21
23
|
paddingInline: react_components_1.tokens.spacingHorizontalM,
|
|
22
24
|
gap: react_components_1.tokens.spacingVerticalS,
|
|
@@ -29,7 +31,7 @@ function Header({ filterForm, onCreateButtonClick, }) {
|
|
|
29
31
|
display: 'flex',
|
|
30
32
|
alignItems: 'center',
|
|
31
33
|
gap: react_components_1.tokens.spacingHorizontalS,
|
|
32
|
-
}, children: [!!config.createOptions && ((0, jsx_runtime_1.jsx)(
|
|
34
|
+
}, children: [!!config.createOptions && ((0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, {}), appearance: "primary", onClick: onCreateButtonClick, children: "Create" })), (0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Refresh, {}), appearance: "subtle", onClick: async () => {
|
|
33
35
|
await queryClient.invalidateQueries({
|
|
34
36
|
queryKey: ['calendar-events', 'list'],
|
|
35
37
|
});
|
|
@@ -15,6 +15,7 @@ const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
|
|
|
15
15
|
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
16
16
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
17
17
|
const react_1 = require("react");
|
|
18
|
+
const fluent_1 = require("../components/fluent");
|
|
18
19
|
const types_1 = require("./types");
|
|
19
20
|
dayjs_1.default.extend(utc_1.default);
|
|
20
21
|
dayjs_1.default.extend(timezone_1.default);
|
|
@@ -52,10 +53,10 @@ const TitleSelector = ({ start, end, onChange, viewType, }) => {
|
|
|
52
53
|
if (!start || !end) {
|
|
53
54
|
return null;
|
|
54
55
|
}
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)(react_components_1.Popover, { positioning: "below", children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.Popover, { positioning: "below", children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", style: {
|
|
56
57
|
fontWeight: react_components_1.tokens.fontWeightMedium,
|
|
57
58
|
fontSize: react_components_1.tokens.fontSizeBase400,
|
|
58
|
-
}, icon: (0, jsx_runtime_1.jsx)(icons_fluent_1.iconSet.ChevronDown, { size: 16 }), iconPosition: "after", children: label }) }), (0, jsx_runtime_1.jsxs)(
|
|
59
|
+
}, icon: (0, jsx_runtime_1.jsx)(icons_fluent_1.iconSet.ChevronDown, { size: 16 }), iconPosition: "after", children: label }) }), (0, jsx_runtime_1.jsxs)(fluent_1.PopoverSurface, { tabIndex: -1, style: { padding: 0 }, children: [viewType === types_1.ViewType.Month && ((0, jsx_runtime_1.jsx)(react_calendar_compat_1.Calendar, { dateRangeType: react_calendar_compat_1.DateRangeType.Month, highlightSelectedMonth: true, isDayPickerVisible: false, value: start ? (0, dayjs_1.default)(start).toDate() : new Date(), onSelectDate: (date) => {
|
|
59
60
|
const start = (0, dayjs_1.default)(date)
|
|
60
61
|
.tz(timezone, true)
|
|
61
62
|
.startOf('month')
|
|
@@ -4,6 +4,7 @@ exports.ViewSelector = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
+
const fluent_1 = require("../components/fluent");
|
|
7
8
|
const types_1 = require("./types");
|
|
8
9
|
const viewItems = [
|
|
9
10
|
{
|
|
@@ -44,7 +45,7 @@ const ViewSelector = ({ viewType, onChange }) => {
|
|
|
44
45
|
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
45
46
|
display: 'inline-flex',
|
|
46
47
|
overflow: 'hidden',
|
|
47
|
-
}, className: styles.root, children: viewItems.map((item) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(
|
|
48
|
+
}, className: styles.root, children: viewItems.map((item) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { className: (0, react_components_1.mergeClasses)(styles.button, item.value === viewType && styles.active), appearance: item.value === viewType ? 'primary' : 'secondary', onClick: () => onChange(item.value), style: {
|
|
48
49
|
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
49
50
|
minWidth: 60,
|
|
50
51
|
}, children: item.label }, item.value) }, item.value))) }));
|
|
@@ -17,6 +17,7 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
17
17
|
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
18
18
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
19
19
|
const react_1 = require("react");
|
|
20
|
+
const fluent_1 = require("../components/fluent");
|
|
20
21
|
const EventDialog_1 = require("./EventDialog/EventDialog");
|
|
21
22
|
dayjs_1.default.extend(utc_1.default);
|
|
22
23
|
dayjs_1.default.extend(timezone_1.default);
|
|
@@ -28,7 +29,7 @@ const EventItemPreviewComponent = ({ eventInfo, }) => {
|
|
|
28
29
|
display: 'flex',
|
|
29
30
|
backgroundColor: react_components_1.tokens.colorBrandBackground2,
|
|
30
31
|
color: react_components_1.tokens.colorNeutralForeground1,
|
|
31
|
-
borderRadius:
|
|
32
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
32
33
|
paddingBlock: react_components_1.tokens.spacingVerticalXXS,
|
|
33
34
|
paddingInline: react_components_1.tokens.spacingHorizontalS,
|
|
34
35
|
border: `1px solid ${react_components_1.tokens.colorBrandStroke2}`,
|
|
@@ -48,7 +49,7 @@ const EventContent = ({ eventInfo }) => {
|
|
|
48
49
|
// coverTarget: true,
|
|
49
50
|
position: 'after',
|
|
50
51
|
shiftToCoverTarget: true,
|
|
51
|
-
}, withArrow: true, open: open, onOpenChange: (e, data) => setOpen(data.open), children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', height: '100%' }, children: (0, jsx_runtime_1.jsx)(EventItemPreview, { eventInfo: eventInfo }) }) }), (0, jsx_runtime_1.jsx)(
|
|
52
|
+
}, withArrow: true, open: open, onOpenChange: (e, data) => setOpen(data.open), children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', height: '100%' }, children: (0, jsx_runtime_1.jsx)(EventItemPreview, { eventInfo: eventInfo }) }) }), (0, jsx_runtime_1.jsx)(fluent_1.PopoverSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsx)(PopoverContent, { eventInfo: eventInfo, onClose: () => setOpen(false) }) })] }));
|
|
52
53
|
};
|
|
53
54
|
const PopoverContent = ({ eventInfo, onClose }) => {
|
|
54
55
|
const config = (0, useConfig_1.useConfig)();
|
|
@@ -97,10 +98,10 @@ const PopoverContent = ({ eventInfo, onClose }) => {
|
|
|
97
98
|
flexDirection: 'row',
|
|
98
99
|
alignItems: 'center',
|
|
99
100
|
gap: react_components_1.tokens.spacingHorizontalS,
|
|
100
|
-
}, children: [!!config.deleteEvent && ((0, jsx_runtime_1.jsx)(
|
|
101
|
+
}, children: [!!config.deleteEvent && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, { size: 16 }), appearance: "subtle", onClick: async () => {
|
|
101
102
|
onClose();
|
|
102
103
|
await deleteEvent(eventInfo.event.id);
|
|
103
|
-
} })), !!config.editOptions && ((0, jsx_runtime_1.jsx)(
|
|
104
|
+
} })), !!config.editOptions && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Edit, { size: 16 }), appearance: "subtle", onClick: handleEdit })), (0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, { size: 16 }), appearance: "subtle", onClick: onClose })] })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.5 } }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
104
105
|
paddingTop: react_components_1.tokens.spacingVerticalM,
|
|
105
106
|
display: 'flex',
|
|
106
107
|
flexDirection: 'column',
|
|
@@ -9,6 +9,7 @@ const hooks_1 = require("@headless-adminapp/app/hooks");
|
|
|
9
9
|
const useCalculatedAttributeStore_1 = require("@headless-adminapp/app/metadata/hooks/useCalculatedAttributeStore");
|
|
10
10
|
const icons_1 = require("@headless-adminapp/icons");
|
|
11
11
|
const react_hook_form_1 = require("react-hook-form");
|
|
12
|
+
const fluent_1 = require("../../components/fluent");
|
|
12
13
|
const SectionControl_1 = require("../../DataForm/SectionControl");
|
|
13
14
|
const StandardControl_1 = require("../StandardControl");
|
|
14
15
|
const CardUi = ({ schema, control, formControl, onAddRow, onRemoveRow, rows, alias, readOnly, }) => {
|
|
@@ -32,7 +33,7 @@ const CardUi = ({ schema, control, formControl, onAddRow, onRemoveRow, rows, ali
|
|
|
32
33
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
33
34
|
}, children: [rows.map((item, index) => ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
34
35
|
boxShadow: react_components_1.tokens.shadow4,
|
|
35
|
-
borderRadius:
|
|
36
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
36
37
|
padding: react_components_1.tokens.spacingVerticalM,
|
|
37
38
|
position: 'relative',
|
|
38
39
|
display: 'flex',
|
|
@@ -67,12 +68,11 @@ const CardUi = ({ schema, control, formControl, onAddRow, onRemoveRow, rows, ali
|
|
|
67
68
|
eventManager.emit(constants_1.EVENT_KEY_ON_FIELD_CHANGE, field.name, value, previousValue);
|
|
68
69
|
}, onBlur: field.onBlur, placeholder: "" }) }));
|
|
69
70
|
} }) }, attributeName));
|
|
70
|
-
}) }), (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }), !readOnly && ((0, jsx_runtime_1.jsx)(
|
|
71
|
-
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
71
|
+
}) }), (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }), !readOnly && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, { size: 16 }), appearance: "primary", onClick: () => onRemoveRow?.(index), style: {
|
|
72
72
|
alignSelf: 'flex-start',
|
|
73
73
|
color: react_components_1.tokens.colorStatusDangerForeground1,
|
|
74
74
|
backgroundColor: react_components_1.tokens.colorStatusDangerBackground1,
|
|
75
75
|
minWidth: 0,
|
|
76
|
-
}, size: "small", children: "Remove" }))] }, item.__key))), !readOnly && ((0, jsx_runtime_1.jsx)(
|
|
76
|
+
}, size: "small", children: "Remove" }))] }, item.__key))), !readOnly && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, { size: 16 }), appearance: "primary", onClick: onAddRow, style: { alignSelf: 'flex-start', minWidth: 0 }, size: "small", children: "Add" }))] }));
|
|
77
77
|
};
|
|
78
78
|
exports.CardUi = CardUi;
|
|
@@ -17,6 +17,7 @@ const react_query_1 = require("@tanstack/react-query");
|
|
|
17
17
|
const react_1 = require("react");
|
|
18
18
|
const react_hook_form_1 = require("react-hook-form");
|
|
19
19
|
const BodyLoading_1 = require("../../components/BodyLoading");
|
|
20
|
+
const fluent_1 = require("../../components/fluent");
|
|
20
21
|
const CardUi_1 = require("./CardUi");
|
|
21
22
|
const TableUi_1 = require("./TableUi");
|
|
22
23
|
function EditableGridControl({ readOnly, control, }) {
|
|
@@ -131,7 +132,7 @@ function EditableGridControl({ readOnly, control, }) {
|
|
|
131
132
|
paddingBlock: 8,
|
|
132
133
|
height: 40,
|
|
133
134
|
alignItems: 'center',
|
|
134
|
-
}, children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', width: '100%' }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: control.label }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } }), (0, jsx_runtime_1.jsx)("div", { style: { marginRight: -12 }, children: !control.alias && !readOnly && ((0, jsx_runtime_1.jsx)(
|
|
135
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', width: '100%' }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: control.label }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } }), (0, jsx_runtime_1.jsx)("div", { style: { marginRight: -12 }, children: !control.alias && !readOnly && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Save, {}), appearance: "subtle", style: { minWidth: 0 }, disabled: localFormInstance.formState.isSubmitting ||
|
|
135
136
|
!localFormInstance.formState.isValid ||
|
|
136
137
|
!localFormInstance.formState.isDirty, onClick: handleSave, children: "Save" })) })] }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: 16, position: 'relative' }, children: !isMobile &&
|
|
137
138
|
control.format === 'grid' &&
|
|
@@ -8,6 +8,7 @@ const constants_1 = require("@headless-adminapp/app/dataform/constants");
|
|
|
8
8
|
const useCalculatedAttributeStore_1 = require("@headless-adminapp/app/metadata/hooks/useCalculatedAttributeStore");
|
|
9
9
|
const icons_1 = require("@headless-adminapp/icons");
|
|
10
10
|
const react_hook_form_1 = require("react-hook-form");
|
|
11
|
+
const fluent_1 = require("../../components/fluent");
|
|
11
12
|
const SectionControl_1 = require("../../DataForm/SectionControl");
|
|
12
13
|
const StandardControl_1 = require("../StandardControl");
|
|
13
14
|
const useStyles = (0, react_components_1.makeStyles)({
|
|
@@ -53,7 +54,7 @@ const TableUi = ({ schema, control, formControl, onAddRow, onRemoveRow, rows, al
|
|
|
53
54
|
return null;
|
|
54
55
|
}
|
|
55
56
|
return ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { children: attribute.label ?? attribute.label }, attributeName));
|
|
56
|
-
}), !readOnly && ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { children: (0, jsx_runtime_1.jsx)(
|
|
57
|
+
}), !readOnly && ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, { size: 16 }), appearance: "subtle", onClick: onAddRow }) }))] }) }), (0, jsx_runtime_1.jsx)(react_components_1.TableBody, { children: rows.map((item, index) => ((0, jsx_runtime_1.jsxs)(react_components_1.TableRow, { children: [control.controls.map((control) => {
|
|
57
58
|
const attributeName = typeof control === 'string' ? control : control.attributeName;
|
|
58
59
|
const attribute = schema.attributes[attributeName];
|
|
59
60
|
if (!attribute) {
|
|
@@ -71,6 +72,6 @@ const TableUi = ({ schema, control, formControl, onAddRow, onRemoveRow, rows, al
|
|
|
71
72
|
eventManager.emit(constants_1.EVENT_KEY_ON_FIELD_CHANGE, field.name, value, previousValue);
|
|
72
73
|
}, onBlur: field.onBlur, placeholder: "" }) }));
|
|
73
74
|
} }) }, attributeName));
|
|
74
|
-
}), !readOnly && ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { children: (0, jsx_runtime_1.jsx)(
|
|
75
|
+
}), !readOnly && ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, { size: 16 }), appearance: "subtle", onClick: () => onRemoveRow?.(index) }) }))] }, item.__key))) })] }));
|
|
75
76
|
};
|
|
76
77
|
exports.TableUi = TableUi;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
7
7
|
const historystate_1 = require("@headless-adminapp/app/historystate");
|
|
8
|
+
const fluent_1 = require("../components/fluent");
|
|
8
9
|
const FormTab_1 = require("../form/layout/FormTab");
|
|
9
10
|
const SubgridControl_1 = require("./SubgridControl");
|
|
10
11
|
function FormTabRelated({ selectedRelatedItem, }) {
|
|
@@ -22,7 +23,7 @@ function FormTabRelated({ selectedRelatedItem, }) {
|
|
|
22
23
|
display: 'flex',
|
|
23
24
|
flexDirection: 'column',
|
|
24
25
|
boxShadow: react_components_1.tokens.shadow2,
|
|
25
|
-
borderRadius:
|
|
26
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
26
27
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
27
28
|
flex: 1,
|
|
28
29
|
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
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
|
+
const header_1 = require("@headless-adminapp/app/header");
|
|
6
7
|
const historystate_1 = require("@headless-adminapp/app/historystate");
|
|
7
8
|
const PageEntityFormProvider_1 = require("@headless-adminapp/app/providers/PageEntityFormProvider");
|
|
8
9
|
const recordset_1 = require("@headless-adminapp/app/recordset");
|
|
9
10
|
const PageEntityFormDesktopContainer_1 = require("./PageEntityFormDesktopContainer");
|
|
10
11
|
const RecordSetNavigatorContainer_1 = require("./RecordSetNavigatorContainer");
|
|
11
12
|
function PageCustomEntityForm({ recordId, commands, form, schema, retriveRecordFn, saveRecordFn, }) {
|
|
13
|
+
(0, header_1.useMobileHeader)(true);
|
|
12
14
|
return ((0, jsx_runtime_1.jsx)(historystate_1.HistoryStateKeyProvider, { historyKey: 'page-entity-form.' + schema.logicalName, children: (0, jsx_runtime_1.jsx)(recordset_1.RecordSetProvider, { children: (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: {
|
|
13
15
|
display: 'flex',
|
|
14
16
|
flex: 1,
|
|
@@ -15,6 +15,8 @@ const mutable_1 = require("@headless-adminapp/app/mutable");
|
|
|
15
15
|
const utils_2 = require("@headless-adminapp/app/utils");
|
|
16
16
|
const react_1 = require("react");
|
|
17
17
|
const react_hook_form_1 = require("react-hook-form");
|
|
18
|
+
const fluent_1 = require("../components/fluent");
|
|
19
|
+
const FluentProvider_1 = require("../components/fluent/FluentProvider");
|
|
18
20
|
const PageBroken_1 = require("../components/PageBroken");
|
|
19
21
|
const FormBody_1 = require("../form/layout/FormBody");
|
|
20
22
|
const FormTab_1 = require("../form/layout/FormTab");
|
|
@@ -68,7 +70,7 @@ const PageEntityFormDesktopContainer = () => {
|
|
|
68
70
|
}, children: [!isMobile && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
69
71
|
// padding: 4,
|
|
70
72
|
boxShadow: react_components_1.tokens.shadow2,
|
|
71
|
-
borderRadius:
|
|
73
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
72
74
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
73
75
|
display: 'flex',
|
|
74
76
|
// overflow: 'hidden',
|
|
@@ -76,7 +78,7 @@ const PageEntityFormDesktopContainer = () => {
|
|
|
76
78
|
display: 'flex',
|
|
77
79
|
flexDirection: 'column',
|
|
78
80
|
boxShadow: react_components_1.tokens.shadow4,
|
|
79
|
-
borderRadius:
|
|
81
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
80
82
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
81
83
|
overflow: 'hidden',
|
|
82
84
|
zIndex: 2,
|
|
@@ -123,12 +125,14 @@ exports.PageEntityFormDesktopContainer = PageEntityFormDesktopContainer;
|
|
|
123
125
|
const Wrapper = ({ children, formHeaderDivRef, }) => {
|
|
124
126
|
const isMobile = (0, hooks_2.useIsMobile)();
|
|
125
127
|
const rect = (0, hooks_2.useElementSize)(formHeaderDivRef, isMobile ? 100 : 5000);
|
|
126
|
-
const
|
|
128
|
+
const { density } = (0, FluentProvider_1.useExtendedThemeContext)();
|
|
129
|
+
const headerHeight = density === 'compact' ? 48 : 64;
|
|
127
130
|
const tabContainerHeight = 36;
|
|
128
131
|
const visible = !!rect && rect.bottom < headerHeight + tabContainerHeight;
|
|
129
132
|
if (isMobile) {
|
|
130
133
|
return ((0, jsx_runtime_1.jsxs)(ScrollView_1.ScrollView, { children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
131
|
-
background: react_components_1.tokens.
|
|
134
|
+
background: react_components_1.tokens.colorNeutralBackgroundAlpha,
|
|
135
|
+
backdropFilter: 'blur(15px)',
|
|
132
136
|
position: 'fixed',
|
|
133
137
|
transition: 'all 0.2s',
|
|
134
138
|
top: visible ? headerHeight : -headerHeight,
|
|
@@ -9,6 +9,7 @@ const locale_1 = require("@headless-adminapp/app/locale");
|
|
|
9
9
|
const navigation_1 = require("@headless-adminapp/app/navigation");
|
|
10
10
|
const hooks_2 = require("@headless-adminapp/app/recordset/hooks");
|
|
11
11
|
const react_1 = require("react");
|
|
12
|
+
const fluent_1 = require("../components/fluent");
|
|
12
13
|
const RecordCard_1 = require("./RecordCard");
|
|
13
14
|
const useStyles = (0, react_components_1.makeStyles)({
|
|
14
15
|
item: {
|
|
@@ -48,7 +49,7 @@ const RecordSetNavigatorContainer = () => {
|
|
|
48
49
|
// display: 'none',
|
|
49
50
|
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
50
51
|
boxShadow: react_components_1.tokens.shadow2,
|
|
51
|
-
borderRadius:
|
|
52
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
52
53
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
53
54
|
display: 'flex',
|
|
54
55
|
minWidth: 320,
|
|
@@ -9,6 +9,7 @@ const hooks_2 = require("@headless-adminapp/app/metadata/hooks");
|
|
|
9
9
|
const utils_1 = require("@headless-adminapp/core/attributes/utils");
|
|
10
10
|
const icons_1 = require("@headless-adminapp/icons");
|
|
11
11
|
const react_1 = require("react");
|
|
12
|
+
const fluent_1 = require("../components/fluent");
|
|
12
13
|
const PageEntityFormStringContext_1 = require("./PageEntityFormStringContext");
|
|
13
14
|
function getRelatedItems(currentSchema, schemas, relatedItems) {
|
|
14
15
|
if (relatedItems === null) {
|
|
@@ -84,7 +85,6 @@ function RelatedViewSelector(props) {
|
|
|
84
85
|
return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsxs)("button", { style: {
|
|
85
86
|
border: 'none',
|
|
86
87
|
overflow: 'hidden',
|
|
87
|
-
borderRadius: react_components_1.tokens.borderRadiusMedium,
|
|
88
88
|
padding: `${react_components_1.tokens.spacingVerticalM} ${react_components_1.tokens.spacingHorizontalMNudge}`,
|
|
89
89
|
fontFamily: react_components_1.tokens.fontFamilyBase,
|
|
90
90
|
lineHeight: react_components_1.tokens.lineHeightBase300,
|
|
@@ -100,5 +100,5 @@ function RelatedViewSelector(props) {
|
|
|
100
100
|
textTransform: 'none',
|
|
101
101
|
columnGap: react_components_1.tokens.spacingHorizontalSNudge,
|
|
102
102
|
color: react_components_1.tokens.colorNeutralForeground2,
|
|
103
|
-
}, children: [strings.related, (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronDown, { size: 16 })] }) }), (0, jsx_runtime_1.jsx)(
|
|
103
|
+
}, children: [strings.related, (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronDown, { size: 16 })] }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: data.map((item) => ((0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { onClick: () => props.onSelect(item), children: item.localizedPluralLabels?.[language] ?? item.pluralLabel }, item.key))) }) })] }));
|
|
104
104
|
}
|
|
@@ -24,7 +24,11 @@ const TabContainer = () => {
|
|
|
24
24
|
selectedRelatedItem: item,
|
|
25
25
|
}));
|
|
26
26
|
});
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
paddingBottom: react_components_1.tokens.spacingVerticalS,
|
|
30
|
+
overflowY: 'auto',
|
|
31
|
+
}, children: [(0, jsx_runtime_1.jsxs)(react_components_1.TabList, { selectedValue: activeTab, onTabSelect: (e, value) => {
|
|
28
32
|
setActiveTab(value.value);
|
|
29
33
|
}, children: [formConfig.experience.tabs.map((tab) => ((0, jsx_runtime_1.jsx)(react_components_1.Tab, { value: tab.name, children: (0, utils_1.localizedLabel)(language, tab) }, tab.name))), !!selectedRelatedItem && ((0, jsx_runtime_1.jsx)(react_components_1.Tab, { value: "related", children: selectedRelatedItem.localizedPluralLabels?.[language] ??
|
|
30
34
|
selectedRelatedItem.pluralLabel }))] }), (0, jsx_runtime_1.jsx)(RelatedViewSelector_1.RelatedViewSelector, { onSelect: (item) => {
|
|
@@ -10,6 +10,7 @@ const utils_1 = require("@headless-adminapp/core/utils");
|
|
|
10
10
|
const icons_1 = require("@headless-adminapp/icons");
|
|
11
11
|
const react_query_1 = require("@tanstack/react-query");
|
|
12
12
|
const react_1 = require("react");
|
|
13
|
+
const fluent_1 = require("../components/fluent");
|
|
13
14
|
const avatar_1 = require("../utils/avatar");
|
|
14
15
|
const UploadImageDialog = ({ currentImage, recordTitle, recordId, onChange, open, onOpenChange, }) => {
|
|
15
16
|
const schema = (0, hooks_1.useDataFormSchema)();
|
|
@@ -80,7 +81,7 @@ const UploadImageDialog = ({ currentImage, recordTitle, recordId, onChange, open
|
|
|
80
81
|
const showChangeImage = !!isFileChanged;
|
|
81
82
|
const showResetImage = !isFileChanged && !!fileUrl;
|
|
82
83
|
const showCancel = isFileChanged;
|
|
83
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: open, onOpenChange: (e, data) => onOpenChange(data.open), children: (0, jsx_runtime_1.jsx)(
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: open, onOpenChange: (e, data) => onOpenChange(data.open), children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { action: (0, jsx_runtime_1.jsx)(react_components_1.DialogTrigger, { action: "close", children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", "aria-label": "close", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, {}) }) }), children: "Choose Image" }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { children: "Upload an image from your device, or use the default image" }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
84
85
|
marginTop: react_components_1.tokens.spacingVerticalM,
|
|
85
86
|
marginBottom: react_components_1.tokens.spacingVerticalM,
|
|
86
87
|
display: 'flex',
|
|
@@ -88,21 +89,21 @@ const UploadImageDialog = ({ currentImage, recordTitle, recordId, onChange, open
|
|
|
88
89
|
justifyContent: 'center',
|
|
89
90
|
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Avatar, { shape: "square", style: { width: 120, height: 120 }, name: recordTitle, color: (0, avatar_1.getAvatarColor)(recordTitle), image: {
|
|
90
91
|
src: fileUrl ?? undefined,
|
|
91
|
-
} }) })] }) }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [showChangeImage && ((0, jsx_runtime_1.jsx)(
|
|
92
|
+
} }) })] }) }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [showChangeImage && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", onClick: () => handleApply(), style: {
|
|
92
93
|
whiteSpace: 'nowrap',
|
|
93
94
|
fontWeight: 'normal',
|
|
94
|
-
}, disabled: isPending, children: isPending ? 'Changing...' : 'Change' })), showUploadImage && ((0, jsx_runtime_1.jsx)(
|
|
95
|
+
}, disabled: isPending, children: isPending ? 'Changing...' : 'Change' })), showUploadImage && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", onClick: handleSelectFile, style: {
|
|
95
96
|
whiteSpace: 'nowrap',
|
|
96
97
|
// minWidth: 0,
|
|
97
98
|
fontWeight: 'normal',
|
|
98
|
-
}, children: "Upload Image" })), showResetImage && ((0, jsx_runtime_1.jsx)(
|
|
99
|
+
}, children: "Upload Image" })), showResetImage && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { style: {
|
|
99
100
|
whiteSpace: 'nowrap',
|
|
100
101
|
// minWidth: 0,
|
|
101
102
|
fontWeight: 'normal',
|
|
102
103
|
}, onClick: () => {
|
|
103
104
|
setFileUrl(null);
|
|
104
105
|
setFile(null);
|
|
105
|
-
}, children: "Reset to Default" })), showCancel && ((0, jsx_runtime_1.jsx)(
|
|
106
|
+
}, children: "Reset to Default" })), showCancel && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "secondary", style: {
|
|
106
107
|
whiteSpace: 'nowrap',
|
|
107
108
|
// minWidth: 0,
|
|
108
109
|
fontWeight: 'normal',
|
|
@@ -7,6 +7,7 @@ const hooks_1 = require("@headless-adminapp/app/datagrid/hooks");
|
|
|
7
7
|
const hooks_2 = require("@headless-adminapp/app/hooks");
|
|
8
8
|
const icons_1 = require("@headless-adminapp/icons");
|
|
9
9
|
const AppStringContext_1 = require("../App/AppStringContext");
|
|
10
|
+
const fluent_1 = require("../components/fluent");
|
|
10
11
|
const FormSubgridCommandContainer_1 = require("../DataGrid/FormSubgridCommandContainer");
|
|
11
12
|
const FormSubgridViewSelector_1 = require("../DataGrid/FormSubgridViewSelector");
|
|
12
13
|
const GridListContainer_1 = require("../DataGrid/GridListContainer");
|
|
@@ -60,7 +61,7 @@ const FormSubgridDesktopContainer = ({ hideCommandBar, hideSearch, }) => {
|
|
|
60
61
|
justifyContent: 'end',
|
|
61
62
|
flexShrink: 0,
|
|
62
63
|
paddingInline: 8,
|
|
63
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
64
|
+
}, children: (0, jsx_runtime_1.jsx)(fluent_1.Input, { contentBefore: (0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 16 }), placeholder: appStrings.searchPlaceholder, appearance: "filled-darker", value: searchText, onChange: (e) => setSearchText(e.target.value) }) }))] })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
64
65
|
flex: 1,
|
|
65
66
|
display: 'flex',
|
|
66
67
|
flexDirection: 'column',
|
|
@@ -112,7 +113,7 @@ const FormSubgridMobileContainer = ({ hideCommandBar, hideSearch, }) => {
|
|
|
112
113
|
justifyContent: 'end',
|
|
113
114
|
flexShrink: 0,
|
|
114
115
|
paddingInline: 8,
|
|
115
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
116
|
+
}, children: (0, jsx_runtime_1.jsx)(fluent_1.Input, { contentBefore: (0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 16 }), placeholder: appStrings.searchPlaceholder, appearance: "filled-darker", value: searchText, onChange: (e) => setSearchText(e.target.value) }) }))] })), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
116
117
|
flex: 1,
|
|
117
118
|
display: 'flex',
|
|
118
119
|
flexDirection: 'column',
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageEntityViewDesktopFrame = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const fluent_1 = require("../components/fluent");
|
|
6
7
|
const PageEntityViewDesktopFrame = ({ commandBar, header, content, footer }) => {
|
|
7
8
|
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
8
9
|
display: 'flex',
|
|
@@ -21,7 +22,7 @@ const PageEntityViewDesktopFrame = ({ commandBar, header, content, footer }) =>
|
|
|
21
22
|
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
22
23
|
// padding: 4,
|
|
23
24
|
boxShadow: react_components_1.tokens.shadow2,
|
|
24
|
-
borderRadius:
|
|
25
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
25
26
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
26
27
|
display: 'flex',
|
|
27
28
|
// overflow: 'hidden',
|
|
@@ -31,7 +32,7 @@ const PageEntityViewDesktopFrame = ({ commandBar, header, content, footer }) =>
|
|
|
31
32
|
display: 'flex',
|
|
32
33
|
flexDirection: 'column',
|
|
33
34
|
boxShadow: react_components_1.tokens.shadow2,
|
|
34
|
-
borderRadius:
|
|
35
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
35
36
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
36
37
|
paddingBlock: 8,
|
|
37
38
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|