@kyndryl-design-system/shidoka-applications 2.51.2 → 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.
- package/components/reusable/notification/notification.d.ts +1 -0
- package/components/reusable/notification/notification.d.ts.map +1 -1
- package/components/reusable/notification/notification.js +12 -34
- package/components/reusable/notification/notification.js.map +1 -1
- package/components/reusable/widget/widgetGridstack.d.ts +4 -0
- package/components/reusable/widget/widgetGridstack.d.ts.map +1 -1
- package/components/reusable/widget/widgetGridstack.js +10 -5
- package/components/reusable/widget/widgetGridstack.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ import '../badge';
|
|
|
6
6
|
* Notification component.
|
|
7
7
|
* @slot unnamed - Slot for notification message body.
|
|
8
8
|
* @slot actions - Slot for menu.
|
|
9
|
+
* @slot icon - Slot for an icon.
|
|
9
10
|
* @fires on-notification-click - Emit event for clickable notification.
|
|
10
11
|
* @fires on-close - Emits when an inline/toast notification closes.
|
|
11
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/notification/notification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAKlD,OAAO,WAAW,CAAC;AAInB,OAAO,SAAS,CAAC;AAMjB,OAAO,UAAU,CAAC;AAClB
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/notification/notification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAKlD,OAAO,WAAW,CAAC;AAInB,OAAO,SAAS,CAAC;AAMjB,OAAO,UAAU,CAAC;AAClB;;;;;;;GAOG;AAEH,qBACa,YAAa,SAAQ,UAAU;IAC1C,OAAgB,MAAM,0BAA+B;IAErD,qCAAqC;IAErC,QAAQ,CAAC,iBAAiB,SAAM;IAEhC,uCA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-error-accent);
|
|
60
|
+
color: var(--kd-color-status-error-foreground);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
kyn-card.notification-success::part(card-wrapper) {
|
|
63
64
|
background-color: var(--kd-color-status-success-accent);
|
|
65
|
+
color: var(--kd-color-status-success-foreground);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
kyn-card.notification-warning::part(card-wrapper) {
|
|
67
69
|
background-color: var(--kd-color-status-warning-accent);
|
|
70
|
+
color: var(--kd-color-status-warning-foreground---dark);
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
kyn-card.notification-info::part(card-wrapper) {
|
|
71
74
|
background-color: var(--kd-color-status-informational-accent);
|
|
75
|
+
color: var(--kd-color-status-informational-foreground);
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
kyn-card.notification-ai::part(card-wrapper) {
|
|
75
79
|
background-color: var(--kd-color-background-container-ai-default);
|
|
80
|
+
color: var(--kd-color-icon-ai);
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
kyn-card.notification-default::part(card-wrapper) {
|
|
79
84
|
background-color: var(--kd-color-status-neutral-light);
|
|
85
|
+
color: var(--kd-color-status-neutral-foreground);
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
kyn-card.notification-normal::part(card-wrapper) {
|
|
@@ -390,37 +396,7 @@ kyn-link::part(link) {
|
|
|
390
396
|
text-indent: 200%;
|
|
391
397
|
white-space: nowrap;
|
|
392
398
|
width: 1px;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.info svg {
|
|
396
|
-
fill: var(--kd-color-status-informational-foreground);
|
|
397
|
-
display: flex;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.success svg {
|
|
401
|
-
fill: var(--kd-color-status-success-foreground);
|
|
402
|
-
display: flex;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.default svg {
|
|
406
|
-
fill: var(--kd-color-status-neutral-foreground);
|
|
407
|
-
display: flex;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.warning svg {
|
|
411
|
-
fill: var(--kd-color-status-warning-foreground---dark);
|
|
412
|
-
display: flex;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.error svg {
|
|
416
|
-
fill: var(--kd-color-status-error-foreground);
|
|
417
|
-
display: flex;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.ai svg {
|
|
421
|
-
fill: var(--kd-color-icon-ai);
|
|
422
|
-
display: flex;
|
|
423
|
-
}`;let b=(()=>{var c,b,x,S,z,C,$,_,T,j,D,B,M,N,R,W;let E,I,L,O,U,X,q,P,Y,A,F,G,H,J,K,Q,V,Z,tt=[f("kyn-notification")],it=[],et=m,nt=[],at=[],ot=[],st=[],rt=[],lt=[],ct=[],dt=[],ft=[],ht=[],pt=[],mt=[],ut=[],gt=[],kt=[],vt=[],yt=[],wt=[],bt=[],xt=[],St=[],zt=[],Ct=[],$t=[],_t=[],Tt=[],jt=[],Dt=[],Bt=[],Mt=[],Nt=[],Rt=[];return I=class extends et{get notificationTitle(){return n(this,c,"f")}set notificationTitle(t){a(this,c,t,"f")}get notificationSubtitle(){return n(this,b,"f")}set notificationSubtitle(t){a(this,b,t,"f")}get timeStamp(){return n(this,x,"f")}set timeStamp(t){a(this,x,t,"f")}get href(){return n(this,S,"f")}set href(t){a(this,S,t,"f")}get tagStatus(){return n(this,z,"f")}set tagStatus(t){a(this,z,t,"f")}get type(){return n(this,C,"f")}set type(t){a(this,C,t,"f")}get textStrings(){return n(this,$,"f")}set textStrings(t){a(this,$,t,"f")}get closeBtnDescription(){return n(this,_,"f")}set closeBtnDescription(t){a(this,_,t,"f")}get assistiveNotificationTypeText(){return n(this,T,"f")}set assistiveNotificationTypeText(t){a(this,T,t,"f")}get notificationRole(){return n(this,j,"f")}set notificationRole(t){a(this,j,t,"f")}get statusLabel(){return n(this,D,"f")}set statusLabel(t){a(this,D,t,"f")}get _badgeColor(){return n(this,B,"f")}set _badgeColor(t){a(this,B,t,"f")}get unRead(){return n(this,M,"f")}set unRead(t){a(this,M,t,"f")}get hideCloseButton(){return n(this,N,"f")}set hideCloseButton(t){a(this,N,t,"f")}get timeout(){return n(this,R,"f")}set timeout(t){a(this,R,t,"f")}get _hasDescriptionSlotContent(){return n(this,W,"f")}set _hasDescriptionSlotContent(t){a(this,W,t,"f")}render(){const t={"notification-normal":"normal"===this.type,"notification-inline":"inline"===this.type,"notification-toast":"toast"===this.type,"notification-error":("inline"===this.type||"toast"===this.type)&&"error"===this.tagStatus,"notification-success":("inline"===this.type||"toast"===this.type)&&"success"===this.tagStatus,"notification-warning":("inline"===this.type||"toast"===this.type)&&"warning"===this.tagStatus,"notification-info":("inline"===this.type||"toast"===this.type)&&"info"===this.tagStatus,"notification-ai":"toast"===this.type&&"ai"===this.tagStatus,"notification-default":("inline"===this.type||"toast"===this.type)&&"default"===this.tagStatus,"notification-no-description":!this._hasDescriptionSlotContent};return s`
|
|
399
|
+
}`;let b=(()=>{var c,b,x,S,z,C,$,_,T,j,D,B,M,N,R,W;let E,I,L,O,U,X,q,P,Y,A,F,G,H,J,K,Q,V,Z,tt=[f("kyn-notification")],it=[],et=m,nt=[],at=[],ot=[],st=[],rt=[],lt=[],ct=[],dt=[],ft=[],ht=[],pt=[],mt=[],ut=[],gt=[],kt=[],vt=[],yt=[],wt=[],bt=[],xt=[],St=[],zt=[],Ct=[],$t=[],_t=[],Tt=[],jt=[],Dt=[],Bt=[],Mt=[],Nt=[],Rt=[];return I=class extends et{get notificationTitle(){return n(this,c,"f")}set notificationTitle(t){a(this,c,t,"f")}get notificationSubtitle(){return n(this,b,"f")}set notificationSubtitle(t){a(this,b,t,"f")}get timeStamp(){return n(this,x,"f")}set timeStamp(t){a(this,x,t,"f")}get href(){return n(this,S,"f")}set href(t){a(this,S,t,"f")}get tagStatus(){return n(this,z,"f")}set tagStatus(t){a(this,z,t,"f")}get type(){return n(this,C,"f")}set type(t){a(this,C,t,"f")}get textStrings(){return n(this,$,"f")}set textStrings(t){a(this,$,t,"f")}get closeBtnDescription(){return n(this,_,"f")}set closeBtnDescription(t){a(this,_,t,"f")}get assistiveNotificationTypeText(){return n(this,T,"f")}set assistiveNotificationTypeText(t){a(this,T,t,"f")}get notificationRole(){return n(this,j,"f")}set notificationRole(t){a(this,j,t,"f")}get statusLabel(){return n(this,D,"f")}set statusLabel(t){a(this,D,t,"f")}get _badgeColor(){return n(this,B,"f")}set _badgeColor(t){a(this,B,t,"f")}get unRead(){return n(this,M,"f")}set unRead(t){a(this,M,t,"f")}get hideCloseButton(){return n(this,N,"f")}set hideCloseButton(t){a(this,N,t,"f")}get timeout(){return n(this,R,"f")}set timeout(t){a(this,R,t,"f")}get _hasDescriptionSlotContent(){return n(this,W,"f")}set _hasDescriptionSlotContent(t){a(this,W,t,"f")}render(){const t={"notification-normal":"normal"===this.type,"notification-inline":"inline"===this.type,"notification-toast":"toast"===this.type,"notification-error":("inline"===this.type||"toast"===this.type)&&"error"===this.tagStatus,"notification-success":("inline"===this.type||"toast"===this.type)&&"success"===this.tagStatus,"notification-warning":("inline"===this.type||"toast"===this.type)&&"warning"===this.tagStatus,"notification-info":("inline"===this.type||"toast"===this.type)&&"info"===this.tagStatus,"notification-ai":("inline"===this.type||"toast"===this.type)&&"ai"===this.tagStatus,"notification-default":("inline"===this.type||"toast"===this.type)&&"default"===this.tagStatus,"notification-no-description":!this._hasDescriptionSlotContent};return s`
|
|
424
400
|
${"clickable"===this.type?s`<kyn-card
|
|
425
401
|
class="notification-clickable"
|
|
426
402
|
?highlight=${this.unRead}
|
|
@@ -451,11 +427,13 @@ kyn-link::part(link) {
|
|
|
451
427
|
<div class="notification-head">
|
|
452
428
|
${"inline"===this.type||"toast"===this.type?s` <span
|
|
453
429
|
class="notification-state-icon ${this.tagStatus}"
|
|
454
|
-
slot="icon"
|
|
455
430
|
role="img"
|
|
456
431
|
aria-label=${`${this.textStrings[this.tagStatus]} icon`}
|
|
457
|
-
|
|
458
|
-
|
|
432
|
+
>
|
|
433
|
+
<slot name="icon">
|
|
434
|
+
${l(t[this.tagStatus])}
|
|
435
|
+
</slot>
|
|
436
|
+
</span>`:null}
|
|
459
437
|
|
|
460
438
|
<div class="notification-title">${this.notificationTitle}</div>
|
|
461
439
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../../../src/components/reusable/notification/notification.ts"],"sourcesContent":["import { unsafeSVG } from 'lit-html/directives/unsafe-svg.js';\nimport { LitElement, html, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport '../button';\nimport closeIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/close-simple.svg';\n\nimport NotificationScss from './notification.scss?inline';\nimport '../card';\nimport successIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/checkmark-filled.svg';\nimport warningIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/warning-filled.svg';\nimport errorIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/error-filled.svg';\nimport infoIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/information-filled.svg';\n\nimport '../badge';\n/**\n * Notification component.\n * @slot unnamed - Slot for notification message body.\n * @slot actions - Slot for menu.\n * @fires on-notification-click - Emit event for clickable notification.\n * @fires on-close - Emits when an inline/toast notification closes.\n */\n\n@customElement('kyn-notification')\nexport class Notification extends LitElement {\n static override styles = unsafeCSS(NotificationScss);\n\n /** Notification Title (Required). */\n @property({ type: String })\n accessor notificationTitle = '';\n\n /** Notification subtitle.(optional) */\n @property({ type: String })\n accessor notificationSubtitle = '';\n\n /**\n * Timestamp of notification.\n * It is recommended to add the context along with the timestamp. Example: `Updated 2 mins ago`.\n */\n @property({ type: String })\n accessor timeStamp = '';\n\n /** Card href link */\n @property({ type: String })\n accessor href = '';\n\n /** Notification status / tag type. `'default'`, `'info'`, `'warning'`, `'success'` & `'error'`. */\n @property({ type: String })\n accessor tagStatus = 'default'; // Need to change the name to badgeStatus, once old tags are removed.\n\n /** Notification type. `'normal'`, `'inline'`, `'toast'` and `'clickable'`. Clickable type can be use inside notification panel */\n @property({ type: String })\n accessor type = 'normal';\n\n /** Customizable text strings. */\n @property({ type: Object })\n accessor textStrings: any = {\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n error: 'Error',\n };\n\n /** Close button description (Required to support accessibility). */\n @property({ type: String })\n accessor closeBtnDescription = 'Close';\n\n /**\n * Assistive text for notification type.\n * Required for `'clickable'`, `'inline'` and `'toast'` notification types.\n * */\n @property({ type: String })\n accessor assistiveNotificationTypeText = '';\n\n /** Notification role (Required to support accessibility). */\n @property({ type: String })\n accessor notificationRole: 'alert' | 'log' | 'status' | undefined;\n\n /**\n * Status label (Required to support accessibility).\n * Assign the localized string value for the word **Status**.\n * */\n @property({ type: String })\n accessor statusLabel = 'Status';\n\n /** Set badgeColor based on provided tagStatus.\n * @internal\n */\n @state()\n accessor _badgeColor: any = {\n success: 'success',\n warning: 'warning',\n info: 'information',\n error: 'error',\n };\n\n /** Set notification mark read prop. Required ony for `type: 'clickable'`.*/\n @property({ type: Boolean, reflect: true })\n accessor unRead = false;\n\n /** Hide close (x) button. Useful only for `type='toast'`. This required `timeout > 0` otherwise toast remain as it is when `hideCloseButton` is set true. */\n @property({ type: Boolean })\n accessor hideCloseButton = false;\n\n /** Timeout (Default 8 seconds for Toast). Specify an optional duration the toast notification should be closed in. Only apply with `type = 'toast'` */\n @property({ type: Number })\n accessor timeout = 8;\n\n /** Track if slot has content to conditionally render description div\n * @internal\n */\n @state()\n accessor _hasDescriptionSlotContent = false;\n\n override render() {\n const cardBgClasses = {\n 'notification-normal': this.type === 'normal',\n 'notification-inline': this.type === 'inline',\n 'notification-toast': this.type === 'toast',\n 'notification-error':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'error',\n 'notification-success':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'success',\n 'notification-warning':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'warning',\n 'notification-info':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'info',\n 'notification-ai': this.type === 'toast' && this.tagStatus === 'ai',\n 'notification-default':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'default',\n 'notification-no-description': !this._hasDescriptionSlotContent,\n };\n\n return html`\n ${this.type === 'clickable'\n ? html`<kyn-card\n class=\"notification-clickable\"\n ?highlight=${this.unRead}\n type=${this.type}\n href=${this.href}\n target=\"_blank\"\n rel=\"noopener\"\n @on-card-click=${(e: any) => this._handleCardClick(e)}\n hideBorder\n role=${ifDefined(this.notificationRole)}\n >\n <span id=\"notificationType\"\n >${this.assistiveNotificationTypeText}</span\n >\n ${this.renderInnerUI()}\n </kyn-card>`\n : html` <kyn-card\n type=${this.type}\n role=${ifDefined(this.notificationRole)}\n class=\"${classMap(cardBgClasses)}\"\n >\n ${this.type === 'inline' || this.type === 'toast'\n ? html`<span id=\"notificationType\"\n >${this.assistiveNotificationTypeText}</span\n >`\n : null}\n ${this.renderInnerUI()}\n </kyn-card>`}\n `;\n }\n\n private renderInnerUI() {\n const notificationIcon: any = {\n success: successIcon,\n error: errorIcon,\n warning: warningIcon,\n info: infoIcon,\n ai: successIcon,\n default: successIcon,\n };\n\n return html`<div class=\"notification-wrapper\">\n <div class=\"notification-title-wrap\">\n <div class=\"notification-head\">\n ${this.type === 'inline' || this.type === 'toast'\n ? html` <span\n class=\"notification-state-icon ${this.tagStatus}\"\n slot=\"icon\"\n role=\"img\"\n aria-label=${`${this.textStrings[this.tagStatus]} icon`}\n >${unsafeSVG(notificationIcon[this.tagStatus])}</span\n >`\n : null}\n\n <div class=\"notification-title\">${this.notificationTitle}</div>\n\n ${this.notificationSubtitle !== '' &&\n (this.type === 'normal' || this.type === 'clickable')\n ? html`\n <div class=\"notification-subtitle\">\n ${this.notificationSubtitle}\n </div>\n `\n : null}\n </div>\n\n <div>\n ${(this.type === 'toast' || this.type === 'inline') &&\n !this.hideCloseButton\n ? html` <kyn-button\n class=\"notification-toast-close-btn\"\n kind=\"ghost\"\n size=\"small\"\n description=${ifDefined(this.closeBtnDescription)}\n @on-click=\"${() => this._handleClose()}\"\n >\n <span\n slot=\"icon\"\n role=\"img\"\n aria-label=${ifDefined(this.closeBtnDescription)}\n >${unsafeSVG(closeIcon)}</span\n >\n </kyn-button>`\n : null}\n <!-- actions slot could be an overflow menu, close icon (for other notification types) etc. -->\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n ${this._hasDescriptionSlotContent\n ? html`<div class=\"notification-description\">\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>`\n : html`<slot\n @slotchange=\"${this._handleSlotChange}\"\n style=\"display: none;\"\n ></slot>`}\n\n <div class=\"notification-content-wrapper\">\n <div class=\"status-tag\">\n ${this.tagStatus !== 'default' &&\n (this.type === 'normal' || this.type === 'clickable')\n ? html`\n <span id=\"statusLabel\">${this.statusLabel}</span>\n <kyn-badge\n type=${'heavy'}\n ?hideIcon=${true}\n label=${this.textStrings[this.tagStatus]}\n status=${this._badgeColor[this.tagStatus]}\n ></kyn-badge>\n `\n : null}\n </div>\n <div class=\"timestamp-wrapper\">\n <div class=\"timestamp-text\">${this.timeStamp}</div>\n </div>\n </div>\n </div>`;\n }\n\n override updated(changedProperties: any) {\n // Close toast notification if timeout > 0\n if (\n this.type === 'toast' &&\n changedProperties.has('timeout') &&\n this.timeout > 0\n ) {\n setTimeout(() => {\n this._close();\n }, this.timeout * 1000);\n }\n }\n\n // Remove toast from DOM\n private _close() {\n const animation = this.animate([{ opacity: '1' }, { opacity: '0' }], {\n duration: 500,\n easing: 'ease-in-out',\n fill: 'forwards',\n });\n animation.onfinish = () => {\n this.parentNode?.removeChild(this);\n };\n\n // emit on-close event\n const event = new CustomEvent('on-close');\n this.dispatchEvent(event);\n }\n\n private _handleClose() {\n this._close();\n }\n\n private _handleCardClick(e: any) {\n const event = new CustomEvent('on-notification-click', {\n detail: e.detail.origEvent,\n });\n this.dispatchEvent(event);\n }\n\n private _handleSlotChange(e: Event) {\n this._checkSlotContent();\n }\n\n private _checkSlotContent() {\n const slot = this.shadowRoot?.querySelector(\n 'slot:not([name])'\n ) as HTMLSlotElement;\n if (!slot) {\n this._hasDescriptionSlotContent = false;\n return;\n }\n\n const assignedNodes = slot.assignedNodes();\n\n const hasContent = assignedNodes.some((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n return true;\n }\n if (node.nodeType === Node.TEXT_NODE) {\n const textContent = node.textContent;\n return (\n textContent !== null &&\n textContent !== undefined &&\n textContent.trim() !== ''\n );\n }\n return false;\n });\n\n this._hasDescriptionSlotContent = hasContent;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-notification': Notification;\n }\n}\n"],"names":["Notification","customElement","LitElement","_classThis","_classSuper","notificationTitle","__classPrivateFieldGet","this","_Notification_notificationTitle_accessor_storage","value","__classPrivateFieldSet","notificationSubtitle","_Notification_notificationSubtitle_accessor_storage","timeStamp","_Notification_timeStamp_accessor_storage","href","_Notification_href_accessor_storage","tagStatus","_Notification_tagStatus_accessor_storage","type","_Notification_type_accessor_storage","textStrings","_Notification_textStrings_accessor_storage","closeBtnDescription","_Notification_closeBtnDescription_accessor_storage","assistiveNotificationTypeText","_Notification_assistiveNotificationTypeText_accessor_storage","notificationRole","_Notification_notificationRole_accessor_storage","statusLabel","_Notification_statusLabel_accessor_storage","_badgeColor","_Notification__badgeColor_accessor_storage","unRead","_Notification_unRead_accessor_storage","hideCloseButton","_Notification_hideCloseButton_accessor_storage","timeout","_Notification_timeout_accessor_storage","_hasDescriptionSlotContent","_Notification__hasDescriptionSlotContent_accessor_storage","render","cardBgClasses","html","e","_handleCardClick","ifDefined","renderInnerUI","classMap","notificationIcon","success","successIcon","error","errorIcon","warning","warningIcon","info","infoIcon","ai","default","unsafeSVG","_handleClose","closeIcon","_handleSlotChange","updated","changedProperties","has","setTimeout","_close","animate","opacity","duration","easing","fill","onfinish","_a","parentNode","removeChild","event","CustomEvent","dispatchEvent","detail","origEvent","_checkSlotContent","slot","shadowRoot","querySelector","hasContent","assignedNodes","some","node","nodeType","Node","ELEMENT_NODE","TEXT_NODE","textContent","trim","set","__runInitializers","_notificationTitle_initializers","_notificationTitle_extraInitializers","_notificationSubtitle_initializers","_notificationSubtitle_extraInitializers","_timeStamp_initializers","_timeStamp_extraInitializers","_href_initializers","_href_extraInitializers","_tagStatus_initializers","_tagStatus_extraInitializers","_type_initializers","_type_extraInitializers","_textStrings_initializers","_textStrings_extraInitializers","_closeBtnDescription_initializers","_closeBtnDescription_extraInitializers","_assistiveNotificationTypeText_initializers","_assistiveNotificationTypeText_extraInitializers","_notificationRole_initializers","_notificationRole_extraInitializers","_statusLabel_initializers","_statusLabel_extraInitializers","__badgeColor_initializers","__badgeColor_extraInitializers","_unRead_initializers","_unRead_extraInitializers","_hideCloseButton_initializers","_hideCloseButton_extraInitializers","_timeout_initializers","_timeout_extraInitializers","__hasDescriptionSlotContent_initializers","_notificationTitle_decorators","property","String","_notificationSubtitle_decorators","_timeStamp_decorators","_href_decorators","_tagStatus_decorators","_type_decorators","_textStrings_decorators","Object","_closeBtnDescription_decorators","_assistiveNotificationTypeText_decorators","_notificationRole_decorators","_statusLabel_decorators","__badgeColor_decorators","state","Boolean","reflect","_hideCloseButton_decorators","_timeout_decorators","Number","__hasDescriptionSlotContent_decorators","__esDecorate","kind","name","static","private","access","obj","get","metadata","_metadata","_unRead_decorators","__hasDescriptionSlotContent_extraInitializers","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS","NotificationScss"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAO5B,CAAA,GAAAuJ,SAAAC,GAAAlC,GAAAC,IAMhBwB,EAAArJ,EAAA,KAAAoJ,EAAA,CAAAE,KAAA,WAAAC,KAAA,6BAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAA3F,IAAA4F,GAAA,+BAAAA,EAAAC,IAAAD,GAAAA,EAASvH,2BAA0B0D,IAAA,CAAA6D,EAAArJ,KAAAqJ,EAA1BvH,2BAA0B9B,CAAA,GAAAuJ,SAAAC,GAAAhC,GAAAkC,IAxFrCX,EAAA,KAAAY,EAAA,CAAA3J,MAAAN,GAAAkK,GAAA,CAAAZ,KAAA,QAAAC,KAAAvJ,EAAAuJ,KAAAM,SAAAC,GAAA,KAAAK,kHACkBnK,EAAAoK,OAASC,EAAUC,GADxBvE,EAAA/F,EAAAmK,OAAY"}
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../../src/components/reusable/notification/notification.ts"],"sourcesContent":["import { unsafeSVG } from 'lit-html/directives/unsafe-svg.js';\nimport { LitElement, html, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport '../button';\nimport closeIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/close-simple.svg';\n\nimport NotificationScss from './notification.scss?inline';\nimport '../card';\nimport successIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/checkmark-filled.svg';\nimport warningIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/warning-filled.svg';\nimport errorIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/error-filled.svg';\nimport infoIcon from '@kyndryl-design-system/shidoka-icons/svg/monochrome/16/information-filled.svg';\n\nimport '../badge';\n/**\n * Notification component.\n * @slot unnamed - Slot for notification message body.\n * @slot actions - Slot for menu.\n * @slot icon - Slot for an icon.\n * @fires on-notification-click - Emit event for clickable notification.\n * @fires on-close - Emits when an inline/toast notification closes.\n */\n\n@customElement('kyn-notification')\nexport class Notification extends LitElement {\n static override styles = unsafeCSS(NotificationScss);\n\n /** Notification Title (Required). */\n @property({ type: String })\n accessor notificationTitle = '';\n\n /** Notification subtitle.(optional) */\n @property({ type: String })\n accessor notificationSubtitle = '';\n\n /**\n * Timestamp of notification.\n * It is recommended to add the context along with the timestamp. Example: `Updated 2 mins ago`.\n */\n @property({ type: String })\n accessor timeStamp = '';\n\n /** Card href link */\n @property({ type: String })\n accessor href = '';\n\n /** Notification status / tag type. `'default'`, `'info'`, `'warning'`, `'success'` & `'error'`. */\n @property({ type: String })\n accessor tagStatus = 'default'; // Need to change the name to badgeStatus, once old tags are removed.\n\n /** Notification type. `'normal'`, `'inline'`, `'toast'` and `'clickable'`. Clickable type can be use inside notification panel */\n @property({ type: String })\n accessor type = 'normal';\n\n /** Customizable text strings. */\n @property({ type: Object })\n accessor textStrings: any = {\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n error: 'Error',\n };\n\n /** Close button description (Required to support accessibility). */\n @property({ type: String })\n accessor closeBtnDescription = 'Close';\n\n /**\n * Assistive text for notification type.\n * Required for `'clickable'`, `'inline'` and `'toast'` notification types.\n * */\n @property({ type: String })\n accessor assistiveNotificationTypeText = '';\n\n /** Notification role (Required to support accessibility). */\n @property({ type: String })\n accessor notificationRole: 'alert' | 'log' | 'status' | undefined;\n\n /**\n * Status label (Required to support accessibility).\n * Assign the localized string value for the word **Status**.\n * */\n @property({ type: String })\n accessor statusLabel = 'Status';\n\n /** Set badgeColor based on provided tagStatus.\n * @internal\n */\n @state()\n accessor _badgeColor: any = {\n success: 'success',\n warning: 'warning',\n info: 'information',\n error: 'error',\n };\n\n /** Set notification mark read prop. Required ony for `type: 'clickable'`.*/\n @property({ type: Boolean, reflect: true })\n accessor unRead = false;\n\n /** Hide close (x) button. Useful only for `type='toast'`. This required `timeout > 0` otherwise toast remain as it is when `hideCloseButton` is set true. */\n @property({ type: Boolean })\n accessor hideCloseButton = false;\n\n /** Timeout (Default 8 seconds for Toast). Specify an optional duration the toast notification should be closed in. Only apply with `type = 'toast'` */\n @property({ type: Number })\n accessor timeout = 8;\n\n /** Track if slot has content to conditionally render description div\n * @internal\n */\n @state()\n accessor _hasDescriptionSlotContent = false;\n\n override render() {\n const cardBgClasses = {\n 'notification-normal': this.type === 'normal',\n 'notification-inline': this.type === 'inline',\n 'notification-toast': this.type === 'toast',\n 'notification-error':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'error',\n 'notification-success':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'success',\n 'notification-warning':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'warning',\n 'notification-info':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'info',\n 'notification-ai':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'ai',\n 'notification-default':\n (this.type === 'inline' || this.type === 'toast') &&\n this.tagStatus === 'default',\n 'notification-no-description': !this._hasDescriptionSlotContent,\n };\n\n return html`\n ${this.type === 'clickable'\n ? html`<kyn-card\n class=\"notification-clickable\"\n ?highlight=${this.unRead}\n type=${this.type}\n href=${this.href}\n target=\"_blank\"\n rel=\"noopener\"\n @on-card-click=${(e: any) => this._handleCardClick(e)}\n hideBorder\n role=${ifDefined(this.notificationRole)}\n >\n <span id=\"notificationType\"\n >${this.assistiveNotificationTypeText}</span\n >\n ${this.renderInnerUI()}\n </kyn-card>`\n : html` <kyn-card\n type=${this.type}\n role=${ifDefined(this.notificationRole)}\n class=\"${classMap(cardBgClasses)}\"\n >\n ${this.type === 'inline' || this.type === 'toast'\n ? html`<span id=\"notificationType\"\n >${this.assistiveNotificationTypeText}</span\n >`\n : null}\n ${this.renderInnerUI()}\n </kyn-card>`}\n `;\n }\n\n private renderInnerUI() {\n const notificationIcon: any = {\n success: successIcon,\n error: errorIcon,\n warning: warningIcon,\n info: infoIcon,\n ai: successIcon,\n default: successIcon,\n };\n\n return html`<div class=\"notification-wrapper\">\n <div class=\"notification-title-wrap\">\n <div class=\"notification-head\">\n ${this.type === 'inline' || this.type === 'toast'\n ? html` <span\n class=\"notification-state-icon ${this.tagStatus}\"\n role=\"img\"\n aria-label=${`${this.textStrings[this.tagStatus]} icon`}\n >\n <slot name=\"icon\">\n ${unsafeSVG(notificationIcon[this.tagStatus])}\n </slot>\n </span>`\n : null}\n\n <div class=\"notification-title\">${this.notificationTitle}</div>\n\n ${this.notificationSubtitle !== '' &&\n (this.type === 'normal' || this.type === 'clickable')\n ? html`\n <div class=\"notification-subtitle\">\n ${this.notificationSubtitle}\n </div>\n `\n : null}\n </div>\n\n <div>\n ${(this.type === 'toast' || this.type === 'inline') &&\n !this.hideCloseButton\n ? html` <kyn-button\n class=\"notification-toast-close-btn\"\n kind=\"ghost\"\n size=\"small\"\n description=${ifDefined(this.closeBtnDescription)}\n @on-click=\"${() => this._handleClose()}\"\n >\n <span\n slot=\"icon\"\n role=\"img\"\n aria-label=${ifDefined(this.closeBtnDescription)}\n >${unsafeSVG(closeIcon)}</span\n >\n </kyn-button>`\n : null}\n <!-- actions slot could be an overflow menu, close icon (for other notification types) etc. -->\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n ${this._hasDescriptionSlotContent\n ? html`<div class=\"notification-description\">\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>`\n : html`<slot\n @slotchange=\"${this._handleSlotChange}\"\n style=\"display: none;\"\n ></slot>`}\n\n <div class=\"notification-content-wrapper\">\n <div class=\"status-tag\">\n ${this.tagStatus !== 'default' &&\n (this.type === 'normal' || this.type === 'clickable')\n ? html`\n <span id=\"statusLabel\">${this.statusLabel}</span>\n <kyn-badge\n type=${'heavy'}\n ?hideIcon=${true}\n label=${this.textStrings[this.tagStatus]}\n status=${this._badgeColor[this.tagStatus]}\n ></kyn-badge>\n `\n : null}\n </div>\n <div class=\"timestamp-wrapper\">\n <div class=\"timestamp-text\">${this.timeStamp}</div>\n </div>\n </div>\n </div>`;\n }\n\n override updated(changedProperties: any) {\n // Close toast notification if timeout > 0\n if (\n this.type === 'toast' &&\n changedProperties.has('timeout') &&\n this.timeout > 0\n ) {\n setTimeout(() => {\n this._close();\n }, this.timeout * 1000);\n }\n }\n\n // Remove toast from DOM\n private _close() {\n const animation = this.animate([{ opacity: '1' }, { opacity: '0' }], {\n duration: 500,\n easing: 'ease-in-out',\n fill: 'forwards',\n });\n animation.onfinish = () => {\n this.parentNode?.removeChild(this);\n };\n\n // emit on-close event\n const event = new CustomEvent('on-close');\n this.dispatchEvent(event);\n }\n\n private _handleClose() {\n this._close();\n }\n\n private _handleCardClick(e: any) {\n const event = new CustomEvent('on-notification-click', {\n detail: e.detail.origEvent,\n });\n this.dispatchEvent(event);\n }\n\n private _handleSlotChange(e: Event) {\n this._checkSlotContent();\n }\n\n private _checkSlotContent() {\n const slot = this.shadowRoot?.querySelector(\n 'slot:not([name])'\n ) as HTMLSlotElement;\n if (!slot) {\n this._hasDescriptionSlotContent = false;\n return;\n }\n\n const assignedNodes = slot.assignedNodes();\n\n const hasContent = assignedNodes.some((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n return true;\n }\n if (node.nodeType === Node.TEXT_NODE) {\n const textContent = node.textContent;\n return (\n textContent !== null &&\n textContent !== undefined &&\n textContent.trim() !== ''\n );\n }\n return false;\n });\n\n this._hasDescriptionSlotContent = hasContent;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-notification': Notification;\n }\n}\n"],"names":["Notification","customElement","LitElement","_classThis","_classSuper","notificationTitle","__classPrivateFieldGet","this","_Notification_notificationTitle_accessor_storage","value","__classPrivateFieldSet","notificationSubtitle","_Notification_notificationSubtitle_accessor_storage","timeStamp","_Notification_timeStamp_accessor_storage","href","_Notification_href_accessor_storage","tagStatus","_Notification_tagStatus_accessor_storage","type","_Notification_type_accessor_storage","textStrings","_Notification_textStrings_accessor_storage","closeBtnDescription","_Notification_closeBtnDescription_accessor_storage","assistiveNotificationTypeText","_Notification_assistiveNotificationTypeText_accessor_storage","notificationRole","_Notification_notificationRole_accessor_storage","statusLabel","_Notification_statusLabel_accessor_storage","_badgeColor","_Notification__badgeColor_accessor_storage","unRead","_Notification_unRead_accessor_storage","hideCloseButton","_Notification_hideCloseButton_accessor_storage","timeout","_Notification_timeout_accessor_storage","_hasDescriptionSlotContent","_Notification__hasDescriptionSlotContent_accessor_storage","render","cardBgClasses","html","e","_handleCardClick","ifDefined","renderInnerUI","classMap","notificationIcon","success","successIcon","error","errorIcon","warning","warningIcon","info","infoIcon","ai","default","unsafeSVG","_handleClose","closeIcon","_handleSlotChange","updated","changedProperties","has","setTimeout","_close","animate","opacity","duration","easing","fill","onfinish","_a","parentNode","removeChild","event","CustomEvent","dispatchEvent","detail","origEvent","_checkSlotContent","slot","shadowRoot","querySelector","hasContent","assignedNodes","some","node","nodeType","Node","ELEMENT_NODE","TEXT_NODE","textContent","trim","set","__runInitializers","_notificationTitle_initializers","_notificationTitle_extraInitializers","_notificationSubtitle_initializers","_notificationSubtitle_extraInitializers","_timeStamp_initializers","_timeStamp_extraInitializers","_href_initializers","_href_extraInitializers","_tagStatus_initializers","_tagStatus_extraInitializers","_type_initializers","_type_extraInitializers","_textStrings_initializers","_textStrings_extraInitializers","_closeBtnDescription_initializers","_closeBtnDescription_extraInitializers","_assistiveNotificationTypeText_initializers","_assistiveNotificationTypeText_extraInitializers","_notificationRole_initializers","_notificationRole_extraInitializers","_statusLabel_initializers","_statusLabel_extraInitializers","__badgeColor_initializers","__badgeColor_extraInitializers","_unRead_initializers","_unRead_extraInitializers","_hideCloseButton_initializers","_hideCloseButton_extraInitializers","_timeout_initializers","_timeout_extraInitializers","__hasDescriptionSlotContent_initializers","_notificationTitle_decorators","property","String","_notificationSubtitle_decorators","_timeStamp_decorators","_href_decorators","_tagStatus_decorators","_type_decorators","_textStrings_decorators","Object","_closeBtnDescription_decorators","_assistiveNotificationTypeText_decorators","_notificationRole_decorators","_statusLabel_decorators","__badgeColor_decorators","state","Boolean","reflect","_hideCloseButton_decorators","_timeout_decorators","Number","__hasDescriptionSlotContent_decorators","__esDecorate","kind","name","static","private","access","obj","get","metadata","_metadata","_unRead_decorators","__hasDescriptionSlotContent_extraInitializers","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS","NotificationScss"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BaA,EAAY,sFADxBC,EAAc,8BACmBC,yMAARC,EAAA,cAAQC,GAKhC,qBAASC,GAAiB,OAAAC,EAAAC,KAAAC,EAAA,IAAA,CAA1B,qBAASH,CAAiBI,GAAAC,EAAAH,KAAAC,EAAAC,EAAA,IAAA,CAI1B,wBAASE,GAAoB,OAAAL,EAAAC,KAAAK,EAAA,IAAA,CAA7B,wBAASD,CAAoBF,GAAAC,EAAAH,KAAAK,EAAAH,EAAA,IAAA,CAO7B,aAASI,GAAS,OAAAP,EAAAC,KAAAO,EAAA,IAAA,CAAlB,aAASD,CAASJ,GAAAC,EAAAH,KAAAO,EAAAL,EAAA,IAAA,CAIlB,QAASM,GAAI,OAAAT,EAAAC,KAAAS,EAAA,IAAA,CAAb,QAASD,CAAIN,GAAAC,EAAAH,KAAAS,EAAAP,EAAA,IAAA,CAIb,aAASQ,GAAS,OAAAX,EAAAC,KAAA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SAAA,EAAAC,OAAA,CAAA3F,IAAA4F,GAAA,oBAAAA,EAAAC,IAAAD,GAAAA,EAAS3H,gBAAe8D,IAAA,CAAA6D,EAAArJ,KAAAqJ,EAAf3H,gBAAe1B,CAAA,GAAAuJ,SAAAC,GAAApC,GAAAC,IAIxB0B,EAAArJ,EAAA,KAAAkJ,EAAA,CAAAI,KAAA,WAAAC,KAAA,UAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAA3F,IAAA4F,GAAA,YAAAA,EAAAC,IAAAD,GAAAA,EAASzH,QAAO4D,IAAA,CAAA6D,EAAArJ,KAAAqJ,EAAPzH,QAAO5B,CAAA,GAAAuJ,SAAAC,GAAAlC,GAAAC,IAMhBwB,EAAArJ,EAAA,KAAAoJ,EAAA,CAAAE,KAAA,WAAAC,KAAA,6BAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAA3F,IAAA4F,GAAA,+BAAAA,EAAAC,IAAAD,GAAAA,EAASvH,2BAA0B0D,IAAA,CAAA6D,EAAArJ,KAAAqJ,EAA1BvH,2BAA0B9B,CAAA,GAAAuJ,SAAAC,GAAAhC,GAAAkC,IAxFrCX,EAAA,KAAAY,EAAA,CAAA3J,MAAAN,GAAAkK,GAAA,CAAAZ,KAAA,QAAAC,KAAAvJ,EAAAuJ,KAAAM,SAAAC,GAAA,KAAAK,kHACkBnK,EAAAoK,OAASC,EAAUC,GADxBvE,EAAA/F,EAAAmK,OAAY"}
|
|
@@ -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;
|
|
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;IAyCb,OAAO,CAAC,YAAY,EAAE,GAAG;IAalC;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,aAAa;IAarB,gBAAgB;IAChB,OAAO,CAAC,eAAe,CAGpB;IAEM,iBAAiB;IAMjB,oBAAoB;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
|
-
}
|
|
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,
|
|
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,EAAApB,IAAAC,MAAAC,EAAAD,KAAAoB,GAAAnB,EAAAD,KAAAqB,GAAuB,KAMvBC,EAAAvB,IAAAC,MAAAC,EAAAD,KAAAuB,GAAAtB,EAAAD,KAAAwB,EAAc,MAmJfxB,KAAAyB,iBAAexB,EAAAD,KAAA0B,GAAGC,GAAS,KACjC3B,KAAK4B,gBAAgB,KAnLvB,U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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,KAAAuB,GAAAtB,EAAAD,KAAAwB,EAAc,MAsJfxB,KAAAyB,iBAAexB,EAAAD,KAAA0B,GAAGC,GAAS,KACjC3B,KAAK4B,iBACL5B,KAAK6B,YAAY,KAvLnB,UAASC,GAAM,OAAAC,EAAA/B,KAAAF,EAAA,IAAA,CAAf,UAASgC,CAAME,GAAAC,EAAAjC,KAAAF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AASzE,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.
|
|
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.
|
|
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",
|