@nyaruka/temba-components 0.90.0 → 0.91.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,18 @@ 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.91.1](https://github.com/nyaruka/temba-components/compare/v0.91.0...v0.91.1)
|
|
8
|
+
|
|
9
|
+
#### [v0.91.0](https://github.com/nyaruka/temba-components/compare/v0.90.0...v0.91.0)
|
|
10
|
+
|
|
11
|
+
> 7 June 2024
|
|
12
|
+
|
|
13
|
+
- Remove params from component spec [`#431`](https://github.com/nyaruka/temba-components/pull/431)
|
|
14
|
+
|
|
7
15
|
#### [v0.90.0](https://github.com/nyaruka/temba-components/compare/v0.89.0...v0.90.0)
|
|
8
16
|
|
|
17
|
+
> 7 June 2024
|
|
18
|
+
|
|
9
19
|
- Add media picker, use for compose and templates [`#430`](https://github.com/nyaruka/temba-components/pull/430)
|
|
10
20
|
- Fix drop acceptance [`f520af6`](https://github.com/nyaruka/temba-components/commit/f520af64ceaa2630833d36d36eac4e42c97204f1)
|
|
11
21
|
- Make templates work for different content types [`58b7ed8`](https://github.com/nyaruka/temba-components/commit/58b7ed8a49d537055f946f3ed404aecd592d6db3)
|
package/dist/temba-components.js
CHANGED
|
@@ -7733,24 +7733,24 @@ background: #ccc;
|
|
|
7733
7733
|
name="${t.name}"
|
|
7734
7734
|
index="${o}"
|
|
7735
7735
|
placeholder="{{${e}}}"
|
|
7736
|
-
></temba-completion>`})):t.
|
|
7736
|
+
></temba-completion>`})):Object.values(t.variables).map((t=>{const e=this.translation.variables[t];if("image"===e.type||"document"===e.type||"audio"===e.type||"video"===e.type){let i=[];if(this.variables[t]){const e=this.variables[t].split(":");i=[{url:e[1],content_type:e[0]}]}return j`<div
|
|
7737
7737
|
style="
|
|
7738
7738
|
display: flex;
|
|
7739
7739
|
align-items: center;
|
|
7740
7740
|
border-radius: var(--curvature);
|
|
7741
|
-
${0===
|
|
7741
|
+
${0===i.length?"background-color:rgba(255,0,0,.07);":""}
|
|
7742
7742
|
"
|
|
7743
7743
|
>
|
|
7744
7744
|
<temba-media-picker
|
|
7745
7745
|
accept="${"document"===e.type?"application/pdf":e.type+"/*"}"
|
|
7746
7746
|
max="1"
|
|
7747
|
-
index=${
|
|
7747
|
+
index=${t}
|
|
7748
7748
|
icon="attachment_${e.type}"
|
|
7749
|
-
attachments=${JSON.stringify(
|
|
7749
|
+
attachments=${JSON.stringify(i)}
|
|
7750
7750
|
@change=${this.handleAttachmentsChanged.bind(this)}
|
|
7751
7751
|
></temba-media-picker>
|
|
7752
7752
|
<div>
|
|
7753
|
-
${0==
|
|
7753
|
+
${0==i.length?j`Attach ${e.type} to continue`:""}
|
|
7754
7754
|
</div>
|
|
7755
7755
|
</div>`}})),j`<div class="content">${o}</div> `}renderComponents(t){const e=t.filter((t=>!t.type.startsWith("button/"))).map((t=>j`<div class="${t.name}">
|
|
7756
7756
|
${this.renderVariables(t)}
|