@linzjs/step-ag-grid 23.0.0 → 24.0.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.
- package/dist/src/components/ComponentLoadingWrapper.d.ts +1 -1
- package/dist/src/components/Grid.d.ts +17 -17
- package/dist/src/components/GridCell.d.ts +9 -9
- package/dist/src/components/GridCellFiller.d.ts +2 -2
- package/dist/src/components/GridCellMultiEditor.d.ts +6 -6
- package/dist/src/components/GridCellMultiSelectClassRules.d.ts +1 -1
- package/dist/src/components/GridIcon.d.ts +2 -2
- package/dist/src/components/GridNoRowsOverlay.d.ts +1 -1
- package/dist/src/components/GridPopoverHook.d.ts +2 -2
- package/dist/src/components/GridWrapper.d.ts +1 -1
- package/dist/src/components/PostSortRowsHook.d.ts +1 -1
- package/dist/src/components/clickInputWhenContainingCellClicked.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilters.d.ts +1 -1
- package/dist/src/components/gridFilter/index.d.ts +7 -7
- package/dist/src/components/gridFilter/useGridFilter.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +8 -8
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +5 -5
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +3 -3
- package/dist/src/components/gridForm/index.d.ts +10 -10
- package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +1 -1
- package/dist/src/components/gridHeader/index.d.ts +1 -1
- package/dist/src/components/gridHook/index.d.ts +1 -1
- package/dist/src/components/gridHook/useGridContextMenu.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridButton.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridEditBoolean.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/index.d.ts +11 -11
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +5 -5
- package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +1 -1
- package/dist/src/components/gridRender/index.d.ts +2 -2
- package/dist/src/components/gridUtil.d.ts +1 -1
- package/dist/src/components/index.d.ts +19 -19
- package/dist/src/contexts/GridContext.d.ts +4 -4
- package/dist/src/contexts/GridContextProvider.d.ts +3 -3
- package/dist/src/contexts/GridPopoverContext.d.ts +3 -3
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +4 -4
- package/dist/src/contexts/GridUpdatingContextProvider.d.ts +1 -1
- package/dist/src/index.d.ts +17 -17
- package/dist/src/lui/ActionButton.d.ts +9 -9
- package/dist/src/lui/FormError.d.ts +2 -2
- package/dist/src/lui/TextAreaInput.d.ts +1 -1
- package/dist/src/lui/TextInputFormatted.d.ts +2 -2
- package/dist/src/lui/reactUtils.d.ts +1 -1
- package/dist/src/lui/stateDeferredHook.d.ts +1 -1
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
- package/dist/src/react-menu3/components/FocusableItem.d.ts +3 -3
- package/dist/src/react-menu3/components/Menu.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuButton.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuGroup.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuHeader.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuItem.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuList.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
- package/dist/src/react-menu3/components/SubMenu.d.ts +5 -5
- package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/MenuListContext.d.ts +2 -2
- package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/SettingsContext.d.ts +2 -2
- package/dist/src/react-menu3/hooks/index.d.ts +9 -9
- package/dist/src/react-menu3/hooks/useBEM.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItemEffect.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItemState.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItems.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +1 -1
- package/dist/src/react-menu3/index.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
- package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +4 -4
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +5 -5
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +2 -2
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +5 -5
- package/dist/src/react-menu3/style-utils/index.d.ts +1 -1
- package/dist/src/react-menu3/types.d.ts +15 -15
- package/dist/src/react-menu3/utils/constants.d.ts +1 -1
- package/dist/src/react-menu3/utils/index.d.ts +3 -3
- package/dist/src/react-menu3/utils/utils.d.ts +5 -5
- package/dist/src/react-menu3/utils/withHovering.d.ts +1 -1
- package/dist/src/utils/testQuick.d.ts +2 -2
- package/dist/src/utils/testUtil.d.ts +2 -2
- package/dist/src/utils/textValidator.d.ts +2 -2
- package/dist/step-ag-grid.cjs.js +966 -952
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +968 -954
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +26 -41
- package/src/components/ComponentLoadingWrapper.tsx +5 -6
- package/src/components/Grid.tsx +85 -83
- package/src/components/GridCell.test.tsx +15 -15
- package/src/components/GridCell.tsx +46 -44
- package/src/components/GridCellFiller.tsx +5 -4
- package/src/components/GridCellMultiEditor.tsx +7 -7
- package/src/components/GridCellMultiSelectClassRules.tsx +3 -3
- package/src/components/GridIcon.tsx +6 -7
- package/src/components/GridLoadableCell.tsx +2 -2
- package/src/components/GridNoRowsOverlay.tsx +8 -8
- package/src/components/GridPopoverHook.tsx +16 -16
- package/src/components/GridWrapper.tsx +2 -2
- package/src/components/PostSortRowsHook.ts +11 -11
- package/src/components/clickInputWhenContainingCellClicked.tsx +5 -5
- package/src/components/gridFilter/GridFilterButtons.tsx +8 -9
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +25 -26
- package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +12 -13
- package/src/components/gridFilter/GridFilterHeaderIconButton.tsx +9 -10
- package/src/components/gridFilter/GridFilterQuick.tsx +6 -6
- package/src/components/gridFilter/GridFilters.tsx +1 -1
- package/src/components/gridFilter/index.ts +7 -7
- package/src/components/gridFilter/useGridFilter.ts +3 -3
- package/src/components/gridForm/GridFormDropDown.tsx +56 -52
- package/src/components/gridForm/GridFormEditBearing.tsx +12 -12
- package/src/components/gridForm/GridFormMessage.tsx +10 -10
- package/src/components/gridForm/GridFormMultiSelect.tsx +53 -51
- package/src/components/gridForm/GridFormMultiSelectGrid.tsx +25 -26
- package/src/components/gridForm/GridFormPopoverMenu.tsx +32 -29
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +10 -10
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +8 -8
- package/src/components/gridForm/GridFormTextArea.tsx +11 -11
- package/src/components/gridForm/GridFormTextInput.tsx +11 -11
- package/src/components/gridForm/index.ts +10 -10
- package/src/components/gridHeader/GridHeaderSelect.tsx +9 -9
- package/src/components/gridHeader/index.ts +1 -1
- package/src/components/gridHook/index.ts +1 -1
- package/src/components/gridHook/useGridContextMenu.tsx +7 -7
- package/src/components/gridPopoverEdit/GridButton.tsx +13 -12
- package/src/components/gridPopoverEdit/GridEditBoolean.tsx +19 -18
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +7 -6
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +7 -6
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +9 -9
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +8 -7
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +6 -6
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +4 -4
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +4 -4
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +4 -4
- package/src/components/gridPopoverEdit/index.ts +11 -11
- package/src/components/gridRender/GridRenderGenericCell.tsx +5 -5
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +8 -9
- package/src/components/gridRender/index.ts +2 -2
- package/src/components/gridUtil.ts +3 -3
- package/src/components/index.ts +19 -19
- package/src/contexts/GridContext.tsx +52 -46
- package/src/contexts/GridContextProvider.test.tsx +14 -14
- package/src/contexts/GridContextProvider.tsx +42 -41
- package/src/contexts/GridPopoverContext.tsx +10 -7
- package/src/contexts/GridPopoverContextProvider.tsx +12 -10
- package/src/contexts/GridSubComponentContext.ts +6 -5
- package/src/contexts/GridUpdatingContext.tsx +5 -4
- package/src/contexts/GridUpdatingContextProvider.tsx +3 -3
- package/src/index.ts +17 -21
- package/src/lui/ActionButton.tsx +42 -41
- package/src/lui/FormError.tsx +4 -4
- package/src/lui/TextAreaInput.tsx +9 -9
- package/src/lui/TextInputFormatted.tsx +11 -11
- package/src/lui/reactUtils.test.tsx +8 -8
- package/src/lui/reactUtils.tsx +2 -2
- package/src/lui/stateDeferredHook.tsx +3 -5
- package/src/lui/timeoutHook.test.tsx +5 -5
- package/src/lui/timeoutHook.tsx +1 -1
- package/src/react-app-env.d.ts +1 -1
- package/src/react-menu3/components/ControlledMenu.tsx +48 -48
- package/src/react-menu3/components/FocusableItem.tsx +7 -7
- package/src/react-menu3/components/Menu.tsx +11 -11
- package/src/react-menu3/components/MenuButton.tsx +4 -4
- package/src/react-menu3/components/MenuDivider.tsx +4 -4
- package/src/react-menu3/components/MenuGroup.tsx +5 -5
- package/src/react-menu3/components/MenuHeader.tsx +4 -4
- package/src/react-menu3/components/MenuItem.tsx +14 -14
- package/src/react-menu3/components/MenuList.tsx +55 -55
- package/src/react-menu3/components/MenuRadioGroup.tsx +7 -7
- package/src/react-menu3/components/SubMenu.tsx +24 -24
- package/src/react-menu3/contexts/EventHandlersContext.ts +2 -2
- package/src/react-menu3/contexts/HoverItemContext.ts +1 -1
- package/src/react-menu3/contexts/ItemSettingsContext.ts +1 -1
- package/src/react-menu3/contexts/MenuListContext.ts +2 -2
- package/src/react-menu3/contexts/MenuListItemContext.ts +2 -2
- package/src/react-menu3/contexts/RadioGroupContext.ts +2 -2
- package/src/react-menu3/contexts/SettingsContext.ts +2 -2
- package/src/react-menu3/hooks/index.ts +9 -9
- package/src/react-menu3/hooks/useBEM.ts +4 -4
- package/src/react-menu3/hooks/useCombinedRef.ts +2 -2
- package/src/react-menu3/hooks/useIsomorphicLayoutEffect.ts +4 -4
- package/src/react-menu3/hooks/useItemEffect.ts +3 -3
- package/src/react-menu3/hooks/useItemState.ts +5 -5
- package/src/react-menu3/hooks/useItems.ts +8 -8
- package/src/react-menu3/hooks/useMenuChange.ts +3 -3
- package/src/react-menu3/hooks/useMenuState.ts +5 -5
- package/src/react-menu3/hooks/useMenuStateAndFocus.ts +4 -4
- package/src/react-menu3/index.ts +11 -11
- package/src/react-menu3/positionUtils/getPositionHelpers.ts +2 -2
- package/src/react-menu3/positionUtils/index.ts +3 -3
- package/src/react-menu3/positionUtils/placeArrowHorizontal.ts +1 -1
- package/src/react-menu3/positionUtils/placeArrowVertical.ts +1 -1
- package/src/react-menu3/positionUtils/placeLeftorRight.ts +13 -13
- package/src/react-menu3/positionUtils/placeToporBottom.ts +15 -15
- package/src/react-menu3/positionUtils/positionContextMenu.ts +4 -4
- package/src/react-menu3/positionUtils/positionMenu.ts +14 -14
- package/src/react-menu3/style-utils/index.ts +24 -24
- package/src/react-menu3/types.ts +15 -15
- package/src/react-menu3/utils/constants.ts +33 -33
- package/src/react-menu3/utils/index.ts +3 -4
- package/src/react-menu3/utils/propTypes2.ts +10 -10
- package/src/react-menu3/utils/utils.ts +14 -14
- package/src/react-menu3/utils/withHovering.tsx +3 -3
- package/src/stories/components/ActionButton.stories.tsx +23 -24
- package/src/stories/grid/FormTest.tsx +15 -16
- package/src/stories/grid/GridDragRow.stories.tsx +33 -34
- package/src/stories/grid/GridFilterButtons.stories.tsx +32 -33
- package/src/stories/grid/GridNoRowsOverlay.stories.tsx +9 -10
- package/src/stories/grid/GridNonEditableRow.stories.tsx +40 -41
- package/src/stories/grid/GridPinnedRow.stories.tsx +25 -26
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +33 -32
- package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +21 -22
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +18 -19
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +50 -49
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +25 -26
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +93 -94
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +62 -63
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +28 -28
- package/src/stories/grid/GridReadOnly.stories.tsx +66 -67
- package/src/stories/grid/GridViewList.stories.tsx +37 -38
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +37 -38
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +25 -26
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +25 -26
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +31 -31
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +47 -48
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +44 -45
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +19 -20
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +21 -22
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +40 -41
- package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +14 -15
- package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +14 -15
- package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +10 -11
- package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +20 -21
- package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +16 -17
- package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +13 -14
- package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +13 -14
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +68 -71
- package/src/stories/react-menu/ReactMenu.stories.tsx +26 -26
- package/src/utils/bearing.test.ts +44 -44
- package/src/utils/bearing.ts +20 -20
- package/src/utils/deferredPromise.ts +1 -1
- package/src/utils/storybookTestUtil.ts +2 -2
- package/src/utils/testQuick.ts +15 -14
- package/src/utils/testUtil.ts +31 -36
- package/src/utils/textMatcher.test.ts +9 -9
- package/src/utils/textMatcher.ts +8 -8
- package/src/utils/textValidator.test.ts +56 -56
- package/src/utils/textValidator.ts +11 -11
- package/src/utils/util.test.ts +20 -20
- package/src/utils/util.ts +7 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useCallback, useMemo, useState } from
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { useGridPopoverContext } from
|
|
4
|
-
import { TextInputFormatted } from
|
|
5
|
-
import { TextInputValidator, TextInputValidatorProps } from
|
|
6
|
-
import { GridBaseRow } from
|
|
7
|
-
import { CellEditorCommon } from
|
|
8
|
-
import { useGridPopoverHook } from
|
|
3
|
+
import { useGridPopoverContext } from '../../contexts/GridPopoverContext';
|
|
4
|
+
import { TextInputFormatted } from '../../lui/TextInputFormatted';
|
|
5
|
+
import { TextInputValidator, TextInputValidatorProps } from '../../utils/textValidator';
|
|
6
|
+
import { GridBaseRow } from '../Grid';
|
|
7
|
+
import { CellEditorCommon } from '../GridCell';
|
|
8
|
+
import { useGridPopoverHook } from '../GridPopoverHook';
|
|
9
9
|
|
|
10
10
|
export interface GridFormTextInputProps<TData extends GridBaseRow>
|
|
11
11
|
extends TextInputValidatorProps<TData>,
|
|
@@ -20,9 +20,9 @@ export interface GridFormTextInputProps<TData extends GridBaseRow>
|
|
|
20
20
|
export const GridFormTextInput = <TData extends GridBaseRow>(props: GridFormTextInputProps<TData>) => {
|
|
21
21
|
const { field, value: initialVale, data } = useGridPopoverContext<TData>();
|
|
22
22
|
|
|
23
|
-
const helpText = props.helpText ??
|
|
23
|
+
const helpText = props.helpText ?? 'Press enter or tab to save';
|
|
24
24
|
|
|
25
|
-
const initValue = useMemo(() => (initialVale == null ?
|
|
25
|
+
const initValue = useMemo(() => (initialVale == null ? '' : `${initialVale}`), [initialVale]);
|
|
26
26
|
const [value, setValue] = useState(initValue);
|
|
27
27
|
|
|
28
28
|
const invalid = useCallback(() => TextInputValidator<TData>(props, value, data, {}), [data, props, value]);
|
|
@@ -51,14 +51,14 @@ export const GridFormTextInput = <TData extends GridBaseRow>(props: GridFormText
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
return popoverWrapper(
|
|
54
|
-
<div style={{ display:
|
|
54
|
+
<div style={{ display: 'flex', flexDirection: 'row' }} className={'FormTest subComponent'}>
|
|
55
55
|
<TextInputFormatted
|
|
56
56
|
value={value}
|
|
57
57
|
onChange={(e) => setValue(e.target.value)}
|
|
58
58
|
error={invalid()}
|
|
59
59
|
formatted={props.units}
|
|
60
60
|
style={{ width: props.width ?? 240 }}
|
|
61
|
-
placeholder={props.placeholder ??
|
|
61
|
+
placeholder={props.placeholder ?? 'Type here'}
|
|
62
62
|
helpText={helpText}
|
|
63
63
|
/>
|
|
64
64
|
</div>,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
1
|
+
export * from './GridFormDropDown';
|
|
2
|
+
export * from './GridFormEditBearing';
|
|
3
|
+
export * from './GridFormMessage';
|
|
4
|
+
export * from './GridFormMultiSelect';
|
|
5
|
+
export * from './GridFormMultiSelectGrid';
|
|
6
|
+
export * from './GridFormPopoverMenu';
|
|
7
|
+
export * from './GridFormSubComponentTextArea';
|
|
8
|
+
export * from './GridFormSubComponentTextInput';
|
|
9
|
+
export * from './GridFormTextArea';
|
|
10
|
+
export * from './GridFormTextInput';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IHeaderParams } from
|
|
2
|
-
import clsx from
|
|
3
|
-
import { useEffect, useState } from
|
|
1
|
+
import { IHeaderParams } from 'ag-grid-community';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* AgGrid's existing select header doesn't work the way we want.
|
|
@@ -17,9 +17,9 @@ export const GridHeaderSelect = ({ api }: IHeaderParams) => {
|
|
|
17
17
|
setUpdateCounter(updateCounter + 1);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
api.addEventListener(
|
|
20
|
+
api.addEventListener('selectionChanged', clickHandler);
|
|
21
21
|
return () => {
|
|
22
|
-
!api.isDestroyed() && api.removeEventListener(
|
|
22
|
+
!api.isDestroyed() && api.removeEventListener('selectionChanged', clickHandler);
|
|
23
23
|
};
|
|
24
24
|
}, [api, updateCounter]);
|
|
25
25
|
|
|
@@ -38,15 +38,15 @@ export const GridHeaderSelect = ({ api }: IHeaderParams) => {
|
|
|
38
38
|
return (
|
|
39
39
|
<div
|
|
40
40
|
className={clsx(
|
|
41
|
-
|
|
42
|
-
partialSelect &&
|
|
43
|
-
allSelected &&
|
|
41
|
+
'ag-wrapper ag-input-wrapper ag-checkbox-input-wrapper',
|
|
42
|
+
partialSelect && 'ag-indeterminate',
|
|
43
|
+
allSelected && 'ag-checked',
|
|
44
44
|
)}
|
|
45
45
|
onClick={handleMultiSelect}
|
|
46
46
|
>
|
|
47
47
|
<input
|
|
48
48
|
type="checkbox"
|
|
49
|
-
className={
|
|
49
|
+
className={'ag-checkbox-input-wrapper'}
|
|
50
50
|
onChange={() => {
|
|
51
51
|
/* do nothing */
|
|
52
52
|
}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './GridHeaderSelect';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './useGridContextMenu';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ColDef } from
|
|
2
|
-
import { CellContextMenuEvent } from
|
|
3
|
-
import { ReactElement, useCallback, useContext, useRef, useState } from
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
import { CellContextMenuEvent } from 'ag-grid-community';
|
|
3
|
+
import { ReactElement, useCallback, useContext, useRef, useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import { GridContext } from
|
|
6
|
-
import { ControlledMenu } from
|
|
7
|
-
import { GridBaseRow } from
|
|
5
|
+
import { GridContext } from '../../contexts/GridContext';
|
|
6
|
+
import { ControlledMenu } from '../../react-menu3';
|
|
7
|
+
import { GridBaseRow } from '../Grid';
|
|
8
8
|
|
|
9
9
|
export interface GridContextMenuComponentProps<TData extends GridBaseRow> {
|
|
10
10
|
selectedRows: TData[];
|
|
@@ -73,7 +73,7 @@ export const useGridContextMenu = <TData extends GridBaseRow>({
|
|
|
73
73
|
<>
|
|
74
74
|
<ControlledMenu
|
|
75
75
|
anchorPoint={anchorPoint}
|
|
76
|
-
state={isOpen ?
|
|
76
|
+
state={isOpen ? 'open' : 'closed'}
|
|
77
77
|
direction="right"
|
|
78
78
|
onClose={closeMenu}
|
|
79
79
|
>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { LuiButton, LuiIcon } from '@linzjs/lui';
|
|
2
|
+
import { CellFocusedEvent, ICellEditorParams } from 'ag-grid-community';
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
|
|
5
|
+
import { GridBaseRow } from '../Grid';
|
|
6
|
+
import { ColDefT, GridCell, SAICellRendererParams } from '../GridCell';
|
|
7
|
+
import { GenericCellColDef } from '../gridRender';
|
|
7
8
|
|
|
8
9
|
const ButtonCellRenderer = <TData extends GridBaseRow>(props: SAICellRendererParams<TData>) => {
|
|
9
10
|
const { data, node, column, colDef, api } = props;
|
|
@@ -15,9 +16,9 @@ const ButtonCellRenderer = <TData extends GridBaseRow>(props: SAICellRendererPar
|
|
|
15
16
|
inputRef.current?.focus();
|
|
16
17
|
}
|
|
17
18
|
};
|
|
18
|
-
api.addEventListener(
|
|
19
|
+
api.addEventListener('cellFocused', checkFocus);
|
|
19
20
|
return () => {
|
|
20
|
-
api.removeEventListener(
|
|
21
|
+
api.removeEventListener('cellFocused', checkFocus);
|
|
21
22
|
};
|
|
22
23
|
}, [api, column, node.rowIndex]);
|
|
23
24
|
|
|
@@ -32,7 +33,7 @@ const ButtonCellRenderer = <TData extends GridBaseRow>(props: SAICellRendererPar
|
|
|
32
33
|
const selectedRowIds = selectedRows.map((r) => r.id);
|
|
33
34
|
colDef?.cellEditorParams.onClick?.({ selectedRows, selectedRowIds });
|
|
34
35
|
}}
|
|
35
|
-
style={{ display: colDef?.cellEditorParams?.visible?.(props) !== false ?
|
|
36
|
+
style={{ display: colDef?.cellEditorParams?.visible?.(props) !== false ? '' : 'none' }}
|
|
36
37
|
>
|
|
37
38
|
<LuiIcon name="ic_redo" alt="revert" size="md" />
|
|
38
39
|
</LuiButton>
|
|
@@ -41,7 +42,7 @@ const ButtonCellRenderer = <TData extends GridBaseRow>(props: SAICellRendererPar
|
|
|
41
42
|
|
|
42
43
|
export interface GridButtonProps<TData extends GridBaseRow> {
|
|
43
44
|
visible?: (cellEditorParams: ICellEditorParams) => boolean;
|
|
44
|
-
onClick?: (props: { selectedRows: TData[]; selectedRowIds: TData[
|
|
45
|
+
onClick?: (props: { selectedRows: TData[]; selectedRowIds: TData['id'][] }) => void;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export const GridButton = <TData extends GridBaseRow>(
|
|
@@ -52,8 +53,8 @@ export const GridButton = <TData extends GridBaseRow>(
|
|
|
52
53
|
minWidth: 72,
|
|
53
54
|
maxWidth: 72,
|
|
54
55
|
resizable: false,
|
|
55
|
-
headerClass:
|
|
56
|
-
cellClass:
|
|
56
|
+
headerClass: 'GridHeaderAlignCenter',
|
|
57
|
+
cellClass: 'GridCellAlignCenter',
|
|
57
58
|
cellRenderer: ButtonCellRenderer,
|
|
58
59
|
cellEditorParams: {
|
|
59
60
|
...editor,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { CellFocusedEvent } from
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { CellFocusedEvent } from 'ag-grid-community';
|
|
2
|
+
import { CustomCellEditorProps } from 'ag-grid-react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
5
|
+
|
|
6
|
+
import { fnOrVar } from '../../utils/util';
|
|
7
|
+
import { clickInputWhenContainingCellClicked } from '../clickInputWhenContainingCellClicked';
|
|
8
|
+
import { GridBaseRow } from '../Grid';
|
|
9
|
+
import { CellEditorCommon, ColDefT, GridCell } from '../GridCell';
|
|
10
|
+
import { GenericCellColDef } from '../gridRender';
|
|
10
11
|
|
|
11
12
|
const BooleanCellRenderer = (props: CustomCellEditorProps) => {
|
|
12
13
|
const { onValueChange, value, api, node, column, colDef, data } = props;
|
|
@@ -18,9 +19,9 @@ const BooleanCellRenderer = (props: CustomCellEditorProps) => {
|
|
|
18
19
|
inputRef.current?.focus();
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
api.addEventListener(
|
|
22
|
+
api.addEventListener('cellFocused', checkFocus);
|
|
22
23
|
return () => {
|
|
23
|
-
api.removeEventListener(
|
|
24
|
+
api.removeEventListener('cellFocused', checkFocus);
|
|
24
25
|
};
|
|
25
26
|
}, [api, column, node.rowIndex]);
|
|
26
27
|
|
|
@@ -28,9 +29,9 @@ const BooleanCellRenderer = (props: CustomCellEditorProps) => {
|
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<div
|
|
31
|
-
className={clsx(
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
className={clsx('ag-wrapper ag-input-wrapper ag-checkbox-input-wrapper', {
|
|
33
|
+
'ag-checked': props.value,
|
|
34
|
+
'ag-disabled': isDisabled,
|
|
34
35
|
})}
|
|
35
36
|
>
|
|
36
37
|
<input
|
|
@@ -58,7 +59,7 @@ const BooleanCellRenderer = (props: CustomCellEditorProps) => {
|
|
|
58
59
|
|
|
59
60
|
const checked = !value;
|
|
60
61
|
onValueChange(checked);
|
|
61
|
-
params.onClick({ selectedRows, selectedRowIds: selectedRows.map((r) => r.id), checked })
|
|
62
|
+
void params.onClick({ selectedRows, selectedRowIds: selectedRows.map((r) => r.id), checked });
|
|
62
63
|
}}
|
|
63
64
|
/>
|
|
64
65
|
</div>
|
|
@@ -66,7 +67,7 @@ const BooleanCellRenderer = (props: CustomCellEditorProps) => {
|
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
export interface GridEditBooleanEditorProps<TData extends GridBaseRow> extends CellEditorCommon {
|
|
69
|
-
onClick: (props: { selectedRows: TData[]; selectedRowIds: TData[
|
|
70
|
+
onClick: (props: { selectedRows: TData[]; selectedRowIds: TData['id'][]; checked: boolean }) => Promise<boolean>;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
export const GridEditBoolean = <TData extends GridBaseRow>(
|
|
@@ -83,8 +84,8 @@ export const GridEditBoolean = <TData extends GridBaseRow>(
|
|
|
83
84
|
singleClickEdit: true,
|
|
84
85
|
resizable: false,
|
|
85
86
|
editable: true,
|
|
86
|
-
cellClass:
|
|
87
|
-
headerClass:
|
|
87
|
+
cellClass: 'GridCellAlignCenter',
|
|
88
|
+
headerClass: 'GridHeaderAlignCenter',
|
|
88
89
|
...colDef,
|
|
89
90
|
});
|
|
90
91
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import clsx from
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
3
|
+
import { GridBaseRow } from '../Grid';
|
|
4
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
5
|
+
import { GridFormMultiSelect, GridFormMultiSelectProps } from '../gridForm/GridFormMultiSelect';
|
|
6
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
6
7
|
|
|
7
8
|
export const GridPopoutEditMultiSelect = <TData extends GridBaseRow, TValue = any>(
|
|
8
9
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -13,6 +14,6 @@ export const GridPopoutEditMultiSelect = <TData extends GridBaseRow, TValue = an
|
|
|
13
14
|
...props,
|
|
14
15
|
editorParams: {
|
|
15
16
|
...(props.editorParams as GridFormMultiSelectProps<TData>),
|
|
16
|
-
className: clsx(
|
|
17
|
+
className: clsx('GridMultiSelect-containerMedium', props.editorParams?.className),
|
|
17
18
|
},
|
|
18
19
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import clsx from
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
3
|
+
import { GridBaseRow } from '../Grid';
|
|
4
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
5
|
+
import { GridFormMultiSelectGrid, GridFormMultiSelectGridProps } from '../gridForm/GridFormMultiSelectGrid';
|
|
6
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
6
7
|
|
|
7
8
|
export const GridPopoutEditMultiSelectGrid = <TData extends GridBaseRow, TValue = any>(
|
|
8
9
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -13,6 +14,6 @@ export const GridPopoutEditMultiSelectGrid = <TData extends GridBaseRow, TValue
|
|
|
13
14
|
...props,
|
|
14
15
|
editorParams: {
|
|
15
16
|
...(props.editorParams as GridFormMultiSelectGridProps<TData>),
|
|
16
|
-
className: clsx(
|
|
17
|
+
className: clsx('GridMultiSelect-containerMedium', props.editorParams?.className),
|
|
17
18
|
},
|
|
18
19
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ValueFormatterParams } from
|
|
1
|
+
import { ValueFormatterParams } from 'ag-grid-community';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
bearingCorrectionRangeValidator,
|
|
5
5
|
bearingCorrectionValueFormatter,
|
|
6
6
|
bearingRangeValidator,
|
|
7
7
|
bearingValueFormatter,
|
|
8
|
-
} from
|
|
9
|
-
import { GridBaseRow } from
|
|
10
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from
|
|
11
|
-
import { GridFormEditBearing, GridFormEditBearingProps } from
|
|
12
|
-
import { GenericCellColDef } from
|
|
8
|
+
} from '../../utils/bearing';
|
|
9
|
+
import { GridBaseRow } from '../Grid';
|
|
10
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
11
|
+
import { GridFormEditBearing, GridFormEditBearingProps } from '../gridForm/GridFormEditBearing';
|
|
12
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
13
13
|
|
|
14
14
|
const GridPopoverEditBearingLike = <TData extends GridBaseRow, TValue = any>(
|
|
15
15
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -19,7 +19,7 @@ const GridPopoverEditBearingLike = <TData extends GridBaseRow, TValue = any>(
|
|
|
19
19
|
): ColDefT<TData, TValue> =>
|
|
20
20
|
GridCell<TData, TValue, GridFormEditBearingProps<TData>>(
|
|
21
21
|
{
|
|
22
|
-
valueFormatter: (params: ValueFormatterParams) => props.editorParams?.formatValue(params.value) ??
|
|
22
|
+
valueFormatter: (params: ValueFormatterParams) => props.editorParams?.formatValue(params.value) ?? '',
|
|
23
23
|
...colDef,
|
|
24
24
|
},
|
|
25
25
|
{
|
|
@@ -29,7 +29,7 @@ const GridPopoverEditBearingLike = <TData extends GridBaseRow, TValue = any>(
|
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
export const GridPopoverEditBearingEditorParams = {
|
|
32
|
-
placeHolder:
|
|
32
|
+
placeHolder: 'Enter bearing',
|
|
33
33
|
formatValue: bearingValueFormatter,
|
|
34
34
|
range: bearingRangeValidator,
|
|
35
35
|
};
|
|
@@ -47,7 +47,7 @@ export const GridPopoverEditBearing = <TData extends GridBaseRow, TValue = any>(
|
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
export const GridPopoverEditBearingCorrectionEditorParams = {
|
|
50
|
-
placeHolder:
|
|
50
|
+
placeHolder: 'Enter bearing correction',
|
|
51
51
|
formatValue: bearingCorrectionValueFormatter,
|
|
52
52
|
range: bearingCorrectionRangeValidator,
|
|
53
53
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import clsx from
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
3
|
+
import { GridBaseRow } from '../Grid';
|
|
4
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
5
|
+
import { GridFormDropDown, GridFormDropDownProps } from '../gridForm/GridFormDropDown';
|
|
6
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
6
7
|
|
|
7
8
|
export const GridPopoverEditDropDown = <TData extends GridBaseRow, TValue = any>(
|
|
8
9
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -15,8 +16,8 @@ export const GridPopoverEditDropDown = <TData extends GridBaseRow, TValue = any>
|
|
|
15
16
|
...(props.editorParams as GridFormDropDownProps<TData, TValue>),
|
|
16
17
|
className: clsx(
|
|
17
18
|
{
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
'GridPopoverEditDropDown-containerLarge': !props.editorParams?.className?.includes(
|
|
20
|
+
'GridPopoverEditDropDown-container',
|
|
20
21
|
),
|
|
21
22
|
},
|
|
22
23
|
props.editorParams?.className,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GridBaseRow } from
|
|
2
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from
|
|
3
|
-
import { GridFormPopoverMenu, GridFormPopoverMenuProps } from
|
|
4
|
-
import { GenericCellColDef } from
|
|
5
|
-
import { GridRenderPopoutMenuCell } from
|
|
1
|
+
import { GridBaseRow } from '../Grid';
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
3
|
+
import { GridFormPopoverMenu, GridFormPopoverMenuProps } from '../gridForm/GridFormPopoverMenu';
|
|
4
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
5
|
+
import { GridRenderPopoutMenuCell } from '../gridRender/GridRenderPopoutMenuCell';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Popout burger menu
|
|
@@ -19,7 +19,7 @@ export const GridPopoverMenu = <TData extends GridBaseRow>(
|
|
|
19
19
|
sortable: false,
|
|
20
20
|
editable: colDef.editable != null ? colDef.editable : true,
|
|
21
21
|
exportable: false,
|
|
22
|
-
cellStyle: { flex: 1, justifyContent:
|
|
22
|
+
cellStyle: { flex: 1, justifyContent: 'center' },
|
|
23
23
|
cellRenderer: GridRenderPopoutMenuCell,
|
|
24
24
|
...colDef,
|
|
25
25
|
cellRendererParams: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GridBaseRow } from
|
|
2
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from
|
|
3
|
-
import { GridFormMessage, GridFormMessageProps } from
|
|
4
|
-
import { GenericCellColDef } from
|
|
1
|
+
import { GridBaseRow } from '../Grid';
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
3
|
+
import { GridFormMessage, GridFormMessageProps } from '../gridForm/GridFormMessage';
|
|
4
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
5
5
|
|
|
6
6
|
export const GridPopoverMessage = <TData extends GridBaseRow, TValue = any>(
|
|
7
7
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GridBaseRow } from
|
|
2
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from
|
|
3
|
-
import { GridFormTextArea, GridFormTextAreaProps } from
|
|
4
|
-
import { GenericCellColDef } from
|
|
1
|
+
import { GridBaseRow } from '../Grid';
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
3
|
+
import { GridFormTextArea, GridFormTextAreaProps } from '../gridForm/GridFormTextArea';
|
|
4
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
5
5
|
|
|
6
6
|
export const GridPopoverTextArea = <TData extends GridBaseRow, TValue = any>(
|
|
7
7
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GridBaseRow } from
|
|
2
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from
|
|
3
|
-
import { GridFormTextInput, GridFormTextInputProps } from
|
|
4
|
-
import { GenericCellColDef } from
|
|
1
|
+
import { GridBaseRow } from '../Grid';
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell';
|
|
3
|
+
import { GridFormTextInput, GridFormTextInputProps } from '../gridForm/GridFormTextInput';
|
|
4
|
+
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
|
|
5
5
|
|
|
6
6
|
export const GridPopoverTextInput = <TData extends GridBaseRow, TValue = any>(
|
|
7
7
|
colDef: GenericCellColDef<TData, TValue>,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
1
|
+
export * from './GridButton';
|
|
2
|
+
export * from './GridEditBoolean';
|
|
3
|
+
export * from './GridPopoutEditMultiSelect';
|
|
4
|
+
export * from './GridPopoutEditMultiSelectGrid';
|
|
5
|
+
export * from './GridPopoverEditBearing';
|
|
6
|
+
export * from './GridPopoverEditBearing';
|
|
7
|
+
export * from './GridPopoverEditDropDown';
|
|
8
|
+
export * from './GridPopoverMenu';
|
|
9
|
+
export * from './GridPopoverMessage';
|
|
10
|
+
export * from './GridPopoverTextArea';
|
|
11
|
+
export * from './GridPopoverTextInput';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ICellRendererParams } from
|
|
2
|
-
import { SuppressKeyboardEventParams } from
|
|
3
|
-
import { ReactElement } from
|
|
1
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
import { SuppressKeyboardEventParams } from 'ag-grid-community';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
4
|
|
|
5
|
-
import { GridBaseRow } from
|
|
6
|
-
import { ColDefT } from
|
|
5
|
+
import { GridBaseRow } from '../Grid';
|
|
6
|
+
import { ColDefT } from '../GridCell';
|
|
7
7
|
|
|
8
8
|
export interface GenericCellColDef<TData extends GridBaseRow, TValue = any> extends ColDefT<TData, TValue> {
|
|
9
9
|
exportable?: boolean;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { LuiIcon } from '@linzjs/lui';
|
|
2
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { fnOrVar } from "../../utils/util";
|
|
5
|
+
import { fnOrVar } from '../../utils/util';
|
|
7
6
|
|
|
8
7
|
export const GridRenderPopoutMenuCell = (props: ICellRendererParams) => {
|
|
9
8
|
const disabled = !fnOrVar(props.colDef?.editable, props);
|
|
10
9
|
|
|
11
10
|
return (
|
|
12
11
|
<LuiIcon
|
|
13
|
-
name={
|
|
14
|
-
alt={
|
|
15
|
-
size={
|
|
16
|
-
className={clsx(
|
|
12
|
+
name={'ic_more_vert'}
|
|
13
|
+
alt={'More actions'}
|
|
14
|
+
size={'md'}
|
|
15
|
+
className={clsx('GridPopoutMenu-burger', disabled && 'GridPopoutMenu-burgerDisabled')}
|
|
17
16
|
/>
|
|
18
17
|
);
|
|
19
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './GridRenderGenericCell';
|
|
2
|
+
export * from './GridRenderPopoutMenuCell';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ColDef } from
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
2
|
|
|
3
|
-
import { isGridCellFiller } from
|
|
3
|
+
import { isGridCellFiller } from './GridCellFiller';
|
|
4
4
|
|
|
5
|
-
export const getColId = (colDef: ColDef): string => colDef.colId ??
|
|
5
|
+
export const getColId = (colDef: ColDef): string => colDef.colId ?? '';
|
|
6
6
|
export const isFlexColumn = (colDef: ColDef): boolean => !!colDef.flex && !isGridCellFiller(colDef);
|
package/src/components/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
1
|
+
export * from './clickInputWhenContainingCellClicked';
|
|
2
|
+
export * from './ComponentLoadingWrapper';
|
|
3
|
+
export * from './Grid';
|
|
4
|
+
export * from './GridCell';
|
|
5
|
+
export * from './GridCellFiller';
|
|
6
|
+
export * from './GridCellMultiEditor';
|
|
7
|
+
export * from './GridCellMultiSelectClassRules';
|
|
8
|
+
export * from './gridFilter';
|
|
9
|
+
export * from './gridForm';
|
|
10
|
+
export * from './gridHeader';
|
|
11
|
+
export * from './gridHook';
|
|
12
|
+
export * from './GridIcon';
|
|
13
|
+
export * from './GridLoadableCell';
|
|
14
|
+
export * from './GridNoRowsOverlay';
|
|
15
|
+
export * from './gridPopoverEdit';
|
|
16
|
+
export * from './GridPopoverHook';
|
|
17
|
+
export * from './gridRender';
|
|
18
|
+
export * from './GridWrapper';
|
|
19
|
+
export * from './PostSortRowsHook';
|