@nanoporetech-digital/components 7.7.0 → 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cjs/app-globals-3e14cb71.js.map +1 -1
  2. package/dist/cjs/index.cjs.js +1 -0
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/{nano-table-806fa39d.js → nano-table-43fc3d23.js} +2 -2
  5. package/dist/cjs/{nano-table-806fa39d.js.map → nano-table-43fc3d23.js.map} +1 -1
  6. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  7. package/dist/cjs/{table.worker-fb31c8b7.js → table.worker-ad250672.js} +2 -2
  8. package/dist/cjs/table.worker-ad250672.js.map +1 -0
  9. package/dist/collection/index.js +1 -1
  10. package/dist/collection/index.js.map +1 -1
  11. package/dist/components/index.js +1 -1
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/esm/app-globals-f0120bbe.js.map +1 -1
  14. package/dist/esm/index.js +1 -1
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/{nano-table-67d7190b.js → nano-table-4481d4e1.js} +2 -2
  17. package/dist/esm/{nano-table-67d7190b.js.map → nano-table-4481d4e1.js.map} +1 -1
  18. package/dist/esm/nano-table.entry.js +1 -1
  19. package/dist/esm/{table.worker-d636a71f.js → table.worker-1bc9c170.js} +2 -2
  20. package/dist/esm/table.worker-1bc9c170.js.map +1 -0
  21. package/dist/nano-components/app-globals-f0120bbe.js.map +1 -1
  22. package/dist/nano-components/index.esm.js +1 -1
  23. package/dist/nano-components/index.esm.js.map +1 -1
  24. package/dist/nano-components/{nano-table-67d7190b.js → nano-table-4481d4e1.js} +2 -2
  25. package/dist/nano-components/nano-table.entry.js +1 -1
  26. package/dist/nano-components/table.worker-1bc9c170.js +5 -0
  27. package/dist/types/index.d.ts +1 -1
  28. package/docs-json.json +1 -1
  29. package/package.json +1 -1
  30. package/dist/cjs/table.worker-fb31c8b7.js.map +0 -1
  31. package/dist/esm/table.worker-d636a71f.js.map +0 -1
  32. package/dist/nano-components/table.worker-d636a71f.js +0 -5
  33. /package/dist/nano-components/{nano-table-67d7190b.js.map → nano-table-4481d4e1.js.map} +0 -0
  34. /package/dist/nano-components/{table.worker-d636a71f.js.map → table.worker-1bc9c170.js.map} +0 -0
  35. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/custom-element-doc-generator.d.ts +0 -0
  36. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/generate-vue-component.d.ts +0 -0
  37. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/index.d.ts +0 -0
  38. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/output-vue.d.ts +0 -0
  39. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/plugin.d.ts +0 -0
  40. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/types.d.ts +0 -0
  41. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/generators/vue/utils.d.ts +0 -0
  42. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
  43. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
  44. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
  45. /package/dist/types/builds/{RXAuYz49 → Te2fj7s-}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1 +1 @@
1
- {"file":"app-globals-3e14cb71.js","mappings":";;;;;AAAA,wBAAe;IACb,IACE,UAAU,CAAC,MAAM;QACjB,kBAAkB,IAAI,UAAU,CAAC,MAAM;QACvC,UAAU,CAAC,UAAU,CAAC,EACtB;;QAGA,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe;QAEvC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE;YACjC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;SACjC,CAAC;QAEF,MAAM,UAAU,GAAG;YACjB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAAE,OAAO,KAAK;YACxD,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAC5D,OAAO,IAAI;SACZ;QAED,IAAI,CAAC,UAAU,EAAE,EAAE;YACjB,IAAI,SAAS,GAAG,IAAI,gBAAgB,CAAC,CAAC,CAAC;gBACrC,IAAI,CAAC,UAAU,EAAE;oBAAE;gBAEnB,SAAS,CAAC,UAAU,EAAE;gBACtB,SAAS,GAAG,IAAI;aACjB,CAAC;YAEF,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE;gBACxB,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,IAAI;aACjB,CAAC;;;AAGR,CAAC;;AClCW,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/global/script/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async () => {\n if (\n globalThis.window &&\n 'MutationObserver' in globalThis.window &&\n globalThis['document']\n ) {\n // fire global 'ready' event when everything is hydrated\n\n const docEle = document.documentElement;\n\n window.addEventListener('appload', () => {\n docEle.classList.add('hydrated');\n });\n\n const docIsReady = () => {\n if (!docEle.classList.contains('hydrated')) return false;\n docEle.dispatchEvent(new CustomEvent('nanoComponentsReady'));\n return true;\n };\n\n if (!docIsReady()) {\n let mutationO = new MutationObserver((_) => {\n if (!docIsReady()) return;\n\n mutationO.disconnect();\n mutationO = null;\n });\n\n mutationO.observe(docEle, {\n childList: false,\n subtree: false,\n attributes: true,\n });\n }\n }\n};\n","import appGlobalScript from '/builds/RXAuYz49/0/Digital/nano-components/packages/components/src/global/script/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
1
+ {"file":"app-globals-3e14cb71.js","mappings":";;;;;AAAA,wBAAe;IACb,IACE,UAAU,CAAC,MAAM;QACjB,kBAAkB,IAAI,UAAU,CAAC,MAAM;QACvC,UAAU,CAAC,UAAU,CAAC,EACtB;;QAGA,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe;QAEvC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE;YACjC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;SACjC,CAAC;QAEF,MAAM,UAAU,GAAG;YACjB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAAE,OAAO,KAAK;YACxD,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAC5D,OAAO,IAAI;SACZ;QAED,IAAI,CAAC,UAAU,EAAE,EAAE;YACjB,IAAI,SAAS,GAAG,IAAI,gBAAgB,CAAC,CAAC,CAAC;gBACrC,IAAI,CAAC,UAAU,EAAE;oBAAE;gBAEnB,SAAS,CAAC,UAAU,EAAE;gBACtB,SAAS,GAAG,IAAI;aACjB,CAAC;YAEF,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE;gBACxB,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,IAAI;aACjB,CAAC;;;AAGR,CAAC;;AClCW,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/global/script/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async () => {\n if (\n globalThis.window &&\n 'MutationObserver' in globalThis.window &&\n globalThis['document']\n ) {\n // fire global 'ready' event when everything is hydrated\n\n const docEle = document.documentElement;\n\n window.addEventListener('appload', () => {\n docEle.classList.add('hydrated');\n });\n\n const docIsReady = () => {\n if (!docEle.classList.contains('hydrated')) return false;\n docEle.dispatchEvent(new CustomEvent('nanoComponentsReady'));\n return true;\n };\n\n if (!docIsReady()) {\n let mutationO = new MutationObserver((_) => {\n if (!docIsReady()) return;\n\n mutationO.disconnect();\n mutationO = null;\n });\n\n mutationO.observe(docEle, {\n childList: false,\n subtree: false,\n attributes: true,\n });\n }\n }\n};\n","import appGlobalScript from '/builds/Te2fj7s-/0/Digital/nano-components/packages/components/src/global/script/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -153,6 +153,7 @@ const initialize = (helpers = {}) => {
153
153
  };
154
154
 
155
155
  exports.getTagPrefix = renderer.getTagPrefix;
156
+ exports.transformTag = renderer.transformTag;
156
157
  exports.nanoDebounce = throttle.debounce;
157
158
  exports.nanoThrottle = throttle.throttle;
158
159
  exports.nanoGetTabElements = tabbable.getTabbableElements;
@@ -1 +1 @@
1
- {"file":"index.cjs.js","mappings":";;;;;;;;;;;;AAiBA,MAAM,YAAY,GAAG,CACnB,OAAe,EACf,UAAmC,EAAE;IAErC,OAAO,GAAG,OAAO;MAEb,OAAO,CAAC,MAAM;UACV,OAAO;aACJ,GAAG,CACF,CAAC,GAAG,EAAE,CAAC,KACL,qBAAqB,CAAC,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,GAAG,CAAC,OAAO,WAAW,CAChG;aACA,IAAI,CAAC,EAAE,CAAC;UACX,EACN,EAAE,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CACrB,KAA2B,EAC3B,UAAmC,EAAE;IAErC,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAC7D,CAAC,GAAgB;YACf,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAC3B,CAAC,GA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.ts","src/components/dialog/dialog.helpers.ts","src/index.ts"],"sourcesContent":["import { transformTag } from '../../utils/renderer';\nimport type { Color } from '../../types/shared';\n\ninterface ImperativeAlertOptions {\n color?: Color;\n duration?: number;\n closable?: boolean;\n}\n\ninterface ImperativeAlertButton {\n classes: string;\n content: string;\n handler?: (e: MouseEvent) => void;\n}\n\nexport type AlertToastPosition = 'tr' | 'tl' | 'bl' | 'br';\n\nconst alertContent = (\n message: string,\n buttons: ImperativeAlertButton[] = []\n) => {\n return `${message}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`;\n};\n\nconst addBtnHandlers = (\n alert: HTMLNanoAlertElement,\n buttons: ImperativeAlertButton[] = []\n) => {\n if (buttons.length) {\n Array.from(alert.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n};\n\n/**\n * `nano-alert` helper to create toast notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param position - the position of the toast. Options are 'tr', 'tl', 'bl' & 'br'\n * @param icon - name for the `nano-icon`\n * @param alertOptions - { color: Color, duration: number, closable: boolean }\n * @returns `Promise<void>`\n */\nexport async function nanoShowToast(\n message: string,\n position: AlertToastPosition = 'tr',\n icon?: string,\n alertOptions?: ImperativeAlertOptions,\n buttons: ImperativeAlertButton[] = []\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: 3000,\n closable: true,\n ...alertOptions,\n };\n icon = icon || 'light/circle-info';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement(transformTag('nano-alert')) as HTMLNanoAlertElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n <nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n requestAnimationFrame(async (_) => {\n await alert.toast(position);\n resolve(alert);\n });\n });\n}\n\n/**\n * `nano-alert` helper to create alert notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons\n * @param label - descriptive label for assitive technology\n * @param icon - name for the `nano-icon`\n * @param alertOptions\n * @returns `Promise<void>`\n */\nexport function nanoShowAlert(\n message: string,\n buttons: ImperativeAlertButton[] = [],\n label: string,\n icon: string | undefined = 'light/circle-info',\n alertOptions: ImperativeAlertOptions = {}\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: Infinity,\n closable: false,\n ...alertOptions,\n };\n icon = icon || 'light/circle-info';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement(transformTag('nano-alert')) as HTMLNanoAlertElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n ${icon ? `<nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>` : ''}\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n setTimeout(async (_) => {\n await alert.alert(label);\n resolve(alert);\n }, 100);\n });\n}\n","import { transformTag } from '../../utils/renderer';\n\ninterface ImperativeDialogOptions {\n noUserDismiss: boolean;\n noHeader?: boolean;\n noFooter?: boolean;\n label: string;\n}\n/**\n * `nano-dialog` helper to create dialog modals imperatively.\n * @param body - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons - { classes: string; content: string; handler: () => {} }[]\n * @param dialogOptions - { noUserDismiss: boolean, noHeader?: boolean, noFooter?: boolean, label: string }\n * @returns `Promise<void>`\n */\nexport function nanoCreateDialog(\n body: string,\n buttons: { classes: string; content: string; handler: () => void }[] = [],\n dialogOptions?: ImperativeDialogOptions\n) {\n const opts: ImperativeDialogOptions = {\n noUserDismiss: false,\n label: 'Dialog',\n ...dialogOptions,\n };\n const dialog: HTMLNanoDialogElement = Object.assign(\n document.createElement(\n transformTag('nano-dialog')\n ) as HTMLNanoDialogElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n ${body}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`,\n }\n );\n\n if (buttons.length) {\n Array.from(dialog.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n\n document.body.appendChild(dialog);\n return dialog;\n}\n","// import { setPlatformHelpers } from '@stencil/core';\n// @ts-expect-error - NAMESPACE isn't officially exported\nimport { NAMESPACE } from '@stencil/core';\nimport { setTagPrefix } from './utils/renderer';\n\nexport * from './components/alert/alert.helpers';\nexport * from './components/dialog/dialog.helpers';\nexport {\n debounce as nanoDebounce,\n throttle as nanoThrottle,\n} from './utils/throttle';\nexport { getTabbableElements as nanoGetTabElements } from './utils/tabbable';\n\nexport function componentPrefix(prefix: string) {\n if (!window || !document) return;\n\n const tagTransform = setTagPrefix(prefix);\n\n const autoLoaderScript = document.querySelector(\n `script[src$=\"/${NAMESPACE}.esm.js\"]`\n );\n if (autoLoaderScript) {\n autoLoaderScript['data-opts'] = {\n transformTagName: tagTransform,\n };\n }\n return tagTransform;\n}\n\nexport { getTagPrefix } from './utils/renderer';\n\nexport const initialize = (\n helpers: { _ael?: any; _ce?: any; _rel?: any } = {}\n) => {\n if (typeof (window as any) === 'undefined') {\n return;\n }\n const platformHelpers: any = {};\n if (helpers._ael) {\n platformHelpers.ael = helpers._ael;\n }\n if (helpers._rel) {\n platformHelpers.rel = helpers._rel;\n }\n if (helpers._ce) {\n platformHelpers.ce = helpers._ce;\n }\n // setPlatformHelpers(platformHelpers);\n};\n\nexport * from './components';\n"],"version":3}
1
+ {"file":"index.cjs.js","mappings":";;;;;;;;;;;;AAiBA,MAAM,YAAY,GAAG,CACnB,OAAe,EACf,UAAmC,EAAE;IAErC,OAAO,GAAG,OAAO;MAEb,OAAO,CAAC,MAAM;UACV,OAAO;aACJ,GAAG,CACF,CAAC,GAAG,EAAE,CAAC,KACL,qBAAqB,CAAC,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,GAAG,CAAC,OAAO,WAAW,CAChG;aACA,IAAI,CAAC,EAAE,CAAC;UACX,EACN,EAAE,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CACrB,KAA2B,EAC3B,UAAmC,EAAE;IAErC,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAC7D,CAAC,GAAgB;YACf,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAC3B,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;YACF,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAAE;gBAChC,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;aACjD;SACF,CACF,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;;;;;;AAQO,eAAe,aAAa,CACjC,OAAe,EACf,WAA+B,IAAI,EACnC,IAAa,EACb,YAAqC,EACrC,UAAmC,EAAE;IAErC,MAAM,IAAI,GAA2B;QACnC,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,GAAG,YAAY;KAChB,CAAC;IACF,IAAI,GAAG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AAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;aACjD;SACF,CACF,CAAC;KACH;IAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC;AAChB;;AC9DA;SAagB,eAAe,CAAC,MAAc;IAC5C,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ;QAAE,OAAO;IAEjC,MAAM,YAAY,GAAGC,qBAAY,CAAC,MAAM,CAAC,CAAC;IAE1C,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAC7C,iBAAiBC,eAAS,WAAW,CACtC,CAAC;IACF,IAAI,gBAAgB,EAAE;QACpB,gBAAgB,CAAC,WAAW,CAAC,GAAG;YAC9B,gBAAgB,EAAE,YAAY;SAC/B,CAAC;KACH;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;MAIY,UAAU,GAAG,CACxB,UAAiD,EAAE;IAEnD,IAAI,OAAQ,MAAc,KAAK,WAAW,EAAE;QAC1C,OAAO;KACR;;AAYH;;;;;;;;;;;;;","names":["transformTag","setTagPrefix","NAMESPACE"],"sources":["src/components/alert/alert.helpers.ts","src/components/dialog/dialog.helpers.ts","src/index.ts"],"sourcesContent":["import { transformTag } from '../../utils/renderer';\nimport type { Color } from '../../types/shared';\n\ninterface ImperativeAlertOptions {\n color?: Color;\n duration?: number;\n closable?: boolean;\n}\n\ninterface ImperativeAlertButton {\n classes: string;\n content: string;\n handler?: (e: MouseEvent) => void;\n}\n\nexport type AlertToastPosition = 'tr' | 'tl' | 'bl' | 'br';\n\nconst alertContent = (\n message: string,\n buttons: ImperativeAlertButton[] = []\n) => {\n return `${message}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`;\n};\n\nconst addBtnHandlers = (\n alert: HTMLNanoAlertElement,\n buttons: ImperativeAlertButton[] = []\n) => {\n if (buttons.length) {\n Array.from(alert.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n};\n\n/**\n * `nano-alert` helper to create toast notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param position - the position of the toast. Options are 'tr', 'tl', 'bl' & 'br'\n * @param icon - name for the `nano-icon`\n * @param alertOptions - { color: Color, duration: number, closable: boolean }\n * @returns `Promise<void>`\n */\nexport async function nanoShowToast(\n message: string,\n position: AlertToastPosition = 'tr',\n icon?: string,\n alertOptions?: ImperativeAlertOptions,\n buttons: ImperativeAlertButton[] = []\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: 3000,\n closable: true,\n ...alertOptions,\n };\n icon = icon || 'light/circle-info';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement(transformTag('nano-alert')) as HTMLNanoAlertElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n <nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n requestAnimationFrame(async (_) => {\n await alert.toast(position);\n resolve(alert);\n });\n });\n}\n\n/**\n * `nano-alert` helper to create alert notifications imperatively.\n * @param message - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons\n * @param label - descriptive label for assitive technology\n * @param icon - name for the `nano-icon`\n * @param alertOptions\n * @returns `Promise<void>`\n */\nexport function nanoShowAlert(\n message: string,\n buttons: ImperativeAlertButton[] = [],\n label: string,\n icon: string | undefined = 'light/circle-info',\n alertOptions: ImperativeAlertOptions = {}\n) {\n const opts: ImperativeAlertOptions = {\n color: 'primary',\n duration: Infinity,\n closable: false,\n ...alertOptions,\n };\n icon = icon || 'light/circle-info';\n const alert: HTMLNanoAlertElement = Object.assign(\n document.createElement(transformTag('nano-alert')) as HTMLNanoAlertElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n ${icon ? `<nano-icon name=\"${icon}\" slot=\"icon\"></nano-icon>` : ''}\n ${alertContent(message, buttons)}\n `,\n }\n );\n addBtnHandlers(alert, buttons);\n\n document.body.appendChild(alert);\n return new Promise<HTMLNanoAlertElement>((resolve) => {\n setTimeout(async (_) => {\n await alert.alert(label);\n resolve(alert);\n }, 100);\n });\n}\n","import { transformTag } from '../../utils/renderer';\n\ninterface ImperativeDialogOptions {\n noUserDismiss: boolean;\n noHeader?: boolean;\n noFooter?: boolean;\n label: string;\n}\n/**\n * `nano-dialog` helper to create dialog modals imperatively.\n * @param body - a JS template string e.g. `<h4>Hello</h4> ${aVariable}`\n * @param buttons - { classes: string; content: string; handler: () => {} }[]\n * @param dialogOptions - { noUserDismiss: boolean, noHeader?: boolean, noFooter?: boolean, label: string }\n * @returns `Promise<void>`\n */\nexport function nanoCreateDialog(\n body: string,\n buttons: { classes: string; content: string; handler: () => void }[] = [],\n dialogOptions?: ImperativeDialogOptions\n) {\n const opts: ImperativeDialogOptions = {\n noUserDismiss: false,\n label: 'Dialog',\n ...dialogOptions,\n };\n const dialog: HTMLNanoDialogElement = Object.assign(\n document.createElement(\n transformTag('nano-dialog')\n ) as HTMLNanoDialogElement,\n {\n ...opts,\n open: false,\n innerHTML: `\n ${body}\n ${\n buttons.length\n ? buttons\n .map(\n (btn, i) =>\n `<button data-btn=\"${i}\" class=\"button ${btn.classes}\" slot=\"footer\">${btn.content}</button>`\n )\n .join('')\n : ''\n }`,\n }\n );\n\n if (buttons.length) {\n Array.from(dialog.querySelectorAll('button[slot=\"footer\"]')).map(\n (btn: HTMLElement) => {\n const foundBtn = buttons.find(\n (_fb, i) => btn.dataset.btn === i.toString()\n );\n if (foundBtn && foundBtn.handler) {\n btn.addEventListener('click', foundBtn.handler);\n }\n }\n );\n }\n\n document.body.appendChild(dialog);\n return dialog;\n}\n","// import { setPlatformHelpers } from '@stencil/core';\n// @ts-expect-error - NAMESPACE isn't officially exported\nimport { NAMESPACE } from '@stencil/core';\nimport { setTagPrefix } from './utils/renderer';\n\nexport * from './components/alert/alert.helpers';\nexport * from './components/dialog/dialog.helpers';\nexport {\n debounce as nanoDebounce,\n throttle as nanoThrottle,\n} from './utils/throttle';\nexport { getTabbableElements as nanoGetTabElements } from './utils/tabbable';\n\nexport function componentPrefix(prefix: string) {\n if (!window || !document) return;\n\n const tagTransform = setTagPrefix(prefix);\n\n const autoLoaderScript = document.querySelector(\n `script[src$=\"/${NAMESPACE}.esm.js\"]`\n );\n if (autoLoaderScript) {\n autoLoaderScript['data-opts'] = {\n transformTagName: tagTransform,\n };\n }\n return tagTransform;\n}\n\nexport { getTagPrefix, transformTag } from './utils/renderer';\n\nexport const initialize = (\n helpers: { _ael?: any; _ce?: any; _rel?: any } = {}\n) => {\n if (typeof (window as any) === 'undefined') {\n return;\n }\n const platformHelpers: any = {};\n if (helpers._ael) {\n platformHelpers.ael = helpers._ael;\n }\n if (helpers._rel) {\n platformHelpers.rel = helpers._rel;\n }\n if (helpers._ce) {\n platformHelpers.ce = helpers._ce;\n }\n // setPlatformHelpers(platformHelpers);\n};\n\nexport * from './components';\n"],"version":3}
@@ -114,7 +114,7 @@ const createWorkerProxy = (worker, workerMsgId, exportedMethod) => (
114
114
  })
115
115
  );
116
116
 
117
- const workerPromise = Promise.resolve().then(function () { return require('./table.worker-fb31c8b7.js'); }).then(m => m.worker);
117
+ const workerPromise = Promise.resolve().then(function () { return require('./table.worker-ad250672.js'); }).then(m => m.worker);
118
118
  const createWorkerStore = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'createWorkerStore');
119
119
  const syncConfigToWorker = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'syncConfigToWorker');
120
120
  const syncDataToWorker = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.table.worker', 'syncDataToWorker');
@@ -1877,4 +1877,4 @@ Table.style = NanoTableStyle0;
1877
1877
  exports.Table = Table;
1878
1878
  exports.createWorker = createWorker;
1879
1879
 
1880
- //# sourceMappingURL=nano-table-806fa39d.js.map
1880
+ //# sourceMappingURL=nano-table-43fc3d23.js.map