@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/dist/src/lui/ActionButton.d.ts +2 -1
- package/dist/step-ag-grid.cjs +4 -4
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +4 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/gridForm/GridFormPopoverMenu.tsx +2 -4
- package/src/lui/ActionButton.tsx +3 -0
- package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +12 -3
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -63744,7 +63744,7 @@ const GridFormPopoverMenu = (props) => {
|
|
|
63744
63744
|
invalid: () => subComponentSelected && !subComponentIsValid.current,
|
|
63745
63745
|
save,
|
|
63746
63746
|
});
|
|
63747
|
-
return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: 'GridFormPopupMenu', children: jsx(Fragment, { children: isEmpty(options) ? (jsx(MenuItem, { className: 'GridPopoverMenu-noOptions', disabled: true, children: "No actions" }, `GridPopoverMenu-empty`)) : (options?.map((item, index) => item.label === '__isMenuSeparator__' ? (jsx(MenuDivider, {}, `$$divider_${index}`)) : (!item.hidden && (jsxs(Fragment$1, { children: [item.subMenu ? (jsx(SubMenu, { disabled: !!item.disabled, label: item.label, title: item.disabled && typeof item.disabled !== 'boolean' ? item.disabled : '', children: jsx(item.subMenu, {}) }
|
|
63747
|
+
return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: 'GridFormPopupMenu', children: jsx(Fragment, { children: isEmpty(options) ? (jsx(MenuItem, { className: 'GridPopoverMenu-noOptions', disabled: true, children: "No actions" }, `GridPopoverMenu-empty`)) : (options?.map((item, index) => item.label === '__isMenuSeparator__' ? (jsx(MenuDivider, {}, `$$divider_${index}`)) : (!item.hidden && (jsxs(Fragment$1, { children: [item.subMenu ? (jsx(SubMenu, { disabled: !!item.disabled, label: item.label, title: item.disabled && typeof item.disabled !== 'boolean' ? item.disabled : '', children: jsx(item.subMenu, {}) })) : (jsx(MenuItem, { onClick: (e) => void onMenuItemClick(e, item), disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== 'boolean' ? item.disabled : '', children: item.label })), item.subComponent && subComponentSelected === item && (jsx(FocusableItem, { className: 'LuiDeprecatedForms', children: () => (jsx(GridSubComponentContext.Provider, { value: {
|
|
63748
63748
|
context: {},
|
|
63749
63749
|
data,
|
|
63750
63750
|
value: subSelectedValue,
|
|
@@ -63755,7 +63755,7 @@ const GridFormPopoverMenu = (props) => {
|
|
|
63755
63755
|
subComponentIsValid.current = valid;
|
|
63756
63756
|
},
|
|
63757
63757
|
triggerSave,
|
|
63758
|
-
}, children: jsx("div", { className: 'subComponent', children: item.subComponent && jsx(item.subComponent, {}) }) })) }
|
|
63758
|
+
}, children: jsx("div", { className: 'subComponent', children: item.subComponent && jsx(item.subComponent, {}) }) })) }))] }, `fragment__${index}`))))) }) }));
|
|
63759
63759
|
};
|
|
63760
63760
|
|
|
63761
63761
|
const TextAreaInput = (props) => {
|
|
@@ -64865,7 +64865,7 @@ styleInject(css_248z);
|
|
|
64865
64865
|
|
|
64866
64866
|
// Kept this less than one second, so I don't have issues with waitFor as it defaults to 1s
|
|
64867
64867
|
const minimumInProgressTimeMs = 950;
|
|
64868
|
-
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', 'aria-label': ariaLabel, }) => {
|
|
64868
|
+
const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size = 'sm', iconPosition = 'left', level = 'tertiary', intent, 'aria-label': ariaLabel, }) => {
|
|
64869
64869
|
const [inProgress, setInProgress] = useState(false);
|
|
64870
64870
|
const lastInProgress = usePrevious(inProgress ?? false);
|
|
64871
64871
|
const [localInProgress, setLocalInProgress, setLocalInProgressDeferred] = useStateDeferred(inProgress);
|
|
@@ -64880,7 +64880,7 @@ const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style,
|
|
|
64880
64880
|
}
|
|
64881
64881
|
}, [inProgress, lastInProgress, setLocalInProgress, setLocalInProgressDeferred]);
|
|
64882
64882
|
const buttonText = (jsxs("span", { className: 'ActionButton-minimalArea', children: [jsx("span", { className: 'ActionButton-minimalAreaDisplay', children: (localInProgress ? inProgressName : name) ?? name }), jsx("span", { className: 'ActionButton-minimalAreaExpand', children: name })] }));
|
|
64883
|
-
return (jsxs(LuiButton, { "data-testid": dataTestId, type: 'button', level: level, title: title ?? ariaLabel ?? name, buttonProps: { 'aria-label': ariaLabel ?? name }, className: clsx('lui-button-icon-right', 'ActionButton', className, localInProgress && 'ActionButton-inProgress', name != null && !className?.includes('ActionButton-fill') && 'ActionButton-minimal', name == null && 'ActionButton-iconOnly'), size: 'lg', style: style, onClick: () => {
|
|
64883
|
+
return (jsxs(LuiButton, { "data-testid": dataTestId, type: 'button', level: level, intent: intent, title: title ?? ariaLabel ?? name, buttonProps: { 'aria-label': ariaLabel ?? name }, className: clsx('lui-button-icon-right', 'ActionButton', className, localInProgress && 'ActionButton-inProgress', name != null && !className?.includes('ActionButton-fill') && 'ActionButton-minimal', name == null && 'ActionButton-iconOnly'), size: 'lg', style: style, onClick: () => {
|
|
64884
64884
|
const promise = onClick();
|
|
64885
64885
|
const isPromise = typeof promise !== 'undefined';
|
|
64886
64886
|
if (isPromise) {
|