@headless-adminapp/fluent 1.0.2 → 1.1.0

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 (132) hide show
  1. package/App/AppHeaderContianer.js +5 -1
  2. package/App/AppUI.js +7 -2
  3. package/App/Navigation/NavCategoryItemComponent.d.ts +8 -0
  4. package/App/Navigation/NavCategoryItemComponent.js +20 -0
  5. package/App/Navigation/NavItemComponent.d.ts +8 -0
  6. package/App/Navigation/NavItemComponent.js +19 -0
  7. package/App/Navigation/NavSubItemComponent.d.ts +8 -0
  8. package/App/Navigation/NavSubItemComponent.js +17 -0
  9. package/App/Navigation/NavigationContainer.d.ts +9 -0
  10. package/App/Navigation/NavigationContainer.js +85 -0
  11. package/App/Navigation/index.d.ts +1 -0
  12. package/App/Navigation/index.js +5 -0
  13. package/App/Navigation/types.d.ts +39 -0
  14. package/App/Navigation/types.js +2 -0
  15. package/App/Navigation/utils.d.ts +18 -0
  16. package/App/Navigation/utils.js +82 -0
  17. package/App/QuickActionItem.d.ts +3 -0
  18. package/App/QuickActionItem.js +12 -3
  19. package/CommandBar/Button.d.ts +1 -0
  20. package/CommandBar/Button.js +22 -2
  21. package/CommandBar/IconButton.d.ts +1 -0
  22. package/CommandBar/MenuButton.d.ts +1 -0
  23. package/CommandBar/MenuItem.d.ts +1 -0
  24. package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +3 -1
  25. package/DataGrid/GridHeaderContainer.d.ts +1 -0
  26. package/DataGrid/GridHeaderContainer.js +6 -1
  27. package/DataGrid/GridHeaderDesktopV2.d.ts +6 -0
  28. package/DataGrid/GridHeaderDesktopV2.js +54 -0
  29. package/DataGrid/GridListContainer.js +9 -5
  30. package/DataGrid/GridTableContainer.d.ts +2 -0
  31. package/DataGrid/GridTableContainer.js +37 -13
  32. package/DataGrid/TableCell/TableCellAction.js +2 -1
  33. package/DataGrid/TableCell/TableCellBase.js +1 -0
  34. package/DataGrid/TableCell/TableCellLink.js +1 -0
  35. package/DataGrid/constants.d.ts +2 -0
  36. package/DataGrid/constants.js +5 -0
  37. package/DataGrid/useTableColumns.js +23 -6
  38. package/Insights/CommandBarContainer.js +1 -1
  39. package/Insights/FilterBarContainer.js +8 -8
  40. package/Insights/Grid.d.ts +7 -1
  41. package/Insights/Grid.js +24 -8
  42. package/Insights/Header.d.ts +6 -0
  43. package/Insights/Header.js +50 -0
  44. package/Insights/InsightsContainer.js +19 -14
  45. package/Insights/WidgetChartContainer.d.ts +13 -3
  46. package/Insights/WidgetChartContainer.js +62 -38
  47. package/Insights/WidgetDataGridContainer.d.ts +11 -4
  48. package/Insights/WidgetDataGridContainer.js +7 -27
  49. package/Insights/WidgetSection.d.ts +2 -0
  50. package/Insights/WidgetSection.js +16 -0
  51. package/Insights/WidgetTableContainer.d.ts +9 -2
  52. package/Insights/WidgetTableContainer.js +7 -18
  53. package/Insights/WidgetTileContainer.d.ts +0 -2
  54. package/Insights/WidgetTileContainer.js +8 -11
  55. package/Insights/WidgetTitleBar.d.ts +1 -1
  56. package/Insights/WidgetTitleBar.js +1 -1
  57. package/Insights/Widgets.d.ts +2 -2
  58. package/Insights/Widgets.js +15 -48
  59. package/Insights/charts/AreaChart.d.ts +1 -0
  60. package/Insights/charts/AreaChart.js +4 -1
  61. package/Insights/charts/BarChart.d.ts +1 -0
  62. package/Insights/charts/BarChart.js +3 -2
  63. package/Insights/charts/ComposedChart.d.ts +1 -0
  64. package/Insights/charts/ComposedChart.js +4 -1
  65. package/Insights/charts/FunnelChart.d.ts +6 -0
  66. package/Insights/charts/FunnelChart.js +50 -0
  67. package/Insights/charts/FunnelCustomTooltipContent.d.ts +5 -0
  68. package/Insights/charts/FunnelCustomTooltipContent.js +27 -0
  69. package/Insights/charts/GaugeChart.d.ts +1 -0
  70. package/Insights/charts/GaugeChart.js +1 -0
  71. package/Insights/charts/LineChart.d.ts +1 -0
  72. package/Insights/charts/LineChart.js +2 -2
  73. package/Insights/charts/OhlcChart.d.ts +1 -0
  74. package/Insights/charts/OhlcChart.js +1 -1
  75. package/Insights/charts/PieChart.d.ts +1 -0
  76. package/Insights/charts/PieChart.js +2 -1
  77. package/Insights/charts/RadarChart.d.ts +1 -0
  78. package/Insights/charts/RadarChart.js +1 -0
  79. package/Insights/charts/ScatterChart.d.ts +1 -0
  80. package/Insights/charts/ScatterChart.js +2 -1
  81. package/Insights/charts/renderers.d.ts +6 -5
  82. package/Insights/charts/renderers.js +16 -13
  83. package/Insights/constants.d.ts +4 -0
  84. package/Insights/constants.js +7 -0
  85. package/Insights/hooks/useQueriesData.d.ts +2 -2
  86. package/Insights/hooks/useQueriesData.js +0 -1
  87. package/OverflowCommandBar/render.js +3 -3
  88. package/PageBoard/BoardColumnUI.js +36 -7
  89. package/PageBoard/Header.js +5 -3
  90. package/PageBoard/PageBoard.js +7 -1
  91. package/PageCalendar/CalendarSection.js +37 -8
  92. package/PageCalendar/EventDialog/AttributeController.d.ts +2 -1
  93. package/PageCalendar/EventDialog/AttributeController.js +2 -2
  94. package/PageCalendar/EventDialog/EventFormBody.js +17 -2
  95. package/PageCalendar/EventDialog/EventFormContent.d.ts +4 -1
  96. package/PageCalendar/EventDialog/EventFormContent.js +7 -7
  97. package/PageCalendar/Header.js +1 -1
  98. package/PageCalendar/PageCalendar.js +6 -1
  99. package/PageCalendar/TitleSelector.js +8 -4
  100. package/PageEntityForm/PageCustomEntityForm.d.ts +1 -2
  101. package/PageEntityForm/PageCustomEntityForm.js +3 -4
  102. package/PageEntityForm/PageEntityFormDesktopContainer.js +4 -0
  103. package/PageEntityForm/RecordAvatar.js +1 -2
  104. package/PageEntityForm/RecordCard.js +17 -28
  105. package/PageEntityForm/RelatedViewSelector.js +1 -0
  106. package/PageEntityForm/SectionContainer.js +7 -1
  107. package/PageEntityView/PageEntityView.d.ts +1 -0
  108. package/PageEntityView/PageEntityView.js +12 -2
  109. package/PageEntityView/PageEntityViewDesktopContainer.d.ts +1 -0
  110. package/PageEntityView/PageEntityViewDesktopContainer.js +7 -3
  111. package/PageEntityView/PageEntityViewDesktopFrame.js +1 -1
  112. package/PageEntityView/PageEntityViewDesktopFrameV2.d.ts +8 -0
  113. package/PageEntityView/PageEntityViewDesktopFrameV2.js +48 -0
  114. package/PageEntityView/PageEntityViewMobileContainer.js +2 -3
  115. package/PageEntityView/PageEntityViewMobileFrame.d.ts +8 -0
  116. package/PageEntityView/PageEntityViewMobileFrame.js +38 -0
  117. package/PageInsight/PageInsight.d.ts +7 -0
  118. package/PageInsight/PageInsight.js +31 -0
  119. package/PageInsight/index.d.ts +1 -0
  120. package/PageInsight/index.js +5 -0
  121. package/PageInsights/PageInsights.d.ts +5 -7
  122. package/PageInsights/PageInsights.js +24 -18
  123. package/PageInsights/index.d.ts +1 -1
  124. package/PageInsights/index.js +1 -2
  125. package/components/ComponentBroken.d.ts +7 -0
  126. package/components/ComponentBroken.js +16 -0
  127. package/components/ComponentErrorBoundary.d.ts +15 -0
  128. package/components/ComponentErrorBoundary.js +26 -0
  129. package/form/controls/DateTimeControl.js +17 -3
  130. package/form/controls/DurationControl.js +0 -2
  131. package/form/controls/LookupControl.js +6 -3
  132. package/package.json +3 -3
@@ -33,6 +33,7 @@ const AppHeaderContainer = ({ onNavToggle, }) => {
33
33
  const quickActionItems = (0, hooks_2.useItemsWithKey)(app.quickActionItems);
34
34
  const accountMenuItems = (0, hooks_2.useItemsWithKey)(app.accountMenuItems);
35
35
  const router = (0, route_1.useRouter)();
36
+ const basePath = (0, route_1.useBasePath)();
36
37
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
37
38
  display: 'flex',
38
39
  alignItems: 'center',
@@ -53,6 +54,9 @@ const AppHeaderContainer = ({ onNavToggle, }) => {
53
54
  display: 'flex',
54
55
  gap: 16,
55
56
  }, children: [(0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', gap: 8 }, children: quickActionItems?.map((item) => {
57
+ if (item.type === 'custom') {
58
+ return (0, jsx_runtime_1.jsx)(item.Component, {}, item.__key);
59
+ }
56
60
  return ((0, jsx_runtime_1.jsx)(QuickActionItem_1.QuickActionItem, { Icon: item.icon, label: item.localizedLabel?.[language] ?? item.label, onClick: () => item.onClick?.(), link: item.link }, item.__key));
57
61
  }) }), (!isSkipAuthCheck || !!accountMenuItems?.length) && ((0, jsx_runtime_1.jsxs)(react_components_1.Popover, { children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(react_components_1.Avatar, { initials: initials, color: "neutral", style: { cursor: 'pointer' }, image: {
58
62
  src: authSession?.profilePicture,
@@ -76,7 +80,7 @@ const AppHeaderContainer = ({ onNavToggle, }) => {
76
80
  item.onClick();
77
81
  }
78
82
  else if (item.link) {
79
- router.push(item.link);
83
+ router.push(basePath + item.link);
80
84
  }
81
85
  }, children: item.localizedLabel?.[language] ?? item.label }, item.__key));
82
86
  }), !isSkipAuthCheck && ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.SignOut, {}), onClick: () => logout(), children: strings.logout }))] })] })] }))] })] }));
package/App/AppUI.js CHANGED
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const hooks_1 = require("@headless-adminapp/app/hooks");
6
6
  const react_1 = require("react");
7
7
  const AppHeaderContianer_1 = require("./AppHeaderContianer");
8
- const NavigationContainer_1 = require("./NavigationContainer");
8
+ const Navigation_1 = require("./Navigation");
9
9
  const AppUI = ({ children }) => {
10
10
  const isMobile = (0, hooks_1.useIsMobile)();
11
11
  const [isNavOpen, setIsNavOpen] = (0, react_1.useState)(!isMobile);
@@ -13,7 +13,12 @@ const AppUI = ({ children }) => {
13
13
  (0, react_1.useEffect)(() => {
14
14
  setIsNavOpen(!isMobile);
15
15
  }, [isMobile]);
16
- return ((0, jsx_runtime_1.jsxs)("main", { style: { display: 'flex', flexDirection: 'column', height: '100vh' }, children: [(0, jsx_runtime_1.jsx)(AppHeaderContianer_1.AppHeaderContainer, { onNavToggle: () => setIsNavOpen(!isNavOpen) }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flex: 1, overflow: 'hidden' }, children: [(0, jsx_runtime_1.jsx)(NavigationContainer_1.NavigationContainer, { open: isNavOpen, type: navType, onOpenChange: (open) => setIsNavOpen(open) }), (0, jsx_runtime_1.jsx)("div", { style: {
16
+ return ((0, jsx_runtime_1.jsxs)("main", { style: {
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ position: 'fixed',
20
+ inset: 0,
21
+ }, children: [(0, jsx_runtime_1.jsx)(AppHeaderContianer_1.AppHeaderContainer, { onNavToggle: () => setIsNavOpen(!isNavOpen) }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flex: 1, overflow: 'hidden' }, children: [(0, jsx_runtime_1.jsx)(Navigation_1.NavigationContainer, { open: isNavOpen, type: navType, onOpenChange: (open) => setIsNavOpen(open) }), (0, jsx_runtime_1.jsx)("div", { style: {
17
22
  display: 'flex',
18
23
  flexDirection: 'column',
19
24
  flex: 1,
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { NavCategoryInfo } from './types';
3
+ interface NavCategoryItemComponentProps {
4
+ item: NavCategoryInfo;
5
+ isActive: boolean;
6
+ }
7
+ export declare const NavCategoryItemComponent: FC<NavCategoryItemComponentProps>;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavCategoryItemComponent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const react_nav_preview_1 = require("@fluentui/react-nav-preview");
7
+ const icons_1 = require("@headless-adminapp/icons");
8
+ const useStyles = (0, react_components_1.makeStyles)({
9
+ activeNavCategoryItem: {
10
+ '&[aria-expanded="false"]': {
11
+ backgroundColor: react_components_1.tokens.colorNeutralBackground4Hover,
12
+ },
13
+ },
14
+ });
15
+ const NavCategoryItemComponent = ({ item, isActive, }) => {
16
+ const styles = useStyles();
17
+ const Icon = item.Icon ?? icons_1.IconPlaceholder;
18
+ return ((0, jsx_runtime_1.jsx)(react_nav_preview_1.NavCategoryItem, { icon: (0, jsx_runtime_1.jsx)(Icon, { filled: isActive, color: isActive ? 'var(--colorNeutralForeground2BrandSelected)' : undefined }), className: isActive ? styles.activeNavCategoryItem : undefined, children: item.label }));
19
+ };
20
+ exports.NavCategoryItemComponent = NavCategoryItemComponent;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { NavItemInfo } from './types';
3
+ interface NavItemComponentProps {
4
+ item: NavItemInfo;
5
+ onClick: (item: NavItemInfo) => void;
6
+ }
7
+ export declare const NavItemComponent: FC<NavItemComponentProps>;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavItemComponent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const react_nav_preview_1 = require("@fluentui/react-nav-preview");
7
+ const NavItemComponent = ({ item, onClick, }) => {
8
+ return ((0, jsx_runtime_1.jsxs)(react_nav_preview_1.NavItem, { href: item.link, onClick: (event) => {
9
+ event.preventDefault();
10
+ onClick(item);
11
+ }, style: {
12
+ backgroundColor: item.active
13
+ ? react_components_1.tokens.colorNeutralBackground4Hover
14
+ : undefined,
15
+ }, icon: (0, jsx_runtime_1.jsx)(item.Icon, { size: 20, filled: item.active, color: item.active
16
+ ? 'var(--colorNeutralForeground2BrandSelected)'
17
+ : undefined }), value: item.active ? 'active' : '', children: [item.label, !!item.RightComponent && ((0, jsx_runtime_1.jsx)("span", { style: { flex: 1, justifyContent: 'flex-end', display: 'flex' }, children: (0, jsx_runtime_1.jsx)(item.RightComponent, {}) }))] }));
18
+ };
19
+ exports.NavItemComponent = NavItemComponent;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { NavSubItemInfo } from './types';
3
+ interface NavSubItemComponentProps {
4
+ item: NavSubItemInfo;
5
+ onClick: (item: NavSubItemInfo) => void;
6
+ }
7
+ export declare const NavSubItemComponent: FC<NavSubItemComponentProps>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavSubItemComponent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const react_nav_preview_1 = require("@fluentui/react-nav-preview");
7
+ const NavSubItemComponent = ({ item, onClick, }) => {
8
+ return ((0, jsx_runtime_1.jsx)(react_nav_preview_1.NavSubItem, { href: item.link, onClick: (event) => {
9
+ event.preventDefault();
10
+ onClick(item);
11
+ }, style: {
12
+ backgroundColor: item.active
13
+ ? react_components_1.tokens.colorNeutralBackground4Hover
14
+ : undefined,
15
+ }, value: item.active ? 'active' : '', children: item.label }));
16
+ };
17
+ exports.NavSubItemComponent = NavSubItemComponent;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { DrawerType } from './types';
3
+ interface NavigationContainerProps {
4
+ open: boolean;
5
+ type: DrawerType;
6
+ onOpenChange: (open: boolean) => void;
7
+ }
8
+ export declare const NavigationContainer: FC<NavigationContainerProps>;
9
+ export {};
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavigationContainer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const react_nav_preview_1 = require("@fluentui/react-nav-preview");
7
+ const app_1 = require("@headless-adminapp/app/app");
8
+ const locale_1 = require("@headless-adminapp/app/locale");
9
+ const hooks_1 = require("@headless-adminapp/app/route/hooks");
10
+ const app_2 = require("@headless-adminapp/core/experience/app");
11
+ const react_1 = require("react");
12
+ const NavCategoryItemComponent_1 = require("./NavCategoryItemComponent");
13
+ const NavItemComponent_1 = require("./NavItemComponent");
14
+ const NavSubItemComponent_1 = require("./NavSubItemComponent");
15
+ const utils_1 = require("./utils");
16
+ const useStyles = (0, react_components_1.makeStyles)({
17
+ root: {
18
+ overflow: 'hidden',
19
+ display: 'flex',
20
+ flexShrink: 0,
21
+ boxShadow: react_components_1.tokens.shadow4,
22
+ zIndex: 1,
23
+ },
24
+ });
25
+ const NavigationContainer = ({ open, type, onOpenChange, }) => {
26
+ const styles = useStyles();
27
+ const { appExperience: app } = (0, app_1.useAppContext)();
28
+ const { schemaMetadataDic } = (0, app_1.useAppContext)();
29
+ const router = (0, hooks_1.useRouter)();
30
+ const pathname = (0, hooks_1.usePathname)();
31
+ const { language } = (0, locale_1.useLocale)();
32
+ const isRouteActive = (0, hooks_1.useIsRouteActive)();
33
+ const routeResolver = (0, hooks_1.useRouteResolver)();
34
+ const sections = (0, react_1.useMemo)(() => (0, utils_1.transformNavSections)({
35
+ navItems: app.navItems,
36
+ schemaMetadataDic,
37
+ language,
38
+ routeResolver,
39
+ isRouteActive,
40
+ selectedPath: pathname,
41
+ }), [
42
+ app.navItems,
43
+ schemaMetadataDic,
44
+ language,
45
+ routeResolver,
46
+ isRouteActive,
47
+ pathname,
48
+ ]);
49
+ // const activeCategories = useMemo(
50
+ // () =>
51
+ // sections
52
+ // .map((section) => section.items)
53
+ // .flat()
54
+ // .filter(
55
+ // (item) =>
56
+ // item.type === 'category' &&
57
+ // item.items.some((subItem) => subItem.active)
58
+ // )
59
+ // .map((item) => item.key),
60
+ // [sections]
61
+ // );
62
+ const handleNavigation = (item) => {
63
+ if (type === 'overlay') {
64
+ onOpenChange(false);
65
+ }
66
+ if (item.isExternal) {
67
+ window.open(item.link, '_blank');
68
+ }
69
+ else {
70
+ router.push(item.link);
71
+ }
72
+ };
73
+ return ((0, jsx_runtime_1.jsx)("div", { className: styles.root, children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawer, { selectedValue: "active", selectedCategoryValue: "active", defaultOpenCategories: ['active'], open: open, type: type, onOpenChange: (_value, data) => onOpenChange(data.open), onNavItemSelect: () => {
74
+ // do nothing
75
+ }, children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawerBody, { style: {
76
+ paddingTop: 8,
77
+ }, children: sections.map((section) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [!section.hideLabel && ((0, jsx_runtime_1.jsx)(react_nav_preview_1.NavSectionHeader, { children: section.label })), section.items.map((item) => {
78
+ if (item.type === app_2.PageType.Category) {
79
+ const isActive = item.items.some((subItem) => subItem.active);
80
+ return ((0, jsx_runtime_1.jsxs)(react_nav_preview_1.NavCategory, { value: isActive ? 'active' : '', children: [(0, jsx_runtime_1.jsx)(NavCategoryItemComponent_1.NavCategoryItemComponent, { item: item, isActive: isActive }), (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavSubItemGroup, { children: item.items.map((subItem) => ((0, jsx_runtime_1.jsx)(NavSubItemComponent_1.NavSubItemComponent, { item: subItem, onClick: handleNavigation }, subItem.key))) })] }, item.key));
81
+ }
82
+ return ((0, jsx_runtime_1.jsx)(NavItemComponent_1.NavItemComponent, { item: item, onClick: handleNavigation }, item.key));
83
+ })] }, section.label))) }) }) }));
84
+ };
85
+ exports.NavigationContainer = NavigationContainer;
@@ -0,0 +1 @@
1
+ export { NavigationContainer } from './NavigationContainer';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavigationContainer = void 0;
4
+ var NavigationContainer_1 = require("./NavigationContainer");
5
+ Object.defineProperty(exports, "NavigationContainer", { enumerable: true, get: function () { return NavigationContainer_1.NavigationContainer; } });
@@ -0,0 +1,39 @@
1
+ import { DrawerProps } from '@fluentui/react-components';
2
+ import { NavPageSection } from '@headless-adminapp/core/experience/app';
3
+ import { Icon } from '@headless-adminapp/icons';
4
+ export type DrawerType = Required<DrawerProps>['type'];
5
+ export type NavPageSectionWithKey = Omit<NavPageSection, 'items'> & {
6
+ key: string;
7
+ items: Array<NavItemInfo | NavCategoryInfo>;
8
+ };
9
+ export interface NavItemInfo {
10
+ type: 'item';
11
+ key: string;
12
+ label: string;
13
+ Icon: Icon;
14
+ link: string;
15
+ active: boolean;
16
+ isExternal: boolean;
17
+ RightComponent?: React.ComponentType;
18
+ }
19
+ export interface NavCategoryInfo {
20
+ type: 'category';
21
+ key: string;
22
+ label: string;
23
+ Icon: Icon;
24
+ items: NavSubItemInfo[];
25
+ }
26
+ export interface NavSubItemInfo {
27
+ type: 'subItem';
28
+ key: string;
29
+ label: string;
30
+ link: string;
31
+ active: boolean;
32
+ isExternal: boolean;
33
+ }
34
+ export interface NavPageItemTransformed {
35
+ label?: string;
36
+ Icon?: Icon;
37
+ link: string;
38
+ isExternal: boolean;
39
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { InternalIsRouteActive, InternalRouteResolver } from '@headless-adminapp/app/route/context';
2
+ import { NavPageItem, NavPageSection } from '@headless-adminapp/core/experience/app';
3
+ import { SchemaExperienceMetadata } from '@headless-adminapp/core/experience/schema';
4
+ import { NavPageItemTransformed, NavPageSectionWithKey } from './types';
5
+ export declare function transformNavSections({ navItems, schemaMetadataDic, language, routeResolver, isRouteActive, selectedPath, }: {
6
+ navItems: NavPageSection[];
7
+ schemaMetadataDic: Record<string, SchemaExperienceMetadata>;
8
+ language: string;
9
+ routeResolver: InternalRouteResolver;
10
+ isRouteActive: InternalIsRouteActive;
11
+ selectedPath: string;
12
+ }): NavPageSectionWithKey[];
13
+ export declare function transformNavPageItem({ item, schemaMetadataDic: schemaMetadataObject, language, routeResolver, }: {
14
+ item: NavPageItem;
15
+ schemaMetadataDic: Record<string, SchemaExperienceMetadata>;
16
+ language: string;
17
+ routeResolver: InternalRouteResolver;
18
+ }): NavPageItemTransformed;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformNavSections = transformNavSections;
4
+ exports.transformNavPageItem = transformNavPageItem;
5
+ const app_1 = require("@headless-adminapp/core/experience/app");
6
+ const icons_1 = require("@headless-adminapp/icons");
7
+ function transformNavSections({ navItems, schemaMetadataDic, language, routeResolver, isRouteActive, selectedPath, }) {
8
+ return navItems.map((section, sectionIndex) => {
9
+ return {
10
+ ...section,
11
+ key: `section:${sectionIndex}`,
12
+ items: section.items.map((item, itemIndex) => {
13
+ if (item.type === app_1.PageType.Category) {
14
+ return {
15
+ type: 'category',
16
+ key: `category:${sectionIndex}:${itemIndex}`,
17
+ Icon: item.Icon ?? icons_1.IconPlaceholder,
18
+ label: item.label,
19
+ items: item.items.map((item, subItemIndex) => {
20
+ const navItem = transformNavPageItem({
21
+ item,
22
+ schemaMetadataDic: schemaMetadataDic,
23
+ language,
24
+ routeResolver,
25
+ });
26
+ return {
27
+ type: 'subItem',
28
+ key: `item:${sectionIndex}:${itemIndex}:${subItemIndex}`,
29
+ label: navItem.label,
30
+ link: navItem.link,
31
+ active: isRouteActive(selectedPath, item),
32
+ isExternal: navItem.isExternal,
33
+ RightComponent: item.RightComponent,
34
+ };
35
+ }),
36
+ };
37
+ }
38
+ const navItem = transformNavPageItem({
39
+ item,
40
+ schemaMetadataDic: schemaMetadataDic,
41
+ language,
42
+ routeResolver,
43
+ });
44
+ const Icon = navItem.Icon ?? icons_1.Icons.Entity ?? icons_1.IconPlaceholder;
45
+ const isActive = isRouteActive(selectedPath, item);
46
+ return {
47
+ type: 'item',
48
+ key: `item:${sectionIndex}:${itemIndex}`,
49
+ label: navItem.label,
50
+ Icon: Icon,
51
+ link: navItem.link,
52
+ active: isActive,
53
+ isExternal: navItem.isExternal,
54
+ RightComponent: item.RightComponent,
55
+ };
56
+ }),
57
+ };
58
+ });
59
+ }
60
+ function transformNavPageItem({ item, schemaMetadataDic: schemaMetadataObject, language, routeResolver, }) {
61
+ let Icon = item.Icon;
62
+ let label = item.localizedLabel?.[language] ?? item.label;
63
+ let link = routeResolver(item);
64
+ if (item.type === 'entityview') {
65
+ const metadata = schemaMetadataObject?.[item.logicalName];
66
+ if (metadata) {
67
+ if (!label) {
68
+ label =
69
+ metadata.localizedPluralLabels?.[language] ?? metadata.pluralLabel;
70
+ }
71
+ if (!Icon) {
72
+ Icon = metadata.Icon;
73
+ }
74
+ }
75
+ }
76
+ return {
77
+ label,
78
+ Icon,
79
+ link,
80
+ isExternal: item.type === 'external',
81
+ };
82
+ }
@@ -1,3 +1,4 @@
1
+ import { BadgeProps } from '@fluentui/react-components';
1
2
  import { Icon } from '@headless-adminapp/icons';
2
3
  import { FC } from 'react';
3
4
  interface QuickActionItemProps {
@@ -5,6 +6,8 @@ interface QuickActionItemProps {
5
6
  Icon: Icon;
6
7
  link?: string;
7
8
  onClick?: () => void;
9
+ badgeCount?: number;
10
+ badgeColor?: BadgeProps['color'];
8
11
  }
9
12
  export declare const QuickActionItem: FC<QuickActionItemProps>;
10
13
  export {};
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QuickActionItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const route_1 = require("@headless-adminapp/app/route");
6
7
  const useStyles = (0, react_components_1.makeStyles)({
7
8
  root: {
8
9
  color: 'rgba(255, 255, 255, 1) !important',
@@ -22,11 +23,19 @@ const useStyles = (0, react_components_1.makeStyles)({
22
23
  },
23
24
  },
24
25
  });
25
- const QuickActionItem = ({ label, Icon, onClick, link, }) => {
26
+ const QuickActionItem = ({ label, Icon, onClick, link, badgeCount, badgeColor = 'informative', }) => {
26
27
  const styles = useStyles();
27
- return ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsx)(Icon, { size: "inherit" }), appearance: "transparent", as: "a", href: link, title: label, className: styles.root, onClick: (event) => {
28
+ const router = (0, route_1.useRouter)();
29
+ const basePath = (0, route_1.useBasePath)();
30
+ const fullLink = link ? `${basePath}${link}` : undefined;
31
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Button, { icon: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon, { size: "inherit" }), !!badgeCount && ((0, jsx_runtime_1.jsx)(react_components_1.Badge, { style: { position: 'absolute', top: 0, right: 0 }, color: badgeColor, size: "small", children: badgeCount }))] }), appearance: "transparent", style: { position: 'relative' }, as: "a", href: fullLink, title: label, className: styles.root, onClick: (event) => {
28
32
  event.preventDefault();
29
- onClick?.();
33
+ if (fullLink) {
34
+ router.push(fullLink);
35
+ }
36
+ else if (onClick) {
37
+ onClick();
38
+ }
30
39
  } }));
31
40
  };
32
41
  exports.QuickActionItem = QuickActionItem;
@@ -8,5 +8,6 @@ export interface CommandButtonProps {
8
8
  danger?: boolean;
9
9
  onClick?: () => void;
10
10
  disabled?: boolean;
11
+ appearance?: 'subtle' | 'colored';
11
12
  }
12
13
  export declare const CommandButton: MemoExoticComponent<ForwardRefComponent<CommandButtonProps>>;
@@ -27,10 +27,30 @@ const useStyles = (0, react_components_1.makeStyles)({
27
27
  },
28
28
  },
29
29
  },
30
+ colored: {
31
+ '&:not(:disabled)': {
32
+ '& .fui-Button__icon': {
33
+ color: react_components_1.tokens.colorBrandForeground1,
34
+ },
35
+ },
36
+ '&:hover:not(:disabled)': {
37
+ color: react_components_1.tokens.colorBrandForeground1,
38
+ },
39
+ },
40
+ dangerColored: {
41
+ '&:not(:disabled)': {
42
+ '& .fui-Button__icon': {
43
+ color: react_components_1.tokens.colorPaletteRedForeground1,
44
+ },
45
+ },
46
+ '&:hover:not(:disabled)': {
47
+ color: react_components_1.tokens.colorPaletteRedForeground1,
48
+ },
49
+ },
30
50
  });
31
51
  const ToolbarButtonInternal = react_components_1.ToolbarButton;
32
- exports.CommandButton = (0, react_1.memo)((0, react_1.forwardRef)(function CommandButton({ Icon, text, danger, onClick, disabled, iconPosition = 'before' }, ref) {
52
+ exports.CommandButton = (0, react_1.memo)((0, react_1.forwardRef)(function CommandButton({ Icon, text, danger, onClick, disabled, iconPosition = 'before', appearance, }, ref) {
33
53
  const styles = useStyles();
34
- return ((0, jsx_runtime_1.jsx)(ToolbarButtonInternal, { ref: ref, type: "button", icon: !!Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : undefined, iconPosition: iconPosition, disabled: disabled, onClick: onClick, className: (0, react_components_1.mergeClasses)(styles.root, danger && styles.danger), children: text }));
54
+ return ((0, jsx_runtime_1.jsx)(ToolbarButtonInternal, { ref: ref, type: "button", icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : undefined, iconPosition: iconPosition, disabled: disabled, onClick: onClick, className: (0, react_components_1.mergeClasses)(styles.root, appearance === 'colored' && styles.colored, danger && styles.danger, appearance === 'colored' && danger && styles.dangerColored), children: text }));
35
55
  }));
36
56
  exports.CommandButton.displayName = 'CommandButton';
@@ -6,5 +6,6 @@ export interface CommandIconButtonProps {
6
6
  disabled?: boolean;
7
7
  onClick?: () => void;
8
8
  danger?: boolean;
9
+ appearance?: 'subtle' | 'colored';
9
10
  }
10
11
  export declare const CommandIconButton: MemoExoticComponent<ForwardRefComponent<CommandIconButtonProps>>;
@@ -9,6 +9,7 @@ export interface CommandMenuButtonProps {
9
9
  disabled?: boolean;
10
10
  danger?: boolean;
11
11
  onClick?: () => void;
12
+ appearance?: 'subtle' | 'colored';
12
13
  items: ArrayGroupWithAtLeastOne<MenuItemProps>;
13
14
  }
14
15
  export declare const CommandMenuButton: MemoExoticComponent<ForwardRefComponent<CommandMenuButtonProps>>;
@@ -6,6 +6,7 @@ export interface MenuItemProps {
6
6
  disabled?: boolean;
7
7
  danger?: boolean;
8
8
  onClick: (() => void) | undefined;
9
+ appearance?: 'subtle' | 'colored';
9
10
  items?: ArrayGroupWithAtLeastOne<MenuItemProps>;
10
11
  }
11
12
  export declare const MenuItem: React.FC<MenuItemProps>;
@@ -110,6 +110,7 @@ column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) =>
110
110
  alignItems: 'center',
111
111
  fontWeight: react_components_1.tokens.fontWeightMedium,
112
112
  // pointerEvents: disableFilter && disableSort ? 'none' : 'auto',
113
+ height: '100%',
113
114
  }, onClick: (event) => {
114
115
  event.preventDefault();
115
116
  }, aside: resizable ? ((0, jsx_runtime_1.jsx)("div", { className: (0, react_components_1.mergeClasses)(styles.resizeHandle), "data-id": "resize-handle", onClick: (event) => {
@@ -142,7 +143,8 @@ column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) =>
142
143
  if (disableFilter && disableSort) {
143
144
  return headerCell;
144
145
  }
145
- return ((0, jsx_runtime_1.jsxs)("th", { children: [(0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "below-start", children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: headerCell }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: menuItems.map((x, i) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [i > 0 && (0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, {}), x] }, i))) }) })] }), (0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: visible, onOpenChange: () => setVisible(false), children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 400 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: strings.filterBy }), (0, jsx_runtime_1.jsx)(FilterForm_1.FilterForm, { attribute: attribute, defaultValue: filterCondition, onApply: (condition) => {
146
+ const menuPosition = align === 'right' ? 'below-end' : 'below-start';
147
+ return ((0, jsx_runtime_1.jsxs)("th", { children: [(0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: menuPosition, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: headerCell }), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: menuItems.map((x, i) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [i > 0 && (0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, {}), x] }, i))) }) })] }), (0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: visible, onOpenChange: () => setVisible(false), children: (0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { style: { maxWidth: 400 }, children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogBody, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogTitle, { children: strings.filterBy }), (0, jsx_runtime_1.jsx)(FilterForm_1.FilterForm, { attribute: attribute, defaultValue: filterCondition, onApply: (condition) => {
146
148
  onChangeFilterCondition(condition);
147
149
  setVisible(false);
148
150
  }, onCancel: () => setVisible(false) })] }) }) })] }));
@@ -1,2 +1,3 @@
1
1
  import { FC } from 'react';
2
2
  export declare const GridHeaderContainer: FC;
3
+ export declare const GridHeaderContainerV2: FC;
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GridHeaderContainer = void 0;
3
+ exports.GridHeaderContainerV2 = exports.GridHeaderContainer = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const GridHeaderDesktop_1 = require("./GridHeaderDesktop");
6
+ const GridHeaderDesktopV2_1 = require("./GridHeaderDesktopV2");
6
7
  const GridHeaderContainer = () => {
7
8
  return (0, jsx_runtime_1.jsx)(GridHeaderDesktop_1.GridHeaderDesktop, {});
8
9
  };
9
10
  exports.GridHeaderContainer = GridHeaderContainer;
11
+ const GridHeaderContainerV2 = () => {
12
+ return (0, jsx_runtime_1.jsx)(GridHeaderDesktopV2_1.GridHeaderDesktopV2, {});
13
+ };
14
+ exports.GridHeaderContainerV2 = GridHeaderContainerV2;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface GridHeaderDesktopProps {
3
+ headingRight?: React.ReactNode;
4
+ }
5
+ export declare const GridHeaderDesktopV2: FC<GridHeaderDesktopProps>;
6
+ export {};
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GridHeaderDesktopV2 = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const ViewCommandBuilder_1 = require("@headless-adminapp/app/builders/CommandBuilder/ViewCommandBuilder");
7
+ const hooks_1 = require("@headless-adminapp/app/datagrid/hooks");
8
+ const locale_1 = require("@headless-adminapp/app/locale");
9
+ const navigation_1 = require("@headless-adminapp/app/navigation");
10
+ const icons_1 = require("@headless-adminapp/icons");
11
+ const react_1 = require("react");
12
+ const AppStringContext_1 = require("../App/AppStringContext");
13
+ const PageEntityViewStringContext_1 = require("../PageEntityView/PageEntityViewStringContext");
14
+ const CustomizeColumns_1 = require("./CustomizeColumns");
15
+ // Exprement component
16
+ const GridHeaderDesktopV2 = (props) => {
17
+ const viewLookup = (0, hooks_1.useGridViewLookupData)();
18
+ const selectedView = (0, hooks_1.useSelectedView)();
19
+ const changeView = (0, hooks_1.useChangeView)();
20
+ const [searchText, setSearchText] = (0, hooks_1.useSearchText)();
21
+ const [isColumnCustomizationOpen, setIsColumnCustomizationOpen] = (0, react_1.useState)(false);
22
+ const { language } = (0, locale_1.useLocale)();
23
+ const strings = (0, PageEntityViewStringContext_1.usePageEntityViewStrings)();
24
+ const appStrings = (0, AppStringContext_1.useAppStrings)();
25
+ const schema = (0, hooks_1.useDataGridSchema)();
26
+ const openForm = (0, navigation_1.useOpenForm)();
27
+ const commandContext = (0, hooks_1.useMainGridCommandHandlerContext)();
28
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
29
+ alignItems: 'center',
30
+ gap: 16,
31
+ 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
+ fontSize: react_components_1.tokens.fontSizeBase400,
34
+ 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
+ flex: 1,
37
+ } }), (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
+ 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({
42
+ logicalName: schema.logicalName,
43
+ });
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
+ alignItems: 'center',
46
+ // paddingInline: 8,
47
+ gap: 16,
48
+ 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
+ width: 300,
51
+ borderBottomColor: react_components_1.tokens.colorNeutralStroke1,
52
+ }, value: searchText, onChange: (e, data) => setSearchText(data.value) }) }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } })] })] }));
53
+ };
54
+ exports.GridHeaderDesktopV2 = GridHeaderDesktopV2;