@nanoporetech-digital/components 5.1.1 → 5.1.2
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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +68 -43
- package/dist/cjs/nano-sortable.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +2 -0
- package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-66318604.js → nano-table-0a720c5f.js} +8 -3
- package/dist/cjs/nano-table-0a720c5f.js.map +1 -0
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-e102343e.js → table.worker-347d4d31.js} +2 -2
- package/dist/cjs/table.worker-347d4d31.js.map +1 -0
- package/dist/collection/components/input/input.js +2 -2
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/sortable/sortable.js +69 -44
- package/dist/collection/components/sortable/sortable.js.map +1 -1
- package/dist/collection/components/table/table.js +28 -1
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/tabs/tab-group.js +2 -0
- package/dist/collection/components/tabs/tab-group.js.map +1 -1
- package/dist/components/input.js +2 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/nano-sortable.js +68 -43
- package/dist/components/nano-sortable.js.map +1 -1
- package/dist/components/nano-tab-group.js +2 -0
- package/dist/components/nano-tab-group.js.map +1 -1
- package/dist/components/table.js +7 -1
- package/dist/components/table.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-input.entry.js +2 -2
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-sortable.entry.js +68 -43
- package/dist/esm/nano-sortable.entry.js.map +1 -1
- package/dist/esm/nano-tab-group.entry.js +2 -0
- package/dist/esm/nano-tab-group.entry.js.map +1 -1
- package/dist/esm/{nano-table-eda322db.js → nano-table-9767860f.js} +8 -3
- package/dist/esm/nano-table-9767860f.js.map +1 -0
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-245a7006.js → table.worker-d252307c.js} +2 -2
- package/dist/esm/table.worker-d252307c.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/{p-f7535f45.entry.js → p-1b687f96.entry.js} +2 -2
- package/dist/nano-components/p-1b687f96.entry.js.map +1 -0
- package/dist/nano-components/{p-99167ef0.js → p-633c778c.js} +2 -2
- package/dist/nano-components/p-633c778c.js.map +1 -0
- package/dist/nano-components/p-66631f50.js +5 -0
- package/dist/nano-components/{p-40b1c72f.entry.js → p-75735a91.entry.js} +2 -2
- package/dist/nano-components/{p-40b1c72f.entry.js.map → p-75735a91.entry.js.map} +1 -1
- package/dist/nano-components/{p-5157d7ba.entry.js → p-8a79a7ca.entry.js} +2 -2
- package/dist/nano-components/p-c8ccb57a.entry.js +5 -0
- package/dist/nano-components/p-c8ccb57a.entry.js.map +1 -0
- package/dist/types/components/sortable/sortable.d.ts +2 -3
- package/dist/types/components/table/table.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/docs-json.json +19 -2
- package/hydrate/index.js +79 -46
- package/package.json +2 -2
- package/dist/cjs/nano-table-66318604.js.map +0 -1
- package/dist/cjs/table.worker-e102343e.js.map +0 -1
- package/dist/esm/nano-table-eda322db.js.map +0 -1
- package/dist/esm/table.worker-245a7006.js.map +0 -1
- package/dist/nano-components/p-99167ef0.js.map +0 -1
- package/dist/nano-components/p-d79c6862.entry.js +0 -5
- package/dist/nano-components/p-d79c6862.entry.js.map +0 -1
- package/dist/nano-components/p-df264b79.js +0 -5
- package/dist/nano-components/p-f7535f45.entry.js.map +0 -1
- /package/dist/nano-components/{p-5157d7ba.entry.js.map → p-66631f50.js.map} +0 -0
- /package/dist/nano-components/{p-df264b79.js.map → p-8a79a7ca.entry.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"nano-tab-group.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,66NAA66N;;MCiDp7N,QAAQ;;;;;;;IAUX,kBAAa,GAAW,IAAI,CAAC;IAC7B,kBAAa,GAAW,IAAI,CAAC;IAG7B,sBAAiB,GAAoC,IAAI,OAAO,EAAE,CAAC;IA0HnE,yBAAoB,GAAG;MAC7B,IAAI,IAAI,CAAC,gBAAgB,EAAE;QACzB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;OAChC;WAAM;QACL,IAAI,CAAC,iBAAiB;UACpB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW;YAC3C,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;OAChD;KACF,CAAC;IA6HM,gBAAW,GAAG,CAAC,KAAiB;MACtC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;MAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;MAEvC,IAAI,GAAG;QAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;KACjC,CAAC;IAEM,kBAAa,GAAG,CAAC,KAAoB;MAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAoB,CAAC;MAC/C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,UAAU;QAAE,OAAO;;MAGvE,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE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AE,IAAI,CAAC,cAAc,IAE/B,YAAM,YAAY,EAAE,IAAI,CAAC,uBAAuB,GAAI,CAChD,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tabs/tab-group.scss?tag=nano-tab-group&encapsulation=shadow","./src/components/tabs/tab-group.tsx"],"sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n/**\n * @prop --indicator-transition: Only relevant to placement 'start'. defaults to #{$transition-fast};\n * @prop --indicator-color: defaults to #{map.get($colors, lightblue)} on placement 'top' and #{map.get($colors, blue)} on placement 'start';\n * @prop --indicator-track-color: Only relevant to placement 'start'. defaults to #{map.get($colors, lightgrey)};\n * @prop --indicator-size: defaults to 5px on placement 'top' and 2px on placement 'start';\n\n * @prop --border-radius: defaults to #{$layer-border-radius};\n * @prop --background-rgb: will be used as the default background colour for tabs and content. defaults to #{$layer-bg-color-rgb};\n * @prop --shadow-opacity: opacity of the shadow behind tabs. defaults to 0.1;\n * @prop --scroll-btn-color: defaults to 'currentcolor';\n\n * @prop --content-padding: defaults to 2rem 2.5rem;\n * @prop --content-bg: defaults to rgb(var(--background-rgb));\n * @prop --content-border-radius: defaults to `var(--border-radius)` `position=\"top\"`. `0 var(--border-radius) var(--border-radius) 0` `position=\"start\"`;\n\n * @prop --tabs-padding-start: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-end: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-top: defaults to 0;\n * @prop --tabs-padding-bottom: defaults to 0;\n * @prop --tabs-bg-rgb: defaults to var(--bg-color);\n * @prop --tab-border-radius: defaults to `var(--border-radius) var(--border-radius) 0 0` `position=\"top\"`. `0` `position=\"start\"`. ;\n * @prop --tab-text-color: defaults to #{map.get($colors, blue)} on placement 'top' and #{map.get($colors, darkgrey)} on placement 'start';\n * @prop --fade-transparency: controls the strength of the fade on overflowing tabs, defaults to 0;\n */\n\n:host {\n --indicator-transition: #{$transition-fast};\n --indicator-color: #{map.get($colors, lightblue)};\n --indicator-track-color: #{map.get($colors, lightgrey)};\n --indicator-size: 0;\n --border-radius: #{$layer-border-radius};\n --background-rgb: #{$layer-bg-color-rgb};\n --scroll-btn-color: 'currentColor';\n --content-padding: 2rem 2.5rem;\n --content-bg: rgb(var(--background-rgb));\n --content-border-radius: var(--border-radius);\n --tabs-padding-start: 2.5rem;\n --tabs-padding-end: 2.5rem;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tabs-container-bg: 'transparent';\n --tabs-bg-rgb: var(--background-rgb);\n --tab-border-radius: var(--border-radius) var(--border-radius) 0 0;\n --tab-text-color: #{map.get($colors, blue)};\n --shadow-opacity: 0.1;\n --fade-transparency: 0;\n\n display: block;\n position: relative;\n z-index: #{$layer-index-raised};\n\n @media only screen and (max-width: 768px) {\n --tabs-padding-start: 1.5rem;\n --tabs-padding-end: 1.5rem;\n }\n\n ::slotted(nano-tab) {\n --tab-indicator-color: var(--indicator-color);\n --bg-rgb: var(--tabs-bg-rgb);\n --border-radius: var(--tab-border-radius);\n --grab-offset-x: var(--tabs-padding-start);\n }\n}\n\n:host([placement='start']) {\n --content-border-radius: 0 var(--border-radius) var(--border-radius) 0;\n --content-padding: 1rem;\n --tab-border-radius: 0;\n --tabs-padding-start: 0;\n --tabs-padding-end: 0;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tab-text-color: #{map.get($colors, darkgrey)};\n --indicator-color: #{map.get($colors, blue)};\n --indicator-size: 2px;\n}\n\n:host(.nano-color) {\n --indicator-color: var(--nano-color-tint, #{nano-color(primary, tint)});\n --tab-text-color: rgb(var(--nano-color-base-rgb) / 70%);\n\n ::slotted(nano-tab) {\n --active-text-color: var(--nano-color-shade, #{nano-color(primary, shade)});\n }\n}\n\n.nano-tab-group {\n display: flex;\n border-radius: 0;\n width: 100%;\n flex: inherit;\n\n &__tabs {\n display: flex;\n position: relative;\n width: 100%;\n }\n\n &__active-tab-indicator {\n position: absolute;\n transition:\n var(--indicator-transition) transform ease,\n var(--indicator-transition) width ease;\n }\n\n &__body {\n background: var(--content-bg);\n }\n\n .nano-tab-group__nav-container {\n position: relative;\n display: flex;\n background: var(--tabs-container-bg);\n }\n\n button {\n appearance: none;\n background-color: transparent;\n }\n\n &__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n inset-block: 0;\n border: unset;\n z-index: 2;\n transition: #{$transition-fast} ease opacity;\n opacity: 0;\n color: var(--scroll-btn-color);\n\n &:focus {\n outline: none;\n }\n\n &.is-shown {\n opacity: 1;\n }\n\n &:focus-visible {\n box-shadow: #{$control-focus-style} inset;\n }\n\n &--left {\n inset-inline-start: 0;\n }\n\n &--right {\n inset-inline-end: 0;\n }\n\n nano-icon {\n font-size: 16px;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Top\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--top {\n flex-direction: column;\n\n .nano-tab-group__nav-container {\n &::after {\n content: '';\n width: 86%;\n box-shadow: 0 10px 40px 10px rgb(0 0 0 / var(--shadow-opacity));\n height: 10px;\n position: absolute;\n inset-inline-start: 7%;\n inset-block-end: -10px;\n border-radius: 10px;\n z-index: -1;\n }\n }\n\n .nano-tab-group__nav {\n @include hide-scrollbar();\n\n padding-inline: var(--tabs-padding-start) var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n display: flex;\n overflow-x: auto;\n overflow-y: hidden;\n transition: #{$transition-medium} ease;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');\n mask-repeat: no-repeat;\n mask-image:\n linear-gradient(\n to left,\n rgb(0 0 0 / var(--fade-transparency)) 0,\n rgb(0 0 0 / var(--fade-transparency)) var(--tabs-padding-start),\n rgb(0 0 0 / 100%) calc(var(--tabs-padding-start) * 2),\n rgb(0 0 0 / 100%) calc(100% - (var(--tabs-padding-end) * 2)),\n rgb(0 0 0 / var(--fade-transparency))\n calc(100% - var(--tabs-padding-end)),\n rgb(0 0 0 / var(--fade-transparency))\n );\n mask-size: calc(100% + calc(var(--tabs-padding-end) * 4));\n mask-position: calc(var(--tabs-padding-end) * -2);\n\n &::after {\n content: ' ';\n padding-inline: 0 var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n line-height: 1;\n flex: 0 0 auto;\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left {\n .nano-tab-group__nav {\n mask-position: 0;\n mask-size: calc(100% + (var(--tabs-padding-end) * 2));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-position: calc(var(--tabs-padding-end) * -1);\n mask-size: calc(100% + var(--tabs-padding-end));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-size: 100%;\n mask-position: 0;\n }\n }\n\n .nano-tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n text-align: center;\n color: var(--tab-text-color);\n width: auto;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-block-end: -2px;\n border-block-end: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n order: 2;\n background: var(--content-bg);\n position: relative;\n overflow: hidden;\n width: auto;\n display: flex;\n justify-content: center;\n padding: var(--content-padding);\n border-radius: var(--content-border-radius);\n flex: 1 1 auto;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Start\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--start {\n flex-direction: row;\n\n .nano-tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n color: var(--tab-text-color);\n background: rgb(var(--tabs-bg-rgb));\n border-inline-start:\n solid var(--indicator-size)\n var(--indicator-track-color);\n text-align: start;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-inline-start: calc(-1 * 2px);\n border-inline-start: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n flex: 1 1 auto;\n order: 2;\n padding: var(--content-padding);\n overflow: hidden;\n border-radius: var(--content-border-radius);\n }\n }\n}\n","import {\n Component,\n Element,\n ComponentInterface,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n Listen,\n Build,\n} from '@stencil/core';\n\nimport { getDirectChildren, getOffset } from '../../utils/dom';\nimport { scrollIntoView } from '../../utils/scroll';\nimport {\n ComponentStore,\n StorageMethods,\n} from '../../utils/store/component-store';\nimport { createColorClasses } from '../../utils/theme';\nimport { displayTransition } from '../../utils/transitions';\nimport type { Color } from '../../interface';\n\n/**\n * A traditional tab implementation. It nests `nano-tab` and `nano-tab-content` sub-components.\n *\n * Tabs can be stacked vertically or horizontally (which presents different styling variations) using the `placement` attribute.\n * Horizontal tabs that don't fit will overflow and scroll appropriately.\n * Tab-content can also be swiped to change tabs.\n *\n * @slot tabs - Add `nano-tab` elements to add clickable tabs.\n * @slot tab-content-header - a header bar displayed above tab content.\n * @slot - Add `nano-tab-content` elements to add tabbable content.\n *\n * @part base - the main tab-group wrapper\n * @part nav - the bar surrounding all the tabs and nav buttons\n * @part tabs - the wrapper around the `nano-tab` components\n * @part active-tab-indicator - the active indicator line\n * @part body - the wrapper around the `nano-tab-content` components\n */\n\n@Component({\n tag: 'nano-tab-group',\n styleUrl: 'tab-group.scss',\n shadow: true,\n})\nexport class TabGroup implements ComponentInterface {\n private activeTab: HTMLNanoTabElement;\n private activePanel: HTMLNanoTabContentElement;\n private activeTabIndicator: HTMLElement;\n private nav: HTMLElement;\n private tabs: HTMLElement;\n private rightBtn: HTMLButtonElement;\n private leftBtn: HTMLButtonElement;\n\n private isRtl: boolean;\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private resizeObserver: ResizeObserver;\n private mutationObservers: WeakMap<Node, MutationObserver> = new WeakMap();\n\n @Element() host: HTMLNanoTabGroupElement;\n\n @State() hasScrollControls = false;\n @State() hideControlRight = true;\n @State() hideControlLeft = true;\n @State() tab: string;\n\n /**\n * The placement of the tabs.\n */\n @Prop({ reflect: true }) placement: 'top' | 'start' = 'top';\n\n /**\n * Disables the scroll arrows that appear when tabs overflow.\n */\n @Prop() noScrollControls = false;\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * Store the currently open tab (against this ID) in the component store.\n * Use in conjunction with storeMethod\n */\n @Prop() storeId?: string;\n\n /**\n * The method of storage.\n * Either session storage, url hash (after the '#') or url query (after the '?').\n */\n @Prop() storeMethod: StorageMethods = 'session';\n\n /**\n * Disable 'swipe to change tab' on devices with touch\n */\n @Prop() disableSwipe: boolean;\n\n @Watch('tab')\n handleTabNameChange() {\n if (this.activeTab && this.activeTab.panel === this.tab) return;\n const tab = this.getAllActiveTabs.find((el) => el.panel === this.tab);\n this.setActiveTab(tab);\n }\n\n @Watch('placement')\n handlePlacementChange() {\n this.syncActiveTabIndicator();\n }\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n @Watch('hideControlRight')\n hideRightBtn() {\n if (!this.rightBtn) return;\n displayTransition(this.rightBtn, 'is-shown', !this.hideControlRight);\n }\n\n @Watch('hideControlLeft')\n hideLeftBtn() {\n if (!this.leftBtn) return;\n displayTransition(this.leftBtn, 'is-shown', !this.hideControlLeft);\n }\n\n @Watch('hasScrollControls')\n watchScrollControls() {\n if (this.hasScrollControls) setTimeout((_) => this.handleTabScroll(), 20);\n else\n setTimeout((_) => {\n this.hideControlLeft = this.hideControlRight = true;\n }, 20);\n }\n\n /** Emitted when a tab is shown. */\n @Event() nanoTabShow: EventEmitter<{ name: string }>;\n\n /** Emitted when a tab is hidden. */\n @Event() nanoTabHide: EventEmitter<{ name: string }>;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event() nanoTabWillClose: EventEmitter<{ name: string }>;\n\n /** Emitted when a closable tab is removed. */\n @Event() nanoTabClose: EventEmitter<{ name: string }>;\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n if (this.activeTab && this.activeTab.panel === panel) return;\n\n const tab = this.getAllActiveTabs.find((el) => el.panel === panel);\n\n if (tab) this.setActiveTab(tab);\n }\n\n // Internal Methods\n\n get getAllActiveTabs() {\n return this.getAllTabs.filter((el: any) => !el.disabled);\n }\n\n get getAllTabs() {\n return getDirectChildren<HTMLNanoTabElement>(this.host, 'nano-tab');\n }\n\n get getAllPanels() {\n return getDirectChildren<HTMLNanoTabContentElement>(\n this.host,\n 'nano-tab-content'\n );\n }\n\n get getActiveTab() {\n return this.getAllActiveTabs.find((el) => el.active);\n }\n\n private updateScrollControls = () => {\n if (this.noScrollControls) {\n this.hasScrollControls = false;\n } else {\n this.hasScrollControls =\n ['top'].includes(this.placement) &&\n this.nav.scrollWidth > this.nav.clientWidth &&\n this.nav.scrollWidth > this.tabs.clientWidth;\n }\n };\n\n private setActiveTab(tab: HTMLNanoTabElement, emitEvents = true) {\n if (\n tab &&\n tab !== this.activeTab &&\n !tab.disabled &&\n this.getAllActiveTabs.includes(tab)\n ) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n this.tab = tab.panel;\n\n // Sync tabs and panels\n this.getAllActiveTabs.map((el) => (el.active = el === this.activeTab));\n this.getAllPanels.map((el) => {\n if (el.name === this.activeTab.panel) {\n el.active = true;\n this.activePanel = el;\n } else el.active = false;\n el.removeAttribute('animation-dir');\n });\n\n this.syncActiveTabIndicator();\n\n // active tab can be changed on init - this won't be ready. No big thing\n if (this.nav && ['top'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab) {\n this.nanoTabHide.emit({ name: previousTab.panel });\n }\n\n this.nanoTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllActiveTabs;\n const panels = this.getAllPanels;\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel) {\n tab.setAttribute('aria-controls', panel.getAttribute('id'));\n panel.setAttribute('aria-labelledby', tab.getAttribute('id'));\n }\n });\n }\n\n private syncActiveTabIndicator() {\n this.getAllTabs.forEach((tab) =>\n tab.setAttribute(\n 'direction',\n this.placement === 'top' ? 'horizontal' : 'vertical'\n )\n );\n\n const tab = this.getActiveTab;\n const width = tab.shadowRoot.querySelector('.nanotab')?.clientWidth || 0;\n const height = tab.clientHeight;\n const offset = getOffset(tab, this.tabs);\n\n if (!this.activeTabIndicator) return;\n\n const offsetTop = offset.top + this.nav.scrollTop;\n const offsetLeft = offset.left;\n\n switch (this.placement) {\n case 'top':\n this.activeTabIndicator.style.width = `${width}px`;\n this.activeTabIndicator.style.height = null;\n this.activeTabIndicator.style.transform = `translateX(${offsetLeft}px)`;\n break;\n\n case 'start':\n this.activeTabIndicator.style.width = null;\n this.activeTabIndicator.style.height = `${height}px`;\n this.activeTabIndicator.style.transform = `translateY(${offsetTop}px)`;\n break;\n }\n }\n\n private getNavWidth() {\n if (!this.nav) return 0;\n const computedStyle = getComputedStyle(this.nav);\n let clientWidth = this.nav.clientWidth;\n return (clientWidth -=\n parseFloat(computedStyle.paddingLeft) +\n parseFloat(computedStyle.paddingRight));\n }\n\n // Event handlers\n\n @Listen('nanoTabClose')\n handleTabClose(ev: CustomEvent & { target: HTMLNanoTabElement }) {\n let tabIndex = this.getAllActiveTabs.indexOf(ev.target);\n const tab = ev.target;\n if (tabIndex < 0) return;\n\n const panel = this.getAllPanels.find((el) => el.name === tab.panel);\n if (!panel) return;\n\n ev.stopImmediatePropagation();\n\n const closeEv = this.nanoTabWillClose.emit({ name: tab.panel });\n if (closeEv.defaultPrevented) return;\n\n // Show the previous tab if the tab is currently active\n if (tab.active) {\n tabIndex = tabIndex === 0 ? 1 : tabIndex - 1;\n const prevTab = this.getAllActiveTabs[tabIndex]?.panel;\n if (prevTab) this.host.show(prevTab);\n }\n\n tab.remove();\n panel.remove();\n this.nanoTabClose.emit({ name: tab.panel });\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) this.setActiveTab(tab);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const activeEl = document.activeElement as any;\n if (!activeEl || activeEl.tagName.toLowerCase() !== 'nano-tab') return;\n\n // Activate a tab\n if (['Enter', ' '].includes(event.key)) {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) {\n this.setActiveTab(tab);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n // Move focus left or right\n if (\n ![\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n ].includes(event.key)\n )\n return;\n\n const tabs = this.getAllActiveTabs;\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') index = 0;\n if (event.key === 'End') index = tabs.length - 1;\n\n if (this.placement === 'top') {\n if (\n (this.isRtl && event.key === 'ArrowRight') ||\n (!this.isRtl && event.key === 'ArrowLeft')\n ) {\n index = Math.max(0, index - 1);\n }\n if (\n (this.isRtl && event.key === 'ArrowLeft') ||\n (!this.isRtl && event.key === 'ArrowRight')\n ) {\n index = Math.min(tabs.length - 1, index + 1);\n }\n }\n\n if (this.placement === 'start') {\n if (event.key === 'ArrowUp') index = Math.max(0, index - 1);\n if (event.key === 'ArrowDown')\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus();\n\n if (this.placement === 'top') {\n scrollIntoView(tabs[index], this.nav, 'horizontal', 'center');\n }\n // need to stop bubbling otherwise it will focus on parent tabs if nested\n event.stopPropagation();\n // stop the browser moving about\n event.preventDefault();\n };\n\n private handleTabScroll = () => {\n if (!this.hasScrollControls) {\n this.hideControlLeft = this.hideControlRight = true;\n return;\n }\n const endRight = this.isRtl\n ? this.nav.scrollLeft === 0\n : this.nav.scrollWidth - this.nav.scrollLeft === this.nav.clientWidth;\n const endLeft = this.isRtl\n ? this.nav.scrollWidth + this.nav.scrollLeft === this.nav.clientWidth\n : this.nav.scrollLeft === 0;\n\n if (endLeft) {\n this.hideControlLeft = true;\n this.hideControlRight = false;\n } else if (endRight) {\n this.hideControlLeft = false;\n this.hideControlRight = true;\n } else {\n this.hideControlRight = false;\n this.hideControlLeft = false;\n }\n };\n\n private handleBtnClick = (goRight: boolean = false) => {\n const navWidth = this.getNavWidth();\n let leftAmt;\n if (goRight) leftAmt = this.nav.scrollLeft + navWidth - 20;\n else leftAmt = this.nav.scrollLeft - navWidth + 20;\n\n try {\n this.nav.scroll({\n left: leftAmt,\n behavior: 'smooth',\n });\n } catch (e) {\n this.nav.scrollLeft = leftAmt;\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n private handleTouchEnd = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY; // get vertical dist traveled\n const threshold = 70;\n\n const xDiff = this.initialTouchX - touch.clientX;\n const yDiff = this.initialTouchY - touch.clientY;\n\n const isHorizontalSwipe =\n Math.abs(distX) >= threshold && Math.abs(distY) <= threshold;\n\n const tabs = this.getAllActiveTabs;\n const currIndex = tabs.findIndex((el) => el.active);\n\n if (isHorizontalSwipe) {\n const toGo =\n (distX < 0 && this.placement === 'top') ||\n (distX > 0 && this.placement !== 'top')\n ? 1\n : -1;\n\n if (tabs[currIndex + toGo]) {\n this.setActiveTab(tabs[currIndex + toGo]);\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) {\n if (xDiff > 0) this.activePanel.setAttribute('animation-dir', 'left');\n else this.activePanel.setAttribute('animation-dir', 'right');\n }\n }\n }\n this.initialTouchX = null;\n this.initialTouchY = null;\n };\n\n private handleContentSlotChange = () => {\n setTimeout(() => {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n });\n };\n\n private handleTabSlotChange = (ev: Event & { target: HTMLSlotElement }) => {\n setTimeout(() => {\n this.setAriaLabels();\n this.handleTabScroll();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.updateScrollControls();\n }, 500);\n\n /** maintain a weakmap of mutation observers to maintain tab / indicator position on all changes. */\n const nodes = ev.target.assignedElements({ flatten: true });\n nodes.forEach((node) => {\n if (!this.mutationObservers.get(node)) {\n const mo = new MutationObserver(() => {\n setTimeout(() => {\n this.syncActiveTabIndicator();\n this.handleTabScroll();\n this.updateScrollControls();\n }, 500);\n });\n this.mutationObservers.set(node, mo);\n\n mo.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n });\n };\n\n // Stencil hooks\n\n componentDidLoad() {\n // Initial IO - watching for all content to be loaded\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n\n if (this.storeId)\n ComponentStore.init(this, ['tab'], this.storeMethod, this.storeId);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n\n requestAnimationFrame(() => this.updateScrollControls());\n\n if (!window['ResizeObserver']) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n setTimeout(() => {\n this.updateScrollControls();\n this.syncActiveTabIndicator();\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }, 500);\n });\n this.resizeObserver.observe(this.nav);\n }\n\n connectedCallback() {\n this.isRtl =\n this.host.dir === 'rtl' ||\n (this.host.ownerDocument as Document).dir === 'rtl';\n\n if (Build.isServer) {\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.setAriaLabels();\n }\n }\n\n disconnectedCallback() {\n if (this.resizeObserver) this.resizeObserver.unobserve(this.nav);\n }\n\n render() {\n this.isRtl = (this.host.ownerDocument as Document).dir === 'rtl';\n\n return (\n <Host\n class={{ ...createColorClasses(this.color) }}\n dir={this.isRtl ? 'rtl' : null}\n >\n <div\n part=\"base\"\n class={{\n 'nano-tab-group': true,\n 'nano-tab-group--top': this.placement === 'top',\n 'nano-tab-group--start': this.placement === 'start',\n 'nano-tab-group--has-scroll-controls': this.hasScrollControls,\n 'nano-tab-group--has-scroll-controls-left': !this.hideControlLeft,\n 'nano-tab-group--has-scroll-controls-right': !this.hideControlRight,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"nano-tab-group__nav-container\" part=\"nav\">\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--left': true,\n }}\n ref={(btn) => (this.leftBtn = btn)}\n onClick={() => this.handleBtnClick(false)}\n >\n <nano-icon name=\"light/chevron-left\"></nano-icon>\n </button>\n )}\n <div\n ref={(el) => (this.nav = el)}\n class=\"nano-tab-group__nav\"\n onScroll={this.handleTabScroll}\n >\n <div\n ref={(el) => (this.tabs = el)}\n part=\"tabs\"\n class=\"nano-tab-group__tabs\"\n role=\"tablist\"\n >\n <div\n ref={(el) => (this.activeTabIndicator = el)}\n part=\"active-tab-indicator\"\n class=\"nano-tab-group__active-tab-indicator\"\n />\n <slot name=\"tabs\" onSlotchange={this.handleTabSlotChange} />\n </div>\n </div>\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--right': true,\n }}\n ref={(btn) => (this.rightBtn = btn)}\n onClick={() => this.handleBtnClick(true)}\n >\n <nano-icon name=\"light/chevron-right\"></nano-icon>\n </button>\n )}\n </div>\n <slot name=\"tab-content-header\" />\n <div\n part=\"body\"\n class=\"nano-tab-group__body\"\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"nano-tab-group.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,66NAA66N;;MCiDp7N,QAAQ;;;;;;;IAUX,kBAAa,GAAW,IAAI,CAAC;IAC7B,kBAAa,GAAW,IAAI,CAAC;IAG7B,sBAAiB,GAAoC,IAAI,OAAO,EAAE,CAAC;IA0HnE,yBAAoB,GAAG;MAC7B,IAAI,IAAI,CAAC,gBAAgB,EAAE;QACzB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;OAChC;WAAM;QACL,IAAI,CAAC,iBAAiB;UACpB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW;YAC3C,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;OAChD;KACF,CAAC;IA+HM,gBAAW,GAAG,CAAC,KAAiB;MACtC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;MAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;MAEvC,IAAI,GAAG;QAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;KACjC,CAAC;IAEM,kBAAa,GAAG,CAAC,KAAoB;MAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAoB,CAAC;MAC/C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,UAAU;QAAE,OAAO;;MAGvE,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CA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AM,EACX,KAAK,EAAC,sBAAsB,EAC5B,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,UAAU,EAAE,IAAI,CAAC,cAAc,IAE/B,YAAM,YAAY,EAAE,IAAI,CAAC,uBAAuB,GAAI,CAChD,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tabs/tab-group.scss?tag=nano-tab-group&encapsulation=shadow","./src/components/tabs/tab-group.tsx"],"sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n/**\n * @prop --indicator-transition: Only relevant to placement 'start'. defaults to #{$transition-fast};\n * @prop --indicator-color: defaults to #{map.get($colors, lightblue)} on placement 'top' and #{map.get($colors, blue)} on placement 'start';\n * @prop --indicator-track-color: Only relevant to placement 'start'. defaults to #{map.get($colors, lightgrey)};\n * @prop --indicator-size: defaults to 5px on placement 'top' and 2px on placement 'start';\n\n * @prop --border-radius: defaults to #{$layer-border-radius};\n * @prop --background-rgb: will be used as the default background colour for tabs and content. defaults to #{$layer-bg-color-rgb};\n * @prop --shadow-opacity: opacity of the shadow behind tabs. defaults to 0.1;\n * @prop --scroll-btn-color: defaults to 'currentcolor';\n\n * @prop --content-padding: defaults to 2rem 2.5rem;\n * @prop --content-bg: defaults to rgb(var(--background-rgb));\n * @prop --content-border-radius: defaults to `var(--border-radius)` `position=\"top\"`. `0 var(--border-radius) var(--border-radius) 0` `position=\"start\"`;\n\n * @prop --tabs-padding-start: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-end: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-top: defaults to 0;\n * @prop --tabs-padding-bottom: defaults to 0;\n * @prop --tabs-bg-rgb: defaults to var(--bg-color);\n * @prop --tab-border-radius: defaults to `var(--border-radius) var(--border-radius) 0 0` `position=\"top\"`. `0` `position=\"start\"`. ;\n * @prop --tab-text-color: defaults to #{map.get($colors, blue)} on placement 'top' and #{map.get($colors, darkgrey)} on placement 'start';\n * @prop --fade-transparency: controls the strength of the fade on overflowing tabs, defaults to 0;\n */\n\n:host {\n --indicator-transition: #{$transition-fast};\n --indicator-color: #{map.get($colors, lightblue)};\n --indicator-track-color: #{map.get($colors, lightgrey)};\n --indicator-size: 0;\n --border-radius: #{$layer-border-radius};\n --background-rgb: #{$layer-bg-color-rgb};\n --scroll-btn-color: 'currentColor';\n --content-padding: 2rem 2.5rem;\n --content-bg: rgb(var(--background-rgb));\n --content-border-radius: var(--border-radius);\n --tabs-padding-start: 2.5rem;\n --tabs-padding-end: 2.5rem;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tabs-container-bg: 'transparent';\n --tabs-bg-rgb: var(--background-rgb);\n --tab-border-radius: var(--border-radius) var(--border-radius) 0 0;\n --tab-text-color: #{map.get($colors, blue)};\n --shadow-opacity: 0.1;\n --fade-transparency: 0;\n\n display: block;\n position: relative;\n z-index: #{$layer-index-raised};\n\n @media only screen and (max-width: 768px) {\n --tabs-padding-start: 1.5rem;\n --tabs-padding-end: 1.5rem;\n }\n\n ::slotted(nano-tab) {\n --tab-indicator-color: var(--indicator-color);\n --bg-rgb: var(--tabs-bg-rgb);\n --border-radius: var(--tab-border-radius);\n --grab-offset-x: var(--tabs-padding-start);\n }\n}\n\n:host([placement='start']) {\n --content-border-radius: 0 var(--border-radius) var(--border-radius) 0;\n --content-padding: 1rem;\n --tab-border-radius: 0;\n --tabs-padding-start: 0;\n --tabs-padding-end: 0;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tab-text-color: #{map.get($colors, darkgrey)};\n --indicator-color: #{map.get($colors, blue)};\n --indicator-size: 2px;\n}\n\n:host(.nano-color) {\n --indicator-color: var(--nano-color-tint, #{nano-color(primary, tint)});\n --tab-text-color: rgb(var(--nano-color-base-rgb) / 70%);\n\n ::slotted(nano-tab) {\n --active-text-color: var(--nano-color-shade, #{nano-color(primary, shade)});\n }\n}\n\n.nano-tab-group {\n display: flex;\n border-radius: 0;\n width: 100%;\n flex: inherit;\n\n &__tabs {\n display: flex;\n position: relative;\n width: 100%;\n }\n\n &__active-tab-indicator {\n position: absolute;\n transition:\n var(--indicator-transition) transform ease,\n var(--indicator-transition) width ease;\n }\n\n &__body {\n background: var(--content-bg);\n }\n\n .nano-tab-group__nav-container {\n position: relative;\n display: flex;\n background: var(--tabs-container-bg);\n }\n\n button {\n appearance: none;\n background-color: transparent;\n }\n\n &__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n inset-block: 0;\n border: unset;\n z-index: 2;\n transition: #{$transition-fast} ease opacity;\n opacity: 0;\n color: var(--scroll-btn-color);\n\n &:focus {\n outline: none;\n }\n\n &.is-shown {\n opacity: 1;\n }\n\n &:focus-visible {\n box-shadow: #{$control-focus-style} inset;\n }\n\n &--left {\n inset-inline-start: 0;\n }\n\n &--right {\n inset-inline-end: 0;\n }\n\n nano-icon {\n font-size: 16px;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Top\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--top {\n flex-direction: column;\n\n .nano-tab-group__nav-container {\n &::after {\n content: '';\n width: 86%;\n box-shadow: 0 10px 40px 10px rgb(0 0 0 / var(--shadow-opacity));\n height: 10px;\n position: absolute;\n inset-inline-start: 7%;\n inset-block-end: -10px;\n border-radius: 10px;\n z-index: -1;\n }\n }\n\n .nano-tab-group__nav {\n @include hide-scrollbar();\n\n padding-inline: var(--tabs-padding-start) var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n display: flex;\n overflow-x: auto;\n overflow-y: hidden;\n transition: #{$transition-medium} ease;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');\n mask-repeat: no-repeat;\n mask-image:\n linear-gradient(\n to left,\n rgb(0 0 0 / var(--fade-transparency)) 0,\n rgb(0 0 0 / var(--fade-transparency)) var(--tabs-padding-start),\n rgb(0 0 0 / 100%) calc(var(--tabs-padding-start) * 2),\n rgb(0 0 0 / 100%) calc(100% - (var(--tabs-padding-end) * 2)),\n rgb(0 0 0 / var(--fade-transparency))\n calc(100% - var(--tabs-padding-end)),\n rgb(0 0 0 / var(--fade-transparency))\n );\n mask-size: calc(100% + calc(var(--tabs-padding-end) * 4));\n mask-position: calc(var(--tabs-padding-end) * -2);\n\n &::after {\n content: ' ';\n padding-inline: 0 var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n line-height: 1;\n flex: 0 0 auto;\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left {\n .nano-tab-group__nav {\n mask-position: 0;\n mask-size: calc(100% + (var(--tabs-padding-end) * 2));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-position: calc(var(--tabs-padding-end) * -1);\n mask-size: calc(100% + var(--tabs-padding-end));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-size: 100%;\n mask-position: 0;\n }\n }\n\n .nano-tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n text-align: center;\n color: var(--tab-text-color);\n width: auto;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-block-end: -2px;\n border-block-end: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n order: 2;\n background: var(--content-bg);\n position: relative;\n overflow: hidden;\n width: auto;\n display: flex;\n justify-content: center;\n padding: var(--content-padding);\n border-radius: var(--content-border-radius);\n flex: 1 1 auto;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Start\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--start {\n flex-direction: row;\n\n .nano-tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n color: var(--tab-text-color);\n background: rgb(var(--tabs-bg-rgb));\n border-inline-start:\n solid var(--indicator-size)\n var(--indicator-track-color);\n text-align: start;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-inline-start: calc(-1 * 2px);\n border-inline-start: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n flex: 1 1 auto;\n order: 2;\n padding: var(--content-padding);\n overflow: hidden;\n border-radius: var(--content-border-radius);\n }\n }\n}\n","import {\n Component,\n Element,\n ComponentInterface,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n Listen,\n Build,\n} from '@stencil/core';\n\nimport { getDirectChildren, getOffset } from '../../utils/dom';\nimport { scrollIntoView } from '../../utils/scroll';\nimport {\n ComponentStore,\n StorageMethods,\n} from '../../utils/store/component-store';\nimport { createColorClasses } from '../../utils/theme';\nimport { displayTransition } from '../../utils/transitions';\nimport type { Color } from '../../interface';\n\n/**\n * A traditional tab implementation. It nests `nano-tab` and `nano-tab-content` sub-components.\n *\n * Tabs can be stacked vertically or horizontally (which presents different styling variations) using the `placement` attribute.\n * Horizontal tabs that don't fit will overflow and scroll appropriately.\n * Tab-content can also be swiped to change tabs.\n *\n * @slot tabs - Add `nano-tab` elements to add clickable tabs.\n * @slot tab-content-header - a header bar displayed above tab content.\n * @slot - Add `nano-tab-content` elements to add tabbable content.\n *\n * @part base - the main tab-group wrapper\n * @part nav - the bar surrounding all the tabs and nav buttons\n * @part tabs - the wrapper around the `nano-tab` components\n * @part active-tab-indicator - the active indicator line\n * @part body - the wrapper around the `nano-tab-content` components\n */\n\n@Component({\n tag: 'nano-tab-group',\n styleUrl: 'tab-group.scss',\n shadow: true,\n})\nexport class TabGroup implements ComponentInterface {\n private activeTab: HTMLNanoTabElement;\n private activePanel: HTMLNanoTabContentElement;\n private activeTabIndicator: HTMLElement;\n private nav: HTMLElement;\n private tabs: HTMLElement;\n private rightBtn: HTMLButtonElement;\n private leftBtn: HTMLButtonElement;\n\n private isRtl: boolean;\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private resizeObserver: ResizeObserver;\n private mutationObservers: WeakMap<Node, MutationObserver> = new WeakMap();\n\n @Element() host: HTMLNanoTabGroupElement;\n\n @State() hasScrollControls = false;\n @State() hideControlRight = true;\n @State() hideControlLeft = true;\n @State() tab: string;\n\n /**\n * The placement of the tabs.\n */\n @Prop({ reflect: true }) placement: 'top' | 'start' = 'top';\n\n /**\n * Disables the scroll arrows that appear when tabs overflow.\n */\n @Prop() noScrollControls = false;\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * Store the currently open tab (against this ID) in the component store.\n * Use in conjunction with storeMethod\n */\n @Prop() storeId?: string;\n\n /**\n * The method of storage.\n * Either session storage, url hash (after the '#') or url query (after the '?').\n */\n @Prop() storeMethod: StorageMethods = 'session';\n\n /**\n * Disable 'swipe to change tab' on devices with touch\n */\n @Prop() disableSwipe: boolean;\n\n @Watch('tab')\n handleTabNameChange() {\n if (this.activeTab && this.activeTab.panel === this.tab) return;\n const tab = this.getAllActiveTabs.find((el) => el.panel === this.tab);\n this.setActiveTab(tab);\n }\n\n @Watch('placement')\n handlePlacementChange() {\n this.syncActiveTabIndicator();\n }\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n @Watch('hideControlRight')\n hideRightBtn() {\n if (!this.rightBtn) return;\n displayTransition(this.rightBtn, 'is-shown', !this.hideControlRight);\n }\n\n @Watch('hideControlLeft')\n hideLeftBtn() {\n if (!this.leftBtn) return;\n displayTransition(this.leftBtn, 'is-shown', !this.hideControlLeft);\n }\n\n @Watch('hasScrollControls')\n watchScrollControls() {\n if (this.hasScrollControls) setTimeout((_) => this.handleTabScroll(), 20);\n else\n setTimeout((_) => {\n this.hideControlLeft = this.hideControlRight = true;\n }, 20);\n }\n\n /** Emitted when a tab is shown. */\n @Event() nanoTabShow: EventEmitter<{ name: string }>;\n\n /** Emitted when a tab is hidden. */\n @Event() nanoTabHide: EventEmitter<{ name: string }>;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event() nanoTabWillClose: EventEmitter<{ name: string }>;\n\n /** Emitted when a closable tab is removed. */\n @Event() nanoTabClose: EventEmitter<{ name: string }>;\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n if (this.activeTab && this.activeTab.panel === panel) return;\n\n const tab = this.getAllActiveTabs.find((el) => el.panel === panel);\n\n if (tab) this.setActiveTab(tab);\n }\n\n // Internal Methods\n\n get getAllActiveTabs() {\n return this.getAllTabs.filter((el: any) => !el.disabled);\n }\n\n get getAllTabs() {\n return getDirectChildren<HTMLNanoTabElement>(this.host, 'nano-tab');\n }\n\n get getAllPanels() {\n return getDirectChildren<HTMLNanoTabContentElement>(\n this.host,\n 'nano-tab-content'\n );\n }\n\n get getActiveTab() {\n return this.getAllActiveTabs.find((el) => el.active);\n }\n\n private updateScrollControls = () => {\n if (this.noScrollControls) {\n this.hasScrollControls = false;\n } else {\n this.hasScrollControls =\n ['top'].includes(this.placement) &&\n this.nav.scrollWidth > this.nav.clientWidth &&\n this.nav.scrollWidth > this.tabs.clientWidth;\n }\n };\n\n private setActiveTab(tab: HTMLNanoTabElement, emitEvents = true) {\n if (\n tab &&\n tab !== this.activeTab &&\n !tab.disabled &&\n this.getAllActiveTabs.includes(tab)\n ) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n this.tab = tab.panel;\n\n // Sync tabs and panels\n this.getAllActiveTabs.map((el) => (el.active = el === this.activeTab));\n this.getAllPanels.map((el) => {\n if (el.name === this.activeTab.panel) {\n el.active = true;\n this.activePanel = el;\n } else el.active = false;\n el.removeAttribute('animation-dir');\n });\n\n this.syncActiveTabIndicator();\n\n // active tab can be changed on init - this won't be ready. No big thing\n if (this.nav && ['top'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab) {\n this.nanoTabHide.emit({ name: previousTab.panel });\n }\n\n this.nanoTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllActiveTabs;\n const panels = this.getAllPanels;\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel) {\n tab.setAttribute('aria-controls', panel.getAttribute('id'));\n panel.setAttribute('aria-labelledby', tab.getAttribute('id'));\n }\n });\n }\n\n private syncActiveTabIndicator() {\n this.getAllTabs.forEach((tab) =>\n tab.setAttribute(\n 'direction',\n this.placement === 'top' ? 'horizontal' : 'vertical'\n )\n );\n\n const tab = this.getActiveTab;\n if (!tab) return;\n\n const width = tab.shadowRoot.querySelector('.nanotab')?.clientWidth || 0;\n const height = tab.clientHeight;\n const offset = getOffset(tab, this.tabs);\n\n if (!this.activeTabIndicator) return;\n\n const offsetTop = offset.top + this.nav.scrollTop;\n const offsetLeft = offset.left;\n\n switch (this.placement) {\n case 'top':\n this.activeTabIndicator.style.width = `${width}px`;\n this.activeTabIndicator.style.height = null;\n this.activeTabIndicator.style.transform = `translateX(${offsetLeft}px)`;\n break;\n\n case 'start':\n this.activeTabIndicator.style.width = null;\n this.activeTabIndicator.style.height = `${height}px`;\n this.activeTabIndicator.style.transform = `translateY(${offsetTop}px)`;\n break;\n }\n }\n\n private getNavWidth() {\n if (!this.nav) return 0;\n const computedStyle = getComputedStyle(this.nav);\n let clientWidth = this.nav.clientWidth;\n return (clientWidth -=\n parseFloat(computedStyle.paddingLeft) +\n parseFloat(computedStyle.paddingRight));\n }\n\n // Event handlers\n\n @Listen('nanoTabClose')\n handleTabClose(ev: CustomEvent & { target: HTMLNanoTabElement }) {\n let tabIndex = this.getAllActiveTabs.indexOf(ev.target);\n const tab = ev.target;\n if (tabIndex < 0) return;\n\n const panel = this.getAllPanels.find((el) => el.name === tab.panel);\n if (!panel) return;\n\n ev.stopImmediatePropagation();\n\n const closeEv = this.nanoTabWillClose.emit({ name: tab.panel });\n if (closeEv.defaultPrevented) return;\n\n // Show the previous tab if the tab is currently active\n if (tab.active) {\n tabIndex = tabIndex === 0 ? 1 : tabIndex - 1;\n const prevTab = this.getAllActiveTabs[tabIndex]?.panel;\n if (prevTab) this.host.show(prevTab);\n }\n\n tab.remove();\n panel.remove();\n this.nanoTabClose.emit({ name: tab.panel });\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) this.setActiveTab(tab);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const activeEl = document.activeElement as any;\n if (!activeEl || activeEl.tagName.toLowerCase() !== 'nano-tab') return;\n\n // Activate a tab\n if (['Enter', ' '].includes(event.key)) {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) {\n this.setActiveTab(tab);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n // Move focus left or right\n if (\n ![\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n ].includes(event.key)\n )\n return;\n\n const tabs = this.getAllActiveTabs;\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') index = 0;\n if (event.key === 'End') index = tabs.length - 1;\n\n if (this.placement === 'top') {\n if (\n (this.isRtl && event.key === 'ArrowRight') ||\n (!this.isRtl && event.key === 'ArrowLeft')\n ) {\n index = Math.max(0, index - 1);\n }\n if (\n (this.isRtl && event.key === 'ArrowLeft') ||\n (!this.isRtl && event.key === 'ArrowRight')\n ) {\n index = Math.min(tabs.length - 1, index + 1);\n }\n }\n\n if (this.placement === 'start') {\n if (event.key === 'ArrowUp') index = Math.max(0, index - 1);\n if (event.key === 'ArrowDown')\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus();\n\n if (this.placement === 'top') {\n scrollIntoView(tabs[index], this.nav, 'horizontal', 'center');\n }\n // need to stop bubbling otherwise it will focus on parent tabs if nested\n event.stopPropagation();\n // stop the browser moving about\n event.preventDefault();\n };\n\n private handleTabScroll = () => {\n if (!this.hasScrollControls) {\n this.hideControlLeft = this.hideControlRight = true;\n return;\n }\n const endRight = this.isRtl\n ? this.nav.scrollLeft === 0\n : this.nav.scrollWidth - this.nav.scrollLeft === this.nav.clientWidth;\n const endLeft = this.isRtl\n ? this.nav.scrollWidth + this.nav.scrollLeft === this.nav.clientWidth\n : this.nav.scrollLeft === 0;\n\n if (endLeft) {\n this.hideControlLeft = true;\n this.hideControlRight = false;\n } else if (endRight) {\n this.hideControlLeft = false;\n this.hideControlRight = true;\n } else {\n this.hideControlRight = false;\n this.hideControlLeft = false;\n }\n };\n\n private handleBtnClick = (goRight: boolean = false) => {\n const navWidth = this.getNavWidth();\n let leftAmt;\n if (goRight) leftAmt = this.nav.scrollLeft + navWidth - 20;\n else leftAmt = this.nav.scrollLeft - navWidth + 20;\n\n try {\n this.nav.scroll({\n left: leftAmt,\n behavior: 'smooth',\n });\n } catch (e) {\n this.nav.scrollLeft = leftAmt;\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n private handleTouchEnd = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY; // get vertical dist traveled\n const threshold = 70;\n\n const xDiff = this.initialTouchX - touch.clientX;\n const yDiff = this.initialTouchY - touch.clientY;\n\n const isHorizontalSwipe =\n Math.abs(distX) >= threshold && Math.abs(distY) <= threshold;\n\n const tabs = this.getAllActiveTabs;\n const currIndex = tabs.findIndex((el) => el.active);\n\n if (isHorizontalSwipe) {\n const toGo =\n (distX < 0 && this.placement === 'top') ||\n (distX > 0 && this.placement !== 'top')\n ? 1\n : -1;\n\n if (tabs[currIndex + toGo]) {\n this.setActiveTab(tabs[currIndex + toGo]);\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) {\n if (xDiff > 0) this.activePanel.setAttribute('animation-dir', 'left');\n else this.activePanel.setAttribute('animation-dir', 'right');\n }\n }\n }\n this.initialTouchX = null;\n this.initialTouchY = null;\n };\n\n private handleContentSlotChange = () => {\n setTimeout(() => {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n });\n };\n\n private handleTabSlotChange = (ev: Event & { target: HTMLSlotElement }) => {\n setTimeout(() => {\n this.setAriaLabels();\n this.handleTabScroll();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.updateScrollControls();\n }, 500);\n\n /** maintain a weakmap of mutation observers to maintain tab / indicator position on all changes. */\n const nodes = ev.target.assignedElements({ flatten: true });\n nodes.forEach((node) => {\n if (!this.mutationObservers.get(node)) {\n const mo = new MutationObserver(() => {\n setTimeout(() => {\n this.syncActiveTabIndicator();\n this.handleTabScroll();\n this.updateScrollControls();\n }, 500);\n });\n this.mutationObservers.set(node, mo);\n\n mo.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n });\n };\n\n // Stencil hooks\n\n componentDidLoad() {\n // Initial IO - watching for all content to be loaded\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n\n if (this.storeId)\n ComponentStore.init(this, ['tab'], this.storeMethod, this.storeId);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n\n requestAnimationFrame(() => this.updateScrollControls());\n\n if (!window['ResizeObserver']) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n setTimeout(() => {\n this.updateScrollControls();\n this.syncActiveTabIndicator();\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }, 500);\n });\n this.resizeObserver.observe(this.nav);\n }\n\n connectedCallback() {\n this.isRtl =\n this.host.dir === 'rtl' ||\n (this.host.ownerDocument as Document).dir === 'rtl';\n\n if (Build.isServer) {\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.setAriaLabels();\n }\n }\n\n disconnectedCallback() {\n if (this.resizeObserver) this.resizeObserver.unobserve(this.nav);\n }\n\n render() {\n this.isRtl = (this.host.ownerDocument as Document).dir === 'rtl';\n\n return (\n <Host\n class={{ ...createColorClasses(this.color) }}\n dir={this.isRtl ? 'rtl' : null}\n >\n <div\n part=\"base\"\n class={{\n 'nano-tab-group': true,\n 'nano-tab-group--top': this.placement === 'top',\n 'nano-tab-group--start': this.placement === 'start',\n 'nano-tab-group--has-scroll-controls': this.hasScrollControls,\n 'nano-tab-group--has-scroll-controls-left': !this.hideControlLeft,\n 'nano-tab-group--has-scroll-controls-right': !this.hideControlRight,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"nano-tab-group__nav-container\" part=\"nav\">\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--left': true,\n }}\n ref={(btn) => (this.leftBtn = btn)}\n onClick={() => this.handleBtnClick(false)}\n >\n <nano-icon name=\"light/chevron-left\"></nano-icon>\n </button>\n )}\n <div\n ref={(el) => (this.nav = el)}\n class=\"nano-tab-group__nav\"\n onScroll={this.handleTabScroll}\n >\n <div\n ref={(el) => (this.tabs = el)}\n part=\"tabs\"\n class=\"nano-tab-group__tabs\"\n role=\"tablist\"\n >\n <div\n ref={(el) => (this.activeTabIndicator = el)}\n part=\"active-tab-indicator\"\n class=\"nano-tab-group__active-tab-indicator\"\n />\n <slot name=\"tabs\" onSlotchange={this.handleTabSlotChange} />\n </div>\n </div>\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--right': true,\n }}\n ref={(btn) => (this.rightBtn = btn)}\n onClick={() => this.handleBtnClick(true)}\n >\n <nano-icon name=\"light/chevron-right\"></nano-icon>\n </button>\n )}\n </div>\n <slot name=\"tab-content-header\" />\n <div\n part=\"body\"\n class=\"nano-tab-group__body\"\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -110,7 +110,7 @@ const createWorkerProxy = (worker, workerMsgId, exportedMethod) => (
|
|
110
110
|
})
|
111
111
|
);
|
112
112
|
|
113
|
-
const workerPromise = import('./table.worker-
|
113
|
+
const workerPromise = import('./table.worker-d252307c.js').then(m => m.worker);
|
114
114
|
const createWorkerStore = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'createWorkerStore');
|
115
115
|
const syncConfigToWorker = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'syncConfigToWorker');
|
116
116
|
const syncDataToWorker = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'syncDataToWorker');
|
@@ -880,6 +880,7 @@ const Table = class {
|
|
880
880
|
classes = [...e.target.className.split(' '), ...classes];
|
881
881
|
this.tableWrapperEle.classList.add(...classes.filter((cl) => !!cl));
|
882
882
|
};
|
883
|
+
this.jsxRenderer = undefined;
|
883
884
|
this.type = 'table';
|
884
885
|
this.caption = undefined;
|
885
886
|
this.showCaption = false;
|
@@ -1251,7 +1252,6 @@ const Table = class {
|
|
1251
1252
|
: dRows.length;
|
1252
1253
|
let rows = [];
|
1253
1254
|
const blocks = [];
|
1254
|
-
this.blockHeights = [];
|
1255
1255
|
// old skool loop for perf
|
1256
1256
|
for (i; i <= l; i++) {
|
1257
1257
|
rows.push(this.store.data.state.rows[i - 1] || { __uuid: '' });
|
@@ -1295,6 +1295,8 @@ const Table = class {
|
|
1295
1295
|
if (!el)
|
1296
1296
|
return;
|
1297
1297
|
readTask(() => {
|
1298
|
+
if (el.classList.contains(`${CSSNAMESPACE}__inactive`))
|
1299
|
+
return;
|
1298
1300
|
const height = el.getBoundingClientRect().height;
|
1299
1301
|
// cache height to our block heights array
|
1300
1302
|
// for subsequent renders
|
@@ -1368,6 +1370,9 @@ const Table = class {
|
|
1368
1370
|
return;
|
1369
1371
|
this.activeWatcherIo.disconnect();
|
1370
1372
|
this.activeWatcherIo = undefined;
|
1373
|
+
(this.scrollParent === document.documentElement
|
1374
|
+
? document
|
1375
|
+
: this.scrollParent).removeEventListener('scroll', this.scrollHandler);
|
1371
1376
|
}
|
1372
1377
|
render() {
|
1373
1378
|
this.blockElements = [];
|
@@ -1412,4 +1417,4 @@ Table.style = tableCss;
|
|
1412
1417
|
|
1413
1418
|
export { Table as T, createWorker as c };
|
1414
1419
|
|
1415
|
-
//# sourceMappingURL=nano-table-
|
1420
|
+
//# sourceMappingURL=nano-table-9767860f.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"nano-table-9767860f.js","mappings":";;;;;;;;AAAO,MAAM,YAAY,GAAG,UAAU;;ACItC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AAC3C,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAClC,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI,KAAK,YAAY,CAAC,CAAC;AACzC,EAAC;AACD,MAAM,gBAAgB,GAAG,CAAC,KAAK,KAAK;AACpC,EAAE,IAAI,KAAK,IAAI,IAAI,EAAE;AACrB,EAAE;AACF,IAAI,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC;AACtC,IAAI,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC;AACtC,IAAI,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC;AACtC,IAAI,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC;AAC1C,IAAI;AACJ,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,OAA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,CAAC,QAAQ;OAClD,GACD,CACH,CACG,CACD,EACP;GACH;;;;;;;;;;;;;","names":["TableCell"],"sources":["./src/components/table/table.constants.ts","@worker-helper","./src/components/table/table.store.ts","./src/components/table/table.utils.tsx","./src/components/table/table.header.tsx","./src/components/table/table.cell.tsx","./src/components/table/table.row.tsx","./src/components/table/table.scss?tag=nano-table","./src/components/table/table.tsx"],"sourcesContent":["export const CSSNAMESPACE = 'nano-tbl';\n","\nimport { consoleError } from '@stencil/core/internal';\n\n\nconst isInstanceOf = (value, className) => {\n const C = globalThis[className];\n return C != null && value instanceof C;\n}\nconst getTransferables = (value) => {\n if (value != null) {\n if (\n isInstanceOf(value, \"ArrayBuffer\") ||\n isInstanceOf(value, \"MessagePort\") ||\n isInstanceOf(value, \"ImageBitmap\") ||\n isInstanceOf(value, \"OffscreenCanvas\")\n ) {\n return [value];\n }\n if (typeof value === \"object\") {\n if (value.constructor === Object) {\n value = Object.values(value);\n }\n if (Array.isArray(value)) {\n return value.flatMap(getTransferables);\n }\n return getTransferables(value.buffer);\n }\n }\n return [];\n};\n\nlet pendingIds = 0;\nlet callbackIds = 0;\nconst pending = new Map();\nconst callbacks = new Map();\n\nexport const createWorker = (workerPath, workerName, workerMsgId) => {\n const worker = new Worker(workerPath, {name:workerName});\n\n worker.addEventListener('message', ({data}) => {\n if (data) {\n const workerMsg = data[0];\n const id = data[1];\n const value = data[2];\n\n if (workerMsg === workerMsgId) {\n const err = data[3];\n const [resolve, reject, callbackIds] = pending.get(id);\n pending.delete(id);\n\n if (err) {\n const errObj = (err.isError)\n ? Object.assign(new Error(err.value.message), err.value)\n : err.value;\n\n consoleError(errObj);\n reject(errObj);\n } else {\n if (callbackIds) {\n callbackIds.forEach(id => callbacks.delete(id));\n }\n resolve(value);\n }\n } else if (workerMsg === workerMsgId + '.cb') {\n try {\n callbacks.get(id)(...value);\n } catch (e) {\n consoleError(e);\n }\n }\n }\n });\n\n return worker;\n};\n\nexport const createWorkerProxy = (worker, workerMsgId, exportedMethod) => (\n (...args) => new Promise((resolve, reject) => {\n let pendingId = pendingIds++;\n let i = 0;\n let argLen = args.length;\n let mainData = [resolve, reject];\n pending.set(pendingId, mainData);\n\n for (; i < argLen; i++) {\n if (typeof args[i] === 'function') {\n const callbackId = callbackIds++;\n callbacks.set(callbackId, args[i]);\n args[i] = [workerMsgId + '.cb', callbackId];\n (mainData[2] = mainData[2] || []).push(callbackId);\n }\n }\n const postMessage = (w) => (\n w.postMessage(\n [workerMsgId, pendingId, exportedMethod, args],\n getTransferables(args)\n )\n );\n if (worker.then) {\n worker.then(postMessage);\n } else {\n postMessage(worker);\n }\n })\n);\n","import { createStore, ObservableMap } from '@stencil/store';\nimport { cyrb53 } from '../../utils/math';\nimport {\n createWorkerStore,\n syncConfigToWorker,\n syncDataToWorker,\n workerFilter,\n workerSearch,\n workerSort,\n} from './table.worker';\nimport type { TableTypes } from '../../interface';\n\nexport interface TableStores {\n data: ObservableMap<{ rows: TableTypes.NanoTable['rows'] }>;\n config: ObservableMap<{ columns: TableTypes.NanoTable['columns'] }>;\n general: ObservableMap<{\n workerId: string;\n scrollParent: HTMLElement;\n host: HTMLNanoTableElement;\n isReady: boolean;\n isActive?: boolean;\n }>;\n}\n\nfunction colsToWorker(columns: TableTypes.NanoTable['columns']) {\n const safeColumns: Partial<TableTypes.ColumnConfig>[] = JSON.parse(\n JSON.stringify(columns)\n );\n columns.forEach((c) => {\n if (!!c?.sortCompareFn) {\n const safeCol = safeColumns.find((sc) => sc.prop === c.prop);\n safeCol.sortCompareFn = c.sortCompareFn.toString();\n }\n });\n return safeColumns;\n}\n\nconst stores: WeakMap<HTMLElement, TableStores> = new WeakMap();\n\nexport async function generateStore(\n host: HTMLNanoTableElement,\n columns: TableTypes.NanoTable['columns'],\n scrollParent: HTMLElement,\n isReady: boolean\n) {\n const store: TableStores = {\n data: createStore({ rows: [] }),\n config: createStore({ columns }),\n general: createStore({ workerId: null, scrollParent, host, isReady }),\n };\n\n const id = await createWorkerStore(\n store.data.state.rows,\n colsToWorker(store.config.state.columns)\n );\n store.general.state.workerId = id;\n stores.set(host, store);\n\n // sync data from our store to our worker\n\n store.data.use({\n reset: () => {\n if (store.general.state.workerId)\n syncDataToWorker(store.general.state.workerId, null);\n },\n dispose: () => {\n if (store.general.state.workerId)\n syncDataToWorker(store.general.state.workerId, null);\n },\n });\n store.config.use({\n reset: () => {\n if (store.general.state.workerId)\n syncConfigToWorker(store.general.state.workerId, null);\n },\n dispose: () => {\n if (store.general.state.workerId)\n syncConfigToWorker(store.general.state.workerId, null);\n },\n });\n return store;\n}\n\nexport function getStore(host: HTMLElement) {\n return stores.get(host);\n}\n\nfunction getDataType(value: any): TableTypes.ColumnType {\n if (value instanceof Date) {\n return 'date';\n }\n if (['number', 'string', 'boolean'].includes(typeof value)) {\n return typeof value as 'string' | 'number' | 'boolean';\n }\n return 'unknown';\n}\n\nexport function storeSetData(host: HTMLElement, rows: TableTypes.RowData[]) {\n const store = stores.get(host);\n if (!store) return;\n\n const cols = store.config.state.columns;\n const dateCols: (keyof TableTypes.RowData)[] = cols\n .filter((col) => col.type === 'date')\n .reduce((prev, curr) => {\n return [...prev, curr.prop];\n }, []);\n const unknownCols: TableTypes.RowData[] = cols.filter((col) => !col.type);\n\n // augments data with some internal props.\n // discern unknown column types\n // convert dates to numbers for worker\n rows = rows.map((row, i) => {\n // try our best to discern the column type (from first row) if unset\n if (unknownCols.length && i === 0) {\n store.config.state.columns = cols.map((col) => {\n if (unknownCols.includes(col) && row[col.prop] && !col.type) {\n col.type = getDataType(row[col.prop]);\n if (col.type === 'date') dateCols.push(col.prop);\n }\n return col;\n });\n }\n\n // convert date columns into numbers to send to our worker\n dateCols.forEach((colName) => {\n // coerce any date type;\n // Date(), timestamp, valid date string\n const coerceDate = new Date(row[colName]) ?? null;\n if (!!coerceDate && Number(coerceDate)) row[colName] = Number(coerceDate);\n });\n\n row['__index'] = i;\n row['__uuid'] = cyrb53(cols.map((c) => row[c.prop]).join());\n\n return row;\n });\n store.data.state.rows = rows;\n\n if (store.general.state.workerId)\n return syncDataToWorker(store.general.state.workerId, rows);\n}\n\nexport function storeSetConfig(\n host: HTMLElement,\n columns: TableTypes.ColumnConfig[]\n) {\n const store = stores.get(host);\n if (!store) return;\n\n store.config.state.columns = columns;\n\n if (store.general.state.workerId)\n return syncConfigToWorker(\n store.general.state.workerId,\n colsToWorker(columns)\n );\n}\n\nexport async function storeSearch(host: HTMLElement, term: string) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerSearch(\n store.general.state.workerId,\n term\n );\n } catch (e) {\n console.warn(e);\n }\n}\n\nexport async function storeFilter(\n host: HTMLElement,\n filters: TableTypes.Filter[]\n) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerFilter(\n store.general.state.workerId,\n filters\n );\n } catch (e) {\n console.warn(e);\n }\n}\n\nexport async function storeSort(\n host: HTMLNanoTableElement,\n prop: TableTypes.Prop,\n order: TableTypes.Order\n) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerSort(\n store.general.state.workerId,\n prop,\n order\n );\n } catch (e) {\n console.warn(e);\n }\n}\n","import { getRenderingRef, getElement, VNode, h, Fragment } from '@stencil/core';\nimport { getStore } from './table.store';\nimport { CSSNAMESPACE } from './table.constants';\nimport type { TableTypes } from '../../interface';\n\ntype ValidRenderTypes = 'tr' | 'th' | 'td';\n\n/**\n * Get a model object for custom cell / property renderers.\n * @param rowIndex - the current row index being rendered\n * @param colIndex - the current column index being rendered\n * @returns a model object which will be passed to custom renderers\n */\nexport function colDataModel(\n rowIndex: number,\n colIndex: number\n): TableTypes.RenderModel {\n const store = fetchStores();\n const columns = store.config.state.columns;\n const rows = store.data.state.rows;\n\n const column = columns[colIndex];\n const prop: TableTypes.ColumnProp | undefined = column?.prop;\n const rowModel = rows[rowIndex];\n const cellModel = rowModel ? rowModel[columns[colIndex].prop] : '';\n\n return {\n prop,\n cellModel,\n column,\n rowIndex,\n rowModel,\n };\n}\n\n/**\n * Get a model object for custom row renderers.\n * @param rowIndex\n * @returns a model object passed to custom row renderers\n */\nexport function rowDataModel(rowIndex: number): TableTypes.RowDataSchemaModel {\n const store = fetchStores();\n const rows = store.data.state.rows;\n const rowModel = rows[rowIndex];\n\n return {\n rowModel,\n rowIndex,\n };\n}\n\n/**\n * Merges 2 objects of properties together\n * @param current - property object\n * @param extra - additional object property\n * @returns - merged properties that can be applied to a node\n */\nexport function mergeProperties<\n T extends TableTypes.CellProps | TableTypes.CellProps\n>(current: T, extra: T) {\n if (!extra) return current;\n\n // top level merge\n const props: T = { ...extra, ...current };\n\n // deeper merge\n // merge classes maps or strings\n if (extra.class) {\n if (typeof extra.class === 'object' && typeof props.class === 'object') {\n props.class = { ...extra.class, ...props.class };\n } else if (\n typeof extra.class === 'string' &&\n typeof props.class === 'object'\n ) {\n props.class[extra.class] = true;\n } else if (typeof props.class === 'string') {\n props.class += ' ' + extra.class;\n }\n }\n // merge style\n if (extra.style) {\n props.style = { ...extra.style, ...props.style };\n }\n return props;\n}\n\n/**\n * Returns the current nano-table's stores.\n * @returns the current nano-table stores\n */\nexport function fetchStores() {\n return getStore(getElement(getRenderingRef()));\n}\n\n/**\n * Merges any defined cell properties with properties\n * required by `nano-table` functionality\n * @param rowIndex - the current row index being rendered\n * @param colIndex = the current column index being rendered\n * @param defaultProps - default properties required by `nano-table`\n * @returns - the merged properties that will be applied to a node\n */\nexport function mergeCellProperties(\n rowIndex: number,\n colIndex: number,\n defaultProps: TableTypes.CellProps\n): TableTypes.CellProps {\n const props: TableTypes.CellProps = { ...defaultProps };\n const extraPropsFunc =\n fetchStores().config.state.columns[colIndex]?.cellProperties;\n if (!extraPropsFunc) return props;\n\n const data = colDataModel(rowIndex, colIndex);\n const extra = extraPropsFunc(data);\n if (!extra) return props;\n\n return mergeProperties(props, extra);\n}\n\n/**\n * Renders a table header (within a thead) using a custom template if set.\n * @param col - the current column config object\n * @returns - a JSX node\n */\nexport function colheadFootRender(col: TableTypes.ColumnConfig): VNode {\n const tpl = col?.columnTemplate;\n return tpl ? (\n tpl(h as unknown as TableTypes.HFunc<VNode>, col)\n ) : (\n <Fragment>{col.title}</Fragment>\n );\n}\n\nconst stickyHIOs: WeakMap<HTMLTableCellElement, IntersectionObserver> =\n new WeakMap();\nconst stickyVIOs: WeakMap<HTMLTableCellElement, IntersectionObserver> =\n new WeakMap();\n\n/**\n * Adds element to Intersection Observer. Fires when element changes on the x axis\n * @param el - an element to observe\n * @param pos - the edge to watch (start or end)\n * @param cb - callback when an intersection state changes.\n */\nexport function addHObserver(\n el: HTMLTableCellElement,\n pos: TableTypes.Position,\n cb: TableTypes.PinnedCb\n) {\n if (stickyHIOs.get(el)) return;\n\n const store = fetchStores();\n const root = store.general.state.scrollParent;\n\n const observer = new IntersectionObserver(\n ([e]) => {\n const rootBounds =\n e.rootBounds || document.scrollingElement.getBoundingClientRect();\n const positions: { [key in TableTypes.Position]?: boolean } = {};\n if (pos === 'start') {\n positions.start =\n e.boundingClientRect.x - (rootBounds.x + root.scrollLeft) < 0 &&\n !e.isIntersecting;\n }\n if (pos === 'end') {\n // TODO - sort these out for RtL\n positions.end =\n e.boundingClientRect.right > e.boundingClientRect.width &&\n !e.isIntersecting;\n }\n if (!!cb) cb(positions);\n },\n {\n threshold: [1],\n rootMargin: '1px 0px 100px 0px',\n root: root === document.scrollingElement ? null : root,\n }\n );\n stickyHIOs.set(el, observer);\n\n if (store.general.state.isReady) {\n observer.observe(el);\n } else {\n store.general.state.host.addEventListener(\n 'nanoTblReady',\n () => {\n observer.observe(el);\n },\n { once: true }\n );\n }\n}\n\n/**\n * Adds element to Intersection Observer. Fires when element changes on the y axis\n * @param el - an element to observe\n * @param pos - the edge to watch (start or end)\n * @param cb - callback when an intersection state changes.\n */\nexport function addVObserver(\n el: HTMLTableCellElement,\n pos: TableTypes.Position,\n cb: TableTypes.PinnedCb\n) {\n if (stickyVIOs.get(el)) return;\n\n const store = fetchStores();\n const root = store.general.state.scrollParent;\n\n const observer = new IntersectionObserver(\n ([e]) => {\n const rootBounds =\n e.rootBounds || document.scrollingElement.getBoundingClientRect();\n const positions: { [key in TableTypes.Position]?: boolean } = {};\n if (pos === 'top') {\n positions.top =\n e.boundingClientRect.y - (rootBounds.y + root.scrollTop) < 0 &&\n !e.isIntersecting;\n }\n if (pos === 'bottom') {\n const boundingClientRect = e.target.getBoundingClientRect();\n positions.bottom =\n boundingClientRect.height + boundingClientRect.y >\n rootBounds.height && !e.isIntersecting;\n }\n if (!!cb) cb(positions);\n },\n {\n threshold: [1],\n rootMargin: '0px 100px 0px 100px',\n root: root === document.scrollingElement ? null : root,\n }\n );\n stickyVIOs.set(el, observer);\n\n if (store.general.state.isReady) {\n observer.observe(el);\n } else {\n store.general.state.host.addEventListener(\n 'nanoTblReady',\n () => {\n observer.observe(el);\n },\n { once: true }\n );\n }\n}\n\n/**\n * Renders a class string or map for pinned classes on the v axis.\n * @param type - element tagName\n * @param vPinned - whether element is currently pinned vertically to top or bottom\n * @param toString - render as a string (defaults to class map)\n * @returns a class string or class map\n */\nexport function headerPinClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString?: false\n): { [key: string]: boolean };\nexport function headerPinClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString?: true\n): string;\nexport function headerPinClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString = false\n): { [key: string]: boolean } | string {\n const classes = {\n [`${CSSNAMESPACE}__${type}`]: true,\n [`${CSSNAMESPACE}__pin`]: !!vPinned,\n [`${CSSNAMESPACE}__pin--top`]: vPinned === 'top',\n [`${CSSNAMESPACE}__pin--bottom`]: vPinned === 'bottom',\n };\n\n if (toString) return classListToStr(classes);\n return classes;\n}\n\n/**\n * Turns a class map {'string': boolean} to class string\n * @param classes - the class map to convert\n * @returns a class string\n */\nexport function classListToStr(classes: { [key: string]: boolean }): string {\n let classString = '';\n Object.entries(classes).forEach(([className, on]) => {\n if (on) classString += className + ' ';\n });\n return classString;\n}\n\n/**\n * Detects the current scroll speed as a number.\n * Use within a scroll listener\n */\nexport const detectScrollSpeed = (() => {\n let lastPos: number;\n let newPos: number;\n let timer: number;\n let delta: number;\n const delay = 60; // in \"ms\" (higher means lower fidelity )\n\n const clear = () => {\n lastPos = null;\n delta = 0;\n };\n clear();\n\n return () => {\n newPos = window.scrollY;\n if (lastPos != null) delta = newPos - lastPos;\n lastPos = newPos;\n window.clearTimeout(timer);\n timer = window.setTimeout(clear, delay);\n return delta;\n };\n})();\n\n/**\n * Attempts to find the closes scrolling parental element\n * @param element - the element from which to traverse up the DOM\n * @returns - the closest scrolling parental element\n */\nexport function findScrollParent(element: HTMLElement) {\n let style = getComputedStyle(element);\n const excludeStaticParent = style.position === 'absolute';\n const overflowRegex = /(auto|scroll)/;\n\n if (style.position === 'fixed') return document.documentElement;\n for (let parent = element; (parent = parent.parentElement); ) {\n style = getComputedStyle(parent);\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX))\n return parent;\n }\n return document.documentElement;\n}\n\n/**\n * Checks whether an element is currently viewable within the viewport\n * @param el - element to check\n * @param percentVisible - the percentage of the element that should be within the viewport\n * @returns true if the element's area percentage is visible\n */\nexport function isInViewport(el: Element, percentVisible = 100) {\n const r = el.getBoundingClientRect();\n const windowHeight =\n window.innerHeight || document.documentElement.clientHeight;\n\n if (\n !r.bottom &&\n !r.top &&\n !r.left &&\n !r.right &&\n !r.height &&\n !r.width &&\n !r.x &&\n !r.y\n )\n return false;\n\n return !(\n Math.floor(100 - ((r.top >= 0 ? 0 : r.top) / +-r.height) * 100) <\n percentVisible ||\n Math.floor(100 - ((r.bottom - windowHeight) / r.height) * 100) <\n percentVisible\n );\n}\n\n/**\n * Immutable array re-order\n * @param from - the index to move from\n * @param to - the index to move to\n * @param arr - the array to re-order\n * @returns - a new, re-orderd array\n */\nexport function arrMove(from: number, to: number, arr: any[]) {\n const newArr = [...arr];\n const item = newArr.splice(from, 1)[0];\n newArr.splice(to, 0, item);\n return newArr;\n}\n","import { Fragment, FunctionalComponent, h } from '@stencil/core';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n addHObserver,\n addVObserver,\n colheadFootRender,\n headerPinClasses,\n mergeProperties,\n} from './table.utils';\nimport type { TableTypes } from '../../interface';\n\n// TABLE HEADERS\n// (thead > tr > th, tfoot > tr > th)\n\ntype TableColHeadProps = {\n column: TableTypes.ColumnConfig;\n headRenderer: TableTypes.HeadFootRenderer;\n onColumnSortClick?: (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n el: HTMLTableCellElement\n ) => void;\n onColumnPinned?: TableTypes.PinnedCb;\n defaults: { sortable?: boolean };\n};\n\nexport const TableColHead: FunctionalComponent<TableColHeadProps> = ({\n column,\n headRenderer,\n onColumnSortClick,\n onColumnPinned,\n defaults,\n}) => {\n // Sort handling\n\n function handleColumnSortClick(e: MouseEvent & { target: HTMLElement }) {\n let order;\n switch (column.order) {\n case 'asc':\n order = 'desc';\n break;\n case 'desc':\n order = null;\n break;\n default:\n order = 'asc';\n }\n onColumnSortClick(order, column.prop, e.target.closest('th'));\n }\n\n function isSortable() {\n return (\n (!!defaults.sortable && column.sortable !== false) ||\n (!defaults.sortable && column.sortable === true)\n );\n }\n\n let extraProps = {};\n if (column.columnProperties) {\n extraProps = column.columnProperties(column) || extraProps;\n }\n\n const baseProps = {\n class: {\n ...headerPinClasses('th', headRenderer?.pinned),\n [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start',\n [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end',\n [`${CSSNAMESPACE}__ordered`]: !!column.order,\n [`${CSSNAMESPACE}__filtered`]:\n column.filter !== undefined && column.filter !== null,\n },\n };\n let props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n const content = colheadFootRender(column);\n\n if (!content) return <Fragment></Fragment>;\n\n props =\n Number((props as TableTypes.CellProps).colSpan) > 1\n ? { ...props, scope: 'colgroup' }\n : { ...props, scope: 'col' };\n\n if (isSortable()) {\n const sort = column.order\n ? column.order === 'asc'\n ? 'ascending'\n : 'descending'\n : 'none';\n\n props = { ...props, 'aria-sort': sort };\n }\n\n return (\n <th\n {...props}\n ref={(th) => {\n if (['end', 'start'].includes(column.pinned))\n addHObserver(th, column.pinned, onColumnPinned);\n if (['top', 'bottom'].includes(headRenderer.pinned))\n addVObserver(th, headRenderer.pinned, onColumnPinned);\n }}\n key={column.prop}\n >\n {isSortable() ? (\n <button\n class={{\n [`${CSSNAMESPACE}__order-btn`]: true,\n [`${CSSNAMESPACE}__cell-content`]: true,\n }}\n onClick={handleColumnSortClick}\n >\n {colheadFootRender(column)}\n {column.filter !== undefined && column.filter !== null && (\n <nano-icon name=\"light/filter\" />\n )}\n {!!column.order &&\n (column.order === 'desc' ? (\n <nano-icon name=\"solid/long-arrow-down\" />\n ) : (\n <nano-icon name=\"solid/long-arrow-up\" />\n ))}\n <div class={`${CSSNAMESPACE}__status-icons`}>\n <nano-icon name=\"light/chevron-down\" />\n </div>\n </button>\n ) : (\n <div class={`${CSSNAMESPACE}__cell-content`}>\n {colheadFootRender(column)}\n {column.filter !== undefined && column.filter !== null && (\n <nano-icon name=\"light/bars-filter\" />\n )}\n </div>\n )}\n </th>\n );\n};\n","import { Fragment, FunctionalComponent, h, VNode } from '@stencil/core';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n classListToStr,\n colDataModel,\n fetchStores,\n mergeCellProperties,\n} from './table.utils';\nimport type { NanoResizeObserveCustomEvent, TableTypes } from '../../interface';\n\n// TABLE CELL\n// (tbody > tr > td, tbody > tr > th)\n\n/**\n * Renders a cell using a custom renderer if set.\n * @param rowIndex - the current row index being rendered\n * @param colIndex - the current column index being rendered\n * @returns - a JSX node\n */\nexport function cellRender(rowIndex: number, colIndex: number): VNode {\n const store = fetchStores();\n const columns = store.config.state.columns;\n const tpl = columns[colIndex]?.cellTemplate;\n const model = colDataModel(rowIndex, colIndex);\n\n if (!!model.cellModel && columns[colIndex].type === 'date') {\n const d = new Date(model.cellModel);\n if (d instanceof Date && !isNaN(d as any)) {\n model.cellModel = !tpl\n ? `${new Date(model.cellModel).toLocaleDateString()} ${new Date(\n model.cellModel\n ).toLocaleTimeString()}`\n : d;\n }\n }\n\n return tpl ? (\n tpl(h as unknown as TableTypes.HFunc<VNode>, model)\n ) : model.cellModel !== undefined && model.cellModel !== null ? (\n <Fragment>{model.cellModel?.toString()}</Fragment>\n ) : (\n ''\n );\n}\n\nexport const baseCellClasses = (\n colIndex: number,\n toString: boolean = false\n) => {\n const store = fetchStores();\n const column = store.config.state.columns[colIndex];\n\n const classes = {\n [`${CSSNAMESPACE}__td`]: true,\n [`${CSSNAMESPACE}__ordered`]: !!column.order,\n [`${CSSNAMESPACE}__pin`]: !!column.pinned,\n [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start',\n [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end',\n };\n\n if (toString) return classListToStr(classes);\n return classes;\n};\n\ntype TableCellProps = {\n rowIndex: number;\n colIndex: number;\n nestedContent?: () => VNode;\n};\n\nexport const TableCell: FunctionalComponent<TableCellProps> = ({\n rowIndex,\n colIndex,\n nestedContent,\n}) => {\n const Content = () =>\n nestedContent\n ? nestedContent()\n : cellRender(rowIndex, colIndex) || (\n <span class=\"placeholder\"> </span>\n );\n\n let CellType = 'td';\n const store = fetchStores();\n const column = store.config.state.columns[colIndex];\n let props = mergeCellProperties(rowIndex, colIndex, {\n class: baseCellClasses(colIndex),\n });\n\n if (column.rowHeader) {\n props =\n Number((props as TableTypes.CellProps).rowSpan) > 1\n ? { ...props, scope: 'rowgroup' }\n : { ...props, scope: 'row' };\n CellType = 'th';\n }\n\n const ContentWrap = (props) => (\n <div\n {...props}\n class={{\n [`${CSSNAMESPACE}__cell-content`]: true,\n [`${CSSNAMESPACE}__cell-content--wrap`]: !!column.wrap,\n }}\n >\n <Content />\n </div>\n );\n\n return (\n <CellType\n // role=\"gridcell\"\n {...props}\n >\n {column.autoTooltip && !column.wrap ? (\n <nano-resize-observe\n notifyContentFit=\"x\"\n onNanoResizeContentFitChange={(\n e: NanoResizeObserveCustomEvent<{ x: boolean }>\n ) =>\n ((e.target.firstElementChild as HTMLNanoTooltipElement).disabled =\n e.detail.x)\n }\n >\n <nano-tooltip\n disabled\n placement=\"top\"\n onNanoShow={(e) =>\n ((e.target.closest(CellType) as HTMLElement).style.zIndex = '100')\n }\n onNanoHide={(e) =>\n ((e.target.closest(CellType) as HTMLElement).style.zIndex = '')\n }\n >\n <ContentWrap />\n <span slot=\"content\">\n <Content />\n </span>\n </nano-tooltip>\n </nano-resize-observe>\n ) : (\n <ContentWrap />\n )}\n </CellType>\n );\n};\n","import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport {\n addHObserver,\n addVObserver,\n headerPinClasses,\n mergeProperties,\n rowDataModel,\n} from './table.utils';\nimport { baseCellClasses } from './table.cell';\nimport { CSSNAMESPACE } from './table.constants';\nimport type { TableTypes } from '../../interface';\n\n// TABLE ROWS\n// (thead > tr, tfoot > tr, tr)\n\ntype TableRowCellHelperProps = { header: boolean; wrap: boolean };\n\ntype TableRowProps = {\n rowRenderer: TableTypes.RowRenderer;\n rowIndex: number;\n rowModel: TableTypes.RowData;\n onColumnPinned?: TableTypes.PinnedCb;\n};\n\nconst TableCell: FunctionalComponent<TableRowCellHelperProps> = (\n { header, wrap },\n children\n): VNode => {\n const cell = (\n <div\n class={{\n [`${CSSNAMESPACE}__cell-content`]: true,\n [`${CSSNAMESPACE}__cell-content--wrap`]: wrap,\n }}\n >\n {children}\n </div>\n );\n return header ? <th scope=\"row\">{cell}</th> : <td>{cell}</td>;\n};\n\nexport const TableRow: FunctionalComponent<TableRowProps> = (\n { rowRenderer, rowIndex, rowModel, onColumnPinned },\n children,\n utils\n) => {\n let extraProps = {};\n\n if (!rowModel) {\n const model = rowDataModel(rowIndex);\n rowModel = model.rowModel;\n }\n\n if (rowRenderer?.rowProperties) {\n extraProps =\n rowRenderer.rowProperties({ rowModel, rowIndex }) || extraProps;\n }\n\n let pinned: TableTypes.Position;\n if (rowRenderer?.pinned && typeof rowRenderer.pinned === 'function') {\n pinned = rowRenderer.pinned();\n }\n\n const baseProps = { class: headerPinClasses('tr', pinned) };\n const props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n const tpl = rowRenderer?.template;\n\n if (tpl) {\n let toRender = tpl(\n h as TableTypes.HFunc<VNode>,\n {\n renderedRow: (\n <tr {...props} key={rowModel.__uuid}>\n {children}\n </tr>\n ),\n rowModel,\n rowIndex,\n },\n TableCell\n );\n\n if (Array.isArray(toRender)) {\n toRender = utils.map(toRender, (node, i) => {\n if (node.vtag === 'tr') {\n if (!node.vkey) node.vkey = `${rowModel.__uuid}_${i}`;\n\n node.vattrs = mergeProperties(\n { class: headerPinClasses('tr', pinned, true) },\n node.vattrs\n );\n\n if (!!node.vchildren) {\n node.vchildren = utils.map(node.vchildren, (cNode, i) => {\n if (['td', 'th'].includes(cNode.vtag.toString())) {\n cNode.vattrs = mergeProperties(\n {\n class:\n headerPinClasses(\n cNode.vtag.toString() as 'th' | 'td',\n pinned,\n true\n ) + baseCellClasses(i, true),\n ref: (th: HTMLTableCellElement) => {\n if ((!!th && pinned === 'top') || pinned === 'bottom')\n addVObserver(th, pinned, onColumnPinned);\n if (!!th && th.classList.contains('nano-tbl__pin--end'))\n addHObserver(th, 'end', onColumnPinned);\n if (!!th && th.classList.contains('nano-tbl__pin--start'))\n addHObserver(th, 'start', onColumnPinned);\n },\n },\n cNode.vattrs\n );\n }\n return cNode;\n });\n }\n }\n return node;\n });\n }\n return toRender;\n }\n\n return (\n <tr {...props} key={rowModel.__uuid}>\n {children}\n </tr>\n );\n};\n\ntype TableHeadFootProps = {\n rowRenderer: TableTypes.HeadFootRenderer;\n onColumnPinned?: TableTypes.PinnedCb;\n};\n\nexport const TableHeadFootRow: FunctionalComponent<TableHeadFootProps> = (\n { rowRenderer, onColumnPinned },\n children,\n utils\n) => {\n let extraProps = {};\n if (rowRenderer.rowProperties) {\n extraProps = rowRenderer.rowProperties() || {};\n }\n\n const TableCell: FunctionalComponent<TableRowCellHelperProps> = (\n { header, wrap },\n children\n ): VNode => {\n const cell = (\n <div\n class={{\n [`${CSSNAMESPACE}__cell-content`]: true,\n [`${CSSNAMESPACE}__cell-content--wrap`]: wrap,\n }}\n >\n {children}\n </div>\n );\n return header !== false ? <th scope=\"col\">{cell}</th> : <td>{cell}</td>;\n };\n\n const pinned = rowRenderer.pinned || null;\n const baseProps = { class: headerPinClasses('tr', null) };\n const props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n const tpl = rowRenderer?.template;\n\n if (tpl) {\n let toRender = tpl(\n h as TableTypes.HFunc<VNode>,\n {\n renderedRow: <tr {...props}>{children}</tr>,\n },\n TableCell\n );\n\n if (Array.isArray(toRender)) {\n toRender = utils.map(toRender, (node) => {\n if (node.vtag === 'tr') {\n node.vattrs = mergeProperties(\n { class: headerPinClasses('tr', pinned, true) },\n node.vattrs\n );\n\n if (!!node.vchildren) {\n node.vchildren = utils.map(node.vchildren, (cNode) => {\n if (['td', 'th'].includes(cNode.vtag.toString())) {\n cNode.vattrs = mergeProperties(\n {\n class: headerPinClasses(\n cNode.vtag.toString() as 'th' | 'td',\n pinned,\n true\n ),\n ref: (th) => {\n if ((!!th && pinned === 'top') || pinned === 'bottom')\n addVObserver(th, pinned, onColumnPinned);\n if (!!th && th.classList.contains('nano-tbl__pin--end'))\n addHObserver(th, 'end', onColumnPinned);\n if (!!th && th.classList.contains('nano-tbl__pin--start'))\n addHObserver(th, 'start', onColumnPinned);\n },\n },\n cNode.vattrs\n );\n }\n return cNode;\n });\n }\n }\n return node;\n });\n }\n return toRender;\n }\n\n return <tr {...props}>{children}</tr>;\n};\n","@use '../../global/style/utilities/globals' as t;\n@use '../../global/style/nano-theme/form' as f;\n\nnano-table {\n /**\n * @prop --max-col-width: Default 200px;\n\n * @prop --color: Deafults to var(--nano-color-mediumgrey, #68767e);\n * @prop --font-size: Deafults to 0.87rem;\n * @prop --cell-line-height: Deafults to 1.5;\n\n * @prop --border-color: Deafults to var(--nano-color-palegrey, #b5aea7);\n * @prop --border-style: Deafults to thin solid var(--border-color);\n * @prop --border-tint-color: Deafults to var(--nano-color-blue, #90c6e7);\n * @prop --border-tint-style: Deafults to 2px solid var(--border-tint-color);\n\n * @prop --cell-bg-rgb: Deafults to var(--nano-color-white-rgb, 255 255 255);\n * @prop --head-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --foot-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --th-row-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --ordered-bg-rgb: Deafults to var(--nano-color-offwhite-rgb, 249 249 251);\n\n * @prop --td-padding-start: Deafults to 0.625rem;\n * @prop --td-padding-end: Deafults to 0.625rem;\n * @prop --td-padding-top: Deafults to 0.5rem;\n * @prop --td-padding-bottom: Deafults to 0.4125rem;\n\n * @prop --th-padding-start: Deafults to 0.625rem;\n * @prop --th-padding-end: Deafults to 0.625rem;\n * @prop --th-padding-top: Deafults to 0.875rem;\n * @prop --th-padding-bottom: Deafults to 0.6875rem;\n\n * @prop --td-padding-v: Deafults to var(--td-padding-top) var(--td-padding-bottom);\n * @prop --td-padding-h: Deafults to var(--td-padding-start) var(--td-padding-end);\n\n * @prop --th-padding-v: Deafults to var(--th-padding-top) var(--th-padding-bottom);\n * @prop --th-padding-h: Deafults to var(--th-padding-start) var(--th-padding-end);\n\n * @prop --foot-th-padding-v: Deafults to var(--td-padding-top) var(--td-padding-bottom);\n * @prop --foot-th-padding-h: Deafults to var(--td-padding-start) var(--td-padding-end);\n\n * @prop --head-th-padding-v: Deafults to var(--th-padding-top) var(--th-padding-bottom);\n * @prop --head-th-padding-h: Deafults to var(--th-padding-start) var(--th-padding-end);\n\n * @prop --bookend-col-padding: Deafults to 2rem;\n */\n\n display: block;\n width: 100%;\n\n // general\n --max-col-width: clamp(200px, 500px, 50vw);\n\n // text\n --color: var(--nano-color-mediumgrey, #68767e);\n --font-size: 0.87rem;\n --cell-line-height: 1.5;\n --thead-font-size: 0.95rem;\n --thead-color: #455560;\n --tfoot-color: #455560;\n\n // borders\n --border-color: #dddbda;\n --border-style: thin solid var(--border-color);\n --border-tint-color: #0084a9;\n --border-tint-style: 3px solid var(--border-tint-color);\n\n // backgrounds\n --cell-bg-rgb: var(--nano-color-white-rgb, 255 255 255);\n --head-bg-rgb: 250 250 249;\n --foot-bg-rgb: var(--head-bg-rgb);\n --th-row-bg-rgb: var(--cell-bg-rgb);\n --ordered-bg-rgb: var(--nano-color-offwhite-rgb, 249 249 251);\n\n // spacing\n --td-padding-start: 0.625rem;\n --td-padding-end: 0.625rem;\n --td-padding-top: 0.5rem;\n --td-padding-bottom: 0.4125rem;\n --th-padding-start: 0.625rem;\n --th-padding-end: 0.625rem;\n --th-padding-top: 0.875rem;\n --th-padding-bottom: 0.6875rem;\n --td-padding-v: var(--td-padding-top) var(--td-padding-bottom);\n --td-padding-h: var(--td-padding-start) var(--td-padding-end);\n --th-padding-v: var(--th-padding-top) var(--th-padding-bottom);\n --th-padding-h: var(--th-padding-start) var(--th-padding-end);\n --foot-th-padding-v: var(--td-padding-top) var(--td-padding-bottom);\n --foot-th-padding-h: var(--td-padding-start) var(--td-padding-end);\n --head-th-padding-v: var(--th-padding-top) var(--th-padding-bottom);\n --head-th-padding-h: var(--th-padding-start) var(--th-padding-end);\n --bookend-col-padding: 2rem;\n}\n\n.nano-tbl {\n $base: &;\n\n color: var(--color);\n text-align: start;\n width: 100%;\n font-size: var(--font-size);\n border-spacing: 0 0;\n border-collapse: separate;\n background: rgb(var(--cell-bg-rgb));\n border-inline-end: 1px solid transparent;\n border-block-start: 1px solid transparent;\n position: relative;\n z-index: 1;\n\n &__wrap {\n display: table;\n min-width: 100%;\n // container-type: inline-size;\n }\n\n &__top-anchor {\n @include t.visually-hide;\n\n position: relative;\n }\n\n &__ordered {\n background-color: var(--ordered-bg);\n border-inline-start: var(--border-style);\n border-inline-end: var(--border-style);\n }\n\n &__order-btn {\n padding: 0;\n border: none;\n outline: none;\n font: inherit;\n background: none;\n appearance: none;\n color: inherit;\n display: flex;\n gap: 10px;\n align-items: center;\n width: 100%;\n\n &:focus-visible {\n outline: none;\n box-shadow: #{f.$control-focus-style} inset;\n }\n }\n\n &__status-icons {\n margin-inline: auto 10px;\n display: flex;\n gap: 10px;\n }\n\n &__progress-bar {\n font-size: 0.2rem;\n position: sticky;\n inset-block-start: 0;\n inset-inline: 0;\n z-index: 10;\n transition: scale 0.25s;\n transform: scale(0);\n width: 100%;\n height: 0;\n\n &--show {\n transform: scale(1);\n height: auto;\n }\n }\n\n &__caption {\n &--hide {\n @include t.visually-hide;\n }\n }\n\n // Shared styles in th, td across thead / tbody / tfoot\n\n &__td,\n &__th {\n line-height: var(--cell-line-height);\n text-align: start;\n border-block-start: var(--border-style);\n max-width: var(--max-col-width);\n background-color: rgb(var(--cell-bg-rgb));\n\n // @container (min-width: 700px) {\n // color: red !important;\n // }\n\n tbody:first-of-type tr:first-child & {\n border-block-start: none;\n }\n\n tbody:last-of-type tr:last-child & {\n border-block-end: var(--border-style);\n }\n\n // 'bookend' (larger) padding on larger screens\n .md & {\n &:first-child #{$base}__cell-content {\n padding-inline-start: var(--bookend-col-padding);\n }\n\n &:last-child #{$base}__cell-content {\n padding-inline-end: var(--bookend-col-padding);\n }\n }\n\n // force override of bookend on small screens css media\n // queries are faster than the breakpoints from `nano-resize-observer`\n @include t.media-breakpoint-down('md') {\n &:first-child #{$base}__cell-content {\n padding-inline-start: var(--td-padding-start) !important;\n }\n\n &:last-child #{$base}__cell-content {\n padding-inline-end: var(--td-padding-end) !important;\n }\n }\n\n thead & {\n color: var(--thead-color);\n font-weight: 800;\n background: rgb(var(--head-bg-rgb) / 90%);\n font-size: var(--thead-font-size);\n border-block-start: none !important;\n\n #{$base}__cell-content {\n padding-block: var(--head-th-padding-v);\n padding-inline: var(--head-th-padding-h);\n }\n\n .nano-sortable__keyboard-handle {\n position: absolute;\n inset-inline-end: 5px;\n inset-block-start: 50%;\n transform: translateY(-50%);\n background: white;\n z-index: 10;\n }\n }\n\n tfoot & {\n color: var(--tfoot-color);\n font-weight: 800;\n border-block-start: none;\n background: rgb(var(--foot-bg-rgb) / 90%);\n font-size: var(--thead-font-size);\n\n #{$base}__cell-content {\n padding-block: var(--foot-th-padding-v);\n padding-inline: var(--foot-th-padding-h);\n }\n }\n\n &.nano-tbl__ordered {\n background-color: rgb(var(--ordered-bg-rgb) / 80%) !important;\n }\n }\n\n &__cell-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-block: var(--td-padding-v);\n padding-inline: var(--td-padding-h);\n\n &--no-result {\n padding-block: 2rem;\n }\n\n &--wrap {\n white-space: normal;\n overflow: visible;\n }\n }\n\n tbody {\n will-change: scroll-position;\n opacity: 1;\n transition: 0.1s ease opacity;\n transform: translateZ(0);\n\n &#{$base}__inactive {\n opacity: 0;\n }\n #{$base}__tr:has(~ #{$base}__tr--placeholder) {\n display: none;\n }\n #{$base}__tr--placeholder ~ #{$base}__tr {\n display: none;\n }\n }\n\n // tbody th\n\n th[scope='row'] {\n font-weight: 800;\n margin: 0;\n }\n\n // .sm & th[scope='row'] {\n // max-width: 65vw !important;\n // }\n\n // pinned styles\n\n &__pin {\n position: sticky;\n transform: translateZ(0);\n\n &--start {\n inset-inline: -1px auto;\n transition: max-width 0.25s ease;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n box-shadow: 5px 1px 4px 0 rgb(0 0 0 / 20%);\n opacity: 0;\n z-index: -1;\n }\n\n #{$base}__pinned--start & {\n z-index: 2;\n max-width: 125px !important;\n\n .sm & {\n max-width: var(--max-col-width) !important;\n }\n\n &::after {\n opacity: 1;\n }\n }\n }\n\n &--end {\n /*\n I cannot think of a nice way to make stuck-end columns play nice on small screens :(\n Changing the width when stuck (as we do for stuck-start columns) causes the whole positioning to change.\n This fires the IO, thus un-sticks the column, thus causes the IO to fire which sticks the column ad-infinitum\n */\n #{$base}__pin--start + & {\n inset-inline: auto auto;\n\n &::after {\n display: none;\n }\n }\n\n .sm & {\n inset-inline: auto -1px !important;\n max-width: min(50vw, 200px);\n\n &::after {\n display: block !important;\n content: '';\n position: absolute;\n inset: 0;\n box-shadow: -5px 1px 4px 0 rgb(0 0 0 / 20%);\n opacity: 0;\n z-index: -1;\n }\n }\n\n #{$base}__pinned--end & {\n .sm & {\n &::after {\n opacity: 1;\n }\n }\n }\n }\n\n &--top {\n inset-block: -1px auto;\n\n #{$base}__pinned--top & {\n z-index: 4 !important;\n }\n }\n\n &--bottom {\n inset-block: auto -1px;\n\n #{$base}__pinned--bottom & {\n z-index: 5 !important;\n }\n }\n\n &--top#{&}--start {\n #{$base}__pinned--start & {\n z-index: 5 !important;\n }\n\n #{$base}__pinned--top#{$base}__pinned--start & {\n z-index: 6 !important;\n }\n }\n\n &--top#{&}--end {\n #{$base}__pinned--end & {\n z-index: 5 !important;\n }\n\n #{$base}__pinned--top#{$base}__pinned--end & {\n z-index: 6 !important;\n }\n }\n\n &--bottom#{&}--start {\n #{$base}__pinned--start & {\n z-index: 5 !important;\n }\n\n #{$base}__pinned--bottom#{$base}__pinned--start & {\n z-index: 6 !important;\n }\n }\n\n &--bottom#{&}--end {\n #{$base}__pinned--end & {\n z-index: 5 !important;\n }\n\n #{$base}__pinned--bottom#{$base}__pinned--end & {\n z-index: 6 !important;\n }\n }\n }\n\n thead tr:last-of-type {\n td,\n th {\n border-block-end: var(--border-tint-style);\n }\n }\n\n tfoot tr:first-of-type {\n td,\n th {\n border-block-start: none;\n }\n }\n\n tfoot tr:last-of-type {\n td,\n th {\n border-block-end: var(--border-tint-style);\n }\n }\n\n tfoot tr.nano-tbl__pin--bottom {\n &:first-of-type {\n .nano-tbl__pinned--bottom & {\n td,\n th {\n border-block-start: var(--border-tint-style) !important;\n }\n }\n }\n\n &:last-of-type {\n .nano-tbl__pinned--bottom & {\n td,\n th {\n border-block-end: none !important;\n }\n }\n }\n }\n\n .unlimited-width {\n max-width: none;\n }\n\n &__spinner {\n font-size: 1.5rem;\n transition: scale 0.25s;\n scale: 0;\n padding: 0.5rem;\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: calc(50% - 0.75rem);\n z-index: 0;\n\n &--show {\n scale: 1;\n position: sticky;\n }\n }\n\n nano-skeleton {\n line-height: var(--cell-line-height);\n }\n}\n","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} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n NanoResizeObserveCustomEvent,\n ResizeStateChangeEventDetail,\n TableTypes,\n} from '../../interface';\nimport { TableColHead } from './table.header';\nimport { TableRow, TableHeadFootRow } from './table.row';\nimport { TableCell } from './table.cell';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n generateStore,\n storeSearch,\n storeSetConfig,\n storeSetData,\n storeSort,\n storeFilter,\n TableStores,\n} from './table.store';\nimport { findScrollParent, isInViewport } from './table.utils';\n\nconst measurePerf = false;\n\nfunction perMark(name: string, end: boolean = false) {\n if (!Build.isDev || Build.isTesting || !performance || !measurePerf) return;\n if (end) {\n performance?.mark('end' + name);\n performance?.measure(name, 'start' + name, 'end' + name);\n const entries = performance?.getEntriesByName(name);\n console.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 *\n *- Built-in search\n *- Built-in column filter\n *- Built-in column sort\n *- Easily swap in API / async based search / filter & sort\n *- Pin headers, footers, rows, columns\n *- Add custom rendering at every level\n *- Add custom properties at every level\n *\n * @slot caption - The table's caption. You must either use this or the `caption` attribute.\n * @slot no-results - text to display when search or filtering yields no results\n */\n@Component({\n tag: 'nano-table',\n styleUrl: 'table.scss',\n})\nexport class Table implements ComponentInterface {\n constructor() {\n this.debounceSetLoading = debounce(this.debounceSetLoading.bind(this), 50);\n }\n // Public API\n\n // Props\n\n @Prop() jsxRenderer: TableTypes.HFunc<any>;\n\n /** The type of table. Grid type will make cells navigable by keyboard */\n @Prop() type: 'grid' | 'table' = 'table';\n\n /** A descriptive title of the table.\n * You must use this or the `slot=\"caption\"` for accessibility */\n @Prop() caption: string;\n\n /** Show the caption on-screen */\n @Prop() showCaption: boolean = false;\n\n /** Will show a loading state when set to true.\n * By default, will be shown automatically if `rows` is a promise waiting to resolve\n * or when performing custom filtering or sorting.\n * *Note* when set manually, will overwrite any internal loading state.\n * Set to 'undefined' to revert to default behaviour. */\n @Prop() loading: boolean = undefined;\n\n get _loading() {\n return this.loading !== undefined ? this.loading : this.internalLoading;\n }\n set _loading(l: boolean) {\n if (this.loading !== undefined) return;\n this.debounceSetLoading(l);\n }\n private debounceSetLoading(l: boolean) {\n this.internalLoading = l;\n }\n @State() internalLoading = false;\n\n /** When loading rows asynchronously, this will render this number of placeholder rows */\n @Prop() placeholderSize = 5;\n\n /** The data to place in the table */\n @Prop({ mutable: true }) rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) {\n this._loading = true;\n return;\n }\n\n this._loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n // reset everything\n this.currentFilters = '';\n this.currentSort = '';\n await this.columnInit();\n\n if (!this.isReady)\n requestAnimationFrame(() => this.setInitialBlockDimension());\n this._loading = false;\n });\n }\n\n /** The column config used to present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable<any>['columns'] = [];\n\n @Watch('columns')\n async handleColsChange() {\n await storeSetConfig(this.host, this.columns);\n if (this.isReady) this.columnInit();\n }\n\n /** Used for custom thead row rendering */\n @Prop() headRender: TableTypes.HeadFootRenderer = { pinned: 'top' };\n\n /** Used for custom row rendering */\n @Prop() rowRender: TableTypes.RowRenderer;\n\n /** Used for custom tfoot row rendering */\n @Prop() footRender: TableTypes.HeadFootRenderer = { pinned: 'bottom' };\n\n /** Whether to show a `<tfoot>` component */\n @Prop() showFooter = false;\n\n /** To improve performance, data is split into blocks\n * which are shown / hidden and rendered as they become visible.\n * Use this to control the number of hits within a block -\n * A block should fill a scrolling viewport.\n * The less perBlock the better for performance */\n @Prop() perBlock = 40;\n\n /** The number of total blocks currently rendered in the table. @readonly */\n @Prop()\n get blocksLength() {\n return this.blocks.length;\n }\n\n /** Term to search for in the data */\n @Prop() searchTerm: string;\n\n /** A custom filtering function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsey, the sort will be performed by the component.\n * A good use-case would be performing the filter on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customFilterFn?: (\n filters: TableTypes.Filter[]\n ) => Promise<true | TableTypes.Falsy>;\n\n /** A custom sorting function. Should return a promise.\n * If the promise resolves as `true` the column UI will be updated.\n * If the promise resolves as falsey, the sort will be performed by the component.\n * A good use-case would be performing the sort on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customSortFn?: (\n property: TableTypes.Prop,\n order: TableTypes.Order\n ) => Promise<true | TableTypes.Falsy>;\n\n /**\n * The default sortable option for all columns.\n * `true` will enable column sorting unless you set `sortable: false` on a column\n * `false` will disable column sorting unless you set `sortable: true` on a column\n */\n @Prop() defaultSort = true;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\n\n /** Use this to render the table with roughly the correct dimensions.\n * a use-case might be; fetch a small initial dataset to minimise load-time,\n * render the table with the correct dimensions, the table becomes interactive,\n * load the rest of the data\n */\n @Prop() virtualTotalItems: number = 0;\n\n @Watch('virtualTotalItems')\n virtualTotalItemsChangeHandler() {\n this.setBlocks();\n }\n\n /** Fired when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\n\n /** Fired whenever a block is activated by scrolling into view / becoming visible\n * This could be leveraged for infinite scrolling / to fetch more data.\n */\n @Event() nanoTblBlockRendered: EventEmitter<{\n block: number;\n totalBlocks: number;\n }>;\n\n /** Fired before a column is sorted.\n * `event.preventDefault()` to stop sorting. */\n @Event() nanoTblBeforeSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired before a column is filtered.\n * `event.preventDefault()` to stop filtering. */\n @Event() nanoTblBeforeFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeSearch: EventEmitter<{ term: string }>;\n\n /** Fired after a general / cross column search */\n @Event() nanoTblAfterSearch: EventEmitter<{ term: string }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeEdit: EventEmitter<{ term: string }>;\n\n /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!col) return;\n return this.sortStart(null, col.prop);\n }\n\n /** Apply a sort on a column\n * @returns a promise which resolves when complete */\n @Method()\n async addSort(column: TableTypes.Prop, order: TableTypes.Order) {\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => c.prop === column\n );\n if (!col) throw 'Cannot find column with ' + column;\n return this.sortStart(order, col.prop);\n }\n\n /** Remove any column filters currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetFilters() {\n this.filters = [];\n return this.filterStart();\n }\n\n /** Apply a filter on a column\n * @param filters - the filters to apply\n * @param additive - if true, will add the filters to any currently applied\n * @returns a promise which resolves when complete\n */\n @Method()\n async addFilters(filters: TableTypes.Filter[], additive: boolean = true) {\n if (!additive) this.filters = [];\n return this.filterStart(filters, additive);\n }\n\n /** Remove filters from a column\n * @param columnNames - the filters to apply\n * @returns a promise which resolves when complete\n */\n @Method()\n async removeFilters(columnNames: TableTypes.Prop[]) {\n this.filters = this.filters.filter((f) => !columnNames.includes(f.prop));\n return this.filterStart();\n }\n\n /** Updates a row model at a given index\n * @param row - the row to update.\n * *Note* - this should come from the `col.cellTemplate` or `row.rowRender.template` `rowModel` property\n * - rows are augmented with certain properties to aid with efficient rendering\n * @param rowIndex - the row index to insert this row\n */\n @Method()\n async updateRow(row: TableTypes.RowData, rowIndex: number) {\n (this.rows as TableTypes.NanoTable['rows']).splice(rowIndex, 1, row);\n this.handleRowsChange();\n }\n\n // TODO.\n // change this.rows to be a Map instead?\n // this will allow 'padding' < inserting row data at a non-adjacent index\n\n // /**\n // * During pagination or infinite scroll\n // * you may not always want to load data in serial order.\n // * This method allows you to insert a block of results at a particular index.\n // * Use in-conjunction with `virtualTotalItems`\n // * @param blockIndex - where to insert\n // * @param rows - what to insert\n // */\n // @Method()\n // async insertBlock(blockIndex: number, rows: TableTypes.NanoTable['rows']) {\n // this.pauseAutoBlockAssign = true;\n // const cRows = (this.rows as TableTypes.NanoTable['rows']);\n\n // if (cRows.length < (blockIndex * this.perBlock)) {\n // (this.rows as TableTypes.NanoTable['rows'])\n // }\n\n // (this.rows as TableTypes.NanoTable['rows']).splice((blockIndex * this.perBlock)-1, 0, ...rows);\n\n // console.log(this.rows)\n // debugger;\n\n // await this.handleRowsChange(this.rows);\n // this.blocks[blockIndex] = {rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join())};\n // this.blocks = this.blocks;\n // this.pauseAutoBlockAssign = true;\n\n // console.log(this.rows, this.blocks)\n // }\n\n // Private State\n\n @Element() host: HTMLNanoTableElement;\n private renderId = 'tbl-' + id++;\n private store: TableStores;\n private filters: TableTypes.Filter[] = [];\n private currentFilters = '[]';\n private currentSort = '';\n private tableEle: HTMLTableElement;\n private topAnchorEle: HTMLElement;\n private tableWrapperEle: HTMLElement;\n private cacheScrollPosition: number = 0;\n private activeWatcherIo: IntersectionObserver;\n\n // Block view management\n\n /** `tr` elements split into units - defined by `perBlock`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1, 2];\n\n private measureHeight = 0;\n private blockElements: HTMLTableSectionElement[];\n private blockHeights: { blockIndex: number; height: number }[] = [];\n\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n const potentialHeight = el.getBoundingClientRect().height;\n this.measureHeight =\n Math.abs(this.measureHeight - potentialHeight) < 5\n ? this.measureHeight\n : potentialHeight;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n\n private unitHeight = 0;\n\n private get scrollParent() {\n return this._scrollParent;\n }\n\n private set scrollParent(ele: HTMLElement) {\n if (ele === this._scrollParent) return;\n\n if (this._scrollParent) {\n (this._scrollParent === document.documentElement\n ? document\n : this._scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n (ele === document.documentElement ? document : ele).addEventListener(\n 'scroll',\n this.scrollHandler\n );\n this._scrollParent = ele;\n }\n\n private _scrollParent: HTMLElement;\n\n // used to fire `nanoTblBlockRendered` on block render change\n private get primaryBlockIndex() {\n return this._primaryBlockIndex;\n }\n\n private set primaryBlockIndex(blockIndex) {\n if (this._primaryBlockIndex === blockIndex) return;\n\n this._primaryBlockIndex = blockIndex;\n\n // fire block change event\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n }\n\n private _primaryBlockIndex;\n\n // Misc.\n\n private get isReady() {\n return this._isReady;\n }\n private set isReady(ready: boolean) {\n if (ready === this._isReady) return;\n this._isReady = ready;\n if (this.isReady) requestAnimationFrame(() => this.handleReady());\n }\n private _isReady = false;\n\n // Private Logic\n\n // Listeners\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n try {\n const idRow = document.querySelector(hash);\n if (idRow) idRow.scrollIntoView();\n } catch (e) {}\n }\n this.nanoTblReady.emit();\n }\n\n /**\n * Start a sort - can be cancelled by `preventDefault`\n * @param order - column order\n * @param column - column config object\n * @returns A promise\n */\n private sortStart = async (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n element?: HTMLElement\n ) => {\n // did order change?\n if (this.currentSort === order + ':' + column) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSort.emit({ column: column, order });\n if (sortEvent.defaultPrevented) return;\n perMark('sort');\n this.currentSort = order + ':' + column;\n\n // doesn't make sense to leave user in place for a sort\n this.scrollToTop(element);\n\n if (this.customSortFn) {\n try {\n const res = await this.customSortFn(column, order);\n\n // if the response is 'true', the custom sort did it's thing\n // handover to finish and stop loading state.\n // if response is falsey, carry on to do a FE sort\n if (res === true) {\n this.sortComplete(order, column);\n this._loading = false;\n return;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom sort failed', e);\n this.currentSort = '';\n this._loading = false;\n return;\n }\n }\n\n try {\n await storeSort(this.host, column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('sort failed', e);\n this.currentSort = '';\n } finally {\n if (this.blocks.length) this._loading = false;\n }\n };\n\n /**\n * Complete a sort. Reflects the order to ui.\n * @param order - column order\n * @param column - column config object\n */\n private sortComplete(order: TableTypes.Order, column: TableTypes.Prop) {\n this.columns = this.columns.map((c) => {\n if (c.prop === column) return { ...c, order };\n return { ...c, order: null };\n });\n this.nanoTblAfterSort.emit({ column: column, order });\n perMark('sort', true);\n }\n\n private async searchStart() {\n this._loading = true;\n const sortEvent = this.nanoTblBeforeSearch.emit({ term: this.searchTerm });\n if (sortEvent.defaultPrevented) return;\n perMark('search');\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n try {\n await storeSearch(this.host, this.searchTerm);\n this.nanoTblAfterSearch.emit({ term: this.searchTerm });\n perMark('search', true);\n } catch (e) {\n console.warn('search failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private async filterStart(\n filters?: TableTypes.Filter[],\n additive: boolean = true\n ) {\n if (filters) {\n if (additive) {\n this.filters = [\n ...this.filters.filter(\n (f) => !filters.find((ff) => ff.prop === f.prop)\n ),\n ...filters,\n ];\n } else {\n this.filters = filters;\n }\n }\n\n if (this.currentFilters === JSON.stringify(this.filters)) return;\n\n this._loading = true;\n const sortEvent = this.nanoTblBeforeFilter.emit({ filters: this.filters });\n if (sortEvent.defaultPrevented) return;\n perMark('filter');\n this.currentFilters = JSON.stringify(this.filters);\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n if (this.customFilterFn) {\n try {\n const res = await this.customFilterFn(this.filters);\n\n // if the response is 'true', the custom filter did it's thing\n // handover to finish and stop loading state.\n // if response is falsey, carry on to do a FE filter\n if (res === true) {\n this.filterComplete();\n this._loading = false;\n }\n } catch (e) {\n // if response errored, stop loading state\n // clear current sort cache\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n this._loading = false;\n }\n return;\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('filter failed', e);\n } finally {\n this._loading = false;\n }\n }\n\n private filterComplete() {\n this.columns = this.columns.map((c) => {\n const cFilter = this.filters.find((f) => f.prop === c.prop);\n if (cFilter) c.filter = cFilter.filter;\n else if (c.filter !== null && c.filter !== undefined)\n c.filter = undefined;\n\n return c;\n });\n this.nanoTblAfterFilter.emit({ filters: this.filters });\n perMark('filter', true);\n }\n\n /** Scrolls to the top immediately - used whilst sorting / filtering */\n private scrollToTop(element?: HTMLElement) {\n const scrollBehaviour = this.scrollParent.style?.scrollBehavior;\n const scrollX = this.scrollParent.scrollLeft;\n this.scrollParent.style.scrollBehavior = 'auto';\n\n if (this.topAnchorEle && !isInViewport(this.topAnchorEle, 0.1)) {\n this.host.scrollIntoView();\n }\n if (element && !isInViewport(element, 1))\n setTimeout(() => element.scrollIntoView({ block: 'start' }), 500);\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n\n this.scrollHandler();\n }\n\n private setMeasureElement(): Promise<void> {\n return new Promise((resolve) => {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n resolve();\n });\n });\n }\n\n /**\n * Makes sure we have dimensions on at least one, active tbody element.\n * We'll use this is a yard stick for inactive tbody elements in future.\n * These elements have no natural height (on account of all their rows being hidden)\n */\n private setInitialBlockDimension() {\n if (!this.blockElements?.length) return;\n perMark('blockDims');\n\n const testForDimensions = async () => {\n await this.setMeasureElement();\n if (this.unitHeight) return true;\n return false;\n };\n\n const dimensionsReady: Promise<void> = new Promise(async (resolve) => {\n if (await testForDimensions()) resolve();\n else {\n // it's likely this table is hidden in the dom.\n // we need to wait until it's visible\n const observer = new IntersectionObserver(\n async () => {\n if (await testForDimensions()) {\n resolve();\n observer.disconnect();\n }\n },\n { root: this.scrollParent }\n );\n observer.observe(this.tableEle);\n }\n });\n\n // we're all finished.\n dimensionsReady.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n requestAnimationFrame(() => (this.isReady = true));\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = (this.columns as TableTypes.NanoTable['columns'])\n .filter((c) => c.filter !== undefined && c.filter !== null)\n .map((c) => {\n const { filter, prop } = c;\n return { filter, prop };\n });\n\n if (this.searchTerm) {\n await this.searchStart();\n }\n\n if (this.filters.length) {\n await this.filterStart();\n }\n // apply sort\n const col = (this.columns as TableTypes.NanoTable['columns']).find(\n (c) => !!c.order\n );\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\n }\n\n /** Split up all incoming rows into 'blocks' split amongst tbody elements.\n * These can then be hidden / shown to improve performance.\n */\n private setBlocks() {\n const dRows = this.store.data.state.rows;\n if (!dRows.length) {\n this.blocks = [];\n return;\n }\n\n perMark('setBlocks');\n // this.ignoreIO = true;\n let i = 1;\n const l =\n this.virtualTotalItems > dRows.length\n ? this.virtualTotalItems\n : dRows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1] || { __uuid: '' });\n\n if (i % this.perBlock === 0) {\n // assign a UUID for the whole block\n // for block diffing\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n\n // any leftover rows\n if (rows.length) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n }\n\n this.blocks = blocks;\n perMark('setBlocks', true);\n }\n\n /**\n * Returns a block render height.\n * If it's currently active - let auto do it's thing\n * If we've rendered it before - return that\n * If all else fails, let's guess it\n * @param blockIndex\n * @returns a height string (incl px)\n */\n private getBlockHeight(blockIndex: number): number {\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight) return cachedBlockHeight.height;\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight;\n }\n return this.unitHeight ? this.unitHeight * blockLength : undefined;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n readTask(() => {\n if (el.classList.contains(`${CSSNAMESPACE}__inactive`)) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhIdx = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhIdx > -1) {\n this.blockHeights[fBhIdx] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * On scroll, loop through all blocks' heights and cumulatively, add them together.\n * When we find that the scroll position is less than this cumulative block height -\n * stop loop - it's on the current active block.\n */\n private scrollHandler = () => {\n // don't listen if this table isn't in the viewport\n if (!this.store.general.state.isActive) return;\n\n readTask(() => {\n this.cacheScrollPosition = this.scrollParent.scrollTop || window.scrollY;\n let cumulativeHeight = this.host.offsetTop;\n let blockIndex = 0;\n const blockLen = this.blocks.length;\n\n while (\n blockIndex < blockLen &&\n this.cacheScrollPosition >= cumulativeHeight\n ) {\n cumulativeHeight += this.getBlockHeight(blockIndex);\n\n if (this.cacheScrollPosition < cumulativeHeight) {\n const potentialBlocks = [\n blockIndex,\n blockIndex + 1,\n Math.max(0, blockIndex - 1),\n ];\n if (potentialBlocks.toString() !== this.activeBlocks.toString()) {\n this.activeBlocks = potentialBlocks;\n this.setBlockHeight();\n }\n this.primaryBlockIndex = blockIndex;\n }\n blockIndex++;\n }\n });\n };\n\n /** Process slotted content */\n private processSlots() {\n // see if we have slot content\n if (!this.caption && !this.host.querySelector('[slot=\"caption\"]')) {\n console.error(\n 'For accessibility you must set a `caption` prop or use the `caption` slot'\n );\n }\n }\n\n private 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 private handleResizeChange = (\n e: NanoResizeObserveCustomEvent<ResizeStateChangeEventDetail>\n ) => {\n this.tableWrapperEle.className = '';\n\n let classes: string[] = [`${CSSNAMESPACE}__wrap`];\n if (e.target?.className)\n classes = [...e.target.className.split(' '), ...classes];\n\n this.tableWrapperEle.classList.add(...classes.filter((cl) => !!cl));\n };\n\n /** Adds an IO. Makes sure our scroll listener is only active when\n * the table is in viewport */\n private setupActiveWatcher() {\n if (!this.host || !this.scrollParent || !this.store) return;\n\n if (this.activeWatcherIo) {\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n }\n const io = (this.activeWatcherIo = new IntersectionObserver(\n async ([e]) => {\n if (e.isIntersecting) this.store.general.state.isActive = true;\n else this.store.general.state.isActive = false;\n },\n { root: this.scrollParent, threshold: 0 }\n ));\n io.observe(this.host);\n }\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n // setup stores\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent,\n this.isReady\n );\n await this.handleRowsChange();\n this.store.general.onChange('isActive', this.scrollHandler);\n this.store.data.onChange('rows', () => this.setBlocks());\n\n // setup dom and attach listeners\n this.processSlots();\n this.setBlocks();\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n connectedCallback(): void {\n this.scrollParent = findScrollParent(this.host);\n this.setupActiveWatcher();\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\n }\n\n componentShouldUpdate(_newVal, _oldVal, stateName: keyof Table) {\n // stop double rendering - we use the store for rendering internally\n // the public facing props are kept in-sync with the store\n // but we don't want it to cause renders\n if (['rows', 'columns'].includes(stateName)) return false;\n\n if (Build.isDev && !Build.isTesting && measurePerf)\n console.log(stateName, _newVal, _oldVal);\n }\n\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n this.setMeasureElement();\n perMark('render', true);\n }\n\n disconnectedCallback(): void {\n if (!this.activeWatcherIo) return;\n this.activeWatcherIo.disconnect();\n this.activeWatcherIo = undefined;\n\n (this.scrollParent === document.documentElement\n ? document\n : this.scrollParent\n ).removeEventListener('scroll', this.scrollHandler);\n }\n\n render() {\n this.blockElements = [];\n\n return (\n <Host>\n <div\n class={`${CSSNAMESPACE}__top-anchor`}\n ref={(a) => (this.topAnchorEle = a)}\n >\n \n </div>\n\n <nano-resize-observe\n states=\"576w sm, 768w md\"\n class=\"sm md\"\n onNanoResizeStateChange={this.handleResizeChange}\n ></nano-resize-observe>\n\n <div\n class={`${CSSNAMESPACE}__wrap sm md`}\n ref={(div) => (this.tableWrapperEle = 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 <table\n role={this.type === 'grid' ? 'grid' : undefined}\n aria-rowcount={this.store.data.state.rows.length}\n aria-colcount={this.store.config.state.columns.length}\n class={`${CSSNAMESPACE}`}\n ref={(tbl) => (this.tableEle = tbl)}\n >\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 onColumnSortClick={this.sortStart}\n onColumnPinned={this.handleColumnPinned}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this._loading && !this.blocks.length && (\n <tbody class={`${CSSNAMESPACE}__active`}>\n {[...Array(10).keys()].map((rowIndex) => (\n <tr>\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n nestedContent={() => <nano-skeleton />}\n />\n )\n )}\n </tr>\n ))}\n </tbody>\n )}\n\n <tr hidden={!!this._loading || !!this.blocks.length}>\n <th\n class={`${CSSNAMESPACE}__th`}\n colSpan={this.store.config.state.columns.length}\n >\n <div class=\"nano-tbl__cell-content nano-tbl__cell-content--no-result\">\n <slot name=\"no-results\">No results found</slot>\n </div>\n </th>\n </tr>\n\n {/* Body */}\n {this.blocks.map((block, blockIndex) => (\n <tbody\n key={block.__uuid}\n id={`tbody-${this.renderId}-${blockIndex}`}\n ref={(tb) => {\n this.blockElements.push(tb);\n }}\n class={{\n [`${CSSNAMESPACE}__inactive`]:\n !this.activeBlocks.includes(blockIndex),\n [`${CSSNAMESPACE}__active`]:\n this.activeBlocks.includes(blockIndex),\n }}\n >\n {this.activeBlocks.includes(blockIndex) ? (\n block.rows.map((row, i) => {\n const rowIndex =\n blockIndex > 0 ? blockIndex * this.perBlock + i : i;\n return (\n <TableRow\n rowRenderer={this.rowRender}\n rowModel={row}\n rowIndex={rowIndex}\n >\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n />\n )\n )}\n </TableRow>\n );\n })\n ) : (\n <tr>\n <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex) + 'px',\n }}\n />\n </tr>\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow\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 onColumnSortClick={this.sortStart}\n defaults={{\n sortable: this.defaultSort,\n }}\n />,\n ])}\n </TableHeadFootRow>\n </tfoot>\n )}\n </table>\n\n {!!this.blocks.length && (\n <nano-spinner\n type=\"circle\"\n class={{\n [`${CSSNAMESPACE}__spinner`]: true,\n [`${CSSNAMESPACE}__spinner--show`]: this._loading,\n }}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
export { T as nano_table } from './nano-table-
|
4
|
+
export { T as nano_table } from './nano-table-9767860f.js';
|
5
5
|
import './index-dad5627b.js';
|
6
6
|
import './math-c02ddfda.js';
|
7
7
|
import './throttle-7836544e.js';
|