@paperless/core 1.57.2 → 1.58.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.
- package/CHANGELOG.md +22 -0
- package/dist/build/{p-5298190b.entry.js → p-00d4647f.entry.js} +2 -2
- package/dist/build/p-00d4647f.entry.js.map +1 -0
- package/dist/build/p-30c9f5e3.entry.js +2 -0
- package/dist/build/p-30c9f5e3.entry.js.map +1 -0
- package/dist/build/p-576b6378.entry.js +2 -0
- package/dist/build/p-576b6378.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js +4 -3
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +2 -2
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tooltip.cjs.entry.js +5 -1
- package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +23 -4
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +5 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -1
- package/dist/collection/components/organisms/modal/modal.component.js +2 -2
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/components/modal-body.component.js +6 -4
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/p-modal.js +2 -2
- package/dist/components/p-modal.js.map +1 -1
- package/dist/components/tooltip.component.js +5 -1
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-modal-body_4.entry.js +4 -3
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js +2 -2
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/p-tooltip.entry.js +5 -1
- package/dist/esm/p-tooltip.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-5298190b.entry.js → p-00d4647f.entry.js} +2 -2
- package/dist/paperless/p-00d4647f.entry.js.map +1 -0
- package/dist/paperless/p-30c9f5e3.entry.js +2 -0
- package/dist/paperless/p-30c9f5e3.entry.js.map +1 -0
- package/dist/paperless/p-576b6378.entry.js +2 -0
- package/dist/paperless/p-576b6378.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +5 -1
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +2 -0
- package/dist/types/components.d.ts +10 -2
- package/hydrate/index.js +13 -7
- package/package.json +1 -1
- package/dist/build/p-0695e7ef.entry.js +0 -2
- package/dist/build/p-0695e7ef.entry.js.map +0 -1
- package/dist/build/p-3969a78e.entry.js +0 -2
- package/dist/build/p-3969a78e.entry.js.map +0 -1
- package/dist/build/p-5298190b.entry.js.map +0 -1
- package/dist/paperless/p-0695e7ef.entry.js +0 -2
- package/dist/paperless/p-0695e7ef.entry.js.map +0 -1
- package/dist/paperless/p-3969a78e.entry.js +0 -2
- package/dist/paperless/p-3969a78e.entry.js.map +0 -1
- package/dist/paperless/p-5298190b.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-tooltip.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,21IAA21I;;MC2B12I,OAAO;;;;IAsDX,YAAO,GAAG,KAAK,CAAC;mBAlDyC,OAAO;mBAKjD,IAAI;qBAKI,KAAK;kBAKX,CAAC;oBAKG,UAAU;2BAKJ,IAAI;gBAKf,KAAK;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CAAC;MAC5C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;QAClC,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;OACd,CAAC,CAAC;MAEH,IAAI,cAAc,CAAC,KAAK,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 _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\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) {\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;gBAK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ACvC;KACD,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE;MAC3C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;MAC5C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;QAClC,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;OACd,CAAC,CAAC;MAEH,IAAI,cAAc,CAAC,KAAK,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}
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"as\":[1],\"variant\":[1],\"underline\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"type\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"],\"buttonGroupPosition\":[1,\"button-group-position\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"rowSelectionLimit\":[2,\"row-selection-limit\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"enableFloatingMenu\":[4,\"enable-floating-menu\"],\"floatingMenuAmountSelectedTemplate\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionButtonLoading\":[4,\"action-button-loading\"],\"actionButtonEnabled\":[4,\"action-button-enabled\"],\"actionButtonIcon\":[1,\"action-button-icon\"],\"actionButtonText\":[1,\"action-button-text\"],\"actionButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"shadow\":[4],\"_locales\":[32],\"_columns\":[32],\"_items\":[32],\"_enableRowSelection\":[32],\"_rowSelectionLimit\":[32],\"_rowActionsFloating\":[32],\"_rowActionsRow\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"],[9,\"resize\",\"_setRowSelectionData\"]],{\"items\":[\"_parseItems\"],\"enableRowSelection\":[\"_setRowSelectionData\"],\"rowSelectionLimit\":[\"_setRowSelectionData\"],\"selectedRows\":[\"_setRowSelectionData\"]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"multi\":[516],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"dropdownDisplayKey\":[1,\"dropdown-display-key\"],\"selectionDisplayKey\":[1,\"selection-display-key\"],\"valueKey\":[1,\"value-key\"],\"avatarKey\":[1,\"avatar-key\"],\"iconKey\":[1,\"icon-key\"],\"showIconInSelectedItem\":[1,\"show-icon-in-selected-item\"],\"classKey\":[1,\"class-key\"],\"applyClassOnSelectedItem\":[1,\"apply-class-on-selected-item\"],\"avatarLettersKey\":[1,\"avatar-letters-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"enableSelectAll\":[4,\"enable-select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"selectAllIcon\":[1,\"select-all-icon\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"showAddItem\":[4,\"show-add-item\"],\"addItemText\":[1,\"add-item-text\"],\"emptyStateText\":[1,\"empty-state-text\"],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_allSelected\":[32],\"_amountHidden\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"],\"multi\":[\"multiChanges\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]},[[8,\"closeModal\",\"handleCloseModal\"]]]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"hideIconWhenFilled\":[4,\"hide-icon-when-filled\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"strategy\":[1],\"placement\":[513],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]},[[8,\"closeDrawer\",\"handleCloseDrawer\"],[8,\"forceCloseDrawer\",\"handleForceCloseDrawer\"]]]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"_rendering\":[32]},null,{\"activeStep\":[\"_onActiveStepChange\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-button-group.cjs\",[[1,\"p-button-group\",{\"size\":[1]},[[0,\"slotchange\",\"slotchange\"]]]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1040],\"parsedSizes\":[1040],\"sizes\":[1032]}]]],[\"p-table-row-action.cjs\",[[0,\"p-table-row-action\",{\"type\":[1537],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"label\":[1],\"action\":[16],\"disabled\":[4],\"loading\":[4],\"showFunction\":[16]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"letters\":[1],\"_src\":[32],\"_failed\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"iconPosition\":[1,\"icon-position\"],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"iconOnly\":[4,\"icon-only\"],\"size\":[513],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-divider.cjs\",[[1,\"p-divider\",{\"variant\":[513]}]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"allowOverflow\":[4,\"allow-overflow\"],\"scrollable\":[8]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"variant\":[1],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1],\"useContainer\":[4,\"use-container\"]}],[1,\"p-dropdown\",{\"placement\":[513],\"offset\":[2],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"allowOverflow\":[4,\"allow-overflow\"],\"scrollable\":[8],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"applyChevron\":[4,\"apply-chevron\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"offset\":[2],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"forceShowTooltip\":[516,\"force-show-tooltip\"],\"focusMethod\":[1,\"focus-method\"],\"errorVariant\":[1,\"error-variant\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-floating-menu-container_8.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionLoading\":[4,\"action-loading\"],\"actionIcon\":[1,\"action-icon\"],\"actionText\":[1,\"action-text\"],\"canUseAction\":[1028,\"can-use-action\"],\"actionButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"tableHasActions\":[4,\"table-has-actions\"],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[1,\"p-floating-menu-container\",{\"usedInTable\":[4,\"used-in-table\"]}],[1,\"p-floating-menu-item\",{\"hover\":[516],\"disabled\":[516]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\",{\"shadow\":[4]}]]]]"), options);
|
|
20
|
+
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"as\":[1],\"variant\":[1],\"underline\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"type\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"],\"buttonGroupPosition\":[1,\"button-group-position\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"rowSelectionLimit\":[2,\"row-selection-limit\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"enableFloatingMenu\":[4,\"enable-floating-menu\"],\"floatingMenuAmountSelectedTemplate\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionButtonLoading\":[4,\"action-button-loading\"],\"actionButtonEnabled\":[4,\"action-button-enabled\"],\"actionButtonIcon\":[1,\"action-button-icon\"],\"actionButtonText\":[1,\"action-button-text\"],\"actionButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"shadow\":[4],\"_locales\":[32],\"_columns\":[32],\"_items\":[32],\"_enableRowSelection\":[32],\"_rowSelectionLimit\":[32],\"_rowActionsFloating\":[32],\"_rowActionsRow\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"],[9,\"resize\",\"_setRowSelectionData\"]],{\"items\":[\"_parseItems\"],\"enableRowSelection\":[\"_setRowSelectionData\"],\"rowSelectionLimit\":[\"_setRowSelectionData\"],\"selectedRows\":[\"_setRowSelectionData\"]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"multi\":[516],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"dropdownDisplayKey\":[1,\"dropdown-display-key\"],\"selectionDisplayKey\":[1,\"selection-display-key\"],\"valueKey\":[1,\"value-key\"],\"avatarKey\":[1,\"avatar-key\"],\"iconKey\":[1,\"icon-key\"],\"showIconInSelectedItem\":[1,\"show-icon-in-selected-item\"],\"classKey\":[1,\"class-key\"],\"applyClassOnSelectedItem\":[1,\"apply-class-on-selected-item\"],\"avatarLettersKey\":[1,\"avatar-letters-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"enableSelectAll\":[4,\"enable-select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"selectAllIcon\":[1,\"select-all-icon\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"showAddItem\":[4,\"show-add-item\"],\"addItemText\":[1,\"add-item-text\"],\"emptyStateText\":[1,\"empty-state-text\"],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_allSelected\":[32],\"_amountHidden\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"],\"multi\":[\"multiChanges\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]},[[8,\"closeModal\",\"handleCloseModal\"]]]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"hideIconWhenFilled\":[4,\"hide-icon-when-filled\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"strategy\":[1],\"placement\":[513],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]},[[8,\"closeDrawer\",\"handleCloseDrawer\"],[8,\"forceCloseDrawer\",\"handleForceCloseDrawer\"]]]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"_rendering\":[32]},null,{\"activeStep\":[\"_onActiveStepChange\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-button-group.cjs\",[[1,\"p-button-group\",{\"size\":[1]},[[0,\"slotchange\",\"slotchange\"]]]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1040],\"parsedSizes\":[1040],\"sizes\":[1032]}]]],[\"p-table-row-action.cjs\",[[0,\"p-table-row-action\",{\"type\":[1537],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"label\":[1],\"action\":[16],\"disabled\":[4],\"loading\":[4],\"showFunction\":[16]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"letters\":[1],\"_src\":[32],\"_failed\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"roundedBottom\":[4,\"rounded-bottom\"],\"roundedTop\":[4,\"rounded-top\"],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"iconPosition\":[1,\"icon-position\"],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"iconOnly\":[4,\"icon-only\"],\"size\":[513],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-divider.cjs\",[[1,\"p-divider\",{\"variant\":[513]}]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"allowOverflow\":[4,\"allow-overflow\"],\"scrollable\":[8]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"variant\":[1],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1],\"useContainer\":[4,\"use-container\"]}],[1,\"p-dropdown\",{\"placement\":[513],\"offset\":[2],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"allowOverflow\":[4,\"allow-overflow\"],\"scrollable\":[8],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"applyChevron\":[4,\"apply-chevron\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"offset\":[2],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"forceShowTooltip\":[516,\"force-show-tooltip\"],\"focusMethod\":[1,\"focus-method\"],\"errorVariant\":[1,\"error-variant\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-floating-menu-container_8.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionLoading\":[4,\"action-loading\"],\"actionIcon\":[1,\"action-icon\"],\"actionText\":[1,\"action-text\"],\"canUseAction\":[1028,\"can-use-action\"],\"actionButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"tableHasActions\":[4,\"table-has-actions\"],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[1,\"p-floating-menu-container\",{\"usedInTable\":[4,\"used-in-table\"]}],[1,\"p-floating-menu-item\",{\"hover\":[516],\"disabled\":[516]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\",{\"shadow\":[4]}]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.p-0{padding:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}:host(.variant-table-flush){padding:0!important}:host(.is-rounded){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}:host(.no-padding){padding:0}.static{position:static!important}
|
|
1
|
+
.rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.rounded-t-large{border-top-left-radius:.375rem!important;border-top-right-radius:.375rem!important}.p-0{padding:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}:host(.variant-table-flush){padding:0!important}:host(.is-rounded-bottom){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded-bottom){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}:host(.is-rounded-top){border-top-left-radius:.375rem;border-top-right-radius:.375rem}@media (min-width:64rem){:host(.is-rounded-top){border-top-left-radius:.75rem;border-top-right-radius:.75rem}}:host(.no-padding){padding:0}.static{position:static!important}
|
|
@@ -2,11 +2,12 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
export class ModalBody {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.variant = 'default';
|
|
5
|
-
this.
|
|
5
|
+
this.roundedBottom = false;
|
|
6
|
+
this.roundedTop = false;
|
|
6
7
|
this.padding = true;
|
|
7
8
|
}
|
|
8
9
|
render() {
|
|
9
|
-
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.rounded && 'is-rounded'} ${!this.padding && 'no-padding'}` }, h("slot", null)));
|
|
10
|
+
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.roundedBottom && 'is-rounded-bottom'} ${this.roundedTop && 'is-rounded-top'} ${!this.padding && 'no-padding'}` }, h("slot", null)));
|
|
10
11
|
}
|
|
11
12
|
static get is() { return "p-modal-body"; }
|
|
12
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +41,7 @@ export class ModalBody {
|
|
|
40
41
|
"reflect": false,
|
|
41
42
|
"defaultValue": "'default'"
|
|
42
43
|
},
|
|
43
|
-
"
|
|
44
|
+
"roundedBottom": {
|
|
44
45
|
"type": "boolean",
|
|
45
46
|
"mutable": false,
|
|
46
47
|
"complexType": {
|
|
@@ -54,7 +55,25 @@ export class ModalBody {
|
|
|
54
55
|
"tags": [],
|
|
55
56
|
"text": "Wether the modal body should be rounded at the bottom"
|
|
56
57
|
},
|
|
57
|
-
"attribute": "rounded",
|
|
58
|
+
"attribute": "rounded-bottom",
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"defaultValue": "false"
|
|
61
|
+
},
|
|
62
|
+
"roundedTop": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "boolean",
|
|
67
|
+
"resolved": "boolean",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": "Wether the modal body should be rounded at the top"
|
|
75
|
+
},
|
|
76
|
+
"attribute": "rounded-top",
|
|
58
77
|
"reflect": false,
|
|
59
78
|
"defaultValue": "false"
|
|
60
79
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-body.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/modal-body/modal-body.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,SAAS;;mBAIwB,SAAS;
|
|
1
|
+
{"version":3,"file":"modal-body.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/modal-body/modal-body.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,SAAS;;mBAIwB,SAAS;yBAKrB,KAAK;sBAKR,KAAK;mBAKR,IAAI;;EAE/B,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IACJ,KAAK,EAAE,wBAAwB,IAAI,CAAC,OAAO,IAC1C,IAAI,CAAC,aAAa,IAAI,mBACvB,IACC,IAAI,CAAC,UAAU,IAAI,gBACpB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,YAAY,EAAE;MAEnC,eAAQ,CACF,CACP,CAAC;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal-body',\n\tstyleUrl: 'modal-body.component.scss',\n\tshadow: true,\n})\nexport class ModalBody {\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table-flush' = 'default';\n\n\t/**\n\t * Wether the modal body should be rounded at the bottom\n\t */\n\t@Prop() roundedBottom: boolean = false;\n\n\t/**\n\t * Wether the modal body should be rounded at the top\n\t */\n\t@Prop() roundedTop: boolean = false;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-modal-body variant-${this.variant} ${\n\t\t\t\t\tthis.roundedBottom && 'is-rounded-bottom'\n\t\t\t\t} ${\n\t\t\t\t\tthis.roundedTop && 'is-rounded-top'\n\t\t\t\t} ${!this.padding && 'no-padding'}`}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { arrow, autoUpdate, computePosition, flip, offset, shift, } from "@float
|
|
|
2
2
|
import { h, Host, } from "@stencil/core";
|
|
3
3
|
export class Tooltip {
|
|
4
4
|
constructor() {
|
|
5
|
+
this._hasContentSlot = false;
|
|
5
6
|
this._loaded = false;
|
|
6
7
|
this.variant = 'hover';
|
|
7
8
|
this.content = null;
|
|
@@ -12,6 +13,9 @@ export class Tooltip {
|
|
|
12
13
|
this.show = false;
|
|
13
14
|
this.canManuallyClose = true;
|
|
14
15
|
}
|
|
16
|
+
componentWillLoad() {
|
|
17
|
+
this._hasContentSlot = !!this._el.querySelector(':scope > [slot="content"]');
|
|
18
|
+
}
|
|
15
19
|
componentShouldUpdate() {
|
|
16
20
|
this._update();
|
|
17
21
|
}
|
|
@@ -65,7 +69,7 @@ export class Tooltip {
|
|
|
65
69
|
if (!this._loaded) {
|
|
66
70
|
return;
|
|
67
71
|
}
|
|
68
|
-
if (!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
72
|
+
if (!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) && !this._hasContentSlot) {
|
|
69
73
|
if (this._popover.hasAttribute('data-show')) {
|
|
70
74
|
this._hide();
|
|
71
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/tooltip/tooltip.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,EACL,UAAU,EACV,eAAe,EACf,IAAI,EACJ,MAAM,EAEN,KAAK,GAEL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACL,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,OAAO;;IAsDX,YAAO,GAAG,KAAK,CAAC;mBAlDyC,OAAO;mBAKjD,IAAI;qBAKI,KAAK;kBAKX,CAAC;oBAKG,UAAU;2BAKJ,IAAI;gBAKf,KAAK;4BAKO,IAAI;;EAmBxC,qBAAqB;IACpB,IAAI,CAAC,OAAO,EAAE,CAAC;EAChB,CAAC;EAED,oBAAoB;IACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;MAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACrB;EACF,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW;MACtB,YAAM,IAAI,EAAC,SAAS,GAAG;MACvB,WAAK,KAAK,EAAC,mBAAmB;QAC7B,WACC,KAAK,EAAE,mBAAmB,IAAI,CAAC,OAAO,EAAE,EACxC,IAAI,EAAC,SAAS,oBACE,IAAI,CAAC,SAAS,mBACf,IAAI,CAAC,QAAQ,EAC5B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;UAExB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,YAAM,IAAI,EAAC,SAAS,GAAG;UACtD,WAAK,KAAK,EAAC,OAAO,GAAO,CACpB,CACD,CACA,CACP,CAAC;EACH,CAAC;EAGS,YAAY;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,CAAC,IAAI,IAAI;cACX,CAAC,CAAC,GAAG,CAAC,IAAI;cACV,CAAC,CAAC,EAAE;UACN,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;SAC9B,CAAC,CAAC;OACH;IACF,CAAC,CAAC,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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 _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\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) {\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"]}
|
|
1
|
+
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/tooltip/tooltip.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,EACL,UAAU,EACV,eAAe,EACf,IAAI,EACJ,MAAM,EAEN,KAAK,GAEL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACL,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,OAAO;;IAsDX,oBAAe,GAAG,KAAK,CAAC;IAExB,YAAO,GAAG,KAAK,CAAC;mBApDyC,OAAO;mBAKjD,IAAI;qBAKI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
|
|
@@ -20,7 +20,7 @@ export class Modal {
|
|
|
20
20
|
this._hasHeaderSlot = !!this._el.querySelector(':scope > [slot="header"]');
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
var _a;
|
|
23
|
+
var _a, _b;
|
|
24
24
|
if (!this.show) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -29,7 +29,7 @@ export class Modal {
|
|
|
29
29
|
const footerContent = h("slot", { name: "footer" });
|
|
30
30
|
return (h(Host, { class: "p-modal" }, h("p-backdrop", { applyBlur: this.applyBlur, onClicked: (ev) => this._backdropClick(ev.detail), closing: this._closing, scrollLock: this.scrollLock }, h("p-modal-container", { size: this.size, closing: this._closing }, (((_a = this.header) === null || _a === void 0 ? void 0 : _a.length) || this._hasHeaderSlot) && (h("p-modal-header", { showClose: this.showClose, onClose: (ev) => this.close('button', ev.detail) }, this._hasHeaderSlot
|
|
31
31
|
? headerContent
|
|
32
|
-
: this.header)), h("p-modal-body", { variant: this.variant,
|
|
32
|
+
: this.header)), h("p-modal-body", { variant: this.variant, roundedBottom: !this._hasFooterSlot, roundedTop: !this._hasHeaderSlot && !((_b = this.header) === null || _b === void 0 ? void 0 : _b.length), padding: this.padding }, bodyContent), this._hasFooterSlot && (h("p-modal-footer", null, footerContent))))));
|
|
33
33
|
}
|
|
34
34
|
_backdropClick(ev) {
|
|
35
35
|
if (!this.backdropClickClose) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/modal/modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACR,MAAM,eAAe,CAAC;AAMvB,MAAM,OAAO,KAAK;;IAwET,mBAAc,GAAG,KAAK,CAAC;IACvB,mBAAc,GAAG,KAAK,CAAC;gBArEW,IAAI;mBAKD,SAAS;;gBAU9B,KAAK;qBAKA,KAAK;qBAKd,IAAI;4BAKG,KAAK;8BAKH,IAAI;sBAKH,IAAI;mBAKP,IAAI;oBA0BH,KAAK;;EAEjC,iBAAiB;IAChB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC7C,0BAA0B,CAC1B,CAAC;IACF,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC7C,0BAA0B,CAC1B,CAAC;EACH,CAAC;EAED,MAAM;;IACL,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACf,OAAO;KACP;IAED,MAAM,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAC7C,MAAM,WAAW,GAAG,YAAM,IAAI,EAAC,SAAS,GAAG,CAAC;IAC5C,MAAM,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAE7C,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAC,SAAS;MACpB,kBACC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EACjD,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,UAAU,EAAE,IAAI,CAAC,UAAU;QAE3B,yBAAmB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ;UACxD,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,KAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAChD,sBACC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,IAE/C,IAAI,CAAC,cAAc;YACnB,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,IAAI,CAAC,MAAM,CACE,CACjB;UACD,oBACC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,
|
|
1
|
+
{"version":3,"file":"modal.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/modal/modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACR,MAAM,eAAe,CAAC;AAMvB,MAAM,OAAO,KAAK;;IAwET,mBAAc,GAAG,KAAK,CAAC;IACvB,mBAAc,GAAG,KAAK,CAAC;gBArEW,IAAI;mBAKD,SAAS;;gBAU9B,KAAK;qBAKA,KAAK;qBAKd,IAAI;4BAKG,KAAK;8BAKH,IAAI;sBAKH,IAAI;mBAKP,IAAI;oBA0BH,KAAK;;EAEjC,iBAAiB;IAChB,IAAI,CAAC,cAAc,GAAG,CAAC,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C,cAAc,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAA,EACxD,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,WAAW,CACE;UACd,IAAI,CAAC,cAAc,IAAI,CACvB,0BAAiB,aAAa,CAAkB,CAChD,CACkB,CACR,CACP,CACP,CAAC;EACH,CAAC;EAEO,cAAc,CAAC,EAAc;IACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;MAC7B,OAAO;KACP;IAED,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;EAC5B,CAAC;EAEM,KAAK,CAAC,MAAc,EAAE,EAAe;IAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC,GAAG,EAAE;MACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;MAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MAEtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC,EAAE,GAAG,CAAC,CAAC;EACT,CAAC;EAGD,gBAAgB;IACf,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;EACrB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal',\n\tshadow: true,\n})\nexport class Modal {\n\t/**\n\t * The size of the modal container\n\t */\n\t@Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table-flush' = 'default';\n\n\t/**\n\t * The Header of the modal\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the modal or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close button in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to show the footer on mobile\n\t */\n\t@Prop() showMobileFooter = false;\n\n\t/**\n\t * Wether to hide the modal when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<MouseEvent>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<string>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasFooterSlot = false;\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasFooterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"footer\"]'\n\t\t);\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\t\tconst footerContent = <slot name=\"footer\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-modal\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-modal-container size={this.size} closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-modal-header\n\t\t\t\t\t\t\t\tshowClose={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close('button', ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-modal-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-modal-body\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\troundedBottom={!this._hasFooterSlot}\n\t\t\t\t\t\t\troundedTop={!this._hasHeaderSlot && !this.header?.length}\n\t\t\t\t\t\t\tpadding={this.padding}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{bodyContent}\n\t\t\t\t\t\t</p-modal-body>\n\t\t\t\t\t\t{this._hasFooterSlot && (\n\t\t\t\t\t\t\t<p-modal-footer>{footerContent}</p-modal-footer>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-modal-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev: MouseEvent) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close('backdrop', ev);\n\t}\n\n\tpublic close(reason: string, ev?: MouseEvent) {\n\t\tthis.closeClicked.emit(ev);\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\n\t\t\tthis.closed.emit(reason);\n\t\t}, 550);\n\t}\n\n\t@Listen('closeModal', { target: 'window' })\n\thandleCloseModal() {\n\t\tthis.close('event');\n\t}\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const modalBodyComponentCss = ".rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.p-0{padding:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}:host(.variant-table-flush){padding:0!important}:host(.is-rounded){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}:host(.no-padding){padding:0}.static{position:static!important}
|
|
3
|
+
const modalBodyComponentCss = ".rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.rounded-t-large{border-top-left-radius:.375rem!important;border-top-right-radius:.375rem!important}.p-0{padding:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}:host(.variant-table-flush){padding:0!important}:host(.is-rounded-bottom){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded-bottom){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}:host(.is-rounded-top){border-top-left-radius:.375rem;border-top-right-radius:.375rem}@media (min-width:64rem){:host(.is-rounded-top){border-top-left-radius:.75rem;border-top-right-radius:.75rem}}:host(.no-padding){padding:0}.static{position:static!important}";
|
|
4
4
|
|
|
5
5
|
const ModalBody = /*@__PURE__*/ proxyCustomElement(class ModalBody extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -8,16 +8,18 @@ const ModalBody = /*@__PURE__*/ proxyCustomElement(class ModalBody extends HTMLE
|
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
this.variant = 'default';
|
|
11
|
-
this.
|
|
11
|
+
this.roundedBottom = false;
|
|
12
|
+
this.roundedTop = false;
|
|
12
13
|
this.padding = true;
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.rounded && 'is-rounded'} ${!this.padding && 'no-padding'}` }, h("slot", null)));
|
|
16
|
+
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.roundedBottom && 'is-rounded-bottom'} ${this.roundedTop && 'is-rounded-top'} ${!this.padding && 'no-padding'}` }, h("slot", null)));
|
|
16
17
|
}
|
|
17
18
|
static get style() { return modalBodyComponentCss; }
|
|
18
19
|
}, [1, "p-modal-body", {
|
|
19
20
|
"variant": [1],
|
|
20
|
-
"
|
|
21
|
+
"roundedBottom": [4, "rounded-bottom"],
|
|
22
|
+
"roundedTop": [4, "rounded-top"],
|
|
21
23
|
"padding": [4]
|
|
22
24
|
}]);
|
|
23
25
|
function defineCustomElement() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"modal-body.component.js","mappings":";;AAAA,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"file":"modal-body.component.js","mappings":";;AAAA,MAAM,qBAAqB,GAAG,k5BAAk5B;;MCOn6B,SAAS;;;;;mBAIwB,SAAS;yBAKrB,KAAK;sBAKR,KAAK;mBAKR,IAAI;;EAE/B,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,wBAAwB,IAAI,CAAC,OAAO,IAC1C,IAAI,CAAC,aAAa,IAAI,mBACvB,IACC,IAAI,CAAC,UAAU,IAAI,gBACpB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,YAAY,EAAE,IAEnC,eAAQ,CACF,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/modal-body/modal-body.component.scss?tag=p-modal-body&encapsulation=shadow","src/components/atoms/modal-body/modal-body.component.tsx"],"sourcesContent":[":host {\n\t@apply bg-white;\n\t@apply px-6 py-6;\n}\n\n:host(.variant-table-flush) {\n\t@apply p-0 #{!important};\n}\n\n:host(.is-rounded-bottom) {\n\t@apply rounded-b-none desktop-xs:rounded-b-xxlarge;\n}\n\n:host(.is-rounded-top) {\n\t@apply rounded-t-large desktop-xs:rounded-t-xxlarge;\n}\n\n:host(.no-padding) {\n\t@apply p-0;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal-body',\n\tstyleUrl: 'modal-body.component.scss',\n\tshadow: true,\n})\nexport class ModalBody {\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table-flush' = 'default';\n\n\t/**\n\t * Wether the modal body should be rounded at the bottom\n\t */\n\t@Prop() roundedBottom: boolean = false;\n\n\t/**\n\t * Wether the modal body should be rounded at the top\n\t */\n\t@Prop() roundedTop: boolean = false;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-modal-body variant-${this.variant} ${\n\t\t\t\t\tthis.roundedBottom && 'is-rounded-bottom'\n\t\t\t\t} ${\n\t\t\t\t\tthis.roundedTop && 'is-rounded-top'\n\t\t\t\t} ${!this.padding && 'no-padding'}`}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -35,7 +35,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
35
35
|
this._hasHeaderSlot = !!this._el.querySelector(':scope > [slot="header"]');
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
var _a;
|
|
38
|
+
var _a, _b;
|
|
39
39
|
if (!this.show) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -44,7 +44,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
44
44
|
const footerContent = h("slot", { name: "footer" });
|
|
45
45
|
return (h(Host, { class: "p-modal" }, h("p-backdrop", { applyBlur: this.applyBlur, onClicked: (ev) => this._backdropClick(ev.detail), closing: this._closing, scrollLock: this.scrollLock }, h("p-modal-container", { size: this.size, closing: this._closing }, (((_a = this.header) === null || _a === void 0 ? void 0 : _a.length) || this._hasHeaderSlot) && (h("p-modal-header", { showClose: this.showClose, onClose: (ev) => this.close('button', ev.detail) }, this._hasHeaderSlot
|
|
46
46
|
? headerContent
|
|
47
|
-
: this.header)), h("p-modal-body", { variant: this.variant,
|
|
47
|
+
: this.header)), h("p-modal-body", { variant: this.variant, roundedBottom: !this._hasFooterSlot, roundedTop: !this._hasHeaderSlot && !((_b = this.header) === null || _b === void 0 ? void 0 : _b.length), padding: this.padding }, bodyContent), this._hasFooterSlot && (h("p-modal-footer", null, footerContent))))));
|
|
48
48
|
}
|
|
49
49
|
_backdropClick(ev) {
|
|
50
50
|
if (!this.backdropClickClose) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-modal.js","mappings":";;;;;;;;;;;MAgBa,KAAK;;;;;;;IAwET,mBAAc,GAAG,KAAK,CAAC;IACvB,mBAAc,GAAG,KAAK,CAAC;gBArEW,IAAI;mBAKD,SAAS;;gBAU9B,KAAK;qBAKA,KAAK;qBAKd,IAAI;4BAKG,KAAK;8BAKH,IAAI;sBAKH,IAAI;mBAKP,IAAI;oBA0BH,KAAK;;EAEjC,iBAAiB;IAChB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC7C,0BAA0B,CAC1B,CAAC;IACF,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC7C,0BAA0B,CAC1B,CAAC;GACF;EAED,MAAM;;IACL,IAAI,CAAC,IAAI,CAAC,IAAI,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W,CACE,EACd,IAAI,CAAC,cAAc,KACnB,0BAAiB,aAAa,CAAkB,CAChD,CACkB,CACR,CACP,EACN;GACF;EAEO,cAAc,CAAC,EAAc;IACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;MAC7B,OAAO;KACP;IAED,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;GAC3B;EAEM,KAAK,CAAC,MAAc,EAAE,EAAe;IAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC;MACV,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;MAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MAEtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACzB,EAAE,GAAG,CAAC,CAAC;GACR;EAGD,gBAAgB;IACf,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;GACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/organisms/modal/modal.component.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal',\n\tshadow: true,\n})\nexport class Modal {\n\t/**\n\t * The size of the modal container\n\t */\n\t@Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table-flush' = 'default';\n\n\t/**\n\t * The Header of the modal\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the modal or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close button in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to show the footer on mobile\n\t */\n\t@Prop() showMobileFooter = false;\n\n\t/**\n\t * Wether to hide the modal when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<MouseEvent>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<string>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasFooterSlot = false;\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasFooterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"footer\"]'\n\t\t);\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\t\tconst footerContent = <slot name=\"footer\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-modal\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-modal-container size={this.size} closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-modal-header\n\t\t\t\t\t\t\t\tshowClose={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close('button', ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-modal-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-modal-body\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\troundedBottom={!this._hasFooterSlot}\n\t\t\t\t\t\t\troundedTop={!this._hasHeaderSlot && !this.header?.length}\n\t\t\t\t\t\t\tpadding={this.padding}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{bodyContent}\n\t\t\t\t\t\t</p-modal-body>\n\t\t\t\t\t\t{this._hasFooterSlot && (\n\t\t\t\t\t\t\t<p-modal-footer>{footerContent}</p-modal-footer>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-modal-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev: MouseEvent) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close('backdrop', ev);\n\t}\n\n\tpublic close(reason: string, ev?: MouseEvent) {\n\t\tthis.closeClicked.emit(ev);\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\n\t\t\tthis.closed.emit(reason);\n\t\t}, 550);\n\t}\n\n\t@Listen('closeModal', { target: 'window' })\n\thandleCloseModal() {\n\t\tthis.close('event');\n\t}\n}\n"],"version":3}
|
|
@@ -9,6 +9,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.isOpen = createEvent(this, "isOpen", 3);
|
|
12
|
+
this._hasContentSlot = false;
|
|
12
13
|
this._loaded = false;
|
|
13
14
|
this.variant = 'hover';
|
|
14
15
|
this.content = null;
|
|
@@ -19,6 +20,9 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
|
|
|
19
20
|
this.show = false;
|
|
20
21
|
this.canManuallyClose = true;
|
|
21
22
|
}
|
|
23
|
+
componentWillLoad() {
|
|
24
|
+
this._hasContentSlot = !!this._el.querySelector(':scope > [slot="content"]');
|
|
25
|
+
}
|
|
22
26
|
componentShouldUpdate() {
|
|
23
27
|
this._update();
|
|
24
28
|
}
|
|
@@ -72,7 +76,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
|
|
|
72
76
|
if (!this._loaded) {
|
|
73
77
|
return;
|
|
74
78
|
}
|
|
75
|
-
if (!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
79
|
+
if (!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) && !this._hasContentSlot) {
|
|
76
80
|
if (this._popover.hasAttribute('data-show')) {
|
|
77
81
|
this._hide();
|
|
78
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"tooltip.component.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,21IAA21I;;MC2B12I,OAAO;;;;;;IAsDX,YAAO,GAAG,KAAK,CAAC;mBAlDyC,OAAO;mBAKjD,IAAI;qBAKI,KAAK;kBAKX,CAAC;oBAKG,UAAU;2BAKJ,IAAI;gBAKf,KAAK;4BAKO,IAAI;;EAmBxC,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,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW,IACtB,YAAM,IAAI,EAAC,SAAS,GAAG,EACvB,WAAK,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I,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":[],"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 _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\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) {\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":"tooltip.component.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,MAAM;IACL,QACC,EAA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E,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":[],"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}
|