@things-factory/notification 7.0.1-rc.1 → 7.0.1-rc.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-badge.js","sourceRoot":"","sources":["../../client/viewparts/notification-badge.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"notification-badge.js","sourceRoot":"","sources":["../../client/viewparts/notification-badge.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAqC/D,MAAM;QACJ,OAAO,IAAI,CAAA,yCAAyC,CAAA;IACtD,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,CAAA;IAC5C,CAAC;;AA1CM,wBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,AAhCY,CAgCZ;AAEmE;IAAnE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDAAe;AAnCvE,iBAAiB;IAD7B,aAAa,CAAC,oBAAoB,CAAC;GACvB,iBAAiB,CA4C7B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { store } from '@operato/shell'\n\n@customElement('notification-badge')\nexport class NotificationBadge extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n font-size: 2em;\n position: relative;\n }\n\n md-icon {\n display: block;\n }\n\n :host::after {\n content: attr(data-badge);\n position: absolute;\n top: 0px;\n right: -6px;\n font-family: var(--theme-font);\n font-size: 0.3em;\n background: var(--md-sys-color-error, rgb(186 26 26));\n color: var(--md-sys-color-on-primary);\n width: 14px;\n height: 14px;\n text-align: center;\n line-height: 14px;\n border-radius: 50%;\n box-shadow: var(--box-shadow);\n }\n\n :host([data-badge='0'])::after {\n display: none;\n }\n `\n ]\n\n @property({ type: Number, attribute: 'data-badge', reflect: true }) badge?: number\n\n render() {\n return html` <md-icon>notifications_none</md-icon> `\n }\n\n stateChanged(state) {\n this.badge = state.notification.badge || 0\n }\n}\n"]}
|