@headless-adminapp/fluent 1.4.25 → 1.4.27

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.
Files changed (138) hide show
  1. package/App/AppHeaderContianer.js +33 -16
  2. package/App/LayoutProvider.d.ts +2 -1
  3. package/App/LayoutProvider.js +3 -2
  4. package/App/Navigation/NavCategoryItemComponent.js +4 -1
  5. package/App/Navigation/NavItemComponent.js +4 -1
  6. package/App/Navigation/NavMiniCategoryMenu.js +3 -2
  7. package/App/QuickActionItem.js +5 -4
  8. package/CommandBar/Button.js +2 -3
  9. package/CommandBar/IconButton.js +2 -1
  10. package/CommandBar/Label.js +2 -2
  11. package/CommandBar/MenuButton.js +5 -2
  12. package/CommandBar/MenuItem.js +3 -2
  13. package/CommandBar/MenuList.js +2 -1
  14. package/CommandBar/Wrapper.js +1 -0
  15. package/DataGrid/CustomFilter/ColumnFilterItem.js +4 -2
  16. package/DataGrid/CustomFilter/CustomFilter.js +2 -1
  17. package/DataGrid/CustomizeColumns/AddColumns.js +5 -5
  18. package/DataGrid/CustomizeColumns/ColumnItem.js +4 -3
  19. package/DataGrid/CustomizeColumns/CustomizeColumns.js +4 -3
  20. package/DataGrid/FormSubgridViewSelector.js +3 -2
  21. package/DataGrid/GridColumnHeader/FilterForm.js +2 -1
  22. package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +4 -3
  23. package/DataGrid/GridHeaderDesktop.js +3 -2
  24. package/DataGrid/GridHeaderDesktopV2.js +8 -7
  25. package/DataGrid/GridHeaderMobile.js +3 -2
  26. package/DataGrid/GridListContainer.js +6 -5
  27. package/DataGrid/MobileHeaderTitleContainer.js +3 -2
  28. package/DataGrid/TableCell/TableCellAction.js +3 -2
  29. package/DataGrid/TableCell/TableCellCheckbox.js +2 -1
  30. package/DataGrid/useTableColumns.js +10 -1
  31. package/DialogContainer/AlertDialog.js +2 -1
  32. package/DialogContainer/ConfirmDialog.js +3 -2
  33. package/DialogContainer/ErrorDialog.js +3 -2
  34. package/DialogContainer/PromptDialog.js +4 -3
  35. package/Header/MobileHeaderCommandContainer.js +11 -10
  36. package/Header/MobileHeaderQuickActionButton.js +2 -2
  37. package/Insights/Header.js +7 -2
  38. package/Insights/InsightsContainer.js +22 -20
  39. package/Insights/WidgetDataGridContainer.js +8 -5
  40. package/Insights/WidgetSection.js +2 -1
  41. package/Insights/WidgetTileContainer.js +2 -1
  42. package/OverflowCommandBar/OverflowMenu.js +2 -1
  43. package/PageBoard/BoardColumnCard.js +2 -1
  44. package/PageBoard/BoardColumnUI.js +3 -2
  45. package/PageBoard/BoardingColumnCardLoading.js +2 -1
  46. package/PageBoard/Header.js +2 -1
  47. package/PageBoard/PageBoard.js +2 -1
  48. package/PageCalendar/CalendarSection.js +3 -2
  49. package/PageCalendar/EventDialog/EventDialog.js +2 -1
  50. package/PageCalendar/EventDialog/EventFormBody.js +3 -2
  51. package/PageCalendar/Header.js +4 -2
  52. package/PageCalendar/TitleSelector.js +3 -2
  53. package/PageCalendar/ViewSelector.js +2 -1
  54. package/PageCalendar/renderEventContent.js +5 -4
  55. package/PageEntityForm/EditableGridControl/CardUi.js +4 -4
  56. package/PageEntityForm/EditableGridControl/EditableGridControl.js +2 -1
  57. package/PageEntityForm/EditableGridControl/TableUi.js +3 -2
  58. package/PageEntityForm/FormTabRelated.js +2 -1
  59. package/PageEntityForm/PageCustomEntityForm.js +2 -0
  60. package/PageEntityForm/PageEntityFormDesktopContainer.js +8 -4
  61. package/PageEntityForm/RecordSetNavigatorContainer.js +2 -1
  62. package/PageEntityForm/RelatedViewSelector.js +2 -2
  63. package/PageEntityForm/TabContainer.js +5 -1
  64. package/PageEntityForm/UploadImageDialog.js +6 -5
  65. package/PageEntityView/FormSubgridContainer.js +3 -2
  66. package/PageEntityView/PageEntityViewDesktopFrame.js +3 -2
  67. package/PageEntityView/PageEntityViewDesktopFrameV2.js +2 -1
  68. package/PageEntityView/PageEntityViewMobileFrame.js +2 -1
  69. package/ProgressIndicatorContainer/index.js +2 -1
  70. package/QuickCreateContainer/FormContainer.js +2 -1
  71. package/components/ComponentErrorBoundary.d.ts +1 -1
  72. package/components/DialogLogin.js +2 -1
  73. package/components/DrawerHeader.js +3 -2
  74. package/components/LoginForm.js +2 -1
  75. package/components/PageBroken.js +2 -1
  76. package/components/PageLogin.js +2 -1
  77. package/components/fluent/Button.d.ts +4 -0
  78. package/components/fluent/Button.js +38 -0
  79. package/components/fluent/Checkbox.d.ts +4 -0
  80. package/components/fluent/Checkbox.js +18 -0
  81. package/components/fluent/Combobox.d.ts +4 -0
  82. package/components/fluent/Combobox.js +22 -0
  83. package/components/fluent/DialogSurface.d.ts +4 -0
  84. package/components/fluent/DialogSurface.js +16 -0
  85. package/components/fluent/Dropdown.d.ts +4 -0
  86. package/components/fluent/Dropdown.js +41 -0
  87. package/components/fluent/FluentProvider.d.ts +12 -0
  88. package/components/fluent/FluentProvider.js +179 -0
  89. package/components/fluent/Input.d.ts +4 -0
  90. package/components/fluent/Input.js +44 -0
  91. package/components/fluent/MenuItem.d.ts +4 -0
  92. package/components/fluent/MenuItem.js +17 -0
  93. package/components/fluent/MenuPopover.d.ts +4 -0
  94. package/components/fluent/MenuPopover.js +17 -0
  95. package/components/fluent/Option.d.ts +4 -0
  96. package/components/fluent/Option.js +17 -0
  97. package/components/fluent/PopoverSurface.d.ts +4 -0
  98. package/components/fluent/PopoverSurface.js +16 -0
  99. package/components/fluent/SearchBox.d.ts +4 -0
  100. package/components/fluent/SearchBox.js +42 -0
  101. package/components/fluent/SpinButton.d.ts +4 -0
  102. package/components/fluent/SpinButton.js +17 -0
  103. package/components/fluent/Tag.d.ts +4 -0
  104. package/components/fluent/Tag.js +16 -0
  105. package/components/fluent/Textarea.d.ts +4 -0
  106. package/components/fluent/Textarea.js +30 -0
  107. package/components/fluent/ToolbarButton.d.ts +6 -0
  108. package/components/fluent/ToolbarButton.js +22 -0
  109. package/components/fluent/index.d.ts +17 -0
  110. package/components/fluent/index.js +38 -0
  111. package/components/fluent/tokens.d.ts +29 -0
  112. package/components/fluent/tokens.js +32 -0
  113. package/form/controls/AttachmentControl.js +9 -8
  114. package/form/controls/AttachmentsControl.js +6 -2
  115. package/form/controls/CurrencyControl.js +2 -2
  116. package/form/controls/DateControl.js +7 -0
  117. package/form/controls/DateRangeControl/DateRangeControl.js +3 -2
  118. package/form/controls/DateRangeControl/PopoverContent.js +3 -2
  119. package/form/controls/DateTimeControl.js +17 -2
  120. package/form/controls/DecimalControl.js +2 -2
  121. package/form/controls/DurationControl.js +8 -2
  122. package/form/controls/EmailControl.js +3 -2
  123. package/form/controls/IntegerControl.js +2 -2
  124. package/form/controls/LookupControl.js +10 -4
  125. package/form/controls/MultiSelectControl.js +11 -2
  126. package/form/controls/MultiSelectLookupControl.js +12 -5
  127. package/form/controls/PasswordControl.js +6 -2
  128. package/form/controls/RegardingControl.js +7 -5
  129. package/form/controls/SelectControl.js +12 -2
  130. package/form/controls/SkeletonControl.js +6 -1
  131. package/form/controls/TelephoneControl.js +3 -2
  132. package/form/controls/TextAreaControl.js +2 -2
  133. package/form/controls/TextControl.js +6 -5
  134. package/form/controls/TimeControl/TimeControl.js +8 -1
  135. package/form/controls/UrlControl.js +3 -2
  136. package/form/layout/FormSection/FormSection.js +2 -2
  137. package/package.json +2 -2
  138. package/styles.css +1 -5
@@ -10,6 +10,7 @@ const navigation_1 = require("@headless-adminapp/app/navigation");
10
10
  const icons_1 = require("@headless-adminapp/icons");
11
11
  const react_1 = require("react");
12
12
  const AppStringContext_1 = require("../App/AppStringContext");
13
+ const fluent_1 = require("../components/fluent");
13
14
  const PageEntityViewStringContext_1 = require("../PageEntityView/PageEntityViewStringContext");
14
15
  const CustomizeColumns_1 = require("./CustomizeColumns");
15
16
  // Exprement component
@@ -29,24 +30,24 @@ const GridHeaderDesktopV2 = (props) => {
29
30
  alignItems: 'center',
30
31
  gap: 16,
31
32
  display: 'flex',
32
- }, children: [(0, jsx_runtime_1.jsx)(CustomizeColumns_1.CustomizeColumns, { opened: isColumnCustomizationOpen, onClose: () => setIsColumnCustomizationOpen(false) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column', gap: 8 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronDown, {}), iconPosition: "after", style: {
33
+ }, children: [(0, jsx_runtime_1.jsx)(CustomizeColumns_1.CustomizeColumns, { opened: isColumnCustomizationOpen, onClose: () => setIsColumnCustomizationOpen(false) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column', gap: 8 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronDown, {}), iconPosition: "after", style: {
33
34
  fontSize: react_components_1.tokens.fontSizeBase400,
34
35
  fontWeight: react_components_1.tokens.fontWeightMedium,
35
- }, children: selectedView.localizedNames?.[language] ?? selectedView.name }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: viewLookup.map((view) => ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { onClick: () => changeView(view.id), children: view.localizedNames?.[language] ?? view.name }, view.id))) }) })] }) }), (0, jsx_runtime_1.jsx)("div", { style: {
36
+ }, children: selectedView.localizedNames?.[language] ?? selectedView.name }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: viewLookup.map((view) => ((0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { onClick: () => changeView(view.id), children: view.localizedNames?.[language] ?? view.name }, view.id))) }) })] }) }), (0, jsx_runtime_1.jsx)("div", { style: {
36
37
  flex: 1,
37
38
  } }), (0, jsx_runtime_1.jsxs)("div", { style: { alignItems: 'center', display: 'flex', gap: 8 }, children: [props.headingRight, ViewCommandBuilder_1.EnabledRules.HasAtLeastOneRecordSelected(commandContext) &&
38
- ViewCommandBuilder_1.EnabledRules.HasDeletePermission(commandContext) && ((0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "secondary", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.processDeleteRecordRequest)(commandContext, {
39
+ ViewCommandBuilder_1.EnabledRules.HasDeletePermission(commandContext) && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "secondary", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.processDeleteRecordRequest)(commandContext, {
39
40
  stringSet: ViewCommandBuilder_1.ViewCommandBuilder.defaultDeleteRecordStringSet,
40
- }), style: { fontWeight: react_components_1.tokens.fontWeightRegular }, children: "Delete" })), (0, jsx_runtime_1.jsxs)(react_components_1.Button, { appearance: "primary", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, {}), onClick: () => {
41
- openForm({
41
+ }), style: { fontWeight: react_components_1.tokens.fontWeightRegular }, children: "Delete" })), (0, jsx_runtime_1.jsxs)(fluent_1.Button, { appearance: "primary", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, {}), onClick: async () => {
42
+ await openForm({
42
43
  logicalName: schema.logicalName,
43
44
  });
44
- }, style: { fontWeight: react_components_1.tokens.fontWeightRegular, minWidth: 0 }, children: ["New ", schema.label.toLowerCase()] }), (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreVertical, { size: 24 }), onClick: () => { }, style: { fontWeight: react_components_1.tokens.fontWeightRegular } }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsxs)(react_components_1.MenuList, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.EditColumns, { size: 20 }), onClick: () => setIsColumnCustomizationOpen(true), children: strings.editColumns }), (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Export, { size: 20 }), children: "Export" }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsxs)(react_components_1.MenuList, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ExportCsv, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.exportRecordsToCSV)(commandContext), children: "Export to CSV" }), (0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ExportExcel, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.exportRecordsToExcel)(commandContext), children: "Export to Excel" })] }) })] })] }) })] })] })] }), (0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 8 } }), (0, jsx_runtime_1.jsxs)("div", { style: {
45
+ }, style: { fontWeight: react_components_1.tokens.fontWeightRegular, minWidth: 0 }, children: ["New ", schema.label.toLowerCase()] }), (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreVertical, { size: 24 }), onClick: () => { }, style: { fontWeight: react_components_1.tokens.fontWeightRegular } }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsxs)(react_components_1.MenuList, { children: [(0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.EditColumns, { size: 20 }), onClick: () => setIsColumnCustomizationOpen(true), children: strings.editColumns }), (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Export, { size: 20 }), children: "Export" }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsxs)(react_components_1.MenuList, { children: [(0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ExportCsv, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.exportRecordsToCSV)(commandContext), children: "Export to CSV" }), (0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ExportExcel, { size: 20 }), onClick: () => (0, ViewCommandBuilder_1.exportRecordsToExcel)(commandContext), children: "Export to Excel" })] }) })] })] }) })] })] })] }), (0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 8 } }), (0, jsx_runtime_1.jsxs)("div", { style: {
45
46
  alignItems: 'center',
46
47
  // paddingInline: 8,
47
48
  gap: 16,
48
49
  display: 'flex',
49
- }, children: [(0, jsx_runtime_1.jsx)("div", { style: { alignItems: 'center', display: 'flex', gap: 16 }, children: (0, jsx_runtime_1.jsx)(react_components_1.SearchBox, { appearance: "outline", placeholder: appStrings.searchPlaceholder, style: {
50
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: { alignItems: 'center', display: 'flex', gap: 16 }, children: (0, jsx_runtime_1.jsx)(fluent_1.SearchBox, { appearance: "outline", placeholder: appStrings.searchPlaceholder, style: {
50
51
  width: 300,
51
52
  borderBottomColor: react_components_1.tokens.colorNeutralStroke1,
52
53
  }, value: searchText, onChange: (e, data) => setSearchText(data.value) }) }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } })] })] }));
@@ -7,6 +7,7 @@ const hooks_1 = require("@headless-adminapp/app/datagrid/hooks");
7
7
  const icons_1 = require("@headless-adminapp/icons");
8
8
  const react_1 = require("react");
9
9
  const AppStringContext_1 = require("../App/AppStringContext");
10
+ const fluent_1 = require("../components/fluent");
10
11
  const CustomFilter_1 = require("./CustomFilter");
11
12
  const MobileHeaderTitleContainer_1 = require("./MobileHeaderTitleContainer");
12
13
  const GridHeaderMobile = () => {
@@ -19,11 +20,11 @@ const GridHeaderMobile = () => {
19
20
  paddingInline: 8,
20
21
  gap: 8,
21
22
  display: 'flex',
22
- }, children: [(0, jsx_runtime_1.jsx)(MobileHeaderTitleContainer_1.MobileHeaderTitleContainer, {}), (0, jsx_runtime_1.jsx)("div", { style: { alignItems: 'center', display: 'flex', gap: 16, flex: 1 }, children: (0, jsx_runtime_1.jsx)(react_components_1.Input, { contentBefore: (0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 16 }), placeholder: appStrings.searchPlaceholder, value: searchText, onChange: (e) => setSearchText(e.target.value), style: { flex: 1 } }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
23
+ }, children: [(0, jsx_runtime_1.jsx)(MobileHeaderTitleContainer_1.MobileHeaderTitleContainer, {}), (0, jsx_runtime_1.jsx)("div", { style: { alignItems: 'center', display: 'flex', gap: 16, flex: 1 }, children: (0, jsx_runtime_1.jsx)(fluent_1.Input, { contentBefore: (0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 16 }), placeholder: appStrings.searchPlaceholder, value: searchText, onChange: (e) => setSearchText(e.target.value), style: { flex: 1 } }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
23
24
  alignItems: 'center',
24
25
  gap: 16,
25
26
  justifyContent: 'space-between',
26
27
  display: 'flex',
27
- }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "subtle", style: { position: 'relative' }, icon: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icons.Filter, {}), Object.keys(columnFilters).length > 0 && ((0, jsx_runtime_1.jsx)(react_components_1.Badge, { style: { position: 'absolute', top: 0, right: 0 }, color: "danger", size: "tiny" }))] }), iconPosition: "after", onClick: () => setShowCustomFilters(true) }), (0, jsx_runtime_1.jsx)(CustomFilter_1.CustomFilter, { open: showCustomFilters, onClose: () => setShowCustomFilters(false) })] })] }));
28
+ }, children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", style: { position: 'relative' }, icon: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icons.Filter, {}), Object.keys(columnFilters).length > 0 && ((0, jsx_runtime_1.jsx)(react_components_1.Badge, { style: { position: 'absolute', top: 0, right: 0 }, color: "danger", size: "tiny" }))] }), iconPosition: "after", onClick: () => setShowCustomFilters(true) }), (0, jsx_runtime_1.jsx)(CustomFilter_1.CustomFilter, { open: showCustomFilters, onClose: () => setShowCustomFilters(false) })] })] }));
28
29
  };
29
30
  exports.GridHeaderMobile = GridHeaderMobile;
@@ -13,6 +13,7 @@ const navigation_1 = require("@headless-adminapp/app/navigation");
13
13
  const react_virtual_1 = require("@tanstack/react-virtual");
14
14
  const react_1 = require("react");
15
15
  const uuid_1 = require("uuid");
16
+ const fluent_1 = require("../components/fluent");
16
17
  const MobileHeaderCommandContainer_1 = require("../Header/MobileHeaderCommandContainer");
17
18
  const RecordCard_1 = require("../PageEntityForm/RecordCard");
18
19
  const RecordCardLoading_1 = require("../PageEntityForm/RecordCardLoading");
@@ -53,8 +54,8 @@ const GridListContainer = () => {
53
54
  const virtualItems = virtualizer.getVirtualItems();
54
55
  const virtualSize = virtualizer.getTotalSize();
55
56
  const openFormInternal = (0, navigation_1.useOpenForm)();
56
- const openRecord = (0, react_1.useCallback)((id) => {
57
- openFormInternal({
57
+ const openRecord = (0, react_1.useCallback)(async (id) => {
58
+ await openFormInternal({
58
59
  logicalName: schema.logicalName,
59
60
  id,
60
61
  recordSetIds: dataRef.current?.records.map((x) => x[schema.idAttribute]) ?? [],
@@ -84,9 +85,9 @@ const GridListContainer = () => {
84
85
  width: '100%',
85
86
  position: 'absolute',
86
87
  transform: `translateY(${virtualRow.start}px)`,
87
- }, children: [virtualRow.index > 0 && ((0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 0 }, children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }) })), (0, jsx_runtime_1.jsx)(Item, { card: view.experience.card, record: row, schema: schema, onClick: () => {
88
+ }, children: [virtualRow.index > 0 && ((0, jsx_runtime_1.jsx)("div", { style: { paddingBlock: 0 }, children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }) })), (0, jsx_runtime_1.jsx)(Item, { card: view.experience.card, record: row, schema: schema, onClick: async () => {
88
89
  const id = row[schema.idAttribute];
89
- openRecord(id);
90
+ await openRecord(id);
90
91
  }, onLongPress: () => {
91
92
  const id = row[schema.idAttribute];
92
93
  setSelectedIds([id]);
@@ -118,7 +119,7 @@ const Item = ({ onClick, onLongPress, card, record, schema, selected, }) => {
118
119
  return ((0, jsx_runtime_1.jsx)("div", { className: (0, react_components_1.mergeClasses)(styles.root), style: {
119
120
  width: '100%',
120
121
  cursor: 'pointer',
121
- borderRadius: react_components_1.tokens.borderRadiusMedium,
122
+ borderRadius: fluent_1.extendedTokens.paperBorderRadius,
122
123
  userSelect: 'none',
123
124
  WebkitUserSelect: 'none',
124
125
  }, ...longPressEvent, onClick: onClick, children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: card, record: record, schema: schema, selected: selected }) }));
@@ -9,6 +9,7 @@ const locale_1 = require("@headless-adminapp/app/locale");
9
9
  const metadata_1 = require("@headless-adminapp/app/metadata");
10
10
  const icons_1 = require("@headless-adminapp/icons");
11
11
  const react_query_1 = require("@tanstack/react-query");
12
+ const fluent_1 = require("../components/fluent");
12
13
  const MobileHeaderTitleContainer = () => {
13
14
  const { language } = (0, locale_1.useLocale)();
14
15
  const viewLookup = (0, hooks_1.useGridViewLookupData)();
@@ -25,7 +26,7 @@ const MobileHeaderTitleContainer = () => {
25
26
  return null;
26
27
  }
27
28
  }
28
- return ((0, jsx_runtime_1.jsx)(MobileHeaderTitle_1.MobileHeaderTitle, { order: 3, title: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "subtle", icon: {
29
+ return ((0, jsx_runtime_1.jsx)(MobileHeaderTitle_1.MobileHeaderTitle, { order: 3, title: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "subtle", icon: {
29
30
  style: { color: 'inherit' },
30
31
  children: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronDown, {}),
31
32
  }, iconPosition: "after", style: {
@@ -40,6 +41,6 @@ const MobileHeaderTitleContainer = () => {
40
41
  textOverflow: 'ellipsis',
41
42
  whiteSpace: 'nowrap',
42
43
  overflow: 'hidden',
43
- }, children: selectedView.localizedNames?.[language] ?? selectedView.name }) }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: viewLookup.map((view) => ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { onClick: () => changeView(view.id), icon: selectedView.id === view.id ? ((0, jsx_runtime_1.jsx)(icons_1.Icons.Checkmark, {})) : undefined, children: view.localizedNames?.[language] ?? view.name }, view.id))) }) })] }) }));
44
+ }, children: selectedView.localizedNames?.[language] ?? selectedView.name }) }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: viewLookup.map((view) => ((0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { onClick: () => changeView(view.id), icon: selectedView.id === view.id ? ((0, jsx_runtime_1.jsx)(icons_1.Icons.Checkmark, {})) : undefined, children: view.localizedNames?.[language] ?? view.name }, view.id))) }) })] }) }));
44
45
  };
45
46
  exports.MobileHeaderTitleContainer = MobileHeaderTitleContainer;
@@ -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 icons_1 = require("@headless-adminapp/icons");
7
7
  const MenuList_1 = require("../../CommandBar/MenuList");
8
+ const fluent_1 = require("../../components/fluent");
8
9
  const useStyles = (0, react_components_1.makeStyles)({
9
10
  button: {
10
11
  '&:hover': {
@@ -31,12 +32,12 @@ const TableCellAction = ({ items, onOpen, }) => {
31
32
  // background: 'white',
32
33
  // boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)',
33
34
  // borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`,
34
- }, children: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "before-top", children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreVertical, {}), onClick: onOpen, className: styles.button, style: {
35
+ }, children: (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "before-top", children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "transparent", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreVertical, {}), onClick: onOpen, className: styles.button, style: {
35
36
  // background: 'white',
36
37
  // boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)',
37
38
  boxShadow: 'var(--action-shadow)',
38
39
  borderRadius: 0,
39
40
  // background: tokens.colorNeutralBackground1,
40
- } }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { items: items }) })] }) }));
41
+ } }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { items: items }) })] }) }));
41
42
  };
42
43
  exports.TableCellAction = TableCellAction;
@@ -4,10 +4,11 @@ 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
6
  const react_1 = require("react");
7
+ const Checkbox_1 = require("../../components/fluent/Checkbox");
7
8
  exports.TableCellCheckbox = (0, react_1.memo)(({ checked, onChange }) => {
8
9
  return ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { style: { display: 'flex', alignItems: 'center' }, onClick: (event) => {
9
10
  event.stopPropagation();
10
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.Checkbox, { checked: checked ?? false, onChange: (event) => {
11
+ }, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked ?? false, onChange: (event) => {
11
12
  event.stopPropagation();
12
13
  onChange?.(event);
13
14
  } }) }));
@@ -17,6 +17,7 @@ const phone_1 = require("@headless-adminapp/app/utils/phone");
17
17
  const app_1 = require("@headless-adminapp/core/experience/app");
18
18
  const react_table_1 = require("@tanstack/react-table");
19
19
  const react_1 = require("react");
20
+ const fluent_1 = require("../components/fluent");
20
21
  const componentStore_1 = require("../componentStore");
21
22
  const avatar_1 = require("../utils/avatar");
22
23
  const ActionCell_1 = require("./ActionCell");
@@ -182,8 +183,16 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
182
183
  maxWidth: 32,
183
184
  minWidth: 32,
184
185
  alignItems: 'center',
186
+ }, checkboxIndicator: {
187
+ indicator: {
188
+ style: { borderRadius: fluent_1.extendedTokens.checkboxBorderRadius },
189
+ },
185
190
  }, onClick: toggleAllSelectedIds })),
186
- 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) => {
191
+ cell: (info) => ((0, jsx_runtime_1.jsx)(react_components_1.TableSelectionCell, { className: (0, react_components_1.mergeClasses)(styles.selectionCell), checked: info.row.getIsSelected(), checkboxIndicator: {
192
+ indicator: {
193
+ style: { borderRadius: fluent_1.extendedTokens.checkboxBorderRadius },
194
+ },
195
+ }, onClick: (event) => {
187
196
  event.preventDefault();
188
197
  event.stopPropagation();
189
198
  toggleSelectedId(info);
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlertDialog = AlertDialog;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const fluent_1 = require("../components/fluent");
6
7
  function AlertDialog(props) {
7
8
  return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.open, onOpenChange: () => {
8
9
  props.onDismiss?.();
9
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsx)(react_components_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "primary", onClick: () => {
10
+ }, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsx)(react_components_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", onClick: () => {
10
11
  props.onConfirm?.();
11
12
  }, children: props.confirmText ?? 'Close' }) })] }) }) }));
12
13
  }
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConfirmDialog = ConfirmDialog;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const fluent_1 = require("../components/fluent");
6
7
  function ConfirmDialog(props) {
7
8
  return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.open, onOpenChange: () => {
8
9
  props.onDismiss?.();
9
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "secondary", onClick: () => {
10
+ }, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "secondary", onClick: () => {
10
11
  props.onCancel?.();
11
- }, children: props.cancelText ?? 'Cancel' }), (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "primary", onClick: () => {
12
+ }, children: props.cancelText ?? 'Cancel' }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", onClick: () => {
12
13
  props.onConfirm?.();
13
14
  }, children: props.confirmText ?? 'Confirm' })] })] }) }) }));
14
15
  }
@@ -5,16 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
6
  const utils_1 = require("@headless-adminapp/core/utils");
7
7
  const icons_1 = require("@headless-adminapp/icons");
8
+ const fluent_1 = require("../components/fluent");
8
9
  function ErrorDialog(props) {
9
10
  return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.open, onOpenChange: () => {
10
11
  props.onDismiss?.();
11
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsxs)(react_components_1.DialogTitle, { style: { display: 'flex', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
12
+ }, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsxs)(react_components_1.DialogTitle, { style: { display: 'flex', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
12
13
  color: react_components_1.tokens.colorPaletteRedForeground1,
13
14
  // marginBottom: tokens.spacingVerticalL,
14
15
  display: 'inline-flex',
15
16
  alignItems: 'center',
16
17
  marginRight: react_components_1.tokens.spacingHorizontalS,
17
- }, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Error, {}) }), (0, utils_1.stringWithDefault)(props.title, 'Error')] }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsx)(react_components_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "primary", style: { background: react_components_1.tokens.colorPaletteRedBackground3 }, onClick: () => {
18
+ }, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Error, {}) }), (0, utils_1.stringWithDefault)(props.title, 'Error')] }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsx)(react_components_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", style: { background: react_components_1.tokens.colorPaletteRedBackground3 }, onClick: () => {
18
19
  props.onConfirm?.();
19
20
  }, children: props.confirmText ?? 'Close' }) })] }) }) }));
20
21
  }
@@ -7,6 +7,7 @@ const utils_1 = require("@headless-adminapp/app/dataform/utils");
7
7
  const form_1 = require("@headless-adminapp/app/form");
8
8
  const locale_1 = require("@headless-adminapp/app/locale");
9
9
  const react_hook_form_1 = require("react-hook-form");
10
+ const fluent_1 = require("../components/fluent");
10
11
  const SectionControl_1 = require("../DataForm/SectionControl");
11
12
  const StandardControl_1 = require("../PageEntityForm/StandardControl");
12
13
  function PromptDialog(props) {
@@ -25,7 +26,7 @@ function PromptDialog(props) {
25
26
  });
26
27
  return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.open, onOpenChange: () => {
27
28
  props.onDismiss?.();
28
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogContent, { children: [!!props.text && (0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: props.text }), (0, jsx_runtime_1.jsx)("div", { style: {
29
+ }, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 480 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [!!props.title && (0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: props.title }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogContent, { children: [!!props.text && (0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: props.text }), (0, jsx_runtime_1.jsx)("div", { style: {
29
30
  display: 'flex',
30
31
  flexDirection: 'column',
31
32
  gap: react_components_1.tokens.spacingVerticalM,
@@ -40,9 +41,9 @@ function PromptDialog(props) {
40
41
  : '';
41
42
  return ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: attribute.label, labelPosition: "left", required: attribute.required, isError: isError, errorMessage: errorMessage, children: (0, jsx_runtime_1.jsx)(StandardControl_1.StandardControl, { attribute: attribute, name: attributeName, value: field.value, onChange: field.onChange, onBlur: field.onBlur, errorMessage: errorMessage, isError: isError, readOnly: attribute.readonly }) }));
42
43
  } }, attributeName));
43
- }) })] }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "secondary", type: "button", onClick: () => {
44
+ }) })] }), (0, jsx_runtime_1.jsxs)(react_components_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "secondary", type: "button", onClick: () => {
44
45
  props.onCancel?.();
45
- }, children: props.cancelText ?? 'Cancel' }), (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "primary", disabled: form.formState.submitCount > 0 && !form.formState.isValid, onClick: async () => {
46
+ }, children: props.cancelText ?? 'Cancel' }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", disabled: form.formState.submitCount > 0 && !form.formState.isValid, onClick: async () => {
46
47
  await form.handleSubmit(async (values) => {
47
48
  props.onConfirm?.(values);
48
49
  })();
@@ -7,6 +7,7 @@ const MobileHeaderRightContent_1 = require("@headless-adminapp/app/header/compon
7
7
  const icons_1 = require("@headless-adminapp/icons");
8
8
  const react_1 = require("react");
9
9
  const QuickActionItem_1 = require("../App/QuickActionItem");
10
+ const fluent_1 = require("../components/fluent");
10
11
  const MobileHeaderQuickActionButton_1 = require("./MobileHeaderQuickActionButton");
11
12
  const useStyles = (0, react_components_1.makeStyles)({
12
13
  dangerMenuItem: {
@@ -95,7 +96,7 @@ const BottomDrawerMenu = ({ open, onClose, actions, }) => {
95
96
  display: 'flex',
96
97
  justifyContent: 'space-between',
97
98
  alignItems: 'center',
98
- }, children: [subMenuStack.length ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronLeft, { size: 20 }), appearance: "subtle", onClick: popStack })) : ((0, jsx_runtime_1.jsx)("div", {})), !subMenuStack.length && ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, { size: 20 }), appearance: "subtle", onClick: onClose }))] }), (0, jsx_runtime_1.jsxs)("div", { style: {
99
+ }, children: [subMenuStack.length ? ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronLeft, { size: 20 }), appearance: "subtle", onClick: popStack })) : ((0, jsx_runtime_1.jsx)("div", {})), !subMenuStack.length && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, { size: 20 }), appearance: "subtle", onClick: onClose }))] }), (0, jsx_runtime_1.jsxs)("div", { style: {
99
100
  overflowY: 'auto',
100
101
  overflowX: 'hidden',
101
102
  }, children: [!subMenuStack.length && ((0, jsx_runtime_1.jsx)(react_components_1.MenuList, { hasIcons: true, style: { gap: 0 }, children: actions.map((group, groupIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [groupIndex > 0 && ((0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, { style: { opacity: 0.2, margin: '0px 5px' } })), group.map((item, index) => {
@@ -103,18 +104,18 @@ const BottomDrawerMenu = ({ open, onClose, actions, }) => {
103
104
  return null;
104
105
  }
105
106
  if (item.type === 'button') {
106
- return ((0, jsx_runtime_1.jsx)(ButtonItem, { text: item.text, Icon: item.Icon, danger: item.danger, onClick: () => {
107
+ return ((0, jsx_runtime_1.jsx)(ButtonItem, { text: item.text, Icon: item.Icon, danger: item.danger, onClick: async () => {
107
108
  onClose();
108
- item.onClick?.();
109
+ await item.onClick?.();
109
110
  } }, `${groupIndex}-${index}`));
110
111
  }
111
112
  if (item.type === 'menu') {
112
113
  return ((0, jsx_runtime_1.jsx)(NavigationMenu, { text: item.text, Icon: item.Icon, danger: item.danger, showDivider: item.items.length > 0 && !!item.onClick, showNavigateButton: item.items.length > 0, onNavigate: () => {
113
114
  pushStack(item.items);
114
- }, onClick: () => {
115
+ }, onClick: async () => {
115
116
  if (item.onClick) {
116
117
  onClose();
117
- item.onClick();
118
+ await item.onClick();
118
119
  }
119
120
  else {
120
121
  pushStack(item.items);
@@ -130,10 +131,10 @@ const BottomDrawerMenu = ({ open, onClose, actions, }) => {
130
131
  return;
131
132
  }
132
133
  pushStack(item.items);
133
- }, onClick: () => {
134
+ }, onClick: async () => {
134
135
  if (item.onClick) {
135
136
  onClose();
136
- item.onClick();
137
+ await item.onClick();
137
138
  }
138
139
  else if (item.items?.length) {
139
140
  pushStack(item.items);
@@ -144,7 +145,7 @@ const BottomDrawerMenu = ({ open, onClose, actions, }) => {
144
145
  exports.BottomDrawerMenu = BottomDrawerMenu;
145
146
  const NavigationMenu = ({ Icon, danger, text, onClick, onNavigate, showDivider, showNavigateButton, }) => {
146
147
  const styles = useStyles();
147
- return ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : (0, jsx_runtime_1.jsx)(icons_1.IconPlaceholder, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.dangerMenuItem), style: {
148
+ return ((0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : (0, jsx_runtime_1.jsx)(icons_1.IconPlaceholder, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.dangerMenuItem), style: {
148
149
  maxWidth: 'unset',
149
150
  minHeight: 48,
150
151
  alignItems: 'center',
@@ -156,14 +157,14 @@ const NavigationMenu = ({ Icon, danger, text, onClick, onNavigate, showDivider,
156
157
  flexDirection: 'row',
157
158
  alignItems: 'center',
158
159
  gap: 8,
159
- }, children: [(0, jsx_runtime_1.jsx)("span", { style: { flex: 1 }, children: text }), showNavigateButton && showDivider && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: true, style: { opacity: 0.5, height: '100%' } }) })), showNavigateButton && ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronRight, { size: 20 }), onClick: (e) => {
160
+ }, children: [(0, jsx_runtime_1.jsx)("span", { style: { flex: 1 }, children: text }), showNavigateButton && showDivider && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: true, style: { opacity: 0.5, height: '100%' } }) })), showNavigateButton && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.ChevronRight, { size: 20 }), onClick: (e) => {
160
161
  e.stopPropagation();
161
162
  onNavigate?.();
162
163
  }, appearance: "subtle" }))] }) }));
163
164
  };
164
165
  const ButtonItem = ({ Icon, danger, text, onClick }) => {
165
166
  const styles = useStyles();
166
- return ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : (0, jsx_runtime_1.jsx)(icons_1.IconPlaceholder, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.dangerMenuItem), style: {
167
+ return ((0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : (0, jsx_runtime_1.jsx)(icons_1.IconPlaceholder, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.dangerMenuItem), style: {
167
168
  maxWidth: 'unset',
168
169
  minHeight: 48,
169
170
  alignItems: 'center',
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MobileHeaderQuickActionButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const fluent_1 = require("../components/fluent");
6
7
  const useStyles = (0, react_components_1.makeStyles)({
7
8
  root: {
8
9
  color: 'inherit !important',
@@ -27,9 +28,8 @@ const useStyles = (0, react_components_1.makeStyles)({
27
28
  });
28
29
  const MobileHeaderQuickActionButton = ({ disabled, title, Icon, onClick }) => {
29
30
  const styles = useStyles();
30
- return ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(Icon, { size: "inherit" }), disabled: disabled, appearance: "transparent", style: {
31
+ return ((0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(Icon, { size: "inherit" }), disabled: disabled, appearance: "transparent", style: {
31
32
  position: 'relative',
32
- fontWeight: react_components_1.tokens.fontWeightRegular,
33
33
  minWidth: 'unset',
34
34
  }, className: styles.root, onClick: onClick, children: title }));
35
35
  };
@@ -8,6 +8,7 @@ const mutable_1 = require("@headless-adminapp/app/mutable");
8
8
  const icons_1 = require("@headless-adminapp/icons");
9
9
  const react_1 = require("react");
10
10
  const react_hook_form_1 = require("react-hook-form");
11
+ const fluent_1 = require("../components/fluent");
11
12
  const StandardControl_1 = require("../PageEntityForm/StandardControl");
12
13
  const Header = () => {
13
14
  const config = (0, mutable_1.useContextSelector)(insights_1.InsightsContext, (state) => state.config);
@@ -28,9 +29,13 @@ const Header = () => {
28
29
  // ? tokens.colorNeutralBackground1
29
30
  // : 'transparent',
30
31
  // backdropFilter: isScrolled ? 'blur(15px)' : 'none',
32
+ backdropFilter: 'blur(15px)',
33
+ background: react_components_1.tokens.colorNeutralBackgroundAlpha,
31
34
  boxShadow: react_components_1.tokens.shadow4,
32
- backgroundColor: react_components_1.tokens.colorNeutralBackground1,
35
+ // backgroundColor: tokens.colorNeutralBackground1,
36
+ // backgroundColor: 'rgba(255, 255, 255, 0.8)',
33
37
  // backdropFilter: 'blur(20px)',
38
+ borderRadius: fluent_1.extendedTokens.paperBorderRadius,
34
39
  }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
35
40
  display: 'flex',
36
41
  alignItems: 'center',
@@ -39,7 +44,7 @@ const Header = () => {
39
44
  display: 'flex',
40
45
  alignItems: 'center',
41
46
  gap: react_components_1.tokens.spacingHorizontalS,
42
- }, children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Refresh, {}), appearance: "subtle", style: { fontWeight: react_components_1.tokens.fontWeightRegular }, onClick: () => {
47
+ }, children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Refresh, {}), appearance: "subtle", onClick: () => {
43
48
  eventManager.emit('INSIGHT_REFRESH_TRIGGER');
44
49
  }, children: "Refresh" }) })] }), !!config.filterAttributes && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.2 } }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', gap: react_components_1.tokens.spacingHorizontalS }, children: Object.entries(config.filterAttributes).map(([attributeName, attribute]) => {
45
50
  return ((0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: filterForm.control, name: attributeName, render: ({ field }) => {
@@ -12,29 +12,31 @@ const Widgets_1 = require("./Widgets");
12
12
  function InsightsContainer() {
13
13
  const config = (0, mutable_1.useContextSelector)(insights_1.InsightsContext, (state) => state.config);
14
14
  const [isScrolled, setIsScrolled] = (0, react_1.useState)(false);
15
- return ((0, jsx_runtime_1.jsxs)("div", { style: {
15
+ return ((0, jsx_runtime_1.jsx)("div", { style: {
16
16
  display: 'flex',
17
17
  flex: 1,
18
18
  flexDirection: 'column',
19
19
  backgroundColor: react_components_1.tokens.colorNeutralBackground2,
20
20
  overflow: 'hidden',
21
- }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
22
- // padding: spacingMapping[insightExpereince.style?.spacing ?? 'normal'],
23
- // paddingBottom: 0,
24
- // boxShadow: isScrolled ? tokens.shadow2 : 'none',
25
- // backgroundColor: isScrolled
26
- // ? tokens.colorNeutralBackground1
27
- // : 'transparent',
28
- zIndex: 1,
29
- position: 'sticky',
30
- top: 0,
31
- }, children: (0, jsx_runtime_1.jsx)(Header_1.Header, { isScrolled: isScrolled }) }), (0, jsx_runtime_1.jsx)("div", { style: {
32
- display: 'flex',
33
- flexDirection: 'column',
34
- flex: 1,
35
- overflow: 'hidden',
36
- }, children: (0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { onScroll: (event) => {
37
- const div = event.target;
38
- setIsScrolled(div.scrollTop > 0);
39
- }, children: (0, jsx_runtime_1.jsx)(Widgets_1.Widgets, { widgets: config.widgets }) }) })] }));
21
+ }, children: (0, jsx_runtime_1.jsx)("div", { style: {
22
+ display: 'flex',
23
+ flexDirection: 'column',
24
+ flex: 1,
25
+ overflow: 'hidden',
26
+ }, children: (0, jsx_runtime_1.jsxs)(ScrollView_1.ScrollView, { onScroll: (event) => {
27
+ const div = event.target;
28
+ setIsScrolled(div.scrollTop > 0);
29
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
30
+ // paddingInline:
31
+ // spacingMapping[insightExpereince.style?.spacing ?? 'normal'],
32
+ padding: react_components_1.tokens.spacingHorizontalXL,
33
+ paddingBottom: 0,
34
+ // boxShadow: isScrolled ? tokens.shadow2 : 'none',
35
+ // backgroundColor: isScrolled
36
+ // ? tokens.colorNeutralBackground1
37
+ // : 'transparent',
38
+ zIndex: 1,
39
+ position: 'sticky',
40
+ top: 0,
41
+ }, children: (0, jsx_runtime_1.jsx)(Header_1.Header, { isScrolled: isScrolled }) }), (0, jsx_runtime_1.jsx)(Widgets_1.Widgets, { widgets: config.widgets })] }) }) }));
40
42
  }
@@ -6,16 +6,18 @@ const command_1 = require("@headless-adminapp/app/command");
6
6
  const hooks_1 = require("@headless-adminapp/app/command/hooks");
7
7
  const DataGridProvider_1 = require("@headless-adminapp/app/datagrid/DataGridProvider");
8
8
  const hooks_2 = require("@headless-adminapp/app/datagrid/hooks");
9
- const hooks_3 = require("@headless-adminapp/app/metadata/hooks");
9
+ const hooks_3 = require("@headless-adminapp/app/hooks");
10
+ const hooks_4 = require("@headless-adminapp/app/metadata/hooks");
10
11
  const BodyLoading_1 = require("../components/BodyLoading");
11
12
  const DataGrid_1 = require("../DataGrid");
13
+ const GridListContainer_1 = require("../DataGrid/GridListContainer");
12
14
  const WidgetSection_1 = require("./WidgetSection");
13
15
  const WidgetTitleBar_1 = require("./WidgetTitleBar");
14
16
  /*** @deprecated Need refactoring */
15
17
  function WidgetDataGridContainer({ logicalName, maxRecords, filter, commands, title, view, viewId, allowContextMenu, }) {
16
- const schema = (0, hooks_3.useSchema)(logicalName);
17
- const { view: _view, isLoadingView } = (0, hooks_3.useExperienceView)(logicalName, viewId);
18
- const { commands: contextCommands } = (0, hooks_3.useExperienceViewCommands)(logicalName);
18
+ const schema = (0, hooks_4.useSchema)(logicalName);
19
+ const { view: _view, isLoadingView } = (0, hooks_4.useExperienceView)(logicalName, viewId);
20
+ const { commands: contextCommands } = (0, hooks_4.useExperienceViewCommands)(logicalName);
19
21
  view ??= _view;
20
22
  if (!view && isLoadingView) {
21
23
  return ((0, jsx_runtime_1.jsx)(WidgetSection_1.WidgetSection, { children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, position: 'relative' }, children: (0, jsx_runtime_1.jsx)(BodyLoading_1.BodyLoading, {}) }) }));
@@ -29,6 +31,7 @@ function WidgetDataGridContainer({ logicalName, maxRecords, filter, commands, ti
29
31
  return ((0, jsx_runtime_1.jsx)(DataGridProvider_1.DataGridProvider, { schema: schema, view: view, views: [], onChangeView: () => { }, commands: contextCommands, allowViewSelection: false, maxRecords: maxRecords, extraFilter: filter, children: (0, jsx_runtime_1.jsx)(FormSubgridContainer, { title: title, commands: commands, allowContextMenu: allowContextMenu }) }));
30
32
  }
31
33
  const FormSubgridContainer = ({ title, commands, allowContextMenu, }) => {
34
+ const isMobile = (0, hooks_3.useIsMobile)();
32
35
  const baseCommandHandleContext = (0, hooks_1.useBaseCommandHandlerContext)();
33
36
  const primaryControl = (0, hooks_2.useGridControlContext)();
34
37
  const transformedCommands = (0, command_1.useCommands)(commands, {
@@ -49,5 +52,5 @@ const FormSubgridContainer = ({ title, commands, allowContextMenu, }) => {
49
52
  display: 'flex',
50
53
  flexDirection: 'column',
51
54
  flex: 1,
52
- }, children: (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: 'flex', minHeight: 300 }, children: (0, jsx_runtime_1.jsx)(DataGrid_1.GridTableContainer, { disableColumnSort: true, disableColumnFilter: true, disableSelection: true, disableContextMenu: !allowContextMenu }) }) }) }) })] }));
55
+ }, children: (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: 'flex', minHeight: 300 }, children: !isMobile ? ((0, jsx_runtime_1.jsx)(DataGrid_1.GridTableContainer, { disableColumnSort: true, disableColumnFilter: true, disableSelection: true, disableContextMenu: !allowContextMenu })) : ((0, jsx_runtime_1.jsx)(GridListContainer_1.GridListContainer, {})) }) }) }) })] }));
53
56
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WidgetSection = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const fluent_1 = require("../components/fluent");
6
7
  const WidgetSection = ({ children, style, }) => {
7
8
  return ((0, jsx_runtime_1.jsx)("div", { style: {
8
9
  display: 'flex',
@@ -10,7 +11,7 @@ const WidgetSection = ({ children, style, }) => {
10
11
  flexDirection: 'column',
11
12
  background: react_components_1.tokens.colorNeutralBackground1,
12
13
  ...style,
13
- borderRadius: react_components_1.tokens.borderRadiusXLarge,
14
+ borderRadius: fluent_1.extendedTokens.paperBorderRadius,
14
15
  overflow: 'hidden',
15
16
  boxShadow: 'none',
16
17
  position: 'relative',
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WidgetTileContainer = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const fluent_1 = require("../components/fluent");
6
7
  const WidgetTileContainer = ({}) => {
7
8
  return ((0, jsx_runtime_1.jsx)("div", { style: {
8
9
  display: 'flex',
9
10
  flex: 1,
10
11
  background: react_components_1.tokens.colorNeutralBackground1,
11
12
  boxShadow: react_components_1.tokens.shadow2,
12
- borderRadius: react_components_1.tokens.borderRadiusMedium,
13
+ borderRadius: fluent_1.extendedTokens.controlBorderRadius,
13
14
  flexDirection: 'column',
14
15
  }, children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1 }, children: (0, jsx_runtime_1.jsx)("div", { style: {
15
16
  flex: 1,
@@ -7,6 +7,7 @@ const locale_1 = require("@headless-adminapp/app/locale");
7
7
  const icons_1 = require("@headless-adminapp/icons");
8
8
  const react_1 = require("react");
9
9
  const MenuItem_1 = require("../CommandBar/MenuItem");
10
+ const fluent_1 = require("../components/fluent");
10
11
  const OverflowMenuDivider_1 = require("./OverflowMenuDivider");
11
12
  const utils_1 = require("./utils");
12
13
  const OverflowMenu = ({ items, }) => {
@@ -15,7 +16,7 @@ const OverflowMenu = ({ items, }) => {
15
16
  if (!isOverflowing) {
16
17
  return null;
17
18
  }
18
- return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "below-end", hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ref: ref, type: "button", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreHorizontal, {}) }) }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: items.map((group, groupIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [groupIndex > 0 && ((0, jsx_runtime_1.jsx)(OverflowMenuDivider_1.OverflowMenuDivider, { id: String(groupIndex), previousGroupId: String(groupIndex - 1) })), group.map((item, index) => {
19
+ return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "below-end", hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(fluent_1.ToolbarButton, { ref: ref, type: "button", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreHorizontal, {}) }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: items.map((group, groupIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [groupIndex > 0 && ((0, jsx_runtime_1.jsx)(OverflowMenuDivider_1.OverflowMenuDivider, { id: String(groupIndex), previousGroupId: String(groupIndex - 1) })), group.map((item, index) => {
19
20
  const text = 'text' in item ? item.text ?? '' : '';
20
21
  return ((0, jsx_runtime_1.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'
21
22
  ? item.items?.map((x) => (0, utils_1.transformMenuItems)(x, language))