@nyaruka/temba-components 0.63.0 → 0.63.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),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:"b745b4f0.js",revision:"ba4e6d411b35b28e3fbf51b341873cac"},{url:"templates/components-body.html",revision:"bf4a144716fca799fc4ea33609cf7915"},{url:"templates/components-head.html",revision:"bbc3571e065990ab75242d91d4d27fba"}],{}),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 d=e=>o(e,i),l={module:{uri:i},exports:r,require:d};t[i]=Promise.all(n.map((e=>l[e]||d(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"f03ff82f.js",revision:"d2239b8a8a6543d1c9ed56f58a1edfd9"},{url:"templates/components-body.html",revision:"592921549f123d3ca4f6c5bdb924b30a"},{url:"templates/components-head.html",revision:"ca133d855ca74eb13edcd834750b6c7f"}],{}),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/8ddfa1897580ab0df983525b7c58a312/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\": \"b745b4f0.js\",\n \"revision\": \"ba4e6d411b35b28e3fbf51b341873cac\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"bf4a144716fca799fc4ea33609cf7915\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"bbc3571e065990ab75242d91d4d27fba\"\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/66d236ded28308ffe45569d246a4f9c2/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\": \"f03ff82f.js\",\n \"revision\": \"d2239b8a8a6543d1c9ed56f58a1edfd9\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"592921549f123d3ca4f6c5bdb924b30a\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"ca133d855ca74eb13edcd834750b6c7f\"\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/b745b4f0.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.63.0"</script>
1
+ <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/f03ff82f.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.63.2"</script>
@@ -1 +1 @@
1
- <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/b745b4f0.js" crossorigin="anonymous">
1
+ <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/f03ff82f.js" crossorigin="anonymous">
@@ -630,7 +630,7 @@ export class Compose extends FormElement {
630
630
  icon="attachment"
631
631
  .count=${this.currentAttachments.length}
632
632
  >
633
- <div class="items attachments"></div>
633
+ <div class="items attachments">${this.getAttachments()}</div>
634
634
  </temba-tab>`
635
635
  : null}
636
636
  ${this.quickReplies
@@ -1 +1 @@
1
- {"version":3,"file":"Compose.js","sourceRoot":"","sources":["../../../src/compose/Compose.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAc,eAAe,EAAY,MAAM,eAAe,CAAC;AACtE,OAAO,EACL,cAAc,EACd,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,sBAAsB,EAEtB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAMlB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;kDACP;AAGrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACP;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+CACxB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4CAC5B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;2CAClC;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;uCACT;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAOpB;AAGP;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACH","sourcesContent":["import { TemplateResult, html, css } from 'lit';\nimport { FormElement } from '../FormElement';\nimport { property } from 'lit/decorators.js';\nimport { Icon } from '../vectoricon';\nimport { Attachment, CustomEventType, Language } from '../interfaces';\nimport {\n formatFileSize,\n getClasses,\n postFormData,\n truncate,\n DEFAULT_MEDIA_ENDPOINT,\n WebResponse,\n isImageAttachment,\n} from '../utils';\nimport { Completion } from '../completion/Completion';\nimport { Select } from '../select/Select';\nimport { TabPane } from '../tabpane/TabPane';\nimport { EventHandler } from '../RapidElement';\n\nexport class Compose extends FormElement {\n static get styles() {\n return css`\n .container {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n\n border-radius: var(--curvature-widget);\n background: var(--color-widget-bg);\n border: 1px solid var(--color-widget-border);\n transition: all ease-in-out var(--transition-speed);\n box-shadow: var(--widget-box-shadow);\n caret-color: var(--input-caret);\n }\n\n .drop-mask {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n z-index: 2;\n height: 100%;\n width: 100%;\n bottom: 0;\n right: 0;\n background: rgba(210, 243, 184, 0.8);\n border-radius: var(--curvature-widget);\n margin: -0.5em;\n padding: 0.5em;\n transition: opacity ease-in-out var(--transition-speed);\n display: flex;\n align-items: center;\n text-align: center;\n }\n\n .highlight .drop-mask {\n opacity: 1;\n }\n\n .drop-mask > div {\n margin: auto;\n border-radius: var(--curvature-widget);\n font-weight: 400;\n color: rgba(0, 0, 0, 0.5);\n }\n\n .items {\n }\n\n .chatbox {\n --color-widget-border: none;\n --curvature-widget: var(--curvature) var(--curvature) 0px 0px;\n --textarea-min-height: 4em;\n }\n\n .attachments {\n }\n .attachments-list {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding: 0.2em;\n }\n .attachment-item {\n padding: 0.4em;\n }\n .attachment-item.error {\n background: #fff;\n color: rgba(250, 0, 0, 0.75);\n padding: 0.2em;\n margin: 0.3em 0.5em;\n border-radius: var(--curvature);\n display: block;\n }\n\n .remove-item {\n position: absolute;\n --icon-color: #ccc;\n background: #fff;\n border-radius: 99%;\n transform: scale(0);\n transition: transform 200ms linear;\n }\n\n .attachment-item:hover .remove-item {\n transform: scale(1);\n }\n\n .remove-item:hover {\n --icon-color: #333;\n cursor: pointer;\n }\n\n .remove-item.error:hover {\n background: rgba(250, 0, 0, 0.1);\n }\n\n .remove-item.error {\n background: rgba(250, 0, 0, 0.05);\n color: rgba(250, 0, 0, 0.75);\n }\n .attachment-name {\n align-self: center;\n font-size: 12px;\n padding: 2px 8px;\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0em;\n background: #f9f9f9;\n border-bottom-left-radius: var(--curvature);\n border-bottom-right-radius: var(--curvature);\n border-top: solid 1px var(--color-widget-border);\n }\n\n #upload-input {\n display: none;\n }\n .upload-label {\n display: flex;\n align-items: center;\n }\n .upload-icon {\n color: rgb(102, 102, 102);\n }\n .actions-right {\n display: flex;\n align-items: center;\n }\n temba-charcount {\n margin-right: 5px;\n overflow: hidden;\n --temba-charcount-counts-margin-top: 0px;\n --temba-charcount-summary-margin-top: 0px;\n --temba-charcount-summary-position: fixed;\n --temba-charcount-summary-right: 105px;\n --temba-charcount-summary-bottom: 105px;\n }\n temba-button {\n --button-y: 1px;\n --button-x: 12px;\n }\n .send-error {\n color: rgba(250, 0, 0, 0.75);\n font-size: var(--help-text-size);\n }\n\n .language {\n margin-bottom: 0.6em;\n display: block;\n z-index: 2;\n }\n\n .top-right {\n align-items: center;\n display: flex;\n }\n\n #send-button {\n margin: 0.3em;\n }\n\n temba-tabs {\n --focused-tab-color: #f4f4f4;\n }\n\n .quick-replies {\n margin: 0.8em;\n }\n\n .add-attachment {\n padding: 1em;\n background: #eee;\n border-radius: var(--curvature);\n color: #aaa;\n margin: 0.5em;\n }\n\n .add-attachment:hover {\n background: #e9e9e9;\n cursor: pointer;\n }\n\n temba-loading {\n margin: auto 1em;\n }\n `;\n }\n\n @property({ type: Number })\n index = 1;\n\n @property({ type: Number })\n maxAttachments = 3;\n\n @property({ type: Number })\n maxLength = 640;\n\n @property({ type: Boolean })\n completion: boolean;\n\n @property({ type: Boolean })\n chatbox: boolean;\n\n @property({ type: Boolean })\n attachments: boolean;\n\n @property({ type: Boolean })\n quickReplies: boolean;\n\n @property({ type: Boolean })\n counter: boolean;\n\n @property({ type: Boolean })\n pendingDrop: boolean;\n\n @property({ type: Boolean })\n button: boolean;\n\n @property({ type: String })\n currentText = '';\n\n @property({ type: String })\n initialText = '';\n\n @property({ type: String })\n accept = ''; //e.g. \".xls,.xlsx\"\n\n @property({ type: String, attribute: false })\n endpoint = DEFAULT_MEDIA_ENDPOINT;\n\n @property({ type: Boolean, attribute: false })\n uploading: boolean;\n\n @property({ type: Array })\n languages: Language[] = [];\n\n @property({ type: Array })\n currentAttachments: Attachment[] = [];\n\n @property({ type: Array })\n currentQuickReplies: { name: string; value: string }[] = [];\n\n @property({ type: Array, attribute: false })\n failedAttachments: Attachment[] = [];\n\n @property({ type: String })\n buttonName = 'Send';\n\n @property({ type: Boolean, attribute: false })\n buttonDisabled = true;\n\n @property({ type: String, attribute: false })\n buttonError = '';\n\n @property({ type: Boolean, attribute: 'widget_only' })\n widgetOnly: boolean;\n\n @property({ type: Array })\n errors: string[];\n\n @property({ type: Object })\n langValues: {\n [lang: string]: {\n text: string;\n attachments: Attachment[];\n quick_replies: string[];\n };\n } = {};\n\n @property({ type: String })\n currentLanguage = 'und';\n\n public constructor() {\n super();\n }\n\n private handleTabChanged() {\n const tabs = this.shadowRoot.querySelector('temba-tabs') as TabPane;\n const tab = tabs.getCurrentTab();\n if (tab) {\n // check we are going for the first attachment\n if (tab.icon == 'attachment') {\n if (this.currentAttachments.length == 0) {\n this.handleUploadFileIconClicked();\n }\n }\n }\n }\n\n public getEventHandlers(): EventHandler[] {\n return [\n { event: CustomEventType.ContextChanged, method: this.handleTabChanged },\n ];\n }\n\n public firstUpdated(changes: Map<string, any>): void {\n super.firstUpdated(changes);\n\n if (changes.has('languages') && this.languages.length > 0) {\n this.currentLanguage = this.languages[0].iso;\n }\n\n if (changes.has('value')) {\n this.langValues = this.getDeserializedValue() || {};\n }\n this.setFocusOnChatbox();\n }\n\n public updated(changes: Map<string, any>): void {\n super.updated(changes);\n\n if (changes.has('currentLanguage') && this.langValues) {\n let langValue = {\n text: '',\n attachments: [],\n quick_replies: [],\n };\n\n if (this.currentLanguage in this.langValues) {\n langValue = this.langValues[this.currentLanguage];\n }\n\n this.currentText = langValue.text;\n this.initialText = langValue.text;\n this.currentAttachments = langValue.attachments;\n this.currentQuickReplies = (langValue.quick_replies || []).map(value => {\n return { name: value, value };\n });\n this.setFocusOnChatbox();\n\n // TODO: this feels like it shouldn't be needed\n const chatbox = this.shadowRoot.querySelector('.chatbox') as any;\n if (chatbox) {\n chatbox.value = this.initialText;\n }\n this.resetTabs();\n this.requestUpdate('currentAttachments');\n }\n\n if (\n this.langValues &&\n (changes.has('currentText') ||\n changes.has('currentAttachments') ||\n changes.has('currentQuickReplies'))\n ) {\n this.toggleButton();\n\n const trimmed = this.currentText ? this.currentText.trim() : '';\n if (\n trimmed ||\n this.currentAttachments.length > 0 ||\n this.currentQuickReplies.length > 0\n ) {\n this.langValues[this.currentLanguage] = {\n text: trimmed,\n attachments: this.currentAttachments,\n quick_replies: this.currentQuickReplies.map(option => option.value),\n };\n } else {\n delete this.langValues[this.currentLanguage];\n }\n this.fireCustomEvent(CustomEventType.ContentChanged, this.langValues);\n this.requestUpdate('langValues');\n this.setValue(this.langValues);\n }\n }\n\n private setFocusOnChatbox(): void {\n if (this.chatbox) {\n const completion = this.shadowRoot.querySelector(\n '.chatbox'\n ) as Completion;\n if (completion) {\n window.setTimeout(() => {\n completion.focus();\n // this.resetTabs();\n }, 0);\n }\n }\n }\n\n public reset(): void {\n (this.shadowRoot.querySelector('.chatbox') as HTMLInputElement).value = '';\n this.initialText = '';\n this.currentText = '';\n this.currentQuickReplies = [];\n this.currentAttachments = [];\n this.failedAttachments = [];\n this.buttonError = '';\n }\n\n private handleQuickReplyChange(event: InputEvent) {\n this.requestUpdate('currentQuickReplies');\n }\n\n private handleChatboxChange(evt: Event) {\n const chatbox = evt.target as HTMLInputElement;\n this.currentText = chatbox.value;\n }\n\n private handleDragEnter(evt: DragEvent): void {\n this.highlight(evt);\n }\n\n private handleDragOver(evt: DragEvent): void {\n this.highlight(evt);\n }\n\n private handleDragLeave(evt: DragEvent): void {\n this.unhighlight(evt);\n }\n\n private handleDrop(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.unhighlight(evt);\n const dt = evt.dataTransfer;\n if (dt) {\n const files = dt.files;\n this.uploadFiles(files);\n }\n }\n }\n\n private preventDefaults(evt: Event): void {\n evt.preventDefault();\n evt.stopPropagation();\n }\n\n private highlight(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.pendingDrop = true;\n this.preventDefaults(evt);\n }\n }\n\n private unhighlight(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.pendingDrop = false;\n this.preventDefaults(evt);\n }\n }\n\n private handleUploadFileIconClicked(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n private handleUploadFileInputChanged(evt: Event): void {\n const target = evt.target as HTMLInputElement;\n const files = target.files;\n this.uploadFiles(files);\n }\n\n public canAcceptAttachments() {\n return (\n this.attachments && this.currentAttachments.length < this.maxAttachments\n );\n }\n\n public uploadFiles(files: FileList): void {\n let filesToUpload = [];\n if (this.currentAttachments && this.currentAttachments.length > 0) {\n //remove duplicate files that have already been uploaded\n filesToUpload = [...files].filter(file => {\n const index = this.currentAttachments.findIndex(\n value => value.filename === file.name && value.size === file.size\n );\n if (index === -1) {\n return file;\n }\n });\n } else {\n filesToUpload = [...files];\n }\n filesToUpload.map(fileToUpload => {\n this.uploadFile(fileToUpload);\n });\n }\n\n private uploadFile(file: File): void {\n this.uploading = true;\n\n const url = this.endpoint;\n const payload = new FormData();\n payload.append('file', file);\n postFormData(url, payload)\n .then((response: WebResponse) => {\n if (this.currentAttachments.length >= this.maxAttachments) {\n this.addFailedAttachment(file, 'Too many attachments');\n } else {\n const attachment = response.json as Attachment;\n if (attachment) {\n this.addCurrentAttachment(attachment);\n }\n }\n })\n .catch((error: WebResponse) => {\n let uploadError = '';\n if (error.status === 400) {\n uploadError = error.json.file[0];\n } else {\n uploadError = 'Server failure';\n }\n console.error(uploadError);\n this.addFailedAttachment(file, uploadError);\n })\n .finally(() => {\n this.uploading = false;\n });\n }\n\n private addCurrentAttachment(attachmentToAdd: any) {\n this.currentAttachments.push(attachmentToAdd);\n this.requestUpdate('currentAttachments');\n }\n private removeCurrentAttachment(attachmentToRemove: any) {\n this.currentAttachments = this.currentAttachments.filter(\n currentAttachment => currentAttachment !== attachmentToRemove\n );\n this.requestUpdate('currentAttachments');\n }\n\n private addFailedAttachment(file: File, error: string) {\n const failedAttachment = {\n uuid: Math.random().toString(36).slice(2, 6),\n content_type: file.type,\n filename: file.name,\n url: file.name,\n size: file.size,\n error: error,\n } as Attachment;\n this.failedAttachments.push(failedAttachment);\n this.requestUpdate('failedAttachments');\n }\n private removeFailedAttachment(attachmentToRemove: any) {\n this.failedAttachments = this.failedAttachments.filter(\n (failedAttachment: any) => failedAttachment !== attachmentToRemove\n );\n this.requestUpdate('failedAttachments');\n }\n\n private handleRemoveFileClicked(evt: Event): void {\n const target = evt.target as HTMLDivElement;\n\n const currentAttachmentToRemove = this.currentAttachments.find(\n ({ uuid }) => uuid === target.id\n );\n if (currentAttachmentToRemove) {\n this.removeCurrentAttachment(currentAttachmentToRemove);\n }\n\n const failedAttachmentToRemove = this.failedAttachments.find(\n ({ uuid }) => uuid === target.id\n );\n if (failedAttachmentToRemove) {\n this.removeFailedAttachment(failedAttachmentToRemove);\n }\n }\n\n public toggleButton() {\n if (this.button) {\n this.buttonError = '';\n const chatboxEmpty = this.currentText.trim().length === 0;\n const attachmentsEmpty = this.currentAttachments.length === 0;\n if (this.chatbox && this.attachments) {\n this.buttonDisabled = chatboxEmpty && attachmentsEmpty;\n } else if (this.chatbox) {\n this.buttonDisabled = chatboxEmpty;\n } else if (this.attachments) {\n this.buttonDisabled = attachmentsEmpty;\n } else {\n this.buttonDisabled = true;\n }\n }\n }\n\n private handleSendClick(evt: Event) {\n evt.stopPropagation();\n this.handleSend();\n }\n\n private handleSendEnter(evt: KeyboardEvent) {\n if (this.button) {\n if (evt.key === 'Enter' && !evt.shiftKey) {\n if (this.completion) {\n const chat = evt.target as Completion;\n if (!chat.hasVisibleOptions()) {\n this.handleSend();\n this.preventDefaults(evt);\n }\n } else {\n this.handleSend();\n this.preventDefaults(evt);\n }\n }\n }\n }\n\n private handleSend() {\n if (!this.buttonDisabled) {\n this.buttonDisabled = true;\n const name = this.buttonName;\n this.fireCustomEvent(CustomEventType.ButtonClicked, { name });\n }\n }\n\n private handleLanguageChange(evt: Event) {\n const select = evt.target as Select;\n this.currentLanguage = select.values[0].iso;\n }\n\n public resetTabs() {\n (this.shadowRoot.querySelector('temba-tabs') as TabPane).index = -1;\n }\n\n public render(): TemplateResult {\n return html`\n <temba-field\n name=${this.name}\n .errors=${this.errors}\n .widgetOnly=${this.widgetOnly}\n .value=${this.value}\n >\n ${this.languages.length > 1\n ? html`<temba-select\n @change=${this.handleLanguageChange}\n class=\"language\"\n name=\"language\"\n .staticOptions=${this.languages}\n valueKey=\"iso\"\n >\n </temba-select>`\n : null}\n\n <div\n class=${getClasses({ container: true, highlight: this.pendingDrop })}\n @dragenter=\"${this.handleDragEnter}\"\n @dragover=\"${this.handleDragOver}\"\n @dragleave=\"${this.handleDragLeave}\"\n @drop=\"${this.handleDrop}\"\n >\n <div class=\"drop-mask\"><div>Upload Attachment</div></div>\n\n ${this.chatbox ? html`${this.getChatbox()}` : null}\n\n <div class=\"items actions\">${this.getActions()}</div>\n </div>\n </temba-field>\n `;\n }\n\n private getChatbox(): TemplateResult {\n if (this.completion) {\n return html`<temba-completion\n class=\"chatbox\"\n .value=${this.initialText}\n gsm\n textarea\n autogrow\n maxlength=${this.maxLength}\n @change=${this.handleChatboxChange}\n @keydown=${this.handleSendEnter}\n placeholder=\"Write something here\"\n >\n </temba-completion>`;\n } else {\n return html`<temba-textinput\n class=\"chatbox\"\n gsm\n textarea\n autogrow\n maxlength=${this.maxLength}\n .value=${this.initialText}\n @change=${this.handleChatboxChange}\n @keydown=${this.handleSendEnter}\n placeholder=\"Write something here\"\n >\n </temba-textinput>`;\n }\n }\n\n private getAttachments(): TemplateResult {\n return html`\n ${this.attachments\n ? html` <div class=\"attachments-list\">\n ${this.currentAttachments.map(validAttachment => {\n return html` <div class=\"attachment-item\">\n <temba-icon\n class=\"remove-item\"\n @click=\"${this.handleRemoveFileClicked}\"\n id=\"${validAttachment.uuid}\"\n name=\"${Icon.delete_small}\"\n ></temba-icon>\n ${isImageAttachment(validAttachment)\n ? html`<temba-thumbnail\n url=\"${validAttachment.url}\"\n ></temba-thumbnail>`\n : html`<temba-thumbnail\n label=\"${validAttachment.content_type.split('/')[1]}\"\n ></temba-thumbnail>`}\n </div>`;\n })}\n ${this.getUploader()}\n </div>\n ${this.failedAttachments.map(invalidAttachment => {\n return html` <div class=\"attachment-item error\">\n <div\n class=\"remove-item error\"\n @click=\"${this.handleRemoveFileClicked}\"\n >\n <temba-icon\n id=\"${invalidAttachment.uuid}\"\n name=\"${Icon.delete_small}\"\n ></temba-icon>\n </div>\n <div class=\"attachment-name\">\n <span\n title=\"${invalidAttachment.filename} (${formatFileSize(\n 0,\n 0\n )}) - Attachment failed - ${invalidAttachment.error}\"\n >${truncate(invalidAttachment.filename, 25)}\n (${formatFileSize(0, 0)}) - Attachment failed</span\n >\n </div>\n </div>`;\n })}`\n : null}\n `;\n }\n\n private getActions(): TemplateResult {\n return html`\n <temba-tabs\n embedded\n focusedname\n bottom\n refresh=\"${this.currentAttachments.length}|${this.index}|${this\n .currentQuickReplies.length}\"\n >\n ${this.attachments\n ? html`<temba-tab\n name=\"Attachments\"\n icon=\"attachment\"\n .count=${this.currentAttachments.length}\n >\n <div class=\"items attachments\"></div>\n </temba-tab>`\n : null}\n ${this.quickReplies\n ? html`<temba-tab\n name=\"Quick Replies\"\n icon=\"quick_replies\"\n .count=${this.currentQuickReplies.length}\n >\n <temba-select\n @change=${this.handleQuickReplyChange}\n .values=${this.currentQuickReplies}\n class=\"quick-replies\"\n tags\n multi\n searchable\n expressions\n placeholder=\"Add Quick Reply\"\n ></temba-select>\n </temba-tab>`\n : null}\n <div slot=\"tab-right\" class=\"top-right\">\n ${this.buttonError\n ? html`<div class=\"send-error\">${this.buttonError}</div>`\n : null}\n ${this.counter ? this.getCounter() : null}\n ${this.button ? this.getButton() : null}\n </div>\n </temba-tabs>\n `;\n }\n\n private getUploader(): TemplateResult {\n if (this.uploading) {\n return html`<temba-loading units=\"3\" size=\"12\"></temba-loading>`;\n } else {\n return this.currentAttachments.length < this.maxAttachments\n ? html`<input\n type=\"file\"\n id=\"upload-input\"\n multiple\n accept=\"${this.accept}\"\n @change=\"${this.handleUploadFileInputChanged}\"\n />\n <label\n id=\"upload-label\"\n class=\"actions-left upload-label\"\n for=\"upload-input\"\n >\n <div\n class=\"add-attachment\"\n @click=\"${this.handleUploadFileIconClicked}\"\n >\n <temba-icon name=\"add\" size=\"1.5\"></temba-icon>\n </div>\n </label>`\n : null;\n }\n }\n\n private getCounter(): TemplateResult {\n return html`<temba-charcount\n .text=\"${this.currentText}\"\n ></temba-charcount>`;\n }\n\n private getButton(): TemplateResult {\n return html` <temba-button\n id=\"send-button\"\n name=${this.buttonName}\n @click=${this.handleSendClick}\n ?disabled=${this.buttonDisabled}\n ></temba-button>`;\n }\n}\n"]}
1
+ {"version":3,"file":"Compose.js","sourceRoot":"","sources":["../../../src/compose/Compose.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAc,eAAe,EAAY,MAAM,eAAe,CAAC;AACtE,OAAO,EACL,cAAc,EACd,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,sBAAsB,EAEtB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAMlB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4LT,CAAC;IACJ,CAAC;IAsFD;QACE,KAAK,EAAE,CAAC;QApFV,UAAK,GAAG,CAAC,CAAC;QAGV,mBAAc,GAAG,CAAC,CAAC;QAGnB,cAAS,GAAG,GAAG,CAAC;QAwBhB,gBAAW,GAAG,EA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EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+CACxB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4CAC5B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;2CAClC;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;uCACT;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAOpB;AAGP;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACH","sourcesContent":["import { TemplateResult, html, css } from 'lit';\nimport { FormElement } from '../FormElement';\nimport { property } from 'lit/decorators.js';\nimport { Icon } from '../vectoricon';\nimport { Attachment, CustomEventType, Language } from '../interfaces';\nimport {\n formatFileSize,\n getClasses,\n postFormData,\n truncate,\n DEFAULT_MEDIA_ENDPOINT,\n WebResponse,\n isImageAttachment,\n} from '../utils';\nimport { Completion } from '../completion/Completion';\nimport { Select } from '../select/Select';\nimport { TabPane } from '../tabpane/TabPane';\nimport { EventHandler } from '../RapidElement';\n\nexport class Compose extends FormElement {\n static get styles() {\n return css`\n .container {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n\n border-radius: var(--curvature-widget);\n background: var(--color-widget-bg);\n border: 1px solid var(--color-widget-border);\n transition: all ease-in-out var(--transition-speed);\n box-shadow: var(--widget-box-shadow);\n caret-color: var(--input-caret);\n }\n\n .drop-mask {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n z-index: 2;\n height: 100%;\n width: 100%;\n bottom: 0;\n right: 0;\n background: rgba(210, 243, 184, 0.8);\n border-radius: var(--curvature-widget);\n margin: -0.5em;\n padding: 0.5em;\n transition: opacity ease-in-out var(--transition-speed);\n display: flex;\n align-items: center;\n text-align: center;\n }\n\n .highlight .drop-mask {\n opacity: 1;\n }\n\n .drop-mask > div {\n margin: auto;\n border-radius: var(--curvature-widget);\n font-weight: 400;\n color: rgba(0, 0, 0, 0.5);\n }\n\n .items {\n }\n\n .chatbox {\n --color-widget-border: none;\n --curvature-widget: var(--curvature) var(--curvature) 0px 0px;\n --textarea-min-height: 4em;\n }\n\n .attachments {\n }\n .attachments-list {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding: 0.2em;\n }\n .attachment-item {\n padding: 0.4em;\n }\n .attachment-item.error {\n background: #fff;\n color: rgba(250, 0, 0, 0.75);\n padding: 0.2em;\n margin: 0.3em 0.5em;\n border-radius: var(--curvature);\n display: block;\n }\n\n .remove-item {\n position: absolute;\n --icon-color: #ccc;\n background: #fff;\n border-radius: 99%;\n transform: scale(0);\n transition: transform 200ms linear;\n }\n\n .attachment-item:hover .remove-item {\n transform: scale(1);\n }\n\n .remove-item:hover {\n --icon-color: #333;\n cursor: pointer;\n }\n\n .remove-item.error:hover {\n background: rgba(250, 0, 0, 0.1);\n }\n\n .remove-item.error {\n background: rgba(250, 0, 0, 0.05);\n color: rgba(250, 0, 0, 0.75);\n }\n .attachment-name {\n align-self: center;\n font-size: 12px;\n padding: 2px 8px;\n }\n\n .actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0em;\n background: #f9f9f9;\n border-bottom-left-radius: var(--curvature);\n border-bottom-right-radius: var(--curvature);\n border-top: solid 1px var(--color-widget-border);\n }\n\n #upload-input {\n display: none;\n }\n .upload-label {\n display: flex;\n align-items: center;\n }\n .upload-icon {\n color: rgb(102, 102, 102);\n }\n .actions-right {\n display: flex;\n align-items: center;\n }\n temba-charcount {\n margin-right: 5px;\n overflow: hidden;\n --temba-charcount-counts-margin-top: 0px;\n --temba-charcount-summary-margin-top: 0px;\n --temba-charcount-summary-position: fixed;\n --temba-charcount-summary-right: 105px;\n --temba-charcount-summary-bottom: 105px;\n }\n temba-button {\n --button-y: 1px;\n --button-x: 12px;\n }\n .send-error {\n color: rgba(250, 0, 0, 0.75);\n font-size: var(--help-text-size);\n }\n\n .language {\n margin-bottom: 0.6em;\n display: block;\n z-index: 2;\n }\n\n .top-right {\n align-items: center;\n display: flex;\n }\n\n #send-button {\n margin: 0.3em;\n }\n\n temba-tabs {\n --focused-tab-color: #f4f4f4;\n }\n\n .quick-replies {\n margin: 0.8em;\n }\n\n .add-attachment {\n padding: 1em;\n background: #eee;\n border-radius: var(--curvature);\n color: #aaa;\n margin: 0.5em;\n }\n\n .add-attachment:hover {\n background: #e9e9e9;\n cursor: pointer;\n }\n\n temba-loading {\n margin: auto 1em;\n }\n `;\n }\n\n @property({ type: Number })\n index = 1;\n\n @property({ type: Number })\n maxAttachments = 3;\n\n @property({ type: Number })\n maxLength = 640;\n\n @property({ type: Boolean })\n completion: boolean;\n\n @property({ type: Boolean })\n chatbox: boolean;\n\n @property({ type: Boolean })\n attachments: boolean;\n\n @property({ type: Boolean })\n quickReplies: boolean;\n\n @property({ type: Boolean })\n counter: boolean;\n\n @property({ type: Boolean })\n pendingDrop: boolean;\n\n @property({ type: Boolean })\n button: boolean;\n\n @property({ type: String })\n currentText = '';\n\n @property({ type: String })\n initialText = '';\n\n @property({ type: String })\n accept = ''; //e.g. \".xls,.xlsx\"\n\n @property({ type: String, attribute: false })\n endpoint = DEFAULT_MEDIA_ENDPOINT;\n\n @property({ type: Boolean, attribute: false })\n uploading: boolean;\n\n @property({ type: Array })\n languages: Language[] = [];\n\n @property({ type: Array })\n currentAttachments: Attachment[] = [];\n\n @property({ type: Array })\n currentQuickReplies: { name: string; value: string }[] = [];\n\n @property({ type: Array, attribute: false })\n failedAttachments: Attachment[] = [];\n\n @property({ type: String })\n buttonName = 'Send';\n\n @property({ type: Boolean, attribute: false })\n buttonDisabled = true;\n\n @property({ type: String, attribute: false })\n buttonError = '';\n\n @property({ type: Boolean, attribute: 'widget_only' })\n widgetOnly: boolean;\n\n @property({ type: Array })\n errors: string[];\n\n @property({ type: Object })\n langValues: {\n [lang: string]: {\n text: string;\n attachments: Attachment[];\n quick_replies: string[];\n };\n } = {};\n\n @property({ type: String })\n currentLanguage = 'und';\n\n public constructor() {\n super();\n }\n\n private handleTabChanged() {\n const tabs = this.shadowRoot.querySelector('temba-tabs') as TabPane;\n const tab = tabs.getCurrentTab();\n if (tab) {\n // check we are going for the first attachment\n if (tab.icon == 'attachment') {\n if (this.currentAttachments.length == 0) {\n this.handleUploadFileIconClicked();\n }\n }\n }\n }\n\n public getEventHandlers(): EventHandler[] {\n return [\n { event: CustomEventType.ContextChanged, method: this.handleTabChanged },\n ];\n }\n\n public firstUpdated(changes: Map<string, any>): void {\n super.firstUpdated(changes);\n\n if (changes.has('languages') && this.languages.length > 0) {\n this.currentLanguage = this.languages[0].iso;\n }\n\n if (changes.has('value')) {\n this.langValues = this.getDeserializedValue() || {};\n }\n this.setFocusOnChatbox();\n }\n\n public updated(changes: Map<string, any>): void {\n super.updated(changes);\n\n if (changes.has('currentLanguage') && this.langValues) {\n let langValue = {\n text: '',\n attachments: [],\n quick_replies: [],\n };\n\n if (this.currentLanguage in this.langValues) {\n langValue = this.langValues[this.currentLanguage];\n }\n\n this.currentText = langValue.text;\n this.initialText = langValue.text;\n this.currentAttachments = langValue.attachments;\n this.currentQuickReplies = (langValue.quick_replies || []).map(value => {\n return { name: value, value };\n });\n this.setFocusOnChatbox();\n\n // TODO: this feels like it shouldn't be needed\n const chatbox = this.shadowRoot.querySelector('.chatbox') as any;\n if (chatbox) {\n chatbox.value = this.initialText;\n }\n this.resetTabs();\n this.requestUpdate('currentAttachments');\n }\n\n if (\n this.langValues &&\n (changes.has('currentText') ||\n changes.has('currentAttachments') ||\n changes.has('currentQuickReplies'))\n ) {\n this.toggleButton();\n\n const trimmed = this.currentText ? this.currentText.trim() : '';\n if (\n trimmed ||\n this.currentAttachments.length > 0 ||\n this.currentQuickReplies.length > 0\n ) {\n this.langValues[this.currentLanguage] = {\n text: trimmed,\n attachments: this.currentAttachments,\n quick_replies: this.currentQuickReplies.map(option => option.value),\n };\n } else {\n delete this.langValues[this.currentLanguage];\n }\n this.fireCustomEvent(CustomEventType.ContentChanged, this.langValues);\n this.requestUpdate('langValues');\n this.setValue(this.langValues);\n }\n }\n\n private setFocusOnChatbox(): void {\n if (this.chatbox) {\n const completion = this.shadowRoot.querySelector(\n '.chatbox'\n ) as Completion;\n if (completion) {\n window.setTimeout(() => {\n completion.focus();\n // this.resetTabs();\n }, 0);\n }\n }\n }\n\n public reset(): void {\n (this.shadowRoot.querySelector('.chatbox') as HTMLInputElement).value = '';\n this.initialText = '';\n this.currentText = '';\n this.currentQuickReplies = [];\n this.currentAttachments = [];\n this.failedAttachments = [];\n this.buttonError = '';\n }\n\n private handleQuickReplyChange(event: InputEvent) {\n this.requestUpdate('currentQuickReplies');\n }\n\n private handleChatboxChange(evt: Event) {\n const chatbox = evt.target as HTMLInputElement;\n this.currentText = chatbox.value;\n }\n\n private handleDragEnter(evt: DragEvent): void {\n this.highlight(evt);\n }\n\n private handleDragOver(evt: DragEvent): void {\n this.highlight(evt);\n }\n\n private handleDragLeave(evt: DragEvent): void {\n this.unhighlight(evt);\n }\n\n private handleDrop(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.unhighlight(evt);\n const dt = evt.dataTransfer;\n if (dt) {\n const files = dt.files;\n this.uploadFiles(files);\n }\n }\n }\n\n private preventDefaults(evt: Event): void {\n evt.preventDefault();\n evt.stopPropagation();\n }\n\n private highlight(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.pendingDrop = true;\n this.preventDefaults(evt);\n }\n }\n\n private unhighlight(evt: DragEvent): void {\n if (this.canAcceptAttachments()) {\n this.pendingDrop = false;\n this.preventDefaults(evt);\n }\n }\n\n private handleUploadFileIconClicked(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n private handleUploadFileInputChanged(evt: Event): void {\n const target = evt.target as HTMLInputElement;\n const files = target.files;\n this.uploadFiles(files);\n }\n\n public canAcceptAttachments() {\n return (\n this.attachments && this.currentAttachments.length < this.maxAttachments\n );\n }\n\n public uploadFiles(files: FileList): void {\n let filesToUpload = [];\n if (this.currentAttachments && this.currentAttachments.length > 0) {\n //remove duplicate files that have already been uploaded\n filesToUpload = [...files].filter(file => {\n const index = this.currentAttachments.findIndex(\n value => value.filename === file.name && value.size === file.size\n );\n if (index === -1) {\n return file;\n }\n });\n } else {\n filesToUpload = [...files];\n }\n filesToUpload.map(fileToUpload => {\n this.uploadFile(fileToUpload);\n });\n }\n\n private uploadFile(file: File): void {\n this.uploading = true;\n\n const url = this.endpoint;\n const payload = new FormData();\n payload.append('file', file);\n postFormData(url, payload)\n .then((response: WebResponse) => {\n if (this.currentAttachments.length >= this.maxAttachments) {\n this.addFailedAttachment(file, 'Too many attachments');\n } else {\n const attachment = response.json as Attachment;\n if (attachment) {\n this.addCurrentAttachment(attachment);\n }\n }\n })\n .catch((error: WebResponse) => {\n let uploadError = '';\n if (error.status === 400) {\n uploadError = error.json.file[0];\n } else {\n uploadError = 'Server failure';\n }\n console.error(uploadError);\n this.addFailedAttachment(file, uploadError);\n })\n .finally(() => {\n this.uploading = false;\n });\n }\n\n private addCurrentAttachment(attachmentToAdd: any) {\n this.currentAttachments.push(attachmentToAdd);\n this.requestUpdate('currentAttachments');\n }\n private removeCurrentAttachment(attachmentToRemove: any) {\n this.currentAttachments = this.currentAttachments.filter(\n currentAttachment => currentAttachment !== attachmentToRemove\n );\n this.requestUpdate('currentAttachments');\n }\n\n private addFailedAttachment(file: File, error: string) {\n const failedAttachment = {\n uuid: Math.random().toString(36).slice(2, 6),\n content_type: file.type,\n filename: file.name,\n url: file.name,\n size: file.size,\n error: error,\n } as Attachment;\n this.failedAttachments.push(failedAttachment);\n this.requestUpdate('failedAttachments');\n }\n private removeFailedAttachment(attachmentToRemove: any) {\n this.failedAttachments = this.failedAttachments.filter(\n (failedAttachment: any) => failedAttachment !== attachmentToRemove\n );\n this.requestUpdate('failedAttachments');\n }\n\n private handleRemoveFileClicked(evt: Event): void {\n const target = evt.target as HTMLDivElement;\n\n const currentAttachmentToRemove = this.currentAttachments.find(\n ({ uuid }) => uuid === target.id\n );\n if (currentAttachmentToRemove) {\n this.removeCurrentAttachment(currentAttachmentToRemove);\n }\n\n const failedAttachmentToRemove = this.failedAttachments.find(\n ({ uuid }) => uuid === target.id\n );\n if (failedAttachmentToRemove) {\n this.removeFailedAttachment(failedAttachmentToRemove);\n }\n }\n\n public toggleButton() {\n if (this.button) {\n this.buttonError = '';\n const chatboxEmpty = this.currentText.trim().length === 0;\n const attachmentsEmpty = this.currentAttachments.length === 0;\n if (this.chatbox && this.attachments) {\n this.buttonDisabled = chatboxEmpty && attachmentsEmpty;\n } else if (this.chatbox) {\n this.buttonDisabled = chatboxEmpty;\n } else if (this.attachments) {\n this.buttonDisabled = attachmentsEmpty;\n } else {\n this.buttonDisabled = true;\n }\n }\n }\n\n private handleSendClick(evt: Event) {\n evt.stopPropagation();\n this.handleSend();\n }\n\n private handleSendEnter(evt: KeyboardEvent) {\n if (this.button) {\n if (evt.key === 'Enter' && !evt.shiftKey) {\n if (this.completion) {\n const chat = evt.target as Completion;\n if (!chat.hasVisibleOptions()) {\n this.handleSend();\n this.preventDefaults(evt);\n }\n } else {\n this.handleSend();\n this.preventDefaults(evt);\n }\n }\n }\n }\n\n private handleSend() {\n if (!this.buttonDisabled) {\n this.buttonDisabled = true;\n const name = this.buttonName;\n this.fireCustomEvent(CustomEventType.ButtonClicked, { name });\n }\n }\n\n private handleLanguageChange(evt: Event) {\n const select = evt.target as Select;\n this.currentLanguage = select.values[0].iso;\n }\n\n public resetTabs() {\n (this.shadowRoot.querySelector('temba-tabs') as TabPane).index = -1;\n }\n\n public render(): TemplateResult {\n return html`\n <temba-field\n name=${this.name}\n .errors=${this.errors}\n .widgetOnly=${this.widgetOnly}\n .value=${this.value}\n >\n ${this.languages.length > 1\n ? html`<temba-select\n @change=${this.handleLanguageChange}\n class=\"language\"\n name=\"language\"\n .staticOptions=${this.languages}\n valueKey=\"iso\"\n >\n </temba-select>`\n : null}\n\n <div\n class=${getClasses({ container: true, highlight: this.pendingDrop })}\n @dragenter=\"${this.handleDragEnter}\"\n @dragover=\"${this.handleDragOver}\"\n @dragleave=\"${this.handleDragLeave}\"\n @drop=\"${this.handleDrop}\"\n >\n <div class=\"drop-mask\"><div>Upload Attachment</div></div>\n\n ${this.chatbox ? html`${this.getChatbox()}` : null}\n\n <div class=\"items actions\">${this.getActions()}</div>\n </div>\n </temba-field>\n `;\n }\n\n private getChatbox(): TemplateResult {\n if (this.completion) {\n return html`<temba-completion\n class=\"chatbox\"\n .value=${this.initialText}\n gsm\n textarea\n autogrow\n maxlength=${this.maxLength}\n @change=${this.handleChatboxChange}\n @keydown=${this.handleSendEnter}\n placeholder=\"Write something here\"\n >\n </temba-completion>`;\n } else {\n return html`<temba-textinput\n class=\"chatbox\"\n gsm\n textarea\n autogrow\n maxlength=${this.maxLength}\n .value=${this.initialText}\n @change=${this.handleChatboxChange}\n @keydown=${this.handleSendEnter}\n placeholder=\"Write something here\"\n >\n </temba-textinput>`;\n }\n }\n\n private getAttachments(): TemplateResult {\n return html`\n ${this.attachments\n ? html` <div class=\"attachments-list\">\n ${this.currentAttachments.map(validAttachment => {\n return html` <div class=\"attachment-item\">\n <temba-icon\n class=\"remove-item\"\n @click=\"${this.handleRemoveFileClicked}\"\n id=\"${validAttachment.uuid}\"\n name=\"${Icon.delete_small}\"\n ></temba-icon>\n ${isImageAttachment(validAttachment)\n ? html`<temba-thumbnail\n url=\"${validAttachment.url}\"\n ></temba-thumbnail>`\n : html`<temba-thumbnail\n label=\"${validAttachment.content_type.split('/')[1]}\"\n ></temba-thumbnail>`}\n </div>`;\n })}\n ${this.getUploader()}\n </div>\n ${this.failedAttachments.map(invalidAttachment => {\n return html` <div class=\"attachment-item error\">\n <div\n class=\"remove-item error\"\n @click=\"${this.handleRemoveFileClicked}\"\n >\n <temba-icon\n id=\"${invalidAttachment.uuid}\"\n name=\"${Icon.delete_small}\"\n ></temba-icon>\n </div>\n <div class=\"attachment-name\">\n <span\n title=\"${invalidAttachment.filename} (${formatFileSize(\n 0,\n 0\n )}) - Attachment failed - ${invalidAttachment.error}\"\n >${truncate(invalidAttachment.filename, 25)}\n (${formatFileSize(0, 0)}) - Attachment failed</span\n >\n </div>\n </div>`;\n })}`\n : null}\n `;\n }\n\n private getActions(): TemplateResult {\n return html`\n <temba-tabs\n embedded\n focusedname\n bottom\n refresh=\"${this.currentAttachments.length}|${this.index}|${this\n .currentQuickReplies.length}\"\n >\n ${this.attachments\n ? html`<temba-tab\n name=\"Attachments\"\n icon=\"attachment\"\n .count=${this.currentAttachments.length}\n >\n <div class=\"items attachments\">${this.getAttachments()}</div>\n </temba-tab>`\n : null}\n ${this.quickReplies\n ? html`<temba-tab\n name=\"Quick Replies\"\n icon=\"quick_replies\"\n .count=${this.currentQuickReplies.length}\n >\n <temba-select\n @change=${this.handleQuickReplyChange}\n .values=${this.currentQuickReplies}\n class=\"quick-replies\"\n tags\n multi\n searchable\n expressions\n placeholder=\"Add Quick Reply\"\n ></temba-select>\n </temba-tab>`\n : null}\n <div slot=\"tab-right\" class=\"top-right\">\n ${this.buttonError\n ? html`<div class=\"send-error\">${this.buttonError}</div>`\n : null}\n ${this.counter ? this.getCounter() : null}\n ${this.button ? this.getButton() : null}\n </div>\n </temba-tabs>\n `;\n }\n\n private getUploader(): TemplateResult {\n if (this.uploading) {\n return html`<temba-loading units=\"3\" size=\"12\"></temba-loading>`;\n } else {\n return this.currentAttachments.length < this.maxAttachments\n ? html`<input\n type=\"file\"\n id=\"upload-input\"\n multiple\n accept=\"${this.accept}\"\n @change=\"${this.handleUploadFileInputChanged}\"\n />\n <label\n id=\"upload-label\"\n class=\"actions-left upload-label\"\n for=\"upload-input\"\n >\n <div\n class=\"add-attachment\"\n @click=\"${this.handleUploadFileIconClicked}\"\n >\n <temba-icon name=\"add\" size=\"1.5\"></temba-icon>\n </div>\n </label>`\n : null;\n }\n }\n\n private getCounter(): TemplateResult {\n return html`<temba-charcount\n .text=\"${this.currentText}\"\n ></temba-charcount>`;\n }\n\n private getButton(): TemplateResult {\n return html` <temba-button\n id=\"send-button\"\n name=${this.buttonName}\n @click=${this.handleSendClick}\n ?disabled=${this.buttonDisabled}\n ></temba-button>`;\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 = '9c84101e8549effb3e17279445ff41e3';
2
+ export const SVG_FINGERPRINT = '8dab8ee62610a33e1b9643402301d455';
3
3
  // only icons below are included in the sprite sheet
4
4
  export var Icon;
5
5
  (function (Icon) {
@@ -78,7 +78,6 @@ export var Icon;
78
78
  Icon["contact_stopped"] = "slash-octagon";
79
79
  Icon["contact_updated"] = "user-edit";
80
80
  Icon["contacts"] = "user-01";
81
- Icon["conversation"] = "message-chat-square";
82
81
  Icon["copy"] = "copy-04";
83
82
  Icon["dashboard"] = "pie-chart-01";
84
83
  Icon["delete"] = "trash-03";
@@ -146,7 +145,6 @@ export var Icon;
146
145
  Icon["featured"] = "star-01";
147
146
  Icon["quick_replies"] = "dotpoints-01";
148
147
  Icon["recording"] = "microphone-01";
149
- Icon["referral"] = "user-right-01";
150
148
  Icon["resend"] = "refresh-cw-05";
151
149
  Icon["reset"] = "flip-backward";
152
150
  Icon["resthooks"] = "share-07";
@@ -181,6 +179,16 @@ export var Icon;
181
179
  Icon["trigger_active"] = "play";
182
180
  Icon["trigger_archived"] = "archive";
183
181
  Icon["trigger_new"] = "plus";
182
+ Icon["trigger_keyword"] = "message-check-square";
183
+ Icon["trigger_catch_all"] = "message-question-square";
184
+ Icon["trigger_inbound_call"] = "phone-incoming-01";
185
+ Icon["trigger_missed_call"] = "phone-hang-up";
186
+ Icon["trigger_schedule"] = "calendar";
187
+ Icon["trigger_new_conversation"] = "conversation";
188
+ Icon["trigger_referral"] = "user-right-01";
189
+ Icon["trigger_closed_ticket"] = "agent";
190
+ Icon["trigger_opt_in"] = "message-check-circle";
191
+ Icon["trigger_opt_out"] = "message-x-circle";
184
192
  Icon["triggers"] = "signal-01";
185
193
  Icon["updated"] = "edit-02";
186
194
  Icon["up"] = "chevron-up";
@@ -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,IA8MX;AA9MD,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,uCAA+B,CAAA;IAC/B,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,yCAAiC,CAAA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B,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,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,EA9MW,IAAI,KAAJ,IAAI,QA8Mf","sourcesContent":["// for cache busting we dynamically generate a fingerprint, use yarn svg to update\nexport const SVG_FINGERPRINT = '9c84101e8549effb3e17279445ff41e3';\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_stopped = 'slash-octagon',\n contact_updated = 'user-edit',\n contacts = 'user-01',\n conversation = 'message-chat-square',\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 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 referral = 'user-right-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 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":["../../../src/vectoricon/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAElE,oDAAoD;AACpD,MAAM,CAAN,IAAY,IAsNX;AAtND,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,uCAA+B,CAAA;IAC/B,uCAA+B,CAAA;IAC/B,qCAA6B,CAAA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,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,EAtNW,IAAI,KAAJ,IAAI,QAsNf","sourcesContent":["// for cache busting we dynamically generate a fingerprint, use yarn svg to update\nexport const SVG_FINGERPRINT = '8dab8ee62610a33e1b9643402301d455';\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_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 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 = 'conversation',\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.63.0",
3
+ "version": "0.63.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",
@@ -767,7 +767,7 @@ export class Compose extends FormElement {
767
767
  icon="attachment"
768
768
  .count=${this.currentAttachments.length}
769
769
  >
770
- <div class="items attachments"></div>
770
+ <div class="items attachments">${this.getAttachments()}</div>
771
771
  </temba-tab>`
772
772
  : null}
773
773
  ${this.quickReplies
@@ -1,5 +1,5 @@
1
1
  // for cache busting we dynamically generate a fingerprint, use yarn svg to update
2
- export const SVG_FINGERPRINT = '9c84101e8549effb3e17279445ff41e3';
2
+ export const SVG_FINGERPRINT = '8dab8ee62610a33e1b9643402301d455';
3
3
 
4
4
  // only icons below are included in the sprite sheet
5
5
  export enum Icon {
@@ -78,7 +78,6 @@ export enum Icon {
78
78
  contact_stopped = 'slash-octagon',
79
79
  contact_updated = 'user-edit',
80
80
  contacts = 'user-01',
81
- conversation = 'message-chat-square',
82
81
  copy = 'copy-04',
83
82
  dashboard = 'pie-chart-01',
84
83
  delete = 'trash-03',
@@ -146,7 +145,6 @@ export enum Icon {
146
145
  featured = 'star-01',
147
146
  quick_replies = 'dotpoints-01',
148
147
  recording = 'microphone-01',
149
- referral = 'user-right-01',
150
148
  resend = 'refresh-cw-05',
151
149
  reset = 'flip-backward',
152
150
  resthooks = 'share-07',
@@ -181,6 +179,16 @@ export enum Icon {
181
179
  trigger_active = 'play',
182
180
  trigger_archived = 'archive',
183
181
  trigger_new = 'plus',
182
+ trigger_keyword = 'message-check-square',
183
+ trigger_catch_all = 'message-question-square',
184
+ trigger_inbound_call = 'phone-incoming-01',
185
+ trigger_missed_call = 'phone-hang-up',
186
+ trigger_schedule = 'calendar',
187
+ trigger_new_conversation = 'conversation',
188
+ trigger_referral = 'user-right-01',
189
+ trigger_closed_ticket = 'agent',
190
+ trigger_opt_in = 'message-check-circle',
191
+ trigger_opt_out = 'message-x-circle',
184
192
  triggers = 'signal-01',
185
193
  updated = 'edit-02',
186
194
  up = 'chevron-up',