@nyaruka/temba-components 0.108.7 → 0.109.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.
- package/CHANGELOG.md +19 -2
- package/dist/static/svg/index.svg +1 -1
- package/dist/temba-components.js +602 -455
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/charcount/CharCount.js +4 -5
- package/out-tsc/src/charcount/CharCount.js.map +1 -1
- package/out-tsc/src/completion/Completion.js +27 -16
- package/out-tsc/src/completion/Completion.js.map +1 -1
- package/out-tsc/src/compose/Compose.js +259 -95
- package/out-tsc/src/compose/Compose.js.map +1 -1
- package/out-tsc/src/contacts/ContactChat.js +18 -16
- package/out-tsc/src/contacts/ContactChat.js.map +1 -1
- package/out-tsc/src/contacts/ContactTickets.js +1 -1
- package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/list/ShortcutList.js +125 -0
- package/out-tsc/src/list/ShortcutList.js.map +1 -0
- package/out-tsc/src/list/TembaList.js +8 -5
- package/out-tsc/src/list/TembaList.js.map +1 -1
- package/out-tsc/src/options/Options.js +46 -35
- package/out-tsc/src/options/Options.js.map +1 -1
- package/out-tsc/src/select/Select.js +1 -1
- package/out-tsc/src/select/Select.js.map +1 -1
- package/out-tsc/src/store/Store.js +18 -3
- package/out-tsc/src/store/Store.js.map +1 -1
- package/out-tsc/src/tabpane/Tab.js +2 -0
- package/out-tsc/src/tabpane/Tab.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +27 -5
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/src/textinput/TextInput.js +7 -2
- package/out-tsc/src/textinput/TextInput.js.map +1 -1
- package/out-tsc/src/utils/index.js.map +1 -1
- package/out-tsc/src/vectoricon/index.js +2 -2
- package/out-tsc/src/vectoricon/index.js.map +1 -1
- package/out-tsc/temba-modules.js +2 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/out-tsc/test/temba-compose.test.js +26 -18
- package/out-tsc/test/temba-compose.test.js.map +1 -1
- package/out-tsc/test/temba-contact-chat.test.js +27 -18
- package/out-tsc/test/temba-contact-chat.test.js.map +1 -1
- package/package.json +1 -1
- package/screenshots/truth/compose/attachments-and-send-button.png +0 -0
- package/screenshots/truth/compose/attachments-no-send-button.png +0 -0
- package/screenshots/truth/compose/attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-no-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-no-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-spaces.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-url.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-no-spaces.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text.png +0 -0
- package/screenshots/truth/contacts/compose-attachments-no-text-failure.png +0 -0
- package/screenshots/truth/contacts/compose-attachments-no-text-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-generic.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text-and-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-failure.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-success.png +0 -0
- package/screenshots/truth/contacts/contact-active-default.png +0 -0
- package/screenshots/truth/contacts/contact-active-show-chatbox.png +0 -0
- package/screenshots/truth/counter/summary.png +0 -0
- package/screenshots/truth/counter/text.png +0 -0
- package/screenshots/truth/counter/unicode-variables.png +0 -0
- package/screenshots/truth/counter/unicode.png +0 -0
- package/screenshots/truth/counter/variable.png +0 -0
- package/src/charcount/CharCount.ts +4 -5
- package/src/completion/Completion.ts +33 -19
- package/src/compose/Compose.ts +289 -96
- package/src/contacts/ContactChat.ts +18 -16
- package/src/contacts/ContactTickets.ts +1 -1
- package/src/interfaces.ts +7 -0
- package/src/list/ShortcutList.ts +137 -0
- package/src/list/TembaList.ts +9 -6
- package/src/options/Options.ts +53 -44
- package/src/select/Select.ts +1 -1
- package/src/store/Store.ts +23 -4
- package/src/tabpane/Tab.ts +2 -0
- package/src/tabpane/TabPane.ts +28 -5
- package/src/textinput/TextInput.ts +9 -3
- package/src/utils/index.ts +8 -2
- package/src/vectoricon/index.ts +2 -2
- package/static/svg/index.svg +1 -1
- package/static/svg/work/traced/zap-fast.svg +1 -0
- package/static/svg/work/used/zap-fast.svg +3 -0
- package/temba-modules.ts +2 -0
- package/test/temba-compose.test.ts +28 -35
- package/test/temba-contact-chat.test.ts +28 -37
- package/test-assets/store/shortcuts.json +14 -0
- package/static/svg/work/traced/message-dots-circle.svg +0 -1
- package/static/svg/work/used/message-dots-circle.svg +0 -3
|
@@ -62,13 +62,15 @@ export class TextInput extends FormElement {
|
|
|
62
62
|
transition: height var(--transition-speed) ease-in-out;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
.textinput:focus {
|
|
66
|
+
}
|
|
67
|
+
|
|
65
68
|
.textinput {
|
|
66
69
|
padding: var(--temba-textinput-padding);
|
|
67
70
|
border: none;
|
|
68
71
|
flex: 1;
|
|
69
72
|
margin: 0;
|
|
70
|
-
background:
|
|
71
|
-
background-color: transparent;
|
|
73
|
+
background: transparent;
|
|
72
74
|
color: var(--color-widget-text);
|
|
73
75
|
font-family: var(--font-family);
|
|
74
76
|
font-size: var(--temba-textinput-font-size);
|
|
@@ -233,7 +235,11 @@ export class TextInput extends FormElement {
|
|
|
233
235
|
this.value = null;
|
|
234
236
|
}
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
public getTextInput(): TextInput {
|
|
239
|
+
return this;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
public updateValue(value: string): void {
|
|
237
243
|
const cursorStart = this.inputElement.selectionStart;
|
|
238
244
|
const cursorEnd = this.inputElement.selectionEnd;
|
|
239
245
|
const sanitized = this.sanitizeGSM(value);
|
package/src/utils/index.ts
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { html, TemplateResult } from 'lit-html';
|
|
3
3
|
import { Button } from '../button/Button';
|
|
4
4
|
import { Dialog } from '../dialog/Dialog';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Attachment,
|
|
7
|
+
ContactField,
|
|
8
|
+
Shortcut,
|
|
9
|
+
Ticket,
|
|
10
|
+
User
|
|
11
|
+
} from '../interfaces';
|
|
6
12
|
import ColorHash from 'color-hash';
|
|
7
13
|
import { Toast } from '../toast/Toast';
|
|
8
14
|
|
|
@@ -10,7 +16,7 @@ export const DEFAULT_MEDIA_ENDPOINT = '/api/v2/media.json';
|
|
|
10
16
|
|
|
11
17
|
export const colorHash = new ColorHash();
|
|
12
18
|
|
|
13
|
-
export type Asset = KeyedAsset & Ticket & ContactField;
|
|
19
|
+
export type Asset = KeyedAsset & Ticket & ContactField & Shortcut;
|
|
14
20
|
|
|
15
21
|
export const DATE_FORMAT =
|
|
16
22
|
/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/;
|
package/src/vectoricon/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-duplicate-enum-values */
|
|
2
2
|
// for cache busting we dynamically generate a fingerprint, use yarn svg to update
|
|
3
|
-
export const SVG_FINGERPRINT = '
|
|
3
|
+
export const SVG_FINGERPRINT = 'f3e1cdc8bc9f2e47455a9ef0f7fe4baf';
|
|
4
4
|
|
|
5
5
|
// only icons below are included in the sprite sheet
|
|
6
6
|
export enum Icon {
|
|
@@ -145,7 +145,7 @@ export enum Icon {
|
|
|
145
145
|
service = 'magic-wand-01',
|
|
146
146
|
service_end = 'log-out-04',
|
|
147
147
|
settings = 'settings-02',
|
|
148
|
-
shortcut = '
|
|
148
|
+
shortcut = 'zap-fast',
|
|
149
149
|
show = 'eye',
|
|
150
150
|
simulator = 'phone-02',
|
|
151
151
|
sort = 'chevron-selector-vertical',
|