@linzjs/step-ag-grid 18.1.0 → 19.1.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.
@@ -647,12 +647,12 @@ function Bean(beanName) {
647
647
  }
648
648
  function Autowired(name) {
649
649
  return function (target, propertyKey, descriptor) {
650
- autowiredFunc(target, name, false, target, propertyKey, null);
650
+ autowiredFunc(target, name, false, target, propertyKey);
651
651
  };
652
652
  }
653
653
  function Optional(name) {
654
654
  return function (target, propertyKey, descriptor) {
655
- autowiredFunc(target, name, true, target, propertyKey, null);
655
+ autowiredFunc(target, name, true, target, propertyKey);
656
656
  };
657
657
  }
658
658
  function autowiredFunc(target, name, optional, classPrototype, methodOrAttributeName, index) {
@@ -660,10 +660,6 @@ function autowiredFunc(target, name, optional, classPrototype, methodOrAttribute
660
660
  console.error("AG Grid: Autowired name should not be null");
661
661
  return;
662
662
  }
663
- if (typeof index === "number") {
664
- console.error("AG Grid: Autowired should be on an attribute");
665
- return;
666
- }
667
663
  // it's an attribute on the class
668
664
  var props = getOrCreateProps$1(target.constructor);
669
665
  if (!props.agClassAttributes) {
@@ -1261,10 +1257,7 @@ var Column = /** @class */ (function () {
1261
1257
  var colDefAny = this.colDef;
1262
1258
  function warnOnce(msg, key, obj) {
1263
1259
  doOnce(function () {
1264
- if (obj) {
1265
- console.warn(msg, obj);
1266
- }
1267
- else {
1260
+ {
1268
1261
  doOnce(function () { return console.warn(msg); }, key);
1269
1262
  }
1270
1263
  }, key);
@@ -30055,7 +30048,7 @@ var CellComp = /** @class */ (function (_super) {
30055
30048
  _this.forceWrapper = cellCtrl.isForceWrapper();
30056
30049
  _this.refreshWrapper(false);
30057
30050
  var setAttribute = function (name, value, element) {
30058
- var actualElement = element ? element : eGui;
30051
+ var actualElement = eGui;
30059
30052
  if (value != null && value != '') {
30060
30053
  actualElement.setAttribute(name, value);
30061
30054
  }
@@ -31578,7 +31571,7 @@ var HeaderCellComp = /** @class */ (function (_super) {
31578
31571
  var _this = this;
31579
31572
  var eGui = this.getGui();
31580
31573
  var setAttribute = function (name, value, element) {
31581
- var actualElement = element ? element : eGui;
31574
+ var actualElement = eGui;
31582
31575
  if (value != null && value != '') {
31583
31576
  actualElement.setAttribute(name, value);
31584
31577
  }
@@ -51245,44 +51238,48 @@ var AllCommunityModules = [ClientSideRowModelModule, InfiniteRowModelModule, Csv
51245
51238
 
51246
51239
  ModuleRegistry.registerModules(AllCommunityModules);
51247
51240
 
51248
- 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))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
51241
+ 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}
51249
51242
 
51250
- (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
51251
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51252
- return new (P || (P = Promise))(function (resolve, reject) {
51253
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
51254
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51255
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
51256
- step((generator = generator.apply(thisArg, _arguments || [])).next());
51257
- });
51258
- };
51243
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
51259
51244
 
51260
- (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
51261
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51262
- return new (P || (P = Promise))(function (resolve, reject) {
51263
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
51264
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51265
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
51266
- step((generator = generator.apply(thisArg, _arguments || [])).next());
51267
- });
51268
- };
51245
+ function getDefaultExportFromCjs (x) {
51246
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
51247
+ }
51248
+
51249
+ /**
51250
+ * lodash (Custom Build) <https://lodash.com/>
51251
+ * Build: `lodash modularize exports="npm" -o ./`
51252
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
51253
+ * Released under MIT license <https://lodash.com/license>
51254
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
51255
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
51256
+ */
51257
+
51258
+ /** Detect free variable `global` from Node.js. */
51259
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
51260
+
51261
+ /** Detect free variable `self`. */
51262
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
51269
51263
 
51264
+ /** Used as a reference to the global object. */
51265
+ freeGlobal || freeSelf || Function('return this')();
51266
+
51267
+ var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
51270
51268
  function useInterval(callback, delay) {
51271
- const savedCallback = React.useRef(callback);
51272
- useIsomorphicLayoutEffect$1(() => {
51273
- savedCallback.current = callback;
51274
- }, [callback]);
51275
- React.useEffect(() => {
51276
- if (!delay && delay !== 0) {
51277
- return;
51278
- }
51279
- const id = setInterval(() => savedCallback.current(), delay);
51280
- return () => clearInterval(id);
51281
- }, [delay]);
51269
+ const savedCallback = React.useRef(callback);
51270
+ useIsomorphicLayoutEffect$1(() => {
51271
+ savedCallback.current = callback;
51272
+ }, [callback]);
51273
+ React.useEffect(() => {
51274
+ const id = setInterval(() => {
51275
+ savedCallback.current();
51276
+ }, delay);
51277
+ return () => {
51278
+ clearInterval(id);
51279
+ };
51280
+ }, [delay]);
51282
51281
  }
51283
51282
 
51284
- const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
51285
-
51286
51283
  const GridContext = React.createContext({
51287
51284
  gridReady: false,
51288
51285
  gridRenderState: () => null,
@@ -53112,10 +53109,12 @@ const ControlledMenuFr = ({ "aria-label": ariaLabel, className, containerProps,
53112
53109
  safeCall(onClose, { key, reason: CloseReason.CLICK });
53113
53110
  },
53114
53111
  }), [onItemClick, onClose]);
53115
- const onKeyDown = ({ key }) => {
53116
- switch (key) {
53112
+ const onKeyUp = (e) => {
53113
+ switch (e.key) {
53117
53114
  case Keys.ESC:
53118
- safeCall(onClose, { key, reason: CloseReason.CANCEL });
53115
+ e.preventDefault();
53116
+ e.stopPropagation();
53117
+ safeCall(onClose, { key: e.key, reason: CloseReason.CANCEL });
53119
53118
  break;
53120
53119
  }
53121
53120
  };
@@ -53138,7 +53137,7 @@ const ControlledMenuFr = ({ "aria-label": ariaLabel, className, containerProps,
53138
53137
  };
53139
53138
  const itemTransition = getTransition(transition, "item");
53140
53139
  const modifiers = React.useMemo(() => ({ theme: theming, itemTransition }), [theming, itemTransition]);
53141
- const menuList = (jsxRuntime.jsx("div", { ...mergeProps({ onKeyDown, onBlur }, containerProps), className: useBEM({
53140
+ const menuList = (jsxRuntime.jsx("div", { ...mergeProps({ onKeyUp, onBlur }, containerProps), className: useBEM({
53142
53141
  block: menuContainerClass,
53143
53142
  modifiers,
53144
53143
  className,
@@ -54290,7 +54289,7 @@ const GridFilterColumnsToggle = ({ saveState = true }) => {
54290
54289
  },
54291
54290
  }, onChange: () => {
54292
54291
  /*Do nothing, change handled by menuItem*/
54293
- } }) }, col.colId))) }), jsxRuntime.jsx(MenuDivider, {}, `$$divider_reset_columns`), jsxRuntime.jsxs(MenuItem, { onClick: (e) => {
54292
+ } }) }, col.colId ?? "no_col_id"))) }), jsxRuntime.jsx(MenuDivider, {}, `$$divider_reset_columns`), jsxRuntime.jsxs(MenuItem, { onClick: (e) => {
54294
54293
  // Global react-menu MenuItem handler handles tabs
54295
54294
  if (e.key !== "Tab") {
54296
54295
  e.keepOpen = e.key !== "Enter";
@@ -54403,10 +54402,6 @@ const GridFilterDownloadCsvButton = (csvExportParams) => {
54403
54402
  } })) : (jsxRuntime.jsx(GridFilterHeaderIconButton, { icon: "ic_csv_file", title: "Download CSV", onClick: handleDownloadClick, disabled: downloading }));
54404
54403
  };
54405
54404
 
54406
- function getDefaultExportFromCjs (x) {
54407
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
54408
- }
54409
-
54410
54405
  /* global setTimeout, clearTimeout */
54411
54406
 
54412
54407
  var dist = function debounce(fn) {
@@ -54608,7 +54603,7 @@ const baseMatcher = (inputs, patterns, options, firstMatchOnly) => {
54608
54603
 
54609
54604
  patterns = patterns.map(pattern => makeRegexp(pattern, options));
54610
54605
 
54611
- const {allPatterns} = options || {};
54606
+ const {allPatterns} = {};
54612
54607
  const result = [];
54613
54608
 
54614
54609
  for (const input of inputs) {
@@ -54638,7 +54633,7 @@ const baseMatcher = (inputs, patterns, options, firstMatchOnly) => {
54638
54633
  ) {
54639
54634
  result.push(input);
54640
54635
 
54641
- if (firstMatchOnly) {
54636
+ {
54642
54637
  break;
54643
54638
  }
54644
54639
  }
@@ -54648,7 +54643,7 @@ const baseMatcher = (inputs, patterns, options, firstMatchOnly) => {
54648
54643
  };
54649
54644
 
54650
54645
  function isMatch(inputs, patterns, options) {
54651
- return baseMatcher(inputs, patterns, options, true).length > 0;
54646
+ return baseMatcher(inputs, patterns, options).length > 0;
54652
54647
  }
54653
54648
 
54654
54649
  /**
@@ -55350,7 +55345,7 @@ const GridFormMultiSelectGrid = (props) => {
55350
55345
  e.keepOpen = true;
55351
55346
  toggleValue(o);
55352
55347
  }
55353
- }, children: jsxRuntime.jsx(lui.LuiCheckboxInput, { isChecked: !!o.checked ?? false, isIndeterminate: o.checked === "partial", value: `${o.value}`, label: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [o.warning && jsxRuntime.jsx(GridIcon, { icon: "ic_warning_outline", title: o.warning }), jsxRuntime.jsx("span", { className: "GridMultiSelectGrid-Label", children: o.label ?? (o.value == null ? `<${o.value}>` : `${o.value}`) })] }), inputProps: {
55348
+ }, children: jsxRuntime.jsx(lui.LuiCheckboxInput, { isChecked: !!o.checked ?? false, isIndeterminate: o.checked === "partial", value: `${o.value}`, label: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [o.warning && jsxRuntime.jsx(GridIcon, { icon: "ic_warning_outline", title: o.warning }, "$$icon$$"), jsxRuntime.jsx("span", { className: "GridMultiSelectGrid-Label", children: o.label ?? (o.value == null ? `<${o.value}>` : `${o.value}`) }, "$$label$$")] }), inputProps: {
55354
55349
  onClick: (e) => {
55355
55350
  // Click is handled by MenuItem onClick
55356
55351
  e.preventDefault();
@@ -55502,16 +55497,6 @@ function v4(options, buf, offset) {
55502
55497
  rnds[6] = rnds[6] & 0x0f | 0x40;
55503
55498
  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
55504
55499
 
55505
- if (buf) {
55506
- offset = offset || 0;
55507
-
55508
- for (let i = 0; i < 16; ++i) {
55509
- buf[offset + i] = rnds[i];
55510
- }
55511
-
55512
- return buf;
55513
- }
55514
-
55515
55500
  return unsafeStringify(rnds);
55516
55501
  }
55517
55502