@nyaruka/temba-components 0.47.0 → 0.47.2

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 +18 -0
  2. package/dist/{df04e47b.js → 5c517c43.js} +176 -40
  3. package/dist/index.js +176 -40
  4. package/dist/sw.js +1 -1
  5. package/dist/sw.js.map +1 -1
  6. package/dist/templates/components-body.html +1 -1
  7. package/dist/templates/components-head.html +1 -1
  8. package/out-tsc/src/completion/Completion.js +7 -0
  9. package/out-tsc/src/completion/Completion.js.map +1 -1
  10. package/out-tsc/src/compose/Compose.js +6 -6
  11. package/out-tsc/src/compose/Compose.js.map +1 -1
  12. package/out-tsc/src/contacts/ContactChat.js +2 -0
  13. package/out-tsc/src/contacts/ContactChat.js.map +1 -1
  14. package/out-tsc/src/contacts/ContactTickets.js +191 -4
  15. package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
  16. package/out-tsc/src/contacts/events.js +4 -0
  17. package/out-tsc/src/contacts/events.js.map +1 -1
  18. package/out-tsc/src/dropdown/Dropdown.js +9 -2
  19. package/out-tsc/src/dropdown/Dropdown.js.map +1 -1
  20. package/out-tsc/src/fields/FieldManager.js +1 -0
  21. package/out-tsc/src/fields/FieldManager.js.map +1 -1
  22. package/out-tsc/src/interfaces.js +1 -0
  23. package/out-tsc/src/interfaces.js.map +1 -1
  24. package/out-tsc/src/list/TicketList.js +5 -2
  25. package/out-tsc/src/list/TicketList.js.map +1 -1
  26. package/out-tsc/src/store/Store.js +11 -0
  27. package/out-tsc/src/store/Store.js.map +1 -1
  28. package/out-tsc/src/textinput/TextInput.js +12 -0
  29. package/out-tsc/src/textinput/TextInput.js.map +1 -1
  30. package/out-tsc/src/utils/index.js +12 -0
  31. package/out-tsc/src/utils/index.js.map +1 -1
  32. package/out-tsc/test/temba-contact-tickets.test.js +36 -0
  33. package/out-tsc/test/temba-contact-tickets.test.js.map +1 -0
  34. package/out-tsc/test/temba-field-manager.test.js +6 -3
  35. package/out-tsc/test/temba-field-manager.test.js.map +1 -1
  36. package/out-tsc/test/utils.test.js +1 -0
  37. package/out-tsc/test/utils.test.js.map +1 -1
  38. package/package.json +1 -1
  39. package/screenshots/truth/contacts/tickets-assignment.png +0 -0
  40. package/screenshots/truth/contacts/tickets.png +0 -0
  41. package/screenshots/truth/list/fields-filtered.png +0 -0
  42. package/src/completion/Completion.ts +8 -0
  43. package/src/compose/Compose.ts +7 -6
  44. package/src/contacts/ContactChat.ts +2 -1
  45. package/src/contacts/ContactTickets.ts +216 -6
  46. package/src/contacts/events.ts +4 -0
  47. package/src/dropdown/Dropdown.ts +8 -2
  48. package/src/fields/FieldManager.ts +2 -0
  49. package/src/interfaces.ts +1 -0
  50. package/src/list/TicketList.ts +5 -5
  51. package/src/store/Store.ts +19 -0
  52. package/src/textinput/TextInput.ts +13 -0
  53. package/src/utils/index.ts +15 -0
  54. package/test/temba-contact-tickets.test.ts +57 -0
  55. package/test/temba-field-manager.test.ts +7 -3
  56. package/test/utils.test.ts +1 -0
  57. package/test-assets/contacts/contact-tickets.json +151 -0
  58. package/test-assets/store/users.json +41 -0
  59. package/test-assets/style.css +2 -1
@@ -0,0 +1,151 @@
1
+ {
2
+ "next": null,
3
+ "previous": null,
4
+ "results": [
5
+ {
6
+ "uuid": "6c3156f8-ca00-4f26-b8f7-b5e131e6db7a",
7
+ "ticketer": {
8
+ "uuid": "0c3b0f9a-344c-47a5-9041-08281d71d46b",
9
+ "name": "TextIt Tickets"
10
+ },
11
+ "contact": {
12
+ "uuid": "24d64810-3315-4ff5-be85-48e3fe055bf9",
13
+ "name": "Eric Newcomer"
14
+ },
15
+ "status": "open",
16
+ "topic": {
17
+ "uuid": "4bd2ba9c-9442-4237-888c-b5ff396f2422",
18
+ "name": "General"
19
+ },
20
+ "body": "Another ticket",
21
+ "assignee": {
22
+ "email": "admin1@nyaruka.com",
23
+ "name": "Adam McAdmin"
24
+ },
25
+ "opened_on": "2023-03-21T20:26:24.522617Z",
26
+ "opened_by": {
27
+ "email": "admin1@nyaruka.com",
28
+ "name": "Adam McAdmin"
29
+ },
30
+ "opened_in": null,
31
+ "modified_on": "2023-04-07T18:21:46.929661Z",
32
+ "closed_on": null
33
+ },
34
+ {
35
+ "uuid": "37ca10d8-b976-4885-b48c-21d3ec68b743",
36
+ "ticketer": {
37
+ "uuid": "0c3b0f9a-344c-47a5-9041-08281d71d46b",
38
+ "name": "TextIt Tickets"
39
+ },
40
+ "contact": {
41
+ "uuid": "24d64810-3315-4ff5-be85-48e3fe055bf9",
42
+ "name": "Eric Newcomer"
43
+ },
44
+ "status": "open",
45
+ "topic": {
46
+ "uuid": "4bd2ba9c-9442-4237-888c-b5ff396f2422",
47
+ "name": "General"
48
+ },
49
+ "body": "Another new ticket",
50
+ "assignee": {
51
+ "email": "admin1@nyaruka.com",
52
+ "name": "Adam McAdmin"
53
+ },
54
+ "opened_on": "2023-03-21T22:29:06.849413Z",
55
+ "opened_by": {
56
+ "email": "admin1@nyaruka.com",
57
+ "name": "Adam McAdmin"
58
+ },
59
+ "opened_in": null,
60
+ "modified_on": "2023-04-07T18:21:36.201548Z",
61
+ "closed_on": null
62
+ },
63
+ {
64
+ "uuid": "a57970e2-79ab-46d4-8761-c7cbc6a380ef",
65
+ "ticketer": {
66
+ "uuid": "0c3b0f9a-344c-47a5-9041-08281d71d46b",
67
+ "name": "TextIt Tickets"
68
+ },
69
+ "contact": {
70
+ "uuid": "24d64810-3315-4ff5-be85-48e3fe055bf9",
71
+ "name": "Eric Newcomer"
72
+ },
73
+ "status": "open",
74
+ "topic": {
75
+ "uuid": "4bd2ba9c-9442-4237-888c-b5ff396f2422",
76
+ "name": "General"
77
+ },
78
+ "body": "Another open ticket",
79
+ "assignee": {
80
+ "email": "agent1@nyaruka.com",
81
+ "name": "Agnes McAgent"
82
+ },
83
+ "opened_on": "2023-03-02T20:40:47.935785Z",
84
+ "opened_by": {
85
+ "email": "admin1@nyaruka.com",
86
+ "name": "Adam McAdmin"
87
+ },
88
+ "opened_in": null,
89
+ "modified_on": "2023-04-07T18:20:23.248846Z",
90
+ "closed_on": null
91
+ },
92
+ {
93
+ "uuid": "73de765d-eac6-4c91-b0d3-72fe9471f76f",
94
+ "ticketer": {
95
+ "uuid": "0c3b0f9a-344c-47a5-9041-08281d71d46b",
96
+ "name": "TextIt Tickets"
97
+ },
98
+ "contact": {
99
+ "uuid": "24d64810-3315-4ff5-be85-48e3fe055bf9",
100
+ "name": "Eric Newcomer"
101
+ },
102
+ "status": "open",
103
+ "topic": {
104
+ "uuid": "4bd2ba9c-9442-4237-888c-b5ff396f2422",
105
+ "name": "General"
106
+ },
107
+ "body": "",
108
+ "assignee": {
109
+ "email": "editor1@nyaruka.com",
110
+ "name": "Eddy McEditor"
111
+ },
112
+ "opened_on": "2023-03-22T19:09:15.059434Z",
113
+ "opened_by": null,
114
+ "opened_in": {
115
+ "uuid": "3bc33ca4-2fc2-4a45-83ea-4ff5bf6ea062",
116
+ "name": "Open Ticket"
117
+ },
118
+ "modified_on": "2023-04-07T18:15:36.242699Z",
119
+ "closed_on": null
120
+ },
121
+ {
122
+ "uuid": "d69f3568-c300-4470-b0a5-fbadd6bf0f9f",
123
+ "ticketer": {
124
+ "uuid": "0c3b0f9a-344c-47a5-9041-08281d71d46b",
125
+ "name": "TextIt Tickets"
126
+ },
127
+ "contact": {
128
+ "uuid": "24d64810-3315-4ff5-be85-48e3fe055bf9",
129
+ "name": "Eric Newcomer"
130
+ },
131
+ "status": "closed",
132
+ "topic": {
133
+ "uuid": "4bd2ba9c-9442-4237-888c-b5ff396f2422",
134
+ "name": "General"
135
+ },
136
+ "body": "A manual ticket",
137
+ "assignee": {
138
+ "email": "admin1@nyaruka.com",
139
+ "name": "Adam McAdmin"
140
+ },
141
+ "opened_on": "2023-01-19T21:56:53.700092Z",
142
+ "opened_by": {
143
+ "email": "admin1@nyaruka.com",
144
+ "name": "Adam McAdmin"
145
+ },
146
+ "opened_in": null,
147
+ "modified_on": "2023-04-05T18:53:38.675097Z",
148
+ "closed_on": "2023-04-05T18:53:38.675097Z"
149
+ }
150
+ ]
151
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "next": null,
3
+ "previous": null,
4
+ "results": [
5
+ {
6
+ "email": "agent1@nyaruka.com",
7
+ "first_name": "Agnes",
8
+ "last_name": "McAgent",
9
+ "role": "agent",
10
+ "created_on": "2023-01-18T19:33:13.637127Z"
11
+ },
12
+ {
13
+ "email": "surveyor1@nyaruka.com",
14
+ "first_name": "",
15
+ "last_name": "",
16
+ "role": "surveyor",
17
+ "created_on": "2023-01-18T19:33:13.561413Z"
18
+ },
19
+ {
20
+ "email": "viewer1@nyaruka.com",
21
+ "first_name": "Veronica",
22
+ "last_name": "McViews",
23
+ "role": "agent",
24
+ "created_on": "2023-01-18T19:33:13.485734Z"
25
+ },
26
+ {
27
+ "email": "editor1@nyaruka.com",
28
+ "first_name": "Eddy",
29
+ "last_name": "McEditor",
30
+ "role": "editor",
31
+ "created_on": "2023-01-18T19:33:13.410675Z"
32
+ },
33
+ {
34
+ "email": "admin1@nyaruka.com",
35
+ "first_name": "Adam",
36
+ "last_name": "McAdmin",
37
+ "role": "administrator",
38
+ "created_on": "2023-01-18T19:33:13.336367Z"
39
+ }
40
+ ]
41
+ }
@@ -125,6 +125,7 @@ html {
125
125
  font-size: var(--font-size);
126
126
  font-weight: 300;
127
127
  font-family: var(--font-family);
128
+ --dropdown-shadow: rgb(0 0 0 / 30%) 0px 0px 60px, rgb(0 0 0 / 12%) 0px 6px 12px;
128
129
 
129
130
  --icon-color: var(--text-color);
130
131
  --icon-color-hover: var(--icon-color);
@@ -139,7 +140,7 @@ html {
139
140
  --color-text-help: rgb(120,120,120);
140
141
  --label-size: 14px;
141
142
 
142
- --button-y: 6px;
143
+ --button-y: 6px;
143
144
  --button-x: 14px;
144
145
 
145
146
  --menu-padding: 1em;