@nyaruka/temba-components 0.86.0 → 0.87.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/.eslintrc.js +3 -3
- package/.prettierrc +6 -0
- package/.storybook/main.js +3 -3
- package/.storybook/preview.js +2 -2
- package/CHANGELOG.md +14 -0
- package/CreateIncludesPlugin.js +2 -2
- package/demo/index.html +1 -0
- package/dist/locales/es.js +1 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/temba-components.js +296 -277
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/RapidElement.js +3 -3
- package/out-tsc/src/RapidElement.js.map +1 -1
- package/out-tsc/src/ResizeElement.js +2 -2
- package/out-tsc/src/ResizeElement.js.map +1 -1
- package/out-tsc/src/aliaseditor/AliasEditor.js +1 -1
- package/out-tsc/src/aliaseditor/AliasEditor.js.map +1 -1
- package/out-tsc/src/button/Button.js +1 -1
- package/out-tsc/src/button/Button.js.map +1 -1
- package/out-tsc/src/charcount/helpers.js +1 -1
- package/out-tsc/src/charcount/helpers.js.map +1 -1
- package/out-tsc/src/colorpicker/ColorPicker.js +4 -4
- package/out-tsc/src/colorpicker/ColorPicker.js.map +1 -1
- package/out-tsc/src/completion/Completion.js +2 -2
- package/out-tsc/src/completion/Completion.js.map +1 -1
- package/out-tsc/src/completion/ExcellentParser.js +1 -1
- package/out-tsc/src/completion/ExcellentParser.js.map +1 -1
- package/out-tsc/src/completion/helpers.js +8 -8
- package/out-tsc/src/completion/helpers.js.map +1 -1
- package/out-tsc/src/compose/Compose.js +14 -14
- package/out-tsc/src/compose/Compose.js.map +1 -1
- package/out-tsc/src/contacts/ContactBadges.js +2 -2
- package/out-tsc/src/contacts/ContactBadges.js.map +1 -1
- package/out-tsc/src/contacts/ContactChat.js +4 -4
- package/out-tsc/src/contacts/ContactChat.js.map +1 -1
- package/out-tsc/src/contacts/ContactDetails.js +4 -4
- package/out-tsc/src/contacts/ContactDetails.js.map +1 -1
- package/out-tsc/src/contacts/ContactFieldEditor.js +3 -3
- package/out-tsc/src/contacts/ContactFieldEditor.js.map +1 -1
- package/out-tsc/src/contacts/ContactFields.js +2 -2
- package/out-tsc/src/contacts/ContactFields.js.map +1 -1
- package/out-tsc/src/contacts/ContactHistory.js +21 -19
- package/out-tsc/src/contacts/ContactHistory.js.map +1 -1
- package/out-tsc/src/contacts/ContactPending.js +4 -4
- package/out-tsc/src/contacts/ContactPending.js.map +1 -1
- package/out-tsc/src/contacts/ContactTickets.js +8 -8
- package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
- package/out-tsc/src/contacts/events.js +2 -2
- package/out-tsc/src/contacts/events.js.map +1 -1
- package/out-tsc/src/contacts/helpers.js +2 -2
- package/out-tsc/src/contacts/helpers.js.map +1 -1
- package/out-tsc/src/contactsearch/ContactSearch.js +7 -7
- package/out-tsc/src/contactsearch/ContactSearch.js.map +1 -1
- package/out-tsc/src/date/TembaDate.js +1 -1
- package/out-tsc/src/date/TembaDate.js.map +1 -1
- package/out-tsc/src/datepicker/DatePicker.js +1 -1
- package/out-tsc/src/datepicker/DatePicker.js.map +1 -1
- package/out-tsc/src/dialog/Dialog.js +5 -5
- package/out-tsc/src/dialog/Dialog.js.map +1 -1
- package/out-tsc/src/dialog/Modax.js +8 -8
- package/out-tsc/src/dialog/Modax.js.map +1 -1
- package/out-tsc/src/dropdown/Dropdown.js +1 -1
- package/out-tsc/src/dropdown/Dropdown.js.map +1 -1
- package/out-tsc/src/fields/FieldManager.js +6 -6
- package/out-tsc/src/fields/FieldManager.js.map +1 -1
- package/out-tsc/src/imagepicker/ImagePicker.js +4 -4
- package/out-tsc/src/imagepicker/ImagePicker.js.map +1 -1
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/label/Label.js +1 -1
- package/out-tsc/src/label/Label.js.map +1 -1
- package/out-tsc/src/leafletmap/LeafletMap.js +6 -6
- package/out-tsc/src/leafletmap/LeafletMap.js.map +1 -1
- package/out-tsc/src/leafletmap/helpers.js +2 -2
- package/out-tsc/src/leafletmap/helpers.js.map +1 -1
- package/out-tsc/src/lightbox/Lightbox.js +2 -2
- package/out-tsc/src/lightbox/Lightbox.js.map +1 -1
- package/out-tsc/src/list/ContentMenu.js +8 -8
- package/out-tsc/src/list/ContentMenu.js.map +1 -1
- package/out-tsc/src/list/NotificationList.js +7 -3
- package/out-tsc/src/list/NotificationList.js.map +1 -1
- package/out-tsc/src/list/RunList.js +1 -1
- package/out-tsc/src/list/RunList.js.map +1 -1
- package/out-tsc/src/list/SortableList.js +6 -6
- package/out-tsc/src/list/SortableList.js.map +1 -1
- package/out-tsc/src/list/TembaList.js +5 -5
- package/out-tsc/src/list/TembaList.js.map +1 -1
- package/out-tsc/src/list/TembaMenu.js +22 -22
- package/out-tsc/src/list/TembaMenu.js.map +1 -1
- package/out-tsc/src/loading/Loading.js +1 -1
- package/out-tsc/src/loading/Loading.js.map +1 -1
- package/out-tsc/src/locales/es.js +1 -1
- package/out-tsc/src/locales/es.js.map +1 -1
- package/out-tsc/src/locales/fr.js +1 -1
- package/out-tsc/src/locales/fr.js.map +1 -1
- package/out-tsc/src/locales/pt.js +1 -1
- package/out-tsc/src/locales/pt.js.map +1 -1
- package/out-tsc/src/omnibox/Omnibox.js +1 -1
- package/out-tsc/src/omnibox/Omnibox.js.map +1 -1
- package/out-tsc/src/options/Options.js +9 -9
- package/out-tsc/src/options/Options.js.map +1 -1
- package/out-tsc/src/remote/Remote.js +1 -1
- package/out-tsc/src/remote/Remote.js.map +1 -1
- package/out-tsc/src/select/Select.js +18 -18
- package/out-tsc/src/select/Select.js.map +1 -1
- package/out-tsc/src/sms/gsmsplitter.js +8 -8
- package/out-tsc/src/sms/gsmsplitter.js.map +1 -1
- package/out-tsc/src/sms/gsmvalidator.js +1 -1
- package/out-tsc/src/sms/gsmvalidator.js.map +1 -1
- package/out-tsc/src/sms/index.js +2 -2
- package/out-tsc/src/sms/index.js.map +1 -1
- package/out-tsc/src/sms/unicodesplitter.js +8 -8
- package/out-tsc/src/sms/unicodesplitter.js.map +1 -1
- package/out-tsc/src/store/Store.js +10 -10
- package/out-tsc/src/store/Store.js.map +1 -1
- package/out-tsc/src/store/StoreElement.js +2 -2
- package/out-tsc/src/store/StoreElement.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +4 -4
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/src/templates/TemplateEditor.js +9 -9
- package/out-tsc/src/templates/TemplateEditor.js.map +1 -1
- package/out-tsc/src/textinput/TextInput.js +1 -1
- package/out-tsc/src/textinput/TextInput.js.map +1 -1
- package/out-tsc/src/thumbnail/Thumbnail.js +5 -5
- package/out-tsc/src/thumbnail/Thumbnail.js.map +1 -1
- package/out-tsc/src/tip/Tip.js +3 -3
- package/out-tsc/src/tip/Tip.js.map +1 -1
- package/out-tsc/src/utils/index.js +21 -21
- package/out-tsc/src/utils/index.js.map +1 -1
- package/out-tsc/src/vectoricon/VectorIcon.js +2 -2
- package/out-tsc/src/vectoricon/VectorIcon.js.map +1 -1
- package/out-tsc/src/vectoricon/index.js +2 -0
- package/out-tsc/src/vectoricon/index.js.map +1 -1
- package/out-tsc/src/webchat/WebChat.js +234 -81
- package/out-tsc/src/webchat/WebChat.js.map +1 -1
- package/out-tsc/src/webchat/assets.js +2 -0
- package/out-tsc/src/webchat/assets.js.map +1 -0
- package/out-tsc/src/webchat/index.js.map +1 -1
- package/out-tsc/test/temba-alert.test.js +1 -1
- package/out-tsc/test/temba-alert.test.js.map +1 -1
- package/out-tsc/test/temba-checkbox.test.js.map +1 -1
- package/out-tsc/test/temba-color-picker.test.js +4 -4
- package/out-tsc/test/temba-color-picker.test.js.map +1 -1
- package/out-tsc/test/temba-compose.test.js +50 -54
- package/out-tsc/test/temba-compose.test.js.map +1 -1
- package/out-tsc/test/temba-contact-badges.test.js +2 -2
- package/out-tsc/test/temba-contact-badges.test.js.map +1 -1
- package/out-tsc/test/temba-contact-chat.test.js +25 -38
- package/out-tsc/test/temba-contact-chat.test.js.map +1 -1
- package/out-tsc/test/temba-contact-details.test.js +2 -2
- package/out-tsc/test/temba-contact-details.test.js.map +1 -1
- package/out-tsc/test/temba-contact-fields.test.js +4 -4
- package/out-tsc/test/temba-contact-fields.test.js.map +1 -1
- package/out-tsc/test/temba-contact-history.test.js +3 -3
- package/out-tsc/test/temba-contact-history.test.js.map +1 -1
- package/out-tsc/test/temba-contact-search.test.js +7 -7
- package/out-tsc/test/temba-contact-search.test.js.map +1 -1
- package/out-tsc/test/temba-contact-tickets.test.js +3 -3
- package/out-tsc/test/temba-contact-tickets.test.js.map +1 -1
- package/out-tsc/test/temba-content-menu.test.js +7 -7
- package/out-tsc/test/temba-content-menu.test.js.map +1 -1
- package/out-tsc/test/temba-date.test.js +3 -3
- package/out-tsc/test/temba-date.test.js.map +1 -1
- package/out-tsc/test/temba-datepicker.test.js +1 -1
- package/out-tsc/test/temba-datepicker.test.js.map +1 -1
- package/out-tsc/test/temba-field-manager.test.js +1 -3
- package/out-tsc/test/temba-field-manager.test.js.map +1 -1
- package/out-tsc/test/temba-label.test.js +6 -6
- package/out-tsc/test/temba-label.test.js.map +1 -1
- package/out-tsc/test/temba-lightbox.test.js +2 -2
- package/out-tsc/test/temba-lightbox.test.js.map +1 -1
- package/out-tsc/test/temba-list.test.js +6 -6
- package/out-tsc/test/temba-list.test.js.map +1 -1
- package/out-tsc/test/temba-menu.test.js +4 -5
- package/out-tsc/test/temba-menu.test.js.map +1 -1
- package/out-tsc/test/temba-modax.test.js +3 -3
- package/out-tsc/test/temba-modax.test.js.map +1 -1
- package/out-tsc/test/temba-options.test.js +1 -1
- package/out-tsc/test/temba-options.test.js.map +1 -1
- package/out-tsc/test/temba-select.test.js +17 -17
- package/out-tsc/test/temba-select.test.js.map +1 -1
- package/out-tsc/test/temba-sortable-list.test.js +1 -1
- package/out-tsc/test/temba-sortable-list.test.js.map +1 -1
- package/out-tsc/test/temba-textinput.test.js +2 -2
- package/out-tsc/test/temba-textinput.test.js.map +1 -1
- package/out-tsc/test/temba-tip.test.js +4 -4
- package/out-tsc/test/temba-tip.test.js.map +1 -1
- package/out-tsc/test/utils.test.js +8 -8
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +6 -15
- package/src/RapidElement.ts +3 -3
- package/src/ResizeElement.ts +2 -2
- package/src/aliaseditor/AliasEditor.ts +1 -2
- package/src/button/Button.ts +1 -1
- package/src/charcount/helpers.ts +1 -1
- package/src/colorpicker/ColorPicker.ts +4 -4
- package/src/completion/Completion.ts +2 -2
- package/src/completion/ExcellentParser.ts +1 -1
- package/src/completion/helpers.ts +9 -9
- package/src/compose/Compose.ts +18 -16
- package/src/contacts/ContactBadges.ts +2 -2
- package/src/contacts/ContactChat.ts +4 -4
- package/src/contacts/ContactDetails.ts +4 -4
- package/src/contacts/ContactFieldEditor.ts +4 -4
- package/src/contacts/ContactFields.ts +2 -2
- package/src/contacts/ContactHistory.ts +25 -22
- package/src/contacts/ContactPending.ts +4 -4
- package/src/contacts/ContactTickets.ts +9 -9
- package/src/contacts/events.ts +3 -3
- package/src/contacts/helpers.ts +2 -2
- package/src/contactsearch/ContactSearch.ts +9 -9
- package/src/date/TembaDate.ts +1 -1
- package/src/datepicker/DatePicker.ts +1 -1
- package/src/dialog/Dialog.ts +6 -6
- package/src/dialog/Modax.ts +8 -8
- package/src/dropdown/Dropdown.ts +1 -2
- package/src/emojis.json +1882 -1
- package/src/fields/FieldManager.ts +6 -7
- package/src/imagepicker/ImagePicker.ts +4 -4
- package/src/interfaces.ts +4 -4
- package/src/label/Label.ts +1 -1
- package/src/leafletmap/LeafletMap.ts +6 -6
- package/src/leafletmap/helpers.ts +2 -2
- package/src/lightbox/Lightbox.ts +2 -2
- package/src/list/ContentMenu.ts +9 -9
- package/src/list/NotificationList.ts +7 -3
- package/src/list/RunList.ts +1 -1
- package/src/list/SortableList.ts +6 -6
- package/src/list/TembaList.ts +5 -5
- package/src/list/TembaMenu.ts +23 -23
- package/src/loading/Loading.ts +1 -1
- package/src/locales/es.ts +1 -1
- package/src/locales/fr.ts +1 -1
- package/src/locales/pt.ts +1 -1
- package/src/omnibox/Omnibox.ts +2 -2
- package/src/options/Options.ts +9 -9
- package/src/remote/Remote.ts +1 -1
- package/src/select/Select.ts +19 -19
- package/src/sms/gsmsplitter.ts +8 -8
- package/src/sms/gsmvalidator.ts +1 -1
- package/src/sms/index.ts +2 -2
- package/src/sms/unicodesplitter.ts +8 -8
- package/src/store/Store.ts +10 -10
- package/src/store/StoreElement.ts +2 -2
- package/src/tabpane/TabPane.ts +4 -4
- package/src/templates/TemplateEditor.ts +9 -9
- package/src/textinput/TextInput.ts +2 -2
- package/src/thumbnail/Thumbnail.ts +5 -5
- package/src/tip/Tip.ts +3 -3
- package/src/utils/index.ts +24 -24
- package/src/vectoricon/VectorIcon.ts +2 -2
- package/src/vectoricon/index.ts +3 -1
- package/src/webchat/WebChat.ts +272 -87
- package/src/webchat/assets.ts +2 -0
- package/src/webchat/index.ts +1 -1
- package/svg.js +28 -29
- package/test/temba-alert.test.ts +1 -1
- package/test/temba-checkbox.test.ts +1 -1
- package/test/temba-color-picker.test.ts +4 -4
- package/test/temba-compose.test.ts +50 -55
- package/test/temba-contact-badges.test.ts +2 -2
- package/test/temba-contact-chat.test.ts +26 -46
- package/test/temba-contact-details.test.ts +2 -8
- package/test/temba-contact-fields.test.ts +4 -11
- package/test/temba-contact-history.test.ts +3 -3
- package/test/temba-contact-search.test.ts +7 -13
- package/test/temba-contact-tickets.test.ts +3 -3
- package/test/temba-content-menu.test.ts +7 -7
- package/test/temba-date.test.ts +3 -3
- package/test/temba-datepicker.test.ts +1 -1
- package/test/temba-field-manager.test.ts +1 -4
- package/test/temba-label.test.ts +6 -6
- package/test/temba-lightbox.test.ts +2 -2
- package/test/temba-list.test.ts +6 -6
- package/test/temba-menu.test.ts +4 -5
- package/test/temba-modax.test.ts +3 -3
- package/test/temba-options.test.ts +1 -1
- package/test/temba-select.test.ts +17 -17
- package/test/temba-sortable-list.test.ts +1 -1
- package/test/temba-textinput.test.ts +2 -2
- package/test/temba-tip.test.ts +5 -5
- package/test/utils.test.ts +8 -9
package/src/options/Options.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getClasses,
|
|
8
8
|
getScrollParent,
|
|
9
9
|
isElementVisible,
|
|
10
|
-
throttle
|
|
10
|
+
throttle
|
|
11
11
|
} from '../utils';
|
|
12
12
|
|
|
13
13
|
export class Options extends RapidElement {
|
|
@@ -330,7 +330,7 @@ export class Options extends RapidElement {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
this.fireCustomEvent(CustomEventType.CursorChanged, {
|
|
333
|
-
index: this.cursorIndex
|
|
333
|
+
index: this.cursorIndex
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -437,7 +437,7 @@ export class Options extends RapidElement {
|
|
|
437
437
|
this.fireCustomEvent(CustomEventType.Selection, {
|
|
438
438
|
selected,
|
|
439
439
|
tabbed,
|
|
440
|
-
index
|
|
440
|
+
index
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
|
|
@@ -566,13 +566,13 @@ export class Options extends RapidElement {
|
|
|
566
566
|
{
|
|
567
567
|
event: 'keydown',
|
|
568
568
|
method: this.handleKeyDown,
|
|
569
|
-
isDocument: true
|
|
569
|
+
isDocument: true
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
event: 'scroll',
|
|
573
573
|
method: this.calculatePosition,
|
|
574
|
-
isDocument: true
|
|
575
|
-
}
|
|
574
|
+
isDocument: true
|
|
575
|
+
}
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
578
|
|
|
@@ -616,7 +616,7 @@ export class Options extends RapidElement {
|
|
|
616
616
|
|
|
617
617
|
const containerStyle = {
|
|
618
618
|
'margin-left': `${this.marginHorizontal}px`,
|
|
619
|
-
'margin-top': `${vertical}px
|
|
619
|
+
'margin-top': `${vertical}px`
|
|
620
620
|
};
|
|
621
621
|
|
|
622
622
|
if (this.top) {
|
|
@@ -639,11 +639,11 @@ export class Options extends RapidElement {
|
|
|
639
639
|
anchored: !this.block,
|
|
640
640
|
loading: this.loading,
|
|
641
641
|
shadow: !this.hideShadow,
|
|
642
|
-
bordered: this.hideShadow
|
|
642
|
+
bordered: this.hideShadow
|
|
643
643
|
});
|
|
644
644
|
|
|
645
645
|
const classesInner = getClasses({
|
|
646
|
-
options: true
|
|
646
|
+
options: true
|
|
647
647
|
});
|
|
648
648
|
|
|
649
649
|
let options = this.options || [];
|
package/src/remote/Remote.ts
CHANGED
package/src/select/Select.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getClasses,
|
|
7
7
|
fetchResults,
|
|
8
8
|
WebResponse,
|
|
9
|
-
postJSON
|
|
9
|
+
postJSON
|
|
10
10
|
} from '../utils';
|
|
11
11
|
import '../options/Options';
|
|
12
12
|
import { EventHandler } from '../RapidElement';
|
|
@@ -17,7 +17,7 @@ import { CompletionOption, CustomEventType, Position } from '../interfaces';
|
|
|
17
17
|
import {
|
|
18
18
|
renderCompletionOption,
|
|
19
19
|
updateInputElementWithCompletion,
|
|
20
|
-
executeCompletionQuery
|
|
20
|
+
executeCompletionQuery
|
|
21
21
|
} from '../completion/helpers';
|
|
22
22
|
import { Store } from '../store/Store';
|
|
23
23
|
import { styleMap } from 'lit-html/directives/style-map.js';
|
|
@@ -550,7 +550,7 @@ export class Select extends FormElement {
|
|
|
550
550
|
if (results && results.length > 0) {
|
|
551
551
|
if (value) {
|
|
552
552
|
// if we started with a value, see if we can find it in the results
|
|
553
|
-
const existing = results.find(option => {
|
|
553
|
+
const existing = results.find((option) => {
|
|
554
554
|
return this.getValue(option) === value;
|
|
555
555
|
});
|
|
556
556
|
|
|
@@ -660,7 +660,7 @@ export class Select extends FormElement {
|
|
|
660
660
|
|
|
661
661
|
public setSelectedValue(value: string) {
|
|
662
662
|
if (this.staticOptions.length > 0) {
|
|
663
|
-
const existing = this.staticOptions.find(option => {
|
|
663
|
+
const existing = this.staticOptions.find((option) => {
|
|
664
664
|
return this.getValue(option) === value;
|
|
665
665
|
});
|
|
666
666
|
|
|
@@ -686,7 +686,7 @@ export class Select extends FormElement {
|
|
|
686
686
|
this.value = this.serializeValue(this.values[0]);
|
|
687
687
|
} else {
|
|
688
688
|
if (this.inputRoot.parentElement) {
|
|
689
|
-
this.values.forEach(value => {
|
|
689
|
+
this.values.forEach((value) => {
|
|
690
690
|
const ele = document.createElement('input');
|
|
691
691
|
ele.setAttribute('type', 'hidden');
|
|
692
692
|
ele.setAttribute('name', name);
|
|
@@ -731,7 +731,7 @@ export class Select extends FormElement {
|
|
|
731
731
|
const selected = event.detail.selected;
|
|
732
732
|
// check if we should post it
|
|
733
733
|
if (selected.post && this.endpoint) {
|
|
734
|
-
postJSON(this.endpoint, selected).then(response => {
|
|
734
|
+
postJSON(this.endpoint, selected).then((response) => {
|
|
735
735
|
if (response.status >= 200 && response.status < 300) {
|
|
736
736
|
this.setSelectedOption(response.json);
|
|
737
737
|
this.lruCache = lru(20, 60000);
|
|
@@ -801,7 +801,7 @@ export class Select extends FormElement {
|
|
|
801
801
|
|
|
802
802
|
private setVisibleOptions(options: any[]) {
|
|
803
803
|
// if we have an exclusion filter apply it
|
|
804
|
-
options = options.filter(option => {
|
|
804
|
+
options = options.filter((option) => {
|
|
805
805
|
// exclude unnamed
|
|
806
806
|
if (!this.getNameInternal(option)) {
|
|
807
807
|
return false;
|
|
@@ -854,16 +854,16 @@ export class Select extends FormElement {
|
|
|
854
854
|
if (this.values.length > 0) {
|
|
855
855
|
if (this.multi) {
|
|
856
856
|
options = options.filter(
|
|
857
|
-
option =>
|
|
857
|
+
(option) =>
|
|
858
858
|
!this.values.find(
|
|
859
|
-
selected => this.getValue(selected) === this.getValue(option)
|
|
859
|
+
(selected) => this.getValue(selected) === this.getValue(option)
|
|
860
860
|
)
|
|
861
861
|
);
|
|
862
862
|
} else {
|
|
863
863
|
// if no search, single select should set our cursor to the selected item
|
|
864
864
|
if (!this.input) {
|
|
865
865
|
this.cursorIndex = options.findIndex(
|
|
866
|
-
option => this.getValue(option) === this.getValue(this.values[0])
|
|
866
|
+
(option) => this.getValue(option) === this.getValue(this.values[0])
|
|
867
867
|
);
|
|
868
868
|
} else {
|
|
869
869
|
this.cursorIndex = 0;
|
|
@@ -880,7 +880,7 @@ export class Select extends FormElement {
|
|
|
880
880
|
this.visibleOptions = options;
|
|
881
881
|
|
|
882
882
|
this.fireCustomEvent(CustomEventType.ContentChanged, {
|
|
883
|
-
options: this.visibleOptions
|
|
883
|
+
options: this.visibleOptions
|
|
884
884
|
});
|
|
885
885
|
}
|
|
886
886
|
|
|
@@ -978,7 +978,7 @@ export class Select extends FormElement {
|
|
|
978
978
|
this.lruCache.set(url, {
|
|
979
979
|
options: results,
|
|
980
980
|
complete: true,
|
|
981
|
-
next: null
|
|
981
|
+
next: null
|
|
982
982
|
});
|
|
983
983
|
|
|
984
984
|
this.complete = true;
|
|
@@ -1017,7 +1017,7 @@ export class Select extends FormElement {
|
|
|
1017
1017
|
this.lruCache.set(url, {
|
|
1018
1018
|
options: results,
|
|
1019
1019
|
complete: this.complete,
|
|
1020
|
-
next: this.next
|
|
1020
|
+
next: this.next
|
|
1021
1021
|
});
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
@@ -1069,12 +1069,12 @@ export class Select extends FormElement {
|
|
|
1069
1069
|
const expression = {
|
|
1070
1070
|
name: ele.value,
|
|
1071
1071
|
value: ele.value,
|
|
1072
|
-
expression: true
|
|
1072
|
+
expression: true
|
|
1073
1073
|
};
|
|
1074
1074
|
|
|
1075
1075
|
if (this.multi) {
|
|
1076
1076
|
if (
|
|
1077
|
-
!this.values.find(option => {
|
|
1077
|
+
!this.values.find((option) => {
|
|
1078
1078
|
return (
|
|
1079
1079
|
option.expression &&
|
|
1080
1080
|
option.value &&
|
|
@@ -1184,10 +1184,10 @@ export class Select extends FormElement {
|
|
|
1184
1184
|
{ event: CustomEventType.Canceled, method: this.handleCancel },
|
|
1185
1185
|
{
|
|
1186
1186
|
event: CustomEventType.CursorChanged,
|
|
1187
|
-
method: this.handleCursorChanged
|
|
1187
|
+
method: this.handleCursorChanged
|
|
1188
1188
|
},
|
|
1189
1189
|
{ event: 'blur', method: this.handleBlur },
|
|
1190
|
-
{ event: 'focus', method: this.handleFocus }
|
|
1190
|
+
{ event: 'focus', method: this.handleFocus }
|
|
1191
1191
|
];
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
@@ -1296,13 +1296,13 @@ export class Select extends FormElement {
|
|
|
1296
1296
|
'search-input': this.input.length > 0,
|
|
1297
1297
|
'no-search-input': this.input.length === 0,
|
|
1298
1298
|
[this.flavor]: this.flavor !== null,
|
|
1299
|
-
disabled: this.disabled
|
|
1299
|
+
disabled: this.disabled
|
|
1300
1300
|
});
|
|
1301
1301
|
|
|
1302
1302
|
const anchorStyles = this.anchorPosition
|
|
1303
1303
|
? {
|
|
1304
1304
|
top: '0px',
|
|
1305
|
-
left: `${this.anchorPosition.left - 10}px
|
|
1305
|
+
left: `${this.anchorPosition.left - 10}px`
|
|
1306
1306
|
}
|
|
1307
1307
|
: {};
|
|
1308
1308
|
|
package/src/sms/gsmsplitter.ts
CHANGED
|
@@ -13,11 +13,11 @@ export const gsmSplit = function (message, options) {
|
|
|
13
13
|
{
|
|
14
14
|
content: options.summary ? undefined : '',
|
|
15
15
|
length: 0,
|
|
16
|
-
bytes: 0
|
|
17
|
-
}
|
|
16
|
+
bytes: 0
|
|
17
|
+
}
|
|
18
18
|
],
|
|
19
19
|
totalLength: 0,
|
|
20
|
-
totalBytes: 0
|
|
20
|
+
totalBytes: 0
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -32,7 +32,7 @@ export const gsmSplit = function (message, options) {
|
|
|
32
32
|
const msg = {
|
|
33
33
|
content: options.summary ? undefined : messagePart,
|
|
34
34
|
length: length,
|
|
35
|
-
bytes: bytes
|
|
35
|
+
bytes: bytes
|
|
36
36
|
};
|
|
37
37
|
messages.push(msg);
|
|
38
38
|
|
|
@@ -74,17 +74,17 @@ export const gsmSplit = function (message, options) {
|
|
|
74
74
|
? undefined
|
|
75
75
|
: messages[0].content + messages[1].content,
|
|
76
76
|
length: totalLength,
|
|
77
|
-
bytes: totalBytes
|
|
78
|
-
}
|
|
77
|
+
bytes: totalBytes
|
|
78
|
+
}
|
|
79
79
|
],
|
|
80
80
|
totalLength: totalLength,
|
|
81
|
-
totalBytes: totalBytes
|
|
81
|
+
totalBytes: totalBytes
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
return {
|
|
86
86
|
parts: messages,
|
|
87
87
|
totalLength: totalLength,
|
|
88
|
-
totalBytes: totalBytes
|
|
88
|
+
totalBytes: totalBytes
|
|
89
89
|
};
|
|
90
90
|
};
|
package/src/sms/gsmvalidator.ts
CHANGED
|
@@ -8,7 +8,7 @@ const GSM_charCodes = [
|
|
|
8
8
|
120, 121, 122, 123, 124, 125, 126, 161, 163, 164, 165, 167, 191, 196, 197,
|
|
9
9
|
198, 199, 201, 209, 214, 216, 220, 223, 224, 228, 229, 230, 232, 233, 236,
|
|
10
10
|
241, 242, 246, 248, 249, 252, 915, 916, 920, 923, 926, 928, 931, 934, 936,
|
|
11
|
-
937, 8364
|
|
11
|
+
937, 8364
|
|
12
12
|
];
|
|
13
13
|
|
|
14
14
|
// '\f|^€{}[~]\\'
|
package/src/sms/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const splitSMS = function (message: string, options: any = {}) {
|
|
|
20
20
|
const characterset = options && options.characterset;
|
|
21
21
|
|
|
22
22
|
options = {
|
|
23
|
-
summary: options && options.summary
|
|
23
|
+
summary: options && options.summary
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const isGsm =
|
|
@@ -52,6 +52,6 @@ export const splitSMS = function (message: string, options: any = {}) {
|
|
|
52
52
|
parts: splitResult.parts,
|
|
53
53
|
bytes: splitResult.totalBytes,
|
|
54
54
|
length: splitResult.totalLength,
|
|
55
|
-
remainingInPart: remainingInPart
|
|
55
|
+
remainingInPart: remainingInPart
|
|
56
56
|
};
|
|
57
57
|
};
|
|
@@ -11,11 +11,11 @@ export const unicodeSplit = function (message, options) {
|
|
|
11
11
|
{
|
|
12
12
|
content: options.summary ? undefined : '',
|
|
13
13
|
length: 0,
|
|
14
|
-
bytes: 0
|
|
15
|
-
}
|
|
14
|
+
bytes: 0
|
|
15
|
+
}
|
|
16
16
|
],
|
|
17
17
|
totalLength: 0,
|
|
18
|
-
totalBytes: 0
|
|
18
|
+
totalBytes: 0
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -34,7 +34,7 @@ export const unicodeSplit = function (message, options) {
|
|
|
34
34
|
? message.substring(partStart, partEnd + 1)
|
|
35
35
|
: message.substring(partStart),
|
|
36
36
|
length: length,
|
|
37
|
-
bytes: bytes
|
|
37
|
+
bytes: bytes
|
|
38
38
|
};
|
|
39
39
|
messages.push(msg);
|
|
40
40
|
|
|
@@ -70,17 +70,17 @@ export const unicodeSplit = function (message, options) {
|
|
|
70
70
|
{
|
|
71
71
|
content: options.summary ? undefined : message,
|
|
72
72
|
length: totalLength,
|
|
73
|
-
bytes: totalBytes
|
|
74
|
-
}
|
|
73
|
+
bytes: totalBytes
|
|
74
|
+
}
|
|
75
75
|
],
|
|
76
76
|
totalLength: totalLength,
|
|
77
|
-
totalBytes: totalBytes
|
|
77
|
+
totalBytes: totalBytes
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
return {
|
|
82
82
|
parts: messages,
|
|
83
83
|
totalLength: totalLength,
|
|
84
|
-
totalBytes: totalBytes
|
|
84
|
+
totalBytes: totalBytes
|
|
85
85
|
};
|
|
86
86
|
};
|
package/src/store/Store.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
postUrl,
|
|
9
9
|
postJSON,
|
|
10
10
|
postForm,
|
|
11
|
-
getCookie
|
|
11
|
+
getCookie
|
|
12
12
|
} from '../utils';
|
|
13
13
|
import {
|
|
14
14
|
ContactField,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
KeyedAssets,
|
|
19
19
|
CustomEventType,
|
|
20
20
|
Workspace,
|
|
21
|
-
User
|
|
21
|
+
User
|
|
22
22
|
} from '../interfaces';
|
|
23
23
|
import { RapidElement } from '../RapidElement';
|
|
24
24
|
import { lru } from 'tiny-lru';
|
|
@@ -30,7 +30,7 @@ import { sourceLocale, targetLocales } from '../locales/locale-codes';
|
|
|
30
30
|
const { setLocale } = configureLocalization({
|
|
31
31
|
sourceLocale,
|
|
32
32
|
targetLocales,
|
|
33
|
-
loadLocale: locale => import(`./locales/${locale}.js`)
|
|
33
|
+
loadLocale: (locale) => import(`./locales/${locale}.js`)
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
export class Store extends RapidElement {
|
|
@@ -137,7 +137,7 @@ export class Store extends RapidElement {
|
|
|
137
137
|
const fetches = [];
|
|
138
138
|
if (this.completionEndpoint) {
|
|
139
139
|
fetches.push(
|
|
140
|
-
getUrl(this.completionEndpoint).then(response => {
|
|
140
|
+
getUrl(this.completionEndpoint).then((response) => {
|
|
141
141
|
this.schema = response.json['context'] as CompletionSchema;
|
|
142
142
|
this.fnOptions = response.json['functions'] as CompletionOption[];
|
|
143
143
|
})
|
|
@@ -257,7 +257,7 @@ export class Store extends RapidElement {
|
|
|
257
257
|
|
|
258
258
|
this.fireCustomEvent(CustomEventType.StoreUpdated, {
|
|
259
259
|
url: this.fieldsEndpoint,
|
|
260
|
-
data: this.keyedAssets['fields']
|
|
260
|
+
data: this.keyedAssets['fields']
|
|
261
261
|
});
|
|
262
262
|
});
|
|
263
263
|
}
|
|
@@ -285,7 +285,7 @@ export class Store extends RapidElement {
|
|
|
285
285
|
if (changedProperties.has('ready') && this.ready) {
|
|
286
286
|
const locale = this.getLanguageCode();
|
|
287
287
|
const target = targetLocales.find(
|
|
288
|
-
targetLocale => targetLocale === locale
|
|
288
|
+
(targetLocale) => targetLocale === locale
|
|
289
289
|
);
|
|
290
290
|
|
|
291
291
|
if (target) {
|
|
@@ -373,7 +373,7 @@ export class Store extends RapidElement {
|
|
|
373
373
|
): Promise<WebResponse> {
|
|
374
374
|
options = options || {};
|
|
375
375
|
if (!options.force && this.cache.has(url)) {
|
|
376
|
-
return new Promise<WebResponse>(resolve => {
|
|
376
|
+
return new Promise<WebResponse>((resolve) => {
|
|
377
377
|
resolve(this.cache.get(url));
|
|
378
378
|
});
|
|
379
379
|
}
|
|
@@ -407,12 +407,12 @@ export class Store extends RapidElement {
|
|
|
407
407
|
const results = this.cache.get(key);
|
|
408
408
|
|
|
409
409
|
if (!options.force && results) {
|
|
410
|
-
return new Promise<any[]>(resolve => {
|
|
410
|
+
return new Promise<any[]>((resolve) => {
|
|
411
411
|
resolve(results);
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
return new Promise<any[]>(resolve => {
|
|
415
|
+
return new Promise<any[]>((resolve) => {
|
|
416
416
|
const pending = this.pendingResolves[url] || [];
|
|
417
417
|
pending.push(resolve);
|
|
418
418
|
this.pendingResolves[url] = pending;
|
|
@@ -453,7 +453,7 @@ export class Store extends RapidElement {
|
|
|
453
453
|
if (cached && !options.force) {
|
|
454
454
|
this.fireCustomEvent(CustomEventType.StoreUpdated, { url, data: cached });
|
|
455
455
|
} else {
|
|
456
|
-
fetchResults(url).then(data => {
|
|
456
|
+
fetchResults(url).then((data) => {
|
|
457
457
|
if (!data) {
|
|
458
458
|
delete this.fetching[url];
|
|
459
459
|
return;
|
|
@@ -28,7 +28,7 @@ export class StoreElement extends StoreMonitorElement {
|
|
|
28
28
|
public refresh() {
|
|
29
29
|
this.store.makeRequest(this.url, {
|
|
30
30
|
prepareData: this.prepareData,
|
|
31
|
-
force: true
|
|
31
|
+
force: true
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ export class StoreElement extends StoreMonitorElement {
|
|
|
38
38
|
this.data = event.detail.data;
|
|
39
39
|
this.fireCustomEvent(CustomEventType.Refreshed, {
|
|
40
40
|
data: event.detail.data,
|
|
41
|
-
previous
|
|
41
|
+
previous
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
}
|
package/src/tabpane/TabPane.ts
CHANGED
|
@@ -319,7 +319,7 @@ export class TabPane extends RapidElement {
|
|
|
319
319
|
class="pane ${getClasses({
|
|
320
320
|
first: this.index == 0,
|
|
321
321
|
embedded: this.embedded,
|
|
322
|
-
bottom: this.bottom
|
|
322
|
+
bottom: this.bottom
|
|
323
323
|
})}"
|
|
324
324
|
>
|
|
325
325
|
<slot></slot>
|
|
@@ -332,7 +332,7 @@ export class TabPane extends RapidElement {
|
|
|
332
332
|
bottom: this.bottom,
|
|
333
333
|
collapses: this.collapses,
|
|
334
334
|
embedded: this.embedded,
|
|
335
|
-
focusedname: this.focusedName
|
|
335
|
+
focusedname: this.focusedName
|
|
336
336
|
})}"
|
|
337
337
|
>
|
|
338
338
|
${this.tabs.map(
|
|
@@ -345,7 +345,7 @@ export class TabPane extends RapidElement {
|
|
|
345
345
|
first: index == 0,
|
|
346
346
|
selected: index == this.index,
|
|
347
347
|
hidden: tab.hidden,
|
|
348
|
-
notify: tab.notify
|
|
348
|
+
notify: tab.notify
|
|
349
349
|
})}"
|
|
350
350
|
style="${tab.selectionColor && index == this.index
|
|
351
351
|
? `color:${tab.selectionColor};--icon-color:${tab.selectionColor};`
|
|
@@ -383,7 +383,7 @@ export class TabPane extends RapidElement {
|
|
|
383
383
|
class="pane ${getClasses({
|
|
384
384
|
first: this.index == 0,
|
|
385
385
|
embedded: this.embedded,
|
|
386
|
-
bottom: this.bottom
|
|
386
|
+
bottom: this.bottom
|
|
387
387
|
})}"
|
|
388
388
|
>
|
|
389
389
|
<slot></slot>
|
|
@@ -29,7 +29,7 @@ interface Template {
|
|
|
29
29
|
export class TemplateEditor extends FormElement {
|
|
30
30
|
static shadowRootOptions = {
|
|
31
31
|
...LitElement.shadowRootOptions,
|
|
32
|
-
delegatesFocus: true
|
|
32
|
+
delegatesFocus: true
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
static get styles() {
|
|
@@ -166,7 +166,7 @@ export class TemplateEditor extends FormElement {
|
|
|
166
166
|
this.selectedTemplate = (event.target as any).values[0] as Template;
|
|
167
167
|
const [lang, loc] = this.lang.split('-');
|
|
168
168
|
if (this.selectedTemplate) {
|
|
169
|
-
this.selectedTemplate.translations.forEach(translation => {
|
|
169
|
+
this.selectedTemplate.translations.forEach((translation) => {
|
|
170
170
|
if (
|
|
171
171
|
translation.locale === this.lang ||
|
|
172
172
|
(!loc && translation.locale.split('-')[0] === lang)
|
|
@@ -195,7 +195,7 @@ export class TemplateEditor extends FormElement {
|
|
|
195
195
|
this.fireCustomEvent(CustomEventType.ContextChanged, {
|
|
196
196
|
template: this.selectedTemplate,
|
|
197
197
|
translation: this.translation,
|
|
198
|
-
variables: this.variables
|
|
198
|
+
variables: this.variables
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -206,7 +206,7 @@ export class TemplateEditor extends FormElement {
|
|
|
206
206
|
this.fireCustomEvent(CustomEventType.ContentChanged, {
|
|
207
207
|
template: this.selectedTemplate,
|
|
208
208
|
translation: this.translation,
|
|
209
|
-
variables: this.variables
|
|
209
|
+
variables: this.variables
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -241,14 +241,14 @@ export class TemplateEditor extends FormElement {
|
|
|
241
241
|
|
|
242
242
|
public renderComponents(components: Component[]): TemplateResult {
|
|
243
243
|
const nonButtons = components
|
|
244
|
-
.filter(comp => !comp.type.startsWith('button/'))
|
|
244
|
+
.filter((comp) => !comp.type.startsWith('button/'))
|
|
245
245
|
.map(
|
|
246
|
-
component =>
|
|
246
|
+
(component) =>
|
|
247
247
|
html`<div class="${component['name']}">
|
|
248
248
|
${this.renderVariables(component)}
|
|
249
249
|
</div>`
|
|
250
250
|
);
|
|
251
|
-
const buttonComponents = components.filter(comp =>
|
|
251
|
+
const buttonComponents = components.filter((comp) =>
|
|
252
252
|
comp.type.startsWith('button/')
|
|
253
253
|
);
|
|
254
254
|
const buttons =
|
|
@@ -261,7 +261,7 @@ export class TemplateEditor extends FormElement {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
public renderButtons(components): TemplateResult {
|
|
264
|
-
const buttons = components.map(component => {
|
|
264
|
+
const buttons = components.map((component) => {
|
|
265
265
|
if (component.display) {
|
|
266
266
|
return html`
|
|
267
267
|
<div class="button">
|
|
@@ -301,7 +301,7 @@ export class TemplateEditor extends FormElement {
|
|
|
301
301
|
class="picker"
|
|
302
302
|
value="${this.template}"
|
|
303
303
|
endpoint="${this.url}?comps_as_list=true"
|
|
304
|
-
shouldExclude=${template => template.status !== 'approved'}
|
|
304
|
+
shouldExclude=${(template) => template.status !== 'approved'}
|
|
305
305
|
placeholder="Select a template"
|
|
306
306
|
@temba-content-changed=${this.swallowEvent}
|
|
307
307
|
@change=${this.handleTemplateChanged}
|
|
@@ -10,7 +10,7 @@ import { CharCount } from '../charcount/CharCount';
|
|
|
10
10
|
export enum InputType {
|
|
11
11
|
Text = 'text',
|
|
12
12
|
Password = 'password',
|
|
13
|
-
Number = 'number'
|
|
13
|
+
Number = 'number'
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export class TextInput extends FormElement {
|
|
@@ -349,7 +349,7 @@ export class TextInput extends FormElement {
|
|
|
349
349
|
// TODO make this a formelement and have contactsearch set the root
|
|
350
350
|
public render(): TemplateResult {
|
|
351
351
|
const containerStyle = {
|
|
352
|
-
height: `${this.textarea ? '100%' : 'auto'}
|
|
352
|
+
height: `${this.textarea ? '100%' : 'auto'}`
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
const clear =
|
|
@@ -45,7 +45,7 @@ export class Thumbnail extends RapidElement {
|
|
|
45
45
|
@property({ type: Boolean })
|
|
46
46
|
zooming = false;
|
|
47
47
|
|
|
48
|
-
public handleClick(
|
|
48
|
+
public handleClick() {
|
|
49
49
|
window.setTimeout(() => {
|
|
50
50
|
const lightbox = document.querySelector('temba-lightbox') as Lightbox;
|
|
51
51
|
lightbox.showElement(this);
|
|
@@ -60,7 +60,7 @@ export class Thumbnail extends RapidElement {
|
|
|
60
60
|
style=${styleMap({
|
|
61
61
|
background: 'red',
|
|
62
62
|
borderRadius: '0',
|
|
63
|
-
boxShadow: 'var(--widget-box-shadow)'
|
|
63
|
+
boxShadow: 'var(--widget-box-shadow)'
|
|
64
64
|
})}
|
|
65
65
|
>
|
|
66
66
|
<div
|
|
@@ -79,7 +79,7 @@ export class Thumbnail extends RapidElement {
|
|
|
79
79
|
alignItems: 'center',
|
|
80
80
|
justifyContent: 'center',
|
|
81
81
|
fontWeight: '400',
|
|
82
|
-
color: '#bbb'
|
|
82
|
+
color: '#bbb'
|
|
83
83
|
})}
|
|
84
84
|
>
|
|
85
85
|
${this.label}
|
|
@@ -92,7 +92,7 @@ export class Thumbnail extends RapidElement {
|
|
|
92
92
|
padding: 'var(--thumb-padding, 0.4em)',
|
|
93
93
|
background: '#fff',
|
|
94
94
|
borderRadius: 'var(--curvature)',
|
|
95
|
-
boxShadow: 'var(--widget-box-shadow)'
|
|
95
|
+
boxShadow: 'var(--widget-box-shadow)'
|
|
96
96
|
})}">
|
|
97
97
|
|
|
98
98
|
<div class="thumb" style=${styleMap({
|
|
@@ -108,7 +108,7 @@ export class Thumbnail extends RapidElement {
|
|
|
108
108
|
alignItems: 'center',
|
|
109
109
|
justifyContent: 'center',
|
|
110
110
|
fontWeight: '400',
|
|
111
|
-
color: '#bbb'
|
|
111
|
+
color: '#bbb'
|
|
112
112
|
})}>
|
|
113
113
|
${this.label}
|
|
114
114
|
</div>
|
package/src/tip/Tip.ts
CHANGED
|
@@ -169,12 +169,12 @@ export class Tip extends RapidElement {
|
|
|
169
169
|
public render(): TemplateResult {
|
|
170
170
|
const tipStyle: any = {
|
|
171
171
|
top: this.top ? `${this.top}px` : '0px',
|
|
172
|
-
left: this.left ? `${this.left}px` : '0px'
|
|
172
|
+
left: this.left ? `${this.left}px` : '0px'
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
const arrowStyle: any = {
|
|
176
176
|
top: this.arrowTop ? `${this.arrowTop}px` : '0px',
|
|
177
|
-
left: this.arrowLeft ? `${this.arrowLeft}px` : '0px'
|
|
177
|
+
left: this.arrowLeft ? `${this.arrowLeft}px` : '0px'
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
if (this.width) {
|
|
@@ -185,7 +185,7 @@ export class Tip extends RapidElement {
|
|
|
185
185
|
tip: true,
|
|
186
186
|
show: this.visible,
|
|
187
187
|
top: this.poppedTop,
|
|
188
|
-
'hide-on-change': this.hideOnChange
|
|
188
|
+
'hide-on-change': this.hideOnChange
|
|
189
189
|
});
|
|
190
190
|
|
|
191
191
|
return html`
|