@webitel/ui-sdk 3.1.89 → 3.1.91

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.1.89",
3
+ "version": "3.1.91",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -35,6 +35,7 @@ import WtHint from './molecules/wt-hint/wt-hint.vue';
35
35
  import WtCopyAction from './molecules/wt-copy-action/wt-copy-action.vue';
36
36
  import WtLoadBar from './molecules/wt-load-bar/wt-load-bar.vue';
37
37
  import WtItemLink from './molecules/wt-item-link/wt-item-link.vue';
38
+ import WtDummy from './molecules/wt-dummy/wt-dummy.vue';
38
39
 
39
40
  import WtAppHeader from './organisms/wt-app-header/wt-app-header.vue';
40
41
  import WtAppNavigator from './organisms/wt-app-header/wt-app-navigator.vue';
@@ -109,6 +110,7 @@ const Components = {
109
110
  WtIconAction,
110
111
  WtPageHeader,
111
112
  WtItemLink,
113
+ WtDummy,
112
114
  };
113
115
 
114
116
  export default Components;
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtDummy from '../wt-dummy.vue';
3
+
4
+ describe('WtDummy', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtDummy);
7
+ expect(wrapper.isVisible()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div class="wt-dummy">
3
+ <div class="wt-dummy__img">
4
+ <img
5
+ :src="props.src"
6
+ :width="props.size"
7
+ :height="props.size"
8
+ alt="dummy-picture"
9
+ >
10
+ </div>
11
+ <h1
12
+ v-if="props.locale"
13
+ class="wt-dummy__title">{{ props.locale }}</h1>
14
+ <wt-button
15
+ v-if="props.showAction"
16
+ @click="emits('create')"
17
+ >{{ $t('reusable.add') }}
18
+ </wt-button>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup>
23
+
24
+ const props = defineProps({
25
+ src: {
26
+ type: String,
27
+ },
28
+ locale: {
29
+ type: String,
30
+ },
31
+ showAction: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ size: {
36
+ type: [String, Number],
37
+ },
38
+ });
39
+
40
+ const emits = defineEmits([
41
+ 'create',
42
+ ]);
43
+
44
+ </script>
45
+
46
+ <style lang="scss" scoped>
47
+ .wt-dummy {
48
+ text-align: center;
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: center;
52
+ justify-content: center;
53
+
54
+ &__title {
55
+ @extend %typo-body-1;
56
+ margin-bottom: var(--spacing-sm);
57
+ }
58
+
59
+ &__img {
60
+ margin-bottom: var(--spacing-sm);
61
+ }
62
+ }
63
+ </style>
@@ -226,6 +226,7 @@ export default {
226
226
  requiredArrayValue: 'Array should not be empty',
227
227
  minLength: 'Quantity of characters should not be less than',
228
228
  url: 'Should look like url',
229
+ regExpValidator: 'This regular expression is not valid',
229
230
  },
230
231
  webitelUI: {
231
232
  searchBar: {
@@ -223,6 +223,7 @@ export default {
223
223
  requiredArrayValue: 'Поле не должно быть пустым',
224
224
  minLength: 'Количество символов не должно быть меньше, чем',
225
225
  url: 'Необходимо ввести корректный url-адрес',
226
+ regExpValidator: 'Не правильное регулярное выражение',
226
227
  },
227
228
  webitelUI: {
228
229
  searchBar: {
@@ -223,6 +223,7 @@ export default {
223
223
  requiredArrayValue: 'Поле не повинно бути пустим',
224
224
  minLength: 'Кількість символів повинна бути не меншою, ніж',
225
225
  url: 'Необхідно ввести правильну url-адресу',
226
+ regExpValidator: 'Не правильний регулярний вираз',
226
227
  },
227
228
  webitelUI: {
228
229
  searchBar: {
@@ -30,6 +30,7 @@ export default {
30
30
  else if (this.v.sipAccountValidator?.$invalid) validationText = this.$t('validation.sipAccountValidator');
31
31
  else if (this.v.minLength?.$invalid) validationText = `${this.$t('validation.minLength')} ${this.v.minLength.$params.min}`;
32
32
  else if (this.v.url?.$invalid) validationText = `${this.$t('validation.url')}`;
33
+ else if (this.v.regExpValidator?.$invalid) validationText = `${this.$t('validation.regExpValidator')}`;
33
34
  }
34
35
  // eslint-disable-next-line no-restricted-syntax
35
36
  for (const { name, text } of this.customValidators) {