@nyaruka/temba-components 0.67.0 → 0.67.2

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/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 l=e=>o(e,i),d={module:{uri:i},exports:r,require:l};t[i]=Promise.all(n.map((e=>d[e]||l(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"cec7ed95.js",revision:"da3043aac333d5b9118d4ece1d80d119"},{url:"templates/components-body.html",revision:"658035512be60cd71976be77ae154f50"},{url:"templates/components-head.html",revision:"1aa73feb3f40f7f93ee50716b8ff1414"}],{}),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 r={};const l=e=>o(e,i),c={module:{uri:i},exports:r,require:l};t[i]=Promise.all(n.map((e=>c[e]||l(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"b9e21fb2.js",revision:"57e15c10295d1cc34bfed37cc926b7d6"},{url:"templates/components-body.html",revision:"07315b19a915006f3622d7cfd4b7131a"},{url:"templates/components-head.html",revision:"84fa2b5244fa3f10ef0908ddd78ebce5"}],{}),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/32946406374de46e489c6caf4cbaf53c/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\": \"cec7ed95.js\",\n \"revision\": \"da3043aac333d5b9118d4ece1d80d119\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"658035512be60cd71976be77ae154f50\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"1aa73feb3f40f7f93ee50716b8ff1414\"\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/b9d8d5601b5bfe079e9a14fb4b5c8930/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\": \"b9e21fb2.js\",\n \"revision\": \"57e15c10295d1cc34bfed37cc926b7d6\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"07315b19a915006f3622d7cfd4b7131a\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"84fa2b5244fa3f10ef0908ddd78ebce5\"\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/cec7ed95.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.67.0"</script>
1
+ <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/b9e21fb2.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.67.2"</script>
@@ -1 +1 @@
1
- <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/cec7ed95.js" crossorigin="anonymous">
1
+ <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/b9e21fb2.js" crossorigin="anonymous">
@@ -177,6 +177,7 @@ export class Completion extends FormElement {
177
177
  left: `${this.anchorPosition.left}px`,
178
178
  }
179
179
  : {};
180
+ const visible = this.options && this.options.length > 0;
180
181
  return html `
181
182
  <temba-field
182
183
  name=${this.name}
@@ -209,7 +210,7 @@ export class Completion extends FormElement {
209
210
  .renderOption=${renderCompletionOption}
210
211
  .anchorTo=${this.anchorElement}
211
212
  .options=${this.options}
212
- ?visible=${this.options && this.options.length > 0}
213
+ ?visible=${visible}
213
214
  >
214
215
  ${this.currentFunction
215
216
  ? html `
@@ -218,7 +219,9 @@ export class Completion extends FormElement {
218
219
  </div>
219
220
  `
220
221
  : null}
221
- <div class="footer">${msg('Tab to complete, enter to select')}</div>
222
+ <div class="footer" style="${!visible ? 'display:none' : null}">
223
+ ${msg('Tab to complete, enter to select')}
224
+ </div>
222
225
  </temba-options>
223
226
  </div>
224
227
  </temba-field>
@@ -1 +1 @@
1
- {"version":3,"file":"Completion.js","sourceRoot":"","sources":["../../../src/completion/Completion.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO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f;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACX","sourcesContent":["import { TemplateResult, css, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { TextInput } from '../textinput/TextInput';\nimport {\n renderCompletionOption,\n updateInputElementWithCompletion,\n executeCompletionQuery,\n} from './helpers';\n\nimport { FormElement } from '../FormElement';\nimport { CompletionOption, Position } from '../interfaces';\nimport { Store } from '../store/Store';\nimport { styleMap } from 'lit-html/directives/style-map.js';\nimport { msg } from '@lit/localize';\n\n/**\n * Completion is a text input that handles excellent completion options in a popup\n */\nexport class Completion extends FormElement {\n static get styles() {\n return css`\n :host {\n display: block;\n }\n\n temba-options {\n --widget-box-shadow-focused: 0 0 4px rgba(0, 0, 0, 0.15);\n --color-focus: #e6e6e6;\n }\n\n .comp-container {\n position: relative;\n height: 100%;\n }\n\n #anchor {\n /* background: rgba(132, 40, 158, .1); */\n position: absolute;\n visibility: hidden;\n width: 250px;\n height: 20px;\n }\n\n .fn-marker {\n font-weight: bold;\n font-size: 42px;\n }\n\n .option-slot {\n background: #fff;\n }\n\n .current-fn {\n padding: 10px;\n margin: 5px;\n background: var(--color-primary-light);\n color: rgba(0, 0, 0, 0.5);\n border-radius: var(--curvature-widget);\n font-size: 90%;\n }\n\n .footer {\n padding: 5px 10px;\n background: var(--color-primary-light);\n color: rgba(0, 0, 0, 0.5);\n font-size: 80%;\n border-bottom-left-radius: var(--curvature-widget);\n border-bottom-right-radius: var(--curvature-widget);\n }\n\n code {\n background: rgba(0, 0, 0, 0.1);\n padding: 1px 5px;\n border-radius: var(--curvature);\n }\n `;\n }\n\n @property({ type: Number })\n maxLength: number;\n\n @property({ type: Boolean })\n session: boolean;\n\n @property({ type: Boolean })\n submitOnEnter = false;\n\n @property({ type: Object })\n anchorPosition: Position = { left: 0, top: 0 };\n\n @property({ attribute: false })\n currentFunction: CompletionOption;\n\n @property({ type: String })\n placeholder = '';\n\n @property({ attribute: false })\n textInputElement: TextInput;\n\n @property({ attribute: false })\n anchorElement: HTMLDivElement;\n\n @property({ type: Array })\n options: any[] = [];\n\n @property({ type: String })\n name = '';\n\n @property({ type: String })\n value = '';\n\n @property({ type: Boolean })\n textarea: boolean;\n\n @property({ type: Boolean })\n gsm: boolean;\n\n @property({ type: String })\n counter: string;\n\n @property({ type: Boolean })\n autogrow = false;\n\n private hiddenElement: HTMLInputElement;\n private query: string;\n\n public firstUpdated() {\n this.textInputElement = this.shadowRoot.querySelector(\n 'temba-textinput'\n ) as TextInput;\n this.anchorElement = this.shadowRoot.querySelector('#anchor');\n\n // create our hidden container so it gets included in our host element's form\n this.hiddenElement = document.createElement('input');\n this.hiddenElement.setAttribute('type', 'hidden');\n this.hiddenElement.setAttribute('name', this.getAttribute('name'));\n this.hiddenElement.setAttribute('value', this.getAttribute('value') || '');\n this.appendChild(this.hiddenElement);\n }\n\n private handleKeyUp(evt: KeyboardEvent) {\n // if we have options, ignore keys that are meant for them\n if (this.options && this.options.length > 0) {\n if (evt.key === 'ArrowUp' || evt.key === 'ArrowDown') {\n return;\n }\n\n if (evt.ctrlKey) {\n if (evt.key === 'n' || evt.key === 'p') {\n return;\n }\n }\n\n if (\n evt.key === 'Enter' ||\n evt.key === 'Escape' ||\n evt.key === 'Tab' ||\n evt.key.startsWith('Control')\n ) {\n evt.stopPropagation();\n evt.preventDefault();\n return;\n }\n\n this.executeQuery(evt.currentTarget as TextInput);\n }\n }\n\n public hasVisibleOptions() {\n return this.options.length > 0;\n }\n\n private executeQuery(ele: TextInput) {\n const store: Store = document.querySelector('temba-store');\n if (!ele.inputElement) {\n return;\n }\n const result = executeCompletionQuery(\n ele.inputElement,\n store,\n this.session\n );\n\n this.query = result.query;\n this.options = result.options;\n this.anchorPosition = result.anchorPosition;\n }\n\n private handleClick(evt: MouseEvent) {\n this.executeQuery(evt.currentTarget as TextInput);\n }\n\n public updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n // if our cursor changed, lets make sure our scrollbox is showing it\n if (changedProperties.has('value')) {\n this.hiddenElement.setAttribute('value', this.value);\n }\n }\n\n private handleInput(evt: KeyboardEvent) {\n const ele = evt.currentTarget as TextInput;\n this.executeQuery(ele);\n this.value = ele.inputElement.value;\n this.fireEvent('change');\n }\n\n private handleOptionCanceled() {\n // delay in case we are actively selecting\n window.setTimeout(() => {\n this.options = [];\n this.query = '';\n }, 100);\n }\n\n private handleOptionSelection(evt: CustomEvent) {\n const option = evt.detail.selected as CompletionOption;\n const tabbed = evt.detail.tabbed;\n\n updateInputElementWithCompletion(\n this.query,\n this.textInputElement.inputElement,\n option\n );\n this.query = '';\n this.options = [];\n\n if (tabbed) {\n this.executeQuery(this.textInputElement);\n }\n }\n\n public click() {\n super.click();\n const input = this.shadowRoot.querySelector('temba-textinput') as TextInput;\n if (input) {\n input.click();\n }\n }\n\n public focus() {\n super.focus();\n const input = this.shadowRoot.querySelector('temba-textinput') as TextInput;\n if (input) {\n input.focus();\n }\n }\n\n public render(): TemplateResult {\n const anchorStyles = this.anchorPosition\n ? {\n top: `${this.anchorPosition.top}px`,\n left: `${this.anchorPosition.left}px`,\n }\n : {};\n\n return html`\n <temba-field\n name=${this.name}\n .label=${this.label}\n .helpText=${this.helpText}\n .errors=${this.errors}\n .widgetOnly=${this.widgetOnly}\n >\n <div class=\"comp-container\">\n <div id=\"anchor\" style=${styleMap(anchorStyles)}></div>\n <temba-textinput\n name=${this.name}\n placeholder=${this.placeholder}\n gsm=${this.gsm}\n counter=${ifDefined(this.counter)}\n @keyup=${this.handleKeyUp}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleOptionCanceled}\n maxlength=\"${ifDefined(this.maxLength)}\"\n .value=${this.value}\n ?autogrow=${this.autogrow}\n ?textarea=${this.textarea}\n ?submitOnEnter=${this.submitOnEnter}\n >\n </temba-textinput>\n <temba-options\n @temba-selection=${this.handleOptionSelection}\n @temba-canceled=${this.handleOptionCanceled}\n .renderOption=${renderCompletionOption}\n .anchorTo=${this.anchorElement}\n .options=${this.options}\n ?visible=${this.options && this.options.length > 0}\n >\n ${this.currentFunction\n ? html`\n <div class=\"current-fn\">\n ${renderCompletionOption(this.currentFunction, true)}\n </div>\n `\n : null}\n <div class=\"footer\">${msg('Tab to complete, enter to select')}</div>\n </temba-options>\n </div>\n </temba-field>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Completion.js","sourceRoot":"","sources":["../../../src/completion/Completion.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IAA3C;;QAmEE,kBAAa,GAAG,KAAK,CAAC;QAGtB,mBAAc,GAAa,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;QAM/C,gBAAW,GAAG,EAAE,CAAC;QASjB,YAAO,GAAU,EAAE,CAAC;QAGpB,SAAI,GAAG,EAAE,CAAC;QAGV,UAAK,GAAG,EAAE,CAAC;QAYX,aAAQ,GAAG,KAAK,CAAC;IA2LnB,CAAC;IAjSC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACX;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACN;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACoB;AAG/C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDACG;AAGlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACV;AAGjB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;oDACH;AAG5B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDACD;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;2CACN;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACf;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACX","sourcesContent":["import { TemplateResult, css, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { TextInput } from '../textinput/TextInput';\nimport {\n renderCompletionOption,\n updateInputElementWithCompletion,\n executeCompletionQuery,\n} from './helpers';\n\nimport { FormElement } from '../FormElement';\nimport { CompletionOption, Position } from '../interfaces';\nimport { Store } from '../store/Store';\nimport { styleMap } from 'lit-html/directives/style-map.js';\nimport { msg } from '@lit/localize';\n\n/**\n * Completion is a text input that handles excellent completion options in a popup\n */\nexport class Completion extends FormElement {\n static get styles() {\n return css`\n :host {\n display: block;\n }\n\n temba-options {\n --widget-box-shadow-focused: 0 0 4px rgba(0, 0, 0, 0.15);\n --color-focus: #e6e6e6;\n }\n\n .comp-container {\n position: relative;\n height: 100%;\n }\n\n #anchor {\n /* background: rgba(132, 40, 158, .1); */\n position: absolute;\n visibility: hidden;\n width: 250px;\n height: 20px;\n }\n\n .fn-marker {\n font-weight: bold;\n font-size: 42px;\n }\n\n .option-slot {\n background: #fff;\n }\n\n .current-fn {\n padding: 10px;\n margin: 5px;\n background: var(--color-primary-light);\n color: rgba(0, 0, 0, 0.5);\n border-radius: var(--curvature-widget);\n font-size: 90%;\n }\n\n .footer {\n padding: 5px 10px;\n background: var(--color-primary-light);\n color: rgba(0, 0, 0, 0.5);\n font-size: 80%;\n border-bottom-left-radius: var(--curvature-widget);\n border-bottom-right-radius: var(--curvature-widget);\n }\n\n code {\n background: rgba(0, 0, 0, 0.1);\n padding: 1px 5px;\n border-radius: var(--curvature);\n }\n `;\n }\n\n @property({ type: Number })\n maxLength: number;\n\n @property({ type: Boolean })\n session: boolean;\n\n @property({ type: Boolean })\n submitOnEnter = false;\n\n @property({ type: Object })\n anchorPosition: Position = { left: 0, top: 0 };\n\n @property({ attribute: false })\n currentFunction: CompletionOption;\n\n @property({ type: String })\n placeholder = '';\n\n @property({ attribute: false })\n textInputElement: TextInput;\n\n @property({ attribute: false })\n anchorElement: HTMLDivElement;\n\n @property({ type: Array })\n options: any[] = [];\n\n @property({ type: String })\n name = '';\n\n @property({ type: String })\n value = '';\n\n @property({ type: Boolean })\n textarea: boolean;\n\n @property({ type: Boolean })\n gsm: boolean;\n\n @property({ type: String })\n counter: string;\n\n @property({ type: Boolean })\n autogrow = false;\n\n private hiddenElement: HTMLInputElement;\n private query: string;\n\n public firstUpdated() {\n this.textInputElement = this.shadowRoot.querySelector(\n 'temba-textinput'\n ) as TextInput;\n this.anchorElement = this.shadowRoot.querySelector('#anchor');\n\n // create our hidden container so it gets included in our host element's form\n this.hiddenElement = document.createElement('input');\n this.hiddenElement.setAttribute('type', 'hidden');\n this.hiddenElement.setAttribute('name', this.getAttribute('name'));\n this.hiddenElement.setAttribute('value', this.getAttribute('value') || '');\n this.appendChild(this.hiddenElement);\n }\n\n private handleKeyUp(evt: KeyboardEvent) {\n // if we have options, ignore keys that are meant for them\n if (this.options && this.options.length > 0) {\n if (evt.key === 'ArrowUp' || evt.key === 'ArrowDown') {\n return;\n }\n\n if (evt.ctrlKey) {\n if (evt.key === 'n' || evt.key === 'p') {\n return;\n }\n }\n\n if (\n evt.key === 'Enter' ||\n evt.key === 'Escape' ||\n evt.key === 'Tab' ||\n evt.key.startsWith('Control')\n ) {\n evt.stopPropagation();\n evt.preventDefault();\n return;\n }\n\n this.executeQuery(evt.currentTarget as TextInput);\n }\n }\n\n public hasVisibleOptions() {\n return this.options.length > 0;\n }\n\n private executeQuery(ele: TextInput) {\n const store: Store = document.querySelector('temba-store');\n if (!ele.inputElement) {\n return;\n }\n const result = executeCompletionQuery(\n ele.inputElement,\n store,\n this.session\n );\n\n this.query = result.query;\n this.options = result.options;\n this.anchorPosition = result.anchorPosition;\n }\n\n private handleClick(evt: MouseEvent) {\n this.executeQuery(evt.currentTarget as TextInput);\n }\n\n public updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n // if our cursor changed, lets make sure our scrollbox is showing it\n if (changedProperties.has('value')) {\n this.hiddenElement.setAttribute('value', this.value);\n }\n }\n\n private handleInput(evt: KeyboardEvent) {\n const ele = evt.currentTarget as TextInput;\n this.executeQuery(ele);\n this.value = ele.inputElement.value;\n this.fireEvent('change');\n }\n\n private handleOptionCanceled() {\n // delay in case we are actively selecting\n window.setTimeout(() => {\n this.options = [];\n this.query = '';\n }, 100);\n }\n\n private handleOptionSelection(evt: CustomEvent) {\n const option = evt.detail.selected as CompletionOption;\n const tabbed = evt.detail.tabbed;\n\n updateInputElementWithCompletion(\n this.query,\n this.textInputElement.inputElement,\n option\n );\n this.query = '';\n this.options = [];\n\n if (tabbed) {\n this.executeQuery(this.textInputElement);\n }\n }\n\n public click() {\n super.click();\n const input = this.shadowRoot.querySelector('temba-textinput') as TextInput;\n if (input) {\n input.click();\n }\n }\n\n public focus() {\n super.focus();\n const input = this.shadowRoot.querySelector('temba-textinput') as TextInput;\n if (input) {\n input.focus();\n }\n }\n\n public render(): TemplateResult {\n const anchorStyles = this.anchorPosition\n ? {\n top: `${this.anchorPosition.top}px`,\n left: `${this.anchorPosition.left}px`,\n }\n : {};\n\n const visible = this.options && this.options.length > 0;\n\n return html`\n <temba-field\n name=${this.name}\n .label=${this.label}\n .helpText=${this.helpText}\n .errors=${this.errors}\n .widgetOnly=${this.widgetOnly}\n >\n <div class=\"comp-container\">\n <div id=\"anchor\" style=${styleMap(anchorStyles)}></div>\n <temba-textinput\n name=${this.name}\n placeholder=${this.placeholder}\n gsm=${this.gsm}\n counter=${ifDefined(this.counter)}\n @keyup=${this.handleKeyUp}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleOptionCanceled}\n maxlength=\"${ifDefined(this.maxLength)}\"\n .value=${this.value}\n ?autogrow=${this.autogrow}\n ?textarea=${this.textarea}\n ?submitOnEnter=${this.submitOnEnter}\n >\n </temba-textinput>\n <temba-options\n @temba-selection=${this.handleOptionSelection}\n @temba-canceled=${this.handleOptionCanceled}\n .renderOption=${renderCompletionOption}\n .anchorTo=${this.anchorElement}\n .options=${this.options}\n ?visible=${visible}\n >\n ${this.currentFunction\n ? html`\n <div class=\"current-fn\">\n ${renderCompletionOption(this.currentFunction, true)}\n </div>\n `\n : null}\n <div class=\"footer\" style=\"${!visible ? 'display:none' : null}\">\n ${msg('Tab to complete, enter to select')}\n </div>\n </temba-options>\n </div>\n </temba-field>\n `;\n }\n}\n"]}
@@ -102,15 +102,72 @@ export class NotificationList extends TembaList {
102
102
  this.internalFocusDisabled = true;
103
103
  this.valueKey = 'target_url';
104
104
  this.renderOption = (notification) => {
105
- const styles = {
106
- display: 'flex',
107
- alignItems: 'flex-start',
108
- justifyContent: 'flex-start',
109
- };
110
- if (!notification.is_seen) {
111
- styles['fontWeight'] = '400';
105
+ let icon = null;
106
+ let body = null;
107
+ const color = '#333';
108
+ if (notification.type === 'incident:started') {
109
+ if (notification.incident.type === 'org:flagged') {
110
+ icon = Icon.incidents;
111
+ body =
112
+ 'Your workspace was flagged, please contact support for assistance.';
113
+ }
114
+ else if (notification.incident.type === 'org:suspended') {
115
+ icon = Icon.incidents;
116
+ body =
117
+ 'Your workspace was suspended, please contact support for assistance.';
118
+ }
119
+ else if (notification.incident.type === 'channel:disconnected') {
120
+ icon = Icon.channel;
121
+ body = 'Your android channel is not connected';
122
+ }
123
+ else if (notification.incident.type === 'webhooks:unhealthy') {
124
+ icon = Icon.webhook;
125
+ body = 'Your webhook calls are not working properly.';
126
+ }
112
127
  }
113
- return html ` ${getNotification(notification)} `;
128
+ else if (notification.type === 'import:finished') {
129
+ if (notification.import.type === 'contact') {
130
+ icon = Icon.contact_import;
131
+ body = `Imported ${notification.import.num_records.toLocaleString()} contacts`;
132
+ }
133
+ }
134
+ else if (notification.type === 'export:finished') {
135
+ if (notification.export.type === 'contact') {
136
+ icon = Icon.contact_export;
137
+ body = 'Exported contacts';
138
+ }
139
+ else if (notification.export.type === 'message') {
140
+ icon = Icon.message_export;
141
+ body = 'Exported messages';
142
+ }
143
+ }
144
+ else if (notification.type === 'tickets:activity') {
145
+ icon = Icon.tickets;
146
+ body = 'New ticket activity';
147
+ }
148
+ else if (notification.type === 'tickets:opened') {
149
+ icon = Icon.tickets;
150
+ body = 'New unassigned ticket';
151
+ }
152
+ return html `<div
153
+ style="color:${color};display:flex;align-items:flex-start;flex-direction:row;font-weight:${notification.is_seen
154
+ ? 300
155
+ : 400}"
156
+ >
157
+ ${icon
158
+ ? html `<div style="margin-right:0.6em">
159
+ <temba-icon name="${icon}"></temba-icon>
160
+ </div>`
161
+ : null}
162
+ <div style="display:flex;flex-direction:column">
163
+ <div style="line-height:1.1em">${body}</div>
164
+ <temba-date
165
+ style="font-size:80%"
166
+ value=${notification.created_on}
167
+ display="duration"
168
+ ></temba-date>
169
+ </div>
170
+ </div>`;
114
171
  };
115
172
  }
116
173
  renderHeader() {
@@ -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,eAAe,GAAG,CAAC,YAA0B,EAAE,EAAE;IACrD,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,KAAK,GAAG,MAAM,CAAC;IAEnB,IAAI,YAAY,CAAC,IAAI,KAAK,kBAAkB,EAAE;QAC5C,KAAK,GAAG,QAAQ,CAAC;QACjB,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,aAAa,EAAE;YAChD,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;YACtB,IAAI;gBACF,oEAAoE,CAAC;SACxE;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,eAAe,EAAE;YACzD,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;YACtB,IAAI;gBACF,sEAAsE,CAAC;SAC1E;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,sBAAsB,EAAE;YAChE,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;YACpB,IAAI,GAAG,uCAAuC,CAAC;SAChD;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,oBAAoB,EAAE;YAC9D,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;YACpB,IAAI,GA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,GAAG,IAAI,CAAC;QAiC3B,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,CAAC,YAA0B,EAAkB,EAAE;YACjE,MAAM,MAAM,GAAc;gBACxB,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,YAAY;gBACxB,cAAc,EAAE,YAAY;aAC7B,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;gBACzB,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC;aAC9B;YACD,OAAO,IAAI,CAAA,IAAI,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC;QAClD,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\nconst getNotification = (notification: Notification) => {\n let icon = null;\n let body = null;\n let color = '#333';\n\n if (notification.type === 'incident:started') {\n color = 'tomato';\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 = 'Contacts exported';\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\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 const styles: StyleInfo = {\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n };\n\n if (!notification.is_seen) {\n styles['fontWeight'] = '400';\n }\n return html` ${getNotification(notification)} `;\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,MAAM,eAAe,GAAG,CAAC,YAA0B,EAAE,EAAE;IACrD,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,KAAK,GAAG,MAAM,CAAC;IAEnB,IAAI,YAAY,CAAC,IAAI,KAAK,kBAAkB,EAAE;QAC5C,KAAK,GAAG,QAAQ,CAAC;QACjB,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,aAAa,EAAE;YAChD,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;YACtB,IAAI;gBACF,oEAAoE,CAAC;SACxE;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,eAAe,EAAE;YACzD,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;YACtB,IAAI;gBACF,sEAAsE,CAAC;SAC1E;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,sBAAsB,EAAE;YAChE,IAAI,GA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,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\nconst getNotification = (notification: Notification) => {\n let icon = null;\n let body = null;\n let color = '#333';\n\n if (notification.type === 'incident:started') {\n color = 'tomato';\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 = 'Contacts exported';\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\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 }\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,5 +1,5 @@
1
1
  // for cache busting we dynamically generate a fingerprint, use yarn svg to update
2
- export const SVG_FINGERPRINT = '66c82f285562aa77cfca6afe6800468e';
2
+ export const SVG_FINGERPRINT = '963a11882da2ee8b18c878e911d8eaf1';
3
3
  // only icons below are included in the sprite sheet
4
4
  export var Icon;
5
5
  (function (Icon) {
@@ -75,8 +75,8 @@ export var Icon;
75
75
  Icon["contact"] = "user-01";
76
76
  Icon["contact_archived"] = "archive";
77
77
  Icon["contact_blocked"] = "message-x-square";
78
- Icon["contact_export"] = "users-down";
79
- Icon["contact_import"] = "users-up";
78
+ Icon["contact_export"] = "download-cloud-01";
79
+ Icon["contact_import"] = "upload-cloud-01";
80
80
  Icon["contact_stopped"] = "slash-octagon";
81
81
  Icon["contact_updated"] = "user-edit";
82
82
  Icon["contacts"] = "user-01";
@@ -126,6 +126,7 @@ export var Icon;
126
126
  Icon["menu"] = "menu-01";
127
127
  Icon["menu_collapse"] = "chevron-left-double";
128
128
  Icon["message"] = "message-square-02";
129
+ Icon["message_export"] = "download-cloud-01";
129
130
  Icon["messages"] = "message-square-02";
130
131
  Icon["missing"] = "maximize-02";
131
132
  Icon["missed_call"] = "phone-x";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/vectoricon/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAElE,oDAAoD;AACpD,MAAM,CAAN,IAAY,IAyNX;AAzND,WAAY,IAAI;IACd,sCAA8B,CAAA;IAC9B,2BAAmB,CAAA;IACnB,uBAAe,CAAA;IACf,oBAAY,CAAA;IACZ,4BAAoB,CAAA;IACpB,gCAAwB,CAAA;IACxB,kCAA0B,CAAA;IAC1B,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,mCAA2B,CAAA;IAC3B,mCAA2B,CAAA;IAC3B,qCAA6B,CAAA;IAC7B,gCAAwB,CAAA;IACxB,yCAAiC,CAAA;IACjC,uCAA+B,CAAA;IAC/B,qCAA6B,CAAA;IAC7B,6CAAqC,CAAA;IACrC,2CAAmC,CAAA;IACnC,qCAA6B,CAAA;IAC7B,8BAAsB,CAAA;IACtB,qCAA6B,CAAA;IAC7B,kCAA0B,CAAA;IAC1B,gCAAwB,CAAA;IACxB,qCAA6B,CAAA;IAC7B,mCAA2B,CAAA;IAC3B,uBAAe,CAAA;IACf,qCAA6B,CAAA;IAC7B,yCAAiC,CAAA;IACjC,uCAA+B,CAAA;IAC/B,sCAA8B,CAAA;IAC9B,0BAAkB,CAAA;IAClB,uCAA+B,CAAA;IAC/B,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,sCAA8B,CAAA;IAC9B,sCAA8B,CAAA;IAC9B,qCAA6B,CAAA;IAC7B,wCAAgC,CAAA;IAChC,mCAA2B,CAAA;IAC3B,sCAA8B,CAAA;IAC9B,oCAA4B,CAAA;IAC5B,yC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C,CAAA;IAClC,qCAA6B,CAAA;IAC7B,iCAAyB,CAAA;IACzB,4BAAoB,CAAA;IACpB,yBAAiB,CAAA;IACjB,+BAAuB,CAAA;IACvB,gCAAwB,CAAA;IACxB,+BAAuB,CAAA;IACvB,iCAAyB,CAAA;IACzB,uCAA+B,CAAA;IAC/B,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,yCAAiC,CAAA;IACjC,6BAAqB,CAAA;IACrB,+BAAuB,CAAA;IACvB,oCAA4B,CAAA;IAC5B,4BAAoB,CAAA;IACpB,gDAAwC,CAAA;IACxC,qDAA6C,CAAA;IAC7C,kDAA0C,CAAA;IAC1C,6CAAqC,CAAA;IACrC,qCAA6B,CAAA;IAC7B,wDAAgD,CAAA;IAChD,0CAAkC,CAAA;IAClC,uCAA+B,CAAA;IAC/B,+CAAuC,CAAA;IACvC,4CAAoC,CAAA;IACpC,8BAAsB,CAAA;IACtB,2BAAmB,CAAA;IACnB,yBAAiB,CAAA;IACjB,kCAA0B,CAAA;IAC1B,0BAAkB,CAAA;IAClB,yBAAiB,CAAA;IACjB,0BAAkB,CAAA;IAClB,gCAAwB,CAAA;IACxB,oCAA4B,CAAA;IAC5B,mBAAW,CAAA;IACX,4BAAoB,CAAA;IACpB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IAEnB,4BAAoB,CAAA;IACpB,4BAAoB,CAAA;IAEpB,yBAAiB,CAAA;IACjB,6BAAqB,CAAA;IACrB,uBAAe,CAAA;IAEf,OAAO;IACP,wBAAgB,CAAA;IAChB,+BAAuB,CAAA;IACvB,6BAAqB,CAAA;IACrB,0BAAkB,CAAA;IAClB,yBAAiB,CAAA;AACnB,CAAC,EAzNW,IAAI,KAAJ,IAAI,QAyNf","sourcesContent":["// for cache busting we dynamically generate a fingerprint, use yarn svg to update\nexport const SVG_FINGERPRINT = '66c82f285562aa77cfca6afe6800468e';\n\n// only icons below are included in the sprite sheet\nexport enum Icon {\n alert_warning = 'alert-square',\n account = 'user-01',\n active = 'play',\n add = 'plus',\n add_note = 'file-02',\n airtime = 'bank-note-01',\n analytics = 'bar-chart-01',\n archive = 'archive',\n arrow_up = 'chevron-up',\n arrow_down = 'chevron-down',\n arrow_left = 'chevron-left',\n arrow_right = 'chevron-right',\n attachment = 'paperclip',\n attachment_audio = 'volume~--min',\n attachment_document = 'file-06',\n attachment_image = 'image-01',\n attachment_location = 'marker-pin-01',\n attachment_video = 'video-recorder',\n broadcast = 'announcement-01',\n call = 'phone-call-01',\n call_missed = 'phone-call-02',\n campaign = 'clock-refresh',\n campaign_active = 'play',\n campaign_archived = 'archive',\n campaigns = 'clock-refresh',\n channel = 'zap',\n channel_a = 'channel-android',\n channel_ct = 'channel-clickatell',\n channel_d3 = 'channel-whatsapp',\n channel_ds = 'channel-discord',\n channel_ex = 'zap',\n channel_fb = 'channel-facebook',\n channel_fba = 'channel-facebook',\n channel_fc = 'channel-freshchat',\n channel_fcm = 'channel-firebase',\n channel_ig = 'channel-instagram',\n channel_jc = 'channel-jiochat',\n channel_jn = 'channel-junebug',\n channel_kn = 'channel-kannel',\n channel_kwa = 'channel-whatsapp',\n channel_ln = 'channel-line',\n channel_mg = 'channel-mtarget',\n channel_pl = 'channel-plivo',\n channel_rc = 'channel-rocketchat',\n channel_sl = 'channel-slack',\n channel_sw = 'channel-signalwire',\n channel_tq = 'channel-thinq',\n channel_tg = 'channel-telegram',\n channel_t = 'channel-twilio',\n channel_twt = 'channel-twitter',\n channel_twa = 'channel-whatsapp',\n channel_vp = 'channel-viber',\n channel_vk = 'channel-vk',\n channel_nx = 'channel-vonage',\n channel_wc = 'channel-wechat',\n channel_wa = 'channel-whatsapp',\n channel_wac = 'channel-whatsapp',\n channel_zvw = 'channel-whatsapp',\n children = 'git-branch-01',\n check = 'check',\n checkbox = 'square',\n checkbox_checked = 'check-square',\n checkbox_partial = 'stop-square',\n classifier_wit = 'classifier-wit',\n classifier_luis = 'classifier-luis',\n classifier_bothub = 'classifier-bothub',\n close = 'x',\n compose = 'send-01',\n colors = 'palette',\n contact = 'user-01',\n contact_archived = 'archive',\n contact_blocked = 'message-x-square',\n contact_export = 'users-down',\n contact_import = 'users-up',\n contact_stopped = 'slash-octagon',\n contact_updated = 'user-edit',\n contacts = 'user-01',\n copy = 'copy-04',\n dashboard = 'pie-chart-01',\n delete = 'trash-03',\n delete_small = 'x',\n down = 'chevron-down',\n download = 'download-01',\n edit = 'edit-03',\n email = 'mail-01',\n error = 'alert-circle',\n event = 'zap',\n expressions = 'at-sign',\n fields = 'user-edit',\n filter = 'filter-funnel-01',\n flow = 'flow',\n flow_background = 'layers-two-01',\n flow_interrupted = 'x-close',\n flow_ivr = 'phone',\n flow_message = 'message-square-02',\n flow_surveyor = 'tablet-01',\n flow_user = 'hard-drive',\n flows = 'flow',\n global = 'at-sign',\n grid = 'dots-grid',\n group = 'users-01',\n group_exclude = 'users-x',\n group_include = 'users-check',\n group_smart = 'atom-01',\n help = 'help-circle',\n hide = 'eye-off',\n home = 'settings-02',\n image = 'image-01',\n inbox = 'inbox-01',\n incidents = 'alert-square',\n incoming_call = 'phone-incoming-01',\n integrations = 'layers-three-01',\n info = 'user-square',\n issue = 'alert-square',\n label = 'tag-01',\n language = 'translate-01',\n link = 'link-external-01',\n location = 'marker-pin-01',\n log = 'file-02',\n logout = 'log-out-04',\n menu = 'menu-01',\n menu_collapse = 'chevron-left-double',\n message = 'message-square-02',\n messages = 'message-square-02',\n missing = 'maximize-02',\n missed_call = 'phone-x',\n new = 'plus',\n next_schedule = 'alarm-clock',\n notification = 'bell-01',\n optin_requested = 'message-notification-circle',\n optin = 'message-check-circle',\n optout = 'message-x-circle',\n org_active = 'credit-card-02',\n org_anonymous = 'glasses-01',\n org_bulk = 'credit-card-plus',\n org_flagged = 'flag-01',\n org_new = 'stars-02',\n org_suspended = 'slash-circle-01',\n org_verified = 'check-verified-02',\n overview = 'pie-chart-01',\n prometheus = 'prometheus',\n progress_spinner = 'refresh-cw-04',\n featured = 'star-01',\n quick_replies = 'dotpoints-01',\n recording = 'microphone-01',\n resend = 'refresh-cw-05',\n reset = 'flip-backward',\n resthooks = 'share-07',\n restore = 'play',\n retry = 'refresh-cw-05',\n revisions = 'clock-rewind',\n rocketchat = 'rocketchat',\n runs = 'rows-03',\n schedule = 'calendar',\n search = 'search-refraction',\n select_open = 'chevron-down',\n select_clear = 'x',\n service = 'magic-wand-01',\n service_end = 'log-out-04',\n settings = 'settings-02',\n show = 'eye',\n simulator = 'phone-02',\n sort = 'chevron-selector-vertical',\n sort_down = 'sort-arrow-down',\n sort_up = 'sort-arrow-up',\n staff = 'hard-drive',\n tickets = 'agent',\n tickets_all = 'archive',\n tickets_closed = 'check',\n tickets_mine = 'coffee',\n tickets_open = 'inbox-01',\n tickets_unassigned = 'inbox-01',\n topic = 'message-text-circle-02',\n two_factor_enabled = 'shield-02',\n two_factor_disabled = 'shield-01',\n trigger = 'signal-01',\n trigger_active = 'play',\n trigger_archived = 'archive',\n trigger_new = 'plus',\n trigger_keyword = 'message-check-square',\n trigger_catch_all = 'message-question-square',\n trigger_inbound_call = 'phone-incoming-01',\n trigger_missed_call = 'phone-hang-up',\n trigger_schedule = 'calendar',\n trigger_new_conversation = 'message-chat-square',\n trigger_referral = 'user-right-01',\n trigger_closed_ticket = 'agent',\n trigger_opt_in = 'message-check-circle',\n trigger_opt_out = 'message-x-circle',\n triggers = 'signal-01',\n updated = 'edit-02',\n up = 'chevron-up',\n upload = 'upload-cloud-01',\n usages = 'link-04',\n user = 'users-01',\n users = 'users-01',\n user_beta = 'shield-zap',\n webhook = 'link-external-01',\n wit = 'wit',\n workspace = 'folder',\n zapier = 'zapier',\n zendesk = 'zendesk',\n\n ext = 'lightning-01',\n fcm = 'lightning-01',\n\n bothub = 'bothub',\n chatbase = 'chatbase',\n dtone = 'dtone',\n\n // demo\n default = 'list',\n datepicker = 'calendar',\n slider = 'sliders-02',\n select = 'browser',\n input = 'edit-05',\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../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CAAA;IACvB,iCAAyB,CAAA;IACzB,uCAA+B,CAAA;IAC/B,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,yCAAiC,CAAA;IACjC,6BAAqB,CAAA;IACrB,+BAAuB,CAAA;IACvB,oCAA4B,CAAA;IAC5B,4BAAoB,CAAA;IACpB,gDAAwC,CAAA;IACxC,qDAA6C,CAAA;IAC7C,kDAA0C,CAAA;IAC1C,6CAAqC,CAAA;IACrC,qCAA6B,CAAA;IAC7B,wDAAgD,CAAA;IAChD,0CAAkC,CAAA;IAClC,uCAA+B,CAAA;IAC/B,+CAAuC,CAAA;IACvC,4CAAoC,CAAA;IACpC,8BAAsB,CAAA;IACtB,2BAAmB,CAAA;IACnB,yBAAiB,CAAA;IACjB,kCAA0B,CAAA;IAC1B,0BAAkB,CAAA;IAClB,yBAAiB,CAAA;IACjB,0BAAkB,CAAA;IAClB,gCAAwB,CAAA;IACxB,oCAA4B,CAAA;IAC5B,mBAAW,CAAA;IACX,4BAAoB,CAAA;IACpB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IAEnB,4BAAoB,CAAA;IACpB,4BAAoB,CAAA;IAEpB,yBAAiB,CAAA;IACjB,6BAAqB,CAAA;IACrB,uBAAe,CAAA;IAEf,OAAO;IACP,wBAAgB,CAAA;IAChB,+BAAuB,CAAA;IACvB,6BAAqB,CAAA;IACrB,0BAAkB,CAAA;IAClB,yBAAiB,CAAA;AACnB,CAAC,EA1NW,IAAI,KAAJ,IAAI,QA0Nf","sourcesContent":["// for cache busting we dynamically generate a fingerprint, use yarn svg to update\nexport const SVG_FINGERPRINT = '963a11882da2ee8b18c878e911d8eaf1';\n\n// only icons below are included in the sprite sheet\nexport enum Icon {\n alert_warning = 'alert-square',\n account = 'user-01',\n active = 'play',\n add = 'plus',\n add_note = 'file-02',\n airtime = 'bank-note-01',\n analytics = 'bar-chart-01',\n archive = 'archive',\n arrow_up = 'chevron-up',\n arrow_down = 'chevron-down',\n arrow_left = 'chevron-left',\n arrow_right = 'chevron-right',\n attachment = 'paperclip',\n attachment_audio = 'volume~--min',\n attachment_document = 'file-06',\n attachment_image = 'image-01',\n attachment_location = 'marker-pin-01',\n attachment_video = 'video-recorder',\n broadcast = 'announcement-01',\n call = 'phone-call-01',\n call_missed = 'phone-call-02',\n campaign = 'clock-refresh',\n campaign_active = 'play',\n campaign_archived = 'archive',\n campaigns = 'clock-refresh',\n channel = 'zap',\n channel_a = 'channel-android',\n channel_ct = 'channel-clickatell',\n channel_d3 = 'channel-whatsapp',\n channel_ds = 'channel-discord',\n channel_ex = 'zap',\n channel_fb = 'channel-facebook',\n channel_fba = 'channel-facebook',\n channel_fc = 'channel-freshchat',\n channel_fcm = 'channel-firebase',\n channel_ig = 'channel-instagram',\n channel_jc = 'channel-jiochat',\n channel_jn = 'channel-junebug',\n channel_kn = 'channel-kannel',\n channel_kwa = 'channel-whatsapp',\n channel_ln = 'channel-line',\n channel_mg = 'channel-mtarget',\n channel_pl = 'channel-plivo',\n channel_rc = 'channel-rocketchat',\n channel_sl = 'channel-slack',\n channel_sw = 'channel-signalwire',\n channel_tq = 'channel-thinq',\n channel_tg = 'channel-telegram',\n channel_t = 'channel-twilio',\n channel_twt = 'channel-twitter',\n channel_twa = 'channel-whatsapp',\n channel_vp = 'channel-viber',\n channel_vk = 'channel-vk',\n channel_nx = 'channel-vonage',\n channel_wc = 'channel-wechat',\n channel_wa = 'channel-whatsapp',\n channel_wac = 'channel-whatsapp',\n channel_zvw = 'channel-whatsapp',\n children = 'git-branch-01',\n check = 'check',\n checkbox = 'square',\n checkbox_checked = 'check-square',\n checkbox_partial = 'stop-square',\n classifier_wit = 'classifier-wit',\n classifier_luis = 'classifier-luis',\n classifier_bothub = 'classifier-bothub',\n close = 'x',\n compose = 'send-01',\n colors = 'palette',\n contact = 'user-01',\n contact_archived = 'archive',\n contact_blocked = 'message-x-square',\n contact_export = 'download-cloud-01',\n contact_import = 'upload-cloud-01',\n contact_stopped = 'slash-octagon',\n contact_updated = 'user-edit',\n contacts = 'user-01',\n copy = 'copy-04',\n dashboard = 'pie-chart-01',\n delete = 'trash-03',\n delete_small = 'x',\n down = 'chevron-down',\n download = 'download-01',\n edit = 'edit-03',\n email = 'mail-01',\n error = 'alert-circle',\n event = 'zap',\n expressions = 'at-sign',\n fields = 'user-edit',\n filter = 'filter-funnel-01',\n flow = 'flow',\n flow_background = 'layers-two-01',\n flow_interrupted = 'x-close',\n flow_ivr = 'phone',\n flow_message = 'message-square-02',\n flow_surveyor = 'tablet-01',\n flow_user = 'hard-drive',\n flows = 'flow',\n global = 'at-sign',\n grid = 'dots-grid',\n group = 'users-01',\n group_exclude = 'users-x',\n group_include = 'users-check',\n group_smart = 'atom-01',\n help = 'help-circle',\n hide = 'eye-off',\n home = 'settings-02',\n image = 'image-01',\n inbox = 'inbox-01',\n incidents = 'alert-square',\n incoming_call = 'phone-incoming-01',\n integrations = 'layers-three-01',\n info = 'user-square',\n issue = 'alert-square',\n label = 'tag-01',\n language = 'translate-01',\n link = 'link-external-01',\n location = 'marker-pin-01',\n log = 'file-02',\n logout = 'log-out-04',\n menu = 'menu-01',\n menu_collapse = 'chevron-left-double',\n message = 'message-square-02',\n message_export = 'download-cloud-01',\n messages = 'message-square-02',\n missing = 'maximize-02',\n missed_call = 'phone-x',\n new = 'plus',\n next_schedule = 'alarm-clock',\n notification = 'bell-01',\n optin_requested = 'message-notification-circle',\n optin = 'message-check-circle',\n optout = 'message-x-circle',\n org_active = 'credit-card-02',\n org_anonymous = 'glasses-01',\n org_bulk = 'credit-card-plus',\n org_flagged = 'flag-01',\n org_new = 'stars-02',\n org_suspended = 'slash-circle-01',\n org_verified = 'check-verified-02',\n overview = 'pie-chart-01',\n prometheus = 'prometheus',\n progress_spinner = 'refresh-cw-04',\n featured = 'star-01',\n quick_replies = 'dotpoints-01',\n recording = 'microphone-01',\n resend = 'refresh-cw-05',\n reset = 'flip-backward',\n resthooks = 'share-07',\n restore = 'play',\n retry = 'refresh-cw-05',\n revisions = 'clock-rewind',\n rocketchat = 'rocketchat',\n runs = 'rows-03',\n schedule = 'calendar',\n search = 'search-refraction',\n select_open = 'chevron-down',\n select_clear = 'x',\n service = 'magic-wand-01',\n service_end = 'log-out-04',\n settings = 'settings-02',\n show = 'eye',\n simulator = 'phone-02',\n sort = 'chevron-selector-vertical',\n sort_down = 'sort-arrow-down',\n sort_up = 'sort-arrow-up',\n staff = 'hard-drive',\n tickets = 'agent',\n tickets_all = 'archive',\n tickets_closed = 'check',\n tickets_mine = 'coffee',\n tickets_open = 'inbox-01',\n tickets_unassigned = 'inbox-01',\n topic = 'message-text-circle-02',\n two_factor_enabled = 'shield-02',\n two_factor_disabled = 'shield-01',\n trigger = 'signal-01',\n trigger_active = 'play',\n trigger_archived = 'archive',\n trigger_new = 'plus',\n trigger_keyword = 'message-check-square',\n trigger_catch_all = 'message-question-square',\n trigger_inbound_call = 'phone-incoming-01',\n trigger_missed_call = 'phone-hang-up',\n trigger_schedule = 'calendar',\n trigger_new_conversation = 'message-chat-square',\n trigger_referral = 'user-right-01',\n trigger_closed_ticket = 'agent',\n trigger_opt_in = 'message-check-circle',\n trigger_opt_out = 'message-x-circle',\n triggers = 'signal-01',\n updated = 'edit-02',\n up = 'chevron-up',\n upload = 'upload-cloud-01',\n usages = 'link-04',\n user = 'users-01',\n users = 'users-01',\n user_beta = 'shield-zap',\n webhook = 'link-external-01',\n wit = 'wit',\n workspace = 'folder',\n zapier = 'zapier',\n zendesk = 'zendesk',\n\n ext = 'lightning-01',\n fcm = 'lightning-01',\n\n bothub = 'bothub',\n chatbase = 'chatbase',\n dtone = 'dtone',\n\n // demo\n default = 'list',\n datepicker = 'calendar',\n slider = 'sliders-02',\n select = 'browser',\n input = 'edit-05',\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyaruka/temba-components",
3
- "version": "0.67.0",
3
+ "version": "0.67.2",
4
4
  "description": "Web components to support rapidpro and related projects",
5
5
  "author": "Nyaruka <code@nyaruka.coim>",
6
6
  "main": "dist/index.js",
@@ -256,6 +256,8 @@ export class Completion extends FormElement {
256
256
  }
257
257
  : {};
258
258
 
259
+ const visible = this.options && this.options.length > 0;
260
+
259
261
  return html`
260
262
  <temba-field
261
263
  name=${this.name}
@@ -288,7 +290,7 @@ export class Completion extends FormElement {
288
290
  .renderOption=${renderCompletionOption}
289
291
  .anchorTo=${this.anchorElement}
290
292
  .options=${this.options}
291
- ?visible=${this.options && this.options.length > 0}
293
+ ?visible=${visible}
292
294
  >
293
295
  ${this.currentFunction
294
296
  ? html`
@@ -297,7 +299,9 @@ export class Completion extends FormElement {
297
299
  </div>
298
300
  `
299
301
  : null}
300
- <div class="footer">${msg('Tab to complete, enter to select')}</div>
302
+ <div class="footer" style="${!visible ? 'display:none' : null}">
303
+ ${msg('Tab to complete, enter to select')}
304
+ </div>
301
305
  </temba-options>
302
306
  </div>
303
307
  </temba-field>
@@ -120,16 +120,65 @@ export class NotificationList extends TembaList {
120
120
  super();
121
121
  this.valueKey = 'target_url';
122
122
  this.renderOption = (notification: Notification): TemplateResult => {
123
- const styles: StyleInfo = {
124
- display: 'flex',
125
- alignItems: 'flex-start',
126
- justifyContent: 'flex-start',
127
- };
123
+ let icon = null;
124
+ let body = null;
125
+ const color = '#333';
128
126
 
129
- if (!notification.is_seen) {
130
- styles['fontWeight'] = '400';
127
+ if (notification.type === 'incident:started') {
128
+ if (notification.incident.type === 'org:flagged') {
129
+ icon = Icon.incidents;
130
+ body =
131
+ 'Your workspace was flagged, please contact support for assistance.';
132
+ } else if (notification.incident.type === 'org:suspended') {
133
+ icon = Icon.incidents;
134
+ body =
135
+ 'Your workspace was suspended, please contact support for assistance.';
136
+ } else if (notification.incident.type === 'channel:disconnected') {
137
+ icon = Icon.channel;
138
+ body = 'Your android channel is not connected';
139
+ } else if (notification.incident.type === 'webhooks:unhealthy') {
140
+ icon = Icon.webhook;
141
+ body = 'Your webhook calls are not working properly.';
142
+ }
143
+ } else if (notification.type === 'import:finished') {
144
+ if (notification.import.type === 'contact') {
145
+ icon = Icon.contact_import;
146
+ body = `Imported ${notification.import.num_records.toLocaleString()} contacts`;
147
+ }
148
+ } else if (notification.type === 'export:finished') {
149
+ if (notification.export.type === 'contact') {
150
+ icon = Icon.contact_export;
151
+ body = 'Exported contacts';
152
+ } else if (notification.export.type === 'message') {
153
+ icon = Icon.message_export;
154
+ body = 'Exported messages';
155
+ }
156
+ } else if (notification.type === 'tickets:activity') {
157
+ icon = Icon.tickets;
158
+ body = 'New ticket activity';
159
+ } else if (notification.type === 'tickets:opened') {
160
+ icon = Icon.tickets;
161
+ body = 'New unassigned ticket';
131
162
  }
132
- return html` ${getNotification(notification)} `;
163
+ return html`<div
164
+ style="color:${color};display:flex;align-items:flex-start;flex-direction:row;font-weight:${notification.is_seen
165
+ ? 300
166
+ : 400}"
167
+ >
168
+ ${icon
169
+ ? html`<div style="margin-right:0.6em">
170
+ <temba-icon name="${icon}"></temba-icon>
171
+ </div>`
172
+ : null}
173
+ <div style="display:flex;flex-direction:column">
174
+ <div style="line-height:1.1em">${body}</div>
175
+ <temba-date
176
+ style="font-size:80%"
177
+ value=${notification.created_on}
178
+ display="duration"
179
+ ></temba-date>
180
+ </div>
181
+ </div>`;
133
182
  };
134
183
  }
135
184
 
@@ -1,5 +1,5 @@
1
1
  // for cache busting we dynamically generate a fingerprint, use yarn svg to update
2
- export const SVG_FINGERPRINT = '66c82f285562aa77cfca6afe6800468e';
2
+ export const SVG_FINGERPRINT = '963a11882da2ee8b18c878e911d8eaf1';
3
3
 
4
4
  // only icons below are included in the sprite sheet
5
5
  export enum Icon {
@@ -75,8 +75,8 @@ export enum Icon {
75
75
  contact = 'user-01',
76
76
  contact_archived = 'archive',
77
77
  contact_blocked = 'message-x-square',
78
- contact_export = 'users-down',
79
- contact_import = 'users-up',
78
+ contact_export = 'download-cloud-01',
79
+ contact_import = 'upload-cloud-01',
80
80
  contact_stopped = 'slash-octagon',
81
81
  contact_updated = 'user-edit',
82
82
  contacts = 'user-01',
@@ -126,6 +126,7 @@ export enum Icon {
126
126
  menu = 'menu-01',
127
127
  menu_collapse = 'chevron-left-double',
128
128
  message = 'message-square-02',
129
+ message_export = 'download-cloud-01',
129
130
  messages = 'message-square-02',
130
131
  missing = 'maximize-02',
131
132
  missed_call = 'phone-x',