@aquera/nile-elements 1.7.1 → 1.7.3

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 (88) hide show
  1. package/README.md +7 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +1524 -419
  5. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  6. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  7. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +8 -6
  8. package/dist/nile-combobox/group-utils.cjs.js +2 -0
  9. package/dist/nile-combobox/group-utils.cjs.js.map +1 -0
  10. package/dist/nile-combobox/group-utils.esm.js +1 -0
  11. package/dist/nile-combobox/index.cjs.js +2 -0
  12. package/dist/nile-combobox/index.cjs.js.map +1 -0
  13. package/dist/nile-combobox/index.esm.js +1 -0
  14. package/dist/nile-combobox/nile-combobox.cjs.js +2 -0
  15. package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -0
  16. package/dist/nile-combobox/nile-combobox.css.cjs.js +2 -0
  17. package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -0
  18. package/dist/nile-combobox/nile-combobox.css.esm.js +715 -0
  19. package/dist/nile-combobox/nile-combobox.esm.js +238 -0
  20. package/dist/nile-combobox/portal-manager.cjs.js +2 -0
  21. package/dist/nile-combobox/portal-manager.cjs.js.map +1 -0
  22. package/dist/nile-combobox/portal-manager.esm.js +1 -0
  23. package/dist/nile-combobox/renderer.cjs.js +2 -0
  24. package/dist/nile-combobox/renderer.cjs.js.map +1 -0
  25. package/dist/nile-combobox/renderer.esm.js +147 -0
  26. package/dist/nile-combobox/search-manager.cjs.js +2 -0
  27. package/dist/nile-combobox/search-manager.cjs.js.map +1 -0
  28. package/dist/nile-combobox/search-manager.esm.js +1 -0
  29. package/dist/nile-combobox/selection-manager.cjs.js +2 -0
  30. package/dist/nile-combobox/selection-manager.cjs.js.map +1 -0
  31. package/dist/nile-combobox/selection-manager.esm.js +1 -0
  32. package/dist/nile-combobox/types.cjs.js +2 -0
  33. package/dist/nile-combobox/types.cjs.js.map +1 -0
  34. package/dist/nile-combobox/types.esm.js +1 -0
  35. package/dist/src/index.d.ts +1 -0
  36. package/dist/src/index.js +1 -0
  37. package/dist/src/index.js.map +1 -1
  38. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +4 -2
  39. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
  40. package/dist/src/nile-combobox/group-utils.d.ts +26 -0
  41. package/dist/src/nile-combobox/group-utils.js +140 -0
  42. package/dist/src/nile-combobox/group-utils.js.map +1 -0
  43. package/dist/src/nile-combobox/index.d.ts +1 -0
  44. package/dist/src/nile-combobox/index.js +2 -0
  45. package/dist/src/nile-combobox/index.js.map +1 -0
  46. package/dist/src/nile-combobox/nile-combobox.css.d.ts +9 -0
  47. package/dist/src/nile-combobox/nile-combobox.css.js +724 -0
  48. package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -0
  49. package/dist/src/nile-combobox/nile-combobox.d.ts +320 -0
  50. package/dist/src/nile-combobox/nile-combobox.js +1739 -0
  51. package/dist/src/nile-combobox/nile-combobox.js.map +1 -0
  52. package/dist/src/nile-combobox/nile-combobox.test.d.ts +1 -0
  53. package/dist/src/nile-combobox/nile-combobox.test.js +551 -0
  54. package/dist/src/nile-combobox/nile-combobox.test.js.map +1 -0
  55. package/dist/src/nile-combobox/portal-manager.d.ts +26 -0
  56. package/dist/src/nile-combobox/portal-manager.js +218 -0
  57. package/dist/src/nile-combobox/portal-manager.js.map +1 -0
  58. package/dist/src/nile-combobox/renderer.d.ts +24 -0
  59. package/dist/src/nile-combobox/renderer.js +279 -0
  60. package/dist/src/nile-combobox/renderer.js.map +1 -0
  61. package/dist/src/nile-combobox/search-manager.d.ts +15 -0
  62. package/dist/src/nile-combobox/search-manager.js +41 -0
  63. package/dist/src/nile-combobox/search-manager.js.map +1 -0
  64. package/dist/src/nile-combobox/selection-manager.d.ts +12 -0
  65. package/dist/src/nile-combobox/selection-manager.js +44 -0
  66. package/dist/src/nile-combobox/selection-manager.js.map +1 -0
  67. package/dist/src/nile-combobox/types.d.ts +53 -0
  68. package/dist/src/nile-combobox/types.js +8 -0
  69. package/dist/src/nile-combobox/types.js.map +1 -0
  70. package/dist/src/version.js +1 -1
  71. package/dist/src/version.js.map +1 -1
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +3 -1
  74. package/src/index.ts +1 -0
  75. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +4 -2
  76. package/src/nile-combobox/group-utils.ts +157 -0
  77. package/src/nile-combobox/index.ts +1 -0
  78. package/src/nile-combobox/nile-combobox.css.ts +726 -0
  79. package/src/nile-combobox/nile-combobox.test.ts +704 -0
  80. package/src/nile-combobox/nile-combobox.ts +1816 -0
  81. package/src/nile-combobox/portal-manager.ts +263 -0
  82. package/src/nile-combobox/renderer.ts +466 -0
  83. package/src/nile-combobox/search-manager.ts +53 -0
  84. package/src/nile-combobox/selection-manager.ts +57 -0
  85. package/src/nile-combobox/types.ts +63 -0
  86. package/vscode-html-custom-data.json +311 -4
  87. package/web-dev-server.config.mjs +9 -0
  88. package/web-test-runner.config.mjs +11 -0
@@ -0,0 +1,2 @@
1
+ System.register(["lit","lit/directives/unsafe-html.js","lit/directives/class-map.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,o,i,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,s;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_lit){t=_lit.html;},function(_litDirectivesUnsafeHtmlJs){o=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_litDirectivesRepeatJs){e=_litDirectivesRepeatJs.repeat;}],execute:function execute(){_export("C",s=/*#__PURE__*/function(){function s(){_classCallCheck(this,s);}return _createClass(s,null,[{key:"renderGroupHeader",value:function renderGroupHeader(o){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=","\n style=","\n >\n ","\n <span class=\"combobox__group-label\">","</span>\n </div>\n "])),o.id,"--group-depth:".concat(o.depth),o.prefix?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-icon\n class=\"combobox__group-prefix\"\n name=","\n size=\"14\"\n method=\"fill\"\n ></nile-icon>"])),o.prefix):"",o.label);}},{key:"renderRowsPlain",value:function renderRowsPlain(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return"header"===t.kind?s.renderGroupHeader(t):s.renderItem(t.item,i,e,r,n,c,$,v,b,u);}));}},{key:"renderRowsVirtualized",value:function renderRowsVirtualized(o,i,r,n,l,a,d,p,c,$,v,b,u){return t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n ","\n </div>\n </div>\n "])),p?"loading":"",i,e(o,function(t){return t.key;},function(o){var i=r[o.index];if(!i)return t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""])));var e="position:absolute;top:0;left:0;right:0;transform:translateY(".concat(o.start,"px);height:").concat(o.size,"px;");return"header"===i.kind?t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div style="," class=\"combobox__group-header-slot\">\n ","\n </div>\n "])),e,s.renderGroupHeader(i)):t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div style=",">\n ","\n </div>\n "])),e,s.renderItem(i.item,n,l,a,d,c,$,v,b,u));}));}},{key:"renderVirtualizedOptions",value:function renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0;return t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:100%;transform:translateY(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),p?"loading":"",i,x,e(o,function(t){return t.key;},function(t){var o=r[t.index];return s.renderMeasuredItem(o,t.index,n,l,a,d,c,v,b,u,m);}));}},{key:"renderPlainOptions",value:function renderPlainOptions(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return s.renderItem(t,i,e,r,n,c,$,v,b,u);}));}},{key:"renderNoResults",value:function renderNoResults(o,i){return t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n ","\n </div>\n </div>\n "])),o||"No result found",i?t(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">","</div>"])),i):"");}},{key:"renderNoData",value:function renderNoData(o){return t(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n </div>\n </div>\n "])),o||"No data available");}},{key:"renderMeasuredItem",value:function renderMeasuredItem(e,_s,r,n,l,a,d,p,c,$,v){var _e$description,_e$prefix,_e$suffix;if(!e)return t(_templateObject13||(_templateObject13=_taggedTemplateLiteral([""])));var b=a(e),u=l(e),m=(e===null||e===void 0?void 0:e.disabled)||!1,x=e===null||e===void 0?void 0:e.className,_=p?p(e):(_e$description=e===null||e===void 0?void 0:e.description)!==null&&_e$description!==void 0?_e$description:"",h=c?c(e):(_e$prefix=e===null||e===void 0?void 0:e.prefix)!==null&&_e$prefix!==void 0?_e$prefix:"",g=$?$(e):(_e$suffix=e===null||e===void 0?void 0:e.suffix)!==null&&_e$suffix!==void 0?_e$suffix:"";var f=!1;return f=n?Array.isArray(r)&&r.some(function(t){return String(t)===String(b);}):String(Array.isArray(r)?r[0]:r)===String(b),t(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-option\n data-index=","\n value=","\n .selected=","\n .disabled=","\n .showCheckbox=","\n class=","\n .description=","\n .isDescriptionEnabled=","\n >\n ","\n ","\n ","\n </nile-option>\n "])),_s,b,f,m,n,i(_defineProperty({option:v!==null&&v!==void 0?v:!1},x!==null&&x!==void 0?x:"",!!x)),_,v,o(h),d?o(u):u,o(g));}},{key:"renderItem",value:function renderItem(e,_s2,r,n,l,a,d,p,c,$){var _e$description2,_e$prefix2,_e$suffix2;if(!e)return t(_templateObject15||(_templateObject15=_taggedTemplateLiteral([""])));var v=l(e),b=n(e),u=(e===null||e===void 0?void 0:e.disabled)||!1,m=e===null||e===void 0?void 0:e.className,x=d?d(e):(_e$description2=e===null||e===void 0?void 0:e.description)!==null&&_e$description2!==void 0?_e$description2:"",_=p?p(e):(_e$prefix2=e===null||e===void 0?void 0:e.prefix)!==null&&_e$prefix2!==void 0?_e$prefix2:"",h=c?c(e):(_e$suffix2=e===null||e===void 0?void 0:e.suffix)!==null&&_e$suffix2!==void 0?_e$suffix2:"";var g=!1;return g=r?Array.isArray(_s2)&&_s2.some(function(t){return String(t)===String(v);}):String(Array.isArray(_s2)?_s2[0]:_s2)===String(v),t(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-option\n value=","\n .selected=","\n .disabled=","\n .showCheckbox=","\n class=","\n .description=","\n .isDescriptionEnabled=","\n >\n ","\n ","\n ","\n </nile-option>\n "])),v,g,u,r,i(_defineProperty({option:$!==null&&$!==void 0?$:!1},m!==null&&m!==void 0?m:"",!!m)),x,$,o(_),a?o(b):b,o(h));}},{key:"renderVirtualizedGrid",value:function renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0,_=m?"repeat(".concat(a,", ").concat(m,"px)"):"repeat(".concat(a,", 1fr)");return t(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:",";min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:",";min-width:100%;transform:translateY(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),c?"loading":"",i,m?"max-content":"100%",m?"max-content":"100%",x,e(o,function(t){return t.key;},function(o){var i=o.index*a,e=r.slice(i,i+a);return t(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:",";gap:4px;\">\n ","\n </div>\n "])),_,e.map(function(t){return s.renderItem(t,n,l,d,p,$,v,b,u);}));}));}},{key:"renderHorizontalGrid",value:function renderHorizontalGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0;return t(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ","\"\n >\n <div style=\"position:relative;width:","px;height:","px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),$?"loading":"",i,38*a,x,e(o,function(t){return t.key;},function(o){var i=o.index*a,e=r.slice(i,i+a);return t(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-col\" style=\"width:","px;flex-shrink:0;display:flex;flex-direction:column;\">\n ","\n </div>\n "])),d,e.map(function(t){return s.renderItem(t,n,l,p,c,v,b,u,m);}));}));}},{key:"renderAddCustomOption",value:function renderAddCustomOption(o,i){return t(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-option\n value=","\n class=\"combobox__add-option\"\n .showCheckbox=","\n >\n + Add \"","\"\n </nile-option>\n "])),o,i,o);}},{key:"shouldUseVirtualizer",value:function shouldUseVirtualizer(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return o>1||t.length>=5;}}]);}());}};});
2
+ //# sourceMappingURL=renderer.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.cjs.js","sources":["../../../src/nile-combobox/renderer.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, type TemplateResult } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport type { VirtualItem } from '@tanstack/virtual-core';\nimport type { ComboboxRow, ComboboxHeaderRow } from './types';\n\nexport class ComboboxRenderer {\n\n static renderGroupHeader(row: ComboboxHeaderRow): TemplateResult {\n return html`\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=${row.id}\n style=${`--group-depth:${row.depth}`}\n >\n ${row.prefix\n ? html`<nile-icon\n class=\"combobox__group-prefix\"\n name=${row.prefix}\n size=\"14\"\n method=\"fill\"\n ></nile-icon>`\n : ''}\n <span class=\"combobox__group-label\">${row.label}</span>\n </div>\n `;\n }\n\n static renderRowsPlain(\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && rows.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${rows.map((row) =>\n row.kind === 'header'\n ? ComboboxRenderer.renderGroupHeader(row)\n : ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderRowsVirtualized(\n virtualItems: VirtualItem[],\n totalSize: number,\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const row = rows[vItem.index];\n if (!row) return html``;\n const posStyle =\n `position:absolute;top:0;left:0;right:0;` +\n `transform:translateY(${vItem.start}px);` +\n `height:${vItem.size}px;`;\n if (row.kind === 'header') {\n return html`\n <div style=${posStyle} class=\"combobox__group-header-slot\">\n ${ComboboxRenderer.renderGroupHeader(row)}\n </div>\n `;\n }\n return html`\n <div style=${posStyle}>\n ${ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n `;\n }\n\n static renderVirtualizedOptions(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n measureElement: (el: Element | null) => void,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n const offsetTop = virtualItems.length > 0 ? virtualItems[0].start : 0;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:100%;transform:translateY(${offsetTop}px);\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const item = data[vItem.index];\n return ComboboxRenderer.renderMeasuredItem(\n item, vItem.index, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n );\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderPlainOptions(\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && data.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${data.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderNoResults(noResultsMessage: string, noResultsSubtitle?: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ${noResultsMessage || 'No result found'}\n </div>\n ${noResultsSubtitle\n ? html`<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">${noResultsSubtitle}</div>`\n : ''}\n </div>\n </div>\n `;\n }\n\n static renderNoData(noDataMessage: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ${noDataMessage || 'No data available'}\n </div>\n </div>\n </div>\n `;\n }\n\n private static renderMeasuredItem(\n item: any,\n index: number,\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n if (!item) return html``;\n\n const optionValue = getItemValue(item);\n const displayText = getDisplayText(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = getItemDescription ? getItemDescription(item) : (item?.description ?? '');\n const prefix = getItemPrefix ? getItemPrefix(item) : (item?.prefix ?? '');\n const suffix = getItemSuffix ? getItemSuffix(item) : (item?.suffix ?? '');\n\n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = String(Array.isArray(value) ? value[0] : value) === String(optionValue);\n }\n\n return html`\n <nile-option\n data-index=${index}\n value=${optionValue}\n .selected=${isSelected}\n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n static renderItem(\n item: any,\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n if (!item) return html``;\n\n const optionValue = getItemValue(item);\n const displayText = getDisplayText(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = getItemDescription ? getItemDescription(item) : (item?.description ?? '');\n const prefix = getItemPrefix ? getItemPrefix(item) : (item?.prefix ?? '');\n const suffix = getItemSuffix ? getItemSuffix(item) : (item?.suffix ?? '');\n\n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = String(Array.isArray(value) ? value[0] : value) === String(optionValue);\n }\n\n return html`\n <nile-option\n value=${optionValue}\n .selected=${isSelected}\n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n static renderVirtualizedGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridColumns: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n gridColumnWidth?: number,\n ): TemplateResult {\n const offsetTop = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const colTemplate = gridColumnWidth\n ? `repeat(${gridColumns}, ${gridColumnWidth}px)`\n : `repeat(${gridColumns}, 1fr)`;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;transform:translateY(${offsetTop}px);\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const rowStart = vItem.index * gridColumns;\n const rowItems = data.slice(rowStart, rowStart + gridColumns);\n return html`\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:${colTemplate};gap:4px;\">\n ${rowItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderHorizontalGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridRows: number,\n gridColumnWidth: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n ): TemplateResult {\n const offsetLeft = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const rowHeight = 38;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;width:${totalSize}px;height:${rowHeight * gridRows}px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(${offsetLeft}px);\">\n ${repeat(\n virtualItems,\n (vCol) => vCol.key,\n (vCol) => {\n const colStart = vCol.index * gridRows;\n const colItems = data.slice(colStart, colStart + gridRows);\n return html`\n <div class=\"combobox__grid-col\" style=\"width:${gridColumnWidth}px;flex-shrink:0;display:flex;flex-direction:column;\">\n ${colItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderAddCustomOption(\n searchValue: string,\n multiple: boolean,\n ): TemplateResult {\n return html`\n <nile-option\n value=${searchValue}\n class=\"combobox__add-option\"\n .showCheckbox=${multiple}\n >\n + Add \"${searchValue}\"\n </nile-option>\n `;\n }\n\n static shouldUseVirtualizer(data: any[], gridColumns = 1): boolean {\n if (gridColumns > 1) return true;\n return data.length >= 5;\n }\n}\n"],"names":["ComboboxRenderer","s","_classCallCheck","_createClass","key","value","renderGroupHeader","row","html","_templateObject","_taggedTemplateLiteral","id","depth","prefix","_templateObject2","label","renderRowsPlain","rows","multiple","getDisplayText","getItemValue","showNoResults","noResultsMessage","isLoading","onScroll","allowHtmlLabel","getItemDescription","getItemPrefix","getItemSuffix","enableDescription","noResultsSubtitle","length","renderNoResults","_templateObject3","map","kind","renderItem","item","renderRowsVirtualized","virtualItems","totalSize","_templateObject4","repeat","vItem","index","_templateObject5","posStyle","concat","start","size","_templateObject6","_templateObject7","renderVirtualizedOptions","data","measureElement","offsetTop","_templateObject8","renderMeasuredItem","renderPlainOptions","_templateObject9","_templateObject10","_templateObject11","renderNoData","noDataMessage","_templateObject12","_templateObject13","optionValue","displayText","isDisabled","disabled","className","description","_e$description","_e$prefix","suffix","isSelected","Array","isArray","some","v","String","_templateObject14","classMap","option","unsafeHTML","_e$description2","_e$prefix2","_e$suffix2","_templateObject15","_templateObject16","renderVirtualizedGrid","gridColumns","gridColumnWidth","colTemplate","_templateObject17","rowStart","rowItems","slice","_templateObject18","renderHorizontalGrid","gridRows","offsetLeft","_templateObject19","vCol","colStart","colItems","_templateObject20","renderAddCustomOption","searchValue","_templateObject21","shouldUseVirtualizer","arguments","undefined"],"mappings":"2rEAcaA,CAEX,kCAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,UAAAE,YAAA,CAAAF,CAAA,QAAAG,GAAA,qBAAAC,KAAA,CAAA,QAAA,CAAAC,iBAAOA,CAAkBC,CAAAA,CAAAA,CACvB,MA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AAAA,CAAAA,CAAAA,CAEA,MAAOV,CAAAA,CAAI,CAAAqG,iBAAA,GAAAA,iBAAA,CAAAnG,sBAAA,8KAECkG,CAAAA,CAEQ1F,CAAAA,CAEP0F,CAAAA,EAGd,CAED,GAAAxG,GAAA,wBAAAC,KAAA,SAAA,CAAAyG,oBAAOA,CAAqBzD,CAAAA,CAA2B,IAAdsC,CAAAA,CAAc,CAAAoB,SAAA,CAAAhF,MAAA,IAAAgF,SAAA,MAAAC,SAAA,CAAAD,SAAA,IAAA,CAAA,CACrD,MAAIpB,CAAAA,CAAAA,CAAc,CACXtC,EAAAA,CAAAA,CAAKtB,MAAU,EAAA,CACvB"}
@@ -0,0 +1,147 @@
1
+ import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-html.js";import{classMap as i}from"lit/directives/class-map.js";import{repeat as e}from"lit/directives/repeat.js";class s{static renderGroupHeader(o){return t`
2
+ <div
3
+ part="group-header"
4
+ class="combobox__group-header"
5
+ role="presentation"
6
+ data-group-id=${o.id}
7
+ style=${`--group-depth:${o.depth}`}
8
+ >
9
+ ${o.prefix?t`<nile-icon
10
+ class="combobox__group-prefix"
11
+ name=${o.prefix}
12
+ size="14"
13
+ method="fill"
14
+ ></nile-icon>`:""}
15
+ <span class="combobox__group-label">${o.label}</span>
16
+ </div>
17
+ `}static renderRowsPlain(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t`
18
+ <div
19
+ part="select-options"
20
+ class="combobox__options ${d?"loading":""}"
21
+ >
22
+ <div class="combobox__options-plain" @scroll=${p}>
23
+ ${o.map((t=>"header"===t.kind?s.renderGroupHeader(t):s.renderItem(t.item,i,e,r,n,c,$,v,b,u)))}
24
+ </div>
25
+ </div>
26
+ `}static renderRowsVirtualized(o,i,r,n,l,a,d,p,c,$,v,b,u){return t`
27
+ <div
28
+ part="select-options"
29
+ class="combobox__options ${p?"loading":""}"
30
+ >
31
+ <div style="position:relative;height:${i}px;width:100%;">
32
+ ${e(o,(t=>t.key),(o=>{const i=r[o.index];if(!i)return t``;const e=`position:absolute;top:0;left:0;right:0;transform:translateY(${o.start}px);height:${o.size}px;`;return"header"===i.kind?t`
33
+ <div style=${e} class="combobox__group-header-slot">
34
+ ${s.renderGroupHeader(i)}
35
+ </div>
36
+ `:t`
37
+ <div style=${e}>
38
+ ${s.renderItem(i.item,n,l,a,d,c,$,v,b,u)}
39
+ </div>
40
+ `}))}
41
+ </div>
42
+ </div>
43
+ `}static renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,$,v,b,u,m){const x=o.length>0?o[0].start:0;return t`
44
+ <div
45
+ part="select-options"
46
+ class="combobox__options ${p?"loading":""}"
47
+ >
48
+ <div style="position:relative;height:${i}px;width:100%;">
49
+ <div style="position:absolute;top:0;left:0;width:100%;transform:translateY(${x}px);">
50
+ ${e(o,(t=>t.key),(t=>{const o=r[t.index];return s.renderMeasuredItem(o,t.index,n,l,a,d,c,v,b,u,m)}))}
51
+ </div>
52
+ </div>
53
+ </div>
54
+ `}static renderPlainOptions(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t`
55
+ <div
56
+ part="select-options"
57
+ class="combobox__options ${d?"loading":""}"
58
+ >
59
+ <div class="combobox__options-plain" @scroll=${p}>
60
+ ${o.map((t=>s.renderItem(t,i,e,r,n,c,$,v,b,u)))}
61
+ </div>
62
+ </div>
63
+ `}static renderNoResults(o,i){return t`
64
+ <div part="select-options" class="combobox__options">
65
+ <div part="no-results" class="combobox__no-results">
66
+ <div part="no-results-title" class="combobox__no-results-title">
67
+ ${o||"No result found"}
68
+ </div>
69
+ ${i?t`<div part="no-results-subtitle" class="combobox__no-results-subtitle">${i}</div>`:""}
70
+ </div>
71
+ </div>
72
+ `}static renderNoData(o){return t`
73
+ <div part="select-options" class="combobox__options">
74
+ <div part="no-data" class="combobox__no-results">
75
+ <div part="no-data-title" class="combobox__no-results-title">
76
+ ${o||"No data available"}
77
+ </div>
78
+ </div>
79
+ </div>
80
+ `}static renderMeasuredItem(e,s,r,n,l,a,d,p,c,$,v){if(!e)return t``;const b=a(e),u=l(e),m=e?.disabled||!1,x=e?.className,_=p?p(e):e?.description??"",h=c?c(e):e?.prefix??"",g=$?$(e):e?.suffix??"";let f=!1;return f=n?Array.isArray(r)&&r.some((t=>String(t)===String(b))):String(Array.isArray(r)?r[0]:r)===String(b),t`
81
+ <nile-option
82
+ data-index=${s}
83
+ value=${b}
84
+ .selected=${f}
85
+ .disabled=${m}
86
+ .showCheckbox=${n}
87
+ class=${i({option:v??!1,[x??""]:!!x})}
88
+ .description=${_}
89
+ .isDescriptionEnabled=${v}
90
+ >
91
+ ${o(h)}
92
+ ${d?o(u):u}
93
+ ${o(g)}
94
+ </nile-option>
95
+ `}static renderItem(e,s,r,n,l,a,d,p,c,$){if(!e)return t``;const v=l(e),b=n(e),u=e?.disabled||!1,m=e?.className,x=d?d(e):e?.description??"",_=p?p(e):e?.prefix??"",h=c?c(e):e?.suffix??"";let g=!1;return g=r?Array.isArray(s)&&s.some((t=>String(t)===String(v))):String(Array.isArray(s)?s[0]:s)===String(v),t`
96
+ <nile-option
97
+ value=${v}
98
+ .selected=${g}
99
+ .disabled=${u}
100
+ .showCheckbox=${r}
101
+ class=${i({option:$??!1,[m??""]:!!m})}
102
+ .description=${x}
103
+ .isDescriptionEnabled=${$}
104
+ >
105
+ ${o(_)}
106
+ ${a?o(b):b}
107
+ ${o(h)}
108
+ </nile-option>
109
+ `}static renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){const x=o.length>0?o[0].start:0,_=m?`repeat(${a}, ${m}px)`:`repeat(${a}, 1fr)`;return t`
110
+ <div
111
+ part="select-options"
112
+ class="combobox__options ${c?"loading":""}"
113
+ >
114
+ <div style="position:relative;height:${i}px;width:${m?"max-content":"100%"};min-width:100%;">
115
+ <div style="position:absolute;top:0;left:0;width:${m?"max-content":"100%"};min-width:100%;transform:translateY(${x}px);">
116
+ ${e(o,(t=>t.key),(o=>{const i=o.index*a,e=r.slice(i,i+a);return t`
117
+ <div class="combobox__grid-row" style="display:grid;grid-template-columns:${_};gap:4px;">
118
+ ${e.map((t=>s.renderItem(t,n,l,d,p,$,v,b,u)))}
119
+ </div>
120
+ `}))}
121
+ </div>
122
+ </div>
123
+ </div>
124
+ `}static renderHorizontalGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){const x=o.length>0?o[0].start:0;return t`
125
+ <div
126
+ part="select-options"
127
+ class="combobox__options combobox__options--horizontal ${$?"loading":""}"
128
+ >
129
+ <div style="position:relative;width:${i}px;height:${38*a}px;">
130
+ <div style="position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(${x}px);">
131
+ ${e(o,(t=>t.key),(o=>{const i=o.index*a,e=r.slice(i,i+a);return t`
132
+ <div class="combobox__grid-col" style="width:${d}px;flex-shrink:0;display:flex;flex-direction:column;">
133
+ ${e.map((t=>s.renderItem(t,n,l,p,c,v,b,u,m)))}
134
+ </div>
135
+ `}))}
136
+ </div>
137
+ </div>
138
+ </div>
139
+ `}static renderAddCustomOption(o,i){return t`
140
+ <nile-option
141
+ value=${o}
142
+ class="combobox__add-option"
143
+ .showCheckbox=${i}
144
+ >
145
+ + Add "${o}"
146
+ </nile-option>
147
+ `}static shouldUseVirtualizer(t,o=1){return o>1||t.length>=5}}export{s as C};
@@ -0,0 +1,2 @@
1
+ System.register([],function(_export,_context){"use strict";var e;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){_export("C",e=/*#__PURE__*/function(){function e(){_classCallCheck(this,e);this.debounceTimer=null;}return _createClass(e,[{key:"filter",value:function filter(_e,t,s){if(!t||0===t.length)return{filteredItems:[],showNoResults:!0};if(!_e||""===_e.trim())return{filteredItems:_toConsumableArray(t),showNoResults:!1};var i=_e.toLowerCase(),l=t.filter(function(_e2){return s(_e2).toLowerCase().includes(i);});return{filteredItems:l,showNoResults:0===l.length};}},{key:"debounceSearch",value:function debounceSearch(_e3,t,s){var _this=this;this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){_e3(t),_this.debounceTimer=null;},s);}},{key:"cancelDebounce",value:function cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null);}}]);}());}};});
2
+ //# sourceMappingURL=search-manager.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-manager.cjs.js","sources":["../../../src/nile-combobox/search-manager.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport class ComboboxSearchManager {\n private debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n filter(\n searchValue: string,\n originalItems: any[],\n getSearchText: (item: any) => string,\n ): { filteredItems: any[]; showNoResults: boolean } {\n if (!originalItems || originalItems.length === 0) {\n return { filteredItems: [], showNoResults: true };\n }\n\n if (!searchValue || searchValue.trim() === '') {\n return { filteredItems: [...originalItems], showNoResults: false };\n }\n\n const needle = searchValue.toLowerCase();\n const filteredItems = originalItems.filter((item: any) => {\n const text = getSearchText(item);\n return text.toLowerCase().includes(needle);\n });\n\n return { filteredItems, showNoResults: filteredItems.length === 0 };\n }\n\n debounceSearch(\n callback: (query: string) => void,\n query: string,\n debounceMs: number,\n ): void {\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n this.debounceTimer = setTimeout(() => {\n callback(query);\n this.debounceTimer = null;\n }, debounceMs);\n }\n\n cancelDebounce(): void {\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n this.debounceTimer = null;\n }\n }\n}\n"],"names":["ComboboxSearchManager","e","constructor","this","debounceTimer","_createClass","key","value","filter","searchValue","originalItems","getSearchText","length","filteredItems","showNoResults","trim","_toConsumableArray","needle","toLowerCase","item","includes","debounceSearch","callback","query","debounceMs","clearTimeout","setTimeout","cancelDebounce"],"mappings":"oqEAOaA,0BAAb,SAAAC,EAAA,C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AKC,CAAAA,aAAAA,CAAgB,KAExB"}
@@ -0,0 +1 @@
1
+ class e{constructor(){this.debounceTimer=null}filter(e,t,s){if(!t||0===t.length)return{filteredItems:[],showNoResults:!0};if(!e||""===e.trim())return{filteredItems:[...t],showNoResults:!1};const i=e.toLowerCase(),l=t.filter((e=>s(e).toLowerCase().includes(i)));return{filteredItems:l,showNoResults:0===l.length}}debounceSearch(e,t,s){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e(t),this.debounceTimer=null}),s)}cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}}export{e as C};
@@ -0,0 +1,2 @@
1
+ System.register([],function(_export,_context){"use strict";var t;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){_export("C",t=/*#__PURE__*/function(){function t(){_classCallCheck(this,t);}return _createClass(t,null,[{key:"createOptionsFromValues",value:function createOptionsFromValues(_t,r,e,n){if(!_t||Array.isArray(_t)&&0===_t.length)return[];var s=Array.isArray(_t)?_t:[_t],u=n||function(_t2){var _t2$value;return(_t2$value=_t2===null||_t2===void 0?void 0:_t2.value)!==null&&_t2$value!==void 0?_t2$value:_t2;};return s.map(function(_t3){var n=r.find(function(r){var e=u(r);return String(e)===String(_t3);}),s=n?e(n):_t3;return{value:_t3,selected:!0,getTextLabel:function getTextLabel(){if("string"==typeof s&&/<[^>]+>/.test(s)){var _t4=document.createElement("div");return _t4.innerHTML=s,_t4.textContent||_t4.innerText||"";}return s;}};});}},{key:"toggleMultiValue",value:function toggleMultiValue(_t5,r){return _t5.includes(r)?_t5.filter(function(_t6){return _t6!==r;}):[].concat(_toConsumableArray(_t5),[r]);}},{key:"removeValue",value:function removeValue(_t7,r){return _t7.filter(function(_t8){return _t8!==r;});}}]);}());}};});
2
+ //# sourceMappingURL=selection-manager.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-manager.cjs.js","sources":["../../../src/nile-combobox/selection-manager.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport type { ComboboxOption } from './types.js';\n\nexport class ComboboxSelectionManager {\n static createOptionsFromValues(\n value: string | string[],\n data: any[],\n getDisplayText: (item: any) => string,\n getItemValue?: (item: any) => string\n ): ComboboxOption[] {\n if (!value || (Array.isArray(value) && value.length === 0)) {\n return [];\n }\n\n const values = Array.isArray(value) ? value : [value];\n const valueFn = getItemValue || ((item: any) => item?.value ?? item);\n\n return values.map(valueItem => {\n const item = data.find((d: any) => {\n const iv = valueFn(d);\n return String(iv) === String(valueItem);\n });\n\n const displayText = item ? getDisplayText(item) : valueItem;\n\n return {\n value: valueItem,\n selected: true,\n getTextLabel: () => {\n if (typeof displayText === 'string' && /<[^>]+>/.test(displayText)) {\n const div = document.createElement('div');\n div.innerHTML = displayText;\n return div.textContent || div.innerText || '';\n }\n return displayText;\n },\n };\n });\n }\n\n static toggleMultiValue(currentValues: string[], optionValue: string): string[] {\n if (currentValues.includes(optionValue)) {\n return currentValues.filter(v => v !== optionValue);\n }\n return [...currentValues, optionValue];\n }\n\n static removeValue(currentValues: string[], removeValue: string): string[] {\n return currentValues.filter(v => v !== removeValue);\n }\n}\n"],"names":["ComboboxSelectionManager","createOptionsFromValues","value","data","getDisplayText","getItemValue","Array","isArray","length","values","valueFn","item","map","valueItem","find","d","iv","String","displayText","selected","getTextLabel","test","div","document","createElement","innerHTML","textContent","innerText","key","toggleMultiValue","currentValues","optionValue","includes","filter","v","removeValue"],"mappings":"oqEASaA,CAAAA,kCAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,UAAAA,YAAAA,CAAAA,CAAAA,QAAAA,GAAAA,2BAAAA,KAAAA,CACX,QAAOC,CAAAA,uBAAAA,CACLC,EACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CAAAA,CAEA,GAAKH,CAAAA,EAAAA,EAAUI,KAAMC,CAAAA,OAAA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BAAOA,CAAiBC,GAAAA,CAAyBC,CAC/C,CAAA,CAAA,MAAID,CAAAA,GAAcE,CAAAA,QAAAA,CAASD,CAClBD,CAAAA,CAAAA,GAAAA,CAAcG,MAAOC,CAAAA,SAAAA,GAAAA,QAAKA,CAAAA,GAAMH,GAAAA,CAAAA,EAAAA,CAAAA,IAAAA,MAAAA,CAAAA,kBAAAA,CAE9BD,GAAAA,GAAeC,CAC3B,EAAA,EAED,GAAAH,GAAA,eAAA1B,KAAA,SAAOiC,CAAAA,WAAAA,CAAYL,GAAyBK,CAAAA,CAAAA,CAAAA,CAC1C,MAAOL,CAAAA,GAAAA,CAAcG,MAAOC,CAAAA,SAAAA,GAAAA,QAAKA,CAAAA,GAAMC,GAAAA,CAAAA,EAAAA,CACxC"}
@@ -0,0 +1 @@
1
+ class t{static createOptionsFromValues(t,r,e,n){if(!t||Array.isArray(t)&&0===t.length)return[];const s=Array.isArray(t)?t:[t],u=n||(t=>t?.value??t);return s.map((t=>{const n=r.find((r=>{const e=u(r);return String(e)===String(t)})),s=n?e(n):t;return{value:t,selected:!0,getTextLabel:()=>{if("string"==typeof s&&/<[^>]+>/.test(s)){const t=document.createElement("div");return t.innerHTML=s,t.textContent||t.innerText||""}return s}}}))}static toggleMultiValue(t,r){return t.includes(r)?t.filter((t=>t!==r)):[...t,r]}static removeValue(t,r){return t.filter((t=>t!==r))}}export{t as C};
@@ -0,0 +1,2 @@
1
+ System.register([],function(_export,_context){"use strict";return{setters:[],execute:function execute(){}};});
2
+ //# sourceMappingURL=types.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+
@@ -25,6 +25,7 @@ export { NileIconButton } from './nile-icon-button';
25
25
  export { NileMenuItem } from './nile-menu-item';
26
26
  export { NileDropdown } from './nile-dropdown';
27
27
  export { NileAutoComplete } from './nile-auto-complete';
28
+ export { NileCombobox } from './nile-combobox';
28
29
  export { NileChip } from './nile-chip';
29
30
  export { NileTextarea } from './nile-textarea';
30
31
  export { NileDatePicker } from './nile-date-picker';
package/dist/src/index.js CHANGED
@@ -25,6 +25,7 @@ export { NileIconButton } from './nile-icon-button';
25
25
  export { NileMenuItem } from './nile-menu-item';
26
26
  export { NileDropdown } from './nile-dropdown';
27
27
  export { NileAutoComplete } from './nile-auto-complete';
28
+ export { NileCombobox } from './nile-combobox';
28
29
  export { NileChip } from './nile-chip';
29
30
  export { NileTextarea } from './nile-textarea';
30
31
  export { NileDatePicker } from './nile-date-picker';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,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;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileOtpInput } from './nile-otp-input';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileCheckboxGroup } from './nile-checkbox-group';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSkeletonLoader } from './nile-skeleton-loader';\nexport { NileSelect } from './nile-select';\nexport { NileVirtualSelect } from './nile-virtual-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NileCarousel } from './nile-carousel';\nexport { NileCarouselItem } from './nile-carousel/nile-carousel-item';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileAccordion } from './nile-accordion';\nexport { NileDivider } from './nile-divider';\nexport { NileTitle } from './nile-title';\nexport { NileSectionMessage } from './nile-section-message';\nexport { NileToolbar } from './nile-toolbar';\nexport { NileInlineEdit } from './nile-inline-edit';\nexport { NileTable } from './nile-table';\nexport { NileFilterChip } from './nile-filter-chip';\nexport {NilePagination } from './nile-pagination';\nexport { NileSlider } from './nile-slider';\nexport { NileFileUpload } from './nile-file-upload';\nexport { NileFilePreview } from './nile-file-preview';\nexport { NileOptionGroup } from './nile-option-group';\nexport { NileGrid } from './nile-grid';\nexport { NileGridBody } from './nile-grid/nile-grid-body';\nexport { NileGridRow } from './nile-grid/nile-grid-row';\nexport { NileGridHeadItem } from './nile-grid/nile-grid-head-item';\nexport { NileGridCellItem } from './nile-grid/nile-grid-cell-item';\nexport { NileGridHead } from './nile-grid/nile-grid-head';\nexport { NileRichTextEditor } from './nile-rich-text-editor';\nexport { NileColorPicker } from './nile-color-picker';\nexport type { ColorPickerType, SwatchTooltip, PaletteEntry } from './nile-color-picker';\nexport { NileColorSwatch } from './nile-color-swatch';\n\n// Import version utility to set nile version in window object\nimport './version';\n\nexport { NileSideBar } from './nile-side-bar';\nexport { NileSideBarHeader } from './nile-side-bar-header';\nexport { NileSideBarLogo } from './nile-side-bar-logo';\nexport { NileSideBarExpand } from './nile-side-bar-expand';\nexport { NileSideBarGroup } from './nile-side-bar-group';\nexport { NileSideBarGroupItem } from './nile-side-bar-group-item';\nexport { NileSideBarGroupItemIcon } from './nile-side-bar-group-item-icon';\nexport { NileSideBarGroupItemText } from './nile-side-bar-group-item-text';\nexport { NileSideBarFooter } from './nile-side-bar-footer';\nexport { NileSideBarFooterItem } from './nile-side-bar-footer-item';\nexport { NileSideBarAction } from './nile-side-bar-action';\nexport { NileSideBarFooterText } from './nile-side-bar-footer-text';\nexport { NileSideBarActionMenuItem } from './nile-side-bar-action-menu-item';\nexport { NileSideBarActionMenu } from './nile-side-bar-action-menu';\nexport { NileInlineSidebarGroup } from './nile-inline-sidebar-group';\nexport { NileInlineSidebar } from './nile-inline-sidebar';\nexport { NileInlineSidebarItem } from './nile-inline-sidebar-item';\nexport { NileInlineSidebarPanel } from './nile-inline-sidebar-panel';\nexport { NileInlineSidebarPanelGroup } from './nile-inline-sidebar-panel-group';\nexport { NileliteTooltip } from './nile-lite-tooltip';\nexport { NileSideBarPanel } from './nile-side-bar-panel';\nexport { NileDetail } from './nile-detail';\nexport { NileQrCode } from './nile-qr-code';\nexport { NileNavTab } from './nile-nav-tab';\nexport { NileNavTabGroup } from './nile-nav-tab-group';\nexport { NileNavTabPanel } from './nile-nav-tab-panel';\nexport { NileFloatingPanel } from './nile-floating-panel';\nexport { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';\nexport { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAi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BAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileOtpInput } from './nile-otp-input';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileCheckboxGroup } from './nile-checkbox-group';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSkeletonLoader } from './nile-skeleton-loader';\nexport { NileSelect } from './nile-select';\nexport { NileVirtualSelect } from './nile-virtual-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileCombobox } from './nile-combobox';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NileCarousel } from './nile-carousel';\nexport { NileCarouselItem } from './nile-carousel/nile-carousel-item';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileAccordion } from './nile-accordion';\nexport { NileDivider } from './nile-divider';\nexport { NileTitle } from './nile-title';\nexport { NileSectionMessage } from './nile-section-message';\nexport { NileToolbar } from './nile-toolbar';\nexport { NileInlineEdit } from './nile-inline-edit';\nexport { NileTable } from './nile-table';\nexport { NileFilterChip } from './nile-filter-chip';\nexport {NilePagination } from './nile-pagination';\nexport { NileSlider } from './nile-slider';\nexport { NileFileUpload } from './nile-file-upload';\nexport { NileFilePreview } from './nile-file-preview';\nexport { NileOptionGroup } from './nile-option-group';\nexport { NileGrid } from './nile-grid';\nexport { NileGridBody } from './nile-grid/nile-grid-body';\nexport { NileGridRow } from './nile-grid/nile-grid-row';\nexport { NileGridHeadItem } from './nile-grid/nile-grid-head-item';\nexport { NileGridCellItem } from './nile-grid/nile-grid-cell-item';\nexport { NileGridHead } from './nile-grid/nile-grid-head';\nexport { NileRichTextEditor } from './nile-rich-text-editor';\nexport { NileColorPicker } from './nile-color-picker';\nexport type { ColorPickerType, SwatchTooltip, PaletteEntry } from './nile-color-picker';\nexport { NileColorSwatch } from './nile-color-swatch';\n\n// Import version utility to set nile version in window object\nimport './version';\n\nexport { NileSideBar } from './nile-side-bar';\nexport { NileSideBarHeader } from './nile-side-bar-header';\nexport { NileSideBarLogo } from './nile-side-bar-logo';\nexport { NileSideBarExpand } from './nile-side-bar-expand';\nexport { NileSideBarGroup } from './nile-side-bar-group';\nexport { NileSideBarGroupItem } from './nile-side-bar-group-item';\nexport { NileSideBarGroupItemIcon } from './nile-side-bar-group-item-icon';\nexport { NileSideBarGroupItemText } from './nile-side-bar-group-item-text';\nexport { NileSideBarFooter } from './nile-side-bar-footer';\nexport { NileSideBarFooterItem } from './nile-side-bar-footer-item';\nexport { NileSideBarAction } from './nile-side-bar-action';\nexport { NileSideBarFooterText } from './nile-side-bar-footer-text';\nexport { NileSideBarActionMenuItem } from './nile-side-bar-action-menu-item';\nexport { NileSideBarActionMenu } from './nile-side-bar-action-menu';\nexport { NileInlineSidebarGroup } from './nile-inline-sidebar-group';\nexport { NileInlineSidebar } from './nile-inline-sidebar';\nexport { NileInlineSidebarItem } from './nile-inline-sidebar-item';\nexport { NileInlineSidebarPanel } from './nile-inline-sidebar-panel';\nexport { NileInlineSidebarPanelGroup } from './nile-inline-sidebar-panel-group';\nexport { NileliteTooltip } from './nile-lite-tooltip';\nexport { NileSideBarPanel } from './nile-side-bar-panel';\nexport { NileDetail } from './nile-detail';\nexport { NileQrCode } from './nile-qr-code';\nexport { NileNavTab } from './nile-nav-tab';\nexport { NileNavTabGroup } from './nile-nav-tab-group';\nexport { NileNavTabPanel } from './nile-nav-tab-panel';\nexport { NileFloatingPanel } from './nile-floating-panel';\nexport { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';\nexport { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';"]}
@@ -44,13 +44,15 @@ let NileBreadcrumbItem = class NileBreadcrumbItem extends NileElement {
44
44
  }
45
45
  render() {
46
46
  return html `
47
- <slot
47
+ <div part="item"
48
48
  class=${classMap({
49
49
  'nile-breadcrumb-item__slot-text': !this.isLast,
50
50
  'nile-breadcrumb-item__last-slot-text': this.isLast,
51
51
  })}
52
52
  @click=${this.handleClick}
53
- ></slot>
53
+ >
54
+ <slot></slot>
55
+ </div>
54
56
  <nile-icon
55
57
  name=${this.separator}
56
58
  aria-label=${this.separator}
@@ -1 +1 @@
1
- {"version":3,"file":"nile-breadcrumb-item.js","sourceRoot":"","sources":["../../../src/nile-breadcrumb-item/nile-breadcrumb-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD;;;;;GAKG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,WAAW;IAA5C;;QASY,WAAM,GAAG,KAAK,CAAC;QAEhC,gBAAgB;QAEhB,qBAAqB;QAErB;;;WAGG;QAEyB,cAAS,GAAG,4DAA4D,CAAC;QAgCrG,gBAAgB;IAClB,CAAC;IApDC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAeO,WAAW;QACjB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;gBAEC,QAAQ,CAAC;YACf,iCAAiC,EAAE,CAAC,IAAI,CAAC,MAAM;YAC/C,sCAAsC,EAAE,IAAI,CAAC,MAAM;SACpD,CAAC;iBACO,IAAI,CAAC,WAAW;;;eAGlB,IAAI,CAAC,SAAS;qBACR,IAAI,CAAC,SAAS;;;gBAGnB,QAAQ,CAAC;YACf,6BAA6B,EAAE,IAAI;YACnC,oCAAoC,EAAE,IAAI,CAAC,MAAM;SAClD,CAAC;;;KAGL,CAAC;IACJ,CAAC;CAGF,CAAA;AA5CkB;IAAhB,KAAK,EAAE;kDAAwB;AAWJ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA0E;AApB1F,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAqD9B;;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-breadcrumb-item.css';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile BreadCrumb Item component.\n *\n * @tag nile-breadcrumb-item\n *\n */\n@customElement('nile-breadcrumb-item')\nexport class NileBreadcrumbItem extends NileElement {\n /**\n * The styles for BreadcrumbItem\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @state() private isLast = false;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n @property({ type: String }) separator = 'var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))';\n\n private handleClick() {\n if (this.isLast) {\n return;\n }\n this.emit('nile-click-item');\n }\n\n public render(): TemplateResult {\n return html`\n <slot\n class=${classMap({\n 'nile-breadcrumb-item__slot-text': !this.isLast,\n 'nile-breadcrumb-item__last-slot-text': this.isLast,\n })}\n @click=${this.handleClick}\n ></slot>\n <nile-icon\n name=${this.separator}\n aria-label=${this.separator}\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=\"var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))\"\n class=${classMap({\n 'nile-breadcrumb-item__arrow': true,\n 'nile-breadcrumb-item__arrow-hidden': this.isLast,\n })}\n size=\"14\"\n ></nile-icon>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileBreadcrumbItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-breadcrumb-item': NileBreadcrumbItem;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-breadcrumb-item.js","sourceRoot":"","sources":["../../../src/nile-breadcrumb-item/nile-breadcrumb-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD;;;;;GAKG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,WAAW;IAA5C;;QASY,WAAM,GAAG,KAAK,CAAC;QAEhC,gBAAgB;QAEhB,qBAAqB;QAErB;;;WAGG;QAEyB,cAAS,GAAG,4DAA4D,CAAC;QAkCrG,gBAAgB;IAClB,CAAC;IAtDC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAeO,WAAW;QACjB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;gBAEC,QAAQ,CAAC;YACf,iCAAiC,EAAE,CAAC,IAAI,CAAC,MAAM;YAC/C,sCAAsC,EAAE,IAAI,CAAC,MAAM;SACpD,CAAC;iBACO,IAAI,CAAC,WAAW;;;;;eAKlB,IAAI,CAAC,SAAS;qBACR,IAAI,CAAC,SAAS;;;gBAGnB,QAAQ,CAAC;YACf,6BAA6B,EAAE,IAAI;YACnC,oCAAoC,EAAE,IAAI,CAAC,MAAM;SAClD,CAAC;;;KAGL,CAAC;IACJ,CAAC;CAGF,CAAA;AA9CkB;IAAhB,KAAK,EAAE;kDAAwB;AAWJ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA0E;AApB1F,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAuD9B;;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-breadcrumb-item.css';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile BreadCrumb Item component.\n *\n * @tag nile-breadcrumb-item\n *\n */\n@customElement('nile-breadcrumb-item')\nexport class NileBreadcrumbItem extends NileElement {\n /**\n * The styles for BreadcrumbItem\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @state() private isLast = false;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n @property({ type: String }) separator = 'var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))';\n\n private handleClick() {\n if (this.isLast) {\n return;\n }\n this.emit('nile-click-item');\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"item\"\n class=${classMap({\n 'nile-breadcrumb-item__slot-text': !this.isLast,\n 'nile-breadcrumb-item__last-slot-text': this.isLast,\n })}\n @click=${this.handleClick}\n >\n <slot></slot>\n </div>\n <nile-icon\n name=${this.separator}\n aria-label=${this.separator}\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=\"var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))\"\n class=${classMap({\n 'nile-breadcrumb-item__arrow': true,\n 'nile-breadcrumb-item__arrow-hidden': this.isLast,\n })}\n size=\"14\"\n ></nile-icon>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileBreadcrumbItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-breadcrumb-item': NileBreadcrumbItem;\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright Aquera Inc 2025
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import type { ComboboxDataItem, ComboboxGroupItem, ComboboxRow, ComboboxOptionRow } from './types';
8
+ export declare function isGroup(item: any): item is ComboboxGroupItem;
9
+ export declare function hasGroups(data: any[]): boolean;
10
+ export declare function countOptionsDeep(group: ComboboxGroupItem): number;
11
+ export declare function flattenRows(data: ComboboxDataItem[]): ComboboxRow[];
12
+ export declare function getOptionRows(rows: ComboboxRow[]): ComboboxOptionRow[];
13
+ /**
14
+ * Filter rows by a query.
15
+ *
16
+ * Rules:
17
+ * - An option row is kept if its searchText matches.
18
+ * - If a group's label matches, the entire subtree (header + all descendant
19
+ * options + nested headers) is kept.
20
+ * - Otherwise a header is kept only if at least one descendant option matches.
21
+ * - Empty groups (no surviving descendants) are dropped.
22
+ */
23
+ export declare function filterRows(data: ComboboxDataItem[], query: string, getSearchText: (item: any) => string): {
24
+ rows: ComboboxRow[];
25
+ visibleOptionCount: number;
26
+ };
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Copyright Aquera Inc 2025
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export function isGroup(item) {
8
+ return !!item && typeof item === 'object' && item.type === 'group' && Array.isArray(item.options);
9
+ }
10
+ export function hasGroups(data) {
11
+ if (!Array.isArray(data))
12
+ return false;
13
+ for (const item of data) {
14
+ if (isGroup(item))
15
+ return true;
16
+ }
17
+ return false;
18
+ }
19
+ export function countOptionsDeep(group) {
20
+ let n = 0;
21
+ for (const child of group.options) {
22
+ if (isGroup(child))
23
+ n += countOptionsDeep(child);
24
+ else
25
+ n += 1;
26
+ }
27
+ return n;
28
+ }
29
+ export function flattenRows(data) {
30
+ const rows = [];
31
+ const walk = (items, depth, parentIds) => {
32
+ for (const item of items) {
33
+ if (isGroup(item)) {
34
+ rows.push({
35
+ kind: 'header',
36
+ id: item.id,
37
+ label: item.label,
38
+ prefix: item.prefix,
39
+ depth,
40
+ optionCount: countOptionsDeep(item),
41
+ });
42
+ walk(item.options, depth + 1, [...parentIds, item.id]);
43
+ }
44
+ else {
45
+ rows.push({
46
+ kind: 'option',
47
+ item: item,
48
+ depth,
49
+ parentIds,
50
+ });
51
+ }
52
+ }
53
+ };
54
+ walk(Array.isArray(data) ? data : [], 0, []);
55
+ return rows;
56
+ }
57
+ export function getOptionRows(rows) {
58
+ const out = [];
59
+ for (const r of rows)
60
+ if (r.kind === 'option')
61
+ out.push(r);
62
+ return out;
63
+ }
64
+ /**
65
+ * Filter rows by a query.
66
+ *
67
+ * Rules:
68
+ * - An option row is kept if its searchText matches.
69
+ * - If a group's label matches, the entire subtree (header + all descendant
70
+ * options + nested headers) is kept.
71
+ * - Otherwise a header is kept only if at least one descendant option matches.
72
+ * - Empty groups (no surviving descendants) are dropped.
73
+ */
74
+ export function filterRows(data, query, getSearchText) {
75
+ const q = (query || '').trim().toLowerCase();
76
+ if (!q) {
77
+ const rows = flattenRows(data);
78
+ return { rows, visibleOptionCount: getOptionRows(rows).length };
79
+ }
80
+ const matchedOption = (item) => {
81
+ const text = (getSearchText(item) || '').toString().toLowerCase();
82
+ return text.includes(q);
83
+ };
84
+ const walk = (item, ancestorLabelMatched) => {
85
+ if (isGroup(item)) {
86
+ const labelMatched = item.label.toLowerCase().includes(q);
87
+ const keepAll = labelMatched || ancestorLabelMatched;
88
+ const children = [];
89
+ for (const child of item.options) {
90
+ const sub = walk(child, keepAll);
91
+ if (sub)
92
+ children.push(sub);
93
+ }
94
+ if (children.length === 0 && !keepAll)
95
+ return null;
96
+ // If keepAll but nothing came back (empty group), still emit so user sees label.
97
+ return { kind: 'group', group: item, children };
98
+ }
99
+ if (ancestorLabelMatched || matchedOption(item)) {
100
+ return { kind: 'option', item: item };
101
+ }
102
+ return null;
103
+ };
104
+ const tops = [];
105
+ for (const top of data) {
106
+ const r = walk(top, false);
107
+ if (r)
108
+ tops.push(r);
109
+ }
110
+ // Materialize back to flat rows.
111
+ const rows = [];
112
+ const emit = (results, depth, parentIds) => {
113
+ for (const r of results) {
114
+ if (!r)
115
+ continue;
116
+ if (r.kind === 'group') {
117
+ rows.push({
118
+ kind: 'header',
119
+ id: r.group.id,
120
+ label: r.group.label,
121
+ prefix: r.group.prefix,
122
+ depth,
123
+ optionCount: countOptionsDeep(r.group),
124
+ });
125
+ emit(r.children, depth + 1, [...parentIds, r.group.id]);
126
+ }
127
+ else {
128
+ rows.push({
129
+ kind: 'option',
130
+ item: r.item,
131
+ depth,
132
+ parentIds,
133
+ });
134
+ }
135
+ }
136
+ };
137
+ emit(tops, 0, []);
138
+ return { rows, visibleOptionCount: getOptionRows(rows).length };
139
+ }
140
+ //# sourceMappingURL=group-utils.js.map