@linzjs/step-ag-grid 22.2.5 → 23.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/README.md CHANGED
@@ -221,7 +221,6 @@ To exclude a column from CSV download add ```export: false``` to the GridCell de
221
221
 
222
222
  ## Writing tests
223
223
 
224
-
225
224
  The following testing calls can be imported from step-ag-grid:
226
225
 
227
226
  - findRow
@@ -1,5 +1,5 @@
1
1
  @use "@linzjs/lui/dist/scss/Core" as lui;
2
- @use "node_modules/ag-grid-community/styles" as ag;
2
+ @use "ag-grid-community/styles" as ag;
3
3
 
4
4
  // ag-grid likes to add 1px to this, so we subtract to compensate
5
5
  $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
@@ -900,7 +900,7 @@ const updateState = (status, setState, latestState, timeoutId, onChange) => {
900
900
  current: state
901
901
  });
902
902
  };
903
- const useTransition = ({
903
+ const useTransitionState = ({
904
904
  enter = true,
905
905
  exit = true,
906
906
  preEnter,
@@ -954,7 +954,7 @@ const useMenuState = (props) => {
954
954
  const { initialMounted, unmountOnClose, transition, transitionTimeout } = props ?? {
955
955
  transition: false,
956
956
  };
957
- const [state, toggleMenu, endTransition] = useTransition({
957
+ const [state, toggleMenu, endTransition] = useTransitionState({
958
958
  mountOnEnter: !initialMounted,
959
959
  unmountOnExit: unmountOnClose,
960
960
  timeout: transitionTimeout ?? 500,
@@ -3240,9 +3240,9 @@ var dist = function debounce(fn) {
3240
3240
  var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3241
3241
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3242
3242
 
3243
- var lastCallAt = void 0;
3244
- var deferred = void 0;
3245
- var timer = void 0;
3243
+ var lastCallAt = undefined;
3244
+ var deferred = undefined;
3245
+ var timer = undefined;
3246
3246
  var pendingArgs = [];
3247
3247
  return function debounced() {
3248
3248
  var currentWait = getWait(wait);
@@ -3324,7 +3324,7 @@ const GridSubComponentContext = React.createContext({
3324
3324
  });
3325
3325
 
3326
3326
  function styleInject(css, ref) {
3327
- if ( ref === void 0 ) ref = {};
3327
+ if ( ref === undefined ) ref = {};
3328
3328
  var insertAt = ref.insertAt;
3329
3329
 
3330
3330
  if (!css || typeof document === 'undefined') { return; }
@@ -3350,11 +3350,11 @@ function styleInject(css, ref) {
3350
3350
  }
3351
3351
  }
3352
3352
 
3353
- var css_248z$2 = ".FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}";
3353
+ 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}";
3354
3354
  styleInject(css_248z$2);
3355
3355
 
3356
3356
  const FormError = (props) => {
3357
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props.error && (jsxRuntime.jsx("span", { className: "LuiTextInput-error", style: { paddingLeft: 0 }, children: props.error })), props.helpText && !props.error && jsxRuntime.jsx("span", { className: "FormError-helpText", children: props.helpText })] }));
3357
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props.error && (jsxRuntime.jsxs("div", { className: "FormError", children: [jsxRuntime.jsx(lui.LuiIcon, { alt: "error", name: "ic_error", className: "FormError-text-icon", size: "sm", status: "error" }), jsxRuntime.jsx("span", { className: "FormError-error", children: props.error })] })), props.helpText && !props.error && jsxRuntime.jsx("span", { className: "FormError-helpText", children: props.helpText })] }));
3358
3358
  };
3359
3359
 
3360
3360
  function escapeStringRegexp(string) {
@@ -3735,7 +3735,7 @@ const GridFormDropDown = (props) => {
3735
3735
  })] }) })] }));
3736
3736
  };
3737
3737
 
3738
- var css_248z$1 = ".LuiTextInput.GridLuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
3738
+ var css_248z$1 = ".LuiTextInput.GridLuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#6b6966;line-height:48px;position:absolute;right:14px;top:0}";
3739
3739
  styleInject(css_248z$1);
3740
3740
 
3741
3741
  const TextInputFormatted = (props) => {
@@ -5293,7 +5293,7 @@ const GridUpdatingContextProvider = (props) => {
5293
5293
  return (jsxRuntime.jsx(GridUpdatingContext.Provider, { value: { modifyUpdating, checkUpdating, updatingCols, updatedDep }, children: props.children }));
5294
5294
  };
5295
5295
 
5296
- var css_248z = ".ActionButton{align-items:center;display:flex}.ActionButton-minimal.lui-button-lg.lui-button-icon-right{padding-right:38px}.ActionButton.lui-button-lg.lui-button-icon-right:not(.ActionButton-tight) .LuiIcon{margin:0 4px}.ActionButton.ActionButton-tight.lui-button-lg.lui-button-icon-right .LuiIcon{margin:0}.ActionButton-iconOnly.lui-button-lg.lui-button-icon-right:not(.ActionButton-tight){padding:8px 5px}.ActionButton-iconOnly.lui-button-lg.lui-button-icon-right.ActionButton-tight{padding:0}.ActionButton-minimalArea{position:relative}.ActionButton-minimalAreaDisplay{position:absolute}.ActionButton-minimalAreaExpand{visibility:hidden}.ActionButton-inProgress.lui-button-lg.lui-button-icon-right{background-color:#e2f3f7;color:#007198;cursor:progress}.ActionButton-inProgress.lui-button-lg.lui-button-icon-right svg *{fill:#0000}.ActionButton-fill{justify-content:center;width:100%}";
5296
+ var css_248z = ".ActionButton{align-items:center;display:flex}.ActionButton-inProgress .LuiIcon{visibility:hidden}.ActionButton-minimal.lui-button-lg.lui-button-icon-right{padding-right:38px}.ActionButton.lui-button-lg.lui-button-icon-right:not(.ActionButton-tight) .LuiIcon{margin:0 4px}.ActionButton.ActionButton-tight.lui-button-lg.lui-button-icon-right .LuiIcon{margin:0}.ActionButton-iconOnly.lui-button-lg.lui-button-icon-right:not(.ActionButton-tight){padding:8px 5px}.ActionButton-iconOnly.lui-button-lg.lui-button-icon-right.ActionButton-tight{padding:0}.ActionButton-minimalArea{position:relative}.ActionButton-minimalAreaDisplay{position:absolute}.ActionButton-minimalAreaExpand{visibility:hidden}.ActionButton-inProgress.lui-button-lg.lui-button-icon-right{background-color:#e2f3f7;color:#007198;cursor:progress}.ActionButton-fill{justify-content:center;width:100%}";
5297
5297
  styleInject(css_248z);
5298
5298
 
5299
5299
  /**
@@ -5330,18 +5330,18 @@ const ActionButton = ({ icon, name, inProgressName, disabled, dataTestId, style,
5330
5330
  await promise;
5331
5331
  setInProgress(false);
5332
5332
  }
5333
- }, disabled: localInProgress || disabled, children: [iconPosition === "right" && buttonText, localInProgress ? (jsxRuntime.jsx(lui.LuiMiniSpinner, { size: 16, divProps: {
5334
- "data-testid": "loading-spinner",
5335
- style: {
5336
- margin: 0,
5337
- paddingRight: 5,
5338
- paddingLeft: 3,
5339
- paddingBottom: 0,
5340
- paddingTop: 0,
5341
- },
5342
- role: "status",
5343
- "aria-label": "Loading",
5344
- } })) : (jsxRuntime.jsx(lui.LuiIcon, { name: icon, alt: ariaLabel ?? name ?? "", size: size })), iconPosition === "left" && buttonText] }));
5333
+ }, disabled: localInProgress || disabled, children: [iconPosition === "right" && buttonText, localInProgress && (jsxRuntime.jsx("div", { style: { position: "relative" }, children: jsxRuntime.jsx(lui.LuiMiniSpinner, { size: 14, divProps: {
5334
+ "data-testid": "loading-spinner",
5335
+ style: {
5336
+ position: "absolute",
5337
+ left: 4,
5338
+ top: -10,
5339
+ bottom: 10,
5340
+ right: -4,
5341
+ },
5342
+ role: "status",
5343
+ "aria-label": "Loading",
5344
+ } }) })), jsxRuntime.jsx(lui.LuiIcon, { name: icon, alt: ariaLabel ?? name ?? "", size: size }), iconPosition === "left" && buttonText] }));
5345
5345
  };
5346
5346
 
5347
5347
  const useDeferredPromise = () => {