sprintify-ui 0.6.86 → 0.6.88

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.
@@ -13,10 +13,10 @@ declare const _default: import("vue").DefineComponent<{
13
13
  detailed: boolean;
14
14
  hasDetailedVisible: Function;
15
15
  checkable: boolean;
16
- checkedRows: import("@/types/index.js").Row[];
16
+ checkedRows: import("@/index.js").Row[];
17
17
  isRowCheckable: Function;
18
18
  maxHeight: number;
19
- data: import("@/types/index.js").Row[];
19
+ data: import("@/index.js").Row[];
20
20
  visibleColumns: number[];
21
21
  checkboxPosition: "right" | "left";
22
22
  detailTransition: string;
@@ -28,9 +28,9 @@ declare const _default: import("vue").DefineComponent<{
28
28
  readonly detailed: boolean;
29
29
  readonly hasDetailedVisible: Function;
30
30
  readonly checkable: boolean;
31
- readonly checkedRows: import("@/types/index.js").Row[];
31
+ readonly checkedRows: import("@/index.js").Row[];
32
32
  readonly isRowCheckable: Function;
33
- readonly data: import("@/types/index.js").Row[];
33
+ readonly data: import("@/index.js").Row[];
34
34
  readonly checkboxPosition: "right" | "left";
35
35
  readonly detailTransition: string;
36
36
  readonly maxHeight?: number | undefined;
@@ -45,7 +45,7 @@ declare const _default: import("vue").DefineComponent<{
45
45
  "onUpdate:openedDetailed"?: ((...args: any[]) => any) | undefined;
46
46
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
47
47
  data: {
48
- type: PropType<import("@/types/index.js").Row[]>;
48
+ type: PropType<import("@/index.js").Row[]>;
49
49
  default: () => never[];
50
50
  };
51
51
  loading: {
@@ -74,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
74
74
  };
75
75
  checkedRows: {
76
76
  default: () => never[];
77
- type: PropType<import("@/types/index.js").Row[]>;
77
+ type: PropType<import("@/index.js").Row[]>;
78
78
  };
79
79
  sortField: {
80
80
  type: StringConstructor;
@@ -125,7 +125,7 @@ declare const _default: import("vue").DefineComponent<{
125
125
  $el: any;
126
126
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
127
127
  data: {
128
- type: PropType<import("@/types/index.js").Row[]>;
128
+ type: PropType<import("@/index.js").Row[]>;
129
129
  default: () => never[];
130
130
  };
131
131
  loading: {
@@ -154,7 +154,7 @@ declare const _default: import("vue").DefineComponent<{
154
154
  };
155
155
  checkedRows: {
156
156
  default: () => never[];
157
- type: PropType<import("@/types/index.js").Row[]>;
157
+ type: PropType<import("@/index.js").Row[]>;
158
158
  };
159
159
  sortField: {
160
160
  type: StringConstructor;
@@ -207,8 +207,8 @@ declare const _default: import("vue").DefineComponent<{
207
207
  style: {
208
208
  width: number | undefined;
209
209
  };
210
- thAttrs: (column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
211
- tdAttrs: (row: import("@/types/index.js").Row, column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
210
+ thAttrs: (column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
211
+ tdAttrs: (row: import("@/index.js").Row, column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
212
212
  }[]>;
213
213
  uncheckAll: () => void;
214
214
  scrollTop: () => void;
@@ -229,10 +229,10 @@ declare const _default: import("vue").DefineComponent<{
229
229
  detailed: boolean;
230
230
  hasDetailedVisible: Function;
231
231
  checkable: boolean;
232
- checkedRows: import("@/types/index.js").Row[];
232
+ checkedRows: import("@/index.js").Row[];
233
233
  isRowCheckable: Function;
234
234
  maxHeight: number;
235
- data: import("@/types/index.js").Row[];
235
+ data: import("@/index.js").Row[];
236
236
  visibleColumns: number[];
237
237
  checkboxPosition: "right" | "left";
238
238
  detailTransition: string;
@@ -258,7 +258,7 @@ declare const _default: import("vue").DefineComponent<{
258
258
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
259
259
  } & Omit<Readonly<import("vue").ExtractPropTypes<{
260
260
  data: {
261
- type: PropType<import("@/types/index.js").Row[]>;
261
+ type: PropType<import("@/index.js").Row[]>;
262
262
  default: () => never[];
263
263
  };
264
264
  loading: {
@@ -287,7 +287,7 @@ declare const _default: import("vue").DefineComponent<{
287
287
  };
288
288
  checkedRows: {
289
289
  default: () => never[];
290
- type: PropType<import("@/types/index.js").Row[]>;
290
+ type: PropType<import("@/index.js").Row[]>;
291
291
  };
292
292
  sortField: {
293
293
  type: StringConstructor;
@@ -340,8 +340,8 @@ declare const _default: import("vue").DefineComponent<{
340
340
  style: {
341
341
  width: number | undefined;
342
342
  };
343
- thAttrs: (column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
344
- tdAttrs: (row: import("@/types/index.js").Row, column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
343
+ thAttrs: (column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
344
+ tdAttrs: (row: import("@/index.js").Row, column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
345
345
  }[]>;
346
346
  uncheckAll: () => void;
347
347
  scrollTop: () => void;
@@ -349,7 +349,7 @@ declare const _default: import("vue").DefineComponent<{
349
349
  $slots: {
350
350
  default?(_: {}): any;
351
351
  detail?(_: {
352
- row: import("@/types/index.js").Row;
352
+ row: import("@/index.js").Row;
353
353
  index: number;
354
354
  }): any;
355
355
  empty?(_: {}): any;
@@ -377,10 +377,10 @@ declare const _default: import("vue").DefineComponent<{
377
377
  detailed: boolean;
378
378
  hasDetailedVisible: Function;
379
379
  checkable: boolean;
380
- checkedRows: import("@/types/index.js").Row[];
380
+ checkedRows: import("@/index.js").Row[];
381
381
  isRowCheckable: Function;
382
382
  maxHeight: number;
383
- data: import("@/types/index.js").Row[];
383
+ data: import("@/index.js").Row[];
384
384
  visibleColumns: number[];
385
385
  checkboxPosition: "right" | "left";
386
386
  detailTransition: string;
@@ -392,9 +392,9 @@ declare const _default: import("vue").DefineComponent<{
392
392
  readonly detailed: boolean;
393
393
  readonly hasDetailedVisible: Function;
394
394
  readonly checkable: boolean;
395
- readonly checkedRows: import("@/types/index.js").Row[];
395
+ readonly checkedRows: import("@/index.js").Row[];
396
396
  readonly isRowCheckable: Function;
397
- readonly data: import("@/types/index.js").Row[];
397
+ readonly data: import("@/index.js").Row[];
398
398
  readonly checkboxPosition: "right" | "left";
399
399
  readonly detailTransition: string;
400
400
  readonly maxHeight?: number | undefined;
@@ -409,7 +409,7 @@ declare const _default: import("vue").DefineComponent<{
409
409
  "onUpdate:openedDetailed"?: ((...args: any[]) => any) | undefined;
410
410
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
411
411
  data: {
412
- type: PropType<import("@/types/index.js").Row[]>;
412
+ type: PropType<import("@/index.js").Row[]>;
413
413
  default: () => never[];
414
414
  };
415
415
  loading: {
@@ -438,7 +438,7 @@ declare const _default: import("vue").DefineComponent<{
438
438
  };
439
439
  checkedRows: {
440
440
  default: () => never[];
441
- type: PropType<import("@/types/index.js").Row[]>;
441
+ type: PropType<import("@/index.js").Row[]>;
442
442
  };
443
443
  sortField: {
444
444
  type: StringConstructor;
@@ -489,7 +489,7 @@ declare const _default: import("vue").DefineComponent<{
489
489
  $el: any;
490
490
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
491
491
  data: {
492
- type: PropType<import("@/types/index.js").Row[]>;
492
+ type: PropType<import("@/index.js").Row[]>;
493
493
  default: () => never[];
494
494
  };
495
495
  loading: {
@@ -518,7 +518,7 @@ declare const _default: import("vue").DefineComponent<{
518
518
  };
519
519
  checkedRows: {
520
520
  default: () => never[];
521
- type: PropType<import("@/types/index.js").Row[]>;
521
+ type: PropType<import("@/index.js").Row[]>;
522
522
  };
523
523
  sortField: {
524
524
  type: StringConstructor;
@@ -571,8 +571,8 @@ declare const _default: import("vue").DefineComponent<{
571
571
  style: {
572
572
  width: number | undefined;
573
573
  };
574
- thAttrs: (column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
575
- tdAttrs: (row: import("@/types/index.js").Row, column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
574
+ thAttrs: (column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
575
+ tdAttrs: (row: import("@/index.js").Row, column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
576
576
  }[]>;
577
577
  uncheckAll: () => void;
578
578
  scrollTop: () => void;
@@ -593,10 +593,10 @@ declare const _default: import("vue").DefineComponent<{
593
593
  detailed: boolean;
594
594
  hasDetailedVisible: Function;
595
595
  checkable: boolean;
596
- checkedRows: import("@/types/index.js").Row[];
596
+ checkedRows: import("@/index.js").Row[];
597
597
  isRowCheckable: Function;
598
598
  maxHeight: number;
599
- data: import("@/types/index.js").Row[];
599
+ data: import("@/index.js").Row[];
600
600
  visibleColumns: number[];
601
601
  checkboxPosition: "right" | "left";
602
602
  detailTransition: string;
@@ -622,7 +622,7 @@ declare const _default: import("vue").DefineComponent<{
622
622
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
623
623
  } & Omit<Readonly<import("vue").ExtractPropTypes<{
624
624
  data: {
625
- type: PropType<import("@/types/index.js").Row[]>;
625
+ type: PropType<import("@/index.js").Row[]>;
626
626
  default: () => never[];
627
627
  };
628
628
  loading: {
@@ -651,7 +651,7 @@ declare const _default: import("vue").DefineComponent<{
651
651
  };
652
652
  checkedRows: {
653
653
  default: () => never[];
654
- type: PropType<import("@/types/index.js").Row[]>;
654
+ type: PropType<import("@/index.js").Row[]>;
655
655
  };
656
656
  sortField: {
657
657
  type: StringConstructor;
@@ -704,8 +704,8 @@ declare const _default: import("vue").DefineComponent<{
704
704
  style: {
705
705
  width: number | undefined;
706
706
  };
707
- thAttrs: (column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
708
- tdAttrs: (row: import("@/types/index.js").Row, column: import("@/types/index.js").BaseTableColumn) => Record<string, any>;
707
+ thAttrs: (column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
708
+ tdAttrs: (row: import("@/index.js").Row, column: import("@/index.js").BaseTableColumnData) => Record<string, any>;
709
709
  }[]>;
710
710
  uncheckAll: () => void;
711
711
  scrollTop: () => void;
@@ -713,7 +713,7 @@ declare const _default: import("vue").DefineComponent<{
713
713
  $slots: {
714
714
  default?(_: {}): any;
715
715
  detail?(_: {
716
- row: import("@/types/index.js").Row;
716
+ row: import("@/index.js").Row;
717
717
  index: number;
718
718
  }): any;
719
719
  empty?(_: {}): any;
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { BaseTableColumn, Row } from '@/types';
2
+ import { BaseTableColumnData, Row } from '@/types';
3
3
  /**
4
4
  * Remove all rows in current page.
5
5
  */
@@ -96,8 +96,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
96
96
  style: {
97
97
  width: number | undefined;
98
98
  };
99
- thAttrs: (column: BaseTableColumn) => Record<string, any>;
100
- tdAttrs: (row: Row, column: BaseTableColumn) => Record<string, any>;
99
+ thAttrs: (column: BaseTableColumnData) => Record<string, any>;
100
+ tdAttrs: (row: Row, column: BaseTableColumnData) => Record<string, any>;
101
101
  }[]>;
102
102
  uncheckAll: typeof uncheckAll;
103
103
  scrollTop: typeof scrollTop;
@@ -241,6 +241,7 @@ export default _default;
241
241
  export * from './components';
242
242
  export * from './constants';
243
243
  export * from './utils';
244
+ export type * from './types';
244
245
  export { messages };
245
246
  export { config };
246
247
  export { useDialogsStore };
@@ -71,7 +71,7 @@ export interface ActionItem {
71
71
  actions?: ActionItem[];
72
72
  }
73
73
  export type Row = Record<string, any>;
74
- export interface BaseTableColumn {
74
+ export interface BaseTableColumnData {
75
75
  id: string;
76
76
  label: string;
77
77
  field: string;
@@ -88,8 +88,8 @@ export interface BaseTableColumn {
88
88
  style: {
89
89
  width: undefined | number;
90
90
  };
91
- thAttrs: (column: BaseTableColumn) => Record<string, any>;
92
- tdAttrs: (row: Row, column: BaseTableColumn) => Record<string, any>;
91
+ thAttrs: (column: BaseTableColumnData) => Record<string, any>;
92
+ tdAttrs: (row: Row, column: BaseTableColumnData) => Record<string, any>;
93
93
  }
94
94
  /**
95
95
  * System alert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.86",
3
+ "version": "0.6.88",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -127,7 +127,7 @@
127
127
  "src",
128
128
  "dist"
129
129
  ],
130
- "types": "./dist/types/src/index.d.ts",
130
+ "types": "./dist/types/index.d.ts",
131
131
  "module": "./dist/sprintify-ui.es.js",
132
132
  "exports": {
133
133
  ".": {
@@ -136,7 +136,8 @@
136
136
  "./style.css": "./src/assets/main.css",
137
137
  "./dist/style.css": "./dist/style.css",
138
138
  "./tailwindcss": "./dist/tailwindcss/index.js",
139
- "./dist/types/src/types": "./dist/types/src/types/index.ts"
139
+ "./dist/types/types": "./dist/types/types/index.ts",
140
+ "./dist/types/src/types": "./dist/types/types/index.ts"
140
141
  },
141
142
  "config": {
142
143
  "commitizen": {
@@ -274,7 +274,7 @@
274
274
 
275
275
  <script lang="ts" setup>
276
276
  import { PropType, StyleValue, ref } from 'vue';
277
- import { BaseTableColumn, Row } from '@/types';
277
+ import { BaseTableColumnData, Row } from '@/types';
278
278
  import SlotComponent from './SlotComponent';
279
279
  import { useResizeObserver, useScroll } from '@vueuse/core';
280
280
  import { debounce, isArray } from 'lodash';
@@ -386,9 +386,9 @@ const visibleDetailRows = ref<string[]>([]);
386
386
  // eslint-disable-next-line vue/no-setup-props-destructure
387
387
  const newCheckedRows = ref<Row[]>([...props.checkedRows]);
388
388
  const lastCheckedRowIndex = ref<number | null>(null);
389
- const currentSortColumn = ref<BaseTableColumn | null>(null);
389
+ const currentSortColumn = ref<BaseTableColumnData | null>(null);
390
390
  const isAsc = ref(true);
391
- const defaultSlots = ref<BaseTableColumn[]>([]);
391
+ const defaultSlots = ref<BaseTableColumnData[]>([]);
392
392
  const sequence = ref(1);
393
393
 
394
394
  const slot = ref<HTMLElement | null>(null);
@@ -416,7 +416,7 @@ const visibleColumns = computed(() => {
416
416
  return newColumns.value;
417
417
  }
418
418
 
419
- return newColumns.value.filter((column: BaseTableColumn) => {
419
+ return newColumns.value.filter((column: BaseTableColumnData) => {
420
420
  if (column.toggle === false) {
421
421
  return true;
422
422
  }
@@ -489,7 +489,7 @@ onMounted(() => {
489
489
  * Toggle current direction on column if it's sortable
490
490
  * and not just updating the prop.
491
491
  */
492
- function sort(column: BaseTableColumn, updatingData = false, event = null) {
492
+ function sort(column: BaseTableColumnData, updatingData = false, event = null) {
493
493
  if (!column || !column.sortable) {
494
494
  return;
495
495
  }
@@ -719,7 +719,7 @@ function updateSortState() {
719
719
  |--------------------------------------------------------------------------
720
720
  */
721
721
 
722
- function addColumn(column: BaseTableColumn) {
722
+ function addColumn(column: BaseTableColumnData) {
723
723
  defaultSlots.value.push(column);
724
724
 
725
725
  const slotHTMLElement = slot.value as HTMLElement;
@@ -743,7 +743,7 @@ function addColumn(column: BaseTableColumn) {
743
743
  }
744
744
  }
745
745
 
746
- function removeColumn(column: BaseTableColumn) {
746
+ function removeColumn(column: BaseTableColumnData) {
747
747
  defaultSlots.value = defaultSlots.value.filter(
748
748
  (d) => d.newKey !== column.newKey
749
749
  );
@@ -773,7 +773,7 @@ function borderBottomDetailClasses(index: number): string {
773
773
 
774
774
  function onColumnClick(
775
775
  row: Row,
776
- column: BaseTableColumn,
776
+ column: BaseTableColumnData,
777
777
  index: number,
778
778
  colindex: number,
779
779
  event: MouseEvent
package/src/index.ts CHANGED
@@ -117,6 +117,7 @@ export default { install };
117
117
  export * from './components';
118
118
  export * from './constants';
119
119
  export * from './utils';
120
+ export type * from './types';
120
121
 
121
122
  export { messages };
122
123
 
@@ -97,7 +97,7 @@ export interface ActionItem {
97
97
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
98
98
  export type Row = Record<string, any>;
99
99
 
100
- export interface BaseTableColumn {
100
+ export interface BaseTableColumnData {
101
101
  id: string;
102
102
  label: string;
103
103
  field: string;
@@ -116,9 +116,9 @@ export interface BaseTableColumn {
116
116
  width: undefined | number;
117
117
  };
118
118
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
119
- thAttrs: (column: BaseTableColumn) => Record<string, any>;
119
+ thAttrs: (column: BaseTableColumnData) => Record<string, any>;
120
120
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
- tdAttrs: (row: Row, column: BaseTableColumn) => Record<string, any>;
121
+ tdAttrs: (row: Row, column: BaseTableColumnData) => Record<string, any>;
122
122
  }
123
123
 
124
124
  /**