@oiz/stzh-components 2.9.0-alpha → 2.9.0-beta
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/dist/cjs/{app-globals-15ef98d9.js → app-globals-51c074d3.js} +39 -10
- package/dist/cjs/app-globals-51c074d3.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-datatable.cjs.entry.js +83 -8
- package/dist/cjs/stzh-datatable.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-message.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-richtext_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-richtext_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-storybook-preview.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-storybook-preview.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-toastbar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toastbar.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +6 -3
- package/dist/collection/components/stzh-datatable/stzh-datatable.js +241 -9
- package/dist/collection/components/stzh-datatable/stzh-datatable.js.map +1 -1
- package/dist/collection/components/stzh-datatable/stzh-datatable.stories.js +16 -5
- package/dist/collection/components/stzh-message/stzh-message.js.map +1 -1
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +4 -0
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +8 -0
- package/dist/collection/components/stzh-skin-storybook-preview/stzh-skin-storybook-preview.css +5 -0
- package/dist/collection/components/stzh-table/stzh-table.css +6 -3
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.css +2 -3
- package/dist/collection/global/js/helpers/utils.js +37 -8
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +38 -9
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-datatable.js +86 -9
- package/dist/components/stzh-datatable.js.map +1 -1
- package/dist/components/stzh-message.js.map +1 -1
- package/dist/components/stzh-richtext2.js +1 -1
- package/dist/components/stzh-richtext2.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-skin-storybook-preview.js +1 -1
- package/dist/components/stzh-skin-storybook-preview.js.map +1 -1
- package/dist/components/stzh-table.js +1 -1
- package/dist/components/stzh-table.js.map +1 -1
- package/dist/components/stzh-toastbar.js +1 -1
- package/dist/components/stzh-toastbar.js.map +1 -1
- package/dist/esm/{app-globals-664fb15a.js → app-globals-b350c01d.js} +39 -10
- package/dist/esm/app-globals-b350c01d.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-datatable.entry.js +84 -9
- package/dist/esm/stzh-datatable.entry.js.map +1 -1
- package/dist/esm/stzh-message.entry.js.map +1 -1
- package/dist/esm/stzh-richtext_2.entry.js +1 -1
- package/dist/esm/stzh-richtext_2.entry.js.map +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-skin-storybook-preview.entry.js +1 -1
- package/dist/esm/stzh-skin-storybook-preview.entry.js.map +1 -1
- package/dist/esm/stzh-table.entry.js +1 -1
- package/dist/esm/stzh-table.entry.js.map +1 -1
- package/dist/esm/stzh-toastbar.entry.js +1 -1
- package/dist/esm/stzh-toastbar.entry.js.map +1 -1
- package/dist/esm-es5/{app-globals-664fb15a.js → app-globals-b350c01d.js} +2 -2
- package/dist/esm-es5/{app-globals-664fb15a.js.map → app-globals-b350c01d.js.map} +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/esm-es5/stzh-datatable.entry.js +2 -2
- package/dist/esm-es5/stzh-datatable.entry.js.map +1 -1
- package/dist/esm-es5/stzh-message.entry.js.map +1 -1
- package/dist/esm-es5/stzh-richtext_2.entry.js +1 -1
- package/dist/esm-es5/stzh-richtext_2.entry.js.map +1 -1
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm-es5/stzh-skin-storybook-preview.entry.js +1 -1
- package/dist/esm-es5/stzh-skin-storybook-preview.entry.js.map +1 -1
- package/dist/esm-es5/stzh-table.entry.js +1 -1
- package/dist/esm-es5/stzh-table.entry.js.map +1 -1
- package/dist/esm-es5/stzh-toastbar.entry.js +1 -1
- package/dist/esm-es5/stzh-toastbar.entry.js.map +1 -1
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-46a1ed5a.system.js → p-0e061116.system.js} +2 -2
- package/dist/stzh-components/{p-46a1ed5a.system.js.map → p-0e061116.system.js.map} +1 -1
- package/dist/stzh-components/{p-cb387de2.entry.js → p-128a4694.entry.js} +2 -2
- package/dist/stzh-components/{p-cb387de2.entry.js.map → p-128a4694.entry.js.map} +1 -1
- package/dist/stzh-components/p-2b394f69.entry.js +2 -0
- package/dist/stzh-components/{p-1dd43a6c.entry.js.map → p-2b394f69.entry.js.map} +1 -1
- package/dist/stzh-components/{p-819e80c9.entry.js → p-2df0f259.entry.js} +2 -2
- package/dist/stzh-components/{p-819e80c9.entry.js.map → p-2df0f259.entry.js.map} +1 -1
- package/dist/stzh-components/p-35ec50a1.system.js +2 -0
- package/dist/stzh-components/{p-851bbc2e.system.js.map → p-35ec50a1.system.js.map} +1 -1
- package/dist/stzh-components/p-45d0b549.entry.js +2 -0
- package/dist/stzh-components/{p-3d4553f7.entry.js.map → p-45d0b549.entry.js.map} +1 -1
- package/dist/stzh-components/p-61b0e7da.system.entry.js.map +1 -1
- package/dist/stzh-components/p-9ee80bcc.entry.js +10 -0
- package/dist/stzh-components/p-9ee80bcc.entry.js.map +1 -0
- package/dist/stzh-components/{p-0c52518d.system.entry.js → p-a2b700d2.system.entry.js} +2 -2
- package/dist/stzh-components/p-a2b700d2.system.entry.js.map +1 -0
- package/dist/stzh-components/p-a43b5c3d.entry.js +2 -0
- package/dist/stzh-components/p-a43b5c3d.entry.js.map +1 -0
- package/dist/stzh-components/{p-b4860ba4.js → p-ace81cde.js} +2 -2
- package/dist/stzh-components/{p-b4860ba4.js.map → p-ace81cde.js.map} +1 -1
- package/dist/stzh-components/p-b5c456f5.system.entry.js +2 -0
- package/dist/stzh-components/{p-78669470.system.entry.js.map → p-b5c456f5.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-be4e2975.system.entry.js +2 -0
- package/dist/stzh-components/{p-c003c90c.system.entry.js.map → p-be4e2975.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-c250e795.entry.js.map +1 -1
- package/dist/stzh-components/{p-9343aec6.system.entry.js → p-d175949a.system.entry.js} +2 -2
- package/dist/stzh-components/{p-9343aec6.system.entry.js.map → p-d175949a.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-8523e488.system.entry.js → p-d93b1fcd.system.entry.js} +3 -3
- package/dist/stzh-components/p-d93b1fcd.system.entry.js.map +1 -0
- package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
- package/dist/stzh-components/{p-e611a738.system.entry.js → p-f40c7884.system.entry.js} +2 -2
- package/dist/stzh-components/{p-e611a738.system.entry.js.map → p-f40c7884.system.entry.js.map} +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components.d.ts +44 -6
- package/dist/types/index.d.ts +34 -0
- package/dist/vscode-data.json +20 -4
- package/package.json +1 -1
- package/dist/cjs/app-globals-15ef98d9.js.map +0 -1
- package/dist/esm/app-globals-664fb15a.js.map +0 -1
- package/dist/stzh-components/p-0c52518d.system.entry.js.map +0 -1
- package/dist/stzh-components/p-1dd43a6c.entry.js +0 -2
- package/dist/stzh-components/p-3d4553f7.entry.js +0 -2
- package/dist/stzh-components/p-78669470.system.entry.js +0 -2
- package/dist/stzh-components/p-851bbc2e.system.js +0 -2
- package/dist/stzh-components/p-8523e488.system.entry.js.map +0 -1
- package/dist/stzh-components/p-b329c334.entry.js +0 -2
- package/dist/stzh-components/p-b329c334.entry.js.map +0 -1
- package/dist/stzh-components/p-c003c90c.system.entry.js +0 -2
- package/dist/stzh-components/p-e194091a.entry.js +0 -10
- package/dist/stzh-components/p-e194091a.entry.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers.js';
|
|
3
3
|
import { d as defineCustomElement$k } from './stzh-actionset2.js';
|
|
4
4
|
import { d as defineCustomElement$j } from './stzh-badge2.js';
|
|
@@ -56,12 +56,43 @@ t.set=function(a,b){this.store[a]=b;return this};t.searchCache=oa;t.export=funct
|
|
|
56
56
|
t.import=function(a,b){if(b)switch(x(b)&&(b=JSON.parse(b)),a){case "tag":this.l=b;break;case "reg":this.m=!1;this.register=b;for(let d=0,e;d<this.h.length;d++)e=this.index[this.h[d]],e.register=b,e.m=!1;break;case "store":this.store=b;break;default:a=a.split(".");const c=a[0];a=a[1];c&&a&&this.index[c].import(a,b);}};la(Q.prototype);var Ba={encode:Aa,F:!1,G:""};const Ca=[F("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),"a",F("[\u00e8\u00e9\u00ea\u00eb]"),"e",F("[\u00ec\u00ed\u00ee\u00ef]"),"i",F("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),"o",F("[\u00f9\u00fa\u00fb\u00fc\u0171]"),"u",F("[\u00fd\u0177\u00ff]"),"y",F("\u00f1"),"n",F("[\u00e7c]"),"k",F("\u00df"),"s",F(" & ")," and "];function Aa(a){var b=a=""+a;b.normalize&&(b=b.normalize("NFD").replace(ea,""));return ca.call(this,b.toLowerCase(),!a.normalize&&Ca)}var Ea={encode:Da,F:!1,G:"strict"};const Fa=/[^a-z0-9]+/,Ga={b:"p",v:"f",w:"f",z:"s",x:"s","\u00df":"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Da(a){a=Aa.call(this,a).join(" ");const b=[];if(a){const c=a.split(Fa),d=c.length;for(let e=0,f,g=0;e<d;e++)if((a=c[e])&&(!this.filter||!this.filter[a])){f=a[0];let h=Ga[f]||f,k=h;for(let m=1;m<a.length;m++){f=a[m];const n=Ga[f]||f;n&&n!==k&&(h+=n,k=n);}b[g++]=h;}}return b}var Ia={encode:Ha,F:!1,G:""};const Ja=[F("ae"),"a",F("oe"),"o",F("sh"),"s",F("th"),"t",F("ph"),"f",F("pf"),"f",F("(?![aeo])h(?![aeo])"),"",F("(?!^[aeo])h(?!^[aeo])"),""];function Ha(a,b){a&&(a=Da.call(this,a).join(" "),2<a.length&&(a=E(a,Ja)),b||(1<a.length&&(a=ha(a)),a&&(a=a.split(" "))));return a||[]}var La={encode:Ka,F:!1,G:""};const Ma=F("(?!\\b)[aeo]");function Ka(a){a&&(a=Ha.call(this,a,!0),1<a.length&&(a=a.replace(Ma,"")),1<a.length&&(a=ha(a)),a&&(a=a.split(" ")));return a||[]}G["latin:default"]=ja;G["latin:simple"]=Ba;G["latin:balance"]=Ea;G["latin:advanced"]=Ia;G["latin:extra"]=La;const W=self;let Y;const Z={Index:K,Document:Q,Worker:O,registerCharset:function(a,b){G[a]=b;},registerLanguage:function(a,b){ka[a]=b;}};(Y=W.define)&&Y.amd?Y([],function(){return Z}):W.exports?W.exports=Z:W.FlexSearch=Z;}(commonjsGlobal));
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
const stzhDatatableCss = ":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-datatable{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;--max-height:var(--stzh-table-max-height);--min-width:var(--stzh-table-min-width);--cell-padding:var(--stzh-table-cell-padding);--search-input-width:var(--stzh-table-search-input-width)}stzh-datatable[hidden]{display:none}stzh-datatable *,stzh-datatable *::before,stzh-datatable *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}stzh-datatable .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}stzh-datatable .stzh-fylingfocus-focused{outline-style:none !important}stzh-datatable .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-datatable[disable-min-width]:not([disable-min-width=false]){--min-width:none}.stzh-datatable{}.stzh-datatable__header{border-bottom:0.0625rem solid var(--stzh-base-border-color);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-datatable__header{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-datatable__header{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1024px){.stzh-datatable__header{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-datatable__header{margin-bottom:var(--stzh-space-xlarge)}}.stzh-datatable__sub-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.stzh-datatable__heading{margin-bottom:var(--stzh-space-small)}.stzh-datatable__header .stzh-datatable__search{-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 600px){.stzh-datatable__header .stzh-datatable__search{width:var(--search-input-width);-ms-flex-positive:0;flex-grow:0}}.stzh-datatable__action-button{-ms-flex-negative:0;flex-shrink:0
|
|
59
|
+
const stzhDatatableCss = ":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-datatable{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;--max-height:var(--stzh-table-max-height);--min-width:var(--stzh-table-min-width);--cell-padding:var(--stzh-table-cell-padding);--search-input-width:var(--stzh-table-search-input-width)}stzh-datatable[hidden]{display:none}stzh-datatable *,stzh-datatable *::before,stzh-datatable *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}stzh-datatable .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}stzh-datatable .stzh-fylingfocus-focused{outline-style:none !important}stzh-datatable .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-datatable[disable-min-width]:not([disable-min-width=false]){--min-width:none}.stzh-datatable{}.stzh-datatable__header{border-bottom:0.0625rem solid var(--stzh-base-border-color);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-datatable__header{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-datatable__header{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1024px){.stzh-datatable__header{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-datatable__header{margin-bottom:var(--stzh-space-xlarge)}}.stzh-datatable__sub-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.stzh-datatable__heading{margin-bottom:var(--stzh-space-small)}.stzh-datatable__header .stzh-datatable__search{-ms-flex-positive:1;flex-grow:1;margin-right:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-datatable__header .stzh-datatable__search{width:var(--search-input-width);-ms-flex-positive:0;flex-grow:0}}.stzh-datatable__action-button{-ms-flex-negative:0;flex-shrink:0;margin-left:auto}.stzh-datatable__outer-wrapper{position:relative}.stzh-datatable__outer-wrapper::before,.stzh-datatable__outer-wrapper::after{z-index:4;background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.16)), to(rgba(0, 0, 0, 0)));background:linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0) 100%);content:\"\";pointer-events:none;position:absolute;top:0;height:100%;width:0.375rem;-webkit-transition:opacity var(--stzh-base-transition-animation-speed);transition:opacity var(--stzh-base-transition-animation-speed);opacity:0}.stzh-datatable__outer-wrapper::before{left:0}.stzh-datatable__outer-wrapper::after{right:0;-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.stzh-datatable__wrapper{overflow-x:auto;max-height:var(--max-height)}.stzh-datatable__pagination-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.stzh-datatable__pagination-wrapper:not(:empty){margin-top:var(--stzh-space-medium)}.stzh-datatable__sort-button{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;font-size:inherit;line-height:inherit;color:inherit;padding:var(--cell-padding)}.stzh-datatable__sort-button:hover,.stzh-datatable__sort-button:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-datatable stzh-icon.stzh-datatable__sort-icon{display:none}.stzh-datatable__table{width:100%;border-spacing:0;min-width:var(--min-width);}.stzh-datatable__table.has-layout-fixed{table-layout:fixed}.stzh-datatable__thead{position:-webkit-sticky;position:sticky;top:0;z-index:3}.stzh-datatable__row:hover .stzh-datatable__cell{background-color:var(--stzh-color-grey5)}.stzh-datatable__cell{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);text-align:left;border:none;vertical-align:top;border:none;border-bottom:0.0625rem solid var(--stzh-base-border-color);background-color:var(--stzh-color-white);-webkit-transition:background-color var(--stzh-base-transition-animation-speed);transition:background-color var(--stzh-base-transition-animation-speed);padding:var(--cell-padding);}.stzh-datatable__cell a{color:var(--stzh-link-color);-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);border-radius:var(--stzh-button-border-radius)}.stzh-datatable__cell a:hover,.stzh-datatable__cell a:focus{color:var(--stzh-link-hover-color)}.stzh-datatable__cell b,.stzh-datatable__cell strong{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal}.stzh-datatable__cell i,.stzh-datatable__cell em{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.stzh-datatable__cell.align-left{text-align:left}.stzh-datatable__cell.align-right{text-align:right}.stzh-datatable__cell.align-center{text-align:center}.stzh-datatable__cell.valign-auto{vertical-align:auto}.stzh-datatable__cell.valign-middle{vertical-align:middle}.stzh-datatable__cell.valign-bottom{vertical-align:bottom}.stzh-datatable__cell.nowrap{white-space:nowrap}.stzh-datatable__cell.is-sticky-left,.stzh-datatable__cell.is-sticky-right{position:-webkit-sticky;position:sticky;z-index:1}.stzh-datatable__cell.has-sticked{z-index:2}.stzh-datatable__cell.is-sticky-left{left:0}.stzh-datatable__cell.is-sticky-right{right:0}.stzh-datatable__cell.is-sticky-left::after,.stzh-datatable__cell.is-sticky-right::after{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.16)), to(rgba(0, 0, 0, 0)));background:linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0) 100%);content:\"\";pointer-events:none;position:absolute;top:0;height:100%;width:0.375rem;-webkit-transform:translate(100%);transform:translate(100%);opacity:0;-webkit-transition:opacity var(--stzh-base-transition-animation-speed);transition:opacity var(--stzh-base-transition-animation-speed)}.stzh-datatable__cell.is-sticky-left::after{right:0}.stzh-datatable__cell.is-sticky-right::after{left:0;-webkit-transform:rotate(-180deg) translate(100%);transform:rotate(-180deg) translate(100%)}.stzh-datatable__cell.has-sticked.is-sticky-left::after,.stzh-datatable__cell.has-sticked.is-sticky-right::after{opacity:1}.stzh-datatable__cell--head{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal;color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-datatable__cell--head.is-sortable{padding:0}.stzh-datatable__cell.has-sorted .stzh-datatable__sort-icon{display:-ms-inline-flexbox;display:inline-flex}.stzh-datatable__cell.has-sorted-desc .stzh-datatable__sort-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.stzh-datatable.has-list .stzh-datatable__outer-wrapper{display:none}@media screen and (min-width: 600px){.stzh-datatable.has-list .stzh-datatable__outer-wrapper{display:block}}@media screen and (min-width: 600px){.stzh-datatable.has-list .stzh-datatable__list-wrapper{display:none}}.stzh-datatable.has-scroll-left-shadow .stzh-datatable__outer-wrapper::before,.stzh-datatable.has-scroll-right-shadow .stzh-datatable__outer-wrapper::after{opacity:1}";
|
|
60
60
|
|
|
61
61
|
const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable extends HTMLElement {
|
|
62
62
|
constructor() {
|
|
63
63
|
super();
|
|
64
64
|
this.__registerHost();
|
|
65
|
+
this.stzhRowClick = createEvent(this, "stzhRowClick", 7);
|
|
66
|
+
this.stzhCellClick = createEvent(this, "stzhCellClick", 7);
|
|
67
|
+
this.stzhHeadingCellClick = createEvent(this, "stzhHeadingCellClick", 7);
|
|
68
|
+
this.stzhSortClick = createEvent(this, "stzhSortClick", 7);
|
|
69
|
+
this.stzhSortByChange = createEvent(this, "stzhSortByChange", 7);
|
|
70
|
+
this.stzhSortDirectionChange = createEvent(this, "stzhSortDirectionChange", 7);
|
|
71
|
+
this.handleRowClick = (event, row) => {
|
|
72
|
+
this.stzhRowClick.emit({
|
|
73
|
+
component: "stzh-datatable",
|
|
74
|
+
row,
|
|
75
|
+
originalEvent: event
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
this.handleCellClick = (event, row, column, cellIndex, rowIndex) => {
|
|
79
|
+
this.stzhCellClick.emit({
|
|
80
|
+
component: "stzh-datatable",
|
|
81
|
+
row,
|
|
82
|
+
column,
|
|
83
|
+
cellIndex,
|
|
84
|
+
rowIndex,
|
|
85
|
+
originalEvent: event
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
this.handleSortClick = (event, column) => {
|
|
89
|
+
this.stzhSortClick.emit({
|
|
90
|
+
component: "stzh-datatable",
|
|
91
|
+
column,
|
|
92
|
+
originalEvent: event
|
|
93
|
+
});
|
|
94
|
+
this.toggleSort(column.key);
|
|
95
|
+
};
|
|
65
96
|
this.updateScrollStates = () => {
|
|
66
97
|
if (!this.tableWrapper) {
|
|
67
98
|
return;
|
|
@@ -115,12 +146,14 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
115
146
|
this.page = event.detail.page;
|
|
116
147
|
}
|
|
117
148
|
};
|
|
149
|
+
this.tableLayout = "auto";
|
|
118
150
|
this.localization = undefined;
|
|
119
151
|
this.label = "";
|
|
120
152
|
this.sortBy = "";
|
|
121
153
|
this.sortDirection = "asc";
|
|
122
154
|
this.tokenize = "forward";
|
|
123
155
|
this.idField = "id";
|
|
156
|
+
this.hideSearch = false;
|
|
124
157
|
this.showList = false;
|
|
125
158
|
this.page = 1;
|
|
126
159
|
this.pageSize = null;
|
|
@@ -163,6 +196,28 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
163
196
|
}
|
|
164
197
|
this.buildSearchIndex();
|
|
165
198
|
}
|
|
199
|
+
sortByWatcher(value, oldValue) {
|
|
200
|
+
this.stzhSortByChange.emit({
|
|
201
|
+
component: "stzh-datatable",
|
|
202
|
+
value,
|
|
203
|
+
oldValue
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
sortDirectionWatcher(value, oldValue) {
|
|
207
|
+
this.stzhSortDirectionChange.emit({
|
|
208
|
+
component: "stzh-datatable",
|
|
209
|
+
value,
|
|
210
|
+
oldValue
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
handleHeadingCellClick(event, column, index) {
|
|
214
|
+
this.stzhHeadingCellClick.emit({
|
|
215
|
+
component: "stzh-datatable",
|
|
216
|
+
column,
|
|
217
|
+
index,
|
|
218
|
+
originalEvent: event
|
|
219
|
+
});
|
|
220
|
+
}
|
|
166
221
|
buildSearchIndex() {
|
|
167
222
|
if (!this._rows || this._rows.length === 0
|
|
168
223
|
|| !this._columns || this._columns.length === 0) {
|
|
@@ -196,6 +251,7 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
196
251
|
this.updateScrollStates();
|
|
197
252
|
}
|
|
198
253
|
componentWillRender() {
|
|
254
|
+
var _a, _b;
|
|
199
255
|
this._rowsShown = [];
|
|
200
256
|
this._rowsFiltered = [];
|
|
201
257
|
if (this.query) {
|
|
@@ -216,9 +272,22 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
216
272
|
this._rowsFiltered = [...this._rows];
|
|
217
273
|
}
|
|
218
274
|
if (this.sortBy) {
|
|
275
|
+
const columnConfig = this._columns.find((column) => column.key === this.sortBy);
|
|
276
|
+
const column = ((_a = columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig.sort) === null || _a === void 0 ? void 0 : _a.field) || this.sortBy;
|
|
277
|
+
const type = (_b = columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig.sort) === null || _b === void 0 ? void 0 : _b.type;
|
|
219
278
|
this._rowsFiltered.sort((rowA, rowB) => {
|
|
220
|
-
|
|
221
|
-
|
|
279
|
+
if (type === "numerical") {
|
|
280
|
+
if (this.sortDirection === "asc") {
|
|
281
|
+
return Number(rowA[column]) - Number(rowB[column]);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
return Number(rowB[column]) - Number(rowA[column]);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
const comparison = rowA[column].localeCompare(rowB[column]);
|
|
289
|
+
return this.sortDirection === "asc" ? comparison : comparison / -1;
|
|
290
|
+
}
|
|
222
291
|
});
|
|
223
292
|
}
|
|
224
293
|
if (this.pageSize !== null) {
|
|
@@ -249,7 +318,11 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
249
318
|
"has-list": this.showList,
|
|
250
319
|
};
|
|
251
320
|
const totalPages = Math.ceil(this._rowsFiltered.length / this.pageSize);
|
|
252
|
-
return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-datatable__header" }, h("div", { class: "stzh-datatable__heading" }, h("slot", { name: "heading" })), h("div", { class: "stzh-datatable__sub-header" },
|
|
321
|
+
return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-datatable__header" }, h("div", { class: "stzh-datatable__heading" }, h("slot", { name: "heading" })), h("div", { class: "stzh-datatable__sub-header" }, !this.hideSearch &&
|
|
322
|
+
h("stzh-input", { ref: (el) => (this.input = el), class: "stzh-datatable__search", size: "small", name: "stzh-datatable-search", onStzhChange: this.onInputChange, label: this.localization.searchLabel }), h("div", { class: "stzh-datatable__action-button" }, h("slot", { name: "action-button" })))), h("div", { class: "stzh-datatable__outer-wrapper" }, h("div", { ref: (el) => (this.tableWrapper = el), class: "stzh-datatable__wrapper", onScroll: this.handleScroll }, h("table", { class: {
|
|
323
|
+
"stzh-datatable__table": true,
|
|
324
|
+
"has-layout-fixed": this.tableLayout === "fixed",
|
|
325
|
+
} }, h("thead", { class: "stzh-datatable__thead" }, h("tr", { class: "stzh-datatable__row stzh-datatable__row--head" }, this._columns.map((column, index) => h("th", { onClick: (event) => this.handleHeadingCellClick(event, column, index), style: column.style, class: {
|
|
253
326
|
"stzh-datatable__cell stzh-datatable__cell--head": true,
|
|
254
327
|
"is-sticky-left": column.fixed === "left",
|
|
255
328
|
"is-sticky-right": column.fixed === "right",
|
|
@@ -261,11 +334,11 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
261
334
|
[`align-${column.align}`]: column.align,
|
|
262
335
|
[`valign-${column.valign}`]: column.valign
|
|
263
336
|
} }, column.sort ?
|
|
264
|
-
h("button", { class: "stzh-datatable__sort-button", type: "button", onClick: () => this.
|
|
337
|
+
h("button", { class: "stzh-datatable__sort-button", type: "button", onClick: (event) => this.handleSortClick(event, column), "s-object-id": column.analyticsId || `${column.text} ${this.localization.columnSort}` }, h("span", null, column.text), h("stzh-icon", { name: "arrow-up", class: "stzh-datatable__sort-icon", a11yTitle: this.localization.columnSort }))
|
|
265
338
|
:
|
|
266
|
-
h("span", null, column.text))))), h("tbody", null, this._rowsShown.map((row) => h("tr", { class: "stzh-datatable__row stzh-datatable__row--body" }, this._columns.map((column, index) => {
|
|
339
|
+
h("span", null, column.text))))), h("tbody", null, this._rowsShown.map((row, rowIndex) => h("tr", { class: "stzh-datatable__row stzh-datatable__row--body", onClick: (event) => this.handleRowClick(event, row) }, this._columns.map((column, index) => {
|
|
267
340
|
var _a, _b, _c, _d, _e;
|
|
268
|
-
return h("td", { innerHTML: ((_a = row[column.key]) === null || _a === void 0 ? void 0 : _a.text) || row[column.key] || "", class: {
|
|
341
|
+
return h("td", { onClick: (event) => this.handleCellClick(event, row, column, index, rowIndex), innerHTML: ((_a = row[column.key]) === null || _a === void 0 ? void 0 : _a.text) || row[column.key] || "", style: column.style, class: {
|
|
269
342
|
"stzh-datatable__cell stzh-datatable__cell--body": true,
|
|
270
343
|
"is-sticky-left": column.fixed === "left",
|
|
271
344
|
"is-sticky-right": column.fixed === "right",
|
|
@@ -287,16 +360,20 @@ const StzhDatatable$1 = /*@__PURE__*/ proxyCustomElement(class StzhDatatable ext
|
|
|
287
360
|
get element() { return this; }
|
|
288
361
|
static get watchers() { return {
|
|
289
362
|
"rows": ["rowsWatcher"],
|
|
290
|
-
"columns": ["columnsWatcher"]
|
|
363
|
+
"columns": ["columnsWatcher"],
|
|
364
|
+
"sortBy": ["sortByWatcher"],
|
|
365
|
+
"sortDirection": ["sortDirectionWatcher"]
|
|
291
366
|
}; }
|
|
292
367
|
static get style() { return stzhDatatableCss; }
|
|
293
368
|
}, [4, "stzh-datatable", {
|
|
369
|
+
"tableLayout": [1, "table-layout"],
|
|
294
370
|
"localization": [16],
|
|
295
371
|
"label": [1],
|
|
296
372
|
"sortBy": [1025, "sort-by"],
|
|
297
373
|
"sortDirection": [1025, "sort-direction"],
|
|
298
374
|
"tokenize": [1],
|
|
299
375
|
"idField": [1, "id-field"],
|
|
376
|
+
"hideSearch": [516, "hide-search"],
|
|
300
377
|
"showList": [516, "show-list"],
|
|
301
378
|
"page": [1026],
|
|
302
379
|
"pageSize": [2, "page-size"],
|