@webitel/ui-sdk 26.8.80 → 26.8.82

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.
Files changed (40) hide show
  1. package/dist/{clients-C7WyEzGF.js → clients-D_JfZnLU.js} +1 -1
  2. package/dist/{components-BHiUKBm2.js → components-CD2UugXN.js} +517 -517
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.js +1 -1
  5. package/dist/ui-sdk.umd.cjs +1 -1
  6. package/dist/{wt-chat-emoji-CvfzJOVz.js → wt-chat-emoji-VuXz16sW.js} +1 -1
  7. package/dist/{wt-display-chip-items-D9dY4qrQ.js → wt-display-chip-items-CNNVPNRk.js} +1 -1
  8. package/dist/{wt-send-message-popup-BbBlvyBN.js → wt-send-message-popup-na7iB-rU.js} +2 -2
  9. package/dist/{wt-type-extension-value-input-BgRpJ8UJ.js → wt-type-extension-value-input-DmPOaN7z.js} +2 -2
  10. package/dist/{wt-vidstack-player-RiEM14-R.js → wt-vidstack-player-CHh3rNVt.js} +1 -1
  11. package/package.json +5 -1
  12. package/src/components/wt-input-text/wt-input-text.vue +19 -2
  13. package/src/components/wt-tree-table-row/__tests__/WtTreeTableRow.spec.js +2 -2
  14. package/src/locale/en/en.js +4 -0
  15. package/src/locale/es/es.js +4 -0
  16. package/src/locale/kz/kz.js +4 -0
  17. package/src/locale/pl/pl.js +4 -0
  18. package/src/locale/ro/ro.js +4 -0
  19. package/src/locale/ru/ru.js +4 -0
  20. package/src/locale/uk/uk.js +4 -0
  21. package/src/locale/uz/uz.js +4 -0
  22. package/src/locale/vi/vi.js +4 -0
  23. package/src/modules/SaveCopyPopup/components/save-copy-popup.vue +73 -0
  24. package/src/modules/SaveCopyPopup/composables/useSaveCopyPopup.ts +37 -0
  25. package/src/modules/SaveCopyPopup/index.ts +2 -0
  26. package/types/.tsbuildinfo +1 -1
  27. package/types/locale/en/en.d.ts +4 -0
  28. package/types/locale/es/es.d.ts +16 -10
  29. package/types/locale/i18n.d.ts +36 -0
  30. package/types/locale/index.d.ts +36 -0
  31. package/types/locale/kz/kz.d.ts +16 -10
  32. package/types/locale/pl/pl.d.ts +16 -10
  33. package/types/locale/ro/ro.d.ts +16 -10
  34. package/types/locale/ru/ru.d.ts +16 -10
  35. package/types/locale/uk/uk.d.ts +16 -10
  36. package/types/locale/uz/uz.d.ts +16 -10
  37. package/types/locale/vi/vi.d.ts +16 -10
  38. package/types/modules/SaveCopyPopup/components/save-copy-popup.vue.d.ts +14 -0
  39. package/types/modules/SaveCopyPopup/composables/useSaveCopyPopup.d.ts +10 -0
  40. package/types/modules/SaveCopyPopup/index.d.ts +2 -0
@@ -1,4 +1,4 @@
1
- import "./components-BHiUKBm2.js";
1
+ import "./components-CD2UugXN.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-B_9ZBu01.js";
4
4
  import { t as n } from "./wt-button-BwPz__rU.js";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-BHiUKBm2.js";
1
+ import { C as e, i as t } from "./components-CD2UugXN.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { s as r } from "./utils-DReAiJBV.js";
4
4
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./rolldown-runtime-BEcgMyyN.js";
2
- import { n as t, r as n } from "./clients-C7WyEzGF.js";
3
- import { T as r, n as i, w as a } from "./components-BHiUKBm2.js";
2
+ import { n as t, r as n } from "./clients-D_JfZnLU.js";
3
+ import { T as r, n as i, w as a } from "./components-CD2UugXN.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { n as s } from "./useEventBus-B-ZeklLu.js";
6
6
  import { createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./clients-C7WyEzGF.js";
2
- import { a as t, o as n, r, s as i } from "./components-BHiUKBm2.js";
1
+ import { t as e } from "./clients-D_JfZnLU.js";
2
+ import { a as t, o as n, r, s as i } from "./components-CD2UugXN.js";
3
3
  import { t as a } from "./enums-B_9ZBu01.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { k as e } from "./components-BHiUKBm2.js";
1
+ import { k as e } from "./components-CD2UugXN.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-B_9ZBu01.js";
4
4
  import "./wt-button-BwPz__rU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.80",
3
+ "version": "26.8.82",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -369,6 +369,10 @@
369
369
  "types": "./types/modules/UploadCsvPopup/index.d.ts",
370
370
  "import": "./src/modules/UploadCsvPopup/index.ts"
371
371
  },
372
+ "./modules/SaveCopyPopup": {
373
+ "types": "./types/modules/SaveCopyPopup/index.d.ts",
374
+ "import": "./src/modules/SaveCopyPopup/index.ts"
375
+ },
372
376
  "./plugins*": {
373
377
  "types": "./types/plugins*",
374
378
  "import": "./src/plugins*"
@@ -21,7 +21,6 @@
21
21
  >
22
22
  <slot name="prefix" />
23
23
  </p-input-group-addon>
24
- <!-- $listeners is because of compat using in applications -->
25
24
  <p-input-text
26
25
  :id="inputId"
27
26
  ref="inputText"
@@ -34,6 +33,7 @@
34
33
  :inputmode="type"
35
34
  :size="size ? primevueSizeMap[size] : undefined"
36
35
  v-bind="$attrs"
36
+ v-on="listeners"
37
37
  @update:model-value="inputHandler"
38
38
  @keyup="handleKeyup"
39
39
  @focus="emit('focus', $event)"
@@ -66,7 +66,14 @@
66
66
  import type { SuperCompatibleRegleFieldStatus } from '@regle/core';
67
67
  import type { InputTextProps } from 'primevue';
68
68
  import type { InputHTMLAttributes } from 'vue';
69
- import { computed, ref, toRefs, useSlots, useTemplateRef } from 'vue';
69
+ import {
70
+ computed,
71
+ getCurrentInstance,
72
+ ref,
73
+ toRefs,
74
+ useSlots,
75
+ useTemplateRef,
76
+ } from 'vue';
70
77
  import { ComponentSize, MessageVariant } from '../../enums';
71
78
  import { useValidation } from '../../mixins/validationMixin/useValidation';
72
79
  import type {
@@ -132,6 +139,16 @@ const emit = defineEmits<{
132
139
 
133
140
  const slots = useSlots();
134
141
 
142
+ // $listeners is used for compat mode in consuming applications
143
+ const listeners = computed(
144
+ () =>
145
+ (
146
+ getCurrentInstance()?.proxy as {
147
+ $listeners?: Record<string, unknown>;
148
+ } | null
149
+ )?.$listeners,
150
+ );
151
+
135
152
  const { v, customValidators, regleValidation } = toRefs(props);
136
153
 
137
154
  const { isValidation, invalid, validationText, validationTextColor } =
@@ -60,7 +60,7 @@ describe('WtTreeTableRow', () => {
60
60
  expect(cells[1].text()).toContain('30');
61
61
  });
62
62
 
63
- it('applies the alternate class on odd row positions', () => {
63
+ it('does not apply an alternate class on odd row positions', () => {
64
64
  const wrapper = shallowMount(WtTreeTableRow, {
65
65
  props: {
66
66
  data: leafRow,
@@ -70,7 +70,7 @@ describe('WtTreeTableRow', () => {
70
70
  dataHeaders,
71
71
  },
72
72
  });
73
- expect(wrapper.find('.wt-tree-table-row').classes()).toContain(
73
+ expect(wrapper.find('.wt-tree-table-row').classes()).not.toContain(
74
74
  'wt-tree-table-row--alternate',
75
75
  );
76
76
  });
@@ -662,6 +662,10 @@ export default deepmerge(
662
662
  'Are you sure you want\n to delete {count} record? | Are you sure you want\n to delete {count} records?',
663
663
  deleteAll: 'ALL',
664
664
  },
665
+ saveCopyPopup: {
666
+ title: 'Save a copy',
667
+ name: 'Copy name',
668
+ },
665
669
  dummy: {
666
670
  text: 'There are no records yet',
667
671
  },
@@ -651,6 +651,10 @@ export default {
651
651
  '¿Estás seguro de que quieres\n eliminar {count} registro? | ¿Estás seguro de que quieres\n eliminar {count} registros?',
652
652
  deleteAll: 'TODO',
653
653
  },
654
+ saveCopyPopup: {
655
+ title: 'Guardar una copia',
656
+ name: 'Nombre de la copia',
657
+ },
654
658
  dummy: {
655
659
  text: 'Aún no hay registros',
656
660
  },
@@ -652,6 +652,10 @@ export default {
652
652
  'Сіз шынымен {count} жазбаны жойғыңыз келетініне сенімдісіз бе? | Сіз шынымен {count} жазбаны жойғыңыз келетініне сенімдісіз бе?',
653
653
  deleteAll: 'БАРЛЫҒЫ',
654
654
  },
655
+ saveCopyPopup: {
656
+ title: 'Көшірмені сақтау',
657
+ name: 'Көшірме атауы',
658
+ },
655
659
  dummy: {
656
660
  text: 'Әзірге жазбалар жоқ',
657
661
  },
@@ -652,6 +652,10 @@ export default {
652
652
  'Czy na pewno chcesz\n usunąć {count} rekord? | Czy na pewno chcesz\n usunąć {count} rekordy?',
653
653
  deleteAll: 'WSZYSTKO',
654
654
  },
655
+ saveCopyPopup: {
656
+ title: 'Zapisz kopię',
657
+ name: 'Nazwa kopii',
658
+ },
655
659
  dummy: {
656
660
  text: 'Nie ma jeszcze żadnych rekordów',
657
661
  },
@@ -657,6 +657,10 @@ export default {
657
657
  'Sigur doriți să ștergeți {count} înregistrare? | Sigur doriți să ștergeți {count} înregistrări?',
658
658
  deleteAll: 'TOATE',
659
659
  },
660
+ saveCopyPopup: {
661
+ title: 'Salvează o copie',
662
+ name: 'Numele copiei',
663
+ },
660
664
  dummy: {
661
665
  text: 'Nu există încă înregistrări',
662
666
  },
@@ -647,6 +647,10 @@ export default {
647
647
  'Вы уверенны, что хотите\n удалить {count} запись? | Вы уверенны, что хотите\n удалить {count} записей?',
648
648
  deleteAll: 'ВСЕ',
649
649
  },
650
+ saveCopyPopup: {
651
+ title: 'Сохранить копию',
652
+ name: 'Имя копии',
653
+ },
650
654
  dummy: {
651
655
  text: 'Записи в разделе еще не созданы',
652
656
  },
@@ -645,6 +645,10 @@ export default {
645
645
  'Ви впевнені, що хочете\n видалити {count} запис? | Ви впевнені, що хочете\n видалити {count} записів?',
646
646
  deleteAll: 'ВСІ',
647
647
  },
648
+ saveCopyPopup: {
649
+ title: 'Зберегти копію',
650
+ name: "Ім'я копії",
651
+ },
648
652
  dummy: {
649
653
  text: 'Записи у розділі ще не створені',
650
654
  },
@@ -657,6 +657,10 @@ export default {
657
657
  "{count} ta yozuvni o'chirishni xohlaysizmi? | {count} ta yozuvni o'chirishni xohlaysizmi?",
658
658
  deleteAll: 'HAMMASI',
659
659
  },
660
+ saveCopyPopup: {
661
+ title: 'Nusxasini saqlash',
662
+ name: 'Nusxa nomi',
663
+ },
660
664
  dummy: {
661
665
  text: "Hali yozuvlar yo'q",
662
666
  },
@@ -655,6 +655,10 @@ export default {
655
655
  'Bạn có chắc chắn muốn\n xóa {count} bản ghi? | Bạn có chắc chắn muốn\n xóa {count} bản ghi?',
656
656
  deleteAll: 'TẤT CẢ',
657
657
  },
658
+ saveCopyPopup: {
659
+ title: 'Lưu bản sao',
660
+ name: 'Tên bản sao',
661
+ },
658
662
  dummy: {
659
663
  text: 'Chưa có bản ghi nào',
660
664
  },
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <wt-popup
3
+ v-bind="attrs"
4
+ :shown="shown"
5
+ size="sm"
6
+ class="save-copy-popup"
7
+ @close="emit('close')"
8
+ >
9
+ <template #title>
10
+ {{ t('webitelUI.saveCopyPopup.title') }}
11
+ </template>
12
+ <template #main>
13
+ <wt-input-text
14
+ v-model:model-value="name"
15
+ required
16
+ :label="t('webitelUI.saveCopyPopup.name')"
17
+ @keyup.enter="save"
18
+ />
19
+ </template>
20
+ <template #actions>
21
+ <wt-button
22
+ :disabled="!name"
23
+ @click="save"
24
+ >
25
+ {{ t('reusable.save') }}
26
+ </wt-button>
27
+ <wt-button
28
+ color="secondary"
29
+ @click="emit('close')"
30
+ >
31
+ {{ t('reusable.close') }}
32
+ </wt-button>
33
+ </template>
34
+ </wt-popup>
35
+ </template>
36
+
37
+ <script setup lang="ts">
38
+ import { ref, useAttrs, watch } from 'vue';
39
+ import { useI18n } from 'vue-i18n';
40
+
41
+ const { t } = useI18n();
42
+
43
+ interface Props {
44
+ shown?: boolean;
45
+ }
46
+
47
+ const props = withDefaults(defineProps<Props>(), {
48
+ shown: false,
49
+ });
50
+
51
+ const emit = defineEmits<{
52
+ save: [
53
+ name: string,
54
+ ];
55
+ close: [];
56
+ }>();
57
+
58
+ const attrs = useAttrs();
59
+
60
+ const name = ref('');
61
+
62
+ watch(
63
+ () => props.shown,
64
+ (isShown) => {
65
+ if (isShown) name.value = '';
66
+ },
67
+ );
68
+
69
+ function save() {
70
+ if (!name.value) return;
71
+ emit('save', name.value);
72
+ }
73
+ </script>
@@ -0,0 +1,37 @@
1
+ import { ref } from 'vue';
2
+ import { useI18n } from 'vue-i18n';
3
+
4
+ export const useSaveCopyPopup = (onSave: (name: string) => unknown) => {
5
+ const { t } = useI18n();
6
+
7
+ const isSaveCopyPopupShown = ref(false);
8
+
9
+ function openSaveCopyPopup() {
10
+ isSaveCopyPopupShown.value = true;
11
+ }
12
+
13
+ function closeSaveCopyPopup() {
14
+ isSaveCopyPopupShown.value = false;
15
+ }
16
+
17
+ async function saveCopy(name: string) {
18
+ await onSave(name);
19
+ closeSaveCopyPopup();
20
+ }
21
+
22
+ const saveOptions = [
23
+ {
24
+ text: t('webitelUI.saveCopyPopup.title'),
25
+ callback: openSaveCopyPopup,
26
+ },
27
+ ];
28
+
29
+ return {
30
+ isSaveCopyPopupShown,
31
+ saveOptions,
32
+
33
+ openSaveCopyPopup,
34
+ closeSaveCopyPopup,
35
+ saveCopy,
36
+ };
37
+ };
@@ -0,0 +1,2 @@
1
+ export { default as SaveCopyPopup } from './components/save-copy-popup.vue';
2
+ export { useSaveCopyPopup } from './composables/useSaveCopyPopup';