@nova-design-system/nova-react 3.23.0 → 3.25.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.
Files changed (103) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/dom.utils-CuXVGECR-8VY5SfMZ.js +177 -0
  3. package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
  4. package/dist/cjs/generated/components.server.js +124 -58
  5. package/dist/cjs/{grow.animation-CvHGHBL4-DDIEYBK-.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +0 -21
  6. package/dist/cjs/{i18n.utils-DOZbXX2L-BizoXo6c.js → i18n.utils-IlwlcG9l-ku0bScip.js} +14 -18
  7. package/dist/cjs/index-DUlunl9a.js +9696 -0
  8. package/dist/cjs/{nv-dialog.entry-O47Eol_7.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
  9. package/dist/cjs/index.js +5 -1
  10. package/dist/cjs/{nv-accordion-item.entry-B_l0-ux0.js → nv-accordion-item.entry-CqnjIt4R.js} +8 -7
  11. package/dist/cjs/{nv-accordion.entry-BX8_YuZF.js → nv-accordion.entry-Dx7FmGg_.js} +11 -14
  12. package/dist/cjs/{nv-alert.entry-DCWYR0OK.js → nv-alert.entry-BL3Pdcxd.js} +7 -6
  13. package/dist/cjs/nv-avatar.entry-2dFR4I9_.js +68 -0
  14. package/dist/cjs/nv-badge_2.entry-5FShR2Ax.js +218 -0
  15. package/dist/cjs/nv-breadcrumb.entry-Cfi32bBT.js +49 -0
  16. package/dist/cjs/nv-breadcrumbs.entry-BSgn3KUO.js +21 -0
  17. package/dist/cjs/nv-button.entry-BdQQ_LE7.js +166 -0
  18. package/dist/cjs/{nv-buttongroup.entry-BZaTKN_n.js → nv-buttongroup.entry-BM8CwXFK.js} +13 -7
  19. package/dist/cjs/{nv-calendar.entry-D9ESuu7C.js → nv-calendar.entry-CeKsMGOa.js} +39 -32
  20. package/dist/cjs/nv-col.entry-D-h2PGcz.js +38 -0
  21. package/dist/cjs/{nv-datagrid.entry-DcB5q2oC.js → nv-datagrid.entry-nOBIfqOS.js} +113 -255
  22. package/dist/cjs/{nv-datagridcolumn.entry-BhKOzXA6.js → nv-datagridcolumn.entry-BAzTU_KM.js} +2 -2
  23. package/dist/cjs/nv-dialog.entry-Bi2ZVSe2.js +299 -0
  24. package/dist/cjs/{nv-dialogfooter_2.entry-Dn16bI8a.js → nv-dialogfooter_2.entry-D6lzC-3S.js} +11 -29
  25. package/dist/cjs/nv-drawer.entry-Dp4AfBiF.js +445 -0
  26. package/dist/cjs/nv-drawerfooter_2.entry-DpWSsq6d.js +128 -0
  27. package/dist/cjs/nv-fieldcheckbox.entry-COA3LXnX.js +179 -0
  28. package/dist/cjs/{nv-fielddate.entry-B4P0U8QG.js → nv-fielddate.entry-B8r5RFXd.js} +20 -21
  29. package/dist/cjs/{nv-fielddaterange.entry-BORwYJ-k.js → nv-fielddaterange.entry-C6_Kq93P.js} +20 -19
  30. package/dist/cjs/{nv-fielddropdown.entry-DzBAIynY.js → nv-fielddropdown.entry-B2Dr5zHd.js} +51 -58
  31. package/dist/cjs/nv-fielddropdownitem.entry-DapivVnR.js +69 -0
  32. package/dist/cjs/{nv-fieldmultiselect.entry-DiqRreWh.js → nv-fieldmultiselect.entry-DSpQeiPx.js} +45 -49
  33. package/dist/cjs/nv-fieldnumber.entry-BwxR9sRr.js +189 -0
  34. package/dist/cjs/nv-fieldpassword.entry-BOSU-Skh.js +167 -0
  35. package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +105 -0
  36. package/dist/cjs/nv-fieldselect.entry-CfWjQAd9.js +405 -0
  37. package/dist/cjs/{nv-fieldslider.entry-CozmnUfN.js → nv-fieldslider.entry-dDPcWUxs.js} +34 -16
  38. package/dist/cjs/nv-fieldtext.entry-Yaa-mkjJ.js +163 -0
  39. package/dist/cjs/{nv-fieldtextarea.entry-7UrKWDHg.js → nv-fieldtextarea.entry-Dp_l2pKZ.js} +18 -13
  40. package/dist/cjs/{nv-fieldtime.entry-DakOlLiO.js → nv-fieldtime.entry-CWxi4Uel.js} +38 -40
  41. package/dist/cjs/{nv-icon.entry-Db00kB2u.js → nv-icon.entry-Dci11W9S.js} +5 -5
  42. package/dist/cjs/nv-iconbutton_2.entry-A6FKFJT_.js +171 -0
  43. package/dist/cjs/{nv-menu.entry-CK2HdmBt.js → nv-menu.entry-BHaYP-9M.js} +11 -16
  44. package/dist/cjs/nv-menuitem.entry-Cm1vvN25.js +59 -0
  45. package/dist/cjs/nv-notification-bullet.entry-DRlS3Ybc.js +76 -0
  46. package/dist/cjs/nv-notification.entry-BeDmR-XC.js +176 -0
  47. package/dist/cjs/nv-notificationcontainer.entry-C3p_87Dg.js +41 -0
  48. package/dist/cjs/nv-paginationtable.entry-BzEqQOBa.js +231 -0
  49. package/dist/cjs/{nv-popover.entry-mLdLSp6n.js → nv-popover.entry-D2oFn9vL.js} +118 -46
  50. package/dist/cjs/nv-row.entry-hV1kxmrr.js +22 -0
  51. package/dist/cjs/{nv-sidebar.entry-inDVNJ4s.js → nv-sidebar.entry-BJrqJ8K7.js} +12 -8
  52. package/dist/cjs/nv-sidebarcontent.entry-CPfGF7nx.js +22 -0
  53. package/dist/cjs/{nv-sidebardivider.entry-D_yern0R.js → nv-sidebardivider.entry-D2wmzHCO.js} +4 -4
  54. package/dist/cjs/{nv-sidebarfooter.entry-Rkkn9TB_.js → nv-sidebarfooter.entry-C7fqCzjH.js} +4 -4
  55. package/dist/cjs/nv-sidebargroup.entry-qkXnxhs_.js +23 -0
  56. package/dist/cjs/{nv-sidebarheader.entry-CYpD_4pI.js → nv-sidebarheader.entry-DBsOmyQ0.js} +4 -4
  57. package/dist/cjs/{nv-sidebarlogo.entry-BgK03M1v.js → nv-sidebarlogo.entry-902Ht3UR.js} +4 -4
  58. package/dist/cjs/{nv-sidebarnavitem.entry-DglvcCOD.js → nv-sidebarnavitem.entry-CICrllp8.js} +11 -10
  59. package/dist/cjs/nv-sidebarnavsubitem.entry-Q9jjU_7D.js +35 -0
  60. package/dist/cjs/{nv-split.entry-mzg2F66T.js → nv-split.entry-BYIsE2wp.js} +51 -45
  61. package/dist/cjs/nv-stack.entry-DgE5ASGH.js +31 -0
  62. package/dist/cjs/{nv-table.entry-DkbNgxtI.js → nv-table.entry-DHXBu2n1.js} +9 -11
  63. package/dist/cjs/{nv-tableheader.entry-CRVFTQA-.js → nv-tableheader.entry-BijgOxcO.js} +5 -5
  64. package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +82 -0
  65. package/dist/cjs/nv-togglebutton.entry-DAPETEmF.js +66 -0
  66. package/dist/cjs/{nv-togglebuttongroup.entry-BYXX5ejg.js → nv-togglebuttongroup.entry-CzDI1XCr.js} +14 -11
  67. package/dist/cjs/nv-tooltip.entry-DPoUP9iL.js +56 -0
  68. package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
  69. package/dist/components/NvDatatable/NvDatatable.js +69 -32
  70. package/dist/generated/components.js +38 -0
  71. package/dist/generated/components.server.js +120 -58
  72. package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
  73. package/dist/types/components/NvDatatable/types.d.ts +13 -3
  74. package/dist/types/generated/components.d.ts +63 -43
  75. package/dist/types/generated/components.server.d.ts +63 -43
  76. package/package.json +2 -2
  77. package/dist/cjs/index-CtjeeUI-.js +0 -39617
  78. package/dist/cjs/nv-avatar.entry-C_xZD3Lp.js +0 -68
  79. package/dist/cjs/nv-badge_2.entry-JjqANStV.js +0 -213
  80. package/dist/cjs/nv-breadcrumb.entry-DQZDn6cm.js +0 -46
  81. package/dist/cjs/nv-breadcrumbs.entry-Bz0GjhY_.js +0 -21
  82. package/dist/cjs/nv-button.entry-Br1DH9Vj.js +0 -164
  83. package/dist/cjs/nv-col.entry-CfgPMMxS.js +0 -38
  84. package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +0 -177
  85. package/dist/cjs/nv-fielddropdownitem.entry-C_17isWd.js +0 -73
  86. package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +0 -187
  87. package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +0 -165
  88. package/dist/cjs/nv-fieldradio.entry-CG22oETM.js +0 -103
  89. package/dist/cjs/nv-fieldselect.entry-BPQEtrv2.js +0 -397
  90. package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +0 -163
  91. package/dist/cjs/nv-iconbutton_2.entry-CaKCa8NT.js +0 -168
  92. package/dist/cjs/nv-menuitem.entry-mKMqCAdz.js +0 -60
  93. package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +0 -77
  94. package/dist/cjs/nv-notification.entry-CLb0gNu3.js +0 -262
  95. package/dist/cjs/nv-notificationcontainer.entry-Cijivlm6.js +0 -41
  96. package/dist/cjs/nv-row.entry-C2C94fcv.js +0 -22
  97. package/dist/cjs/nv-sidebarcontent.entry-DxoljE15.js +0 -22
  98. package/dist/cjs/nv-sidebargroup.entry-C1p9qqxr.js +0 -23
  99. package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +0 -35
  100. package/dist/cjs/nv-stack.entry-nnvjTrBy.js +0 -31
  101. package/dist/cjs/nv-toggle.entry-oC9TVkr1.js +0 -80
  102. package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +0 -67
  103. package/dist/cjs/nv-tooltip.entry-OJGxfJEh.js +0 -55
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-DUlunl9a.js');
4
+ var dom_utilsCuXVGECR = require('./dom.utils-CuXVGECR-8VY5SfMZ.js');
4
5
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
6
  require('@stencil/react-output-target/runtime');
6
7
  require('react');
@@ -3294,170 +3295,6 @@ function getSortedRowModel() {
3294
3295
  }, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
3295
3296
  }
3296
3297
 
3297
- /* eslint-disable @typescript-eslint/no-explicit-any */
3298
- /**
3299
- * All properties that should be excluded from the deep copy of an HTML element.
3300
- */
3301
- const excludedProps = new Set([
3302
- // Text and content-related properties
3303
- 'textContent',
3304
- 'innerText',
3305
- 'outerText',
3306
- 'innerHTML',
3307
- 'outerHTML',
3308
- 'text',
3309
- // Form element properties
3310
- 'value',
3311
- 'defaultValue',
3312
- 'checked',
3313
- 'defaultChecked',
3314
- 'selectionStart',
3315
- 'selectionEnd',
3316
- 'selectionDirection',
3317
- 'form',
3318
- 'willValidate',
3319
- 'validity',
3320
- 'validationMessage',
3321
- 'labels',
3322
- 'list',
3323
- 'maxLength',
3324
- 'minLength',
3325
- 'valueAsDate',
3326
- 'valueAsNumber',
3327
- // Editability and namespaces
3328
- 'contentEditable',
3329
- 'isContentEditable',
3330
- 'namespaceURI',
3331
- // Child-related properties (handled recursively)
3332
- 'attributes',
3333
- 'children',
3334
- 'childNodes',
3335
- 'firstChild',
3336
- 'lastChild',
3337
- // Blazor-related properties
3338
- 'origin',
3339
- 'dataset',
3340
- 'attributeStyleMap',
3341
- 'prefix',
3342
- 'localName',
3343
- 'tagName',
3344
- 'shadowRoot',
3345
- 'assignedSlot',
3346
- 'scrollWidth',
3347
- 'scrollHeight',
3348
- 'clientTop',
3349
- 'clientLeft',
3350
- 'clientWidth',
3351
- 'clientHeight',
3352
- 'firstElementChild',
3353
- 'lastElementChild',
3354
- 'childElementCount',
3355
- 'previousElementSibling',
3356
- 'nextElementSibling',
3357
- 'currentCSSZoom',
3358
- 'nodeType',
3359
- 'nodeName',
3360
- 'baseURI',
3361
- 'isConnected',
3362
- 'ownerDocument',
3363
- 'parentNode',
3364
- 'parentElement',
3365
- 'previousSibling',
3366
- 'nextSibling',
3367
- 'ELEMENT_NODE',
3368
- 'ATTRIBUTE_NODE',
3369
- 'TEXT_NODE',
3370
- 'CDATA_SECTION_NODE',
3371
- 'ENTITY_REFERENCE_NODE',
3372
- 'ENTITY_NODE',
3373
- 'PROCESSING_INSTRUCTION_NODE',
3374
- 'COMMENT_NODE',
3375
- 'DOCUMENT_NODE',
3376
- 'DOCUMENT_TYPE_NODE',
3377
- 'DOCUMENT_FRAGMENT_NODE',
3378
- 'NOTATION_NODE',
3379
- 'DOCUMENT_POSITION_DISCONNECTED',
3380
- 'DOCUMENT_POSITION_PRECEDING',
3381
- 'DOCUMENT_POSITION_FOLLOWING',
3382
- 'DOCUMENT_POSITION_CONTAINS',
3383
- 'DOCUMENT_POSITION_CONTAINED_BY',
3384
- 'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
3385
- ]);
3386
- /**
3387
- * Deep copy an HTML element with all its attributes, properties, and child nodes.
3388
- * This method is useful for creating a clone of an element that can be safely modified without affecting the original.
3389
- * @param {HTMLElement} element - The HTML element to copy.
3390
- * @returns {HTMLElement} - A deep copy of the HTML element.
3391
- * @example const copy = deepCopyElement(document.getElementById('myElement'));
3392
- */
3393
- function deepCopyElement(element) {
3394
- const copy = document.createElement(element.tagName);
3395
- // ✅ Copy attributes
3396
- Array.from(element.attributes).forEach(attr => {
3397
- copy.setAttribute(attr.name, attr.value);
3398
- });
3399
- // ✅ Dynamically extract relevant properties
3400
- const properties = new Set();
3401
- // Collect only own enumerable properties
3402
- Object.keys(element).forEach(key => properties.add(key));
3403
- // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3404
- let proto = Object.getPrototypeOf(element);
3405
- while (proto && proto !== HTMLElement.prototype) {
3406
- Object.keys(proto).forEach(key => properties.add(key));
3407
- proto = Object.getPrototypeOf(proto);
3408
- }
3409
- // ✅ Filter and copy only non-function properties (methods are excluded) and non-event listeners
3410
- properties.forEach(prop => {
3411
- if (typeof element[prop] !== 'function' && // Ignore methods
3412
- !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3413
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3414
- ) {
3415
- try {
3416
- copy[prop] = element[prop];
3417
- }
3418
- catch (error) {
3419
- console.warn(`Could not copy property ${prop}:`, error.message);
3420
- }
3421
- }
3422
- });
3423
- // ✅ Copy dataset separately
3424
- Object.assign(copy.dataset, element.dataset);
3425
- // ✅ Handle form elements specifically
3426
- if (element instanceof HTMLInputElement) {
3427
- copy.value = element.value;
3428
- copy.checked = element.checked;
3429
- copy.defaultValue = element.defaultValue;
3430
- copy.defaultChecked = element.defaultChecked;
3431
- copy.selectionStart = element.selectionStart;
3432
- copy.selectionEnd = element.selectionEnd;
3433
- copy.selectionDirection = element.selectionDirection;
3434
- }
3435
- else if (element instanceof HTMLTextAreaElement) {
3436
- copy.value = element.value;
3437
- copy.defaultValue = element.defaultValue;
3438
- copy.selectionStart = element.selectionStart;
3439
- copy.selectionEnd = element.selectionEnd;
3440
- copy.selectionDirection =
3441
- element.selectionDirection;
3442
- }
3443
- else if (element instanceof HTMLSelectElement) {
3444
- copy.value = element.value;
3445
- copy.selectedIndex = element.selectedIndex;
3446
- }
3447
- // ✅ Recursively copy child nodes (prevent duplicates)
3448
- element.childNodes.forEach(child => {
3449
- let childCopy;
3450
- if (child.nodeType === Node.ELEMENT_NODE) {
3451
- childCopy = deepCopyElement(child);
3452
- }
3453
- else {
3454
- childCopy = child.cloneNode(true);
3455
- }
3456
- copy.appendChild(childCopy);
3457
- });
3458
- return copy;
3459
- }
3460
-
3461
3298
  /* eslint-disable @typescript-eslint/no-explicit-any */
3462
3299
  /**
3463
3300
  * Debounce function to prevent multiple calls in a short
@@ -3478,7 +3315,7 @@ function debounce(func, wait) {
3478
3315
  };
3479
3316
  }
3480
3317
 
3481
- const nvDatagridCss = "nv-datagrid{--nv-datagrid-border-default:var(\n --components-form-field-border-default\n );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var(\n --components-form-field-background-default\n );--nv-datagrid-background-checked:var(\n --components-form-field-background-checked\n );--nv-datagrid-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-datagrid-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-datagrid-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);min-height:var(--spacing-12);padding:var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-high-emphasis);color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);min-height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--datagrid-cell-body-padding-y) var(--datagrid-cell-body-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-low-emphasis);color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}";
3318
+ const nvDatagridCss = () => `nv-datagrid{--nv-datagrid-border-default:var( --components-form-field-border-default );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var( --components-form-field-background-default );--nv-datagrid-background-checked:var( --components-form-field-background-checked );--nv-datagrid-background-disabled:var( --components-form-field-background-disabled );--nv-datagrid-color-checked:var( --components-form-shape-foreground-default );--nv-datagrid-color-disabled:var( --components-form-shape-foreground-disabled );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);min-height:var(--spacing-12);padding:var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-high-emphasis);color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);min-height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--datagrid-cell-body-padding-y) var(--datagrid-cell-body-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-low-emphasis);color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}`;
3482
3319
 
3483
3320
  const NvDatagrid = class {
3484
3321
  constructor(hostRef) {
@@ -3582,8 +3419,7 @@ const NvDatagrid = class {
3582
3419
  */
3583
3420
  this.state = null;
3584
3421
  this.debouncedFilter = debounce((value) => {
3585
- var _a;
3586
- (_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
3422
+ this.table?.setGlobalFilter(value);
3587
3423
  }, 300);
3588
3424
  /**
3589
3425
  * Handles global filtering on input event for the search input.
@@ -3609,7 +3445,7 @@ const NvDatagrid = class {
3609
3445
  const target = event.target;
3610
3446
  const page = target.value ? Number(target.value) - 1 : 0;
3611
3447
  // Simply use `setPageIndex` to update the page index directly
3612
- this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
3448
+ this.paginationState = { ...this.paginationState, pageIndex: page }; // This triggers the paginationState watcher
3613
3449
  };
3614
3450
  this.handlePageSizeChange = (event) => {
3615
3451
  const target = event.target;
@@ -3618,14 +3454,16 @@ const NvDatagrid = class {
3618
3454
  effectivePageSize = this.pageSizes[0];
3619
3455
  }
3620
3456
  // Simply use `setPageSize` to update the page size directly
3621
- this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: effectivePageSize }); // This triggers the paginationState watcher
3457
+ this.paginationState = {
3458
+ ...this.paginationState,
3459
+ pageSize: effectivePageSize,
3460
+ }; // This triggers the paginationState watcher
3622
3461
  };
3623
3462
  this.handleSortingClick = (event, header) => {
3624
- var _a;
3625
3463
  if (!header.column.getCanSort()) {
3626
3464
  return;
3627
3465
  }
3628
- (_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(event);
3466
+ header.column.getToggleSortingHandler()?.(event);
3629
3467
  };
3630
3468
  this.getSortTitle = (header) => {
3631
3469
  if (!header.column.getCanSort())
@@ -3654,12 +3492,12 @@ const NvDatagrid = class {
3654
3492
  const key = col.accessor;
3655
3493
  const cellSlot = col.querySelector('[slot="cell"]');
3656
3494
  if (cellSlot) {
3657
- const element = deepCopyElement(cellSlot);
3495
+ const element = dom_utilsCuXVGECR.deepCopyElement(cellSlot);
3658
3496
  this.templateCache.set(key, element);
3659
3497
  }
3660
3498
  const headerSlot = col.querySelector('[slot="header"]');
3661
3499
  if (headerSlot) {
3662
- const element = deepCopyElement(headerSlot);
3500
+ const element = dom_utilsCuXVGECR.deepCopyElement(headerSlot);
3663
3501
  this.headerTemplateCache.set(key, element);
3664
3502
  }
3665
3503
  else {
@@ -3689,22 +3527,21 @@ const NvDatagrid = class {
3689
3527
  }
3690
3528
  else if (this.headerTemplateCache.size > 0) {
3691
3529
  const headerKeys = Array.from(this.headerTemplateCache.keys());
3692
- const arrayColumnsConfig = headerKeys.map(key => {
3693
- var _a, _b;
3694
- return (Object.assign({}, { accessor: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '', group: (_b = (_a = this.columnData.find(x => x.accessor === key)) === null || _a === void 0 ? void 0 : _a.group) !== null && _b !== void 0 ? _b : 'ungrouped' }));
3695
- });
3530
+ const arrayColumnsConfig = headerKeys.map(key => ({
3531
+ ...{}, // Ensure no prototype inheritance
3532
+ accessor: key,
3533
+ header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '',
3534
+ group: this.columnData.find(x => x.accessor === key)?.group ?? 'ungrouped',
3535
+ }));
3696
3536
  this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
3697
3537
  }
3698
3538
  else if (this.parsedData.length > 0) {
3699
3539
  const firstRow = this.parsedData[0];
3700
- const arrayColumnsConfig = Object.keys(firstRow).map(key => {
3701
- var _a, _b;
3702
- return ({
3703
- accessor: key,
3704
- header: key.charAt(0).toUpperCase() + key.slice(1),
3705
- group: (_b = (_a = this.columnData.find(x => x.accessor === key)) === null || _a === void 0 ? void 0 : _a.group) !== null && _b !== void 0 ? _b : 'ungrouped',
3706
- });
3707
- });
3540
+ const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
3541
+ accessor: key,
3542
+ header: key.charAt(0).toUpperCase() + key.slice(1),
3543
+ group: this.columnData.find(x => x.accessor === key)?.group ?? 'ungrouped',
3544
+ }));
3708
3545
  if (this.autoGenerateColumns) {
3709
3546
  this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
3710
3547
  }
@@ -3744,7 +3581,6 @@ const NvDatagrid = class {
3744
3581
  this.parsedColumns = safeNewValue;
3745
3582
  }
3746
3583
  initializeTable() {
3747
- var _a, _b, _c, _d;
3748
3584
  // Clear the previous table instance (if any)
3749
3585
  this.table = null;
3750
3586
  console.info('initializeTable this.columnData:', this.columnData);
@@ -3781,7 +3617,7 @@ const NvDatagrid = class {
3781
3617
  };
3782
3618
  if (this.parsedColumns.length > 0) {
3783
3619
  // Validate and generate column definitions
3784
- const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
3620
+ const validColumns = this.parsedColumns.filter(column => column?.accessor);
3785
3621
  // Update tableOptions based on parsed data and columns
3786
3622
  const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
3787
3623
  const hasData = this.parsedData &&
@@ -3806,14 +3642,11 @@ const NvDatagrid = class {
3806
3642
  if (hasData) {
3807
3643
  // No parsed columns and data is available
3808
3644
  const firstRow = this.parsedData[0];
3809
- const arrayColumnsConfig = Object.keys(firstRow).map(key => {
3810
- var _a, _b;
3811
- return ({
3812
- accessor: key,
3813
- header: key.charAt(0).toUpperCase() + key.slice(1),
3814
- group: (_b = (_a = this.columnData.find(x => x.accessor === key)) === null || _a === void 0 ? void 0 : _a.group) !== null && _b !== void 0 ? _b : 'ungrouped',
3815
- });
3816
- });
3645
+ const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
3646
+ accessor: key,
3647
+ header: key.charAt(0).toUpperCase() + key.slice(1),
3648
+ group: this.columnData.find(x => x.accessor === key)?.group ?? 'ungrouped',
3649
+ }));
3817
3650
  if (this.autoGenerateColumns) {
3818
3651
  this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
3819
3652
  }
@@ -3837,8 +3670,8 @@ const NvDatagrid = class {
3837
3670
  }
3838
3671
  if (this.enablePagination) {
3839
3672
  tableOptions.getPaginationRowModel = getPaginationRowModel();
3840
- const pageIndex = (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0;
3841
- let effectivePageSize = (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10;
3673
+ const pageIndex = this.paginationState?.pageIndex ?? 0;
3674
+ let effectivePageSize = this.paginationState?.pageSize ?? 10;
3842
3675
  if (!this.pageSizes.includes(effectivePageSize) && this.pageSizes) {
3843
3676
  effectivePageSize = this.pageSizes[0];
3844
3677
  }
@@ -3980,16 +3813,13 @@ const NvDatagrid = class {
3980
3813
  tableOptions.data &&
3981
3814
  tableOptions.data.length > 0)) {
3982
3815
  const sampleRow = tableOptions.data[0];
3983
- processedColumns = Object.keys(sampleRow).map(key => {
3984
- var _a, _b;
3985
- return ({
3986
- header: key.charAt(0).toUpperCase() + key.slice(1),
3987
- accessor: key,
3988
- group: (_b = (_a = this.columnData.find(x => x.accessor === key)) === null || _a === void 0 ? void 0 : _a.group) !== null && _b !== void 0 ? _b : 'ungrouped',
3989
- headerSlot: null,
3990
- cellSlot: null,
3991
- });
3992
- });
3816
+ processedColumns = Object.keys(sampleRow).map(key => ({
3817
+ header: key.charAt(0).toUpperCase() + key.slice(1),
3818
+ accessor: key,
3819
+ group: this.columnData.find(x => x.accessor === key)?.group ?? 'ungrouped',
3820
+ headerSlot: null,
3821
+ cellSlot: null,
3822
+ }));
3993
3823
  }
3994
3824
  // Group columns by their group property
3995
3825
  const groupedColumns = processedColumns.reduce((acc, column) => {
@@ -4005,19 +3835,22 @@ const NvDatagrid = class {
4005
3835
  }, {});
4006
3836
  // Transform each column into a ColumnDef
4007
3837
  const createColumnDef = (column) => {
4008
- var _a, _b, _c;
4009
3838
  return columnHelper.accessor(column.accessor, {
4010
- header: (_c = (_b = this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null)) !== null && _b !== void 0 ? _b : column.header) !== null && _c !== void 0 ? _c : column.accessor,
3839
+ header: this.renderTemplate(this.headerTemplateCache.get(column.accessor), column.header ?? column.accessor, null) ??
3840
+ column.header ??
3841
+ column.accessor,
4011
3842
  cell: (info) => {
4012
- var _a, _b, _c;
4013
3843
  const value = info.getValue();
4014
3844
  const row = info.row;
4015
- return ((_a = this.columnData.find(x => x.accessor === column.accessor)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
4016
- ? value.map((item) => {
4017
- var _a, _b, _c;
4018
- return (_c = (_b = (_a = this.renderTemplate(this.templateCache.get(column.accessor), item, row)) !== null && _a !== void 0 ? _a : item) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
4019
- })
4020
- : (_c = (_b = this.renderTemplate(this.templateCache.get(column.accessor), value, row)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
3845
+ return this.columnData.find(x => x.accessor === column.accessor)
3846
+ ?.repeatTemplate && Array.isArray(value)
3847
+ ? value.map((item) => this.renderTemplate(this.templateCache.get(column.accessor), item, row) ??
3848
+ item ??
3849
+ value ??
3850
+ this.fallbackValue)
3851
+ : this.renderTemplate(this.templateCache.get(column.accessor), value, row) ??
3852
+ value ??
3853
+ this.fallbackValue;
4021
3854
  },
4022
3855
  sortUndefined: 'last',
4023
3856
  sortDescFirst: false,
@@ -4045,9 +3878,9 @@ const NvDatagrid = class {
4045
3878
  header: ({ table }) => {
4046
3879
  return (index.h("div", { class: "flex px-1", ref: el => {
4047
3880
  const checkbox = this.createIndeterminateCheckbox({
4048
- checked: table === null || table === void 0 ? void 0 : table.getIsAllRowsSelected(),
4049
- indeterminate: table === null || table === void 0 ? void 0 : table.getIsSomeRowsSelected(),
4050
- onChange: table === null || table === void 0 ? void 0 : table.getToggleAllRowsSelectedHandler(),
3881
+ checked: table?.getIsAllRowsSelected(),
3882
+ indeterminate: table?.getIsSomeRowsSelected(),
3883
+ onChange: table?.getToggleAllRowsSelectedHandler(),
4051
3884
  });
4052
3885
  if (el) {
4053
3886
  el.innerHTML = ''; // Remove existing content
@@ -4058,10 +3891,10 @@ const NvDatagrid = class {
4058
3891
  cell: ({ row }) => {
4059
3892
  return (index.h("div", { class: "flex px-1", ref: el => {
4060
3893
  const checkbox = this.createIndeterminateCheckbox({
4061
- checked: row === null || row === void 0 ? void 0 : row.getIsSelected(),
4062
- disabled: !(row === null || row === void 0 ? void 0 : row.getCanSelect()),
4063
- indeterminate: row === null || row === void 0 ? void 0 : row.getIsSomeSelected(),
4064
- onChange: row === null || row === void 0 ? void 0 : row.getToggleSelectedHandler(),
3894
+ checked: row?.getIsSelected(),
3895
+ disabled: !row?.getCanSelect(),
3896
+ indeterminate: row?.getIsSomeSelected(),
3897
+ onChange: row?.getToggleSelectedHandler(),
4065
3898
  });
4066
3899
  if (el) {
4067
3900
  el.innerHTML = ''; // Remove existing content
@@ -4092,7 +3925,7 @@ const NvDatagrid = class {
4092
3925
  }
4093
3926
  // Handle <template> elements correctly
4094
3927
  const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
4095
- const element = deepCopyElement(templateContent);
3928
+ const element = dom_utilsCuXVGECR.deepCopyElement(templateContent);
4096
3929
  // Replace placeholders in text content, attributes, and properties
4097
3930
  element.querySelectorAll('*').forEach(el => {
4098
3931
  // Replace placeholders in text content
@@ -4114,14 +3947,12 @@ const NvDatagrid = class {
4114
3947
  const keyAction = splitted[1];
4115
3948
  const details = splitted.length > 2 ? splitted[2] : null;
4116
3949
  el.addEventListener(eventType, () => {
4117
- var _a;
4118
- const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
3950
+ const keys = details?.split(',') ?? [];
4119
3951
  // Convert keys into a single object instead of an array of objects
4120
3952
  const keyValue = keys.reduce((acc, key) => {
4121
- var _a;
4122
- if (row === null || row === void 0 ? void 0 : row.original) {
3953
+ if (row?.original) {
4123
3954
  if (key in row.original) {
4124
- acc[key] = (_a = row.original) === null || _a === void 0 ? void 0 : _a[key];
3955
+ acc[key] = row.original?.[key];
4125
3956
  }
4126
3957
  }
4127
3958
  return acc;
@@ -4146,7 +3977,6 @@ const NvDatagrid = class {
4146
3977
  } }));
4147
3978
  }
4148
3979
  replaceKeyWithValue(key, cellValue) {
4149
- var _a;
4150
3980
  // Handle undefined or null values by returning the fallback
4151
3981
  if (cellValue === undefined || cellValue === null) {
4152
3982
  return this.fallbackValue;
@@ -4197,7 +4027,7 @@ const NvDatagrid = class {
4197
4027
  return this.fallbackValue;
4198
4028
  }
4199
4029
  // If cellValue is a primitive (string, number, boolean, etc.), return it as a string
4200
- return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
4030
+ return cellValue?.toString() ?? this.fallbackValue;
4201
4031
  }
4202
4032
  replacePlaceholdersTextContent(element, cellValue, row) {
4203
4033
  if (!cellValue) {
@@ -4274,7 +4104,7 @@ const NvDatagrid = class {
4274
4104
  properties.forEach(prop => {
4275
4105
  if (typeof element[prop] !== 'function' && // Ignore methods
4276
4106
  !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
4277
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4107
+ !dom_utilsCuXVGECR.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4278
4108
  ) {
4279
4109
  const propValue = element[prop];
4280
4110
  if (typeof propValue === 'string' && propValue.includes('__')) {
@@ -4306,7 +4136,7 @@ const NvDatagrid = class {
4306
4136
  properties.forEach(prop => {
4307
4137
  if (typeof element[prop] !== 'function' && // Ignore methods
4308
4138
  !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
4309
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4139
+ !dom_utilsCuXVGECR.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4310
4140
  ) {
4311
4141
  try {
4312
4142
  const propValue = element[prop];
@@ -4359,8 +4189,7 @@ const NvDatagrid = class {
4359
4189
  };
4360
4190
  }
4361
4191
  getPagination() {
4362
- var _a;
4363
- return (this.enablePagination && (index.h("div", { class: "flex items-center gap-2" }, index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.firstPage }, "<<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.previousPage }, "<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.nextPage }, ">"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.lastPage }, ">>"), index.h("span", { class: "flex items-center gap-1" }, index.h("div", null, "Page"), index.h("strong", null, this.table.getState().pagination.pageIndex + 1, " of", ' ', this.table.getPageCount().toLocaleString())), index.h("span", { class: "flex items-center gap-1" }, "| Go to page:", ' ', index.h("input", { type: "number", min: this.minPageIndex, max: this.table.getPageCount(), value: this.table.getState().pagination.pageIndex + 1, class: "border p-1 rounded w-16", "aria-label": "Go to page", onInput: this.handlePageIndexChange })), ((_a = this.pageSizes) === null || _a === void 0 ? void 0 : _a.length) > 0 && (index.h("select", { "aria-label": "Rows per page", onChange: this.handlePageSizeChange }, this.pageSizes.map(pageSize => (index.h("option", { value: String(pageSize), selected: this.table.getState().pagination.pageSize === pageSize }, "Show ", pageSize))))))));
4192
+ return (this.enablePagination && (index.h("div", { class: "flex items-center gap-2" }, index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.firstPage }, "<<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.previousPage }, "<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.nextPage }, ">"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.lastPage }, ">>"), index.h("span", { class: "flex items-center gap-1" }, index.h("div", null, "Page"), index.h("strong", null, this.table.getState().pagination.pageIndex + 1, " of", ' ', this.table.getPageCount().toLocaleString())), index.h("span", { class: "flex items-center gap-1" }, "| Go to page:", ' ', index.h("input", { type: "number", min: this.minPageIndex, max: this.table.getPageCount(), value: this.table.getState().pagination.pageIndex + 1, class: "border p-1 rounded w-16", "aria-label": "Go to page", onInput: this.handlePageIndexChange })), this.pageSizes?.length > 0 && (index.h("select", { "aria-label": "Rows per page", onChange: this.handlePageSizeChange }, this.pageSizes.map(pageSize => (index.h("option", { value: String(pageSize), selected: this.table.getState().pagination.pageSize === pageSize }, "Show ", pageSize))))))));
4364
4193
  }
4365
4194
  //#endregion METHODS
4366
4195
  /****************************************************************************/
@@ -4416,7 +4245,10 @@ const NvDatagrid = class {
4416
4245
  effectivePageSize = this.pageSizes[0];
4417
4246
  }
4418
4247
  // Simply use `setPageSize` to update the page size directly
4419
- this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: effectivePageSize }); // This triggers the paginationState watcher
4248
+ this.paginationState = {
4249
+ ...this.paginationState,
4250
+ pageSize: effectivePageSize,
4251
+ }; // This triggers the paginationState watcher
4420
4252
  }
4421
4253
  handleRowSelectionState(newValue, oldValue) {
4422
4254
  if (!this.table) {
@@ -4482,40 +4314,66 @@ const NvDatagrid = class {
4482
4314
  /****************************************************************************/
4483
4315
  //#region RENDER
4484
4316
  render() {
4485
- var _a, _b, _c, _d, _e;
4486
4317
  const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
4487
4318
  ? []
4488
- : (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
4319
+ : this.table?.getHeaderGroups();
4489
4320
  const rows = !this.table || this.table === undefined || this.parsedData.length === 0
4490
4321
  ? []
4491
- : (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
4492
- return (index.h(index.Host, { key: 'd1ca320f75940993840349a4f33afb0a8dc10788' }, index.h("div", { key: 'd07f038bfa0d4c0092f0ad9e6f13c95a47331f75', class: "hidden" }, index.h("slot", { key: 'be8e292240da78d055cce83fb5700111d371d0db' })), index.h("slot", { key: 'af921e34986bf67afa14190e2d01e866af7ab7ae', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: 'f3ffe4bdfee63e86ad470923e4faf62be821b5fa', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: 'a5ab10f4e088b106368bd5d98d99e3cef2b59955', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
4493
- ? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
4322
+ : this.table?.getRowModel()?.rows;
4323
+ return (index.h(index.Host, { key: '08593ceb15e31184e76c7ab641f5e2db635527e2' }, index.h("div", { key: '092f351ba6b5683b798651e5fb4eb1a40015684e', class: "hidden" }, index.h("slot", { key: 'c24d531e1e48dfc7db7bae7d6453994f70487f7b' })), index.h("slot", { key: 'e0d2aa2dd23eac36c5b735ea7640937cce649987', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: 'beb373f14fad14c50b2c92b6c5542dec797750b3', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: '943dc6d3b0663e15846682ede0f9ea5cb3f1c56e', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
4324
+ ? headerGroups?.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
4494
4325
  return this.getHeaderCell(header);
4495
4326
  }))))
4496
4327
  : null)), index.h("tbody", null, !rows || rows.length === 0 || this.parsedData.length === 0 ? (index.h("tr", null, index.h("td", { colSpan: this.parsedColumns.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => {
4497
4328
  const rowId = row.id;
4498
- const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
4329
+ const visibleCells = row?.getVisibleCells();
4499
4330
  return (index.h("tr", { key: rowId }, visibleCells.map(cell => {
4500
4331
  return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
4501
4332
  })));
4502
4333
  }))), this.table && this.enableRowSelection ? (index.h("tfoot", null, index.h("tr", null, index.h("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (index.h("div", null, this.rowSelectionState &&
4503
- Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '8941adaa686dec6b3f09e0434bdf9df3d273e930', name: "after" })));
4334
+ Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', this.table.getPreFilteredRowModel()?.rows
4335
+ ?.length || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '9d016c03102ff36aeaf8ff5364086902b129f2ce', name: "after" })));
4504
4336
  }
4505
4337
  get el() { return index.getElement(this); }
4506
4338
  static get watchers() { return {
4507
- "columns": ["parseColumns"],
4508
- "data": ["parseData"],
4509
- "parsedColumns": ["handleParsedChange"],
4510
- "parsedData": ["handleParsedChange"],
4511
- "globalFilterSearchTerm": ["handleGlobalFilterSearchTerm", "handleInternalStateChange"],
4512
- "paginationState": ["handlePaginationState", "handleInternalStateChange"],
4513
- "sortingState": ["handleSortingState", "handleInternalStateChange"],
4514
- "pageSize": ["handlePageSize"],
4515
- "rowSelectionState": ["handleRowSelectionState"],
4516
- "state": ["handleStateChange"]
4339
+ "columns": [{
4340
+ "parseColumns": 0
4341
+ }],
4342
+ "data": [{
4343
+ "parseData": 0
4344
+ }],
4345
+ "parsedColumns": [{
4346
+ "handleParsedChange": 0
4347
+ }],
4348
+ "parsedData": [{
4349
+ "handleParsedChange": 0
4350
+ }],
4351
+ "globalFilterSearchTerm": [{
4352
+ "handleGlobalFilterSearchTerm": 0
4353
+ }, {
4354
+ "handleInternalStateChange": 0
4355
+ }],
4356
+ "paginationState": [{
4357
+ "handlePaginationState": 0
4358
+ }, {
4359
+ "handleInternalStateChange": 0
4360
+ }],
4361
+ "sortingState": [{
4362
+ "handleSortingState": 0
4363
+ }, {
4364
+ "handleInternalStateChange": 0
4365
+ }],
4366
+ "pageSize": [{
4367
+ "handlePageSize": 0
4368
+ }],
4369
+ "rowSelectionState": [{
4370
+ "handleRowSelectionState": 0
4371
+ }],
4372
+ "state": [{
4373
+ "handleStateChange": 0
4374
+ }]
4517
4375
  }; }
4518
4376
  };
4519
- NvDatagrid.style = nvDatagridCss;
4377
+ NvDatagrid.style = nvDatagridCss();
4520
4378
 
4521
4379
  exports.nv_datagrid = NvDatagrid;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-DUlunl9a.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -17,7 +17,7 @@ const NvDatagridcolumn = class {
17
17
  /****************************************************************************/
18
18
  //#region RENDER
19
19
  render() {
20
- return (index.h(index.Host, { key: 'd93cf7234c22d08319d2e4157945ece0b9e5f7b1' }, index.h("slot", { key: 'd4530c7f6854773716e7494e0379bc21f446ca53', name: "header" }), index.h("slot", { key: '60e2933f219f48c0567fd0e01a137a694ae1c1c9', name: "cell" })));
20
+ return (index.h(index.Host, { key: '413044aa941d307aa9a2e96faad28e5c78e20b71' }, index.h("slot", { key: 'c32dedbda74aa8204222b797e92a633eb7246c33', name: "header" }), index.h("slot", { key: '1412fae3228b4f9583a07395411da3fe264da449', name: "cell" })));
21
21
  }
22
22
  };
23
23