@nyaruka/temba-components 0.71.3 → 0.71.4

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/CHANGELOG.md CHANGED
@@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.71.4](https://github.com/nyaruka/temba-components/compare/v0.71.3...v0.71.4)
8
+
9
+ - Bump ip from 1.1.8 to 1.1.9 [`#396`](https://github.com/nyaruka/temba-components/pull/396)
10
+ - Add support for WhatsApp templates not syncing notfications [`#398`](https://github.com/nyaruka/temba-components/pull/398)
11
+ - Add support for WhatsApp templates failed syncing notifications [`2db805f`](https://github.com/nyaruka/temba-components/commit/2db805f5598eb381169eeeb0419a6733502e9984)
12
+
7
13
  #### [v0.71.3](https://github.com/nyaruka/temba-components/compare/v0.71.2...v0.71.3)
8
14
 
15
+ > 15 February 2024
16
+
9
17
  - Make branding email setting icon match other email icon [`9c3f3bf`](https://github.com/nyaruka/temba-components/commit/9c3f3bf346bdcc8f0aae94cbb0b5cb8adc616b88)
10
18
 
11
19
  #### [v0.71.2](https://github.com/nyaruka/temba-components/compare/v0.71.1...v0.71.2)
@@ -7331,7 +7331,7 @@ background: #ccc;
7331
7331
  .title {
7332
7332
  font-weight: normal;
7333
7333
  }
7334
- `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=pt.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=pt.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=pt.channel,i="Your android channel is not connected"):"webhooks:unhealthy"===t.incident.type&&(e=pt.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=pt.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=pt.contact_export,i="Exported contacts"):"message"===t.export.type?(e=pt.message_export,i="Exported messages"):"results"===t.export.type?(e=pt.results_export,i="Exported flow results"):"ticket"===t.export.type&&(e=pt.tickets_export,i="Exported tickets"):"tickets:activity"===t.type?(e=pt.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=pt.tickets,i="New unassigned ticket"),D`<div
7334
+ `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=pt.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=pt.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=pt.channel,i="Your android channel is not connected"):"channel:templates_failed"===t.incident.type?(e=pt.channel,i="Your WhatsApp channel templates failed syncing"):"webhooks:unhealthy"===t.incident.type&&(e=pt.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=pt.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=pt.contact_export,i="Exported contacts"):"message"===t.export.type?(e=pt.message_export,i="Exported messages"):"results"===t.export.type?(e=pt.results_export,i="Exported flow results"):"ticket"===t.export.type&&(e=pt.tickets_export,i="Exported tickets"):"tickets:activity"===t.type?(e=pt.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=pt.tickets,i="New unassigned ticket"),D`<div
7335
7335
  style="color:${"#333"};display:flex;align-items:flex-start;flex-direction:row;font-weight:${t.is_seen?300:400}"
7336
7336
  >
7337
7337
  ${e?D`<div style="margin-right:0.6em">
package/dist/index.js CHANGED
@@ -7331,7 +7331,7 @@ background: #ccc;
7331
7331
  .title {
7332
7332
  font-weight: normal;
7333
7333
  }
7334
- `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=pt.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=pt.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=pt.channel,i="Your android channel is not connected"):"webhooks:unhealthy"===t.incident.type&&(e=pt.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=pt.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=pt.contact_export,i="Exported contacts"):"message"===t.export.type?(e=pt.message_export,i="Exported messages"):"results"===t.export.type?(e=pt.results_export,i="Exported flow results"):"ticket"===t.export.type&&(e=pt.tickets_export,i="Exported tickets"):"tickets:activity"===t.type?(e=pt.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=pt.tickets,i="New unassigned ticket"),D`<div
7334
+ `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=pt.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=pt.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=pt.channel,i="Your android channel is not connected"):"channel:templates_failed"===t.incident.type?(e=pt.channel,i="Your WhatsApp channel templates failed syncing"):"webhooks:unhealthy"===t.incident.type&&(e=pt.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=pt.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=pt.contact_export,i="Exported contacts"):"message"===t.export.type?(e=pt.message_export,i="Exported messages"):"results"===t.export.type?(e=pt.results_export,i="Exported flow results"):"ticket"===t.export.type&&(e=pt.tickets_export,i="Exported tickets"):"tickets:activity"===t.type?(e=pt.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=pt.tickets,i="New unassigned ticket"),D`<div
7335
7335
  style="color:${"#333"};display:flex;align-items:flex-start;flex-direction:row;font-weight:${t.is_seen?300:400}"
7336
7336
  >
7337
7337
  ${e?D`<div style="margin-right:0.6em">
package/dist/sw.js CHANGED
@@ -1,2 +1,2 @@
1
- if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let r={};const d=e=>o(e,i),c={module:{uri:i},exports:r,require:d};t[i]=Promise.all(n.map((e=>c[e]||d(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"6e5895dd.js",revision:"cecc764c185fdfb02130aa8d19f51513"},{url:"templates/components-body.html",revision:"2de92606f375513a3ceacdf1c18ead38"},{url:"templates/components-head.html",revision:"c1827a9130d0dae82c21d538d4631baa"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
1
+ if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let d={};const r=e=>o(e,i),l={module:{uri:i},exports:d,require:r};t[i]=Promise.all(n.map((e=>l[e]||r(e)))).then((e=>(s(...e),d)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"beb1070a.js",revision:"04733da10b41bd06730d7f73a95244e2"},{url:"templates/components-body.html",revision:"fa74954651ad78ded4bc7dda15f2285d"},{url:"templates/components-head.html",revision:"8a3f66a75c9d1e6b17d628e3be15d585"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
2
2
  //# sourceMappingURL=sw.js.map
package/dist/sw.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sw.js","sources":["../../tmp/564cf97c15304812a118d8b6ff452ea1/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/workspaces/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/workspaces/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/workspaces/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/workspaces/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/workspaces/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/workspaces/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"6e5895dd.js\",\n \"revision\": \"cecc764c185fdfb02130aa8d19f51513\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"2de92606f375513a3ceacdf1c18ead38\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"c1827a9130d0dae82c21d538d4631baa\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
1
+ {"version":3,"file":"sw.js","sources":["../../tmp/9c177397215916d845431561202e7cd5/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/workspaces/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/workspaces/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/workspaces/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/workspaces/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/workspaces/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/workspaces/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"beb1070a.js\",\n \"revision\": \"04733da10b41bd06730d7f73a95244e2\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"fa74954651ad78ded4bc7dda15f2285d\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"8a3f66a75c9d1e6b17d628e3be15d585\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
@@ -1 +1 @@
1
- <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/6e5895dd.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.71.3"</script>
1
+ <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/beb1070a.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.71.4"</script>
@@ -1 +1 @@
1
- <script src="{{STATIC_URL}}croppie/croppie.js"></script><link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/6e5895dd.js" crossorigin="anonymous">
1
+ <script src="{{STATIC_URL}}croppie/croppie.js"></script><link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/beb1070a.js" crossorigin="anonymous">
@@ -55,6 +55,10 @@ export class NotificationList extends TembaList {
55
55
  icon = Icon.channel;
56
56
  body = 'Your android channel is not connected';
57
57
  }
58
+ else if (notification.incident.type === 'channel:templates_failed') {
59
+ icon = Icon.channel;
60
+ body = 'Your WhatsApp channel templates failed syncing';
61
+ }
58
62
  else if (notification.incident.type === 'webhooks:unhealthy') {
59
63
  icon = Icon.webhook;
60
64
  body = 'Your webhook calls are not working properly.';
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/list/NotificationList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAqBrC,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAG7C,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BT,CAAC;IACJ,CAAC;IAED;QACE,KAAK,EAAE,CAAC;QAjCV,mBAAc,GAAG,KAAK,CAAC;QACvB,0BAAqB,GAAG,IAAI,CAAC;QAiC3B,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC;QAC7B,IAAI,CAAC,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,CAAC,GAAG,EAAE;YACrB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAY,CAAC;YAC1E,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;CACF","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { TembaList } from './TembaList';\nimport { StyleInfo } from 'lit-html/directives/style-map.js';\nimport { Options } from '../options/Options';\nimport { Icon } from '../vectoricon';\n\ninterface Notification {\n created_on: string;\n type: string;\n target_url: string;\n is_seen: boolean;\n export?: {\n type: string;\n };\n import?: {\n type: string;\n num_records: number;\n };\n incident?: {\n type: string;\n started_on: string;\n ended_on?: string;\n };\n}\n\nexport class NotificationList extends TembaList {\n reverseRefresh = false;\n internalFocusDisabled = true;\n static get styles() {\n return css`\n :host {\n --option-hover-bg: #f9f9f9;\n }\n\n .header {\n padding: 0.25em 1em;\n background: #f9f9f9;\n border-top-left-radius: var(--curvature);\n border-top-right-radius: var(--curvature);\n display: flex;\n color: #999;\n border-bottom: 1px solid #f3f3f3;\n }\n\n .header temba-icon {\n margin-right: 0.35em;\n }\n\n .footer {\n background: #f9f9f9;\n }\n\n .title {\n font-weight: normal;\n }\n `;\n }\n\n constructor() {\n super();\n this.valueKey = 'target_url';\n this.renderOption = (notification: Notification): TemplateResult => {\n let icon = null;\n let body = null;\n const color = '#333';\n\n if (notification.type === 'incident:started') {\n if (notification.incident.type === 'org:flagged') {\n icon = Icon.incidents;\n body =\n 'Your workspace was flagged, please contact support for assistance.';\n } else if (notification.incident.type === 'org:suspended') {\n icon = Icon.incidents;\n body =\n 'Your workspace was suspended, please contact support for assistance.';\n } else if (notification.incident.type === 'channel:disconnected') {\n icon = Icon.channel;\n body = 'Your android channel is not connected';\n } else if (notification.incident.type === 'webhooks:unhealthy') {\n icon = Icon.webhook;\n body = 'Your webhook calls are not working properly.';\n }\n } else if (notification.type === 'import:finished') {\n if (notification.import.type === 'contact') {\n icon = Icon.contact_import;\n body = `Imported ${notification.import.num_records.toLocaleString()} contacts`;\n }\n } else if (notification.type === 'export:finished') {\n if (notification.export.type === 'contact') {\n icon = Icon.contact_export;\n body = 'Exported contacts';\n } else if (notification.export.type === 'message') {\n icon = Icon.message_export;\n body = 'Exported messages';\n } else if (notification.export.type === 'results') {\n icon = Icon.results_export;\n body = 'Exported flow results';\n } else if (notification.export.type === 'ticket') {\n icon = Icon.tickets_export;\n body = 'Exported tickets';\n }\n } else if (notification.type === 'tickets:activity') {\n icon = Icon.tickets;\n body = 'New ticket activity';\n } else if (notification.type === 'tickets:opened') {\n icon = Icon.tickets;\n body = 'New unassigned ticket';\n }\n return html`<div\n style=\"color:${color};display:flex;align-items:flex-start;flex-direction:row;font-weight:${notification.is_seen\n ? 300\n : 400}\"\n >\n ${icon\n ? html`<div style=\"margin-right:0.6em\">\n <temba-icon name=\"${icon}\"></temba-icon>\n </div>`\n : null}\n <div style=\"display:flex;flex-direction:column\">\n <div style=\"line-height:1.1em\">${body}</div>\n <temba-date\n style=\"font-size:80%\"\n value=${notification.created_on}\n display=\"duration\"\n ></temba-date>\n </div>\n </div>`;\n };\n }\n\n public renderHeader(): TemplateResult {\n return html`<div class=\"header\">\n <temba-icon name=\"notification\"></temba-icon>\n <div class=\"title\">Notifications</div>\n </div>`;\n }\n\n protected handleSelection(event: CustomEvent) {\n super.handleSelected(event);\n }\n\n public scrollToTop(): void {\n // scroll back to the top\n window.setTimeout(() => {\n const options = this.shadowRoot.querySelector('temba-options') as Options;\n options.scrollToTop();\n }, 1000);\n }\n}\n"]}
1
+ {"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/list/NotificationList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAqBrC,MA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,CAAC,OAAO;gBAC7G,CAAC,CAAC,GAAG;gBACL,CAAC,CAAC,GAAG;;UAEL,IAAI;gBACJ,CAAC,CAAC,IAAI,CAAA;kCACkB,IAAI;mBACnB;gBACT,CAAC,CAAC,IAAI;;2CAE2B,IAAI;;;oBAG3B,YAAY,CAAC,UAAU;;;;aAI9B,CAAC;QACV,CAAC,CAAC;IACJ,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAA;;;WAGJ,CAAC;IACV,CAAC;IAES,eAAe,CAAC,KAAkB;QAC1C,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEM,WAAW;QAChB,yBAAyB;QACzB,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACrB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAY,CAAC;YAC1E,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;CACF","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { TembaList } from './TembaList';\nimport { StyleInfo } from 'lit-html/directives/style-map.js';\nimport { Options } from '../options/Options';\nimport { Icon } from '../vectoricon';\n\ninterface Notification {\n created_on: string;\n type: string;\n target_url: string;\n is_seen: boolean;\n export?: {\n type: string;\n };\n import?: {\n type: string;\n num_records: number;\n };\n incident?: {\n type: string;\n started_on: string;\n ended_on?: string;\n };\n}\n\nexport class NotificationList extends TembaList {\n reverseRefresh = false;\n internalFocusDisabled = true;\n static get styles() {\n return css`\n :host {\n --option-hover-bg: #f9f9f9;\n }\n\n .header {\n padding: 0.25em 1em;\n background: #f9f9f9;\n border-top-left-radius: var(--curvature);\n border-top-right-radius: var(--curvature);\n display: flex;\n color: #999;\n border-bottom: 1px solid #f3f3f3;\n }\n\n .header temba-icon {\n margin-right: 0.35em;\n }\n\n .footer {\n background: #f9f9f9;\n }\n\n .title {\n font-weight: normal;\n }\n `;\n }\n\n constructor() {\n super();\n this.valueKey = 'target_url';\n this.renderOption = (notification: Notification): TemplateResult => {\n let icon = null;\n let body = null;\n const color = '#333';\n\n if (notification.type === 'incident:started') {\n if (notification.incident.type === 'org:flagged') {\n icon = Icon.incidents;\n body =\n 'Your workspace was flagged, please contact support for assistance.';\n } else if (notification.incident.type === 'org:suspended') {\n icon = Icon.incidents;\n body =\n 'Your workspace was suspended, please contact support for assistance.';\n } else if (notification.incident.type === 'channel:disconnected') {\n icon = Icon.channel;\n body = 'Your android channel is not connected';\n } else if (notification.incident.type === 'channel:templates_failed') {\n icon = Icon.channel;\n body = 'Your WhatsApp channel templates failed syncing';\n } else if (notification.incident.type === 'webhooks:unhealthy') {\n icon = Icon.webhook;\n body = 'Your webhook calls are not working properly.';\n }\n } else if (notification.type === 'import:finished') {\n if (notification.import.type === 'contact') {\n icon = Icon.contact_import;\n body = `Imported ${notification.import.num_records.toLocaleString()} contacts`;\n }\n } else if (notification.type === 'export:finished') {\n if (notification.export.type === 'contact') {\n icon = Icon.contact_export;\n body = 'Exported contacts';\n } else if (notification.export.type === 'message') {\n icon = Icon.message_export;\n body = 'Exported messages';\n } else if (notification.export.type === 'results') {\n icon = Icon.results_export;\n body = 'Exported flow results';\n } else if (notification.export.type === 'ticket') {\n icon = Icon.tickets_export;\n body = 'Exported tickets';\n }\n } else if (notification.type === 'tickets:activity') {\n icon = Icon.tickets;\n body = 'New ticket activity';\n } else if (notification.type === 'tickets:opened') {\n icon = Icon.tickets;\n body = 'New unassigned ticket';\n }\n return html`<div\n style=\"color:${color};display:flex;align-items:flex-start;flex-direction:row;font-weight:${notification.is_seen\n ? 300\n : 400}\"\n >\n ${icon\n ? html`<div style=\"margin-right:0.6em\">\n <temba-icon name=\"${icon}\"></temba-icon>\n </div>`\n : null}\n <div style=\"display:flex;flex-direction:column\">\n <div style=\"line-height:1.1em\">${body}</div>\n <temba-date\n style=\"font-size:80%\"\n value=${notification.created_on}\n display=\"duration\"\n ></temba-date>\n </div>\n </div>`;\n };\n }\n\n public renderHeader(): TemplateResult {\n return html`<div class=\"header\">\n <temba-icon name=\"notification\"></temba-icon>\n <div class=\"title\">Notifications</div>\n </div>`;\n }\n\n protected handleSelection(event: CustomEvent) {\n super.handleSelected(event);\n }\n\n public scrollToTop(): void {\n // scroll back to the top\n window.setTimeout(() => {\n const options = this.shadowRoot.querySelector('temba-options') as Options;\n options.scrollToTop();\n }, 1000);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyaruka/temba-components",
3
- "version": "0.71.3",
3
+ "version": "0.71.4",
4
4
  "description": "Web components to support rapidpro and related projects",
5
5
  "author": "Nyaruka <code@nyaruka.coim>",
6
6
  "main": "dist/index.js",
@@ -76,6 +76,9 @@ export class NotificationList extends TembaList {
76
76
  } else if (notification.incident.type === 'channel:disconnected') {
77
77
  icon = Icon.channel;
78
78
  body = 'Your android channel is not connected';
79
+ } else if (notification.incident.type === 'channel:templates_failed') {
80
+ icon = Icon.channel;
81
+ body = 'Your WhatsApp channel templates failed syncing';
79
82
  } else if (notification.incident.type === 'webhooks:unhealthy') {
80
83
  icon = Icon.webhook;
81
84
  body = 'Your webhook calls are not working properly.';