@ironsource/shared-ui 1.4.3-rc.3 → 1.4.3-rc.5

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 (33) hide show
  1. package/Editable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  2. package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  3. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  4. package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  5. package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  6. package/components/button/index.d.ts +6 -6
  7. package/components/dateRange/consts.d.ts +5 -0
  8. package/components/dateRange/consts.vue.js +8 -0
  9. package/components/dateRange/index.d.ts +3 -3
  10. package/components/emptyState/index.d.ts +3 -3
  11. package/components/icon/Icon.vue.js +1 -0
  12. package/components/icon/icons/TableEdit.vue.d.ts +2 -0
  13. package/components/icon/icons/TableEdit.vue.js +24 -0
  14. package/components/icon/icons/index.d.ts +3 -3
  15. package/components/icon/icons/index.vue.js +3 -3
  16. package/components/icon/index.d.ts +3 -3
  17. package/components/includeExclude/IncludeExclude.vue.js +2 -2
  18. package/components/includeExclude/IncludeExcludeAppHeader.vue.js +7 -4
  19. package/components/includeExclude/IncludeExcludeChipFilter.vue.js +6 -4
  20. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +125 -0
  21. package/components/includeExclude/IncludeExcludeDragDrop.vue.js +610 -0
  22. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +43 -0
  23. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.js +126 -0
  24. package/components/includeExclude/includeExcludeMocks.d.ts +12 -0
  25. package/components/includeExclude/index.d.ts +228 -7
  26. package/components/includeExclude/index.vue.js +6 -0
  27. package/components/table/Table.types.d.ts +1 -0
  28. package/components/table/Table.vue.d.ts +13 -0
  29. package/components/table/Table.vue.js +33 -11
  30. package/components/table/index.d.ts +25 -0
  31. package/components/table-cells/Editable.vue.js +1 -1
  32. package/index.vue.js +3 -1
  33. package/package.json +3 -2
@@ -0,0 +1,126 @@
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, unref, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createVNode, withCtx, createTextVNode, toDisplayString, createBlock, withModifiers } from 'vue';
2
+ /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
3
+ import Text from '../typography/Text.vue.js';
4
+ import { useIncludeExcludeContext } from './IncludeExcludeContext.vue.js';
5
+ import { useId } from '../../composables/useId.vue.js';
6
+ import _sfc_main$1 from '../tooltip/Tooltip.vue.js';
7
+ import Icon from '../icon/Icon.vue.js';
8
+ /* empty css */
9
+ import "../../IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css";
10
+ const _hoisted_1 = ["id"];
11
+ const _hoisted_2 = {
12
+ key: 0,
13
+ class: "image"
14
+ };
15
+ const _hoisted_3 = {
16
+ key: 1,
17
+ class: "start-icon"
18
+ };
19
+ const _hoisted_4 = { class: "text-container" };
20
+ const _hoisted_5 = { key: 0 };
21
+ const _sfc_main = /* @__PURE__ */ defineComponent({
22
+ __name: "IncludeExcludeOptionDraggable",
23
+ props: {
24
+ option: null,
25
+ subtitle: { default: "" },
26
+ disabled: { type: Boolean, default: false },
27
+ clearable: { type: Boolean, default: false },
28
+ titleText: { default: "" }
29
+ },
30
+ setup(__props) {
31
+ const props = __props;
32
+ const api = useIncludeExcludeContext("IncludeExcludeOption");
33
+ const id = useId().value;
34
+ const el = ref(null);
35
+ const isMulti = true;
36
+ const tooltipDelay = 200;
37
+ const active = computed(() => {
38
+ return api.activeIndex.value !== null ? api.activeOption.value === props.option : false;
39
+ });
40
+ const selected = computed(() => {
41
+ return api.selectedOption.value.includes(props.option);
42
+ });
43
+ return (_ctx, _cache) => {
44
+ return openBlock(), createElementBlock("div", {
45
+ id: unref(id).toString(),
46
+ ref_key: "el",
47
+ ref: el,
48
+ class: normalizeClass(["item-container-draggable", {
49
+ "item-container-draggable--disabled": __props.disabled,
50
+ "item-container-draggable--active": unref(active),
51
+ "item-container-draggable--selected": unref(selected),
52
+ "item-container-draggable--multi": isMulti,
53
+ "item-container-draggable--two-lines": __props.subtitle?.length
54
+ }])
55
+ }, [
56
+ createElementVNode("div", {
57
+ class: normalizeClass(["item", {
58
+ "item--multi": isMulti,
59
+ "item--with-icon": _ctx.$slots["icon-start"] || _ctx.$slots.image,
60
+ "item--without-icon": !_ctx.$slots["icon-start"] && !_ctx.$slots.image
61
+ }])
62
+ }, [
63
+ _ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_2, [
64
+ renderSlot(_ctx.$slots, "image", {}, void 0, true)
65
+ ])) : createCommentVNode("", true),
66
+ _ctx.$slots["icon-start"] ? (openBlock(), createElementBlock("div", _hoisted_3, [
67
+ renderSlot(_ctx.$slots, "icon-start", {}, void 0, true)
68
+ ])) : createCommentVNode("", true),
69
+ createElementVNode("div", _hoisted_4, [
70
+ createVNode(unref(_sfc_main$1), {
71
+ delay: tooltipDelay,
72
+ text: __props.titleText
73
+ }, {
74
+ default: withCtx(() => [
75
+ createVNode(unref(Text), {
76
+ size: "sm",
77
+ "is-truncated": ""
78
+ }, {
79
+ default: withCtx(() => [
80
+ createTextVNode(toDisplayString(__props.titleText), 1)
81
+ ]),
82
+ _: 1
83
+ })
84
+ ]),
85
+ _: 1
86
+ }, 8, ["text"]),
87
+ createVNode(unref(_sfc_main$1), {
88
+ delay: tooltipDelay,
89
+ text: __props.subtitle
90
+ }, {
91
+ default: withCtx(() => [
92
+ __props.subtitle ? (openBlock(), createBlock(unref(Text), {
93
+ key: 0,
94
+ class: "subtitle",
95
+ size: "caption",
96
+ "is-truncated": ""
97
+ }, {
98
+ default: withCtx(() => [
99
+ createTextVNode(toDisplayString(__props.subtitle), 1)
100
+ ]),
101
+ _: 1
102
+ })) : createCommentVNode("", true)
103
+ ]),
104
+ _: 1
105
+ }, 8, ["text"])
106
+ ])
107
+ ], 2),
108
+ __props.clearable && unref(selected) ? (openBlock(), createElementBlock("div", _hoisted_5, [
109
+ createElementVNode("button", {
110
+ class: "clear-button",
111
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(api).removeSelection(__props.option), ["prevent", "stop"]))
112
+ }, [
113
+ createVNode(unref(Icon), {
114
+ "font-size": "sm",
115
+ size: "sm",
116
+ name: "close-bold"
117
+ })
118
+ ])
119
+ ])) : createCommentVNode("", true)
120
+ ], 10, _hoisted_1);
121
+ };
122
+ }
123
+ });
124
+ var IncludeExcludeOptionDraggable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cc2c8ff8"]]);
125
+
126
+ export { IncludeExcludeOptionDraggable as default };
@@ -18,8 +18,20 @@ export type Platform = {
18
18
  name: string;
19
19
  icon: string;
20
20
  };
21
+ export type groupOption = {
22
+ childOptionsIds: string[];
23
+ isCollapse: boolean;
24
+ };
25
+ export type EditColumns = {
26
+ name: string;
27
+ titleText: string;
28
+ icon: string;
29
+ disabled: boolean;
30
+ groupOption: groupOption;
31
+ };
21
32
  export declare const apps: readonly Application[];
22
33
  /** used to test performance (756 apps) */
23
34
  export declare const applications: readonly Application[];
24
35
  export declare const countries: readonly Country[];
25
36
  export declare const platform: readonly Platform[];
37
+ export declare const editColumns: readonly EditColumns[];
@@ -1,5 +1,7 @@
1
1
  import IncludeExclude from './IncludeExclude.vue';
2
+ import IncludeExcludeDragDrop from './IncludeExcludeDragDrop.vue';
2
3
  import IncludeExcludeOption from './IncludeExcludeOption.vue';
4
+ import IncludeExcludeOptionDraggable from './IncludeExcludeOptionDraggable.vue';
3
5
  import IncludeExcludeAppTrigger from './IncludeExcludeAppTrigger.vue';
4
6
  import IncludeExcludeAppHeader from './IncludeExcludeAppHeader.vue';
5
7
  import IncludeExcludeChipFilter from './IncludeExcludeChipFilter.vue';
@@ -217,22 +219,171 @@ declare const IncludeExcludeTypes: () => (import("vue").DefineComponent<{
217
219
  distanceOffset: number;
218
220
  skiddingOffset: number;
219
221
  }> | import("vue").DefineComponent<{
220
- option: {
222
+ loading: {
223
+ type: import("vue").PropType<boolean>;
224
+ } & {
225
+ default: boolean;
226
+ };
227
+ placement: {
228
+ type: import("vue").PropType<import("floating-vue").Placement>;
229
+ } & {
230
+ default: string;
231
+ };
232
+ disabled: {
233
+ type: import("vue").PropType<boolean>;
234
+ } & {
235
+ default: boolean;
236
+ };
237
+ options: {
238
+ type: import("vue").PropType<unknown[]>;
239
+ required: true;
240
+ };
241
+ modelValue: {
221
242
  type: import("vue").PropType<unknown>;
222
243
  required: true;
223
244
  };
245
+ searchPlaceholder: {
246
+ type: import("vue").PropType<string>;
247
+ } & {
248
+ default: string;
249
+ };
250
+ isOnTop: {
251
+ type: import("vue").PropType<boolean>;
252
+ } & {
253
+ default: boolean;
254
+ };
255
+ distance: {
256
+ type: import("vue").PropType<number>;
257
+ } & {
258
+ default: number;
259
+ };
260
+ autoFocus: {
261
+ type: import("vue").PropType<boolean>;
262
+ } & {
263
+ default: boolean;
264
+ };
265
+ defaultOpen: {
266
+ type: import("vue").PropType<boolean>;
267
+ } & {
268
+ default: boolean;
269
+ };
270
+ clearable: {
271
+ type: import("vue").PropType<boolean>;
272
+ };
273
+ onSearch: {
274
+ type: import("vue").PropType<(option: any, term: string) => boolean>;
275
+ } & {
276
+ default: () => true;
277
+ };
278
+ hasSubtitle: {
279
+ type: import("vue").PropType<boolean>;
280
+ } & {
281
+ default: boolean;
282
+ };
283
+ titleText: {
284
+ type: import("vue").PropType<string>;
285
+ } & {
286
+ default: string;
287
+ };
288
+ showClearAll: {
289
+ type: import("vue").PropType<boolean>;
290
+ } & {
291
+ default: boolean;
292
+ };
293
+ alwayesOpen: {
294
+ type: import("vue").PropType<boolean>;
295
+ } & {
296
+ default: boolean;
297
+ };
298
+ distanceOffset: {
299
+ type: import("vue").PropType<number>;
300
+ } & {
301
+ default: number;
302
+ };
303
+ skiddingOffset: {
304
+ type: import("vue").PropType<number>;
305
+ } & {
306
+ default: number;
307
+ };
308
+ keyField: {
309
+ type: import("vue").PropType<string>;
310
+ required: true;
311
+ };
312
+ isDraggable: {
313
+ type: import("vue").PropType<boolean>;
314
+ } & {
315
+ default: boolean;
316
+ };
317
+ draggableArgs: {
318
+ type: import("vue").PropType<object>;
319
+ } & {
320
+ default: any;
321
+ };
322
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
323
+ "update:modelValue": (value: unknown) => void;
324
+ } & {
325
+ changeDragDrop: (value: unknown) => void;
326
+ } & {
327
+ clickOutside: (value: unknown) => void;
328
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
329
+ loading: {
330
+ type: import("vue").PropType<boolean>;
331
+ } & {
332
+ default: boolean;
333
+ };
334
+ placement: {
335
+ type: import("vue").PropType<import("floating-vue").Placement>;
336
+ } & {
337
+ default: string;
338
+ };
224
339
  disabled: {
225
340
  type: import("vue").PropType<boolean>;
226
341
  } & {
227
342
  default: boolean;
228
343
  };
229
- subtitle: {
344
+ options: {
345
+ type: import("vue").PropType<unknown[]>;
346
+ required: true;
347
+ };
348
+ modelValue: {
349
+ type: import("vue").PropType<unknown>;
350
+ required: true;
351
+ };
352
+ searchPlaceholder: {
230
353
  type: import("vue").PropType<string>;
231
354
  } & {
232
355
  default: string;
233
356
  };
357
+ isOnTop: {
358
+ type: import("vue").PropType<boolean>;
359
+ } & {
360
+ default: boolean;
361
+ };
362
+ distance: {
363
+ type: import("vue").PropType<number>;
364
+ } & {
365
+ default: number;
366
+ };
367
+ autoFocus: {
368
+ type: import("vue").PropType<boolean>;
369
+ } & {
370
+ default: boolean;
371
+ };
372
+ defaultOpen: {
373
+ type: import("vue").PropType<boolean>;
374
+ } & {
375
+ default: boolean;
376
+ };
234
377
  clearable: {
235
378
  type: import("vue").PropType<boolean>;
379
+ };
380
+ onSearch: {
381
+ type: import("vue").PropType<(option: any, term: string) => boolean>;
382
+ } & {
383
+ default: () => true;
384
+ };
385
+ hasSubtitle: {
386
+ type: import("vue").PropType<boolean>;
236
387
  } & {
237
388
  default: boolean;
238
389
  };
@@ -241,12 +392,63 @@ declare const IncludeExcludeTypes: () => (import("vue").DefineComponent<{
241
392
  } & {
242
393
  default: string;
243
394
  };
244
- showCheckbox: {
395
+ showClearAll: {
245
396
  type: import("vue").PropType<boolean>;
246
397
  } & {
247
398
  default: boolean;
248
399
  };
249
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
400
+ alwayesOpen: {
401
+ type: import("vue").PropType<boolean>;
402
+ } & {
403
+ default: boolean;
404
+ };
405
+ distanceOffset: {
406
+ type: import("vue").PropType<number>;
407
+ } & {
408
+ default: number;
409
+ };
410
+ skiddingOffset: {
411
+ type: import("vue").PropType<number>;
412
+ } & {
413
+ default: number;
414
+ };
415
+ keyField: {
416
+ type: import("vue").PropType<string>;
417
+ required: true;
418
+ };
419
+ isDraggable: {
420
+ type: import("vue").PropType<boolean>;
421
+ } & {
422
+ default: boolean;
423
+ };
424
+ draggableArgs: {
425
+ type: import("vue").PropType<object>;
426
+ } & {
427
+ default: any;
428
+ };
429
+ }>> & {
430
+ "onUpdate:modelValue"?: (value: unknown) => any;
431
+ onClickOutside?: (value: unknown) => any;
432
+ onChangeDragDrop?: (value: unknown) => any;
433
+ }, {
434
+ loading: boolean;
435
+ placement: import("floating-vue").Placement;
436
+ disabled: boolean;
437
+ searchPlaceholder: string;
438
+ isOnTop: boolean;
439
+ distance: number;
440
+ autoFocus: boolean;
441
+ defaultOpen: boolean;
442
+ onSearch: (option: any, term: string) => boolean;
443
+ hasSubtitle: boolean;
444
+ titleText: string;
445
+ showClearAll: boolean;
446
+ alwayesOpen: boolean;
447
+ distanceOffset: number;
448
+ skiddingOffset: number;
449
+ isDraggable: boolean;
450
+ draggableArgs: object;
451
+ }> | import("vue").DefineComponent<{
250
452
  option: {
251
453
  type: import("vue").PropType<unknown>;
252
454
  required: true;
@@ -271,17 +473,36 @@ declare const IncludeExcludeTypes: () => (import("vue").DefineComponent<{
271
473
  } & {
272
474
  default: string;
273
475
  };
274
- showCheckbox: {
476
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
477
+ option: {
478
+ type: import("vue").PropType<unknown>;
479
+ required: true;
480
+ };
481
+ disabled: {
482
+ type: import("vue").PropType<boolean>;
483
+ } & {
484
+ default: boolean;
485
+ };
486
+ subtitle: {
487
+ type: import("vue").PropType<string>;
488
+ } & {
489
+ default: string;
490
+ };
491
+ clearable: {
275
492
  type: import("vue").PropType<boolean>;
276
493
  } & {
277
494
  default: boolean;
278
495
  };
496
+ titleText: {
497
+ type: import("vue").PropType<string>;
498
+ } & {
499
+ default: string;
500
+ };
279
501
  }>>, {
280
502
  disabled: boolean;
281
503
  subtitle: string;
282
504
  clearable: boolean;
283
505
  titleText: string;
284
- showCheckbox: boolean;
285
506
  }> | import("vue").DefineComponent<{
286
507
  loading: {
287
508
  type: import("vue").PropType<boolean>;
@@ -700,4 +921,4 @@ declare const IncludeExcludeTypes: () => (import("vue").DefineComponent<{
700
921
  showImage: boolean;
701
922
  triggerTextFunc: (option: unknown) => string;
702
923
  }>)[];
703
- export { IncludeExclude, IncludeExcludeOption, IncludeExcludeAppTrigger, IncludeExcludeAppHeader, IncludeExcludeChipFilter, IncludeExcludeTypes, };
924
+ export { IncludeExclude, IncludeExcludeDragDrop, IncludeExcludeOption, IncludeExcludeOptionDraggable, IncludeExcludeAppTrigger, IncludeExcludeAppHeader, IncludeExcludeChipFilter, IncludeExcludeTypes, };
@@ -1,7 +1,11 @@
1
1
  import IncludeExclude from './IncludeExclude.vue.js';
2
2
  export { default as IncludeExclude } from './IncludeExclude.vue.js';
3
+ import IncludeExcludeDragDrop from './IncludeExcludeDragDrop.vue.js';
4
+ export { default as IncludeExcludeDragDrop } from './IncludeExcludeDragDrop.vue.js';
3
5
  import IncludeExcludeOption from './IncludeExcludeOption.vue.js';
4
6
  export { default as IncludeExcludeOption } from './IncludeExcludeOption.vue.js';
7
+ import IncludeExcludeOptionDraggable from './IncludeExcludeOptionDraggable.vue.js';
8
+ export { default as IncludeExcludeOptionDraggable } from './IncludeExcludeOptionDraggable.vue.js';
5
9
  import IncludeExcludeAppTrigger from './IncludeExcludeAppTrigger.vue.js';
6
10
  export { default as IncludeExcludeAppTrigger } from './IncludeExcludeAppTrigger.vue.js';
7
11
  import IncludeExcludeAppHeader from './IncludeExcludeAppHeader.vue.js';
@@ -11,7 +15,9 @@ export { default as IncludeExcludeChipFilter } from './IncludeExcludeChipFilter.
11
15
 
12
16
  const IncludeExcludeTypes = () => [
13
17
  IncludeExclude,
18
+ IncludeExcludeDragDrop,
14
19
  IncludeExcludeOption,
20
+ IncludeExcludeOptionDraggable,
15
21
  IncludeExcludeAppTrigger,
16
22
  IncludeExcludeAppHeader,
17
23
  IncludeExcludeChipFilter
@@ -6,6 +6,7 @@ export type Column = {
6
6
  isSortable?: boolean;
7
7
  colSpan?: number;
8
8
  width?: number;
9
+ isTextRight?: boolean;
9
10
  };
10
11
  export type Section = {
11
12
  id: string;
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
6
6
  sections?: Section[];
7
7
  sort: Sort;
8
8
  isSticky?: boolean;
9
+ isStickyHeader?: boolean;
9
10
  isLoading?: boolean;
10
11
  emptyStateTitle?: string;
11
12
  emptyStateSubtitle?: string;
@@ -13,9 +14,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
13
14
  infiniteScrollThreshold?: number;
14
15
  rowHeight?: number | ((index: number) => number);
15
16
  loadingRowCount?: number;
17
+ defaultScrollPosition?: number;
16
18
  testId?: string;
17
19
  }>, {
18
20
  isSticky: boolean;
21
+ isStickyHeader: boolean;
19
22
  sections: any;
20
23
  isLoading: boolean;
21
24
  sortOrder: string;
@@ -25,9 +28,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
25
28
  infiniteScrollThreshold: number;
26
29
  rowHeight: number;
27
30
  loadingRowCount: number;
31
+ defaultScrollPosition: any;
28
32
  testId: string;
29
33
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
34
  "update:sort": (newSort: Sort) => void;
35
+ } & {
36
+ onScroll: (event: Event) => void;
31
37
  } & {
32
38
  saveRow: (payload_0: {
33
39
  value: unknown;
@@ -44,6 +50,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
44
50
  sections?: Section[];
45
51
  sort: Sort;
46
52
  isSticky?: boolean;
53
+ isStickyHeader?: boolean;
47
54
  isLoading?: boolean;
48
55
  emptyStateTitle?: string;
49
56
  emptyStateSubtitle?: string;
@@ -51,9 +58,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
51
58
  infiniteScrollThreshold?: number;
52
59
  rowHeight?: number | ((index: number) => number);
53
60
  loadingRowCount?: number;
61
+ defaultScrollPosition?: number;
54
62
  testId?: string;
55
63
  }>, {
56
64
  isSticky: boolean;
65
+ isStickyHeader: boolean;
57
66
  sections: any;
58
67
  isLoading: boolean;
59
68
  sortOrder: string;
@@ -63,8 +72,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
63
72
  infiniteScrollThreshold: number;
64
73
  rowHeight: number;
65
74
  loadingRowCount: number;
75
+ defaultScrollPosition: any;
66
76
  testId: string;
67
77
  }>>> & {
78
+ onOnScroll?: (event: Event) => any;
68
79
  "onUpdate:sort"?: (newSort: Sort) => any;
69
80
  onSaveRow?: (args_0: {
70
81
  value: unknown;
@@ -77,6 +88,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
77
88
  testId: string;
78
89
  isLoading: boolean;
79
90
  isSticky: boolean;
91
+ isStickyHeader: boolean;
80
92
  sections: Section[];
81
93
  emptyStateTitle: string;
82
94
  emptyStateSubtitle: string;
@@ -84,6 +96,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
84
96
  infiniteScrollThreshold: number;
85
97
  rowHeight: number | ((index: number) => number);
86
98
  loadingRowCount: number;
99
+ defaultScrollPosition: number;
87
100
  }>;
88
101
  export default _default;
89
102
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, unref, ref, provide, computed, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, normalizeClass, Fragment, renderList, createBlock, mergeProps, withDirectives, vShow } from 'vue';
1
+ import { defineComponent, useCssVars, unref, ref, provide, computed, useSlots, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, mergeProps, withDirectives, vShow } from 'vue';
2
2
  import { TableTestIdModifiers } from '../../testids/index.vue.js';
3
3
  /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
4
4
  import Text from '../typography/Text.vue.js';
@@ -32,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  sections: { default: null },
33
33
  sort: null,
34
34
  isSticky: { type: Boolean, default: true },
35
+ isStickyHeader: { type: Boolean, default: false },
35
36
  isLoading: { type: Boolean, default: false },
36
37
  emptyStateTitle: { default: "No results found" },
37
38
  emptyStateSubtitle: { default: "Try again with different filters" },
@@ -39,13 +40,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
40
  infiniteScrollThreshold: { default: 100 },
40
41
  rowHeight: { type: [Number, Function], default: 48 },
41
42
  loadingRowCount: { default: 3 },
43
+ defaultScrollPosition: { default: null },
42
44
  testId: { default: "" }
43
45
  },
44
- emits: ["update:sort", "saveRow", "loadMore"],
46
+ emits: ["update:sort", "onScroll", "saveRow", "loadMore"],
45
47
  setup(__props, { emit }) {
46
48
  const props = __props;
47
49
  useCssVars((_ctx) => ({
48
- "04775a54": unref(gridColumnTemplate)
50
+ "7bbb8810": unref(gridColumnTemplate)
49
51
  }));
50
52
  const savingRows = ref([]);
51
53
  provide(TableContext, {
@@ -65,6 +67,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
67
  });
66
68
  const gridColumnTemplate = computed(() => {
67
69
  return props.columns.reduce((acc, column) => {
70
+ if (column === props.columns[props.columns.length - 1] && column.width) {
71
+ return `${acc} minmax(${column.width}px, 1fr)`;
72
+ }
68
73
  const columnTemplate = column.width ? `${column.width}px` : `${column.colSpan || 1}fr`;
69
74
  return `${acc} ${columnTemplate}`;
70
75
  }, "");
@@ -83,12 +88,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
88
  });
84
89
  const floatingActionRef = ref(null);
85
90
  const floatingActionPosition = ref(0);
91
+ const slots = useSlots();
92
+ const hasSearchSlot = computed(() => !!slots.search);
86
93
  const onScroll = (event) => {
87
94
  containerProps.onScroll();
88
95
  floatingActionPosition.value = event.target.scrollLeft + event.target.getBoundingClientRect().width;
96
+ emit("onScroll", event.target.scrollTop);
89
97
  };
90
98
  onMounted(() => {
91
99
  floatingActionPosition.value = containerProps.ref.value?.getBoundingClientRect().width;
100
+ if (props.defaultScrollPosition) {
101
+ setTimeout(() => {
102
+ containerProps.ref.value.scrollTo({
103
+ top: props.defaultScrollPosition,
104
+ behavior: "smooth"
105
+ });
106
+ }, 300);
107
+ }
92
108
  });
93
109
  const showBackToTopButton = computed(() => {
94
110
  const [firstListItem] = list.value;
@@ -161,11 +177,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
161
177
  }, [
162
178
  __props.title || _ctx.$slots["search"] ? (openBlock(), createElementBlock("div", {
163
179
  key: 0,
164
- class: "table-header",
180
+ class: normalizeClass(["table-header", { isStickyHeader: __props.isStickyHeader }]),
165
181
  "data-testid": `${__props.testId}-${unref(TableTestIdModifiers).HEADER}`
166
182
  }, [
167
183
  createElementVNode("div", {
168
- class: "table-title",
184
+ class: normalizeClass(["table-title", unref(hasSearchSlot) ? "border-search" : ""]),
169
185
  "data-testid": `${__props.testId}-${unref(TableTestIdModifiers).TITLE}`
170
186
  }, [
171
187
  renderSlot(_ctx.$slots, "title", {}, () => [
@@ -179,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
179
195
  _: 1
180
196
  })
181
197
  ], true)
182
- ], 8, _hoisted_4),
198
+ ], 10, _hoisted_4),
183
199
  createElementVNode("div", {
184
200
  class: "table-header-right",
185
201
  "data-testid": `${__props.testId}-${unref(TableTestIdModifiers).HEADER_RIGHT}`
@@ -192,9 +208,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
192
208
  }, [
193
209
  renderSlot(_ctx.$slots, "table-header-actions", {}, void 0, true)
194
210
  ], 8, _hoisted_6)
195
- ], 8, _hoisted_3)) : createCommentVNode("", true),
211
+ ], 10, _hoisted_3)) : createCommentVNode("", true),
196
212
  createElementVNode("thead", {
197
- class: normalizeClass({ sticky: __props.isSticky })
213
+ class: normalizeClass({ sticky: __props.isSticky, isStickyHeader: __props.isStickyHeader })
198
214
  }, [
199
215
  createElementVNode("div", {
200
216
  class: "sections",
@@ -225,7 +241,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
225
241
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
226
242
  return openBlock(), createElementBlock("th", {
227
243
  key: column.id,
228
- class: normalizeClass({ sticky: column.isSticky, bordered: column.isBordered }),
244
+ class: normalizeClass({
245
+ sticky: column.isSticky,
246
+ bordered: column.isBordered,
247
+ isTextRight: column.isTextRight,
248
+ isSortable: column.isSortable
249
+ }),
229
250
  style: normalizeStyle(column.isSticky ? unref(columnsStickyPositions)[column.id] : null),
230
251
  onClick: ($event) => toggleSortOrder(column)
231
252
  }, [
@@ -286,7 +307,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
286
307
  key: cellIndex,
287
308
  class: normalizeClass({
288
309
  sticky: __props.columns[cellIndex].isSticky,
289
- bordered: __props.columns[cellIndex].isBordered
310
+ bordered: __props.columns[cellIndex].isBordered,
311
+ isTextRight: __props.columns[cellIndex].isTextRight
290
312
  }),
291
313
  style: normalizeStyle(
292
314
  __props.columns[cellIndex].isSticky ? unref(columnsStickyPositions)[__props.columns[cellIndex].id] : null
@@ -341,6 +363,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
341
363
  };
342
364
  }
343
365
  });
344
- var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-392e31d7"]]);
366
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-91b0dc76"]]);
345
367
 
346
368
  export { Table as default };