@webitel/ui-sdk 25.10.16 → 25.10.18

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.16",
3
+ "version": "25.10.18",
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",
@@ -56,7 +56,7 @@
56
56
  "@vuepic/vue-datepicker": "^4.5.1",
57
57
  "@vueuse/components": "^13.0.0",
58
58
  "@webitel/api-services": "^0.0.44",
59
- "@webitel/styleguide": "^24.12.64",
59
+ "@webitel/styleguide": "^24.12.65",
60
60
  "autosize": "^6.0.1",
61
61
  "axios": "^1.8.3",
62
62
  "clipboard-copy": "^4.0.1",
@@ -3,13 +3,9 @@ import { Client } from 'webitel-sdk';
3
3
 
4
4
  import eventBus from '../../scripts/eventBus.js';
5
5
  import { endpoint, getConfig } from './config.js';
6
+ import { WebSocketClientEvent } from './enums/WebSocketClientEvent';
6
7
  import websocketErrorEventHandler from './websocketErrorEventHandler.js';
7
8
 
8
- const WebSocketClientEvent = Object.freeze({
9
- AFTER_AUTH: 'afterAuth',
10
- ERROR: 'error',
11
- });
12
-
13
9
  class WebSocketClientController {
14
10
  cli = null;
15
11
  Event = WebSocketClientEvent;
@@ -0,0 +1,7 @@
1
+ export const WebSocketClientEvent = {
2
+ AFTER_AUTH: 'afterAuth',
3
+ ERROR: 'error',
4
+ } as const;
5
+
6
+ export type WebSocketClientEvent =
7
+ (typeof WebSocketClientEvent)[keyof typeof WebSocketClientEvent];
@@ -6,14 +6,14 @@
6
6
  <div ref="intersectionTarget" />
7
7
  </template>
8
8
 
9
- <script setup>
9
+ <script setup lang="ts">
10
10
  import { useIntersectionObserver } from '@vueuse/core';
11
11
  import { onMounted, onUnmounted, ref } from 'vue';
12
12
 
13
13
  const props = defineProps({
14
- next: {
15
- type: Function,
16
- required: true,
14
+ canLoadMore: {
15
+ type: Boolean,
16
+ default: true
17
17
  },
18
18
  loading: {
19
19
  type: Boolean,
@@ -36,7 +36,7 @@ onMounted(() => {
36
36
  const { stop } = useIntersectionObserver(
37
37
  intersectionTarget.value,
38
38
  ([{ isIntersecting }]) => {
39
- if (isIntersecting && props.next) {
39
+ if (isIntersecting && props.canLoadMore) {
40
40
  emit('next');
41
41
  }
42
42
  },
@@ -3,10 +3,10 @@
3
3
  --page-wrapper-section-padding: var(--spacing-sm);
4
4
  --page-wrapper-section-gap: var(--spacing-sm);
5
5
 
6
- --wt-page-wrapper-background-color: var(--grey-lighten-5);
6
+ --wt-page-wrapper-background-color: var(--p-surface-50);
7
7
  --wt-page-wrapper-content-wrapper-color: var(--content-wrapper-color);
8
8
  }
9
9
 
10
10
  :root.theme--dark {
11
- --wt-page-wrapper-background-color: var(--grey-darken-4);
11
+ --wt-page-wrapper-background-color: var(--p-surface-850);
12
12
  }
@@ -8,6 +8,7 @@
8
8
  :row-style="rowStyle"
9
9
  lazy
10
10
  scrollable
11
+ :resizable-columns="resizableColumns"
11
12
  scroll-height="flex"
12
13
  @sort="sort"
13
14
  @row-reorder="({dragIndex, dropIndex}) => emit('reorder:row', { oldIndex: dragIndex, newIndex: dropIndex })"
@@ -190,6 +191,7 @@ interface Props extends DataTableProps{
190
191
  isRowReorderDisabled?: (row) => boolean;
191
192
  rowClass?: () => string;
192
193
  rowStyle?: () => { [key: string]: string };
194
+ resizableColumns?: boolean;
193
195
  }
194
196
 
195
197
  const props = withDefaults(defineProps<Props>(), {
@@ -204,6 +206,7 @@ const props = withDefaults(defineProps<Props>(), {
204
206
  isRowReorderDisabled: () => false,
205
207
  rowClass: () => '',
206
208
  rowStyle: () => ({}),
209
+ resizableColumns: false
207
210
  });
208
211
 
209
212
  const { t } = useI18n();
@@ -343,6 +346,7 @@ const handleSelection = (row, select) => {
343
346
  @extend %typo-body-1;
344
347
  display: flex;
345
348
  align-items: center;
349
+ position: relative;
346
350
  }
347
351
 
348
352
  .wt-table__td__actions {
@@ -6,11 +6,23 @@ const table = {
6
6
 
7
7
  // Rewrite the default table styles in the theme here:
8
8
  // For customize the table styles you need write css styles for classes
9
- css: () => `
9
+ css: ({ dt }) => `
10
10
  .p-datatable-table-container {
11
11
  width: 100%;
12
12
  }
13
13
 
14
+ .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead {
15
+ background: transparent;
16
+ }
17
+
18
+ .p-datatable-tbody > tr:hover {
19
+ background: ${dt('datatable.row.hoverBackground')};
20
+ }
21
+
22
+ .p-datatable-scrollable .p-datatable-frozen-column:not(.p-datatable-header-cell) {
23
+ background: ${dt('datatable.frozenColumn.background')};
24
+ }
25
+
14
26
  .p-datatable-tbody > tr > td {
15
27
  word-break: break-all;
16
28
  overflow-wrap: break-word;
@@ -20,6 +32,10 @@ const table = {
20
32
  .p-datatable-thead > tr > th {
21
33
  overflow: hidden;
22
34
  }
35
+
36
+ .p-datatable-column-resizer {
37
+ background: ${dt('datatable.columnResizer.background')};
38
+ }
23
39
  `,
24
40
  };
25
41
 
@@ -1,10 +1,10 @@
1
1
  import { Client } from 'webitel-sdk';
2
2
  declare class WebSocketClientController {
3
3
  cli: any;
4
- Event: Readonly<{
5
- AFTER_AUTH: "afterAuth";
6
- ERROR: "error";
7
- }>;
4
+ Event: {
5
+ readonly AFTER_AUTH: "afterAuth";
6
+ readonly ERROR: "error";
7
+ };
8
8
  _config: {};
9
9
  _on: {
10
10
  error: ((error: any) => any)[];
@@ -0,0 +1,5 @@
1
+ export declare const WebSocketClientEvent: {
2
+ readonly AFTER_AUTH: "afterAuth";
3
+ readonly ERROR: "error";
4
+ };
5
+ export type WebSocketClientEvent = (typeof WebSocketClientEvent)[keyof typeof WebSocketClientEvent];
@@ -1,10 +1,27 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- $emit: (event: "next", ...args: any[]) => void;
3
- next: Function;
4
- loading: boolean;
5
- $props: {
6
- readonly next?: Function;
7
- readonly loading?: boolean;
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ canLoadMore: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ loading: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ next: (...args: any[]) => void;
12
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ canLoadMore: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
8
16
  };
9
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
17
+ loading: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ }>> & Readonly<{
22
+ onNext?: (...args: any[]) => any;
23
+ }>, {
24
+ loading: boolean;
25
+ canLoadMore: boolean;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
27
  export default _default;
@@ -42,6 +42,7 @@ interface Props extends DataTableProps {
42
42
  rowStyle?: () => {
43
43
  [key: string]: string;
44
44
  };
45
+ resizableColumns?: boolean;
45
46
  }
46
47
  declare const emit: (event: "sort" | "update:selected" | "reorder:row", ...args: any[]) => void;
47
48
  declare const _selected: import("vue").ComputedRef<unknown[]>;
@@ -115,6 +116,7 @@ declare const __VLS_self: import("vue").DefineComponent<Props, {
115
116
  rowStyle: () => {
116
117
  [key: string]: string;
117
118
  };
119
+ resizableColumns: boolean;
118
120
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
119
121
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
120
122
  sort: (...args: any[]) => void;
@@ -138,6 +140,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
138
140
  rowStyle: () => {
139
141
  [key: string]: string;
140
142
  };
143
+ resizableColumns: boolean;
141
144
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
142
145
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
143
146
  export default _default;
@@ -86,6 +86,12 @@ declare const table: {
86
86
  color: string;
87
87
  hoverColor: string;
88
88
  };
89
+ frozenColumn: {
90
+ background: string;
91
+ };
92
+ columnResizer: {
93
+ background: string;
94
+ };
89
95
  };
90
96
  dark: {
91
97
  root: {
@@ -172,9 +178,17 @@ declare const table: {
172
178
  color: string;
173
179
  hoverColor: string;
174
180
  };
181
+ frozenColumn: {
182
+ background: string;
183
+ };
184
+ columnResizer: {
185
+ background: string;
186
+ };
175
187
  };
176
188
  };
177
- css: () => string;
189
+ css: ({ dt }: {
190
+ dt: any;
191
+ }) => string;
178
192
  root: {
179
193
  transitionDuration: string;
180
194
  };