@nyaruka/temba-components 0.85.0 → 0.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,26 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.86.1](https://github.com/nyaruka/temba-components/compare/v0.86.0...v0.86.1)
8
+
9
+ - Bump ejs from 3.1.9 to 3.1.10 [`#420`](https://github.com/nyaruka/temba-components/pull/420)
10
+ - Include number of records on notifications for some export types [`#424`](https://github.com/nyaruka/temba-components/pull/424)
11
+ - Support flow export notification [`#423`](https://github.com/nyaruka/temba-components/pull/423)
12
+ - Support definition export notification [`cd69bec`](https://github.com/nyaruka/temba-components/commit/cd69bec0f4a5e836f1635348df835d13f641f093)
13
+
14
+ #### [v0.86.0](https://github.com/nyaruka/temba-components/compare/v0.85.0...v0.86.0)
15
+
16
+ > 2 May 2024
17
+
18
+ - Allow selection of disabled contact fields [`#422`](https://github.com/nyaruka/temba-components/pull/422)
19
+ - Update webchat protocol [`#421`](https://github.com/nyaruka/temba-components/pull/421)
20
+ - Updates to webchat protocol [`4a66673`](https://github.com/nyaruka/temba-components/commit/4a66673526f123474b18d2ae8842b33144b5e3bc)
21
+ - fix typo [`f90a03f`](https://github.com/nyaruka/temba-components/commit/f90a03f4f4a8450371c81fb36465b8a73dca6e8f)
22
+
7
23
  #### [v0.85.0](https://github.com/nyaruka/temba-components/compare/v0.84.0...v0.85.0)
8
24
 
25
+ > 1 May 2024
26
+
9
27
  - Switched to indexed template variables [`#419`](https://github.com/nyaruka/temba-components/pull/419)
10
28
  - Update template editor tests to match new format [`c81422a`](https://github.com/nyaruka/temba-components/commit/c81422a4ca59c66c96d8f809f255febda8cfe63d)
11
29
  - Switch to indexed template variables [`2401b74`](https://github.com/nyaruka/temba-components/commit/2401b74e3fea5c5a415c96d25470575c4fcfbd46)
@@ -42,7 +60,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
42
60
 
43
61
  - Add beat for temba-option collection [`3406463`](https://github.com/nyaruka/temba-components/commit/3406463dd07490615ec979c21c8701f7694a4f80)
44
62
 
45
- #### [v0.80.0](https://github.com/nyaruka/temba-components/compare/v0.77.0...v0.80.0)
63
+ #### [v0.80.0](https://github.com/nyaruka/temba-components/compare/v0.78.2...v0.80.0)
46
64
 
47
65
  > 9 April 2024
48
66
 
@@ -50,12 +68,30 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
50
68
  - Update dependencies [`#411`](https://github.com/nyaruka/temba-components/pull/411)
51
69
  - Dependency updates [`#409`](https://github.com/nyaruka/temba-components/pull/409)
52
70
  - Add status for chat [`#410`](https://github.com/nyaruka/temba-components/pull/410)
53
- - Ensure we have icons for all channel types in use [`#407`](https://github.com/nyaruka/temba-components/pull/407)
54
- - Rework `temba-date` to be inline span instead of div [`#406`](https://github.com/nyaruka/temba-components/pull/406)
55
71
  - Yarn update [`9fe452e`](https://github.com/nyaruka/temba-components/commit/9fe452ece62a7f40707e37ac1bd70ea10cd87789)
56
72
  - Update open-wc [`f433526`](https://github.com/nyaruka/temba-components/commit/f4335262417c6c45f45b60f3fad0a7f1204845e7)
57
73
  - Show connection status on chat widget [`f75ec9b`](https://github.com/nyaruka/temba-components/commit/f75ec9b61d5ab7e2080d887f2afc3a28b86148eb)
58
74
 
75
+ #### [v0.78.2](https://github.com/nyaruka/temba-components/compare/v0.78.1...v0.78.2)
76
+
77
+ > 4 April 2024
78
+
79
+ - Add icons for template statuses [`4b1cf1c`](https://github.com/nyaruka/temba-components/commit/4b1cf1c9dce5c5b508a000cef9c99dc0684f1a8e)
80
+
81
+ #### [v0.78.1](https://github.com/nyaruka/temba-components/compare/v0.78.0...v0.78.1)
82
+
83
+ > 4 April 2024
84
+
85
+ - Ensure we have icons for all channel types in use [`#407`](https://github.com/nyaruka/temba-components/pull/407)
86
+
87
+ #### [v0.78.0](https://github.com/nyaruka/temba-components/compare/v0.77.0...v0.78.0)
88
+
89
+ > 3 April 2024
90
+
91
+ - Rework `temba-date` to be inline span instead of div [`#406`](https://github.com/nyaruka/temba-components/pull/406)
92
+ - Add test to ensure date renders inline [`abcbc1f`](https://github.com/nyaruka/temba-components/commit/abcbc1f226e59a39b6f53d00d9178adb68df852d)
93
+ - Rework temba-date to be inline [`78af86e`](https://github.com/nyaruka/temba-components/commit/78af86e22b92cd2546b62bfc7bd46250250b84cf)
94
+
59
95
  #### [v0.77.0](https://github.com/nyaruka/temba-components/compare/v0.76.0...v0.77.0)
60
96
 
61
97
  > 29 March 2024
@@ -318,16 +354,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
318
354
  - Fix reading created_by for msg events [`#364`](https://github.com/nyaruka/temba-components/pull/364)
319
355
  - Add logical icon names for optin and optout [`#365`](https://github.com/nyaruka/temba-components/pull/365)
320
356
 
321
- #### [v0.58.8](https://github.com/nyaruka/temba-components/compare/v0.58.7...v0.58.8)
357
+ #### [v0.58.8](https://github.com/nyaruka/temba-components/compare/v0.58.6...v0.58.8)
322
358
 
323
359
  > 28 September 2023
324
360
 
325
361
  - Update publish.yml [`7dc7d69`](https://github.com/nyaruka/temba-components/commit/7dc7d69822942b39c3b35e06846cfd4c65108b2d)
326
362
 
327
- #### [v0.58.7](https://github.com/nyaruka/temba-components/compare/v0.58.6...v0.58.7)
328
-
329
- > 28 September 2023
330
-
331
363
  #### [v0.58.6](https://github.com/nyaruka/temba-components/compare/v0.58.5...v0.58.6)
332
364
 
333
365
  > 28 September 2023
@@ -31,7 +31,7 @@ let rt=class extends w{constructor(){super(...arguments),this.renderOptions={hos
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */function pe(t){return(e,i)=>"object"==typeof i?ue(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}class me extends ce{constructor(){super(),this.name="",this.value=null,this.inputRoot=this,this.disabled=!1,this.internals=this.attachInternals()}updated(t){super.updated(t),t.has("value")&&this.internals.setFormValue(this.value)}get form(){return this.internals.form}setValue(t){this.value=this.serializeValue(t)}getDeserializedValue(){return JSON.parse(this.value)}serializeValue(t){return JSON.stringify(t)}}me.formAssociated=!0,t([pe({type:String})],me.prototype,"name",void 0),t([pe({type:String,attribute:"help_text"})],me.prototype,"helpText",void 0),t([pe({type:Boolean,attribute:"help_always"})],me.prototype,"helpAlways",void 0),t([pe({type:Boolean,attribute:"widget_only"})],me.prototype,"widgetOnly",void 0),t([pe({type:Boolean,attribute:"hide_label"})],me.prototype,"hideLabel",void 0),t([pe({type:String})],me.prototype,"label",void 0),t([pe({type:Array})],me.prototype,"errors",void 0),t([pe({type:String})],me.prototype,"value",void 0),t([pe({attribute:!1})],me.prototype,"inputRoot",void 0),t([pe({type:Boolean})],me.prototype,"disabled",void 0);var ge;!function(t){t.alert_warning="alert-square",t.account="user-01",t.active="play",t.add="plus",t.add_note="file-02",t.airtime="bank-note-01",t.analytics="bar-chart-01",t.archive="archive",t.arrow_up="chevron-up",t.arrow_down="chevron-down",t.arrow_left="chevron-left",t.arrow_right="chevron-right",t.attachment="paperclip",t.attachment_audio="volume-min",t.attachment_document="file-06",t.attachment_image="image-01",t.attachment_location="marker-pin-01",t.attachment_video="video-recorder",t.branding="brush-02",t.branding_hostname="server-05",t.branding_notifications="mail-01",t.branding_styling="palette",t.branding_raw="pencil-01",t.broadcast="announcement-01",t.call="phone-call-01",t.call_missed="phone-call-02",t.campaign="clock-refresh",t.campaign_active="play",t.campaign_archived="archive",t.campaigns="clock-refresh",t.channel="zap",t.children="git-branch-01",t.check="check",t.checkbox="square",t.checkbox_checked="check-square",t.checkbox_partial="stop-square",t.classifier_wit="classifier-wit",t.classifier_luis="classifier-luis",t.classifier_bothub="classifier-bothub",t.close="x",t.compose="send-01",t.contact="user-01",t.contact_archived="archive",t.contact_blocked="message-x-square",t.contact_export="download-cloud-01",t.contact_import="upload-cloud-01",t.contact_stopped="slash-octagon",t.contact_updated="user-edit",t.contacts="user-01",t.copy="copy-04",t.dashboard="pie-chart-01",t.delete="trash-03",t.delete_small="x",t.down="chevron-down",t.download="download-01",t.edit="edit-03",t.email="mail-01",t.error="alert-circle",t.event="zap",t.expressions="at-sign",t.fields="user-edit",t.filter="filter-funnel-01",t.flow="flow",t.flow_background="layers-two-01",t.flow_interrupted="x-close",t.flow_ivr="phone",t.flow_message="message-square-02",t.flow_surveyor="tablet-01",t.flow_user="hard-drive",t.flows="flow",t.global="at-sign",t.grid="dots-grid",t.group="users-01",t.group_exclude="users-x",t.group_include="users-check",t.group_smart="atom-01",t.help="help-circle",t.hide="eye-off",t.home="settings-02",t.image="image-01",t.inbox="inbox-01",t.incidents="alert-square",t.incoming_call="phone-incoming-01",t.integrations="layers-three-01",t.info="user-square",t.issue="alert-square",t.label="tag-01",t.language="translate-01",t.link="link-external-01",t.location="marker-pin-01",t.log="file-02",t.logout="log-out-04",t.menu="menu-01",t.menu_collapse="chevron-left-double",t.message="message-square-02",t.message_export="download-cloud-01",t.messages="message-square-02",t.missing="maximize-02",t.missed_call="phone-x",t.new="plus",t.next_schedule="alarm-clock",t.notification="bell-01",t.number="hash-01",t.optin_requested="message-notification-circle",t.optin="message-check-circle",t.optout="message-x-circle",t.org_active="credit-card-02",t.org_anonymous="glasses-01",t.org_bulk="credit-card-plus",t.org_flagged="flag-01",t.org_new="stars-02",t.org_suspended="slash-circle-01",t.org_verified="check-verified-02",t.overview="pie-chart-01",t.prometheus="prometheus",t.progress_spinner="refresh-cw-04",t.featured="star-01",t.quick_replies="dotpoints-01",t.recording="microphone-01",t.resend="refresh-cw-05",t.reset="flip-backward",t.resthooks="share-07",t.restore="play",t.results_export="download-cloud-01",t.retry="refresh-cw-05",t.revisions="clock-rewind",t.rocketchat="rocketchat",t.runs="rows-03",t.schedule="calendar",t.search="search-refraction",t.select_open="chevron-down",t.select_clear="x",t.send="send-03",t.service="magic-wand-01",t.service_end="log-out-04",t.settings="settings-02",t.show="eye",t.simulator="phone-02",t.sort="chevron-selector-vertical",t.sort_down="sort-arrow-down",t.sort_up="sort-arrow-up",t.staff="hard-drive",t.submit="check",t.success="check",t.template_approved="check-circle",t.template_pending="hourglass-01",t.template_rejected="alert-circle",t.template_unsupported="alert-circle",t.tickets="agent",t.tickets_all="archive",t.tickets_closed="check",t.tickets_mine="coffee",t.tickets_open="inbox-01",t.tickets_export="download-cloud-01",t.tickets_unassigned="inbox-01",t.topic="message-text-circle-02",t.two_factor_enabled="shield-02",t.two_factor_disabled="shield-01",t.trigger="signal-01",t.trigger_active="play",t.trigger_archived="archive",t.trigger_new="plus",t.trigger_keyword="message-check-square",t.trigger_catch_all="message-question-square",t.trigger_inbound_call="phone-incoming-01",t.trigger_missed_call="phone-hang-up",t.trigger_schedule="calendar",t.trigger_new_conversation="message-chat-square",t.trigger_referral="user-right-01",t.trigger_closed_ticket="agent",t.trigger_opt_in="message-check-circle",t.trigger_opt_out="message-x-circle",t.triggers="signal-01",t.updated="edit-02",t.up="chevron-up",t.upload="upload-cloud-01",t.upload_image="camera-01",t.usages="link-04",t.user="users-01",t.users="users-01",t.user_beta="shield-zap",t.webhook="link-external-01",t.wit="wit",t.workspace="folder",t.zapier="zapier",t.zendesk="zendesk",t.channel_a="channel-android",t.channel_ac="zap",t.channel_at="zap",t.channel_bs="zap",t.channel_bw="zap",t.channel_cs="zap",t.channel_ct="channel-clickatell",t.channel_d3="channel-whatsapp",t.channel_d3c="channel-whatsapp",t.channel_da="zap",t.channel_ds="channel-discord",t.channel_ex="zap",t.channel_fb="channel-facebook",t.channel_fba="channel-facebook",t.channel_fc="channel-freshchat",t.channel_fcm="channel-firebase",t.channel_hm="zap",t.channel_ib="zap",t.channel_ig="channel-instagram",t.channel_jc="channel-jiochat",t.channel_kn="channel-kannel",t.channel_kwa="channel-whatsapp",t.channel_ln="channel-line",t.channel_mt="channel-mtarget",t.channel_mtn="zap",t.channel_nx="channel-vonage",t.channel_pl="channel-plivo",t.channel_rc="channel-rocketchat",t.channel_sl="channel-slack",t.channel_sq="zap",t.channel_st="zap",t.channel_sw="channel-signalwire",t.channel_t="channel-twilio",t.channel_tg="channel-telegram",t.channel_tms="channel-twilio",t.channel_tq="channel-thinq",t.channel_tw="zap",t.channel_twa="channel-whatsapp",t.channel_twc="zap",t.channel_twt="channel-twitter",t.channel_vk="channel-vk",t.channel_vp="channel-viber",t.channel_wa="channel-whatsapp",t.channel_wac="channel-whatsapp",t.channel_wc="channel-wechat",t.channel_yo="zap",t.channel_zvw="channel-whatsapp",t.bothub="bothub",t.chatbase="chatbase",t.dtone="dtone",t.default="list",t.datepicker="calendar",t.slider="sliders-02",t.select="browser",t.input="edit-05"}(ge||(ge={}));class fe extends me{constructor(){super(...arguments),this.name="",this.disabled=!1,this.size=1.2,this.animateChange="pulse"}static get styles(){return r`
34
+ */function pe(t){return(e,i)=>"object"==typeof i?ue(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}class me extends ce{constructor(){super(),this.name="",this.value=null,this.inputRoot=this,this.disabled=!1,this.internals=this.attachInternals()}updated(t){super.updated(t),t.has("value")&&this.internals.setFormValue(this.value)}get form(){return this.internals.form}setValue(t){this.value=this.serializeValue(t)}getDeserializedValue(){return JSON.parse(this.value)}serializeValue(t){return JSON.stringify(t)}}me.formAssociated=!0,t([pe({type:String})],me.prototype,"name",void 0),t([pe({type:String,attribute:"help_text"})],me.prototype,"helpText",void 0),t([pe({type:Boolean,attribute:"help_always"})],me.prototype,"helpAlways",void 0),t([pe({type:Boolean,attribute:"widget_only"})],me.prototype,"widgetOnly",void 0),t([pe({type:Boolean,attribute:"hide_label"})],me.prototype,"hideLabel",void 0),t([pe({type:String})],me.prototype,"label",void 0),t([pe({type:Array})],me.prototype,"errors",void 0),t([pe({type:String})],me.prototype,"value",void 0),t([pe({attribute:!1})],me.prototype,"inputRoot",void 0),t([pe({type:Boolean})],me.prototype,"disabled",void 0);var ge;!function(t){t.alert_warning="alert-square",t.account="user-01",t.active="play",t.add="plus",t.add_note="file-02",t.airtime="bank-note-01",t.analytics="bar-chart-01",t.archive="archive",t.arrow_up="chevron-up",t.arrow_down="chevron-down",t.arrow_left="chevron-left",t.arrow_right="chevron-right",t.attachment="paperclip",t.attachment_audio="volume-min",t.attachment_document="file-06",t.attachment_image="image-01",t.attachment_location="marker-pin-01",t.attachment_video="video-recorder",t.branding="brush-02",t.branding_hostname="server-05",t.branding_notifications="mail-01",t.branding_styling="palette",t.branding_raw="pencil-01",t.broadcast="announcement-01",t.call="phone-call-01",t.call_missed="phone-call-02",t.campaign="clock-refresh",t.campaign_active="play",t.campaign_archived="archive",t.campaigns="clock-refresh",t.channel="zap",t.children="git-branch-01",t.check="check",t.checkbox="square",t.checkbox_checked="check-square",t.checkbox_partial="stop-square",t.classifier_wit="classifier-wit",t.classifier_luis="classifier-luis",t.classifier_bothub="classifier-bothub",t.close="x",t.compose="send-01",t.contact="user-01",t.contact_archived="archive",t.contact_blocked="message-x-square",t.contact_export="download-cloud-01",t.contact_import="upload-cloud-01",t.contact_stopped="slash-octagon",t.contact_updated="user-edit",t.contacts="user-01",t.copy="copy-04",t.dashboard="pie-chart-01",t.definitions_export="download-cloud-01",t.delete="trash-03",t.delete_small="x",t.down="chevron-down",t.download="download-01",t.edit="edit-03",t.email="mail-01",t.error="alert-circle",t.event="zap",t.expressions="at-sign",t.fields="user-edit",t.filter="filter-funnel-01",t.flow="flow",t.flow_background="layers-two-01",t.flow_interrupted="x-close",t.flow_ivr="phone",t.flow_message="message-square-02",t.flow_surveyor="tablet-01",t.flow_user="hard-drive",t.flows="flow",t.global="at-sign",t.grid="dots-grid",t.group="users-01",t.group_exclude="users-x",t.group_include="users-check",t.group_smart="atom-01",t.help="help-circle",t.hide="eye-off",t.home="settings-02",t.image="image-01",t.inbox="inbox-01",t.incidents="alert-square",t.incoming_call="phone-incoming-01",t.integrations="layers-three-01",t.info="user-square",t.issue="alert-square",t.label="tag-01",t.language="translate-01",t.link="link-external-01",t.location="marker-pin-01",t.log="file-02",t.logout="log-out-04",t.menu="menu-01",t.menu_collapse="chevron-left-double",t.message="message-square-02",t.message_export="download-cloud-01",t.messages="message-square-02",t.missing="maximize-02",t.missed_call="phone-x",t.new="plus",t.next_schedule="alarm-clock",t.notification="bell-01",t.number="hash-01",t.optin_requested="message-notification-circle",t.optin="message-check-circle",t.optout="message-x-circle",t.org_active="credit-card-02",t.org_anonymous="glasses-01",t.org_bulk="credit-card-plus",t.org_flagged="flag-01",t.org_new="stars-02",t.org_suspended="slash-circle-01",t.org_verified="check-verified-02",t.overview="pie-chart-01",t.prometheus="prometheus",t.progress_spinner="refresh-cw-04",t.featured="star-01",t.quick_replies="dotpoints-01",t.recording="microphone-01",t.resend="refresh-cw-05",t.reset="flip-backward",t.resthooks="share-07",t.restore="play",t.results_export="download-cloud-01",t.retry="refresh-cw-05",t.revisions="clock-rewind",t.rocketchat="rocketchat",t.runs="rows-03",t.schedule="calendar",t.search="search-refraction",t.select_open="chevron-down",t.select_clear="x",t.send="send-03",t.service="magic-wand-01",t.service_end="log-out-04",t.settings="settings-02",t.show="eye",t.simulator="phone-02",t.sort="chevron-selector-vertical",t.sort_down="sort-arrow-down",t.sort_up="sort-arrow-up",t.staff="hard-drive",t.submit="check",t.success="check",t.template_approved="check-circle",t.template_pending="hourglass-01",t.template_rejected="alert-circle",t.template_unsupported="alert-circle",t.tickets="agent",t.tickets_all="archive",t.tickets_closed="check",t.tickets_mine="coffee",t.tickets_open="inbox-01",t.tickets_export="download-cloud-01",t.tickets_unassigned="inbox-01",t.topic="message-text-circle-02",t.two_factor_enabled="shield-02",t.two_factor_disabled="shield-01",t.trigger="signal-01",t.trigger_active="play",t.trigger_archived="archive",t.trigger_new="plus",t.trigger_keyword="message-check-square",t.trigger_catch_all="message-question-square",t.trigger_inbound_call="phone-incoming-01",t.trigger_missed_call="phone-hang-up",t.trigger_schedule="calendar",t.trigger_new_conversation="message-chat-square",t.trigger_referral="user-right-01",t.trigger_closed_ticket="agent",t.trigger_opt_in="message-check-circle",t.trigger_opt_out="message-x-circle",t.triggers="signal-01",t.updated="edit-02",t.up="chevron-up",t.upload="upload-cloud-01",t.upload_image="camera-01",t.usages="link-04",t.user="users-01",t.users="users-01",t.user_beta="shield-zap",t.webhook="link-external-01",t.wit="wit",t.workspace="folder",t.zapier="zapier",t.zendesk="zendesk",t.channel_a="channel-android",t.channel_ac="zap",t.channel_at="zap",t.channel_bs="zap",t.channel_bw="zap",t.channel_cs="zap",t.channel_ct="channel-clickatell",t.channel_d3="channel-whatsapp",t.channel_d3c="channel-whatsapp",t.channel_da="zap",t.channel_ds="channel-discord",t.channel_ex="zap",t.channel_fb="channel-facebook",t.channel_fba="channel-facebook",t.channel_fc="channel-freshchat",t.channel_fcm="channel-firebase",t.channel_hm="zap",t.channel_ib="zap",t.channel_ig="channel-instagram",t.channel_jc="channel-jiochat",t.channel_kn="channel-kannel",t.channel_kwa="channel-whatsapp",t.channel_ln="channel-line",t.channel_mt="channel-mtarget",t.channel_mtn="zap",t.channel_nx="channel-vonage",t.channel_pl="channel-plivo",t.channel_rc="channel-rocketchat",t.channel_sl="channel-slack",t.channel_sq="zap",t.channel_st="zap",t.channel_sw="channel-signalwire",t.channel_t="channel-twilio",t.channel_tg="channel-telegram",t.channel_tms="channel-twilio",t.channel_tq="channel-thinq",t.channel_tw="zap",t.channel_twa="channel-whatsapp",t.channel_twc="zap",t.channel_twt="channel-twitter",t.channel_vk="channel-vk",t.channel_vp="channel-viber",t.channel_wa="channel-whatsapp",t.channel_wac="channel-whatsapp",t.channel_wc="channel-wechat",t.channel_yo="zap",t.channel_zvw="channel-whatsapp",t.bothub="bothub",t.chatbase="chatbase",t.dtone="dtone",t.default="list",t.datepicker="calendar",t.slider="sliders-02",t.select="browser",t.input="edit-05"}(ge||(ge={}));class fe extends me{constructor(){super(...arguments),this.name="",this.disabled=!1,this.size=1.2,this.animateChange="pulse"}static get styles(){return r`
35
35
  :host {
36
36
  color: var(--color-text);
37
37
  display: inline-block;
@@ -4770,7 +4770,8 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
4770
4770
  margin-bottom: 0.5em;
4771
4771
  }
4772
4772
 
4773
- .prefix .name {
4773
+ .prefix .name,
4774
+ .label .name {
4774
4775
  padding: 0em 0.4em;
4775
4776
  color: rgba(100, 100, 100, 0.7);
4776
4777
  white-space: nowrap;
@@ -4779,6 +4780,17 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
4779
4780
  font-size: 0.8em;
4780
4781
  }
4781
4782
 
4783
+ .disabled .name {
4784
+ margin-top: 1em;
4785
+ margin-left: 0.75em;
4786
+ }
4787
+
4788
+ .disabled .value {
4789
+ margin-left: 0.9em;
4790
+ margin-top: 0.1em;
4791
+ min-height: 1.75em;
4792
+ }
4793
+
4782
4794
  .postfix {
4783
4795
  display: flex;
4784
4796
  align-items: stretch;
@@ -4939,7 +4951,17 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
4939
4951
  cursor: default !important;
4940
4952
  opacity: 0.7;
4941
4953
  }
4942
- `}connectedCallback(){super.connectedCallback(),this.handleInput=this.handleInput.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleIconClick(t){const e=t.target.getAttribute("icon-action"),i=this.shadowRoot.querySelector("temba-textinput");"copy"===e&&navigator.clipboard&&(this.iconClass="clicked",navigator.clipboard.writeText(i.getDisplayValue()).then((()=>{window.setTimeout((()=>{this.iconClass=""}),300)}))),"search"===e&&this.fireCustomEvent(Ae.ButtonClicked,{key:this.key,value:this.value}),t.preventDefault(),t.stopPropagation()}handleResponse(t){200===t.status?(this.value=t.json.fields[this.key],this.status=Gl.Ready,this.dirty=!1):(this.status=Gl.Failure,this.dirty=!1)}handleSubmit(){const t=this.shadowRoot.querySelector("temba-textinput, temba-datepicker");t.value!==this.value&&(this.dirty=!0,this.status=Gl.Saving,this.value=t.value,this.fireEvent("change"))}handleChange(t){t.preventDefault(),t.stopPropagation()}handleDateChange(t){t.preventDefault(),t.stopPropagation(),this.dirty=!0}handleInput(t){const e=t.currentTarget;"Enter"===t.key?(e.blur(),this.handleSubmit()):e.value!==this.value&&(this.dirty=!0)}getInputType(t){return"numeric"===t?$e.Number:$e.Text}render(){const t=Z`<div class="save-state">
4954
+ `}connectedCallback(){super.connectedCallback(),this.handleInput=this.handleInput.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleIconClick(t){const e=t.target.getAttribute("icon-action"),i=this.shadowRoot.querySelector("temba-textinput");"copy"===e&&navigator.clipboard&&(this.iconClass="clicked",navigator.clipboard.writeText(i.getDisplayValue()).then((()=>{window.setTimeout((()=>{this.iconClass=""}),300)}))),"search"===e&&this.fireCustomEvent(Ae.ButtonClicked,{key:this.key,value:this.value}),t.preventDefault(),t.stopPropagation()}handleResponse(t){200===t.status?(this.value=t.json.fields[this.key],this.status=Gl.Ready,this.dirty=!1):(this.status=Gl.Failure,this.dirty=!1)}handleSubmit(){const t=this.shadowRoot.querySelector("temba-textinput, temba-datepicker");t.value!==this.value&&(this.dirty=!0,this.status=Gl.Saving,this.value=t.value,this.fireEvent("change"))}handleChange(t){t.preventDefault(),t.stopPropagation()}handleDateChange(t){t.preventDefault(),t.stopPropagation(),this.dirty=!0}handleInput(t){const e=t.currentTarget;"Enter"===t.key?(e.blur(),this.handleSubmit()):e.value!==this.value&&(this.dirty=!0)}getInputType(t){return"numeric"===t?$e.Number:$e.Text}render(){if(this.disabled)return Z`<div
4955
+ class=${this.status+" "+Zt({wrapper:!0,set:!!this.value,unset:!this.value,disabled:this.disabled,mutable:!this.disabled,dirty:this.dirty})}
4956
+ >
4957
+ <div class="label"><div class="name">${this.name}</div></div>
4958
+ <div class="value">
4959
+ ${"datetime"===this.type?this.value?Z`<temba-date
4960
+ value=${this.value}
4961
+ display="datetime"
4962
+ ></temba-date>`:null:this.value}
4963
+ </div>
4964
+ </div>`;const t=Z`<div class="save-state">
4943
4965
  ${this.dirty?Z`<temba-button
4944
4966
  class="save-button"
4945
4967
  name="Save"
@@ -6929,7 +6951,7 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
6929
6951
  </div>
6930
6952
  `}}t([pe({type:String})],kh.prototype,"url",void 0),t([pe({type:String})],kh.prototype,"label",void 0),t([pe({type:Boolean})],kh.prototype,"zoom",void 0),t([pe({type:Boolean})],kh.prototype,"zooming",void 0);!function(t){t.DISCONNECTED="disconnected",t.CONNECTING="connecting",t.CONNECTED="connected"}(vh||(vh={}));const Sh={hour:"numeric",minute:"2-digit"},$h={weekday:void 0,year:"numeric",month:"short",day:"numeric"},Ch={weekday:void 0,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"};class Eh extends rt{static get styles(){return r`
6931
6953
  :host {
6932
- display: flex-inline;
6954
+ display: flex;
6933
6955
  align-items: center;
6934
6956
  align-self: center;
6935
6957
  --curvature: 0.6em;
@@ -6938,6 +6960,10 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
6938
6960
  font-weight: 400;
6939
6961
  font-size: 1.1em;
6940
6962
  --toggle-speed: 80ms;
6963
+ position: absolute;
6964
+ right: 0;
6965
+ bottom: 0;
6966
+ z-index: 1;
6941
6967
  }
6942
6968
 
6943
6969
  .header {
@@ -7210,7 +7236,7 @@ class rr extends xe{constructor(t){if(super(t),this.it=j,t.type!==ye)throw Error
7210
7236
  .input:disabled {
7211
7237
  background: transparent !important;
7212
7238
  }
7213
- `}constructor(){super(),this.messages=[],this.status=vh.DISCONNECTED,this.open=!1,this.hasPendingText=!1,this.hideTopScroll=!0,this.hideBottomScroll=!0}handleReconnect(){this.openSocket()}openSocket(){if(this.status!==vh.DISCONNECTED)return;this.status=vh.CONNECTING;const t=this;let e=`ws://localhost:8070/start/${this.channel}/`;this.urn&&(e=`${e}?chat_id=${this.urn}`),this.sock=new WebSocket(e),this.sock.onclose=function(e){console.log("Socket closed",e),t.status=vh.DISCONNECTED},this.sock.onmessage=function(e){console.log(e),t.status=vh.CONNECTED;const i=JSON.parse(e.data);"chat_started"===i.type?(t.urn!==i.chat_id&&(t.messages=[]),t.urn=i.chat_id,t.requestUpdate("messages")):"chat_resumed"===i.type?t.urn=i.chat_id:"msg_out"===i.type&&(i.timestamp=(new Date).getTime(),t.addMessage(i),t.requestUpdate("messages"))}}restoreFromLocal(){const t=JSON.parse(localStorage.getItem("temba-chat")||"{}"),e="urn"in t?t.urn:null;if(e&&!this.urn){this.urn=e;const i="messages"in t?t.messages:[];this.messages.push(...i)}}writeToLocal(){if(this.urn){const t={urn:this.urn,messages:this.messages,version:1};localStorage.setItem("temba-chat",JSON.stringify(t))}}firstUpdated(t){super.firstUpdated(t)}focusInput(){const t=this.shadowRoot.querySelector(".input");t&&t.focus()}updated(t){if(super.updated(t),this.open&&t.has("open")&&void 0!==t.get("open")){const t=this.shadowRoot.querySelector(".scroll"),e=t.scrollHeight>t.clientHeight;this.hideBottomScroll=!0,this.hideTopScroll=!e,this.scrollToBottom(),this.status===vh.DISCONNECTED&&this.openSocket()}t.has("status")&&this.status===vh.CONNECTED&&this.focusInput(),t.has("channel")&&this.restoreFromLocal(),t.has("messages")&&(this.writeToLocal(),this.scrollToBottom())}addMessage(t){let e=this.messages.length>0?this.messages[this.messages.length-1]:[];0===e.length||e[0].origin===t.origin||(e=[]),0===e.length&&this.messages.push(e),e.push(t)}openChat(){this.open=!0}handleKeyUp(t){this.hasPendingText&&"Enter"===t.key&&this.sendPendingMessage(),this.hasPendingText=t.target.value.length>0}sendPendingMessage(){if(this.status===vh.CONNECTED){const t=this.shadowRoot.querySelector(".input"),e=t.value;t.value="";const i={type:"msg_in",text:e,timestamp:(new Date).getTime()};this.addMessage(i),this.sock.send(JSON.stringify(i)),this.requestUpdate("messages"),this.hasPendingText=t.value.length>0}}scrollToBottom(){const t=this.shadowRoot.querySelector(".scroll");t&&(t.scrollTop=t.scrollHeight,this.hideBottomScroll=!0)}renderMessageGroup(t,e,i){let o=null;if(e>0){const t=i[e-1];t&&t.length>0&&(o=t[t.length-1].timestamp)}const n=t[0].timestamp;let s=null;if(n-o>18e5){let t=null;const e=new Date(n);o&&(t=new Date(o));s=!t||e.getDate()!==t.getDate()?Z`<div class="time">
7239
+ `}constructor(){super(),this.messages=[],this.status=vh.DISCONNECTED,this.open=!1,this.hasPendingText=!1,this.hideTopScroll=!0,this.hideBottomScroll=!0}handleReconnect(){this.openSocket()}openSocket(){if(this.status!==vh.DISCONNECTED)return;this.status=vh.CONNECTING;const t=this;let e=`ws://localhost:8070/connect/${this.channel}/`;this.urn&&(e=`${e}?chat_id=${this.urn}`);const i=new WebSocket(e);this.sock=i,this.sock.onclose=function(e){console.log("Socket closed",e),t.status=vh.DISCONNECTED},this.sock.onopen=function(e){console.log("Socket opened",e),t.status=vh.CONNECTED,i.send(JSON.stringify({type:"start_chat"}))},this.sock.onmessage=function(e){console.log(e),t.status=vh.CONNECTED;const i=JSON.parse(e.data);"chat_started"===i.type?(t.urn!==i.chat_id&&(t.messages=[]),t.urn=i.chat_id,t.requestUpdate("messages")):"chat_resumed"===i.type?t.urn=i.chat_id:"msg_created"===i.type&&(i.timestamp=(new Date).getTime(),t.addMessage(i),t.requestUpdate("messages"))}}restoreFromLocal(){const t=JSON.parse(localStorage.getItem("temba-chat")||"{}"),e="urn"in t?t.urn:null;if(e&&!this.urn){this.urn=e;const i="messages"in t?t.messages:[];this.messages.push(...i)}}writeToLocal(){if(this.urn){const t={urn:this.urn,messages:this.messages,version:1};localStorage.setItem("temba-chat",JSON.stringify(t))}}firstUpdated(t){super.firstUpdated(t)}focusInput(){const t=this.shadowRoot.querySelector(".input");t&&t.focus()}updated(t){if(super.updated(t),this.open&&t.has("open")&&void 0!==t.get("open")){const t=this.shadowRoot.querySelector(".scroll"),e=t.scrollHeight>t.clientHeight;this.hideBottomScroll=!0,this.hideTopScroll=!e,this.scrollToBottom(),this.status===vh.DISCONNECTED&&this.openSocket()}t.has("status")&&this.status===vh.CONNECTED&&this.focusInput(),t.has("channel")&&this.restoreFromLocal(),t.has("messages")&&(this.writeToLocal(),this.scrollToBottom())}addMessage(t){let e=this.messages.length>0?this.messages[this.messages.length-1]:[];0===e.length||e[0].origin===t.origin||(e=[]),0===e.length&&this.messages.push(e),e.push(t)}openChat(){this.open=!0}handleKeyUp(t){this.hasPendingText&&"Enter"===t.key&&this.sendPendingMessage(),this.hasPendingText=t.target.value.length>0}sendPendingMessage(){if(this.status===vh.CONNECTED){const t=this.shadowRoot.querySelector(".input"),e=t.value;t.value="";const i={type:"send_msg",text:e};this.addMessage(i),this.sock.send(JSON.stringify(i)),this.requestUpdate("messages"),this.hasPendingText=t.value.length>0}}scrollToBottom(){const t=this.shadowRoot.querySelector(".scroll");t&&(t.scrollTop=t.scrollHeight,this.hideBottomScroll=!0)}renderMessageGroup(t,e,i){let o=null;if(e>0){const t=i[e-1];t&&t.length>0&&(o=t[t.length-1].timestamp)}const n=t[0].timestamp;let s=null;if(n-o>18e5){let t=null;const e=new Date(n);o&&(t=new Date(o));s=!t||e.getDate()!==t.getDate()?Z`<div class="time">
7214
7240
  ${e.toLocaleDateString(void 0,$h)}
7215
7241
  </div>`:Z`<div class="time">
7216
7242
  ${e.toLocaleTimeString(void 0,Sh)}
@@ -7986,7 +8012,7 @@ background: #ccc;
7986
8012
  .title {
7987
8013
  font-weight: normal;
7988
8014
  }
7989
- `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=ge.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=ge.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=ge.channel,i="Your android channel is not connected"):"channel:templates_failed"===t.incident.type?(e=ge.channel,i="Your WhatsApp channel templates failed syncing"):"webhooks:unhealthy"===t.incident.type&&(e=ge.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=ge.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=ge.contact_export,i="Exported contacts"):"message"===t.export.type?(e=ge.message_export,i="Exported messages"):"results"===t.export.type?(e=ge.results_export,i="Exported flow results"):"ticket"===t.export.type&&(e=ge.tickets_export,i="Exported tickets"):"tickets:activity"===t.type?(e=ge.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=ge.tickets,i="New unassigned ticket"),Z`<div
8015
+ `}constructor(){super(),this.reverseRefresh=!1,this.internalFocusDisabled=!0,this.valueKey="target_url",this.renderOption=t=>{let e=null,i=null;return"incident:started"===t.type?"org:flagged"===t.incident.type?(e=ge.incidents,i="Your workspace was flagged, please contact support for assistance."):"org:suspended"===t.incident.type?(e=ge.incidents,i="Your workspace was suspended, please contact support for assistance."):"channel:disconnected"===t.incident.type?(e=ge.channel,i="Your android channel is not connected"):"channel:templates_failed"===t.incident.type?(e=ge.channel,i="Your WhatsApp channel templates failed syncing"):"webhooks:unhealthy"===t.incident.type&&(e=ge.webhook,i="Your webhook calls are not working properly."):"import:finished"===t.type?"contact"===t.import.type&&(e=ge.contact_import,i=`Imported ${t.import.num_records.toLocaleString()} contacts`):"export:finished"===t.type?"contact"===t.export.type?(e=ge.contact_export,i=`Exported ${t.export.num_records.toLocaleString()} contacts`):"message"===t.export.type?(e=ge.message_export,i=`Exported ${t.export.num_records.toLocaleString()} messages`):"results"===t.export.type?(e=ge.results_export,i="Exported flow results"):"ticket"===t.export.type?(e=ge.tickets_export,i=`Exported ${t.export.num_records.toLocaleString()} tickets`):"definition"===t.export.type&&(e=ge.definitions_export,i="Exported definitions"):"tickets:activity"===t.type?(e=ge.tickets,i="New ticket activity"):"tickets:opened"===t.type&&(e=ge.tickets,i="New unassigned ticket"),Z`<div
7990
8016
  style="color:${"#333"};display:flex;align-items:flex-start;flex-direction:row;font-weight:${t.is_seen?400:500}"
7991
8017
  >
7992
8018
  ${e?Z`<div style="margin-right:0.6em">