@nyaruka/temba-components 0.93.3 → 0.94.0
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 +8 -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 +139 -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 +148 -58
- 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 +175 -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,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v0.94.0](https://github.com/nyaruka/temba-components/compare/v0.93.3...v0.94.0)
|
|
8
|
+
|
|
9
|
+
- Improvements to contact search [`#437`](https://github.com/nyaruka/temba-components/pull/437)
|
|
10
|
+
- Show contact search exclusions as filters [`98cf90e`](https://github.com/nyaruka/temba-components/commit/98cf90e74a5ca4017998c52284251ddf07268b4a)
|
|
11
|
+
- Allow filter by various activity levels [`8928b7b`](https://github.com/nyaruka/temba-components/commit/8928b7bf3bd018fa53ec1a9c3e4f8b551d4289d6)
|
|
12
|
+
|
|
7
13
|
#### [v0.93.3](https://github.com/nyaruka/temba-components/compare/v0.93.2...v0.93.3)
|
|
8
14
|
|
|
15
|
+
> 21 June 2024
|
|
16
|
+
|
|
9
17
|
- More z-index tweaks [`a416b7d`](https://github.com/nyaruka/temba-components/commit/a416b7d8ea7499a508e7ce60886c54d39335c2b5)
|
|
10
18
|
|
|
11
19
|
#### [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,93 @@ 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
|
+
<div class="filters">
|
|
2831
|
+
<div style="display:flex;font-size:1em;margin-bottom:0.5em">
|
|
2832
|
+
<temba-icon size="1" name="filter"></temba-icon>
|
|
2833
|
+
<div style="margin-left:0.5em">
|
|
2834
|
+
Only include contacts who...
|
|
2835
|
+
</div>
|
|
2836
|
+
</div>
|
|
2837
|
+
|
|
2838
|
+
${this.not_seen_since_days?j`
|
|
2839
|
+
<div
|
|
2840
|
+
class="activity-select"
|
|
2841
|
+
@click=${this.handleActivityLabelClicked}
|
|
2842
|
+
>
|
|
2843
|
+
<temba-checkbox
|
|
2844
|
+
style="display:inline;"
|
|
2845
|
+
name="not_seen_since_days"
|
|
2846
|
+
@change=${this.handleExclusionChanged}
|
|
2847
|
+
>
|
|
2848
|
+
</temba-checkbox>
|
|
2849
|
+
|
|
2850
|
+
<div style="margin-left:0.5em">
|
|
2851
|
+
${ir("Have sent a message in the last")}
|
|
2852
|
+
</div>
|
|
2853
|
+
|
|
2854
|
+
<temba-select
|
|
2855
|
+
style="margin-left:0.5em"
|
|
2856
|
+
class="small-select"
|
|
2857
|
+
@change=${this.handleActivityLevelChanged}
|
|
2858
|
+
?disabled=${!this.exclusions.not_seen_since_days}
|
|
2859
|
+
>
|
|
2860
|
+
<temba-option
|
|
2861
|
+
name="90 days"
|
|
2862
|
+
value="90"
|
|
2863
|
+
></temba-option>
|
|
2864
|
+
<temba-option
|
|
2865
|
+
name="180 days"
|
|
2866
|
+
value="180"
|
|
2867
|
+
></temba-option>
|
|
2868
|
+
<temba-option name="Year" value="365"></temba-option>
|
|
2869
|
+
</temba-select>
|
|
2870
|
+
<div></div>
|
|
2871
|
+
</div>
|
|
2872
|
+
`:null}
|
|
2873
|
+
${this.in_a_flow?j`<temba-checkbox
|
|
2874
|
+
name="in_a_flow"
|
|
2875
|
+
label="${ir("Are not currently in a flow")}"
|
|
2876
|
+
?checked=${this.exclusions.in_a_flow}
|
|
2877
|
+
@change=${this.handleExclusionChanged}
|
|
2878
|
+
></temba-checkbox>`:null}
|
|
2879
|
+
${this.started_previously?j`<temba-checkbox
|
|
2880
|
+
name="started_previously"
|
|
2881
|
+
label="${ir("Have not started this flow in the last 90 days")}"
|
|
2882
|
+
?checked=${this.exclusions.started_previously}
|
|
2883
|
+
@change=${this.handleExclusionChanged}
|
|
2884
|
+
></temba-checkbox>`:null}
|
|
2885
|
+
</div>`}
|
|
2886
|
+
</div>
|
|
2820
2887
|
|
|
2821
2888
|
<div
|
|
2822
2889
|
class="results ${Vt({fetching:this.fetching,initialized:this.initialized||this.fetching,empty:(this.summary&&this.summary.error||!this.summary)&&!this.fetching})}"
|
|
@@ -2826,8 +2893,8 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
2826
2893
|
</div>
|
|
2827
2894
|
|
|
2828
2895
|
${this.summary&&this.summary.warnings?this.summary.warnings.map((t=>j`<temba-alert level="warning"
|
|
2829
|
-
|
|
2830
|
-
|
|
2896
|
+
>${pr(t)}</temba-alert
|
|
2897
|
+
>`)):""}
|
|
2831
2898
|
`}}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
2899
|
:host {
|
|
2833
2900
|
align-items: center;
|
|
@@ -3863,7 +3930,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
3863
3930
|
</div>
|
|
3864
3931
|
</div>
|
|
3865
3932
|
</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`
|
|
3933
|
+
`}}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
3934
|
:host {
|
|
3868
3935
|
display: flex;
|
|
3869
3936
|
flex-direction: column;
|
|
@@ -3972,6 +4039,14 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
3972
4039
|
.bottom .tab.selected {
|
|
3973
4040
|
}
|
|
3974
4041
|
|
|
4042
|
+
.unselect .tab.selected {
|
|
4043
|
+
cursor: pointer;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
.unselect .tab.selected:hover {
|
|
4047
|
+
background: var(--unselect-tab-color, #eee);
|
|
4048
|
+
}
|
|
4049
|
+
|
|
3975
4050
|
.tab:hover {
|
|
3976
4051
|
--icon-color: #666;
|
|
3977
4052
|
color: #666;
|
|
@@ -4059,7 +4134,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4059
4134
|
.pane {
|
|
4060
4135
|
display: flex;
|
|
4061
4136
|
}
|
|
4062
|
-
`}handleTabClick(t){
|
|
4137
|
+
`}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
4138
|
${this.bottom?j`<div
|
|
4064
4139
|
class="pane ${Vt({first:0==this.index,embedded:this.embedded,bottom:this.bottom})}"
|
|
4065
4140
|
>
|
|
@@ -4067,7 +4142,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4067
4142
|
</div>`:null}
|
|
4068
4143
|
|
|
4069
4144
|
<div
|
|
4070
|
-
class="tabs ${Vt({tabs:!0,bottom:this.bottom,collapses:this.collapses,embedded:this.embedded,focusedname:this.focusedName})}"
|
|
4145
|
+
class="tabs ${Vt({tabs:!0,bottom:this.bottom,collapses:this.collapses,embedded:this.embedded,focusedname:this.focusedName,unselect:this.unselect})}"
|
|
4071
4146
|
>
|
|
4072
4147
|
${this.tabs.map(((t,e)=>j`
|
|
4073
4148
|
<div
|
|
@@ -4099,7 +4174,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
4099
4174
|
>
|
|
4100
4175
|
<slot></slot>
|
|
4101
4176
|
</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`
|
|
4177
|
+
`}}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
4178
|
:host {
|
|
4104
4179
|
display: none;
|
|
4105
4180
|
flex-direction: column;
|
|
@@ -5938,6 +6013,10 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
5938
6013
|
title="${this.datetime.toLocaleString(Ph.datetime)}"
|
|
5939
6014
|
>${t}</span
|
|
5940
6015
|
>`}}}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`
|
|
6016
|
+
:host {
|
|
6017
|
+
--textarea-min-height: var(--textarea-min-height, 4em);
|
|
6018
|
+
}
|
|
6019
|
+
|
|
5941
6020
|
.container {
|
|
5942
6021
|
display: flex;
|
|
5943
6022
|
flex-direction: column;
|
|
@@ -5958,7 +6037,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
5958
6037
|
--compose-curvature,
|
|
5959
6038
|
var(--curvature) var(--curvature) 0px 0px
|
|
5960
6039
|
);
|
|
5961
|
-
|
|
6040
|
+
|
|
5962
6041
|
--widget-box-shadow: none;
|
|
5963
6042
|
padding: var(--compose-padding, 0px);
|
|
5964
6043
|
}
|
|
@@ -6074,6 +6153,7 @@ let ir=Is,or=!1;const nr=["es","fr","pt"],{setLocale:sr}=(t=>(function(t){if(or)
|
|
|
6074
6153
|
embedded
|
|
6075
6154
|
focusedname
|
|
6076
6155
|
bottom
|
|
6156
|
+
unselect
|
|
6077
6157
|
refresh="${this.currentAttachments.length}|${this.index}|${this.currentQuickReplies.length}|${t}|${this.currentOptin}"
|
|
6078
6158
|
>
|
|
6079
6159
|
${this.attachments?j`<temba-tab
|