@linzjs/step-ag-grid 31.2.1 → 31.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "31.2.1",
5
+ "version": "31.2.3",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@chromatic-com/storybook": "^4.1.3",
79
- "@linzjs/lui": "^24.3.1",
79
+ "@linzjs/lui": "^24.16.0",
80
80
  "@linzjs/windows": "^9.5.6",
81
81
  "@rollup/plugin-commonjs": "^28.0.9",
82
82
  "@rollup/plugin-json": "^6.1.0",
@@ -139,10 +139,9 @@ export const GridFormPopoverMenu = <TData extends GridBaseRow>(props: GridFormPo
139
139
  <MenuDivider key={`$$divider_${index}`} />
140
140
  ) : (
141
141
  !item.hidden && (
142
- <Fragment key={`${String(item.label)}`}>
142
+ <Fragment key={`fragment__${index}`}>
143
143
  {item.subMenu ? (
144
144
  <SubMenu
145
- key={`${String(item.label)}`}
146
145
  disabled={!!item.disabled}
147
146
  label={item.label as string}
148
147
  title={item.disabled && typeof item.disabled !== 'boolean' ? item.disabled : ''}
@@ -151,7 +150,6 @@ export const GridFormPopoverMenu = <TData extends GridBaseRow>(props: GridFormPo
151
150
  </SubMenu>
152
151
  ) : (
153
152
  <MenuItem
154
- key={`${String(item.label)}`}
155
153
  onClick={(e: ClickEvent) => void onMenuItemClick(e, item)}
156
154
  disabled={!!item.disabled}
157
155
  title={item.disabled && typeof item.disabled !== 'boolean' ? item.disabled : ''}
@@ -160,7 +158,7 @@ export const GridFormPopoverMenu = <TData extends GridBaseRow>(props: GridFormPo
160
158
  </MenuItem>
161
159
  )}
162
160
  {item.subComponent && subComponentSelected === item && (
163
- <FocusableItem className={'LuiDeprecatedForms'} key={`${String(item.label)}_subcomponent`}>
161
+ <FocusableItem className={'LuiDeprecatedForms'}>
164
162
  {() => (
165
163
  <GridSubComponentContext.Provider
166
164
  value={{
@@ -22,6 +22,7 @@ export interface ActionButtonProps {
22
22
  className?: 'ActionButton-fill' | 'ActionButton-tight' | string;
23
23
  onClick: () => Promise<void> | void;
24
24
  level?: LuiButtonProps['level'];
25
+ intent?: LuiButtonProps['intent'];
25
26
  style?: CSSProperties;
26
27
  disabled?: boolean;
27
28
  }
@@ -42,6 +43,7 @@ export const ActionButton = ({
42
43
  size = 'sm',
43
44
  iconPosition = 'left',
44
45
  level = 'tertiary',
46
+ intent,
45
47
  'aria-label': ariaLabel,
46
48
  }: ActionButtonProps): ReactElement => {
47
49
  const [inProgress, setInProgress] = useState(false);
@@ -70,6 +72,7 @@ export const ActionButton = ({
70
72
  data-testid={dataTestId}
71
73
  type={'button'}
72
74
  level={level}
75
+ intent={intent}
73
76
  title={title ?? ariaLabel ?? name}
74
77
  buttonProps={{ 'aria-label': ariaLabel ?? name }}
75
78
  className={clsx(
@@ -24,6 +24,15 @@ export default {
24
24
  const Template: StoryFn<typeof GridFormPopoverMenu> = (props) => {
25
25
  const configs: [string, GridFormPopoverMenuProps<GridBaseRow>][] = [
26
26
  ['No options', { options: () => [] }],
27
+ [
28
+ 'Elements',
29
+ {
30
+ options: () => [
31
+ { label: <i>El1</i>, value: 1 },
32
+ { label: <i>El2</i>, value: 2 },
33
+ ],
34
+ },
35
+ ],
27
36
  [
28
37
  'Enabled/disabled/hidden and divider',
29
38
  {
@@ -43,12 +52,12 @@ const Template: StoryFn<typeof GridFormPopoverMenu> = (props) => {
43
52
  <div className={'react-menu-inline-test'}>
44
53
  <GridContextProvider>
45
54
  {configs.map((config, index) => (
46
- <>
55
+ <div key={index}>
47
56
  <h6 ref={anchorRefs[index]}>{config[0]}</h6>
48
57
  <GridPopoverContext.Provider value={{ anchorRef: anchorRefs[index] } as any as GridPopoverContextType<any>}>
49
- <GridFormPopoverMenu {...props} {...config[1]} />
58
+ <GridFormPopoverMenu {...props} {...config[1]} defaultAction={() => {}} />
50
59
  </GridPopoverContext.Provider>
51
- </>
60
+ </div>
52
61
  ))}
53
62
  </GridContextProvider>
54
63
  </div>