@webitel/ui-sdk 23.12.34 → 23.12.36

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.
@@ -1 +1 @@
1
- import"./account.svg";import"./adfs.svg";import"./app-navigator.svg";import"./arrow-down.svg";import"./arrow-left.svg";import"./arrow-right.svg";import"./arrow-up.svg";import"./arrow-mix.svg";import"./attach.svg";import"./attention.svg";import"./azure.svg";import"./back.svg";import"./bell.svg";import"./bell-badged.svg";import"./bucket.svg";import"./calendar.svg";import"./call.svg";import"./call--filled.svg";import"./call-add-to.svg";import"./call-add-to--filled.svg";import"./call-disconnect.svg";import"./call-disconnect--filled.svg";import"./call-end.svg";import"./call-end--filled.svg";import"./call-inbound.svg";import"./call-inbound--filled.svg";import"./call-missed.svg";import"./call-missed--filled.svg";import"./call-outbound.svg";import"./call-outbound--filled.svg";import"./call-ringing.svg";import"./call-ringing--filled.svg";import"./call-transfer.svg";import"./call-transfer--filled.svg";import"./chat.svg";import"./chat--filled.svg";import"./chat-emoji.svg";import"./chat-end.svg";import"./chat-end--filled.svg";import"./chat-group.svg";import"./chat-join.svg";import"./chat-message-status-read.svg";import"./chat-message-status-sent.svg";import"./chat-quick-response.svg";import"./chat-quick-response--filled.svg";import"./chat-reply.svg";import"./chat-send.svg";import"./chat-transfer.svg";import"./chat-transfer--filled.svg";import"./job.svg";import"./job--accept.svg";import"./job--end.svg";import"./checkbox.svg";import"./checkbox--checked.svg";import"./checkbox--checked--filled.svg";import"./clear.svg";import"./close.svg";import"./close--filled.svg";import"./collapse.svg";import"./column-select.svg";import"./contacts.svg";import"./copy.svg";import"./docs.svg";import"./download.svg";import"./edit.svg";import"./expand.svg";import"./eye--closed.svg";import"./eye--opened.svg";import"./filter.svg";import"./generate.svg";import"./google.svg";import"./history.svg";import"./hold.svg";import"./lock.svg";import"./logout.svg";import"./menu.svg";import"./email.svg";import"./mail.svg";import"./mail--color.svg";import"./messenger-facebook.svg";import"./messenger-facebook--filled.svg";import"./messenger-infobip.svg";import"./messenger-telegram.svg";import"./messenger-telegram--filled.svg";import"./messenger-viber.svg";import"./messenger-viber--filled.svg";import"./messenger-web-chat.svg";import"./messenger-whatsapp.svg";import"./messenger-whatsapp--filled.svg";import"./messenger-messenger.svg";import"./instagram.svg";import"./mic.svg";import"./mic-muted.svg";import"./move.svg";import"./note.svg";import"./numpad.svg";import"./pause.svg";import"./play.svg";import"./plus.svg";import"./prompter.svg";import"./queue-member.svg";import"./radio.svg";import"./radio--checked.svg";import"./rec.svg";import"./rec-off.svg";import"./refresh.svg";import"./rounded-info.svg";import"./role.svg";import"./done.svg";import"./search.svg";import"./send-arrow.svg";import"./settings.svg";import"./sort-arrow-down.svg";import"./sort-arrow-up.svg";import"./sound-off.svg";import"./sound-on.svg";import"./scorecard.svg";import"./star.svg";import"./star--filled.svg";import"./stop.svg";import"./tick.svg";import"./upload.svg";import"./user.svg";import"./video-cam-off.svg";import"./video-cam.svg";import"./zoom-in.svg";import"./zoom-out.svg";import"./tts-download.svg";import"./stt.svg";import"./stt-download.svg";import"./stt-search.svg";import"./idle.svg";import"./telegram-bot.svg";import"./pin.svg";import"./unpin.svg";import"./conference.svg";import"./meta.svg";import"./options.svg";import"./preview-tag-audio.svg";import"./preview-tag-video.svg";import"./preview-tag-application.svg";import"./preview-tag-image.svg";
1
+ import"./account.svg";import"./adfs.svg";import"./app-navigator.svg";import"./arrow-down.svg";import"./arrow-left.svg";import"./arrow-right.svg";import"./arrow-up.svg";import"./arrow-mix.svg";import"./attach.svg";import"./attention.svg";import"./azure.svg";import"./back.svg";import"./bell.svg";import"./bell-badged.svg";import"./bucket.svg";import"./calendar.svg";import"./call.svg";import"./call--filled.svg";import"./call-add-to.svg";import"./call-add-to--filled.svg";import"./call-disconnect.svg";import"./call-disconnect--filled.svg";import"./call-end.svg";import"./call-end--filled.svg";import"./call-inbound.svg";import"./call-inbound--filled.svg";import"./call-missed.svg";import"./call-missed--filled.svg";import"./call-outbound.svg";import"./call-outbound--filled.svg";import"./call-ringing.svg";import"./call-ringing--filled.svg";import"./call-transfer.svg";import"./call-transfer--filled.svg";import"./chat.svg";import"./chat--filled.svg";import"./chat-emoji.svg";import"./chat-end.svg";import"./chat-end--filled.svg";import"./chat-group.svg";import"./chat-join.svg";import"./chat-message-status-read.svg";import"./chat-message-status-sent.svg";import"./chat-quick-response.svg";import"./chat-quick-response--filled.svg";import"./chat-reply.svg";import"./chat-send.svg";import"./chat-transfer.svg";import"./chat-transfer--filled.svg";import"./job.svg";import"./job--accept.svg";import"./job--end.svg";import"./checkbox.svg";import"./checkbox--checked.svg";import"./checkbox--checked--filled.svg";import"./clear.svg";import"./close.svg";import"./close--filled.svg";import"./collapse.svg";import"./column-select.svg";import"./contacts.svg";import"./copy.svg";import"./docs.svg";import"./download.svg";import"./edit.svg";import"./expand.svg";import"./eye--closed.svg";import"./eye--opened.svg";import"./filter.svg";import"./generate.svg";import"./google.svg";import"./history.svg";import"./hold.svg";import"./link.svg";import"./lock.svg";import"./logout.svg";import"./menu.svg";import"./email.svg";import"./mail.svg";import"./mail--color.svg";import"./messenger-facebook.svg";import"./messenger-facebook--filled.svg";import"./messenger-infobip.svg";import"./messenger-telegram.svg";import"./messenger-telegram--filled.svg";import"./messenger-viber.svg";import"./messenger-viber--filled.svg";import"./messenger-web-chat.svg";import"./messenger-whatsapp.svg";import"./messenger-whatsapp--filled.svg";import"./messenger-messenger.svg";import"./instagram.svg";import"./mic.svg";import"./mic-muted.svg";import"./move.svg";import"./note.svg";import"./numpad.svg";import"./pause.svg";import"./play.svg";import"./plus.svg";import"./prompter.svg";import"./queue-member.svg";import"./radio.svg";import"./radio--checked.svg";import"./rec.svg";import"./rec-off.svg";import"./refresh.svg";import"./rounded-info.svg";import"./role.svg";import"./done.svg";import"./search.svg";import"./send-arrow.svg";import"./settings.svg";import"./sort-arrow-down.svg";import"./sort-arrow-up.svg";import"./sound-off.svg";import"./sound-on.svg";import"./scorecard.svg";import"./star.svg";import"./star--filled.svg";import"./stop.svg";import"./tick.svg";import"./upload.svg";import"./user.svg";import"./video-cam-off.svg";import"./video-cam.svg";import"./zoom-in.svg";import"./zoom-out.svg";import"./tts-download.svg";import"./stt.svg";import"./stt-download.svg";import"./stt-search.svg";import"./idle.svg";import"./telegram-bot.svg";import"./pin.svg";import"./unpin.svg";import"./conference.svg";import"./meta.svg";import"./options.svg";import"./preview-tag-audio.svg";import"./preview-tag-video.svg";import"./preview-tag-application.svg";import"./preview-tag-image.svg";
@@ -0,0 +1,8 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="link">
3
+ <g id="link_2">
4
+ <path d="M14.9094 5.70221C15.8452 4.76593 17.3622 4.76593 18.2979 5.70221C19.234 6.63877 19.234 8.15746 18.2979 9.09402L15.0958 12.2978C14.1601 13.2341 12.6431 13.2341 11.7073 12.2978C11.3169 11.9072 10.6837 11.907 10.2931 12.2974C9.90245 12.6878 9.90229 13.321 10.2927 13.7116C12.0096 15.4295 14.7935 15.4295 16.5104 13.7116L19.7125 10.5079C21.4292 8.79034 21.4292 6.00589 19.7125 4.28836C18.0015 2.57646 15.2309 2.57057 13.5126 4.27069L11.3268 6.26053C10.9184 6.63232 10.8887 7.26479 11.2605 7.67319C11.6323 8.08159 12.2648 8.11126 12.6732 7.73947L14.8927 5.71888L14.9094 5.70221Z"/>
5
+ <path d="M9.09061 18.2978C8.15483 19.2341 6.63784 19.2341 5.70205 18.2978C4.76598 17.3612 4.76598 15.8425 5.70205 14.906L8.90415 11.7022C9.83993 10.7659 11.3569 10.7659 12.2927 11.7022C12.6831 12.0928 13.3163 12.093 13.7069 11.7026C14.0975 11.3122 14.0977 10.679 13.7073 10.2884C11.9904 8.57055 9.20648 8.57055 7.48957 10.2884L4.28747 13.4921C2.57084 15.2097 2.57084 17.9941 4.28747 19.7116C5.99848 21.4235 8.76913 21.4294 10.4874 19.7293L12.6732 17.7395C13.0816 17.3677 13.1113 16.7352 12.7395 16.3268C12.3677 15.9184 11.7352 15.8887 11.3268 16.2605L9.10728 18.2811L9.09061 18.2978Z"/>
6
+ </g>
7
+ </g>
8
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "23.12.34",
3
+ "version": "23.12.36",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
@@ -0,0 +1,13 @@
1
+ Validator for variable search string
2
+ ```javascript
3
+ import variableSearchValidator from '@webitel/ui-sdk/src/validators/variableSearchValidator/variableSearchValidator';
4
+
5
+ isValidKeyValuePair("height=100"); // true
6
+ isValidKeyValuePair("1 1=2 2"); // true
7
+ isValidKeyValuePair("you height=5 feet 5½ inches (166 cm)"); // true
8
+ isValidKeyValuePair("expected_output=valid_number")); // true
9
+ isValidKeyValuePair("height= 100"); // false
10
+ isValidKeyValuePair("height =100"); // false
11
+ isValidKeyValuePair("height = 100"); // false
12
+ isValidKeyValuePair("height=5 feet 5½ inches (166 cm), age=1231, fin=123231"); // false
13
+ ```
@@ -0,0 +1,48 @@
1
+ import variableSearchValidator from '../variableSearchValidator';
2
+
3
+ describe('Variable search validator', () => {
4
+ it('Ordinary search', () => {
5
+ const searchValue = 'height=100';
6
+ expect(variableSearchValidator(searchValue)).toBe(true);
7
+ });
8
+ it('Search with spacing in value and key', () => {
9
+ const searchValue = 'your height=5 feet 5½ inches (166 cm)';
10
+ expect(variableSearchValidator(searchValue)).toBe(true);
11
+ });
12
+ it('Search with spacing in value', () => {
13
+ const searchValue = 'height=5 feet 5½ inches (166 cm)';
14
+ expect(variableSearchValidator(searchValue)).toBe(true);
15
+ });
16
+ it('Search with spacing in value and spaces before key and after value', () => {
17
+ const searchValue = ' height=5 feet 5½ inches (166 cm) ';
18
+ expect(variableSearchValidator(searchValue)).toBe(true);
19
+ });
20
+ it('Search with snake_case', () => {
21
+ const searchValue = 'expected_output=valid_number';
22
+ expect(variableSearchValidator(searchValue)).toBe(true);
23
+ });
24
+ it('Wrong search with spacing after "=" sign', () => {
25
+ const searchValue = 'height= 100';
26
+ expect(variableSearchValidator(searchValue)).toBe(false);
27
+ });
28
+ it('Wrong search with spacing before "=" sign', () => {
29
+ const searchValue = 'height =100';
30
+ expect(variableSearchValidator(searchValue)).toBe(false);
31
+ });
32
+ it('Wrong search with spacing near "=" sign', () => {
33
+ const searchValue = 'height = 100';
34
+ expect(variableSearchValidator(searchValue)).toBe(false);
35
+ });
36
+ it('Space search', () => {
37
+ const searchValue = ' ';
38
+ expect(variableSearchValidator(searchValue)).toBe(false);
39
+ });
40
+ it('Empty search', () => {
41
+ const searchValue = '';
42
+ expect(variableSearchValidator(searchValue)).toBe(true);
43
+ });
44
+ it('Multiple "=" search', () => {
45
+ const searchValue = 'height=5 feet 5½ inches (166 cm), age=1231, fin=123231';
46
+ expect(variableSearchValidator(searchValue)).toBe(false);
47
+ });
48
+ });
@@ -0,0 +1,10 @@
1
+ export default function variableSearchValidator(input) {
2
+ if (input) {
3
+ const splitInput = input.split('=');
4
+ const [key, value] = splitInput;
5
+ if (key.endsWith(' ') || value.startsWith(' ') || splitInput.length !== 2) {
6
+ return false;
7
+ }
8
+ }
9
+ return true;
10
+ }
@@ -1,4 +0,0 @@
1
- export default function variableSearchValidator(value) {
2
- const isValid = /\s*([^=]+)\s*=\s*(.*?)(?=\s*[^=]+\s*|$)/g.test(value);
3
- return !value || isValid;
4
- };