@nanoporetech-digital/components 3.1.1 → 3.2.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 (86) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/index-41582c2a.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/nano-components.cjs.js +1 -1
  5. package/dist/cjs/nano-global-nav.cjs.entry.js +16 -13
  6. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-progress-bar.cjs.entry.js +1 -1
  9. package/dist/cjs/nano-progress-bar.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -1
  11. package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
  12. package/dist/cjs/{nano-table-844394ad.js → nano-table-7dbe799c.js} +8 -7
  13. package/dist/cjs/nano-table-7dbe799c.js.map +1 -0
  14. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  15. package/dist/cjs/{table.worker-1bc19978.js → table.worker-fe960deb.js} +2 -2
  16. package/dist/cjs/table.worker-fe960deb.js.map +1 -0
  17. package/dist/collection/components/global-nav/global-nav.js +15 -12
  18. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  19. package/dist/collection/components/global-nav/search-widget.js +4 -0
  20. package/dist/collection/components/global-nav/search-widget.js.map +1 -0
  21. package/dist/collection/components/global-nav/style/global-nav.css +9 -4
  22. package/dist/collection/components/input/input.js +2 -2
  23. package/dist/collection/components/input/input.js.map +1 -1
  24. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  25. package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
  26. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  27. package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
  28. package/dist/collection/components/table/table.css +32 -28
  29. package/dist/collection/components/table/table.js +5 -4
  30. package/dist/collection/components/table/table.js.map +1 -1
  31. package/dist/components/input.js.map +1 -1
  32. package/dist/components/nano-global-nav.js +16 -13
  33. package/dist/components/nano-global-nav.js.map +1 -1
  34. package/dist/components/nano-table.js +16 -9
  35. package/dist/components/nano-table.js.map +1 -1
  36. package/dist/components/progress-bar.js +1 -1
  37. package/dist/components/progress-bar.js.map +1 -1
  38. package/dist/components/resize-observe.js +1 -1
  39. package/dist/components/resize-observe.js.map +1 -1
  40. package/dist/custom-elements/index.js +24 -20
  41. package/dist/custom-elements/index.js.map +1 -1
  42. package/dist/esm/index-3c280603.js +4 -4
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm/nano-components.js +1 -1
  45. package/dist/esm/nano-global-nav.entry.js +16 -13
  46. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  47. package/dist/esm/nano-input.entry.js.map +1 -1
  48. package/dist/esm/nano-progress-bar.entry.js +1 -1
  49. package/dist/esm/nano-progress-bar.entry.js.map +1 -1
  50. package/dist/esm/nano-resize-observe_2.entry.js +1 -1
  51. package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
  52. package/dist/esm/{nano-table-19d19d72.js → nano-table-93d25a68.js} +8 -7
  53. package/dist/esm/nano-table-93d25a68.js.map +1 -0
  54. package/dist/esm/nano-table.entry.js +1 -1
  55. package/dist/esm/{table.worker-c82cecdf.js → table.worker-5d681b97.js} +2 -2
  56. package/dist/esm/table.worker-5d681b97.js.map +1 -0
  57. package/dist/nano-components/nano-components.esm.js +1 -1
  58. package/dist/nano-components/p-28b43ee9.entry.js.map +1 -1
  59. package/dist/nano-components/{p-b4a045a2.entry.js → p-39124baa.entry.js} +2 -2
  60. package/dist/nano-components/{p-7ade1695.js.map → p-39124baa.entry.js.map} +0 -0
  61. package/dist/nano-components/p-42fa11c3.entry.js +5 -0
  62. package/dist/nano-components/p-42fa11c3.entry.js.map +1 -0
  63. package/dist/nano-components/p-4c386a43.js +5 -0
  64. package/dist/nano-components/p-4c386a43.js.map +1 -0
  65. package/dist/nano-components/{p-7ade1695.js → p-619a1c8e.js} +2 -2
  66. package/dist/nano-components/{p-b4a045a2.entry.js.map → p-619a1c8e.js.map} +0 -0
  67. package/dist/nano-components/p-653a25f8.entry.js +5 -0
  68. package/dist/nano-components/p-653a25f8.entry.js.map +1 -0
  69. package/dist/nano-components/{p-f95a263c.entry.js → p-66099557.entry.js} +2 -2
  70. package/dist/nano-components/p-66099557.entry.js.map +1 -0
  71. package/dist/types/components/global-nav/search-widget.d.ts +0 -0
  72. package/dist/types/components/input/input.d.ts +2 -2
  73. package/docs-json.json +9 -3
  74. package/docs-vscode.json +1 -1
  75. package/package.json +2 -2
  76. package/dist/cjs/nano-table-844394ad.js.map +0 -1
  77. package/dist/cjs/table.worker-1bc19978.js.map +0 -1
  78. package/dist/esm/nano-table-19d19d72.js.map +0 -1
  79. package/dist/esm/table.worker-c82cecdf.js.map +0 -1
  80. package/dist/nano-components/p-1ae8c03e.entry.js +0 -5
  81. package/dist/nano-components/p-1ae8c03e.entry.js.map +0 -1
  82. package/dist/nano-components/p-b7901427.entry.js +0 -5
  83. package/dist/nano-components/p-b7901427.entry.js.map +0 -1
  84. package/dist/nano-components/p-b83a8320.js +0 -5
  85. package/dist/nano-components/p-b83a8320.js.map +0 -1
  86. package/dist/nano-components/p-f95a263c.entry.js.map +0 -1
@@ -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,EACN,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,QAAQ,EAC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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 Build,\n Listen,\n} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n TableColHead,\n TableRow,\n TableCell,\n TableHeadFootRow,\n} from './table.children';\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 {\n detectScrollSpeed,\n findScrollParent,\n isInViewport,\n} from './table.utils';\nimport type { TableTypes } from '../../interface';\n\nfunction perMark(name: string, end: boolean = false) {\n if (!Build.isDev) 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.log(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 * - 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 */\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 /** 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 true.\n * Will be shown automatically if `rows` is a promise waiting to resolve\n * or when performing custom filtering or sorting */\n @Prop()\n get loading() {\n return this._loading;\n }\n set loading(l: boolean) {\n this.debounceSetLoading(l);\n }\n @State() _loading: boolean = true;\n private debounceSetLoading = (l: boolean) => {\n this._loading = l;\n };\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() rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) return;\n\n this.loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n if (!this.isReady) {\n await this.columnInit();\n this.setInitialBlockDimension();\n }\n this.loading = false;\n });\n }\n\n /** The column config used to generate present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable['columns'] = [];\n\n @Watch('columns')\n handleColsChange() {\n 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 = 60;\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 * On successful completion the column UI will be updated.\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?: (filters: TableTypes.Filter[]) => Promise<void>;\n\n /** A custom sorting function. Should return a promise.\n * On successful completion the column UI will be updated.\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<void>;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\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 when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\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 /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = this.columns.find((c) => !!c.order);\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.find((c) => c.prop === column);\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 // Private Logic\n\n // 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\n // Blocks\n\n /** `tr` elements split into units - defined by `perPage`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1, 2];\n @State() measureHeight = 0;\n\n private blockElements: HTMLTableSectionElement[];\n private blockIos: WeakMap<HTMLTableSectionElement, IntersectionObserver> =\n new WeakMap();\n private blockHeights: { blockIndex: number; height: number }[] = [];\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n this.measureHeight = el.getBoundingClientRect().height;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n private unitHeight = 0;\n\n // Scroll / IO used for hiding / showing blocks\n\n private ignoreIO = true;\n private scrollParent: HTMLElement;\n private scrollSpeed: number;\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 // Listeners\n\n @Listen('scroll', { target: 'window' })\n scrollListener() {\n // see explanation in `setupBlockIO`\n const speed = detectScrollSpeed();\n this.scrollSpeed = speed < 0 ? speed * -1 : speed;\n }\n\n // Logic\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n const idRow = document.querySelector(hash);\n if (idRow) {\n idRow.scrollIntoView();\n }\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 await this.customSortFn(column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('custom sort failed', e);\n }\n return;\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 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 await this.customFilterFn(this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n }\n return;\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n perMark('search', true);\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 (cFilter) c.filter = cFilter.filter;\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.topAnchorEle.scrollIntoView();\n if (element) element.scrollIntoView({ block: 'start' });\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n }\n\n private setMeasureElement() {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n });\n }\n\n /**\n * Sets the initial height on tbody elements that are not active\n * These elements have no natural height - on account of all their rows being hidden\n * So we just estimate for now\n */\n private setInitialBlockDimension() {\n if (!this.blockElements.length) return;\n perMark('blockDims');\n\n const finishResizing: Promise<void> = new Promise((resolve) => {\n readTask(() => {\n this.setMeasureElement();\n\n // find the first active block\n if (!this.measureEle && !this.unitHeight) resolve();\n\n this.blockElements.forEach((el, i) => {\n if (!el || !el.classList?.contains(`${CSSNAMESPACE}__inactive`)) {\n if (i === this.blockElements.length - 1) resolve();\n return;\n }\n if (i === this.blockElements.length - 1) resolve();\n });\n });\n });\n\n // we're all finished.\n finishResizing.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n\n requestAnimationFrame(() => {\n this.isReady = true;\n });\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = this.columns\n .filter((c) => !!c.filter)\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.find((c) => !!c.order);\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\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 perMark('setBlocks');\n this.activeBlocks = [0, 1, 2];\n this.ignoreIO = true;\n let i = 1;\n const l = this.store.data.state.rows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n this.blockHeights = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1]);\n\n if (i % this.perBlock === 0) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n if (rows.length)\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\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): string {\n if (this.activeBlocks.includes(blockIndex)) return undefined;\n\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight) return cachedBlockHeight.height + 'px';\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight + 'px';\n }\n return this.unitHeight ? this.unitHeight * blockLength + 'px' : undefined;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n readTask(() => {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhI = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhI > 0) {\n this.blockHeights[fBhI] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * Attaches an intersection observer to each rendered tbody element\n * shows / hides intersecting blocks' and sets heights for when they're hidden\n * @param el - the tbody element to observe\n * @param blockIndex - the rendering tbody we're attaching the IO to\n */\n private setupBlockIO = (el: HTMLTableSectionElement, blockIndex: number) => {\n if (!el || this.blockIos.has(el)) return;\n\n const blockIo = new IntersectionObserver(\n ([ioEntry]) => {\n if (this.ignoreIO) return;\n\n if (ioEntry.isIntersecting) {\n // This is a bit gross\n // The Intersection Observer (IO) fires in an incorrect order when the scrolling is very fast\n // i.e. we go past blocks 3, 2, 1 and land on 0, but 3 can fire as 'intersecting' after 0.\n // To fix that, we check - for realsies - if the block IS visible.\n // BUT that test is not as sensitive to a block being visible via the IO,\n // so doesn't always fire if scrolling slowly\n // *sigh*\n readTask(() => {\n if (this.scrollSpeed < 100 || isInViewport(el, 0.01)) {\n this.activeBlocks = [\n blockIndex,\n blockIndex + 1,\n Math.max(0, blockIndex - 1),\n ];\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n requestAnimationFrame(() => this.setBlockHeight());\n }\n });\n }\n },\n {\n threshold: [0],\n root:\n this.scrollParent === document.scrollingElement\n ? null\n : this.scrollParent,\n }\n );\n\n blockIo.observe(el);\n this.blockIos.set(el, blockIo);\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 `title` prop or use the `caption` slot'\n );\n }\n }\n\n private handleColumnPinned = (positions: {\n [key in TableTypes.Position]: boolean;\n }) => {\n Object.entries(positions).forEach(([key, applied]) => {\n this.tableEle.classList.toggle(\n `${CSSNAMESPACE}__pinned--${key}`,\n applied\n );\n });\n };\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent\n );\n await this.handleRowsChange();\n this.processSlots();\n this.setBlocks();\n this.store.data.onChange('rows', () => this.setBlocks());\n }\n\n connectedCallback(): void {\n readTask(() => (this.scrollParent = findScrollParent(this.host)));\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\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\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n requestAnimationFrame(() => (this.ignoreIO = false));\n this.setMeasureElement();\n perMark('render', true);\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 <div\n aria-labelledby={'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\n <table\n role={this.type === 'grid' ? 'grid' : undefined}\n aria-readonly={this.type === 'table' ? 'true' : 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 >\n <caption\n class={{\n [`${CSSNAMESPACE}__caption`]: true,\n [`${CSSNAMESPACE}__caption--hide`]: !this.showCaption,\n }}\n id={'table-caption-' + this.renderId}\n >\n <slot name=\"caption\">{this.caption}</slot>\n </caption>\n\n {/* Header */}\n <thead>\n <TableHeadFootRow\n rowRenderer={this.headRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.headRender}\n onColumnOrderClick={this.sortStart}\n onColumnPinned={this.handleColumnPinned}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this.loading &&\n !this.blocks.length &&\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\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 this.setupBlockIO(tb, blockIndex);\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 rowRenderer={this.rowRender} row={row}>\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 <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex),\n }}\n />\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow\n rowRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\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"]}
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,EACN,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB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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 Build,\n Listen,\n} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n TableColHead,\n TableRow,\n TableCell,\n TableHeadFootRow,\n} from './table.children';\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 {\n detectScrollSpeed,\n findScrollParent,\n isInViewport,\n} from './table.utils';\nimport type { TableTypes } from '../../interface';\n\nfunction perMark(name: string, end: boolean = false) {\n if (!Build.isDev) 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.log(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 * - 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 */\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 /** 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 true.\n * Will be shown automatically if `rows` is a promise waiting to resolve\n * or when performing custom filtering or sorting */\n @Prop()\n get loading() {\n return this._loading;\n }\n set loading(l: boolean) {\n this.debounceSetLoading(l);\n }\n @State() _loading: boolean = true;\n private debounceSetLoading = (l: boolean) => {\n this._loading = l;\n };\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() rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) return;\n\n this.loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n if (!this.isReady) {\n await this.columnInit();\n this.setInitialBlockDimension();\n }\n this.loading = false;\n });\n }\n\n /** The column config used to generate present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable['columns'] = [];\n\n @Watch('columns')\n handleColsChange() {\n 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 = 60;\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 * On successful completion the column UI will be updated.\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?: (filters: TableTypes.Filter[]) => Promise<void>;\n\n /** A custom sorting function. Should return a promise.\n * On successful completion the column UI will be updated.\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<void>;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\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 when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\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 /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = this.columns.find((c) => !!c.order);\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.find((c) => c.prop === column);\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 // Private Logic\n\n // 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\n // Blocks\n\n /** `tr` elements split into units - defined by `perPage`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1, 2];\n @State() measureHeight = 0;\n\n private blockElements: HTMLTableSectionElement[];\n private blockIos: WeakMap<HTMLTableSectionElement, IntersectionObserver> =\n new WeakMap();\n private blockHeights: { blockIndex: number; height: number }[] = [];\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n this.measureHeight = el.getBoundingClientRect().height;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n private unitHeight = 0;\n\n // Scroll / IO used for hiding / showing blocks\n\n private ignoreIO = true;\n private scrollParent: HTMLElement;\n private scrollSpeed: number;\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 // Listeners\n\n @Listen('scroll', { target: 'window' })\n scrollListener() {\n // see explanation in `setupBlockIO`\n const speed = detectScrollSpeed();\n this.scrollSpeed = speed < 0 ? speed * -1 : speed;\n }\n\n // Logic\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n const idRow = document.querySelector(hash);\n if (idRow) {\n idRow.scrollIntoView();\n }\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 await this.customSortFn(column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('custom sort failed', e);\n }\n return;\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 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 await this.customFilterFn(this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n }\n return;\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n perMark('search', true);\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 (cFilter) c.filter = cFilter.filter;\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) element.scrollIntoView({ block: 'start' });\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n }\n\n private setMeasureElement() {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n });\n }\n\n /**\n * Sets the initial height on tbody elements that are not active\n * These elements have no natural height - on account of all their rows being hidden\n * So we just estimate for now\n */\n private setInitialBlockDimension() {\n if (!this.blockElements.length) return;\n perMark('blockDims');\n\n const finishResizing: Promise<void> = new Promise((resolve) => {\n readTask(() => {\n this.setMeasureElement();\n\n // find the first active block\n if (!this.measureEle && !this.unitHeight) resolve();\n\n this.blockElements.forEach((el, i) => {\n if (!el || !el.classList?.contains(`${CSSNAMESPACE}__inactive`)) {\n if (i === this.blockElements.length - 1) resolve();\n return;\n }\n if (i === this.blockElements.length - 1) resolve();\n });\n });\n });\n\n // we're all finished.\n finishResizing.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n\n requestAnimationFrame(() => {\n this.isReady = true;\n });\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = this.columns\n .filter((c) => !!c.filter)\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.find((c) => !!c.order);\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\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 perMark('setBlocks');\n this.activeBlocks = [0, 1, 2];\n this.ignoreIO = true;\n let i = 1;\n const l = this.store.data.state.rows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n this.blockHeights = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1]);\n\n if (i % this.perBlock === 0) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n if (rows.length)\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\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): string {\n if (this.activeBlocks.includes(blockIndex)) return undefined;\n\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight) return cachedBlockHeight.height + 'px';\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight + 'px';\n }\n return this.unitHeight ? this.unitHeight * blockLength + 'px' : undefined;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n readTask(() => {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhI = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhI > 0) {\n this.blockHeights[fBhI] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * Attaches an intersection observer to each rendered tbody element\n * shows / hides intersecting blocks' and sets heights for when they're hidden\n * @param el - the tbody element to observe\n * @param blockIndex - the rendering tbody we're attaching the IO to\n */\n private setupBlockIO = (el: HTMLTableSectionElement, blockIndex: number) => {\n if (!el || this.blockIos.has(el)) return;\n\n const blockIo = new IntersectionObserver(\n ([ioEntry]) => {\n if (this.ignoreIO) return;\n\n if (ioEntry.isIntersecting) {\n // This is a bit gross\n // The Intersection Observer (IO) fires in an incorrect order when the scrolling is very fast\n // i.e. we go past blocks 3, 2, 1 and land on 0, but 3 can fire as 'intersecting' after 0.\n // To fix that, we check - for realsies - if the block IS visible.\n // BUT that test is not as sensitive to a block being visible via the IO,\n // so doesn't always fire if scrolling slowly\n // *sigh*\n readTask(() => {\n if (this.scrollSpeed < 100 || isInViewport(el, 0.01)) {\n this.activeBlocks = [\n blockIndex,\n blockIndex + 1,\n Math.max(0, blockIndex - 1),\n ];\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n requestAnimationFrame(() => this.setBlockHeight());\n }\n });\n }\n },\n {\n threshold: [0],\n root:\n this.scrollParent === document.scrollingElement\n ? null\n : this.scrollParent,\n }\n );\n\n blockIo.observe(el);\n this.blockIos.set(el, blockIo);\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 `title` prop or use the `caption` slot'\n );\n }\n }\n\n private handleColumnPinned = (positions: {\n [key in TableTypes.Position]: boolean;\n }) => {\n Object.entries(positions).forEach(([key, applied]) => {\n this.tableEle.classList.toggle(\n `${CSSNAMESPACE}__pinned--${key}`,\n applied\n );\n });\n };\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent\n );\n await this.handleRowsChange();\n this.processSlots();\n this.setBlocks();\n this.store.data.onChange('rows', () => this.setBlocks());\n }\n\n connectedCallback(): void {\n readTask(() => (this.scrollParent = findScrollParent(this.host)));\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\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\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n requestAnimationFrame(() => (this.ignoreIO = false));\n this.setMeasureElement();\n perMark('render', true);\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 <nano-resize-observe\n aria-labelledby={'table-caption-' + this.renderId}\n tabindex={this.type === 'grid' ? '0' : undefined}\n states=\"576w sm, 768w md\"\n >\n <div class={`${CSSNAMESPACE}__wrap`}>\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-readonly={this.type === 'table' ? 'true' : 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 >\n <caption\n class={{\n [`${CSSNAMESPACE}__caption`]: true,\n [`${CSSNAMESPACE}__caption--hide`]: !this.showCaption,\n }}\n id={'table-caption-' + this.renderId}\n >\n <slot name=\"caption\">{this.caption}</slot>\n </caption>\n\n {/* Header */}\n <thead>\n <TableHeadFootRow\n rowRenderer={this.headRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.headRender}\n onColumnOrderClick={this.sortStart}\n onColumnPinned={this.handleColumnPinned}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this.loading &&\n !this.blocks.length &&\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\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 this.setupBlockIO(tb, blockIndex);\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 rowRenderer={this.rowRender} row={row}>\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 <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex),\n }}\n />\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow\n rowRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\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 </nano-resize-observe>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"file":"input.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,2ziBAA2ziB;;AC4B50iB,IAAI,QAAQ,GAAG,CAAC,C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ACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,OAAO,EACtB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,MAAM,EAAE,IAAI,CAAC,UAAU,GACb,CACb,CACW,EACd,eAAQ,CACQ,CACb,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/input/input.scss?tag=nano-input&encapsulation=scoped","./src/components/input/input.tsx"],"sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentColor;\n display: block;\n}\n\n:host(.nano-color) {\n color: current-color(base);\n\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n}\n\n.input__native-ctrl {\n @include text-inherit();\n\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 appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n // min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-block-start: 1.4em;\n }\n\n &::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-height: initial;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.input__resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-block: var(--padding-top) 0.25em;\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n\n .has-float-label & {\n padding-block-start: 1.75em;\n }\n }\n\n :host([readonly]:not([readonly='false'])) & {\n user-select: none;\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n Listen,\n} from '@stencil/core';\n\nimport { closestElement } from '../../utils/dom';\nimport { createColorClasses } from '../../utils/theme';\nimport { debounceEvent, debounce } from '../../utils/throttle';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport type {\n Color,\n ControlValidity,\n ControlValidityEventDetail,\n InputChangeEventDetail,\n TextFieldTypes,\n} from '../../interface';\n\nlet inputIds = 0;\n\n/**\n * The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), but works great on desktop devices and integrates with the keyboard on mobile devices.\n\nIt is meant for text type inputs only, such as \"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", and \"url\". It supports all standard text input events including keyup, keydown, keypress, and more.\nThe default styling reference comes from the [ONT styleguide](https://nanoporetech.zeroheight.com/styleguide/s/31282/p/230c74-text-input--textarea/b/942ee4)\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot - can be used with a `nano-datalist`. See the `nano-datalist` docs for more information\n */\n@Component({\n tag: 'nano-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class Input implements ComponentInterface {\n private nativeInput?: HTMLInputElement | HTMLTextAreaElement;\n private inputId = `nano-input-${inputIds++}`;\n private didBlurAfterEdit = false;\n private rtl: boolean = false;\n private mo?: MutationObserver;\n private charCount = 0;\n private hasRendered = false;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. User get/set to set datalist options\n private _nativeInputWrap: HTMLElement;\n private get nativeInputWrap() {\n return this._nativeInputWrap;\n }\n private set nativeInputWrap(ele: HTMLElement) {\n if (this._nativeInputWrap === ele) return;\n this._nativeInputWrap = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.validate = debounce(this.validate, 50);\n this.handleBlur = this.handleBlur.bind(this);\n }\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasHelperSlot = false;\n @State() hasHelperEndSlot = false;\n @State() errorMessage: string = '';\n @State() datalist: HTMLNanoDatalistElement = null;\n\n @Watch('datalist')\n setDataListOpts() {\n if (!this.datalist) return;\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n skidding: -1,\n tetherTo: this.nativeInputWrap,\n };\n }\n\n @Element() el!: HTMLNanoInputElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeInput) return '';\n return this.nativeInput.validationMessage;\n }\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalise: 'none' | 'sentences' | 'words' | 'characters' =\n 'none';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: 'on' | 'off' = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop() clearOnEdit?: boolean;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search';\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop({ reflect: true }) type: TextFieldTypes = 'text';\n\n /**\n * The form element to associate the input with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | null = '';\n\n /**\n * relevant to type=\"textarea\". Vertical resizing - enable / disable or make automatic.\n */\n @Prop() resize: 'true' | 'false' | 'auto' = 'auto';\n\n /**\n * relevant to type=\"textarea\". Default number of rows to show\n */\n @Prop() rows = 2;\n\n /**\n * relevant to type=\"textarea\".\n */\n @Prop() showCharCount = false;\n\n @Watch('minlength')\n @Watch('maxlength')\n @Watch('min')\n @Watch('max')\n @Watch('required')\n @Watch('disabled')\n @Watch('readonly')\n @Watch('pattern')\n @Watch('inputmode')\n protected shouldValidate() {\n if (!this.hasRendered) return;\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.nanoChange.emit({ value: this.value });\n this.charCount = this.value.length;\n\n if (this.type === 'textarea' && this.resize === 'auto') {\n this.nativeInput.style.height = 'auto';\n if (this.value.length)\n this.nativeInput.style.height = this.nativeInput.scrollHeight + 'px';\n }\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() nanoInput!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) this.validate();\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n this.nativeInput.click();\n }\n }\n\n /**\n * Sets focus and select the text on the specified `nano-input`. Use this method instead of the global\n * `input.select()`.\n */\n @Method()\n async select() {\n if (this.nativeInput) {\n this.nativeInput.select();\n }\n }\n\n /**\n * @returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement> {\n return Promise.resolve(this.nativeInput);\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeInput) {\n this.nativeInput.setCustomValidity(message);\n this.validate();\n }\n }\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.value = '';\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent | FocusEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n requestAnimationFrame(() => {\n if (e instanceof KeyboardEvent && kev.key) {\n if (kev.key !== 'Tab') return;\n target = document.activeElement;\n } else if (e instanceof FocusEvent) {\n target = document.activeElement;\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private shouldClearOnEdit() {\n const { type, clearOnEdit } = this;\n return clearOnEdit === undefined ? type === 'password' : clearOnEdit;\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private validate = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n if (!this.nativeInput.validity.valid) {\n if (this.showInlineError) {\n if (ev) ev.preventDefault();\n this.errorMessage = this.nativeInput.validationMessage;\n }\n this._invalid = true;\n } else this._invalid = false;\n\n this.nanoValidate.emit({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n originalEvent: ev,\n });\n };\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n this.value = input?.value || '';\n this.nanoInput.emit(ev);\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n if (this.validateOn === 'dirty') this.validate();\n this.nanoBlur.emit();\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusChanged();\n this.nanoFocus.emit();\n };\n\n private onKeydown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n };\n\n private clearTextInput = (ev?: Event) => {\n if (this.clearInput && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n this.value = '';\n this.nativeInput.value = '';\n const event = new window.Event('change');\n this.nativeInput.dispatchEvent(event);\n };\n\n private focusChanged() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue().length > 0;\n }\n\n private slotChangeObserver() {\n if (!Build.isBrowser) return;\n\n if (this.mo) this.mo.disconnect();\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / button content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]');\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n this.datalist = this.el.querySelector('nano-datalist:not([slot])');\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"inline-button\"]')) {\n console.warn(\n 'The `inline-button` slot was renamed to `end` in v2 - please update your code',\n this.el\n );\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n }\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.hasRendered = true;\n if (this.autofocus) setTimeout((_) => this.setFocus(), 300);\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot ? this.inputId + '-more' : '';\n const helperEndId = this.hasHelperEndSlot ? this.inputId + '-helper' : '';\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: this.hasValue(),\n controlId: this.inputId,\n };\n\n const controlOptions = (({ clearInput, readonly, disabled }) => ({\n clearInput,\n readonly,\n disabled,\n clearControl: this.clearInput,\n }))(this);\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n dir={this.rtl ? 'rtl' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'is-invalid': this._invalid,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearTextInput}\n control={this.el}\n ref={(el) => (this.nativeInputWrap = el)}\n >\n {this.type !== 'textarea' && (\n <input\n id={this.inputId}\n class=\"input__native-ctrl\"\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalise}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n />\n )}\n {this.type === 'textarea' && (\n <textarea\n rows={this.floatLabel ? 1 : this.rows}\n id={this.inputId}\n class={{\n 'input__native-ctrl': true,\n input__resizable: this.resize === 'true',\n }}\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalise}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n onBlur={this.handleBlur}\n ></textarea>\n )}\n </FormControl>\n <slot />\n </FormControlWrap>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"input.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,2ziBAA2ziB;;AC4B50iB,IAAI,QAAQ,GAAG,CAAC,CAAC;MAqBJ,KAAK;EAqBhB;;;;;;;;;;IAnBQ,YAAO,GAAG,cAAc,QAAQ,EAAE,EAAE,CAAC;IACrC,qBAAgB,GAAG,KAAK,CAAC;IACzB,QAAG,GAAY,KAAK,CAAC;IAErB,cAAS,GAAG,CAAC,CAAC;IACd,gBAAW,GAAG,KAAK,CAAC;IAyapB,aAAQ,GAAG,CAAC,EAAU;MAC5B,IAAI,IAAI,CAAC,UAAU,KAAK,iBAAiB;QAAE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;MAErE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE;QACpC,IAAI,IAAI,CAAC,eAAe,EAAE;UACxB,IAAI,EAAE;YAAE,EAAE,CAAC,cAAc,EAAE,CAAC;UAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC;SACxD;QACD,IAAI,CAAC,QAAQ,GAAG,IA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,KAAK,EAAE;QACL,oBAAoB,EAAE,IAAI;QAC1B,gBAAgB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;OACzC,EACD,GAAG,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,qBACzB,OAAO,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,WAAW,EAC3D,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,OAAO,EACtB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,MAAM,EAAE,IAAI,CAAC,UAAU,GACb,CACb,CACW,EACd,eAAQ,CACQ,CACb,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/input/input.scss?tag=nano-input&encapsulation=scoped","./src/components/input/input.tsx"],"sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentColor;\n display: block;\n}\n\n:host(.nano-color) {\n color: current-color(base);\n\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n}\n\n.input__native-ctrl {\n @include text-inherit();\n\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 appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n // min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-block-start: 1.4em;\n }\n\n &::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-height: initial;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.input__resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-block: var(--padding-top) 0.25em;\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n\n .has-float-label & {\n padding-block-start: 1.75em;\n }\n }\n\n :host([readonly]:not([readonly='false'])) & {\n user-select: none;\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n Listen,\n} from '@stencil/core';\n\nimport { closestElement } from '../../utils/dom';\nimport { createColorClasses } from '../../utils/theme';\nimport { debounceEvent, debounce } from '../../utils/throttle';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport type {\n Color,\n ControlValidity,\n ControlValidityEventDetail,\n InputChangeEventDetail,\n TextFieldTypes,\n} from '../../interface';\n\nlet inputIds = 0;\n\n/**\n * The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).\n *\nIt is meant for text type inputs only, such as \"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", and \"url\". It supports all standard text input events including keyup, keydown, keypress, and more.\nThe default styling reference comes from the [ONT styleguide](https://nanoporetech.zeroheight.com/styleguide/s/31282/p/230c74-text-input--textarea/b/942ee4)\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot - can be used with a `nano-datalist`. See the `nano-datalist` docs for more information\n */\n@Component({\n tag: 'nano-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class Input implements ComponentInterface {\n private nativeInput?: HTMLInputElement | HTMLTextAreaElement;\n private inputId = `nano-input-${inputIds++}`;\n private didBlurAfterEdit = false;\n private rtl: boolean = false;\n private mo?: MutationObserver;\n private charCount = 0;\n private hasRendered = false;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. User get/set to set datalist options\n private _nativeInputWrap: HTMLElement;\n private get nativeInputWrap() {\n return this._nativeInputWrap;\n }\n private set nativeInputWrap(ele: HTMLElement) {\n if (this._nativeInputWrap === ele) return;\n this._nativeInputWrap = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.validate = debounce(this.validate, 50);\n this.handleBlur = this.handleBlur.bind(this);\n }\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasHelperSlot = false;\n @State() hasHelperEndSlot = false;\n @State() errorMessage: string = '';\n @State() datalist: HTMLNanoDatalistElement = null;\n\n @Watch('datalist')\n setDataListOpts() {\n if (!this.datalist) return;\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n skidding: -1,\n tetherTo: this.nativeInputWrap,\n };\n }\n\n @Element() el!: HTMLNanoInputElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeInput) return '';\n return this.nativeInput.validationMessage;\n }\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalise: 'none' | 'sentences' | 'words' | 'characters' =\n 'none';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: 'on' | 'off' = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop() clearOnEdit?: boolean;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search';\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop({ reflect: true }) type: TextFieldTypes = 'text';\n\n /**\n * The form element to associate the input with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | null = '';\n\n /**\n * relevant to type=\"textarea\". Vertical resizing - enable / disable or make automatic.\n */\n @Prop() resize: 'true' | 'false' | 'auto' = 'auto';\n\n /**\n * relevant to type=\"textarea\". Default number of rows to show\n */\n @Prop() rows = 2;\n\n /**\n * relevant to type=\"textarea\".\n */\n @Prop() showCharCount = false;\n\n @Watch('minlength')\n @Watch('maxlength')\n @Watch('min')\n @Watch('max')\n @Watch('required')\n @Watch('disabled')\n @Watch('readonly')\n @Watch('pattern')\n @Watch('inputmode')\n protected shouldValidate() {\n if (!this.hasRendered) return;\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.nanoChange.emit({ value: this.value });\n this.charCount = this.value.length;\n\n if (this.type === 'textarea' && this.resize === 'auto') {\n this.nativeInput.style.height = 'auto';\n if (this.value.length)\n this.nativeInput.style.height = this.nativeInput.scrollHeight + 'px';\n }\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() nanoInput!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) this.validate();\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n this.nativeInput.click();\n }\n }\n\n /**\n * Sets focus and select the text on the specified `nano-input`. Use this method instead of the global\n * `input.select()`.\n */\n @Method()\n async select() {\n if (this.nativeInput) {\n this.nativeInput.select();\n }\n }\n\n /**\n * @returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement> {\n return Promise.resolve(this.nativeInput);\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeInput) {\n this.nativeInput.setCustomValidity(message);\n this.validate();\n }\n }\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.value = '';\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent | FocusEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n requestAnimationFrame(() => {\n if (e instanceof KeyboardEvent && kev.key) {\n if (kev.key !== 'Tab') return;\n target = document.activeElement;\n } else if (e instanceof FocusEvent) {\n target = document.activeElement;\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private shouldClearOnEdit() {\n const { type, clearOnEdit } = this;\n return clearOnEdit === undefined ? type === 'password' : clearOnEdit;\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private validate = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n if (!this.nativeInput.validity.valid) {\n if (this.showInlineError) {\n if (ev) ev.preventDefault();\n this.errorMessage = this.nativeInput.validationMessage;\n }\n this._invalid = true;\n } else this._invalid = false;\n\n this.nanoValidate.emit({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n originalEvent: ev,\n });\n };\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n this.value = input?.value || '';\n this.nanoInput.emit(ev);\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n if (this.validateOn === 'dirty') this.validate();\n this.nanoBlur.emit();\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusChanged();\n this.nanoFocus.emit();\n };\n\n private onKeydown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n };\n\n private clearTextInput = (ev?: Event) => {\n if (this.clearInput && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n this.value = '';\n this.nativeInput.value = '';\n const event = new window.Event('change');\n this.nativeInput.dispatchEvent(event);\n };\n\n private focusChanged() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue().length > 0;\n }\n\n private slotChangeObserver() {\n if (!Build.isBrowser) return;\n\n if (this.mo) this.mo.disconnect();\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / button content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]');\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n this.datalist = this.el.querySelector('nano-datalist:not([slot])');\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"inline-button\"]')) {\n console.warn(\n 'The `inline-button` slot was renamed to `end` in v2 - please update your code',\n this.el\n );\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n }\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.hasRendered = true;\n if (this.autofocus) setTimeout((_) => this.setFocus(), 300);\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot ? this.inputId + '-more' : '';\n const helperEndId = this.hasHelperEndSlot ? this.inputId + '-helper' : '';\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: this.hasValue(),\n controlId: this.inputId,\n };\n\n const controlOptions = (({ clearInput, readonly, disabled }) => ({\n clearInput,\n readonly,\n disabled,\n clearControl: this.clearInput,\n }))(this);\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n dir={this.rtl ? 'rtl' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'is-invalid': this._invalid,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearTextInput}\n control={this.el}\n ref={(el) => (this.nativeInputWrap = el)}\n >\n {this.type !== 'textarea' && (\n <input\n id={this.inputId}\n class=\"input__native-ctrl\"\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalise}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n />\n )}\n {this.type === 'textarea' && (\n <textarea\n rows={this.floatLabel ? 1 : this.rows}\n id={this.inputId}\n class={{\n 'input__native-ctrl': true,\n input__resizable: this.resize === 'true',\n }}\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalise}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n onBlur={this.handleBlur}\n ></textarea>\n )}\n </FormControl>\n <slot />\n </FormControlWrap>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -57,14 +57,14 @@ async function clientFetch(url, { body, ...customConfig } = {}) {
57
57
  }
58
58
  }
59
59
 
60
- const globalNavCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}.global-nav{font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;z-index:var(--nano-layer-index-menubar, 10)}.global-nav button{background:none;color:inherit;border:none}.global-nav .icon-btn{position:relative;background:none;color:inherit;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px 7px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .icon-btn nano-icon{width:18px;height:18px}.global-nav ::slotted(nano-nav-item[slot=icon]){--padding-top:9px;--padding-bottom:9px;--padding-start:7px;--padding-end:7px;--display:flex;font-size:18px}.global-nav a{color:inherit;text-decoration:none;white-space:nowrap}.global-nav .nav-links_title{margin:8px 0 3px}.global-nav .nav-links ul{margin:0;padding:0}.global-nav .nav-links li{list-style:none}.global-nav .login-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .menu-btn{padding:9px var(--bar-item-spacing) 9px var(--bar-item-spacing)}.site-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:min-height 0.2s ease;transition:min-height 0.2s ease;min-height:calc(100% - 61px);position:relative;z-index:auto;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.mask{opacity:0;background:rgba(0, 0, 0, 0.3);position:fixed;inset-inline:0;inset-block-start:0;height:100vh;z-index:-1;-webkit-transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;visibility:hidden}.mask.open{opacity:1;-webkit-transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;z-index:3;visibility:visible}.bars{color:var(--bar-text-color);z-index:var(--nano-layer-index-menubar, 10);position:relative;max-width:100%;min-width:100%;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:0.2s ease box-shadow;transition:0.2s ease box-shadow}[stuck] .bars{-webkit-box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15);box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15)}.bars::before{content:\"\";width:100%;height:100%;z-index:-1;background:var(--bar-background);position:absolute}.main-bar{width:100%;padding-inline:0 var(--bar-item-spacing);padding-block:var(--bar-vertical-padding);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow-x:hidden}.main-bar:focus{outline:none}:host(.ready) .main-bar{overflow-x:visible}.main-bar>*,.main-bar ::slotted(*){-webkit-transition:opacity 0.2s ease;transition:opacity 0.2s ease}:host(:not(.ready)) .main-bar>*,:host(:not(.ready)) .main-bar ::slotted(*){opacity:0 !important}:host(.ready) .main-bar>*,:host(.ready) .main-bar ::slotted(*){opacity:1}:host(.resizing) .main-bar>*,:host(.resizing) .main-bar ::slotted(*){opacity:0 !important}.main-bar>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.main-bar>* ::slotted(nano-nav-item[slot=icon]){-webkit-margin-start:11px;margin-inline-start:11px}.main-bar>* ::slotted(nano-nav-item),.main-bar>* nano-nav-item{--color-hover:var(--bar-color-focus);--secondary-bg-color:var(--bar-dropdown-bg);--secondary-color:var(--bar-dropdown-text);--bg-color-open:var(--bar-background);text-decoration:none !important}.main-bar .icon-btn{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:6px;margin-inline-start:6px}:host(.threshold-2) .main-bar .icon-btn{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:11px;margin-inline-start:11px}.main-bar .menu-btn.icon-btn{margin:0 !important;-webkit-border-end:1.5px solid var(--bar-color-shade);border-inline-end:1.5px solid var(--bar-color-shade)}.main-bar .logo{height:36px;width:200px;min-width:200px}:host(:not(.threshold-1)) .main-bar .logo{height:30px}.main-bar .logo-link{-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;padding-inline:var(--bar-item-spacing);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:none}.main-bar .nav-links{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ::slotted(nano-nav-item),.main-bar .nav-links nano-nav-item{--padding-top:7px;--padding-bottom:7px;--padding-end:2px;--padding-start:2px;--margin:0 var(--bar-item-spacing)}.main-bar .nav-links--main{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;letter-spacing:0.5px;font-weight:600;font-stretch:expanded;text-transform:uppercase;font-size:1.065em;-webkit-margin-end:auto;margin-inline-end:auto}.main-bar .nav-links--main ::slotted(nano-nav-item){--color:var(--bar-text-color);--padding-end:3px;--padding-start:0}.main-bar .nav-links--sub{--color:var(--color, #e2e2e2);-webkit-margin-start:6px;margin-inline-start:6px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.main-bar .login-btn{display:inline-block;border-radius:4px;background-color:var(--login-button-bg);color:var(--login-button-text);padding:3px 10px;position:relative;inset-inline-start:auto;inset-block-end:auto;margin-inline:11px 0}.main-bar .measure-ele{min-width:1px;display:block;margin:0;padding:0}.sticker-trigger{background:var(--bar-background);width:100%;z-index:calc(var(--nano-layer-index-menubar, 10) + 1)}.gn-menu{position:fixed;inset-block-start:0;inset-inline-start:0;z-index:-1;display:none;-webkit-transition:z-index 0.01s ease 0.2s;transition:z-index 0.01s ease 0.2s;height:100vh;width:100vw;overflow-y:auto;padding-block:4px}:host(.threshold-4) .gn-menu{position:absolute;width:calc(100vw - 20px)}.gn-menu.menu-full-screen{width:100vw !important}.gn-menu_wrap{max-width:92vw;width:335px;background:var(--menu-background);color:var(--menu-text-color);padding:var(--bar-vertical-padding) 0 0;-webkit-box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);position:relative;pointer-events:all;-webkit-margin-after:36px;margin-block-end:36px;opacity:0;outline:none;-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease}.gn-menu_wrap.has-promotion{padding:var(--menu-padding) 0 0}.gn-menu.open{z-index:var(--nano-layer-index-dropdown, 300);-webkit-transition:z-index 0.01s ease;transition:z-index 0.01s ease}.gn-menu.open .gn-menu_wrap{opacity:1;-webkit-transform:translate3d(0, 0, 0) !important;transform:translate3d(0, 0, 0) !important;-webkit-transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s}.gn-menu_actions{-webkit-padding-end:calc(var(--menu-padding) / 2);padding-inline-end:calc(var(--menu-padding) / 2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.gn-menu_actions-counter{background:#d0021b;color:var(--menu-text-color);position:absolute;inset-block-end:4px;inset-inline:auto 0;font-size:9px;height:14px;line-height:14px;width:auto;min-width:14px;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;text-indent:0}.gn-menu .content-wrap{position:relative;overflow:hidden;-webkit-transition:0.2s ease min-height;transition:0.2s ease min-height;min-height:190px}.gn-menu .content--sub{padding:var(--menu-padding) 0 var(--menu-padding) 7px}.gn-menu .menu-btn{-webkit-margin-end:auto;margin-inline-end:auto}.gn-menu .nav-links{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links ::slotted(nano-nav-item),.gn-menu .nav-links nano-nav-item{--icon-size:14px;--display:inline-block;--secondary-bg-color:#001a21;--padding-top:10px;--padding-bottom:10px;--padding-end:calc(var(--menu-padding) * 2);--padding-start:calc(var(--menu-padding) + 3px);--color:var(--menu-text-color);--color-hover:var(--menu-title-text);--bg-color-hover:transparent;--bg-color-focus:#002530;--focus-outline:none;width:100%}.gn-menu .nav-links .user-nav{--bg-color:var(--menu-user-panel-bg);--padding-top:9px;--padding-bottom:9px;font-weight:bold;margin:5px 0 0}.gn-menu .nav-links .user-nav ::slotted(nano-nav-item),.gn-menu .nav-links .user-nav nano-nav-item{font-weight:500;--bg-color:transparent}.gn-menu .nav-links .user-nav .content{padding:0;background-color:var(--menu-user-panel-bg)}.gn-menu .nav-links .user-nav .content--sub{padding-inline:var(--menu-padding)}.gn-menu .nav-links .user-nav .back-btn{-webkit-padding-start:var(--menu-padding);padding-inline-start:var(--menu-padding)}.gn-menu .nav-links_title{margin:0 var(--menu-padding) 4px;-webkit-border-after:1px solid var(--menu-hint-color);border-block-end:1px solid var(--menu-hint-color);-webkit-padding-after:8px;padding-block-end:8px;text-transform:uppercase;color:var(--menu-title-text);letter-spacing:1px;font-weight:700}.gn-menu .nav-links-wrap{margin:18px 0}.gn-menu .nav-links-wrap:last-child{-webkit-margin-after:0;margin-block-end:0}.gn-menu .nav-links .back-btn{-webkit-border-before:1px solid var(--menu-hint-color);border-block-start:1px solid var(--menu-hint-color);-webkit-border-after:1px solid var(--menu-hint-color);border-block-end:1px solid var(--menu-hint-color);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 11px 10px 0;width:100%;font-size:12px;text-transform:uppercase;color:var(--menu-title-text);letter-spacing:1px;font-weight:700}.gn-menu .nav-links .back-btn nano-icon{-webkit-margin-end:10px;margin-inline-end:10px;font-size:12px;color:var(--menu-icon-color)}.gn-menu .nav-links--sub{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links--sub ::slotted(nano-nav-item),.gn-menu .nav-links--sub nano-nav-item{--border-bottom:none;--padding-end:var(--menu-padding);--padding-start:var(--menu-padding);--padding-top:8px;--padding-bottom:8px;margin:0;width:50%;line-height:1.8}.gn-menu .nav-links .content{padding:8px var(--menu-padding)}.gn-menu .login-btn{padding-inline:7px var(--menu-padding);padding-block:var(--menu-padding)}.gn-menu .login-btn nano-icon{-webkit-margin-start:10px;margin-inline-start:10px}.gn-menu .logout-btn{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.gn-menu .logout-btn a{padding:0 5px}.search-btn::before{content:\"\";background-color:#0c5a71;height:9px;inset-inline:0 5px;inset-block-end:-18px;position:absolute;-webkit-transform:translateZ(0) scaleX(0);transform:translateZ(0) scaleX(0);-webkit-transform-origin:0;transform-origin:0;-webkit-transition:0.2s ease transform;transition:0.2s ease transform}.search-btn--open::before{-webkit-transform:translateZ(0) scaleX(1);transform:translateZ(0) scaleX(1);opacity:0.7}.search-bar{height:0;overflow:hidden;-webkit-transition:0.2s ease height;transition:0.2s ease height;padding:0 var(--bar-item-spacing);outline:none;max-width:45em;-webkit-margin-start:auto;margin-inline-start:auto;}.search-bar .search-widget{margin:0;overflow:inherit;max-width:none;max-height:none;-webkit-padding-end:0;padding-inline-end:0}.search-bar .search-widget .search-icon--search{display:none}.search-bar .search-widget .search-input{--input-border-width:2px 0 0 0 !important}.search-bar .search-inputs{padding:0 0;margin:0 0}.search-bar .search-autocomplete{inset-block-start:100%;width:100%}.search-widget{-webkit-padding-end:var(--bar-item-spacing);padding-inline-end:var(--bar-item-spacing);-webkit-margin-start:var(--bar-item-spacing);margin-inline-start:var(--bar-item-spacing);-webkit-margin-end:auto;margin-inline-end:auto;position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:500px;min-width:400px;max-height:36px;inset-block-start:-3px}.search-inputs{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0}.search-inputs input[type=submit]{display:none}.search-autocomplete{position:absolute;inset-block-start:calc(100% + 15px);width:calc(100% - var(--bar-item-spacing));inset-inline-start:0;background:white;border:2px solid var(--bar-color-tint);border-radius:0 0 5px 5px;color:#4a4a4a;-webkit-padding-before:calc(var(--bar-vertical-padding) / 2);padding-block-start:calc(var(--bar-vertical-padding) / 2);-webkit-padding-end:0;padding-inline-end:0;-webkit-padding-after:1px;padding-block-end:1px;-webkit-padding-start:0;padding-inline-start:0;z-index:1}.search-autocomplete-hit{padding-block:calc(var(--bar-vertical-padding) / 4);padding-inline:var(--bar-item-spacing);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;text-align:start;line-height:1.5;cursor:pointer}.search-autocomplete-hit-scope{color:#a7b0b3;font-weight:600}.search-autocomplete-hit:hover,.search-autocomplete-hit:focus{background-color:#e4e6e8}.search-autocomplete-hit .search__highlight,.search-autocomplete-hit em{font-weight:bold;font-style:normal}.search-autocomplete-hit--no-result:hover,.search-autocomplete-hit--no-result:focus{background:none !important}.search-autocomplete-foot{margin:7px 0 0}.search-autocomplete-submit{background:none;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px var(--bar-item-spacing) !important;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#007495;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;width:100%;text-decoration:underline;-webkit-border-before:1px solid #e8eaea;border-block-start:1px solid #e8eaea}.search-autocomplete-submit:hover,.search-autocomplete-submit:focus{background-color:#e4e6e8}nano-select.search-input{--input-border-width:0 0 2px 0;--input-text-color:var(--bar-text-color);--nano-input-border-color:rgb(103, 138, 154);--padding-end:var(--bar-item-spacing);--nano-input-border-color--focus:black;font-stretch:expanded;font-size:1.2em;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;inset-inline-start:1px;text-transform:uppercase}nano-select.search-input::after{content:\"\";inset-inline-end:0;inset-block:6px 6px;width:2px;background:#678a9a;position:absolute;z-index:1}:host(:not(.ready)) nano-select.search-input{overflow:hidden;max-height:1em}nano-select.search-input .down-arrow{font-size:0.65em}nano-input.search-input{--clear-btn-color:var(--bar-text-color);--nano-input-border-color:rgb(103, 138, 154);--input-border-width:0 0 2px 0;--placeholder-color:var(--bar-text-color);--input-text-color:var(--bar-text-color);--padding-start:21px;--nano-input-border-color--focus:black;font-size:1.2em;width:206px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}:host([dir=rtl]) nano-input.search-input{--input-border-radius:5px 0 0 5px}:host(:not(.ready)) nano-input.search-input{overflow:hidden;max-height:1em}nano-input.search-input .search-icon{background:none;padding:0 8px;display:none;font-size:0.9em}nano-input.search-input .search-icon--show{display:-webkit-box;display:-ms-flexbox;display:flex}nano-input.search-input .search-icon--loader{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}nano-input.search-input .search-icon nano-icon{height:1.4em}.user-profile{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2em;background-color:var(--menu-user-profile-bg)}.user-profile .left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.user-profile .avatar-container{position:relative}.user-profile .avatar-container img.avatar{border-radius:50px}.user-profile .avatar-container img.logo-small{position:absolute;height:30px;width:30px;inset-block-end:0;inset-inline-end:0;background-color:#27586e;border-radius:10px;padding:5px}.user-profile .user-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 1.25em;color:white}.user-profile .user-details .name{font-size:1.25em}.user-profile .user-details .bio{margin:0.5em 0}.user-profile .user-details .kudos span{background-color:#81c7eb;color:#415958;padding:0.25em;border-radius:0.5em;font-weight:bold}.user-profile .chevron-right{font-size:1.5em;color:white}.user-links{position:relative}.user-links .icon-btn{-webkit-padding-end:0;padding-inline-end:0;font-weight:500}.user-links .icon-btn nano-icon{-webkit-margin-start:5px;margin-inline-start:5px;width:16px;height:16px;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, color 0.2s ease;transition:transform 0.2s ease, color 0.2s ease, -webkit-transform 0.2s ease}.user-links .icon-btn.open nano-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);color:#007495}.user-links-panel{display:none;position:absolute;border-radius:4px 0 4px 4px;-webkit-box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);background-color:#568c9d;opacity:0;-webkit-transform:translate3d(0, 30px, 0);transform:translate3d(0, 30px, 0);-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease;inset-inline-end:0;min-width:318px;z-index:2}.user-links-panel:focus{outline:none}.user-links-panel.show{opacity:1;-webkit-transform:translate3d(0, calc(var(--padding) + 1px), 0);transform:translate3d(0, calc(var(--padding) + 1px), 0)}.user-links-panel-content{padding:0 18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;color:white}.user-links-panel-content a{padding:11px 0;-webkit-border-after:#669dac 1px solid;border-block-end:#669dac 1px solid}.user-links-panel-content a:hover,.user-links-panel-content a:focus{color:#455556}.user-links-panel-content a:last-child{-webkit-border-after:none;border-block-end:none}.user-links-panel-foot{background-color:#aac5cd;border-radius:0 0 4px 4px;padding:var(--padding);color:#455556;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:500;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.user-links-panel-foot a:hover{text-decoration:underline}.user-links-panel .user-profile{background-color:var(--bar-user-panel-bg)}:host{--bar-vertical-padding:21px;--bar-item-spacing:13px;--bar-background:white;--bar-text-color:#196c82;--bar-color-shade:rgb(19, 89, 111);--bar-color-tint:rgb(19, 89, 111);--bar-color-focus:#001a21;--bar-user-panel-bg:#016d86;--bar-dropdown-bg:#196c82;--bar-dropdown-text:white;--menu-background:#001a21;--menu-text-color:white;--menu-user-profile-bg:#001a21;--menu-user-panel-bg:#193037;--menu-padding:12px;--menu-hint-color:#33484d;--menu-title-text:#90c6e7;--menu-icon-color:white;--login-button-bg:#17bb75;--login-button-text:white;--padding:12px;--padding-top:var(--padding);--padding-end:var(--padding);--padding-bottom:var(--padding);--padding-start:var(--padding);display:block;position:relative;line-height:1.5;height:100%;font-size:0.9375em;font-size:clamp(0.77rem, 1vw, 1rem)}:host input,:host select,:host button{font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit}";
60
+ const globalNavCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}.global-nav{font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;z-index:var(--nano-layer-index-menubar, 10)}.global-nav button{background:none;color:inherit;border:none}.global-nav .icon-btn{position:relative;background:none;color:inherit;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px 7px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .icon-btn nano-icon{width:18px;height:18px}.global-nav ::slotted(nano-nav-item[slot=icon]){--padding-top:9px;--padding-bottom:9px;--padding-start:7px;--padding-end:7px;--display:flex;font-size:18px}.global-nav a{color:inherit;text-decoration:none;white-space:nowrap}.global-nav .nav-links_title{margin:8px 0 3px}.global-nav .nav-links ul{margin:0;padding:0}.global-nav .nav-links li{list-style:none}.global-nav .login-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .menu-btn{padding:9px var(--bar-item-spacing) 9px var(--bar-item-spacing)}.site-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:min-height 0.2s ease;transition:min-height 0.2s ease;min-height:calc(100% - 61px);position:relative;z-index:auto;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.mask{opacity:0;background:rgba(0, 0, 0, 0.3);position:fixed;inset-inline:0;inset-block-start:0;height:100vh;z-index:-1;-webkit-transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;visibility:hidden}.mask.open{opacity:1;-webkit-transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;z-index:3;visibility:visible}.bars{color:var(--bar-text-color);z-index:var(--nano-layer-index-menubar, 10);position:relative;max-width:100%;min-width:100%;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:0.2s ease box-shadow;transition:0.2s ease box-shadow}[stuck] .bars{-webkit-box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15);box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15)}.bars::before{content:\"\";width:100%;height:100%;z-index:-1;background:var(--bar-background);position:absolute}.main-bar{width:100%;padding-inline:0 var(--bar-item-spacing);padding-block:var(--bar-vertical-padding);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow-x:hidden}.main-bar:focus{outline:none}:host(.ready) .main-bar{overflow-x:visible}.main-bar>*,.main-bar ::slotted(*){-webkit-transition:opacity 0.2s ease;transition:opacity 0.2s ease}:host(:not(.ready)) .main-bar>*,:host(:not(.ready)) .main-bar ::slotted(*){opacity:0 !important}:host(.ready) .main-bar>*,:host(.ready) .main-bar ::slotted(*){opacity:1}:host(.resizing) .main-bar>*,:host(.resizing) .main-bar ::slotted(*){opacity:0 !important}.main-bar>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.main-bar>* ::slotted(nano-nav-item[slot=icon]){-webkit-margin-start:11px;margin-inline-start:11px}.main-bar>* ::slotted(nano-nav-item),.main-bar>* nano-nav-item{--color-hover:var(--bar-color-focus);--secondary-bg-color:var(--bar-dropdown-bg);--secondary-color:var(--bar-dropdown-text);--bg-color-open:var(--bar-background);text-decoration:none !important}.main-bar .icon-btn{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:6px;margin-inline-start:6px}:host(.threshold-2) .main-bar .icon-btn{-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:11px;margin-inline-start:11px}.main-bar .menu-btn.icon-btn{margin:0 !important;-webkit-border-end:1.5px solid var(--bar-color-shade);border-inline-end:1.5px solid var(--bar-color-shade)}.main-bar .logo{height:36px;width:200px;min-width:200px}:host(:not(.threshold-1)) .main-bar .logo{height:30px}.main-bar .logo-link{-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;padding-inline:var(--bar-item-spacing);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:none}.main-bar .nav-links{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ::slotted(nano-nav-item),.main-bar .nav-links nano-nav-item{--padding-top:7px;--padding-bottom:7px;--padding-end:2px;--padding-start:2px;--margin:0 var(--bar-item-spacing)}.main-bar .nav-links--main{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;letter-spacing:0.5px;font-weight:600;font-stretch:expanded;text-transform:uppercase;font-size:1.065em;-webkit-margin-end:auto;margin-inline-end:auto}.main-bar .nav-links--main ::slotted(nano-nav-item){--color:var(--bar-text-color);--padding-end:3px;--padding-start:0}.main-bar .nav-links--sub{--color:var(--color, #e2e2e2);-webkit-margin-start:6px;margin-inline-start:6px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.main-bar .login-btn{display:inline-block;border-radius:4px;background-color:var(--login-button-bg);color:var(--login-button-text);padding:3px 10px;position:relative;inset-inline-start:auto;inset-block-end:auto;margin-inline:11px 0}.main-bar .measure-ele{min-width:1px;display:block;margin:0;padding:0}.sticker-trigger{background:var(--bar-background);width:100%;z-index:calc(var(--nano-layer-index-menubar, 10) + 1);height:1px}.sticker-trigger~.sticker-trigger{display:none}.gn-menu{position:fixed;inset-block-start:0;inset-inline-start:0;z-index:-1;display:none;-webkit-transition:z-index 0.01s ease 0.2s;transition:z-index 0.01s ease 0.2s;height:100vh;width:100vw;overflow-y:auto;padding-block:4px}:host(.threshold-4) .gn-menu{position:absolute;width:calc(100vw - 20px)}.gn-menu.menu-full-screen{width:100vw !important}.gn-menu_wrap{max-width:92vw;width:335px;background:var(--menu-background);color:var(--menu-text-color);padding:var(--bar-vertical-padding) 0 0;-webkit-box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);position:relative;pointer-events:all;-webkit-margin-after:36px;margin-block-end:36px;opacity:0;outline:none;-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease}.gn-menu_wrap.has-promotion{padding:var(--menu-padding) 0 0}.gn-menu.open{z-index:var(--nano-layer-index-dropdown, 300);-webkit-transition:z-index 0.01s ease;transition:z-index 0.01s ease}.gn-menu.open .gn-menu_wrap{opacity:1;-webkit-transform:translate3d(0, 0, 0) !important;transform:translate3d(0, 0, 0) !important;-webkit-transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s}.gn-menu_actions{-webkit-padding-end:calc(var(--menu-padding) / 2);padding-inline-end:calc(var(--menu-padding) / 2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.gn-menu_actions-counter{background:#d0021b;color:var(--menu-text-color);position:absolute;inset-block-end:4px;inset-inline:auto 0;font-size:9px;height:14px;line-height:14px;width:auto;min-width:14px;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;text-indent:0}.gn-menu .content-wrap{position:relative;overflow:hidden;-webkit-transition:0.2s ease min-height;transition:0.2s ease min-height;min-height:190px}.gn-menu .content--sub{padding:var(--menu-padding) 0 var(--menu-padding) 7px}.gn-menu .menu-btn{-webkit-margin-end:auto;margin-inline-end:auto}.gn-menu .nav-links{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links ::slotted(nano-nav-item),.gn-menu .nav-links nano-nav-item{--icon-size:14px;--display:inline-block;--secondary-bg-color:#001a21;--padding-top:10px;--padding-bottom:10px;--padding-end:calc(var(--menu-padding) * 2);--padding-start:calc(var(--menu-padding) + 3px);--color:var(--menu-text-color);--color-hover:var(--menu-title-text);--bg-color-hover:transparent;--bg-color-focus:#002530;--focus-outline:none;width:100%}.gn-menu .nav-links .user-nav{--bg-color:var(--menu-user-panel-bg);--padding-top:9px;--padding-bottom:9px;font-weight:bold;margin:5px 0 0}.gn-menu .nav-links .user-nav ::slotted(nano-nav-item),.gn-menu .nav-links .user-nav nano-nav-item{font-weight:500;--bg-color:transparent}.gn-menu .nav-links .user-nav .content{padding:0;background-color:var(--menu-user-panel-bg)}.gn-menu .nav-links .user-nav .content--sub{padding-inline:var(--menu-padding)}.gn-menu .nav-links .user-nav .back-btn{-webkit-padding-start:var(--menu-padding);padding-inline-start:var(--menu-padding)}.gn-menu .nav-links_title{margin:0 var(--menu-padding) 4px;-webkit-border-after:1px solid var(--menu-hint-color);border-block-end:1px solid var(--menu-hint-color);-webkit-padding-after:8px;padding-block-end:8px;text-transform:uppercase;color:var(--menu-title-text);letter-spacing:1px;font-weight:700}.gn-menu .nav-links-wrap{margin:18px 0}.gn-menu .nav-links-wrap:last-child{-webkit-margin-after:0;margin-block-end:0}.gn-menu .nav-links .back-btn{-webkit-border-before:1px solid var(--menu-hint-color);border-block-start:1px solid var(--menu-hint-color);-webkit-border-after:1px solid var(--menu-hint-color);border-block-end:1px solid var(--menu-hint-color);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 11px 10px 0;width:100%;font-size:12px;text-transform:uppercase;color:var(--menu-title-text);letter-spacing:1px;font-weight:700}.gn-menu .nav-links .back-btn nano-icon{-webkit-margin-end:10px;margin-inline-end:10px;font-size:12px;color:var(--menu-icon-color)}.gn-menu .nav-links--sub{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links--sub ::slotted(nano-nav-item),.gn-menu .nav-links--sub nano-nav-item{--border-bottom:none;--padding-end:var(--menu-padding);--padding-start:var(--menu-padding);--padding-top:8px;--padding-bottom:8px;margin:0;width:50%;line-height:1.8}.gn-menu .nav-links .content{padding:8px var(--menu-padding)}.gn-menu .login-btn{padding-inline:7px var(--menu-padding);padding-block:var(--menu-padding)}.gn-menu .login-btn nano-icon{-webkit-margin-start:10px;margin-inline-start:10px}.gn-menu .logout-btn{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.gn-menu .logout-btn a{padding:0 5px}.search-btn::before{content:\"\";background-color:#0c5a71;height:9px;inset-inline:0 5px;inset-block-end:-20px;position:absolute;-webkit-transform:translateZ(0) scaleX(0);transform:translateZ(0) scaleX(0);-webkit-transform-origin:0;transform-origin:0;-webkit-transition:0.2s ease transform;transition:0.2s ease transform}.search-btn--open::before{-webkit-transform:translateZ(0) scaleX(1);transform:translateZ(0) scaleX(1);opacity:0.7}.search-bar{height:0;overflow:hidden;-webkit-transition:0.2s ease height;transition:0.2s ease height;padding:0 var(--bar-item-spacing);outline:none;max-width:45em;-webkit-margin-start:auto;margin-inline-start:auto;}.search-bar .search-widget{margin:0;overflow:inherit;max-width:none;max-height:none;min-width:auto;-webkit-padding-end:0;padding-inline-end:0}.search-bar .search-widget .search-icon--search{display:none}.search-bar .search-widget .search-input{--input-border-width:2px 0 0 0 !important}.search-bar .search-inputs{padding:0 0;margin:0 0}.search-bar .search-autocomplete{inset-block-start:100%;width:100%}.search-widget{-webkit-padding-end:var(--bar-item-spacing);padding-inline-end:var(--bar-item-spacing);-webkit-margin-start:var(--bar-item-spacing);margin-inline-start:var(--bar-item-spacing);-webkit-margin-end:auto;margin-inline-end:auto;position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:500px;min-width:350px;max-height:36px;inset-block-start:-1px}.search-inputs{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0}.search-inputs input[type=submit]{display:none}.search-autocomplete{position:absolute;inset-block-start:calc(100% + 15px);width:calc(100% - var(--bar-item-spacing));inset-inline-start:0;background:white;border:2px solid var(--bar-color-tint);border-radius:0 0 5px 5px;color:#4a4a4a;-webkit-padding-before:calc(var(--bar-vertical-padding) / 2);padding-block-start:calc(var(--bar-vertical-padding) / 2);-webkit-padding-end:0;padding-inline-end:0;-webkit-padding-after:1px;padding-block-end:1px;-webkit-padding-start:0;padding-inline-start:0;z-index:1}.search-autocomplete-hit{padding-block:calc(var(--bar-vertical-padding) / 4);padding-inline:var(--bar-item-spacing);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;text-align:start;line-height:1.5;cursor:pointer}.search-autocomplete-hit-scope{color:#a7b0b3;font-weight:600}.search-autocomplete-hit:hover,.search-autocomplete-hit:focus{background-color:#e4e6e8}.search-autocomplete-hit .search__highlight,.search-autocomplete-hit em{font-weight:bold;font-style:normal}.search-autocomplete-hit--no-result:hover,.search-autocomplete-hit--no-result:focus{background:none !important}.search-autocomplete-foot{margin:7px 0 0}.search-autocomplete-submit{background:none;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px var(--bar-item-spacing) !important;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#007495;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;width:100%;text-decoration:underline;-webkit-border-before:1px solid #e8eaea;border-block-start:1px solid #e8eaea}.search-autocomplete-submit:hover,.search-autocomplete-submit:focus{background-color:#e4e6e8}nano-select.search-input{--input-border-width:0 0 2px 0;--input-text-color:var(--bar-text-color);--nano-input-border-color:rgb(103, 138, 154);--padding-end:var(--bar-item-spacing);--nano-input-border-color--focus:black;font-stretch:expanded;font-size:1.2em;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;inset-inline-start:1px;text-transform:uppercase}nano-select.search-input::after{content:\"\";inset-inline-end:0;inset-block:6px 6px;width:2px;background:#678a9a;position:absolute;z-index:1}:host(:not(.ready)) nano-select.search-input{overflow:hidden;max-height:1em}nano-select.search-input .down-arrow{font-size:0.65em}nano-input.search-input{--clear-btn-color:var(--bar-text-color);--nano-input-border-color:rgb(103, 138, 154);--input-border-width:0 0 2px 0;--placeholder-color:var(--bar-text-color);--input-text-color:var(--bar-text-color);--padding-start:21px;--nano-input-border-color--focus:black;font-size:1.2em;width:206px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}:host([dir=rtl]) nano-input.search-input{--input-border-radius:5px 0 0 5px}:host(:not(.ready)) nano-input.search-input{overflow:hidden;max-height:1em}nano-input.search-input .search-icon{background:none;padding:0 8px;display:none;font-size:0.9em}nano-input.search-input .search-icon--show{display:-webkit-box;display:-ms-flexbox;display:flex}nano-input.search-input .search-icon--loader{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}nano-input.search-input .search-icon nano-icon{height:1.4em}.user-profile{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2em;background-color:var(--menu-user-profile-bg)}.user-profile .left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.user-profile .avatar-container{position:relative}.user-profile .avatar-container img.avatar{border-radius:50px}.user-profile .avatar-container img.logo-small{position:absolute;height:30px;width:30px;inset-block-end:0;inset-inline-end:0;background-color:#27586e;border-radius:10px;padding:5px}.user-profile .user-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 1.25em;color:white}.user-profile .user-details .name{font-size:1.25em}.user-profile .user-details .bio{margin:0.5em 0}.user-profile .user-details .kudos span{background-color:#81c7eb;color:#415958;padding:0.25em;border-radius:0.5em;font-weight:bold}.user-profile .chevron-right{font-size:1.5em;color:white}.user-links{position:relative}.user-links .icon-btn{-webkit-padding-end:0;padding-inline-end:0;font-weight:500}.user-links .icon-btn nano-icon{-webkit-margin-start:5px;margin-inline-start:5px;width:16px;height:16px;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, color 0.2s ease;transition:transform 0.2s ease, color 0.2s ease, -webkit-transform 0.2s ease}.user-links .icon-btn.open nano-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);color:#007495}.user-links-panel{display:none;position:absolute;border-radius:4px 0 4px 4px;-webkit-box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);background-color:#568c9d;opacity:0;-webkit-transform:translate3d(0, 30px, 0);transform:translate3d(0, 30px, 0);-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease;inset-inline-end:0;min-width:318px;z-index:2}.user-links-panel:focus{outline:none}.user-links-panel.show{opacity:1;-webkit-transform:translate3d(0, calc(var(--padding) + 1px), 0);transform:translate3d(0, calc(var(--padding) + 1px), 0)}.user-links-panel-content{padding:0 18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;color:white}.user-links-panel-content a{padding:11px 0;-webkit-border-after:#669dac 1px solid;border-block-end:#669dac 1px solid}.user-links-panel-content a:hover,.user-links-panel-content a:focus{color:#455556}.user-links-panel-content a:last-child{-webkit-border-after:none;border-block-end:none}.user-links-panel-foot{background-color:#aac5cd;border-radius:0 0 4px 4px;padding:var(--padding);color:#455556;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:500;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.user-links-panel-foot a:hover{text-decoration:underline}.user-links-panel .user-profile{background-color:var(--bar-user-panel-bg)}:host{--bar-vertical-padding:21px;--bar-item-spacing:13px;--bar-background:white;--bar-text-color:#196c82;--bar-color-shade:rgb(19, 89, 111);--bar-color-tint:rgb(19, 89, 111);--bar-color-focus:#001a21;--bar-user-panel-bg:#016d86;--bar-dropdown-bg:#196c82;--bar-dropdown-text:white;--menu-background:#001a21;--menu-text-color:white;--menu-user-profile-bg:#001a21;--menu-user-panel-bg:#193037;--menu-padding:12px;--menu-hint-color:#33484d;--menu-title-text:#90c6e7;--menu-icon-color:white;--login-button-bg:#17bb75;--login-button-text:white;--padding:12px;--padding-top:var(--padding);--padding-end:var(--padding);--padding-bottom:var(--padding);--padding-start:var(--padding);display:block;position:relative;line-height:1.5;height:100%;font-size:0.9375em;font-size:clamp(0.77rem, 1vw, 0.9rem)}:host input,:host select,:host button{font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit}";
61
61
 
62
62
  // the 'breakpoints' where different segments of content go into or out-of the burger / overflow menu
63
63
  const THRESHOLDBREAKS = {
64
- search: 0,
65
- about: 1,
66
- main: 2,
67
- login: 3,
64
+ about: 0,
65
+ main: 1,
66
+ login: 2,
67
+ search: 3,
68
68
  icon: 4,
69
69
  };
70
70
  const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -949,15 +949,17 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
949
949
  this.threshold <
950
950
  this.THRESHOLDLIMIT - THRESHOLDBREAKS.about) ||
951
951
  this.hasSiteSlot ||
952
- !!this.siteNavItms.length) && (h("button", { class: "menu-btn icon-btn", onMouseDown: this.menuOpen, onKeyDown: this.onMenuBtnKeyDown, "aria-expanded": this.modalOpen ? 'true' : 'false', "aria-controls": "global-nav-menu", ref: (btn) => (this.menuBtn = btn) }, h("nano-icon", { name: "light/bars", "aria-label": "open menu" }))), this.showLogo && (h("a", { href: this.logoUrl, class: "logo-link" }, h("img", { src: getAssetPath(`./assets/ont-logo.svg`), alt: "Oxford Nanopore Technologies Logo", class: "logo" }))), !this.showLogo && (h("div", { class: "logo-link" }, h("slot", { name: "logo" }))), h("div", { class: "nav-links nav-links--main" }, h("slot", { name: "main" })), this.threshold >=
953
- this.THRESHOLDLIMIT - THRESHOLDBREAKS.search && [
952
+ !!this.siteNavItms.length) && (h("button", { class: "menu-btn icon-btn", onMouseDown: this.menuOpen, onKeyDown: this.onMenuBtnKeyDown, "aria-expanded": this.modalOpen ? 'true' : 'false', "aria-controls": "global-nav-menu", ref: (btn) => (this.menuBtn = btn) }, h("nano-icon", { name: "light/bars", "aria-label": "open menu" }))), this.showLogo && (h("a", { href: this.logoUrl, class: "logo-link" }, h("img", { src: getAssetPath(`./assets/ont-logo.svg`), alt: "Oxford Nanopore Technologies Logo", class: "logo" }))), !this.showLogo && (h("div", { class: "logo-link" }, h("slot", { name: "logo" }))), h("div", { class: "nav-links nav-links--main" }, h("slot", { name: "main" })), this.mainSlotLen === 0 &&
953
+ this.threshold >=
954
+ this.THRESHOLDLIMIT - THRESHOLDBREAKS.search && [
954
955
  this.showSearch && !!this.internalSearchIndeces.length && (h("div", { class: "search-widget", role: "combobox", "aria-owns": "autocomplete-results", "aria-expanded": this.showAutocomplete && this.autocompleteResults
955
956
  ? 'true'
956
957
  : 'false' }, searchWidget)),
957
958
  (!this.showSearch || !this.myAccData) &&
958
959
  !!this.searchSlotLen && h("slot", { name: "search" }),
959
- ], this.threshold <
960
- this.THRESHOLDLIMIT - THRESHOLDBREAKS.search &&
960
+ ], (this.mainSlotLen > 0 ||
961
+ this.threshold <
962
+ this.THRESHOLDLIMIT - THRESHOLDBREAKS.search) &&
961
963
  ((this.showSearch && !!this.internalSearchIndeces.length) ||
962
964
  !!this.searchSlotLen) && (h("button", { class: {
963
965
  'icon-btn': true,
@@ -974,7 +976,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
974
976
  ],
975
977
  ], (!!this.aboutSlotLen || !!this.aboutNavItms.length) &&
976
978
  this.threshold >=
977
- this.THRESHOLDLIMIT - THRESHOLDBREAKS.about && (h("nav", { class: "nav-links nav-links--sub", "aria-label": "About the company. Links" }, h("slot", { name: "about" }), h("nano-nav-item", { class: "nano-global-nav nano-global-nav-bar" }, h("a", { href: this.aboutNavItms[0].address, target: this.aboutNavItms[0].target }, this.aboutNavItms[0].title)))), this.myAccData &&
979
+ this.THRESHOLDLIMIT - THRESHOLDBREAKS.about && (h("nav", { class: "nav-links nav-links--sub", "aria-label": "About the company. Links" }, h("slot", { name: "about" }), !!this.aboutNavItms.length && (h("nano-nav-item", { class: "nano-global-nav nano-global-nav-bar" }, h("a", { href: this.aboutNavItms[0].address, target: this.aboutNavItms[0].target }, this.aboutNavItms[0].title))))), this.myAccData &&
978
980
  (!this.activeMyAccountSections ||
979
981
  this.activeMyAccountSections.includes('loggedin')) &&
980
982
  this.threshold >=
@@ -988,12 +990,13 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
988
990
  return (h("a", { href: link.address, target: link.target }, link.title));
989
991
  })), h("div", { class: "user-links-panel-foot" }, h("a", { href: this.myAccData.urls.forgot_password +
990
992
  this.ssoRedirect }, "Change Password"), h("a", { href: this.myAccData.urls.logout + this.ssoRedirect }, "Logout"))))),
991
- ], h("span", { class: "measure-ele" })), this.threshold <
992
- this.THRESHOLDLIMIT - THRESHOLDBREAKS.search && (h("div", { id: "global-nav-search-bar", class: {
993
+ ], h("span", { class: "measure-ele" })), (this.mainSlotLen > 0 ||
994
+ this.threshold <
995
+ this.THRESHOLDLIMIT - THRESHOLDBREAKS.search) && (h("div", { id: "global-nav-search-bar", class: {
993
996
  'search-bar': true,
994
997
  show: this.searchBarShown,
995
998
  }, "aria-expanded": this.searchBarShown ? 'true' : 'false', role: "region", tabindex: "-1", ref: (div) => (this.searchBarEl = div) }, h("div", { class: "search-widget" }, this.showSearch && !!this.internalSearchIndeces.length && (h("div", null, searchWidget)), (!this.showSearch || !this.myAccData) &&
996
- !!this.searchSlotLen && h("slot", { name: "search" })))))), (this.threshold < this.THRESHOLDLIMIT - 3 ||
999
+ !!this.searchSlotLen && h("slot", { name: "search" })))))), h("div", { class: "sticker-trigger" }), (this.threshold < this.THRESHOLDLIMIT - 3 ||
997
1000
  this.menuFullScreen) && (h("div", { class: {
998
1001
  mask: true,
999
1002
  open: this.modalOpen,