@zanichelli/albe-web-components 2.34.2 → 2.34.4
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 +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header.cjs.entry.js +5 -0
- package/dist/cjs/z-body_14.cjs.entry.js +513 -0
- package/dist/collection/components/navigation/z-app-header/index.js +21 -1
- package/dist/collection/components/z-table/z-table-row/styles.css +1 -1
- package/dist/esm/{index-56ab7a69.js → index-f928c852.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-cde16cf3.js → utils-a219c3d4.js} +2 -2
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header.entry.js +6 -1
- package/dist/esm/z-app-switcher.entry.js +1 -1
- package/dist/esm/z-app-topbar.entry.js +1 -1
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-body_14.entry.js +496 -0
- package/dist/esm/z-button-filter_5.entry.js +2 -2
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +2 -2
- package/dist/esm/z-contextual-menu.entry.js +1 -1
- package/dist/esm/z-cookiebar.entry.js +1 -1
- package/dist/esm/z-divider.entry.js +1 -1
- package/dist/esm/z-footer.entry.js +1 -1
- package/dist/esm/z-list_3.entry.js +1 -1
- package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-modal-login.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +2 -2
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-topbar.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-notification.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination-bar.entry.js +2 -2
- package/dist/esm/z-pocket_3.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +2 -2
- package/dist/esm/z-status-tag.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/components/navigation/z-app-header/index.d.ts +6 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/{www/build/p-cf899f93.entry.js → dist/web-components-library/p-065c2661.entry.js} +1 -1
- package/dist/web-components-library/{p-ee645fca.entry.js → p-0fee9636.entry.js} +1 -1
- package/dist/web-components-library/{p-eface1ff.entry.js → p-19784323.entry.js} +1 -1
- package/dist/web-components-library/{p-a762915b.entry.js → p-2df1936a.entry.js} +1 -1
- package/dist/web-components-library/{p-d1896fdb.entry.js → p-306c18e8.entry.js} +1 -1
- package/dist/web-components-library/{p-e6aac31c.entry.js → p-33dc4f06.entry.js} +1 -1
- package/dist/web-components-library/{p-45261bde.js → p-3dce95ce.js} +1 -1
- package/{www/build/p-2b361a53.entry.js → dist/web-components-library/p-42bbbe45.entry.js} +1 -1
- package/dist/web-components-library/{p-ee4fa9a8.entry.js → p-44904136.entry.js} +1 -1
- package/dist/web-components-library/{p-de5f9244.entry.js → p-45352dbd.entry.js} +1 -1
- package/dist/web-components-library/{p-80d6185c.entry.js → p-46409367.entry.js} +1 -1
- package/dist/web-components-library/{p-3ece97c0.entry.js → p-57ca60ca.entry.js} +1 -1
- package/dist/web-components-library/{p-8a9199e8.entry.js → p-5ab81e9b.entry.js} +1 -1
- package/dist/web-components-library/{p-d0c3eac6.entry.js → p-5f30cea7.entry.js} +1 -1
- package/dist/web-components-library/{p-a93086bc.entry.js → p-6a555104.entry.js} +1 -1
- package/{www/build/p-9621d591.entry.js → dist/web-components-library/p-72768e3c.entry.js} +1 -1
- package/dist/web-components-library/p-795f0a47.entry.js +1 -0
- package/dist/web-components-library/{p-3a5fc4ef.entry.js → p-8157eea6.entry.js} +1 -1
- package/dist/web-components-library/{p-ac229c9e.entry.js → p-8bb0c86d.entry.js} +1 -1
- package/{www/build/p-0ba3401a.entry.js → dist/web-components-library/p-94a60282.entry.js} +1 -1
- package/dist/web-components-library/{p-be3eeede.entry.js → p-9cf0c400.entry.js} +1 -1
- package/dist/web-components-library/p-9f241f4c.js +1 -0
- package/dist/web-components-library/{p-bc7e836a.entry.js → p-a3fda8d7.entry.js} +1 -1
- package/dist/web-components-library/{p-7c8a52e0.entry.js → p-aba4e402.entry.js} +1 -1
- package/dist/web-components-library/p-b18566a3.entry.js +1 -0
- package/dist/web-components-library/{p-21f3b77f.entry.js → p-b36031be.entry.js} +1 -1
- package/dist/web-components-library/{p-7d7aee65.entry.js → p-b725af3c.entry.js} +1 -1
- package/dist/web-components-library/{p-df4cf5b2.entry.js → p-d41a8631.entry.js} +1 -1
- package/dist/web-components-library/{p-5f8b1594.entry.js → p-d4ada94b.entry.js} +1 -1
- package/dist/web-components-library/{p-d8bc4e21.entry.js → p-ded3311b.entry.js} +1 -1
- package/{www/build/p-e8615a83.entry.js → dist/web-components-library/p-dedd49a7.entry.js} +1 -1
- package/{www/build/p-db8f3039.entry.js → dist/web-components-library/p-e21ba6cb.entry.js} +1 -1
- package/dist/web-components-library/{p-38091d2a.entry.js → p-f7ac7835.entry.js} +1 -1
- package/dist/web-components-library/p-faf00695.entry.js +1 -0
- package/dist/web-components-library/p-fdfca9b7.entry.js +1 -0
- package/dist/web-components-library/{p-8a12e2cd.entry.js → p-fe3ab113.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/{dist/web-components-library/p-cf899f93.entry.js → www/build/p-065c2661.entry.js} +1 -1
- package/www/build/{p-ee645fca.entry.js → p-0fee9636.entry.js} +1 -1
- package/www/build/{p-eface1ff.entry.js → p-19784323.entry.js} +1 -1
- package/www/build/{p-a762915b.entry.js → p-2df1936a.entry.js} +1 -1
- package/www/build/{p-d1896fdb.entry.js → p-306c18e8.entry.js} +1 -1
- package/www/build/{p-e6aac31c.entry.js → p-33dc4f06.entry.js} +1 -1
- package/www/build/{p-45261bde.js → p-3dce95ce.js} +1 -1
- package/{dist/web-components-library/p-2b361a53.entry.js → www/build/p-42bbbe45.entry.js} +1 -1
- package/www/build/{p-ee4fa9a8.entry.js → p-44904136.entry.js} +1 -1
- package/www/build/{p-de5f9244.entry.js → p-45352dbd.entry.js} +1 -1
- package/www/build/{p-80d6185c.entry.js → p-46409367.entry.js} +1 -1
- package/www/build/p-4bf7cdf7.js +122 -0
- package/www/build/{p-3ece97c0.entry.js → p-57ca60ca.entry.js} +1 -1
- package/www/build/{p-8a9199e8.entry.js → p-5ab81e9b.entry.js} +1 -1
- package/www/build/{p-d0c3eac6.entry.js → p-5f30cea7.entry.js} +1 -1
- package/www/build/{p-a93086bc.entry.js → p-6a555104.entry.js} +1 -1
- package/{dist/web-components-library/p-9621d591.entry.js → www/build/p-72768e3c.entry.js} +1 -1
- package/www/build/p-795f0a47.entry.js +1 -0
- package/www/build/{p-3a5fc4ef.entry.js → p-8157eea6.entry.js} +1 -1
- package/www/build/{p-ac229c9e.entry.js → p-8bb0c86d.entry.js} +1 -1
- package/{dist/web-components-library/p-0ba3401a.entry.js → www/build/p-94a60282.entry.js} +1 -1
- package/www/build/p-97a11655.css +789 -0
- package/www/build/{p-be3eeede.entry.js → p-9cf0c400.entry.js} +1 -1
- package/www/build/p-9f241f4c.js +1 -0
- package/www/build/{p-bc7e836a.entry.js → p-a3fda8d7.entry.js} +1 -1
- package/www/build/{p-7c8a52e0.entry.js → p-aba4e402.entry.js} +1 -1
- package/www/build/p-b18566a3.entry.js +1 -0
- package/www/build/{p-21f3b77f.entry.js → p-b36031be.entry.js} +1 -1
- package/www/build/{p-7d7aee65.entry.js → p-b725af3c.entry.js} +1 -1
- package/www/build/{p-df4cf5b2.entry.js → p-d41a8631.entry.js} +1 -1
- package/www/build/{p-5f8b1594.entry.js → p-d4ada94b.entry.js} +1 -1
- package/www/build/{p-d8bc4e21.entry.js → p-ded3311b.entry.js} +1 -1
- package/{dist/web-components-library/p-e8615a83.entry.js → www/build/p-dedd49a7.entry.js} +1 -1
- package/{dist/web-components-library/p-db8f3039.entry.js → www/build/p-e21ba6cb.entry.js} +1 -1
- package/www/build/{p-38091d2a.entry.js → p-f7ac7835.entry.js} +1 -1
- package/www/build/p-faf00695.entry.js +1 -0
- package/www/build/p-fdfca9b7.entry.js +1 -0
- package/www/build/{p-8a12e2cd.entry.js → p-fe3ab113.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +2 -2
- package/dist/cjs/z-body_2.cjs.entry.js +0 -40
- package/dist/cjs/z-button.cjs.entry.js +0 -39
- package/dist/cjs/z-icon.cjs.entry.js +0 -28
- package/dist/cjs/z-popover.cjs.entry.js +0 -127
- package/dist/cjs/z-table-body.cjs.entry.js +0 -24
- package/dist/cjs/z-table-cell.cjs.entry.js +0 -36
- package/dist/cjs/z-table-empty-box.cjs.entry.js +0 -28
- package/dist/cjs/z-table-head.cjs.entry.js +0 -23
- package/dist/cjs/z-table-header-row.cjs.entry.js +0 -22
- package/dist/cjs/z-table-header.cjs.entry.js +0 -88
- package/dist/cjs/z-table-row.cjs.entry.js +0 -43
- package/dist/cjs/z-table-sticky-footer.cjs.entry.js +0 -19
- package/dist/cjs/z-table.cjs.entry.js +0 -82
- package/dist/esm/z-body_2.entry.js +0 -35
- package/dist/esm/z-button.entry.js +0 -35
- package/dist/esm/z-icon.entry.js +0 -24
- package/dist/esm/z-popover.entry.js +0 -123
- package/dist/esm/z-table-body.entry.js +0 -20
- package/dist/esm/z-table-cell.entry.js +0 -32
- package/dist/esm/z-table-empty-box.entry.js +0 -24
- package/dist/esm/z-table-head.entry.js +0 -19
- package/dist/esm/z-table-header-row.entry.js +0 -18
- package/dist/esm/z-table-header.entry.js +0 -84
- package/dist/esm/z-table-row.entry.js +0 -39
- package/dist/esm/z-table-sticky-footer.entry.js +0 -15
- package/dist/esm/z-table.entry.js +0 -78
- package/dist/web-components-library/p-0f197b8e.entry.js +0 -1
- package/dist/web-components-library/p-1094e4de.entry.js +0 -1
- package/dist/web-components-library/p-1cf2c6f6.entry.js +0 -1
- package/dist/web-components-library/p-4665d79f.entry.js +0 -1
- package/dist/web-components-library/p-4c1dc891.entry.js +0 -1
- package/dist/web-components-library/p-568b3728.entry.js +0 -1
- package/dist/web-components-library/p-6384d72c.entry.js +0 -1
- package/dist/web-components-library/p-662b29d0.entry.js +0 -1
- package/dist/web-components-library/p-8ad12683.entry.js +0 -1
- package/dist/web-components-library/p-8ccf136e.entry.js +0 -1
- package/dist/web-components-library/p-8deddec7.entry.js +0 -1
- package/dist/web-components-library/p-aa77d746.entry.js +0 -1
- package/dist/web-components-library/p-d4c4b90a.entry.js +0 -1
- package/dist/web-components-library/p-ddc5aae2.entry.js +0 -1
- package/dist/web-components-library/p-ec13a382.entry.js +0 -1
- package/dist/web-components-library/p-f5e1d5a9.entry.js +0 -1
- package/dist/web-components-library/p-fcfb7e03.js +0 -1
- package/www/build/p-0f197b8e.entry.js +0 -1
- package/www/build/p-1094e4de.entry.js +0 -1
- package/www/build/p-1cf2c6f6.entry.js +0 -1
- package/www/build/p-331e0cc6.js +0 -1
- package/www/build/p-4665d79f.entry.js +0 -1
- package/www/build/p-4c1dc891.entry.js +0 -1
- package/www/build/p-568b3728.entry.js +0 -1
- package/www/build/p-6384d72c.entry.js +0 -1
- package/www/build/p-662b29d0.entry.js +0 -1
- package/www/build/p-8ad12683.entry.js +0 -1
- package/www/build/p-8ccf136e.entry.js +0 -1
- package/www/build/p-8deddec7.entry.js +0 -1
- package/www/build/p-aa77d746.entry.js +0 -1
- package/www/build/p-d4c4b90a.entry.js +0 -1
- package/www/build/p-ddc5aae2.entry.js +0 -1
- package/www/build/p-ea943cbd.css +0 -1
- package/www/build/p-ec13a382.entry.js +0 -1
- package/www/build/p-f5e1d5a9.entry.js +0 -1
- package/www/build/p-fcfb7e03.js +0 -1
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
import { c as classnames } from './index-aa3a4feb.js';
|
|
3
|
-
import { u as ButtonTypeEnum, B as ButtonVariantEnum, b as ButtonSizeEnum } from './index-56ab7a69.js';
|
|
4
|
-
import './_commonjsHelpers-8b28c6fa.js';
|
|
5
|
-
|
|
6
|
-
const stylesCss = ":host{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:var(--space-unit);--rgb-white:240, 240, 240}button:disabled,::slotted(button:disabled){pointer-events:none}button,::slotted(button),::slotted(a){box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;width:100%;font-family:var(--dashboard-font);font-weight:var(--font-sb);font-size:14px;line-height:1;letter-spacing:0.3px;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);vertical-align:middle;text-transform:uppercase;text-decoration:none;cursor:pointer;white-space:nowrap;outline:none;fill:currentColor}button.big,:host([size=\"big\"]) ::slotted(button),:host([size=\"big\"]) ::slotted(a){height:44px;min-width:44px}button.small,:host([size=\"small\"]) ::slotted(button),:host([size=\"small\"]) ::slotted(a){height:36px;min-width:36px}button.issmall,:host([issmall]) ::slotted(button),:host([issmall]) ::slotted(a){height:36px;min-width:36px}button.x-small,:host([size=\"x-small\"]) ::slotted(button),:host([size=\"x-small\"]) ::slotted(a){height:32px;min-width:32px}button:not(.square),:host(:not([square])) ::slotted(button),:host(:not([square])) ::slotted(a){min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}button.square,:host([square]){--z-icon-right-margin:0}button.primary,:host([variant=\"primary\"]) ::slotted(button),:host([variant=\"primary\"]) ::slotted(a){background-color:var(--color-primary01);border-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){button.primary:hover,:host([variant=\"primary\"]) ::slotted(button:hover),:host([variant=\"primary\"]) ::slotted(a:hover){background-color:var(--color-hover-primary);border-color:var(--color-hover-primary);color:var(--color-text-inverse)}}button:focus:focus-visible,::slotted(button:focus:focus-visible),::slotted(a:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}button.primary:active,:host([variant=\"primary\"]) ::slotted(button:active),:host([variant=\"primary\"]) ::slotted(a:active){background-color:var(--color-pressed-primary);border-color:var(--color-pressed-primary);color:var(--color-text-inverse);box-shadow:var(--shadow-2)}button.primary:disabled,:host([variant=\"primary\"]) ::slotted(button:disabled){background-color:var(--color-disabled01);border-color:var(--color-disabled01);color:var(--color-disabled02)}button.secondary,:host([variant=\"secondary\"]) ::slotted(button),:host([variant=\"secondary\"]) ::slotted(a){background-color:var(--color-surface01);border-color:var(--color-primary01);color:var(--color-primary01)}@media (hover: hover){button.secondary:hover,:host([variant=\"secondary\"]) ::slotted(button:hover),:host([variant=\"secondary\"]) ::slotted(a:hover){background-color:var(--color-surface01);border-color:var(--color-hover-primary);color:var(--color-hover-primary)}}button.secondary:active,:host([variant=\"secondary\"]) ::slotted(button:active),:host([variant=\"secondary\"]) ::slotted(a:active){background-color:var(--color-surface01);border-color:var(--color-pressed-primary);color:var(--color-pressed-primary);box-shadow:var(--shadow-2)}button.secondary:disabled,:host([variant=\"secondary\"]) ::slotted(button:disabled){background-color:var(--color-surface01);border-color:var(--color-disabled01);color:var(--color-disabled02)}button.tertiary,:host([variant=\"tertiary\"]) ::slotted(button),:host([variant=\"tertiary\"]) ::slotted(a){background-color:transparent;border-color:transparent;color:var(--color-primary01)}button.tertiary.hasContent{padding:0 var(--space-unit)}@media (hover: hover){button.tertiary:hover,:host([variant=\"tertiary\"]) ::slotted(button:hover),:host([variant=\"tertiary\"]) ::slotted(a:hover){background-color:var(--color-primary03);border-color:var(--color-primary03);color:var(--color-hover-primary)}}button.tertiary:focus:focus-visible,:host([variant=\"tertiary\"]) ::slotted(button:focus:focus-visible),:host([variant=\"tertiary\"]) ::slotted(a:focus:focus-visible){background-color:var(--color-surface01);border-color:var(--color-surface01);color:var(--color-primary01)}button.tertiary:active,:host([variant=\"tertiary\"]) ::slotted(button:active),:host([variant=\"tertiary\"]) ::slotted(a:active){background-color:var(--color-surface01);border-color:var(--color-surface01);color:var(--color-primary01);box-shadow:var(--shadow-2)}button.tertiary:disabled,:host([variant=\"tertiary\"]) ::slotted(button:disabled){background-color:transparent;border-color:transparent;color:var(--color-disabled02)}button.dark-bg,:host([variant=\"dark-bg\"]) ::slotted(button),:host([variant=\"dark-bg\"]) ::slotted(a){background-color:rgba(var(--rgb-white), 0.2);border-color:transparent;color:var(--color-text04)}button.dark-bg.hasContent{padding:0 var(--space-unit)}@media (hover: hover){button.dark-bg:hover,:host([variant=\"dark-bg\"]) ::slotted(button:hover),:host([variant=\"dark-bg\"]) ::slotted(a:hover){background-color:rgba(var(--rgb-white), 0.1)}}button.dark-bg:active,:host([variant=\"dark-bg\"]) ::slotted(button:active),:host([variant=\"dark-bg\"]) ::slotted(a:active){background-color:rgba(var(--rgb-white), 0.3)}button.dark-bg:disabled,:host([variant=\"dark-bg\"]) ::slotted(button:disabled){color:var(--color-disabled03);background-color:rgba(var(--rgb-white), 0.05)}";
|
|
7
|
-
|
|
8
|
-
const ZButton = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
/** HTML button disabled attribute. */
|
|
12
|
-
this.disabled = false;
|
|
13
|
-
/** HTML button type attribute. */
|
|
14
|
-
this.type = ButtonTypeEnum.button;
|
|
15
|
-
/** Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`. */
|
|
16
|
-
this.variant = ButtonVariantEnum.primary;
|
|
17
|
-
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
18
|
-
this.size = ButtonSizeEnum.big;
|
|
19
|
-
/** Reduce button size (deprecated).
|
|
20
|
-
*
|
|
21
|
-
* @deprecated Use `size` prop.
|
|
22
|
-
* */
|
|
23
|
-
this.issmall = false;
|
|
24
|
-
/** Spy to render square button. */
|
|
25
|
-
this.square = false;
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
this.hostElement.style.pointerEvents = this.disabled ? "none" : "auto";
|
|
29
|
-
return (h("slot", { name: "element" }, h("button", { id: this.htmlid, name: this.name, type: this.type, disabled: this.disabled, class: classnames(this.variant, this.size, { issmall: this.issmall }, { square: this.square }) }, this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }), h("slot", null))));
|
|
30
|
-
}
|
|
31
|
-
get hostElement() { return getElement(this); }
|
|
32
|
-
};
|
|
33
|
-
ZButton.style = stylesCss;
|
|
34
|
-
|
|
35
|
-
export { ZButton as z_button };
|
package/dist/esm/z-icon.entry.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-fa9e549c.js';
|
|
2
|
-
import { i as icons } from './icons-bceeb196.js';
|
|
3
|
-
|
|
4
|
-
const stylesCss = ":host{line-height:0;vertical-align:middle;margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0)}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
|
|
5
|
-
|
|
6
|
-
const ZIcon = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
}
|
|
10
|
-
selectPathOrPolygon(iconName) {
|
|
11
|
-
if (iconName && iconName.startsWith("M")) {
|
|
12
|
-
return h("path", { d: icons[this.name] });
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return h("polygon", { points: icons[this.name] });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(icons[this.name])));
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
ZIcon.style = stylesCss;
|
|
23
|
-
|
|
24
|
-
export { ZIcon as z_icon };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-fa9e549c.js';
|
|
2
|
-
import { c as classnames } from './index-aa3a4feb.js';
|
|
3
|
-
import { P as PopoverPosition, s as PopoverBorderRadius, t as PopoverShadow, K as KeyboardKeys } from './index-56ab7a69.js';
|
|
4
|
-
import { b as getElementTree } from './utils-cde16cf3.js';
|
|
5
|
-
import './_commonjsHelpers-8b28c6fa.js';
|
|
6
|
-
import './breakpoints-c386984e.js';
|
|
7
|
-
|
|
8
|
-
const stylesCss = ".sc-z-popover-h{font-family:var(--dashboard-font);font-weight:var(--font-rg);position:relative;display:inline-block;--shadow-arrow-color:rgba(66, 69, 72, 0.2);--shadow-arrow-below-color:rgba(66, 69, 72, 0.1)}.popover-content-container.sc-z-popover{box-sizing:border-box;visibility:hidden;position:absolute;min-width:64px;min-height:32px;z-index:999}.popover-content-container.visible.sc-z-popover{visibility:visible}.popover-content-container.border-radius-none.sc-z-popover{border-radius:0}.popover-content-container.border-radius-small.sc-z-popover{border-radius:var(--border-radius-small)}.popover-content-container.border-radius-medium.sc-z-popover{border-radius:var(--border-radius)}.popover-content-container.shadow-1.sc-z-popover{box-shadow:var(--shadow-1)}.popover-content-container.shadow-2.sc-z-popover{box-shadow:var(--shadow-2)}.popover-content-container.shadow-3.sc-z-popover{box-shadow:var(--shadow-3)}.popover-content-container.shadow-4.sc-z-popover{box-shadow:var(--shadow-4)}.popover-content-container.shadow-6.sc-z-popover{box-shadow:var(--shadow-6)}.popover-content-container.shadow-8.sc-z-popover{box-shadow:var(--shadow-8)}.popover-content-container.shadow-12.sc-z-popover{box-shadow:var(--shadow-12)}.popover-content-container.shadow-16.sc-z-popover{box-shadow:var(--shadow-16)}.popover-content-container.shadow-24.sc-z-popover{box-shadow:var(--shadow-24)}.popover-content-container.after-down.sc-z-popover{top:0;left:calc(100% + var(--space-unit))}.popover-content-container.after-center.sc-z-popover{top:50%;left:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.after-up.sc-z-popover{bottom:0;left:calc(100% + var(--space-unit))}.popover-content-container.below-right.sc-z-popover{left:0;top:calc(100% + var(--space-unit))}.popover-content-container.below-center.sc-z-popover{left:50%;top:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.below-left.sc-z-popover{right:0;top:calc(100% + var(--space-unit))}.popover-content-container.before-down.sc-z-popover{top:0;right:calc(100% + var(--space-unit))}.popover-content-container.before-center.sc-z-popover{top:50%;right:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.before-up.sc-z-popover{bottom:0;right:calc(100% + var(--space-unit))}.popover-content-container.above-right.sc-z-popover{left:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.above-center.sc-z-popover{left:50%;bottom:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.above-left.sc-z-popover{right:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.sc-z-popover:before{display:none;position:absolute;content:\"\";width:8px;height:8px;z-index:-1;background-color:inherit;transform:rotate(45deg)}.popover-content-container.after-down.sc-z-popover:before{top:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-center.sc-z-popover:before{top:calc(50% - 4px);left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-up.sc-z-popover:before{bottom:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.below-right.sc-z-popover:before{left:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-center.sc-z-popover:before{left:calc(50% - 4px);top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-left.sc-z-popover:before{right:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.before-down.sc-z-popover:before{top:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-center.sc-z-popover:before{top:calc(50% - 4px);right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-up.sc-z-popover:before{bottom:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-right.sc-z-popover:before{left:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-center.sc-z-popover:before{left:calc(50% - 4px);bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-left.sc-z-popover:before{right:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.show-arrow.sc-z-popover:before{display:block}";
|
|
9
|
-
|
|
10
|
-
const ZPopover = class {
|
|
11
|
-
/**
|
|
12
|
-
* Constructor.
|
|
13
|
-
*/
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
registerInstance(this, hostRef);
|
|
16
|
-
/** [optional] Popover position */
|
|
17
|
-
this.position = PopoverPosition["after-up"];
|
|
18
|
-
/** [optional] Background color token for popover */
|
|
19
|
-
this.backgroundColor = "color-white";
|
|
20
|
-
/** [optional] Border radius token for popover */
|
|
21
|
-
this.borderRadius = PopoverBorderRadius.small;
|
|
22
|
-
/** [optional] Box shadow token for popover */
|
|
23
|
-
this.boxShadow = PopoverShadow["shadow-1"];
|
|
24
|
-
/** [optional] Show or hide arrow */
|
|
25
|
-
this.showArrow = false;
|
|
26
|
-
/** [optional] Sets padding for Popover container */
|
|
27
|
-
this.padding = "8px";
|
|
28
|
-
this.isVisible = false;
|
|
29
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
30
|
-
}
|
|
31
|
-
componentDidLoad() {
|
|
32
|
-
this.checkSpaceAvailable();
|
|
33
|
-
}
|
|
34
|
-
closePopover() {
|
|
35
|
-
this.isVisible = false;
|
|
36
|
-
}
|
|
37
|
-
closePopoverWithKeyboard(e) {
|
|
38
|
-
if (e.key === KeyboardKeys.ESC) {
|
|
39
|
-
this.closePopover();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
handleClick(event) {
|
|
43
|
-
this.isVisible = !this.isVisible;
|
|
44
|
-
this.checkSpaceAvailable();
|
|
45
|
-
event.stopPropagation();
|
|
46
|
-
}
|
|
47
|
-
handleKeyDown(event) {
|
|
48
|
-
if (event.code === KeyboardKeys.ENTER) {
|
|
49
|
-
this.isVisible = !this.isVisible;
|
|
50
|
-
this.checkSpaceAvailable();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
handleOutsideClick(e) {
|
|
54
|
-
const tree = getElementTree(e.target);
|
|
55
|
-
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
|
|
56
|
-
if (!parent) {
|
|
57
|
-
this.isVisible = false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
checkSpaceAvailable() {
|
|
61
|
-
const width = document.body.clientWidth;
|
|
62
|
-
const height = window.innerHeight;
|
|
63
|
-
const rect = this.popoverElem.getBoundingClientRect();
|
|
64
|
-
const l = rect.left;
|
|
65
|
-
const r = rect.right;
|
|
66
|
-
const t = rect.top;
|
|
67
|
-
const b = rect.bottom;
|
|
68
|
-
let firstSide = this.position.split("-")[0];
|
|
69
|
-
let secondSide = this.position.split("-")[1];
|
|
70
|
-
// If top is outside viewport
|
|
71
|
-
if (t < 0) {
|
|
72
|
-
if (this.position.startsWith("above")) {
|
|
73
|
-
firstSide = "below";
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
secondSide = "down";
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
// If bottom is outside viewport
|
|
80
|
-
if (b > height) {
|
|
81
|
-
if (this.position.startsWith("below")) {
|
|
82
|
-
firstSide = "above";
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
secondSide = "up";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// If right is outside viewport
|
|
89
|
-
if (r > width) {
|
|
90
|
-
if (this.position.startsWith("above") ||
|
|
91
|
-
this.position.startsWith("below")) {
|
|
92
|
-
secondSide = "left";
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
firstSide = "before";
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
// If left is outside viewport
|
|
99
|
-
if (l < 0) {
|
|
100
|
-
if (this.position.startsWith("above") ||
|
|
101
|
-
this.position.startsWith("below")) {
|
|
102
|
-
secondSide = "right";
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
firstSide = "after";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
this.position = PopoverPosition[`${firstSide}-${secondSide}`];
|
|
109
|
-
}
|
|
110
|
-
render() {
|
|
111
|
-
return (h(Host, { onKeyDown: this.handleKeyDown }, h("div", { tabindex: "0", onClick: (event) => this.handleClick(event), onKeyDown: (event) => {
|
|
112
|
-
if (event.key === KeyboardKeys.ENTER) {
|
|
113
|
-
this.handleClick(event);
|
|
114
|
-
}
|
|
115
|
-
} }, h("slot", { name: "trigger" })), h("div", { ref: (e) => (this.popoverElem = e), class: classnames("popover-content-container", this.position, `border-radius-${this.borderRadius}`, this.boxShadow, { "show-arrow": this.showArrow }, { visible: this.isVisible }), style: {
|
|
116
|
-
backgroundColor: `var(--${this.backgroundColor})`,
|
|
117
|
-
padding: this.padding,
|
|
118
|
-
} }, h("slot", { name: "popover" }))));
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
ZPopover.style = stylesCss;
|
|
122
|
-
|
|
123
|
-
export { ZPopover as z_popover };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
|
|
3
|
-
const stylesCss = ".sc-z-table-body-h{display:table-row-group;font-family:var(--dashboard-font);font-weight:var(--font-rg)}.sc-z-table-body-h>z-table-row[expanded].sc-z-table-body+z-table-expanded-row.sc-z-table-body{display:table-row}";
|
|
4
|
-
|
|
5
|
-
const ZTableBody = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
componentWillRender() {
|
|
10
|
-
this.host.setAttribute("role", "rowgroup");
|
|
11
|
-
Array.from(this.host.children).forEach((child, index) => child.setAttribute("aria-rowindex", `${index}`));
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return h("slot", null);
|
|
15
|
-
}
|
|
16
|
-
get host() { return getElement(this); }
|
|
17
|
-
};
|
|
18
|
-
ZTableBody.style = stylesCss;
|
|
19
|
-
|
|
20
|
-
export { ZTableBody as z_table_body };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
import { q as Size, B as ButtonVariantEnum, b as ButtonSizeEnum } from './index-56ab7a69.js';
|
|
3
|
-
import { c as classnames } from './index-aa3a4feb.js';
|
|
4
|
-
import './_commonjsHelpers-8b28c6fa.js';
|
|
5
|
-
|
|
6
|
-
const stylesCss = ":host{display:table-cell;background-color:var(--color-white);border-bottom:var(--border-size-small) solid var(--bg-grey-200);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host>.button-container{display:none}:host:hover>.button-container{display:initial}.button-container{position:absolute;right:8px;top:8px;z-index:5}.button-content{position:relative}.contextual-menu-container{display:none;position:absolute;top:calc(100% - var(--space-unit));right:0}.button-container.visible,.contextual-menu-container.visible{display:initial}:host([padding=\"x-small\"]){padding:calc(var(--space-unit) * 0.5)}:host([padding=\"small\"]){padding:calc(var(--space-unit))}:host([padding=\"medium\"]){padding:calc(var(--space-unit) * 2)}:host([padding=\"large\"]){padding:calc(var(--space-unit) * 2.5)}:host([padding=\"special\"]){padding:0}";
|
|
7
|
-
|
|
8
|
-
const ZTableCell = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
/** Set padding size of cell, if special 0px padding will be set */
|
|
12
|
-
this.padding = Size.medium;
|
|
13
|
-
this.isMenuOpened = false;
|
|
14
|
-
}
|
|
15
|
-
handleMenu() {
|
|
16
|
-
this.isMenuOpened = !this.isMenuOpened;
|
|
17
|
-
}
|
|
18
|
-
componentWillRender() {
|
|
19
|
-
this.host.setAttribute("role", "cell");
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (h(Host, null, this.showButton && (h("div", { class: classnames("button-container", {
|
|
23
|
-
visible: this.isMenuOpened,
|
|
24
|
-
}) }, h("div", { class: "button-content" }, h("z-button", { icon: "contextual-menu", variant: ButtonVariantEnum.tertiary, size: ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }), h("div", { class: classnames("contextual-menu-container", {
|
|
25
|
-
visible: this.isMenuOpened,
|
|
26
|
-
}) }, h("slot", { name: "contextual-menu" }))))), h("slot", null)));
|
|
27
|
-
}
|
|
28
|
-
get host() { return getElement(this); }
|
|
29
|
-
};
|
|
30
|
-
ZTableCell.style = stylesCss;
|
|
31
|
-
|
|
32
|
-
export { ZTableCell as z_table_cell };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
|
|
3
|
-
const stylesCss = ".sc-z-table-empty-box-h{display:block;padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 7)\n calc(var(--space-unit) * 3) calc(var(--space-unit) * 7);background-color:var(--bg-white)}.sc-z-table-empty-box-s>*{margin-right:calc(var(--space-unit) * 2);margin-top:var(--space-unit)}div.cta.sc-z-table-empty-box{display:flex;flex-direction:row;margin-top:var(--space-unit)}@media only screen and (max-width: 768px){div.cta.sc-z-table-empty-box{flex-direction:column}}";
|
|
4
|
-
|
|
5
|
-
const ZTableEmptyBox = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/** Sets main title message*/
|
|
9
|
-
this.message = "Siamo spiacenti, al momento non sono presenti dati da visualizzare.";
|
|
10
|
-
/** Sets message */
|
|
11
|
-
this.subtitle = "";
|
|
12
|
-
}
|
|
13
|
-
componentWillLoad() {
|
|
14
|
-
this.hasCta1Slot = !!this.hostElement.querySelector('[slot="cta1"]');
|
|
15
|
-
this.hasCta2Slot = !!this.hostElement.querySelector('[slot="cta2"]');
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return (h(Host, null, h("z-body", { level: 3, variant: "semibold" }, this.message), h("br", null), !!this.subtitle && (h("z-body", { level: 4, variant: "regular" }, this.subtitle)), (!!this.hasCta1Slot || !!this.hasCta2Slot) && (h("div", { class: "cta" }, h("slot", { name: "cta1" }), h("slot", { name: "cta2" })))));
|
|
19
|
-
}
|
|
20
|
-
get hostElement() { return getElement(this); }
|
|
21
|
-
};
|
|
22
|
-
ZTableEmptyBox.style = stylesCss;
|
|
23
|
-
|
|
24
|
-
export { ZTableEmptyBox as z_table_empty_box };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
|
|
3
|
-
const stylesCss = ".sc-z-table-head-h{display:table-header-group;font-family:var(--dashboard-font);font-weight:var(--font-rg)}";
|
|
4
|
-
|
|
5
|
-
const ZTableHead = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
componentWillRender() {
|
|
10
|
-
this.host.setAttribute("role", "rowgroup");
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return h("slot", null);
|
|
14
|
-
}
|
|
15
|
-
get host() { return getElement(this); }
|
|
16
|
-
};
|
|
17
|
-
ZTableHead.style = stylesCss;
|
|
18
|
-
|
|
19
|
-
export { ZTableHead as z_table_head };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-fa9e549c.js';
|
|
2
|
-
|
|
3
|
-
const stylesCss = "z-table-header-row{display:table-row}z-table-header-row[expandable]>z-table-header:first-child{width:40px;user-select:none;box-sizing:border-box}z-table-header-row[expandable]>z-table-header:nth-child(2){padding-left:8px}";
|
|
4
|
-
|
|
5
|
-
const ZTableHeaderRow = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
_renderExpandHeader() {
|
|
10
|
-
return h("z-table-header", null);
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (h(Host, { role: "row" }, this.expandable && this._renderExpandHeader(), h("slot", null)));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
ZTableHeaderRow.style = stylesCss;
|
|
17
|
-
|
|
18
|
-
export { ZTableHeaderRow as z_table_header_row };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
import { c as classnames } from './index-aa3a4feb.js';
|
|
3
|
-
import { q as Size, r as SortDirectionEnum, P as PopoverPosition, B as ButtonVariantEnum, b as ButtonSizeEnum } from './index-56ab7a69.js';
|
|
4
|
-
import { b as getElementTree } from './utils-cde16cf3.js';
|
|
5
|
-
import './_commonjsHelpers-8b28c6fa.js';
|
|
6
|
-
import './breakpoints-c386984e.js';
|
|
7
|
-
|
|
8
|
-
const stylesCss = ":host{display:table-cell;background-color:var(--gray50);border-bottom:var(--border-size-medium) solid var(--gray200);font-family:var(--dashboard-font);font-weight:var(--font-sb);text-align:start;position:relative}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding=\"x-small\"]){padding:calc(var(--space-unit) * 0.5)}:host([padding=\"small\"]){padding:calc(var(--space-unit))}:host([padding=\"medium\"]){padding:calc(var(--space-unit) * 2)}:host([padding=\"large\"]){padding:calc(var(--space-unit) * 2.5)}:host([padding=\"special\"]){padding:0}.arrow{opacity:1;padding-left:var(--space-unit)}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}";
|
|
9
|
-
|
|
10
|
-
const ZTableHeader = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
registerInstance(this, hostRef);
|
|
13
|
-
this.sort = createEvent(this, "sort", 7);
|
|
14
|
-
/** Set padding size of cell, if special 0px padding will be set */
|
|
15
|
-
this.padding = Size.medium;
|
|
16
|
-
/** [Optional] Default sort order */
|
|
17
|
-
this.defaultSortDirection = SortDirectionEnum.asc;
|
|
18
|
-
this.sortDirection = SortDirectionEnum.none;
|
|
19
|
-
this.isMenuOpened = false;
|
|
20
|
-
this.emitOnSort = this.emitOnSort.bind(this);
|
|
21
|
-
}
|
|
22
|
-
emitOnSort() {
|
|
23
|
-
this.sort.emit({
|
|
24
|
-
columnId: this.columnId,
|
|
25
|
-
sortDirection: this.sortDirection,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
handleSort() {
|
|
29
|
-
if (!this.sortable) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this.sortDirection = (() => {
|
|
33
|
-
switch (this.sortDirection) {
|
|
34
|
-
case SortDirectionEnum.asc:
|
|
35
|
-
return SortDirectionEnum.desc;
|
|
36
|
-
case SortDirectionEnum.desc:
|
|
37
|
-
return SortDirectionEnum.asc;
|
|
38
|
-
case SortDirectionEnum.none:
|
|
39
|
-
return this.defaultSortDirection;
|
|
40
|
-
default:
|
|
41
|
-
return SortDirectionEnum.none;
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
this.emitOnSort();
|
|
45
|
-
}
|
|
46
|
-
handleMenuClick() {
|
|
47
|
-
this.isMenuOpened = !this.isMenuOpened;
|
|
48
|
-
}
|
|
49
|
-
handleOutsideClick(e) {
|
|
50
|
-
const tree = getElementTree(e.target);
|
|
51
|
-
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
|
|
52
|
-
if (!parent) {
|
|
53
|
-
this.isMenuOpened = false;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
handleClickHeaders(e) {
|
|
57
|
-
const { target } = e;
|
|
58
|
-
const parent = getElementTree(target).find((elem) => elem.nodeName.toLowerCase() === "z-table-header");
|
|
59
|
-
if (!this.sortable || !parent) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const parentColumnId = parent.attributes.getNamedItem("column-id").value;
|
|
63
|
-
const isSortable = target.parentNode.sortable || target.sortable;
|
|
64
|
-
if (parentColumnId !== this.columnId && isSortable) {
|
|
65
|
-
this.sortDirection = SortDirectionEnum.none;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
componentWillRender() {
|
|
69
|
-
this.host.setAttribute("role", "columnheader");
|
|
70
|
-
}
|
|
71
|
-
render() {
|
|
72
|
-
return (h(Host, { class: classnames({
|
|
73
|
-
sortable: this.sortable,
|
|
74
|
-
}), onClick: () => this.handleSort() }, h("div", { class: classnames("container") }, h("slot", null), this.sortable && this.sortDirection !== SortDirectionEnum.none && (h("z-icon", { name: this.sortDirection === SortDirectionEnum.asc
|
|
75
|
-
? "arrow-up"
|
|
76
|
-
: "arrow-down", class: "arrow" }))), this.showButton && (h("div", { class: classnames("popover-container", {
|
|
77
|
-
visible: this.isMenuOpened,
|
|
78
|
-
}) }, h("z-popover", { position: PopoverPosition["below-center"], "background-color": "gray200" }, h("z-button", { icon: "contextual-menu", variant: ButtonVariantEnum["tertiary"], size: ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }), h("div", { slot: "popover" }, h("slot", { name: "contextual-menu" })))))));
|
|
79
|
-
}
|
|
80
|
-
get host() { return getElement(this); }
|
|
81
|
-
};
|
|
82
|
-
ZTableHeader.style = stylesCss;
|
|
83
|
-
|
|
84
|
-
export { ZTableHeader as z_table_header };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fa9e549c.js';
|
|
2
|
-
import { i as ZTableRowExpandedType } from './index-56ab7a69.js';
|
|
3
|
-
|
|
4
|
-
const stylesCss = "z-table-row{display:table-row;font-family:var(--font-family-sans)}z-table-row[expanded-type=\"expandable\"]:hover{cursor:pointer}z-table-row[expanded-type=\"expandable\"]>z-table-cell:first-child,z-table-row[expanded-type=\"padding\"]>z-table-cell:first-child{--z-icon-width:16px;--z-icon-height:16px;width:24px;padding-left:16px;padding-right:0px;box-sizing:border-box;text-align:center;fill:var(--gray800);user-select:none}.z-icon-placeholder{width:24px;padding-right:0px}z-table-row[expanded-type=\"expandable\"]>z-table-cell:nth-child(2),z-table-row[expanded-type=\"padding\"]>z-table-cell:nth-child(2){padding-left:8px}z-table-row[expanded-type]:hover>z-table-cell:first-child{fill:var(--myz-blue-dark)}z-table-row[expanded]>z-tale-cell{background-color:var(--gray50)}z-table-row[expanded]+z-table-expanded-row{display:table-row}z-table-row[expanded]>z-table-cell{border-bottom:none}";
|
|
5
|
-
|
|
6
|
-
const ZTableRow = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.expand = createEvent(this, "expand", 7);
|
|
10
|
-
this.expandedType = ZTableRowExpandedType.none;
|
|
11
|
-
this.expanded = false;
|
|
12
|
-
}
|
|
13
|
-
emitOnExpand() {
|
|
14
|
-
this.expand.emit({ expanded: this.expanded });
|
|
15
|
-
}
|
|
16
|
-
handleExpand() {
|
|
17
|
-
this.expanded = !this.expanded;
|
|
18
|
-
this.emitOnExpand();
|
|
19
|
-
}
|
|
20
|
-
renderExpandButton() {
|
|
21
|
-
if (this.expandedType == ZTableRowExpandedType.expandable) {
|
|
22
|
-
return (h("z-table-cell", { style: { borderRight: "none" } }, h("z-icon", { name: this.expanded ? "minus-circled" : "plus-circled" })));
|
|
23
|
-
}
|
|
24
|
-
return (h("z-table-cell", { style: { borderRight: "none" } }, h("div", { class: "z-icon-placeholder" })));
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
return (h(Host, { role: "row", expanded: this.expanded, onClick: (event) => {
|
|
28
|
-
const contextualMenuClick = event.target.nodeName === 'Z-CONTEXTUAL-MENU';
|
|
29
|
-
const isExpandable = this.expandedType === ZTableRowExpandedType.expandable;
|
|
30
|
-
if (isExpandable && !contextualMenuClick) {
|
|
31
|
-
this.handleExpand();
|
|
32
|
-
}
|
|
33
|
-
} }, this.expandedType !== ZTableRowExpandedType.none &&
|
|
34
|
-
this.renderExpandButton(), h("slot", null)));
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
ZTableRow.style = stylesCss;
|
|
38
|
-
|
|
39
|
-
export { ZTableRow as z_table_row };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-fa9e549c.js';
|
|
2
|
-
|
|
3
|
-
const stylesCss = ".sc-z-table-sticky-footer-h{display:block;position:sticky;left:0;padding:var(--basex2);background-color:var(--bg-white);border-style:solid;border-color:var(--gray200);border-width:var(--border-size-small) 0 var(--border-base);font-weight:var(--font-rg)}";
|
|
4
|
-
|
|
5
|
-
const ZTableStickyFooter = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h("slot", null));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
ZTableStickyFooter.style = stylesCss;
|
|
14
|
-
|
|
15
|
-
export { ZTableStickyFooter as z_table_sticky_footer };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-fa9e549c.js';
|
|
2
|
-
import { B as ButtonVariantEnum, b as ButtonSizeEnum } from './index-56ab7a69.js';
|
|
3
|
-
import { m as mobileBreakpoint } from './breakpoints-c386984e.js';
|
|
4
|
-
|
|
5
|
-
const stylesCss = "z-table{overflow-x:auto;display:block;width:100%;font-family:var(--dashboard-font);font-weight:var(--font-rg);background-color:var(--color-white)}z-table>div.table{display:table;width:100%;border-collapse:separate}z-table>div.table-bordered>z-table-body>z-table-row>z-table-cell:not(:last-child),z-table>div.table-bordered>z-table-head>z-table-header-row>z-table-header:not(:last-child){border-right:var(--border-size-small) solid var(--bg-grey-200)}z-table>div>z-table-body>z-table-row[expandable]>z-table-cell:first-child,z-table>div>z-table-head>z-table-header-row[expandable]>z-table-header:first-child{border-right:none}z-table>div>z-table-body>z-table-row[expanded]>z-table-cell{background-color:var(--gray50)}z-table>div>z-table-body>z-table-row[expanded]+z-table-expanded-row{border-bottom:1px solid var(--gray200)}z-table>div.table-column-sticky>z-table-body>z-table-row>z-table-cell:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{position:sticky;left:0;box-shadow:1px 0 4px -1px rgba(66, 69, 72, 0.4);z-index:1}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{position:sticky;top:0;box-shadow:0 2px 3px -3px rgba(66, 69, 72, 0.4)}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{z-index:2}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{z-index:5}z-table-body{width:auto;background-color:var(--color-white)}z-table-empty-box{display:flex;flex-direction:column;flex-grow:1;border-bottom:var(--border-size-small) solid var(--bg-grey-200)}z-table-empty-box.bordered{border-left:var(--border-size-small) solid var(--bg-grey-200)}.error-message{margin-top:calc(var(--space-unit) * 2)}.table-content{display:flex;flex-direction:row;width:100%}.error-content{font-family:var(--dashboard-font);padding:calc(var(--space-unit) * 3);display:flex}.error-content>img{width:244px;height:188px;margin-right:calc(var(--space-unit) * 3)}@media only screen and (max-width: 768px){z-table>div.table-empty{display:none}.error-content{display:flex;flex-direction:column}.error-content>img{width:auto;height:auto}.text{padding:calc(var(--space-unit) * 3) 0}}";
|
|
6
|
-
|
|
7
|
-
const ZTable = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.callToAction = createEvent(this, "callToAction", 7);
|
|
11
|
-
this.callToActionTwo = createEvent(this, "callToActionTwo", 7);
|
|
12
|
-
/** Error message */
|
|
13
|
-
this.errorMessage = "Siamo spiacenti, non siamo riusciti a caricare il contenuto richiesto";
|
|
14
|
-
/** Sets table with border */
|
|
15
|
-
this.bordered = false;
|
|
16
|
-
/** Sets first column sticky */
|
|
17
|
-
this.columnSticky = false;
|
|
18
|
-
/** Sets empty table */
|
|
19
|
-
this.empty = false;
|
|
20
|
-
/** Set error status */
|
|
21
|
-
this.error = false;
|
|
22
|
-
/** Sets header sticky */
|
|
23
|
-
this.headerSticky = false;
|
|
24
|
-
/** Set message */
|
|
25
|
-
this.message = "Siamo spiacenti, al momento non sono presenti dati da visualizzare";
|
|
26
|
-
/** Set subtitle */
|
|
27
|
-
this.subtitle = "";
|
|
28
|
-
}
|
|
29
|
-
handleResize() {
|
|
30
|
-
this.isMobile = window.innerWidth <= mobileBreakpoint;
|
|
31
|
-
}
|
|
32
|
-
handleOrientationChange() {
|
|
33
|
-
this.isMobile = screen.width <= mobileBreakpoint;
|
|
34
|
-
}
|
|
35
|
-
componentWillLoad() {
|
|
36
|
-
var _a;
|
|
37
|
-
this.isMobile = window.innerWidth <= mobileBreakpoint;
|
|
38
|
-
const tableBody = this.host.querySelector('[slot="table-body"]');
|
|
39
|
-
this.hasTableBody = !!((_a = tableBody === null || tableBody === void 0 ? void 0 : tableBody.children) === null || _a === void 0 ? void 0 : _a.length);
|
|
40
|
-
if (!!tableBody && !this.hasTableBody) {
|
|
41
|
-
tableBody.remove();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
componentWillRender() {
|
|
45
|
-
this.host.setAttribute("role", "table");
|
|
46
|
-
}
|
|
47
|
-
renderError(tableClass) {
|
|
48
|
-
const minHeight = this.lines ? `calc(40px * ${this.lines})` : "auto";
|
|
49
|
-
return (h(Host, null, h("div", { class: tableClass }, h("slot", { name: "table-header" })), h("z-table-error", null, h("div", { class: "error-content", style: { minHeight } }, h("slot", { name: "error-image" }), h("div", { class: "text" }, h("z-body", { class: "error-message", level: 3, variant: "semibold" }, this.errorMessage), h("slot", { name: "error-action" }))))));
|
|
50
|
-
}
|
|
51
|
-
renderEmpty(tableClass) {
|
|
52
|
-
const buttonSize = this.isMobile
|
|
53
|
-
? ButtonSizeEnum.small
|
|
54
|
-
: ButtonSizeEnum.big;
|
|
55
|
-
const tableContentClass = `${!!this.hasTableBody ? "table-content" : ""}`;
|
|
56
|
-
if (this.hasTableBody) {
|
|
57
|
-
return (h(Host, null, h("div", { class: tableClass }, h("slot", { name: "table-header" }), h("div", { class: tableContentClass }, h("slot", { name: "table-body" }), h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (h("z-button", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (h("z-button", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
|
|
58
|
-
}
|
|
59
|
-
return (h(Host, null, h("div", { class: tableClass }, h("slot", { name: "table-header" })), h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (h("z-button", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (h("z-button", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
|
|
60
|
-
}
|
|
61
|
-
render() {
|
|
62
|
-
const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
|
|
63
|
-
${this.columnSticky ? "table-column-sticky" : ""}
|
|
64
|
-
${this.headerSticky ? "table-header-sticky" : ""}`;
|
|
65
|
-
if (this.error) {
|
|
66
|
-
return this.renderError(tableClass);
|
|
67
|
-
}
|
|
68
|
-
if (this.empty) {
|
|
69
|
-
return this.renderEmpty(tableClass);
|
|
70
|
-
}
|
|
71
|
-
return (h(Host, null, h("div", { class: tableClass }, h("slot", null)), h("slot", { name: "sticky-footer" })));
|
|
72
|
-
}
|
|
73
|
-
static get assetsDirs() { return ["assets"]; }
|
|
74
|
-
get host() { return getElement(this); }
|
|
75
|
-
};
|
|
76
|
-
ZTable.style = stylesCss;
|
|
77
|
-
|
|
78
|
-
export { ZTable as z_table };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as a,H as e,g as i}from"./p-904a85e4.js";const s=class{constructor(a){t(this,a),this.message="Siamo spiacenti, al momento non sono presenti dati da visualizzare.",this.subtitle=""}componentWillLoad(){this.hasCta1Slot=!!this.hostElement.querySelector('[slot="cta1"]'),this.hasCta2Slot=!!this.hostElement.querySelector('[slot="cta2"]')}render(){return a(e,null,a("z-body",{level:3,variant:"semibold"},this.message),a("br",null),!!this.subtitle&&a("z-body",{level:4,variant:"regular"},this.subtitle),(!!this.hasCta1Slot||!!this.hasCta2Slot)&&a("div",{class:"cta"},a("slot",{name:"cta1"}),a("slot",{name:"cta2"})))}get hostElement(){return i(this)}};s.style=".sc-z-table-empty-box-h{display:block;padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 7)\n calc(var(--space-unit) * 3) calc(var(--space-unit) * 7);background-color:var(--bg-white)}.sc-z-table-empty-box-s>*{margin-right:calc(var(--space-unit) * 2);margin-top:var(--space-unit)}div.cta.sc-z-table-empty-box{display:flex;flex-direction:row;margin-top:var(--space-unit)}@media only screen and (max-width: 768px){div.cta.sc-z-table-empty-box{flex-direction:column}}";export{s as z_table_empty_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as o}from"./p-904a85e4.js";const t=class{constructor(o){r(this,o)}render(){return o("slot",null)}};t.style=".sc-z-table-sticky-footer-h{display:block;position:sticky;left:0;padding:var(--basex2);background-color:var(--bg-white);border-style:solid;border-color:var(--gray200);border-width:var(--border-size-small) 0 var(--border-base);font-weight:var(--font-rg)}";export{t as z_table_sticky_footer}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as a,H as l,g as i}from"./p-904a85e4.js";import{B as r,b as o}from"./p-45261bde.js";import{m as s}from"./p-d69e14fb.js";const d=class{constructor(a){t(this,a),this.callToAction=e(this,"callToAction",7),this.callToActionTwo=e(this,"callToActionTwo",7),this.errorMessage="Siamo spiacenti, non siamo riusciti a caricare il contenuto richiesto",this.bordered=!1,this.columnSticky=!1,this.empty=!1,this.error=!1,this.headerSticky=!1,this.message="Siamo spiacenti, al momento non sono presenti dati da visualizzare",this.subtitle=""}handleResize(){this.isMobile=window.innerWidth<=s}handleOrientationChange(){this.isMobile=screen.width<=s}componentWillLoad(){var t;this.isMobile=window.innerWidth<=s;const e=this.host.querySelector('[slot="table-body"]');this.hasTableBody=!!(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length),e&&!this.hasTableBody&&e.remove()}componentWillRender(){this.host.setAttribute("role","table")}renderError(t){const e=this.lines?`calc(40px * ${this.lines})`:"auto";return a(l,null,a("div",{class:t},a("slot",{name:"table-header"})),a("z-table-error",null,a("div",{class:"error-content",style:{minHeight:e}},a("slot",{name:"error-image"}),a("div",{class:"text"},a("z-body",{class:"error-message",level:3,variant:"semibold"},this.errorMessage),a("slot",{name:"error-action"})))))}renderEmpty(t){const e=this.isMobile?o.small:o.big,i=this.hasTableBody?"table-content":"";return this.hasTableBody?a(l,null,a("div",{class:t},a("slot",{name:"table-header"}),a("div",{class:i},a("slot",{name:"table-body"}),a("z-table-empty-box",{class:this.bordered&&"bordered",message:this.message,subtitle:this.subtitle},!!this.callToActionLabel&&a("z-button",{slot:"cta1",variant:r.tertiary,onClick:()=>this.callToAction.emit(),size:e},this.callToActionLabel),!!this.callToActionTwoLabel&&a("z-button",{slot:"cta2",variant:r.tertiary,onClick:()=>this.callToActionTwo.emit(),size:e},this.callToActionTwoLabel))))):a(l,null,a("div",{class:t},a("slot",{name:"table-header"})),a("z-table-empty-box",{class:this.bordered&&"bordered",message:this.message,subtitle:this.subtitle},!!this.callToActionLabel&&a("z-button",{slot:"cta1",variant:r.tertiary,onClick:()=>this.callToAction.emit(),size:e},this.callToActionLabel),!!this.callToActionTwoLabel&&a("z-button",{slot:"cta2",variant:r.tertiary,onClick:()=>this.callToActionTwo.emit(),size:e},this.callToActionTwoLabel)))}render(){const t=`table ${this.empty?"table-empty":""} ${this.bordered?"table-bordered":""}\n ${this.columnSticky?"table-column-sticky":""}\n ${this.headerSticky?"table-header-sticky":""}`;return this.error?this.renderError(t):this.empty?this.renderEmpty(t):a(l,null,a("div",{class:t},a("slot",null)),a("slot",{name:"sticky-footer"}))}static get assetsDirs(){return["assets"]}get host(){return i(this)}};d.style="z-table{overflow-x:auto;display:block;width:100%;font-family:var(--dashboard-font);font-weight:var(--font-rg);background-color:var(--color-white)}z-table>div.table{display:table;width:100%;border-collapse:separate}z-table>div.table-bordered>z-table-body>z-table-row>z-table-cell:not(:last-child),z-table>div.table-bordered>z-table-head>z-table-header-row>z-table-header:not(:last-child){border-right:var(--border-size-small) solid var(--bg-grey-200)}z-table>div>z-table-body>z-table-row[expandable]>z-table-cell:first-child,z-table>div>z-table-head>z-table-header-row[expandable]>z-table-header:first-child{border-right:none}z-table>div>z-table-body>z-table-row[expanded]>z-table-cell{background-color:var(--gray50)}z-table>div>z-table-body>z-table-row[expanded]+z-table-expanded-row{border-bottom:1px solid var(--gray200)}z-table>div.table-column-sticky>z-table-body>z-table-row>z-table-cell:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{position:sticky;left:0;box-shadow:1px 0 4px -1px rgba(66, 69, 72, 0.4);z-index:1}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{position:sticky;top:0;box-shadow:0 2px 3px -3px rgba(66, 69, 72, 0.4)}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{z-index:2}z-table>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header:first-child,z-table>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{z-index:5}z-table-body{width:auto;background-color:var(--color-white)}z-table-empty-box{display:flex;flex-direction:column;flex-grow:1;border-bottom:var(--border-size-small) solid var(--bg-grey-200)}z-table-empty-box.bordered{border-left:var(--border-size-small) solid var(--bg-grey-200)}.error-message{margin-top:calc(var(--space-unit) * 2)}.table-content{display:flex;flex-direction:row;width:100%}.error-content{font-family:var(--dashboard-font);padding:calc(var(--space-unit) * 3);display:flex}.error-content>img{width:244px;height:188px;margin-right:calc(var(--space-unit) * 3)}@media only screen and (max-width: 768px){z-table>div.table-empty{display:none}.error-content{display:flex;flex-direction:column}.error-content>img{width:auto;height:auto}.text{padding:calc(var(--space-unit) * 3) 0}}";export{d as z_table}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as r,H as a}from"./p-904a85e4.js";const t=class{constructor(r){e(this,r)}_renderExpandHeader(){return r("z-table-header",null)}render(){return r(a,{role:"row"},this.expandable&&this._renderExpandHeader(),r("slot",null))}};t.style="z-table-header-row{display:table-row}z-table-header-row[expandable]>z-table-header:first-child{width:40px;user-select:none;box-sizing:border-box}z-table-header-row[expandable]>z-table-header:nth-child(2){padding-left:8px}";export{t as z_table_header_row}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as t,g as e}from"./p-904a85e4.js";const o=class{constructor(t){r(this,t)}componentWillRender(){this.host.setAttribute("role","rowgroup")}render(){return t("slot",null)}get host(){return e(this)}};o.style=".sc-z-table-head-h{display:table-header-group;font-family:var(--dashboard-font);font-weight:var(--font-rg)}";export{o as z_table_head}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as n,H as a,g as i}from"./p-904a85e4.js";import{q as o,B as s,b as e}from"./p-45261bde.js";import{c as l}from"./p-3247dee9.js";import"./p-b68038b5.js";const r=class{constructor(n){t(this,n),this.padding=o.medium,this.isMenuOpened=!1}handleMenu(){this.isMenuOpened=!this.isMenuOpened}componentWillRender(){this.host.setAttribute("role","cell")}render(){return n(a,null,this.showButton&&n("div",{class:l("button-container",{visible:this.isMenuOpened})},n("div",{class:"button-content"},n("z-button",{icon:"contextual-menu",variant:s.tertiary,size:e["x-small"],onClick:()=>this.handleMenu(),square:!0}),n("div",{class:l("contextual-menu-container",{visible:this.isMenuOpened})},n("slot",{name:"contextual-menu"})))),n("slot",null))}get host(){return i(this)}};r.style=':host{display:table-cell;background-color:var(--color-white);border-bottom:var(--border-size-small) solid var(--bg-grey-200);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host>.button-container{display:none}:host:hover>.button-container{display:initial}.button-container{position:absolute;right:8px;top:8px;z-index:5}.button-content{position:relative}.contextual-menu-container{display:none;position:absolute;top:calc(100% - var(--space-unit));right:0}.button-container.visible,.contextual-menu-container.visible{display:initial}:host([padding="x-small"]){padding:calc(var(--space-unit) * 0.5)}:host([padding="small"]){padding:calc(var(--space-unit))}:host([padding="medium"]){padding:calc(var(--space-unit) * 2)}:host([padding="large"]){padding:calc(var(--space-unit) * 2.5)}:host([padding="special"]){padding:0}';export{r as z_table_cell}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as a,H as l}from"./p-904a85e4.js";import{i as d}from"./p-45261bde.js";const r=class{constructor(a){e(this,a),this.expand=t(this,"expand",7),this.expandedType=d.none,this.expanded=!1}emitOnExpand(){this.expand.emit({expanded:this.expanded})}handleExpand(){this.expanded=!this.expanded,this.emitOnExpand()}renderExpandButton(){return a("z-table-cell",{style:{borderRight:"none"}},this.expandedType==d.expandable?a("z-icon",{name:this.expanded?"minus-circled":"plus-circled"}):a("div",{class:"z-icon-placeholder"}))}render(){return a(l,{role:"row",expanded:this.expanded,onClick:e=>{this.expandedType===d.expandable&&"Z-CONTEXTUAL-MENU"!==e.target.nodeName&&this.handleExpand()}},this.expandedType!==d.none&&this.renderExpandButton(),a("slot",null))}};r.style='z-table-row{display:table-row;font-family:var(--font-family-sans)}z-table-row[expanded-type="expandable"]:hover{cursor:pointer}z-table-row[expanded-type="expandable"]>z-table-cell:first-child,z-table-row[expanded-type="padding"]>z-table-cell:first-child{--z-icon-width:16px;--z-icon-height:16px;width:24px;padding-left:16px;padding-right:0px;box-sizing:border-box;text-align:center;fill:var(--gray800);user-select:none}.z-icon-placeholder{width:24px;padding-right:0px}z-table-row[expanded-type="expandable"]>z-table-cell:nth-child(2),z-table-row[expanded-type="padding"]>z-table-cell:nth-child(2){padding-left:8px}z-table-row[expanded-type]:hover>z-table-cell:first-child{fill:var(--myz-blue-dark)}z-table-row[expanded]>z-tale-cell{background-color:var(--gray50)}z-table-row[expanded]+z-table-expanded-row{display:table-row}z-table-row[expanded]>z-table-cell{border-bottom:none}';export{r as z_table_row}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as a,g as o}from"./p-904a85e4.js";import{c as r}from"./p-3247dee9.js";import{q as e,r as n,P as l,B as c,b as p}from"./p-45261bde.js";import{b as d}from"./p-fcfb7e03.js";import"./p-b68038b5.js";import"./p-d69e14fb.js";const h=class{constructor(i){t(this,i),this.sort=s(this,"sort",7),this.padding=e.medium,this.defaultSortDirection=n.asc,this.sortDirection=n.none,this.isMenuOpened=!1,this.emitOnSort=this.emitOnSort.bind(this)}emitOnSort(){this.sort.emit({columnId:this.columnId,sortDirection:this.sortDirection})}handleSort(){this.sortable&&(this.sortDirection=(()=>{switch(this.sortDirection){case n.asc:return n.desc;case n.desc:return n.asc;case n.none:return this.defaultSortDirection;default:return n.none}})(),this.emitOnSort())}handleMenuClick(){this.isMenuOpened=!this.isMenuOpened}handleOutsideClick(t){d(t.target).find((t=>"z-popover"===t.nodeName.toLowerCase()))||(this.isMenuOpened=!1)}handleClickHeaders(t){const{target:s}=t,i=d(s).find((t=>"z-table-header"===t.nodeName.toLowerCase()));this.sortable&&i&&i.attributes.getNamedItem("column-id").value!==this.columnId&&(s.parentNode.sortable||s.sortable)&&(this.sortDirection=n.none)}componentWillRender(){this.host.setAttribute("role","columnheader")}render(){return i(a,{class:r({sortable:this.sortable}),onClick:()=>this.handleSort()},i("div",{class:r("container")},i("slot",null),this.sortable&&this.sortDirection!==n.none&&i("z-icon",{name:this.sortDirection===n.asc?"arrow-up":"arrow-down",class:"arrow"})),this.showButton&&i("div",{class:r("popover-container",{visible:this.isMenuOpened})},i("z-popover",{position:l["below-center"],"background-color":"gray200"},i("z-button",{icon:"contextual-menu",variant:c.tertiary,size:p["x-small"],square:!0,slot:"trigger",onClick:()=>this.handleMenuClick()}),i("div",{slot:"popover"},i("slot",{name:"contextual-menu"})))))}get host(){return o(this)}};h.style=':host{display:table-cell;background-color:var(--gray50);border-bottom:var(--border-size-medium) solid var(--gray200);font-family:var(--dashboard-font);font-weight:var(--font-sb);text-align:start;position:relative}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding="x-small"]){padding:calc(var(--space-unit) * 0.5)}:host([padding="small"]){padding:calc(var(--space-unit))}:host([padding="medium"]){padding:calc(var(--space-unit) * 2)}:host([padding="large"]){padding:calc(var(--space-unit) * 2.5)}:host([padding="special"]){padding:0}.arrow{opacity:1;padding-left:var(--space-unit)}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}';export{h as z_table_header}
|