@paperless/core 1.63.0 → 1.64.1

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 (75) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/build/{p-a8923d40.entry.js → p-00d4647f.entry.js} +2 -2
  3. package/dist/build/{p-a8923d40.entry.js.map → p-00d4647f.entry.js.map} +1 -1
  4. package/dist/{paperless/p-5fa3061e.entry.js → build/p-0b0c43cc.entry.js} +2 -2
  5. package/dist/build/p-0b0c43cc.entry.js.map +1 -0
  6. package/dist/build/p-0f5c5693.entry.js +2 -0
  7. package/dist/build/p-0f5c5693.entry.js.map +1 -0
  8. package/dist/build/{p-c14f44ff.entry.js → p-2d3ff364.entry.js} +2 -2
  9. package/dist/build/{p-c14f44ff.entry.js.map → p-2d3ff364.entry.js.map} +1 -1
  10. package/dist/build/{p-bff43f47.entry.js → p-7d396ed7.entry.js} +2 -2
  11. package/dist/build/p-7d396ed7.entry.js.map +1 -0
  12. package/dist/build/paperless.esm.js +1 -1
  13. package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +2 -1
  14. package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
  15. package/dist/cjs/p-profile.cjs.entry.js +1 -1
  16. package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
  17. package/dist/cjs/p-stepper.cjs.entry.js +5 -7
  18. package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
  19. package/dist/cjs/p-table.cjs.entry.js +3 -1
  20. package/dist/cjs/p-table.cjs.entry.js.map +1 -1
  21. package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
  22. package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
  23. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
  24. package/dist/collection/components/molecules/profile/profile.component.css +1 -1
  25. package/dist/collection/components/molecules/stepper/stepper.component.js +5 -7
  26. package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -1
  27. package/dist/collection/components/molecules/table-header/table-header.component.js +2 -1
  28. package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -1
  29. package/dist/collection/components/organisms/table/table.component.js +3 -1
  30. package/dist/collection/components/organisms/table/table.component.js.map +1 -1
  31. package/dist/components/p-profile.js +1 -1
  32. package/dist/components/p-profile.js.map +1 -1
  33. package/dist/components/p-stepper.js +5 -7
  34. package/dist/components/p-stepper.js.map +1 -1
  35. package/dist/components/p-table.js +3 -1
  36. package/dist/components/p-table.js.map +1 -1
  37. package/dist/components/table-header.component.js +2 -1
  38. package/dist/components/table-header.component.js.map +1 -1
  39. package/dist/components/tooltip.component.js +1 -1
  40. package/dist/components/tooltip.component.js.map +1 -1
  41. package/dist/esm/p-floating-menu-container_8.entry.js +2 -1
  42. package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
  43. package/dist/esm/p-profile.entry.js +1 -1
  44. package/dist/esm/p-profile.entry.js.map +1 -1
  45. package/dist/esm/p-stepper.entry.js +5 -7
  46. package/dist/esm/p-stepper.entry.js.map +1 -1
  47. package/dist/esm/p-table.entry.js +3 -1
  48. package/dist/esm/p-table.entry.js.map +1 -1
  49. package/dist/esm/p-tooltip.entry.js +1 -1
  50. package/dist/esm/p-tooltip.entry.js.map +1 -1
  51. package/dist/index.html +1 -1
  52. package/dist/paperless/{p-a8923d40.entry.js → p-00d4647f.entry.js} +2 -2
  53. package/dist/paperless/{p-a8923d40.entry.js.map → p-00d4647f.entry.js.map} +1 -1
  54. package/dist/{build/p-5fa3061e.entry.js → paperless/p-0b0c43cc.entry.js} +2 -2
  55. package/dist/paperless/p-0b0c43cc.entry.js.map +1 -0
  56. package/dist/paperless/p-0f5c5693.entry.js +2 -0
  57. package/dist/paperless/p-0f5c5693.entry.js.map +1 -0
  58. package/dist/paperless/{p-c14f44ff.entry.js → p-2d3ff364.entry.js} +2 -2
  59. package/dist/paperless/{p-c14f44ff.entry.js.map → p-2d3ff364.entry.js.map} +1 -1
  60. package/dist/paperless/{p-bff43f47.entry.js → p-7d396ed7.entry.js} +2 -2
  61. package/dist/paperless/p-7d396ed7.entry.js.map +1 -0
  62. package/dist/paperless/paperless.esm.js +1 -1
  63. package/dist/sw.js +1 -1
  64. package/dist/sw.js.map +1 -1
  65. package/dist/types/components/organisms/table/table.component.d.ts +1 -0
  66. package/hydrate/index.js +12 -11
  67. package/package.json +1 -1
  68. package/dist/build/p-05d82685.entry.js +0 -2
  69. package/dist/build/p-05d82685.entry.js.map +0 -1
  70. package/dist/build/p-5fa3061e.entry.js.map +0 -1
  71. package/dist/build/p-bff43f47.entry.js.map +0 -1
  72. package/dist/paperless/p-05d82685.entry.js +0 -2
  73. package/dist/paperless/p-05d82685.entry.js.map +0 -1
  74. package/dist/paperless/p-5fa3061e.entry.js.map +0 -1
  75. package/dist/paperless/p-bff43f47.entry.js.map +0 -1
@@ -11,7 +11,7 @@ const Stepper = class {
11
11
  index.registerInstance(this, hostRef);
12
12
  this._loaded = false;
13
13
  // private _steps: Array<HTMLPStepperItemElement>;
14
- this._delay = (amount) => new Promise((resolve) => setTimeout(resolve, amount));
14
+ this._delay = (amount) => new Promise(resolve => setTimeout(resolve, amount));
15
15
  this._onSlotChange = async (_e) => this._generateSteps();
16
16
  this._generateSteps = async (firstLoad = false) => {
17
17
  if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
@@ -45,8 +45,7 @@ const Stepper = class {
45
45
  item.contentPosition = this.contentPosition;
46
46
  if (i < items.length - 1) {
47
47
  const nextItem = item.nextElementSibling;
48
- if (nextItem &&
49
- nextItem.tagName.toLowerCase() === 'p-stepper-item') {
48
+ if (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {
50
49
  // super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight
51
50
  // otherwise we always get the initial "16"
52
51
  if (directionChanged) {
@@ -57,7 +56,7 @@ const Stepper = class {
57
56
  : item.clientHeight) / 2;
58
57
  const stepperLine = document.createElement('p-stepper-line');
59
58
  stepperLine.direction = this.direction;
60
- stepperLine.active = i <= activeStep;
59
+ stepperLine.active = i < activeStep;
61
60
  if (heightDiff > 0 && this.direction === 'vertical') {
62
61
  stepperLine.style.marginTop = `-${heightDiff / 16}rem`;
63
62
  stepperLine.style.marginBottom = `-${heightDiff / 16}rem`;
@@ -65,8 +64,7 @@ const Stepper = class {
65
64
  }
66
65
  this._el.insertBefore(stepperLine, nextItem);
67
66
  const previous = stepperLine.previousElementSibling;
68
- if (previous &&
69
- previous.tagName.toLowerCase() === 'p-stepper-line') {
67
+ if (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {
70
68
  previous.remove();
71
69
  }
72
70
  continue;
@@ -97,7 +95,7 @@ const Stepper = class {
97
95
  this._generateSteps(true);
98
96
  }
99
97
  render() {
100
- return (index.h(index.Host, { class: "p-stepper" }, index.h("slot", { onSlotchange: this._onSlotChange })));
98
+ return (index.h(index.Host, { class: 'p-stepper' }, index.h("slot", { onSlotchange: this._onSlotChange })));
101
99
  }
102
100
  _onActiveStepChange() {
103
101
  this._generateSteps();
@@ -1 +1 @@
1
- {"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;IAwBX,YAAO,GAAG,KAAK,CAAC;;IAIhB,WAAM,GAAG,CAAC,MAAc,KAC/B,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAE/C,kBAAa,GAAG,OAAO,EAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;IAE3D,mBAAc,GAAG,OAAO,SAAS,GAAG,KAAK;MAChD,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QAClE,OAAO;OACP;MAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;MAEvB,IAAI,UAAU,GAAG,IAAI,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,CAAC;aAClB;YAED,SAAS;WACT;SACD;QAED,IAAI,CAAC,GAAG,CAAC,EAAE;UACV,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC;UACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;YAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;WACnD;SACD;OACD;MAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CACtC,wEAAwE,CACxE,CAAC;MACF,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;MAED,UAAU,CAAC,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;KACjD,CAAC;sBAvI2B,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;sBAOnC,KAAK;;EAuHnC,gBAAgB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;GAC1B;EAED,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAC,WAAW,IACtBD,kBAAM,YAAY,EAAE,IAAI,CAAC,aAAa,GAAI,CACpC,EACN;GACF;EAGS,mBAAmB;IAC5B,IAAI,CAAC,cAAc,EAAE,CAAC;GACtB;;;;;;;;;;","names":["h","Host"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _rendering = false;\n\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tprivate _delay = (amount: number) =>\n\t\tnew Promise((resolve) => setTimeout(resolve, amount));\n\n\tprivate _onSlotChange = async (_e: Event) => this._generateSteps();\n\n\tprivate _generateSteps = async (firstLoad = false) => {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tlet directionChanged = false;\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\n\t\t\tif (item.direction !== this.direction) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\t// super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight\n\t\t\t\t\t// otherwise we always get the initial \"16\"\n\t\t\t\t\tif (directionChanged) {\n\t\t\t\t\t\tawait this._delay(10);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (\n\t\t\t\t\t\tprevious &&\n\t\t\t\t\t\tprevious.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t\t) {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._loaded = true;\n\t\tthis._generateSteps(true);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={this._onSlotChange} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateSteps();\n\t}\n}\n"],"version":3}
1
+ {"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;IAuBX,YAAO,GAAG,KAAK,CAAC;;IAIhB,WAAM,GAAG,CAAC,MAAc,KAC/B,IAAI,OAAO,CAAC,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7C,kBAAa,GAAG,OAAO,EAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;IAE3D,mBAAc,GAAG,OAAO,SAAS,GAAG,KAAK;MAChD,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,CA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CAAC,cAAc,EAAE,CAAC;GACtB;;;;;;;;;;","names":["h","Host"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _rendering = false;\n\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tprivate _delay = (amount: number) =>\n\t\tnew Promise(resolve => setTimeout(resolve, amount));\n\n\tprivate _onSlotChange = async (_e: Event) => this._generateSteps();\n\n\tprivate _generateSteps = async (firstLoad = false) => {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tlet directionChanged = false;\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\n\t\t\tif (item.direction !== this.direction) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t// super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight\n\t\t\t\t\t// otherwise we always get the initial \"16\"\n\t\t\t\t\tif (directionChanged) {\n\t\t\t\t\t\tawait this._delay(10);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i < activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._loaded = true;\n\t\tthis._generateSteps(true);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={this._onSlotChange} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateSteps();\n\t}\n}\n"],"version":3}
@@ -28,6 +28,7 @@ const Table = class {
28
28
  this._rowActionsFloatingAll = [];
29
29
  this._ctrlDown = false;
30
30
  this._hasCustomFilterSlot = false;
31
+ this._hasCustomActionsSlot = false;
31
32
  this._floatingMenuShown = false;
32
33
  this.items = undefined;
33
34
  this.loading = false;
@@ -88,6 +89,7 @@ const Table = class {
88
89
  }
89
90
  componentWillLoad() {
90
91
  this._hasCustomFilterSlot = !!this._el.querySelector(':scope > [slot="custom-filter"]');
92
+ this._hasCustomActionsSlot = !!this._el.querySelector(':scope > [slot="custom-actions"]');
91
93
  this._setRowSelectionData();
92
94
  this._setLocales();
93
95
  this._parseItems(this.items);
@@ -109,7 +111,7 @@ const Table = class {
109
111
  enableAction: this.enableAction, actionIcon: this.actionButtonIcon, actionText: this.actionButtonText, actionLoading: this.actionButtonLoading, canUseAction: this.actionButtonEnabled, actionButtonTemplate: this.actionButtonTemplate, onAction: () => this.action.emit(), itemsSelectedAmount: (_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length,
110
112
  //loading
111
113
  loading: this.headerLoading
112
- }, this._hasCustomFilterSlot && (index.h("slot", { name: 'custom-filter', slot: 'custom-filter' })))), this._getHeader(), index.h("div", { class: 'flex flex-1 flex-col' }, this._getRows()), this.enableFooter && (index.h("p-table-footer", {
114
+ }, this._hasCustomFilterSlot && (index.h("slot", { name: 'custom-filter', slot: 'custom-filter' })), this._hasCustomActionsSlot && (index.h("slot", { name: 'custom-actions', slot: 'custom-actions' })))), this._getHeader(), index.h("div", { class: 'flex flex-1 flex-col' }, this._getRows()), this.enableFooter && (index.h("p-table-footer", {
113
115
  // overall
114
116
  hideOnSinglePage: this.hideOnSinglePage,
115
117
  // page size select
@@ -1 +1 @@
1
- {"file":"p-table.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,kpGAAkpG;;MCuC/pG,KAAK;;;;;;;;;;;;;;;;IAsVT,2BAAsB,GAAqB,EAAE,CAAC;IAI9C,cAAS,GAAG,KAAK,CAAC;IAClB,yBAAoB,GAAG,KAAK,CAAC;IAC7B,uBAAkB,GAAG,KAAK,CAAC;;mBAnVR,KAAK;yBAKC,KAAK;yBAKL,KAAK;+BAKA,CAAC;8BAKD,IAAI;;0BAUR,IAAI;wBAKR,EAAE;8BAKM,IAAI;8CAK+B,CACxE,MAAc;;MAEd,OAAAA,8BAAiB,CAChB,OAAC,MAAM,KAAK,CAAC;UACV,MAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,0CAAE,eAAe;UAC5C,MAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,0CAAE,sBAAsB,CACrD,0CAA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AAK,KAAK,QAAQ;QAChC,aAAa,CAAC,KAAK,KAAK,MAAM;QAC9B,OAAO,aAAa,CAAC,KAAK,KAAK,QAAQ,EACtC;QACD,WAAW,CAAC,IAAI,CAAC;UAChB,aAAa,CAAC,KAAK,KAAK,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC;QAC/D,SAAS;OACT;MAED,WAAW,CAAC,IAAI,CAAC;QAChB,MAAA,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,mCACzB,WAAW,CAACA,8BAAsB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;KAChD;IAED,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;IACrC,OAAO,UAAU,CAAC;GAClB;EAEO,6BAA6B;IACpC,MAAM,MAAM,GAAGA,8BAAsB,CAAC,MAAM,CAC3C,CAAC,IAAgC,EAAE,IAAI;MACtC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;MAClB,OAAO,IAAI,CAAC;KACZ,EACD,EAAE,CACF,CAAC;IACF,MAAM,KAAK,GAAqB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAE/C,KAAK,MAAM,IAAI,IAAIA,8BAAsB,EAAE;MAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;MACvE,KAAK,CAAC,IAAI,CAAC,GAAG,UAAW,CAAC,WAAY,CAAC,IAAI,CAAE,CAAC;KAC9C;IAED,OAAO;MACN,MAAM;MACN,KAAK;MACL,WAAW,EAAE,KAAK;MAClB,KAAK,EAAE,KAAK;MACZ,IAAI,EAAE,IAAI;MACV,IAAI,EAAE,IAAI;KACK,CAAC;GACjB;;;;;;;;;;;;;","names":["formatTranslation","defaultSize","defaultSizeOptions","h","Host","getLocaleComponentStrings","isMobile","index","tableColumSizesOptions"],"sources":["src/components/organisms/table/table.component.scss?tag=p-table","src/components/organisms/table/table.component.tsx"],"sourcesContent":["p-table {\n\t@apply relative flex flex-col;\n\n\t.p-input[type='checkbox'] {\n\t\tflex-shrink: 0;\n\t}\n\n\tp-table-container {\n\t\t@apply relative;\n\n\t\tp-floating-menu-container {\n\t\t\t@apply fixed bottom-4 left-1/2 -translate-x-1/2 transform;\n\t\t\tanimation: forwards floatingMenuContainerIn 0.3s ease !important;\n\n\t\t\t@screen tablet {\n\t\t\t\t@apply absolute bottom-16;\n\t\t\t}\n\n\t\t\t&:not(.shown) {\n\t\t\t\t@apply hidden;\n\t\t\t}\n\n\t\t\t&.inactive {\n\t\t\t\tanimation: forwards floatingMenuContainerOut 0.3s ease !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@keyframes floatingMenuContainerOut {\n\t0% {\n\t\tdisplay: flex;\n\t\ttransform: translateY(0) translateX(-50%);\n\t\topacity: 100;\n\t}\n\t99% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: flex;\n\t}\n\t100% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n}\n\n@keyframes floatingMenuContainerIn {\n\t0% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n\t1% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: flex;\n\t}\n\t100% {\n\t\ttransform: translateY(0) translateX(-50%);\n\t\topacity: 100;\n\t\tdisplay: flex;\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { IconVariant } from '../../../components';\nimport { tableColumSizesOptions } from '../../../types/constants';\nimport {\n\tQuickFilter,\n\tRowClickEvent,\n\tTableColumnSizes,\n} from '../../../types/table';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n\tisMobile,\n} from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport { TableRowAction } from '../../helpers/table-row-action/table-row-action.component';\nimport {\n\tdefaultSize,\n\tdefaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\nexport type amountSelectedTemplateFunc = (amount: number) => string;\n\n@Component({\n\ttag: 'p-table',\n\tstyleUrl: 'table.component.scss',\n})\nexport class Table {\n\t/**\n\t * The items to be fed to the table\n\t */\n\t@Prop() items: string;\n\n\t/**\n\t * Wether data is loading\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether the header should show loading state\n\t */\n\t@Prop() headerLoading: boolean = false;\n\n\t/**\n\t * Wether the footer should show loading state\n\t */\n\t@Prop() footerLoading: boolean = false;\n\n\t/**\n\t * The amount of loading rows to show\n\t */\n\t@Prop() amountOfLoadingRows: number = 6;\n\n\t/**\n\t * Wether to enable selection\n\t */\n\t@Prop() enableRowSelection: boolean = true;\n\n\t/**\n\t * A limit to the amount of rows that can be selected\n\t */\n\t@Prop() rowSelectionLimit: number | undefined;\n\n\t/**\n\t * Wether to enable row clicking\n\t */\n\t@Prop() enableRowClick: boolean = true;\n\n\t/**\n\t * The current selection of items\n\t */\n\t@Prop() selectedRows: any[] = [];\n\n\t/**\n\t * Wether to enable the floating menu\n\t */\n\t@Prop() enableFloatingMenu: boolean = true;\n\n\t/**\n\t * The template for amount selected item in the floating menu\n\t */\n\t@Prop() floatingMenuAmountSelectedTemplate: amountSelectedTemplateFunc = (\n\t\tamount: number\n\t) =>\n\t\tformatTranslation(\n\t\t\t(amount === 1\n\t\t\t\t? this._locales.floating_menu?.amount_selected\n\t\t\t\t: this._locales.floating_menu?.amount_selected_plural\n\t\t\t)?.replace('{{amount}}', amount)\n\t\t);\n\n\t/**\n\t * Event whenever the current selection changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectedRowsChange: EventEmitter<any>;\n\n\t/**\n\t * The key to determine if a row is selected\n\t */\n\t@Prop() selectionKey: string;\n\n\t/**\n\t * A key to determine if a row can be selected\n\t */\n\t@Prop() canSelectKey: string;\n\n\t/**\n\t * Event whenever a row is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowClick: EventEmitter<RowClickEvent>;\n\n\t/**\n\t * Event whenever a row is selected\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowSelected: EventEmitter<any>;\n\n\t/**\n\t * Event whenever a row is deselected\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowDeselected: EventEmitter<any>;\n\n\t/**\n\t * Event when the table has rendered\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\thasRendered: EventEmitter<number>;\n\n\t/** START HEADER */\n\n\t/**\n\t * Wether to show the header\n\t */\n\t@Prop() enableHeader: boolean = true;\n\n\t/**\n\t * Quick filters to show\n\t */\n\t@Prop() quickFilters: QuickFilter[] = [];\n\n\t/**\n\t * Active quick filter identifier\n\t */\n\t@Prop() activeQuickFilterIdentifier: string;\n\n\t/**\n\t * Wether to show the search input\n\t */\n\t@Prop() enableSearch: boolean = true;\n\n\t/**\n\t * The query to show in the search bar\n\t */\n\t@Prop({ mutable: true }) query: string;\n\n\t/**\n\t * Wether to show the filter button\n\t */\n\t@Prop() enableFilter: boolean = true;\n\n\t/**\n\t * Wether to show the filter button on desktop\n\t */\n\t@Prop() enableFilterDesktop: boolean = true;\n\n\t/**\n\t * The amount of filters being selected\n\t */\n\t@Prop() selectedFiltersAmount: number;\n\n\t/**\n\t * The template for the filter button text\n\t */\n\t@Prop() filterButtonTemplate: templateFunc;\n\n\t/**\n\t * Wether to show the action button\n\t */\n\t@Prop() enableAction: boolean = false;\n\n\t/**\n\t * Wether the action button is loading\n\t */\n\t@Prop() actionButtonLoading: boolean = false;\n\n\t/**\n\t * Wether the action button is enabled\n\t */\n\t@Prop() actionButtonEnabled: boolean = false;\n\n\t/**\n\t * The action button icon\n\t */\n\t@Prop() actionButtonIcon: IconVariant = 'pencil';\n\n\t/**\n\t * The action button text if changed\n\t */\n\t@Prop() actionButtonText: string;\n\n\t/**\n\t * The template for the action button text\n\t */\n\t@Prop() actionButtonTemplate: buttonTemplateFunc;\n\n\t/**\n\t * Event when one of the quick filters is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tquickFilter: EventEmitter<QuickFilter>;\n\n\t/**\n\t * Event when the query changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the filter button is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tfilter: EventEmitter<null>;\n\n\t/**\n\t * Event when the action button is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\taction: EventEmitter<null>;\n\n\t/** START FOOTER */\n\n\t/**\n\t * Wether to show the header\n\t */\n\t@Prop() enableFooter: boolean = true;\n\n\t/**\n\t * Wether to enable page size select\n\t */\n\t@Prop() enablePageSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination\n\t */\n\t@Prop() enablePagination: boolean = true;\n\n\t/**\n\t * Wether to enable export\n\t */\n\t@Prop() enableExport: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = defaultSize;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\texport: EventEmitter<number>;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/* Empty state start */\n\t@Prop() emptyStateHeader: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.header);\n\t@Prop() emptyStateContent: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.content);\n\t@Prop() emptyStateAction: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.action);\n\t/**\n\t * Wether to enable empty state action\n\t */\n\t@Prop() enableEmptyStateAction: boolean = true;\n\n\t@Prop() emptyStateFilteredHeader: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state.filtered.header);\n\t@Prop() emptyStateFilteredContent: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state.filtered.content);\n\n\t/**\n\t * Event whenever the empty state is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\temptyStateActionClick: EventEmitter<null>;\n\n\t/*\n\t * Wether to show the shadow or not\n\t */\n\t@Prop() shadow: boolean = true;\n\n\t/* Empty state end */\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\t@State() private _columns: any[] = [];\n\t@State() private _items: any[] = [];\n\n\t@State() private _enableRowSelection: boolean = this.enableRowSelection;\n\t@State() private _rowSelectionLimit: number | undefined;\n\n\tprivate _rowActionsFloatingAll: TableRowAction[] = [];\n\t@State() private _rowActionsFloating: TableRowAction[] = [];\n\t@State() private _rowActionsRow: TableRowAction[] = [];\n\n\tprivate _ctrlDown = false;\n\tprivate _hasCustomFilterSlot = false;\n\tprivate _floatingMenuShown = false;\n\tprivate _resizeTimeout: NodeJS.Timer;\n\n\tcomponentWillLoad() {\n\t\tthis._hasCustomFilterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"custom-filter\"]'\n\t\t);\n\n\t\tthis._setRowSelectionData();\n\n\t\tthis._setLocales();\n\t\tthis._parseItems(this.items);\n\t\tthis._generateColumns();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.hasRendered.emit();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-table'>\n\t\t\t\t<p-table-container shadow={this.shadow}>\n\t\t\t\t\t{this.enableHeader && (\n\t\t\t\t\t\t<p-table-header\n\t\t\t\t\t\t\t// quick filters\n\t\t\t\t\t\t\tquickFilters={this.quickFilters}\n\t\t\t\t\t\t\tactiveQuickFilterIdentifier={this.activeQuickFilterIdentifier}\n\t\t\t\t\t\t\tonQuickFilter={({ detail }) => this.quickFilter.emit(detail)}\n\t\t\t\t\t\t\t// search\n\t\t\t\t\t\t\tenableSearch={this.enableSearch}\n\t\t\t\t\t\t\tquery={this.query}\n\t\t\t\t\t\t\tonQueryChange={({ detail }) => this.queryChange.emit(detail)}\n\t\t\t\t\t\t\t// filter button\n\t\t\t\t\t\t\tenableFilter={this.enableFilter}\n\t\t\t\t\t\t\tenableFilterDesktop={this.enableFilterDesktop}\n\t\t\t\t\t\t\tselectedFiltersAmount={this.selectedFiltersAmount}\n\t\t\t\t\t\t\tfilterButtonTemplate={this.filterButtonTemplate}\n\t\t\t\t\t\t\tonFilter={() => this.filter.emit()}\n\t\t\t\t\t\t\t// action button\n\t\t\t\t\t\t\tenableAction={this.enableAction}\n\t\t\t\t\t\t\tactionIcon={this.actionButtonIcon}\n\t\t\t\t\t\t\tactionText={this.actionButtonText}\n\t\t\t\t\t\t\tactionLoading={this.actionButtonLoading}\n\t\t\t\t\t\t\tcanUseAction={this.actionButtonEnabled}\n\t\t\t\t\t\t\tactionButtonTemplate={this.actionButtonTemplate}\n\t\t\t\t\t\t\tonAction={() => this.action.emit()}\n\t\t\t\t\t\t\titemsSelectedAmount={this.selectedRows?.length}\n\t\t\t\t\t\t\t//loading\n\t\t\t\t\t\t\tloading={this.headerLoading}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._hasCustomFilterSlot && (\n\t\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t\tname='custom-filter'\n\t\t\t\t\t\t\t\t\tslot='custom-filter'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</p-table-header>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this._getHeader()}\n\t\t\t\t\t<div class='flex flex-1 flex-col'>{this._getRows()}</div>\n\n\t\t\t\t\t{this.enableFooter && (\n\t\t\t\t\t\t<p-table-footer\n\t\t\t\t\t\t\t// overall\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\t// page size select\n\t\t\t\t\t\t\tenablePageSize={this.enablePageSize}\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\tpageSizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\tonPageSizeChange={({ detail }) =>\n\t\t\t\t\t\t\t\tthis.pageSizeChange.emit(detail)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// pagination\n\t\t\t\t\t\t\tenablePagination={this.enablePagination}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\t// export\n\t\t\t\t\t\t\tenableExport={this.enableExport}\n\t\t\t\t\t\t\tonExport={() => this.export.emit()}\n\t\t\t\t\t\t\t//loading\n\t\t\t\t\t\t\tloading={this.footerLoading}\n\t\t\t\t\t\t></p-table-footer>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enableFloatingMenu && this._enableRowSelection ? (\n\t\t\t\t\t\t<p-floating-menu-container\n\t\t\t\t\t\t\tusedInTable={true}\n\t\t\t\t\t\t\tclass={`${this.selectedRows?.length ? '' : 'inactive'} ${\n\t\t\t\t\t\t\t\tthis._floatingMenuShown ? 'shown' : ''\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\thover={false}\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\tclass={\n\t\t\t\t\t\t\t\t\tthis._rowActionsFloating?.length ? 'hidden tablet:flex' : ''\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.floatingMenuAmountSelectedTemplate(\n\t\t\t\t\t\t\t\t\tthis.selectedRows?.length\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\tclass={`mx-0 text-storm ${\n\t\t\t\t\t\t\t\t\tthis._rowActionsFloating?.length ? 'hidden tablet:flex' : ''\n\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this._rowActionsFloating?.length &&\n\t\t\t\t\t\t\t\tthis._rowActionsFloating.map(a => (\n\t\t\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\t\t\tdisabled={a.disabled}\n\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t!a.disabled &&\n\t\t\t\t\t\t\t\t\t\t\t!a.loading &&\n\t\t\t\t\t\t\t\t\t\t\t!!a.action &&\n\t\t\t\t\t\t\t\t\t\t\ta.type === 'single'\n\t\t\t\t\t\t\t\t\t\t\t\t? a.action(this.selectedRows[0], false)\n\t\t\t\t\t\t\t\t\t\t\t\t: a.action(this.selectedRows, true)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{a.label}{' '}\n\t\t\t\t\t\t\t\t\t\t{a.loading ? (\n\t\t\t\t\t\t\t\t\t\t\t<p-loader></p-loader>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={a.icon}\n\t\t\t\t\t\t\t\t\t\t\t\trotate={a.iconRotate}\n\t\t\t\t\t\t\t\t\t\t\t\tflip={a.iconFlip}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{this._rowActionsFloating?.length && (\n\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\tclass='mx-0 text-storm'\n\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\tonClick={() => this._selectAllChange(null, false)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<p-icon variant='negative' />\n\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t</p-floating-menu-container>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t''\n\t\t\t\t\t)}\n\t\t\t\t</p-table-container>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\t@Listen('tableDefinitionChanged', { target: 'body' })\n\tonTableDefinitionUpdated() {\n\t\tthis._generateColumns();\n\t}\n\n\t@Listen('keydown', { target: 'document' })\n\tkeyDown({ key }) {\n\t\tif (key !== 'Control' || this._ctrlDown === true) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = true;\n\t}\n\n\t@Listen('keyup', { target: 'document' })\n\tkeyUp({ key }) {\n\t\tif (key !== 'Control' || this._ctrlDown === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = false;\n\t}\n\n\t@Listen('visibilitychange', { target: 'document' })\n\tvisibilityChange() {\n\t\tif (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = false;\n\t}\n\n\t@Watch('items')\n\tprivate _parseItems(items: string) {\n\t\tif (!items) {\n\t\t\tthis._items = [];\n\t\t\treturn;\n\t\t}\n\n\t\tif (Array.isArray(items)) {\n\t\t\tthis._items = items;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._items = JSON.parse(items);\n\t}\n\n\t@Watch('enableRowSelection')\n\t@Watch('rowSelectionLimit')\n\t@Watch('selectedRows')\n\t@Listen('resize', { target: 'window' })\n\tprivate _setRowSelectionData() {\n\t\tif (this._resizeTimeout) {\n\t\t\tclearTimeout(this._resizeTimeout);\n\t\t}\n\n\t\t// We add a timeout here because it's a lot easier on the machine to do these when someone is done\n\t\t// resizing and playing around with their browser\n\t\tthis._resizeTimeout = setTimeout(() => {\n\t\t\tconst mobile = isMobile();\n\n\t\t\t// we hack this to any[] to make it work..\n\t\t\tconst actions = Array.from(\n\t\t\t\tthis._el.querySelectorAll(':scope > p-table-row-action')\n\t\t\t) as any[] as TableRowAction[];\n\t\t\tthis._rowActionsRow = actions.filter(\n\t\t\t\ta => a.type === 'both' || a.type === 'single'\n\t\t\t);\n\t\t\tthis._rowActionsFloatingAll = actions\n\t\t\t\t.filter(\n\t\t\t\t\ta =>\n\t\t\t\t\t\t(this.enableRowSelection &&\n\t\t\t\t\t\t\t(a.type === 'both' || a.type === 'multi')) ||\n\t\t\t\t\t\t(mobile && a.type === 'single')\n\t\t\t\t)\n\t\t\t\t.map(a => {\n\t\t\t\t\tif (a.type === 'single') {\n\t\t\t\t\t\ta.disabled = this.selectedRows?.length > 1;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t});\n\n\t\t\tlet rowSelectionLimit = this.rowSelectionLimit;\n\t\t\tif (\n\t\t\t\tmobile && // we're mobile\n\t\t\t\tthis._rowActionsFloatingAll?.length && // we have atleast 1 item in _rowActionsFloating\n\t\t\t\t((rowSelectionLimit !== undefined && this.enableRowSelection) ||\n\t\t\t\t\t!this.enableRowSelection)\n\t\t\t) {\n\t\t\t\trowSelectionLimit = 1;\n\t\t\t}\n\n\t\t\tthis._rowSelectionLimit = rowSelectionLimit;\n\n\t\t\tlet enableRowSelection = this.enableRowSelection;\n\t\t\tif (\n\t\t\t\tmobile && // we're mobile\n\t\t\t\tthis._rowActionsFloatingAll?.length && // we have atleast 1 item in _rowActionsFloating\n\t\t\t\t!enableRowSelection\n\t\t\t) {\n\t\t\t\tenableRowSelection = true;\n\t\t\t}\n\n\t\t\tthis._enableRowSelection = enableRowSelection;\n\n\t\t\tif (this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\t\t}, 200);\n\t}\n\n\tprivate _generateColumns() {\n\t\tconst definitions = this._el.querySelectorAll('p-table-column');\n\t\tlet definitionsArray = Array.from(definitions);\n\n\t\tdefinitionsArray = this._parseDefinitions(definitionsArray);\n\n\t\tthis._columns = definitionsArray;\n\t}\n\n\tprivate _getHeader() {\n\t\treturn (\n\t\t\t<p-table-row variant='header'>\n\t\t\t\t{this._columns.map((col: TableColumn, index) => (\n\t\t\t\t\t<p-table-cell\n\t\t\t\t\t\tdefinition={col}\n\t\t\t\t\t\tvalue={col.name}\n\t\t\t\t\t\tvariant='header'\n\t\t\t\t\t\tcheckbox={\n\t\t\t\t\t\t\tindex === 0 || col.hasCheckbox\n\t\t\t\t\t\t\t\t? this._getCheckbox(null, this.loading ? 'loading' : 'header')\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t></p-table-cell>\n\t\t\t\t))}\n\t\t\t</p-table-row>\n\t\t);\n\t}\n\n\tprivate _getRows() {\n\t\tif (this.loading) {\n\t\t\treturn Array.from(\n\t\t\t\t{\n\t\t\t\t\tlength: this.amountOfLoadingRows,\n\t\t\t\t},\n\t\t\t\t(_, i) => (\n\t\t\t\t\t<p-table-row\n\t\t\t\t\t\tenableHover={this._enableRowSelection || this.enableRowClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._getLoadingColumns(i)}\n\t\t\t\t\t</p-table-row>\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif (!this._items.length) {\n\t\t\treturn this._getEmptyState();\n\t\t}\n\n\t\treturn this._items.map((item, index) => (\n\t\t\t<p-table-row\n\t\t\t\tenableHover={this._enableRowSelection || this.enableRowClick}\n\t\t\t\tonClick={ev => this._rowClick(ev, index)}\n\t\t\t>\n\t\t\t\t{this._getRowColumns(item, index)}\n\t\t\t</p-table-row>\n\t\t));\n\t}\n\n\tprivate _getRowColumns(item, index) {\n\t\tconst actions = this._rowActionsRow.filter(a =>\n\t\t\ta.showFunction ? a.showFunction(item) : true\n\t\t);\n\n\t\tconst columns = this._columns.map((col: TableColumn, colIndex) => {\n\t\t\treturn (\n\t\t\t\t<p-table-cell\n\t\t\t\t\tdefinition={col}\n\t\t\t\t\titem={item}\n\t\t\t\t\tcheckbox={\n\t\t\t\t\t\tcolIndex === 0 || col.hasCheckbox ? this._getCheckbox(index) : null\n\t\t\t\t\t}\n\t\t\t\t\tindex={colIndex}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t\ttableHasActions={!!actions.length && !isMobile()}\n\t\t\t\t></p-table-cell>\n\t\t\t);\n\t\t});\n\n\t\tif (actions?.length && !isMobile()) {\n\t\t\tconst def = this._parseRowActionsRowDefinition();\n\n\t\t\tif (!actions.length) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tcolumns.push(\n\t\t\t\t<p-table-cell\n\t\t\t\t\tvariant='actions'\n\t\t\t\t\tdefinition={def}\n\t\t\t\t\titem={item}\n\t\t\t\t\tindex={this._columns.length - 1}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t\ttableHasActions={true}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tslot='actions'\n\t\t\t\t\t\tclass='ml-auto flex items-center gap-2'\n\t\t\t\t\t>\n\t\t\t\t\t\t{actions.map(a => (\n\t\t\t\t\t\t\t<p-tooltip content={a.label}>\n\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\tdata-is-action\n\t\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\t\ticon={a.icon}\n\t\t\t\t\t\t\t\t\ticonRotate={a.iconRotate}\n\t\t\t\t\t\t\t\t\ticonFlip={a.iconFlip}\n\t\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\ttypeof a.action === 'function' && a.action?.(item, false)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t></p-button>\n\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</p-table-cell>\n\t\t\t);\n\t\t}\n\n\t\treturn columns;\n\t}\n\n\tprivate _getLoadingColumns(index) {\n\t\treturn this._columns.map((col: TableColumn, colIndex) => {\n\t\t\treturn (\n\t\t\t\t<p-table-cell\n\t\t\t\t\tdefinition={col}\n\t\t\t\t\tvariant='loading'\n\t\t\t\t\tcheckbox={\n\t\t\t\t\t\tcolIndex === 0 || col.hasCheckbox\n\t\t\t\t\t\t\t? this._getCheckbox(index, 'loading')\n\t\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t\tindex={colIndex}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t></p-table-cell>\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate _getCheckbox(\n\t\trowIndex: number,\n\t\tvariant: 'header' | 'default' | 'loading' = 'default'\n\t) {\n\t\tif (\n\t\t\t!this._enableRowSelection ||\n\t\t\t(!this.selectionKey && !this._rowActionsFloating?.length)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (variant === 'loading') {\n\t\t\treturn (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-6 rounded'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (variant === 'header') {\n\t\t\treturn (\n\t\t\t\t<input\n\t\t\t\t\tclass={`p-input ${\n\t\t\t\t\t\tthis._rowSelectionLimit !== undefined && 'opacity-0'\n\t\t\t\t\t}`}\n\t\t\t\t\ttype='checkbox'\n\t\t\t\t\tonChange={ev => this._selectAllChange(ev)}\n\t\t\t\t\tchecked={this._selectionContainsAll()}\n\t\t\t\t\tindeterminate={this._selectionIndeterminate()}\n\t\t\t\t\tdisabled={this._rowSelectionLimit !== undefined}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst item = this._items[rowIndex];\n\n\t\tconst selectionContains = this._selectionContains(rowIndex);\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\tclass='p-input'\n\t\t\t\ttype='checkbox'\n\t\t\t\tonChange={ev => this._checkboxChange(ev?.target, rowIndex)}\n\t\t\t\tdisabled={\n\t\t\t\t\t(this.canSelectKey && !item[this.canSelectKey]) ||\n\t\t\t\t\t(this._rowSelectionLimit !== undefined &&\n\t\t\t\t\t\t!selectionContains &&\n\t\t\t\t\t\tthis.selectedRows.length === this._rowSelectionLimit)\n\t\t\t\t}\n\t\t\t\tchecked={selectionContains}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _getEmptyState() {\n\t\tif (this.query?.length || this.selectedFiltersAmount) {\n\t\t\treturn (\n\t\t\t\t<div class='flex max-w-[20rem] flex-col items-center self-center py-24 text-center'>\n\t\t\t\t\t<p-illustration\n\t\t\t\t\t\tvariant='empty-state-search'\n\t\t\t\t\t\tclass='mb-6'\n\t\t\t\t\t/>\n\t\t\t\t\t<p class='text-storm-default font-semibold'>\n\t\t\t\t\t\t{this.emptyStateFilteredHeader()}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class='mb-14 text-sm text-storm-medium'>\n\t\t\t\t\t\t{this.emptyStateFilteredContent()}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={`flex max-w-[20rem] flex-col items-center self-center py-24 text-center ${\n\t\t\t\t\tthis.enableEmptyStateAction && 'cursor-pointer'\n\t\t\t\t}`}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tthis.enableEmptyStateAction && this.emptyStateActionClick.emit(null)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<p-illustration\n\t\t\t\t\tvariant='empty-state-add'\n\t\t\t\t\tclass='mb-6'\n\t\t\t\t/>\n\t\t\t\t<p class='text-storm-default font-semibold'>\n\t\t\t\t\t{this.emptyStateHeader()}\n\t\t\t\t</p>\n\t\t\t\t<p class='mb-6 text-sm text-storm-medium'>{this.emptyStateContent()}</p>\n\t\t\t\t{this.enableEmptyStateAction && (\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\ticon='plus'\n\t\t\t\t\t\tsize='small'\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.emptyStateAction()}\n\t\t\t\t\t</p-button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _selectAllChange($event: any, forceValue?: boolean) {\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value =\n\t\t\tforceValue === undefined\n\t\t\t\t? this._getCheckedValue($event.target)\n\t\t\t\t: forceValue;\n\t\tif (value) {\n\t\t\tconst toAdd = [];\n\t\t\tfor (let i = 0; i < this._items.length; i++) {\n\t\t\t\tconst row = this._items[i];\n\t\t\t\tif (this.canSelectKey && !row[this.canSelectKey]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (this._selectionContains(i)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttoAdd.push(row);\n\t\t\t\tthis.rowSelected.emit(row);\n\n\t\t\t\tif (\n\t\t\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\t\t\tthis.selectedRows.length + toAdd.length === this._rowSelectionLimit\n\t\t\t\t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.selectedRows = [...this.selectedRows, ...toAdd];\n\t\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\t\tif (this.enableFloatingMenu && !this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.selectedRows.length; i++) {\n\t\t\tconst value = this.selectedRows[i];\n\t\t\tconst row = this._items.find(\n\t\t\t\td => this._getSelectionValue(d, i) === this._getSelectionValue(value, i)\n\t\t\t);\n\n\t\t\tif (!row) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.rowDeselected.emit(row);\n\t\t}\n\n\t\tthis.selectedRows = [];\n\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t}\n\n\tprivate _checkboxChange(target: any, index: number) {\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = this._getCheckedValue(target);\n\t\tif (\n\t\t\tvalue &&\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length >= this._rowSelectionLimit\n\t\t) {\n\t\t\ttarget.checked = false;\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = this._items[index];\n\n\t\tif (this.canSelectKey && !row[this.canSelectKey]) {\n\t\t\ttarget.checked = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (value) {\n\t\t\tthis.selectedRows = [\n\t\t\t\t...this.selectedRows,\n\t\t\t\t{\n\t\t\t\t\t...row,\n\t\t\t\t\tindex,\n\t\t\t\t},\n\t\t\t];\n\t\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\t\tthis.rowSelected.emit(row);\n\n\t\t\tif (this.enableFloatingMenu && !this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst indexOfToRemove = this._selectionContains(index, true);\n\n\t\t// we need to do this, because splice does not trigger the selection setter.\n\t\tconst selection = [...this.selectedRows];\n\t\tselection.splice(indexOfToRemove, 1);\n\t\tthis.selectedRows = selection;\n\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\tthis.rowDeselected.emit(row);\n\t}\n\n\tprivate _getCheckedValue(target: any) {\n\t\treturn target?.checked;\n\t}\n\n\tprivate _getSelectionValue(row: any, index: number) {\n\t\treturn this.selectionKey ? row?.[this.selectionKey] || index : index;\n\t}\n\n\tprivate _selectionContains(index, returnIndex = false): any {\n\t\tconst returnValue = this.selectedRows.findIndex(\n\t\t\titem => item.index === index\n\t\t);\n\t\treturn !returnIndex ? returnValue >= 0 : returnValue;\n\t}\n\n\tprivate _selectionContainsAll() {\n\t\tlet returnValue = true;\n\t\tif (!this._items?.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length === this._rowSelectionLimit\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (let i = 0; i < this._items?.length; i++) {\n\t\t\tconst contains = this._selectionContains(i);\n\n\t\t\tif (!contains) {\n\t\t\t\treturnValue = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn returnValue;\n\t}\n\n\tprivate _selectionIndeterminate() {\n\t\tif (!this._items?.length || !this.selectedRows?.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length === this._rowSelectionLimit\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet containsCount = 0;\n\t\tfor (let i = 0; i < this._items?.length; i++) {\n\t\t\tconst contains = this._selectionContains(i);\n\n\t\t\tif (contains) {\n\t\t\t\tcontainsCount++;\n\t\t\t}\n\t\t}\n\n\t\treturn containsCount > 0 && containsCount !== this._items.length;\n\t}\n\n\tprivate _rowClick($event, index) {\n\t\tconst target = $event.target;\n\n\t\tif (\n\t\t\ttarget.tagName.toLowerCase() === 'input' ||\n\t\t\ttarget.type === 'checkbox'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = this._findRow($event.target);\n\t\tconst action = this._findRowAction($event.target);\n\n\t\tif (action) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.enableRowClick) {\n\t\t\tconst item = this._items[index];\n\t\t\tthis.rowClick.emit({\n\t\t\t\titem,\n\t\t\t\tctrlDown: this._ctrlDown,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n\t\tif (!checkbox) {\n\t\t\treturn;\n\t\t}\n\n\t\tcheckbox.checked = !checkbox.checked;\n\t\tthis._checkboxChange(checkbox, index);\n\t}\n\n\tprivate _findRow(el: HTMLElement) {\n\t\tif (!el) {\n\t\t\treturn el;\n\t\t}\n\n\t\tif (el?.tagName?.toLowerCase() === 'p-table-row') {\n\t\t\treturn el;\n\t\t}\n\n\t\treturn this._findRow(el?.parentElement);\n\t}\n\n\tprivate _findRowAction(el: HTMLElement) {\n\t\tif (!el) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (\n\t\t\tel.getAttribute('data-is-action') !== null &&\n\t\t\tel.getAttribute('data-is-action') !== 'false'\n\t\t) {\n\t\t\treturn el;\n\t\t}\n\n\t\tif (el?.tagName?.toLowerCase() === 'p-table-row') {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._findRowAction(el?.parentElement);\n\t}\n\n\tprivate _showFloatingMenu() {\n\t\tlet actions = this._rowActionsFloatingAll;\n\t\tif (\n\t\t\tthis.rowSelectionLimit === 1 &&\n\t\t\tactions.findIndex(\n\t\t\t\ta => (a.type === 'single' || a.type === 'both') && a.showFunction\n\t\t\t) >= 0\n\t\t) {\n\t\t\tactions = actions.filter(\n\t\t\t\ta =>\n\t\t\t\t\ta.type === 'multi' ||\n\t\t\t\t\t!a.showFunction ||\n\t\t\t\t\ta.showFunction(this.selectedRows[0])\n\t\t\t);\n\t\t}\n\n\t\tthis._rowActionsFloating = actions;\n\t\tthis._floatingMenuShown = true;\n\t}\n\n\tprivate _parseDefinitions(definitionsArray: HTMLPTableColumnElement[]) {\n\t\tconst definitions = definitionsArray.map(definition => {\n\t\t\tdefinition = this._parseDefinitionSizes(definition);\n\t\t\tdefinition.isLast = {};\n\t\t\treturn definition;\n\t\t});\n\n\t\tconst matchedIsLast = tableColumSizesOptions.reduce(\n\t\t\t(data: { [key: string]: boolean }, size) => {\n\t\t\t\tdata[size] = false;\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tfor (let i = definitions.length - 1; i >= 0; i--) {\n\t\t\tconst definition = definitions[i];\n\n\t\t\tfor (const size of tableColumSizesOptions) {\n\t\t\t\tif (matchedIsLast[size]) {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (definition.parsedSizes![size] === 'hidden') {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isLastAtSizeFound = this._findLastDefinitionBySize(\n\t\t\t\t\tdefinitions,\n\t\t\t\t\tsize\n\t\t\t\t);\n\t\t\t\tif (isLastAtSizeFound) {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tdefinition.isLast[size] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn definitions;\n\t}\n\n\tprivate _findLastDefinitionBySize(\n\t\tdefinitions: HTMLPTableColumnElement[],\n\t\tsize: string\n\t) {\n\t\treturn definitions\n\t\t\t.slice()\n\t\t\t.reverse()\n\t\t\t.find(d => d.isLast[size] === true);\n\t}\n\n\tprivate _parseDefinitionSizes(definition: HTMLPTableColumnElement) {\n\t\tconst definitionAny = definition as any;\n\t\tlet parsedSizes: TableColumnSizes = { default: 'full' };\n\n\t\tif (\n\t\t\ttypeof definition.sizes === 'string' &&\n\t\t\t!['auto', 'hidden', 'full'].includes(definition.sizes)\n\t\t) {\n\t\t\tdefinition.sizes = JSON.parse(definition.sizes);\n\t\t}\n\n\t\tfor (const [index, size] of tableColumSizesOptions.entries()) {\n\t\t\tif (\n\t\t\t\tdefinitionAny.sizes === 'auto' ||\n\t\t\t\tdefinitionAny.sizes === 'hidden' ||\n\t\t\t\tdefinitionAny.sizes === 'full' ||\n\t\t\t\ttypeof definitionAny.sizes === 'number'\n\t\t\t) {\n\t\t\t\tparsedSizes[size] =\n\t\t\t\t\tdefinitionAny.sizes === 'auto' ? 'full' : definitionAny.sizes;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tparsedSizes[size] =\n\t\t\t\tdefinitionAny.sizes[size] ??\n\t\t\t\tparsedSizes[tableColumSizesOptions[index - 1]];\n\t\t}\n\n\t\tdefinition.parsedSizes = parsedSizes;\n\t\treturn definition;\n\t}\n\n\tprivate _parseRowActionsRowDefinition() {\n\t\tconst isLast = tableColumSizesOptions.reduce(\n\t\t\t(data: { [key: string]: boolean }, size) => {\n\t\t\t\tdata[size] = true;\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tconst sizes: TableColumnSizes = { default: 0 };\n\n\t\tfor (const size of tableColumSizesOptions) {\n\t\t\tconst lastColumn = this._findLastDefinitionBySize(this._columns, size);\n\t\t\tsizes[size] = lastColumn!.parsedSizes![size]!;\n\t\t}\n\n\t\treturn {\n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,mCACzB,WAAW,CAACA,8BAAsB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;KAChD;IAED,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;IACrC,OAAO,UAAU,CAAC;GAClB;EAEO,6BAA6B;IACpC,MAAM,MAAM,GAAGA,8BAAsB,CAAC,MAAM,CAC3C,CAAC,IAAgC,EAAE,IAAI;MACtC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;MAClB,OAAO,IAAI,CAAC;KACZ,EACD,EAAE,CACF,CAAC;IACF,MAAM,KAAK,GAAqB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAE/C,KAAK,MAAM,IAAI,IAAIA,8BAAsB,EAAE;MAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;MACvE,KAAK,CAAC,IAAI,CAAC,GAAG,UAAW,CAAC,WAAY,CAAC,IAAI,CAAE,CAAC;KAC9C;IAED,OAAO;MACN,MAAM;MACN,KAAK;MACL,WAAW,EAAE,KAAK;MAClB,KAAK,EAAE,KAAK;MACZ,IAAI,EAAE,IAAI;MACV,IAAI,EAAE,IAAI;KACK,CAAC;GACjB;;;;;;;;;;;;;","names":["formatTranslation","defaultSize","defaultSizeOptions","h","Host","getLocaleComponentStrings","isMobile","index","tableColumSizesOptions"],"sources":["src/components/organisms/table/table.component.scss?tag=p-table","src/components/organisms/table/table.component.tsx"],"sourcesContent":["p-table {\n\t@apply relative flex flex-col;\n\n\t.p-input[type='checkbox'] {\n\t\tflex-shrink: 0;\n\t}\n\n\tp-table-container {\n\t\t@apply relative;\n\n\t\tp-floating-menu-container {\n\t\t\t@apply fixed bottom-4 left-1/2 -translate-x-1/2 transform;\n\t\t\tanimation: forwards floatingMenuContainerIn 0.3s ease !important;\n\n\t\t\t@screen tablet {\n\t\t\t\t@apply absolute bottom-16;\n\t\t\t}\n\n\t\t\t&:not(.shown) {\n\t\t\t\t@apply hidden;\n\t\t\t}\n\n\t\t\t&.inactive {\n\t\t\t\tanimation: forwards floatingMenuContainerOut 0.3s ease !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@keyframes floatingMenuContainerOut {\n\t0% {\n\t\tdisplay: flex;\n\t\ttransform: translateY(0) translateX(-50%);\n\t\topacity: 100;\n\t}\n\t99% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: flex;\n\t}\n\t100% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n}\n\n@keyframes floatingMenuContainerIn {\n\t0% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n\t1% {\n\t\ttransform: translateY(100%) translateX(-50%);\n\t\topacity: 0;\n\t\tdisplay: flex;\n\t}\n\t100% {\n\t\ttransform: translateY(0) translateX(-50%);\n\t\topacity: 100;\n\t\tdisplay: flex;\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { IconVariant } from '../../../components';\nimport { tableColumSizesOptions } from '../../../types/constants';\nimport {\n\tQuickFilter,\n\tRowClickEvent,\n\tTableColumnSizes,\n} from '../../../types/table';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n\tisMobile,\n} from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport { TableRowAction } from '../../helpers/table-row-action/table-row-action.component';\nimport {\n\tdefaultSize,\n\tdefaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\nexport type amountSelectedTemplateFunc = (amount: number) => string;\n\n@Component({\n\ttag: 'p-table',\n\tstyleUrl: 'table.component.scss',\n})\nexport class Table {\n\t/**\n\t * The items to be fed to the table\n\t */\n\t@Prop() items: string;\n\n\t/**\n\t * Wether data is loading\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether the header should show loading state\n\t */\n\t@Prop() headerLoading: boolean = false;\n\n\t/**\n\t * Wether the footer should show loading state\n\t */\n\t@Prop() footerLoading: boolean = false;\n\n\t/**\n\t * The amount of loading rows to show\n\t */\n\t@Prop() amountOfLoadingRows: number = 6;\n\n\t/**\n\t * Wether to enable selection\n\t */\n\t@Prop() enableRowSelection: boolean = true;\n\n\t/**\n\t * A limit to the amount of rows that can be selected\n\t */\n\t@Prop() rowSelectionLimit: number | undefined;\n\n\t/**\n\t * Wether to enable row clicking\n\t */\n\t@Prop() enableRowClick: boolean = true;\n\n\t/**\n\t * The current selection of items\n\t */\n\t@Prop() selectedRows: any[] = [];\n\n\t/**\n\t * Wether to enable the floating menu\n\t */\n\t@Prop() enableFloatingMenu: boolean = true;\n\n\t/**\n\t * The template for amount selected item in the floating menu\n\t */\n\t@Prop() floatingMenuAmountSelectedTemplate: amountSelectedTemplateFunc = (\n\t\tamount: number\n\t) =>\n\t\tformatTranslation(\n\t\t\t(amount === 1\n\t\t\t\t? this._locales.floating_menu?.amount_selected\n\t\t\t\t: this._locales.floating_menu?.amount_selected_plural\n\t\t\t)?.replace('{{amount}}', amount)\n\t\t);\n\n\t/**\n\t * Event whenever the current selection changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectedRowsChange: EventEmitter<any>;\n\n\t/**\n\t * The key to determine if a row is selected\n\t */\n\t@Prop() selectionKey: string;\n\n\t/**\n\t * A key to determine if a row can be selected\n\t */\n\t@Prop() canSelectKey: string;\n\n\t/**\n\t * Event whenever a row is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowClick: EventEmitter<RowClickEvent>;\n\n\t/**\n\t * Event whenever a row is selected\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowSelected: EventEmitter<any>;\n\n\t/**\n\t * Event whenever a row is deselected\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\trowDeselected: EventEmitter<any>;\n\n\t/**\n\t * Event when the table has rendered\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\thasRendered: EventEmitter<number>;\n\n\t/** START HEADER */\n\n\t/**\n\t * Wether to show the header\n\t */\n\t@Prop() enableHeader: boolean = true;\n\n\t/**\n\t * Quick filters to show\n\t */\n\t@Prop() quickFilters: QuickFilter[] = [];\n\n\t/**\n\t * Active quick filter identifier\n\t */\n\t@Prop() activeQuickFilterIdentifier: string;\n\n\t/**\n\t * Wether to show the search input\n\t */\n\t@Prop() enableSearch: boolean = true;\n\n\t/**\n\t * The query to show in the search bar\n\t */\n\t@Prop({ mutable: true }) query: string;\n\n\t/**\n\t * Wether to show the filter button\n\t */\n\t@Prop() enableFilter: boolean = true;\n\n\t/**\n\t * Wether to show the filter button on desktop\n\t */\n\t@Prop() enableFilterDesktop: boolean = true;\n\n\t/**\n\t * The amount of filters being selected\n\t */\n\t@Prop() selectedFiltersAmount: number;\n\n\t/**\n\t * The template for the filter button text\n\t */\n\t@Prop() filterButtonTemplate: templateFunc;\n\n\t/**\n\t * Wether to show the action button\n\t */\n\t@Prop() enableAction: boolean = false;\n\n\t/**\n\t * Wether the action button is loading\n\t */\n\t@Prop() actionButtonLoading: boolean = false;\n\n\t/**\n\t * Wether the action button is enabled\n\t */\n\t@Prop() actionButtonEnabled: boolean = false;\n\n\t/**\n\t * The action button icon\n\t */\n\t@Prop() actionButtonIcon: IconVariant = 'pencil';\n\n\t/**\n\t * The action button text if changed\n\t */\n\t@Prop() actionButtonText: string;\n\n\t/**\n\t * The template for the action button text\n\t */\n\t@Prop() actionButtonTemplate: buttonTemplateFunc;\n\n\t/**\n\t * Event when one of the quick filters is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tquickFilter: EventEmitter<QuickFilter>;\n\n\t/**\n\t * Event when the query changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the filter button is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tfilter: EventEmitter<null>;\n\n\t/**\n\t * Event when the action button is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\taction: EventEmitter<null>;\n\n\t/** START FOOTER */\n\n\t/**\n\t * Wether to show the header\n\t */\n\t@Prop() enableFooter: boolean = true;\n\n\t/**\n\t * Wether to enable page size select\n\t */\n\t@Prop() enablePageSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination\n\t */\n\t@Prop() enablePagination: boolean = true;\n\n\t/**\n\t * Wether to enable export\n\t */\n\t@Prop() enableExport: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = defaultSize;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\texport: EventEmitter<number>;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/* Empty state start */\n\t@Prop() emptyStateHeader: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.header);\n\t@Prop() emptyStateContent: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.content);\n\t@Prop() emptyStateAction: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state?.no_filter.action);\n\t/**\n\t * Wether to enable empty state action\n\t */\n\t@Prop() enableEmptyStateAction: boolean = true;\n\n\t@Prop() emptyStateFilteredHeader: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state.filtered.header);\n\t@Prop() emptyStateFilteredContent: templateFunc = () =>\n\t\tformatTranslation(this._locales.empty_state.filtered.content);\n\n\t/**\n\t * Event whenever the empty state is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\temptyStateActionClick: EventEmitter<null>;\n\n\t/*\n\t * Wether to show the shadow or not\n\t */\n\t@Prop() shadow: boolean = true;\n\n\t/* Empty state end */\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\t@State() private _columns: any[] = [];\n\t@State() private _items: any[] = [];\n\n\t@State() private _enableRowSelection: boolean = this.enableRowSelection;\n\t@State() private _rowSelectionLimit: number | undefined;\n\n\tprivate _rowActionsFloatingAll: TableRowAction[] = [];\n\t@State() private _rowActionsFloating: TableRowAction[] = [];\n\t@State() private _rowActionsRow: TableRowAction[] = [];\n\n\tprivate _ctrlDown = false;\n\tprivate _hasCustomFilterSlot = false;\n\tprivate _hasCustomActionsSlot = false;\n\tprivate _floatingMenuShown = false;\n\tprivate _resizeTimeout: NodeJS.Timer;\n\n\tcomponentWillLoad() {\n\t\tthis._hasCustomFilterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"custom-filter\"]'\n\t\t);\n\n\t\tthis._hasCustomActionsSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"custom-actions\"]'\n\t\t);\n\n\t\tthis._setRowSelectionData();\n\n\t\tthis._setLocales();\n\t\tthis._parseItems(this.items);\n\t\tthis._generateColumns();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.hasRendered.emit();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-table'>\n\t\t\t\t<p-table-container shadow={this.shadow}>\n\t\t\t\t\t{this.enableHeader && (\n\t\t\t\t\t\t<p-table-header\n\t\t\t\t\t\t\t// quick filters\n\t\t\t\t\t\t\tquickFilters={this.quickFilters}\n\t\t\t\t\t\t\tactiveQuickFilterIdentifier={this.activeQuickFilterIdentifier}\n\t\t\t\t\t\t\tonQuickFilter={({ detail }) => this.quickFilter.emit(detail)}\n\t\t\t\t\t\t\t// search\n\t\t\t\t\t\t\tenableSearch={this.enableSearch}\n\t\t\t\t\t\t\tquery={this.query}\n\t\t\t\t\t\t\tonQueryChange={({ detail }) => this.queryChange.emit(detail)}\n\t\t\t\t\t\t\t// filter button\n\t\t\t\t\t\t\tenableFilter={this.enableFilter}\n\t\t\t\t\t\t\tenableFilterDesktop={this.enableFilterDesktop}\n\t\t\t\t\t\t\tselectedFiltersAmount={this.selectedFiltersAmount}\n\t\t\t\t\t\t\tfilterButtonTemplate={this.filterButtonTemplate}\n\t\t\t\t\t\t\tonFilter={() => this.filter.emit()}\n\t\t\t\t\t\t\t// action button\n\t\t\t\t\t\t\tenableAction={this.enableAction}\n\t\t\t\t\t\t\tactionIcon={this.actionButtonIcon}\n\t\t\t\t\t\t\tactionText={this.actionButtonText}\n\t\t\t\t\t\t\tactionLoading={this.actionButtonLoading}\n\t\t\t\t\t\t\tcanUseAction={this.actionButtonEnabled}\n\t\t\t\t\t\t\tactionButtonTemplate={this.actionButtonTemplate}\n\t\t\t\t\t\t\tonAction={() => this.action.emit()}\n\t\t\t\t\t\t\titemsSelectedAmount={this.selectedRows?.length}\n\t\t\t\t\t\t\t//loading\n\t\t\t\t\t\t\tloading={this.headerLoading}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._hasCustomFilterSlot && (\n\t\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t\tname='custom-filter'\n\t\t\t\t\t\t\t\t\tslot='custom-filter'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{this._hasCustomActionsSlot && (\n\t\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t\tname='custom-actions'\n\t\t\t\t\t\t\t\t\tslot='custom-actions'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</p-table-header>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this._getHeader()}\n\t\t\t\t\t<div class='flex flex-1 flex-col'>{this._getRows()}</div>\n\n\t\t\t\t\t{this.enableFooter && (\n\t\t\t\t\t\t<p-table-footer\n\t\t\t\t\t\t\t// overall\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\t// page size select\n\t\t\t\t\t\t\tenablePageSize={this.enablePageSize}\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\tpageSizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\tonPageSizeChange={({ detail }) =>\n\t\t\t\t\t\t\t\tthis.pageSizeChange.emit(detail)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// pagination\n\t\t\t\t\t\t\tenablePagination={this.enablePagination}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\t// export\n\t\t\t\t\t\t\tenableExport={this.enableExport}\n\t\t\t\t\t\t\tonExport={() => this.export.emit()}\n\t\t\t\t\t\t\t//loading\n\t\t\t\t\t\t\tloading={this.footerLoading}\n\t\t\t\t\t\t></p-table-footer>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enableFloatingMenu && this._enableRowSelection ? (\n\t\t\t\t\t\t<p-floating-menu-container\n\t\t\t\t\t\t\tusedInTable={true}\n\t\t\t\t\t\t\tclass={`${this.selectedRows?.length ? '' : 'inactive'} ${\n\t\t\t\t\t\t\t\tthis._floatingMenuShown ? 'shown' : ''\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\thover={false}\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\tclass={\n\t\t\t\t\t\t\t\t\tthis._rowActionsFloating?.length ? 'hidden tablet:flex' : ''\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.floatingMenuAmountSelectedTemplate(\n\t\t\t\t\t\t\t\t\tthis.selectedRows?.length\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\tclass={`mx-0 text-storm ${\n\t\t\t\t\t\t\t\t\tthis._rowActionsFloating?.length ? 'hidden tablet:flex' : ''\n\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this._rowActionsFloating?.length &&\n\t\t\t\t\t\t\t\tthis._rowActionsFloating.map(a => (\n\t\t\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\t\t\tdisabled={a.disabled}\n\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t!a.disabled &&\n\t\t\t\t\t\t\t\t\t\t\t!a.loading &&\n\t\t\t\t\t\t\t\t\t\t\t!!a.action &&\n\t\t\t\t\t\t\t\t\t\t\ta.type === 'single'\n\t\t\t\t\t\t\t\t\t\t\t\t? a.action(this.selectedRows[0], false)\n\t\t\t\t\t\t\t\t\t\t\t\t: a.action(this.selectedRows, true)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{a.label}{' '}\n\t\t\t\t\t\t\t\t\t\t{a.loading ? (\n\t\t\t\t\t\t\t\t\t\t\t<p-loader></p-loader>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={a.icon}\n\t\t\t\t\t\t\t\t\t\t\t\trotate={a.iconRotate}\n\t\t\t\t\t\t\t\t\t\t\t\tflip={a.iconFlip}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{this._rowActionsFloating?.length && (\n\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\tclass='mx-0 text-storm'\n\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<p-floating-menu-item\n\t\t\t\t\t\t\t\tslot='floating-menu-item'\n\t\t\t\t\t\t\t\tonClick={() => this._selectAllChange(null, false)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<p-icon variant='negative' />\n\t\t\t\t\t\t\t</p-floating-menu-item>\n\t\t\t\t\t\t</p-floating-menu-container>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t''\n\t\t\t\t\t)}\n\t\t\t\t</p-table-container>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\t@Listen('tableDefinitionChanged', { target: 'body' })\n\tonTableDefinitionUpdated() {\n\t\tthis._generateColumns();\n\t}\n\n\t@Listen('keydown', { target: 'document' })\n\tkeyDown({ key }) {\n\t\tif (key !== 'Control' || this._ctrlDown === true) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = true;\n\t}\n\n\t@Listen('keyup', { target: 'document' })\n\tkeyUp({ key }) {\n\t\tif (key !== 'Control' || this._ctrlDown === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = false;\n\t}\n\n\t@Listen('visibilitychange', { target: 'document' })\n\tvisibilityChange() {\n\t\tif (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._ctrlDown = false;\n\t}\n\n\t@Watch('items')\n\tprivate _parseItems(items: string) {\n\t\tif (!items) {\n\t\t\tthis._items = [];\n\t\t\treturn;\n\t\t}\n\n\t\tif (Array.isArray(items)) {\n\t\t\tthis._items = items;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._items = JSON.parse(items);\n\t}\n\n\t@Watch('enableRowSelection')\n\t@Watch('rowSelectionLimit')\n\t@Watch('selectedRows')\n\t@Listen('resize', { target: 'window' })\n\tprivate _setRowSelectionData() {\n\t\tif (this._resizeTimeout) {\n\t\t\tclearTimeout(this._resizeTimeout);\n\t\t}\n\n\t\t// We add a timeout here because it's a lot easier on the machine to do these when someone is done\n\t\t// resizing and playing around with their browser\n\t\tthis._resizeTimeout = setTimeout(() => {\n\t\t\tconst mobile = isMobile();\n\n\t\t\t// we hack this to any[] to make it work..\n\t\t\tconst actions = Array.from(\n\t\t\t\tthis._el.querySelectorAll(':scope > p-table-row-action')\n\t\t\t) as any[] as TableRowAction[];\n\t\t\tthis._rowActionsRow = actions.filter(\n\t\t\t\ta => a.type === 'both' || a.type === 'single'\n\t\t\t);\n\t\t\tthis._rowActionsFloatingAll = actions\n\t\t\t\t.filter(\n\t\t\t\t\ta =>\n\t\t\t\t\t\t(this.enableRowSelection &&\n\t\t\t\t\t\t\t(a.type === 'both' || a.type === 'multi')) ||\n\t\t\t\t\t\t(mobile && a.type === 'single')\n\t\t\t\t)\n\t\t\t\t.map(a => {\n\t\t\t\t\tif (a.type === 'single') {\n\t\t\t\t\t\ta.disabled = this.selectedRows?.length > 1;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t});\n\n\t\t\tlet rowSelectionLimit = this.rowSelectionLimit;\n\t\t\tif (\n\t\t\t\tmobile && // we're mobile\n\t\t\t\tthis._rowActionsFloatingAll?.length && // we have atleast 1 item in _rowActionsFloating\n\t\t\t\t((rowSelectionLimit !== undefined && this.enableRowSelection) ||\n\t\t\t\t\t!this.enableRowSelection)\n\t\t\t) {\n\t\t\t\trowSelectionLimit = 1;\n\t\t\t}\n\n\t\t\tthis._rowSelectionLimit = rowSelectionLimit;\n\n\t\t\tlet enableRowSelection = this.enableRowSelection;\n\t\t\tif (\n\t\t\t\tmobile && // we're mobile\n\t\t\t\tthis._rowActionsFloatingAll?.length && // we have atleast 1 item in _rowActionsFloating\n\t\t\t\t!enableRowSelection\n\t\t\t) {\n\t\t\t\tenableRowSelection = true;\n\t\t\t}\n\n\t\t\tthis._enableRowSelection = enableRowSelection;\n\n\t\t\tif (this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\t\t}, 200);\n\t}\n\n\tprivate _generateColumns() {\n\t\tconst definitions = this._el.querySelectorAll('p-table-column');\n\t\tlet definitionsArray = Array.from(definitions);\n\n\t\tdefinitionsArray = this._parseDefinitions(definitionsArray);\n\n\t\tthis._columns = definitionsArray;\n\t}\n\n\tprivate _getHeader() {\n\t\treturn (\n\t\t\t<p-table-row variant='header'>\n\t\t\t\t{this._columns.map((col: TableColumn, index) => (\n\t\t\t\t\t<p-table-cell\n\t\t\t\t\t\tdefinition={col}\n\t\t\t\t\t\tvalue={col.name}\n\t\t\t\t\t\tvariant='header'\n\t\t\t\t\t\tcheckbox={\n\t\t\t\t\t\t\tindex === 0 || col.hasCheckbox\n\t\t\t\t\t\t\t\t? this._getCheckbox(null, this.loading ? 'loading' : 'header')\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t></p-table-cell>\n\t\t\t\t))}\n\t\t\t</p-table-row>\n\t\t);\n\t}\n\n\tprivate _getRows() {\n\t\tif (this.loading) {\n\t\t\treturn Array.from(\n\t\t\t\t{\n\t\t\t\t\tlength: this.amountOfLoadingRows,\n\t\t\t\t},\n\t\t\t\t(_, i) => (\n\t\t\t\t\t<p-table-row\n\t\t\t\t\t\tenableHover={this._enableRowSelection || this.enableRowClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._getLoadingColumns(i)}\n\t\t\t\t\t</p-table-row>\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif (!this._items.length) {\n\t\t\treturn this._getEmptyState();\n\t\t}\n\n\t\treturn this._items.map((item, index) => (\n\t\t\t<p-table-row\n\t\t\t\tenableHover={this._enableRowSelection || this.enableRowClick}\n\t\t\t\tonClick={ev => this._rowClick(ev, index)}\n\t\t\t>\n\t\t\t\t{this._getRowColumns(item, index)}\n\t\t\t</p-table-row>\n\t\t));\n\t}\n\n\tprivate _getRowColumns(item, index) {\n\t\tconst actions = this._rowActionsRow.filter(a =>\n\t\t\ta.showFunction ? a.showFunction(item) : true\n\t\t);\n\n\t\tconst columns = this._columns.map((col: TableColumn, colIndex) => {\n\t\t\treturn (\n\t\t\t\t<p-table-cell\n\t\t\t\t\tdefinition={col}\n\t\t\t\t\titem={item}\n\t\t\t\t\tcheckbox={\n\t\t\t\t\t\tcolIndex === 0 || col.hasCheckbox ? this._getCheckbox(index) : null\n\t\t\t\t\t}\n\t\t\t\t\tindex={colIndex}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t\ttableHasActions={!!actions.length && !isMobile()}\n\t\t\t\t></p-table-cell>\n\t\t\t);\n\t\t});\n\n\t\tif (actions?.length && !isMobile()) {\n\t\t\tconst def = this._parseRowActionsRowDefinition();\n\n\t\t\tif (!actions.length) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tcolumns.push(\n\t\t\t\t<p-table-cell\n\t\t\t\t\tvariant='actions'\n\t\t\t\t\tdefinition={def}\n\t\t\t\t\titem={item}\n\t\t\t\t\tindex={this._columns.length - 1}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t\ttableHasActions={true}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tslot='actions'\n\t\t\t\t\t\tclass='ml-auto flex items-center gap-2'\n\t\t\t\t\t>\n\t\t\t\t\t\t{actions.map(a => (\n\t\t\t\t\t\t\t<p-tooltip content={a.label}>\n\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\tdata-is-action\n\t\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\t\ticon={a.icon}\n\t\t\t\t\t\t\t\t\ticonRotate={a.iconRotate}\n\t\t\t\t\t\t\t\t\ticonFlip={a.iconFlip}\n\t\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\ttypeof a.action === 'function' && a.action?.(item, false)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t></p-button>\n\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</p-table-cell>\n\t\t\t);\n\t\t}\n\n\t\treturn columns;\n\t}\n\n\tprivate _getLoadingColumns(index) {\n\t\treturn this._columns.map((col: TableColumn, colIndex) => {\n\t\t\treturn (\n\t\t\t\t<p-table-cell\n\t\t\t\t\tdefinition={col}\n\t\t\t\t\tvariant='loading'\n\t\t\t\t\tcheckbox={\n\t\t\t\t\t\tcolIndex === 0 || col.hasCheckbox\n\t\t\t\t\t\t\t? this._getCheckbox(index, 'loading')\n\t\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t\tindex={colIndex}\n\t\t\t\t\trowIndex={index}\n\t\t\t\t></p-table-cell>\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate _getCheckbox(\n\t\trowIndex: number,\n\t\tvariant: 'header' | 'default' | 'loading' = 'default'\n\t) {\n\t\tif (\n\t\t\t!this._enableRowSelection ||\n\t\t\t(!this.selectionKey && !this._rowActionsFloating?.length)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (variant === 'loading') {\n\t\t\treturn (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-6 rounded'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (variant === 'header') {\n\t\t\treturn (\n\t\t\t\t<input\n\t\t\t\t\tclass={`p-input ${\n\t\t\t\t\t\tthis._rowSelectionLimit !== undefined && 'opacity-0'\n\t\t\t\t\t}`}\n\t\t\t\t\ttype='checkbox'\n\t\t\t\t\tonChange={ev => this._selectAllChange(ev)}\n\t\t\t\t\tchecked={this._selectionContainsAll()}\n\t\t\t\t\tindeterminate={this._selectionIndeterminate()}\n\t\t\t\t\tdisabled={this._rowSelectionLimit !== undefined}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst item = this._items[rowIndex];\n\n\t\tconst selectionContains = this._selectionContains(rowIndex);\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\tclass='p-input'\n\t\t\t\ttype='checkbox'\n\t\t\t\tonChange={ev => this._checkboxChange(ev?.target, rowIndex)}\n\t\t\t\tdisabled={\n\t\t\t\t\t(this.canSelectKey && !item[this.canSelectKey]) ||\n\t\t\t\t\t(this._rowSelectionLimit !== undefined &&\n\t\t\t\t\t\t!selectionContains &&\n\t\t\t\t\t\tthis.selectedRows.length === this._rowSelectionLimit)\n\t\t\t\t}\n\t\t\t\tchecked={selectionContains}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _getEmptyState() {\n\t\tif (this.query?.length || this.selectedFiltersAmount) {\n\t\t\treturn (\n\t\t\t\t<div class='flex max-w-[20rem] flex-col items-center self-center py-24 text-center'>\n\t\t\t\t\t<p-illustration\n\t\t\t\t\t\tvariant='empty-state-search'\n\t\t\t\t\t\tclass='mb-6'\n\t\t\t\t\t/>\n\t\t\t\t\t<p class='text-storm-default font-semibold'>\n\t\t\t\t\t\t{this.emptyStateFilteredHeader()}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class='mb-14 text-sm text-storm-medium'>\n\t\t\t\t\t\t{this.emptyStateFilteredContent()}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={`flex max-w-[20rem] flex-col items-center self-center py-24 text-center ${\n\t\t\t\t\tthis.enableEmptyStateAction && 'cursor-pointer'\n\t\t\t\t}`}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tthis.enableEmptyStateAction && this.emptyStateActionClick.emit(null)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<p-illustration\n\t\t\t\t\tvariant='empty-state-add'\n\t\t\t\t\tclass='mb-6'\n\t\t\t\t/>\n\t\t\t\t<p class='text-storm-default font-semibold'>\n\t\t\t\t\t{this.emptyStateHeader()}\n\t\t\t\t</p>\n\t\t\t\t<p class='mb-6 text-sm text-storm-medium'>{this.emptyStateContent()}</p>\n\t\t\t\t{this.enableEmptyStateAction && (\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\ticon='plus'\n\t\t\t\t\t\tsize='small'\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.emptyStateAction()}\n\t\t\t\t\t</p-button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _selectAllChange($event: any, forceValue?: boolean) {\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value =\n\t\t\tforceValue === undefined\n\t\t\t\t? this._getCheckedValue($event.target)\n\t\t\t\t: forceValue;\n\t\tif (value) {\n\t\t\tconst toAdd = [];\n\t\t\tfor (let i = 0; i < this._items.length; i++) {\n\t\t\t\tconst row = this._items[i];\n\t\t\t\tif (this.canSelectKey && !row[this.canSelectKey]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (this._selectionContains(i)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttoAdd.push(row);\n\t\t\t\tthis.rowSelected.emit(row);\n\n\t\t\t\tif (\n\t\t\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\t\t\tthis.selectedRows.length + toAdd.length === this._rowSelectionLimit\n\t\t\t\t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.selectedRows = [...this.selectedRows, ...toAdd];\n\t\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\t\tif (this.enableFloatingMenu && !this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.selectedRows.length; i++) {\n\t\t\tconst value = this.selectedRows[i];\n\t\t\tconst row = this._items.find(\n\t\t\t\td => this._getSelectionValue(d, i) === this._getSelectionValue(value, i)\n\t\t\t);\n\n\t\t\tif (!row) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.rowDeselected.emit(row);\n\t\t}\n\n\t\tthis.selectedRows = [];\n\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t}\n\n\tprivate _checkboxChange(target: any, index: number) {\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = this._getCheckedValue(target);\n\t\tif (\n\t\t\tvalue &&\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length >= this._rowSelectionLimit\n\t\t) {\n\t\t\ttarget.checked = false;\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = this._items[index];\n\n\t\tif (this.canSelectKey && !row[this.canSelectKey]) {\n\t\t\ttarget.checked = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (value) {\n\t\t\tthis.selectedRows = [\n\t\t\t\t...this.selectedRows,\n\t\t\t\t{\n\t\t\t\t\t...row,\n\t\t\t\t\tindex,\n\t\t\t\t},\n\t\t\t];\n\t\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\t\tthis.rowSelected.emit(row);\n\n\t\t\tif (this.enableFloatingMenu && !this._floatingMenuShown) {\n\t\t\t\tthis._showFloatingMenu();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst indexOfToRemove = this._selectionContains(index, true);\n\n\t\t// we need to do this, because splice does not trigger the selection setter.\n\t\tconst selection = [...this.selectedRows];\n\t\tselection.splice(indexOfToRemove, 1);\n\t\tthis.selectedRows = selection;\n\t\tthis.selectedRowsChange.emit(this.selectedRows);\n\t\tthis.rowDeselected.emit(row);\n\t}\n\n\tprivate _getCheckedValue(target: any) {\n\t\treturn target?.checked;\n\t}\n\n\tprivate _getSelectionValue(row: any, index: number) {\n\t\treturn this.selectionKey ? row?.[this.selectionKey] || index : index;\n\t}\n\n\tprivate _selectionContains(index, returnIndex = false): any {\n\t\tconst returnValue = this.selectedRows.findIndex(\n\t\t\titem => item.index === index\n\t\t);\n\t\treturn !returnIndex ? returnValue >= 0 : returnValue;\n\t}\n\n\tprivate _selectionContainsAll() {\n\t\tlet returnValue = true;\n\t\tif (!this._items?.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length === this._rowSelectionLimit\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (let i = 0; i < this._items?.length; i++) {\n\t\t\tconst contains = this._selectionContains(i);\n\n\t\t\tif (!contains) {\n\t\t\t\treturnValue = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn returnValue;\n\t}\n\n\tprivate _selectionIndeterminate() {\n\t\tif (!this._items?.length || !this.selectedRows?.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\tthis._rowSelectionLimit !== undefined &&\n\t\t\tthis.selectedRows.length === this._rowSelectionLimit\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet containsCount = 0;\n\t\tfor (let i = 0; i < this._items?.length; i++) {\n\t\t\tconst contains = this._selectionContains(i);\n\n\t\t\tif (contains) {\n\t\t\t\tcontainsCount++;\n\t\t\t}\n\t\t}\n\n\t\treturn containsCount > 0 && containsCount !== this._items.length;\n\t}\n\n\tprivate _rowClick($event, index) {\n\t\tconst target = $event.target;\n\n\t\tif (\n\t\t\ttarget.tagName.toLowerCase() === 'input' ||\n\t\t\ttarget.type === 'checkbox'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = this._findRow($event.target);\n\t\tconst action = this._findRowAction($event.target);\n\n\t\tif (action) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.enableRowClick) {\n\t\t\tconst item = this._items[index];\n\t\t\tthis.rowClick.emit({\n\t\t\t\titem,\n\t\t\t\tctrlDown: this._ctrlDown,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._enableRowSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n\t\tif (!checkbox) {\n\t\t\treturn;\n\t\t}\n\n\t\tcheckbox.checked = !checkbox.checked;\n\t\tthis._checkboxChange(checkbox, index);\n\t}\n\n\tprivate _findRow(el: HTMLElement) {\n\t\tif (!el) {\n\t\t\treturn el;\n\t\t}\n\n\t\tif (el?.tagName?.toLowerCase() === 'p-table-row') {\n\t\t\treturn el;\n\t\t}\n\n\t\treturn this._findRow(el?.parentElement);\n\t}\n\n\tprivate _findRowAction(el: HTMLElement) {\n\t\tif (!el) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (\n\t\t\tel.getAttribute('data-is-action') !== null &&\n\t\t\tel.getAttribute('data-is-action') !== 'false'\n\t\t) {\n\t\t\treturn el;\n\t\t}\n\n\t\tif (el?.tagName?.toLowerCase() === 'p-table-row') {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._findRowAction(el?.parentElement);\n\t}\n\n\tprivate _showFloatingMenu() {\n\t\tlet actions = this._rowActionsFloatingAll;\n\t\tif (\n\t\t\tthis.rowSelectionLimit === 1 &&\n\t\t\tactions.findIndex(\n\t\t\t\ta => (a.type === 'single' || a.type === 'both') && a.showFunction\n\t\t\t) >= 0\n\t\t) {\n\t\t\tactions = actions.filter(\n\t\t\t\ta =>\n\t\t\t\t\ta.type === 'multi' ||\n\t\t\t\t\t!a.showFunction ||\n\t\t\t\t\ta.showFunction(this.selectedRows[0])\n\t\t\t);\n\t\t}\n\n\t\tthis._rowActionsFloating = actions;\n\t\tthis._floatingMenuShown = true;\n\t}\n\n\tprivate _parseDefinitions(definitionsArray: HTMLPTableColumnElement[]) {\n\t\tconst definitions = definitionsArray.map(definition => {\n\t\t\tdefinition = this._parseDefinitionSizes(definition);\n\t\t\tdefinition.isLast = {};\n\t\t\treturn definition;\n\t\t});\n\n\t\tconst matchedIsLast = tableColumSizesOptions.reduce(\n\t\t\t(data: { [key: string]: boolean }, size) => {\n\t\t\t\tdata[size] = false;\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tfor (let i = definitions.length - 1; i >= 0; i--) {\n\t\t\tconst definition = definitions[i];\n\n\t\t\tfor (const size of tableColumSizesOptions) {\n\t\t\t\tif (matchedIsLast[size]) {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (definition.parsedSizes![size] === 'hidden') {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isLastAtSizeFound = this._findLastDefinitionBySize(\n\t\t\t\t\tdefinitions,\n\t\t\t\t\tsize\n\t\t\t\t);\n\t\t\t\tif (isLastAtSizeFound) {\n\t\t\t\t\tdefinition.isLast[size] = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tdefinition.isLast[size] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn definitions;\n\t}\n\n\tprivate _findLastDefinitionBySize(\n\t\tdefinitions: HTMLPTableColumnElement[],\n\t\tsize: string\n\t) {\n\t\treturn definitions\n\t\t\t.slice()\n\t\t\t.reverse()\n\t\t\t.find(d => d.isLast[size] === true);\n\t}\n\n\tprivate _parseDefinitionSizes(definition: HTMLPTableColumnElement) {\n\t\tconst definitionAny = definition as any;\n\t\tlet parsedSizes: TableColumnSizes = { default: 'full' };\n\n\t\tif (\n\t\t\ttypeof definition.sizes === 'string' &&\n\t\t\t!['auto', 'hidden', 'full'].includes(definition.sizes)\n\t\t) {\n\t\t\tdefinition.sizes = JSON.parse(definition.sizes);\n\t\t}\n\n\t\tfor (const [index, size] of tableColumSizesOptions.entries()) {\n\t\t\tif (\n\t\t\t\tdefinitionAny.sizes === 'auto' ||\n\t\t\t\tdefinitionAny.sizes === 'hidden' ||\n\t\t\t\tdefinitionAny.sizes === 'full' ||\n\t\t\t\ttypeof definitionAny.sizes === 'number'\n\t\t\t) {\n\t\t\t\tparsedSizes[size] =\n\t\t\t\t\tdefinitionAny.sizes === 'auto' ? 'full' : definitionAny.sizes;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tparsedSizes[size] =\n\t\t\t\tdefinitionAny.sizes[size] ??\n\t\t\t\tparsedSizes[tableColumSizesOptions[index - 1]];\n\t\t}\n\n\t\tdefinition.parsedSizes = parsedSizes;\n\t\treturn definition;\n\t}\n\n\tprivate _parseRowActionsRowDefinition() {\n\t\tconst isLast = tableColumSizesOptions.reduce(\n\t\t\t(data: { [key: string]: boolean }, size) => {\n\t\t\t\tdata[size] = true;\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tconst sizes: TableColumnSizes = { default: 0 };\n\n\t\tfor (const size of tableColumSizesOptions) {\n\t\t\tconst lastColumn = this._findLastDefinitionBySize(this._columns, size);\n\t\t\tsizes[size] = lastColumn!.parsedSizes![size]!;\n\t\t}\n\n\t\treturn {\n\t\t\tisLast,\n\t\t\tsizes,\n\t\t\tparsedSizes: sizes,\n\t\t\talign: 'end',\n\t\t\ttype: 'td',\n\t\t\tpath: null,\n\t\t} as TableColumn;\n\t}\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1fde8b14.js');
6
6
  const floatingUi_dom_esm = require('./floating-ui.dom.esm-62336770.js');
7
7
 
8
- const tooltipComponentCss = ".pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-tooltip{z-index:601!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-0{height:0!important}.h-2{height:.5rem!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rounded{border-radius:.25rem!important}.bg-negative{background-color:rgb(185 30 40/var(--tw-bg-opacity))!important}.bg-negative,.bg-storm{--tw-bg-opacity:1!important}.bg-storm{background-color:rgb(81 83 107/var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.uppercase{text-transform:uppercase!important}.opacity-0{opacity:0!important}.drop-shadow-4{--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13))!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}:host{cursor:pointer;display:flex}:host .popover-container{height:0;position:relative;width:0}:host .popover-container .popover{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;display:inline-block;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);font-size:.75rem;font-weight:500;left:0;line-height:1rem;max-width:14.5rem;opacity:0;padding:.5rem .75rem;pointer-events:none;top:0;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:-moz-max-content;width:max-content;z-index:601}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element,:host .popover-container .popover.variant-hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(81 83 107/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));padding-bottom:.25rem;padding-top:.25rem}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element{--tw-bg-opacity:1;background-color:rgb(185 30 40/var(--tw-bg-opacity));letter-spacing:.05em;text-transform:uppercase}:host .popover-container .popover[data-show]{opacity:1;pointer-events:auto}:host .popover-container .popover .arrow,:host .popover-container .popover .arrow:before{background:inherit;height:.5rem;position:absolute;width:.5rem}:host .popover-container .popover .arrow{visibility:hidden}:host .popover-container .popover .arrow:before{--tw-rotate:45deg;content:\"\";transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));visibility:visible}:host .popover-container .popover[data-strategy=fixed]{position:fixed}:host .popover-container .popover[data-strategy=absolute]{position:absolute}:host .popover-container .popover[data-placement^=top]>.arrow{bottom:-.25rem}:host .popover-container .popover[data-placement^=bottom]>.arrow{top:-.25rem}:host .popover-container .popover[data-placement^=left]>.arrow{right:-.25rem}:host .popover-container .popover[data-placement^=right]>.arrow{left:-.25rem}.static{position:static!important}";
8
+ const tooltipComponentCss = ".pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-tooltip{z-index:601!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-0{height:0!important}.h-2{height:.5rem!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rounded{border-radius:.25rem!important}.bg-negative{background-color:rgb(185 30 40/var(--tw-bg-opacity))!important}.bg-negative,.bg-storm{--tw-bg-opacity:1!important}.bg-storm{background-color:rgb(81 83 107/var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.uppercase{text-transform:uppercase!important}.opacity-0{opacity:0!important}.drop-shadow-4{--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13))!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}:host{cursor:pointer;display:flex}:host .popover-container{height:0;position:relative;width:0}:host .popover-container .popover{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;display:inline-block;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);font-size:.75rem;font-weight:500;left:0;line-height:1rem;max-width:14.5rem;opacity:0;padding:.5rem .75rem;pointer-events:none;top:0;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:-moz-max-content;width:max-content;z-index:601}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element,:host .popover-container .popover.variant-hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(81 83 107/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));padding-bottom:.25rem;padding-top:.25rem}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element{--tw-bg-opacity:1;background-color:rgb(185 30 40/var(--tw-bg-opacity));letter-spacing:.05em;text-transform:uppercase}:host .popover-container .popover[data-show]{opacity:1;pointer-events:auto}:host .popover-container .popover .arrow,:host .popover-container .popover .arrow:before{background:inherit;height:.5rem;position:absolute;width:.5rem}:host .popover-container .popover .arrow{visibility:hidden}:host .popover-container .popover .arrow:before{--tw-rotate:45deg;content:\"\";transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));visibility:visible}:host .popover-container .popover[data-strategy=fixed]{position:fixed}:host .popover-container .popover[data-strategy=absolute]{position:absolute}:host .popover-container .popover[data-placement^=top]>.arrow{bottom:-.25rem}:host .popover-container .popover[data-placement^=bottom]>.arrow{top:-.25rem}:host .popover-container .popover[data-placement^=left]>.arrow{right:-.25rem}:host .popover-container .popover[data-placement^=right]>.arrow{left:-.25rem}.static{position:static!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
9
9
 
10
10
  const Tooltip = class {
11
11
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"p-tooltip.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,4nIAA4nI;;MC2B3oI,OAAO;;;;IAsDX,oBAAe,GAAG,KAAK,CAAC;IAExB,YAAO,GAAG,KAAK,CAAC;mBApDyC,OAAO;mBAKjD,IAAI;qBAKI,KAAK;kBAKX,CAAC;oBAKG,UAAU;2BAKJ,IAAI;gBAKf,KAAK;4BAKO,IAAI;;EAqBxC,iBAAiB;IAChB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC9C,2BAA2B,CAC3B,CAAC;GACF;EAED,qBAAqB;IACpB,IAAI,CAAC,OAAO,EAAE,CAAC;GACf;EAED,oBAAoB;IACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;MAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACrB;GACD;EAED,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAC,WAAW,IACtBD,kBAAM,IAAI,EAAC,SAAS,GAAG,EACvBA,iBAAK,KAAK,EAAC,mBAAmB,IAC7BA,iBACC,KAAK,EAAE,mBAAmB,IAAI,CAAC,OAAO,EAAE,EACxC,IAAI,EAAC,SAAS,oBACE,IAAI,CAAC,SAAS,mBACf,IAAI,CAAC,QAAQ,EAC5B,GAAG,EAAE,EAAE,I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AM;gBACN,mBAAmB;cACpB,CAAC,IAAI,IAAI;gBACT,GAAG,CAAC,IAAI;gBACR,EAAE;UACN,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE;SAC9B,CAAC,CAAC;OACH;KACD,CAAC,CAAC;GACH;;;;;;;;;;","names":["h","Host","autoUpdate","computePosition","offset","flip","shift","arrow"],"sources":["src/components/atoms/tooltip/tooltip.component.scss?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply flex cursor-pointer;\n\n\t.popover-container {\n\t\t@apply relative h-0 w-0;\n\t\t.popover {\n\t\t\t@apply left-0 top-0 z-tooltip inline-block rounded bg-white px-3 py-2 text-xs font-medium opacity-0 drop-shadow-4 transition-opacity;\n\t\t\t@apply pointer-events-none;\n\t\t\twidth: max-content;\n\t\t\tmax-width: 14.5rem;\n\n\t\t\t&.variant-hover,\n\t\t\t&.variant-error,\n\t\t\t&.variant-error-element {\n\t\t\t\t@apply bg-storm py-1 text-white;\n\t\t\t}\n\n\t\t\t&.variant-error,\n\t\t\t&.variant-error-element {\n\t\t\t\t@apply bg-negative uppercase tracking-wider;\n\t\t\t}\n\n\t\t\t&[data-show] {\n\t\t\t\t@apply pointer-events-auto opacity-100;\n\t\t\t}\n\n\t\t\t.arrow,\n\t\t\t.arrow::before {\n\t\t\t\tbackground: inherit;\n\t\t\t\t@apply absolute h-2 w-2;\n\t\t\t}\n\n\t\t\t.arrow {\n\t\t\t\tvisibility: hidden;\n\n\t\t\t\t&::before {\n\t\t\t\t\t@apply visible rotate-45 transform;\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-strategy='fixed'] {\n\t\t\t\t@apply fixed;\n\t\t\t}\n\n\t\t\t&[data-strategy='absolute'] {\n\t\t\t\t@apply absolute;\n\t\t\t}\n\n\t\t\t&[data-placement^='top'] > .arrow {\n\t\t\t\t@apply -bottom-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='bottom'] > .arrow {\n\t\t\t\t@apply -top-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='left'] > .arrow {\n\t\t\t\t@apply -right-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='right'] > .arrow {\n\t\t\t\t@apply -left-1;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tarrow,\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.scss',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' | 'error-element' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: any = null;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-popover'>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div class='popover-container'>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`popover variant-${this.variant}`}\n\t\t\t\t\t\trole='popover'\n\t\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\t\tdata-strategy={this.strategy}\n\t\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t\t<div class='arrow'></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._popover.removeAttribute('data-show');\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst arrowEl = this._popover.querySelector('.arrow') as HTMLElement;\n\t\tif (!arrowEl) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' || this.variant === 'error-element'\n\t\t\t\t\t? 'top-end'\n\t\t\t\t\t: this.placement,\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [\n\t\t\t\toffset(this.variant === 'error' ? 14 : this.offset),\n\t\t\t\tflip(),\n\t\t\t\tshift(),\n\t\t\t\tarrow({ element: arrowEl, padding: 8 }),\n\t\t\t],\n\t\t}).then(({ x, y, placement, middlewareData }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\n\t\t\tif (middlewareData.arrow) {\n\t\t\t\tconst { x, y } = middlewareData.arrow;\n\n\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\tleft:\n\t\t\t\t\t\tthis.variant === 'error' || this.variant === 'error-element'\n\t\t\t\t\t\t\t? placement.indexOf('start') >= 0\n\t\t\t\t\t\t\t\t? '1rem'\n\t\t\t\t\t\t\t\t: 'calc(100% - 1rem)'\n\t\t\t\t\t\t\t: x != null\n\t\t\t\t\t\t\t? `${x}px`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\ttop: y != null ? `${y}px` : '',\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"],"version":3}
1
+ {"file":"p-tooltip.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,21IAA21I;;MC2B12I,OAAO;;;;IAsDX,oBAAe,GAAG,KAAK,CAAC;IAExB,YAAO,GAAG,KAAK,CAAC;mBApDyC,OAAO;mBAKjD,IAAI;qBAKI,KAAK;kBAKX,CAAC;oBAKG,UAAU;2BAKJ,IAAI;gBAKf,KAAK;4BAKO,IAAI;;EAqBxC,iBAAiB;IAChB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC9C,2BAA2B,CAC3B,CAAC;GACF;EAED,qBAAqB;IACpB,IAAI,CAAC,OAAO,EAAE,CAAC;GACf;EAED,oBAAoB;IACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;MAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACrB;GACD;EAED,MA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EAAE;QACzB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC;QAEtC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;UAC5B,IAAI,EACH,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,eAAe;cACzD,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC9B,MAAM;gBACN,mBAAmB;cACpB,CAAC,IAAI,IAAI;gBACT,GAAG,CAAC,IAAI;gBACR,EAAE;UACN,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE;SAC9B,CAAC,CAAC;OACH;KACD,CAAC,CAAC;GACH;;;;;;;;;;","names":["h","Host","autoUpdate","computePosition","offset","flip","shift","arrow"],"sources":["src/components/atoms/tooltip/tooltip.component.scss?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply flex cursor-pointer;\n\n\t.popover-container {\n\t\t@apply relative h-0 w-0;\n\t\t.popover {\n\t\t\t@apply left-0 top-0 z-tooltip inline-block rounded bg-white px-3 py-2 text-xs font-medium opacity-0 drop-shadow-4 transition-opacity;\n\t\t\t@apply pointer-events-none;\n\t\t\twidth: max-content;\n\t\t\tmax-width: 14.5rem;\n\n\t\t\t&.variant-hover,\n\t\t\t&.variant-error,\n\t\t\t&.variant-error-element {\n\t\t\t\t@apply bg-storm py-1 text-white;\n\t\t\t}\n\n\t\t\t&.variant-error,\n\t\t\t&.variant-error-element {\n\t\t\t\t@apply bg-negative uppercase tracking-wider;\n\t\t\t}\n\n\t\t\t&[data-show] {\n\t\t\t\t@apply pointer-events-auto opacity-100;\n\t\t\t}\n\n\t\t\t.arrow,\n\t\t\t.arrow::before {\n\t\t\t\tbackground: inherit;\n\t\t\t\t@apply absolute h-2 w-2;\n\t\t\t}\n\n\t\t\t.arrow {\n\t\t\t\tvisibility: hidden;\n\n\t\t\t\t&::before {\n\t\t\t\t\t@apply visible rotate-45 transform;\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-strategy='fixed'] {\n\t\t\t\t@apply fixed;\n\t\t\t}\n\n\t\t\t&[data-strategy='absolute'] {\n\t\t\t\t@apply absolute;\n\t\t\t}\n\n\t\t\t&[data-placement^='top'] > .arrow {\n\t\t\t\t@apply -bottom-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='bottom'] > .arrow {\n\t\t\t\t@apply -top-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='left'] > .arrow {\n\t\t\t\t@apply -right-1;\n\t\t\t}\n\n\t\t\t&[data-placement^='right'] > .arrow {\n\t\t\t\t@apply -left-1;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tarrow,\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.scss',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' | 'error-element' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: any = null;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-popover'>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div class='popover-container'>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`popover variant-${this.variant}`}\n\t\t\t\t\t\trole='popover'\n\t\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\t\tdata-strategy={this.strategy}\n\t\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t\t<div class='arrow'></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._popover.removeAttribute('data-show');\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst arrowEl = this._popover.querySelector('.arrow') as HTMLElement;\n\t\tif (!arrowEl) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' || this.variant === 'error-element'\n\t\t\t\t\t? 'top-end'\n\t\t\t\t\t: this.placement,\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [\n\t\t\t\toffset(this.variant === 'error' ? 14 : this.offset),\n\t\t\t\tflip(),\n\t\t\t\tshift(),\n\t\t\t\tarrow({ element: arrowEl, padding: 8 }),\n\t\t\t],\n\t\t}).then(({ x, y, placement, middlewareData }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\n\t\t\tif (middlewareData.arrow) {\n\t\t\t\tconst { x, y } = middlewareData.arrow;\n\n\t\t\t\tObject.assign(arrowEl.style, {\n\t\t\t\t\tleft:\n\t\t\t\t\t\tthis.variant === 'error' || this.variant === 'error-element'\n\t\t\t\t\t\t\t? placement.indexOf('start') >= 0\n\t\t\t\t\t\t\t\t? '1rem'\n\t\t\t\t\t\t\t\t: 'calc(100% - 1rem)'\n\t\t\t\t\t\t\t: x != null\n\t\t\t\t\t\t\t? `${x}px`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\ttop: y != null ? `${y}px` : '',\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"],"version":3}
@@ -1 +1 @@
1
- .pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-tooltip{z-index:601!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-0{height:0!important}.h-2{height:.5rem!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rounded{border-radius:.25rem!important}.bg-negative{background-color:rgb(185 30 40/var(--tw-bg-opacity))!important}.bg-negative,.bg-storm{--tw-bg-opacity:1!important}.bg-storm{background-color:rgb(81 83 107/var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.uppercase{text-transform:uppercase!important}.opacity-0{opacity:0!important}.drop-shadow-4{--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13))!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}:host{cursor:pointer;display:flex}:host .popover-container{height:0;position:relative;width:0}:host .popover-container .popover{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;display:inline-block;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);font-size:.75rem;font-weight:500;left:0;line-height:1rem;max-width:14.5rem;opacity:0;padding:.5rem .75rem;pointer-events:none;top:0;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:-moz-max-content;width:max-content;z-index:601}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element,:host .popover-container .popover.variant-hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(81 83 107/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));padding-bottom:.25rem;padding-top:.25rem}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element{--tw-bg-opacity:1;background-color:rgb(185 30 40/var(--tw-bg-opacity));letter-spacing:.05em;text-transform:uppercase}:host .popover-container .popover[data-show]{opacity:1;pointer-events:auto}:host .popover-container .popover .arrow,:host .popover-container .popover .arrow:before{background:inherit;height:.5rem;position:absolute;width:.5rem}:host .popover-container .popover .arrow{visibility:hidden}:host .popover-container .popover .arrow:before{--tw-rotate:45deg;content:"";transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));visibility:visible}:host .popover-container .popover[data-strategy=fixed]{position:fixed}:host .popover-container .popover[data-strategy=absolute]{position:absolute}:host .popover-container .popover[data-placement^=top]>.arrow{bottom:-.25rem}:host .popover-container .popover[data-placement^=bottom]>.arrow{top:-.25rem}:host .popover-container .popover[data-placement^=left]>.arrow{right:-.25rem}:host .popover-container .popover[data-placement^=right]>.arrow{left:-.25rem}.static{position:static!important}
1
+ .pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-tooltip{z-index:601!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-0{height:0!important}.h-2{height:.5rem!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rounded{border-radius:.25rem!important}.bg-negative{background-color:rgb(185 30 40/var(--tw-bg-opacity))!important}.bg-negative,.bg-storm{--tw-bg-opacity:1!important}.bg-storm{background-color:rgb(81 83 107/var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.uppercase{text-transform:uppercase!important}.opacity-0{opacity:0!important}.drop-shadow-4{--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13))!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}:host{cursor:pointer;display:flex}:host .popover-container{height:0;position:relative;width:0}:host .popover-container .popover{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;display:inline-block;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);font-size:.75rem;font-weight:500;left:0;line-height:1rem;max-width:14.5rem;opacity:0;padding:.5rem .75rem;pointer-events:none;top:0;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:-moz-max-content;width:max-content;z-index:601}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element,:host .popover-container .popover.variant-hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(81 83 107/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));padding-bottom:.25rem;padding-top:.25rem}:host .popover-container .popover.variant-error,:host .popover-container .popover.variant-error-element{--tw-bg-opacity:1;background-color:rgb(185 30 40/var(--tw-bg-opacity));letter-spacing:.05em;text-transform:uppercase}:host .popover-container .popover[data-show]{opacity:1;pointer-events:auto}:host .popover-container .popover .arrow,:host .popover-container .popover .arrow:before{background:inherit;height:.5rem;position:absolute;width:.5rem}:host .popover-container .popover .arrow{visibility:hidden}:host .popover-container .popover .arrow:before{--tw-rotate:45deg;content:"";transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));visibility:visible}:host .popover-container .popover[data-strategy=fixed]{position:fixed}:host .popover-container .popover[data-strategy=absolute]{position:absolute}:host .popover-container .popover[data-placement^=top]>.arrow{bottom:-.25rem}:host .popover-container .popover[data-placement^=bottom]>.arrow{top:-.25rem}:host .popover-container .popover[data-placement^=left]>.arrow{right:-.25rem}:host .popover-container .popover[data-placement^=right]>.arrow{left:-.25rem}.static{position:static!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}
@@ -1 +1 @@
1
- .flex{display:flex!important}.table{display:table!important}.h-\[3\.125rem\]{height:3.125rem!important}.h-\[4\.125rem\]{height:4.125rem!important}.h-\[6\.5rem\]{height:6.5rem!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.p-2{padding:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .content{align-items:center;display:flex;gap:.75rem;width:100%}:host .content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=xsmall]){height:1.5rem}:host([size=small]){height:2rem}:host([size=table]){height:2.5rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host([size=xlarge]){height:6.5rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .content,:host(.has-dropdown:hover) .content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}
1
+ .flex{display:flex!important}.table{display:table!important}.h-\[3\.125rem\]{height:3.125rem!important}.h-\[4\.125rem\]{height:4.125rem!important}.h-\[6\.5rem\]{height:6.5rem!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.p-2{padding:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .content{align-items:center;display:flex;gap:.75rem;width:100%}:host .content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=xsmall]){height:1.5rem}:host([size=small]){height:2rem}:host([size=table]){height:2.5rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host([size=xlarge]){height:6.5rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .content,:host(.has-dropdown:hover) .content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}
@@ -3,7 +3,7 @@ export class Stepper {
3
3
  constructor() {
4
4
  this._loaded = false;
5
5
  // private _steps: Array<HTMLPStepperItemElement>;
6
- this._delay = (amount) => new Promise((resolve) => setTimeout(resolve, amount));
6
+ this._delay = (amount) => new Promise(resolve => setTimeout(resolve, amount));
7
7
  this._onSlotChange = async (_e) => this._generateSteps();
8
8
  this._generateSteps = async (firstLoad = false) => {
9
9
  if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
@@ -37,8 +37,7 @@ export class Stepper {
37
37
  item.contentPosition = this.contentPosition;
38
38
  if (i < items.length - 1) {
39
39
  const nextItem = item.nextElementSibling;
40
- if (nextItem &&
41
- nextItem.tagName.toLowerCase() === 'p-stepper-item') {
40
+ if (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {
42
41
  // super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight
43
42
  // otherwise we always get the initial "16"
44
43
  if (directionChanged) {
@@ -49,7 +48,7 @@ export class Stepper {
49
48
  : item.clientHeight) / 2;
50
49
  const stepperLine = document.createElement('p-stepper-line');
51
50
  stepperLine.direction = this.direction;
52
- stepperLine.active = i <= activeStep;
51
+ stepperLine.active = i < activeStep;
53
52
  if (heightDiff > 0 && this.direction === 'vertical') {
54
53
  stepperLine.style.marginTop = `-${heightDiff / 16}rem`;
55
54
  stepperLine.style.marginBottom = `-${heightDiff / 16}rem`;
@@ -57,8 +56,7 @@ export class Stepper {
57
56
  }
58
57
  this._el.insertBefore(stepperLine, nextItem);
59
58
  const previous = stepperLine.previousElementSibling;
60
- if (previous &&
61
- previous.tagName.toLowerCase() === 'p-stepper-line') {
59
+ if (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {
62
60
  previous.remove();
63
61
  }
64
62
  continue;
@@ -89,7 +87,7 @@ export class Stepper {
89
87
  this._generateSteps(true);
90
88
  }
91
89
  render() {
92
- return (h(Host, { class: "p-stepper" }, h("slot", { onSlotchange: this._onSlotChange })));
90
+ return (h(Host, { class: 'p-stepper' }, h("slot", { onSlotchange: this._onSlotChange })));
93
91
  }
94
92
  _onActiveStepChange() {
95
93
  this._generateSteps();