@headless-adminapp/fluent 0.0.17-alpha.5 → 0.0.17-alpha.52
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.d.ts +5 -1
- package/App/AppHeaderContianer.js +25 -19
- package/App/AppLogo.js +14 -2
- package/App/AppUI.js +9 -1
- package/App/LayoutProvider.d.ts +7 -0
- package/App/LayoutProvider.js +29 -0
- package/App/NavigationContainer.d.ts +10 -1
- package/App/NavigationContainer.js +26 -22
- package/App/QuickActionItem.js +1 -1
- package/CommandBar/Button.d.ts +2 -1
- package/CommandBar/Button.js +2 -2
- package/CommandBar/Divider.d.ts +2 -1
- package/CommandBar/Divider.js +2 -2
- package/CommandBar/IconButton.d.ts +2 -1
- package/CommandBar/IconButton.js +2 -2
- package/CommandBar/Label.d.ts +2 -1
- package/CommandBar/Label.js +2 -2
- package/CommandBar/MenuButton.d.ts +2 -1
- package/CommandBar/MenuButton.js +3 -3
- package/CommandBar/MenuItem.js +6 -5
- package/CommandBar/MenuItems.js +7 -4
- package/CommandBar/MenuList.js +4 -3
- package/CommandBar/Wrapper.d.ts +2 -2
- package/CommandBar/Wrapper.js +2 -2
- package/CommandBar/index.d.ts +6 -6
- package/DataGrid/ActionCell.d.ts +1 -1
- package/DataGrid/ActionCell.js +8 -4
- package/DataGrid/CustomizeColumns/AddColumns.js +4 -5
- package/DataGrid/CustomizeColumns/ColumnItem.js +3 -1
- package/DataGrid/CustomizeColumns/CustomizeColumns.d.ts +2 -2
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +1 -3
- package/DataGrid/GridColumnHeader/FilterForm.js +4 -2
- package/DataGrid/GridColumnHeader/OperatorSelect.js +9 -2
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +21 -12
- package/DataGrid/GridColumnHeader/utils.js +10 -7
- package/DataGrid/GridHeaderDesktop.js +5 -2
- package/DataGrid/GridHeaderMobile.d.ts +5 -0
- package/DataGrid/GridHeaderMobile.js +32 -0
- package/DataGrid/GridListContainer.d.ts +12 -0
- package/DataGrid/GridListContainer.js +91 -0
- package/DataGrid/GridTableContainer.js +104 -83
- package/DataGrid/TableCell/TableCellBase.d.ts +2 -2
- package/DataGrid/TableCell/TableCellCheckbox.js +4 -3
- package/DataGrid/TableCell/TableCellChoice.d.ts +15 -0
- package/DataGrid/TableCell/TableCellChoice.js +31 -0
- package/DataGrid/TableCell/TableCellLink.d.ts +1 -0
- package/DataGrid/TableCell/TableCellLink.js +8 -4
- package/DataGrid/TableCell/TableCellText.js +9 -4
- package/DataGrid/types.d.ts +5 -0
- package/DataGrid/types.js +2 -0
- package/DataGrid/useTableColumns.d.ts +2 -3
- package/DataGrid/useTableColumns.js +237 -165
- package/DialogContainer/PromptDialog.d.ts +3 -2
- package/DialogContainer/PromptDialog.js +10 -6
- package/Insights/CommandBarContainer.d.ts +1 -0
- package/Insights/CommandBarContainer.js +15 -0
- package/Insights/FilterBarContainer.d.ts +1 -0
- package/Insights/FilterBarContainer.js +107 -0
- package/Insights/Grid.d.ts +6 -0
- package/Insights/Grid.js +26 -0
- package/Insights/InsightsContainer.d.ts +1 -0
- package/Insights/InsightsContainer.js +35 -0
- package/Insights/WidgetChartContainer.d.ts +7 -0
- package/Insights/WidgetChartContainer.js +56 -0
- package/Insights/WidgetDataGridContainer.d.ts +4 -0
- package/Insights/WidgetDataGridContainer.js +71 -0
- package/Insights/WidgetTableContainer.d.ts +7 -0
- package/Insights/WidgetTableContainer.js +58 -0
- package/Insights/WidgetTileContainer.d.ts +7 -0
- package/Insights/WidgetTileContainer.js +24 -0
- package/Insights/WidgetTitleBar.d.ts +7 -0
- package/Insights/WidgetTitleBar.js +22 -0
- package/Insights/Widgets.d.ts +4 -0
- package/Insights/Widgets.js +57 -0
- package/Insights/charts/AreaChart.d.ts +5 -0
- package/Insights/charts/AreaChart.js +20 -0
- package/Insights/charts/BarChart.d.ts +5 -0
- package/Insights/charts/BarChart.js +20 -0
- package/Insights/charts/ComposedChart.d.ts +5 -0
- package/Insights/charts/ComposedChart.js +20 -0
- package/Insights/charts/CustomTooltipContent.d.ts +7 -0
- package/Insights/charts/CustomTooltipContent.js +25 -0
- package/Insights/charts/GaugeChart.d.ts +5 -0
- package/Insights/charts/GaugeChart.js +8 -0
- package/Insights/charts/LineChart.d.ts +5 -0
- package/Insights/charts/LineChart.js +21 -0
- package/Insights/charts/OhlcChart.d.ts +6 -0
- package/Insights/charts/OhlcChart.js +118 -0
- package/Insights/charts/PieChart.d.ts +5 -0
- package/Insights/charts/PieChart.js +58 -0
- package/Insights/charts/RadarChart.d.ts +5 -0
- package/Insights/charts/RadarChart.js +39 -0
- package/Insights/charts/ScatterChart.d.ts +5 -0
- package/Insights/charts/ScatterChart.js +86 -0
- package/Insights/charts/constants.d.ts +1 -0
- package/Insights/charts/constants.js +25 -0
- package/Insights/charts/formatters.d.ts +14 -0
- package/Insights/charts/formatters.js +188 -0
- package/Insights/charts/index.d.ts +4 -0
- package/Insights/charts/index.js +13 -0
- package/Insights/charts/renderers.d.ts +10 -0
- package/Insights/charts/renderers.js +65 -0
- package/Insights/hooks/useQueriesData.d.ts +7 -0
- package/Insights/hooks/useQueriesData.js +99 -0
- package/Insights/hooks/useWidgetDetail.d.ts +10 -0
- package/Insights/hooks/useWidgetDetail.js +33 -0
- package/OverflowCommandBar/OverflowCommandBar.js +1 -4
- package/OverflowCommandBar/OverflowMenu.js +1 -1
- package/PageBoard/BoardColumn.d.ts +5 -0
- package/PageBoard/BoardColumn.js +9 -0
- package/PageBoard/BoardColumnCard.d.ts +12 -0
- package/PageBoard/BoardColumnCard.js +28 -0
- package/PageBoard/BoardColumnUI.d.ts +2 -0
- package/PageBoard/BoardColumnUI.js +81 -0
- package/PageBoard/BoardingColumnCardLoading.d.ts +1 -0
- package/PageBoard/BoardingColumnCardLoading.js +21 -0
- package/PageBoard/Header.d.ts +7 -0
- package/PageBoard/Header.js +40 -0
- package/PageBoard/PageBoard.d.ts +7 -0
- package/PageBoard/PageBoard.js +47 -0
- package/PageBoard/index.d.ts +1 -0
- package/PageBoard/index.js +5 -0
- package/PageEntityForm/CommandContainer.js +18 -6
- package/PageEntityForm/FormTabRelated.js +1 -2
- package/PageEntityForm/PageEntityFormDesktopContainer.js +35 -19
- package/PageEntityForm/ProcessFlow.d.ts +10 -0
- package/PageEntityForm/ProcessFlow.js +84 -0
- package/PageEntityForm/RecordCard.d.ts +1 -1
- package/PageEntityForm/RecordCard.js +55 -52
- package/PageEntityForm/RecordCardLoading.d.ts +8 -0
- package/PageEntityForm/RecordCardLoading.js +25 -0
- package/PageEntityForm/RecordSetNavigatorContainer.js +4 -7
- package/PageEntityForm/RelatedViewSelector.d.ts +0 -2
- package/PageEntityForm/RelatedViewSelector.js +36 -6
- package/PageEntityForm/SectionContainer.js +23 -5
- package/PageEntityForm/StandardControl.d.ts +2 -2
- package/PageEntityForm/StandardControl.js +94 -113
- package/PageEntityForm/SubgridControl.d.ts +1 -0
- package/PageEntityForm/SubgridControl.js +3 -2
- package/PageEntityView/FormSubgridContainer.js +5 -2
- package/PageEntityView/PageEntityView.js +4 -1
- package/PageEntityView/PageEntityViewDesktopFrame.js +1 -0
- package/PageEntityView/PageEntityViewMobileContainer.d.ts +2 -0
- package/PageEntityView/PageEntityViewMobileContainer.js +14 -0
- package/PageEntityView/PageEntityViewStringContext.d.ts +1 -0
- package/PageEntityView/PageEntityViewStringContext.js +1 -0
- package/PageInsights/PageInsights.d.ts +9 -0
- package/PageInsights/PageInsights.js +25 -0
- package/PageInsights/index.d.ts +1 -0
- package/PageInsights/index.js +6 -0
- package/componentStore.d.ts +2 -0
- package/componentStore.js +5 -0
- package/components/BodyLoading.js +12 -8
- package/components/PageLogin.js +0 -1
- package/form/FormControl.js +5 -16
- package/form/controls/AttachmentControl.d.ts +17 -0
- package/form/controls/AttachmentControl.js +225 -0
- package/form/controls/AttachmentsControl.d.ts +6 -0
- package/form/controls/AttachmentsControl.js +45 -0
- package/form/controls/CurrencyControl.js +38 -6
- package/form/controls/DateControl.d.ts +1 -1
- package/form/controls/DateControl.js +15 -3
- package/form/controls/DateTimeControl.d.ts +1 -1
- package/form/controls/DateTimeControl.js +100 -13
- package/form/controls/DecimalControl.d.ts +5 -0
- package/form/controls/DecimalControl.js +52 -0
- package/form/controls/DurationControl.d.ts +4 -0
- package/form/controls/DurationControl.js +209 -0
- package/form/controls/EmailControl.d.ts +1 -1
- package/form/controls/EmailControl.js +1 -1
- package/form/controls/IntegerControl.d.ts +4 -0
- package/form/controls/IntegerControl.js +25 -0
- package/form/controls/LookupControl.js +2 -2
- package/form/controls/MultiSelectControl.d.ts +1 -1
- package/form/controls/MultiSelectControl.js +1 -1
- package/form/controls/MultiSelectLookupControl.js +1 -1
- package/form/controls/NumberControl.js +1 -0
- package/form/controls/PasswordControl.d.ts +1 -1
- package/form/controls/PasswordControl.js +1 -1
- package/form/controls/RichTextControl.d.ts +5 -0
- package/form/controls/RichTextControl.js +33 -0
- package/form/controls/SelectControl.d.ts +1 -1
- package/form/controls/SelectControl.js +1 -1
- package/form/controls/SwitchControl.d.ts +1 -1
- package/form/controls/SwitchControl.js +4 -2
- package/form/controls/TelephoneControl.d.ts +1 -1
- package/form/controls/TelephoneControl.js +2 -2
- package/form/controls/TextAreaControl.d.ts +1 -1
- package/form/controls/TextAreaControl.js +2 -2
- package/form/controls/UrlControl.d.ts +4 -0
- package/form/controls/UrlControl.js +16 -0
- package/form/controls/utils.d.ts +4 -0
- package/form/controls/utils.js +42 -0
- package/form/layout/FormSection/FormSection.js +1 -1
- package/form/layout/FormSection/FormSectionColumn.js +1 -1
- package/form/layout/FormSection/FormSectionLoading.js +1 -1
- package/form/layout/FormTab/FormTab.js +3 -2
- package/form/types.d.ts +2 -2
- package/package.json +11 -5
- package/styles.css +100 -0
- package/types/index.d.ts +14 -0
- package/App/AppProvider.d.ts +0 -9
- package/App/AppProvider.js +0 -50
- package/DataGrid/getAttributeFormattedValue.d.ts +0 -16
- package/DataGrid/getAttributeFormattedValue.js +0 -92
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TableCellCheckbox = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
exports.TableCellCheckbox = (0, react_1.memo)(({ checked, onChange }) => {
|
|
7
8
|
return ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { style: { display: 'flex', alignItems: 'center' }, onClick: (event) => {
|
|
8
9
|
event.stopPropagation();
|
|
9
10
|
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Checkbox, { checked: checked !== null && checked !== void 0 ? checked : false, onChange: (event) => {
|
|
10
11
|
event.stopPropagation();
|
|
11
12
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
12
13
|
} }) }));
|
|
13
|
-
};
|
|
14
|
-
exports.TableCellCheckbox = TableCellCheckbox;
|
|
14
|
+
});
|
|
15
|
+
exports.TableCellCheckbox.displayName = 'TableCellCheckbox';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChoiceAttribute } from '@headless-adminapp/core/attributes';
|
|
2
|
+
import { ViewColumn } from '@headless-adminapp/core/experience/view';
|
|
3
|
+
import { Schema } from '@headless-adminapp/core/schema';
|
|
4
|
+
import { UniqueRecord } from '../types';
|
|
5
|
+
interface TableCellChoiceProps {
|
|
6
|
+
column: ViewColumn;
|
|
7
|
+
schema: Schema;
|
|
8
|
+
record: UniqueRecord;
|
|
9
|
+
value: unknown;
|
|
10
|
+
attribute: ChoiceAttribute<string | number>;
|
|
11
|
+
formattedValue: string;
|
|
12
|
+
width: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function TableCellChoice(props: TableCellChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TableCellChoice = TableCellChoice;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const color_1 = require("@headless-adminapp/app/utils/color");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const TableCellBase_1 = require("./TableCellBase");
|
|
9
|
+
function TableCellChoice(props) {
|
|
10
|
+
const bgColor = (0, react_1.useMemo)(() => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (!props.value || !props.attribute.options) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
return (_a = props.attribute.options.find((option) => option.value === props.value)) === null || _a === void 0 ? void 0 : _a.color;
|
|
16
|
+
}, [props.attribute.options, props.value]);
|
|
17
|
+
const color = (0, react_1.useMemo)(() => {
|
|
18
|
+
if (!bgColor) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
return (0, color_1.isColorDark)(bgColor) ? '#FFFFFF' : '#000000';
|
|
22
|
+
}, [bgColor]);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
|
|
24
|
+
textOverflow: 'ellipsis',
|
|
25
|
+
overflow: 'hidden',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
width: props.width,
|
|
28
|
+
minWidth: props.width,
|
|
29
|
+
maxWidth: props.width,
|
|
30
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Tag, { size: "small", style: { backgroundColor: bgColor, color }, children: props.formattedValue }) }));
|
|
31
|
+
}
|
|
@@ -4,7 +4,8 @@ exports.TableCellLink = 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 hooks_1 = require("@headless-adminapp/app/route/hooks");
|
|
7
|
-
const
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
exports.TableCellLink = (0, react_1.memo)(({ value, href, onClick, width, target }) => {
|
|
8
9
|
const router = (0, hooks_1.useRouter)();
|
|
9
10
|
return ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { style: {
|
|
10
11
|
textOverflow: 'ellipsis',
|
|
@@ -15,7 +16,10 @@ const TableCellLink = ({ value, href, onClick, width, }) => {
|
|
|
15
16
|
maxWidth: width,
|
|
16
17
|
display: 'flex',
|
|
17
18
|
alignItems: 'center',
|
|
18
|
-
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Link, { as: "a", href: href, onClick: (event) => {
|
|
19
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Link, { as: "a", href: href, target: target, onClick: (event) => {
|
|
20
|
+
if (target === '_blank') {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
19
23
|
if (event.metaKey || event.ctrlKey) {
|
|
20
24
|
return;
|
|
21
25
|
}
|
|
@@ -29,5 +33,5 @@ const TableCellLink = ({ value, href, onClick, width, }) => {
|
|
|
29
33
|
event.preventDefault();
|
|
30
34
|
}
|
|
31
35
|
}, children: value }) }));
|
|
32
|
-
};
|
|
33
|
-
exports.TableCellLink = TableCellLink;
|
|
36
|
+
});
|
|
37
|
+
exports.TableCellLink.displayName = 'TableCellLink';
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TableCellText = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const TableCellBase_1 = require("./TableCellBase");
|
|
6
|
-
|
|
7
|
+
exports.TableCellText = (0, react_1.memo)(({ value, width, textAlignment }) => {
|
|
7
8
|
return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
|
|
8
9
|
textAlign: textAlignment || 'left',
|
|
9
10
|
textOverflow: 'ellipsis',
|
|
@@ -19,6 +20,10 @@ const TableCellText = ({ value, width, textAlignment, }) => {
|
|
|
19
20
|
// display: 'flex',
|
|
20
21
|
// alignItems: 'center',
|
|
21
22
|
// borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`,
|
|
22
|
-
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textOverflow: 'ellipsis',
|
|
26
|
+
width: '100%',
|
|
27
|
+
}, children: value }) }));
|
|
28
|
+
});
|
|
29
|
+
exports.TableCellText.displayName = 'TableCellText';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Data } from '@headless-adminapp/core/transport';
|
|
1
|
+
import { UniqueRecord } from './types';
|
|
3
2
|
export declare function useTableColumns({ disableSelection, disableContextMenu, disableColumnResize, disableColumnFilter, disableColumnSort, tableWrapperRef, }: {
|
|
4
3
|
disableSelection?: boolean;
|
|
5
4
|
disableContextMenu?: boolean;
|
|
@@ -7,4 +6,4 @@ export declare function useTableColumns({ disableSelection, disableContextMenu,
|
|
|
7
6
|
disableColumnFilter?: boolean;
|
|
8
7
|
disableColumnSort?: boolean;
|
|
9
8
|
tableWrapperRef: React.RefObject<HTMLDivElement>;
|
|
10
|
-
}): import("@tanstack/react-table").AccessorFnColumnDef<
|
|
9
|
+
}): import("@tanstack/react-table").AccessorFnColumnDef<UniqueRecord, unknown>[];
|
|
@@ -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 datagrid_1 = require("@headless-adminapp/app/datagrid");
|
|
7
7
|
const hooks_1 = require("@headless-adminapp/app/datagrid/hooks");
|
|
8
|
+
const useOpenRecord_1 = require("@headless-adminapp/app/datagrid/hooks/useOpenRecord");
|
|
8
9
|
const hooks_2 = require("@headless-adminapp/app/hooks");
|
|
9
10
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
10
11
|
const hooks_3 = require("@headless-adminapp/app/metadata/hooks");
|
|
@@ -15,10 +16,12 @@ const utils_1 = require("@headless-adminapp/app/utils");
|
|
|
15
16
|
const app_1 = require("@headless-adminapp/core/experience/app");
|
|
16
17
|
const react_table_1 = require("@tanstack/react-table");
|
|
17
18
|
const react_1 = require("react");
|
|
19
|
+
const componentStore_1 = require("../componentStore");
|
|
18
20
|
const GridColumnHeader_1 = require("../DataGrid/GridColumnHeader");
|
|
19
21
|
const TableCell_1 = require("../DataGrid/TableCell");
|
|
20
22
|
const TableCellLink_1 = require("../DataGrid/TableCell/TableCellLink");
|
|
21
23
|
const ActionCell_1 = require("./ActionCell");
|
|
24
|
+
const TableCellChoice_1 = require("./TableCell/TableCellChoice");
|
|
22
25
|
const columnHelper = (0, react_table_1.createColumnHelper)();
|
|
23
26
|
const useStyles = (0, react_components_1.makeStyles)({
|
|
24
27
|
selectionCell: {
|
|
@@ -36,19 +39,21 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
|
|
|
36
39
|
const columns = (0, hooks_1.useGridColumns)();
|
|
37
40
|
const [, setSorting] = (0, hooks_1.useGridSorting)();
|
|
38
41
|
const schema = (0, hooks_1.useDataGridSchema)();
|
|
39
|
-
const {
|
|
40
|
-
const [, setSelectedIds] = (0, hooks_1.useGridSelection)();
|
|
42
|
+
const { schemaStore } = (0, hooks_3.useMetadata)();
|
|
43
|
+
const [selectedIds, setSelectedIds] = (0, hooks_1.useGridSelection)();
|
|
41
44
|
const setSelectedIdsRef = (0, react_1.useRef)(setSelectedIds);
|
|
42
45
|
setSelectedIdsRef.current = setSelectedIds;
|
|
43
46
|
const isSubgrid = (0, mutable_1.useContextSelector)(datagrid_1.GridContext, (state) => state.isSubGrid);
|
|
44
47
|
const contextCommands = isSubgrid
|
|
45
|
-
?
|
|
46
|
-
|
|
48
|
+
? // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
49
|
+
(0, hooks_1.useSubGridContextCommands)()
|
|
50
|
+
: // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
51
|
+
(0, hooks_1.useMainGridContextCommands)();
|
|
47
52
|
const mutableContextCommandState = (0, mutable_1.useMutableState)(contextCommands, true);
|
|
48
53
|
(0, react_1.useEffect)(() => {
|
|
49
54
|
mutableContextCommandState.setValue(contextCommands);
|
|
50
55
|
}, [contextCommands, mutableContextCommandState]);
|
|
51
|
-
const tableWrapperSize = (0, hooks_2.useElementSize)(tableWrapperRef);
|
|
56
|
+
const tableWrapperSize = (0, hooks_2.useElementSize)(tableWrapperRef, 100);
|
|
52
57
|
const columnWidths = (0, react_1.useMemo)(() => {
|
|
53
58
|
var _a;
|
|
54
59
|
const availableWidth = Math.max(0, ((_a = tableWrapperSize.width) !== null && _a !== void 0 ? _a : 0) - 32 - 32 - 16);
|
|
@@ -69,183 +74,250 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
|
|
|
69
74
|
const routeResolver = (0, hooks_5.useRouteResolver)();
|
|
70
75
|
const router = (0, hooks_5.useRouter)();
|
|
71
76
|
const recordSetSetter = (0, hooks_4.useRecordSetSetter)();
|
|
72
|
-
const openRecord = (0,
|
|
73
|
-
|
|
74
|
-
const path = routeResolver({
|
|
75
|
-
logicalName: schema.logicalName,
|
|
76
|
-
type: app_1.PageType.EntityForm,
|
|
77
|
-
id,
|
|
78
|
-
});
|
|
79
|
-
recordSetSetter(schema.logicalName, (_b = (_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.map((x) => x[schema.idAttribute])) !== null && _b !== void 0 ? _b : []);
|
|
80
|
-
router.push(path);
|
|
81
|
-
}, [
|
|
82
|
-
recordSetSetter,
|
|
83
|
-
routeResolver,
|
|
84
|
-
router,
|
|
85
|
-
schema.idAttribute,
|
|
86
|
-
schema.logicalName,
|
|
87
|
-
]);
|
|
88
|
-
const { currency, dateFormats } = (0, locale_1.useLocale)();
|
|
77
|
+
const openRecord = (0, useOpenRecord_1.useOpenRecord)();
|
|
78
|
+
const locale = (0, locale_1.useLocale)();
|
|
89
79
|
const dataRef = (0, react_1.useRef)(data);
|
|
90
80
|
dataRef.current = data;
|
|
91
|
-
|
|
81
|
+
const headingSelectionState = (0, react_1.useMemo)(() => {
|
|
82
|
+
var _a;
|
|
83
|
+
if ((data === null || data === void 0 ? void 0 : data.records.length) === 0) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (selectedIds.length === 0) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
if (selectedIds.length === ((_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.length)) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
return 'mixed';
|
|
93
|
+
}, [data === null || data === void 0 ? void 0 : data.records.length, selectedIds]);
|
|
94
|
+
const actionColumns = (0, react_1.useMemo)(() => {
|
|
95
|
+
if (disableContextMenu)
|
|
96
|
+
return [];
|
|
92
97
|
return [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
switch (attribute === null || attribute === void 0 ? void 0 : attribute.type) {
|
|
175
|
-
case 'money':
|
|
176
|
-
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize(), textAlignment: "right" }, column.id));
|
|
177
|
-
case 'lookup':
|
|
178
|
-
if (!value) {
|
|
179
|
-
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: "", width: info.column.getSize() }, column.id));
|
|
180
|
-
}
|
|
181
|
-
const path = routeResolver({
|
|
182
|
-
logicalName: attribute.entity,
|
|
183
|
-
type: app_1.PageType.EntityForm,
|
|
184
|
-
id: value.id,
|
|
185
|
-
});
|
|
186
|
-
return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: path, onClick: () => {
|
|
187
|
-
recordSetSetter('', []);
|
|
188
|
-
router.push(path);
|
|
189
|
-
} }, column.id));
|
|
190
|
-
}
|
|
191
|
-
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize() }, column.id));
|
|
192
|
-
},
|
|
193
|
-
enableResizing: true,
|
|
194
|
-
size: columnWidths[index],
|
|
195
|
-
minSize: 100,
|
|
196
|
-
maxSize: 1000,
|
|
197
|
-
});
|
|
98
|
+
columnHelper.accessor((info) => info[schema.idAttribute], {
|
|
99
|
+
id: '$actionColumn',
|
|
100
|
+
header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { style: {
|
|
101
|
+
minWidth: 32,
|
|
102
|
+
flexShrink: 0,
|
|
103
|
+
// width: 32,
|
|
104
|
+
flex: 1,
|
|
105
|
+
position: 'sticky',
|
|
106
|
+
display: 'flex',
|
|
107
|
+
right: 0,
|
|
108
|
+
top: 0,
|
|
109
|
+
// zIndex: 1,
|
|
110
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
111
|
+
borderBottom: `${react_components_1.tokens.strokeWidthThin} solid ${react_components_1.tokens.colorNeutralStroke3}`,
|
|
112
|
+
}, children: "\u00A0" })),
|
|
113
|
+
cell: (info) => ((0, jsx_runtime_1.jsx)(ActionCell_1.ActionCell, { onOpen: () => {
|
|
114
|
+
const id = info.row.original[schema.idAttribute];
|
|
115
|
+
setSelectedIdsRef.current([id]);
|
|
116
|
+
}, mutableState: mutableContextCommandState })),
|
|
117
|
+
enableResizing: false,
|
|
118
|
+
size: 32,
|
|
119
|
+
minSize: 32,
|
|
120
|
+
maxSize: 32,
|
|
121
|
+
}),
|
|
122
|
+
];
|
|
123
|
+
}, [disableContextMenu, mutableContextCommandState, schema.idAttribute]);
|
|
124
|
+
const selectionColumns = (0, react_1.useMemo)(() => {
|
|
125
|
+
if (disableSelection)
|
|
126
|
+
return [];
|
|
127
|
+
function getAllIds() {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
return ((_b = (_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.map((record) => record[schema.idAttribute])) !== null && _b !== void 0 ? _b : []);
|
|
130
|
+
}
|
|
131
|
+
function toggleAllSelectedIds() {
|
|
132
|
+
setSelectedIdsRef.current((ids) => {
|
|
133
|
+
var _a;
|
|
134
|
+
if (ids.length === ((_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.length)) {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
return getAllIds();
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function excludeId(ids, id) {
|
|
141
|
+
return ids.filter((i) => i !== id);
|
|
142
|
+
}
|
|
143
|
+
function toggleSelectedId(info) {
|
|
144
|
+
setSelectedIdsRef.current((ids) => {
|
|
145
|
+
const id = info.row.original[schema.idAttribute];
|
|
146
|
+
if (ids.includes(id)) {
|
|
147
|
+
return excludeId(ids, id);
|
|
148
|
+
}
|
|
149
|
+
return [...ids, id];
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return [
|
|
153
|
+
columnHelper.accessor((info) => info[schema.idAttribute], {
|
|
154
|
+
id: '$selectColumn',
|
|
155
|
+
header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableSelectionCell, { checked: headingSelectionState, as: 'th', style: {
|
|
156
|
+
position: 'sticky',
|
|
157
|
+
display: 'flex',
|
|
158
|
+
left: 0,
|
|
159
|
+
top: 0,
|
|
160
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
161
|
+
zIndex: 1,
|
|
162
|
+
width: 32,
|
|
163
|
+
maxWidth: 32,
|
|
164
|
+
minWidth: 32,
|
|
165
|
+
}, onClick: toggleAllSelectedIds })),
|
|
166
|
+
cell: (info) => ((0, jsx_runtime_1.jsx)(react_components_1.TableSelectionCell, { className: (0, react_components_1.mergeClasses)(styles.selectionCell), checked: info.row.getIsSelected(), onClick: (event) => {
|
|
167
|
+
event.preventDefault();
|
|
168
|
+
event.stopPropagation();
|
|
169
|
+
toggleSelectedId(info);
|
|
170
|
+
}, style: {
|
|
171
|
+
width: 32,
|
|
172
|
+
maxWidth: 32,
|
|
173
|
+
minWidth: 32,
|
|
174
|
+
} })),
|
|
175
|
+
enableResizing: false,
|
|
176
|
+
size: 32,
|
|
177
|
+
minSize: 32,
|
|
178
|
+
maxSize: 32,
|
|
198
179
|
}),
|
|
199
|
-
...(disableContextMenu
|
|
200
|
-
? []
|
|
201
|
-
: [
|
|
202
|
-
columnHelper.accessor((info) => info[schema.idAttribute], {
|
|
203
|
-
id: '$actionColumn',
|
|
204
|
-
header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { style: {
|
|
205
|
-
minWidth: 32,
|
|
206
|
-
flexShrink: 0,
|
|
207
|
-
// width: 32,
|
|
208
|
-
flex: 1,
|
|
209
|
-
position: 'sticky',
|
|
210
|
-
display: 'flex',
|
|
211
|
-
right: 0,
|
|
212
|
-
top: 0,
|
|
213
|
-
// zIndex: 1,
|
|
214
|
-
background: react_components_1.tokens.colorNeutralBackground3,
|
|
215
|
-
borderBottom: `${react_components_1.tokens.strokeWidthThin} solid ${react_components_1.tokens.colorNeutralStroke3}`,
|
|
216
|
-
}, children: "\u00A0" })),
|
|
217
|
-
cell: (info) => ((0, jsx_runtime_1.jsx)(ActionCell_1.ActionCell, { onOpen: () => {
|
|
218
|
-
const id = info.row.original[schema.idAttribute];
|
|
219
|
-
setSelectedIdsRef.current([id]);
|
|
220
|
-
}, mutableState: mutableContextCommandState })),
|
|
221
|
-
enableResizing: false,
|
|
222
|
-
size: 32,
|
|
223
|
-
minSize: 32,
|
|
224
|
-
maxSize: 32,
|
|
225
|
-
}),
|
|
226
|
-
]),
|
|
227
180
|
];
|
|
228
181
|
}, [
|
|
229
182
|
disableSelection,
|
|
230
|
-
|
|
231
|
-
disableContextMenu,
|
|
183
|
+
headingSelectionState,
|
|
232
184
|
schema.idAttribute,
|
|
233
|
-
schema.attributes,
|
|
234
|
-
schema.primaryAttribute,
|
|
235
|
-
schema.logicalName,
|
|
236
185
|
styles.selectionCell,
|
|
186
|
+
]);
|
|
187
|
+
const restColumns = (0, react_1.useMemo)(() => {
|
|
188
|
+
return gridColumns.map((column, index) => {
|
|
189
|
+
function onChangeSortDirection(direction) {
|
|
190
|
+
setSorting([
|
|
191
|
+
{
|
|
192
|
+
field: column.name,
|
|
193
|
+
order: direction,
|
|
194
|
+
},
|
|
195
|
+
]);
|
|
196
|
+
}
|
|
197
|
+
return columnHelper.accessor((info) => info[column.name], {
|
|
198
|
+
id: column.id,
|
|
199
|
+
header: (props) => {
|
|
200
|
+
return renderCellHeaderContent({
|
|
201
|
+
props,
|
|
202
|
+
column,
|
|
203
|
+
disableColumnResize,
|
|
204
|
+
disableColumnFilter,
|
|
205
|
+
disableColumnSort,
|
|
206
|
+
onChangeSortDirection,
|
|
207
|
+
attribute: schema.attributes[column.name],
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
cell: (info) => renderCellContent({
|
|
211
|
+
info,
|
|
212
|
+
column,
|
|
213
|
+
schema,
|
|
214
|
+
locale,
|
|
215
|
+
schemaStore,
|
|
216
|
+
routeResolver,
|
|
217
|
+
openRecord,
|
|
218
|
+
recordSetSetter,
|
|
219
|
+
router,
|
|
220
|
+
}),
|
|
221
|
+
enableResizing: true,
|
|
222
|
+
size: columnWidths[index],
|
|
223
|
+
minSize: 100,
|
|
224
|
+
maxSize: 1000,
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
}, [
|
|
228
|
+
gridColumns,
|
|
237
229
|
columnWidths,
|
|
238
230
|
disableColumnResize,
|
|
239
231
|
disableColumnFilter,
|
|
240
232
|
disableColumnSort,
|
|
233
|
+
schema,
|
|
241
234
|
setSorting,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
getSchema,
|
|
235
|
+
locale,
|
|
236
|
+
schemaStore,
|
|
245
237
|
routeResolver,
|
|
246
238
|
openRecord,
|
|
247
239
|
recordSetSetter,
|
|
248
240
|
router,
|
|
249
|
-
mutableContextCommandState,
|
|
250
241
|
]);
|
|
242
|
+
return (0, react_1.useMemo)(() => {
|
|
243
|
+
return [...selectionColumns, ...restColumns, ...actionColumns];
|
|
244
|
+
}, [selectionColumns, restColumns, actionColumns]);
|
|
245
|
+
}
|
|
246
|
+
function renderCellHeaderContent({ column, props, disableColumnResize, disableColumnFilter, disableColumnSort, onChangeSortDirection, attribute, }) {
|
|
247
|
+
return ((0, jsx_runtime_1.jsx)(GridColumnHeader_1.TableHeaderFilterCell, { columnName: column.name, sortDirection: props.column.getIsSorted() || undefined, minWidth: props.header.getSize(), column: column, resizable: !disableColumnResize, disableFilter: disableColumnFilter, disableSort: disableColumnSort, onChangeSortDirection: onChangeSortDirection, attribute: attribute, onResetSize: props.column.resetSize, resizeHandler: props.header.getResizeHandler(), children: column.label }, column.id));
|
|
248
|
+
}
|
|
249
|
+
function renderCellContent({ info, column, schema, schemaStore, locale, routeResolver, openRecord, recordSetSetter, router, }) {
|
|
250
|
+
var _a, _b, _c;
|
|
251
|
+
const { currency, dateFormats, timezone, timeFormats } = locale;
|
|
252
|
+
let attribute;
|
|
253
|
+
let value;
|
|
254
|
+
if (column.expandedKey) {
|
|
255
|
+
const lookup = column.name;
|
|
256
|
+
const field = column.expandedKey;
|
|
257
|
+
const entity = schema.attributes[lookup].entity;
|
|
258
|
+
const lookupSchema = schemaStore.getSchema(entity);
|
|
259
|
+
attribute = lookupSchema.attributes[field];
|
|
260
|
+
value = (_b = (_a = info.row.original.$expand) === null || _a === void 0 ? void 0 : _a[lookup]) === null || _b === void 0 ? void 0 : _b[field];
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
attribute = schema.attributes[column.name];
|
|
264
|
+
value = info.getValue();
|
|
265
|
+
}
|
|
266
|
+
const formattedValue = (_c = (0, utils_1.getAttributeFormattedValue)(attribute, value, {
|
|
267
|
+
currency: currency.currency,
|
|
268
|
+
dateFormat: dateFormats.short,
|
|
269
|
+
timeFormat: timeFormats.short,
|
|
270
|
+
timezone,
|
|
271
|
+
currencyDisplay: currency.currencyDisplay,
|
|
272
|
+
currencySign: currency.currencySign,
|
|
273
|
+
locale: locale.locale,
|
|
274
|
+
})) !== null && _c !== void 0 ? _c : '';
|
|
275
|
+
if (column.plainText) {
|
|
276
|
+
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize() }, column.id));
|
|
277
|
+
}
|
|
278
|
+
if (column.component) {
|
|
279
|
+
const Component = componentStore_1.componentStore.getComponent(column.component);
|
|
280
|
+
if (!Component) {
|
|
281
|
+
throw new Error(`Component with name ${column.component} not found`);
|
|
282
|
+
}
|
|
283
|
+
return ((0, jsx_runtime_1.jsx)(Component, { column: column, schema: schema, record: info.row.original, value: value, attribute: attribute, formattedValue: formattedValue, width: info.column.getSize() }));
|
|
284
|
+
}
|
|
285
|
+
if (schema.primaryAttribute === column.name) {
|
|
286
|
+
const path = routeResolver({
|
|
287
|
+
logicalName: schema.logicalName,
|
|
288
|
+
type: app_1.PageType.EntityForm,
|
|
289
|
+
id: info.row.original[schema.idAttribute],
|
|
290
|
+
});
|
|
291
|
+
return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: value, width: info.column.getSize(), href: path, onClick: () => {
|
|
292
|
+
openRecord(info.row.original[schema.idAttribute]);
|
|
293
|
+
} }, column.id));
|
|
294
|
+
}
|
|
295
|
+
switch (attribute === null || attribute === void 0 ? void 0 : attribute.type) {
|
|
296
|
+
case 'money':
|
|
297
|
+
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize(), textAlignment: "right" }, column.id));
|
|
298
|
+
case 'lookup': {
|
|
299
|
+
if (!value) {
|
|
300
|
+
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: "", width: info.column.getSize() }, column.id));
|
|
301
|
+
}
|
|
302
|
+
const path = routeResolver({
|
|
303
|
+
logicalName: attribute.entity,
|
|
304
|
+
type: app_1.PageType.EntityForm,
|
|
305
|
+
id: value.id,
|
|
306
|
+
});
|
|
307
|
+
return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: path, onClick: () => {
|
|
308
|
+
recordSetSetter('', []);
|
|
309
|
+
router.push(path);
|
|
310
|
+
} }, column.id));
|
|
311
|
+
}
|
|
312
|
+
case 'attachment': {
|
|
313
|
+
const url = value === null || value === void 0 ? void 0 : value.url;
|
|
314
|
+
if (!url) {
|
|
315
|
+
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: "", width: info.column.getSize() }, column.id));
|
|
316
|
+
}
|
|
317
|
+
return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: url, target: "_blank" }, column.id));
|
|
318
|
+
}
|
|
319
|
+
case 'choice':
|
|
320
|
+
return ((0, jsx_runtime_1.jsx)(TableCellChoice_1.TableCellChoice, { column: column, schema: schema, record: info.row.original, value: value, attribute: attribute, formattedValue: formattedValue, width: info.column.getSize() }));
|
|
321
|
+
}
|
|
322
|
+
return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize() }, column.id));
|
|
251
323
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormValidationStringSet } from '@headless-adminapp/app/form';
|
|
1
2
|
import { PromptDialogOptions } from '@headless-adminapp/core/experience/dialog';
|
|
2
3
|
import { SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
3
4
|
import * as yup from 'yup';
|
|
@@ -14,12 +15,12 @@ interface PromptDialogProps<SA extends SchemaAttributes = SchemaAttributes> {
|
|
|
14
15
|
onDismiss?: PromptDialogOptions<SA>['onDismiss'];
|
|
15
16
|
}
|
|
16
17
|
export declare function PromptDialog(props: PromptDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare const formValidator: (<A extends SchemaAttributes = SchemaAttributes>(attributes: A) => (values: Record<string, any>, context: any, options: any) => Promise<import("react-hook-form").ResolverResult<{
|
|
18
|
+
export declare const formValidator: (<A extends SchemaAttributes = SchemaAttributes>(attributes: A, language: string, strings: FormValidationStringSet) => (values: Record<string, any>, context: any, options: any) => Promise<import("react-hook-form").ResolverResult<{
|
|
18
19
|
[x: string]: any;
|
|
19
20
|
[x: number]: any;
|
|
20
21
|
[x: symbol]: any;
|
|
21
22
|
}>>) & import("lodash").MemoizedFunction;
|
|
22
|
-
export declare const generateValidationSchema: (<A extends SchemaAttributes = SchemaAttributes>(attributes: A) => yup.ObjectSchema<{
|
|
23
|
+
export declare const generateValidationSchema: (<A extends SchemaAttributes = SchemaAttributes>(attributes: A, language: string, strings: FormValidationStringSet) => yup.ObjectSchema<{
|
|
23
24
|
[x: string]: any;
|
|
24
25
|
}, yup.AnyObject, {
|
|
25
26
|
[x: string]: any;
|