@headless-adminapp/fluent 0.0.17-alpha.53 → 0.0.17-alpha.55
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/App.js +11 -7
- package/App/AppHeaderContianer.js +50 -44
- package/App/AppLogo.js +12 -9
- package/App/AppStringContext.js +13 -9
- package/App/AppUI.js +15 -11
- package/App/LayoutProvider.js +16 -24
- package/App/NavigationContainer.js +28 -28
- package/App/QuickActionItem.js +10 -6
- package/App/index.js +5 -1
- package/App/utils.d.ts +1 -1
- package/App/utils.js +7 -5
- package/CommandBar/Button.js +17 -14
- package/CommandBar/Divider.js +9 -6
- package/CommandBar/IconButton.js +16 -13
- package/CommandBar/Label.js +11 -8
- package/CommandBar/MenuButton.js +20 -17
- package/CommandBar/MenuItem.js +19 -16
- package/CommandBar/MenuItems.js +10 -10
- package/CommandBar/MenuList.js +12 -9
- package/CommandBar/Wrapper.js +10 -7
- package/CommandBar/index.js +15 -13
- package/DataForm/SectionControl.js +7 -4
- package/DataGrid/ActionCell.js +14 -11
- package/DataGrid/CommandContainer.js +10 -6
- package/DataGrid/CustomizeColumns/AddColumns.js +61 -59
- package/DataGrid/CustomizeColumns/ColumnItem.js +23 -19
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +41 -36
- package/DataGrid/CustomizeColumns/index.js +5 -1
- package/DataGrid/FormSubgridCommandContainer.js +17 -13
- package/DataGrid/FormSubgridViewSelector.js +21 -21
- package/DataGrid/GridColumnHeader/ConditionValueControl.js +33 -33
- package/DataGrid/GridColumnHeader/FilterForm.js +28 -27
- package/DataGrid/GridColumnHeader/OperatorSelect.js +19 -13
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +35 -31
- package/DataGrid/GridColumnHeader/index.js +5 -1
- package/DataGrid/GridColumnHeader/utils.js +6 -2
- package/DataGrid/GridHeaderContainer.js +8 -4
- package/DataGrid/GridHeaderDesktop.js +28 -28
- package/DataGrid/GridHeaderMobile.js +20 -19
- package/DataGrid/GridListContainer.js +50 -44
- package/DataGrid/GridPaginationContainer.js +16 -13
- package/DataGrid/GridTableContainer.js +98 -89
- package/DataGrid/TableCell/TableCellAction.js +15 -11
- package/DataGrid/TableCell/TableCellBase.js +13 -4
- package/DataGrid/TableCell/TableCellCheckbox.js +11 -8
- package/DataGrid/TableCell/TableCellChoice.js +15 -13
- package/DataGrid/TableCell/TableCellLink.js +14 -11
- package/DataGrid/TableCell/TableCellText.js +10 -7
- package/DataGrid/TableCell/index.js +20 -4
- package/DataGrid/index.js +11 -4
- package/DataGrid/types.js +2 -1
- package/DataGrid/useTableColumns.js +98 -103
- package/DataGrid/utils.js +5 -1
- package/DialogContainer/AlertDialog.js +11 -11
- package/DialogContainer/ConfirmDialog.js +13 -14
- package/DialogContainer/DialogContainer.js +19 -26
- package/DialogContainer/ErrorDialog.js +15 -15
- package/DialogContainer/PromptDialog.js +76 -58
- package/DialogContainer/index.js +5 -1
- package/Insights/CommandBarContainer.js +17 -11
- package/Insights/FilterBarContainer.js +32 -37
- package/Insights/Grid.js +13 -9
- package/Insights/InsightsContainer.js +22 -19
- package/Insights/WidgetChartContainer.js +34 -30
- package/Insights/WidgetDataGridContainer.js +45 -33
- package/Insights/WidgetTableContainer.js +29 -26
- package/Insights/WidgetTileContainer.js +16 -12
- package/Insights/WidgetTitleBar.js +15 -10
- package/Insights/Widgets.js +28 -25
- package/Insights/charts/AreaChart.js +15 -12
- package/Insights/charts/BarChart.js +15 -12
- package/Insights/charts/ComposedChart.js +15 -13
- package/Insights/charts/CustomTooltipContent.js +13 -9
- package/Insights/charts/GaugeChart.js +6 -3
- package/Insights/charts/LineChart.js +15 -12
- package/Insights/charts/OhlcChart.js +46 -40
- package/Insights/charts/PieChart.js +25 -26
- package/Insights/charts/RadarChart.js +19 -17
- package/Insights/charts/ScatterChart.js +26 -28
- package/Insights/charts/constants.js +4 -1
- package/Insights/charts/formatters.js +33 -23
- package/Insights/charts/index.js +2 -1
- package/Insights/charts/renderers.js +36 -26
- package/Insights/hooks/useQueriesData.js +27 -30
- package/Insights/hooks/useWidgetDetail.js +24 -15
- package/OverflowCommandBar/OverflowCommandBar.js +19 -12
- package/OverflowCommandBar/OverflowMenu.js +22 -30
- package/OverflowCommandBar/OverflowMenuDivider.js +10 -6
- package/OverflowCommandBar/index.js +9 -3
- package/OverflowCommandBar/render.js +15 -10
- package/OverflowCommandBar/utils.js +6 -4
- package/PageBoard/BoardColumn.js +8 -5
- package/PageBoard/BoardColumnCard.d.ts +1 -1
- package/PageBoard/BoardColumnCard.js +15 -11
- package/PageBoard/BoardColumnUI.js +45 -46
- package/PageBoard/BoardingColumnCardLoading.js +13 -10
- package/PageBoard/Header.js +23 -28
- package/PageBoard/PageBoard.js +28 -26
- package/PageBoard/index.js +5 -1
- package/PageEntityForm/CommandContainer.js +25 -21
- package/PageEntityForm/FormTabRelated.js +20 -17
- package/PageEntityForm/PageEntityForm.js +20 -16
- package/PageEntityForm/PageEntityFormDesktopContainer.js +77 -70
- package/PageEntityForm/PageEntityFormStringContext.js +9 -5
- package/PageEntityForm/ProcessFlow.js +24 -21
- package/PageEntityForm/RecordCard.js +31 -24
- package/PageEntityForm/RecordCardLoading.js +13 -11
- package/PageEntityForm/RecordSetNavigatorContainer.js +34 -31
- package/PageEntityForm/RelatedViewSelector.js +34 -36
- package/PageEntityForm/SectionContainer.js +35 -31
- package/PageEntityForm/StandardControl.js +84 -76
- package/PageEntityForm/SubgridControl.js +23 -21
- package/PageEntityForm/index.js +5 -1
- package/PageEntityView/FormSubgridContainer.js +26 -22
- package/PageEntityView/PageEntityView.js +19 -15
- package/PageEntityView/PageEntityViewDesktopContainer.js +13 -9
- package/PageEntityView/PageEntityViewDesktopFrame.js +21 -17
- package/PageEntityView/PageEntityViewMobileContainer.js +13 -9
- package/PageEntityView/PageEntityViewStringContext.js +9 -5
- package/PageEntityView/index.js +5 -1
- package/PageInsights/PageInsights.js +13 -9
- package/PageInsights/index.js +6 -1
- package/ProgressIndicatorContainer/index.js +14 -10
- package/ToastNotificationContainer/index.js +18 -15
- package/componentStore.js +5 -2
- package/components/BodyLoading.js +11 -7
- package/components/DialogLogin.js +8 -5
- package/components/DndProvider.d.ts +12 -0
- package/components/DndProvider.js +68 -0
- package/components/LoginForm.js +46 -36
- package/components/PageBroken.js +8 -5
- package/components/PageLoading.js +8 -5
- package/components/PageLogin.js +17 -14
- package/form/FormControl.js +44 -50
- package/form/FormControlLoading.js +8 -4
- package/form/controls/AttachmentControl.js +72 -77
- package/form/controls/AttachmentsControl.js +24 -30
- package/form/controls/CurrencyControl.js +16 -13
- package/form/controls/DateControl.js +24 -18
- package/form/controls/DateRangeControl.js +22 -18
- package/form/controls/DateTimeControl.js +49 -43
- package/form/controls/DecimalControl.js +14 -11
- package/form/controls/DurationControl.js +18 -14
- package/form/controls/EmailControl.js +14 -11
- package/form/controls/IntegerControl.js +11 -8
- package/form/controls/LookupControl.js +58 -56
- package/form/controls/MultiSelectControl.js +12 -9
- package/form/controls/MultiSelectLookupControl.js +55 -53
- package/form/controls/PasswordControl.js +11 -8
- package/form/controls/RichTextControl.js +32 -5
- package/form/controls/SelectControl.js +15 -13
- package/form/controls/SwitchControl.js +7 -4
- package/form/controls/TelephoneControl.js +10 -7
- package/form/controls/TextAreaControl.js +11 -8
- package/form/controls/TextControl.js +12 -9
- package/form/controls/UrlControl.js +10 -7
- package/form/controls/types.js +2 -1
- package/form/controls/useLookupData.js +43 -54
- package/form/layout/FormBody/FormBody.js +10 -6
- package/form/layout/FormBody/index.js +17 -1
- package/form/layout/FormSection/FormSection.js +31 -20
- package/form/layout/FormSection/FormSectionColumn.js +7 -3
- package/form/layout/FormSection/FormSectionLoading.js +5 -1
- package/form/layout/FormSection/index.js +5 -1
- package/form/layout/FormTab/FormTab.js +21 -17
- package/form/layout/FormTab/FormTabColumn.js +9 -5
- package/form/layout/FormTab/index.js +5 -1
- package/form/layout/TabContext.js +5 -2
- package/form/layout/index.js +9 -3
- package/form/types.js +2 -1
- package/package.json +4 -12
- package/types/index.js +2 -1
- package/utils/avatar.js +4 -1
- package/DataGrid/ScrollbarWithMoreDataRequest.d.ts +0 -9
- package/DataGrid/ScrollbarWithMoreDataRequest.js +0 -33
- package/form/controls/NumberControl.d.ts +0 -4
- package/form/controls/NumberControl.js +0 -16
- package/form/controls/utils.d.ts +0 -4
- package/form/controls/utils.js +0 -42
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const fetchNextPage = useContextSelector(BoardColumnContext, (state) => state.fetchNextPage);
|
|
25
|
-
const { columnId, acceptSourceIds, title, updateFn } = useBoardColumnConfig();
|
|
26
|
-
const { PreviewComponent, schema, columnConfigs } = useBoardConfig();
|
|
27
|
-
const baseContext = useBaseCommandHandlerContext();
|
|
28
|
-
const ref = useRef(null);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BoardColumnUI = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const context_1 = require("@headless-adminapp/app/board/context");
|
|
7
|
+
const hooks_1 = require("@headless-adminapp/app/board/hooks");
|
|
8
|
+
const hooks_2 = require("@headless-adminapp/app/command/hooks");
|
|
9
|
+
const ScrollbarWithMoreDataRequest_1 = require("@headless-adminapp/app/components/ScrollbarWithMoreDataRequest");
|
|
10
|
+
const context_2 = require("@headless-adminapp/app/mutable/context");
|
|
11
|
+
const react_1 = require("react");
|
|
12
|
+
const DndProvider_1 = require("../components/DndProvider");
|
|
13
|
+
const BoardColumnCard_1 = require("./BoardColumnCard");
|
|
14
|
+
const BoardingColumnCardLoading_1 = require("./BoardingColumnCardLoading");
|
|
15
|
+
const BoardColumnUI = () => {
|
|
16
|
+
const data = (0, hooks_1.useBoardColumnData)();
|
|
17
|
+
const dataState = (0, hooks_1.useBoardColumnDataState)();
|
|
18
|
+
const fetchNextPage = (0, context_2.useContextSelector)(context_1.BoardColumnContext, (state) => state.fetchNextPage);
|
|
19
|
+
const { columnId, acceptSourceIds, title, updateFn } = (0, hooks_1.useBoardColumnConfig)();
|
|
20
|
+
const { PreviewComponent, schema, columnConfigs } = (0, hooks_1.useBoardConfig)();
|
|
21
|
+
const baseContext = (0, hooks_2.useBaseCommandHandlerContext)();
|
|
22
|
+
const { useDrop } = (0, DndProvider_1.useDndContext)();
|
|
23
|
+
const ref = (0, react_1.useRef)(null);
|
|
29
24
|
const [{ handlerId, over, canDrop }, drop] = useDrop({
|
|
30
25
|
accept: acceptSourceIds,
|
|
31
26
|
collect(monitor) {
|
|
@@ -36,42 +31,46 @@ export const BoardColumnUI = () => {
|
|
|
36
31
|
};
|
|
37
32
|
},
|
|
38
33
|
drop: (item) => {
|
|
39
|
-
(() =>
|
|
40
|
-
|
|
34
|
+
(async () => {
|
|
35
|
+
await updateFn?.({
|
|
36
|
+
...baseContext,
|
|
37
|
+
primaryControl: {
|
|
41
38
|
logicalName: schema.logicalName,
|
|
42
39
|
id: item.id,
|
|
43
40
|
schema: schema,
|
|
44
|
-
}
|
|
45
|
-
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
})().catch(console.error);
|
|
46
44
|
},
|
|
47
45
|
});
|
|
48
|
-
const canDrag = useMemo(() => {
|
|
46
|
+
const canDrag = (0, react_1.useMemo)(() => {
|
|
49
47
|
return columnConfigs.some((config) => config.acceptSourceIds.length > 0);
|
|
50
48
|
}, [columnConfigs]);
|
|
51
49
|
drop(ref);
|
|
52
|
-
return (
|
|
50
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, style: {
|
|
53
51
|
display: 'flex',
|
|
54
52
|
flexDirection: 'column',
|
|
55
53
|
flex: 1,
|
|
56
|
-
borderRadius: tokens.borderRadiusXLarge,
|
|
54
|
+
borderRadius: react_components_1.tokens.borderRadiusXLarge,
|
|
57
55
|
outline: over
|
|
58
|
-
? `2px dashed ${tokens.colorBrandBackground}`
|
|
56
|
+
? `2px dashed ${react_components_1.tokens.colorBrandBackground}`
|
|
59
57
|
: canDrop
|
|
60
|
-
? `2px dashed ${tokens.colorNeutralStroke1}`
|
|
58
|
+
? `2px dashed ${react_components_1.tokens.colorNeutralStroke1}`
|
|
61
59
|
: 'none',
|
|
62
60
|
outlineOffset: -5,
|
|
63
|
-
paddingTop: tokens.spacingVerticalS,
|
|
64
|
-
}, "data-handler-id": handlerId, children: [
|
|
61
|
+
paddingTop: react_components_1.tokens.spacingVerticalS,
|
|
62
|
+
}, "data-handler-id": handlerId, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
65
63
|
display: 'flex',
|
|
66
|
-
paddingInline: tokens.spacingHorizontalS,
|
|
64
|
+
paddingInline: react_components_1.tokens.spacingHorizontalS,
|
|
67
65
|
alignItems: 'center',
|
|
68
|
-
}, children:
|
|
66
|
+
}, 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: title }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } })] }) }), (0, jsx_runtime_1.jsx)(ScrollbarWithMoreDataRequest_1.ScrollbarWithMoreDataRequest, { data: data?.records, hasMore: dataState?.hasNextPage, onRequestMore: () => {
|
|
69
67
|
fetchNextPage();
|
|
70
|
-
}, children:
|
|
68
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
71
69
|
display: 'flex',
|
|
72
70
|
flexDirection: 'column',
|
|
73
|
-
gap: tokens.spacingHorizontalM,
|
|
74
|
-
padding: tokens.spacingHorizontalS,
|
|
75
|
-
}, children: [data
|
|
76
|
-
Array.from({ length: 5 }).map((_, index) => (
|
|
71
|
+
gap: react_components_1.tokens.spacingHorizontalM,
|
|
72
|
+
padding: react_components_1.tokens.spacingHorizontalS,
|
|
73
|
+
}, children: [data?.records.map((record, index) => ((0, jsx_runtime_1.jsx)(BoardColumnCard_1.BoardColumnCard, { record: record, index: index, columnId: columnId, canDrag: canDrag, PreviewComponent: PreviewComponent, schema: schema }, index))), dataState.isFetching &&
|
|
74
|
+
Array.from({ length: 5 }).map((_, index) => ((0, jsx_runtime_1.jsx)(BoardingColumnCardLoading_1.BoardingColumnCardLoading, {}, index)))] }) })] }));
|
|
77
75
|
};
|
|
76
|
+
exports.BoardColumnUI = BoardColumnUI;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BoardingColumnCardLoading = BoardingColumnCardLoading;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
function BoardingColumnCardLoading() {
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.Skeleton, { style: {
|
|
8
|
+
backgroundColor: react_components_1.tokens.colorNeutralBackground1,
|
|
9
|
+
borderRadius: react_components_1.tokens.borderRadiusLarge,
|
|
10
|
+
padding: react_components_1.tokens.spacingHorizontalM,
|
|
8
11
|
display: 'flex',
|
|
9
12
|
flexDirection: 'column',
|
|
10
|
-
gap: tokens.spacingVerticalM,
|
|
11
|
-
}, children: [
|
|
13
|
+
gap: react_components_1.tokens.spacingVerticalM,
|
|
14
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_components_1.SkeletonItem, { style: {
|
|
12
15
|
height: 16,
|
|
13
16
|
width: '100%',
|
|
14
|
-
} }),
|
|
17
|
+
} }), (0, jsx_runtime_1.jsx)(react_components_1.SkeletonItem, { style: {
|
|
15
18
|
height: 16,
|
|
16
19
|
width: '50%',
|
|
17
20
|
} })] }));
|
package/PageBoard/Header.js
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Header = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
5
|
// eslint-disable-next-line simple-import-sort/imports
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const client = useQueryClient();
|
|
19
|
-
const schema = useBoardSchema();
|
|
20
|
-
const [searchText, setSearchText] = useSearchText();
|
|
21
|
-
const appStrings = useAppStrings();
|
|
22
|
-
const refresh = () =>
|
|
23
|
-
|
|
6
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
7
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
8
|
+
const hooks_1 = require("@headless-adminapp/app/board/hooks");
|
|
9
|
+
const icons_1 = require("@headless-adminapp/icons");
|
|
10
|
+
const AppStringContext_1 = require("../App/AppStringContext");
|
|
11
|
+
const Header = ({ title, subtitle }) => {
|
|
12
|
+
const client = (0, react_query_1.useQueryClient)();
|
|
13
|
+
const schema = (0, hooks_1.useBoardSchema)();
|
|
14
|
+
const [searchText, setSearchText] = (0, hooks_1.useSearchText)();
|
|
15
|
+
const appStrings = (0, AppStringContext_1.useAppStrings)();
|
|
16
|
+
const refresh = async () => {
|
|
17
|
+
await client.invalidateQueries({
|
|
24
18
|
queryKey: ['data', 'retriveRecords', schema.logicalName],
|
|
25
19
|
});
|
|
26
|
-
}
|
|
27
|
-
return (
|
|
20
|
+
};
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
28
22
|
display: 'flex',
|
|
29
23
|
alignItems: 'center',
|
|
30
|
-
gap: tokens.spacingHorizontalM,
|
|
31
|
-
}, children: [
|
|
24
|
+
gap: react_components_1.tokens.spacingHorizontalM,
|
|
25
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { flex: 1 }, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Subtitle2, { style: { color: react_components_1.tokens.colorNeutralForeground1 }, children: title }), (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { color: react_components_1.tokens.colorNeutralForeground2 }, children: subtitle })] }) }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
32
26
|
display: 'flex',
|
|
33
27
|
alignItems: 'center',
|
|
34
|
-
gap: tokens.spacingHorizontalS,
|
|
35
|
-
}, children: [
|
|
28
|
+
gap: react_components_1.tokens.spacingHorizontalS,
|
|
29
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_components_1.SearchBox, { appearance: "filled-darker", placeholder: appStrings.searchPlaceholder, value: searchText, onChange: (e, data) => setSearchText(data.value) }), (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Refresh, { size: 20 }), onClick: refresh })] })] }));
|
|
36
30
|
};
|
|
31
|
+
exports.Header = Header;
|
package/PageBoard/PageBoard.js
CHANGED
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageBoard = PageBoard;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const context_1 = require("@headless-adminapp/app/board/context");
|
|
7
|
+
const context_2 = require("@headless-adminapp/app/mutable/context");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const DndProvider_1 = require("../components/DndProvider");
|
|
10
|
+
const BoardColumn_1 = require("./BoardColumn");
|
|
11
|
+
const Header_1 = require("./Header");
|
|
12
|
+
function PageBoard(props) {
|
|
13
|
+
const contextValue = (0, context_2.useCreateContextStore)({
|
|
12
14
|
config: props.config,
|
|
13
15
|
searchText: '',
|
|
14
16
|
});
|
|
15
|
-
useEffect(() => {
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
16
18
|
contextValue.setValue({
|
|
17
19
|
config: props.config,
|
|
18
20
|
searchText: '',
|
|
19
21
|
});
|
|
20
22
|
}, [contextValue, props.config]);
|
|
21
|
-
return (
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(context_1.BoardContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)(DndProvider_1.DndProvider, { children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
22
24
|
display: 'flex',
|
|
23
25
|
flexDirection: 'column',
|
|
24
26
|
flex: 1,
|
|
25
|
-
gap: tokens.spacingVerticalM,
|
|
26
|
-
padding: tokens.spacingHorizontalL,
|
|
27
|
-
background: tokens.colorNeutralBackground3,
|
|
28
|
-
}, children: [
|
|
27
|
+
gap: react_components_1.tokens.spacingVerticalM,
|
|
28
|
+
padding: react_components_1.tokens.spacingHorizontalL,
|
|
29
|
+
background: react_components_1.tokens.colorNeutralBackground3,
|
|
30
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
29
31
|
display: 'flex',
|
|
30
32
|
flexDirection: 'column',
|
|
31
|
-
background: tokens.colorNeutralBackground1,
|
|
32
|
-
borderRadius: tokens.borderRadiusLarge,
|
|
33
|
-
paddingBlock: tokens.spacingVerticalM,
|
|
34
|
-
paddingInline: tokens.spacingHorizontalM,
|
|
35
|
-
gap: tokens.spacingVerticalM,
|
|
36
|
-
boxShadow: tokens.shadow4,
|
|
37
|
-
}, children:
|
|
33
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
34
|
+
borderRadius: react_components_1.tokens.borderRadiusLarge,
|
|
35
|
+
paddingBlock: react_components_1.tokens.spacingVerticalM,
|
|
36
|
+
paddingInline: react_components_1.tokens.spacingHorizontalM,
|
|
37
|
+
gap: react_components_1.tokens.spacingVerticalM,
|
|
38
|
+
boxShadow: react_components_1.tokens.shadow4,
|
|
39
|
+
}, children: (0, jsx_runtime_1.jsx)(Header_1.Header, { title: props.config.title, subtitle: props.config.description }) }) }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
38
40
|
display: 'flex',
|
|
39
41
|
flexDirection: 'row',
|
|
40
42
|
flex: 1,
|
|
41
43
|
marginInline: -6,
|
|
42
|
-
marginTop: tokens.spacingVerticalM,
|
|
43
|
-
}, children: props.config.columnConfigs.map((config) => (
|
|
44
|
+
marginTop: react_components_1.tokens.spacingVerticalM,
|
|
45
|
+
}, children: props.config.columnConfigs.map((config) => ((0, jsx_runtime_1.jsx)(BoardColumn_1.BoardColumn, { config: config }, config.columnId))) })] }) }) }));
|
|
44
46
|
}
|
package/PageBoard/index.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageBoard = void 0;
|
|
4
|
+
var PageBoard_1 = require("./PageBoard");
|
|
5
|
+
Object.defineProperty(exports, "PageBoard", { enumerable: true, get: function () { return PageBoard_1.PageBoard; } });
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandContainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
6
|
+
const hooks_2 = require("@headless-adminapp/app/hooks");
|
|
7
|
+
const mutable_1 = require("@headless-adminapp/app/mutable");
|
|
8
|
+
const recordset_1 = require("@headless-adminapp/app/recordset");
|
|
9
|
+
const hooks_3 = require("@headless-adminapp/app/recordset/hooks");
|
|
10
|
+
const hooks_4 = require("@headless-adminapp/app/route/hooks");
|
|
11
|
+
const icons_1 = require("@headless-adminapp/icons");
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const OverflowCommandBar_1 = require("../OverflowCommandBar");
|
|
14
|
+
const CommandContainer = () => {
|
|
15
|
+
const gridCommands = (0, hooks_1.useMainFormCommands)();
|
|
16
|
+
const router = (0, hooks_4.useRouter)();
|
|
17
|
+
const isMobile = (0, hooks_2.useIsMobile)();
|
|
18
|
+
const schema = (0, hooks_1.useDataFormSchema)();
|
|
19
|
+
const [recordSetVisible, setRecordSetVisible] = (0, hooks_3.useRecordSetVisibility)();
|
|
20
|
+
const recordSetContext = (0, mutable_1.useContextSelector)(recordset_1.RecordSetContext, (state) => state);
|
|
21
|
+
const extendedCommands = (0, react_1.useMemo)(() => {
|
|
19
22
|
return [
|
|
20
23
|
[
|
|
21
24
|
{
|
|
22
25
|
type: 'icon',
|
|
23
|
-
Icon: Icons.ArrowLeft,
|
|
26
|
+
Icon: icons_1.Icons.ArrowLeft,
|
|
24
27
|
onClick: () => {
|
|
25
28
|
router.back();
|
|
26
29
|
},
|
|
@@ -33,7 +36,7 @@ export const CommandContainer = () => {
|
|
|
33
36
|
[
|
|
34
37
|
{
|
|
35
38
|
type: 'icon',
|
|
36
|
-
Icon: Icons.ListLtr,
|
|
39
|
+
Icon: icons_1.Icons.ListLtr,
|
|
37
40
|
onClick: () => {
|
|
38
41
|
setRecordSetVisible(!recordSetVisible);
|
|
39
42
|
},
|
|
@@ -53,5 +56,6 @@ export const CommandContainer = () => {
|
|
|
53
56
|
schema.logicalName,
|
|
54
57
|
setRecordSetVisible,
|
|
55
58
|
]);
|
|
56
|
-
return
|
|
59
|
+
return (0, jsx_runtime_1.jsx)(OverflowCommandBar_1.OverflowCommandBar, { commands: extendedCommands });
|
|
57
60
|
};
|
|
61
|
+
exports.CommandContainer = CommandContainer;
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormTabRelated = FormTabRelated;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
7
|
+
const FormTab_1 = require("../form/layout/FormTab");
|
|
8
|
+
const SubgridControl_1 = require("./SubgridControl");
|
|
9
|
+
function FormTabRelated({ selectedRelatedItem }) {
|
|
10
|
+
const recordId = (0, hooks_1.useRecordId)();
|
|
11
|
+
const schema = (0, hooks_1.useDataFormSchema)();
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab, { value: "related", noWrapper: true, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
10
13
|
display: 'flex',
|
|
11
14
|
flexDirection: 'column',
|
|
12
15
|
flex: 1,
|
|
13
|
-
}, children:
|
|
16
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
14
17
|
display: 'flex',
|
|
15
18
|
flexDirection: 'column',
|
|
16
19
|
flex: 1,
|
|
17
|
-
}, children:
|
|
20
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
18
21
|
display: 'flex',
|
|
19
22
|
flexDirection: 'column',
|
|
20
|
-
boxShadow: tokens.shadow2,
|
|
21
|
-
borderRadius: tokens.borderRadiusMedium,
|
|
22
|
-
background: tokens.colorNeutralBackground1,
|
|
23
|
+
boxShadow: react_components_1.tokens.shadow2,
|
|
24
|
+
borderRadius: react_components_1.tokens.borderRadiusMedium,
|
|
25
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
23
26
|
flex: 1,
|
|
24
|
-
}, children:
|
|
27
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
25
28
|
flex: 1,
|
|
26
29
|
display: 'flex',
|
|
27
30
|
flexDirection: 'column',
|
|
28
|
-
}, children:
|
|
31
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
29
32
|
flex: 1,
|
|
30
33
|
display: 'flex',
|
|
31
34
|
flexDirection: 'column',
|
|
32
|
-
}, children: !!selectedRelatedItem && (
|
|
35
|
+
}, children: !!selectedRelatedItem && ((0, jsx_runtime_1.jsx)(SubgridControl_1.SubgridControl, { logicalName: selectedRelatedItem.logicalName, allowViewSelection: true, associated: {
|
|
33
36
|
logicalName: schema.logicalName,
|
|
34
37
|
id: recordId,
|
|
35
38
|
refAttributeName: selectedRelatedItem.attributeName,
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageEntityForm = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
7
|
+
const PageEntityFormProvider_1 = require("@headless-adminapp/app/providers/PageEntityFormProvider");
|
|
8
|
+
const icons_1 = require("@headless-adminapp/icons");
|
|
9
|
+
const PageBroken_1 = require("../components/PageBroken");
|
|
10
|
+
const PageLoading_1 = require("../components/PageLoading");
|
|
11
|
+
const PageEntityFormDesktopContainer_1 = require("./PageEntityFormDesktopContainer");
|
|
12
|
+
const RecordSetNavigatorContainer_1 = require("./RecordSetNavigatorContainer");
|
|
13
|
+
const PageEntityForm = ({ logicalName, formId, recordId, }) => {
|
|
14
|
+
const result = (0, hooks_1.useLoadFormGridPage)(logicalName, formId);
|
|
12
15
|
if (result.loading) {
|
|
13
|
-
return
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(PageLoading_1.PageLoading, {});
|
|
14
17
|
}
|
|
15
18
|
if (result.error) {
|
|
16
|
-
return (
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(PageBroken_1.PageBroken, { Icon: icons_1.Icons.Error, title: result.title, message: result.message }));
|
|
17
20
|
}
|
|
18
21
|
const { schema, form, commands } = result;
|
|
19
|
-
return (
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(PageEntityFormProvider_1.PageEntityFormProvider, { schema: schema, form: form, recordId: recordId, commands: commands, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
20
23
|
display: 'flex',
|
|
21
24
|
flex: 1,
|
|
22
25
|
flexDirection: 'row',
|
|
23
|
-
backgroundColor: tokens.colorNeutralBackground2,
|
|
26
|
+
backgroundColor: react_components_1.tokens.colorNeutralBackground2,
|
|
24
27
|
overflow: 'hidden',
|
|
25
|
-
}, children: [
|
|
28
|
+
}, children: [(0, jsx_runtime_1.jsx)(RecordSetNavigatorContainer_1.RecordSetNavigatorContainer, {}), (0, jsx_runtime_1.jsx)(PageEntityFormDesktopContainer_1.PageEntityFormDesktopContainer, {})] }) }));
|
|
26
29
|
};
|
|
30
|
+
exports.PageEntityForm = PageEntityForm;
|