@nyaruka/temba-components 0.164.0 → 0.165.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 (49) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/DEV_DATA.md +11 -11
  3. package/README.md +4 -4
  4. package/TEST_OPTIMIZATION.md +8 -11
  5. package/dist/locales/es.js +4 -0
  6. package/dist/locales/es.js.map +1 -1
  7. package/dist/locales/fr.js +4 -0
  8. package/dist/locales/fr.js.map +1 -1
  9. package/dist/locales/pt.js +4 -0
  10. package/dist/locales/pt.js.map +1 -1
  11. package/dist/static/svg/index.svg +1 -1
  12. package/dist/temba-components.js +1555 -484
  13. package/dist/temba-components.js.map +1 -1
  14. package/orca/setup.sh +2 -2
  15. package/package.json +13 -18
  16. package/scripts/dev-data-sync.mjs +4 -4
  17. package/src/Icons.ts +3 -2
  18. package/src/display/ProgressBar.ts +15 -2
  19. package/src/form/Compose.ts +31 -1
  20. package/src/form/ContactSearch.ts +229 -126
  21. package/src/interfaces.ts +52 -0
  22. package/src/layout/Card.ts +25 -0
  23. package/src/layout/CardLayout.ts +3 -3
  24. package/src/layout/HeaderBar.ts +4 -1
  25. package/src/list/BroadcastList.ts +912 -0
  26. package/src/list/ContentList.ts +46 -10
  27. package/src/list/FieldList.ts +1057 -0
  28. package/src/list/SortableList.ts +7 -2
  29. package/src/list/TembaList.ts +8 -0
  30. package/src/list/TembaMenu.ts +5 -38
  31. package/src/live/CampaignEvents.ts +33 -19
  32. package/src/live/ContactChat.ts +7 -1
  33. package/src/live/ContactDetails.ts +20 -13
  34. package/src/live/ContactFieldEditor.ts +7 -3
  35. package/src/live/ContactStoreElement.ts +3 -1
  36. package/src/live/ContactTimeline.ts +28 -7
  37. package/src/locales/es.ts +4 -0
  38. package/src/locales/fr.ts +4 -0
  39. package/src/locales/pt.ts +4 -0
  40. package/static/svg/index.svg +1 -1
  41. package/static/svg/packs/2-temba/star-filled.svg +3 -0
  42. package/static/svg/work/traced/star-filled.svg +1 -0
  43. package/static/svg/work/used/star-filled.svg +3 -0
  44. package/stress-test.js +3 -3
  45. package/temba-modules.ts +4 -0
  46. package/web-test-runner.config.mjs +1 -1
  47. package/xliff/es.xlf +12 -0
  48. package/xliff/fr.xlf +12 -0
  49. package/xliff/pt.xlf +12 -0
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.2827 3.45332C11.5131 2.98638 11.6284 2.75291 11.7848 2.67831C11.9209 2.61341 12.0791 2.61341 12.2152 2.67831C12.3717 2.75291 12.4869 2.98638 12.7174 3.45332L14.9041 7.88328C14.9721 8.02113 15.0061 8.09006 15.0558 8.14358C15.0999 8.19096 15.1527 8.22935 15.2113 8.25662C15.2776 8.28742 15.3536 8.29854 15.5057 8.32077L20.397 9.03571C20.9121 9.11099 21.1696 9.14863 21.2888 9.27444C21.3925 9.38389 21.4412 9.5343 21.4215 9.68377C21.3988 9.85558 21.2124 10.0372 20.8395 10.4004L17.3014 13.8464C17.1912 13.9538 17.136 14.0076 17.1004 14.0715C17.0689 14.128 17.0487 14.1902 17.0409 14.2545C17.0321 14.3271 17.0451 14.403 17.0711 14.5547L17.906 19.4221C17.994 19.9355 18.038 20.1922 17.9553 20.3445C17.8833 20.477 17.7554 20.57 17.6071 20.5975C17.4366 20.6291 17.2061 20.5078 16.7451 20.2654L12.3724 17.9658C12.2361 17.8942 12.168 17.8584 12.0962 17.8443C12.0327 17.8318 11.9673 17.8318 11.9038 17.8443C11.832 17.8584 11.7639 17.8942 11.6277 17.9658L7.25492 20.2654C6.79392 20.5078 6.56341 20.6291 6.39297 20.5975C6.24468 20.57 6.11672 20.477 6.04474 20.3445C5.962 20.1922 6.00603 19.9355 6.09407 19.4221L6.92889 14.5547C6.95491 14.403 6.96793 14.3271 6.95912 14.2545C6.95132 14.1902 6.93111 14.128 6.89961 14.0715C6.86402 14.0076 6.80888 13.9538 6.69859 13.8464L3.16056 10.4004C2.78766 10.0372 2.60121 9.85558 2.57853 9.68377C2.55879 9.5343 2.60755 9.38389 2.71125 9.27444C2.83044 9.14863 3.08797 9.11099 3.60304 9.03571L8.49431 8.32077C8.64642 8.29854 8.72248 8.28742 8.78872 8.25662C8.84736 8.22935 8.90016 8.19096 8.94419 8.14358C8.99391 8.09006 9.02793 8.02113 9.09597 7.88328L11.2827 3.45332Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11.360 1.796 C 11.079 1.939,10.569 2.763,9.648 4.560 C 8.926 5.968,8.314 7.171,8.288 7.234 C 8.261 7.297,6.980 7.533,5.440 7.760 C 2.487 8.195,1.970 8.388,1.697 9.154 C 1.423 9.922,1.728 10.391,3.849 12.458 L 5.924 14.480 5.442 17.280 C 5.177 18.820,5.001 20.277,5.052 20.518 C 5.191 21.176,5.878 21.647,6.566 21.555 C 6.877 21.514,8.227 20.899,9.566 20.189 L 12.000 18.898 14.423 20.183 C 17.058 21.580,17.700 21.781,18.292 21.393 C 19.072 20.882,19.099 20.478,18.567 17.349 L 18.079 14.480 20.155 12.445 C 22.269 10.374,22.572 9.909,22.303 9.154 C 22.030 8.388,21.512 8.195,18.568 7.761 C 17.032 7.534,15.762 7.333,15.746 7.314 C 15.729 7.295,15.139 6.124,14.433 4.712 C 13.728 3.300,13.047 2.058,12.920 1.953 C 12.555 1.650,11.796 1.573,11.360 1.796 " stroke="none" fill-rule="evenodd" fill="black"></path></svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.2827 3.45332C11.5131 2.98638 11.6284 2.75291 11.7848 2.67831C11.9209 2.61341 12.0791 2.61341 12.2152 2.67831C12.3717 2.75291 12.4869 2.98638 12.7174 3.45332L14.9041 7.88328C14.9721 8.02113 15.0061 8.09006 15.0558 8.14358C15.0999 8.19096 15.1527 8.22935 15.2113 8.25662C15.2776 8.28742 15.3536 8.29854 15.5057 8.32077L20.397 9.03571C20.9121 9.11099 21.1696 9.14863 21.2888 9.27444C21.3925 9.38389 21.4412 9.5343 21.4215 9.68377C21.3988 9.85558 21.2124 10.0372 20.8395 10.4004L17.3014 13.8464C17.1912 13.9538 17.136 14.0076 17.1004 14.0715C17.0689 14.128 17.0487 14.1902 17.0409 14.2545C17.0321 14.3271 17.0451 14.403 17.0711 14.5547L17.906 19.4221C17.994 19.9355 18.038 20.1922 17.9553 20.3445C17.8833 20.477 17.7554 20.57 17.6071 20.5975C17.4366 20.6291 17.2061 20.5078 16.7451 20.2654L12.3724 17.9658C12.2361 17.8942 12.168 17.8584 12.0962 17.8443C12.0327 17.8318 11.9673 17.8318 11.9038 17.8443C11.832 17.8584 11.7639 17.8942 11.6277 17.9658L7.25492 20.2654C6.79392 20.5078 6.56341 20.6291 6.39297 20.5975C6.24468 20.57 6.11672 20.477 6.04474 20.3445C5.962 20.1922 6.00603 19.9355 6.09407 19.4221L6.92889 14.5547C6.95491 14.403 6.96793 14.3271 6.95912 14.2545C6.95132 14.1902 6.93111 14.128 6.89961 14.0715C6.86402 14.0076 6.80888 13.9538 6.69859 13.8464L3.16056 10.4004C2.78766 10.0372 2.60121 9.85558 2.57853 9.68377C2.55879 9.5343 2.60755 9.38389 2.71125 9.27444C2.83044 9.14863 3.08797 9.11099 3.60304 9.03571L8.49431 8.32077C8.64642 8.29854 8.72248 8.28742 8.78872 8.25662C8.84736 8.22935 8.90016 8.19096 8.94419 8.14358C8.99391 8.09006 9.02793 8.02113 9.09597 7.88328L11.2827 3.45332Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
package/stress-test.js CHANGED
@@ -27,9 +27,9 @@ for (let i = 0; i < args.length; i++) {
27
27
 
28
28
  // Validate test file
29
29
  if (!testFile) {
30
- console.error('❌ Usage: pnpm stress-test <test-file> [--runs=N]');
30
+ console.error('❌ Usage: bun run stress-test <test-file> [--runs=N]');
31
31
  console.error(
32
- ' Example: pnpm stress-test test/temba-webchat.test.ts --runs=100'
32
+ ' Example: bun run stress-test test/temba-webchat.test.ts --runs=100'
33
33
  );
34
34
  process.exit(1);
35
35
  }
@@ -60,7 +60,7 @@ try {
60
60
 
61
61
  try {
62
62
  // Run the test with minimal output
63
- const result = execSync(`pnpm test ${testFile}`, {
63
+ const result = execSync(`bun run test ${testFile}`, {
64
64
  encoding: 'utf-8',
65
65
  stdio: ['pipe', 'pipe', 'pipe']
66
66
  });
package/temba-modules.ts CHANGED
@@ -55,7 +55,9 @@ import { MsgList } from './src/list/MsgList';
55
55
  import { ContactList } from './src/list/ContactList';
56
56
  import { FlowList } from './src/list/FlowList';
57
57
  import { CampaignList } from './src/list/CampaignList';
58
+ import { FieldList } from './src/list/FieldList';
58
59
  import { TriggerList } from './src/list/TriggerList';
60
+ import { BroadcastList } from './src/list/BroadcastList';
59
61
  import { WebChat } from './src/webchat/WebChat';
60
62
  import { ImagePicker } from './src/form/ImagePicker';
61
63
  import { Mask } from './src/layout/Mask';
@@ -146,7 +148,9 @@ addCustomElement('temba-msg-list', MsgList);
146
148
  addCustomElement('temba-contact-list', ContactList);
147
149
  addCustomElement('temba-flow-list', FlowList);
148
150
  addCustomElement('temba-campaign-list', CampaignList);
151
+ addCustomElement('temba-field-list', FieldList);
149
152
  addCustomElement('temba-trigger-list', TriggerList);
153
+ addCustomElement('temba-broadcast-list', BroadcastList);
150
154
  addCustomElement('temba-list', TembaList);
151
155
  addCustomElement('temba-sortable-list', SortableList);
152
156
  addCustomElement('temba-run-list', RunList);
@@ -24,7 +24,7 @@ import { defaultReporter, summaryReporter } from '@web/test-runner';
24
24
  //
25
25
  // - Gated on `WTR_COVERAGE_SHIM` (defaults on when --coverage is in
26
26
  // argv; can be force-disabled by setting it to "0") so it never
27
- // runs in plain `pnpm test`, only in the coverage path.
27
+ // runs in plain `bun run test`, only in the coverage path.
28
28
  // - Sentinel is a runtime-random string, so a fixture/cached body
29
29
  // containing the literal can't collide.
30
30
  // - `__pendingCoverages` is cleared on every parse — matched OR not —
package/xliff/es.xlf CHANGED
@@ -27,6 +27,18 @@
27
27
  <trans-unit id="s81f17cfc89a04338">
28
28
  <source>Interrupt flow</source>
29
29
  </trans-unit>
30
+ <trans-unit id="s122d4de68bcfcdf4">
31
+ <source>It's okay to restart</source>
32
+ </trans-unit>
33
+ <trans-unit id="s3eb2567092b4d7c1">
34
+ <source>from the beginning</source>
35
+ </trans-unit>
36
+ <trans-unit id="s28f37776b3901438">
37
+ <source>It's okay to interrupt</source>
38
+ </trans-unit>
39
+ <trans-unit id="s6838d20b10f7512a">
40
+ <source>and start this one</source>
41
+ </trans-unit>
30
42
  </body>
31
43
  </file>
32
44
  </xliff>
package/xliff/fr.xlf CHANGED
@@ -26,6 +26,18 @@
26
26
  <trans-unit id="s81f17cfc89a04338">
27
27
  <source>Interrupt flow</source>
28
28
  </trans-unit>
29
+ <trans-unit id="s122d4de68bcfcdf4">
30
+ <source>It's okay to restart</source>
31
+ </trans-unit>
32
+ <trans-unit id="s3eb2567092b4d7c1">
33
+ <source>from the beginning</source>
34
+ </trans-unit>
35
+ <trans-unit id="s28f37776b3901438">
36
+ <source>It's okay to interrupt</source>
37
+ </trans-unit>
38
+ <trans-unit id="s6838d20b10f7512a">
39
+ <source>and start this one</source>
40
+ </trans-unit>
29
41
  </body>
30
42
  </file>
31
43
  </xliff>
package/xliff/pt.xlf CHANGED
@@ -26,6 +26,18 @@
26
26
  <trans-unit id="s81f17cfc89a04338">
27
27
  <source>Interrupt flow</source>
28
28
  </trans-unit>
29
+ <trans-unit id="s122d4de68bcfcdf4">
30
+ <source>It's okay to restart</source>
31
+ </trans-unit>
32
+ <trans-unit id="s3eb2567092b4d7c1">
33
+ <source>from the beginning</source>
34
+ </trans-unit>
35
+ <trans-unit id="s28f37776b3901438">
36
+ <source>It's okay to interrupt</source>
37
+ </trans-unit>
38
+ <trans-unit id="s6838d20b10f7512a">
39
+ <source>and start this one</source>
40
+ </trans-unit>
29
41
  </body>
30
42
  </file>
31
43
  </xliff>