@linzjs/step-ag-grid 22.0.0 → 22.0.1

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.
@@ -1,5 +1,4 @@
1
1
  import { InputHTMLAttributes, ReactElement } from "react";
2
- export declare const useGenerateOrDefaultId: (idFromProps?: string) => string;
3
2
  export interface LuiTextAreaInputProps extends InputHTMLAttributes<HTMLTextAreaElement> {
4
3
  value: string;
5
4
  label?: ReactElement | string;
@@ -4251,65 +4251,9 @@ const GridFormPopoverMenu = (props) => {
4251
4251
  }, children: jsxRuntime.jsx("div", { className: "subComponent", children: item.subComponent && jsxRuntime.jsx(item.subComponent, {}) }) })) }, `${item.label}_subcomponent`))] }, `${item.label}`))))) }) }));
4252
4252
  };
4253
4253
 
4254
- /**
4255
- * Convert array of 16 byte values to UUID string format of the form:
4256
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
4257
- */
4258
- var byteToHex = [];
4259
- for (var i = 0; i < 256; ++i) {
4260
- byteToHex.push((i + 0x100).toString(16).slice(1));
4261
- }
4262
- function unsafeStringify(arr, offset = 0) {
4263
- // Note: Be careful editing this code! It's been tuned for performance
4264
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
4265
- //
4266
- // Note to future-self: No, you can't remove the `toLowerCase()` call.
4267
- // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
4268
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
4269
- }
4270
-
4271
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
4272
- // require the crypto API and do not support built-in fallback to lower quality random number
4273
- // generators (like Math.random()).
4274
-
4275
- var getRandomValues;
4276
- var rnds8 = new Uint8Array(16);
4277
- function rng() {
4278
- // lazy load so that environments that need to polyfill have a chance to do so
4279
- if (!getRandomValues) {
4280
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
4281
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
4282
- if (!getRandomValues) {
4283
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
4284
- }
4285
- }
4286
- return getRandomValues(rnds8);
4287
- }
4288
-
4289
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
4290
- var native = {
4291
- randomUUID
4292
- };
4293
-
4294
- function v4(options, buf, offset) {
4295
- if (native.randomUUID && !buf && !options) {
4296
- return native.randomUUID();
4297
- }
4298
- options = options || {};
4299
- var rnds = options.random || (options.rng || rng)();
4300
-
4301
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
4302
- rnds[6] = rnds[6] & 0x0f | 0x40;
4303
- rnds[8] = rnds[8] & 0x3f | 0x80;
4304
- return unsafeStringify(rnds);
4305
- }
4306
-
4307
- const useGenerateOrDefaultId = (idFromProps) => {
4308
- const [id] = React.useState(idFromProps ? idFromProps : v4());
4309
- return id;
4310
- };
4311
4254
  const TextAreaInput = (props) => {
4312
- const id = useGenerateOrDefaultId(props?.id);
4255
+ const reactId = React.useId();
4256
+ const id = props?.id ?? reactId;
4313
4257
  return (jsxRuntime.jsxs("div", { className: clsx("LuiTextAreaInput Grid-popoverContainer", props.disabled ? "isDisabled" : "", props.error ? "hasError" : "", props.className), children: [jsxRuntime.jsxs("label", { htmlFor: id, children: [props.mandatory != null && jsxRuntime.jsx("span", { className: "LuiTextAreaInput-mandatory", children: "*" }), props.label != null && jsxRuntime.jsx("span", { className: "LuiTextAreaInput-label", children: props.label }), jsxRuntime.jsx("div", { className: "LuiTextAreaInput-wrapper", children: jsxRuntime.jsx("textarea", { rows: 5, ...lodashEs.omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"]), id: id, value: props.value ?? "", spellCheck: true, onMouseEnter: (e) => {
4314
4258
  if (document.activeElement != e.currentTarget) {
4315
4259
  e.currentTarget.focus();
@@ -5402,7 +5346,6 @@ exports.sanitiseFileName = sanitiseFileName;
5402
5346
  exports.stringByteLengthIsInvalid = stringByteLengthIsInvalid;
5403
5347
  exports.suppressCellKeyboardEvents = suppressCellKeyboardEvents;
5404
5348
  exports.useDeferredPromise = useDeferredPromise;
5405
- exports.useGenerateOrDefaultId = useGenerateOrDefaultId;
5406
5349
  exports.useGridContext = useGridContext;
5407
5350
  exports.useGridContextMenu = useGridContextMenu;
5408
5351
  exports.useGridFilter = useGridFilter;