@headless-adminapp/fluent 0.0.17-alpha.50 → 0.0.17-alpha.53
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 +7 -11
- package/App/AppHeaderContianer.js +38 -41
- package/App/AppLogo.js +8 -12
- package/App/AppStringContext.js +9 -13
- package/App/AppUI.js +11 -15
- package/App/LayoutProvider.js +11 -15
- package/App/NavigationContainer.js +27 -28
- package/App/QuickActionItem.js +5 -9
- package/App/index.js +1 -5
- package/App/utils.js +1 -4
- package/CommandBar/Button.js +14 -17
- package/CommandBar/Divider.js +6 -9
- package/CommandBar/IconButton.js +13 -16
- package/CommandBar/Label.js +8 -11
- package/CommandBar/MenuButton.js +17 -20
- package/CommandBar/MenuItem.js +15 -18
- package/CommandBar/MenuItems.js +10 -10
- package/CommandBar/MenuList.js +9 -12
- package/CommandBar/Wrapper.js +7 -10
- package/CommandBar/index.js +13 -15
- package/DataForm/SectionControl.js +4 -7
- package/DataGrid/ActionCell.js +11 -14
- package/DataGrid/CommandContainer.js +6 -10
- package/DataGrid/CustomizeColumns/AddColumns.js +34 -37
- package/DataGrid/CustomizeColumns/ColumnItem.js +19 -23
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +36 -42
- package/DataGrid/CustomizeColumns/index.js +1 -5
- package/DataGrid/FormSubgridCommandContainer.js +13 -17
- package/DataGrid/FormSubgridViewSelector.js +18 -22
- package/DataGrid/GridColumnHeader/ConditionValueControl.js +14 -20
- package/DataGrid/GridColumnHeader/FilterForm.js +24 -28
- package/DataGrid/GridColumnHeader/OperatorSelect.js +13 -19
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +44 -40
- package/DataGrid/GridColumnHeader/index.js +1 -5
- package/DataGrid/GridColumnHeader/utils.js +12 -13
- package/DataGrid/GridHeaderContainer.js +4 -8
- package/DataGrid/GridHeaderDesktop.js +26 -30
- package/DataGrid/GridHeaderMobile.js +17 -21
- package/DataGrid/GridListContainer.js +39 -43
- package/DataGrid/GridPaginationContainer.js +12 -16
- package/DataGrid/GridTableContainer.js +75 -79
- package/DataGrid/TableCell/TableCellAction.js +11 -15
- package/DataGrid/TableCell/TableCellBase.d.ts +2 -2
- package/DataGrid/TableCell/TableCellBase.js +4 -8
- package/DataGrid/TableCell/TableCellCheckbox.js +7 -10
- package/DataGrid/TableCell/TableCellChoice.js +11 -14
- package/DataGrid/TableCell/TableCellLink.d.ts +1 -1
- package/DataGrid/TableCell/TableCellLink.js +13 -12
- package/DataGrid/TableCell/TableCellText.js +7 -10
- package/DataGrid/TableCell/index.js +4 -20
- package/DataGrid/index.js +4 -11
- package/DataGrid/types.js +1 -2
- package/DataGrid/useTableColumns.js +139 -90
- package/DataGrid/utils.js +1 -5
- package/DialogContainer/AlertDialog.js +5 -8
- package/DialogContainer/ConfirmDialog.js +6 -9
- package/DialogContainer/DialogContainer.js +14 -18
- package/DialogContainer/ErrorDialog.js +9 -12
- package/DialogContainer/PromptDialog.js +30 -57
- package/DialogContainer/index.js +1 -5
- package/Insights/CommandBarContainer.js +11 -14
- package/Insights/FilterBarContainer.js +17 -20
- package/Insights/Grid.js +9 -13
- package/Insights/InsightsContainer.js +19 -22
- package/Insights/WidgetChartContainer.js +30 -34
- package/Insights/WidgetDataGridContainer.js +32 -35
- package/Insights/WidgetTableContainer.js +25 -29
- package/Insights/WidgetTileContainer.js +12 -16
- package/Insights/WidgetTitleBar.js +9 -15
- package/Insights/Widgets.d.ts +2 -2
- package/Insights/Widgets.js +25 -28
- package/Insights/charts/AreaChart.js +12 -15
- package/Insights/charts/BarChart.d.ts +2 -2
- package/Insights/charts/BarChart.js +12 -16
- package/Insights/charts/ComposedChart.js +12 -15
- package/Insights/charts/CustomTooltipContent.js +9 -13
- package/Insights/charts/GaugeChart.js +3 -6
- package/Insights/charts/LineChart.d.ts +2 -2
- package/Insights/charts/LineChart.js +12 -15
- package/Insights/charts/OhlcChart.d.ts +2 -2
- package/Insights/charts/OhlcChart.js +56 -57
- package/Insights/charts/PieChart.d.ts +2 -2
- package/Insights/charts/PieChart.js +36 -34
- package/Insights/charts/RadarChart.d.ts +2 -2
- package/Insights/charts/RadarChart.js +30 -27
- package/Insights/charts/ScatterChart.d.ts +2 -2
- package/Insights/charts/ScatterChart.js +25 -27
- package/Insights/charts/constants.js +1 -4
- package/Insights/charts/formatters.d.ts +1 -1
- package/Insights/charts/formatters.js +17 -29
- package/Insights/charts/index.js +1 -2
- package/Insights/charts/renderers.js +25 -36
- package/Insights/hooks/useQueriesData.js +19 -25
- package/Insights/hooks/useWidgetDetail.js +13 -16
- package/OverflowCommandBar/OverflowCommandBar.js +12 -19
- package/OverflowCommandBar/OverflowMenu.js +17 -21
- package/OverflowCommandBar/OverflowMenuDivider.js +6 -10
- package/OverflowCommandBar/index.js +3 -9
- package/OverflowCommandBar/render.js +9 -15
- package/OverflowCommandBar/utils.js +1 -4
- package/PageBoard/BoardColumn.js +5 -8
- package/PageBoard/BoardColumnCard.js +12 -15
- package/PageBoard/BoardColumnUI.js +34 -38
- package/PageBoard/BoardingColumnCardLoading.js +10 -13
- package/PageBoard/Header.js +16 -20
- package/PageBoard/PageBoard.d.ts +1 -1
- package/PageBoard/PageBoard.js +26 -29
- package/PageBoard/index.js +1 -5
- package/PageEntityForm/CommandContainer.js +21 -25
- package/PageEntityForm/FormTabRelated.js +17 -20
- package/PageEntityForm/PageEntityForm.js +16 -20
- package/PageEntityForm/PageEntityFormDesktopContainer.js +68 -72
- package/PageEntityForm/PageEntityFormStringContext.js +5 -9
- package/PageEntityForm/ProcessFlow.js +21 -24
- package/PageEntityForm/RecordCard.js +38 -45
- package/PageEntityForm/RecordCardLoading.js +10 -13
- package/PageEntityForm/RecordSetNavigatorContainer.js +30 -34
- package/PageEntityForm/RelatedViewSelector.js +28 -31
- package/PageEntityForm/SectionContainer.js +25 -28
- package/PageEntityForm/StandardControl.d.ts +3 -3
- package/PageEntityForm/StandardControl.js +74 -81
- package/PageEntityForm/SubgridControl.js +20 -23
- package/PageEntityForm/index.js +1 -5
- package/PageEntityView/FormSubgridContainer.js +22 -26
- package/PageEntityView/PageEntityView.js +15 -19
- package/PageEntityView/PageEntityViewDesktopContainer.js +9 -13
- package/PageEntityView/PageEntityViewDesktopFrame.js +17 -21
- package/PageEntityView/PageEntityViewMobileContainer.js +9 -13
- package/PageEntityView/PageEntityViewStringContext.js +5 -9
- package/PageEntityView/index.js +1 -5
- package/PageInsights/PageInsights.js +9 -13
- package/PageInsights/index.js +1 -6
- package/ProgressIndicatorContainer/index.js +10 -14
- package/ToastNotificationContainer/index.js +14 -18
- package/componentStore.js +2 -5
- package/components/BodyLoading.js +7 -11
- package/components/DialogLogin.js +5 -8
- package/components/LoginForm.js +21 -47
- package/components/PageBroken.js +5 -8
- package/components/PageLoading.js +5 -8
- package/components/PageLogin.js +14 -17
- package/form/FormControl.js +39 -55
- package/form/FormControlLoading.js +4 -8
- package/form/controls/AttachmentControl.js +56 -60
- package/form/controls/AttachmentsControl.js +15 -19
- package/form/controls/CurrencyControl.js +10 -13
- package/form/controls/DateControl.js +18 -24
- package/form/controls/DateRangeControl.js +14 -20
- package/form/controls/DateTimeControl.js +39 -45
- package/form/controls/DecimalControl.js +8 -11
- package/form/controls/DurationControl.js +11 -15
- package/form/controls/EmailControl.js +7 -10
- package/form/controls/IntegerControl.js +4 -7
- package/form/controls/LookupControl.d.ts +1 -0
- package/form/controls/LookupControl.js +75 -38
- package/form/controls/MultiSelectControl.js +8 -11
- package/form/controls/MultiSelectLookupControl.js +40 -43
- package/form/controls/PasswordControl.js +8 -11
- package/form/controls/RichTextControl.js +5 -32
- package/form/controls/SelectControl.js +8 -11
- package/form/controls/SwitchControl.js +4 -7
- package/form/controls/TelephoneControl.js +7 -10
- package/form/controls/TextAreaControl.js +4 -7
- package/form/controls/TextControl.js +5 -8
- package/form/controls/UrlControl.js +7 -10
- package/form/controls/types.js +1 -2
- package/form/controls/useLookupData.js +14 -18
- package/form/layout/FormBody/FormBody.js +6 -10
- package/form/layout/FormBody/index.js +1 -17
- package/form/layout/FormSection/FormSection.js +18 -22
- package/form/layout/FormSection/FormSectionColumn.js +3 -7
- package/form/layout/FormSection/FormSectionLoading.js +1 -5
- package/form/layout/FormSection/index.js +1 -5
- package/form/layout/FormTab/FormTab.js +16 -20
- package/form/layout/FormTab/FormTabColumn.js +5 -9
- package/form/layout/FormTab/index.js +1 -5
- package/form/layout/TabContext.js +2 -5
- package/form/layout/index.js +3 -9
- package/form/types.js +1 -2
- package/package.json +3 -2
- package/types/index.js +1 -2
- package/utils/avatar.d.ts +2 -0
- package/utils/avatar.js +42 -0
|
@@ -1,65 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.renderArea = renderArea;
|
|
9
|
-
exports.renderAreas = renderAreas;
|
|
10
|
-
exports.renderBar = renderBar;
|
|
11
|
-
exports.renderBars = renderBars;
|
|
12
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
13
|
-
const react_components_1 = require("@fluentui/react-components");
|
|
14
|
-
const recharts_1 = require("recharts");
|
|
15
|
-
const formatters_1 = require("./formatters");
|
|
16
|
-
function renderXAxis(axis, forceCategory = false) {
|
|
17
|
-
const xAxisFormatter = (0, formatters_1.createAxisFormatter)(axis.tick);
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: axis.dataKey, name: axis.name, tickFormatter: xAxisFormatter, tickLine: false, minTickGap: 10,
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tokens } from '@fluentui/react-components';
|
|
3
|
+
import { Area, Bar, CartesianGrid, Line, XAxis as XAxisInternal, YAxis as YAxisInternal, } from 'recharts';
|
|
4
|
+
import { createAxisFormatter } from './formatters';
|
|
5
|
+
export function renderXAxis(axis, forceCategory = false) {
|
|
6
|
+
const xAxisFormatter = createAxisFormatter(axis.tick);
|
|
7
|
+
return (_jsx(XAxisInternal, { dataKey: axis.dataKey, name: axis.name, tickFormatter: xAxisFormatter, tickLine: false, minTickGap: 10,
|
|
19
8
|
// padding={{ left: 10, right: 10 }}
|
|
20
9
|
padding: "gap", axisLine: {
|
|
21
|
-
stroke:
|
|
22
|
-
}, fontSize:
|
|
23
|
-
fill:
|
|
10
|
+
stroke: tokens.colorNeutralBackground6,
|
|
11
|
+
}, fontSize: tokens.fontSizeBase100, tick: {
|
|
12
|
+
fill: tokens.colorNeutralForeground1,
|
|
24
13
|
opacity: 0.5,
|
|
25
14
|
}, scale: !forceCategory && axis.tick.type === 'time' ? 'time' : 'auto', type: forceCategory || axis.tick.type === 'category' ? 'category' : 'number', domain: axis.domain, height: 16 }));
|
|
26
15
|
}
|
|
27
|
-
function renderYAxis(axis) {
|
|
28
|
-
const yAxisFormatter =
|
|
29
|
-
return ((
|
|
30
|
-
fill:
|
|
16
|
+
export function renderYAxis(axis) {
|
|
17
|
+
const yAxisFormatter = createAxisFormatter(axis.tick);
|
|
18
|
+
return (_jsx(YAxisInternal, { yAxisId: "left", dataKey: axis.dataKey, tickFormatter: yAxisFormatter, name: axis.name, tickLine: false, fontSize: tokens.fontSizeBase100, axisLine: false, tickMargin: 0, minTickGap: 0, accentHeight: 0, width: 40, scale: "auto", type: "number", domain: axis.domain, tick: {
|
|
19
|
+
fill: tokens.colorNeutralForeground1,
|
|
31
20
|
opacity: 0.5,
|
|
32
21
|
} }));
|
|
33
22
|
}
|
|
34
|
-
function renderGrid() {
|
|
35
|
-
return ((
|
|
23
|
+
export function renderGrid() {
|
|
24
|
+
return (_jsx(CartesianGrid, { strokeDasharray: "8 4", vertical: false, strokeWidth: 0.2, stroke: tokens.colorNeutralBackground6 }));
|
|
36
25
|
}
|
|
37
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
-
function renderLine(line, dataset) {
|
|
27
|
+
export function renderLine(line, dataset) {
|
|
39
28
|
var _a;
|
|
40
|
-
return ((
|
|
29
|
+
return (_jsx(Line, { yAxisId: 'left', type: line.curveType, data: dataset[(_a = line.dataIndex) !== null && _a !== void 0 ? _a : 0], dataKey: line.dataKey, name: line.dataLabel, stroke: line.color, strokeWidth: 2, dot: false, activeDot: {
|
|
41
30
|
stroke: line.color,
|
|
42
31
|
} }, line.dataKey));
|
|
43
32
|
}
|
|
44
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
-
function renderLines(lines, dataset) {
|
|
34
|
+
export function renderLines(lines, dataset) {
|
|
46
35
|
return lines.map((line) => renderLine(line, dataset));
|
|
47
36
|
}
|
|
48
37
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
49
|
-
function renderArea(area, dataset) {
|
|
50
|
-
return ((
|
|
38
|
+
export function renderArea(area, dataset) {
|
|
39
|
+
return (_jsx(Area, { yAxisId: 'left', type: area.curveType, dataKey: area.dataKey, name: area.dataLabel, stroke: area.color, fill: area.color, strokeWidth: 1, dot: false, activeDot: {
|
|
51
40
|
stroke: area.color,
|
|
52
41
|
} }, area.dataKey));
|
|
53
42
|
}
|
|
54
43
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
-
function renderAreas(areas, dataset) {
|
|
44
|
+
export function renderAreas(areas, dataset) {
|
|
56
45
|
return areas.map((area) => renderArea(area, dataset));
|
|
57
46
|
}
|
|
58
47
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
59
|
-
function renderBar(bar, dataset) {
|
|
60
|
-
return ((
|
|
48
|
+
export function renderBar(bar, dataset) {
|
|
49
|
+
return (_jsx(Bar, { yAxisId: 'left', type: bar.curveType, dataKey: bar.dataKey, name: bar.dataLabel, stroke: bar.color, fill: bar.color, strokeWidth: 1, stackId: bar.stackId }, bar.dataKey));
|
|
61
50
|
}
|
|
62
51
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
function renderBars(bars, dataset) {
|
|
52
|
+
export function renderBars(bars, dataset) {
|
|
64
53
|
return bars.map((bar) => renderBar(bar, dataset));
|
|
65
54
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,24 +7,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
function useQueriesData(queries) {
|
|
25
|
-
const dataService = (0, transport_1.useDataService)();
|
|
26
|
-
const insightsState = (0, mutable_1.useContextSelector)(insights_1.InsightsContext, (state) => state);
|
|
27
|
-
const widgetState = (0, mutable_1.useContextSelector)(widget_1.WidgetContext, (state) => state);
|
|
28
|
-
const resolvedQueries = (0, react_1.useMemo)(() => {
|
|
10
|
+
import { InsightsContext } from '@headless-adminapp/app/insights';
|
|
11
|
+
import { useContextSelector } from '@headless-adminapp/app/mutable';
|
|
12
|
+
import { useDataService } from '@headless-adminapp/app/transport';
|
|
13
|
+
import { WidgetContext } from '@headless-adminapp/app/widget';
|
|
14
|
+
import { AggregateAttributeFunction, } from '@headless-adminapp/core/transport';
|
|
15
|
+
import { useQueries } from '@tanstack/react-query';
|
|
16
|
+
import dayjs from 'dayjs';
|
|
17
|
+
import { useMemo } from 'react';
|
|
18
|
+
export function useQueriesData(queries) {
|
|
19
|
+
const dataService = useDataService();
|
|
20
|
+
const insightsState = useContextSelector(InsightsContext, (state) => state);
|
|
21
|
+
const widgetState = useContextSelector(WidgetContext, (state) => state);
|
|
22
|
+
const resolvedQueries = useMemo(() => {
|
|
29
23
|
return queries.map((item) => {
|
|
30
24
|
if (typeof item === 'function') {
|
|
31
25
|
console.log('temp.item', item, item(insightsState, widgetState));
|
|
@@ -34,7 +28,7 @@ function useQueriesData(queries) {
|
|
|
34
28
|
return item;
|
|
35
29
|
});
|
|
36
30
|
}, [queries, insightsState, widgetState]);
|
|
37
|
-
const result =
|
|
31
|
+
const result = useQueries({
|
|
38
32
|
queries: resolvedQueries.map((item) => ({
|
|
39
33
|
queryKey: ['insights', 'aggregate', item],
|
|
40
34
|
queryFn: () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -57,7 +51,7 @@ function useQueriesData(queries) {
|
|
|
57
51
|
const isPending = result.some((r) => r.isPending);
|
|
58
52
|
const isFetching = result.some((r) => r.isFetching);
|
|
59
53
|
const refetch = () => result.map((r) => r.refetch());
|
|
60
|
-
const data =
|
|
54
|
+
const data = useMemo(() => {
|
|
61
55
|
return result.map((r) => r.data);
|
|
62
56
|
}, [result]);
|
|
63
57
|
return { isPending, isFetching, dataset: data, refetch };
|
|
@@ -78,19 +72,19 @@ function getAttributeValueTransformer(attribute) {
|
|
|
78
72
|
let transformer = undefined;
|
|
79
73
|
if (attribute.type === 'date') {
|
|
80
74
|
if (attribute.format) {
|
|
81
|
-
transformer = (value) => (
|
|
75
|
+
transformer = (value) => dayjs(value, attribute.format)
|
|
82
76
|
.toDate()
|
|
83
77
|
.getTime();
|
|
84
78
|
}
|
|
85
79
|
else if (attribute.value.type === 'function') {
|
|
86
|
-
if (attribute.value.value ===
|
|
87
|
-
transformer = (value) => (
|
|
80
|
+
if (attribute.value.value === AggregateAttributeFunction.YearMonth) {
|
|
81
|
+
transformer = (value) => dayjs(value, 'YYYY-MM')
|
|
88
82
|
.toDate()
|
|
89
83
|
.getTime();
|
|
90
84
|
}
|
|
91
85
|
}
|
|
92
86
|
else {
|
|
93
|
-
transformer = (value) => (
|
|
87
|
+
transformer = (value) => dayjs(value)
|
|
94
88
|
.toDate()
|
|
95
89
|
.getTime();
|
|
96
90
|
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const useQueriesData_1 = require("./useQueriesData");
|
|
10
|
-
function useWidgetDetail(widgetContent) {
|
|
11
|
-
const widgetState = (0, mutable_1.useContextSelector)(widget_1.WidgetContext, (state) => state);
|
|
1
|
+
import { useCommands } from '@headless-adminapp/app/command';
|
|
2
|
+
import { useBaseCommandHandlerContext } from '@headless-adminapp/app/command/hooks';
|
|
3
|
+
import { useContextSelector, useContextSetValue, } from '@headless-adminapp/app/mutable';
|
|
4
|
+
import { WidgetContext } from '@headless-adminapp/app/widget';
|
|
5
|
+
import { useCallback } from 'react';
|
|
6
|
+
import { useQueriesData } from './useQueriesData';
|
|
7
|
+
export function useWidgetDetail(widgetContent) {
|
|
8
|
+
const widgetState = useContextSelector(WidgetContext, (state) => state);
|
|
12
9
|
const widget = widgetState.widget;
|
|
13
|
-
const widgetSetValue =
|
|
14
|
-
const { dataset, isPending, isFetching, refetch } =
|
|
15
|
-
const baseCommandHandleContext =
|
|
16
|
-
const updateStateValue =
|
|
10
|
+
const widgetSetValue = useContextSetValue(WidgetContext);
|
|
11
|
+
const { dataset, isPending, isFetching, refetch } = useQueriesData(widget.dataset);
|
|
12
|
+
const baseCommandHandleContext = useBaseCommandHandlerContext();
|
|
13
|
+
const updateStateValue = useCallback(
|
|
17
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
15
|
(value) => {
|
|
19
16
|
widgetSetValue((state) => (Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, state.data), value) })));
|
|
20
17
|
}, [widgetSetValue]);
|
|
21
|
-
const transformedCommands =
|
|
18
|
+
const transformedCommands = useCommands([widgetContent.commands], Object.assign(Object.assign({}, baseCommandHandleContext), { primaryControl: {
|
|
22
19
|
refresh: refetch,
|
|
23
20
|
updateStateValue,
|
|
24
21
|
} }));
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const CommandBar_1 = __importDefault(require("../CommandBar"));
|
|
12
|
-
const OverflowMenu_1 = require("./OverflowMenu");
|
|
13
|
-
const render_1 = require("./render");
|
|
14
|
-
const OverflowCommandBar = ({ commands, align = 'start', afterDivider, beforeDivider, }) => {
|
|
15
|
-
const { language } = (0, locale_1.useLocale)();
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Overflow, { children: (0, jsx_runtime_1.jsxs)(CommandBar_1.default.Wrapper, { overflow: "hidden", align: align, children: [beforeDivider && (0, jsx_runtime_1.jsx)(CommandBar_1.default.Divider, {}), commands.map((group, groupIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [groupIndex > 0 && ((0, jsx_runtime_1.jsx)(react_components_1.OverflowDivider, { groupId: String(groupIndex - 1), children: (0, jsx_runtime_1.jsx)(CommandBar_1.default.Divider, {}) })), group.map((item, index) => {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Overflow, OverflowDivider, OverflowItem, } from '@fluentui/react-components';
|
|
3
|
+
import { useLocale } from '@headless-adminapp/app/locale';
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
|
+
import CommandBar from '../CommandBar';
|
|
6
|
+
import { OverflowMenu } from './OverflowMenu';
|
|
7
|
+
import { renderCommandItem } from './render';
|
|
8
|
+
export const OverflowCommandBar = ({ commands, align = 'start', afterDivider, beforeDivider, }) => {
|
|
9
|
+
const { language } = useLocale();
|
|
10
|
+
return (_jsx(Overflow, { children: _jsxs(CommandBar.Wrapper, { overflow: "hidden", align: align, children: [beforeDivider && _jsx(CommandBar.Divider, {}), commands.map((group, groupIndex) => (_jsxs(Fragment, { children: [groupIndex > 0 && (_jsx(OverflowDivider, { groupId: String(groupIndex - 1), children: _jsx(CommandBar.Divider, {}) })), group.map((item, index) => {
|
|
17
11
|
const commandType = item.type;
|
|
18
12
|
switch (item.type) {
|
|
19
13
|
case 'menu':
|
|
20
14
|
case 'button':
|
|
21
15
|
case 'label':
|
|
22
16
|
case 'icon':
|
|
23
|
-
return ((
|
|
17
|
+
return (_jsx(OverflowItem, { id: `${groupIndex}-${index}`, groupId: String(groupIndex), children: renderCommandItem(`${groupIndex}-${index}`, item, language) }, `${groupIndex}-${index}`));
|
|
24
18
|
default:
|
|
25
19
|
throw new Error(`Unknown command type: ${commandType}`);
|
|
26
20
|
}
|
|
27
|
-
})] }, groupIndex))), (
|
|
21
|
+
})] }, groupIndex))), _jsx(OverflowMenu, { items: commands }), afterDivider && _jsx(CommandBar.Divider, {})] }) }));
|
|
28
22
|
};
|
|
29
|
-
exports.OverflowCommandBar = OverflowCommandBar;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
2
|
var t = {};
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -10,36 +9,33 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
9
|
}
|
|
11
10
|
return t;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const { ref, isOverflowing } = (0, react_components_1.useOverflowMenu)();
|
|
25
|
-
const { language } = (0, locale_1.useLocale)();
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Menu, MenuList, MenuPopover, MenuTrigger, ToolbarButton, useIsOverflowItemVisible, useOverflowMenu, } from '@fluentui/react-components';
|
|
14
|
+
import { useLocale } from '@headless-adminapp/app/locale';
|
|
15
|
+
import { Icons } from '@headless-adminapp/icons';
|
|
16
|
+
import { Fragment } from 'react';
|
|
17
|
+
import { MenuItem } from '../CommandBar/MenuItem';
|
|
18
|
+
import { OverflowMenuDivider } from './OverflowMenuDivider';
|
|
19
|
+
import { transformMenuItems } from './utils';
|
|
20
|
+
export const OverflowMenu = ({ items, }) => {
|
|
21
|
+
const { ref, isOverflowing } = useOverflowMenu();
|
|
22
|
+
const { language } = useLocale();
|
|
26
23
|
if (!isOverflowing) {
|
|
27
24
|
return null;
|
|
28
25
|
}
|
|
29
|
-
return ((
|
|
26
|
+
return (_jsxs(Menu, { positioning: "below-end", hasIcons: true, children: [_jsx(MenuTrigger, { disableButtonEnhancement: true, children: _jsx(ToolbarButton, { ref: ref, type: "button", icon: _jsx(Icons.MoreHorizontal, {}) }) }), _jsx(MenuPopover, { children: _jsx(MenuList, { children: items.map((group, groupIndex) => (_jsxs(Fragment, { children: [groupIndex > 0 && (_jsx(OverflowMenuDivider, { id: String(groupIndex), previousGroupId: String(groupIndex - 1) })), group.map((item, index) => {
|
|
30
27
|
var _a, _b;
|
|
31
28
|
const text = 'text' in item ? (_a = item.text) !== null && _a !== void 0 ? _a : '' : '';
|
|
32
|
-
return ((
|
|
33
|
-
? (_b = item.items) === null || _b === void 0 ? void 0 : _b.map((x) =>
|
|
34
|
-
: undefined }, index));
|
|
29
|
+
return (_jsx(OverflowMenuItem, { id: `${groupIndex}-${index}`, Icon: item.Icon, onClick: item.type !== 'label' ? item.onClick : undefined, text: text, danger: item.danger, disabled: item.type !== 'label' ? item.disabled : undefined, items: item.type === 'menu'
|
|
30
|
+
? (_b = item.items) === null || _b === void 0 ? void 0 : _b.map((x) => transformMenuItems(x, language))
|
|
31
|
+
: undefined }, `${groupIndex}-${index}`));
|
|
35
32
|
})] }, groupIndex))) }) })] }));
|
|
36
33
|
};
|
|
37
|
-
exports.OverflowMenu = OverflowMenu;
|
|
38
34
|
const OverflowMenuItem = (props) => {
|
|
39
35
|
const { id } = props, rest = __rest(props, ["id"]);
|
|
40
|
-
const isVisible =
|
|
36
|
+
const isVisible = useIsOverflowItemVisible(id);
|
|
41
37
|
if (isVisible) {
|
|
42
38
|
return null;
|
|
43
39
|
}
|
|
44
|
-
return (
|
|
40
|
+
return _jsx(MenuItem, Object.assign({}, rest));
|
|
45
41
|
};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const OverflowMenuDivider = (props) => {
|
|
7
|
-
const isGroupVisible = (0, react_components_1.useIsOverflowGroupVisible)(props.id);
|
|
8
|
-
const isPreviousGroupVisible = (0, react_components_1.useIsOverflowGroupVisible)(props.previousGroupId);
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MenuDivider, useIsOverflowGroupVisible, } from '@fluentui/react-components';
|
|
3
|
+
export const OverflowMenuDivider = (props) => {
|
|
4
|
+
const isGroupVisible = useIsOverflowGroupVisible(props.id);
|
|
5
|
+
const isPreviousGroupVisible = useIsOverflowGroupVisible(props.previousGroupId);
|
|
9
6
|
if (isGroupVisible !== 'hidden' || isPreviousGroupVisible === 'visible') {
|
|
10
7
|
return null;
|
|
11
8
|
}
|
|
12
|
-
return (
|
|
9
|
+
return _jsx(MenuDivider, {});
|
|
13
10
|
};
|
|
14
|
-
exports.OverflowMenuDivider = OverflowMenuDivider;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var OverflowCommandBar_1 = require("./OverflowCommandBar");
|
|
5
|
-
Object.defineProperty(exports, "OverflowCommandBar", { enumerable: true, get: function () { return OverflowCommandBar_1.OverflowCommandBar; } });
|
|
6
|
-
var utils_1 = require("./utils");
|
|
7
|
-
Object.defineProperty(exports, "transformMenuItems", { enumerable: true, get: function () { return utils_1.transformMenuItems; } });
|
|
8
|
-
var render_1 = require("./render");
|
|
9
|
-
Object.defineProperty(exports, "renderCommandItem", { enumerable: true, get: function () { return render_1.renderCommandItem; } });
|
|
1
|
+
export { OverflowCommandBar } from './OverflowCommandBar';
|
|
2
|
+
export { transformMenuItems } from './utils';
|
|
3
|
+
export { renderCommandItem } from './render';
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.renderCommandItem = renderCommandItem;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const CommandBar_1 = __importDefault(require("../CommandBar"));
|
|
9
|
-
const MenuButton_1 = require("../CommandBar/MenuButton");
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
function renderCommandItem(key, item, language) {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CommandBar from '../CommandBar';
|
|
3
|
+
import { CommandMenuButton } from '../CommandBar/MenuButton';
|
|
4
|
+
import { transformMenuItems } from './utils';
|
|
5
|
+
export function renderCommandItem(key, item, language) {
|
|
12
6
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
13
7
|
const commandType = item.type;
|
|
14
8
|
switch (item.type) {
|
|
15
9
|
case 'menu':
|
|
16
|
-
return ((
|
|
10
|
+
return (_jsx(CommandMenuButton, { Icon: item.Icon, text: (_c = (_b = (_a = item.localizedTexts) === null || _a === void 0 ? void 0 : _a[language]) !== null && _b !== void 0 ? _b : item.text) !== null && _c !== void 0 ? _c : '', danger: item.danger, disabled: item.disabled, onClick: item.onClick, items: (_d = item.items) === null || _d === void 0 ? void 0 : _d.map((x) => transformMenuItems(x, language)) }, key));
|
|
17
11
|
case 'button':
|
|
18
|
-
return ((
|
|
12
|
+
return (_jsx(CommandBar.Button, { text: (_g = (_f = (_e = item.localizedTexts) === null || _e === void 0 ? void 0 : _e[language]) !== null && _f !== void 0 ? _f : item.text) !== null && _g !== void 0 ? _g : '', Icon: item.Icon, iconPosition: (_h = item.iconPosition) !== null && _h !== void 0 ? _h : 'before', danger: item.danger, disabled: item.disabled, onClick: item.onClick }, key));
|
|
19
13
|
case 'label':
|
|
20
|
-
return ((
|
|
14
|
+
return (_jsx(CommandBar.Label, { text: (_l = (_k = (_j = item.localizedTexts) === null || _j === void 0 ? void 0 : _j[language]) !== null && _k !== void 0 ? _k : item.text) !== null && _l !== void 0 ? _l : '', Icon: item.Icon }, key));
|
|
21
15
|
case 'icon':
|
|
22
|
-
return ((
|
|
16
|
+
return (_jsx(CommandBar.IconButton, { Icon: item.Icon, danger: item.danger, disabled: item.disabled, onClick: item.onClick }, key));
|
|
23
17
|
default:
|
|
24
18
|
throw new Error(`Unknown command type: ${commandType}`);
|
|
25
19
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformMenuItems = transformMenuItems;
|
|
4
1
|
function transformMenuItem(item, language) {
|
|
5
2
|
var _a, _b, _c, _d;
|
|
6
3
|
return {
|
|
@@ -12,6 +9,6 @@ function transformMenuItem(item, language) {
|
|
|
12
9
|
items: (_d = item.items) === null || _d === void 0 ? void 0 : _d.map((x) => transformMenuItems(x, language)),
|
|
13
10
|
};
|
|
14
11
|
}
|
|
15
|
-
function transformMenuItems(items, language) {
|
|
12
|
+
export function transformMenuItems(items, language) {
|
|
16
13
|
return items.map((x) => transformMenuItem(x, language));
|
|
17
14
|
}
|
package/PageBoard/BoardColumn.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const BoardColumnUI_1 = require("./BoardColumnUI");
|
|
7
|
-
function BoardColumn(props) {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(BoardColumnProvider_1.BoardColumnProvider, { config: props.config, children: (0, jsx_runtime_1.jsx)(BoardColumnUI_1.BoardColumnUI, {}) }));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BoardColumnProvider } from '@headless-adminapp/app/board/BoardColumnProvider';
|
|
3
|
+
import { BoardColumnUI } from './BoardColumnUI';
|
|
4
|
+
export function BoardColumn(props) {
|
|
5
|
+
return (_jsx(BoardColumnProvider, { config: props.config, children: _jsx(BoardColumnUI, {}) }));
|
|
9
6
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
function BoardColumnCard({ record, canDrag, columnId, PreviewComponent, schema, }) {
|
|
9
|
-
const ref = (0, react_1.useRef)(null);
|
|
10
|
-
const [{ isDragging }, drag] = (0, react_dnd_1.useDrag)({
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tokens } from '@fluentui/react-components';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { useDrag } from 'react-dnd';
|
|
5
|
+
export function BoardColumnCard({ record, canDrag, columnId, PreviewComponent, schema, }) {
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const [{ isDragging }, drag] = useDrag({
|
|
11
8
|
type: columnId,
|
|
12
9
|
canDrag,
|
|
13
10
|
item: () => {
|
|
@@ -18,11 +15,11 @@ function BoardColumnCard({ record, canDrag, columnId, PreviewComponent, schema,
|
|
|
18
15
|
}),
|
|
19
16
|
});
|
|
20
17
|
drag(ref);
|
|
21
|
-
return ((
|
|
18
|
+
return (_jsx("div", { ref: ref, style: {
|
|
22
19
|
display: 'flex',
|
|
23
|
-
background:
|
|
24
|
-
borderRadius:
|
|
25
|
-
boxShadow:
|
|
20
|
+
background: tokens.colorNeutralBackground1,
|
|
21
|
+
borderRadius: tokens.borderRadiusLarge,
|
|
22
|
+
boxShadow: tokens.shadow4,
|
|
26
23
|
opacity: isDragging ? 0.5 : 1,
|
|
27
|
-
}, children: (
|
|
24
|
+
}, children: _jsx(PreviewComponent, { record: record }) }));
|
|
28
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,28 +7,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const ref = (0, react_1.useRef)(null);
|
|
32
|
-
const [{ handlerId, over, canDrop }, drop] = (0, react_dnd_1.useDrop)({
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Body1Strong, tokens } from '@fluentui/react-components';
|
|
12
|
+
import { BoardColumnContext } from '@headless-adminapp/app/board/context';
|
|
13
|
+
import { useBoardColumnConfig, useBoardColumnData, useBoardColumnDataState, useBoardConfig, } from '@headless-adminapp/app/board/hooks';
|
|
14
|
+
import { useBaseCommandHandlerContext } from '@headless-adminapp/app/command/hooks';
|
|
15
|
+
import { ScrollbarWithMoreDataRequest } from '@headless-adminapp/app/components/ScrollbarWithMoreDataRequest';
|
|
16
|
+
import { useContextSelector } from '@headless-adminapp/app/mutable/context';
|
|
17
|
+
import { useMemo, useRef } from 'react';
|
|
18
|
+
import { useDrop } from 'react-dnd';
|
|
19
|
+
import { BoardColumnCard } from './BoardColumnCard';
|
|
20
|
+
import { BoardingColumnCardLoading } from './BoardingColumnCardLoading';
|
|
21
|
+
export const BoardColumnUI = () => {
|
|
22
|
+
const data = useBoardColumnData();
|
|
23
|
+
const dataState = useBoardColumnDataState();
|
|
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);
|
|
29
|
+
const [{ handlerId, over, canDrop }, drop] = useDrop({
|
|
33
30
|
accept: acceptSourceIds,
|
|
34
31
|
collect(monitor) {
|
|
35
32
|
return {
|
|
@@ -48,34 +45,33 @@ const BoardColumnUI = () => {
|
|
|
48
45
|
}))().catch(console.error);
|
|
49
46
|
},
|
|
50
47
|
});
|
|
51
|
-
const canDrag =
|
|
48
|
+
const canDrag = useMemo(() => {
|
|
52
49
|
return columnConfigs.some((config) => config.acceptSourceIds.length > 0);
|
|
53
50
|
}, [columnConfigs]);
|
|
54
51
|
drop(ref);
|
|
55
|
-
return ((
|
|
52
|
+
return (_jsxs("div", { ref: ref, style: {
|
|
56
53
|
display: 'flex',
|
|
57
54
|
flexDirection: 'column',
|
|
58
55
|
flex: 1,
|
|
59
|
-
borderRadius:
|
|
56
|
+
borderRadius: tokens.borderRadiusXLarge,
|
|
60
57
|
outline: over
|
|
61
|
-
? `2px dashed ${
|
|
58
|
+
? `2px dashed ${tokens.colorBrandBackground}`
|
|
62
59
|
: canDrop
|
|
63
|
-
? `2px dashed ${
|
|
60
|
+
? `2px dashed ${tokens.colorNeutralStroke1}`
|
|
64
61
|
: 'none',
|
|
65
62
|
outlineOffset: -5,
|
|
66
|
-
paddingTop:
|
|
67
|
-
}, "data-handler-id": handlerId, children: [(
|
|
63
|
+
paddingTop: tokens.spacingVerticalS,
|
|
64
|
+
}, "data-handler-id": handlerId, children: [_jsx("div", { style: {
|
|
68
65
|
display: 'flex',
|
|
69
|
-
paddingInline:
|
|
66
|
+
paddingInline: tokens.spacingHorizontalS,
|
|
70
67
|
alignItems: 'center',
|
|
71
|
-
}, children: (
|
|
68
|
+
}, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', width: '100%' }, children: [_jsx(Body1Strong, { children: title }), _jsx("div", { style: { flex: 1 } })] }) }), _jsx(ScrollbarWithMoreDataRequest, { data: data === null || data === void 0 ? void 0 : data.records, hasMore: dataState === null || dataState === void 0 ? void 0 : dataState.hasNextPage, onRequestMore: () => {
|
|
72
69
|
fetchNextPage();
|
|
73
|
-
}, children: (
|
|
70
|
+
}, children: _jsxs("div", { style: {
|
|
74
71
|
display: 'flex',
|
|
75
72
|
flexDirection: 'column',
|
|
76
|
-
gap:
|
|
77
|
-
padding:
|
|
78
|
-
}, children: [data === null || data === void 0 ? void 0 : data.records.map((record, index) => ((
|
|
79
|
-
Array.from({ length: 5 }).map((_, index) => ((
|
|
73
|
+
gap: tokens.spacingHorizontalM,
|
|
74
|
+
padding: tokens.spacingHorizontalS,
|
|
75
|
+
}, children: [data === null || data === void 0 ? void 0 : data.records.map((record, index) => (_jsx(BoardColumnCard, { record: record, index: index, columnId: columnId, canDrag: canDrag, PreviewComponent: PreviewComponent, schema: schema }, index))), dataState.isFetching &&
|
|
76
|
+
Array.from({ length: 5 }).map((_, index) => (_jsx(BoardingColumnCardLoading, {}, index)))] }) })] }));
|
|
80
77
|
};
|
|
81
|
-
exports.BoardColumnUI = BoardColumnUI;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
backgroundColor: react_components_1.tokens.colorNeutralBackground1,
|
|
9
|
-
borderRadius: react_components_1.tokens.borderRadiusLarge,
|
|
10
|
-
padding: react_components_1.tokens.spacingHorizontalM,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton, SkeletonItem, tokens } from '@fluentui/react-components';
|
|
3
|
+
export function BoardingColumnCardLoading() {
|
|
4
|
+
return (_jsxs(Skeleton, { style: {
|
|
5
|
+
backgroundColor: tokens.colorNeutralBackground1,
|
|
6
|
+
borderRadius: tokens.borderRadiusLarge,
|
|
7
|
+
padding: tokens.spacingHorizontalM,
|
|
11
8
|
display: 'flex',
|
|
12
9
|
flexDirection: 'column',
|
|
13
|
-
gap:
|
|
14
|
-
}, children: [(
|
|
10
|
+
gap: tokens.spacingVerticalM,
|
|
11
|
+
}, children: [_jsx(SkeletonItem, { style: {
|
|
15
12
|
height: 16,
|
|
16
13
|
width: '100%',
|
|
17
|
-
} }), (
|
|
14
|
+
} }), _jsx(SkeletonItem, { style: {
|
|
18
15
|
height: 16,
|
|
19
16
|
width: '50%',
|
|
20
17
|
} })] }));
|