@blueprintui/grid 1.6.6 → 1.6.7
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/custom-elements.json
CHANGED
|
@@ -518,6 +518,12 @@
|
|
|
518
518
|
"declarations": [],
|
|
519
519
|
"exports": []
|
|
520
520
|
},
|
|
521
|
+
{
|
|
522
|
+
"kind": "javascript-module",
|
|
523
|
+
"path": "/grid/element.global.css",
|
|
524
|
+
"declarations": [],
|
|
525
|
+
"exports": []
|
|
526
|
+
},
|
|
521
527
|
{
|
|
522
528
|
"kind": "javascript-module",
|
|
523
529
|
"path": "/grid/element.js",
|
|
@@ -856,12 +862,6 @@
|
|
|
856
862
|
}
|
|
857
863
|
]
|
|
858
864
|
},
|
|
859
|
-
{
|
|
860
|
-
"kind": "javascript-module",
|
|
861
|
-
"path": "/grid/global.css",
|
|
862
|
-
"declarations": [],
|
|
863
|
-
"exports": []
|
|
864
|
-
},
|
|
865
865
|
{
|
|
866
866
|
"kind": "javascript-module",
|
|
867
867
|
"path": "/grid/layout.controller.js",
|
package/grid/element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{LitElement as e,html as i}from"lit";import{baseStyles as o,elevationStyles as r,I18nService as l,createId as s,attachRootNodeStyles as n,i18n as a,ariaMultiSelectable as c}from"@blueprintui/components/internals";import{interactionScrollVisibility as h}from"../internals/controllers/interaction-scroll-visibility.controller.js";import{GridLayoutController as u}from"./layout.controller.js";import d from"./element.css.js";import p from"./global.css.js";var m;let g=m=class extends e{static properties={i18n:{type:Object},height:{type:String,reflect:!0},columnLayout:{type:String,reflect:!0,attribute:"column-layout"},borders:{type:String,reflect:!0},selectable:{type:String,reflect:!0},scrollLock:{type:Boolean,reflect:!0,attribute:"scroll-lock"},rangeSelection:{type:Boolean,reflect:!0,attribute:"range-selection"},elevation:{type:String,reflect:!0},_id:{type:String,reflect:!0}};gridLayoutController=new u(this);static styles=[o,r,d];static controllers=new Set;get gridLayoutControllerConfig(){return{columns:Array.from(this.#t),columnLayout:this.columnLayout,height:this.height}}get gridColumnSizeControllerConfig(){return{columns:Array.from(this.#t),rows:Array.from(this.#e)}}get#t(){return this.querySelectorAll("bp-grid-column")}get#e(){return this.querySelectorAll("bp-grid-row")}get#i(){return this.querySelectorAll("bp-grid-cell")}get#o(){return this.querySelector("bp-grid-placeholder")}get#r(){return this.querySelector("bp-grid-footer")}get keyNavGrid(){return this.shadowRoot.querySelector(".scroll-container")}get grid(){const t=[...Array.from(this.#t),...Array.from(this.#i)],e=this.#t.length,i=[];for(;t.length;)i.push(t.splice(0,e));return i}_internals=this.attachInternals();render(){return i`<div role="presentation" elevation part="internal"><div role="presentation" class="scroll-container"><div role="presentation" class="column-row-group"><div role="row" aria-rowindex="1" class="column-row"><slot name="columns"><bp-grid-column draggable-hidden><span sr-only>${this.i18n.noData}</span></bp-grid-column></slot></div></div><slot role="presentation" class="body-row-group"></slot></div><slot name="footer"></slot><slot name="detail"></slot></div>`}constructor(){super();this._internals.role="grid",this.#l(),this.i18n=l.keys.actions,this.columnLayout="fixed",this.borders="row",this.scrollLock=!1,this.rangeSelection=!1,this._id=s()}async connectedCallback(){super.connectedCallback(),n(this.parentNode,[p]),await this.updateComplete,m.controllers.forEach((t=>new t(this))),this.#s(),this.shadowRoot.addEventListener("slotchange",(()=>this.updateComplete.then((()=>this.#s()))))}#l(){this.addEventListener("sort",(t=>{const e=t.composedPath().find((t=>"BP-GRID-COLUMN"===t.tagName));e&&(e.ariaSort=t.detail)}))}#n=0;get#a(){return this.#n++,1===this.#n&&!this.rangeSelection&&!Array.from(this.#t).find((t=>""!==t.position||void 0!==t.type))}async#s(){this.#a||(this.#c(),this.#h(),this.#u(),this.#d(),this.#p(),this.#m())}#c(){const t=Math.max(this.#e?.length,1),e=this.#r?1:0;this._internals.ariaRowCount=""+(1+t+e),this._internals.ariaColCount=""+this.#t.length}#h(){this.#t.forEach(((t,e)=>t.ariaColIndex=""+(e+1)))}#u(){this.#e?.forEach(((t,e)=>t.ariaRowIndex=""+(e+2)))}#d(){this.#i?.forEach(((t,e)=>t.ariaColIndex=""+(e%this.#t.length+1)))}#p(){this.#o&&(this.#o.ariaRowCount=""+(this.#e.length+1),this.#o._colSpan=this._internals.ariaColCount)}#m(){this.#r&&(this.#r.ariaRowCount=""+(this.#e.length+2),this.#r._colSpan=this._internals.ariaColCount)}};g=m=t([a({key:"actions"}),c(),h()],g);export{g as BpGrid};
|
|
1
|
+
import{__decorate as t}from"tslib";import{LitElement as e,html as i}from"lit";import{baseStyles as o,elevationStyles as r,I18nService as l,createId as s,attachRootNodeStyles as n,i18n as a,ariaMultiSelectable as c}from"@blueprintui/components/internals";import{interactionScrollVisibility as h}from"../internals/controllers/interaction-scroll-visibility.controller.js";import{GridLayoutController as u}from"./layout.controller.js";import d from"./element.css.js";import p from"./element.global.css.js";var m;let g=m=class extends e{static properties={i18n:{type:Object},height:{type:String,reflect:!0},columnLayout:{type:String,reflect:!0,attribute:"column-layout"},borders:{type:String,reflect:!0},selectable:{type:String,reflect:!0},scrollLock:{type:Boolean,reflect:!0,attribute:"scroll-lock"},rangeSelection:{type:Boolean,reflect:!0,attribute:"range-selection"},elevation:{type:String,reflect:!0},_id:{type:String,reflect:!0}};gridLayoutController=new u(this);static styles=[o,r,d];static controllers=new Set;get gridLayoutControllerConfig(){return{columns:Array.from(this.#t),columnLayout:this.columnLayout,height:this.height}}get gridColumnSizeControllerConfig(){return{columns:Array.from(this.#t),rows:Array.from(this.#e)}}get#t(){return this.querySelectorAll("bp-grid-column")}get#e(){return this.querySelectorAll("bp-grid-row")}get#i(){return this.querySelectorAll("bp-grid-cell")}get#o(){return this.querySelector("bp-grid-placeholder")}get#r(){return this.querySelector("bp-grid-footer")}get keyNavGrid(){return this.shadowRoot.querySelector(".scroll-container")}get grid(){const t=[...Array.from(this.#t),...Array.from(this.#i)],e=this.#t.length,i=[];for(;t.length;)i.push(t.splice(0,e));return i}_internals=this.attachInternals();render(){return i`<div role="presentation" elevation part="internal"><div role="presentation" class="scroll-container"><div role="presentation" class="column-row-group"><div role="row" aria-rowindex="1" class="column-row"><slot name="columns"><bp-grid-column draggable-hidden><span sr-only>${this.i18n.noData}</span></bp-grid-column></slot></div></div><slot role="presentation" class="body-row-group"></slot></div><slot name="footer"></slot><slot name="detail"></slot></div>`}constructor(){super();this._internals.role="grid",this.#l(),this.i18n=l.keys.actions,this.columnLayout="fixed",this.borders="row",this.scrollLock=!1,this.rangeSelection=!1,this._id=s()}async connectedCallback(){super.connectedCallback(),n(this.parentNode,[p]),await this.updateComplete,m.controllers.forEach((t=>new t(this))),this.#s(),this.shadowRoot.addEventListener("slotchange",(()=>this.updateComplete.then((()=>this.#s()))))}#l(){this.addEventListener("sort",(t=>{const e=t.composedPath().find((t=>"BP-GRID-COLUMN"===t.tagName));e&&(e.ariaSort=t.detail)}))}#n=0;get#a(){return this.#n++,1===this.#n&&!this.rangeSelection&&!Array.from(this.#t).find((t=>""!==t.position||void 0!==t.type))}async#s(){this.#a||(this.#c(),this.#h(),this.#u(),this.#d(),this.#p(),this.#m())}#c(){const t=Math.max(this.#e?.length,1),e=this.#r?1:0;this._internals.ariaRowCount=""+(1+t+e),this._internals.ariaColCount=""+this.#t.length}#h(){this.#t.forEach(((t,e)=>t.ariaColIndex=""+(e+1)))}#u(){this.#e?.forEach(((t,e)=>t.ariaRowIndex=""+(e+2)))}#d(){this.#i?.forEach(((t,e)=>t.ariaColIndex=""+(e%this.#t.length+1)))}#p(){this.#o&&(this.#o.ariaRowCount=""+(this.#e.length+1),this.#o._colSpan=this._internals.ariaColCount)}#m(){this.#r&&(this.#r.ariaRowCount=""+(this.#e.length+2),this.#r._colSpan=this._internals.ariaColCount)}};g=m=t([a({key:"actions"}),c(),h()],g);export{g as BpGrid};
|
package/package.json
CHANGED
|
File without changes
|