@nanoporetech-digital/components 6.6.1 → 6.8.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 (186) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/index-14451c95.js +4 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
  5. package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-components.cjs.js +1 -1
  9. package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
  10. package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +1 -1
  12. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nano-global-nav.cjs.entry.js +6 -6
  14. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nano-global-search-results.cjs.entry.js +4 -0
  16. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nano-hero.cjs.entry.js +1 -1
  18. package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nano-input.cjs.entry.js +1 -1
  20. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nano-more-less.cjs.entry.js +77 -0
  22. package/dist/cjs/nano-more-less.cjs.entry.js.map +1 -0
  23. package/dist/cjs/nano-sticker.cjs.entry.js +3 -1
  24. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  25. package/dist/cjs/{nano-table-fc1bbee6.js → nano-table-b4de2576.js} +2 -3
  26. package/dist/cjs/nano-table-b4de2576.js.map +1 -0
  27. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  28. package/dist/cjs/{table.worker-ebd2715a.js → table.worker-074a4646.js} +2 -2
  29. package/dist/cjs/table.worker-074a4646.js.map +1 -0
  30. package/dist/collection/collection-manifest.json +1 -0
  31. package/dist/collection/components/checkbox/checkbox-group.css +0 -1
  32. package/dist/collection/components/checkbox/checkbox.css +0 -1
  33. package/dist/collection/components/file-upload/file-upload.css +0 -1
  34. package/dist/collection/components/global-nav/global-nav.js +5 -6
  35. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  36. package/dist/collection/components/global-nav/style/global-nav.css +2 -18
  37. package/dist/collection/components/global-search-results/global-search-results.js +24 -0
  38. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  39. package/dist/collection/components/hero/hero.css +2 -3
  40. package/dist/collection/components/input/input.css +0 -1
  41. package/dist/collection/components/more-less/more-less.js +178 -0
  42. package/dist/collection/components/more-less/more-less.js.map +1 -0
  43. package/dist/collection/components/select/select.css +0 -1
  44. package/dist/collection/components/sticker/sticker.js +3 -1
  45. package/dist/collection/components/sticker/sticker.js.map +1 -1
  46. package/dist/collection/components/table/table.cell.js +0 -1
  47. package/dist/collection/components/table/table.cell.js.map +1 -1
  48. package/dist/collection/components/table/table.js +5 -2
  49. package/dist/collection/components/table/table.js.map +1 -1
  50. package/dist/collection/utils/custom-template.js +78 -0
  51. package/dist/collection/utils/custom-template.js.map +1 -0
  52. package/dist/components/index.d.ts +1 -0
  53. package/dist/components/index.js +1 -0
  54. package/dist/components/index.js.map +1 -1
  55. package/dist/components/input.js +1 -1
  56. package/dist/components/input.js.map +1 -1
  57. package/dist/components/nano-checkbox-group.js +1 -1
  58. package/dist/components/nano-checkbox-group.js.map +1 -1
  59. package/dist/components/nano-checkbox.js +1 -1
  60. package/dist/components/nano-checkbox.js.map +1 -1
  61. package/dist/components/nano-file-upload.js +1 -1
  62. package/dist/components/nano-file-upload.js.map +1 -1
  63. package/dist/components/nano-global-nav.js +24 -30
  64. package/dist/components/nano-global-nav.js.map +1 -1
  65. package/dist/components/nano-global-search-results.js +6 -1
  66. package/dist/components/nano-global-search-results.js.map +1 -1
  67. package/dist/components/nano-hero.js +1 -1
  68. package/dist/components/nano-hero.js.map +1 -1
  69. package/dist/components/nano-more-less.d.ts +11 -0
  70. package/dist/components/nano-more-less.js +98 -0
  71. package/dist/components/nano-more-less.js.map +1 -0
  72. package/dist/components/select.js +1 -1
  73. package/dist/components/select.js.map +1 -1
  74. package/dist/components/sticker.js +3 -1
  75. package/dist/components/sticker.js.map +1 -1
  76. package/dist/components/table.js +0 -1
  77. package/dist/components/table.js.map +1 -1
  78. package/dist/esm/index-9695db0a.js +4 -0
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/nano-checkbox-group.entry.js +1 -1
  81. package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
  82. package/dist/esm/nano-checkbox.entry.js +1 -1
  83. package/dist/esm/nano-checkbox.entry.js.map +1 -1
  84. package/dist/esm/nano-components.js +1 -1
  85. package/dist/esm/nano-file-upload.entry.js +1 -1
  86. package/dist/esm/nano-file-upload.entry.js.map +1 -1
  87. package/dist/esm/nano-global-nav-user-profile_3.entry.js +1 -1
  88. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  89. package/dist/esm/nano-global-nav.entry.js +6 -6
  90. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  91. package/dist/esm/nano-global-search-results.entry.js +4 -0
  92. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  93. package/dist/esm/nano-hero.entry.js +1 -1
  94. package/dist/esm/nano-hero.entry.js.map +1 -1
  95. package/dist/esm/nano-input.entry.js +1 -1
  96. package/dist/esm/nano-input.entry.js.map +1 -1
  97. package/dist/esm/nano-more-less.entry.js +73 -0
  98. package/dist/esm/nano-more-less.entry.js.map +1 -0
  99. package/dist/esm/nano-sticker.entry.js +3 -1
  100. package/dist/esm/nano-sticker.entry.js.map +1 -1
  101. package/dist/esm/{nano-table-52224679.js → nano-table-dd08a12c.js} +2 -3
  102. package/dist/esm/nano-table-dd08a12c.js.map +1 -0
  103. package/dist/esm/nano-table.entry.js +1 -1
  104. package/dist/esm/{table.worker-2b9e10f0.js → table.worker-094f28de.js} +2 -2
  105. package/dist/esm/table.worker-094f28de.js.map +1 -0
  106. package/dist/nano-assets/hash.txt +1 -1
  107. package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
  108. package/dist/nano-components/nano-checkbox-group.entry.js.map +1 -1
  109. package/dist/nano-components/nano-checkbox.entry.js +1 -1
  110. package/dist/nano-components/nano-checkbox.entry.js.map +1 -1
  111. package/dist/nano-components/nano-components.esm.js +1 -1
  112. package/dist/nano-components/nano-components.esm.js.map +1 -1
  113. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  114. package/dist/nano-components/nano-file-upload.entry.js.map +1 -1
  115. package/dist/nano-components/nano-global-nav-user-profile_3.entry.js +1 -1
  116. package/dist/nano-components/nano-global-nav-user-profile_3.entry.js.map +1 -1
  117. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  118. package/dist/nano-components/nano-global-nav.entry.js.map +1 -1
  119. package/dist/nano-components/nano-global-search-results.entry.js +1 -1
  120. package/dist/nano-components/nano-global-search-results.entry.js.map +1 -1
  121. package/dist/nano-components/nano-hero.entry.js +1 -1
  122. package/dist/nano-components/nano-hero.entry.js.map +1 -1
  123. package/dist/nano-components/nano-input.entry.js +1 -1
  124. package/dist/nano-components/nano-input.entry.js.map +1 -1
  125. package/dist/nano-components/nano-more-less.entry.js +5 -0
  126. package/dist/nano-components/nano-more-less.entry.js.map +1 -0
  127. package/dist/nano-components/nano-sticker.entry.js +1 -1
  128. package/dist/nano-components/nano-sticker.entry.js.map +1 -1
  129. package/dist/nano-components/nano-table-dd08a12c.js +5 -0
  130. package/dist/nano-components/nano-table-dd08a12c.js.map +1 -0
  131. package/dist/nano-components/nano-table.entry.js +1 -1
  132. package/dist/nano-components/table.worker-094f28de.js +5 -0
  133. package/dist/themes/nanopore.cn.css +1 -1
  134. package/dist/themes/nanopore.cn.css.map +1 -1
  135. package/dist/themes/nanopore.css +1 -1
  136. package/dist/themes/nanopore.css.map +1 -1
  137. package/dist/types/components/global-nav/global-nav.d.ts +0 -1
  138. package/dist/types/components/global-search-results/global-search-results.d.ts +2 -0
  139. package/dist/types/components/more-less/more-less.d.ts +35 -0
  140. package/dist/types/components/table/table.d.ts +1 -1
  141. package/dist/types/components.d.ts +63 -2
  142. package/dist/types/utils/custom-template.d.ts +60 -0
  143. package/docs-json.json +168 -21
  144. package/docs-vscode.json +25 -0
  145. package/hydrate/index.js +107 -16
  146. package/package.json +2 -2
  147. package/dist/cjs/nano-table-fc1bbee6.js.map +0 -1
  148. package/dist/cjs/table.worker-ebd2715a.js.map +0 -1
  149. package/dist/esm/nano-table-52224679.js.map +0 -1
  150. package/dist/esm/table.worker-2b9e10f0.js.map +0 -1
  151. package/dist/nano-assets/fonts/3AF163_15_0.woff +0 -0
  152. package/dist/nano-assets/fonts/3AF163_15_0.woff2 +0 -0
  153. package/dist/nano-assets/fonts/3AF163_16_0.woff +0 -0
  154. package/dist/nano-assets/fonts/3AF163_16_0.woff2 +0 -0
  155. package/dist/nano-assets/fonts/3AF163_17_0.woff +0 -0
  156. package/dist/nano-assets/fonts/3AF163_17_0.woff2 +0 -0
  157. package/dist/nano-assets/fonts/3AF163_1B_0.woff +0 -0
  158. package/dist/nano-assets/fonts/3AF163_1B_0.woff2 +0 -0
  159. package/dist/nano-assets/fonts/3AF163_1C_0.woff +0 -0
  160. package/dist/nano-assets/fonts/3AF163_1C_0.woff2 +0 -0
  161. package/dist/nano-assets/fonts/3AF163_1_0.woff +0 -0
  162. package/dist/nano-assets/fonts/3AF163_1_0.woff2 +0 -0
  163. package/dist/nano-assets/fonts/3AF163_2A_0.woff +0 -0
  164. package/dist/nano-assets/fonts/3AF163_2A_0.woff2 +0 -0
  165. package/dist/nano-assets/fonts/3AF163_2_0.woff +0 -0
  166. package/dist/nano-assets/fonts/3AF163_2_0.woff2 +0 -0
  167. package/dist/nano-assets/fonts/3AF163_5_0.woff +0 -0
  168. package/dist/nano-assets/fonts/3AF163_5_0.woff2 +0 -0
  169. package/dist/nano-assets/fonts/3AF163_8_0.woff +0 -0
  170. package/dist/nano-assets/fonts/3AF163_8_0.woff2 +0 -0
  171. package/dist/nano-assets/fonts/3AF163_9_0.woff +0 -0
  172. package/dist/nano-assets/fonts/3AF163_9_0.woff2 +0 -0
  173. package/dist/nano-assets/fonts/3AF163_A_0.woff +0 -0
  174. package/dist/nano-assets/fonts/3AF163_A_0.woff2 +0 -0
  175. package/dist/nano-assets/fonts/3AF163_B_0.woff +0 -0
  176. package/dist/nano-assets/fonts/3AF163_B_0.woff2 +0 -0
  177. package/dist/nano-assets/fonts/3AF163_C_0.woff +0 -0
  178. package/dist/nano-assets/fonts/3AF163_C_0.woff2 +0 -0
  179. package/dist/nano-assets/fonts/HVMicro500.woff +0 -0
  180. package/dist/nano-assets/fonts/HVMicro500.woff2 +0 -0
  181. package/dist/nano-assets/fonts/HVMicro500It.woff +0 -0
  182. package/dist/nano-assets/fonts/HVMicro500It.woff2 +0 -0
  183. package/dist/nano-components/nano-table-52224679.js +0 -5
  184. package/dist/nano-components/nano-table-52224679.js.map +0 -1
  185. package/dist/nano-components/table.worker-2b9e10f0.js +0 -5
  186. /package/dist/nano-components/{table.worker-2b9e10f0.js.map → table.worker-094f28de.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EAED,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAGL,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAA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,\n Prop,\n h,\n ComponentInterface,\n Element,\n Host,\n Watch,\n State,\n readTask,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n NanoResizeObserveCustomEvent,\n ResizeStateChangeEventDetail,\n TableTypes,\n} from '../../interface';\nimport { findScrollParent } from '../../utils/scroll-parent';\nimport { TableColHead } from './table.header';\nimport { TableRow, TableHeadFootRow } from './table.row';\nimport { TableCell } from './table.cell';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n generateStore,\n storeSearch,\n storeSetConfig,\n storeSetData,\n storeSort,\n storeFilter,\n TableStores,\n} from './table.store';\nimport { isInViewport } from './table.utils';\nimport { TablePinService } from './table.pin-service';\n\nconst measurePerf = false;\n\nfunction perMark(name: string, end: boolean = false) {\n if (!performance || !measurePerf) return;\n if (end) {\n performance?.mark('end' + name);\n performance?.measure(name, 'start' + name, 'end' + name);\n const entries = performance?.getEntriesByName(name);\n console.info(entries[entries.length ? entries.length - 1 : 0]);\n } else {\n performance?.mark('start' + name);\n }\n}\n\nlet id = 0;\n/**\n * A performant, accessible and semantic (uses real html `<table />`, `<tr />` etc) table and data-grid solution.\n *\n *- Built-in search\n *- Built-in column filter\n *- Built-in column sort\n *- Easily swap in API / async based search / filter & sort\n *- Pin headers, footers, rows, columns\n *- Add custom rendering at every level\n *- Add custom properties at every level\n *\n * @slot caption - The table's caption. You must either use this or the `caption` attribute.\n * @slot no-results - text to display when search or filtering yields no results\n */\n@Component({\n tag: 'nano-table',\n styleUrl: 'table.scss',\n})\nexport class Table implements ComponentInterface {\n constructor() {\n this.debounceSetLoading = debounce(this.debounceSetLoading.bind(this), 50);\n }\n // Public API\n\n // Props\n\n /** Function called whenever `col.cellTemplate` renders an unknown object.\n * The function should render a valid HTMLElement to the cell arg.\n * Example usage - render JSX from a 3rd party lib and append the result to the cell element. */\n @Prop() customRenderer: (\n node: any,\n cell: HTMLElement\n ) => void | Promise<string>;\n\n /** The type of table. Grid type will make cells navigable by keyboard */\n @Prop() type: 'grid' | 'table' = 'table';\n\n /** A descriptive title of the table.\n * You must use this or the `slot=\"caption\"` for accessibility */\n @Prop() caption: string;\n\n /** Show the caption on-screen */\n @Prop() showCaption: boolean = false;\n\n /** Will show a loading state when set to true.\n * By default, will be shown automatically if `rows` is a promise waiting to resolve / or falsy\n * *or* when performing custom filtering or sorting.\n * *Note* when set manually, will overwrite any internal loading state.\n * Set to 'undefined' to revert to default behaviour. */\n @Prop() loading: boolean = undefined;\n\n get _loading() {\n return this.loading !== undefined ? this.loading : this.internalLoading;\n }\n set _loading(l: boolean) {\n if (this.loading !== undefined) return;\n this.debounceSetLoading(l);\n }\n private debounceSetLoading(l: boolean) {\n this.internalLoading = l;\n }\n @State() internalLoading = true;\n\n /** When loading rows asynchronously, this will render this number of placeholder rows */\n @Prop() placeholderSize = 5;\n\n /** The data to place in the table */\n @Prop({ mutable: true }) rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) {\n this._loading = true;\n return;\n }\n\n this._loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n // reset everything\n this.currentFilters = '';\n this.currentSort = '';\n await this.columnInit();\n\n if (!this.isReady)\n requestAnimationFrame(() => this.setInitialBlockDimension());\n this._loading = false;\n if (this.tablePinnedService) this.tablePinnedService.assessRows();\n });\n }\n\n /** The column config used to present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable<any>['columns'] = [];\n\n @Watch('columns')\n async handleColsChange() {\n await storeSetConfig(this.host, this.columns);\n if (this.isReady) this.columnInit();\n }\n\n /** Used for custom thead row rendering */\n @Prop() headRender: TableTypes.HeadFootRenderer = { pinned: 'top' };\n\n /** Used for custom row rendering */\n @Prop() rowRender: TableTypes.RowRenderer;\n\n /** Used for custom tfoot row rendering */\n @Prop() footRender: TableTypes.HeadFootRenderer = { pinned: 'bottom' };\n\n /** Whether to show a `<tfoot>` component */\n @Prop() showFooter = false;\n\n /** To improve performance, data is split into blocks\n * which are shown / hidden and rendered as they become visible.\n * Use this to control the number of hits within a block -\n * A block should fill a scrolling viewport.\n * The less perBlock the better for performance */\n @Prop() perBlock = 50;\n\n /** The number of total blocks currently rendered in the table. @readonly */\n @Prop()\n get blocksLength() {\n return this.blocks.length;\n }\n\n /** Term to search for in the data */\n @Prop() searchTerm: string;\n\n /** A custom filtering function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsy, the sort will be performed by the component.\n * A good use-case would be performing the filter on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customFilterFn?: (\n filters: TableTypes.Filter[]\n ) => Promise<true | TableTypes.Falsy>;\n\n /** A custom sorting function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsey, the sort will be performed by the component.\n * A good use-case would be performing the sort on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customSortFn?: (\n property: TableTypes.Prop,\n order: TableTypes.Order\n ) => Promise<true | TableTypes.Falsy>;\n\n /**\n * The default sortable option for all columns.\n * `true` will enable column sorting unless you set `sortable: false` on a column\n * `false` will disable column sorting unless you set `sortable: true` on a column\n */\n @Prop() defaultSort = true;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\n\n /** Use this to render the table with roughly the correct dimensions.\n * a use-case might be; fetch a small initial dataset to minimise load-time,\n * render the table with the correct dimensions, the table becomes interactive,\n * load the rest of the data\n */\n @Prop() virtualTotalItems: number = 0;\n\n @Watch('virtualTotalItems')\n virtualTotalItemsChangeHandler() {\n this.setBlocks();\n }\n\n /** @readonly - shows the currently applied filters */\n @Prop()\n get appliedFilters() {\n return this.filters;\n }\n\n /** Fired when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\n\n /** Fired whenever a block is activated by scrolling into view / becoming visible\n * This could be leveraged for infinite scrolling / to fetch more data.\n */\n @Event() nanoTblBlockRendered: EventEmitter<{\n block: number;\n totalBlocks: number;\n }>;\n\n /** Fired before a column is sorted.\n * `event.preventDefault()` to stop sorting. */\n @Event() nanoTblBeforeSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired before a column is filtered.\n * `event.preventDefault()` to stop filtering. */\n @Event() nanoTblBeforeFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeSearch: EventEmitter<{ term: string }>;\n\n /** Fired after a general / cross column search */\n @Event() nanoTblAfterSearch: EventEmitter<{ term: string }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeEdit: EventEmitter<{ term: string }>;\n\n /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!col) return;\n return this.sortStart(null, col.prop);\n }\n\n /** Apply a sort on a column\n * @returns a promise which resolves when complete */\n @Method()\n async addSort(column: TableTypes.Prop, order: TableTypes.Order) {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => c.prop === column\n );\n if (!col) throw 'Cannot find column with ' + column;\n return this.sortStart(order, col.prop);\n }\n\n /** Remove any column filters currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetFilters() {\n this.filters = [];\n return this.filterStart();\n }\n\n /** Apply a filter on a column\n * @param filters - the filters to apply\n * @param additive - if true, will add the filters to any currently applied\n * @returns a promise which resolves when complete\n */\n @Method()\n async addFilters(filters: TableTypes.Filter[], additive: boolean = true) {\n if (!additive) this.filters = [];\n return this.filterStart(filters, additive);\n }\n\n /** Remove filters from a column\n * @param columnNames - the filters to apply\n * @returns a promise which resolves when complete\n */\n @Method()\n async removeFilters(columnNames: TableTypes.Prop[]) {\n this.filters = this.filters.filter((f) => !columnNames.includes(f.prop));\n return this.filterStart();\n }\n\n /** Updates a row model at a given index\n * @param row - the row to update.\n * @param rowIndex - the row index to insert this row\n */\n @Method()\n async updateRow(row: TableTypes.RowData, rowIndex: number) {\n (this.rows as TableTypes.NanoTable['rows']).splice(rowIndex, 1, row);\n this.handleRowsChange();\n }\n\n // TODO.\n // change this.rows to be a Map instead?\n // this will allow 'padding' < inserting row data at a non-adjacent index\n\n // /**\n // * During pagination or infinite scroll\n // * you may not always want to load data in serial order.\n // * This method allows you to insert a block of results at a particular index.\n // * Use in-conjunction with `virtualTotalItems`\n // * @param blockIndex - where to insert\n // * @param rows - what to insert\n // */\n // @Method()\n // async insertBlock(blockIndex: number, rows: TableTypes.NanoTable['rows']) {\n // this.pauseAutoBlockAssign = true;\n // const cRows = (this.rows as TableTypes.NanoTable['rows']);\n\n // if (cRows.length < (blockIndex * this.perBlock)) {\n // (this.rows as TableTypes.NanoTable['rows'])\n // }\n\n // (this.rows as TableTypes.NanoTable['rows']).splice((blockIndex * this.perBlock)-1, 0, ...rows);\n\n // console.log(this.rows)\n // debugger;\n\n // await this.handleRowsChange(this.rows);\n // this.blocks[blockIndex] = {rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join())};\n // this.blocks = this.blocks;\n // this.pauseAutoBlockAssign = true;\n\n // console.log(this.rows, this.blocks)\n // }\n\n // Private State\n\n @Element() host: HTMLNanoTableElement;\n private renderId = 'tbl-' + id++;\n private store: TableStores;\n private filters: TableTypes.Filter[] = [];\n private currentFilters = '[]';\n private currentSort = '';\n private tableEle: HTMLTableElement;\n private topAnchorEle: HTMLElement;\n private tableWrapperEle: HTMLElement;\n private activeWatcherIo: IntersectionObserver;\n private tablePinnedService: TablePinService;\n\n // Block view management\n\n /** `tr` elements split into units - defined by `perBlock`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1];\n\n private measureHeight = 0;\n private blockElements: HTMLTableSectionElement[];\n private blockHeights: { blockIndex: number; height: number }[] = [];\n\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n const potentialHeight = el.getBoundingClientRect().height;\n this.measureHeight =\n Math.abs(this.measureHeight - potentialHeight) < 5\n ? this.measureHeight\n : potentialHeight;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n\n private unitHeight = 0;\n\n private get scrollParent() {\n return this._scrollParent;\n }\n\n private set scrollParent(ele: HTMLElement) {\n if (ele === this._scrollParent) return;\n\n if (this._scrollParent) {\n (this._scrollParent === document.documentElement\n ? document\n : this._scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n (ele === document.documentElement ? document : ele).addEventListener(\n 'scroll',\n this.scrollHandler\n // {passive: true}\n );\n this._scrollParent = ele;\n }\n\n private _scrollParent: HTMLElement;\n\n // used to fire `nanoTblBlockRendered` on block render change\n private get primaryBlockIndex() {\n return this._primaryBlockIndex;\n }\n\n private set primaryBlockIndex(blockIndex) {\n if (this._primaryBlockIndex === blockIndex) return;\n\n this._primaryBlockIndex = blockIndex;\n\n // fire block change event\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n }\n\n private _primaryBlockIndex;\n\n // Misc.\n\n private get isReady() {\n return this._isReady;\n }\n private set isReady(ready: boolean) {\n if (ready === this._isReady) return;\n this._isReady = ready;\n if (this.isReady) requestAnimationFrame(() => this.handleReady());\n }\n private _isReady = false;\n\n // Private Logic\n\n // Listeners\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n try {\n const idRow = document.querySelector(hash);\n if (idRow) idRow.scrollIntoView();\n } catch (e) {}\n }\n this.nanoTblReady.emit();\n }\n\n /**\n * Start a sort - can be cancelled by `preventDefault`\n * @param order - column order\n * @param column - column config object\n * @returns A promise\n */\n private sortStart = async (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n element?: HTMLElement\n ) => {\n // did order change?\n if (this.currentSort === order + ':' + column) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSort.emit({ column: column, order });\n if (sortEvent.defaultPrevented) return;\n perMark('sort');\n this.currentSort = order + ':' + column;\n\n // doesn't make sense to leave user in place for a sort\n this.scrollToTop(element);\n\n if (this.customSortFn) {\n try {\n const res = await this.customSortFn(column, order);\n\n // if the response is 'true', the custom sort did it's thing\n // handover to finish and stop loading state.\n // if response is falsey, carry on to do a FE sort\n if (res === true) {\n this.sortComplete(order, column);\n this._loading = false;\n return;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom sort failed', e);\n this.currentSort = '';\n this._loading = false;\n return;\n }\n }\n\n try {\n await storeSort(this.host, column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('sort failed', e);\n this.currentSort = '';\n } finally {\n if (this.blocks.length) this._loading = false;\n }\n };\n\n /**\n * Complete a sort. Reflects the order to ui.\n * @param order - column order\n * @param column - column config object\n */\n private sortComplete(order: TableTypes.Order, column: TableTypes.Prop) {\n this.columns = this.columns.map((c) => {\n if (c.prop === column) return { ...c, order };\n return { ...c, order: null };\n });\n this.nanoTblAfterSort.emit({ column: column, order });\n perMark('sort', true);\n }\n\n private async searchStart() {\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSearch.emit({ term: this.searchTerm });\n if (sortEvent.defaultPrevented) return;\n perMark('search');\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n try {\n await storeSearch(this.host, this.searchTerm);\n this.nanoTblAfterSearch.emit({ term: this.searchTerm });\n perMark('search', true);\n } catch (e) {\n console.warn('search failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private async filterStart(\n filters?: TableTypes.Filter[],\n additive: boolean = true\n ) {\n if (filters) {\n if (additive) {\n this.filters = [\n ...this.filters.filter(\n (f) => !filters.find((ff) => ff.prop === f.prop)\n ),\n ...filters,\n ];\n } else {\n this.filters = filters;\n }\n }\n\n if (this.currentFilters === JSON.stringify(this.filters)) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeFilter.emit({ filters: this.filters });\n if (sortEvent.defaultPrevented) return;\n perMark('filter');\n this.currentFilters = JSON.stringify(this.filters);\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n if (this.customFilterFn) {\n try {\n const res = await this.customFilterFn(this.filters);\n\n // if the response is 'true', the custom filter did it's thing\n // handover to finish and stop loading state.\n // if response is falsy, carry on to do a FE filter\n if (res === true) {\n this.filterComplete();\n this._loading = false;\n return;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n this._loading = false;\n return;\n }\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('filter failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private filterComplete() {\n this.columns = this.columns.map((c) => {\n const cFilter = this.filters.find((f) => f.prop === c.prop);\n // if we found a filter AND\n // it isn't true / false and has a length OR\n // it is true or false\n if (\n cFilter &&\n ((typeof cFilter.filter !== 'boolean' && cFilter.filter.length) ||\n typeof cFilter.filter === 'boolean')\n )\n c.filter = cFilter.filter;\n // if a filter value is not set OR\n // it isn't true / false and has no length\n else if (\n (c.filter !== null && c.filter !== undefined) ||\n (!!c.filter && typeof c.filter !== 'boolean' && !c.filter.length)\n )\n c.filter = undefined;\n\n return c;\n });\n this.nanoTblAfterFilter.emit({ filters: this.filters });\n perMark('filter', true);\n }\n\n /** Scrolls to the top immediately - used whilst sorting / filtering */\n private scrollToTop(element?: HTMLElement) {\n const scrollBehaviour = this.scrollParent.style?.scrollBehavior;\n const scrollX = this.scrollParent.scrollLeft;\n this.scrollParent.style.scrollBehavior = 'auto';\n\n if (this.topAnchorEle && !isInViewport(this.topAnchorEle, 0.1)) {\n this.host.scrollIntoView();\n }\n if (element && !isInViewport(element, 1))\n setTimeout(() => element.scrollIntoView({ block: 'start' }), 500);\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n\n this.scrollHandler();\n }\n\n private setMeasureElement(): Promise<void> {\n return new Promise((resolve) => {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n resolve();\n });\n });\n }\n\n /**\n * Makes sure we have dimensions on at least one, active tbody element.\n * We'll use this is a yard stick for inactive tbody elements in future.\n * These elements have no natural height (on account of all their rows being hidden)\n */\n private setInitialBlockDimension() {\n if (!this.blockElements?.length) return;\n perMark('blockDims');\n\n const testForDimensions = async () => {\n await this.setMeasureElement();\n if (this.unitHeight) return true;\n return false;\n };\n\n const dimensionsReady: Promise<void> = new Promise(async (resolve) => {\n if (await testForDimensions()) resolve();\n else {\n // it's likely this table is hidden in the dom.\n // we need to wait until it's visible\n const observer = new IntersectionObserver(\n async () => {\n if (await testForDimensions()) {\n resolve();\n observer.disconnect();\n }\n },\n { root: this.scrollParent }\n );\n observer.observe(this.tableEle);\n }\n });\n\n // we're all finished.\n dimensionsReady.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n requestAnimationFrame(() => (this.isReady = true));\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = (this.columns as TableTypes.NanoTable['columns'])\n .filter((c) => c.filter !== undefined && c.filter !== null)\n .map((c) => {\n const { filter, prop } = c;\n return { filter, prop };\n });\n\n if (this.searchTerm) {\n await this.searchStart();\n }\n\n if (this.filters.length) {\n await this.filterStart();\n }\n // apply sort\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\n if (this.tablePinnedService) this.tablePinnedService.assessCols();\n }\n\n /** Split up all incoming rows into 'blocks' split amongst tbody elements.\n * These can then be hidden / shown to improve performance.\n */\n private setBlocks() {\n const dRows = this.store.data.state.rows;\n if (!dRows.length) {\n this.blocks = [];\n return;\n }\n\n perMark('setBlocks');\n // this.ignoreIO = true;\n let i = 1;\n const l =\n this.virtualTotalItems > dRows.length\n ? this.virtualTotalItems\n : dRows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1] || { __uuid: '' });\n\n if (i % this.perBlock === 0) {\n // assign a UUID for the whole block\n // for block diffing\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n\n // any leftover rows\n if (rows.length) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n }\n\n this.blocks = blocks;\n perMark('setBlocks', true);\n }\n\n /**\n * Returns a block render height.\n * If it's currently active - let auto do it's thing\n * If we've rendered it before - return that\n * If all else fails, let's guess it\n * @param blockIndex\n * @returns a height string (incl px)\n */\n private getBlockHeight(blockIndex: number): number {\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight && cachedBlockHeight.height)\n return cachedBlockHeight.height;\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight;\n }\n return this.unitHeight ? this.unitHeight * blockLength : 100;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n\n readTask(() => {\n if (el.classList.contains(`${CSSNAMESPACE}__inactive`)) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhIdx = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhIdx > -1) {\n this.blockHeights[fBhIdx] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * On scroll, loop through all blocks' heights and cumulatively, add them together.\n * When we find that the scroll position is less than this cumulative block height -\n * stop loop - it's on the current active block.\n */\n private scrollHandler = () => {\n let scrollPos: number = 0;\n\n perMark('scrollHandler');\n // don't listen if this table isn't in the viewport\n if (!this.store?.general.state.isActive || !this.rows) return;\n if (this.primaryBlockIndex === undefined) this.primaryBlockIndex = 0;\n\n readTask(() => {\n scrollPos =\n typeof this.scrollParent.scrollTop !== 'undefined'\n ? this.scrollParent.scrollTop\n : window.scrollY;\n scrollPos += this.host.offsetTop;\n\n if (this.tablePinnedService) {\n this.tablePinnedService.onScroll({\n x:\n typeof this.scrollParent.scrollLeft !== 'undefined'\n ? this.scrollParent.scrollLeft\n : window.scrollX,\n y: scrollPos,\n });\n }\n\n let cumulativeHeight = this.host.offsetTop;\n let blockIndex = 0;\n const blockLen = this.blocks.length;\n\n while (blockIndex < blockLen && scrollPos >= cumulativeHeight) {\n cumulativeHeight += this.getBlockHeight(blockIndex);\n\n if (scrollPos < cumulativeHeight) {\n const potentialBlocks = [\n blockIndex,\n blockIndex + 1,\n // Math.max(0, blockIndex - 1),\n ];\n if (potentialBlocks.toString() !== this.activeBlocks.toString()) {\n this.activeBlocks = potentialBlocks;\n }\n this.primaryBlockIndex = blockIndex;\n }\n blockIndex++;\n }\n perMark('scrollHandler', true);\n });\n };\n\n /** Process slotted content */\n private processSlots() {\n // see if we have slot content\n if (!this.caption && !this.host.querySelector('[slot=\"caption\"]')) {\n console.error(\n 'For accessibility you must set a `caption` prop or use the `caption` slot'\n );\n }\n }\n\n private handleResizeChange = (\n e: NanoResizeObserveCustomEvent<ResizeStateChangeEventDetail>\n ) => {\n this.tableWrapperEle.className = '';\n\n let classes: string[] = [`${CSSNAMESPACE}__wrap`];\n if (e.target?.className)\n classes = [...e.target.className.split(' '), ...classes];\n\n this.tableWrapperEle.classList.add(...classes.filter((cl) => !!cl));\n };\n\n /** Adds an IO. Makes sure our scroll listener is only active when\n * the table is in viewport */\n private setupActiveWatcher() {\n if (!this.host || !this.scrollParent || !this.store) return;\n\n if (this.activeWatcherIo) {\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n }\n const io = (this.activeWatcherIo = new IntersectionObserver(\n async ([e]) => {\n if (e.isIntersecting) this.store.general.state.isActive = true;\n else this.store.general.state.isActive = false;\n },\n { root: this.scrollParent, threshold: 0 }\n ));\n io.observe(this.host);\n }\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n // setup stores\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent,\n this.isReady\n );\n await this.handleRowsChange();\n this.store.general.onChange('isActive', () => {\n this.scrollHandler();\n });\n this.store.data.onChange('rows', () => this.setBlocks());\n\n // setup dom and attach listeners\n this.processSlots();\n this.setBlocks();\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n connectedCallback(): void {\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\n if (!this.tablePinnedService) {\n this.tablePinnedService = new TablePinService(\n this.tableEle,\n this.scrollParent\n );\n }\n }\n\n componentShouldUpdate(_newVal, _oldVal, stateName: keyof Table) {\n // stop double rendering - we use the store for rendering internally\n // the public facing props are kept in-sync with the store\n // but we don't want it to cause renders\n if (['rows', 'columns'].includes(stateName)) return false;\n\n if (measurePerf) console.info(stateName, _newVal, _oldVal);\n }\n\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n this.setMeasureElement().then(() => this.setBlockHeight());\n perMark('render', true);\n }\n\n disconnectedCallback(): void {\n if (!this.activeWatcherIo) return;\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n\n (this.scrollParent === document.documentElement\n ? document\n : this.scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n\n render() {\n this.blockElements = [];\n\n return (\n <Host>\n <div\n class={`${CSSNAMESPACE}__top-anchor`}\n ref={(a) => (this.topAnchorEle = a)}\n >\n &nbsp;\n </div>\n\n <nano-resize-observe\n states=\"576w sm, 768w md\"\n class=\"sm md\"\n onNanoResizeStateChange={this.handleResizeChange}\n onNanoResize={() => {\n if (this.tablePinnedService) this.tablePinnedService.onResize();\n }}\n ></nano-resize-observe>\n\n <div\n class={`${CSSNAMESPACE}__wrap sm md`}\n ref={(div) => (this.tableWrapperEle = div)}\n aria-labelledby={'nano-table-caption-' + this.renderId}\n tabindex={this.type === 'grid' ? '0' : undefined}\n >\n <nano-progress-bar\n indeterminate\n class={{\n [`${CSSNAMESPACE}__progress-bar`]: true,\n [`${CSSNAMESPACE}__progress-bar--show`]: this._loading,\n }}\n />\n <table\n role={this.type === 'grid' ? 'grid' : undefined}\n aria-rowcount={this.store.data.state.rows.length}\n aria-colcount={this.store.config.state.columns.length}\n class={`${CSSNAMESPACE}`}\n ref={(tbl) => (this.tableEle = tbl)}\n id={'nano-table-' + this.renderId}\n >\n <caption\n class={{\n [`${CSSNAMESPACE}__caption`]: true,\n [`${CSSNAMESPACE}__caption--hide`]: !this.showCaption,\n }}\n id={'nano-table-caption-' + this.renderId}\n >\n <slot name=\"caption\">{this.caption}</slot>\n </caption>\n\n {/* Header */}\n <thead>\n <TableHeadFootRow rowRenderer={this.headRender}>\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.headRender}\n onColumnSortClick={this.sortStart}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this._loading && !this.blocks.length && (\n <tbody class={`${CSSNAMESPACE}__active ${CSSNAMESPACE}__loading`}>\n {[...Array(10).keys()].map((rowIndex) => (\n <tr>\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n nestedContent={() => <nano-skeleton />}\n />\n )\n )}\n </tr>\n ))}\n </tbody>\n )}\n\n <tr hidden={!!this._loading || !!this.blocks.length}>\n <th\n class={`${CSSNAMESPACE}__th`}\n colSpan={this.store.config.state.columns.length}\n >\n <div class=\"nano-tbl__cell-content nano-tbl__cell-content--no-result\">\n <slot name=\"no-results\">No results found</slot>\n </div>\n </th>\n </tr>\n\n {/* Body */}\n {this.blocks.map((block, blockIndex) => (\n <tbody\n key={block.__uuid}\n id={`tbody-${this.renderId}-${blockIndex}`}\n ref={(tb) => {\n this.blockElements.push(tb);\n }}\n class={{\n [`${CSSNAMESPACE}__inactive`]:\n !this.activeBlocks.includes(blockIndex),\n [`${CSSNAMESPACE}__active`]:\n this.activeBlocks.includes(blockIndex),\n }}\n >\n {this.activeBlocks.includes(blockIndex) ? (\n block.rows.map((row, i) => {\n const rowIndex =\n blockIndex > 0 ? blockIndex * this.perBlock + i : i;\n return (\n <TableRow\n rowRenderer={this.rowRender}\n rowModel={row}\n rowIndex={rowIndex}\n >\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n />\n )\n )}\n </TableRow>\n );\n })\n ) : (\n <tr class={`${CSSNAMESPACE}__tr--placeholder`}>\n <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex) + 'px',\n }}\n />\n </tr>\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow rowRenderer={this.footRender}>\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.footRender}\n onColumnSortClick={this.sortStart}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </tfoot>\n )}\n </table>\n\n {!!this.blocks.length && (\n <nano-spinner\n type=\"circle\"\n class={{\n [`${CSSNAMESPACE}__spinner`]: true,\n [`${CSSNAMESPACE}__spinner--show`]: this._loading,\n }}\n />\n )}\n </div>\n </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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Host,\n Watch,\n State,\n readTask,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n NanoResizeObserveCustomEvent,\n ResizeStateChangeEventDetail,\n TableTypes,\n} from '../../interface';\nimport { findScrollParent } from '../../utils/scroll-parent';\nimport { TableColHead } from './table.header';\nimport { TableRow, TableHeadFootRow } from './table.row';\nimport { TableCell } from './table.cell';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n generateStore,\n storeSearch,\n storeSetConfig,\n storeSetData,\n storeSort,\n storeFilter,\n TableStores,\n} from './table.store';\nimport { isInViewport } from './table.utils';\nimport { TablePinService } from './table.pin-service';\n\nconst measurePerf = false;\n\nfunction perMark(name: string, end: boolean = false) {\n if (!performance || !measurePerf) return;\n if (end) {\n performance?.mark('end' + name);\n performance?.measure(name, 'start' + name, 'end' + name);\n const entries = performance?.getEntriesByName(name);\n console.info(entries[entries.length ? entries.length - 1 : 0]);\n } else {\n performance?.mark('start' + name);\n }\n}\n\nlet id = 0;\n/**\n * A performant, accessible and semantic (uses real html `<table />`, `<tr />` etc) table and data-grid solution.\n *\n *- Built-in search\n *- Built-in column filter\n *- Built-in column sort\n *- Easily swap in API / async based search / filter & sort\n *- Pin headers, footers, rows, columns\n *- Add custom rendering at every level\n *- Add custom properties at every level\n *\n * @slot caption - The table's caption. You must either use this or the `caption` attribute.\n * @slot no-results - text to display when search or filtering yields no results\n */\n@Component({\n tag: 'nano-table',\n styleUrl: 'table.scss',\n})\nexport class Table implements ComponentInterface {\n constructor() {\n this.debounceSetLoading = debounce(this.debounceSetLoading.bind(this), 50);\n }\n // Public API\n\n // Props\n\n /** Function called whenever `col.cellTemplate` renders an unknown object.\n * The function should render a valid HTMLElement to the cell arg.\n * Example usage - render JSX from a 3rd party lib and append the result to the cell element. */\n @Prop() customRenderer: (\n node: any,\n cell: HTMLElement | DocumentFragment\n ) => void | Promise<string>;\n\n /** The type of table. Grid type will make cells navigable by keyboard */\n @Prop() type: 'grid' | 'table' = 'table';\n\n /** A descriptive title of the table.\n * You must use this or the `slot=\"caption\"` for accessibility */\n @Prop() caption: string;\n\n /** Show the caption on-screen */\n @Prop() showCaption: boolean = false;\n\n /** Will show a loading state when set to true.\n * By default, will be shown automatically if `rows` is a promise waiting to resolve / or falsy\n * *or* when performing custom filtering or sorting.\n * *Note* when set manually, will overwrite any internal loading state.\n * Set to 'undefined' to revert to default behaviour. */\n @Prop() loading: boolean = undefined;\n\n get _loading() {\n return this.loading !== undefined ? this.loading : this.internalLoading;\n }\n set _loading(l: boolean) {\n if (this.loading !== undefined) return;\n this.debounceSetLoading(l);\n }\n private debounceSetLoading(l: boolean) {\n this.internalLoading = l;\n }\n @State() internalLoading = true;\n\n /** When loading rows asynchronously, this will render this number of placeholder rows */\n @Prop() placeholderSize = 5;\n\n /** The data to place in the table */\n @Prop({ mutable: true }) rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) {\n this._loading = true;\n return;\n }\n\n this._loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n // reset everything\n this.currentFilters = '';\n this.currentSort = '';\n await this.columnInit();\n\n if (!this.isReady)\n requestAnimationFrame(() => this.setInitialBlockDimension());\n this._loading = false;\n if (this.tablePinnedService) this.tablePinnedService.assessRows();\n });\n }\n\n /** The column config used to present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable<any>['columns'] = [];\n\n @Watch('columns')\n async handleColsChange() {\n await storeSetConfig(this.host, this.columns);\n if (this.isReady) this.columnInit();\n }\n\n /** Used for custom thead row rendering */\n @Prop() headRender: TableTypes.HeadFootRenderer = { pinned: 'top' };\n\n /** Used for custom row rendering */\n @Prop() rowRender: TableTypes.RowRenderer;\n\n /** Used for custom tfoot row rendering */\n @Prop() footRender: TableTypes.HeadFootRenderer = { pinned: 'bottom' };\n\n /** Whether to show a `<tfoot>` component */\n @Prop() showFooter = false;\n\n /** To improve performance, data is split into blocks\n * which are shown / hidden and rendered as they become visible.\n * Use this to control the number of hits within a block -\n * A block should fill a scrolling viewport.\n * The less perBlock the better for performance */\n @Prop() perBlock = 50;\n\n /** The number of total blocks currently rendered in the table. @readonly */\n @Prop()\n get blocksLength() {\n return this.blocks.length;\n }\n\n /** Term to search for in the data */\n @Prop() searchTerm: string;\n\n /** A custom filtering function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsy, the sort will be performed by the component.\n * A good use-case would be performing the filter on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customFilterFn?: (\n filters: TableTypes.Filter[]\n ) => Promise<true | TableTypes.Falsy>;\n\n /** A custom sorting function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsey, the sort will be performed by the component.\n * A good use-case would be performing the sort on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customSortFn?: (\n property: TableTypes.Prop,\n order: TableTypes.Order\n ) => Promise<true | TableTypes.Falsy>;\n\n /**\n * The default sortable option for all columns.\n * `true` will enable column sorting unless you set `sortable: false` on a column\n * `false` will disable column sorting unless you set `sortable: true` on a column\n */\n @Prop() defaultSort = true;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\n\n /** Use this to render the table with roughly the correct dimensions.\n * a use-case might be; fetch a small initial dataset to minimise load-time,\n * render the table with the correct dimensions, the table becomes interactive,\n * load the rest of the data\n */\n @Prop() virtualTotalItems: number = 0;\n\n @Watch('virtualTotalItems')\n virtualTotalItemsChangeHandler() {\n this.setBlocks();\n }\n\n /** @readonly - shows the currently applied filters */\n @Prop()\n get appliedFilters() {\n return this.filters;\n }\n\n /** Fired when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\n\n /** Fired whenever a block is activated by scrolling into view / becoming visible\n * This could be leveraged for infinite scrolling / to fetch more data.\n */\n @Event() nanoTblBlockRendered: EventEmitter<{\n block: number;\n totalBlocks: number;\n }>;\n\n /** Fired before a column is sorted.\n * `event.preventDefault()` to stop sorting. */\n @Event() nanoTblBeforeSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired before a column is filtered.\n * `event.preventDefault()` to stop filtering. */\n @Event() nanoTblBeforeFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeSearch: EventEmitter<{ term: string }>;\n\n /** Fired after a general / cross column search */\n @Event() nanoTblAfterSearch: EventEmitter<{ term: string }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeEdit: EventEmitter<{ term: string }>;\n\n /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!col) return;\n return this.sortStart(null, col.prop);\n }\n\n /** Apply a sort on a column\n * @returns a promise which resolves when complete */\n @Method()\n async addSort(column: TableTypes.Prop, order: TableTypes.Order) {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => c.prop === column\n );\n if (!col) throw 'Cannot find column with ' + column;\n return this.sortStart(order, col.prop);\n }\n\n /** Remove any column filters currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetFilters() {\n this.filters = [];\n return this.filterStart();\n }\n\n /** Apply a filter on a column\n * @param filters - the filters to apply\n * @param additive - if true, will add the filters to any currently applied\n * @returns a promise which resolves when complete\n */\n @Method()\n async addFilters(filters: TableTypes.Filter[], additive: boolean = true) {\n if (!additive) this.filters = [];\n return this.filterStart(filters, additive);\n }\n\n /** Remove filters from a column\n * @param columnNames - the filters to apply\n * @returns a promise which resolves when complete\n */\n @Method()\n async removeFilters(columnNames: TableTypes.Prop[]) {\n this.filters = this.filters.filter((f) => !columnNames.includes(f.prop));\n return this.filterStart();\n }\n\n /** Updates a row model at a given index\n * @param row - the row to update.\n * @param rowIndex - the row index to insert this row\n */\n @Method()\n async updateRow(row: TableTypes.RowData, rowIndex: number) {\n (this.rows as TableTypes.NanoTable['rows']).splice(rowIndex, 1, row);\n this.handleRowsChange();\n }\n\n // TODO.\n // change this.rows to be a Map instead?\n // this will allow 'padding' < inserting row data at a non-adjacent index\n\n // /**\n // * During pagination or infinite scroll\n // * you may not always want to load data in serial order.\n // * This method allows you to insert a block of results at a particular index.\n // * Use in-conjunction with `virtualTotalItems`\n // * @param blockIndex - where to insert\n // * @param rows - what to insert\n // */\n // @Method()\n // async insertBlock(blockIndex: number, rows: TableTypes.NanoTable['rows']) {\n // this.pauseAutoBlockAssign = true;\n // const cRows = (this.rows as TableTypes.NanoTable['rows']);\n\n // if (cRows.length < (blockIndex * this.perBlock)) {\n // (this.rows as TableTypes.NanoTable['rows'])\n // }\n\n // (this.rows as TableTypes.NanoTable['rows']).splice((blockIndex * this.perBlock)-1, 0, ...rows);\n\n // console.log(this.rows)\n // debugger;\n\n // await this.handleRowsChange(this.rows);\n // this.blocks[blockIndex] = {rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join())};\n // this.blocks = this.blocks;\n // this.pauseAutoBlockAssign = true;\n\n // console.log(this.rows, this.blocks)\n // }\n\n // Private State\n\n @Element() host: HTMLNanoTableElement;\n private renderId = 'tbl-' + id++;\n private store: TableStores;\n private filters: TableTypes.Filter[] = [];\n private currentFilters = '[]';\n private currentSort = '';\n private tableEle: HTMLTableElement;\n private topAnchorEle: HTMLElement;\n private tableWrapperEle: HTMLElement;\n private activeWatcherIo: IntersectionObserver;\n private tablePinnedService: TablePinService;\n\n // Block view management\n\n /** `tr` elements split into units - defined by `perBlock`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1];\n\n private measureHeight = 0;\n private blockElements: HTMLTableSectionElement[];\n private blockHeights: { blockIndex: number; height: number }[] = [];\n\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n const potentialHeight = el.getBoundingClientRect().height;\n this.measureHeight =\n Math.abs(this.measureHeight - potentialHeight) < 5\n ? this.measureHeight\n : potentialHeight;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n\n private unitHeight = 0;\n\n private get scrollParent() {\n return this._scrollParent;\n }\n\n private set scrollParent(ele: HTMLElement) {\n if (ele === this._scrollParent) return;\n\n if (this._scrollParent) {\n (this._scrollParent === document.documentElement\n ? document\n : this._scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n (ele === document.documentElement ? document : ele).addEventListener(\n 'scroll',\n this.scrollHandler\n // {passive: true}\n );\n this._scrollParent = ele;\n }\n\n private _scrollParent: HTMLElement;\n\n // used to fire `nanoTblBlockRendered` on block render change\n private get primaryBlockIndex() {\n return this._primaryBlockIndex;\n }\n\n private set primaryBlockIndex(blockIndex) {\n if (this._primaryBlockIndex === blockIndex) return;\n\n this._primaryBlockIndex = blockIndex;\n\n // fire block change event\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n }\n\n private _primaryBlockIndex;\n\n // Misc.\n\n private get isReady() {\n return this._isReady;\n }\n private set isReady(ready: boolean) {\n if (ready === this._isReady) return;\n this._isReady = ready;\n if (this.isReady) requestAnimationFrame(() => this.handleReady());\n }\n private _isReady = false;\n\n // Private Logic\n\n // Listeners\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n try {\n const idRow = document.querySelector(hash);\n if (idRow) idRow.scrollIntoView();\n } catch (e) {}\n }\n this.nanoTblReady.emit();\n }\n\n /**\n * Start a sort - can be cancelled by `preventDefault`\n * @param order - column order\n * @param column - column config object\n * @returns A promise\n */\n private sortStart = async (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n element?: HTMLElement\n ) => {\n // did order change?\n if (this.currentSort === order + ':' + column) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSort.emit({ column: column, order });\n if (sortEvent.defaultPrevented) return;\n perMark('sort');\n this.currentSort = order + ':' + column;\n\n // doesn't make sense to leave user in place for a sort\n this.scrollToTop(element);\n\n if (this.customSortFn) {\n try {\n const res = await this.customSortFn(column, order);\n\n // if the response is 'true', the custom sort did it's thing\n // handover to finish and stop loading state.\n // if response is falsey, carry on to do a FE sort\n if (res === true) {\n this.sortComplete(order, column);\n this._loading = false;\n return;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom sort failed', e);\n this.currentSort = '';\n this._loading = false;\n return;\n }\n }\n\n try {\n await storeSort(this.host, column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('sort failed', e);\n this.currentSort = '';\n } finally {\n if (this.blocks.length) this._loading = false;\n }\n };\n\n /**\n * Complete a sort. Reflects the order to ui.\n * @param order - column order\n * @param column - column config object\n */\n private sortComplete(order: TableTypes.Order, column: TableTypes.Prop) {\n this.columns = this.columns.map((c) => {\n if (c.prop === column) return { ...c, order };\n return { ...c, order: null };\n });\n this.nanoTblAfterSort.emit({ column: column, order });\n perMark('sort', true);\n }\n\n private async searchStart() {\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSearch.emit({ term: this.searchTerm });\n if (sortEvent.defaultPrevented) return;\n perMark('search');\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n try {\n await storeSearch(this.host, this.searchTerm);\n this.nanoTblAfterSearch.emit({ term: this.searchTerm });\n perMark('search', true);\n } catch (e) {\n console.warn('search failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private async filterStart(\n filters?: TableTypes.Filter[],\n additive: boolean = true\n ) {\n if (filters) {\n if (additive) {\n this.filters = [\n ...this.filters.filter(\n (f) => !filters.find((ff) => ff.prop === f.prop)\n ),\n ...filters,\n ];\n } else {\n this.filters = filters;\n }\n }\n\n if (this.currentFilters === JSON.stringify(this.filters)) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeFilter.emit({ filters: this.filters });\n if (sortEvent.defaultPrevented) return;\n perMark('filter');\n this.currentFilters = JSON.stringify(this.filters);\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n if (this.customFilterFn) {\n try {\n const res = await this.customFilterFn(this.filters);\n\n // if the response is 'true', the custom filter did it's thing\n // handover to finish and stop loading state.\n // if response is falsy, carry on to do a FE filter\n if (res === true) {\n this.filterComplete();\n this._loading = false;\n return;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n this._loading = false;\n return;\n }\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('filter failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private filterComplete() {\n this.columns = this.columns.map((c) => {\n const cFilter = this.filters.find((f) => f.prop === c.prop);\n // if we found a filter AND\n // it isn't true / false and has a length OR\n // it is true or false\n if (\n cFilter &&\n ((typeof cFilter.filter !== 'boolean' && cFilter.filter.length) ||\n typeof cFilter.filter === 'boolean')\n )\n c.filter = cFilter.filter;\n // if a filter value is not set OR\n // it isn't true / false and has no length\n else if (\n (c.filter !== null && c.filter !== undefined) ||\n (!!c.filter && typeof c.filter !== 'boolean' && !c.filter.length)\n )\n c.filter = undefined;\n\n return c;\n });\n this.nanoTblAfterFilter.emit({ filters: this.filters });\n perMark('filter', true);\n }\n\n /** Scrolls to the top immediately - used whilst sorting / filtering */\n private scrollToTop(element?: HTMLElement) {\n const scrollBehaviour = this.scrollParent.style?.scrollBehavior;\n const scrollX = this.scrollParent.scrollLeft;\n this.scrollParent.style.scrollBehavior = 'auto';\n\n if (this.topAnchorEle && !isInViewport(this.topAnchorEle, 0.1)) {\n this.host.scrollIntoView();\n }\n if (element && !isInViewport(element, 1))\n setTimeout(() => element.scrollIntoView({ block: 'start' }), 500);\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n\n this.scrollHandler();\n }\n\n private setMeasureElement(): Promise<void> {\n return new Promise((resolve) => {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n resolve();\n });\n });\n }\n\n /**\n * Makes sure we have dimensions on at least one, active tbody element.\n * We'll use this is a yard stick for inactive tbody elements in future.\n * These elements have no natural height (on account of all their rows being hidden)\n */\n private setInitialBlockDimension() {\n if (!this.blockElements?.length) return;\n perMark('blockDims');\n\n const testForDimensions = async () => {\n await this.setMeasureElement();\n if (this.unitHeight) return true;\n return false;\n };\n\n const dimensionsReady: Promise<void> = new Promise(async (resolve) => {\n if (await testForDimensions()) resolve();\n else {\n // it's likely this table is hidden in the dom.\n // we need to wait until it's visible\n const observer = new IntersectionObserver(\n async () => {\n if (await testForDimensions()) {\n resolve();\n observer.disconnect();\n }\n },\n { root: this.scrollParent }\n );\n observer.observe(this.tableEle);\n }\n });\n\n // we're all finished.\n dimensionsReady.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n requestAnimationFrame(() => (this.isReady = true));\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = (this.columns as TableTypes.NanoTable['columns'])\n .filter((c) => c.filter !== undefined && c.filter !== null)\n .map((c) => {\n const { filter, prop } = c;\n return { filter, prop };\n });\n\n if (this.searchTerm) {\n await this.searchStart();\n }\n\n if (this.filters.length) {\n await this.filterStart();\n }\n // apply sort\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\n if (this.tablePinnedService) this.tablePinnedService.assessCols();\n }\n\n /** Split up all incoming rows into 'blocks' split amongst tbody elements.\n * These can then be hidden / shown to improve performance.\n */\n private setBlocks() {\n const dRows = this.store.data.state.rows;\n if (!dRows.length) {\n this.blocks = [];\n return;\n }\n\n perMark('setBlocks');\n // this.ignoreIO = true;\n let i = 1;\n const l =\n this.virtualTotalItems > dRows.length\n ? this.virtualTotalItems\n : dRows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1] || { __uuid: '' });\n\n if (i % this.perBlock === 0) {\n // assign a UUID for the whole block\n // for block diffing\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n\n // any leftover rows\n if (rows.length) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n }\n\n this.blocks = blocks;\n perMark('setBlocks', true);\n }\n\n /**\n * Returns a block render height.\n * If it's currently active - let auto do it's thing\n * If we've rendered it before - return that\n * If all else fails, let's guess it\n * @param blockIndex\n * @returns a height string (incl px)\n */\n private getBlockHeight(blockIndex: number): number {\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight && cachedBlockHeight.height)\n return cachedBlockHeight.height;\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight;\n }\n return this.unitHeight ? this.unitHeight * blockLength : 100;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n\n readTask(() => {\n if (el.classList.contains(`${CSSNAMESPACE}__inactive`)) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhIdx = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhIdx > -1) {\n this.blockHeights[fBhIdx] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * On scroll, loop through all blocks' heights and cumulatively, add them together.\n * When we find that the scroll position is less than this cumulative block height -\n * stop loop - it's on the current active block.\n */\n private scrollHandler = () => {\n let scrollPos: number = 0;\n\n perMark('scrollHandler');\n // don't listen if this table isn't in the viewport\n if (!this.store?.general.state.isActive || !this.rows) return;\n if (this.primaryBlockIndex === undefined) this.primaryBlockIndex = 0;\n\n readTask(() => {\n scrollPos =\n typeof this.scrollParent.scrollTop !== 'undefined'\n ? this.scrollParent.scrollTop\n : window.scrollY;\n scrollPos += this.host.offsetTop;\n\n if (this.tablePinnedService) {\n this.tablePinnedService.onScroll({\n x:\n typeof this.scrollParent.scrollLeft !== 'undefined'\n ? this.scrollParent.scrollLeft\n : window.scrollX,\n y: scrollPos,\n });\n }\n\n let cumulativeHeight = this.host.offsetTop;\n let blockIndex = 0;\n const blockLen = this.blocks.length;\n\n while (blockIndex < blockLen && scrollPos >= cumulativeHeight) {\n cumulativeHeight += this.getBlockHeight(blockIndex);\n\n if (scrollPos < cumulativeHeight) {\n const potentialBlocks = [\n blockIndex,\n blockIndex + 1,\n // Math.max(0, blockIndex - 1),\n ];\n if (potentialBlocks.toString() !== this.activeBlocks.toString()) {\n this.activeBlocks = potentialBlocks;\n }\n this.primaryBlockIndex = blockIndex;\n }\n blockIndex++;\n }\n perMark('scrollHandler', true);\n });\n };\n\n /** Process slotted content */\n private processSlots() {\n // see if we have slot content\n if (!this.caption && !this.host.querySelector('[slot=\"caption\"]')) {\n console.error(\n 'For accessibility you must set a `caption` prop or use the `caption` slot'\n );\n }\n }\n\n private handleResizeChange = (\n e: NanoResizeObserveCustomEvent<ResizeStateChangeEventDetail>\n ) => {\n this.tableWrapperEle.className = '';\n\n let classes: string[] = [`${CSSNAMESPACE}__wrap`];\n if (e.target?.className)\n classes = [...e.target.className.split(' '), ...classes];\n\n this.tableWrapperEle.classList.add(...classes.filter((cl) => !!cl));\n };\n\n /** Adds an IO. Makes sure our scroll listener is only active when\n * the table is in viewport */\n private setupActiveWatcher() {\n if (!this.host || !this.scrollParent || !this.store) return;\n\n if (this.activeWatcherIo) {\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n }\n const io = (this.activeWatcherIo = new IntersectionObserver(\n async ([e]) => {\n if (e.isIntersecting) this.store.general.state.isActive = true;\n else this.store.general.state.isActive = false;\n },\n { root: this.scrollParent, threshold: 0 }\n ));\n io.observe(this.host);\n }\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n // setup stores\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent,\n this.isReady\n );\n await this.handleRowsChange();\n this.store.general.onChange('isActive', () => {\n this.scrollHandler();\n });\n this.store.data.onChange('rows', () => this.setBlocks());\n\n // setup dom and attach listeners\n this.processSlots();\n this.setBlocks();\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n connectedCallback(): void {\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\n if (!this.tablePinnedService) {\n this.tablePinnedService = new TablePinService(\n this.tableEle,\n this.scrollParent\n );\n }\n }\n\n componentShouldUpdate(_newVal, _oldVal, stateName: keyof Table) {\n // stop double rendering - we use the store for rendering internally\n // the public facing props are kept in-sync with the store\n // but we don't want it to cause renders\n if (['rows', 'columns'].includes(stateName)) return false;\n\n if (measurePerf) console.info(stateName, _newVal, _oldVal);\n }\n\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n this.setMeasureElement().then(() => this.setBlockHeight());\n perMark('render', true);\n }\n\n disconnectedCallback(): void {\n if (!this.activeWatcherIo) return;\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n\n (this.scrollParent === document.documentElement\n ? document\n : this.scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n\n render() {\n this.blockElements = [];\n\n return (\n <Host>\n <div\n class={`${CSSNAMESPACE}__top-anchor`}\n ref={(a) => (this.topAnchorEle = a)}\n >\n &nbsp;\n </div>\n\n <nano-resize-observe\n states=\"576w sm, 768w md\"\n class=\"sm md\"\n onNanoResizeStateChange={this.handleResizeChange}\n onNanoResize={() => {\n if (this.tablePinnedService) this.tablePinnedService.onResize();\n }}\n ></nano-resize-observe>\n\n <div\n class={`${CSSNAMESPACE}__wrap sm md`}\n ref={(div) => (this.tableWrapperEle = div)}\n aria-labelledby={'nano-table-caption-' + this.renderId}\n tabindex={this.type === 'grid' ? '0' : undefined}\n >\n <nano-progress-bar\n indeterminate\n class={{\n [`${CSSNAMESPACE}__progress-bar`]: true,\n [`${CSSNAMESPACE}__progress-bar--show`]: this._loading,\n }}\n />\n <table\n role={this.type === 'grid' ? 'grid' : undefined}\n aria-rowcount={this.store.data.state.rows.length}\n aria-colcount={this.store.config.state.columns.length}\n class={`${CSSNAMESPACE}`}\n ref={(tbl) => (this.tableEle = tbl)}\n id={'nano-table-' + this.renderId}\n >\n <caption\n class={{\n [`${CSSNAMESPACE}__caption`]: true,\n [`${CSSNAMESPACE}__caption--hide`]: !this.showCaption,\n }}\n id={'nano-table-caption-' + this.renderId}\n >\n <slot name=\"caption\">{this.caption}</slot>\n </caption>\n\n {/* Header */}\n <thead>\n <TableHeadFootRow rowRenderer={this.headRender}>\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.headRender}\n onColumnSortClick={this.sortStart}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this._loading && !this.blocks.length && (\n <tbody class={`${CSSNAMESPACE}__active ${CSSNAMESPACE}__loading`}>\n {[...Array(10).keys()].map((rowIndex) => (\n <tr>\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n nestedContent={() => <nano-skeleton />}\n />\n )\n )}\n </tr>\n ))}\n </tbody>\n )}\n\n <tr hidden={!!this._loading || !!this.blocks.length}>\n <th\n class={`${CSSNAMESPACE}__th`}\n colSpan={this.store.config.state.columns.length}\n >\n <div class=\"nano-tbl__cell-content nano-tbl__cell-content--no-result\">\n <slot name=\"no-results\">No results found</slot>\n </div>\n </th>\n </tr>\n\n {/* Body */}\n {this.blocks.map((block, blockIndex) => (\n <tbody\n key={block.__uuid}\n id={`tbody-${this.renderId}-${blockIndex}`}\n ref={(tb) => {\n this.blockElements.push(tb);\n }}\n class={{\n [`${CSSNAMESPACE}__inactive`]:\n !this.activeBlocks.includes(blockIndex),\n [`${CSSNAMESPACE}__active`]:\n this.activeBlocks.includes(blockIndex),\n }}\n >\n {this.activeBlocks.includes(blockIndex) ? (\n block.rows.map((row, i) => {\n const rowIndex =\n blockIndex > 0 ? blockIndex * this.perBlock + i : i;\n return (\n <TableRow\n rowRenderer={this.rowRender}\n rowModel={row}\n rowIndex={rowIndex}\n >\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n />\n )\n )}\n </TableRow>\n );\n })\n ) : (\n <tr class={`${CSSNAMESPACE}__tr--placeholder`}>\n <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex) + 'px',\n }}\n />\n </tr>\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow rowRenderer={this.footRender}>\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.footRender}\n onColumnSortClick={this.sortStart}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </tfoot>\n )}\n </table>\n\n {!!this.blocks.length && (\n <nano-spinner\n type=\"circle\"\n class={{\n [`${CSSNAMESPACE}__spinner`]: true,\n [`${CSSNAMESPACE}__spinner--show`]: this._loading,\n }}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,78 @@
1
+ /*!
2
+ * Web Components for Nanopore digital Web Apps
3
+ */
4
+ import { h, getRenderingRef } from '@stencil/core';
5
+ function customTemplate(tpl, props) {
6
+ // Wrap the h pragma, then we can know if we're using Stencil's
7
+ // jsx renderer or a different one
8
+ let hCalled = false;
9
+ const hWrap = (...args) => {
10
+ hCalled = true;
11
+ return h(...args);
12
+ };
13
+ let tplResult = tpl ? tpl(hWrap, ...props) : undefined;
14
+ const renderRef = getRenderingRef();
15
+ // Using stencil renderer - return that now
16
+ if (tplResult &&
17
+ (hCalled || (typeof tplResult === 'object' && '$attrs$' in tplResult))) {
18
+ return tplResult;
19
+ }
20
+ // Template is either Element, string or using a custom rendering method
21
+ if (tplResult &&
22
+ renderRef &&
23
+ renderRef.customRenderer &&
24
+ typeof tplResult === 'object' &&
25
+ !('$attrs$' in tplResult) &&
26
+ !(tplResult instanceof Element) &&
27
+ typeof tplResult !== 'string' &&
28
+ !hCalled) {
29
+ // template result is jsx *not* from Stencil.
30
+ // Render it now and output it later.
31
+ const templateEle = document.createElement('template');
32
+ const result = renderRef.customRenderer(tplResult, templateEle.content);
33
+ // custom rendering can render to the templateEle OR return a Promise<string>
34
+ tplResult = result && result['then'] ? result : templateEle;
35
+ }
36
+ return {
37
+ ref: (d) => {
38
+ if (!d)
39
+ return;
40
+ if (tplResult instanceof Element) {
41
+ // custom rendered an element
42
+ d.replaceChildren();
43
+ d.append(tplResult['content'] || tplResult);
44
+ }
45
+ else if (tplResult['then']) {
46
+ // custom rendered a promise. Most likely within SSR.
47
+ tplResult.then((res) => (d.innerHTML = res));
48
+ }
49
+ },
50
+ innerHTML: typeof tplResult === 'string' ? tplResult : undefined,
51
+ };
52
+ }
53
+ /**
54
+ * A functional component to handle custom rendering.
55
+ * Usage:
56
+ * @Prop() template = (_createElement: typeof h, exampleArg1: number, exampleArg2: boolean) => { if (exampleArg1) return <button>yay</button }
57
+ * // Optional
58
+ * @Prop() customRenderer: CustomRenderer
59
+ *
60
+ * <CustomRender
61
+ * parentTag='div'
62
+ * attrs={{ onClick: e => this.handleClick(e), class: 'button-wrapper' }}
63
+ * template={this.template}
64
+ * args={[3, true]}
65
+ * />
66
+ *
67
+ * @param props - renderer template function, arguments to pass to the renderer function, parental wrapper tag (and attributes)
68
+ * @param children - other virtual nodes to render
69
+ * @returns a jsx vnode
70
+ */
71
+ export function CustomRender(props, children) {
72
+ const { parentTag, attrs, template, args } = props;
73
+ const templateResult = customTemplate(template, args);
74
+ const templateAttrs = !!templateResult['ref'] ? templateResult : {};
75
+ const TagName = parentTag;
76
+ return (h(TagName, { ...attrs, ...templateAttrs }, children && children.length ? children : '', !!templateResult && !templateResult['ref'] && templateResult));
77
+ }
78
+ //# sourceMappingURL=custom-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-template.js","sourceRoot":"","sources":["../../src/utils/custom-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,eAAe,EAAE,MAAM,eAAe,CAAC;AA6C1D,SAAS,cAAc,CACrB,GAAM,EACN,KAAgC;EAEhC,+DAA+D;EAC/D,kCAAkC;EAClC,IAAI,OAAO,GAAG,KAAK,CAAC;EACpB,MAAM,KAAK,GAAG,CAAC,GAAG,IAAa,EAAE,EAAE;IACjC,OAA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I,SAAS,CAAC,MAAM,CAAC,EAAE;QAC5B,qDAAqD;QACpD,SAA6B,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC;OACnE;IACH,CAAC;IACD,SAAS,EAAE,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;GACjE,CAAC;AACJ,CAAC;AAWD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAmB,EACnB,QAAS;EAET,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;EACnD,MAAM,cAAc,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;EACtD,MAAM,aAAa,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;EACpE,MAAM,OAAO,GAAG,SAAS,CAAC;EAE1B,OAAO,CACL,EAAC,OAAO,OAAK,KAAK,KAAM,aAAa;IAClC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IAC3C,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,cAAc,CACrD,CACX,CAAC;AACJ,CAAC","sourcesContent":["import { h, VNode, getRenderingRef } from '@stencil/core';\nimport { JSXBase } from '@stencil/core/internal';\n\n/** A JSX `createElement` function passed to rendering functions.\n * You can use this to create markup outside of JSX environments\n * e.g. https://reactjs.org/docs/react-without-jsx.html */\ninterface HFunc<T> {\n (tag: any): T;\n}\ninterface HFunc<T> {\n (tag: any, data: any): T;\n}\ninterface HFunc<T> {\n (tag: any, text: string): T;\n}\ninterface HFunc<T> {\n (sel: any, children: Array<T | undefined | null>): T;\n}\ninterface HFunc<T> {\n (sel: any, data: any, text: string): T;\n}\ninterface HFunc<T> {\n (sel: any, data: any, children: Array<T | undefined | null>): T;\n}\ninterface HFunc<T> {\n (sel: any, data: any, children: T): T;\n}\n\ntype LibJSX = Record<string, any>;\ntype JSXRender = VNode | VNode[] | LibJSX | LibJSX[];\ntype TplReturn = JSXRender | string | Element | undefined;\ntype TplResult = TplReturn | Promise<string>;\n\ntype DropFirst<T extends unknown[]> = T extends [any, ...infer U] ? U : never;\n\nexport type CustomRenderer = (\n node: any,\n cell: HTMLElement | DocumentFragment\n) => void | Promise<string>;\n\nexport type TemplateFunc<T> = (\n createElement: HFunc<JSXRender>,\n props?: T\n) => TplResult;\n\nfunction customTemplate<T extends (...args: any) => TplResult>(\n tpl: T,\n props?: DropFirst<Parameters<T>>\n) {\n // Wrap the h pragma, then we can know if we're using Stencil's\n // jsx renderer or a different one\n let hCalled = false;\n const hWrap = (...args: [any[]]) => {\n hCalled = true;\n return h(...args);\n };\n let tplResult = tpl ? tpl(hWrap, ...props) : undefined;\n const renderRef = getRenderingRef();\n\n // Using stencil renderer - return that now\n\n if (\n tplResult &&\n (hCalled || (typeof tplResult === 'object' && '$attrs$' in tplResult))\n ) {\n return tplResult as VNode;\n }\n\n // Template is either Element, string or using a custom rendering method\n\n if (\n tplResult &&\n renderRef &&\n renderRef.customRenderer &&\n typeof tplResult === 'object' &&\n !('$attrs$' in tplResult) &&\n !(tplResult instanceof Element) &&\n typeof tplResult !== 'string' &&\n !hCalled\n ) {\n // template result is jsx *not* from Stencil.\n // Render it now and output it later.\n const templateEle = document.createElement('template');\n const result = renderRef.customRenderer(tplResult, templateEle.content);\n // custom rendering can render to the templateEle OR return a Promise<string>\n tplResult = result && result['then'] ? result : templateEle;\n }\n\n return {\n ref: (d) => {\n if (!d) return;\n\n if (tplResult instanceof Element) {\n // custom rendered an element\n d.replaceChildren();\n d.append(tplResult['content'] || tplResult);\n } else if (tplResult['then']) {\n // custom rendered a promise. Most likely within SSR.\n (tplResult as Promise<string>).then((res) => (d.innerHTML = res));\n }\n },\n innerHTML: typeof tplResult === 'string' ? tplResult : undefined,\n };\n}\n\ntype TemplateCall = (...args: any) => TplResult;\n\ntype WrapProps<T extends TemplateCall> = {\n parentTag: string;\n attrs?: JSXBase.HTMLAttributes;\n template: T;\n args?: DropFirst<Parameters<T>>;\n};\n\n/**\n * A functional component to handle custom rendering.\n * Usage:\n * @Prop() template = (_createElement: typeof h, exampleArg1: number, exampleArg2: boolean) => { if (exampleArg1) return <button>yay</button }\n * // Optional\n * @Prop() customRenderer: CustomRenderer\n *\n * <CustomRender\n * parentTag='div'\n * attrs={{ onClick: e => this.handleClick(e), class: 'button-wrapper' }}\n * template={this.template}\n * args={[3, true]}\n * />\n *\n * @param props - renderer template function, arguments to pass to the renderer function, parental wrapper tag (and attributes)\n * @param children - other virtual nodes to render\n * @returns a jsx vnode\n */\nexport function CustomRender<T extends TemplateCall>(\n props: WrapProps<T>,\n children?\n): VNode {\n const { parentTag, attrs, template, args } = props;\n const templateResult = customTemplate(template, args);\n const templateAttrs = !!templateResult['ref'] ? templateResult : {};\n const TagName = parentTag;\n\n return (\n <TagName {...attrs} {...templateAttrs}>\n {children && children.length ? children : ''}\n {!!templateResult && !templateResult['ref'] && templateResult}\n </TagName>\n );\n}\n"]}
@@ -31,6 +31,7 @@ export { Input as NanoInput } from '../types/components/input/input';
31
31
  export { IntersectionObserve as NanoIntersectionObserve } from '../types/components/intersection-observe/intersection-observe';
32
32
  export { Menu as NanoMenu } from '../types/components/menu/menu';
33
33
  export { MenuDrawer as NanoMenuDrawer } from '../types/components/menu-drawer/menu-drawer';
34
+ export { Rating as NanoMoreLess } from '../types/components/more-less/more-less';
34
35
  export { NavItem as NanoNavItem } from '../types/components/nav-item/nav-item';
35
36
  export { Option as NanoOption } from '../types/components/option/option';
36
37
  export { OverflowNav as NanoOverflowNav } from '../types/components/overflow-nav/overflow-nav';
@@ -35,6 +35,7 @@ export { NanoInput, defineCustomElement as defineCustomElementNanoInput } from '
35
35
  export { NanoIntersectionObserve, defineCustomElement as defineCustomElementNanoIntersectionObserve } from './nano-intersection-observe.js';
36
36
  export { NanoMenu, defineCustomElement as defineCustomElementNanoMenu } from './nano-menu.js';
37
37
  export { NanoMenuDrawer, defineCustomElement as defineCustomElementNanoMenuDrawer } from './nano-menu-drawer.js';
38
+ export { NanoMoreLess, defineCustomElement as defineCustomElementNanoMoreLess } from './nano-more-less.js';
38
39
  export { NanoNavItem, defineCustomElement as defineCustomElementNanoNavItem } from './nano-nav-item.js';
39
40
  export { NanoOption, defineCustomElement as defineCustomElementNanoOption } from './nano-option.js';
40
41
  export { NanoOverflowNav, defineCustomElement as defineCustomElementNanoOverflowNav } from './nano-overflow-nav.js';
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,YAAY,GAAG,CACnB,OAAe,EACf,UAAmC,EAAE;EAErC,OAAO,GAAG,OAAO;MAEb,OAAO,CAAC,MAAM;MACV,OAAO;OACJ,GAAG,CACF,CAAC,GAAG,EAAE,CAAC,KACL,qBAAqB,CAAC,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,GAAG,CAAC,OAAO,WAAW,CAChG;OACA,IAAI,CAAC,EAAE,CAAC;MACX,EACN,EAAE,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CACrB,KAA2B,EAC3B,UAAmC,EAAE;EAErC,IAAI,OAAO,CAAC,MAAM,EAAE;IAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAC7D,CAAC,GAAgB;MACf,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAC3B,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;MACF,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AC,oBAAoB,CAAC,CAAC;AACtD,SAAS;AACT,OAAO;AACP,WAAW;AACX,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;AAC3B,OAAO;AACP,KAAK,CAAC;AACN;AACA,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,GAAG,YAAY,CAAC;AAC/C,GAAG;AACH,CAAC,GAAG;;AC9FJ,IAAI,KAAK,CAAC,SAAS,IAAI;;EAGrB,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,CAAC;EACxC,MAAM,UAAU,GAAG;IACjB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;MAAsB,OAAO,KAAK,CAAC;IACzD,MAAM,CAAC;IACP,OAAO,IAAI,CAAC;GACb,CAAC;EAEF;IACE,IAAI,SAAS,GAAG;MACd,IAAI,CAAC,UAAU,EAAE;QAAE,OAAO;MAE1B,SAAS;MACT,SAAS,GAAG,IAAI,CAAC;KAClB,CAAC,CAAC;IAEH;MACE,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,UAAU,EAAE;KACb,CAAC,CAAC;GACJ;;;;;","names":[],"sources":["./src/components/alert/alert.helpers.ts","./src/components/dialog/dialog.helpers.ts","./src/index.ts","./node_modules/focus-options-polyfill/index.js","./src/global/script/global.ts"],"sourcesContent":["import type { Color, AlertToastPosition } from '../../interface';\n\ninterface ImperativeAlertOptions {\n color?: Color;\n duration?: number;\n closable?: boolean;\n}\n\ninterface ImperativeAlertButton {\n classes: string;\n content: string;\n handler?: (e: MouseEvent) => void;\n}\n\nconst alertContent = (\n message: string,\n buttons: ImperativeAlertButton[] = []\n) => {\n return `${message}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`;\n};\n\nconst addBtnHandlers = (\n alert: HTMLNanoAlertElement,\n buttons: ImperativeAlertButton[] = []\n) => {\n if (buttons.length) {\n Array.from(alert.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n};\n\n/**\n * `nano-alert` helper to create toast notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param position - the position of the toast. Options are 'tr', 'tl', 'bl' & 'br'\n * @param icon - name for the `nano-icon`\n * @param alertOptions - { color: Color, duration: number, closable: boolean }\n * @returns `Promise<void>`\n */\nexport async function nanoShowToast(\n message: string,\n position: AlertToastPosition = 'tr',\n icon?: string | undefined,\n alertOptions?: ImperativeAlertOptions,\n buttons: ImperativeAlertButton[] = []\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: 3000,\n closable: true,\n ...alertOptions,\n };\n icon = icon || 'light/info-circle';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement('nano-alert'),\n {\n ...opts,\n open: false,\n innerHTML: `\n <nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n requestAnimationFrame(async (_) => {\n await alert.toast(position);\n resolve(alert);\n });\n });\n}\n\n/**\n * `nano-alert` helper to create alert notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons\n * @param label - descriptive label for assitive technology\n * @param icon - name for the `nano-icon`\n * @param alertOptions\n * @returns `Promise<void>`\n */\nexport function nanoShowAlert(\n message: string,\n buttons: ImperativeAlertButton[] = [],\n label: string,\n icon: string | undefined = 'light/info-circle',\n alertOptions: ImperativeAlertOptions = {}\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: Infinity,\n closable: false,\n ...alertOptions,\n };\n icon = icon || 'light/info-circle';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement('nano-alert'),\n {\n ...opts,\n open: false,\n innerHTML: `\n ${icon ? `<nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>` : ''}\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n setTimeout(async (_) => {\n await alert.alert(label);\n resolve(alert);\n }, 100);\n });\n}\n","interface ImperativeDialogOptions {\n noUserDismiss: boolean;\n noHeader?: boolean;\n noFooter?: boolean;\n label: string;\n}\n/**\n * `nano-dialog` helper to create dialog modals imperatively.\n * @param body - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons - { classes: string; content: string; handler: () => {} }[]\n * @param dialogOptions - { noUserDismiss: boolean, noHeader?: boolean, noFooter?: boolean, label: string }\n * @returns `Promise<void>`\n */\nexport function nanoCreateDialog(\n body: string,\n buttons: { classes: string; content: string; handler: () => void }[] = [],\n dialogOptions?: ImperativeDialogOptions\n) {\n const opts: ImperativeDialogOptions = {\n noUserDismiss: false,\n label: 'Dialog',\n ...dialogOptions,\n };\n const dialog: HTMLNanoDialogElement = Object.assign(\n document.createElement('nano-dialog'),\n {\n ...opts,\n open: false,\n innerHTML: `\n ${body}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`,\n }\n );\n\n if (buttons.length) {\n Array.from(dialog.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n\n document.body.appendChild(dialog);\n return dialog;\n}\n","// import { setPlatformHelpers } from '@stencil/core';\nexport * from './components/alert/alert.helpers';\nexport * from './components/dialog/dialog.helpers';\nexport {\n debounce as nanoDebounce,\n throttle as nanoThrottle,\n} from './utils/throttle';\nexport { getTabbableElements as nanoGetTabElements } from './utils/tabbable';\n\nexport const initialize = (\n helpers: { _ael?: any; _ce?: any; _rel?: any } = {}\n) => {\n if (typeof (window as any) === 'undefined') {\n return;\n }\n\n const platformHelpers: any = {};\n if (helpers._ael) {\n platformHelpers.ael = helpers._ael;\n }\n if (helpers._rel) {\n platformHelpers.rel = helpers._rel;\n }\n if (helpers._ce) {\n platformHelpers.ce = helpers._ce;\n }\n // setPlatformHelpers(platformHelpers);\n};\n","// focus - focusOptions - preventScroll polyfill\n(function() {\n if (\n typeof window === \"undefined\" ||\n typeof document === \"undefined\" ||\n typeof HTMLElement === \"undefined\"\n ) {\n return;\n }\n\n var supportsPreventScrollOption = false;\n try {\n var focusElem = document.createElement(\"div\");\n focusElem.addEventListener(\n \"focus\",\n function(event) {\n event.preventDefault();\n event.stopPropagation();\n },\n true\n );\n focusElem.focus(\n Object.defineProperty({}, \"preventScroll\", {\n get: function() {\n // Edge v18 gives a false positive for supporting inputs\n if (\n navigator &&\n typeof navigator.userAgent !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.match(/Edge\\/1[7-8]/)) {\n return supportsPreventScrollOption = false\n }\n\n supportsPreventScrollOption = true;\n }\n })\n );\n } catch (e) {}\n\n if (\n HTMLElement.prototype.nativeFocus === undefined &&\n !supportsPreventScrollOption\n ) {\n HTMLElement.prototype.nativeFocus = HTMLElement.prototype.focus;\n\n var calcScrollableElements = function(element) {\n var parent = element.parentNode;\n var scrollableElements = [];\n var rootScrollingElement =\n document.scrollingElement || document.documentElement;\n\n while (parent && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push([\n parent,\n parent.scrollTop,\n parent.scrollLeft\n ]);\n }\n parent = parent.parentNode;\n }\n parent = rootScrollingElement;\n scrollableElements.push([parent, parent.scrollTop, parent.scrollLeft]);\n\n return scrollableElements;\n };\n\n var restoreScrollPosition = function(scrollableElements) {\n for (var i = 0; i < scrollableElements.length; i++) {\n scrollableElements[i][0].scrollTop = scrollableElements[i][1];\n scrollableElements[i][0].scrollLeft = scrollableElements[i][2];\n }\n scrollableElements = [];\n };\n\n var patchedFocus = function(args) {\n if (args && args.preventScroll) {\n var evScrollableElements = calcScrollableElements(this);\n if (typeof setTimeout === 'function') {\n var thisElem = this;\n setTimeout(function () {\n thisElem.nativeFocus();\n restoreScrollPosition(evScrollableElements);\n }, 0);\n } else {\n this.nativeFocus();\n restoreScrollPosition(evScrollableElements);\n }\n }\n else {\n this.nativeFocus();\n }\n };\n\n HTMLElement.prototype.focus = patchedFocus;\n }\n})();\n","import { Build } from '@stencil/core';\n\n// focus options\nimport 'focus-options-polyfill';\n\nif (Build.isBrowser && globalThis['document']) {\n // fire global 'ready' event when everything is hydrated\n\n const docEle = document.documentElement;\n const docIsReady = () => {\n if (!docEle.classList.contains('hydrated')) return false;\n docEle.dispatchEvent(new CustomEvent('nanoComponentsReady'));\n return true;\n };\n\n if (!docIsReady()) {\n let mutationO = new MutationObserver((_) => {\n if (!docIsReady()) return;\n\n mutationO.disconnect();\n mutationO = null;\n });\n\n mutationO.observe(docEle, {\n childList: false,\n subtree: false,\n attributes: true,\n });\n }\n}\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,YAAY,GAAG,CACnB,OAAe,EACf,UAAmC,EAAE;EAErC,OAAO,GAAG,OAAO;MAEb,OAAO,CAAC,MAAM;MACV,OAAO;OACJ,GAAG,CACF,CAAC,GAAG,EAAE,CAAC,KACL,qBAAqB,CAAC,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,GAAG,CAAC,OAAO,WAAW,CAChG;OACA,IAAI,CAAC,EAAE,CAAC;MACX,EACN,EAAE,CAAC;AACP,CAAC,CAAC;AA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,CAAC,IAAI,CAAC,CAAC;AAChE,QAAQ,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC9C,UAAU,IAAI,QAAQ,GAAG,IAAI,CAAC;AAC9B,UAAU,UAAU,CAAC,YAAY;AACjC,YAAY,QAAQ,CAAC,WAAW,EAAE,CAAC;AACnC,YAAY,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;AACxD,WAAW,EAAE,CAAC,CAAC,CAAC;AAChB,SAAS,MAAM;AACf,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;AAC7B,UAAU,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;AACtD,SAAS;AACT,OAAO;AACP,WAAW;AACX,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;AAC3B,OAAO;AACP,KAAK,CAAC;AACN;AACA,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,GAAG,YAAY,CAAC;AAC/C,GAAG;AACH,CAAC,GAAG;;AC9FJ,IAAI,KAAK,CAAC,SAAS,IAAI;;EAGrB,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,CAAC;EACxC,MAAM,UAAU,GAAG;IACjB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;MAAsB,OAAO,KAAK,CAAC;IACzD,MAAM,CAAC;IACP,OAAO,IAAI,CAAC;GACb,CAAC;EAEF;IACE,IAAI,SAAS,GAAG;MACd,IAAI,CAAC,UAAU,EAAE;QAAE,OAAO;MAE1B,SAAS;MACT,SAAS,GAAG,IAAI,CAAC;KAClB,CAAC,CAAC;IAEH;MACE,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,UAAU,EAAE;KACb,CAAC,CAAC;GACJ;;;;;","names":[],"sources":["./src/components/alert/alert.helpers.ts","./src/components/dialog/dialog.helpers.ts","./src/index.ts","./node_modules/focus-options-polyfill/index.js","./src/global/script/global.ts"],"sourcesContent":["import type { Color, AlertToastPosition } from '../../interface';\n\ninterface ImperativeAlertOptions {\n color?: Color;\n duration?: number;\n closable?: boolean;\n}\n\ninterface ImperativeAlertButton {\n classes: string;\n content: string;\n handler?: (e: MouseEvent) => void;\n}\n\nconst alertContent = (\n message: string,\n buttons: ImperativeAlertButton[] = []\n) => {\n return `${message}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`;\n};\n\nconst addBtnHandlers = (\n alert: HTMLNanoAlertElement,\n buttons: ImperativeAlertButton[] = []\n) => {\n if (buttons.length) {\n Array.from(alert.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n};\n\n/**\n * `nano-alert` helper to create toast notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param position - the position of the toast. Options are 'tr', 'tl', 'bl' & 'br'\n * @param icon - name for the `nano-icon`\n * @param alertOptions - { color: Color, duration: number, closable: boolean }\n * @returns `Promise<void>`\n */\nexport async function nanoShowToast(\n message: string,\n position: AlertToastPosition = 'tr',\n icon?: string | undefined,\n alertOptions?: ImperativeAlertOptions,\n buttons: ImperativeAlertButton[] = []\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: 3000,\n closable: true,\n ...alertOptions,\n };\n icon = icon || 'light/info-circle';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement('nano-alert'),\n {\n ...opts,\n open: false,\n innerHTML: `\n <nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n requestAnimationFrame(async (_) => {\n await alert.toast(position);\n resolve(alert);\n });\n });\n}\n\n/**\n * `nano-alert` helper to create alert notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons\n * @param label - descriptive label for assitive technology\n * @param icon - name for the `nano-icon`\n * @param alertOptions\n * @returns `Promise<void>`\n */\nexport function nanoShowAlert(\n message: string,\n buttons: ImperativeAlertButton[] = [],\n label: string,\n icon: string | undefined = 'light/info-circle',\n alertOptions: ImperativeAlertOptions = {}\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: Infinity,\n closable: false,\n ...alertOptions,\n };\n icon = icon || 'light/info-circle';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement('nano-alert'),\n {\n ...opts,\n open: false,\n innerHTML: `\n ${icon ? `<nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>` : ''}\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n setTimeout(async (_) => {\n await alert.alert(label);\n resolve(alert);\n }, 100);\n });\n}\n","interface ImperativeDialogOptions {\n noUserDismiss: boolean;\n noHeader?: boolean;\n noFooter?: boolean;\n label: string;\n}\n/**\n * `nano-dialog` helper to create dialog modals imperatively.\n * @param body - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons - { classes: string; content: string; handler: () => {} }[]\n * @param dialogOptions - { noUserDismiss: boolean, noHeader?: boolean, noFooter?: boolean, label: string }\n * @returns `Promise<void>`\n */\nexport function nanoCreateDialog(\n body: string,\n buttons: { classes: string; content: string; handler: () => void }[] = [],\n dialogOptions?: ImperativeDialogOptions\n) {\n const opts: ImperativeDialogOptions = {\n noUserDismiss: false,\n label: 'Dialog',\n ...dialogOptions,\n };\n const dialog: HTMLNanoDialogElement = Object.assign(\n document.createElement('nano-dialog'),\n {\n ...opts,\n open: false,\n innerHTML: `\n ${body}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`,\n }\n );\n\n if (buttons.length) {\n Array.from(dialog.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n\n document.body.appendChild(dialog);\n return dialog;\n}\n","// import { setPlatformHelpers } from '@stencil/core';\nexport * from './components/alert/alert.helpers';\nexport * from './components/dialog/dialog.helpers';\nexport {\n debounce as nanoDebounce,\n throttle as nanoThrottle,\n} from './utils/throttle';\nexport { getTabbableElements as nanoGetTabElements } from './utils/tabbable';\n\nexport const initialize = (\n helpers: { _ael?: any; _ce?: any; _rel?: any } = {}\n) => {\n if (typeof (window as any) === 'undefined') {\n return;\n }\n\n const platformHelpers: any = {};\n if (helpers._ael) {\n platformHelpers.ael = helpers._ael;\n }\n if (helpers._rel) {\n platformHelpers.rel = helpers._rel;\n }\n if (helpers._ce) {\n platformHelpers.ce = helpers._ce;\n }\n // setPlatformHelpers(platformHelpers);\n};\n","// focus - focusOptions - preventScroll polyfill\n(function() {\n if (\n typeof window === \"undefined\" ||\n typeof document === \"undefined\" ||\n typeof HTMLElement === \"undefined\"\n ) {\n return;\n }\n\n var supportsPreventScrollOption = false;\n try {\n var focusElem = document.createElement(\"div\");\n focusElem.addEventListener(\n \"focus\",\n function(event) {\n event.preventDefault();\n event.stopPropagation();\n },\n true\n );\n focusElem.focus(\n Object.defineProperty({}, \"preventScroll\", {\n get: function() {\n // Edge v18 gives a false positive for supporting inputs\n if (\n navigator &&\n typeof navigator.userAgent !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.match(/Edge\\/1[7-8]/)) {\n return supportsPreventScrollOption = false\n }\n\n supportsPreventScrollOption = true;\n }\n })\n );\n } catch (e) {}\n\n if (\n HTMLElement.prototype.nativeFocus === undefined &&\n !supportsPreventScrollOption\n ) {\n HTMLElement.prototype.nativeFocus = HTMLElement.prototype.focus;\n\n var calcScrollableElements = function(element) {\n var parent = element.parentNode;\n var scrollableElements = [];\n var rootScrollingElement =\n document.scrollingElement || document.documentElement;\n\n while (parent && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push([\n parent,\n parent.scrollTop,\n parent.scrollLeft\n ]);\n }\n parent = parent.parentNode;\n }\n parent = rootScrollingElement;\n scrollableElements.push([parent, parent.scrollTop, parent.scrollLeft]);\n\n return scrollableElements;\n };\n\n var restoreScrollPosition = function(scrollableElements) {\n for (var i = 0; i < scrollableElements.length; i++) {\n scrollableElements[i][0].scrollTop = scrollableElements[i][1];\n scrollableElements[i][0].scrollLeft = scrollableElements[i][2];\n }\n scrollableElements = [];\n };\n\n var patchedFocus = function(args) {\n if (args && args.preventScroll) {\n var evScrollableElements = calcScrollableElements(this);\n if (typeof setTimeout === 'function') {\n var thisElem = this;\n setTimeout(function () {\n thisElem.nativeFocus();\n restoreScrollPosition(evScrollableElements);\n }, 0);\n } else {\n this.nativeFocus();\n restoreScrollPosition(evScrollableElements);\n }\n }\n else {\n this.nativeFocus();\n }\n };\n\n HTMLElement.prototype.focus = patchedFocus;\n }\n})();\n","import { Build } from '@stencil/core';\n\n// focus options\nimport 'focus-options-polyfill';\n\nif (Build.isBrowser && globalThis['document']) {\n // fire global 'ready' event when everything is hydrated\n\n const docEle = document.documentElement;\n const docIsReady = () => {\n if (!docEle.classList.contains('hydrated')) return false;\n docEle.dispatchEvent(new CustomEvent('nanoComponentsReady'));\n return true;\n };\n\n if (!docIsReady()) {\n let mutationO = new MutationObserver((_) => {\n if (!docIsReady()) return;\n\n mutationO.disconnect();\n mutationO = null;\n });\n\n mutationO.observe(docEle, {\n childList: false,\n subtree: false,\n attributes: true,\n });\n }\n}\n"],"version":3}
@@ -8,7 +8,7 @@ import { d as debounce, a as debounceEvent } from './throttle.js';
8
8
  import { F as FormControlWrap, a as FormControl } from './form-control.js';
9
9
  import { d as defineCustomElement$1 } from './icon.js';
10
10
 
11
- const inputCss = ".sc-nano-input-h {\n box-sizing: border-box;\n}\n\n*.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n[disabled].sc-nano-input-h:not([disabled=false]) {\n opacity: 0.5;\n}\n\n.form-ctrl.sc-nano-input {\n min-inline-size: 100%;\n display: block;\n}\n.form-ctrl.has-helper-end.sc-nano-input {\n display: flex;\n gap: 1rem;\n container-type: inline-size;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input {\n flex: 1 1 100%;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input {\n display: none;\n}\n@container (min-width: 350px) {\n .form-ctrl.has-helper-end .form-ctrl__helper-end {\n display: block !important;\n }\n .form-ctrl.has-helper-end .form-ctrl__helper {\n display: none !important;\n }\n}\n\n.form-ctrl__wrapper.sc-nano-input {\n display: block;\n}\n\nlabel.sc-nano-input, .form-ctrl__more.sc-nano-input, .form-ctrl__error.sc-nano-input, .form-ctrl__helper.sc-nano-input {\n display: block;\n inline-size: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nlabel.visually-hide.sc-nano-input, .form-ctrl__more.visually-hide.sc-nano-input, .form-ctrl__error.visually-hide.sc-nano-input, .form-ctrl__helper.visually-hide.sc-nano-input {\n clip: rect(1px, 1px, 1px, 1px);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n block-size: 1px;\n inline-size: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\n\n.form-ctrl__float-label.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) 0;\n color: var(--label-color);\n position: absolute;\n font-size: 1.15em;\n transform: translateY(-50%);\n transform-origin: top left;\n inset-block-start: 50%;\n transition: all 0.125s ease-in;\n opacity: 1;\n}\n.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input, .has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input {\n transform: translateY(-110%);\n font-size: 0.8em;\n opacity: 0.7;\n}\n.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input, .has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 1;\n}\n.form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 50%;\n}\n.has-focus.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 0;\n transform: translateY(38%);\n}\n.has-value.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 0;\n transform: translateY(38%);\n}\n\n.form-ctrl__label.sc-nano-input {\n color: var(--label-color);\n font-size: var(--label-font-size);\n padding-block-end: var(--padding-bottom);\n line-height: 1;\n display: flex;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n margin-block: unset;\n margin-inline: 0 5px;\n opacity: 0;\n -webkit-appearance: none;\n appearance: none;\n transition: 0.3s ease opacity;\n font-size: 0.9em;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n margin-block: unset;\n margin-inline: auto 0;\n font-size: 0.9em;\n opacity: 0.5;\n}\n.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n opacity: 0.5;\n}\n.has-focus.sc-nano-input-h .form-ctrl__label.sc-nano-input {\n color: var(--label-color--focus);\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__label.sc-nano-input {\n color: var(--label-color--invalid);\n}\n\n.has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-focus.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__more.sc-nano-input {\n block-size: 1em;\n position: relative;\n margin-block: 4px var(--padding-bottom);\n margin-inline: 3px 0;\n}\n\n.form-ctrl__helper.sc-nano-input, .form-ctrl__error.sc-nano-input {\n inset-block-start: 0;\n inset-inline-start: 0;\n position: absolute;\n font-size: var(--invalid-msg-font-size);\n line-height: 1.2;\n transition: 0.3s ease-out opacity;\n}\n\n.form-ctrl__helper.sc-nano-input {\n font-style: italic;\n color: var(--help-msg-color);\n}\n[show-inline-error].sc-nano-input-h:not([show-inline-error=false]):not([disabled]).is-invalid .form-ctrl__helper.sc-nano-input {\n opacity: 0;\n}\n\n.form-ctrl__helper-end.sc-nano-input {\n flex: 1 1 30%;\n min-inline-size: 150px;\n font-size: var(--invalid-msg-font-size);\n color: var(--help-msg-color);\n font-style: italic;\n}\n\n.form-ctrl__error.sc-nano-input {\n opacity: 0;\n color: var(--invalid-msg-color);\n font-stretch: condensed;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__error.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__input.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n border-radius: var(--input-border-radius);\n inline-size: 100%;\n padding: 0 !important;\n position: relative;\n flex: 1 0 auto;\n display: flex;\n background: var(--input-bg-color);\n border: var(--input-border-style);\n border-width: var(--input-border-width);\n font-size: var(--input-font-size);\n padding-inline-start: calc(var(--input-border-hint-width) - var(--input-border-width)) !important;\n}\n.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--focus);\n border: var(--input-border-style--focus);\n border-width: var(--input-border-width);\n padding-inline-start: calc(var(--input-border-hint-width) - var(--input-border-width)) !important;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--invalid);\n border: var(--input-border-style--invalid);\n border-width: var(--input-border-width);\n border-inline-start: var(--input-border-style--invalid-focus) var(--input-border-hint-width);\n padding-inline-start: 0 !important;\n}\n.is-invalid.has-focus.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--invalid);\n border: var(--input-border-style--invalid-focus);\n border-width: var(--input-border-width);\n border-inline-start: var(--input-border-style--invalid-focus) var(--input-border-hint-width);\n padding-inline-start: 0 !important;\n}\n\n.form-ctrl__input-wrap.sc-nano-input {\n display: flex;\n align-items: stretch;\n flex: 1;\n max-inline-size: 100%;\n}\n\n.form-ctrl__clear-btn.sc-nano-input, .form-ctrl__slot-end.sc-nano-input, .form-ctrl__slot-start.sc-nano-input, .form-ctrl__slot-value-end.sc-nano-input {\n --nano-icon-size: 1.4em;\n margin-block: 0;\n margin-inline: 0;\n font-size: 1em;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n display: flex;\n align-items: stretch;\n inline-size: auto;\n}\n\n.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > *, .form-ctrl__slot-end.sc-nano-input-s > *, .form-ctrl__slot-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input-s > *, .form-ctrl__slot-value-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n --nano-icon-size: 1.4em;\n padding-inline: unset;\n padding-inline: var(--padding-start) var(--padding-end);\n font-size: 1em;\n align-items: center;\n display: flex;\n block-size: 100%;\n z-index: 1;\n}\n.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end .sc-nano-input-s > *, [disabled].sc-nano-input-h:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__slot-value-end.sc-nano-input-s > *, .form-ctrl__slot-value-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color);\n padding: 0;\n opacity: 0;\n inline-size: 0;\n -webkit-appearance: none;\n appearance: none;\n align-items: center;\n overflow: hidden;\n}\n.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color--invalid);\n}\n.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) var(--padding-end);\n opacity: 1;\n inline-size: auto;\n}\n.form-ctrl__clear-btn.sc-nano-input:hover {\n color: var(--clear-btn-color--hover);\n}\n\n.sc-nano-input-h {\n \n --placeholder-color: var(--nano-input-placeholder-color, initial);\n --placeholder-font-style: var(--nano-input-placeholder-style, initial);\n --placeholder-font-weight: var(--nano-input-placeholder-weight, initial);\n --placeholder-opacity: var(--nano-input-placeholder-opacity, 0.5);\n --padding-top: var(--nano-input-padding-top, var(--nano-input-padding, 8px));\n --padding-end: var(--nano-input-padding-end, var(--nano-input-padding, 8px));\n --padding-bottom: var(--nano-input-padding-bottom, var(--nano-input-padding, 6px));\n --padding-start: var(--nano-input-padding-start, var(--nano-input-padding, 8px));\n --color-invalid: var(--nano-color-danger-rgb, 239 65 53);\n --color--focus-rgb:\n var(\n --nano-color-base-rgb,\n var(--nano-color-primary-rgb, 0 116 149)\n );\n --input-font-size: var(--nano-input-font-size, 0.87em);\n --input-text-color: var(--nano-input-text-color, #4a4a4a);\n --input-border-width: var(--nano-input-border-width, 1px);\n --input-border-hint-width: 3px;\n --input-border-color: var(--nano-input-border-color, #e4e6e8);\n --input-border-radius: var(--nano-input-border-radius, 0);\n --input-border-style: var(--nano-input-border-style, solid) var(--nano-input-border-color, #e4e6e8);\n --input-border-style--focus: var(--nano-input-border-style, solid) var(--nano-input-border-color--focus, #90c6e7);\n --input-border-style--invalid: var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #e4e6e8);\n --input-border-style--invalid-focus: var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #ef4135);\n --input-bg-color: var(--nano-input-background-color, #fff);\n --input-bg-color--focus: var(--input-bg-color);\n --input-bg-color--invalid: var(--nano-input-background-color, white);\n --invalid-msg-color: rgb(var(--color-invalid) / 100%);\n --invalid-msg-font-size: var(--nano-input-help-font-size, 0.75em);\n --help-msg-color: var(--nano-input-help-color, #616d6e);\n --clear-btn-color: var(--nano-clear-btn-color, rgba(0, 0, 0, 0.3));\n --clear-btn-color--hover: rgb(var(--color--focus-rgb) / 100%);\n --clear-btn-color--invalid: rgb(var(--color-invalid) / 100%);\n --label-color: var(--nano-input-label-color, \"currentcolor\");\n --label-color--focus: var(--label-color);\n --label-color--invalid: var(--nano-input-label-color-invalid, \"currentcolor\");\n --label-font-size: var(--nano-input-label-color, 1em);\n --multi-input-value-bg: var(--nano-input-tag-bg, 186 220 240);\n --multi-input-value-text-color: var(--nano-input-tag-color, #455556);\n --multi-input-value-border: var(--nano-input-tag-color, #badcf0);\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentcolor;\n display: block;\n}\n\n.nano-color.sc-nano-input-h {\n color: var(--nano-color-base);\n --input-border-style--focus:\n var(--nano-input-border-style, solid) var(\n --nano-color-tint,\n var(--nano-color-primary-tint, #2689a5)\n );\n}\n\n.input__native-ctrl.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n padding-block: 0;\n padding-inline: var(--padding-start) var(--padding-end);\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n inline-size: 100%;\n max-inline-size: 100%;\n max-block-size: 100%;\n border: 0;\n outline: none;\n background: transparent;\n -webkit-appearance: none;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n \n}\n.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n}\n.input__native-ctrl.sc-nano-input::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-block-size: initial;\n}\n.input__native-ctrl.sc-nano-input::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n}\n.input__native-ctrl.sc-nano-input:-webkit-autofill {\n background-color: transparent;\n}\n.input__native-ctrl.sc-nano-input::-webkit-search-decoration, .input__native-ctrl.sc-nano-input::-webkit-search-cancel-button, .input__native-ctrl.sc-nano-input::-webkit-search-results-button, .input__native-ctrl.sc-nano-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n.input__native-ctrl.sc-nano-input:invalid {\n box-shadow: none;\n}\n.input__native-ctrl.sc-nano-input::-ms-clear, .input__native-ctrl.sc-nano-input::-ms-reveal {\n display: none;\n}\n.input__native-ctrl.input__resizable.sc-nano-input {\n resize: vertical;\n overflow: auto;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 1.5em;\n padding-block: var(--padding-top) 0.25em;\n white-space: pre-wrap;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder {\n line-height: 1.5em;\n}\n.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n padding-block-start: 1.75em;\n}\n[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input {\n -webkit-user-select: none;\n user-select: none;\n}";
11
+ const inputCss = ".sc-nano-input-h {\n box-sizing: border-box;\n}\n\n*.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n[disabled].sc-nano-input-h:not([disabled=false]) {\n opacity: 0.5;\n}\n\n.form-ctrl.sc-nano-input {\n min-inline-size: 100%;\n display: block;\n}\n.form-ctrl.has-helper-end.sc-nano-input {\n display: flex;\n gap: 1rem;\n container-type: inline-size;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input {\n flex: 1 1 100%;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input {\n display: none;\n}\n@container (min-width: 350px) {\n .form-ctrl.has-helper-end .form-ctrl__helper-end {\n display: block !important;\n }\n .form-ctrl.has-helper-end .form-ctrl__helper {\n display: none !important;\n }\n}\n\n.form-ctrl__wrapper.sc-nano-input {\n display: block;\n}\n\nlabel.sc-nano-input, .form-ctrl__more.sc-nano-input, .form-ctrl__error.sc-nano-input, .form-ctrl__helper.sc-nano-input {\n display: block;\n inline-size: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nlabel.visually-hide.sc-nano-input, .form-ctrl__more.visually-hide.sc-nano-input, .form-ctrl__error.visually-hide.sc-nano-input, .form-ctrl__helper.visually-hide.sc-nano-input {\n clip: rect(1px, 1px, 1px, 1px);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n block-size: 1px;\n inline-size: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\n\n.form-ctrl__float-label.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) 0;\n color: var(--label-color);\n position: absolute;\n font-size: 1.15em;\n transform: translateY(-50%);\n transform-origin: top left;\n inset-block-start: 50%;\n transition: all 0.125s ease-in;\n opacity: 1;\n}\n.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input, .has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input {\n transform: translateY(-110%);\n font-size: 0.8em;\n opacity: 0.7;\n}\n.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input, .has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 1;\n}\n.form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 50%;\n}\n.has-focus.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 0;\n transform: translateY(38%);\n}\n.has-value.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input {\n inset-block-start: 0;\n transform: translateY(38%);\n}\n\n.form-ctrl__label.sc-nano-input {\n color: var(--label-color);\n font-size: var(--label-font-size);\n padding-block-end: var(--padding-bottom);\n line-height: 1;\n display: flex;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n margin-block: unset;\n margin-inline: 0 5px;\n opacity: 0;\n -webkit-appearance: none;\n appearance: none;\n transition: 0.3s ease opacity;\n font-size: 0.9em;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n margin-block: unset;\n margin-inline: auto 0;\n font-size: 0.9em;\n opacity: 0.5;\n}\n.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n opacity: 0.5;\n}\n.has-focus.sc-nano-input-h .form-ctrl__label.sc-nano-input {\n color: var(--label-color--focus);\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__label.sc-nano-input {\n color: var(--label-color--invalid);\n}\n\n.has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input, .has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input, .has-focus.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input, .has-value.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__more.sc-nano-input {\n block-size: 1em;\n position: relative;\n margin-block: 4px var(--padding-bottom);\n margin-inline: 3px 0;\n}\n\n.form-ctrl__helper.sc-nano-input, .form-ctrl__error.sc-nano-input {\n inset-block-start: 0;\n inset-inline-start: 0;\n position: absolute;\n font-size: var(--invalid-msg-font-size);\n line-height: 1.2;\n transition: 0.3s ease-out opacity;\n}\n\n.form-ctrl__helper.sc-nano-input {\n font-style: italic;\n color: var(--help-msg-color);\n}\n[show-inline-error].sc-nano-input-h:not([show-inline-error=false]):not([disabled]).is-invalid .form-ctrl__helper.sc-nano-input {\n opacity: 0;\n}\n\n.form-ctrl__helper-end.sc-nano-input {\n flex: 1 1 30%;\n min-inline-size: 150px;\n font-size: var(--invalid-msg-font-size);\n color: var(--help-msg-color);\n font-style: italic;\n}\n\n.form-ctrl__error.sc-nano-input {\n opacity: 0;\n color: var(--invalid-msg-color);\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__error.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__input.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n border-radius: var(--input-border-radius);\n inline-size: 100%;\n padding: 0 !important;\n position: relative;\n flex: 1 0 auto;\n display: flex;\n background: var(--input-bg-color);\n border: var(--input-border-style);\n border-width: var(--input-border-width);\n font-size: var(--input-font-size);\n padding-inline-start: calc(var(--input-border-hint-width) - var(--input-border-width)) !important;\n}\n.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--focus);\n border: var(--input-border-style--focus);\n border-width: var(--input-border-width);\n padding-inline-start: calc(var(--input-border-hint-width) - var(--input-border-width)) !important;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--invalid);\n border: var(--input-border-style--invalid);\n border-width: var(--input-border-width);\n border-inline-start: var(--input-border-style--invalid-focus) var(--input-border-hint-width);\n padding-inline-start: 0 !important;\n}\n.is-invalid.has-focus.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n background: var(--input-bg-color--invalid);\n border: var(--input-border-style--invalid-focus);\n border-width: var(--input-border-width);\n border-inline-start: var(--input-border-style--invalid-focus) var(--input-border-hint-width);\n padding-inline-start: 0 !important;\n}\n\n.form-ctrl__input-wrap.sc-nano-input {\n display: flex;\n align-items: stretch;\n flex: 1;\n max-inline-size: 100%;\n}\n\n.form-ctrl__clear-btn.sc-nano-input, .form-ctrl__slot-end.sc-nano-input, .form-ctrl__slot-start.sc-nano-input, .form-ctrl__slot-value-end.sc-nano-input {\n --nano-icon-size: 1.4em;\n margin-block: 0;\n margin-inline: 0;\n font-size: 1em;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n display: flex;\n align-items: stretch;\n inline-size: auto;\n}\n\n.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > *, .form-ctrl__slot-end.sc-nano-input-s > *, .form-ctrl__slot-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input-s > *, .form-ctrl__slot-value-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n --nano-icon-size: 1.4em;\n padding-inline: unset;\n padding-inline: var(--padding-start) var(--padding-end);\n font-size: 1em;\n align-items: center;\n display: flex;\n block-size: 100%;\n z-index: 1;\n}\n.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end .sc-nano-input-s > *, [disabled].sc-nano-input-h:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__slot-value-end.sc-nano-input-s > *, .form-ctrl__slot-value-end .sc-nano-input-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color);\n padding: 0;\n opacity: 0;\n inline-size: 0;\n -webkit-appearance: none;\n appearance: none;\n align-items: center;\n overflow: hidden;\n}\n.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color--invalid);\n}\n.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) var(--padding-end);\n opacity: 1;\n inline-size: auto;\n}\n.form-ctrl__clear-btn.sc-nano-input:hover {\n color: var(--clear-btn-color--hover);\n}\n\n.sc-nano-input-h {\n \n --placeholder-color: var(--nano-input-placeholder-color, initial);\n --placeholder-font-style: var(--nano-input-placeholder-style, initial);\n --placeholder-font-weight: var(--nano-input-placeholder-weight, initial);\n --placeholder-opacity: var(--nano-input-placeholder-opacity, 0.5);\n --padding-top: var(--nano-input-padding-top, var(--nano-input-padding, 8px));\n --padding-end: var(--nano-input-padding-end, var(--nano-input-padding, 8px));\n --padding-bottom: var(--nano-input-padding-bottom, var(--nano-input-padding, 6px));\n --padding-start: var(--nano-input-padding-start, var(--nano-input-padding, 8px));\n --color-invalid: var(--nano-color-danger-rgb, 239 65 53);\n --color--focus-rgb:\n var(\n --nano-color-base-rgb,\n var(--nano-color-primary-rgb, 0 116 149)\n );\n --input-font-size: var(--nano-input-font-size, 0.87em);\n --input-text-color: var(--nano-input-text-color, #4a4a4a);\n --input-border-width: var(--nano-input-border-width, 1px);\n --input-border-hint-width: 3px;\n --input-border-color: var(--nano-input-border-color, #e4e6e8);\n --input-border-radius: var(--nano-input-border-radius, 0);\n --input-border-style: var(--nano-input-border-style, solid) var(--nano-input-border-color, #e4e6e8);\n --input-border-style--focus: var(--nano-input-border-style, solid) var(--nano-input-border-color--focus, #90c6e7);\n --input-border-style--invalid: var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #e4e6e8);\n --input-border-style--invalid-focus: var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #ef4135);\n --input-bg-color: var(--nano-input-background-color, #fff);\n --input-bg-color--focus: var(--input-bg-color);\n --input-bg-color--invalid: var(--nano-input-background-color, white);\n --invalid-msg-color: rgb(var(--color-invalid) / 100%);\n --invalid-msg-font-size: var(--nano-input-help-font-size, 0.75em);\n --help-msg-color: var(--nano-input-help-color, #616d6e);\n --clear-btn-color: var(--nano-clear-btn-color, rgba(0, 0, 0, 0.3));\n --clear-btn-color--hover: rgb(var(--color--focus-rgb) / 100%);\n --clear-btn-color--invalid: rgb(var(--color-invalid) / 100%);\n --label-color: var(--nano-input-label-color, \"currentcolor\");\n --label-color--focus: var(--label-color);\n --label-color--invalid: var(--nano-input-label-color-invalid, \"currentcolor\");\n --label-font-size: var(--nano-input-label-color, 1em);\n --multi-input-value-bg: var(--nano-input-tag-bg, 186 220 240);\n --multi-input-value-text-color: var(--nano-input-tag-color, #455556);\n --multi-input-value-border: var(--nano-input-tag-color, #badcf0);\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentcolor;\n display: block;\n}\n\n.nano-color.sc-nano-input-h {\n color: var(--nano-color-base);\n --input-border-style--focus:\n var(--nano-input-border-style, solid) var(\n --nano-color-tint,\n var(--nano-color-primary-tint, #2689a5)\n );\n}\n\n.input__native-ctrl.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n padding-block: 0;\n padding-inline: var(--padding-start) var(--padding-end);\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n inline-size: 100%;\n max-inline-size: 100%;\n max-block-size: 100%;\n border: 0;\n outline: none;\n background: transparent;\n -webkit-appearance: none;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n \n}\n.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n}\n.input__native-ctrl.sc-nano-input::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-block-size: initial;\n}\n.input__native-ctrl.sc-nano-input::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n}\n.input__native-ctrl.sc-nano-input:-webkit-autofill {\n background-color: transparent;\n}\n.input__native-ctrl.sc-nano-input::-webkit-search-decoration, .input__native-ctrl.sc-nano-input::-webkit-search-cancel-button, .input__native-ctrl.sc-nano-input::-webkit-search-results-button, .input__native-ctrl.sc-nano-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n.input__native-ctrl.sc-nano-input:invalid {\n box-shadow: none;\n}\n.input__native-ctrl.sc-nano-input::-ms-clear, .input__native-ctrl.sc-nano-input::-ms-reveal {\n display: none;\n}\n.input__native-ctrl.input__resizable.sc-nano-input {\n resize: vertical;\n overflow: auto;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 1.5em;\n padding-block: var(--padding-top) 0.25em;\n white-space: pre-wrap;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder {\n line-height: 1.5em;\n}\n.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n padding-block-start: 1.75em;\n}\n[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input {\n -webkit-user-select: none;\n user-select: none;\n}";
12
12
 
13
13
  let inputIds = 0;
14
14
  const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {