@nyaruka/temba-components 0.67.3 → 0.68.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 +15 -0
- package/demo/index.html +5 -3
- package/dist/{314b925e.js → dd629ee4.js} +802 -122
- package/dist/index.js +802 -122
- package/dist/static/svg/index.svg +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/templates/components-body.html +1 -1
- package/dist/templates/components-head.html +1 -1
- package/out-tsc/src/contacts/ContactTickets.js +4 -6
- package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
- package/out-tsc/src/contacts/events.js +3 -8
- package/out-tsc/src/contacts/events.js.map +1 -1
- package/out-tsc/src/imagepicker/CroppieCSS.js +254 -0
- package/out-tsc/src/imagepicker/CroppieCSS.js.map +1 -0
- package/out-tsc/src/imagepicker/ImagePicker.js +248 -0
- package/out-tsc/src/imagepicker/ImagePicker.js.map +1 -0
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/list/NotificationList.js +4 -0
- package/out-tsc/src/list/NotificationList.js.map +1 -1
- package/out-tsc/src/list/TembaMenu.js +1 -1
- package/out-tsc/src/list/TembaMenu.js.map +1 -1
- package/out-tsc/src/list/TicketList.js +16 -12
- package/out-tsc/src/list/TicketList.js.map +1 -1
- package/out-tsc/src/mask/Mask.js +36 -0
- package/out-tsc/src/mask/Mask.js.map +1 -0
- package/out-tsc/src/utils/index.js +24 -16
- package/out-tsc/src/utils/index.js.map +1 -1
- package/out-tsc/src/vectoricon/index.js +5 -1
- package/out-tsc/src/vectoricon/index.js.map +1 -1
- package/out-tsc/src/webchat/WebChat.js +515 -0
- package/out-tsc/src/webchat/WebChat.js.map +1 -0
- package/out-tsc/src/webchat/index.js +7 -0
- package/out-tsc/src/webchat/index.js.map +1 -0
- package/out-tsc/temba-modules.js +6 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/package.json +4 -2
- package/screenshots/truth/contacts/tickets-assignment.png +0 -0
- package/screenshots/truth/contacts/tickets.png +0 -0
- package/screenshots/truth/menu/menu-focused-with items.png +0 -0
- package/screenshots/truth/menu/menu-refresh-1.png +0 -0
- package/screenshots/truth/menu/menu-refresh-2.png +0 -0
- package/screenshots/truth/menu/menu-root.png +0 -0
- package/screenshots/truth/menu/menu-submenu.png +0 -0
- package/screenshots/truth/menu/menu-tasks-nextup.png +0 -0
- package/screenshots/truth/menu/menu-tasks.png +0 -0
- package/src/contacts/ContactTickets.ts +4 -6
- package/src/contacts/events.ts +3 -9
- package/src/imagepicker/CroppieCSS.ts +254 -0
- package/src/imagepicker/ImagePicker.ts +272 -0
- package/src/interfaces.ts +2 -1
- package/src/list/NotificationList.ts +3 -0
- package/src/list/TembaMenu.ts +1 -1
- package/src/list/TicketList.ts +16 -12
- package/src/mask/Mask.ts +32 -0
- package/src/untyped.d.ts +1 -0
- package/src/utils/index.ts +26 -18
- package/src/vectoricon/index.ts +5 -1
- package/src/webchat/WebChat.ts +559 -0
- package/src/webchat/index.ts +6 -0
- package/static/svg/index.svg +1 -1
- package/static/svg/webchat.svg +1 -0
- package/static/svg/work/traced/camera-01.svg +1 -0
- package/static/svg/work/traced/send-03.svg +1 -0
- package/static/svg/work/used/camera-01.svg +4 -0
- package/static/svg/work/used/send-03.svg +3 -0
- package/svg.js +12 -8
- package/temba-modules.ts +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs/><symbol id="send-03" viewBox="0 0 24 24"><path d="M2.13 2.591C1.938 2.684 1.676 2.975 1.549 3.238 1.251 3.854 1.39 4.458 2.794 8.635 3.369 10.349 3.84 11.899 3.84 12.079 3.84 12.26 3.3 14.024 2.64 16 1.98 17.976 1.44 19.85 1.44 20.166 1.44 20.809 1.87 21.381 2.466 21.531 2.693 21.588 3.245 21.464 3.861 21.217 6.589 20.124 21.261 13.408 21.718 13.043 22.142 12.705 22.24 12.513 22.24 12.021 22.24 11.336 21.91 10.952 20.88 10.436 19.269 9.629 4.002 2.81 3.375 2.617 2.563 2.367 2.591 2.368 2.13 2.591M11.637 8.435C15.885 10.347 19.36 11.953 19.36 12.005 19.36 12.098 4.015 19.043 3.812 19.041 3.753 19.04 4.155 17.69 4.706 16.04L5.707 13.04 8.334 12.999C10.783 12.961 10.979 12.936 11.24 12.622 11.579 12.213 11.596 11.845 11.293 11.431 11.089 11.151 10.802 11.112 8.387 11.04L5.707 10.96 4.706 7.96C4.155 6.31 3.752 4.96 3.809 4.96 3.866 4.96 7.389 6.524 11.637 8.435" stroke="none" fill-rule="evenodd" fill="currentColor"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.800 1.066 C 8.045 1.203,7.143 1.977,6.696 2.872 C 6.459 3.346,6.170 3.784,6.053 3.846 C 5.936 3.908,5.399 3.996,4.860 4.042 C 3.260 4.179,2.135 4.914,1.387 6.312 C 1.049 6.944,1.040 7.109,1.040 12.960 C 1.040 18.926,1.042 18.964,1.414 19.720 C 1.620 20.137,2.073 20.723,2.421 21.021 C 3.537 21.976,3.774 22.000,12.000 22.000 C 20.226 22.000,20.463 21.976,21.579 21.021 C 21.927 20.723,22.380 20.137,22.586 19.720 C 22.958 18.964,22.960 18.926,22.960 12.960 C 22.960 7.109,22.951 6.944,22.613 6.312 C 21.865 4.914,20.740 4.179,19.140 4.042 C 18.601 3.996,18.064 3.908,17.947 3.846 C 17.830 3.784,17.540 3.345,17.303 2.870 C 17.008 2.280,16.645 1.854,16.156 1.523 L 15.440 1.040 12.320 1.017 C 10.604 1.004,9.020 1.027,8.800 1.066 M15.236 3.320 C 15.372 3.474,15.533 3.767,15.595 3.971 C 15.748 4.472,16.585 5.403,17.140 5.690 C 17.388 5.819,18.044 5.969,18.596 6.024 C 19.833 6.148,20.400 6.421,20.725 7.049 C 20.941 7.467,20.969 8.309,20.928 13.204 L 20.880 18.874 20.357 19.397 L 19.834 19.920 12.000 19.920 L 4.166 19.920 3.643 19.397 L 3.120 18.874 3.072 13.204 C 3.031 8.309,3.059 7.467,3.275 7.049 C 3.600 6.421,4.167 6.148,5.404 6.024 C 5.956 5.969,6.612 5.819,6.860 5.690 C 7.415 5.403,8.252 4.472,8.405 3.971 C 8.682 3.061,8.763 3.040,12.000 3.040 C 14.648 3.040,15.019 3.072,15.236 3.320 M10.582 7.694 C 9.236 8.105,7.837 9.403,7.357 10.684 C 6.466 13.066,7.508 15.775,9.782 16.987 C 10.372 17.301,10.716 17.359,12.000 17.359 C 13.777 17.359,14.462 17.083,15.608 15.903 C 18.537 12.890,16.468 7.762,12.251 7.579 C 11.629 7.552,10.878 7.604,10.582 7.694 M13.446 9.923 C 15.160 10.797,15.484 13.336,14.053 14.672 C 13.192 15.477,11.967 15.711,10.917 15.272 C 9.674 14.753,9.069 13.829,9.067 12.448 C 9.066 11.340,9.599 10.417,10.520 9.931 C 11.328 9.504,12.618 9.501,13.446 9.923 " stroke="none" fill-rule="evenodd" fill="black"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.130 2.591 C 1.938 2.684,1.676 2.975,1.549 3.238 C 1.251 3.854,1.390 4.458,2.794 8.635 C 3.369 10.349,3.840 11.899,3.840 12.079 C 3.840 12.260,3.300 14.024,2.640 16.000 C 1.980 17.976,1.440 19.850,1.440 20.166 C 1.440 20.809,1.870 21.381,2.466 21.531 C 2.693 21.588,3.245 21.464,3.861 21.217 C 6.589 20.124,21.261 13.408,21.718 13.043 C 22.142 12.705,22.240 12.513,22.240 12.021 C 22.240 11.336,21.910 10.952,20.880 10.436 C 19.269 9.629,4.002 2.810,3.375 2.617 C 2.563 2.367,2.591 2.368,2.130 2.591 M11.637 8.435 C 15.885 10.347,19.360 11.953,19.360 12.005 C 19.360 12.098,4.015 19.043,3.812 19.041 C 3.753 19.040,4.155 17.690,4.706 16.040 L 5.707 13.040 8.334 12.999 C 10.783 12.961,10.979 12.936,11.240 12.622 C 11.579 12.213,11.596 11.845,11.293 11.431 C 11.089 11.151,10.802 11.112,8.387 11.040 L 5.707 10.960 4.706 7.960 C 4.155 6.310,3.752 4.960,3.809 4.960 C 3.866 4.960,7.389 6.524,11.637 8.435 " stroke="none" fill-rule="evenodd" fill="black"></path></svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2 8.37722C2 8.0269 2 7.85174 2.01462 7.70421C2.1556 6.28127 3.28127 5.1556 4.70421 5.01462C4.85174 5 5.03636 5 5.40558 5C5.54785 5 5.61899 5 5.67939 4.99634C6.45061 4.94963 7.12595 4.46288 7.41414 3.746C7.43671 3.68986 7.45781 3.62657 7.5 3.5C7.54219 3.37343 7.56329 3.31014 7.58586 3.254C7.87405 2.53712 8.54939 2.05037 9.32061 2.00366C9.38101 2 9.44772 2 9.58114 2H14.4189C14.5523 2 14.619 2 14.6794 2.00366C15.4506 2.05037 16.126 2.53712 16.4141 3.254C16.4367 3.31014 16.4578 3.37343 16.5 3.5C16.5422 3.62657 16.5633 3.68986 16.5859 3.746C16.874 4.46288 17.5494 4.94963 18.3206 4.99634C18.381 5 18.4521 5 18.5944 5C18.9636 5 19.1483 5 19.2958 5.01462C20.7187 5.1556 21.8444 6.28127 21.9854 7.70421C22 7.85174 22 8.0269 22 8.37722V16.2C22 17.8802 22 18.7202 21.673 19.362C21.3854 19.9265 20.9265 20.3854 20.362 20.673C19.7202 21 18.8802 21 17.2 21H6.8C5.11984 21 4.27976 21 3.63803 20.673C3.07354 20.3854 2.6146 19.9265 2.32698 19.362C2 18.7202 2 17.8802 2 16.2V8.37722Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M12 16.5C14.2091 16.5 16 14.7091 16 12.5C16 10.2909 14.2091 8.5 12 8.5C9.79086 8.5 8 10.2909 8 12.5C8 14.7091 9.79086 16.5 12 16.5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.5004 12H5.00043M4.91577 12.2915L2.58085 19.2662C2.39742 19.8142 2.3057 20.0881 2.37152 20.2569C2.42868 20.4034 2.55144 20.5145 2.70292 20.5567C2.87736 20.6054 3.14083 20.4869 3.66776 20.2497L20.3792 12.7296C20.8936 12.4981 21.1507 12.3824 21.2302 12.2216C21.2993 12.082 21.2993 11.9181 21.2302 11.7784C21.1507 11.6177 20.8936 11.5019 20.3792 11.2705L3.66193 3.74776C3.13659 3.51135 2.87392 3.39315 2.69966 3.44164C2.54832 3.48375 2.42556 3.59454 2.36821 3.74078C2.30216 3.90917 2.3929 4.18255 2.57437 4.72931L4.91642 11.7856C4.94759 11.8795 4.96317 11.9264 4.96933 11.9744C4.97479 12.0171 4.97473 12.0602 4.96916 12.1028C4.96289 12.1508 4.94718 12.1977 4.91577 12.2915Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
package/svg.js
CHANGED
|
@@ -13,15 +13,13 @@ const SVGFixer = require('oslllo-svg-fixer');
|
|
|
13
13
|
const { digestSync } = require('fprint');
|
|
14
14
|
|
|
15
15
|
const cwd = process.cwd();
|
|
16
|
-
const OUTPUT_FILE_NAME = cwd + "/static/svg/index.svg";
|
|
17
|
-
const PACK_DIR = cwd + "/static/svg/packs";
|
|
18
16
|
|
|
17
|
+
const PACK_DIR = cwd + "/static/svg/packs";
|
|
19
18
|
const USED_DIR = cwd + "/static/svg/work/used";
|
|
20
19
|
const TRACED_DIR = cwd + "/static/svg/work/traced";
|
|
20
|
+
const USAGE_REGEX = /'(.*)'/;
|
|
21
21
|
|
|
22
|
-
const USAGE_FILE = './src/vectoricon/index.ts';
|
|
23
22
|
|
|
24
|
-
const USAGE_REGEX= /'(.*)'/;
|
|
25
23
|
|
|
26
24
|
const sprites = svgstore()
|
|
27
25
|
|
|
@@ -96,7 +94,13 @@ function modifyFileContent(filePath, regexPattern, groupNumber, replacement) {
|
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
async function main() {
|
|
99
|
-
|
|
97
|
+
|
|
98
|
+
// const OUTPUT_FILE_NAME = cwd + "/static/svg/index.svg";
|
|
99
|
+
//const USAGE_FILE = './src/vectoricon/index.ts';
|
|
100
|
+
|
|
101
|
+
const OUTPUT_FILE_NAME = argv.output || cwd + "/static/svg/index.svg";
|
|
102
|
+
const USAGE_FILE = argv.usage || './src/vectoricon/index.ts';
|
|
103
|
+
|
|
100
104
|
let packs = sh.ls(PACK_DIR);
|
|
101
105
|
packs.sort();
|
|
102
106
|
|
|
@@ -109,7 +113,7 @@ async function main() {
|
|
|
109
113
|
|
|
110
114
|
const matches = processFileWithRegex(USAGE_FILE, USAGE_REGEX);
|
|
111
115
|
const ids = matchesToObject(matches);
|
|
112
|
-
|
|
116
|
+
|
|
113
117
|
// copy any icons from our packs that are used
|
|
114
118
|
packs.forEach(pack => {
|
|
115
119
|
copyFilesInDict(`${PACK_DIR}/${pack}`, USED_DIR, ids)
|
|
@@ -121,7 +125,7 @@ async function main() {
|
|
|
121
125
|
throwIfDestinationDoesNotExist: false,
|
|
122
126
|
traceResolution: argv.resolution || 600,
|
|
123
127
|
};
|
|
124
|
-
|
|
128
|
+
|
|
125
129
|
await SVGFixer(USED_DIR, TRACED_DIR, options).fix();
|
|
126
130
|
|
|
127
131
|
const files = sh.find(TRACED_DIR)
|
|
@@ -131,7 +135,7 @@ async function main() {
|
|
|
131
135
|
const id = path.basename(file, '.svg')
|
|
132
136
|
const contents = fs.readFileSync(file, 'utf8')
|
|
133
137
|
sprites.add(id, contents);
|
|
134
|
-
});
|
|
138
|
+
});
|
|
135
139
|
|
|
136
140
|
let output = htmlclean(sprites.toString({ cleanDefs: true, cleanSymbols: true, renameDefs: true }))
|
|
137
141
|
output = output.replaceAll(/fill="black"/g, `fill="currentColor"`);
|
package/temba-modules.ts
CHANGED
|
@@ -50,6 +50,9 @@ import { ColorPicker } from './src/colorpicker/ColorPicker';
|
|
|
50
50
|
import { Resizer } from './src/resizer/Resizer';
|
|
51
51
|
import { Thumbnail } from './src/thumbnail/Thumbnail';
|
|
52
52
|
import { NotificationList } from './src/list/NotificationList';
|
|
53
|
+
import { WebChat } from './src/webchat/WebChat';
|
|
54
|
+
import { ImagePicker } from './src/imagepicker/ImagePicker';
|
|
55
|
+
import { Mask } from './src/mask/Mask';
|
|
53
56
|
|
|
54
57
|
export function addCustomElement(name: string, comp: any) {
|
|
55
58
|
if (!window.customElements.get(name)) {
|
|
@@ -110,3 +113,6 @@ addCustomElement('temba-compose', Compose);
|
|
|
110
113
|
addCustomElement('temba-color-picker', ColorPicker);
|
|
111
114
|
addCustomElement('temba-resizer', Resizer);
|
|
112
115
|
addCustomElement('temba-thumbnail', Thumbnail);
|
|
116
|
+
addCustomElement('temba-webchat', WebChat);
|
|
117
|
+
addCustomElement('temba-image-picker', ImagePicker);
|
|
118
|
+
addCustomElement('temba-mask', Mask);
|