@nyaruka/temba-components 0.93.3 → 0.94.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 +14 -0
- package/dist/locales/es.js +3 -6
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.js +3 -6
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/pt.js +3 -6
- package/dist/locales/pt.js.map +1 -1
- package/dist/temba-components.js +146 -59
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/compose/Compose.js +6 -1
- package/out-tsc/src/compose/Compose.js.map +1 -1
- package/out-tsc/src/contactsearch/ContactSearch.js +163 -62
- package/out-tsc/src/contactsearch/ContactSearch.js.map +1 -1
- package/out-tsc/src/locales/es.js +3 -6
- package/out-tsc/src/locales/es.js.map +1 -1
- package/out-tsc/src/locales/fr.js +3 -6
- package/out-tsc/src/locales/fr.js.map +1 -1
- package/out-tsc/src/locales/pt.js +3 -6
- package/out-tsc/src/locales/pt.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +22 -2
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/package.json +1 -1
- package/src/compose/Compose.ts +6 -1
- package/src/contactsearch/ContactSearch.ts +188 -78
- package/src/locales/es.ts +3 -6
- package/src/locales/fr.ts +3 -6
- package/src/locales/pt.ts +3 -6
- package/src/tabpane/TabPane.ts +22 -2
- package/xliff/es.xlf +6 -15
- package/xliff/fr.xlf +6 -15
- package/xliff/pt.xlf +6 -15
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,22 @@ 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.94.1](https://github.com/nyaruka/temba-components/compare/v0.94.0...v0.94.1)
|
|
8
|
+
|
|
9
|
+
- Don't show contact filter menu with no options [`1ced446`](https://github.com/nyaruka/temba-components/commit/1ced446f385c0cf4f5ccf864bfd4019c77ddd3cb)
|
|
10
|
+
|
|
11
|
+
#### [v0.94.0](https://github.com/nyaruka/temba-components/compare/v0.93.3...v0.94.0)
|
|
12
|
+
|
|
13
|
+
> 25 June 2024
|
|
14
|
+
|
|
15
|
+
- Improvements to contact search [`#437`](https://github.com/nyaruka/temba-components/pull/437)
|
|
16
|
+
- Show contact search exclusions as filters [`98cf90e`](https://github.com/nyaruka/temba-components/commit/98cf90e74a5ca4017998c52284251ddf07268b4a)
|
|
17
|
+
- Allow filter by various activity levels [`8928b7b`](https://github.com/nyaruka/temba-components/commit/8928b7bf3bd018fa53ec1a9c3e4f8b551d4289d6)
|
|
18
|
+
|
|
7
19
|
#### [v0.93.3](https://github.com/nyaruka/temba-components/compare/v0.93.2...v0.93.3)
|
|
8
20
|
|
|
21
|
+
> 21 June 2024
|
|
22
|
+
|
|
9
23
|
- More z-index tweaks [`a416b7d`](https://github.com/nyaruka/temba-components/commit/a416b7d8ea7499a508e7ce60886c54d39335c2b5)
|
|
10
24
|
|
|
11
25
|
#### [v0.93.2](https://github.com/nyaruka/temba-components/compare/v0.93.1...v0.93.2)
|
package/dist/locales/es.js
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
export const templates = {
|
|
6
6
|
scf1453991c986b25: `Tab para completar, enter para seleccionar`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sc85010c81b71421e: `Avoid interrupting a contact who is already in a flow.`,
|
|
11
|
-
s3e3fa53e834f4fda: `Skip repeat contacts`,
|
|
12
|
-
s95e715d82602bced: `Avoid restarting a contact who has been in this flow in the last 90 days.`
|
|
7
|
+
s638236250662c6b3: `Have sent a message in the last`,
|
|
8
|
+
s8f02e3a18ffc083a: `Are not currently in a flow`,
|
|
9
|
+
s4788ee206c4570c7: `Have not started this flow in the last 90 days`
|
|
13
10
|
};
|
|
14
11
|
//# sourceMappingURL=es.js.map
|
package/dist/locales/es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/locales/es.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,4CAA4C;IAC/D,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/locales/es.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,4CAA4C;IAC/D,iBAAiB,EAAE,iCAAiC;IACpD,iBAAiB,EAAE,6BAA6B;IAChD,iBAAiB,EAAE,gDAAgD;CACpE,CAAC","sourcesContent":["// Do not modify this file by hand!\n// Re-generate this file by running lit-localize\n\n/* eslint-disable no-irregular-whitespace */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport const templates = {\n scf1453991c986b25: `Tab para completar, enter para seleccionar`,\n s638236250662c6b3: `Have sent a message in the last`,\n s8f02e3a18ffc083a: `Are not currently in a flow`,\n s4788ee206c4570c7: `Have not started this flow in the last 90 days`\n};\n"]}
|
package/dist/locales/fr.js
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
export const templates = {
|
|
6
6
|
scf1453991c986b25: `Tab to complete, enter to select`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sc85010c81b71421e: `Avoid interrupting a contact who is already in a flow.`,
|
|
11
|
-
s3e3fa53e834f4fda: `Skip repeat contacts`,
|
|
12
|
-
s95e715d82602bced: `Avoid restarting a contact who has been in this flow in the last 90 days.`
|
|
7
|
+
s638236250662c6b3: `Have sent a message in the last`,
|
|
8
|
+
s8f02e3a18ffc083a: `Are not currently in a flow`,
|
|
9
|
+
s4788ee206c4570c7: `Have not started this flow in the last 90 days`
|
|
13
10
|
};
|
|
14
11
|
//# sourceMappingURL=fr.js.map
|
package/dist/locales/fr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.js","sourceRoot":"","sources":["../../../src/locales/fr.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,kCAAkC;IACrD,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"fr.js","sourceRoot":"","sources":["../../../src/locales/fr.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,kCAAkC;IACrD,iBAAiB,EAAE,iCAAiC;IACpD,iBAAiB,EAAE,6BAA6B;IAChD,iBAAiB,EAAE,gDAAgD;CACpE,CAAC","sourcesContent":["// Do not modify this file by hand!\n// Re-generate this file by running lit-localize\n\n/* eslint-disable no-irregular-whitespace */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport const templates = {\n scf1453991c986b25: `Tab to complete, enter to select`,\n s638236250662c6b3: `Have sent a message in the last`,\n s8f02e3a18ffc083a: `Are not currently in a flow`,\n s4788ee206c4570c7: `Have not started this flow in the last 90 days`\n};\n"]}
|
package/dist/locales/pt.js
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
export const templates = {
|
|
6
6
|
scf1453991c986b25: `Tab to complete, enter to select`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sc85010c81b71421e: `Avoid interrupting a contact who is already in a flow.`,
|
|
11
|
-
s3e3fa53e834f4fda: `Skip repeat contacts`,
|
|
12
|
-
s95e715d82602bced: `Avoid restarting a contact who has been in this flow in the last 90 days.`
|
|
7
|
+
s638236250662c6b3: `Have sent a message in the last`,
|
|
8
|
+
s8f02e3a18ffc083a: `Are not currently in a flow`,
|
|
9
|
+
s4788ee206c4570c7: `Have not started this flow in the last 90 days`
|
|
13
10
|
};
|
|
14
11
|
//# sourceMappingURL=pt.js.map
|
package/dist/locales/pt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt.js","sourceRoot":"","sources":["../../../src/locales/pt.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,kCAAkC;IACrD,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"pt.js","sourceRoot":"","sources":["../../../src/locales/pt.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,gDAAgD;AAEhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,kCAAkC;IACrD,iBAAiB,EAAE,iCAAiC;IACpD,iBAAiB,EAAE,6BAA6B;IAChD,iBAAiB,EAAE,gDAAgD;CACpE,CAAC","sourcesContent":["// Do not modify this file by hand!\n// Re-generate this file by running lit-localize\n\n/* eslint-disable no-irregular-whitespace */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport const templates = {\n scf1453991c986b25: `Tab to complete, enter to select`,\n s638236250662c6b3: `Have sent a message in the last`,\n s8f02e3a18ffc083a: `Are not currently in a flow`,\n s4788ee206c4570c7: `Have not started this flow in the last 90 days`\n};\n"]}
|
package/dist/temba-components.js
CHANGED
|
@@ -2731,7 +2731,38 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
2731
2731
|
temba-alert {
|
|
2732
2732
|
margin: 1em 0;
|
|
2733
2733
|
}
|
|
2734
|
-
|
|
2734
|
+
|
|
2735
|
+
temba-select[name='not_seen_since_days'] {
|
|
2736
|
+
margin-bottom: 1em;
|
|
2737
|
+
display: block;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
.activity-select {
|
|
2741
|
+
display: flex;
|
|
2742
|
+
align-items: center;
|
|
2743
|
+
padding: var(--checkbox-padding, 10px);
|
|
2744
|
+
border-radius: var(--curvature);
|
|
2745
|
+
cursor: pointer;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
.activity-select:hover {
|
|
2749
|
+
background: #f9f9f9;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
.small-select {
|
|
2753
|
+
--temba-select-selected-padding: 0px 0.5em;
|
|
2754
|
+
--temba-select-selected-line-height: 1em;
|
|
2755
|
+
--temba-select-selected-font-size: 1em;
|
|
2756
|
+
--search-input-height: 0px !important;
|
|
2757
|
+
min-width: 100px;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
.filters {
|
|
2761
|
+
padding: 1em;
|
|
2762
|
+
border: 1px solid var(--color-borders);
|
|
2763
|
+
border-radius: var(--curvature);
|
|
2764
|
+
}
|
|
2765
|
+
`}refresh(){this.refreshKey="requested_"+(new Date).getTime()}updated(t){super.updated(t),t.has("advanced")&&this.advanced||(t.has("in_a_flow")&&!this.in_a_flow&&(delete this.exclusions.in_a_flow,this.requestUpdate("exclusions")),(t.has("query")&&this.advanced||t.has("refreshKey")&&"0"!==this.refreshKey)&&(this.summary=null,this.fireCustomEvent(Oe.ContentChanged,{reset:!0}),this.lastQuery&&(window.clearTimeout(this.lastQuery),this.fetching=!1),(this.query.trim().length>0||this.recipients.length>0)&&(this.fetching=!0,this.lastQuery=window.setTimeout((()=>{this.fetchSummary()}),2e3))))}fetchSummary(){if(this.endpoint){const t=this.recipients.filter((t=>"group"===t.type)).map((t=>t.id)),e=this.recipients.filter((t=>"contact"===t.type)).map((t=>t.id));Kt(this.endpoint,{include:this.advanced?{query:this.query}:{contact_uuids:e,group_uuids:t},exclude:this.exclusions}).then((t=>{this.fetching=!1,200===t.status?(this.summary=t.json,this.advanced||(this.query=this.summary.query),this.setValue({advanced:this.advanced,query:this.query,exclusions:this.exclusions,recipients:this.recipients}),this.summary.error?this.errors=[this.summary.error]:this.errors=[],this.requestUpdate("errors"),this.fireCustomEvent(Oe.ContentChanged,this.summary)):(this.summary=t.json,this.summary.error&&(this.errors=[this.summary.error]),this.requestUpdate("errors"),this.fireCustomEvent(Oe.ContentChanged,this.summary))}))}}handleAdvancedToggle(t){re(t),this.recipients=[],this.exclusions={},this.advanced&&(this.query="",this.value=null),this.advanced=!this.advanced,this.setValue({advanced:this.advanced,query:this.query,exclusions:this.exclusions,recipients:this.recipients})}handleQueryChange(t){const e=t.target;this.query=e.inputElement.value}handleRecipientsChanged(){"0"!==this.refreshKey||this.initialized?this.refresh():this.initialized=!0}handleActivityLevelChanged(t){const e=t.target.values[0];e&&this.exclusions.not_seen_since_days&&(this.exclusions.not_seen_since_days=parseInt(e.value),this.refresh())}handleActivityLabelClicked(t){if(t.target&&"TEMBA-CHECKBOX"!==t.target.tagName&&"TEMBA-SELECT"!==t.target.tagName&&!t.target.disabled){const e=t.currentTarget.querySelector("temba-checkbox");e.checked=!e.checked}}handleExclusionChanged(t){if("TEMBA-CHECKBOX"===t.target.tagName){const e=JSON.stringify(this.exclusions),i=t.target;let o=i.checked;if("not_seen_since_days"===i.name&&o){const t=i.parentElement.querySelector("temba-select");t.values[0]&&(o=parseInt(t.values[0].value))}o?this.exclusions[i.name]=o:delete this.exclusions[i.name],e!==JSON.stringify(this.exclusions)&&this.refresh()}}render(){let t;if(this.summary&&!this.summary.error){const e=this.summary.total||0;t=j`
|
|
2735
2766
|
<div class="result-count">
|
|
2736
2767
|
Found
|
|
2737
2768
|
<a
|
|
@@ -2766,57 +2797,100 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
2766
2797
|
</temba-button>
|
|
2767
2798
|
`}return this.summary&&this.summary.blockers&&this.summary.blockers.length>0?j`${this.summary.blockers.map((t=>j`<temba-alert level="error">${pr(t)}</temba-alert>`))}`:j`
|
|
2768
2799
|
${this.advanced?j`<div class="query">
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2800
|
+
<temba-textinput
|
|
2801
|
+
.label=${this.label}
|
|
2802
|
+
.helpText=${this.helpText}
|
|
2803
|
+
.widgetOnly=${this.widgetOnly}
|
|
2804
|
+
.errors=${this.errors}
|
|
2805
|
+
name=${this.name}
|
|
2806
|
+
.inputRoot=${this}
|
|
2807
|
+
@input=${this.handleQueryChange}
|
|
2808
|
+
placeholder=${this.placeholder}
|
|
2809
|
+
.value=${this.query}
|
|
2810
|
+
textarea
|
|
2811
|
+
autogrow
|
|
2812
|
+
>
|
|
2813
|
+
</temba-textinput>
|
|
2814
|
+
</div>`:j`<temba-omnibox
|
|
2815
|
+
placeholder="Search for contacts or groups"
|
|
2816
|
+
widget_only=""
|
|
2817
|
+
groups=""
|
|
2818
|
+
contacts=""
|
|
2819
|
+
label="Recipients"
|
|
2820
|
+
help_text="The contacts to send the message to."
|
|
2821
|
+
.errors=${this.errors}
|
|
2822
|
+
id="recipients"
|
|
2823
|
+
name="recipients"
|
|
2824
|
+
.value=${this.recipients}
|
|
2825
|
+
endpoint="/contact/omnibox/?"
|
|
2826
|
+
@change=${this.handleRecipientsChanged}
|
|
2827
|
+
>
|
|
2828
|
+
</temba-omnibox>
|
|
2829
|
+
|
|
2830
|
+
${this.not_seen_since_days||this.in_a_flow||this.started_previously?j`
|
|
2831
|
+
<div class="filters">
|
|
2832
|
+
<div
|
|
2833
|
+
style="display:flex;font-size:1em;margin-bottom:0.5em"
|
|
2834
|
+
>
|
|
2835
|
+
<temba-icon size="1" name="filter"></temba-icon>
|
|
2836
|
+
<div style="margin-left:0.5em">
|
|
2837
|
+
Only include contacts who...
|
|
2838
|
+
</div>
|
|
2839
|
+
</div>
|
|
2840
|
+
|
|
2841
|
+
${this.not_seen_since_days?j`
|
|
2842
|
+
<div
|
|
2843
|
+
class="activity-select"
|
|
2844
|
+
@click=${this.handleActivityLabelClicked}
|
|
2845
|
+
>
|
|
2846
|
+
<temba-checkbox
|
|
2847
|
+
style="display:inline;"
|
|
2848
|
+
name="not_seen_since_days"
|
|
2849
|
+
@change=${this.handleExclusionChanged}
|
|
2850
|
+
>
|
|
2851
|
+
</temba-checkbox>
|
|
2852
|
+
|
|
2853
|
+
<div style="margin-left:0.5em">
|
|
2854
|
+
${ir("Have sent a message in the last")}
|
|
2855
|
+
</div>
|
|
2856
|
+
|
|
2857
|
+
<temba-select
|
|
2858
|
+
style="margin-left:0.5em"
|
|
2859
|
+
class="small-select"
|
|
2860
|
+
@change=${this.handleActivityLevelChanged}
|
|
2861
|
+
?disabled=${!this.exclusions.not_seen_since_days}
|
|
2862
|
+
>
|
|
2863
|
+
<temba-option
|
|
2864
|
+
name="90 days"
|
|
2865
|
+
value="90"
|
|
2866
|
+
></temba-option>
|
|
2867
|
+
<temba-option
|
|
2868
|
+
name="180 days"
|
|
2869
|
+
value="180"
|
|
2870
|
+
></temba-option>
|
|
2871
|
+
<temba-option
|
|
2872
|
+
name="Year"
|
|
2873
|
+
value="365"
|
|
2874
|
+
></temba-option>
|
|
2875
|
+
</temba-select>
|
|
2876
|
+
<div></div>
|
|
2877
|
+
</div>
|
|
2878
|
+
`:null}
|
|
2879
|
+
${this.in_a_flow?j`<temba-checkbox
|
|
2880
|
+
name="in_a_flow"
|
|
2881
|
+
label="${ir("Are not currently in a flow")}"
|
|
2882
|
+
?checked=${this.exclusions.in_a_flow}
|
|
2883
|
+
@change=${this.handleExclusionChanged}
|
|
2884
|
+
></temba-checkbox>`:null}
|
|
2885
|
+
${this.started_previously?j`<temba-checkbox
|
|
2886
|
+
name="started_previously"
|
|
2887
|
+
label="${ir("Have not started this flow in the last 90 days")}"
|
|
2888
|
+
?checked=${this.exclusions.started_previously}
|
|
2889
|
+
@change=${this.handleExclusionChanged}
|
|
2890
|
+
></temba-checkbox>`:null}
|
|
2891
|
+
</div>
|
|
2892
|
+
`:null} `}
|
|
2893
|
+
</div>
|
|
2820
2894
|
|
|
2821
2895
|
<div
|
|
2822
2896
|
class="results ${Vt({fetching:this.fetching,initialized:this.initialized||this.fetching,empty:(this.summary&&this.summary.error||!this.summary)&&!this.fetching})}"
|
|
@@ -2826,8 +2900,8 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
2826
2900
|
</div>
|
|
2827
2901
|
|
|
2828
2902
|
${this.summary&&this.summary.warnings?this.summary.warnings.map((t=>j`<temba-alert level="warning"
|
|
2829
|
-
|
|
2830
|
-
|
|
2903
|
+
>${pr(t)}</temba-alert
|
|
2904
|
+
>`)):""}
|
|
2831
2905
|
`}}t([ge({type:Boolean})],Yl.prototype,"in_a_flow",void 0),t([ge({type:Boolean})],Yl.prototype,"started_previously",void 0),t([ge({type:Boolean})],Yl.prototype,"not_seen_since_days",void 0),t([ge({type:Boolean})],Yl.prototype,"fetching",void 0),t([ge({type:Boolean})],Yl.prototype,"expanded",void 0),t([ge({type:String})],Yl.prototype,"endpoint",void 0),t([ge({type:String})],Yl.prototype,"placeholder",void 0),t([ge({type:String})],Yl.prototype,"name",void 0),t([ge({type:String})],Yl.prototype,"query",void 0),t([ge({type:Number})],Yl.prototype,"inactiveThreshold",void 0),t([ge({type:Number})],Yl.prototype,"inactiveDays",void 0),t([ge({type:Object,attribute:!1})],Yl.prototype,"summary",void 0),t([ge({type:Object,attribute:!1})],Yl.prototype,"flow",void 0),t([ge({type:Array})],Yl.prototype,"recipients",void 0),t([ge({type:Boolean})],Yl.prototype,"advanced",void 0),t([ge({type:String})],Yl.prototype,"refreshKey",void 0),t([ge({type:Object})],Yl.prototype,"exclusions",void 0);class Kl extends lt{static get styles(){return r`
|
|
2832
2906
|
:host {
|
|
2833
2907
|
align-items: center;
|
|
@@ -3863,7 +3937,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
3863
3937
|
</div>
|
|
3864
3938
|
</div>
|
|
3865
3939
|
</div>
|
|
3866
|
-
`}}t([ge({type:Boolean})],ah.prototype,"open",void 0),t([ge({type:Boolean})],ah.prototype,"top",void 0),t([ge({type:Boolean})],ah.prototype,"bottom",void 0),t([ge({type:Boolean})],ah.prototype,"left",void 0),t([ge({type:Boolean})],ah.prototype,"right",void 0),t([ge({type:Number})],ah.prototype,"arrowSize",void 0),t([ge({type:Number})],ah.prototype,"arrowOffset",void 0),t([ge({type:Number})],ah.prototype,"offsetX",void 0),t([ge({type:Number})],ah.prototype,"offsetY",void 0),t([ge({type:Boolean})],ah.prototype,"mask",void 0);class lh extends ue{constructor(){super(...arguments),this.embedded=!1,this.collapses=!1,this.bottom=!1,this.focusedName=!1,this.index=-1,this.refresh="",this.tabs=[]}static get styles(){return r`
|
|
3940
|
+
`}}t([ge({type:Boolean})],ah.prototype,"open",void 0),t([ge({type:Boolean})],ah.prototype,"top",void 0),t([ge({type:Boolean})],ah.prototype,"bottom",void 0),t([ge({type:Boolean})],ah.prototype,"left",void 0),t([ge({type:Boolean})],ah.prototype,"right",void 0),t([ge({type:Number})],ah.prototype,"arrowSize",void 0),t([ge({type:Number})],ah.prototype,"arrowOffset",void 0),t([ge({type:Number})],ah.prototype,"offsetX",void 0),t([ge({type:Number})],ah.prototype,"offsetY",void 0),t([ge({type:Boolean})],ah.prototype,"mask",void 0);class lh extends ue{constructor(){super(...arguments),this.embedded=!1,this.collapses=!1,this.bottom=!1,this.unselect=!1,this.focusedName=!1,this.index=-1,this.refresh="",this.tabs=[]}static get styles(){return r`
|
|
3867
3941
|
:host {
|
|
3868
3942
|
display: flex;
|
|
3869
3943
|
flex-direction: column;
|
|
@@ -3972,6 +4046,14 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
3972
4046
|
.bottom .tab.selected {
|
|
3973
4047
|
}
|
|
3974
4048
|
|
|
4049
|
+
.unselect .tab.selected {
|
|
4050
|
+
cursor: pointer;
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
.unselect .tab.selected:hover {
|
|
4054
|
+
background: var(--unselect-tab-color, #eee);
|
|
4055
|
+
}
|
|
4056
|
+
|
|
3975
4057
|
.tab:hover {
|
|
3976
4058
|
--icon-color: #666;
|
|
3977
4059
|
color: #666;
|
|
@@ -4059,7 +4141,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4059
4141
|
.pane {
|
|
4060
4142
|
display: flex;
|
|
4061
4143
|
}
|
|
4062
|
-
`}handleTabClick(t){
|
|
4144
|
+
`}handleTabClick(t){const e=parseInt(t.currentTarget.dataset.index);this.unselect&&this.index===e?this.index=-1:this.index=e,t.preventDefault(),t.stopPropagation(),this.requestUpdate("index")}handleSlotChange(){const t=[];for(const e of this.children)if("TEMBA-TAB"===e.tagName){const i=e;t.push(i)}this.tabs=t}firstUpdated(t){super.firstUpdated(t),this.shadowRoot.addEventListener("slotchange",this.handleSlotChange.bind(this))}updated(t){if(super.updated(t),(t.has("index")||t.has("tabs"))&&(this.tabs.forEach(((t,e)=>{t.selected=e==this.index})),this.fireEvent(Oe.ContextChanged)),this.index>this.tabs.length){const t=this.tabs[this.index];if(t&&t.hidden)for(let t=0;t<this.tabs.length;t++){const e=this.tabs[t];if(e&&!e.hidden)return void(this.index=t)}}}setTabDetails(t,e){if(t<this.tabs.length){const i=this.tabs[t];i.count=e.count,i.hidden=e.hidden,this.requestUpdate()}else setTimeout((()=>{this.setTabDetails(t,e)}),100)}getCurrentTab(){return this.tabs[this.index]}getTab(t){return this.tabs[t]}handleTabContentChanged(){this.requestUpdate()}render(){return j`
|
|
4063
4145
|
${this.bottom?j`<div
|
|
4064
4146
|
class="pane ${Vt({first:0==this.index,embedded:this.embedded,bottom:this.bottom})}"
|
|
4065
4147
|
>
|
|
@@ -4067,7 +4149,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4067
4149
|
</div>`:null}
|
|
4068
4150
|
|
|
4069
4151
|
<div
|
|
4070
|
-
class="tabs ${Vt({tabs:!0,bottom:this.bottom,collapses:this.collapses,embedded:this.embedded,focusedname:this.focusedName})}"
|
|
4152
|
+
class="tabs ${Vt({tabs:!0,bottom:this.bottom,collapses:this.collapses,embedded:this.embedded,focusedname:this.focusedName,unselect:this.unselect})}"
|
|
4071
4153
|
>
|
|
4072
4154
|
${this.tabs.map(((t,e)=>j`
|
|
4073
4155
|
<div
|
|
@@ -4099,7 +4181,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4099
4181
|
>
|
|
4100
4182
|
<slot></slot>
|
|
4101
4183
|
</div>`}
|
|
4102
|
-
`}}t([ge({type:Boolean})],lh.prototype,"embedded",void 0),t([ge({type:Boolean})],lh.prototype,"collapses",void 0),t([ge({type:Boolean})],lh.prototype,"bottom",void 0),t([ge({type:Boolean})],lh.prototype,"focusedName",void 0),t([ge({type:Number})],lh.prototype,"index",void 0),t([ge({type:String})],lh.prototype,"refresh",void 0),t([ge({type:Array,attribute:!1})],lh.prototype,"tabs",void 0);class hh extends ue{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.hidden=!1,this.count=0,this.checked=!1}static get styles(){return r`
|
|
4184
|
+
`}}t([ge({type:Boolean})],lh.prototype,"embedded",void 0),t([ge({type:Boolean})],lh.prototype,"collapses",void 0),t([ge({type:Boolean})],lh.prototype,"bottom",void 0),t([ge({type:Boolean})],lh.prototype,"unselect",void 0),t([ge({type:Boolean})],lh.prototype,"focusedName",void 0),t([ge({type:Number})],lh.prototype,"index",void 0),t([ge({type:String})],lh.prototype,"refresh",void 0),t([ge({type:Array,attribute:!1})],lh.prototype,"tabs",void 0);class hh extends ue{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.hidden=!1,this.count=0,this.checked=!1}static get styles(){return r`
|
|
4103
4185
|
:host {
|
|
4104
4186
|
display: none;
|
|
4105
4187
|
flex-direction: column;
|
|
@@ -5938,6 +6020,10 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
5938
6020
|
title="${this.datetime.toLocaleString(Ph.datetime)}"
|
|
5939
6021
|
>${t}</span
|
|
5940
6022
|
>`}}}t([ge({type:String})],Ih.prototype,"value",void 0),t([ge({type:String})],Ih.prototype,"display",void 0),t([ge({type:Object,attribute:!1})],Ih.prototype,"datetime",void 0);let Dh=class extends ue{constructor(){super(...arguments),this.body=j`<temba-loading></temba-loading>`}static get styles(){return r``}updated(t){super.updated(t),t.has("endpoint")&&jt(this.endpoint).then((t=>{this.body=pr(t.body)}))}render(){return j`${this.body}`}};t([ge({type:String})],Dh.prototype,"endpoint",void 0),t([ge({attribute:!1})],Dh.prototype,"body",void 0),Dh=t([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("temba-remote")],Dh);var Nh,Bh=Dh;class Rh extends fe{static get styles(){return r`
|
|
6023
|
+
:host {
|
|
6024
|
+
--textarea-min-height: var(--textarea-min-height, 4em);
|
|
6025
|
+
}
|
|
6026
|
+
|
|
5941
6027
|
.container {
|
|
5942
6028
|
display: flex;
|
|
5943
6029
|
flex-direction: column;
|
|
@@ -5958,7 +6044,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
5958
6044
|
--compose-curvature,
|
|
5959
6045
|
var(--curvature) var(--curvature) 0px 0px
|
|
5960
6046
|
);
|
|
5961
|
-
|
|
6047
|
+
|
|
5962
6048
|
--widget-box-shadow: none;
|
|
5963
6049
|
padding: var(--compose-padding, 0px);
|
|
5964
6050
|
}
|
|
@@ -6074,6 +6160,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
6074
6160
|
embedded
|
|
6075
6161
|
focusedname
|
|
6076
6162
|
bottom
|
|
6163
|
+
unselect
|
|
6077
6164
|
refresh="${this.currentAttachments.length}|${this.index}|${this.currentQuickReplies.length}|${t}|${this.currentOptin}"
|
|
6078
6165
|
>
|
|
6079
6166
|
${this.attachments?j`<temba-tab
|