@headless-adminapp/fluent 0.0.17-alpha.25 → 0.0.17-alpha.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.
@@ -1,5 +1,6 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
2
  import { Icon } from '@headless-adminapp/icons';
3
+ import { MemoExoticComponent } from 'react';
3
4
  export interface CommandButtonProps {
4
5
  Icon: Icon;
5
6
  iconPosition?: 'before' | 'after';
@@ -8,4 +9,4 @@ export interface CommandButtonProps {
8
9
  onClick?: () => void;
9
10
  disabled?: boolean;
10
11
  }
11
- export declare const CommandButton: ForwardRefComponent<CommandButtonProps>;
12
+ export declare const CommandButton: MemoExoticComponent<ForwardRefComponent<CommandButtonProps>>;
@@ -29,8 +29,8 @@ const useStyles = (0, react_components_1.makeStyles)({
29
29
  },
30
30
  });
31
31
  const ToolbarButtonInternal = react_components_1.ToolbarButton;
32
- exports.CommandButton = (0, react_1.forwardRef)(function CommandButton({ Icon, text, danger, onClick, disabled, iconPosition = 'before' }, ref) {
32
+ exports.CommandButton = (0, react_1.memo)((0, react_1.forwardRef)(function CommandButton({ Icon, text, danger, onClick, disabled, iconPosition = 'before' }, ref) {
33
33
  const styles = useStyles();
34
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 }));
35
- });
35
+ }));
36
36
  exports.CommandButton.displayName = 'CommandButton';
@@ -1,2 +1,3 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
- export declare const CommandDivider: ForwardRefComponent<{}>;
2
+ import { MemoExoticComponent } from 'react';
3
+ export declare const CommandDivider: MemoExoticComponent<ForwardRefComponent<{}>>;
@@ -4,7 +4,7 @@ exports.CommandDivider = 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
- exports.CommandDivider = (0, react_1.forwardRef)(function CommandDivider(_, ref) {
7
+ exports.CommandDivider = (0, react_1.memo)((0, react_1.forwardRef)(function CommandDivider(_, ref) {
8
8
  return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarDivider, { ref: ref, style: { paddingInline: react_components_1.tokens.spacingHorizontalXS } }));
9
- });
9
+ }));
10
10
  exports.CommandDivider.displayName = 'CommandDivider';
@@ -1,9 +1,10 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
2
  import { Icon } from '@headless-adminapp/icons';
3
+ import { MemoExoticComponent } from 'react';
3
4
  export interface CommandIconButtonProps {
4
5
  Icon: Icon;
5
6
  disabled?: boolean;
6
7
  onClick?: () => void;
7
8
  danger?: boolean;
8
9
  }
9
- export declare const CommandIconButton: ForwardRefComponent<CommandIconButtonProps>;
10
+ export declare const CommandIconButton: MemoExoticComponent<ForwardRefComponent<CommandIconButtonProps>>;
@@ -25,8 +25,8 @@ const useStyles = (0, react_components_1.makeStyles)({
25
25
  },
26
26
  },
27
27
  });
28
- exports.CommandIconButton = (0, react_1.forwardRef)(function CommandIconButton({ Icon, disabled, onClick, danger }, ref) {
28
+ exports.CommandIconButton = (0, react_1.memo)((0, react_1.forwardRef)(function CommandIconButton({ Icon, disabled, onClick, danger }, ref) {
29
29
  const styles = useStyles();
30
30
  return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ref: ref, icon: (0, jsx_runtime_1.jsx)(Icon, { size: 20 }), disabled: disabled, onClick: onClick, className: (0, react_components_1.mergeClasses)(styles.root, danger && styles.danger) }));
31
- });
31
+ }));
32
32
  exports.CommandIconButton.displayName = 'CommandIconButton';
@@ -1,7 +1,8 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
2
  import { Icon } from '@headless-adminapp/icons';
3
+ import { MemoExoticComponent } from 'react';
3
4
  export interface CommandLabelProps {
4
5
  Icon?: Icon;
5
6
  text: string;
6
7
  }
7
- export declare const CommandLabel: ForwardRefComponent<CommandLabelProps>;
8
+ export declare const CommandLabel: MemoExoticComponent<ForwardRefComponent<CommandLabelProps>>;
@@ -16,8 +16,8 @@ const useStyles = (0, react_components_1.makeStyles)({
16
16
  },
17
17
  },
18
18
  });
19
- exports.CommandLabel = (0, react_1.forwardRef)(function CommandLabel({ Icon, text }, ref) {
19
+ exports.CommandLabel = (0, react_1.memo)((0, react_1.forwardRef)(function CommandLabel({ Icon, text }, ref) {
20
20
  const styles = useStyles();
21
21
  return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ref: ref, type: "button", icon: !!Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : undefined, className: (0, react_components_1.mergeClasses)(styles.root), children: text }));
22
- });
22
+ }));
23
23
  exports.CommandLabel.displayName = 'CommandLabel';
@@ -1,6 +1,7 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
2
  import { ArrayGroupWithAtLeastOne } from '@headless-adminapp/core/types';
3
3
  import { Icon } from '@headless-adminapp/icons';
4
+ import { MemoExoticComponent } from 'react';
4
5
  import { MenuItemProps } from './MenuItem';
5
6
  export interface CommandMenuButtonProps {
6
7
  Icon: Icon;
@@ -10,4 +11,4 @@ export interface CommandMenuButtonProps {
10
11
  onClick?: () => void;
11
12
  items: ArrayGroupWithAtLeastOne<MenuItemProps>;
12
13
  }
13
- export declare const CommandMenuButton: ForwardRefComponent<CommandMenuButtonProps>;
14
+ export declare const CommandMenuButton: MemoExoticComponent<ForwardRefComponent<CommandMenuButtonProps>>;
@@ -32,12 +32,12 @@ const useStyles = (0, react_components_1.makeStyles)({
32
32
  },
33
33
  },
34
34
  });
35
- exports.CommandMenuButton = (0, react_1.forwardRef)(function CommandMenuButton({ Icon, items, text, danger, disabled, onClick }, ref) {
35
+ exports.CommandMenuButton = (0, react_1.memo)((0, react_1.forwardRef)(function CommandMenuButton({ Icon, items, text, danger, disabled, onClick }, ref) {
36
36
  const styles = useStyles();
37
37
  return (
38
38
  // <div ref={ref}>
39
39
  (0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, positioning: "below-end", children: [onClick ? ((0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (triggerProps) => ((0, jsx_runtime_1.jsx)(react_components_1.SplitButton, { ref: ref, icon: (0, jsx_runtime_1.jsx)(Icon, { size: 20 }), appearance: "subtle", className: (0, react_components_1.mergeClasses)(styles.splitButton, danger && styles.splitButtonDanger), menuButton: triggerProps, disabled: disabled, children: text })) })) : ((0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(react_components_1.MenuButton, { ref: ref, appearance: "subtle", icon: (0, jsx_runtime_1.jsx)(Icon, { size: 20 }), className: (0, react_components_1.mergeClasses)(styles.menuButton), children: text }) })), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { items: items }) })] })
40
40
  // </div>
41
41
  );
42
- });
42
+ }));
43
43
  exports.CommandMenuButton.displayName = 'CommandMenuButton';
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MenuItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const react_1 = require("react");
6
7
  const MenuList_1 = require("./MenuList");
7
8
  const useStyles = (0, react_components_1.makeStyles)({
8
9
  splitMenuRight: {
@@ -27,11 +28,11 @@ const useStyles = (0, react_components_1.makeStyles)({
27
28
  },
28
29
  },
29
30
  });
30
- const MenuItem = ({ Icon, text, disabled, danger, onClick, items, }) => {
31
+ exports.MenuItem = (0, react_1.memo)(({ Icon, text, disabled, danger, onClick, items }) => {
31
32
  const styles = useStyles();
32
33
  if (!(items === null || items === void 0 ? void 0 : items.length)) {
33
34
  return ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { disabled: disabled, onClick: onClick, icon: (0, jsx_runtime_1.jsx)(Icon, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.danger), children: text }));
34
35
  }
35
36
  return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { hasIcons: true, children: [onClick ? ((0, jsx_runtime_1.jsxs)(react_components_1.MenuSplitGroup, { children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(Icon, { size: 20 }), className: (0, react_components_1.mergeClasses)(danger && styles.danger), children: text }), (0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { className: (0, react_components_1.mergeClasses)(styles.splitMenuRight) }) })] })) : ((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)(Icon, { size: 20 }), children: text }) })), (0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { items: items }) })] }));
36
- };
37
- exports.MenuItem = MenuItem;
37
+ });
38
+ exports.MenuItem.displayName = 'MenuItem';
@@ -5,7 +5,7 @@ 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
7
  const MenuItem_1 = require("./MenuItem");
8
- const MenuItems = ({ items }) => {
8
+ exports.MenuItems = (0, react_1.memo)(({ items }) => {
9
9
  return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: items === null || items === void 0 ? void 0 : items.map((group, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, {}), group.map((item, index) => ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, { Icon: item.Icon, onClick: item.onClick, text: item.text, danger: item.danger, disabled: item.disabled, items: item.items }, index)))] }, index))) }));
10
- };
11
- exports.MenuItems = MenuItems;
10
+ });
11
+ exports.MenuItems.displayName = 'MenuItems';
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MenuList = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
+ const react_1 = require("react");
6
7
  const MenuItems_1 = require("./MenuItems");
7
- const MenuList = ({ items }) => {
8
+ exports.MenuList = (0, react_1.memo)(({ items }) => {
8
9
  return ((0, jsx_runtime_1.jsx)(react_components_1.MenuList, { children: !(items === null || items === void 0 ? void 0 : items.length) ? ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { style: {
9
10
  color: react_components_1.tokens.colorNeutralForegroundDisabled,
10
11
  fontStyle: 'italic',
11
12
  }, children: "No items" })) : ((0, jsx_runtime_1.jsx)(MenuItems_1.MenuItems, { items: items })) }));
12
- };
13
- exports.MenuList = MenuList;
13
+ });
14
+ exports.MenuList.displayName = 'MenuList';
@@ -1,8 +1,8 @@
1
1
  import { ForwardRefComponent } from '@fluentui/react-components';
2
- import { PropsWithChildren } from 'react';
2
+ import { MemoExoticComponent, PropsWithChildren } from 'react';
3
3
  export interface CommandBarWrapperProps {
4
4
  overflow?: 'hidden' | 'auto';
5
5
  className?: string;
6
6
  align?: 'start' | 'end';
7
7
  }
8
- export declare const CommandBarWrapper: ForwardRefComponent<PropsWithChildren<CommandBarWrapperProps>>;
8
+ export declare const CommandBarWrapper: MemoExoticComponent<ForwardRefComponent<PropsWithChildren<CommandBarWrapperProps>>>;
@@ -17,8 +17,8 @@ const useStyles = (0, react_components_1.makeStyles)({
17
17
  overflow: 'auto',
18
18
  },
19
19
  });
20
- exports.CommandBarWrapper = (0, react_1.forwardRef)(function CommandBarWrapper({ children, overflow, className, align = 'start' }, ref) {
20
+ exports.CommandBarWrapper = (0, react_1.memo)((0, react_1.forwardRef)(function CommandBarWrapper({ children, overflow, className, align = 'start' }, ref) {
21
21
  const styles = useStyles();
22
22
  return ((0, jsx_runtime_1.jsx)(react_components_1.Toolbar, { ref: ref, style: { justifyContent: 'flex-' + align }, className: (0, react_components_1.mergeClasses)(styles.root, overflow === 'hidden' ? styles.overflowHidden : styles.overflowAuto, className), children: children }));
23
- });
23
+ }));
24
24
  exports.CommandBarWrapper.displayName = 'CommandBarWrapper';
@@ -1,9 +1,9 @@
1
1
  declare const CommandBar: {
2
- Wrapper: import("@fluentui/react-components").ForwardRefComponent<import("react").PropsWithChildren<import("./Wrapper").CommandBarWrapperProps>>;
3
- Button: import("@fluentui/react-components").ForwardRefComponent<import("./Button").CommandButtonProps>;
4
- MenuButton: import("@fluentui/react-components").ForwardRefComponent<import("./MenuButton").CommandMenuButtonProps>;
5
- Divider: import("@fluentui/react-components").ForwardRefComponent<{}>;
6
- IconButton: import("@fluentui/react-components").ForwardRefComponent<import("./IconButton").CommandIconButtonProps>;
7
- Label: import("@fluentui/react-components").ForwardRefComponent<import("./Label").CommandLabelProps>;
2
+ Wrapper: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<import("react").PropsWithChildren<import("./Wrapper").CommandBarWrapperProps>>>;
3
+ Button: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<import("./Button").CommandButtonProps>>;
4
+ MenuButton: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<import("./MenuButton").CommandMenuButtonProps>>;
5
+ Divider: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<{}>>;
6
+ IconButton: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<import("./IconButton").CommandIconButtonProps>>;
7
+ Label: import("react").MemoExoticComponent<import("@fluentui/react-components").ForwardRefComponent<import("./Label").CommandLabelProps>>;
8
8
  };
9
9
  export default CommandBar;
@@ -4,5 +4,5 @@ interface ActionCellProps {
4
4
  onOpen: () => void;
5
5
  mutableState: MutableState<MenuItemCommandState[][]>;
6
6
  }
7
- export declare function ActionCell({ onOpen, mutableState }: ActionCellProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare const ActionCell: import("react").NamedExoticComponent<ActionCellProps>;
8
8
  export {};
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionCell = ActionCell;
3
+ exports.ActionCell = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const locale_1 = require("@headless-adminapp/app/locale");
5
6
  const mutable_1 = require("@headless-adminapp/app/mutable");
7
+ const react_1 = require("react");
6
8
  const TableCell_1 = require("../DataGrid/TableCell");
7
9
  const OverflowCommandBar_1 = require("../OverflowCommandBar");
8
- function ActionCell({ onOpen, mutableState }) {
10
+ exports.ActionCell = (0, react_1.memo)(function ActionCell({ onOpen, mutableState, }) {
9
11
  const transformedCommands = (0, mutable_1.useMutableStateSelector)(mutableState, (state) => state);
10
- return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellAction, { onOpen: onOpen, items: transformedCommands.map((item) => (0, OverflowCommandBar_1.transformMenuItems)(item, 'en')) }));
11
- }
12
+ const { language } = (0, locale_1.useLocale)();
13
+ return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellAction, { onOpen: onOpen, items: transformedCommands.map((item) => (0, OverflowCommandBar_1.transformMenuItems)(item, language)) }));
14
+ });
15
+ exports.ActionCell.displayName = 'ActionCell';
@@ -34,7 +34,9 @@ const FilterForm = ({ defaultValue, attribute, onApply, onCancel, }) => {
34
34
  };
35
35
  const isValid = (0, react_1.useMemo)(() => {
36
36
  return (!!selectedOption &&
37
- values.filter(Boolean).length === selectedOption.controls.length);
37
+ values.filter((value) => {
38
+ return value !== null && value !== undefined;
39
+ }).length === selectedOption.controls.length);
38
40
  }, [selectedOption, values]);
39
41
  return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { style: { paddingBlock: 8 }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
40
42
  display: 'flex',
@@ -100,7 +100,7 @@ column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) =>
100
100
  if (!disableFilter) {
101
101
  menuItems.push(filterMenuItems);
102
102
  }
103
- const headerCell = ((0, jsx_runtime_1.jsxs)(react_components_1.TableHeaderCell, { className: (0, react_components_1.mergeClasses)(styles.root, align === 'right' && styles.right), style: {
103
+ const headerCell = ((0, jsx_runtime_1.jsxs)(react_components_1.TableHeaderCell, { as: "div", className: (0, react_components_1.mergeClasses)(styles.root, align === 'right' && styles.right), style: {
104
104
  textAlign: align,
105
105
  width: minWidth,
106
106
  minWidth: minWidth,
@@ -144,9 +144,9 @@ column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) =>
144
144
  if (disableFilter && disableSort) {
145
145
  return headerCell;
146
146
  }
147
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { 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) => {
148
- onChangeFilterCondition === null || onChangeFilterCondition === void 0 ? void 0 : onChangeFilterCondition(condition);
149
- setVisible(false);
150
- }, onCancel: () => setVisible(false) })] }) }) })] }));
147
+ return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (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) => {
148
+ onChangeFilterCondition === null || onChangeFilterCondition === void 0 ? void 0 : onChangeFilterCondition(condition);
149
+ setVisible(false);
150
+ }, onCancel: () => setVisible(false) })] }) }) })] }) }));
151
151
  };
152
152
  exports.TableHeaderFilterCell = TableHeaderFilterCell;
@@ -12,6 +12,7 @@ const hooks_2 = require("@headless-adminapp/app/recordset/hooks");
12
12
  const react_table_1 = require("@tanstack/react-table");
13
13
  const react_virtual_1 = require("@tanstack/react-virtual");
14
14
  const react_1 = require("react");
15
+ const uuid_1 = require("uuid");
15
16
  const ScrollbarWithMoreDataRequest_1 = require("./ScrollbarWithMoreDataRequest");
16
17
  const useTableColumns_1 = require("./useTableColumns");
17
18
  const utils_1 = require("./utils");
@@ -54,7 +55,7 @@ const useStyles = (0, react_components_1.makeStyles)({
54
55
  });
55
56
  const fallbackData = [];
56
57
  const GridTableContainer = ({ noPadding, disableColumnFilter, disableColumnSort, disableColumnResize, disableContextMenu, disableSelection, }) => {
57
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
58
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
58
59
  const styles = useStyles();
59
60
  const data = (0, hooks_1.useGridData)();
60
61
  const dataState = (0, hooks_1.useGridDataState)();
@@ -93,16 +94,24 @@ const GridTableContainer = ({ noPadding, disableColumnFilter, disableColumnSort,
93
94
  disableSelection,
94
95
  tableWrapperRef,
95
96
  });
97
+ const uniqueRecords = (0, react_1.useMemo)(() => {
98
+ var _a;
99
+ return ((_a = data === null || data === void 0 ? void 0 : data.records.map((record) => (Object.assign(Object.assign({}, record), { __uuid: (0, uuid_1.v4)() })))) !== null && _a !== void 0 ? _a : fallbackData);
100
+ }, [data === null || data === void 0 ? void 0 : data.records]);
101
+ const idMapping = (0, react_1.useMemo)(() => uniqueRecords.reduce((acc, record) => {
102
+ acc[record[schema.idAttribute]] = record.__uuid;
103
+ return acc;
104
+ }, {}), [uniqueRecords, schema.idAttribute]);
96
105
  const rowSelection = (0, react_1.useMemo)(() => {
97
106
  return selectedIds.reduce((acc, id) => {
98
- acc[id] = true;
107
+ acc[idMapping[id]] = true;
99
108
  return acc;
100
109
  }, {});
101
- }, [selectedIds]);
110
+ }, [selectedIds, idMapping]);
102
111
  const table = (0, react_table_1.useReactTable)({
103
- data: (_a = data === null || data === void 0 ? void 0 : data.records) !== null && _a !== void 0 ? _a : fallbackData,
112
+ data: uniqueRecords,
104
113
  columns: tableColumns,
105
- getRowId: (row) => row[schema.idAttribute],
114
+ getRowId: (row) => row.__uuid,
106
115
  enableRowSelection: true,
107
116
  getCoreRowModel: (0, react_table_1.getCoreRowModel)(),
108
117
  columnResizeMode: 'onChange',
@@ -165,9 +174,9 @@ const GridTableContainer = ({ noPadding, disableColumnFilter, disableColumnSort,
165
174
  if (isScrollNearBottom)
166
175
  handlePseudoResize();
167
176
  }, [isScrollNearBottom, virtualItems.length, handlePseudoResize]);
168
- const isScrolledToRight = ((_d = (_c = (_b = tableWrapperRef.current) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.scrollLeft) ===
169
- ((_h = (_g = (_f = (_e = tableWrapperRef.current) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.parentElement) === null || _g === void 0 ? void 0 : _g.scrollWidth) !== null && _h !== void 0 ? _h : 0) -
170
- ((_m = (_l = (_k = (_j = tableWrapperRef.current) === null || _j === void 0 ? void 0 : _j.parentElement) === null || _k === void 0 ? void 0 : _k.parentElement) === null || _l === void 0 ? void 0 : _l.clientWidth) !== null && _m !== void 0 ? _m : 0);
177
+ const isScrolledToRight = ((_c = (_b = (_a = tableWrapperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.scrollLeft) ===
178
+ ((_g = (_f = (_e = (_d = tableWrapperRef.current) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.scrollWidth) !== null && _g !== void 0 ? _g : 0) -
179
+ ((_l = (_k = (_j = (_h = tableWrapperRef.current) === null || _h === void 0 ? void 0 : _h.parentElement) === null || _j === void 0 ? void 0 : _j.parentElement) === null || _k === void 0 ? void 0 : _k.clientWidth) !== null && _l !== void 0 ? _l : 0);
171
180
  return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(ScrollbarWithMoreDataRequest_1.ScrollbarWithMoreDataRequest, { data: data === null || data === void 0 ? void 0 : data.records, hasMore: dataState === null || dataState === void 0 ? void 0 : dataState.hasNextPage, rtl: direction === 'rtl', onRequestMore: () => {
172
181
  fetchNextPage();
173
182
  }, children: (0, jsx_runtime_1.jsx)("div", { style: {
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableCellCheckbox = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
- const TableCellCheckbox = ({ checked, onChange, }) => {
6
+ const react_1 = require("react");
7
+ exports.TableCellCheckbox = (0, react_1.memo)(({ checked, onChange }) => {
7
8
  return ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { style: { display: 'flex', alignItems: 'center' }, onClick: (event) => {
8
9
  event.stopPropagation();
9
10
  }, children: (0, jsx_runtime_1.jsx)(react_components_1.Checkbox, { checked: checked !== null && checked !== void 0 ? checked : false, onChange: (event) => {
10
11
  event.stopPropagation();
11
12
  onChange === null || onChange === void 0 ? void 0 : onChange(event);
12
13
  } }) }));
13
- };
14
- exports.TableCellCheckbox = TableCellCheckbox;
14
+ });
15
+ exports.TableCellCheckbox.displayName = 'TableCellCheckbox';
@@ -4,7 +4,8 @@ exports.TableCellLink = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
6
  const hooks_1 = require("@headless-adminapp/app/route/hooks");
7
- const TableCellLink = ({ value, href, onClick, width, }) => {
7
+ const react_1 = require("react");
8
+ exports.TableCellLink = (0, react_1.memo)(({ value, href, onClick, width }) => {
8
9
  const router = (0, hooks_1.useRouter)();
9
10
  return ((0, jsx_runtime_1.jsx)(react_components_1.TableCell, { style: {
10
11
  textOverflow: 'ellipsis',
@@ -29,5 +30,5 @@ const TableCellLink = ({ value, href, onClick, width, }) => {
29
30
  event.preventDefault();
30
31
  }
31
32
  }, children: value }) }));
32
- };
33
- exports.TableCellLink = TableCellLink;
33
+ });
34
+ exports.TableCellLink.displayName = 'TableCellLink';
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableCellText = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
5
6
  const TableCellBase_1 = require("./TableCellBase");
6
- const TableCellText = ({ value, width, textAlignment, }) => {
7
+ exports.TableCellText = (0, react_1.memo)(({ value, width, textAlignment }) => {
7
8
  return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
8
9
  textAlign: textAlignment || 'left',
9
10
  textOverflow: 'ellipsis',
@@ -19,6 +20,10 @@ const TableCellText = ({ value, width, textAlignment, }) => {
19
20
  // display: 'flex',
20
21
  // alignItems: 'center',
21
22
  // borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`,
22
- }, children: (0, jsx_runtime_1.jsx)("div", { style: { overflow: 'hidden', textOverflow: 'ellipsis', width: '100%' }, children: value }) }));
23
- };
24
- exports.TableCellText = TableCellText;
23
+ }, children: (0, jsx_runtime_1.jsx)("div", { style: {
24
+ overflow: 'hidden',
25
+ textOverflow: 'ellipsis',
26
+ width: '100%',
27
+ }, children: value }) }));
28
+ });
29
+ exports.TableCellText.displayName = 'TableCellText';
@@ -1,5 +1,8 @@
1
1
  import { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
2
2
  import { Data } from '@headless-adminapp/core/transport';
3
+ export type UniqueRecord = Data<InferredSchemaType<SchemaAttributes>> & {
4
+ __uuid: string;
5
+ };
3
6
  export declare function useTableColumns({ disableSelection, disableContextMenu, disableColumnResize, disableColumnFilter, disableColumnSort, tableWrapperRef, }: {
4
7
  disableSelection?: boolean;
5
8
  disableContextMenu?: boolean;
@@ -7,4 +10,4 @@ export declare function useTableColumns({ disableSelection, disableContextMenu,
7
10
  disableColumnFilter?: boolean;
8
11
  disableColumnSort?: boolean;
9
12
  tableWrapperRef: React.RefObject<HTMLDivElement>;
10
- }): import("@tanstack/react-table").AccessorFnColumnDef<Data<InferredSchemaType<SchemaAttributes>>, unknown>[];
13
+ }): import("@tanstack/react-table").AccessorFnColumnDef<UniqueRecord, unknown>[];
@@ -89,175 +89,180 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
89
89
  }
90
90
  return 'mixed';
91
91
  }, [data === null || data === void 0 ? void 0 : data.records.length, selectedIds]);
92
- return (0, react_1.useMemo)(() => {
92
+ const actionColumns = (0, react_1.useMemo)(() => {
93
+ if (disableContextMenu)
94
+ return [];
93
95
  return [
94
- ...(disableSelection
95
- ? []
96
- : [
97
- columnHelper.accessor((info) => info[schema.idAttribute], {
98
- id: '$selectColumn',
99
- header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableSelectionCell, { checked: headingSelectionState, as: 'th', style: {
100
- position: 'sticky',
101
- display: 'flex',
102
- left: 0,
103
- top: 0,
104
- background: react_components_1.tokens.colorNeutralBackground3,
105
- zIndex: 1,
106
- width: 32,
107
- maxWidth: 32,
108
- minWidth: 32,
109
- }, onClick: () => {
110
- setSelectedIdsRef.current((ids) => {
111
- var _a, _b, _c;
112
- if (ids.length === ((_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.length)) {
113
- return [];
114
- }
115
- return ((_c = (_b = dataRef.current) === null || _b === void 0 ? void 0 : _b.records.map((record) => record[schema.idAttribute])) !== null && _c !== void 0 ? _c : []);
116
- });
117
- } })),
118
- 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) => {
119
- event.preventDefault();
120
- event.stopPropagation();
121
- setSelectedIdsRef.current((ids) => {
122
- const id = info.row.original[schema.idAttribute];
123
- if (ids.includes(id)) {
124
- return ids.filter((i) => i !== id);
125
- }
126
- return [...ids, id];
127
- });
128
- }, style: {
129
- width: 32,
130
- maxWidth: 32,
131
- minWidth: 32,
132
- } })),
133
- enableResizing: false,
134
- size: 32,
135
- minSize: 32,
136
- maxSize: 32,
137
- }),
138
- ]),
139
- ...gridColumns.map((column, index) => {
140
- return columnHelper.accessor((info) => info[column.name], {
141
- id: column.id,
142
- header: (props) => {
143
- return ((0, jsx_runtime_1.jsx)(GridColumnHeader_1.TableHeaderFilterCell, { columnName: column.name, sortDirection: props.column.getIsSorted() || undefined, minWidth: props.header.getSize(), column: column, resizable: !disableColumnResize, disableFilter: disableColumnFilter, disableSort: disableColumnSort, onChangeSortDirection: (direction) => {
144
- setSorting([
145
- {
146
- field: column.name,
147
- order: direction,
148
- },
149
- ]);
150
- }, attribute: schema.attributes[column.name], onResetSize: props.column.resetSize, resizeHandler: props.header.getResizeHandler(), children: column.label }, column.id));
151
- },
152
- cell: (info) => {
153
- var _a, _b, _c;
154
- let attribute;
155
- let value;
156
- if (column.expandedKey) {
157
- const lookup = column.name;
158
- const field = column.expandedKey;
159
- const entity = schema.attributes[lookup]
160
- .entity;
161
- const lookupSchema = schemaStore.getSchema(entity);
162
- attribute = lookupSchema.attributes[field];
163
- value = (_b = (_a = info.row.original.$expand) === null || _a === void 0 ? void 0 : _a[lookup]) === null || _b === void 0 ? void 0 : _b[field];
164
- }
165
- else {
166
- attribute = schema.attributes[column.name];
167
- value = info.getValue();
168
- }
169
- const formattedValue = (_c = (0, utils_1.getAttributeFormattedValue)(attribute, value, {
170
- currency: currency.currency,
171
- dateFormat: dateFormats.short,
172
- timezone,
173
- })) !== null && _c !== void 0 ? _c : '';
174
- if (schema.primaryAttribute === column.name) {
175
- const path = routeResolver({
176
- logicalName: schema.logicalName,
177
- type: app_1.PageType.EntityForm,
178
- id: info.row.original[schema.idAttribute],
179
- });
180
- return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: value, width: info.column.getSize(), href: path, onClick: () => {
181
- openRecord(info.row.original[schema.idAttribute]);
182
- } }, column.id));
183
- }
184
- switch (attribute === null || attribute === void 0 ? void 0 : attribute.type) {
185
- case 'money':
186
- return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize(), textAlignment: "right" }, column.id));
187
- case 'lookup':
188
- if (!value) {
189
- return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: "", width: info.column.getSize() }, column.id));
190
- }
191
- const path = routeResolver({
192
- logicalName: attribute.entity,
193
- type: app_1.PageType.EntityForm,
194
- id: value.id,
195
- });
196
- return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: path, onClick: () => {
197
- recordSetSetter('', []);
198
- router.push(path);
199
- } }, column.id));
200
- }
201
- return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize() }, column.id));
202
- },
203
- enableResizing: true,
204
- size: columnWidths[index],
205
- minSize: 100,
206
- maxSize: 1000,
207
- });
96
+ columnHelper.accessor((info) => info[schema.idAttribute], {
97
+ id: '$actionColumn',
98
+ header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { style: {
99
+ minWidth: 32,
100
+ flexShrink: 0,
101
+ // width: 32,
102
+ flex: 1,
103
+ position: 'sticky',
104
+ display: 'flex',
105
+ right: 0,
106
+ top: 0,
107
+ // zIndex: 1,
108
+ background: react_components_1.tokens.colorNeutralBackground3,
109
+ borderBottom: `${react_components_1.tokens.strokeWidthThin} solid ${react_components_1.tokens.colorNeutralStroke3}`,
110
+ }, children: "\u00A0" })),
111
+ cell: (info) => ((0, jsx_runtime_1.jsx)(ActionCell_1.ActionCell, { onOpen: () => {
112
+ const id = info.row.original[schema.idAttribute];
113
+ setSelectedIdsRef.current([id]);
114
+ }, mutableState: mutableContextCommandState })),
115
+ enableResizing: false,
116
+ size: 32,
117
+ minSize: 32,
118
+ maxSize: 32,
119
+ }),
120
+ ];
121
+ }, [disableContextMenu, mutableContextCommandState, schema.idAttribute]);
122
+ const selectionColumns = (0, react_1.useMemo)(() => {
123
+ if (disableSelection)
124
+ return [];
125
+ return [
126
+ columnHelper.accessor((info) => info[schema.idAttribute], {
127
+ id: '$selectColumn',
128
+ header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableSelectionCell, { checked: headingSelectionState, as: 'th', style: {
129
+ position: 'sticky',
130
+ display: 'flex',
131
+ left: 0,
132
+ top: 0,
133
+ background: react_components_1.tokens.colorNeutralBackground3,
134
+ zIndex: 1,
135
+ width: 32,
136
+ maxWidth: 32,
137
+ minWidth: 32,
138
+ }, onClick: () => {
139
+ setSelectedIdsRef.current((ids) => {
140
+ var _a, _b, _c;
141
+ if (ids.length === ((_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.records.length)) {
142
+ return [];
143
+ }
144
+ return ((_c = (_b = dataRef.current) === null || _b === void 0 ? void 0 : _b.records.map((record) => record[schema.idAttribute])) !== null && _c !== void 0 ? _c : []);
145
+ });
146
+ } })),
147
+ 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) => {
148
+ event.preventDefault();
149
+ event.stopPropagation();
150
+ setSelectedIdsRef.current((ids) => {
151
+ const id = info.row.original[schema.idAttribute];
152
+ if (ids.includes(id)) {
153
+ return ids.filter((i) => i !== id);
154
+ }
155
+ return [...ids, id];
156
+ });
157
+ }, style: {
158
+ width: 32,
159
+ maxWidth: 32,
160
+ minWidth: 32,
161
+ } })),
162
+ enableResizing: false,
163
+ size: 32,
164
+ minSize: 32,
165
+ maxSize: 32,
208
166
  }),
209
- ...(disableContextMenu
210
- ? []
211
- : [
212
- columnHelper.accessor((info) => info[schema.idAttribute], {
213
- id: '$actionColumn',
214
- header: () => ((0, jsx_runtime_1.jsx)(react_components_1.TableHeaderCell, { style: {
215
- minWidth: 32,
216
- flexShrink: 0,
217
- // width: 32,
218
- flex: 1,
219
- position: 'sticky',
220
- display: 'flex',
221
- right: 0,
222
- top: 0,
223
- // zIndex: 1,
224
- background: react_components_1.tokens.colorNeutralBackground3,
225
- borderBottom: `${react_components_1.tokens.strokeWidthThin} solid ${react_components_1.tokens.colorNeutralStroke3}`,
226
- }, children: "\u00A0" })),
227
- cell: (info) => ((0, jsx_runtime_1.jsx)(ActionCell_1.ActionCell, { onOpen: () => {
228
- const id = info.row.original[schema.idAttribute];
229
- setSelectedIdsRef.current([id]);
230
- }, mutableState: mutableContextCommandState })),
231
- enableResizing: false,
232
- size: 32,
233
- minSize: 32,
234
- maxSize: 32,
235
- }),
236
- ]),
237
167
  ];
238
168
  }, [
239
169
  disableSelection,
240
- gridColumns,
241
- disableContextMenu,
170
+ headingSelectionState,
242
171
  schema.idAttribute,
243
- schema.attributes,
244
- schema.primaryAttribute,
245
- schema.logicalName,
246
172
  styles.selectionCell,
173
+ ]);
174
+ const restColumns = (0, react_1.useMemo)(() => {
175
+ return gridColumns.map((column, index) => {
176
+ return columnHelper.accessor((info) => info[column.name], {
177
+ id: column.id,
178
+ header: (props) => {
179
+ return ((0, jsx_runtime_1.jsx)(GridColumnHeader_1.TableHeaderFilterCell, { columnName: column.name, sortDirection: props.column.getIsSorted() || undefined, minWidth: props.header.getSize(), column: column, resizable: !disableColumnResize, disableFilter: disableColumnFilter, disableSort: disableColumnSort, onChangeSortDirection: (direction) => {
180
+ setSorting([
181
+ {
182
+ field: column.name,
183
+ order: direction,
184
+ },
185
+ ]);
186
+ }, attribute: schema.attributes[column.name], onResetSize: props.column.resetSize, resizeHandler: props.header.getResizeHandler(), children: column.label }, column.id));
187
+ },
188
+ cell: (info) => {
189
+ var _a, _b, _c;
190
+ let attribute;
191
+ let value;
192
+ if (column.expandedKey) {
193
+ const lookup = column.name;
194
+ const field = column.expandedKey;
195
+ const entity = schema.attributes[lookup]
196
+ .entity;
197
+ const lookupSchema = schemaStore.getSchema(entity);
198
+ attribute = lookupSchema.attributes[field];
199
+ value = (_b = (_a = info.row.original.$expand) === null || _a === void 0 ? void 0 : _a[lookup]) === null || _b === void 0 ? void 0 : _b[field];
200
+ }
201
+ else {
202
+ attribute = schema.attributes[column.name];
203
+ value = info.getValue();
204
+ }
205
+ const formattedValue = (_c = (0, utils_1.getAttributeFormattedValue)(attribute, value, {
206
+ currency: currency.currency,
207
+ dateFormat: dateFormats.short,
208
+ timezone,
209
+ })) !== null && _c !== void 0 ? _c : '';
210
+ if (schema.primaryAttribute === column.name) {
211
+ const path = routeResolver({
212
+ logicalName: schema.logicalName,
213
+ type: app_1.PageType.EntityForm,
214
+ id: info.row.original[schema.idAttribute],
215
+ });
216
+ return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: value, width: info.column.getSize(), href: path, onClick: () => {
217
+ openRecord(info.row.original[schema.idAttribute]);
218
+ } }, column.id));
219
+ }
220
+ switch (attribute === null || attribute === void 0 ? void 0 : attribute.type) {
221
+ case 'money':
222
+ return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize(), textAlignment: "right" }, column.id));
223
+ case 'lookup':
224
+ if (!value) {
225
+ return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: "", width: info.column.getSize() }, column.id));
226
+ }
227
+ const path = routeResolver({
228
+ logicalName: attribute.entity,
229
+ type: app_1.PageType.EntityForm,
230
+ id: value.id,
231
+ });
232
+ return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: path, onClick: () => {
233
+ recordSetSetter('', []);
234
+ router.push(path);
235
+ } }, column.id));
236
+ }
237
+ return ((0, jsx_runtime_1.jsx)(TableCell_1.TableCellText, { value: formattedValue, width: info.column.getSize() }, column.id));
238
+ },
239
+ enableResizing: true,
240
+ size: columnWidths[index],
241
+ minSize: 100,
242
+ maxSize: 1000,
243
+ });
244
+ });
245
+ }, [
247
246
  columnWidths,
248
- disableColumnResize,
249
- disableColumnFilter,
250
- disableColumnSort,
251
- setSorting,
252
247
  currency.currency,
253
248
  dateFormats.short,
254
- schemaStore,
255
- routeResolver,
249
+ disableColumnFilter,
250
+ disableColumnResize,
251
+ disableColumnSort,
252
+ gridColumns,
256
253
  openRecord,
257
254
  recordSetSetter,
255
+ routeResolver,
258
256
  router,
259
- mutableContextCommandState,
260
- headingSelectionState,
257
+ schema.attributes,
258
+ schema.idAttribute,
259
+ schema.logicalName,
260
+ schema.primaryAttribute,
261
+ schemaStore,
262
+ setSorting,
261
263
  timezone,
262
264
  ]);
265
+ return (0, react_1.useMemo)(() => {
266
+ return [...selectionColumns, ...restColumns, ...actionColumns];
267
+ }, [selectionColumns, restColumns, actionColumns]);
263
268
  }
@@ -19,13 +19,14 @@ const LookupControl_1 = require("../form/controls/LookupControl");
19
19
  const MultiSelectControl_1 = __importDefault(require("../form/controls/MultiSelectControl"));
20
20
  const MultiSelectLookupControl_1 = require("../form/controls/MultiSelectLookupControl");
21
21
  const NumberControl_1 = require("../form/controls/NumberControl");
22
+ const RichTextControl_1 = require("../form/controls/RichTextControl");
22
23
  const SelectControl_1 = __importDefault(require("../form/controls/SelectControl"));
23
24
  const SwitchControl_1 = require("../form/controls/SwitchControl");
24
25
  const TelephoneControl_1 = require("../form/controls/TelephoneControl");
25
26
  const TextAreaControl_1 = require("../form/controls/TextAreaControl");
26
27
  const TextControl_1 = require("../form/controls/TextControl");
27
28
  const StandardControl = (props) => {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
29
30
  const { attribute, label: _label, isError,
30
31
  // errorMessage,
31
32
  name, value, onBlur, onChange,
@@ -78,11 +79,15 @@ const StandardControl = (props) => {
78
79
  const Control = (_f = componentStore_1.componentStore.getComponent('Form.TextAreaControl')) !== null && _f !== void 0 ? _f : TextAreaControl_1.TextAreaControl;
79
80
  return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, controlProps));
80
81
  }
82
+ case 'richtext': {
83
+ const Control = (_g = componentStore_1.componentStore.getComponent('Form.RichTextControl')) !== null && _g !== void 0 ? _g : RichTextControl_1.RichTextControl;
84
+ return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, controlProps));
85
+ }
81
86
  default:
82
87
  return (0, jsx_runtime_1.jsx)(react_1.Fragment, {});
83
88
  }
84
89
  case 'number': {
85
- const Control = (_g = componentStore_1.componentStore.getComponent('Form.NumberControl')) !== null && _g !== void 0 ? _g : NumberControl_1.NumberControl;
90
+ const Control = (_h = componentStore_1.componentStore.getComponent('Form.NumberControl')) !== null && _h !== void 0 ? _h : NumberControl_1.NumberControl;
86
91
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, placeholder: placeholder, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, readOnly: readOnly }));
87
92
  }
88
93
  case 'date': {
@@ -97,11 +102,11 @@ const StandardControl = (props) => {
97
102
  readOnly,
98
103
  };
99
104
  if (attribute.format === 'datetime') {
100
- const Control = (_h = componentStore_1.componentStore.getComponent('Form.DateTimeControl')) !== null && _h !== void 0 ? _h : DateTimeControl_1.DateTimeControl;
105
+ const Control = (_j = componentStore_1.componentStore.getComponent('Form.DateTimeControl')) !== null && _j !== void 0 ? _j : DateTimeControl_1.DateTimeControl;
101
106
  return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, controlProps));
102
107
  }
103
108
  else {
104
- const Control = (_j = componentStore_1.componentStore.getComponent('Form.DateControl')) !== null && _j !== void 0 ? _j : DateControl_1.DateControl;
109
+ const Control = (_k = componentStore_1.componentStore.getComponent('Form.DateControl')) !== null && _k !== void 0 ? _k : DateControl_1.DateControl;
105
110
  return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, controlProps));
106
111
  }
107
112
  }
@@ -116,35 +121,35 @@ const StandardControl = (props) => {
116
121
  disabled: isDisabled,
117
122
  readOnly,
118
123
  };
119
- const Control = (_k = componentStore_1.componentStore.getComponent('Form.DateRangeControl')) !== null && _k !== void 0 ? _k : DateRangeControl_1.DateRangeControl;
124
+ const Control = (_l = componentStore_1.componentStore.getComponent('Form.DateRangeControl')) !== null && _l !== void 0 ? _l : DateRangeControl_1.DateRangeControl;
120
125
  return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, controlProps));
121
126
  }
122
127
  case 'money': {
123
- const Control = (_l = componentStore_1.componentStore.getComponent('Form.CurrencyControl')) !== null && _l !== void 0 ? _l : CurrencyControl_1.CurrencyControl;
128
+ const Control = (_m = componentStore_1.componentStore.getComponent('Form.CurrencyControl')) !== null && _m !== void 0 ? _m : CurrencyControl_1.CurrencyControl;
124
129
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, placeholder: placeholder, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, borderOnFocusOnly: borderOnFocusOnly, readOnly: readOnly }));
125
130
  }
126
131
  case 'lookup': {
127
- const Control = (_m = componentStore_1.componentStore.getComponent('Form.LookupControl')) !== null && _m !== void 0 ? _m : LookupControl_1.LookupControl;
132
+ const Control = (_o = componentStore_1.componentStore.getComponent('Form.LookupControl')) !== null && _o !== void 0 ? _o : LookupControl_1.LookupControl;
128
133
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, schema: schemaStore.getSchema(attribute.entity), experienceStore: experienceStore, allowNavigation: allowNavigation, allowNewRecord: allowNewRecord }));
129
134
  }
130
135
  case 'lookups': {
131
- const Control = (_o = componentStore_1.componentStore.getComponent('Form.MultiSelectLookupControl')) !== null && _o !== void 0 ? _o : MultiSelectLookupControl_1.MultiSelectLookupControl;
136
+ const Control = (_p = componentStore_1.componentStore.getComponent('Form.MultiSelectLookupControl')) !== null && _p !== void 0 ? _p : MultiSelectLookupControl_1.MultiSelectLookupControl;
132
137
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, schema: schemaStore.getSchema(attribute.entity), experienceStore: experienceStore, allowNavigation: allowNavigation, allowNewRecord: allowNewRecord }));
133
138
  }
134
139
  case 'boolean': {
135
- const Control = (_p = componentStore_1.componentStore.getComponent('Form.SwitchControl')) !== null && _p !== void 0 ? _p : SwitchControl_1.SwitchControl;
140
+ const Control = (_q = componentStore_1.componentStore.getComponent('Form.SwitchControl')) !== null && _q !== void 0 ? _q : SwitchControl_1.SwitchControl;
136
141
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, readOnly: readOnly }));
137
142
  }
138
143
  case 'choice': {
139
- const Control = (_q = componentStore_1.componentStore.getComponent('Form.SelectControl')) !== null && _q !== void 0 ? _q : SelectControl_1.default;
144
+ const Control = (_r = componentStore_1.componentStore.getComponent('Form.SelectControl')) !== null && _r !== void 0 ? _r : SelectControl_1.default;
140
145
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, options: attribute.options, placeholder: placeholder, borderOnFocusOnly: borderOnFocusOnly, readOnly: readOnly }));
141
146
  }
142
147
  case 'choices': {
143
- const Control = (_r = componentStore_1.componentStore.getComponent('Form.MultiSelectControl')) !== null && _r !== void 0 ? _r : MultiSelectControl_1.default;
148
+ const Control = (_s = componentStore_1.componentStore.getComponent('Form.MultiSelectControl')) !== null && _s !== void 0 ? _s : MultiSelectControl_1.default;
144
149
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, options: attribute.options, placeholder: placeholder, borderOnFocusOnly: borderOnFocusOnly, readOnly: readOnly }));
145
150
  }
146
151
  case 'attachments': {
147
- const Control = (_s = componentStore_1.componentStore.getComponent('Form.AttachmentsControl')) !== null && _s !== void 0 ? _s : AttachmentsControl_1.AttachmentsControl;
152
+ const Control = (_t = componentStore_1.componentStore.getComponent('Form.AttachmentsControl')) !== null && _t !== void 0 ? _t : AttachmentsControl_1.AttachmentsControl;
148
153
  return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, placeholder: placeholder, borderOnFocusOnly: borderOnFocusOnly, readOnly: readOnly }));
149
154
  }
150
155
  // case 'attachment': {
@@ -4,18 +4,48 @@ exports.CurrencyControl = CurrencyControl;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_components_1 = require("@fluentui/react-components");
6
6
  const locale_1 = require("@headless-adminapp/app/locale");
7
+ const react_1 = require("react");
7
8
  function CurrencyControl({ value, onChange, id, name, onBlur, onFocus,
8
9
  // error,
9
10
  disabled, placeholder, autoFocus,
10
11
  // borderOnFocusOnly,
11
12
  readOnly, }) {
12
- var _a;
13
13
  const symbol = (0, locale_1.useCurrencySymbol)();
14
- return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, autoFocus: autoFocus, name: name, value: (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : '', onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value ? Number(e.target.value) : null), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), appearance: "filled-darker", onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
15
- // invalid={error}
16
- // icon={<div>₹</div>}
17
- // startDecorator={<div>₹</div>}
18
- contentBefore: (0, jsx_runtime_1.jsx)("div", { children: symbol }), disabled: disabled, readOnly: readOnly, style: {
14
+ const [internalValue, setInternalValue] = (0, react_1.useState)(value ? value.toString() : '');
15
+ const internalValueRef = (0, react_1.useRef)(internalValue);
16
+ internalValueRef.current = internalValue;
17
+ (0, react_1.useEffect)(() => {
18
+ let _value = '';
19
+ if (typeof value === 'number') {
20
+ _value = value.toString();
21
+ }
22
+ if (!_value && internalValueRef.current === '-') {
23
+ return;
24
+ }
25
+ if (internalValueRef.current !== _value) {
26
+ setInternalValue(_value);
27
+ }
28
+ }, [value]);
29
+ const handleChange = (e) => {
30
+ let value = e.target.value;
31
+ if (!value) {
32
+ setInternalValue('');
33
+ onChange === null || onChange === void 0 ? void 0 : onChange(null);
34
+ return;
35
+ }
36
+ value = value.replace(',', '');
37
+ if (value === '-') {
38
+ setInternalValue('-');
39
+ onChange === null || onChange === void 0 ? void 0 : onChange(null);
40
+ return;
41
+ }
42
+ if (isNaN(Number(value))) {
43
+ return;
44
+ }
45
+ setInternalValue(value);
46
+ onChange === null || onChange === void 0 ? void 0 : onChange(Number(value));
47
+ };
48
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, autoFocus: autoFocus, name: name, value: internalValue, onChange: handleChange, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), appearance: "filled-darker", onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), contentBefore: (0, jsx_runtime_1.jsx)("div", { children: symbol }), disabled: disabled, readOnly: readOnly, style: {
19
49
  width: '100%',
20
50
  } }));
21
51
  }
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ControlProps } from './types';
3
+ export interface RichTextControlProps extends ControlProps<string> {
4
+ }
5
+ export declare const RichTextControl: FC<RichTextControlProps>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.RichTextControl = void 0;
27
+ const jsx_runtime_1 = require("react/jsx-runtime");
28
+ const react_1 = require("react");
29
+ const ReactQuill = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('react-quill'))));
30
+ const RichTextControl = ({ value, onChange, id, onBlur, onFocus, disabled, readOnly, }) => {
31
+ return ((0, jsx_runtime_1.jsx)(ReactQuill, { value: value !== null && value !== void 0 ? value : '', onChange: onChange, className: "hdlapp_rte", readOnly: disabled || readOnly, style: { maxHeight: '400px', minHeight: '200px' }, onFocus: onFocus, onBlur: onBlur, id: id }));
32
+ };
33
+ exports.RichTextControl = RichTextControl;
@@ -1,4 +1,4 @@
1
1
  import { ControlProps } from './types';
2
2
  export interface SwitchControlProps extends ControlProps<boolean> {
3
3
  }
4
- export declare function SwitchControl({}: SwitchControlProps): null;
4
+ export declare function SwitchControl({ value, onChange, id, name, disabled, readOnly, onBlur, onFocus, }: SwitchControlProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwitchControl = SwitchControl;
4
- function SwitchControl({}) {
5
- return null;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ function SwitchControl({ value, onChange, id, name, disabled, readOnly, onBlur, onFocus, }) {
7
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Switch, { checked: value !== null && value !== void 0 ? value : false, onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.currentTarget.checked), id: id, name: name, disabled: disabled, readOnly: readOnly, onBlur: onBlur, onFocus: onFocus }));
6
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@headless-adminapp/fluent",
3
- "version": "0.0.17-alpha.25",
3
+ "version": "0.0.17-alpha.27",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -17,10 +17,10 @@
17
17
  "url": "https://github.com/headless-adminapp/adminapp/issues"
18
18
  },
19
19
  "scripts": {
20
- "build": "tsc",
20
+ "build": "tsc && sass src/styles/index.scss dist/styles.css --no-source-map",
21
21
  "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo",
22
22
  "ts-check": "tsc --noEmit",
23
- "copy-files": "cp package.json dist && cp src/index.css dist",
23
+ "copy-files": "cp package.json dist",
24
24
  "prepublishOnly": "pnpm run build && pnpm run copy-files",
25
25
  "test": "echo \"Error: no test specified\" && exit 1"
26
26
  },
@@ -42,7 +42,10 @@
42
42
  "react-dnd": "^16.0.1",
43
43
  "react-dnd-html5-backend": "^16.0.1",
44
44
  "react-hook-form": "7.52.2",
45
+ "react-quill": "^2.0.0",
46
+ "sass": "1.81.0",
47
+ "uuid": "11.0.3",
45
48
  "yup": "^1.4.0"
46
49
  },
47
- "gitHead": "0a42b982d6113067cd2f9739ec646d138c1a5274"
50
+ "gitHead": "249b7141dedc93a334d3d918d134bd167cecd6ae"
48
51
  }
package/styles.css ADDED
@@ -0,0 +1,100 @@
1
+ html,
2
+ body {
3
+ padding: 0;
4
+ margin: 0;
5
+ }
6
+
7
+ .TextControl_readonly:after {
8
+ border-bottom-color: var(--colorNeutralStrokeDisabled) !important;
9
+ }
10
+
11
+ .FormBody_scrollview > div {
12
+ display: flex;
13
+ flex-direction: column;
14
+ padding: var(--spacingVerticalM);
15
+ }
16
+
17
+ * {
18
+ box-sizing: border-box;
19
+ padding: 0;
20
+ margin: 0;
21
+ }
22
+
23
+ .fui-MenuItem__icon > svg,
24
+ .fui-Button__icon > svg {
25
+ width: inherit;
26
+ height: inherit;
27
+ }
28
+
29
+ .hdlapp_rte {
30
+ display: flex;
31
+ flex-direction: column;
32
+ background-color: var(--colorNeutralBackground3);
33
+ overflow: hidden;
34
+ border-radius: var(--borderRadiusMedium);
35
+ border: 1px solid transparent;
36
+ }
37
+ .hdlapp_rte:focus-within {
38
+ border-color: var(--colorNeutralForeground2BrandSelected);
39
+ }
40
+ .hdlapp_rte .ql-snow .ql-picker {
41
+ color: var(--colorNeutralForeground3Hover);
42
+ }
43
+ .hdlapp_rte .ql-snow .ql-stroke {
44
+ stroke: var(--colorNeutralForeground3Hover);
45
+ }
46
+ .hdlapp_rte .ql-snow.ql-toolbar button:hover,
47
+ .hdlapp_rte .ql-snow .ql-toolbar button:hover,
48
+ .hdlapp_rte .ql-snow.ql-toolbar button:focus,
49
+ .hdlapp_rte .ql-snow .ql-toolbar button:focus,
50
+ .hdlapp_rte .ql-snow.ql-toolbar button.ql-active,
51
+ .hdlapp_rte .ql-snow .ql-toolbar button.ql-active,
52
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label:hover,
53
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label:hover,
54
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label.ql-active,
55
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label.ql-active,
56
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item:hover,
57
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item:hover,
58
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item.ql-selected,
59
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item.ql-selected {
60
+ color: var(--colorNeutralForeground1);
61
+ }
62
+ .hdlapp_rte .ql-snow.ql-toolbar button:hover .ql-stroke,
63
+ .hdlapp_rte .ql-snow .ql-toolbar button:hover .ql-stroke,
64
+ .hdlapp_rte .ql-snow.ql-toolbar button:focus .ql-stroke,
65
+ .hdlapp_rte .ql-snow .ql-toolbar button:focus .ql-stroke,
66
+ .hdlapp_rte .ql-snow.ql-toolbar button.ql-active .ql-stroke,
67
+ .hdlapp_rte .ql-snow .ql-toolbar button.ql-active .ql-stroke,
68
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
69
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
70
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
71
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
72
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
73
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
74
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
75
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
76
+ .hdlapp_rte .ql-snow.ql-toolbar button:hover .ql-stroke-miter,
77
+ .hdlapp_rte .ql-snow .ql-toolbar button:hover .ql-stroke-miter,
78
+ .hdlapp_rte .ql-snow.ql-toolbar button:focus .ql-stroke-miter,
79
+ .hdlapp_rte .ql-snow .ql-toolbar button:focus .ql-stroke-miter,
80
+ .hdlapp_rte .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
81
+ .hdlapp_rte .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
82
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
83
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
84
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
85
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
86
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
87
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
88
+ .hdlapp_rte .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
89
+ .hdlapp_rte .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
90
+ stroke: var(--colorNeutralForeground1);
91
+ }
92
+ .hdlapp_rte .ql-snow.ql-toolbar {
93
+ border: none;
94
+ }
95
+ .hdlapp_rte .ql-toolbar.ql-snow + .ql-container.ql-snow {
96
+ border-top: 1px solid var(--colorNeutralBackground1Hover);
97
+ }
98
+ .hdlapp_rte .ql-container.ql-snow {
99
+ border: none;
100
+ }
package/index.css DELETED
@@ -1,27 +0,0 @@
1
- html,
2
- body {
3
- padding: 0;
4
- margin: 0;
5
- }
6
-
7
- .TextControl_readonly:after {
8
- border-bottom-color: var(--colorNeutralStrokeDisabled) !important;
9
- }
10
-
11
- .FormBody_scrollview > div {
12
- display: flex;
13
- flex-direction: column;
14
- padding: var(--spacingVerticalM);
15
- }
16
-
17
- * {
18
- box-sizing: border-box;
19
- padding: 0;
20
- margin: 0;
21
- }
22
-
23
- .fui-MenuItem__icon > svg,
24
- .fui-Button__icon > svg {
25
- width: inherit;
26
- height: inherit;
27
- }