@nyaruka/temba-components 0.167.0 → 0.168.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 (59) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/locales/es.js +3 -1
  3. package/dist/locales/es.js.map +1 -1
  4. package/dist/locales/fr.js +3 -1
  5. package/dist/locales/fr.js.map +1 -1
  6. package/dist/locales/pt.js +3 -1
  7. package/dist/locales/pt.js.map +1 -1
  8. package/dist/temba-components.js +2791 -1668
  9. package/dist/temba-components.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/Icons.ts +2 -0
  12. package/src/display/Button.ts +8 -6
  13. package/src/display/Chat.ts +541 -191
  14. package/src/display/Dropdown.ts +40 -17
  15. package/src/display/Label.ts +25 -4
  16. package/src/display/TembaDate.ts +11 -2
  17. package/src/display/Tip.ts +157 -18
  18. package/src/events/eventRenderers.ts +678 -268
  19. package/src/events.ts +16 -1
  20. package/src/flow/NodeEditor.ts +82 -9
  21. package/src/flow/actions/add_contact_urn.ts +1 -0
  22. package/src/flow/actions/play_audio.ts +1 -0
  23. package/src/flow/actions/send_broadcast.ts +17 -1
  24. package/src/flow/actions/send_msg.ts +12 -1
  25. package/src/flow/actions/set_run_result.ts +1 -0
  26. package/src/flow/actions/start_session.ts +10 -1
  27. package/src/flow/nodes/shared-rules.ts +2 -0
  28. package/src/flow/nodes/split_by_airtime.ts +6 -0
  29. package/src/flow/nodes/split_by_expression.ts +1 -0
  30. package/src/flow/nodes/split_by_llm.ts +2 -0
  31. package/src/flow/nodes/split_by_llm_categorize.ts +3 -1
  32. package/src/flow/nodes/split_by_random.ts +2 -1
  33. package/src/flow/nodes/split_by_resthook.ts +4 -1
  34. package/src/flow/nodes/split_by_webhook.ts +9 -1
  35. package/src/flow/types.ts +3 -0
  36. package/src/flow/utils.ts +49 -0
  37. package/src/form/DatePicker.ts +2 -1
  38. package/src/layout/Card.ts +9 -0
  39. package/src/layout/CardLayout.ts +426 -21
  40. package/src/layout/CardStack.ts +4 -1
  41. package/src/list/ContactList.ts +22 -17
  42. package/src/list/ContentList.ts +632 -29
  43. package/src/list/MsgList.ts +4 -2
  44. package/src/list/SortableList.ts +5 -1
  45. package/src/list/TembaMenu.ts +67 -6
  46. package/src/live/ContactChat.ts +655 -336
  47. package/src/live/ContactDetails.ts +961 -88
  48. package/src/live/ContactFieldEditor.ts +46 -11
  49. package/src/live/ContactFields.ts +57 -16
  50. package/src/live/ContactStoreElement.ts +15 -8
  51. package/src/locales/es.ts +3 -2
  52. package/src/locales/fr.ts +3 -2
  53. package/src/locales/pt.ts +3 -2
  54. package/src/simulator/Simulator.ts +28 -0
  55. package/src/styles/pillVariants.ts +13 -1
  56. package/web-test-runner.config.mjs +2 -0
  57. package/xliff/es.xlf +6 -3
  58. package/xliff/fr.xlf +6 -3
  59. package/xliff/pt.xlf +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyaruka/temba-components",
3
- "version": "0.167.0",
3
+ "version": "0.168.0",
4
4
  "description": "Web components to support rapidpro and related projects",
5
5
  "author": "Nyaruka <code@nyaruka.coim>",
6
6
  "main": "dist/index.js",
package/src/Icons.ts CHANGED
@@ -57,6 +57,7 @@ export enum Icon {
57
57
  definitions_export = 'download-cloud-01',
58
58
  delete = 'trash-03',
59
59
  delete_small = 'x',
60
+ docs = 'file-02',
60
61
  down = 'chevron-down',
61
62
  down_double = 'chevron-down-double',
62
63
  download = 'download-01',
@@ -128,6 +129,7 @@ export enum Icon {
128
129
  org_suspended = 'slash-circle-01',
129
130
  org_verified = 'check-verified-02',
130
131
  overview = 'pie-chart-01',
132
+ privacy = 'shield-02',
131
133
  prometheus = 'prometheus',
132
134
  progress_spinner = 'refresh-cw-04',
133
135
  refresh = 'refresh-cw-05',
@@ -26,7 +26,7 @@ export class Button extends LitElement {
26
26
  justify-content: var(--button-justify, center);
27
27
  gap: 6px;
28
28
  flex-grow: 1;
29
- height: 28px;
29
+ height: var(--button-height, 28px);
30
30
  padding: 0 10px;
31
31
  border: 1px solid transparent;
32
32
  border-radius: var(--r-sm);
@@ -58,11 +58,13 @@ export class Button extends LitElement {
58
58
  white-space: nowrap;
59
59
  }
60
60
 
61
- /* even smaller variant (compact lists, list-row actions, etc.) */
61
+ /* even smaller variant (compact lists, list-row actions, etc.).
62
+ The vars let dense consumers (e.g. slim status rows) compact
63
+ it further without another named size. */
62
64
  .small {
63
- height: 24px;
64
- padding: 0 8px;
65
- font-size: 12px;
65
+ height: var(--button-small-height, 24px);
66
+ padding: 0 var(--button-small-x-pad, 8px);
67
+ font-size: var(--button-small-font-size, 12px);
66
68
  }
67
69
 
68
70
  /* DS .btn-primary — solid accent fill with a faint top
@@ -127,7 +129,7 @@ export class Button extends LitElement {
127
129
 
128
130
  /* icon-only button — square footprint, ghost chrome */
129
131
  .icon-button {
130
- width: 28px;
132
+ width: var(--button-height, 28px);
131
133
  padding: 0;
132
134
  background: transparent;
133
135
  border-color: transparent;