@nyaruka/temba-components 0.63.2 → 0.64.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/dist/{f03ff82f.js → b023e673.js} +185 -167
  3. package/dist/index.js +185 -167
  4. package/dist/static/svg/index.svg +1 -1
  5. package/dist/sw.js +1 -1
  6. package/dist/sw.js.map +1 -1
  7. package/dist/templates/components-body.html +1 -1
  8. package/dist/templates/components-head.html +1 -1
  9. package/out-tsc/src/compose/Compose.js +48 -5
  10. package/out-tsc/src/compose/Compose.js.map +1 -1
  11. package/out-tsc/src/contacts/ContactChat.js +3 -8
  12. package/out-tsc/src/contacts/ContactChat.js.map +1 -1
  13. package/out-tsc/src/contacts/events.js +3 -2
  14. package/out-tsc/src/contacts/events.js.map +1 -1
  15. package/out-tsc/src/select/Select.js +6 -1
  16. package/out-tsc/src/select/Select.js.map +1 -1
  17. package/out-tsc/src/tabpane/Tab.js +4 -0
  18. package/out-tsc/src/tabpane/Tab.js.map +1 -1
  19. package/out-tsc/src/tabpane/TabPane.js +7 -2
  20. package/out-tsc/src/tabpane/TabPane.js.map +1 -1
  21. package/out-tsc/src/vectoricon/index.js +2 -2
  22. package/out-tsc/src/vectoricon/index.js.map +1 -1
  23. package/out-tsc/test/temba-compose.test.js +1 -0
  24. package/out-tsc/test/temba-compose.test.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/compose/Compose.ts +53 -7
  27. package/src/contacts/ContactChat.ts +2 -7
  28. package/src/contacts/events.ts +2 -2
  29. package/src/select/Select.ts +8 -1
  30. package/src/tabpane/Tab.ts +3 -0
  31. package/src/tabpane/TabPane.ts +7 -2
  32. package/src/vectoricon/index.ts +2 -2
  33. package/static/svg/index.svg +1 -1
  34. package/static/svg/work/traced/message-chat-square.svg +1 -0
  35. package/static/svg/work/used/message-chat-square.svg +3 -0
  36. package/test/temba-compose.test.ts +1 -0
@@ -1230,11 +1230,11 @@ export const renderChannelEvent = (event: ChannelEvent): TemplateResult => {
1230
1230
  eventMessage = 'Incoming Phone call';
1231
1231
  } else if (event.event.type == 'optin') {
1232
1232
  eventMessage = html`Opted in to
1233
- <span class="attn">${event.event.optin.name}</span>`;
1233
+ <span class="attn">${event.event.optin?.name}</span>`;
1234
1234
  icon = Icon.optin;
1235
1235
  } else if (event.event.type == 'optout') {
1236
1236
  eventMessage = html`Opted out of
1237
- <span class="attn">${event.event.optin.name}</span>`;
1237
+ <span class="attn">${event.event.optin?.name}</span>`;
1238
1238
  icon = Icon.optout;
1239
1239
  }
1240
1240
 
@@ -516,7 +516,14 @@ export class Select extends FormElement {
516
516
 
517
517
  if (changedProperties.has('values')) {
518
518
  this.updateInputs();
519
- if (this.multi || this.values.length === 1) {
519
+ if (
520
+ this.multi ||
521
+ this.values.length === 1 ||
522
+ // fire change if being cleared
523
+ (this.values.length == 0 &&
524
+ changedProperties.get('values') &&
525
+ changedProperties.get('values').length > 0)
526
+ ) {
520
527
  this.fireEvent('change');
521
528
  }
522
529
  }
@@ -49,6 +49,9 @@ export class Tab extends RapidElement {
49
49
  @property({ type: Number })
50
50
  count = 0;
51
51
 
52
+ @property({ type: Boolean })
53
+ checked = false;
54
+
52
55
  public hasBadge() {
53
56
  return this.count > 0;
54
57
  }
@@ -56,7 +56,6 @@ export class TabPane extends RapidElement {
56
56
  .tab .name {
57
57
  margin-left: 0.4em;
58
58
  max-width: 80px;
59
- margin-right: 0.4em;
60
59
  overflow: hidden;
61
60
  transition: max-width 500ms ease-in-out, margin 500ms ease-in-out;
62
61
  white-space: nowrap;
@@ -93,7 +92,6 @@ export class TabPane extends RapidElement {
93
92
  .focusedname .tab.selected .name {
94
93
  margin-left: 0.4em;
95
94
  max-width: 200px;
96
- margin-right: 0.4em;
97
95
  }
98
96
 
99
97
  .tab {
@@ -194,6 +192,10 @@ export class TabPane extends RapidElement {
194
192
  .embedded.pane {
195
193
  // padding: 0.3em;
196
194
  }
195
+
196
+ .check {
197
+ margin-left: 0.4em;
198
+ }
197
199
  `;
198
200
  }
199
201
 
@@ -338,6 +340,9 @@ export class TabPane extends RapidElement {
338
340
  </div>
339
341
  `
340
342
  : null}
343
+ ${tab.checked
344
+ ? html`<temba-icon class="check" name="check"></temba-icon>`
345
+ : null}
341
346
  </div>
342
347
  `
343
348
  )}
@@ -1,5 +1,5 @@
1
1
  // for cache busting we dynamically generate a fingerprint, use yarn svg to update
2
- export const SVG_FINGERPRINT = '8dab8ee62610a33e1b9643402301d455';
2
+ export const SVG_FINGERPRINT = 'fb06525f01e92b0e6e6a0d726d7c1177';
3
3
 
4
4
  // only icons below are included in the sprite sheet
5
5
  export enum Icon {
@@ -184,7 +184,7 @@ export enum Icon {
184
184
  trigger_inbound_call = 'phone-incoming-01',
185
185
  trigger_missed_call = 'phone-hang-up',
186
186
  trigger_schedule = 'calendar',
187
- trigger_new_conversation = 'conversation',
187
+ trigger_new_conversation = 'message-chat-square',
188
188
  trigger_referral = 'user-right-01',
189
189
  trigger_closed_ticket = 'agent',
190
190
  trigger_opt_in = 'message-check-circle',