jb-grid 0.4.1 → 0.5.0
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/README.md +138 -11
- package/package.json +5 -8
- package/react/README.md +207 -202
- package/react/dist/Content.d.ts +1 -2
- package/react/dist/Footer.d.ts +1 -2
- package/react/dist/Header.d.ts +3 -16
- package/react/dist/JBGrid.cjs.js +3631 -1
- package/react/dist/JBGrid.cjs.js.map +1 -1
- package/react/dist/JBGrid.d.ts +288 -26
- package/react/dist/JBGrid.js +3624 -1
- package/react/dist/JBGrid.js.map +1 -1
- package/react/dist/JBGrid.umd.js +3641 -1
- package/react/dist/JBGrid.umd.js.map +1 -1
- package/react/dist/JBGridData.d.ts +1 -5
- package/react/dist/JBGridViewModel.d.ts +28 -25
- package/react/dist/types.d.ts +17 -49
- package/react/lib/Components/Cell.tsx +17 -15
- package/react/lib/Components/ColumnHeader.tsx +44 -0
- package/react/lib/Components/ExpandToggle.tsx +14 -10
- package/react/lib/Components/FullscreenIcon.tsx +28 -0
- package/react/lib/Components/JBLoading.tsx +5 -4
- package/react/lib/Components/Pagination.tsx +1 -1
- package/react/lib/Components/PaginationInfo.tsx +71 -0
- package/react/lib/Components/RefreshIcon.tsx +11 -0
- package/react/lib/Components/Row.tsx +17 -15
- package/react/lib/Components/TableHeader.tsx +21 -0
- package/react/lib/Components/blob-loading.css +27 -23
- package/react/lib/Components/cell.css +7 -7
- package/react/lib/Components/content-error/ContentError.tsx +19 -16
- package/react/lib/Components/content-error/content-error.css +5 -11
- package/react/lib/Components/module-declaration.ts +61 -13
- package/react/lib/Content.tsx +23 -47
- package/react/lib/Footer.tsx +52 -79
- package/react/lib/Header.tsx +11 -24
- package/react/lib/JBGrid.tsx +129 -70
- package/react/lib/JBGridViewModel.ts +189 -452
- package/react/lib/footer.css +25 -55
- package/react/lib/header.css +20 -20
- package/react/lib/jb-grid.css +69 -55
- package/react/lib/types.ts +32 -129
- package/react/lib/variables.css +6 -0
- package/react/package.json +14 -10
- package/react/tsconfig.json +5 -4
- package/web-component/dist/index.cjs.js +559 -1
- package/web-component/dist/index.cjs.js.br +0 -0
- package/web-component/dist/index.cjs.js.gz +0 -0
- package/web-component/dist/index.cjs.js.map +1 -1
- package/web-component/dist/index.d.ts +161 -4
- package/web-component/dist/index.d.ts.map +1 -1
- package/web-component/dist/index.js +561 -1
- package/web-component/dist/index.js.br +0 -0
- package/web-component/dist/index.js.gz +0 -0
- package/web-component/dist/index.js.map +1 -1
- package/web-component/dist/index.umd.js +567 -1
- package/web-component/dist/index.umd.js.br +0 -0
- package/web-component/dist/index.umd.js.gz +0 -0
- package/web-component/dist/index.umd.js.map +1 -1
- package/web-component/dist/row/row.d.ts.map +1 -1
- package/web-component/dist/row/types.d.ts +3 -5
- package/web-component/dist/row/types.d.ts.map +1 -1
- package/web-component/dist/row/utils.d.ts +1 -2
- package/web-component/dist/row/utils.d.ts.map +1 -1
- package/web-component/dist/table-header/render.d.ts +2 -0
- package/web-component/dist/table-header/render.d.ts.map +1 -0
- package/web-component/dist/table-header/table-header.d.ts +9 -0
- package/web-component/dist/table-header/table-header.d.ts.map +1 -0
- package/web-component/dist/table-header/types.d.ts +4 -0
- package/web-component/dist/table-header/types.d.ts.map +1 -0
- package/web-component/dist/types.d.ts +6 -0
- package/web-component/dist/types.d.ts.map +1 -0
- package/web-component/dist/utils.d.ts +8 -0
- package/web-component/dist/utils.d.ts.map +1 -0
- package/web-component/lib/cell/cell.ts +10 -5
- package/web-component/lib/cell/style.css +2 -1
- package/web-component/lib/column-header/column-header.ts +117 -0
- package/web-component/lib/column-header/render.ts +14 -0
- package/web-component/lib/column-header/style.css +60 -0
- package/web-component/lib/column-header/types.ts +10 -0
- package/web-component/lib/fullscreen-icon/fullscreen-icon.ts +72 -0
- package/web-component/lib/fullscreen-icon/render.ts +23 -0
- package/web-component/lib/fullscreen-icon/style.css +44 -0
- package/web-component/lib/fullscreen-icon/types.ts +1 -0
- package/web-component/lib/i18n.ts +38 -0
- package/web-component/lib/index.ts +9 -4
- package/web-component/lib/pagination/README.md +4 -0
- package/web-component/lib/pagination/pagination.ts +25 -15
- package/web-component/lib/pagination/render.ts +13 -10
- package/web-component/lib/pagination/style.css +43 -31
- package/web-component/lib/pagination/types.ts +1 -1
- package/web-component/lib/pagination/variables.css +10 -0
- package/web-component/lib/pagination-info/pagination-info.ts +191 -0
- package/web-component/lib/pagination-info/render.ts +16 -0
- package/web-component/lib/pagination-info/style.css +47 -0
- package/web-component/lib/pagination-info/types.ts +12 -0
- package/web-component/lib/refresh-icon/refresh-icon.ts +79 -0
- package/web-component/lib/refresh-icon/render.ts +10 -0
- package/web-component/lib/refresh-icon/style.css +21 -0
- package/web-component/lib/row/render.ts +3 -3
- package/web-component/lib/row/row.ts +29 -15
- package/web-component/lib/row/style.css +30 -30
- package/web-component/lib/row/types.ts +7 -8
- package/web-component/lib/row/utils.ts +1 -40
- package/web-component/lib/row/variables.css +13 -0
- package/web-component/lib/table-header/render.ts +9 -0
- package/web-component/lib/table-header/style.css +29 -0
- package/web-component/lib/table-header/table-header.ts +50 -0
- package/web-component/lib/table-header/types.ts +4 -0
- package/web-component/lib/toggle/expand-toggle.ts +17 -13
- package/web-component/lib/toggle/render.ts +18 -13
- package/web-component/lib/toggle/style.css +18 -5
- package/web-component/lib/types.ts +6 -0
- package/web-component/lib/utils.ts +46 -0
- package/react/lib/JBGridBridgeExample.js +0 -90
- package/react/lib/JBGridData.ts +0 -51
- package/react/lib/global.d.ts +0 -15
- package/web-component/lib/global.d.ts +0 -15
- package/web-component/tsconfig.json +0 -17
|
@@ -1,2 +1,568 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jb-core/theme"),require("jb-core/i18n"),require("jb-core")):"function"==typeof define&&define.amd?define(["exports","jb-core/theme","jb-core/i18n","jb-core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JBGrid={},e.JBCoreTheme,e.JBCoreI18N,e.JBCore)}(this,function(e,t,i,n){var a=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,l=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,p=(e,t,i)=>(i=null!=e?a(l(e)):{},((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=r(t),p=0,d=l.length;p<d;p++)a=l[p],h.call(e,a)||a===i||s(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(n=o(t,a))||n.enumerable});return e})(!t&&e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e));function d(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function c(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,i):a?a.value=i:t.set(e,i),i}t=p(t),i=p(i),n=p(n);var m,g,f,w,u,b,x,v,y,j,k,E,M,S,L,W,C,T,z,I,O=class extends HTMLElement{get pageIndex(){return d(this,f,"f")}set pageIndex(e){d(this,m,"m",M).call(this,e,!1)}get max(){return d(this,u,"f")}set max(e){c(this,u,e,"f"),this.pageIndex>e&&d(this,m,"m",C).call(this,e,!1),d(this,g,"f").nav.last.disabled=d(this,u,"f")==1/0}get min(){return d(this,w,"f")}set min(e){c(this,w,e,"f"),d(this,f,"f")<e&&d(this,m,"m",C).call(this,e,!1),d(this,g,"f").nav.first.disabled=d(this,w,"f")==1/0}constructor(){super(),m.add(this),g.set(this,void 0),f.set(this,1),w.set(this,1),u.set(this,1/0),b.set(this,3),this.showPersianNumber="arabext"==i.i18n.locale.numberingSystem,d(this,m,"m",v).call(this)}connectedCallback(){}};g=new WeakMap,f=new WeakMap,w=new WeakMap,u=new WeakMap,b=new WeakMap,m=new WeakSet,x=function(){return d(this,b,"f")+2},v=function(){const e=this.attachShadow({mode:"open",delegatesFocus:!0,clonable:!0,serializable:!0});(0,t.registerDefaultVariables)(),d(this,m,"m",y).call(this),c(this,g,{nav:{wrapper:e.querySelector(".page-navigator"),first:e.querySelector(".first-page"),last:e.querySelector(".last-page"),next:e.querySelector(".next-page"),prev:e.querySelector(".prev-page")},index:{wrapper:e.querySelector(".page-index-wrapper"),list:[]}},"f"),d(this,m,"m",j).call(this),d(this,m,"m",I).call(this),this.max=1/0,this.min=1},y=function(){const e=document.createElement("template");e.innerHTML='<style>:host{--jb-pagination-index-width:3rem}.jb-pagination-web-component{direction:ltr;gap:1rem;display:flex}.jb-pagination-web-component .page-navigator{grid-template-rows:3rem;grid-template-columns:4rem 4rem max-content 4rem 4rem;place-items:center;display:grid}.jb-pagination-web-component .page-navigator .arrow-btn{all:unset;cursor:pointer;width:3rem;height:3rem;fill:var(--jb-neutral-2)}.jb-pagination-web-component .page-navigator .arrow-btn:disabled{fill:var(--jb-neutral-7)}.jb-pagination-web-component .page-navigator .page-index-wrapper{width:calc(var(--jb-pagination-index-width) * 3);height:100%;position:relative;overflow:hidden}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index{color:var(--jb-neutral-6);width:var(--jb-pagination-index-width);text-box-trim:trim-both;text-box-edge:ex alphabetic;cursor:pointer;justify-content:center;align-items:center;height:3rem;font-size:1rem;transition:all .3s;display:flex;position:absolute}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index.current{color:var(--jb-primary);transform:scale(1.2)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index.empty{cursor:default}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:first-child{top:0;left:calc(var(--jb-pagination-index-width) * -1);transform:scale(.1)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(2){top:0;left:0}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(3){top:0;left:calc(var(--jb-pagination-index-width))}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(4){top:0;left:calc(var(--jb-pagination-index-width) * 2)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(5){top:0;left:calc(var(--jb-pagination-index-width) * 3);transform:scale(.1)}</style>\n\n <div class="jb-pagination-web-component">\n <section class="page-navigator">\n <button class="first-page arrow-btn">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet"><title>first page</title><path d="M7 6 v12 h2 v-12 h-2z M17.41 7.41L16 6l-6 6 6 6 1.41-1.41L12.83 12z"></path></svg>\n </button>\n <button class="prev-page arrow-btn">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet"><title>prev page</title><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></svg>\n </button>\n <div class="page-index-wrapper">\n </div>\n <button class="next-page arrow-btn">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet"><title>previous page</title><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg>\n </button>\n <button class="last-page arrow-btn">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet"><title>last page</title><path d="M15 6 v12 h2 v-12 h-2z M8 6L6.59 7.41 11.17 12l-4.58 4.59L8 18l6-6z"></path></svg>\n </button>\n </section>\n </div>\n ',this.shadowRoot.appendChild(e.content.cloneNode(!0))},j=function(){d(this,g,"f").nav.next.addEventListener("click",()=>d(this,m,"m",k).call(this,!0)),d(this,g,"f").nav.prev.addEventListener("click",()=>d(this,m,"m",E).call(this,!0)),d(this,g,"f").nav.last.addEventListener("click",()=>{d(this,m,"m",M).call(this,d(this,u,"f"),!0)}),d(this,g,"f").nav.first.addEventListener("click",()=>{d(this,m,"m",M).call(this,d(this,w,"f"),!0)})},k=function(e){if(d(this,f,"f")>d(this,u,"f")-1)return;const t=d(this,f,"f")+1,i=d(this,m,"m",L).call(this,t+2);d(this,g,"f").index.list.shift()?.remove(),d(this,g,"f").index.wrapper.append(i),d(this,g,"f").index.list.push(i),d(this,m,"m",C).call(this,t,e)},E=function(e){if(d(this,f,"f")<d(this,w,"f")+1)return;const t=d(this,f,"f")-1,i=d(this,m,"m",L).call(this,t-2);d(this,g,"f").index.list.pop()?.remove(),d(this,g,"f").index.list.unshift(i),d(this,g,"f").index.wrapper.prepend(i),d(this,m,"m",C).call(this,t,e)},M=function(e,t){if(d(this,f,"f")==e)return;const i=e-d(this,f,"f");Math.abs(i)>1?(d(this,m,"m",C).call(this,e,t),d(this,m,"m",I).call(this)):i>0?d(this,m,"m",k).call(this,t):d(this,m,"m",E).call(this,t)},S=function(e){if(d(this,g,"f").index.list.find(t=>t.pageIndex==e.pageIndex))return;let t="end";if(0==d(this,g,"f").index.list.length||d(this,g,"f").index.list[d(this,g,"f").index.list.length-1]?.pageIndex<e.pageIndex)d(this,g,"f").index.list.push(e),d(this,g,"f").index.wrapper.append(e),t="start";else if(d(this,g,"f").index.list[0]?.pageIndex>e.pageIndex)d(this,g,"f").index.list.unshift(e),d(this,g,"f").index.wrapper.prepend(e);else{const t=d(this,g,"f").index.list.findIndex(t=>t?.pageIndex>e.pageIndex);d(this,g,"f").index.wrapper.insertBefore(e,d(this,g,"f").index.list[t]),d(this,g,"f").index.list.splice(t,0,e)}d(this,g,"f").index.list.length>d(this,m,"a",x)&&("end"==t?d(this,g,"f").index.list.pop()?.remove():d(this,g,"f").index.list.shift()?.remove())},L=function(e){const t=d(this,w,"f")>e||d(this,u,"f")<e,i=document.createElement("div");return i.classList.add("page-index",t?"empty":"not-empty"),i.dataset.index=`${e}`,i.pageIndex=e,i.addEventListener("click",e=>{d(this,m,"m",W).call(this,i)}),t?i.isEmpty=!0:(i.isEmpty=!1,i.innerHTML=`${this.showPersianNumber?(0,n.enToFaDigits)(e):e}`),i},W=function(e){e.isEmpty||d(this,m,"m",M).call(this,e.pageIndex,!0)},C=function(e,t){c(this,f,e,"f"),d(this,m,"m",T).call(this,e),t&&d(this,m,"m",z).call(this)},T=function(e){d(this,g,"f").index.wrapper.querySelector(".current")?.classList.remove("current"),d(this,g,"f").index.list.forEach(t=>{t.pageIndex==e&&t.classList.add("current")})},z=function(){const e=new Event("change",{cancelable:!1,composed:!0,bubbles:!0});this.dispatchEvent(e)},I=function(){d(this,m,"m",S).call(this,d(this,m,"m",L).call(this,d(this,f,"f")-2)),d(this,m,"m",S).call(this,d(this,m,"m",L).call(this,d(this,f,"f")-1)),d(this,m,"m",S).call(this,d(this,m,"m",L).call(this,d(this,f,"f"))),d(this,m,"m",S).call(this,d(this,m,"m",L).call(this,d(this,f,"f")+1)),d(this,m,"m",S).call(this,d(this,m,"m",L).call(this,d(this,f,"f")+2)),d(this,m,"m",T).call(this,d(this,f,"f"))};!customElements.get("jb-pagination")&&window.customElements.define("jb-pagination",O);var B,q,P,A,H,R,J,N;function $(e,t){if(null===t){const t="\n .grid-row{\n display:grid;\n grid-auto-columns: 1fr;\n grid-auto-flow: column;\n grid-template-rows: 1fr;\n --jb-row-grid-mode: auto;\n }\n ";return e.replaceSync(t),e}let i="";const n=t.map(e=>`${e.name}`).join(" ");t.forEach(e=>{null!=e.size||null!=e.size?"number"==typeof e.size?i+=` ${e.size}px`:i+=` ${e.size}`:i+=" 1fr"});const a=`\n .grid-row{\n display:grid;\n grid-template-columns: ${i};\n grid-template-areas: "${n}"\n }\n `;return e.replaceSync(a),e}var D=class extends HTMLElement{get isOpen(){return d(this,H,"f")}set isOpen(e){c(this,H,e,"f"),e?d(this,q,"f").expandWrapper.classList.remove("--hidden"):d(this,q,"f").expandWrapper.classList.add("--hidden")}get rowTemplate(){return d(this,A,"f")}set rowTemplate(e){c(this,A,e,"f"),$(d(this,P,"f"),e)}constructor(){super(),B.add(this),q.set(this,void 0),P.set(this,new CSSStyleSheet),A.set(this,[]),H.set(this,!1),d(this,B,"m",R).call(this)}connectedCallback(){}};q=new WeakMap,P=new WeakMap,A=new WeakMap,H=new WeakMap,B=new WeakSet,R=function(){const e=this.attachShadow({mode:"open",delegatesFocus:!0,clonable:!0,serializable:!0});e.adoptedStyleSheets=[d(this,P,"f")],(0,t.registerDefaultVariables)(),d(this,B,"m",J).call(this),c(this,q,{expandWrapper:e.querySelector(".expand-wrapper")},"f"),$(d(this,P,"f"),null),d(this,B,"m",N).call(this)},J=function(){const e=document.createElement("template");e.innerHTML='<style>:host{background-color:var(--jb-white);width:100%;display:block}:host(:nth-of-type(2n)){background:var(--jb-neutral-10)}@media (max-width:768px){:host(:nth-of-type(2n)){background:var(--jb-white)}}.jb-row-web-component .grid-row{box-sizing:border-box;grid-auto-rows:minmax(3rem,auto);width:100%}@media (max-width:768px){.jb-row-web-component .grid-row{border-radius:var(--jb-radius);grid-template-rows:auto;box-shadow:0 0 1px #d8d8d8;grid-template-columns:auto!important}}.jb-row-web-component .expand-wrapper{interpolate-size:allow-keywords;opacity:1;height:auto;transition:all .3s;overflow:clip}.jb-row-web-component .expand-wrapper.--hidden{opacity:0;height:0;min-height:0;padding-block:0}.jb-row-web-component .expand-wrapper slot[name=expand]::slotted(*){box-sizing:border-box;border-bottom:1px solid #ebebeb;width:100%;min-height:4rem;padding-block:1rem;padding-inline:2rem;overflow:auto}</style>\n\n <div class="jb-row-web-component">\n <div class="grid-row" part="row">\n <slot name="cell"></slot>\n </div>\n <div class="expand-wrapper --hidden">\n <slot name="expand"></slot>\n </div>\n </div>\n ',this.shadowRoot.appendChild(e.content.cloneNode(!0))},N=function(){};!customElements.get("jb-row")&&window.customElements.define("jb-row",D);var F,Y,V,_,G,Z,K=class extends HTMLElement{get name(){return this.getAttribute("name")||""}set name(e){this.setAttribute("name",e),d(this,V,"f").replace(`\n :host{ grid-area:${e||"none"}}\n @container (style(--jb-row-grid-mode: auto)) {\n :host{ grid-area:auto }\n }\n `)}constructor(){super(),F.add(this),Y.set(this,void 0),V.set(this,new CSSStyleSheet),d(this,F,"m",_).call(this)}connectedCallback(){}};Y=new WeakMap,V=new WeakMap,F=new WeakSet,_=function(){this.attachShadow({mode:"open",delegatesFocus:!0,clonable:!0,serializable:!0}).adoptedStyleSheets=[d(this,V,"f")],(0,t.registerDefaultVariables)(),d(this,F,"m",G).call(this),c(this,Y,{},"f"),d(this,F,"m",Z).call(this)},G=function(){const e=document.createElement("template");e.innerHTML='<style>:host{box-sizing:border-box;grid-template-rows:minmax(0,auto);grid-template-columns:auto;grid-auto-columns:max-content;grid-auto-flow:column;justify-content:start;align-items:center;gap:.5rem;width:100%;max-width:100%;height:100%;padding:.25rem 1rem;display:grid}:host([ellipsis]:not([ellipsis="1"]):not([ellipsis=""])){-webkit-line-clamp:attr(max-line type(<integer>), 1);line-clamp:attr(max-line type(<integer>), 1);box-orient:vertical;-webkit-box-orient:vertical;align-content:center;height:fit-content;display:-webkit-box;overflow:hidden}:host(:where([ellipsis=""],[ellipsis="1"])){text-overflow:ellipsis;white-space:nowrap;align-content:center;display:block;overflow:hidden}</style>\n\n <slot></slot>\n ',this.shadowRoot.appendChild(e.content.cloneNode(!0))},Z=function(){};!customElements.get("jb-cell")&&window.customElements.define("jb-cell",K);var Q,U,X,ee,te,ie,ne=class extends HTMLElement{constructor(){super(),Q.add(this),ee.set(this,null),d(this,Q,"m",U).call(this)}connectedCallback(){c(this,ee,d(this,Q,"m",te).call(this,this),"f"),d(this,ee,"f")?.isOpen&&this.setAttribute("open","")}toggle(){if(d(this,ee,"f")){const e=!d(this,ee,"f")?.isOpen;d(this,ee,"f").isOpen=e,e?this.setAttribute("open",""):this.removeAttribute("open")}}};ee=new WeakMap,Q=new WeakSet,U=function(){this.attachShadow({mode:"open",delegatesFocus:!0,clonable:!0,serializable:!0});(0,t.registerDefaultVariables)(),d(this,Q,"m",X).call(this),d(this,Q,"m",ie).call(this)},X=function(){const e=document.createElement("template");e.innerHTML='<style>:host{cursor:pointer;width:1.5rem;height:1.5rem;display:block}:host([open]) .arrow-icon{rotate:-90deg}:host([open]) .arrow-icon:dir(ltr){rotate:90deg}.arrow-icon{width:100%;height:100%;transition:all .3s}.arrow-icon:dir(ltr){transform:rotateY(180deg)}</style>\n\n <slot>\n <svg class="arrow-icon" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <path d="M35,10 L15,25 L35,40 Z" \n fill="currentColor" \n stroke="currentColor" \n stroke-width="6" \n stroke-linejoin="round" />\n </svg>\n </slot>\n ',this.shadowRoot.appendChild(e.content.cloneNode(!0))},te=function e(t){return t&&t.parentElement?t.parentElement instanceof D?t.parentElement:d(this,Q,"m",e).call(this,this.parentElement):null},ie=function(){this.addEventListener("click",()=>this.toggle(),{passive:!0})};!customElements.get("jb-expand-toggle")&&window.customElements.define("jb-expand-toggle",ne),e.JBCellWebComponent=K,e.JBExpandToggleWebComponent=ne,e.JBPaginationWebComponent=O,e.JBRowWebComponent=D});
|
|
1
|
+
(function(e, t) {
|
|
2
|
+
"object" == typeof exports && "undefined" != typeof module ? t(exports, require("jb-core/i18n"), require("jb-core/theme"), require("jb-core")) : "function" == typeof define && define.amd ? define([
|
|
3
|
+
"exports",
|
|
4
|
+
"jb-core/i18n",
|
|
5
|
+
"jb-core/theme",
|
|
6
|
+
"jb-core"
|
|
7
|
+
], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).JBGrid = {}, e.JBCoreI18N, e.JBCoreTheme, e.JBCore);
|
|
8
|
+
})(this, function(e, t, n, i) {
|
|
9
|
+
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
const a = new t.JBDictionary({
|
|
11
|
+
fa: {
|
|
12
|
+
toggleRowDetails: "نمایش یا پنهان کردن جزئیات ردیف",
|
|
13
|
+
refreshData: "بهروزرسانی دادهها",
|
|
14
|
+
enterFullscreen: "ورود به حالت تمامصفحه",
|
|
15
|
+
exitFullscreen: "خروج از حالت تمامصفحه",
|
|
16
|
+
firstPage: "صفحه اول",
|
|
17
|
+
previousPage: "صفحه قبل",
|
|
18
|
+
nextPage: "صفحه بعد",
|
|
19
|
+
lastPage: "صفحه آخر",
|
|
20
|
+
page: (e) => `صفحه ${e}`
|
|
21
|
+
},
|
|
22
|
+
en: {
|
|
23
|
+
toggleRowDetails: "Toggle row details",
|
|
24
|
+
refreshData: "Refresh data",
|
|
25
|
+
enterFullscreen: "Enter fullscreen",
|
|
26
|
+
exitFullscreen: "Exit fullscreen",
|
|
27
|
+
firstPage: "First page",
|
|
28
|
+
previousPage: "Previous page",
|
|
29
|
+
nextPage: "Next page",
|
|
30
|
+
lastPage: "Last page",
|
|
31
|
+
page: (e) => `Page ${e}`
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var r = class extends HTMLElement {
|
|
35
|
+
#e;
|
|
36
|
+
#t;
|
|
37
|
+
#n;
|
|
38
|
+
#i;
|
|
39
|
+
#a;
|
|
40
|
+
get #r() {
|
|
41
|
+
return this.#a + 2;
|
|
42
|
+
}
|
|
43
|
+
get pageIndex() {
|
|
44
|
+
return this.#t;
|
|
45
|
+
}
|
|
46
|
+
set pageIndex(e) {
|
|
47
|
+
this.#s(e, !1);
|
|
48
|
+
}
|
|
49
|
+
get max() {
|
|
50
|
+
return this.#i;
|
|
51
|
+
}
|
|
52
|
+
set max(e) {
|
|
53
|
+
this.#i = e, this.pageIndex > e && this.#o(e, !1), this.#e.nav.last.disabled = this.#i == Infinity;
|
|
54
|
+
}
|
|
55
|
+
get min() {
|
|
56
|
+
return this.#n;
|
|
57
|
+
}
|
|
58
|
+
set min(e) {
|
|
59
|
+
this.#n = e, this.#t < e && this.#o(e, !1), this.#e.nav.first.disabled = this.#n == Infinity;
|
|
60
|
+
}
|
|
61
|
+
constructor() {
|
|
62
|
+
super(), this.#t = 1, this.#n = 1, this.#i = Infinity, this.#a = 3, this.showPersianNumber = "arabext" == t.i18n.locale.numberingSystem, this.#l();
|
|
63
|
+
}
|
|
64
|
+
#l() {
|
|
65
|
+
const e = this.attachShadow({
|
|
66
|
+
mode: "open",
|
|
67
|
+
delegatesFocus: !0,
|
|
68
|
+
clonable: !0,
|
|
69
|
+
serializable: !0
|
|
70
|
+
});
|
|
71
|
+
(0, n.registerDefaultVariables)(), this.#d(), this.#e = {
|
|
72
|
+
nav: {
|
|
73
|
+
wrapper: e.querySelector(".page-navigator"),
|
|
74
|
+
first: e.querySelector(".first-page"),
|
|
75
|
+
last: e.querySelector(".last-page"),
|
|
76
|
+
next: e.querySelector(".next-page"),
|
|
77
|
+
prev: e.querySelector(".prev-page")
|
|
78
|
+
},
|
|
79
|
+
index: {
|
|
80
|
+
wrapper: e.querySelector(".page-index-wrapper"),
|
|
81
|
+
list: []
|
|
82
|
+
}
|
|
83
|
+
}, this.#h(), this.#p(), this.max = Infinity, this.min = 1;
|
|
84
|
+
}
|
|
85
|
+
#d() {
|
|
86
|
+
const e = `<style>:host{--arrow-button-fill-color:var(--jb-pagination-arrow-button-fill-color,var(--jb-neutral-2));--arrow-button-fill-color-disabled:var(--jb-pagination-arrow-button-fill-color-disabled,var(--jb-neutral-7));--page-index-color:var(--jb-pagination-page-index-color,var(--jb-neutral-6));--page-index-color-current:var(--jb-pagination-page-index-color-current,var(--jb-primary));--index-width:var(--jb-pagination-index-width,3rem)} .jb-pagination-web-component{direction:ltr;gap:1rem;display:flex}.jb-pagination-web-component .page-navigator{grid-template-rows:3rem;grid-template-columns:4rem 4rem max-content 4rem 4rem;place-items:center;display:grid}.jb-pagination-web-component .page-navigator .arrow-btn{all:unset;box-sizing:border-box;cursor:pointer;width:3rem;height:3rem;fill:var(--arrow-button-fill-color)}.jb-pagination-web-component .page-navigator .arrow-btn:focus-visible{outline:2px solid var(--jb-grid-focus-ring-color,Highlight);outline-offset:2px}.jb-pagination-web-component .page-navigator .arrow-btn:disabled{fill:var(--arrow-button-fill-color-disabled);cursor:default}.jb-pagination-web-component .page-navigator .page-index-wrapper{width:calc(var(--index-width) * 3);height:100%;position:relative;overflow:hidden}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index{all:unset;box-sizing:border-box;color:var(--page-index-color);width:var(--index-width);text-box-trim:trim-both;text-box-edge:ex alphabetic;cursor:pointer;justify-content:center;align-items:center;height:3rem;font-size:1rem;transition:all .3s;display:flex;position:absolute}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:disabled{cursor:default}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:focus-visible{outline:2px solid var(--jb-grid-focus-ring-color,Highlight);outline-offset:-2px}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index.current{color:var(--page-index-color-current);transform:scale(1.2)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index.empty{cursor:default}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:first-child{top:0;left:calc(var(--index-width) * -1);transform:scale(.1)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(2){top:0;left:0}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(3){top:0;left:calc(var(--index-width))}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(4){top:0;left:calc(var(--index-width) * 2)}.jb-pagination-web-component .page-navigator .page-index-wrapper .page-index:nth-child(5){top:0;left:calc(var(--index-width) * 3);transform:scale(.1)}</style>\n\n <div class="jb-pagination-web-component">\n <section class="page-navigator">\n <button class="first-page arrow-btn" type="button" aria-label="${a.get(t.i18n, "firstPage")}">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" aria-hidden="true"><path d="M7 6 v12 h2 v-12 h-2z M17.41 7.41L16 6l-6 6 6 6 1.41-1.41L12.83 12z"></path></svg>\n </button>\n <button class="prev-page arrow-btn" type="button" aria-label="${a.get(t.i18n, "previousPage")}">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" aria-hidden="true"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></svg>\n </button>\n <div class="page-index-wrapper">\n </div>\n <button class="next-page arrow-btn" type="button" aria-label="${a.get(t.i18n, "nextPage")}">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" aria-hidden="true"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg>\n </button>\n <button class="last-page arrow-btn" type="button" aria-label="${a.get(t.i18n, "lastPage")}">\n <svg width="100%" height="100%" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" aria-hidden="true"><path d="M15 6 v12 h2 v-12 h-2z M8 6L6.59 7.41 11.17 12l-4.58 4.59L8 18l6-6z"></path></svg>\n </button>\n </section>\n </div>\n `, n = document.createElement("template");
|
|
87
|
+
n.innerHTML = e, this.shadowRoot.appendChild(n.content.cloneNode(!0));
|
|
88
|
+
}
|
|
89
|
+
connectedCallback() {}
|
|
90
|
+
#h() {
|
|
91
|
+
this.#e.nav.next.addEventListener("click", () => this.#c(!0)), this.#e.nav.prev.addEventListener("click", () => this.#m(!0)), this.#e.nav.last.addEventListener("click", () => {
|
|
92
|
+
this.#s(this.#i, !0);
|
|
93
|
+
}), this.#e.nav.first.addEventListener("click", () => {
|
|
94
|
+
this.#s(this.#n, !0);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
#c(e) {
|
|
98
|
+
if (this.#t > this.#i - 1) return;
|
|
99
|
+
const t = this.#t + 1, n = this.#g(t + 2);
|
|
100
|
+
this.#e.index.list.shift()?.remove(), this.#e.index.wrapper.append(n), this.#e.index.list.push(n), this.#o(t, e);
|
|
101
|
+
}
|
|
102
|
+
#m(e) {
|
|
103
|
+
if (this.#t < this.#n + 1) return;
|
|
104
|
+
const t = this.#t - 1, n = this.#g(t - 2);
|
|
105
|
+
this.#e.index.list.pop()?.remove(), this.#e.index.list.unshift(n), this.#e.index.wrapper.prepend(n), this.#o(t, e);
|
|
106
|
+
}
|
|
107
|
+
#s(e, t) {
|
|
108
|
+
if (this.#t == e) return;
|
|
109
|
+
const n = e - this.#t;
|
|
110
|
+
Math.abs(n) > 1 ? (this.#o(e, t), this.#p()) : n > 0 ? this.#c(t) : this.#m(t);
|
|
111
|
+
}
|
|
112
|
+
#b(e) {
|
|
113
|
+
if (this.#e.index.list.find((t) => t.pageIndex == e.pageIndex)) return;
|
|
114
|
+
let t = "end";
|
|
115
|
+
if (0 == this.#e.index.list.length || this.#e.index.list[this.#e.index.list.length - 1]?.pageIndex < e.pageIndex) this.#e.index.list.push(e), this.#e.index.wrapper.append(e), t = "start";
|
|
116
|
+
else if (this.#e.index.list[0]?.pageIndex > e.pageIndex) this.#e.index.list.unshift(e), this.#e.index.wrapper.prepend(e);
|
|
117
|
+
else {
|
|
118
|
+
const t = this.#e.index.list.findIndex((t) => t?.pageIndex > e.pageIndex);
|
|
119
|
+
this.#e.index.wrapper.insertBefore(e, this.#e.index.list[t]), this.#e.index.list.splice(t, 0, e);
|
|
120
|
+
}
|
|
121
|
+
this.#e.index.list.length > this.#r && ("end" == t ? this.#e.index.list.pop()?.remove() : this.#e.index.list.shift()?.remove());
|
|
122
|
+
}
|
|
123
|
+
#g(e) {
|
|
124
|
+
const n = this.#n > e || this.#i < e, r = document.createElement("button");
|
|
125
|
+
return r.type = "button", r.setAttribute("aria-label", a.get(t.i18n, "page")(e)), r.classList.add("page-index", n ? "empty" : "not-empty"), r.dataset.index = `${e}`, r.pageIndex = e, r.addEventListener("click", (e) => {
|
|
126
|
+
this.#u(r);
|
|
127
|
+
}), n ? (r.isEmpty = !0, r.disabled = !0) : (r.isEmpty = !1, r.disabled = !1, r.innerHTML = `${this.showPersianNumber ? (0, i.enToFaDigits)(e) : e}`), r;
|
|
128
|
+
}
|
|
129
|
+
#u(e) {
|
|
130
|
+
e.isEmpty || this.#s(e.pageIndex, !0);
|
|
131
|
+
}
|
|
132
|
+
#o(e, t) {
|
|
133
|
+
this.#t = e, this.#x(e), t && this.#w();
|
|
134
|
+
}
|
|
135
|
+
#x(e) {
|
|
136
|
+
const t = this.#e.index.wrapper.querySelector(".current");
|
|
137
|
+
t?.classList.remove("current"), t?.removeAttribute("aria-current"), this.#e.index.list.forEach((t) => {
|
|
138
|
+
t.tabIndex = t.pageIndex === e ? 0 : -1, t.pageIndex == e && (t.classList.add("current"), t.setAttribute("aria-current", "page"));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
#w() {
|
|
142
|
+
const e = new Event("change", {
|
|
143
|
+
cancelable: !1,
|
|
144
|
+
composed: !0,
|
|
145
|
+
bubbles: !0
|
|
146
|
+
});
|
|
147
|
+
this.dispatchEvent(e);
|
|
148
|
+
}
|
|
149
|
+
#p() {
|
|
150
|
+
this.#b(this.#g(this.#t - 2)), this.#b(this.#g(this.#t - 1)), this.#b(this.#g(this.#t)), this.#b(this.#g(this.#t + 1)), this.#b(this.#g(this.#t + 2)), this.#x(this.#t);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
customElements.get("jb-pagination") || window.customElements.define("jb-pagination", r);
|
|
154
|
+
var s = class extends HTMLElement {
|
|
155
|
+
#e;
|
|
156
|
+
#v = 20;
|
|
157
|
+
#f = [
|
|
158
|
+
20,
|
|
159
|
+
30,
|
|
160
|
+
50,
|
|
161
|
+
100
|
|
162
|
+
];
|
|
163
|
+
#I = 0;
|
|
164
|
+
#y = 0;
|
|
165
|
+
#S = 0;
|
|
166
|
+
#E = "";
|
|
167
|
+
#j = "";
|
|
168
|
+
#z = "";
|
|
169
|
+
#C = !1;
|
|
170
|
+
get pageSize() {
|
|
171
|
+
return this.#v;
|
|
172
|
+
}
|
|
173
|
+
set pageSize(e) {
|
|
174
|
+
this.#v = e, this.#L();
|
|
175
|
+
}
|
|
176
|
+
get pageSizes() {
|
|
177
|
+
return this.#f;
|
|
178
|
+
}
|
|
179
|
+
set pageSizes(e) {
|
|
180
|
+
this.#f = e, this.#P();
|
|
181
|
+
}
|
|
182
|
+
get startItemIndex() {
|
|
183
|
+
return this.#I;
|
|
184
|
+
}
|
|
185
|
+
set startItemIndex(e) {
|
|
186
|
+
this.#I = e, this.#T();
|
|
187
|
+
}
|
|
188
|
+
get endItemIndex() {
|
|
189
|
+
return this.#y;
|
|
190
|
+
}
|
|
191
|
+
set endItemIndex(e) {
|
|
192
|
+
this.#y = e, this.#T();
|
|
193
|
+
}
|
|
194
|
+
get totalItemsCount() {
|
|
195
|
+
return this.#S;
|
|
196
|
+
}
|
|
197
|
+
set totalItemsCount(e) {
|
|
198
|
+
this.#S = e, this.#T();
|
|
199
|
+
}
|
|
200
|
+
get pageItemCountTitle() {
|
|
201
|
+
return this.#E;
|
|
202
|
+
}
|
|
203
|
+
set pageItemCountTitle(e) {
|
|
204
|
+
this.#E = e, this.#M();
|
|
205
|
+
}
|
|
206
|
+
get fromLabel() {
|
|
207
|
+
return this.#j;
|
|
208
|
+
}
|
|
209
|
+
set fromLabel(e) {
|
|
210
|
+
this.#j = e, this.#M();
|
|
211
|
+
}
|
|
212
|
+
get currentAvailableItemTitle() {
|
|
213
|
+
return this.#z;
|
|
214
|
+
}
|
|
215
|
+
set currentAvailableItemTitle(e) {
|
|
216
|
+
this.#z = e, this.#M();
|
|
217
|
+
}
|
|
218
|
+
get showPersianNumber() {
|
|
219
|
+
return this.#C;
|
|
220
|
+
}
|
|
221
|
+
set showPersianNumber(e) {
|
|
222
|
+
this.#C = e, this.#P(), this.#T();
|
|
223
|
+
}
|
|
224
|
+
constructor() {
|
|
225
|
+
super(), this.#l();
|
|
226
|
+
}
|
|
227
|
+
#l() {
|
|
228
|
+
const e = this.attachShadow({
|
|
229
|
+
mode: "open",
|
|
230
|
+
delegatesFocus: !0,
|
|
231
|
+
clonable: !0,
|
|
232
|
+
serializable: !0
|
|
233
|
+
});
|
|
234
|
+
(0, n.registerDefaultVariables)(), this.#d(), this.#e = {
|
|
235
|
+
pageSizeSelect: e.querySelector(".page-size-select"),
|
|
236
|
+
pageSizeSection: e.querySelector(".page-size-section"),
|
|
237
|
+
startItemIndex: e.querySelector(".start-item-index"),
|
|
238
|
+
endItemIndex: e.querySelector(".end-item-index"),
|
|
239
|
+
fromLabel: e.querySelector(".from-label"),
|
|
240
|
+
totalItemsCount: e.querySelector(".total-items-count")
|
|
241
|
+
}, this.#h(), this.#P(), this.#M(), this.#T();
|
|
242
|
+
}
|
|
243
|
+
#d() {
|
|
244
|
+
const e = document.createElement("template");
|
|
245
|
+
e.innerHTML = "<style>:host{color:#7b7b7b;height:100%;font-size:1rem;display:block;container-type:inline-size}.jb-pagination-info-web-component{align-items:center;height:100%;display:flex}.page-size-section{align-items:center;height:100%;padding:0 1rem;display:flex}.page-size-select{color:inherit;font-family:inherit;font-size:inherit;background-color:#0000;border:none}.items-information-section{white-space:nowrap;align-items:center;height:100%;display:flex}@container (max-width:16.25rem){.page-size-section{display:none}}@container (max-width:10rem){.items-information-section{display:none}}</style>\n\n <section class=\"jb-pagination-info-web-component\">\n <section class=\"page-size-section\">\n <select class=\"page-size-select\"></select>\n </section>\n <section class=\"items-information-section\">\n <span class=\"start-item-index\"></span>\n <span>-</span>\n <span class=\"end-item-index\"></span>\n <span class=\"from-label\"></span>\n <span class=\"total-items-count\"></span>\n </section>\n </section>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
246
|
+
}
|
|
247
|
+
#h() {
|
|
248
|
+
this.#e.pageSizeSelect.addEventListener("change", () => {
|
|
249
|
+
const e = Number(this.#e.pageSizeSelect.value);
|
|
250
|
+
this.pageSize = e, this.dispatchEvent(new CustomEvent("page-size-change", {
|
|
251
|
+
bubbles: !0,
|
|
252
|
+
composed: !0,
|
|
253
|
+
detail: { pageSize: e }
|
|
254
|
+
}));
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
#P() {
|
|
258
|
+
this.#e && (this.#e.pageSizeSelect.replaceChildren(...this.#f.map((e) => {
|
|
259
|
+
const t = document.createElement("option");
|
|
260
|
+
return t.value = e.toString(), t.textContent = this.#k(e).toString(), t;
|
|
261
|
+
})), this.#L());
|
|
262
|
+
}
|
|
263
|
+
#L() {
|
|
264
|
+
this.#e && (this.#e.pageSizeSelect.value = this.#v.toString());
|
|
265
|
+
}
|
|
266
|
+
#M() {
|
|
267
|
+
this.#e && (this.#e.pageSizeSection.title = this.#E, this.#e.fromLabel.textContent = ` ${this.#j}`, this.#e.totalItemsCount.title = this.#z);
|
|
268
|
+
}
|
|
269
|
+
#T() {
|
|
270
|
+
this.#e && (this.#e.startItemIndex.textContent = this.#k(this.#I).toString(), this.#e.endItemIndex.textContent = ` ${this.#k(this.#y)} `, this.#e.totalItemsCount.textContent = ` ${this.#k(this.#S)} `);
|
|
271
|
+
}
|
|
272
|
+
#k(e) {
|
|
273
|
+
return this.#C ? (0, i.enToFaDigits)(e) : e;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
customElements.get("jb-pagination-info") || window.customElements.define("jb-pagination-info", s);
|
|
277
|
+
var o = class extends HTMLElement {
|
|
278
|
+
#A;
|
|
279
|
+
#N;
|
|
280
|
+
#R = null;
|
|
281
|
+
#D = 400;
|
|
282
|
+
constructor() {
|
|
283
|
+
super(), "function" == typeof this.attachInternals && (this.#A = this.attachInternals(), this.#A.role = "img", this.#A.ariaLabel = a.get(t.i18n, "refreshData"), this.#A.ariaBusy = "false"), this.#l();
|
|
284
|
+
}
|
|
285
|
+
#l() {
|
|
286
|
+
const e = this.attachShadow({
|
|
287
|
+
mode: "open",
|
|
288
|
+
delegatesFocus: !0,
|
|
289
|
+
clonable: !0,
|
|
290
|
+
serializable: !0
|
|
291
|
+
});
|
|
292
|
+
(0, n.registerDefaultVariables)(), this.#d(), this.#N = e.querySelector(".refresh-icon");
|
|
293
|
+
}
|
|
294
|
+
#d() {
|
|
295
|
+
const e = document.createElement("template");
|
|
296
|
+
e.innerHTML = "<style>:host{color:#7b7b7b;justify-content:center;align-items:center;width:1.5rem;height:1.5rem;display:inline-flex}:host(:hover){color:#2e3139}.refresh-icon{fill:currentColor;transform-box:fill-box;transform-origin:50%;width:100%;height:100%;display:block}</style>\n\n <svg class=\"refresh-icon\" x=\"0px\" y=\"0px\" viewBox=\"0 0 305.836 305.836\" part=\"icon\">\n <title>Refresh Data</title>\n <g>\n <path d=\"M152.924,300.748c84.319,0,152.912-68.6,152.912-152.918c0-39.476-15.312-77.231-42.346-105.564 c0,0,3.938-8.857,8.814-19.783c4.864-10.926-2.138-18.636-15.648-17.228l-79.125,8.289c-13.511,1.411-17.999,11.467-10.021,22.461 l46.741,64.393c7.986,10.992,17.834,12.31,22.008,2.937l7.56-16.964c12.172,18.012,18.976,39.329,18.976,61.459 c0,60.594-49.288,109.875-109.87,109.875c-60.591,0-109.882-49.287-109.882-109.875c0-19.086,4.96-37.878,14.357-54.337 c5.891-10.325,2.3-23.467-8.025-29.357c-10.328-5.896-23.464-2.3-29.36,8.031C6.923,95.107,0,121.27,0,147.829 C0,232.148,68.602,300.748,152.924,300.748z\" />\n </g>\n </svg>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
297
|
+
}
|
|
298
|
+
play() {
|
|
299
|
+
this.#A && (this.#A.ariaBusy = "true"), this.#R ? (this.#R.effect?.updateTiming({ iterations: Infinity }), this.#R.onfinish = null, this.#R.play()) : this.#R = this.#N.animate([{ transform: "rotate(0deg)" }, { transform: "rotate(360deg)" }], {
|
|
300
|
+
id: "rotate",
|
|
301
|
+
duration: this.#D,
|
|
302
|
+
direction: "reverse",
|
|
303
|
+
iterations: Infinity
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
pause() {
|
|
307
|
+
this.#R?.pause();
|
|
308
|
+
}
|
|
309
|
+
stop() {
|
|
310
|
+
if (!this.#R) return;
|
|
311
|
+
const e = this.#R, t = "number" == typeof e.currentTime ? e.currentTime : 0, n = Math.max(1, Math.floor(t / this.#D) + 1);
|
|
312
|
+
e.effect?.updateTiming({ iterations: n }), e.onfinish = () => {
|
|
313
|
+
this.#R === e && (e.cancel(), this.#R = null, this.#A && (this.#A.ariaBusy = "false"));
|
|
314
|
+
}, e.play();
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
customElements.get("jb-refresh-icon") || window.customElements.define("jb-refresh-icon", o);
|
|
318
|
+
var l = class extends HTMLElement {
|
|
319
|
+
#B = "enter";
|
|
320
|
+
#A;
|
|
321
|
+
get state() {
|
|
322
|
+
return this.#B;
|
|
323
|
+
}
|
|
324
|
+
set state(e) {
|
|
325
|
+
this.#B = e, this.#A && (this.#A.ariaLabel = a.get(t.i18n, "exit" === e ? "exitFullscreen" : "enterFullscreen")), this.setAttribute("state", e);
|
|
326
|
+
}
|
|
327
|
+
static get observedAttributes() {
|
|
328
|
+
return ["state"];
|
|
329
|
+
}
|
|
330
|
+
constructor() {
|
|
331
|
+
super(), "function" == typeof this.attachInternals && (this.#A = this.attachInternals(), this.#A.role = "img"), this.#l();
|
|
332
|
+
}
|
|
333
|
+
#l() {
|
|
334
|
+
this.attachShadow({
|
|
335
|
+
mode: "open",
|
|
336
|
+
delegatesFocus: !0,
|
|
337
|
+
clonable: !0,
|
|
338
|
+
serializable: !0
|
|
339
|
+
}), (0, n.registerDefaultVariables)(), this.#d(), this.state = this.#H(this.getAttribute("state"));
|
|
340
|
+
}
|
|
341
|
+
#d() {
|
|
342
|
+
const e = document.createElement("template");
|
|
343
|
+
e.innerHTML = "<style>:host{color:#7b7b7b;justify-content:center;align-items:center;width:1.5rem;height:1.5rem;display:inline-flex}:host(:hover){color:#2e3139}.fullscreen-icon{fill:currentColor;width:100%;height:100%;display:block}.arrow{transform-box:view-box;transition:transform .2s ease-out}:host([state=exit]) .arrow-top-start{transform-origin:1.875rem 1.875rem;transform:rotate(180deg)}:host([state=exit]) .arrow-top-end{transform-origin:6.25rem 1.875rem;transform:rotate(180deg)}:host([state=exit]) .arrow-bottom-end{transform-origin:6.25rem 6.25rem;transform:rotate(180deg)}:host([state=exit]) .arrow-bottom-start{transform-origin:1.875rem 6.25rem;transform:rotate(180deg)}</style>\n\n <svg class=\"fullscreen-icon\" x=\"0px\" y=\"0px\" viewBox=\"0 0 128 128\" part=\"icon\">\n <title>Full Screen Button</title>\n <g class=\"arrow arrow-top-start\">\n <path d=\"M47.979,41.795L26.466,20.292c-3.995-6.034,6.546-6.069,6.546-6.069h6.385c4.054-0.105,6.282-2.363,6.24-5.229 c-0.041-2.866-1.591-5.216-5.167-5.151H23.679C-0.4,2.575,0.342,20.363,0.755,24.486c0.02,0.208-0.015,0.375,0,0.502v0.025 l0.011,15.21c-0.029,2.556,1.211,5.834,4.501,6.265c3.329,0.434,6.025-2.22,6.06-4.774v-9.788v0.084 c-0.062-7.879,5.311-3.858,5.311-3.858l23.346,22.95c1.842,1.843,6.8,3.308,9.362,0.711C53.583,47.516,49.821,43.637,47.979,41.795 z\"></path>\n <path d=\"M0.755,26.555c0,0,0.024-0.099,0-0.277v-0.004V26.555z\"></path>\n </g>\n <g class=\"arrow arrow-top-end\">\n <path d=\"M89.483,50.518l21.504-21.512c6.034-3.995,6.07,6.546,6.07,6.546v6.385c0.104,4.055,2.361,6.281,5.228,6.24 c2.867-0.04,5.217-1.59,5.152-5.167V26.219c1.266-24.08-16.521-23.337-20.645-22.924c-0.206,0.02-0.374-0.015-0.503,0h-0.024 l-15.21,0.011c-2.557-0.029-5.834,1.211-6.265,4.501c-0.436,3.329,2.219,6.025,4.773,6.06h9.789H99.27 c7.879-0.062,3.858,5.311,3.858,5.311L80.177,42.524c-1.842,1.842-3.309,6.801-0.711,9.363 C83.764,56.123,87.642,52.362,89.483,50.518z\"></path>\n <path d=\"M104.723,3.294c0,0,0.101,0.024,0.279,0h0.003H104.723z\"></path>\n </g>\n <g class=\"arrow arrow-bottom-end\">\n <path d=\"M80.759,88.376l21.514,21.505c3.995,6.035-6.546,6.068-6.546,6.068H89.34c-4.054,0.106-6.282,2.364-6.24,5.23 c0.041,2.863,1.591,5.214,5.167,5.149h16.792c24.08,1.269,23.337-16.521,22.924-20.642c-0.02-0.21,0.017-0.377,0-0.503v-0.025 l-0.012-15.21c0.031-2.557-1.209-5.834-4.501-6.265c-3.327-0.436-6.023,2.219-6.06,4.772v9.79v-0.084 c0.062,7.879-5.312,3.856-5.312,3.856L88.753,79.068c-1.843-1.841-6.8-3.308-9.362-0.709 C75.153,82.656,78.916,86.534,80.759,88.376z\"></path>\n <path d=\"M127.982,103.617c0,0-0.022,0.098,0,0.276v0.006V103.617z\"></path>\n </g>\n <g class=\"arrow arrow-bottom-start\">\n <path d=\"M43.481,79.65l-21.503,21.514c-6.035,3.995-6.07-6.547-6.07-6.547v-6.384c-0.104-4.054-2.362-6.283-5.229-6.241 c-2.865,0.041-5.215,1.592-5.151,5.168v16.792c-1.267,24.078,16.521,23.338,20.643,22.924c0.208-0.02,0.375,0.015,0.503,0h0.025 l15.21-0.011c2.557,0.028,5.833-1.213,6.264-4.501c0.436-3.33-2.219-6.026-4.773-6.06h-9.789h0.084 c-7.879,0.062-3.857-5.312-3.857-5.312l22.949-23.347c1.843-1.844,3.31-6.8,0.711-9.363C49.201,74.045,45.323,77.809,43.481,79.65z\"></path>\n <path d=\"M28.242,126.876c0,0-0.1-0.024-0.278,0h-0.004H28.242z\"></path>\n </g>\n </svg>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
344
|
+
}
|
|
345
|
+
attributeChangedCallback(e, n, i) {
|
|
346
|
+
"state" === e && (this.#B = this.#H(i), this.#A && (this.#A.ariaLabel = a.get(t.i18n, "exit" === this.#B ? "exitFullscreen" : "enterFullscreen")));
|
|
347
|
+
}
|
|
348
|
+
#H(e) {
|
|
349
|
+
return "exit" === e ? "exit" : "enter";
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
customElements.get("jb-fullscreen-icon") || window.customElements.define("jb-fullscreen-icon", l);
|
|
353
|
+
function d(e, t, n) {
|
|
354
|
+
const i = n.autoModeVariableName ? `${n.autoModeVariableName}: auto;` : "";
|
|
355
|
+
if (null === t) {
|
|
356
|
+
const t = `\n ${n.selector}{\n display:grid;\n grid-auto-columns: 1fr;\n grid-auto-flow: column;\n grid-template-rows: 1fr;\n ${i}\n }\n `;
|
|
357
|
+
return e.replaceSync(t), e;
|
|
358
|
+
}
|
|
359
|
+
let a = "";
|
|
360
|
+
const r = t.map((e) => `${e.name}`).join(" ");
|
|
361
|
+
t.forEach((e) => {
|
|
362
|
+
null != e.size || null != e.size ? "number" == typeof e.size ? a += ` ${e.size}px` : a += ` ${e.size}` : a += " 1fr";
|
|
363
|
+
});
|
|
364
|
+
const s = `\n ${n.selector}{\n display:grid;\n grid-template-columns: ${a};\n grid-template-areas: "${r}"\n }\n `;
|
|
365
|
+
return e.replaceSync(s), e;
|
|
366
|
+
}
|
|
367
|
+
var h = class extends HTMLElement {
|
|
368
|
+
#A;
|
|
369
|
+
#e;
|
|
370
|
+
#$ = new CSSStyleSheet();
|
|
371
|
+
#F = [];
|
|
372
|
+
#q = !1;
|
|
373
|
+
get isOpen() {
|
|
374
|
+
return this.#q;
|
|
375
|
+
}
|
|
376
|
+
set isOpen(e) {
|
|
377
|
+
this.#q = e, this.#A && (this.#A.ariaExpanded = e ? "true" : "false"), this.#e.expandWrapper.setAttribute("aria-hidden", e ? "false" : "true"), e ? this.#e.expandWrapper.classList.remove("--hidden") : this.#e.expandWrapper.classList.add("--hidden");
|
|
378
|
+
}
|
|
379
|
+
get rowTemplate() {
|
|
380
|
+
return this.#F;
|
|
381
|
+
}
|
|
382
|
+
set rowTemplate(e) {
|
|
383
|
+
this.#F = e, d(this.#$, e, {
|
|
384
|
+
selector: ".grid-row",
|
|
385
|
+
autoModeVariableName: "--jb-row-grid-mode"
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
constructor() {
|
|
389
|
+
super(), "function" == typeof this.attachInternals && (this.#A = this.attachInternals(), this.#A.role = "row"), this.#l();
|
|
390
|
+
}
|
|
391
|
+
#l() {
|
|
392
|
+
const e = this.attachShadow({
|
|
393
|
+
mode: "open",
|
|
394
|
+
delegatesFocus: !0,
|
|
395
|
+
clonable: !0,
|
|
396
|
+
serializable: !0
|
|
397
|
+
});
|
|
398
|
+
e.adoptedStyleSheets = [this.#$], (0, n.registerDefaultVariables)(), this.#d(), this.#e = { expandWrapper: e.querySelector(".expand-wrapper") }, d(this.#$, null, {
|
|
399
|
+
selector: ".grid-row",
|
|
400
|
+
autoModeVariableName: "--jb-row-grid-mode"
|
|
401
|
+
}), this.#h();
|
|
402
|
+
}
|
|
403
|
+
#d() {
|
|
404
|
+
const e = document.createElement("template");
|
|
405
|
+
e.innerHTML = "<style>:host{--bg-color:var(--jb-row-bg-color,var(--jb-white));--bg-color-even:var(--jb-row-bg-color-even,var(--jb-neutral-10));--bg-color-even-tablet:var(--jb-row-bg-color-even-tablet,var(--bg-color));--expand-border-color:var(--jb-row-expand-border-color,#ebebeb);--shadow-color:var(--jb-row-shadow-color,#d8d8d8);--border-radius:var(--jb-row-border-radius,var(--jb-radius));--expand-padding-block:var(--jb-row-expand-padding-block,1rem);--expand-padding-inline:var(--jb-row-expand-padding-inline,2rem)} :host{background-color:var(--bg-color);width:100%;display:block}:host(:nth-of-type(2n)){background:var(--bg-color-even)}@media (max-width:48rem){:host(:nth-of-type(2n)){background:var(--bg-color-even-tablet)}}.jb-row-web-component .grid-row{box-sizing:border-box;grid-auto-rows:minmax(3rem,auto);width:100%}@media (max-width:48rem){.jb-row-web-component .grid-row{border-radius:var(--border-radius);box-shadow:0px 0px 1px 0px var(--shadow-color);grid-template-rows:auto;grid-template-columns:auto!important}}.jb-row-web-component .expand-wrapper{interpolate-size:allow-keywords;opacity:1;height:auto;transition:all .3s;overflow:clip}.jb-row-web-component .expand-wrapper.--hidden{opacity:0;height:0;min-height:0;padding-block:0}.jb-row-web-component .expand-wrapper slot[name=expand]::slotted(*){width:100%;min-height:4rem;padding-block:var(--expand-padding-block);padding-inline:var(--expand-padding-inline);border-bottom:1px solid var(--expand-border-color);box-sizing:border-box;overflow:auto}</style>\n\n <div class=\"jb-row-web-component\">\n <div class=\"grid-row\" part=\"row\">\n <slot name=\"cell\"></slot>\n </div>\n <div class=\"expand-wrapper --hidden\" role=\"region\" aria-hidden=\"true\">\n <slot name=\"expand\"></slot>\n </div>\n </div>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
406
|
+
}
|
|
407
|
+
connectedCallback() {}
|
|
408
|
+
#h() {}
|
|
409
|
+
};
|
|
410
|
+
customElements.get("jb-row") || window.customElements.define("jb-row", h);
|
|
411
|
+
var p = class extends HTMLElement {
|
|
412
|
+
#$ = new CSSStyleSheet();
|
|
413
|
+
#V = [];
|
|
414
|
+
get headerTemplate() {
|
|
415
|
+
return this.#V;
|
|
416
|
+
}
|
|
417
|
+
set headerTemplate(e) {
|
|
418
|
+
this.#V = e, d(this.#$, e, { selector: ".table-header-row" });
|
|
419
|
+
}
|
|
420
|
+
constructor() {
|
|
421
|
+
super(), this.#l();
|
|
422
|
+
}
|
|
423
|
+
#l() {
|
|
424
|
+
this.attachShadow({
|
|
425
|
+
mode: "open",
|
|
426
|
+
delegatesFocus: !0,
|
|
427
|
+
clonable: !0,
|
|
428
|
+
serializable: !0
|
|
429
|
+
}).adoptedStyleSheets = [this.#$], (0, n.registerDefaultVariables)(), this.#d(), d(this.#$, null, { selector: ".table-header-row" });
|
|
430
|
+
}
|
|
431
|
+
#d() {
|
|
432
|
+
const e = document.createElement("template");
|
|
433
|
+
e.innerHTML = "<style>:host{box-sizing:border-box;width:100%;height:100%;display:block}.jb-table-header-web-component{width:100%;height:100%}.jb-table-header-web-component .table-header-row{box-sizing:border-box;width:100%;height:100%;line-height:2rem}@media (max-width:48rem){.jb-table-header-web-component .table-header-row{display:none}}.jb-table-header-web-component .table-header-row ::slotted(*){box-sizing:border-box;min-width:0}</style>\n\n <div class=\"jb-table-header-web-component\">\n <div class=\"table-header-row\" part=\"row\" role=\"row\">\n <slot></slot>\n </div>\n </div>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
customElements.get("jb-table-header") || window.customElements.define("jb-table-header", p);
|
|
437
|
+
var c = class extends HTMLElement {
|
|
438
|
+
#A;
|
|
439
|
+
#e;
|
|
440
|
+
#$ = new CSSStyleSheet();
|
|
441
|
+
get name() {
|
|
442
|
+
return this.getAttribute("name") || "";
|
|
443
|
+
}
|
|
444
|
+
set name(e) {
|
|
445
|
+
this.setAttribute("name", e), this.#J(e);
|
|
446
|
+
}
|
|
447
|
+
get sortable() {
|
|
448
|
+
return this.hasAttribute("sortable");
|
|
449
|
+
}
|
|
450
|
+
set sortable(e) {
|
|
451
|
+
e ? this.setAttribute("sortable", "") : this.removeAttribute("sortable");
|
|
452
|
+
}
|
|
453
|
+
get sort() {
|
|
454
|
+
return this.getAttribute("sort");
|
|
455
|
+
}
|
|
456
|
+
set sort(e) {
|
|
457
|
+
e ? (this.setAttribute("sort", e), this.#A && (this.#A.ariaSort = "asc" === e ? "ascending" : "descending")) : (this.removeAttribute("sort"), this.#A && (this.#A.ariaSort = "none"));
|
|
458
|
+
}
|
|
459
|
+
static get observedAttributes() {
|
|
460
|
+
return ["name"];
|
|
461
|
+
}
|
|
462
|
+
constructor() {
|
|
463
|
+
super(), "function" == typeof this.attachInternals && (this.#A = this.attachInternals(), this.#A.role = "columnheader", this.#A.ariaSort = "none"), this.#l();
|
|
464
|
+
}
|
|
465
|
+
#l() {
|
|
466
|
+
const e = this.attachShadow({
|
|
467
|
+
mode: "open",
|
|
468
|
+
delegatesFocus: !0,
|
|
469
|
+
clonable: !0,
|
|
470
|
+
serializable: !0
|
|
471
|
+
});
|
|
472
|
+
e.adoptedStyleSheets = [this.#$], (0, n.registerDefaultVariables)(), this.#d(), this.#e = { wrapper: e.querySelector(".column-header") }, this.#J(this.name), this.#h();
|
|
473
|
+
}
|
|
474
|
+
#d() {
|
|
475
|
+
const e = document.createElement("template");
|
|
476
|
+
e.innerHTML = "<style>:host{box-sizing:border-box;width:100%;max-width:100%;height:100%;display:block}.column-header{all:unset;box-sizing:border-box;width:100%;height:100%;min-height:2rem;color:inherit;font:inherit;align-items:center;padding:0 1rem;display:flex;overflow:hidden}:host([sortable]) .column-header{cursor:pointer}.caption-wrapper{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.sort-icon-wrapper{flex:none;height:1rem;margin-inline-start:4px;display:none}:host([sort]) .sort-icon-wrapper{display:inline-flex}.sort-icon-wrapper svg{fill:#1e201d;width:1rem;height:1rem;margin-top:1px}:host([sort=asc]) .sort-icon-wrapper svg{transition:all .2s ease-out;transform:rotate(0)}:host([sort=desc]) .sort-icon-wrapper svg{transition:all .2s ease-out;transform:rotate(180deg)}</style>\n\n <button class=\"column-header\" part=\"button\" type=\"button\">\n <span class=\"caption-wrapper\" part=\"caption\">\n <slot name=\"title\"></slot>\n </span>\n <span class=\"sort-icon-wrapper\" part=\"sort-icon\" aria-hidden=\"true\">\n <svg version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 31.479 31.479\">\n <path d=\"M26.477,10.274c0.444,0.444,0.444,1.143,0,1.587c-0.429,0.429-1.143,0.429-1.571,0l-8.047-8.047 v26.555c0,0.619-0.492,1.111-1.111,1.111c-0.619,0-1.127-0.492-1.127-1.111V3.813l-8.031,8.047c-0.444,0.429-1.159,0.429-1.587,0 c-0.444-0.444-0.444-1.143,0-1.587l9.952-9.952c0.429-0.429,1.143-0.429,1.571,0L26.477,10.274z\" />\n </svg>\n </span>\n </button>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
477
|
+
}
|
|
478
|
+
attributeChangedCallback(e, t, n) {
|
|
479
|
+
"name" === e && this.#J(n || "");
|
|
480
|
+
}
|
|
481
|
+
#h() {
|
|
482
|
+
this.#e.wrapper.addEventListener("click", () => this.#O());
|
|
483
|
+
}
|
|
484
|
+
#O() {
|
|
485
|
+
if (!this.sortable) return;
|
|
486
|
+
const e = "asc" === this.sort ? "desc" : "asc";
|
|
487
|
+
this.sort = e, this.dispatchEvent(new CustomEvent("sort", {
|
|
488
|
+
bubbles: !0,
|
|
489
|
+
composed: !0,
|
|
490
|
+
detail: {
|
|
491
|
+
name: this.name,
|
|
492
|
+
sort: e
|
|
493
|
+
}
|
|
494
|
+
}));
|
|
495
|
+
}
|
|
496
|
+
#J(e) {
|
|
497
|
+
this.#$.replace(`\n :host{ grid-area:${e || "none"}}\n `);
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
customElements.get("jb-col-header") || window.customElements.define("jb-col-header", c);
|
|
501
|
+
var m = class extends HTMLElement {
|
|
502
|
+
#A;
|
|
503
|
+
#e;
|
|
504
|
+
#$ = new CSSStyleSheet();
|
|
505
|
+
get name() {
|
|
506
|
+
return this.getAttribute("name") || "";
|
|
507
|
+
}
|
|
508
|
+
set name(e) {
|
|
509
|
+
this.setAttribute("name", e), this.#$.replace(`\n :host{ grid-area:${e || "none"}}\n @container (style(--jb-row-grid-mode: auto)) {\n :host{ grid-area:auto }\n }\n `);
|
|
510
|
+
}
|
|
511
|
+
constructor() {
|
|
512
|
+
super(), "function" == typeof this.attachInternals && (this.#A = this.attachInternals(), this.#A.role = "cell"), this.#l();
|
|
513
|
+
}
|
|
514
|
+
#l() {
|
|
515
|
+
this.attachShadow({
|
|
516
|
+
mode: "open",
|
|
517
|
+
delegatesFocus: !0,
|
|
518
|
+
clonable: !0,
|
|
519
|
+
serializable: !0
|
|
520
|
+
}).adoptedStyleSheets = [this.#$], (0, n.registerDefaultVariables)(), this.#d(), this.#e = {}, this.#h();
|
|
521
|
+
}
|
|
522
|
+
#d() {
|
|
523
|
+
const e = document.createElement("template");
|
|
524
|
+
e.innerHTML = "<style>:host{box-sizing:border-box;grid-template-rows:minmax(0,auto);grid-template-columns:auto;grid-auto-columns:max-content;grid-auto-flow:column;justify-content:start;align-items:center;gap:.5rem;width:100%;max-width:100%;height:100%;padding:.25rem 1rem;display:grid;overflow-x:hidden}:host([ellipsis]:not([ellipsis=\"1\"]):not([ellipsis=\"\"])){-webkit-line-clamp:attr(max-line type(<integer>), 1);line-clamp:attr(max-line type(<integer>), 1);box-orient:vertical;-webkit-box-orient:vertical;align-content:center;height:fit-content;display:-webkit-box;overflow:hidden}:host(:where([ellipsis=\"\"],[ellipsis=\"1\"])){text-overflow:ellipsis;white-space:nowrap;align-content:center;display:block;overflow:hidden}</style>\n\n <slot></slot>\n ", this.shadowRoot.appendChild(e.content.cloneNode(!0));
|
|
525
|
+
}
|
|
526
|
+
connectedCallback() {}
|
|
527
|
+
#h() {}
|
|
528
|
+
};
|
|
529
|
+
customElements.get("jb-cell") || window.customElements.define("jb-cell", m);
|
|
530
|
+
var g = class extends HTMLElement {
|
|
531
|
+
#W;
|
|
532
|
+
constructor() {
|
|
533
|
+
super(), this.#l();
|
|
534
|
+
}
|
|
535
|
+
#l() {
|
|
536
|
+
const e = this.attachShadow({
|
|
537
|
+
mode: "open",
|
|
538
|
+
delegatesFocus: !0,
|
|
539
|
+
clonable: !0,
|
|
540
|
+
serializable: !0
|
|
541
|
+
});
|
|
542
|
+
(0, n.registerDefaultVariables)(), this.#d(), this.#W = e.querySelector(".toggle-button"), this.#h();
|
|
543
|
+
}
|
|
544
|
+
#d() {
|
|
545
|
+
const e = `<style>:host{width:1.5rem;height:1.5rem;display:block}.toggle-button{all:unset;box-sizing:border-box;cursor:pointer;width:100%;height:100%;display:block}.toggle-button:focus-visible{outline:2px solid var(--jb-grid-focus-ring-color,Highlight);outline-offset:2px}:host([open]) .arrow-icon{rotate:-90deg}:host([open]) .arrow-icon:dir(ltr){rotate:90deg}.arrow-icon{width:100%;height:100%;transition:all .3s}.arrow-icon:dir(ltr){transform:rotateY(180deg)}</style>\n\n <button class="toggle-button" type="button" aria-label="${a.get(t.i18n, "toggleRowDetails")}" aria-expanded="false">\n <slot>\n <svg class="arrow-icon" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path d="M35,10 L15,25 L35,40 Z"\n fill="currentColor"\n stroke="currentColor"\n stroke-width="6"\n stroke-linejoin="round" />\n </svg>\n </slot>\n </button>\n `, n = document.createElement("template");
|
|
546
|
+
n.innerHTML = e, this.shadowRoot.appendChild(n.content.cloneNode(!0));
|
|
547
|
+
}
|
|
548
|
+
#G = null;
|
|
549
|
+
connectedCallback() {
|
|
550
|
+
this.#G = this.#Y(this), this.#G?.isOpen && (this.setAttribute("open", ""), this.#W.setAttribute("aria-expanded", "true"));
|
|
551
|
+
}
|
|
552
|
+
#Y(e) {
|
|
553
|
+
return e && e.parentElement ? e.parentElement instanceof h ? e.parentElement : this.#Y(this.parentElement) : null;
|
|
554
|
+
}
|
|
555
|
+
#h() {
|
|
556
|
+
this.#W.addEventListener("click", () => this.toggle());
|
|
557
|
+
}
|
|
558
|
+
toggle() {
|
|
559
|
+
if (this.#G) {
|
|
560
|
+
const e = !this.#G?.isOpen;
|
|
561
|
+
this.#G.isOpen = e, e ? this.setAttribute("open", "") : this.removeAttribute("open"), this.#W.setAttribute("aria-expanded", e ? "true" : "false");
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
customElements.get("jb-expand-toggle") || window.customElements.define("jb-expand-toggle", g), e.JBCellWebComponent = m, e.JBColumnHeaderWebComponent = c, e.JBExpandToggleWebComponent = g, e.JBFullscreenIconWebComponent = l, e.JBPaginationInfoWebComponent = s, e.JBPaginationWebComponent = r, e.JBRefreshIconWebComponent = o, e.JBRowWebComponent = h, e.JBTableHeaderWebComponent = p;
|
|
566
|
+
});
|
|
567
|
+
|
|
2
568
|
//# sourceMappingURL=index.umd.js.map
|
|
Binary file
|
|
Binary file
|