@webitel/ui-sdk 25.10.48 → 25.10.50

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": "25.10.48",
3
+ "version": "25.10.50",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -14,6 +14,7 @@
14
14
  lazy
15
15
  scroll-height="flex"
16
16
  scrollable
17
+ :virtual-scroller-options="virtualScroll"
17
18
  @sort="sort"
18
19
  @update:expanded-rows="expandedRows = $event"
19
20
  @column-resize-end="columnResize"
@@ -202,12 +203,22 @@
202
203
 
203
204
  <script lang="ts" setup>
204
205
  import type { DataTableProps } from 'primevue';
206
+ import { VirtualScrollerLazyEvent } from 'primevue/virtualscroller';
205
207
  import { computed, defineProps, ref, useSlots,useTemplateRef, withDefaults } from 'vue';
206
208
  import { useI18n } from 'vue-i18n';
207
209
 
208
210
  import { getNextSortOrder } from '../../scripts/sortQueryAdapters.js';
209
211
  import type { WtTableHeader } from './types/WtTable';
210
212
 
213
+ /**
214
+ * Number of items to render outside the visible area for virtual scrolling.
215
+ * This helps maintain smooth scrolling performance by pre-rendering items
216
+ * that are about to come into view, reducing the chance of blank spaces
217
+ * during fast scrolling.
218
+ */
219
+ const VIRTUAL_SCROLL_TOLERATED_ITEMS = 10;
220
+ const DEFAULT_ITEM_SIZE = 40;
221
+
211
222
  interface Props extends DataTableProps{
212
223
  /**
213
224
  * 'Accepts list of header objects. Draws text depending on "text" property, looks for data values through "value", "show" boolean controls visibility of a column (if undefined, all visible by default). ' Column width is calculated by "width" param. By default, sets 140px. '
@@ -252,6 +263,12 @@ interface Props extends DataTableProps{
252
263
  resizableColumns?: boolean
253
264
  reorderableColumns?: boolean
254
265
  rowExpansionDisabled?: (row: object) => boolean;
266
+
267
+ //lazy loading
268
+ lazy?: boolean;
269
+ onLoading?: (event: VirtualScrollerLazyEvent) => Promise<any>;
270
+ loading?: boolean;
271
+ itemSize?: number | undefined;
255
272
  }
256
273
 
257
274
  const props = withDefaults(defineProps<Props>(), {
@@ -270,6 +287,8 @@ const props = withDefaults(defineProps<Props>(), {
270
287
  resizableColumns: false,
271
288
  reorderableColumns: false,
272
289
  rowExpansionDisabled: () => false,
290
+ lazy: false,
291
+ itemSize: DEFAULT_ITEM_SIZE
273
292
  });
274
293
 
275
294
  const { t } = useI18n();
@@ -417,6 +436,17 @@ const toggleRow = (row) => {
417
436
  expandedRows.value.push(row);
418
437
  }
419
438
  };
439
+
440
+ const virtualScroll = computed(() => {
441
+ if (!props.lazy) return;
442
+
443
+ return {
444
+ lazy: props.lazy,
445
+ onLazyLoad: props.onLoading,
446
+ itemSize: props.itemSize, // The height/width of item according to orientation
447
+ numToleratedItems: VIRTUAL_SCROLL_TOLERATED_ITEMS, // Number of items to pre-render outside visible area
448
+ };
449
+ });
420
450
  </script>
421
451
 
422
452
  <style lang="scss">
@@ -128,6 +128,11 @@ export default deepmerge({
128
128
  column: 'Column | Columns',
129
129
  notification: 'Notification | Notifications',
130
130
  screencast: 'Screencast',
131
+ extension: 'Extension',
132
+ password: 'Password',
133
+ number: 'Number',
134
+ expireAt: 'Expire at',
135
+ destination: 'Destination',
131
136
  },
132
137
  // date-related texts
133
138
  date: {
@@ -124,6 +124,11 @@ export default {
124
124
  column: 'Columna | Columnas',
125
125
  notification: 'Notificación | Notificaciones',
126
126
  screencast: 'Videotutorial de pantalla',
127
+ extension: 'Extensión',
128
+ password: 'Contraseña',
129
+ number: 'Número',
130
+ expireAt: 'Expira en',
131
+ destination: 'Destino',
127
132
  },
128
133
  date: {
129
134
  sec: 'Seg',
@@ -126,6 +126,11 @@ export default {
126
126
  column: 'Баған | Бағандар',
127
127
  notification: 'Хабарландыру | Хабарландырулар',
128
128
  screencast: 'Экран жазбасы',
129
+ extension: 'Кеңейту',
130
+ password: 'Құпия сөз',
131
+ number: 'Нөмір',
132
+ expireAt: 'Мерзімі',
133
+ destination: 'Мақсат',
129
134
  },
130
135
  // date-related texts
131
136
  date: {
@@ -126,6 +126,11 @@ export default {
126
126
  column: 'Kolumna | Kolumny',
127
127
  notification: 'Powiadomienie | Powiadomienia',
128
128
  screencast: 'Nagranie ekranu',
129
+ extension: 'Rozszerzenie',
130
+ password: 'Hasło',
131
+ number: 'Numer',
132
+ expireAt: 'Wygasa',
133
+ destination: 'Cel',
129
134
  },
130
135
  // date-related texts
131
136
  date: {
@@ -126,6 +126,11 @@ export default {
126
126
  column: 'Coloană | Coloane',
127
127
  notification: 'Notificare | Notificări',
128
128
  screencast: 'Înregistrare ecran',
129
+ extension: 'Extensie',
130
+ password: 'Parolă',
131
+ number: 'Număr',
132
+ expireAt: 'Expiră la',
133
+ destination: 'Destinație',
129
134
  },
130
135
  // date-related texts
131
136
  date: {
@@ -125,6 +125,11 @@ export default {
125
125
  contact: 'Контакт | Контакты',
126
126
  notification: 'Уведомление | Уведомления',
127
127
  screencast: 'Запись экрана',
128
+ extension: 'Расширение',
129
+ password: 'Пароль',
130
+ number: 'Номер',
131
+ expireAt: 'Истекает',
132
+ destination: 'Назначение',
128
133
  },
129
134
  // date-related texts
130
135
  date: {
@@ -125,6 +125,11 @@ export default {
125
125
  contact: 'Контакт | Контакти',
126
126
  notification: 'Сповіщення',
127
127
  screencast: 'Запис екрану',
128
+ extension: 'Розширення',
129
+ password: 'Пароль',
130
+ number: 'Номер',
131
+ expireAt: 'Закінчується',
132
+ destination: 'Призначення',
128
133
  },
129
134
  // date-related texts
130
135
  date: {
@@ -126,6 +126,12 @@ export default {
126
126
  column: 'Ustun | Ustunlar',
127
127
  notification: 'Bildirishnoma | Bildirishnomalar',
128
128
  screencast: 'Ekran yozuvi',
129
+ extension: 'Kengaytma',
130
+ password: 'Parol',
131
+ number: 'Raqam',
132
+ expireAt: 'Muddati',
133
+ destination: 'Manzil',
134
+
129
135
  },
130
136
  // date-related texts
131
137
  date: {
@@ -125,7 +125,12 @@ export default {
125
125
  contact: 'Liên hệ | Các liên hệ',
126
126
  column: 'Cột | Các cột',
127
127
  notification: 'Thông báo | Các thông báo',
128
- screencast: 'Ekran yozuvi',
128
+ screencast: 'Ghi màn hình',
129
+ extension: 'Mở rộng',
130
+ password: 'Mật khẩu',
131
+ number: 'Số',
132
+ expireAt: 'Hết hạn',
133
+ destination: 'Điểm đến',
129
134
  },
130
135
  // date-related texts
131
136
  date: {
@@ -1,5 +1,6 @@
1
1
  import type { DataTableProps } from 'primevue';
2
2
  import type { WtTableHeader } from './types/WtTable';
3
+ import { VirtualScrollerLazyEvent } from 'primevue/virtualscroller';
3
4
  interface Props extends DataTableProps {
4
5
  /**
5
6
  * 'Accepts list of header objects. Draws text depending on "text" property, looks for data values through "value", "show" boolean controls visibility of a column (if undefined, all visible by default). ' Column width is calculated by "width" param. By default, sets 140px. '
@@ -46,6 +47,10 @@ interface Props extends DataTableProps {
46
47
  resizableColumns?: boolean;
47
48
  reorderableColumns?: boolean;
48
49
  rowExpansionDisabled?: (row: object) => boolean;
50
+ lazy?: boolean;
51
+ onLoading?: (event: VirtualScrollerLazyEvent) => Promise<any>;
52
+ loading?: boolean;
53
+ itemSize?: number | undefined;
49
54
  }
50
55
  declare const emit: (event: "sort" | "update:selected" | "reorder:row" | "column-resize" | "column-reorder", ...args: any[]) => void;
51
56
  declare const tableKey: import("vue").Ref<number, number>;
@@ -73,6 +78,12 @@ declare const columnResize: ({ element }: {
73
78
  declare const columnReorder: () => void;
74
79
  declare const isRowExpanded: (row: any) => boolean;
75
80
  declare const toggleRow: (row: any) => void;
81
+ declare const virtualScroll: import("vue").ComputedRef<{
82
+ lazy: true;
83
+ onLazyLoad: (event: VirtualScrollerLazyEvent) => Promise<any>;
84
+ itemSize: number;
85
+ numToleratedItems: number;
86
+ }>;
76
87
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
77
88
  declare var __VLS_68: string, __VLS_69: {
78
89
  index: any;
@@ -115,6 +126,7 @@ declare const __VLS_self: import("vue").DefineComponent<Props, {
115
126
  columnReorder: typeof columnReorder;
116
127
  isRowExpanded: typeof isRowExpanded;
117
128
  toggleRow: typeof toggleRow;
129
+ virtualScroll: typeof virtualScroll;
118
130
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
119
131
  sort: (...args: any[]) => void;
120
132
  "update:selected": (...args: any[]) => void;
@@ -130,6 +142,7 @@ declare const __VLS_self: import("vue").DefineComponent<Props, {
130
142
  }>, {
131
143
  headers: WtTableHeader[];
132
144
  data: Array<unknown>;
145
+ lazy: boolean;
133
146
  sortable: boolean;
134
147
  selectable: boolean;
135
148
  gridActions: boolean;
@@ -145,6 +158,7 @@ declare const __VLS_self: import("vue").DefineComponent<Props, {
145
158
  resizableColumns: boolean;
146
159
  reorderableColumns: boolean;
147
160
  rowExpansionDisabled: (row: object) => boolean;
161
+ itemSize: number | undefined;
148
162
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
149
163
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
150
164
  sort: (...args: any[]) => void;
@@ -161,6 +175,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
161
175
  }>, {
162
176
  headers: WtTableHeader[];
163
177
  data: Array<unknown>;
178
+ lazy: boolean;
164
179
  sortable: boolean;
165
180
  selectable: boolean;
166
181
  gridActions: boolean;
@@ -176,6 +191,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
176
191
  resizableColumns: boolean;
177
192
  reorderableColumns: boolean;
178
193
  rowExpansionDisabled: (row: object) => boolean;
194
+ itemSize: number | undefined;
179
195
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
180
196
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
181
197
  export default _default;
@@ -101,6 +101,11 @@ declare const _default: {
101
101
  column: string;
102
102
  notification: string;
103
103
  screencast: string;
104
+ extension: string;
105
+ password: string;
106
+ number: string;
107
+ expireAt: string;
108
+ destination: string;
104
109
  };
105
110
  date: {
106
111
  sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;
@@ -102,6 +102,11 @@ declare const _default: import("vue-i18n").I18n<{
102
102
  column: string;
103
103
  notification: string;
104
104
  screencast: string;
105
+ extension: string;
106
+ password: string;
107
+ number: string;
108
+ expireAt: string;
109
+ destination: string;
105
110
  };
106
111
  date: {
107
112
  sec: string;
@@ -838,6 +843,11 @@ declare const _default: import("vue-i18n").I18n<{
838
843
  column: string;
839
844
  notification: string;
840
845
  screencast: string;
846
+ extension: string;
847
+ password: string;
848
+ number: string;
849
+ expireAt: string;
850
+ destination: string;
841
851
  };
842
852
  date: {
843
853
  sec: string;
@@ -1701,6 +1711,11 @@ declare const _default: import("vue-i18n").I18n<{
1701
1711
  contact: string;
1702
1712
  notification: string;
1703
1713
  screencast: string;
1714
+ extension: string;
1715
+ password: string;
1716
+ number: string;
1717
+ expireAt: string;
1718
+ destination: string;
1704
1719
  };
1705
1720
  date: {
1706
1721
  sec: string;
@@ -2566,6 +2581,11 @@ declare const _default: import("vue-i18n").I18n<{
2566
2581
  column: string;
2567
2582
  notification: string;
2568
2583
  screencast: string;
2584
+ extension: string;
2585
+ password: string;
2586
+ number: string;
2587
+ expireAt: string;
2588
+ destination: string;
2569
2589
  };
2570
2590
  date: {
2571
2591
  sec: string;
@@ -3429,6 +3449,11 @@ declare const _default: import("vue-i18n").I18n<{
3429
3449
  contact: string;
3430
3450
  notification: string;
3431
3451
  screencast: string;
3452
+ extension: string;
3453
+ password: string;
3454
+ number: string;
3455
+ expireAt: string;
3456
+ destination: string;
3432
3457
  };
3433
3458
  date: {
3434
3459
  sec: string;
@@ -4294,6 +4319,11 @@ declare const _default: import("vue-i18n").I18n<{
4294
4319
  column: string;
4295
4320
  notification: string;
4296
4321
  screencast: string;
4322
+ extension: string;
4323
+ password: string;
4324
+ number: string;
4325
+ expireAt: string;
4326
+ destination: string;
4297
4327
  };
4298
4328
  date: {
4299
4329
  sec: string;
@@ -5159,6 +5189,11 @@ declare const _default: import("vue-i18n").I18n<{
5159
5189
  column: string;
5160
5190
  notification: string;
5161
5191
  screencast: string;
5192
+ extension: string;
5193
+ password: string;
5194
+ number: string;
5195
+ expireAt: string;
5196
+ destination: string;
5162
5197
  };
5163
5198
  date: {
5164
5199
  sec: string;
@@ -6024,6 +6059,11 @@ declare const _default: import("vue-i18n").I18n<{
6024
6059
  column: string;
6025
6060
  notification: string;
6026
6061
  screencast: string;
6062
+ extension: string;
6063
+ password: string;
6064
+ number: string;
6065
+ expireAt: string;
6066
+ destination: string;
6027
6067
  };
6028
6068
  date: {
6029
6069
  sec: string;
@@ -6889,6 +6929,11 @@ declare const _default: import("vue-i18n").I18n<{
6889
6929
  column: string;
6890
6930
  notification: string;
6891
6931
  screencast: string;
6932
+ extension: string;
6933
+ password: string;
6934
+ number: string;
6935
+ expireAt: string;
6936
+ destination: string;
6892
6937
  };
6893
6938
  date: {
6894
6939
  sec: string;
@@ -112,6 +112,11 @@ export declare const messages: {
112
112
  column: string;
113
113
  notification: string;
114
114
  screencast: string;
115
+ extension: string;
116
+ password: string;
117
+ number: string;
118
+ expireAt: string;
119
+ destination: string;
115
120
  };
116
121
  date: {
117
122
  sec: string;
@@ -848,6 +853,11 @@ export declare const messages: {
848
853
  column: string;
849
854
  notification: string;
850
855
  screencast: string;
856
+ extension: string;
857
+ password: string;
858
+ number: string;
859
+ expireAt: string;
860
+ destination: string;
851
861
  };
852
862
  date: {
853
863
  sec: string;
@@ -1711,6 +1721,11 @@ export declare const messages: {
1711
1721
  contact: string;
1712
1722
  notification: string;
1713
1723
  screencast: string;
1724
+ extension: string;
1725
+ password: string;
1726
+ number: string;
1727
+ expireAt: string;
1728
+ destination: string;
1714
1729
  };
1715
1730
  date: {
1716
1731
  sec: string;
@@ -2576,6 +2591,11 @@ export declare const messages: {
2576
2591
  column: string;
2577
2592
  notification: string;
2578
2593
  screencast: string;
2594
+ extension: string;
2595
+ password: string;
2596
+ number: string;
2597
+ expireAt: string;
2598
+ destination: string;
2579
2599
  };
2580
2600
  date: {
2581
2601
  sec: string;
@@ -3439,6 +3459,11 @@ export declare const messages: {
3439
3459
  contact: string;
3440
3460
  notification: string;
3441
3461
  screencast: string;
3462
+ extension: string;
3463
+ password: string;
3464
+ number: string;
3465
+ expireAt: string;
3466
+ destination: string;
3442
3467
  };
3443
3468
  date: {
3444
3469
  sec: string;
@@ -4304,6 +4329,11 @@ export declare const messages: {
4304
4329
  column: string;
4305
4330
  notification: string;
4306
4331
  screencast: string;
4332
+ extension: string;
4333
+ password: string;
4334
+ number: string;
4335
+ expireAt: string;
4336
+ destination: string;
4307
4337
  };
4308
4338
  date: {
4309
4339
  sec: string;
@@ -5169,6 +5199,11 @@ export declare const messages: {
5169
5199
  column: string;
5170
5200
  notification: string;
5171
5201
  screencast: string;
5202
+ extension: string;
5203
+ password: string;
5204
+ number: string;
5205
+ expireAt: string;
5206
+ destination: string;
5172
5207
  };
5173
5208
  date: {
5174
5209
  sec: string;
@@ -6034,6 +6069,11 @@ export declare const messages: {
6034
6069
  column: string;
6035
6070
  notification: string;
6036
6071
  screencast: string;
6072
+ extension: string;
6073
+ password: string;
6074
+ number: string;
6075
+ expireAt: string;
6076
+ destination: string;
6037
6077
  };
6038
6078
  date: {
6039
6079
  sec: string;
@@ -6899,6 +6939,11 @@ export declare const messages: {
6899
6939
  column: string;
6900
6940
  notification: string;
6901
6941
  screencast: string;
6942
+ extension: string;
6943
+ password: string;
6944
+ number: string;
6945
+ expireAt: string;
6946
+ destination: string;
6902
6947
  };
6903
6948
  date: {
6904
6949
  sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;
@@ -104,6 +104,11 @@ declare namespace _default {
104
104
  let contact: string;
105
105
  let notification: string;
106
106
  let screencast: string;
107
+ let extension: string;
108
+ let password: string;
109
+ let number: string;
110
+ let expireAt: string;
111
+ let destination: string;
107
112
  }
108
113
  export namespace date {
109
114
  let sec: string;
@@ -104,6 +104,11 @@ declare namespace _default {
104
104
  let contact: string;
105
105
  let notification: string;
106
106
  let screencast: string;
107
+ let extension: string;
108
+ let password: string;
109
+ let number: string;
110
+ let expireAt: string;
111
+ let destination: string;
107
112
  }
108
113
  export namespace date {
109
114
  let sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;
@@ -106,6 +106,11 @@ declare namespace _default {
106
106
  let column: string;
107
107
  let notification: string;
108
108
  let screencast: string;
109
+ let extension: string;
110
+ let password: string;
111
+ let number: string;
112
+ let expireAt: string;
113
+ let destination: string;
109
114
  }
110
115
  export namespace date {
111
116
  let sec: string;