@kubex/zinc 1.1.37 → 1.1.39
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/custom-elements.json +1 -25
- package/dist/web-types.json +1 -1
- package/dist/zn.d.ts +0 -2
- package/dist/zn.min.js +3 -3
- package/package.json +1 -1
- package/src/components/chat-message/chat-message.scss +1 -0
- package/src/components/panel/panel.scss +0 -1
- package/src/components/table/table.component.ts +0 -10
- package/src/components/table/table.scss +0 -4
|
@@ -35532,30 +35532,6 @@
|
|
|
35532
35532
|
"kind": "method",
|
|
35533
35533
|
"name": "resizing"
|
|
35534
35534
|
},
|
|
35535
|
-
{
|
|
35536
|
-
"kind": "method",
|
|
35537
|
-
"name": "_handleMenu",
|
|
35538
|
-
"parameters": [
|
|
35539
|
-
{
|
|
35540
|
-
"name": "e",
|
|
35541
|
-
"type": {
|
|
35542
|
-
"text": "any"
|
|
35543
|
-
}
|
|
35544
|
-
}
|
|
35545
|
-
]
|
|
35546
|
-
},
|
|
35547
|
-
{
|
|
35548
|
-
"kind": "method",
|
|
35549
|
-
"name": "menuClick",
|
|
35550
|
-
"parameters": [
|
|
35551
|
-
{
|
|
35552
|
-
"name": "e",
|
|
35553
|
-
"type": {
|
|
35554
|
-
"text": "any"
|
|
35555
|
-
}
|
|
35556
|
-
}
|
|
35557
|
-
]
|
|
35558
|
-
},
|
|
35559
35535
|
{
|
|
35560
35536
|
"kind": "method",
|
|
35561
35537
|
"name": "tableHead"
|
|
@@ -39898,7 +39874,7 @@
|
|
|
39898
39874
|
"package": {
|
|
39899
39875
|
"name": "@kubex/zinc",
|
|
39900
39876
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
39901
|
-
"version": "1.1.
|
|
39877
|
+
"version": "1.1.39",
|
|
39902
39878
|
"author": "",
|
|
39903
39879
|
"license": "MIT"
|
|
39904
39880
|
}
|
package/dist/web-types.json
CHANGED
package/dist/zn.d.ts
CHANGED
|
@@ -4776,8 +4776,6 @@ declare module "components/table/table.component" {
|
|
|
4776
4776
|
private readonly resizeObserver;
|
|
4777
4777
|
resizing(): void;
|
|
4778
4778
|
connectedCallback(): void;
|
|
4779
|
-
_handleMenu(e: any): void;
|
|
4780
|
-
menuClick(e: any): void;
|
|
4781
4779
|
tableHead(): import("lit-html").TemplateResult<1> | undefined;
|
|
4782
4780
|
tableBody(): import("lit-html").TemplateResult<1>;
|
|
4783
4781
|
columnContent(col: any): any;
|
package/dist/zn.min.js
CHANGED
|
@@ -194,7 +194,7 @@ import{a as _n,b as D1,c as nr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var J
|
|
|
194
194
|
class="${N({"button-group":!0,"button-group--grow":this.grow,"button-group--start":this.start,"button-group--gap":this.gap})}"
|
|
195
195
|
role="group">
|
|
196
196
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
197
|
-
</div>`}};Xr.styles=T(sb),c([p({})],Xr.prototype,"direction",2),c([p({type:Boolean})],Xr.prototype,"grow",2),c([p({type:Boolean})],Xr.prototype,"wrap",2),c([p({type:Boolean})],Xr.prototype,"start",2),c([p({type:Boolean})],Xr.prototype,"gap",2),c([V("slot")],Xr.prototype,"defaultSlot",2);var Zi=Xr;Xr.define("zn-button-group");function vS(i){return new DOMParser().parseFromString(i,"text/html").body}function xS(i){i.querySelectorAll("script").forEach(o=>{o.remove()})}function yS(i,o){return["src","href","xlink:href"].includes(i)&&(o.includes("javascript:")||o.includes("data:text/html"))?!0:i.startsWith("on")}function zS(i){let o=i.attributes;for(let t=o.length-1;t>=0;t--)yS(o[t].name,o[t].value)&&i.removeAttributeNode(o[t])}function lb(i){let o=i.children;for(let t=o.length-1;t>=0;t--){let r=o[t];zS(r),lb(r)}}function cb(i){let o=vS(i);return xS(o),lb(o),o.innerHTML}var db=A`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0));--message-bubble-agent:rgba(4,114,225,0.1);--message-bubble-customer:rgba(48,170,61,0.1);--message-bubble-internal:rgba(255,203,0,0.1)}.message{display:flex;gap:var(--zn-spacing-small);align-items:flex-start}.message__avatar{flex:0 0 36px;display:flex;justify-content:center}.message__body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-x-small)}.message__header{display:flex;align-items:center;gap:var(--zn-spacing-x-small);min-height:36px}.message__sender{font-family:var(--zn-font-sans);font-size:var(--zn-text-h1-font-size);font-weight:var(--zn-text-h1-font-weight);line-height:var(--zn-text-h1-line-height);color:var(--zn-text-h1-color);text-transform:var(--zn-text-h1-transform)}.message__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform)}.message__bubble{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--zn-spacing-small);padding:11px var(--zn-spacing-small);border-radius:var(--zn-border-radius);background:var(--message-bubble-agent);min-height:46px}.message__bubble--sending{border:1px dashed rgb(var(--zn-border-color));opacity:0.7;flex-direction:column}.message__main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-small)}.message__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small)}.message__attachments--visible{display:flex}.message__attachments ::slotted(zn-chat-message-attachment){min-width:0}.message__content{font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform);flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.message__content ::slotted(*){font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform)}.message__content p{margin:0;padding:0}.message__content pre{background-color:#23241f;border-radius:3px;margin-block:5px;padding:5px 10px;color:#f8f8f2;overflow:auto}.message__content blockquote{border-left:4px solid rgb(var(--zn-border-color));margin:5px 0;padding-left:16px}.message__content ol,.message__content ul{padding:0;margin:0}.message__content li{list-style-type:none;padding-left:1em;position:relative}.message__content ol{counter-reset:list-0 0}.message__content ol>li{counter-increment:list-0 1}.message__content ul>li::before{content:"•"}.message__content ol>li::before{content:counter(list-0) ". "}.message__content ol li::before,.message__content ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}.message__content img{max-width:100%}.message__content a{color:rgb(var(--zn-color-info))}.message__meta{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform)}.message__actions{flex-shrink:0;display:flex;align-items:center}:host([agent-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-agent))}:host([customer-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-customer))}:host([action-type=internal]) .message__bubble{background:var(--message-background,var(--message-bubble-internal))}:host([action-type=error]) .message__bubble{background:var(--message-background,rgba(var(--zn-color-error),0.12))}:host(.message-continued) .message{margin-top:3px}:host(.message-continued) .message__avatar{visibility:hidden}:host(.message-continued) .message__header{display:none}.message--system{margin-top:var(--zn-spacing-x-small)}.system-card{box-sizing:border-box;display:flex;align-items:center;gap:var(--zn-spacing-x-small);padding:6px 12px;border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));font-size:12px;color:rgb(var(--zn-text-color));min-height:46px}.system-card__text{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.system-card__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform);white-space:nowrap}`;var Ue=class Ue extends C{constructor(){super(...arguments);this.sender="";this.message="";this.time="";this.avatar="";this.actionType="";this.customerInitiated=!1;this.agentInitiated=!1;this.hideSender=!1;this.hasAttachments=!1}connectedCallback(){let t=!this.actionType||this.actionType==="internal",r=t&&this.agentInitiated,n=t&&this.customerInitiated,a=this.previousElementSibling,s=parseInt(this.time)-parseInt(a?.time),l=a?.getAttribute("action-type")??"",d=Ue.SYSTEM_ACTION_TYPES.includes(l),h=l==="internal",m=this.actionType==="internal";a&&!d&&s<60&&h===m&&(a?.hasAttribute("agent-initiated")&&r||a?.hasAttribute("customer-initiated")&&n)&&this.classList.add("message-continued"),super.connectedCallback()}render(){if(!Ue.DISPLAYED_ACTION_TYPES.includes(this.actionType))return W;if(this.isSystemMessage())return this.renderSystemCard();let t=this.actionType==="message-sending";return u`
|
|
197
|
+
</div>`}};Xr.styles=T(sb),c([p({})],Xr.prototype,"direction",2),c([p({type:Boolean})],Xr.prototype,"grow",2),c([p({type:Boolean})],Xr.prototype,"wrap",2),c([p({type:Boolean})],Xr.prototype,"start",2),c([p({type:Boolean})],Xr.prototype,"gap",2),c([V("slot")],Xr.prototype,"defaultSlot",2);var Zi=Xr;Xr.define("zn-button-group");function vS(i){return new DOMParser().parseFromString(i,"text/html").body}function xS(i){i.querySelectorAll("script").forEach(o=>{o.remove()})}function yS(i,o){return["src","href","xlink:href"].includes(i)&&(o.includes("javascript:")||o.includes("data:text/html"))?!0:i.startsWith("on")}function zS(i){let o=i.attributes;for(let t=o.length-1;t>=0;t--)yS(o[t].name,o[t].value)&&i.removeAttributeNode(o[t])}function lb(i){let o=i.children;for(let t=o.length-1;t>=0;t--){let r=o[t];zS(r),lb(r)}}function cb(i){let o=vS(i);return xS(o),lb(o),o.innerHTML}var db=A`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0));--message-bubble-agent:rgba(4,114,225,0.1);--message-bubble-customer:rgba(48,170,61,0.1);--message-bubble-internal:rgba(255,203,0,0.1)}.message{display:flex;gap:var(--zn-spacing-small);align-items:flex-start}.message__avatar{flex:0 0 36px;display:flex;justify-content:center}.message__body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-x-small)}.message__header{display:flex;align-items:center;gap:var(--zn-spacing-x-small);min-height:36px}.message__sender{font-family:var(--zn-font-sans);font-size:var(--zn-text-h1-font-size);font-weight:var(--zn-text-h1-font-weight);line-height:var(--zn-text-h1-line-height);color:var(--zn-text-h1-color);text-transform:var(--zn-text-h1-transform)}.message__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform)}.message__bubble{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--zn-spacing-small);padding:11px var(--zn-spacing-small);border-radius:var(--zn-border-radius);background:var(--message-bubble-agent);min-height:46px}.message__bubble--sending{border:1px dashed rgb(var(--zn-border-color));opacity:0.7;flex-direction:column}.message__main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-small)}.message__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small)}.message__attachments--visible{display:flex}.message__attachments ::slotted(zn-chat-message-attachment){min-width:0}.message__content{font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform);flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.message__content ::slotted(*){font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform)}.message__content p{margin:0;padding:0}.message__content pre{background-color:#23241f;border-radius:3px;margin-block:5px;padding:5px 10px;color:#f8f8f2;overflow:auto}.message__content blockquote{border-left:4px solid rgb(var(--zn-border-color));margin:5px 0;padding-left:16px}.message__content ol,.message__content ul{padding:0;margin:0}.message__content li{list-style-type:none;padding-left:1em;position:relative}.message__content ol{counter-reset:list-0 0}.message__content ol>li{counter-increment:list-0 1}.message__content ul>li::before{content:"•"}.message__content ol>li::before{content:counter(list-0) ". "}.message__content ol li::before,.message__content ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}.message__content img{max-width:100%}.message__content a{color:rgb(var(--zn-color-info))}.message__meta{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform)}.message__actions{flex-shrink:0;display:flex;align-items:center;height:24px}:host([agent-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-agent))}:host([customer-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-customer))}:host([action-type=internal]) .message__bubble{background:var(--message-background,var(--message-bubble-internal))}:host([action-type=error]) .message__bubble{background:var(--message-background,rgba(var(--zn-color-error),0.12))}:host(.message-continued) .message{margin-top:3px}:host(.message-continued) .message__avatar{visibility:hidden}:host(.message-continued) .message__header{display:none}.message--system{margin-top:var(--zn-spacing-x-small)}.system-card{box-sizing:border-box;display:flex;align-items:center;gap:var(--zn-spacing-x-small);padding:6px 12px;border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));font-size:12px;color:rgb(var(--zn-text-color));min-height:46px}.system-card__text{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.system-card__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform);white-space:nowrap}`;var Ue=class Ue extends C{constructor(){super(...arguments);this.sender="";this.message="";this.time="";this.avatar="";this.actionType="";this.customerInitiated=!1;this.agentInitiated=!1;this.hideSender=!1;this.hasAttachments=!1}connectedCallback(){let t=!this.actionType||this.actionType==="internal",r=t&&this.agentInitiated,n=t&&this.customerInitiated,a=this.previousElementSibling,s=parseInt(this.time)-parseInt(a?.time),l=a?.getAttribute("action-type")??"",d=Ue.SYSTEM_ACTION_TYPES.includes(l),h=l==="internal",m=this.actionType==="internal";a&&!d&&s<60&&h===m&&(a?.hasAttribute("agent-initiated")&&r||a?.hasAttribute("customer-initiated")&&n)&&this.classList.add("message-continued"),super.connectedCallback()}render(){if(!Ue.DISPLAYED_ACTION_TYPES.includes(this.actionType))return W;if(this.isSystemMessage())return this.renderSystemCard();let t=this.actionType==="message-sending";return u`
|
|
198
198
|
<div part="base" class="message">
|
|
199
199
|
<div part="avatar" class="message__avatar">
|
|
200
200
|
<zn-icon library="avatar" src="${this.avatar||this.sender}" size="36" round></zn-icon>
|
|
@@ -1945,7 +1945,7 @@ import{a as _n,b as D1,c as nr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var J
|
|
|
1945
1945
|
<span class="last-message-indicator" part="indicator"></span>
|
|
1946
1946
|
</div>`}render(){return u`
|
|
1947
1947
|
${this._getLastMessage()}
|
|
1948
|
-
`}_getTimes(t){let r=Math.floor(t/1e3/60/60/24/30),n=Math.floor(t/1e3/60/60/24/7),a=Math.floor(t/1e3/60/60/24),s=Math.floor(t/1e3/60/60)%24,l=Math.floor(t/1e3/60)%60,d=Math.floor(t/1e3)%60;return r>0?`${r} Month`+(r>1?"s":""):n>0?`${n} Week`+(n>1?"s":""):a>0?`${a} Day`+(a>1?"s":""):s>0?l>0?`${s}hr ${l}m`:`${s} Hour`+(s>1?"s":""):l>0?d>0?`${l}m ${d}s`:`${l} Minute`+(l>1?"s":""):`${d} Second`+(d>1?"s":"")}};ii.styles=T(uv),c([p({type:Number})],ii.prototype,"timestamp",2);var YS=ii;ii.define("zn-timer");var mv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{flex-grow:1;overflow:visible;display:flex;max-width:100%;z-index:1;position:relative;min-width:var(--zn-spacing-small-panel);flex-basis:var(--zn-panel-basis);--zn-page-surface-background:var(--zn-panel);--zn-active-nav-background:var(--zn-panel)}.panel{position:relative;border:1px solid rgb(var(--zn-border-color));display:flex;border-radius:var(--zn-border-radius);flex-direction:column;flex-grow:1;flex-basis:var(--zn-spacing-small-panel);width:100%;background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))
|
|
1948
|
+
`}_getTimes(t){let r=Math.floor(t/1e3/60/60/24/30),n=Math.floor(t/1e3/60/60/24/7),a=Math.floor(t/1e3/60/60/24),s=Math.floor(t/1e3/60/60)%24,l=Math.floor(t/1e3/60)%60,d=Math.floor(t/1e3)%60;return r>0?`${r} Month`+(r>1?"s":""):n>0?`${n} Week`+(n>1?"s":""):a>0?`${a} Day`+(a>1?"s":""):s>0?l>0?`${s}hr ${l}m`:`${s} Hour`+(s>1?"s":""):l>0?d>0?`${l}m ${d}s`:`${l} Minute`+(l>1?"s":""):`${d} Second`+(d>1?"s":"")}};ii.styles=T(uv),c([p({type:Number})],ii.prototype,"timestamp",2);var YS=ii;ii.define("zn-timer");var mv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{flex-grow:1;overflow:visible;display:flex;max-width:100%;z-index:1;position:relative;min-width:var(--zn-spacing-small-panel);flex-basis:var(--zn-panel-basis);--zn-page-surface-background:var(--zn-panel);--zn-active-nav-background:var(--zn-panel)}.panel{position:relative;border:1px solid rgb(var(--zn-border-color));display:flex;border-radius:var(--zn-border-radius);flex-direction:column;flex-grow:1;flex-basis:var(--zn-spacing-small-panel);width:100%;background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.panel__inner{overflow:hidden;display:flex;border-radius:var(--zn-border-radius);flex-direction:column;flex-grow:1}.panel__content{display:flex;flex-grow:1;overflow:hidden;position:relative}.panel__header{padding:var(--zn-base-gap)}.panel__header::part(base){border-bottom:0;overflow:visible}.panel__header--inline{border-bottom:0}.panel__header--underline{border-bottom:1px solid rgb(var(--zn-border-color))}.panel__header::part(content){padding:0}.panel__body{display:flex;flex-direction:column;overflow-y:auto;flex-grow:1;padding:var(--zn-base-gap)}.panel__body>:not([hidden])~:not([hidden]){border:1px solid rgb(var(--zn-border-color))}.panel__footer{font-size:var(--zn-font-size-small);display:block;padding:var(--zn-spacing-small) var(--zn-base-gap);background:rgb(var(--zn-panel-secondary));border-bottom-left-radius:var(--zn-border-radius);border-bottom-right-radius:var(--zn-border-radius)}.panel--tabbed .panel__body{padding:0}.panel--transparent{background-color:transparent;border:none}.panel--transparent:before{display:none}.panel:not(.panel--flush,.panel--flush-x,.panel--flush-y) ::slotted(zn-sp){--zn-sp-padding:0 !important}.panel.panel--borderless-header:not(.panel--flush,.panel--flush-y) .panel__body{padding-top:0}.panel--flush .panel__body{padding:0}.panel--flush-x .panel__body{padding-inline:0}.panel--flush-y .panel__body{padding-block:0}.panel--flush-footer .panel__footer{padding:0}.panel--transparent .panel__header{padding-left:0;padding-right:0}.panel--cosmic{border:1px solid transparent}.panel--cosmic:before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}.panel--shadow{box-shadow:0 6px 20px 10px rgba(0,0,0,0.25)}`;var Gt=class extends C{constructor(){super(...arguments);this.hasSlotController=new J(this,"[default]","actions","footer")}firstUpdated(t){if(super.firstUpdated(t),this.basis&&this.style.setProperty("--zn-panel-basis",this.basis.toString()+"px"),!this.tabbed){let r=this.querySelector("zn-tabs");if(r){r.setAttribute("flush-x","");let n=this.shadowRoot?.querySelector(".body");n&&n.classList.toggle("ntp",!0)}}}connectedCallback(){if(super.connectedCallback(),window.CSS.registerProperty)try{window.CSS.registerProperty({inherits:!1,initialValue:"0deg",name:"--rotate",syntax:"<angle>"})}catch{}}render(){let t=this.hasSlotController.test("actions"),r=this.hasSlotController.test("footer"),n=this.caption||t;return u`
|
|
1949
1949
|
<div class="${N({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":t,"panel--has-footer":r,"panel--has-header":n,"panel--borderless-header":this.headerBorderless,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}">
|
|
1950
1950
|
|
|
1951
1951
|
<div class="panel__inner">
|
|
@@ -1967,7 +1967,7 @@ import{a as _n,b as D1,c as nr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var J
|
|
|
1967
1967
|
${r?u`
|
|
1968
1968
|
<slot name="footer" class="panel__footer"></slot>`:null}
|
|
1969
1969
|
</div>
|
|
1970
|
-
</div>`}};Gt.styles=T(mv),c([p({attribute:"basis-px",type:Number})],Gt.prototype,"basis",2),c([p()],Gt.prototype,"caption",2),c([p()],Gt.prototype,"icon",2),c([p({type:Boolean})],Gt.prototype,"tabbed",2),c([p({attribute:"header-borderless",type:Boolean})],Gt.prototype,"headerBorderless",2),c([p({type:Boolean})],Gt.prototype,"cosmic",2),c([p({type:Boolean})],Gt.prototype,"flush",2),c([p({attribute:"flush-x",type:Boolean})],Gt.prototype,"flushX",2),c([p({attribute:"flush-y",type:Boolean})],Gt.prototype,"flushY",2),c([p({attribute:"flush-footer",type:Boolean})],Gt.prototype,"flushFooter",2),c([p({type:Boolean})],Gt.prototype,"transparent",2),c([p({type:Boolean})],Gt.prototype,"shadow",2);var XS=Gt;Gt.define("zn-panel");var fv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block}.table-wrapper{max-width:100%;width:100%;overflow:hidden;position:relative}zn-checkbox{padding:0}zn-
|
|
1970
|
+
</div>`}};Gt.styles=T(mv),c([p({attribute:"basis-px",type:Number})],Gt.prototype,"basis",2),c([p()],Gt.prototype,"caption",2),c([p()],Gt.prototype,"icon",2),c([p({type:Boolean})],Gt.prototype,"tabbed",2),c([p({attribute:"header-borderless",type:Boolean})],Gt.prototype,"headerBorderless",2),c([p({type:Boolean})],Gt.prototype,"cosmic",2),c([p({type:Boolean})],Gt.prototype,"flush",2),c([p({attribute:"flush-x",type:Boolean})],Gt.prototype,"flushX",2),c([p({attribute:"flush-y",type:Boolean})],Gt.prototype,"flushY",2),c([p({attribute:"flush-footer",type:Boolean})],Gt.prototype,"flushFooter",2),c([p({type:Boolean})],Gt.prototype,"transparent",2),c([p({type:Boolean})],Gt.prototype,"shadow",2);var XS=Gt;Gt.define("zn-panel");var fv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block}.table-wrapper{max-width:100%;width:100%;overflow:hidden;position:relative}zn-checkbox{padding:0}zn-icon[src=more_vert]{cursor:pointer}thead{color:rgb(var(--zn-text-heading));font-weight:600;font-size:14px}.table-wrapper{width:100%;max-width:100%;overflow-x:auto;display:block}table,thead,tbody,tr,td,th{box-sizing:border-box}tr td{min-height:40px;height:52px}tr.with-summary td{min-height:80px;height:80px}.table-row.table-row--error{color:rgb(var(--zn-color-error));border-color:rgb(var(--zn-color-error));background:rgba(var(--zn-color-error),0.1)}.table-row.table-row--info{color:rgb(var(--zn-color-info));border-color:rgb(var(--zn-color-info));background:rgba(var(--zn-color-info),0.1)}.table-row.table-row--warning{color:rgb(var(--zn-color-warning));border-color:rgb(var(--zn-color-warning));background:rgba(var(--zn-color-warning),0.1)}.table-row.table-row--success{color:rgb(var(--zn-color-success)) !important;border-color:rgb(var(--zn-color-success));background:rgba(var(--zn-color-success),0.1)}.table-row.table-row--nested td:first-of-type{padding-left:var(--zn-spacing-medium)}.table-row.table-row--nested td:first-of-type zn-icon{--icon-color:rgb(var(--zn-text-heading))}th.wide-column{width:60%}td.capcol .actions:empty{display:none}td.capcol .actions button{display:flex;padding:0;margin:0;background:transparent;border:transparent;color:rgb(var(--zn-text))}td.capcol>div{display:flex;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);align-items:center}td.capcol>div div{display:flex;justify-items:center}td.capcol>div div.capd{flex-grow:1;flex-direction:column}td.capcol>div div.capd span{display:block}td.capcol>div div.capd .caption:empty,td.capcol>div div.capd .summary:empty{display:none}td.capcol>div div.capd .caption{font-weight:600;color:rgb(var(--zn-text-heading));font-size:14px;text-decoration:none}td.capcol>div div.capd .caption a{color:inherit;text-decoration:inherit}td.capcol>div div.capd .summary{font-size:90%;text-wrap:initial}.table--last-right tr td:last-of-type,.table--last-right tr th:last-of-type{text-align:right}zn-table[fixed-first]{--capcol-width:250px}zn-table[fixed-first] tbody tr:nth-of-type(even) td.capcol{background-color:rgba(var(--zn-body))}zn-table[fixed-first] thead th:first-of-type,zn-table[fixed-first] td.capcol{position:sticky;left:0;top:0;overflow:hidden;background-color:rgba(var(--zn-panel));min-width:var(--capcol-width);max-width:var(--capcol-width);border-right:1px solid rgb(var(--zn-border-color))}zn-table[borders] tr,zn-table[borders] td{margin:0}zn-table[borders] tbody tr td:last-of-type{border-right-width:1px !important}zn-table[borders] tbody tr td:first-of-type{border-left-width:1px !important}zn-table[borders] tbody tr:first-of-type td{border-top-width:1px !important}zn-table[borders] tbody tr:last-of-type td{border-bottom-width:1px !important}zn-table[cborders] tbody tr td{border-left-width:1px !important}zn-table[fixed] table{table-layout:fixed}`;var Zr=class extends C{constructor(){super(...arguments);this.fixedFirst=!1;this.hasActions=!1;this.headless=!1;this.allLeft=!1;this.boolIcons=!1;this.columns=[];this.columnDisplay=[];this.wideColumn=[];this.rows=[];this.resizeObserver=new Jt(this,{target:null,callback:()=>this.resizing()})}resizing(){}connectedCallback(){if(this.fixedFirst&&this.parentElement&&this.resizeObserver.observe(this.parentElement),(this.data===null||this.data===void 0)&&this.childNodes.length>0&&this.childNodes[0].nodeType===3){let t=this.childNodes,r="";for(let n of t)r+=n.textContent;r=r.replace(/\n/g,"");try{this.data=JSON.parse(r),this.innerText=""}catch(n){console.error("Error parsing JSON",n)}}if(this.data!==null&&this.data!==void 0&&(this.data.hasOwnProperty("header")&&this.data.header.forEach(t=>{typeof t=="string"&&(t={name:t}),this.columns.push(t.hasOwnProperty("name")?t.name:""),this.columnDisplay.push(t.hasOwnProperty("display")?t.display:""),this.wideColumn.push(t.hasOwnProperty("wide")?t.wide:"")}),this.data.hasOwnProperty("items")&&this.data.items!=null&&(this.rows=this.data.items),this.rows.length==0&&this.columns.length==0)){this.columns.push("");for(let t in this.data){for(let r in this.data[t]){let n=r.replace(/([A-Z]+)/g," $1").replace(/([A-Z][a-z])/g," $1");this.columns.includes(n)||this.columns.push(n)}this.rows.push({data:Object.values(this.data[t])})}}return super.connectedCallback()}tableHead(){if(this.headless)return;let t=[];return this.columns.forEach((r,n)=>{if(r==="")return;r==="_"&&(r="");let a=this.columnDisplay[n];if(n==0)t.push(u`
|
|
1971
1971
|
<th>${r}</th>`);else{let s="";a!=""&&a!=null&&(s="hidden "+a+":table-cell"),this.wideColumn[n]&&(s+=" wide-column"),t.push(u`
|
|
1972
1972
|
<th class="${s}">${r}</th>`)}}),u`
|
|
1973
1973
|
<thead>
|
package/package.json
CHANGED
|
@@ -108,16 +108,6 @@ export default class ZnTable extends ZincElement {
|
|
|
108
108
|
return super.connectedCallback();
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
_handleMenu(e: any) {
|
|
112
|
-
e.target.closest('.actions').querySelector('zn-menu').toggleAttribute('hidden');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
menuClick(e: any) {
|
|
116
|
-
const menu = e.target.closest('.actions').querySelector('zn-menu');
|
|
117
|
-
menu.style.top = (e.clientY - this.clientTop) + 'px';
|
|
118
|
-
menu.style.left = (e.clientX - this.clientLeft) + 'px';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
111
|
tableHead() {
|
|
122
112
|
if (this.headless) return;
|
|
123
113
|
|