@nyaruka/temba-components 0.29.3 → 0.30.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 +8 -0
- package/dist/{a439f561.js → dd72d92e.js} +256 -71
- package/dist/index.js +256 -71
- package/dist/static/icons/symbol-defs.svg +10 -20
- 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/ContactName.js +19 -16
- package/out-tsc/src/contacts/ContactName.js.map +1 -1
- package/out-tsc/src/contacts/ContactNameFetch.js +36 -0
- package/out-tsc/src/contacts/ContactNameFetch.js.map +1 -0
- package/out-tsc/src/contacts/ContactUrn.js +12 -1
- package/out-tsc/src/contacts/ContactUrn.js.map +1 -1
- package/out-tsc/src/flow/FlowStoreElement.js +43 -0
- package/out-tsc/src/flow/FlowStoreElement.js.map +1 -0
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/list/RunList.js +317 -0
- package/out-tsc/src/list/RunList.js.map +1 -0
- package/out-tsc/src/list/TembaList.js +38 -14
- package/out-tsc/src/list/TembaList.js.map +1 -1
- package/out-tsc/src/options/Options.js +18 -2
- package/out-tsc/src/options/Options.js.map +1 -1
- package/out-tsc/src/store/Store.js +13 -3
- package/out-tsc/src/store/Store.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +3 -1
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/src/utils/index.js +1 -0
- package/out-tsc/src/utils/index.js.map +1 -1
- package/out-tsc/src/vectoricon/VectorIcon.js +6 -6
- package/out-tsc/src/vectoricon/VectorIcon.js.map +1 -1
- package/out-tsc/temba-modules.js +6 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/out-tsc/test/utils.test.js +1 -1
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +1 -1
- package/src/contacts/ContactName.ts +19 -17
- package/src/contacts/ContactNameFetch.ts +32 -0
- package/src/contacts/ContactUrn.ts +12 -1
- package/src/flow/FlowStoreElement.ts +42 -0
- package/src/interfaces.ts +19 -0
- package/src/list/RunList.ts +353 -0
- package/src/list/TembaList.ts +50 -14
- package/src/options/Options.ts +17 -2
- package/src/store/Store.ts +20 -3
- package/src/tabpane/TabPane.ts +3 -1
- package/src/utils/index.ts +3 -0
- package/src/vectoricon/VectorIcon.ts +5 -5
- package/static/css/temba-components.css +1 -1
- package/static/icons/Read Me.txt +15 -15
- package/static/icons/SVG/hourglass.svg +5 -0
- package/static/icons/demo-external-svg.html +142 -157
- package/static/icons/demo-files/demo.css +4 -4
- package/static/icons/demo.html +152 -177
- package/static/icons/selection.json +396 -339
- package/static/icons/style.css +0 -4
- package/static/icons/symbol-defs.svg +10 -20
- package/temba-modules.ts +6 -0
- package/test/utils.test.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
2
|
<defs>
|
|
3
|
-
<symbol id="icon-
|
|
4
|
-
<path d="
|
|
3
|
+
<symbol id="icon-hourglass" viewBox="0 0 24 24">
|
|
4
|
+
<path d="M12 11.484l3.984-3.984v-3.516h-7.969v3.516zM15.984 16.5l-3.984-3.984-3.984 3.984v3.516h7.969v-3.516zM6 2.016h12v6l-3.984 3.984 3.984 3.984v6h-12v-6l3.984-3.984-3.984-3.984v-6z"></path>
|
|
5
5
|
</symbol>
|
|
6
6
|
<symbol id="icon-bookmark-filled" viewBox="0 0 24 24">
|
|
7
7
|
<path d="M17.016 3q0.797 0 1.383 0.609t0.586 1.406v15.984l-6.984-3-6.984 3v-15.984q0-0.797 0.586-1.406t1.383-0.609h10.031z"></path>
|
|
@@ -363,24 +363,8 @@
|
|
|
363
363
|
<symbol id="icon-send-mobile" viewBox="0 0 24 24">
|
|
364
364
|
<path d="M17.016 17.016h1.969v3.984q0 0.844-0.586 1.43t-1.383 0.586h-10.031q-0.797 0-1.383-0.586t-0.586-1.43v-18q0-0.844 0.586-1.406t1.383-0.563l10.031-0.047q0.797 0 1.383 0.586t0.586 1.43v3.984h-1.969v-0.984h-10.031v12h10.031v-0.984zM21.984 12l-3.984-3.984v3h-5.016v1.969h5.016v3z"></path>
|
|
365
365
|
</symbol>
|
|
366
|
-
<symbol id="icon-
|
|
367
|
-
<path
|
|
368
|
-
</symbol>
|
|
369
|
-
<symbol id="icon-users1" viewBox="0 0 36 32">
|
|
370
|
-
<path d="M24 24.082v-1.649c2.203-1.241 4-4.337 4-7.432 0-4.971 0-9-6-9s-6 4.029-6 9c0 3.096 1.797 6.191 4 7.432v1.649c-6.784 0.555-12 3.888-12 7.918h28c0-4.030-5.216-7.364-12-7.918z"></path>
|
|
371
|
-
<path d="M10.225 24.854c1.728-1.13 3.877-1.989 6.243-2.513-0.47-0.556-0.897-1.176-1.265-1.844-0.95-1.726-1.453-3.627-1.453-5.497 0-2.689 0-5.228 0.956-7.305 0.928-2.016 2.598-3.265 4.976-3.734-0.529-2.39-1.936-3.961-5.682-3.961-6 0-6 4.029-6 9 0 3.096 1.797 6.191 4 7.432v1.649c-6.784 0.555-12 3.888-12 7.918h8.719c0.454-0.403 0.956-0.787 1.506-1.146z"></path>
|
|
372
|
-
</symbol>
|
|
373
|
-
<symbol id="icon-lock2" viewBox="0 0 32 32">
|
|
374
|
-
<path d="M26 14h-2v-6c0-4.418-3.582-8-8-8s-8 3.582-8 8v6h-2c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h20c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2zM16 26c-1.105 0-2-0.895-2-2s0.895-2 2-2 2 0.895 2 2-0.895 2-2 2zM20 14h-8v-6c0-2.206 1.794-4 4-4s4 1.794 4 4v6z"></path>
|
|
375
|
-
</symbol>
|
|
376
|
-
<symbol id="icon-atom" viewBox="0 0 32 32">
|
|
377
|
-
<path d="M25.998 6.46v0 0zM26.064 16c3.262-3.119 4.846-6.174 3.792-8-0.602-1.042-1.98-1.54-3.859-1.54v1.5c1.317 0 2.274 0.296 2.56 0.79 0.226 0.391 0.1 0.992-0.045 1.427-0.278 0.835-0.884 1.833-1.751 2.888-0.526 0.64-1.133 1.285-1.809 1.926-0.93-0.803-1.965-1.602-3.087-2.377-0.11-1.359-0.284-2.654-0.514-3.86 1.756-0.521 3.35-0.794 4.646-0.794l0.001-1.5c-0 0-0.001 0-0.001 0-1.412 0-3.106 0.282-4.965 0.825-1.070-4.385-2.924-7.285-5.032-7.285s-3.962 2.9-5.032 7.284c-1.859-0.543-3.553-0.825-4.965-0.825-1.879 0-3.258 0.498-3.86 1.541-1.054 1.826 0.53 4.881 3.792 8-3.262 3.119-4.846 6.174-3.792 8 0.602 1.043 1.98 1.54 3.86 1.54 1.412 0 3.106-0.282 4.965-0.825 1.070 4.385 2.924 7.285 5.032 7.285s3.962-2.9 5.032-7.284c1.859 0.543 3.553 0.825 4.965 0.825 1.879 0 3.258-0.498 3.86-1.541 1.054-1.826-0.53-4.881-3.792-8zM23.829 16c-0.582 0.496-1.202 0.987-1.855 1.468 0.017-0.484 0.025-0.973 0.025-1.468s-0.009-0.985-0.025-1.468c0.653 0.481 1.273 0.972 1.855 1.468zM19.915 22.777c-0.72-0.256-1.455-0.547-2.196-0.871 0.426-0.227 0.853-0.463 1.28-0.71 0.429-0.248 0.848-0.5 1.259-0.756-0.090 0.805-0.205 1.586-0.344 2.337zM18.25 19.897c-0.743 0.429-1.496 0.832-2.25 1.207-0.754-0.374-1.507-0.778-2.25-1.207-0.749-0.433-1.475-0.882-2.172-1.344-0.052-0.835-0.078-1.688-0.078-2.553s0.027-1.718 0.078-2.553c0.697-0.462 1.423-0.912 2.172-1.344 0.743-0.429 1.496-0.832 2.25-1.207 0.754 0.374 1.507 0.778 2.25 1.207 0.749 0.433 1.475 0.882 2.172 1.344 0.052 0.835 0.078 1.688 0.078 2.553s-0.027 1.718-0.078 2.553c-0.697 0.462-1.423 0.912-2.172 1.344zM11.741 20.44c0.411 0.256 0.83 0.509 1.259 0.756 0.428 0.247 0.855 0.483 1.28 0.71-0.741 0.323-1.475 0.615-2.196 0.871-0.138-0.751-0.254-1.532-0.344-2.337zM10.025 17.468c-0.653-0.481-1.273-0.972-1.855-1.468 0.582-0.496 1.202-0.987 1.855-1.468-0.017 0.484-0.025 0.973-0.025 1.468s0.009 0.985 0.025 1.468zM12.085 9.223c0.72 0.256 1.455 0.547 2.196 0.871-0.426 0.227-0.853 0.463-1.28 0.71-0.429 0.248-0.848 0.5-1.259 0.756 0.090-0.805 0.205-1.586 0.344-2.337zM19 10.804c-0.427-0.247-0.855-0.483-1.28-0.71 0.741-0.323 1.475-0.615 2.196-0.871 0.138 0.751 0.253 1.532 0.344 2.337-0.411-0.256-0.83-0.509-1.259-0.756zM13.162 5.213c0.479-1.278 1.041-2.302 1.625-2.961 0.304-0.343 0.762-0.752 1.213-0.752s0.909 0.409 1.213 0.752c0.584 0.658 1.146 1.682 1.625 2.961 0.291 0.776 0.546 1.624 0.764 2.53-1.161 0.404-2.37 0.901-3.602 1.485-1.232-0.585-2.442-1.082-3.602-1.486 0.218-0.905 0.473-1.754 0.764-2.53zM5.239 13.064c-0.867-1.054-1.473-2.053-1.751-2.888-0.145-0.435-0.271-1.036-0.045-1.427 0.286-0.495 1.243-0.79 2.561-0.79h0c1.297 0 2.89 0.274 4.646 0.794-0.23 1.206-0.404 2.501-0.514 3.86-1.123 0.775-2.157 1.574-3.088 2.377-0.675-0.641-1.282-1.286-1.809-1.926zM6.003 24.040c-1.318 0-2.275-0.296-2.561-0.79-0.226-0.391-0.1-0.992 0.045-1.427 0.278-0.835 0.884-1.833 1.751-2.888 0.527-0.64 1.133-1.285 1.809-1.926 0.93 0.803 1.965 1.602 3.087 2.377 0.11 1.359 0.284 2.654 0.514 3.86-1.756 0.521-3.349 0.794-4.646 0.794zM18.838 26.787c-0.479 1.278-1.041 2.302-1.625 2.961-0.304 0.343-0.762 0.752-1.213 0.752s-0.909-0.409-1.213-0.752c-0.584-0.658-1.146-1.682-1.625-2.96-0.291-0.776-0.546-1.624-0.764-2.53 1.161-0.404 2.37-0.901 3.602-1.485 1.232 0.585 2.442 1.082 3.602 1.486-0.218 0.905-0.473 1.754-0.764 2.53zM28.512 21.823c0.145 0.435 0.271 1.036 0.045 1.427-0.286 0.495-1.243 0.791-2.561 0.791-1.297 0-2.89-0.273-4.646-0.794 0.23-1.206 0.404-2.501 0.514-3.86 1.122-0.775 2.157-1.574 3.087-2.377 0.675 0.641 1.282 1.286 1.809 1.926 0.867 1.054 1.473 2.053 1.751 2.888z"></path>
|
|
378
|
-
</symbol>
|
|
379
|
-
<symbol id="icon-paperplane" viewBox="0 0 32 32">
|
|
380
|
-
<path d="M14 22l12.301 4.39 5.699-24.917zM10 20.622l22-19.149-32 15.827zM14 24.124v7.876l5.805-5.805z"></path>
|
|
381
|
-
</symbol>
|
|
382
|
-
<symbol id="icon-cancel" viewBox="0 0 32 32">
|
|
383
|
-
<path d="M23 0h-14l-9 9v14l9 9h14l9-9v-14l-9-9zM25 22l-3 3-6-6-6 6-3-3 6-6-6-6 3-3 6 6 6-6 3 3-6 6 6 6z"></path>
|
|
366
|
+
<symbol id="icon-credits" viewBox="0 0 16 16">
|
|
367
|
+
<path d="M10.479 4.958c-0.364 0-0.72 0.036-1.064 0.103-0.027-0.021-0.055-0.041-0.084-0.061 0.425-0.294 0.669-0.636 0.669-1v-1c0-1.105-2.239-2-5-2s-5 0.895-5 2v1c0 0.364 0.244 0.706 0.669 1-0.425 0.294-0.669 0.636-0.669 1v1c0 0.364 0.244 0.706 0.669 1-0.425 0.294-0.669 0.636-0.669 1v1c0 0.364 0.244 0.706 0.669 1-0.425 0.294-0.669 0.636-0.669 1v1c0 1.105 2.239 2 5 2 0.738 0 1.438-0.064 2.069-0.179 0.939 0.739 2.123 1.179 3.41 1.179 3.049 0 5.521-2.472 5.521-5.521s-2.472-5.521-5.521-5.521zM0.5 3c0-0.298 0.451-0.671 1.15-0.95 0.887-0.355 2.076-0.55 3.35-0.55s2.463 0.195 3.35 0.55c0.699 0.279 1.15 0.652 1.15 0.95s-0.451 0.671-1.15 0.95c-0.288 0.115-0.609 0.214-0.954 0.294-0.716 0.167-1.536 0.256-2.396 0.256s-1.68-0.089-2.396-0.256c-0.345-0.080-0.666-0.179-0.954-0.294-0.699-0.279-1.15-0.652-1.15-0.95zM0.5 9c0-0.221 0.249-0.483 0.663-0.718 0.917 0.439 2.296 0.718 3.837 0.718 0.053 0 0.106-0.001 0.159-0.001-0.131 0.471-0.201 0.968-0.201 1.481 0 0.007 0 0.014 0 0.021-0.844-0.003-1.65-0.091-2.354-0.256-0.345-0.080-0.666-0.179-0.954-0.294-0.699-0.279-1.15-0.652-1.15-0.95zM5 13.5c-1.273 0-2.463-0.195-3.35-0.55-0.699-0.279-1.15-0.652-1.15-0.95 0-0.221 0.249-0.483 0.663-0.718 0.917 0.439 2.296 0.718 3.837 0.718 0.057 0 0.114-0.001 0.17-0.002 0.151 0.527 0.378 1.022 0.668 1.472-0.274 0.019-0.554 0.029-0.839 0.029zM5 7.5c-0.859 0-1.68-0.089-2.396-0.256-0.345-0.080-0.666-0.179-0.954-0.294-0.699-0.279-1.15-0.652-1.15-0.95 0-0.221 0.249-0.483 0.663-0.718 0.917 0.439 2.296 0.718 3.837 0.718 1.030 0 1.987-0.125 2.782-0.339-0.781 0.438-1.444 1.060-1.932 1.808-0.278 0.020-0.562 0.030-0.85 0.030zM10.479 14.996c-2.495 0-4.517-2.022-4.517-4.517s2.022-4.517 4.517-4.517c2.495 0 4.517 2.022 4.517 4.517s-2.022 4.517-4.517 4.517zM11 7h-1v1h-2v3h2v1h-2v1h2v1h1v-1h2v-3h-2v-1h2v-1h-2v-1zM10 10h-1v-1h1v1zM12 11v1h-1v-1h1z"></path>
|
|
384
368
|
</symbol>
|
|
385
369
|
<symbol id="icon-channel" viewBox="0 0 16 16">
|
|
386
370
|
<path d="M0 11l5-8 5 5 6-4-5 9-5-5z"></path>
|
|
@@ -401,6 +385,12 @@
|
|
|
401
385
|
<symbol id="icon-cancel" viewBox="0 0 16 16">
|
|
402
386
|
<path d="M11.5 0h-7l-4.5 4.5v7l4.5 4.5h7l4.5-4.5v-7l-4.5-4.5zM12.5 11l-1.5 1.5-3-3-3 3-1.5-1.5 3-3-3-3 1.5-1.5 3 3 3-3 1.5 1.5-3 3 3 3z"></path>
|
|
403
387
|
</symbol>
|
|
388
|
+
<symbol id="icon-language" viewBox="0 0 20 20">
|
|
389
|
+
<path d="M19.753 10.909c-0.624-1.707-2.366-2.726-4.661-2.726-0.090 0-0.176 0.002-0.262 0.006l-0.016-2.063c0 0 3.41-0.588 3.525-0.607s0.133-0.119 0.109-0.231c-0.023-0.111-0.167-0.883-0.188-0.976-0.027-0.131-0.102-0.127-0.207-0.109s-3.25 0.461-3.25 0.461-0.012-1.953-0.013-2.078c-0.001-0.125-0.069-0.158-0.194-0.156s-0.92 0.014-1.025 0.016c-0.105 0.002-0.164 0.049-0.162 0.148s0.033 2.307 0.033 2.307-3.061 0.527-3.144 0.543c-0.084 0.014-0.17 0.053-0.151 0.143s0.19 1.094 0.208 1.172c0.018 0.080 0.072 0.129 0.188 0.107 0.115-0.019 2.924-0.504 2.924-0.504l0.035 2.018c-1.077 0.281-1.801 0.824-2.256 1.303-0.768 0.807-1.207 1.887-1.207 2.963 0 1.586 0.971 2.529 2.328 2.695 3.162 0.387 5.119-3.060 5.769-4.715 1.097 1.506 0.256 4.354-2.094 5.98-0.043 0.029-0.098 0.129-0.033 0.207s0.541 0.662 0.619 0.756c0.080 0.096 0.206 0.059 0.256 0.023 2.51-1.73 3.661-4.515 2.869-6.683zM12.367 14.097c-0.966-0.121-0.944-0.914-0.944-1.453 0-0.773 0.327-1.58 0.876-2.156 0.335-0.354 0.75-0.621 1.229-0.799l0.082 4.277c-0.385 0.131-0.799 0.185-1.243 0.131zM14.794 13.544l0.046-4.109c0.084-0.004 0.166-0.010 0.252-0.010 0.773 0 1.494 0.145 1.885 0.361s-1.023 2.713-2.183 3.758zM5.844 5.876c-0.030-0.094-0.103-0.145-0.196-0.145h-1.95c-0.093 0-0.165 0.051-0.194 0.144-0.412 1.299-3.48 10.99-3.496 11.041s-0.011 0.076 0.062 0.076h1.733c0.075 0 0.099-0.023 0.114-0.072 0.015-0.051 1.008-3.318 1.008-3.318h3.496c0 0 0.992 3.268 1.008 3.318s0.039 0.072 0.113 0.072h1.734c0.072 0 0.078-0.025 0.062-0.076-0.014-0.050-3.083-9.741-3.494-11.040zM3.226 12.194l1.447-5.25 1.447 5.25h-2.894z"></path>
|
|
390
|
+
</symbol>
|
|
391
|
+
<symbol id="icon-zapier" viewBox="0 0 32 32">
|
|
392
|
+
<path fill="#ff4a00" style="fill: var(--color1, #ff4a00)" d="M20 16.005c0 1.191-0.22 2.328-0.615 3.38-1.049 0.396-2.191 0.615-3.38 0.615h-0.012c-1.191 0-2.327-0.22-3.379-0.615-0.396-1.052-0.615-2.191-0.615-3.38v-0.012c0-1.191 0.219-2.327 0.615-3.379 1.052-0.396 2.189-0.615 3.379-0.615h0.012c1.191 0 2.331 0.219 3.38 0.616 0.396 1.051 0.615 2.188 0.615 3.38zM31.78 13.333h-9.34l6.597-6.603c-0.52-0.731-1.093-1.413-1.727-2.044-0.631-0.632-1.313-1.209-2.040-1.728l-6.605 6.599v-9.337c-0.865-0.139-1.751-0.22-2.66-0.22h-0.013c-0.907 0-1.795 0.081-2.66 0.22v9.34l-6.6-6.599c-0.732 0.515-1.413 1.095-2.045 1.725-0.632 0.632-1.211 1.316-1.728 2.044l6.599 6.603h-9.337c0 0-0.22 1.755-0.22 2.66v0.012c0 0.907 0.081 1.797 0.22 2.66h9.34l-6.599 6.603c1.036 1.461 2.311 2.735 3.769 3.773l6.603-6.6v9.339c0.864 0.14 1.751 0.22 2.655 0.22h0.023c0.905 0 1.792-0.080 2.655-0.22v-9.339l6.603 6.6c0.731-0.5 1.413-1.083 2.039-1.72h0.007c0.631-0.62 1.208-1.301 1.728-2.041l-6.6-6.599h9.339c0.14-0.86 0.22-1.739 0.22-2.64v-0.041c0-0.904-0.080-1.791-0.22-2.653z"></path>
|
|
393
|
+
</symbol>
|
|
404
394
|
<symbol id="icon-cord" viewBox="0 0 32 32">
|
|
405
395
|
<path d="M27.59 12.41c-0.464-0.464-1.216-0.464-1.679 0l-4.91 4.91-6.321-6.321 4.91-4.91c0.464-0.464 0.464-1.216 0-1.679s-1.216-0.464-1.679 0l-4.91 4.91-2.91-2.91c-0.464-0.464-1.216-0.464-1.679 0s-0.464 1.216 0 1.679l2.093 2.093-4.16 4.16c-2.636 2.636-3.048 6.653-1.236 9.721l-4.521 4.521c-0.781 0.781-0.781 2.047 0 2.828 0.391 0.391 0.902 0.586 1.414 0.586s1.024-0.195 1.414-0.586l4.521-4.521c3.068 1.812 7.085 1.4 9.721-1.236l4.16-4.16 2.093 2.093c0.232 0.232 0.536 0.348 0.84 0.348s0.608-0.116 0.84-0.348c0.464-0.464 0.464-1.216 0-1.679l-2.91-2.91 4.91-4.91c0.464-0.464 0.464-1.216 0-1.679z"></path>
|
|
406
396
|
</symbol>
|
package/dist/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return t[e]||(r=new Promise(async r=>{if("document"in self){const t=document.createElement("script");t.src=e,document.head.appendChild(t),t.onload=r}else importScripts(e),r()})),r.then(()=>{if(!t[e])throw new Error(`Module ${e} didn’t register its module`);return t[e]})},r=(r,t)=>{Promise.all(r.map(e)).then(e=>t(1===e.length?e[0]:e))},t={require:Promise.resolve(r)};self.define=(r,s,o)=>{t[r]||(t[r]=Promise.resolve().then(()=>{let t={};const n={uri:location.origin+r.slice(1)};return Promise.all(s.map(r=>{switch(r){case"exports":return t;case"module":return n;default:return e(r)}})).then(e=>{const r=o(...e);return t.default||(t.default=r),t})}))}}define("./sw.js",["./workbox-80efdfd1"],(function(e){"use strict";e.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"
|
|
1
|
+
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return t[e]||(r=new Promise(async r=>{if("document"in self){const t=document.createElement("script");t.src=e,document.head.appendChild(t),t.onload=r}else importScripts(e),r()})),r.then(()=>{if(!t[e])throw new Error(`Module ${e} didn’t register its module`);return t[e]})},r=(r,t)=>{Promise.all(r.map(e)).then(e=>t(1===e.length?e[0]:e))},t={require:Promise.resolve(r)};self.define=(r,s,o)=>{t[r]||(t[r]=Promise.resolve().then(()=>{let t={};const n={uri:location.origin+r.slice(1)};return Promise.all(s.map(r=>{switch(r){case"exports":return t;case"module":return n;default:return e(r)}})).then(e=>{const r=o(...e);return t.default||(t.default=r),t})}))}}define("./sw.js",["./workbox-80efdfd1"],(function(e){"use strict";e.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"dd72d92e.js",revision:"db18dc1082afd0d63df2cb2454e3359b"},{url:"templates/components-body.html",revision:"9e0c0038b12f1c45fc37f43bebd5c5e5"},{url:"templates/components-head.html",revision:"08ad6b37b1b1f835846f64118297ba0d"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
|
|
2
2
|
//# sourceMappingURL=sw.js.map
|
package/dist/sw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sw.js","sources":["../../../../../tmp/
|
|
1
|
+
{"version":3,"file":"sw.js","sources":["../../../../../tmp/baf52b243a88cd126ac7a30ee13ac851/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {skipWaiting as workbox_core_skipWaiting} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/skipWaiting.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nworkbox_core_skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"dd72d92e.js\",\n \"revision\": \"db18dc1082afd0d63df2cb2454e3359b\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"9e0c0038b12f1c45fc37f43bebd5c5e5\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"08ad6b37b1b1f835846f64118297ba0d\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["url","revision","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"k1BAmCoC,CAClC,CACEA,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,oBAE2B,IAAIC,kBAAgCC,0BAA2C,iCAG/E,iBAAkB,IAAIC,aAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/
|
|
1
|
+
<script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/dd72d92e.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.30.0"</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/
|
|
1
|
+
<link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/dd72d92e.js" crossorigin="anonymous">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import {
|
|
5
|
-
export class ContactName extends
|
|
4
|
+
import { RapidElement } from '../RapidElement';
|
|
5
|
+
export class ContactName extends RapidElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.size = 20;
|
|
@@ -11,30 +11,33 @@ export class ContactName extends ContactStoreElement {
|
|
|
11
11
|
return css `
|
|
12
12
|
:host {
|
|
13
13
|
display: flex;
|
|
14
|
+
align-items: center;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
temba-urn {
|
|
17
18
|
margin-right: 0.2em;
|
|
18
|
-
margin-top: 2px;
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<slot></slot>
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
23
|
+
const urn = this.urn
|
|
24
|
+
? html `<temba-urn size=${this.size} urn=${this.urn}></temba-urn>`
|
|
25
|
+
: null;
|
|
26
|
+
return html `
|
|
27
|
+
${urn}
|
|
28
|
+
<div class="name">
|
|
29
|
+
${this.name ? this.name : this.urn ? this.urn.split(':')[1] : ''}
|
|
30
|
+
</div>
|
|
31
|
+
<slot></slot>
|
|
32
|
+
`;
|
|
36
33
|
}
|
|
37
34
|
}
|
|
35
|
+
__decorate([
|
|
36
|
+
property({ type: String })
|
|
37
|
+
], ContactName.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
property({ type: String })
|
|
40
|
+
], ContactName.prototype, "urn", void 0);
|
|
38
41
|
__decorate([
|
|
39
42
|
property({ type: Number, attribute: 'icon-size' })
|
|
40
43
|
], ContactName.prototype, "size", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactName.js","sourceRoot":"","sources":["../../../src/contacts/ContactName.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ContactName.js","sourceRoot":"","sources":["../../../src/contacts/ContactName.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,WAAY,SAAQ,YAAY;IAA7C;;QAQE,SAAI,GAAG,EAAE,CAAC;IA2BZ,CAAC;IAzBC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;KAST,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG;YAClB,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,GAAG,eAAe;YACjE,CAAC,CAAC,IAAI,CAAC;QACT,OAAO,IAAI,CAAA;QACP,GAAG;;UAED,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;;;KAGnE,CAAC;IACJ,CAAC;CACF;AAjCC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACf;AAGZ;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;yCACzC","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators';\nimport { RapidElement } from '../RapidElement';\n\nexport class ContactName extends RapidElement {\n @property({ type: String })\n name: string;\n\n @property({ type: String })\n urn: string;\n\n @property({ type: Number, attribute: 'icon-size' })\n size = 20;\n\n static get styles() {\n return css`\n :host {\n display: flex;\n align-items: center;\n }\n\n temba-urn {\n margin-right: 0.2em;\n }\n `;\n }\n\n public render(): TemplateResult {\n const urn = this.urn\n ? html`<temba-urn size=${this.size} urn=${this.urn}></temba-urn>`\n : null;\n return html`\n ${urn}\n <div class=\"name\">\n ${this.name ? this.name : this.urn ? this.urn.split(':')[1] : ''}\n </div>\n <slot></slot>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
|
+
import { ContactStoreElement } from './ContactStoreElement';
|
|
5
|
+
export class ContactNameFetch extends ContactStoreElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.size = 20;
|
|
9
|
+
}
|
|
10
|
+
static get styles() {
|
|
11
|
+
return css `
|
|
12
|
+
:host {
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
temba-urn {
|
|
17
|
+
margin-right: 0.2em;
|
|
18
|
+
margin-top: 2px;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
if (this.data) {
|
|
24
|
+
console.log(this.data);
|
|
25
|
+
return html ` <temba-contact-name
|
|
26
|
+
name=${this.data.name}
|
|
27
|
+
urn=${this.data.urns.length > 0 ? this.data.urns[0] : null}
|
|
28
|
+
/>
|
|
29
|
+
<slot></slot>`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
property({ type: Number, attribute: 'icon-size' })
|
|
35
|
+
], ContactNameFetch.prototype, "size", void 0);
|
|
36
|
+
//# sourceMappingURL=ContactNameFetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactNameFetch.js","sourceRoot":"","sources":["../../../src/contacts/ContactNameFetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,gBAAiB,SAAQ,mBAAmB;IAAzD;;QAEE,SAAI,GAAG,EAAE,CAAC;IAyBZ,CAAC;IAvBC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;KAST,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvB,OAAO,IAAI,CAAA;iBACA,IAAI,CAAC,IAAI,CAAC,IAAI;gBACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;;sBAE9C,CAAC;SAClB;IACH,CAAC;CACF;AAzBC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;8CACzC","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators';\nimport { ContactStoreElement } from './ContactStoreElement';\n\nexport class ContactNameFetch extends ContactStoreElement {\n @property({ type: Number, attribute: 'icon-size' })\n size = 20;\n\n static get styles() {\n return css`\n :host {\n display: flex;\n }\n\n temba-urn {\n margin-right: 0.2em;\n margin-top: 2px;\n }\n `;\n }\n\n public render(): TemplateResult {\n if (this.data) {\n console.log(this.data);\n return html` <temba-contact-name\n name=${this.data.name}\n urn=${this.data.urns.length > 0 ? this.data.urns[0] : null}\n />\n <slot></slot>`;\n }\n }\n}\n"]}
|
|
@@ -5,6 +5,10 @@ import { RapidElement } from '../RapidElement';
|
|
|
5
5
|
export class ContactUrn extends RapidElement {
|
|
6
6
|
static get styles() {
|
|
7
7
|
return css `
|
|
8
|
+
:host {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
8
12
|
.urn {
|
|
9
13
|
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.04) inset;
|
|
10
14
|
padding: 3px;
|
|
@@ -13,13 +17,20 @@ export class ContactUrn extends RapidElement {
|
|
|
13
17
|
background: #eee;
|
|
14
18
|
margin-right: 0.2em;
|
|
15
19
|
}
|
|
20
|
+
|
|
21
|
+
.small {
|
|
22
|
+
padding: 0px;
|
|
23
|
+
border: 0px;
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
margin-right: 0.5em;
|
|
26
|
+
}
|
|
16
27
|
`;
|
|
17
28
|
}
|
|
18
29
|
render() {
|
|
19
30
|
const scheme = this.urn.split(':')[0];
|
|
20
31
|
return html `
|
|
21
32
|
<img
|
|
22
|
-
class="urn"
|
|
33
|
+
class="urn ${this.size < 20 ? 'small' : ''}"
|
|
23
34
|
width="${this.size}em"
|
|
24
35
|
height="${this.size}em"
|
|
25
36
|
src="${this.prefix ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactUrn.js","sourceRoot":"","sources":["../../../src/contacts/ContactUrn.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,YAAY;IAO1C,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"ContactUrn.js","sourceRoot":"","sources":["../../../src/contacts/ContactUrn.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,YAAY;IAO1C,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;KAoBT,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,OAAO,IAAI,CAAA;;qBAEM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;iBACjC,IAAI,CAAC,IAAI;kBACR,IAAI,CAAC,IAAI;eACZ,IAAI,CAAC,MAAM;YACjB,MAAc,CAAC,UAAU;YAC1B,UAAU,eAAe,MAAM;;KAElC,CAAC;IACJ,CAAC;CACF;AA1CC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACf;AAGZ;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACd","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators';\nimport { RapidElement } from '../RapidElement';\n\nexport class ContactUrn extends RapidElement {\n @property({ type: String })\n urn: string;\n\n @property({ type: Number })\n size: number;\n\n static get styles() {\n return css`\n :host {\n display: flex;\n align-items: center;\n }\n .urn {\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.04) inset;\n padding: 3px;\n border: 1px solid #ddd;\n border-radius: 18rem;\n background: #eee;\n margin-right: 0.2em;\n }\n\n .small {\n padding: 0px;\n border: 0px;\n box-shadow: none;\n margin-right: 0.5em;\n }\n `;\n }\n\n public render(): TemplateResult {\n const scheme = this.urn.split(':')[0];\n return html`\n <img\n class=\"urn ${this.size < 20 ? 'small' : ''}\"\n width=\"${this.size}em\"\n height=\"${this.size}em\"\n src=\"${this.prefix ||\n (window as any).static_url ||\n '/static/'}img/schemes/${scheme}.svg\"\n />\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
|
+
import { StoreElement } from '../store/StoreElement';
|
|
5
|
+
export class FlowStoreElement extends StoreElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.endpoint = '/api/v2/flows.json?uuid=';
|
|
9
|
+
}
|
|
10
|
+
prepareData(data) {
|
|
11
|
+
if (data && data.length > 0) {
|
|
12
|
+
data = data[0];
|
|
13
|
+
}
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
updated(changes) {
|
|
17
|
+
super.updated(changes);
|
|
18
|
+
if (changes.has('flow')) {
|
|
19
|
+
if (this.flow) {
|
|
20
|
+
this.url = `${this.endpoint}${this.flow}`;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.url = null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.data) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
return html `<div></div>`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
__decorate([
|
|
35
|
+
property({ type: String })
|
|
36
|
+
], FlowStoreElement.prototype, "flow", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: Object, attribute: false })
|
|
39
|
+
], FlowStoreElement.prototype, "data", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
property({ type: String })
|
|
42
|
+
], FlowStoreElement.prototype, "endpoint", void 0);
|
|
43
|
+
//# sourceMappingURL=FlowStoreElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowStoreElement.js","sourceRoot":"","sources":["../../../src/flow/FlowStoreElement.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAoC,MAAM,KAAK,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAAlD;;QAQE,aAAQ,GAAG,0BAA0B,CAAC;IA4BxC,CAAC;IA1BC,WAAW,CAAC,IAAS;QACnB,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAES,OAAO,CACf,OAA0D;QAE1D,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACvB,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;aAC3C;iBAAM;gBACL,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;aACjB;SACF;IACH,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,OAAO;SACR;QACD,OAAO,IAAI,CAAA,aAAa,CAAC;IAC3B,CAAC;CACF;AAlCC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8CAC3B;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACW","sourcesContent":["import { html, PropertyValueMap, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators';\nimport { FlowDetails } from '../interfaces';\nimport { StoreElement } from '../store/StoreElement';\n\nexport class FlowStoreElement extends StoreElement {\n @property({ type: String })\n flow: string;\n\n @property({ type: Object, attribute: false })\n data: FlowDetails;\n\n @property({ type: String })\n endpoint = '/api/v2/flows.json?uuid=';\n\n prepareData(data: any) {\n if (data && data.length > 0) {\n data = data[0];\n }\n return data;\n }\n\n protected updated(\n changes: PropertyValueMap<any> | Map<PropertyKey, unknown>\n ): void {\n super.updated(changes);\n if (changes.has('flow')) {\n if (this.flow) {\n this.url = `${this.endpoint}${this.flow}`;\n } else {\n this.url = null;\n }\n }\n }\n\n public render(): TemplateResult {\n if (!this.data) {\n return;\n }\n return html`<div></div>`;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;AAC1B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,sDAAgC,CAAA;IAChC,gEAA0C,CAAA;IAC1C,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;AAC1B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,sDAAgC,CAAA;IAChC,gEAA0C,CAAA;IAC1C,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAsMD,MAAM,CAAN,IAAY,eAiBX;AAjBD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,yDAAsC,CAAA;IACtC,gDAA6B,CAAA;IAC7B,gDAA6B,CAAA;IAC7B,yDAAsC,CAAA;IACtC,uDAAoC,CAAA;IACpC,6DAA0C,CAAA;IAC1C,2DAAwC,CAAA;IACxC,2DAAwC,CAAA;IACxC,yDAAsC,CAAA;IACtC,gDAA6B,CAAA;IAC7B,kDAA+B,CAAA;IAC/B,2CAAwB,CAAA;IACxB,uDAAoC,CAAA;IACpC,wCAAqB,CAAA;AACvB,CAAC,EAjBW,eAAe,KAAf,eAAe,QAiB1B","sourcesContent":["export interface Workspace {\n uuid: string;\n name: string;\n country: string;\n languages: string[];\n timezone: string;\n date_style: DateStyle;\n anon: boolean;\n}\n\nexport enum DateStyle {\n DayFirst = 'day_first',\n MonthFirst = 'month_first',\n YearFirst = 'year_first',\n}\n\nexport enum ScheduledEventType {\n CampaignEvent = 'campaign_event',\n ScheduledBroadcast = 'scheduled_broadcast',\n ScheduledTrigger = 'scheduled_trigger',\n}\n\nexport enum TicketStatus {\n Open = 'open',\n Closed = 'closed',\n}\n\nexport interface ScheduledEvent {\n type: ScheduledEventType;\n scheduled: string;\n repeat_period: string;\n campaign?: ObjectReference;\n flow?: ObjectReference;\n message?: string;\n}\n\nexport interface User {\n id?: number;\n first_name?: string;\n last_name?: string;\n email?: string;\n role?: string;\n created_on?: string;\n}\n\nexport interface Ticket {\n uuid: string;\n subject: string;\n body?: string;\n closed_on: string;\n opened_on: string;\n status: string;\n contact: ObjectReference;\n ticketer: ObjectReference;\n topic: ObjectReference;\n assignee?: User;\n}\n\nexport interface FlowResult {\n key: string;\n name: string;\n categories: string[];\n node_uuids: string[];\n}\n\nexport interface FlowDetails {\n name: string;\n results: FlowResult[];\n modified_on: string;\n runs: {\n active: number;\n completed: number;\n expired: number;\n interrupted: number;\n };\n}\n\nexport interface Msg {\n text: string;\n status: string;\n channel: ObjectReference;\n quick_replies: string[];\n urn: string;\n id: number;\n direction: string;\n type: string;\n created_by?: User;\n attachments: string[];\n}\n\nexport interface ObjectReference {\n uuid: string;\n name: string;\n}\n\nexport interface ContactField {\n key: string;\n label: string;\n value_type: string;\n pinned: boolean;\n priority: number;\n}\n\nexport interface ContactGroup {\n uuid: string;\n count: number;\n name: string;\n query?: string;\n status: string;\n}\n\nexport interface URN {\n scheme: string;\n path: string;\n}\n\nexport interface Group {\n name: string;\n uuid: string;\n is_dynamic?: boolean;\n}\n\nexport interface ContactTicket {\n name: string;\n uuid: string;\n status: string;\n\n contact: {\n uuid: string;\n name: string;\n created_on: Date;\n last_seen_on: Date;\n };\n}\n\nexport interface Contact {\n name: string;\n uuid: string;\n stopped: boolean;\n blocked: boolean;\n urns: string[];\n language?: string;\n fields: { [key: string]: string };\n groups: Group[];\n modified_on: string;\n created_on: string;\n last_seen_on: string;\n status: string;\n\n flow?: ObjectReference;\n last_msg?: Msg;\n direction?: string;\n ticket: {\n uuid: string;\n subject: string;\n closed_on?: string;\n last_activity_on: string;\n assignee?: User;\n topic?: ObjectReference;\n };\n}\n\nexport interface FeatureProperties {\n name: string;\n osm_id: string;\n level: number;\n children?: FeatureProperties[];\n has_children?: boolean;\n aliases?: string;\n parent_osm_id?: string;\n id?: number;\n path?: string;\n}\n\nexport interface Position {\n top: number;\n left: number;\n}\n\nexport interface FunctionExample {\n template: string;\n output: string;\n}\n\nexport interface CompletionOption {\n name?: string;\n summary: string;\n\n // functions\n signature?: string;\n detail?: string;\n examples?: FunctionExample[];\n}\n\nexport interface CompletionResult {\n anchorPosition: Position;\n query: string;\n options: CompletionOption[];\n currentFunction: CompletionOption;\n}\n\nexport interface CompletionProperty {\n key: string;\n help: string;\n type: string;\n}\n\nexport interface CompletionType {\n name: string;\n\n key_source?: string;\n property_template?: CompletionProperty;\n properties?: CompletionProperty[];\n}\n\nexport interface CompletionSchema {\n types: CompletionType[];\n root: CompletionProperty[];\n root_no_session: CompletionProperty[];\n}\n\nexport type KeyedAssets = { [assetType: string]: string[] };\n\nexport enum CustomEventType {\n Loaded = 'temba-loaded',\n Canceled = 'temba-canceled',\n CursorChanged = 'temba-cursor-changed',\n Refreshed = 'temba-refreshed',\n Selection = 'temba-selection',\n ButtonClicked = 'temba-button-clicked',\n DialogHidden = 'temba-dialog-hidden',\n ScrollThreshold = 'temba-scroll-threshold',\n ContentChanged = 'temba-content-changed',\n ContextChanged = 'temba-context-changed',\n FetchComplete = 'temba-fetch-complete',\n Submitted = 'temba-submitted',\n Redirected = 'temba-redirected',\n NoPath = 'temba-no-path',\n StoreUpdated = 'temba-store-updated',\n Ready = 'temba-ready',\n}\n"]}
|