@linzjs/step-ag-grid 32.4.2 → 32.6.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/gridForm/GridFormTextArea.d.ts +1 -0
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/utils/isChromatic.d.ts +11 -0
- package/dist/step-ag-grid.cjs +40 -12
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +40 -14
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +16 -16
- package/src/components/Grid.tsx +1 -1
- package/src/components/gridForm/GridFormTextArea.tsx +10 -1
- package/src/components/gridForm/GridFormTextInput.tsx +10 -1
- package/src/contexts/GridContextProvider.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/lui/FormError.scss +1 -0
- package/src/stories/components/ActionButton.stories.tsx +0 -1
- package/src/stories/grid/GridCopy.stories.tsx +1 -6
- package/src/stories/grid/GridDragRow.stories.tsx +1 -6
- package/src/stories/grid/GridFilterButtons.stories.tsx +0 -5
- package/src/stories/grid/GridFilterColumnsMultiSelect.stories.tsx +0 -5
- package/src/stories/grid/GridInlineText.stories.tsx +0 -5
- package/src/stories/grid/GridNoRowsOverlay.stories.tsx +0 -5
- package/src/stories/grid/GridNonEditableRow.stories.tsx +0 -5
- package/src/stories/grid/GridPinnedRow.stories.tsx +1 -6
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +0 -5
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +0 -5
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +0 -5
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +0 -5
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +0 -5
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +0 -5
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +0 -5
- package/src/stories/grid/GridReadOnly.stories.tsx +1 -6
- package/src/stories/grid/GridSorting.stories.tsx +1 -6
- package/src/stories/grid/GridViewList.stories.tsx +1 -6
- package/src/stories/grid/GridViewSelectableList.stories.tsx +1 -6
- package/src/stories/grid/gridAutosize/GridAutoSize.stories.tsx +28 -11
- package/src/stories/grid/gridAutosize/GridFitSize.stories.tsx +27 -11
- package/src/stories/grid/gridAutosize/GridFitSizeFlex.stories.tsx +27 -11
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +67 -13
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +69 -15
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +0 -1
- package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +0 -1
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +0 -5
- package/src/utils/isChromatic.tsx +30 -0
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { LuiMiniSpinner, LuiIcon, useShowLUIMessage, LuiStatusSpinner, LuiButtonGroup, LuiButton, LuiCheckboxInput } from '@linzjs/lui';
|
|
2
|
+
import { LuiMiniSpinner, LuiIcon, useShowLUIMessage, LuiStatusSpinner, LuiButtonGroup, LuiButton, LuiCheckboxInput, useFilterCharacters } from '@linzjs/lui';
|
|
3
3
|
import React13, { forwardRef, useContext, useRef, useState, useImperativeHandle, useLayoutEffect, useCallback, useMemo, createContext, memo, useEffect, createElement, Suspense, Component as Component$1, useReducer, cloneElement, Fragment as Fragment$1, useId } from 'react';
|
|
4
4
|
import ReactDOM, { createPortal, unstable_batchedUpdates, flushSync } from 'react-dom';
|
|
5
5
|
import { negate, isEmpty, findIndex, defer, debounce as debounce$1, compact, xorBy, last, difference, omit, delay, sortBy, partition, pick, groupBy, fromPairs, toPairs, isEqual, pull, filter, sumBy, remove, flatten, castArray } from 'lodash-es';
|
|
@@ -57822,15 +57822,6 @@ var AgGridReact = class extends Component$1 {
|
|
|
57822
57822
|
}
|
|
57823
57823
|
};
|
|
57824
57824
|
|
|
57825
|
-
function isChromatic(windowArgument) {
|
|
57826
|
-
const windowToCheck = (globalThis.window !== undefined && globalThis);
|
|
57827
|
-
return !!(
|
|
57828
|
-
windowToCheck &&
|
|
57829
|
-
(/Chromatic/.test(windowToCheck.navigator.userAgent) ||
|
|
57830
|
-
/chromatic=true/.test(windowToCheck.location.href))
|
|
57831
|
-
);
|
|
57832
|
-
}
|
|
57833
|
-
|
|
57834
57825
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
57835
57826
|
|
|
57836
57827
|
const NoContext = () => {
|
|
@@ -57904,6 +57895,29 @@ const GridUpdatingContext = createContext({
|
|
|
57904
57895
|
updatedDep: 0
|
|
57905
57896
|
});
|
|
57906
57897
|
|
|
57898
|
+
function isChromatic$1(windowArgument) {
|
|
57899
|
+
const windowToCheck = (globalThis.window !== undefined && globalThis);
|
|
57900
|
+
return !!(
|
|
57901
|
+
windowToCheck &&
|
|
57902
|
+
(/Chromatic/.test(windowToCheck.navigator.userAgent) ||
|
|
57903
|
+
/chromatic=true/.test(windowToCheck.location.href))
|
|
57904
|
+
);
|
|
57905
|
+
}
|
|
57906
|
+
|
|
57907
|
+
const isChromatic = () => {
|
|
57908
|
+
const forced = window.FORCE_IS_CHROMATIC;
|
|
57909
|
+
return forced ?? isChromatic$1();
|
|
57910
|
+
};
|
|
57911
|
+
const ChromaticAllowGridAutosize = (Story) => {
|
|
57912
|
+
window.FORCE_IS_CHROMATIC = false;
|
|
57913
|
+
useEffect(() => {
|
|
57914
|
+
return () => {
|
|
57915
|
+
delete window.FORCE_IS_CHROMATIC;
|
|
57916
|
+
};
|
|
57917
|
+
}, []);
|
|
57918
|
+
return /* @__PURE__ */ jsx(Story, {});
|
|
57919
|
+
};
|
|
57920
|
+
|
|
57907
57921
|
const isStorybook = window.IS_STORYBOOK;
|
|
57908
57922
|
|
|
57909
57923
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -62704,7 +62718,7 @@ const GridSubComponentContext = createContext({
|
|
|
62704
62718
|
context: null
|
|
62705
62719
|
});
|
|
62706
62720
|
|
|
62707
|
-
var css_248z$2 = ".FormError{display:flex}.FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}.FormError-text-icon{margin-right:4px;margin-top:4px}.FormError-error{align-items:center;color:#2a292c;font-size:14px;font-weight:600;padding-left:0}";
|
|
62721
|
+
var css_248z$2 = ".FormError{display:flex;line-height:24px}.FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}.FormError-text-icon{margin-right:4px;margin-top:4px}.FormError-error{align-items:center;color:#2a292c;font-size:14px;font-weight:600;padding-left:0}";
|
|
62708
62722
|
styleInject(css_248z$2);
|
|
62709
62723
|
|
|
62710
62724
|
const FormError = (props) => {
|
|
@@ -64185,6 +64199,7 @@ const GridFormTextArea = (props) => {
|
|
|
64185
64199
|
const { field, value: initialVale, data } = useGridPopoverContext();
|
|
64186
64200
|
const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64187
64201
|
const [value, setValue] = useState(initValue);
|
|
64202
|
+
const { filterInputEvent } = useFilterCharacters();
|
|
64188
64203
|
const helpText = props.helpText ?? "Press tab to save";
|
|
64189
64204
|
const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [props, value, data]);
|
|
64190
64205
|
const save = useCallback(
|
|
@@ -64210,7 +64225,12 @@ const GridFormTextArea = (props) => {
|
|
|
64210
64225
|
TextAreaInput,
|
|
64211
64226
|
{
|
|
64212
64227
|
value,
|
|
64213
|
-
onChange: (e) =>
|
|
64228
|
+
onChange: (e) => {
|
|
64229
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64230
|
+
filterInputEvent(e);
|
|
64231
|
+
}
|
|
64232
|
+
setValue(e.target.value);
|
|
64233
|
+
},
|
|
64214
64234
|
error: invalid(),
|
|
64215
64235
|
placeholder: props.placeholder ?? "Type here",
|
|
64216
64236
|
helpText
|
|
@@ -64224,6 +64244,7 @@ const GridFormTextInput = (props) => {
|
|
|
64224
64244
|
const helpText = props.helpText ?? "Press enter or tab to save";
|
|
64225
64245
|
const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64226
64246
|
const [value, setValue] = useState(initValue);
|
|
64247
|
+
const { filterInputEvent } = useFilterCharacters();
|
|
64227
64248
|
const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [data, props, value]);
|
|
64228
64249
|
const save = useCallback(
|
|
64229
64250
|
async (selectedRows) => {
|
|
@@ -64252,7 +64273,12 @@ const GridFormTextInput = (props) => {
|
|
|
64252
64273
|
TextInputFormatted,
|
|
64253
64274
|
{
|
|
64254
64275
|
value,
|
|
64255
|
-
onChange: (e) =>
|
|
64276
|
+
onChange: (e) => {
|
|
64277
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64278
|
+
filterInputEvent(e);
|
|
64279
|
+
}
|
|
64280
|
+
setValue(e.target.value);
|
|
64281
|
+
},
|
|
64256
64282
|
error: invalid(),
|
|
64257
64283
|
formatted: props.units,
|
|
64258
64284
|
style: { width: props.width ?? 240 },
|
|
@@ -65532,5 +65558,5 @@ const useDeferredPromise = () => {
|
|
|
65532
65558
|
};
|
|
65533
65559
|
};
|
|
65534
65560
|
|
|
65535
|
-
export { ActionButton, CancelPromise, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridButton, GridCell, GridCellBearingValueFormatter, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridEditBoolean, GridFilterButtons, GridFilterColumnsMultiSelect, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormInlineTextInput, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridIcon, GridInlineTextInput, GridLoadableCell, GridNoRowsOverlay, GridNoRowsOverlayFr, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, TextInputValidator, agGridSelectRowColId, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, colStateFlexed, colStateId, colStateNotFlexed, compareNaturalInsensitive, convertDDToDMS, createCheckboxMultiFilterParams, defaultValueFormatter, downloadCsvUseValueFormattersProcessCellCallback, findParentWithClass, fnOrVar, generateFilterGetter, hasParentClass, isFloat, isGridCellFiller, isNotEmpty, primitiveToSelectOption, reorderRows, sanitiseFileName, stringByteLengthIsInvalid, suppressCellKeyboardEvents, textInputValidatorPropsToSummary, textMatch, useDeferredPromise, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait, waitForCondition };
|
|
65561
|
+
export { ActionButton, CancelPromise, ChromaticAllowGridAutosize, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridButton, GridCell, GridCellBearingValueFormatter, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridEditBoolean, GridFilterButtons, GridFilterColumnsMultiSelect, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormInlineTextInput, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridIcon, GridInlineTextInput, GridLoadableCell, GridNoRowsOverlay, GridNoRowsOverlayFr, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, TextInputValidator, agGridSelectRowColId, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, colStateFlexed, colStateId, colStateNotFlexed, compareNaturalInsensitive, convertDDToDMS, createCheckboxMultiFilterParams, defaultValueFormatter, downloadCsvUseValueFormattersProcessCellCallback, findParentWithClass, fnOrVar, generateFilterGetter, hasParentClass, isChromatic, isFloat, isGridCellFiller, isNotEmpty, primitiveToSelectOption, reorderRows, sanitiseFileName, stringByteLengthIsInvalid, suppressCellKeyboardEvents, textInputValidatorPropsToSummary, textMatch, useDeferredPromise, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait, waitForCondition };
|
|
65536
65562
|
//# sourceMappingURL=step-ag-grid.esm.js.map
|