@kyndryl-design-system/shidoka-applications 2.52.0 → 2.52.1

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.
@@ -55,6 +55,10 @@ export declare class WidgetGridstack extends LitElement {
55
55
  * property `--kd-current-breakpoint`.
56
56
  */
57
57
  private _setBreakpoint;
58
+ /**
59
+ * The private `_setMargin` function adjusts the margin of a grid based on a breakpoint value.
60
+ */
61
+ private _setMargin;
58
62
  }
59
63
  declare global {
60
64
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"widgetGridstack.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/widget/widgetGridstack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAQlD;;;;;GAKG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C,OAAgB,MAAM,0BAAqB;IAE3C,6EAA6E;IAE7E,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAM;IAE1B,+BAA+B;IAE/B,QAAQ,CAAC,eAAe,EAAG,GAAG,CAAC;IAE/B;mBACe;IAEf,QAAQ,CAAC,gBAAgB,EAAG,GAAG,CAAC;IAEhC,0BAA0B;IAE1B,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAa;IAEpC,+BAA+B;IAE/B,QAAQ,CAAC,IAAI,EAAG,GAAG,CAAC;IAEpB,0EAA0E;IAE1E,QAAQ,CAAC,OAAO,UAAS;IAEzB,+EAA+E;IAE/E,QAAQ,CAAC,oBAAoB,UAAS;IAEtC;;OAEG;IAEH,QAAQ,CAAC,WAAW,SAAM;IAEjB,MAAM;IAQN,YAAY;IAIZ,UAAU,CAAC,YAAY,EAAE,GAAG;IA2BrC;;;OAGG;IACH,OAAO,CAAC,WAAW;IAuBnB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsCb,OAAO,CAAC,YAAY,EAAE,GAAG;IAalC;;;OAGG;IACH,OAAO,CAAC,qB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;IAM7B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;IACH,OAAO,CAAC,UAAU;CASnB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,eAAe,CAAC;KACzC;CACF"}
@@ -13,13 +13,18 @@ import{_ as t,a as e,b as i,c as a,d as s}from"../../../vendor/tslib-Ac8XvvSX.js
13
13
  }
14
14
 
15
15
  .grid-wrapper {
16
- margin: -16px;
17
- }
18
- .grid-wrapper.compact {
19
16
  margin: -8px;
20
- }`;let f=(()=>{var r,f,b,v,w,y,_,C;let W,S,j,D,E,M,x,z,L,B,q=[n("kyn-widget-gridstack")],A=[],G=h,O=[],R=[],P=[],U=[],H=[],V=[],$=[],F=[],I=[],J=[],K=[],N=[],Q=[],T=[],X=[],Y=[];return S=class extends G{constructor(){super(...arguments),r.set(this,i(this,O,{})),f.set(this,(i(this,R),i(this,P,void 0))),b.set(this,(i(this,U),i(this,H,void 0))),v.set(this,(i(this,V),i(this,$,k))),w.set(this,(i(this,F),i(this,I,void 0))),y.set(this,(i(this,J),i(this,K,!1))),_.set(this,(i(this,N),i(this,Q,!1))),C.set(this,(i(this,T),i(this,X,""))),this._debounceResize=(i(this,Y),p((()=>{this._setBreakpoint()})))}get layout(){return a(this,r,"f")}set layout(t){s(this,r,t,"f")}get gridstackConfig(){return a(this,f,"f")}set gridstackConfig(t){s(this,f,t,"f")}get _gridstackConfig(){return a(this,b,"f")}set _gridstackConfig(t){s(this,b,t,"f")}get gridStack(){return a(this,v,"f")}set gridStack(t){s(this,v,t,"f")}get grid(){return a(this,w,"f")}set grid(t){s(this,w,t,"f")}get compact(){return a(this,y,"f")}set compact(t){s(this,y,t,"f")}get wholeWidgetDraggable(){return a(this,_,"f")}set wholeWidgetDraggable(t){s(this,_,t,"f")}get _breakpoint(){return a(this,C,"f")}set _breakpoint(t){s(this,C,t,"f")}render(){return g`
17
+ }
18
+ @media (min-width: 42rem) {
19
+ .grid-wrapper {
20
+ margin: -16px;
21
+ }
22
+ .grid-wrapper.compact {
23
+ margin: -8px;
24
+ }
25
+ }`;let f=(()=>{var r,f,b,w,v,y,_,C;let W,S,j,M,D,x,E,z,L,B,q=[n("kyn-widget-gridstack")],A=[],G=h,O=[],R=[],P=[],U=[],H=[],V=[],$=[],F=[],I=[],J=[],K=[],N=[],Q=[],T=[],X=[],Y=[];return S=class extends G{constructor(){super(...arguments),r.set(this,i(this,O,{})),f.set(this,(i(this,R),i(this,P,void 0))),b.set(this,(i(this,U),i(this,H,void 0))),w.set(this,(i(this,V),i(this,$,k))),v.set(this,(i(this,F),i(this,I,void 0))),y.set(this,(i(this,J),i(this,K,!1))),_.set(this,(i(this,N),i(this,Q,!1))),C.set(this,(i(this,T),i(this,X,""))),this._debounceResize=(i(this,Y),p((()=>{this._setBreakpoint(),this._setMargin()})))}get layout(){return a(this,r,"f")}set layout(t){s(this,r,t,"f")}get gridstackConfig(){return a(this,f,"f")}set gridstackConfig(t){s(this,f,t,"f")}get _gridstackConfig(){return a(this,b,"f")}set _gridstackConfig(t){s(this,b,t,"f")}get gridStack(){return a(this,w,"f")}set gridStack(t){s(this,w,t,"f")}get grid(){return a(this,v,"f")}set grid(t){s(this,v,t,"f")}get compact(){return a(this,y,"f")}set compact(t){s(this,y,t,"f")}get wholeWidgetDraggable(){return a(this,_,"f")}set wholeWidgetDraggable(t){s(this,_,t,"f")}get _breakpoint(){return a(this,C,"f")}set _breakpoint(t){s(this,C,t,"f")}render(){return g`
21
26
  <div class="grid-wrapper ${this.compact?"compact":""}">
22
27
  <slot></slot>
23
28
  </div>
24
- `}firstUpdated(){this._setBreakpoint()}willUpdate(t){(t.has("compact")||t.has("wholeWidgetDraggable"))&&(this._gridstackConfig=this.gridstackConfig||m(this.compact,this.wholeWidgetDraggable)),this.layout&&this._breakpoint&&(t.has("_breakpoint")||t.has("layout"))&&this._updateLayout()}_saveLayout(){let t=this.grid.save(!1);t=t.map((t=>({...t,w:t.w||t.minW,h:t.h||t.minH}))),this.layout[this._breakpoint]=t;const e=new CustomEvent("on-grid-save",{detail:{layout:this.layout}});this.dispatchEvent(e)}_initGridstack(){this.grid&&this.grid.destroy(!1);const t=this.querySelector(".grid-stack");this.grid=this.gridStack.init(this._gridstackConfig,t),this.grid.on("dragstart",(t=>{const e=t.target;l("kyn-widget",e).dragActive=!0})),this.grid.on("dragstop",(t=>{const e=t.target;l("kyn-widget",e).dragActive=!1,this._saveLayout()})),this.grid.on("resizestop",(()=>{this._saveLayout()}));const e=new CustomEvent("on-grid-init",{detail:{grid:this.grid,gridStack:this.gridStack}});this.dispatchEvent(e)}updated(t){(t.has("gridstackConfig")||t.has("_gridstackConfig"))&&this._initGridstack(),t.has("compact")&&this._updateWidgetsDensity()}_updateWidgetsDensity(){this.querySelectorAll("kyn-widget").forEach((t=>{t.compact=this.compact}))}_updateLayout(){const t=this.layout[this._breakpoint]||this.layout.max;this.grid&&(this.grid.load(t),this.grid.setAnimation(!0))}connectedCallback(){super.connectedCallback(),null===window||void 0===window||window.addEventListener("resize",this._debounceResize)}disconnectedCallback(){null===window||void 0===window||window.removeEventListener("resize",this._debounceResize),super.disconnectedCallback()}_setBreakpoint(){this._breakpoint=getComputedStyle(document.documentElement).getPropertyValue("--kd-current-breakpoint")}},r=new WeakMap,f=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap,y=new WeakMap,_=new WeakMap,C=new WeakMap,t(S,"WidgetGridstack"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=G[Symbol.metadata])&&void 0!==t?t:null):void 0;j=[c({type:Object})],D=[c({type:Object})],E=[o()],M=[c({attribute:!1})],x=[c({attribute:!1})],z=[c({type:Boolean})],L=[c({type:Boolean})],B=[o()],e(S,null,j,{kind:"accessor",name:"layout",static:!1,private:!1,access:{has:t=>"layout"in t,get:t=>t.layout,set:(t,e)=>{t.layout=e}},metadata:i},O,R),e(S,null,D,{kind:"accessor",name:"gridstackConfig",static:!1,private:!1,access:{has:t=>"gridstackConfig"in t,get:t=>t.gridstackConfig,set:(t,e)=>{t.gridstackConfig=e}},metadata:i},P,U),e(S,null,E,{kind:"accessor",name:"_gridstackConfig",static:!1,private:!1,access:{has:t=>"_gridstackConfig"in t,get:t=>t._gridstackConfig,set:(t,e)=>{t._gridstackConfig=e}},metadata:i},H,V),e(S,null,M,{kind:"accessor",name:"gridStack",static:!1,private:!1,access:{has:t=>"gridStack"in t,get:t=>t.gridStack,set:(t,e)=>{t.gridStack=e}},metadata:i},$,F),e(S,null,x,{kind:"accessor",name:"grid",static:!1,private:!1,access:{has:t=>"grid"in t,get:t=>t.grid,set:(t,e)=>{t.grid=e}},metadata:i},I,J),e(S,null,z,{kind:"accessor",name:"compact",static:!1,private:!1,access:{has:t=>"compact"in t,get:t=>t.compact,set:(t,e)=>{t.compact=e}},metadata:i},K,N),e(S,null,L,{kind:"accessor",name:"wholeWidgetDraggable",static:!1,private:!1,access:{has:t=>"wholeWidgetDraggable"in t,get:t=>t.wholeWidgetDraggable,set:(t,e)=>{t.wholeWidgetDraggable=e}},metadata:i},Q,T),e(S,null,B,{kind:"accessor",name:"_breakpoint",static:!1,private:!1,access:{has:t=>"_breakpoint"in t,get:t=>t._breakpoint,set:(t,e)=>{t._breakpoint=e}},metadata:i},X,Y),e(null,W={value:S},q,{kind:"class",name:S.name,metadata:i},null,A),S=W.value,i&&Object.defineProperty(S,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),S.styles=d(u),i(S,A),S})();export{f as WidgetGridstack};
29
+ `}firstUpdated(){this._setBreakpoint()}willUpdate(t){(t.has("compact")||t.has("wholeWidgetDraggable"))&&(this._gridstackConfig=this.gridstackConfig||m(this.compact,this.wholeWidgetDraggable)),this.layout&&this._breakpoint&&(t.has("_breakpoint")||t.has("layout"))&&this._updateLayout()}_saveLayout(){let t=this.grid.save(!1);t=t.map((t=>({...t,w:t.w||t.minW,h:t.h||t.minH}))),this.layout[this._breakpoint]=t;const e=new CustomEvent("on-grid-save",{detail:{layout:this.layout}});this.dispatchEvent(e)}_initGridstack(){this.grid&&this.grid.destroy(!1);const t=this.querySelector(".grid-stack");this.grid=this.gridStack.init(this._gridstackConfig,t),this._setMargin(),this.grid.on("dragstart",(t=>{const e=t.target;l("kyn-widget",e).dragActive=!0})),this.grid.on("dragstop",(t=>{const e=t.target;l("kyn-widget",e).dragActive=!1,this._saveLayout()})),this.grid.on("resizestop",(()=>{this._saveLayout()}));const e=new CustomEvent("on-grid-init",{detail:{grid:this.grid,gridStack:this.gridStack}});this.dispatchEvent(e)}updated(t){(t.has("gridstackConfig")||t.has("_gridstackConfig"))&&this._initGridstack(),t.has("compact")&&this._updateWidgetsDensity()}_updateWidgetsDensity(){this.querySelectorAll("kyn-widget").forEach((t=>{t.compact=this.compact}))}_updateLayout(){const t=this.layout[this._breakpoint]||this.layout.max;this.grid&&(this.grid.load(t),this.grid.setAnimation(!0))}connectedCallback(){super.connectedCallback(),null===window||void 0===window||window.addEventListener("resize",this._debounceResize)}disconnectedCallback(){null===window||void 0===window||window.removeEventListener("resize",this._debounceResize),super.disconnectedCallback()}_setBreakpoint(){this._breakpoint=getComputedStyle(document.documentElement).getPropertyValue("--kd-current-breakpoint")}_setMargin(){this.gridstackConfig||this.compact||("sm"===this._breakpoint?this.grid.margin("8"):this.grid.margin("16"))}},r=new WeakMap,f=new WeakMap,b=new WeakMap,w=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,C=new WeakMap,t(S,"WidgetGridstack"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=G[Symbol.metadata])&&void 0!==t?t:null):void 0;j=[c({type:Object})],M=[c({type:Object})],D=[o()],x=[c({attribute:!1})],E=[c({attribute:!1})],z=[c({type:Boolean})],L=[c({type:Boolean})],B=[o()],e(S,null,j,{kind:"accessor",name:"layout",static:!1,private:!1,access:{has:t=>"layout"in t,get:t=>t.layout,set:(t,e)=>{t.layout=e}},metadata:i},O,R),e(S,null,M,{kind:"accessor",name:"gridstackConfig",static:!1,private:!1,access:{has:t=>"gridstackConfig"in t,get:t=>t.gridstackConfig,set:(t,e)=>{t.gridstackConfig=e}},metadata:i},P,U),e(S,null,D,{kind:"accessor",name:"_gridstackConfig",static:!1,private:!1,access:{has:t=>"_gridstackConfig"in t,get:t=>t._gridstackConfig,set:(t,e)=>{t._gridstackConfig=e}},metadata:i},H,V),e(S,null,x,{kind:"accessor",name:"gridStack",static:!1,private:!1,access:{has:t=>"gridStack"in t,get:t=>t.gridStack,set:(t,e)=>{t.gridStack=e}},metadata:i},$,F),e(S,null,E,{kind:"accessor",name:"grid",static:!1,private:!1,access:{has:t=>"grid"in t,get:t=>t.grid,set:(t,e)=>{t.grid=e}},metadata:i},I,J),e(S,null,z,{kind:"accessor",name:"compact",static:!1,private:!1,access:{has:t=>"compact"in t,get:t=>t.compact,set:(t,e)=>{t.compact=e}},metadata:i},K,N),e(S,null,L,{kind:"accessor",name:"wholeWidgetDraggable",static:!1,private:!1,access:{has:t=>"wholeWidgetDraggable"in t,get:t=>t.wholeWidgetDraggable,set:(t,e)=>{t.wholeWidgetDraggable=e}},metadata:i},Q,T),e(S,null,B,{kind:"accessor",name:"_breakpoint",static:!1,private:!1,access:{has:t=>"_breakpoint"in t,get:t=>t._breakpoint,set:(t,e)=>{t._breakpoint=e}},metadata:i},X,Y),e(null,W={value:S},q,{kind:"class",name:S.name,metadata:i},null,A),S=W.value,i&&Object.defineProperty(S,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),S.styles=d(u),i(S,A),S})();export{f as WidgetGridstack};
25
30
  //# sourceMappingURL=widgetGridstack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widgetGridstack.js","sources":["../../../../src/components/reusable/widget/widgetGridstack.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport Styles from './widgetGridstack.scss?inline';\nimport { querySelectorDeep } from 'query-selector-shadow-dom';\nimport { debounce } from '../../../common/helpers/helpers';\nimport { GetConfig } from '../../../common/helpers/gridstack';\nimport { GridStack } from 'gridstack';\n\n/**\n * GridStack wrapper that includes Shidoka default config and styles.\n * @fires on-grid-init - Emits after GridStack initializes.\n * @fires on-grid-save - Emits the GridStack save() method results (new layout) on dragstop and resizestop.\n * @slot unnamed - Slot for .grid-stack container element.\n */\n@customElement('kyn-widget-gridstack')\nexport class WidgetGridstack extends LitElement {\n static override styles = unsafeCSS(Styles);\n\n /** GridStack layout/widget size/position definitions for each breakpoint. */\n @property({ type: Object })\n accessor layout: any = {};\n\n /** Custom GridStack config. */\n @property({ type: Object })\n accessor gridstackConfig!: any;\n\n /** Final config passed to gridstack.\n * @internal */\n @state()\n accessor _gridstackConfig!: any;\n\n /** GridStack instance. */\n @property({ attribute: false })\n accessor gridStack: any = GridStack;\n\n /** GridStack grid instance. */\n @property({ attribute: false })\n accessor grid!: any;\n\n /** Use compact grid config. Ignored in case of custom gridstackConfig. */\n @property({ type: Boolean })\n accessor compact = false;\n\n /** Make entire widget draggable. Ignored in case of custom gridstackConfig. */\n @property({ type: Boolean })\n accessor wholeWidgetDraggable = false;\n\n /** Current breakpoint.\n * @internal\n */\n @state()\n accessor _breakpoint = '';\n\n override render() {\n return html`\n <div class=\"grid-wrapper ${this.compact ? 'compact' : ''}\">\n <slot></slot>\n </div>\n `;\n }\n\n override firstUpdated() {\n this._setBreakpoint();\n }\n\n override willUpdate(changedProps: any) {\n /* This part of the code is checking if the properties `compact` or `wholeWidgetDraggable` have\n changed. If either of these properties has changed, it updates the `_gridstackConfig` property\n based on the current values of `compact` and `wholeWidgetDraggable`. */\n if (\n changedProps.has('compact') ||\n changedProps.has('wholeWidgetDraggable')\n ) {\n this._gridstackConfig =\n this.gridstackConfig ||\n GetConfig(this.compact, this.wholeWidgetDraggable);\n }\n\n /* This part of the code is checking if the properties `layout` and `_breakpoint` are truthy and if\n either `_breakpoint` or `layout` properties have changed. If these conditions are met, it calls\n the `_updateLayout()` method to update the gridstack size and position of each widget when there\n is a change in the breakpoint or layout. */\n if (\n this.layout &&\n this._breakpoint &&\n (changedProps.has('_breakpoint') || changedProps.has('layout'))\n ) {\n // update the gridstack size/position of each widget when breakpoint or layout changes\n this._updateLayout();\n }\n }\n\n /**\n * The private `_saveLayout` function saves the grid layout by updating each widget's properties and\n * emitting a custom event with the new layout.\n */\n private _saveLayout() {\n // get new grid layout\n let NewLayout = this.grid.save(false);\n\n // manually update each widget's properties because GridStack drops \"w\" or \"h\" if they match their respective min values and freezes the browser\n NewLayout = NewLayout.map((Widget: any) => {\n return {\n ...Widget,\n w: Widget.w || Widget.minW,\n h: Widget.h || Widget.minH,\n };\n });\n\n // update layout for current breakpoint\n this.layout[this._breakpoint] = NewLayout;\n\n // emit save event with new layout in detail\n const event = new CustomEvent('on-grid-save', {\n detail: { layout: this.layout },\n });\n this.dispatchEvent(event);\n }\n\n /**\n * The function `_initGridstack` initializes a GridStack layout with event listeners for drag, resize,\n * and saving layout changes.\n */\n private _initGridstack() {\n // destory grid if already exists\n if (this.grid) {\n this.grid.destroy(false);\n }\n\n // initialize the GridStack with Shidoka default options\n const GridstackEl: any = this.querySelector('.grid-stack');\n this.grid = this.gridStack.init(this._gridstackConfig, GridstackEl);\n\n // set widget drag state on dragstart\n this.grid.on('dragstart', (e: Event) => {\n const El: any = e.target;\n const Widget: any = querySelectorDeep('kyn-widget', El);\n Widget.dragActive = true;\n });\n\n // unset widget drag state and save layout on dragstop\n this.grid.on('dragstop', (e: Event) => {\n const El: any = e.target;\n const Widget: any = querySelectorDeep('kyn-widget', El);\n Widget.dragActive = false;\n\n this._saveLayout();\n });\n\n // save layout on resizestop\n this.grid.on('resizestop', () => {\n this._saveLayout();\n });\n\n // emit init event\n const event = new CustomEvent('on-grid-init', {\n detail: { grid: this.grid, gridStack: this.gridStack },\n });\n this.dispatchEvent(event);\n }\n\n override updated(changedProps: any) {\n if (\n changedProps.has('gridstackConfig') ||\n changedProps.has('_gridstackConfig')\n ) {\n this._initGridstack();\n }\n\n if (changedProps.has('compact')) {\n this._updateWidgetsDensity();\n }\n }\n\n /**\n * The function `_updateWidgetsDensity` iterates through all `kyn-widget` elements and sets their\n * `compact` property based on the parent element's `compact` property.\n */\n private _updateWidgetsDensity() {\n this.querySelectorAll('kyn-widget').forEach((widget: any) => {\n widget.compact = this.compact;\n });\n }\n\n private _updateLayout() {\n // get layout for current breakpoint\n const Layout = this.layout[this._breakpoint] || this.layout['max'];\n\n if (this.grid) {\n // load grid layout\n this.grid.load(Layout);\n\n // enable gridstack animations\n this.grid.setAnimation(true);\n }\n }\n\n /** @internal */\n private _debounceResize = debounce(() => {\n this._setBreakpoint();\n });\n\n override connectedCallback() {\n super.connectedCallback();\n\n window?.addEventListener('resize', this._debounceResize);\n }\n\n override disconnectedCallback() {\n window?.removeEventListener('resize', this._debounceResize);\n\n super.disconnectedCallback();\n }\n\n /**\n * The function `_setBreakpoint` retrieves and sets the current breakpoint value from the CSS custom\n * property `--kd-current-breakpoint`.\n */\n private _setBreakpoint() {\n // get and set current breakpoint variable\n this._breakpoint = getComputedStyle(\n document.documentElement\n ).getPropertyValue('--kd-current-breakpoint');\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-widget-gridstack': WidgetGridstack;\n }\n}\n"],"names":["WidgetGridstack","customElement","LitElement","_classThis","_classSuper","_WidgetGridstack_layout_accessor_storage","set","this","__runInitializers","_layout_initializers","_WidgetGridstack_gridstackConfig_accessor_storage","_layout_extraInitializers","_gridstackConfig_initializers","_WidgetGridstack__gridstackConfig_accessor_storage","_gridstackConfig_extraInitializers","__gridstackConfig_initializers","_WidgetGridstack_gridStack_accessor_storage","__gridstackConfig_extraInitializers","_gridStack_initializers","GridStack","_WidgetGridstack_grid_accessor_storage","_gridStack_extraInitializers","_grid_initializers","_WidgetGridstack_compact_accessor_storage","_grid_extraInitializers","_compact_initializers","_WidgetGridstack_wholeWidgetDraggable_accessor_storage","_compact_extraInitializers","_wholeWidgetDraggable_initializers","_WidgetGridstack__breakpoint_accessor_storage","_wholeWidgetDraggable_extraInitializers","__breakpoint_initializers","_debounceResize","__breakpoint_extraInitializers","debounce","_setBreakpoint","layout","__classPrivateFieldGet","value","__classPrivateFieldSet","gridstackConfig","_gridstackConfig","gridStack","grid","compact","wholeWidgetDraggable","_breakpoint","render","html","firstUpdated","willUpdate","changedProps","has","GetConfig","_updateLayout","_saveLayout","NewLayout","save","map","Widget","w","minW","h","minH","event","CustomEvent","detail","dispatchEvent","_initGridstack","destroy","GridstackEl","querySelector","init","on","e","El","target","querySelectorDeep","dragActive","updated","_updateWidgetsDensity","querySelectorAll","forEach","widget","Layout","load","setAnimation","connectedCallback","super","window","addEventListener","disconnectedCallback","removeEventListener","getComputedStyle","document","documentElement","getPropertyValue","_layout_decorators","property","type","Object","_gridstackConfig_decorators","__gridstackConfig_decorators","state","_gridStack_decorators","attribute","_grid_decorators","_compact_decorators","Boolean","_wholeWidgetDraggable_decorators","__breakpoint_decorators","__esDecorate","kind","name","static","private","access","obj","get","metadata","_metadata","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS","Styles"],"mappings":";;;;;;;;;;;;;;;;;;;OAeaA,EAAe,qDAD3BC,EAAc,gCACsBC,yFAARC,EAAA,cAAQC,oCAK1BC,EAAAC,IAAAC,KAAAC,EAAAD,KAAAE,EAAc,CAAA,IAIdC,EAAAJ,IAAAC,MAAAC,EAAAD,KAAAI,GAAAH,EAAAD,KAAAK,OAAA,KAKAC,EAAAP,IAAAC,MAAAC,EAAAD,KAAAO,GAAAN,EAAAD,KAAAQ,OAAA,KAIAC,EAAAV,IAAAC,MAAAC,EAAAD,KAAAU,GAAAT,EAAAD,KAAAW,EAAiBC,KAIjBC,EAAAd,IAAAC,MAAAC,EAAAD,KAAAc,GAAAb,EAAAD,KAAAe,OAAA,KAIAC,EAAAjB,IAAAC,MAAAC,EAAAD,KAAAiB,GAAAhB,EAAAD,KAAAkB,GAAU,KAIVC,EAAAp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AAE,GAIhBoF,EAAA5G,EAAA,KAAA0G,EAAA,CAAAG,KAAA,WAAAC,KAAA,uBAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAhE,IAAAiE,GAAA,yBAAAA,EAAAC,IAAAD,GAAAA,EAASxE,qBAAoBvC,IAAA,CAAA+G,EAAA/E,KAAA+E,EAApBxE,qBAAoBP,CAAA,GAAAiF,SAAAC,GAAA5F,EAAAE,GAM7BiF,EAAA5G,EAAA,KAAA2G,EAAA,CAAAE,KAAA,WAAAC,KAAA,cAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAhE,IAAAiE,GAAA,gBAAAA,EAAAC,IAAAD,GAAAA,EAASvE,YAAWxC,IAAA,CAAA+G,EAAA/E,KAAA+E,EAAXvE,YAAWR,CAAA,GAAAiF,SAAAC,GAAAzF,EAAAE,GApCtB8E,EAAA,KAAAU,EAAA,CAAAnF,MAAAnC,GAAAuH,EAAA,CAAAV,KAAA,QAAAC,KAAA9G,EAAA8G,KAAAM,SAAAC,GAAA,KAAAG,iHACkBxH,EAAAyH,OAASC,EAAUC,GADxBtH,EAAAL,EAAAwH,MAAe"}
1
+ {"version":3,"file":"widgetGridstack.js","sources":["../../../../src/components/reusable/widget/widgetGridstack.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport Styles from './widgetGridstack.scss?inline';\nimport { querySelectorDeep } from 'query-selector-shadow-dom';\nimport { debounce } from '../../../common/helpers/helpers';\nimport { GetConfig } from '../../../common/helpers/gridstack';\nimport { GridStack } from 'gridstack';\n\n/**\n * GridStack wrapper that includes Shidoka default config and styles.\n * @fires on-grid-init - Emits after GridStack initializes.\n * @fires on-grid-save - Emits the GridStack save() method results (new layout) on dragstop and resizestop.\n * @slot unnamed - Slot for .grid-stack container element.\n */\n@customElement('kyn-widget-gridstack')\nexport class WidgetGridstack extends LitElement {\n static override styles = unsafeCSS(Styles);\n\n /** GridStack layout/widget size/position definitions for each breakpoint. */\n @property({ type: Object })\n accessor layout: any = {};\n\n /** Custom GridStack config. */\n @property({ type: Object })\n accessor gridstackConfig!: any;\n\n /** Final config passed to gridstack.\n * @internal */\n @state()\n accessor _gridstackConfig!: any;\n\n /** GridStack instance. */\n @property({ attribute: false })\n accessor gridStack: any = GridStack;\n\n /** GridStack grid instance. */\n @property({ attribute: false })\n accessor grid!: any;\n\n /** Use compact grid config. Ignored in case of custom gridstackConfig. */\n @property({ type: Boolean })\n accessor compact = false;\n\n /** Make entire widget draggable. Ignored in case of custom gridstackConfig. */\n @property({ type: Boolean })\n accessor wholeWidgetDraggable = false;\n\n /** Current breakpoint.\n * @internal\n */\n @state()\n accessor _breakpoint = '';\n\n override render() {\n return html`\n <div class=\"grid-wrapper ${this.compact ? 'compact' : ''}\">\n <slot></slot>\n </div>\n `;\n }\n\n override firstUpdated() {\n this._setBreakpoint();\n }\n\n override willUpdate(changedProps: any) {\n /* This part of the code is checking if the properties `compact` or `wholeWidgetDraggable` have\n changed. If either of these properties has changed, it updates the `_gridstackConfig` property\n based on the current values of `compact` and `wholeWidgetDraggable`. */\n if (\n changedProps.has('compact') ||\n changedProps.has('wholeWidgetDraggable')\n ) {\n this._gridstackConfig =\n this.gridstackConfig ||\n GetConfig(this.compact, this.wholeWidgetDraggable);\n }\n\n /* This part of the code is checking if the properties `layout` and `_breakpoint` are truthy and if\n either `_breakpoint` or `layout` properties have changed. If these conditions are met, it calls\n the `_updateLayout()` method to update the gridstack size and position of each widget when there\n is a change in the breakpoint or layout. */\n if (\n this.layout &&\n this._breakpoint &&\n (changedProps.has('_breakpoint') || changedProps.has('layout'))\n ) {\n // update the gridstack size/position of each widget when breakpoint or layout changes\n this._updateLayout();\n }\n }\n\n /**\n * The private `_saveLayout` function saves the grid layout by updating each widget's properties and\n * emitting a custom event with the new layout.\n */\n private _saveLayout() {\n // get new grid layout\n let NewLayout = this.grid.save(false);\n\n // manually update each widget's properties because GridStack drops \"w\" or \"h\" if they match their respective min values and freezes the browser\n NewLayout = NewLayout.map((Widget: any) => {\n return {\n ...Widget,\n w: Widget.w || Widget.minW,\n h: Widget.h || Widget.minH,\n };\n });\n\n // update layout for current breakpoint\n this.layout[this._breakpoint] = NewLayout;\n\n // emit save event with new layout in detail\n const event = new CustomEvent('on-grid-save', {\n detail: { layout: this.layout },\n });\n this.dispatchEvent(event);\n }\n\n /**\n * The function `_initGridstack` initializes a GridStack layout with event listeners for drag, resize,\n * and saving layout changes.\n */\n private _initGridstack() {\n // destory grid if already exists\n if (this.grid) {\n this.grid.destroy(false);\n }\n\n // initialize the GridStack with Shidoka default options\n const GridstackEl: any = this.querySelector('.grid-stack');\n this.grid = this.gridStack.init(this._gridstackConfig, GridstackEl);\n\n // set the grid's margin based on breakpoint\n this._setMargin();\n\n // set widget drag state on dragstart\n this.grid.on('dragstart', (e: Event) => {\n const El: any = e.target;\n const Widget: any = querySelectorDeep('kyn-widget', El);\n Widget.dragActive = true;\n });\n\n // unset widget drag state and save layout on dragstop\n this.grid.on('dragstop', (e: Event) => {\n const El: any = e.target;\n const Widget: any = querySelectorDeep('kyn-widget', El);\n Widget.dragActive = false;\n\n this._saveLayout();\n });\n\n // save layout on resizestop\n this.grid.on('resizestop', () => {\n this._saveLayout();\n });\n\n // emit init event\n const event = new CustomEvent('on-grid-init', {\n detail: { grid: this.grid, gridStack: this.gridStack },\n });\n this.dispatchEvent(event);\n }\n\n override updated(changedProps: any) {\n if (\n changedProps.has('gridstackConfig') ||\n changedProps.has('_gridstackConfig')\n ) {\n this._initGridstack();\n }\n\n if (changedProps.has('compact')) {\n this._updateWidgetsDensity();\n }\n }\n\n /**\n * The function `_updateWidgetsDensity` iterates through all `kyn-widget` elements and sets their\n * `compact` property based on the parent element's `compact` property.\n */\n private _updateWidgetsDensity() {\n this.querySelectorAll('kyn-widget').forEach((widget: any) => {\n widget.compact = this.compact;\n });\n }\n\n private _updateLayout() {\n // get layout for current breakpoint\n const Layout = this.layout[this._breakpoint] || this.layout['max'];\n\n if (this.grid) {\n // load grid layout\n this.grid.load(Layout);\n\n // enable gridstack animations\n this.grid.setAnimation(true);\n }\n }\n\n /** @internal */\n private _debounceResize = debounce(() => {\n this._setBreakpoint();\n this._setMargin();\n });\n\n override connectedCallback() {\n super.connectedCallback();\n\n window?.addEventListener('resize', this._debounceResize);\n }\n\n override disconnectedCallback() {\n window?.removeEventListener('resize', this._debounceResize);\n\n super.disconnectedCallback();\n }\n\n /**\n * The function `_setBreakpoint` retrieves and sets the current breakpoint value from the CSS custom\n * property `--kd-current-breakpoint`.\n */\n private _setBreakpoint() {\n // get and set current breakpoint variable\n this._breakpoint = getComputedStyle(\n document.documentElement\n ).getPropertyValue('--kd-current-breakpoint');\n }\n\n /**\n * The private `_setMargin` function adjusts the margin of a grid based on a breakpoint value.\n */\n private _setMargin() {\n if (!this.gridstackConfig && !this.compact) {\n if (this._breakpoint === 'sm') {\n this.grid.margin('8');\n } else {\n this.grid.margin('16');\n }\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-widget-gridstack': WidgetGridstack;\n }\n}\n"],"names":["WidgetGridstack","customElement","LitElement","_classThis","_classSuper","_WidgetGridstack_layout_accessor_storage","set","this","__runInitializers","_layout_initializers","_WidgetGridstack_gridstackConfig_accessor_storage","_layout_extraInitializers","_gridstackConfig_initializers","_WidgetGridstack__gridstackConfig_accessor_storage","_gridstackConfig_extraInitializers","__gridstackConfig_initializers","_WidgetGridstack_gridStack_accessor_storage","__gridstackConfig_extraInitializers","_gridStack_initializers","GridStack","_WidgetGridstack_grid_accessor_storage","_gridStack_extraInitializers","_grid_initializers","_WidgetGridstack_compact_accessor_storage","_grid_extraInitializers","_compact_initializers","_WidgetGridstack_wholeWidgetDraggable_accessor_storage","_compact_extraInitializers","_wholeWidgetDraggable_initializers","_WidgetGridstack__breakpoint_accessor_storage","_wholeWidgetDraggable_extraInitializers","__breakpoint_initializers","_debounceResize","__breakpoint_extraInitializers","debounce","_setBreakpoint","_setMargin","layout","__classPrivateFieldGet","value","__classPrivateFieldSet","gridstackConfig","_gridstackConfig","gridStack","grid","compact","wholeWidgetDraggable","_breakpoint","render","html","firstUpdated","willUpdate","changedProps","has","GetConfig","_updateLayout","_saveLayout","NewLayout","save","map","Widget","w","minW","h","minH","event","CustomEvent","detail","dispatchEvent","_initGridstack","destroy","GridstackEl","querySelector","init","on","e","El","target","querySelectorDeep","dragActive","updated","_updateWidgetsDensity","querySelectorAll","forEach","widget","Layout","load","setAnimation","connectedCallback","super","window","addEventListener","disconnectedCallback","removeEventListener","getComputedStyle","document","documentElement","getPropertyValue","margin","_layout_decorators","property","type","Object","_gridstackConfig_decorators","__gridstackConfig_decorators","state","_gridStack_decorators","attribute","_grid_decorators","_compact_decorators","Boolean","_wholeWidgetDraggable_decorators","__breakpoint_decorators","__esDecorate","kind","name","static","private","access","obj","get","metadata","_metadata","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS","Styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;OAeaA,EAAe,qDAD3BC,EAAc,gCACsBC,yFAARC,EAAA,cAAQC,oCAK1BC,EAAAC,IAAAC,KAAAC,EAAAD,KAAAE,EAAc,CAAA,IAIdC,EAAAJ,IAAAC,MAAAC,EAAAD,KAAAI,GAAAH,EAAAD,KAAAK,OAAA,KAKAC,EAAAP,IAAAC,MAAAC,EAAAD,KAAAO,GAAAN,EAAAD,KAAAQ,OAAA,KAIAC,EAAAV,IAAAC,MAAAC,EAAAD,KAAAU,GAAAT,EAAAD,KAAAW,EAAiBC,KAIjBC,EAAAd,IAAAC,MAAAC,EAAAD,KAAAc,GAAAb,EAAAD,KAAAe,OAAA,KAIAC,EAAAjB,IAAAC,MAAAC,EAAAD,KAAAiB,GAAAhB,EAAAD,KAAAkB,GAAU,KAIVC,EAAApB,IAAAC,MAAAC,EAAAD,KAAAoB,GAAAnB,EAAAD,KAAAqB,GAAuB,KAMvBC,EAAAvB,IAAAC,MAAAC,EAAAD,KAAAu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hF,KAAAgF,EAAP1E,QAAON,CAAA,GAAAkF,SAAAC,GAAAjG,EAAAE,GAIhBsF,EAAA9G,EAAA,KAAA4G,EAAA,CAAAG,KAAA,WAAAC,KAAA,uBAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAjE,IAAAkE,GAAA,yBAAAA,EAAAC,IAAAD,GAAAA,EAASzE,qBAAoBxC,IAAA,CAAAiH,EAAAhF,KAAAgF,EAApBzE,qBAAoBP,CAAA,GAAAkF,SAAAC,GAAA9F,EAAAE,GAM7BmF,EAAA9G,EAAA,KAAA6G,EAAA,CAAAE,KAAA,WAAAC,KAAA,cAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAjE,IAAAkE,GAAA,gBAAAA,EAAAC,IAAAD,GAAAA,EAASxE,YAAWzC,IAAA,CAAAiH,EAAAhF,KAAAgF,EAAXxE,YAAWR,CAAA,GAAAkF,SAAAC,GAAA3F,EAAAE,GApCtBgF,EAAA,KAAAU,EAAA,CAAApF,MAAApC,GAAAyH,EAAA,CAAAV,KAAA,QAAAC,KAAAhH,EAAAgH,KAAAM,SAAAC,GAAA,KAAAG,iHACkB1H,EAAA2H,OAASC,EAAUC,GADxBxH,EAAAL,EAAA0H,MAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyndryl-design-system/shidoka-applications",
3
- "version": "2.52.0",
3
+ "version": "2.52.1",
4
4
  "description": "Shidoka Web Components for Applications",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -28,7 +28,7 @@
28
28
  "prepare": "npx husky install"
29
29
  },
30
30
  "dependencies": {
31
- "@kyndryl-design-system/shidoka-foundation": "^2.4.16",
31
+ "@kyndryl-design-system/shidoka-foundation": "^2.4.18",
32
32
  "@kyndryl-design-system/shidoka-icons": "^2.12.2",
33
33
  "@lit/context": "^1.1.0",
34
34
  "deepmerge-ts": "^7.1.0",