@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,39 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageEntityFormDesktopContainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const dataform_1 = require("@headless-adminapp/app/dataform");
|
|
7
|
+
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
8
|
+
const locale_1 = require("@headless-adminapp/app/locale");
|
|
9
|
+
const utils_1 = require("@headless-adminapp/app/locale/utils");
|
|
10
|
+
const mutable_1 = require("@headless-adminapp/app/mutable");
|
|
11
|
+
const utils_2 = require("@headless-adminapp/app/utils");
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
14
|
+
const PageBroken_1 = require("../components/PageBroken");
|
|
15
|
+
const PageLoading_1 = require("../components/PageLoading");
|
|
16
|
+
const FormBody_1 = require("../form/layout/FormBody");
|
|
17
|
+
const FormTab_1 = require("../form/layout/FormTab");
|
|
18
|
+
const CommandContainer_1 = require("./CommandContainer");
|
|
19
|
+
const FormTabRelated_1 = require("./FormTabRelated");
|
|
20
|
+
const PageEntityFormStringContext_1 = require("./PageEntityFormStringContext");
|
|
21
|
+
const ProcessFlow_1 = require("./ProcessFlow");
|
|
22
|
+
const RelatedViewSelector_1 = require("./RelatedViewSelector");
|
|
23
|
+
const SectionContainer_1 = require("./SectionContainer");
|
|
21
24
|
let previousCachedActiveTabInfo = null;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
const PageEntityFormDesktopContainer = () => {
|
|
26
|
+
const dataState = (0, mutable_1.useContextSelector)(dataform_1.DataFormContext, (state) => state.dataState);
|
|
27
|
+
const strings = (0, PageEntityFormStringContext_1.usePageEntityFormStrings)();
|
|
28
|
+
const recordId = (0, hooks_1.useRecordId)();
|
|
29
|
+
const record = (0, mutable_1.useContextSelector)(dataform_1.DataFormContext, (state) => state.record);
|
|
30
|
+
const activeTab = (0, mutable_1.useContextSelector)(dataform_1.DataFormContext, (state) => state.activeTab);
|
|
31
|
+
const { language } = (0, locale_1.useLocale)();
|
|
32
|
+
const schema = (0, hooks_1.useDataFormSchema)();
|
|
33
|
+
const formConfig = (0, hooks_1.useSelectedForm)();
|
|
34
|
+
const processFlowSteps = (0, hooks_1.useProcessFlowSteps)();
|
|
35
|
+
const setActiveTab = (0, mutable_1.useContextValueSetter)(dataform_1.DataFormContext, (setValue) => (value) => {
|
|
36
|
+
setValue((state) => ({
|
|
37
|
+
...state,
|
|
38
|
+
activeTab: value,
|
|
39
|
+
}));
|
|
35
40
|
});
|
|
36
|
-
useEffect(() => {
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
37
42
|
if (previousCachedActiveTabInfo &&
|
|
38
43
|
previousCachedActiveTabInfo.logicalName === schema.logicalName) {
|
|
39
44
|
setActiveTab(previousCachedActiveTabInfo.name);
|
|
@@ -48,78 +53,79 @@ export const PageEntityFormDesktopContainer = () => {
|
|
|
48
53
|
};
|
|
49
54
|
}
|
|
50
55
|
}, [setActiveTab, formConfig, schema]);
|
|
51
|
-
const recordTitle = useRecordTitle();
|
|
56
|
+
const recordTitle = (0, hooks_1.useRecordTitle)();
|
|
52
57
|
// const readonly = useIsFormReadonly();
|
|
53
|
-
const formInstance = useFormInstance();
|
|
54
|
-
const isDirty = useFormIsDirty();
|
|
55
|
-
const notifications = useFormNotifications();
|
|
56
|
-
const [selectedRelatedItem, setSelectedRelatedItem] = useState(null);
|
|
58
|
+
const formInstance = (0, hooks_1.useFormInstance)();
|
|
59
|
+
const isDirty = (0, hooks_1.useFormIsDirty)();
|
|
60
|
+
const notifications = (0, hooks_1.useFormNotifications)();
|
|
61
|
+
const [selectedRelatedItem, setSelectedRelatedItem] = (0, react_1.useState)(null);
|
|
57
62
|
if (dataState.isFetching) {
|
|
58
|
-
return
|
|
63
|
+
return (0, jsx_runtime_1.jsx)(PageLoading_1.PageLoading, {});
|
|
59
64
|
}
|
|
60
65
|
if (dataState.isError) {
|
|
61
|
-
return
|
|
66
|
+
return (0, jsx_runtime_1.jsx)(PageBroken_1.PageBroken, { title: "Error", message: "Unable to load page" });
|
|
62
67
|
}
|
|
63
68
|
if (recordId && !record) {
|
|
64
|
-
return (
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(PageBroken_1.PageBroken, { title: "Record not found", message: "Requested record not found in system or you may not have enought permission." }));
|
|
65
70
|
}
|
|
66
|
-
return (
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
67
72
|
display: 'flex',
|
|
68
73
|
flex: 1,
|
|
69
74
|
flexDirection: 'column',
|
|
70
75
|
// backgroundColor: tokens.colorNeutralBackground2,
|
|
71
76
|
overflow: 'hidden',
|
|
72
|
-
}, children: [
|
|
77
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
73
78
|
display: 'flex',
|
|
74
79
|
flexDirection: 'column',
|
|
75
|
-
gap: tokens.spacingVerticalM,
|
|
76
|
-
paddingTop: tokens.spacingVerticalM,
|
|
77
|
-
paddingInline: tokens.spacingHorizontalM,
|
|
78
|
-
}, children: [
|
|
80
|
+
gap: react_components_1.tokens.spacingVerticalM,
|
|
81
|
+
paddingTop: react_components_1.tokens.spacingVerticalM,
|
|
82
|
+
paddingInline: react_components_1.tokens.spacingHorizontalM,
|
|
83
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
79
84
|
// padding: 4,
|
|
80
|
-
boxShadow: tokens.shadow2,
|
|
81
|
-
borderRadius: tokens.borderRadiusMedium,
|
|
82
|
-
background: tokens.colorNeutralBackground1,
|
|
85
|
+
boxShadow: react_components_1.tokens.shadow2,
|
|
86
|
+
borderRadius: react_components_1.tokens.borderRadiusMedium,
|
|
87
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
83
88
|
display: 'flex',
|
|
84
89
|
// overflow: 'hidden',
|
|
85
|
-
}, children:
|
|
90
|
+
}, children: (0, jsx_runtime_1.jsx)(CommandContainer_1.CommandContainer, {}) }), notifications.length > 0 && ((0, jsx_runtime_1.jsx)("div", { children: notifications.map((notification, index) => ((0, jsx_runtime_1.jsx)(react_components_1.MessageBar, { intent: notification.level, icon: null, children: (0, jsx_runtime_1.jsx)(react_components_1.MessageBarBody, { children: notification.message }) }, index))) })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
86
91
|
display: 'flex',
|
|
87
92
|
flexDirection: 'column',
|
|
88
|
-
boxShadow: tokens.shadow4,
|
|
89
|
-
borderRadius: tokens.borderRadiusMedium,
|
|
90
|
-
background: tokens.colorNeutralBackground1,
|
|
93
|
+
boxShadow: react_components_1.tokens.shadow4,
|
|
94
|
+
borderRadius: react_components_1.tokens.borderRadiusMedium,
|
|
95
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
91
96
|
overflow: 'hidden',
|
|
92
97
|
zIndex: 2,
|
|
93
|
-
}, children: [
|
|
98
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
94
99
|
display: 'flex',
|
|
95
100
|
flexDirection: 'row',
|
|
96
|
-
paddingInline: tokens.spacingHorizontalM,
|
|
97
|
-
paddingTop: tokens.spacingVerticalS,
|
|
98
|
-
marginBottom: tokens.spacingVerticalS,
|
|
99
|
-
}, children: [
|
|
101
|
+
paddingInline: react_components_1.tokens.spacingHorizontalM,
|
|
102
|
+
paddingTop: react_components_1.tokens.spacingVerticalS,
|
|
103
|
+
marginBottom: react_components_1.tokens.spacingVerticalS,
|
|
104
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', flex: 1 }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
100
105
|
display: 'flex',
|
|
101
|
-
gap: tokens.spacingHorizontalXS,
|
|
106
|
+
gap: react_components_1.tokens.spacingHorizontalXS,
|
|
102
107
|
alignItems: 'center',
|
|
103
|
-
}, children: [
|
|
108
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_components_1.Subtitle2, { children: recordTitle }), (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { color: react_components_1.tokens.colorNeutralForeground4 }, children: isDirty
|
|
104
109
|
? `- ${strings.unsaved}`
|
|
105
110
|
: !!record
|
|
106
111
|
? `- ${strings.saved}`
|
|
107
|
-
: '' })] }),
|
|
112
|
+
: '' })] }), (0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { color: react_components_1.tokens.colorNeutralForeground3 }, children: (0, utils_1.localizedLabel)(language, schema) })] }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'row' }, children: formConfig.experience.headerControls?.map((controlName, index) => {
|
|
108
113
|
const attribute = schema.attributes[controlName];
|
|
109
|
-
return (
|
|
110
|
-
width: tokens.spacingHorizontalXXL,
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index > 0 && ((0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: true, style: {
|
|
115
|
+
width: react_components_1.tokens.spacingHorizontalXXL,
|
|
111
116
|
opacity: 0.5,
|
|
112
|
-
} })),
|
|
113
|
-
return (
|
|
117
|
+
} })), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { color: react_components_1.tokens.colorNeutralForeground4 }, children: attribute.label }), (0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: formInstance.control, name: controlName, render: ({ field }) => {
|
|
118
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: (0, utils_2.getAttributeFormattedValue)(attribute, field.value) }));
|
|
114
119
|
} })] })] }, controlName));
|
|
115
|
-
}) })] }), !!
|
|
120
|
+
}) })] }), !!processFlowSteps?.length && ((0, jsx_runtime_1.jsx)(ProcessFlow_1.ProcessFlow, { height: 28, rounded: false, items: processFlowSteps })), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', paddingBottom: react_components_1.tokens.spacingVerticalS }, children: [(0, jsx_runtime_1.jsxs)(react_components_1.TabList, { selectedValue: activeTab, onTabSelect: (e, value) => {
|
|
116
121
|
setActiveTab(value.value);
|
|
117
122
|
previousCachedActiveTabInfo = {
|
|
118
123
|
logicalName: schema.logicalName,
|
|
119
124
|
name: value.value,
|
|
120
125
|
relatedItem: null,
|
|
121
126
|
};
|
|
122
|
-
}, children: [formConfig.experience.tabs.map((tab) => (
|
|
127
|
+
}, children: [formConfig.experience.tabs.map((tab) => ((0, jsx_runtime_1.jsx)(react_components_1.Tab, { value: tab.name, children: (0, utils_1.localizedLabel)(language, tab) }, tab.name))), !!selectedRelatedItem && ((0, jsx_runtime_1.jsx)(react_components_1.Tab, { value: "related", children: selectedRelatedItem.localizedPluralLabels?.[language] ??
|
|
128
|
+
selectedRelatedItem.pluralLabel }))] }), (0, jsx_runtime_1.jsx)(RelatedViewSelector_1.RelatedViewSelector, { onSelect: (item) => {
|
|
123
129
|
setSelectedRelatedItem(item);
|
|
124
130
|
setActiveTab('related');
|
|
125
131
|
previousCachedActiveTabInfo = {
|
|
@@ -127,5 +133,6 @@ export const PageEntityFormDesktopContainer = () => {
|
|
|
127
133
|
name: 'related',
|
|
128
134
|
relatedItem: item,
|
|
129
135
|
};
|
|
130
|
-
} })] })] })] }),
|
|
136
|
+
} })] })] })] }), (0, jsx_runtime_1.jsxs)(FormBody_1.FormBody, { children: [formConfig.experience.tabs.map((tab) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab, { value: tab.name, columnCount: tab.columnCount, columnWidths: tab.columnWidths, children: tab.tabColumns.map((tabColumn, index) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab.Column, { children: tabColumn.sections.map((section) => ((0, jsx_runtime_1.jsx)(SectionContainer_1.SectionContainer, { section: section, readOnly: false }, section.name))) }, index))) }, tab.name))), (0, jsx_runtime_1.jsx)(FormTabRelated_1.FormTabRelated, { selectedRelatedItem: selectedRelatedItem })] })] }));
|
|
131
137
|
};
|
|
138
|
+
exports.PageEntityFormDesktopContainer = PageEntityFormDesktopContainer;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageEntityFormStringContext = exports.defaultPageEntityFormStrings = void 0;
|
|
4
|
+
exports.usePageEntityFormStrings = usePageEntityFormStrings;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
exports.defaultPageEntityFormStrings = {
|
|
3
7
|
saved: 'Saved',
|
|
4
8
|
unsaved: 'Unsaved',
|
|
5
9
|
related: 'Related',
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const context = useContext(PageEntityFormStringContext);
|
|
11
|
+
exports.PageEntityFormStringContext = (0, react_1.createContext)(exports.defaultPageEntityFormStrings);
|
|
12
|
+
function usePageEntityFormStrings() {
|
|
13
|
+
const context = (0, react_1.useContext)(exports.PageEntityFormStringContext);
|
|
10
14
|
return context;
|
|
11
15
|
}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessFlow = ProcessFlow;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
function ProcessFlow({ height = 32, rounded = true, items, }) {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { position: 'relative', height }, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
5
8
|
display: 'flex',
|
|
6
9
|
overflow: 'hidden',
|
|
7
|
-
borderRadius: rounded ? tokens.borderRadiusMedium : 0,
|
|
8
|
-
}, children: items.map((item, index) => (
|
|
10
|
+
borderRadius: rounded ? react_components_1.tokens.borderRadiusMedium : 0,
|
|
11
|
+
}, children: items.map((item, index) => ((0, jsx_runtime_1.jsx)(ProcessFlowItem, { height: height, label: item.label, isActivated: item.isActivated, isFirst: index === 0, isLast: index === items.length - 1 }, index))) }) }));
|
|
9
12
|
}
|
|
10
13
|
const ProcessFlowItem = ({ label, height, isActivated, isFirst, isLast, }) => {
|
|
11
14
|
const backgroundColor = isActivated
|
|
12
|
-
? tokens.colorBrandBackground
|
|
13
|
-
: tokens.colorNeutralStrokeDisabled;
|
|
14
|
-
return (
|
|
15
|
+
? react_components_1.tokens.colorBrandBackground
|
|
16
|
+
: react_components_1.tokens.colorNeutralStrokeDisabled;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
15
18
|
flex: 1,
|
|
16
19
|
position: 'relative',
|
|
17
20
|
display: 'flex',
|
|
18
21
|
alignItems: 'center',
|
|
19
22
|
justifyContent: 'center',
|
|
20
23
|
height,
|
|
21
|
-
}, children: [
|
|
24
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { zIndex: 1 }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
22
25
|
position: 'absolute',
|
|
23
26
|
left: 20,
|
|
24
27
|
right: 20,
|
|
25
28
|
top: 0,
|
|
26
29
|
height: '100%',
|
|
27
30
|
backgroundColor: backgroundColor,
|
|
28
|
-
} }),
|
|
31
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
29
32
|
position: 'absolute',
|
|
30
33
|
left: 0,
|
|
31
34
|
top: 0,
|
|
@@ -35,8 +38,8 @@ const ProcessFlowItem = ({ label, height, isActivated, isFirst, isLast, }) => {
|
|
|
35
38
|
transform: isFirst ? 'skewX(0deg)' : 'skewX(30deg)',
|
|
36
39
|
borderLeft: isFirst
|
|
37
40
|
? 'none'
|
|
38
|
-
: `1px solid ${tokens.colorNeutralBackground1}`,
|
|
39
|
-
} }),
|
|
41
|
+
: `1px solid ${react_components_1.tokens.colorNeutralBackground1}`,
|
|
42
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
40
43
|
position: 'absolute',
|
|
41
44
|
right: 0,
|
|
42
45
|
top: 0,
|
|
@@ -46,8 +49,8 @@ const ProcessFlowItem = ({ label, height, isActivated, isFirst, isLast, }) => {
|
|
|
46
49
|
transform: isLast ? 'skewX(0deg)' : 'skewX(30deg)',
|
|
47
50
|
borderRight: isLast
|
|
48
51
|
? 'none'
|
|
49
|
-
: `1px solid ${tokens.colorNeutralBackground1}`,
|
|
50
|
-
} }),
|
|
52
|
+
: `1px solid ${react_components_1.tokens.colorNeutralBackground1}`,
|
|
53
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
51
54
|
position: 'absolute',
|
|
52
55
|
left: 0,
|
|
53
56
|
top: '50%',
|
|
@@ -57,8 +60,8 @@ const ProcessFlowItem = ({ label, height, isActivated, isFirst, isLast, }) => {
|
|
|
57
60
|
transform: isFirst ? 'skewX(0deg)' : 'skewX(-30deg)',
|
|
58
61
|
borderLeft: isFirst
|
|
59
62
|
? 'none'
|
|
60
|
-
: `1px solid ${tokens.colorNeutralBackground1}`,
|
|
61
|
-
} }),
|
|
63
|
+
: `1px solid ${react_components_1.tokens.colorNeutralBackground1}`,
|
|
64
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
62
65
|
position: 'absolute',
|
|
63
66
|
right: 0,
|
|
64
67
|
top: '50%',
|
|
@@ -68,14 +71,14 @@ const ProcessFlowItem = ({ label, height, isActivated, isFirst, isLast, }) => {
|
|
|
68
71
|
transform: isLast ? 'skewX(0deg)' : 'skewX(-30deg)',
|
|
69
72
|
borderRight: isLast
|
|
70
73
|
? 'none'
|
|
71
|
-
: `1px solid ${tokens.colorNeutralBackground1}`,
|
|
72
|
-
} })] }),
|
|
74
|
+
: `1px solid ${react_components_1.tokens.colorNeutralBackground1}`,
|
|
75
|
+
} })] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
73
76
|
display: 'flex',
|
|
74
77
|
flexDirection: 'column',
|
|
75
78
|
flex: 1,
|
|
76
79
|
alignItems: 'center',
|
|
77
|
-
gap: tokens.spacingVerticalS,
|
|
80
|
+
gap: react_components_1.tokens.spacingVerticalS,
|
|
78
81
|
color: isActivated ? 'white' : undefined,
|
|
79
82
|
zIndex: 2,
|
|
80
|
-
}, children:
|
|
83
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { children: label }) })] }));
|
|
81
84
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecordCard = RecordCard;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const utils_1 = require("@headless-adminapp/app/utils");
|
|
7
|
+
const color_1 = require("@headless-adminapp/app/utils/color");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
6
9
|
root: {
|
|
7
10
|
width: '100%',
|
|
8
11
|
display: 'flex',
|
|
9
12
|
flexDirection: 'row',
|
|
10
|
-
paddingInline: tokens.spacingHorizontalL,
|
|
11
|
-
paddingBlock: tokens.spacingVerticalS,
|
|
12
|
-
gap: tokens.spacingHorizontalS,
|
|
13
|
+
paddingInline: react_components_1.tokens.spacingHorizontalL,
|
|
14
|
+
paddingBlock: react_components_1.tokens.spacingVerticalS,
|
|
15
|
+
gap: react_components_1.tokens.spacingHorizontalS,
|
|
13
16
|
// cursor: 'pointer',
|
|
14
17
|
// '&:hover': {
|
|
15
18
|
// background: tokens.colorNeutralBackground1Hover,
|
|
@@ -24,10 +27,14 @@ const useStyles = makeStyles({
|
|
|
24
27
|
selected: {},
|
|
25
28
|
});
|
|
26
29
|
function createIntial(name) {
|
|
27
|
-
return name
|
|
30
|
+
return name
|
|
31
|
+
?.split(' ')
|
|
32
|
+
.map((x) => x[0])
|
|
33
|
+
.slice(0, 2)
|
|
34
|
+
.join('')
|
|
35
|
+
.toUpperCase();
|
|
28
36
|
}
|
|
29
|
-
|
|
30
|
-
var _a, _b, _c;
|
|
37
|
+
function RecordCard({ schema, cardView, record, selected, }) {
|
|
31
38
|
const styles = useStyles();
|
|
32
39
|
const _record = record;
|
|
33
40
|
const recordTitle = _record[schema.primaryAttribute];
|
|
@@ -37,20 +44,20 @@ export function RecordCard({ schema, cardView, record, selected, }) {
|
|
|
37
44
|
const avatarAttribute = schema.attributes[cardView.avatarColumn];
|
|
38
45
|
if (avatarAttribute.type === 'attachment' &&
|
|
39
46
|
avatarAttribute.format === 'image') {
|
|
40
|
-
avatarSrc =
|
|
47
|
+
avatarSrc = _record[cardView.avatarColumn]?.url;
|
|
41
48
|
}
|
|
42
49
|
else if (avatarAttribute.type === 'string' &&
|
|
43
50
|
avatarAttribute.format === 'url') {
|
|
44
51
|
avatarSrc = _record[cardView.avatarColumn];
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
|
-
return (
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, react_components_1.mergeClasses)(styles.root, selected && styles.selected), children: [cardView.showAvatar && ((0, jsx_runtime_1.jsx)(react_components_1.Avatar, { initials: initials, color: "neutral", style: { cursor: 'pointer' }, image: {
|
|
48
55
|
src: avatarSrc,
|
|
49
|
-
} })),
|
|
56
|
+
} })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
50
57
|
display: 'flex',
|
|
51
58
|
flexDirection: 'column',
|
|
52
59
|
flex: 1,
|
|
53
|
-
}, children: [
|
|
60
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { wordBreak: 'break-all' }, children: _record[cardView.primaryColumn] }), cardView.secondaryColumns?.map((column) => ((0, jsx_runtime_1.jsx)(SecondaryColumnContent, { record: _record, column: column, schema: schema }, column.name)))] }), !!cardView.rightColumn?.length && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
54
61
|
display: 'flex',
|
|
55
62
|
flexDirection: 'column',
|
|
56
63
|
alignItems: 'flex-end',
|
|
@@ -66,7 +73,7 @@ export function RecordCard({ schema, cardView, record, selected, }) {
|
|
|
66
73
|
if (!choice) {
|
|
67
74
|
return null;
|
|
68
75
|
}
|
|
69
|
-
return (
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Tag, { size: "extra-small", appearance: "filled", style: {
|
|
70
77
|
background: choice.color,
|
|
71
78
|
color: 'white',
|
|
72
79
|
height: 16,
|
|
@@ -77,9 +84,9 @@ export function RecordCard({ schema, cardView, record, selected, }) {
|
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
if (column.variant === 'strong') {
|
|
80
|
-
return (
|
|
87
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: (0, utils_1.getAttributeFormattedValue)(value, attribute) }, column.name));
|
|
81
88
|
}
|
|
82
|
-
return (
|
|
89
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { color: react_components_1.tokens.colorNeutralForeground4 }, children: (0, utils_1.getAttributeFormattedValue)(value, attribute) }, column.name));
|
|
83
90
|
}) }))] }));
|
|
84
91
|
}
|
|
85
92
|
function SecondaryColumnContent({ record: _record, column, schema, }) {
|
|
@@ -97,21 +104,21 @@ function SecondaryColumnContent({ record: _record, column, schema, }) {
|
|
|
97
104
|
}
|
|
98
105
|
if (column.variant === 'choice') {
|
|
99
106
|
if (attribute.type === 'choice') {
|
|
100
|
-
return
|
|
107
|
+
return (0, jsx_runtime_1.jsx)(ChoiceTag, { attribute: attribute, value: value });
|
|
101
108
|
}
|
|
102
109
|
if (attribute.type === 'choices') {
|
|
103
110
|
const choices = attribute.options.filter((option) => value.includes(option.value));
|
|
104
111
|
if (!choices.length) {
|
|
105
112
|
return null;
|
|
106
113
|
}
|
|
107
|
-
return (
|
|
114
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
108
115
|
display: 'flex',
|
|
109
116
|
flexDirection: 'row',
|
|
110
117
|
gap: 4,
|
|
111
|
-
}, children: choices.map((choice) => (
|
|
118
|
+
}, children: choices.map((choice) => ((0, jsx_runtime_1.jsx)(ChoiceTag, { attribute: attribute, value: choice.value }, choice.value))) }, column.name));
|
|
112
119
|
}
|
|
113
120
|
}
|
|
114
|
-
return (
|
|
121
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.Caption1, { style: { color: react_components_1.tokens.colorNeutralForeground4 }, children: [!!label && `${label}: `, (0, utils_1.getAttributeFormattedValue)(attribute, value)] }, column.name));
|
|
115
122
|
}
|
|
116
123
|
const ChoiceTag = ({ attribute, value, }) => {
|
|
117
124
|
const choice = attribute.options.find((option) => option.value === value);
|
|
@@ -121,9 +128,9 @@ const ChoiceTag = ({ attribute, value, }) => {
|
|
|
121
128
|
const bgColor = choice.color;
|
|
122
129
|
let color;
|
|
123
130
|
if (bgColor) {
|
|
124
|
-
color = isColorDark(bgColor) ? '#FFFFFF' : '#000000';
|
|
131
|
+
color = (0, color_1.isColorDark)(bgColor) ? '#FFFFFF' : '#000000';
|
|
125
132
|
}
|
|
126
|
-
return (
|
|
133
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Tag, { size: "extra-small", appearance: "filled", style: {
|
|
127
134
|
background: bgColor,
|
|
128
135
|
color: color,
|
|
129
136
|
height: 16,
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecordCardLoading = RecordCardLoading;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
4
7
|
root: {
|
|
5
8
|
width: '100%',
|
|
6
9
|
display: 'flex',
|
|
7
10
|
flexDirection: 'row',
|
|
8
|
-
paddingInline: tokens.spacingHorizontalL,
|
|
9
|
-
paddingBlock: tokens.spacingVerticalS,
|
|
10
|
-
gap: tokens.spacingHorizontalS,
|
|
11
|
+
paddingInline: react_components_1.tokens.spacingHorizontalL,
|
|
12
|
+
paddingBlock: react_components_1.tokens.spacingVerticalS,
|
|
13
|
+
gap: react_components_1.tokens.spacingHorizontalS,
|
|
11
14
|
},
|
|
12
15
|
});
|
|
13
|
-
|
|
14
|
-
var _a;
|
|
16
|
+
function RecordCardLoading({ cardView }) {
|
|
15
17
|
const styles = useStyles();
|
|
16
|
-
return (
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, react_components_1.mergeClasses)(styles.root), children: [cardView.showAvatar && ((0, jsx_runtime_1.jsx)(react_components_1.Avatar, { color: "neutral", style: { cursor: 'pointer' } })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
17
19
|
display: 'flex',
|
|
18
20
|
flexDirection: 'column',
|
|
19
21
|
flex: 1,
|
|
20
|
-
gap: tokens.spacingVerticalXXS,
|
|
21
|
-
}, children: [
|
|
22
|
+
gap: react_components_1.tokens.spacingVerticalXXS,
|
|
23
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 2 }, children: (0, jsx_runtime_1.jsx)(react_components_1.SkeletonItem, { size: 16, style: { height: 16 } }) }), cardView.secondaryColumns?.map((_, index) => ((0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 2 }, children: (0, jsx_runtime_1.jsx)(react_components_1.SkeletonItem, { size: 16, style: { width: 160, height: 12 } }) }, index)))] })] }));
|
|
22
24
|
}
|
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecordSetNavigatorContainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const ScrollView_1 = require("@headless-adminapp/app/components/ScrollView");
|
|
7
|
+
const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
8
|
+
const locale_1 = require("@headless-adminapp/app/locale");
|
|
9
|
+
const navigation_1 = require("@headless-adminapp/app/navigation");
|
|
10
|
+
const hooks_2 = require("@headless-adminapp/app/recordset/hooks");
|
|
11
|
+
const react_1 = require("react");
|
|
12
|
+
const RecordCard_1 = require("./RecordCard");
|
|
13
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
11
14
|
item: {
|
|
12
15
|
cursor: 'pointer',
|
|
13
16
|
'&:hover': {
|
|
14
|
-
background: tokens.colorNeutralBackground1Hover,
|
|
17
|
+
background: react_components_1.tokens.colorNeutralBackground1Hover,
|
|
15
18
|
},
|
|
16
19
|
'&:active': {
|
|
17
|
-
background: tokens.colorNeutralBackground1Pressed,
|
|
20
|
+
background: react_components_1.tokens.colorNeutralBackground1Pressed,
|
|
18
21
|
},
|
|
19
22
|
},
|
|
20
23
|
selected: {
|
|
21
|
-
background: tokens.colorNeutralBackground1Selected,
|
|
24
|
+
background: react_components_1.tokens.colorNeutralBackground1Selected,
|
|
22
25
|
},
|
|
23
26
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const recordId = useRecordId();
|
|
27
|
+
const RecordSetNavigatorContainer = () => {
|
|
28
|
+
const { data, cardView, schema } = (0, hooks_2.useRecordSetResult)();
|
|
29
|
+
const [visible] = (0, hooks_2.useRecordSetVisibility)();
|
|
30
|
+
const recordId = (0, hooks_1.useRecordId)();
|
|
29
31
|
const styles = useStyles();
|
|
30
|
-
const openForm = useOpenForm();
|
|
31
|
-
const { language, direction } = useLocale();
|
|
32
|
+
const openForm = (0, navigation_1.useOpenForm)();
|
|
33
|
+
const { language, direction } = (0, locale_1.useLocale)();
|
|
32
34
|
if (!schema) {
|
|
33
35
|
return null;
|
|
34
36
|
}
|
|
35
37
|
if (!visible) {
|
|
36
38
|
return null;
|
|
37
39
|
}
|
|
38
|
-
return (
|
|
39
|
-
[direction === 'rtl' ? 'paddingRight' : 'paddingLeft']: tokens.spacingVerticalM,
|
|
40
|
-
paddingBlock: tokens.spacingVerticalM,
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
41
|
+
[direction === 'rtl' ? 'paddingRight' : 'paddingLeft']: react_components_1.tokens.spacingVerticalM,
|
|
42
|
+
paddingBlock: react_components_1.tokens.spacingVerticalM,
|
|
41
43
|
display: 'flex',
|
|
42
44
|
// display: 'none',
|
|
43
|
-
}, children:
|
|
44
|
-
boxShadow: tokens.shadow2,
|
|
45
|
-
borderRadius: tokens.borderRadiusMedium,
|
|
46
|
-
background: tokens.colorNeutralBackground1,
|
|
45
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
46
|
+
boxShadow: react_components_1.tokens.shadow2,
|
|
47
|
+
borderRadius: react_components_1.tokens.borderRadiusMedium,
|
|
48
|
+
background: react_components_1.tokens.colorNeutralBackground1,
|
|
47
49
|
display: 'flex',
|
|
48
50
|
minWidth: 320,
|
|
49
51
|
flexDirection: 'column',
|
|
50
|
-
}, children: [
|
|
52
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
51
53
|
display: 'flex',
|
|
52
54
|
flexDirection: 'column',
|
|
53
55
|
paddingInline: 16,
|
|
54
56
|
paddingBlock: 8,
|
|
55
|
-
}, children:
|
|
57
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: schema.localizedPluralLabels?.[language] ?? schema?.pluralLabel }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { autoHide: true, rtl: direction === 'rtl', children: data?.map((record) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { role: "button", className: (0, react_components_1.mergeClasses)(styles.item, recordId ===
|
|
56
58
|
record[schema.idAttribute] &&
|
|
57
59
|
styles.selected), onClick: () => {
|
|
58
60
|
openForm({
|
|
@@ -60,6 +62,7 @@ export const RecordSetNavigatorContainer = () => {
|
|
|
60
62
|
id: record[schema.idAttribute],
|
|
61
63
|
replace: true,
|
|
62
64
|
});
|
|
63
|
-
}, children:
|
|
64
|
-
record[schema.idAttribute] }) }),
|
|
65
|
+
}, children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: cardView, record: record, schema: schema, selected: recordId ===
|
|
66
|
+
record[schema.idAttribute] }) }), (0, jsx_runtime_1.jsx)("div", { style: { paddingInline: react_components_1.tokens.spacingHorizontalL }, children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) })] }, record[schema.idAttribute]))) }) })] }) }));
|
|
65
67
|
};
|
|
68
|
+
exports.RecordSetNavigatorContainer = RecordSetNavigatorContainer;
|