sprintify-ui 0.6.87 → 0.7.0

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 (37) hide show
  1. package/README.md +11 -11
  2. package/dist/sprintify-ui.es.js +245 -244
  3. package/dist/tailwindcss/theme.js +1 -1
  4. package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +34 -34
  5. package/dist/types/components/BaseDataTableTemplate.vue.d.ts +3 -3
  6. package/dist/types/components/index.d.ts +2 -2
  7. package/dist/types/index.d.ts +3 -1
  8. package/dist/types/stores/snackbars.d.ts +19 -0
  9. package/dist/types/types/index.d.ts +7 -7
  10. package/package.json +1 -1
  11. package/src/components/BaseApp.vue +2 -2
  12. package/src/components/{BaseAppNotifications.vue → BaseAppSnackbars.vue} +9 -9
  13. package/src/components/BaseCropper.stories.js +3 -3
  14. package/src/components/BaseCropperModal.stories.js +3 -3
  15. package/src/components/BaseDataTable.stories.js +3 -3
  16. package/src/components/BaseDataTable.vue +4 -4
  17. package/src/components/BaseDataTableTemplate.vue +8 -8
  18. package/src/components/BaseFilePicker.stories.js +3 -3
  19. package/src/components/BaseFilePicker.vue +4 -4
  20. package/src/components/BaseFilePickerCrop.stories.js +3 -3
  21. package/src/components/BaseFileUploader.stories.js +3 -3
  22. package/src/components/BaseFileUploader.vue +3 -3
  23. package/src/components/BaseForm.stories.js +3 -0
  24. package/src/components/BaseForm.vue +4 -4
  25. package/src/components/BaseHasMany.stories.js +5 -5
  26. package/src/components/BaseMediaLibrary.vue +3 -3
  27. package/src/components/BaseTagAutocomplete.stories.js +11 -5
  28. package/src/components/BaseTagAutocomplete.vue +3 -3
  29. package/src/components/BaseTagAutocompleteFetch.stories.js +3 -3
  30. package/src/components/index.ts +2 -2
  31. package/src/index.ts +3 -1
  32. package/src/stores/{notifications.ts → snackbars.ts} +15 -13
  33. package/src/stories/List.stories.js +3 -3
  34. package/src/stories/PageShow.vue +4 -4
  35. package/src/types/index.ts +7 -7
  36. package/dist/types/stores/notifications.d.ts +0 -10
  37. /package/dist/types/components/{BaseAppNotifications.vue.d.ts → BaseAppSnackbars.vue.d.ts} +0 -0
@@ -18,7 +18,7 @@ module.exports = {
18
18
  menu: '40',
19
19
  tooltip: '40',
20
20
  modal: '30',
21
- notifications: '50',
21
+ snackbars: '50',
22
22
  dialogs: '50',
23
23
  },
24
24
  animation: {
@@ -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;
@@ -3,7 +3,7 @@ import BaseAddressForm from './BaseAddressForm.vue';
3
3
  import BaseAlert from './BaseAlert.vue';
4
4
  import BaseApp from './BaseApp.vue';
5
5
  import BaseAppDialogs from './BaseAppDialogs.vue';
6
- import BaseAppNotifications from './BaseAppNotifications.vue';
6
+ import BaseAppSnackbars from './BaseAppSnackbars.vue';
7
7
  import BaseAutocomplete from './BaseAutocomplete.vue';
8
8
  import BaseAutocompleteFetch from './BaseAutocompleteFetch.vue';
9
9
  import BaseAvatar from './BaseAvatar.vue';
@@ -101,4 +101,4 @@ import BaseLayoutStacked from './BaseLayoutStacked.vue';
101
101
  import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
102
102
  import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
103
103
  import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
104
- export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseCalendar, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseTimePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseGantt, BaseHasMany, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTable, BaseTableBody, BaseTableCell, BaseTableHead, BaseTableHeader, BaseTableRow, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseTooltip, BaseUniqueCode, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
104
+ export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppSnackbars, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseCalendar, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseTimePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseGantt, BaseHasMany, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTable, BaseTableBody, BaseTableCell, BaseTableHead, BaseTableHeader, BaseTableRow, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseTooltip, BaseUniqueCode, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
@@ -1,7 +1,7 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { App } from 'vue';
3
3
  import { useDialogsStore } from './stores/dialogs';
4
- import { useNotificationsStore } from './stores/notifications';
4
+ import { useSnackbarsStore, useNotificationsStore } from './stores/snackbars';
5
5
  import { useSystemAlertStore } from './stores/systemAlerts';
6
6
  import { useClickOutside } from './composables/clickOutside';
7
7
  import { useField } from './composables/field';
@@ -241,9 +241,11 @@ 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 };
248
+ export { useSnackbarsStore };
247
249
  export { useNotificationsStore };
248
250
  export { useSystemAlertStore };
249
251
  export { useClickOutside };
@@ -0,0 +1,19 @@
1
+ import { Snackbar, SnackbarOptions } from '../types';
2
+ export declare const useSnackbarsStore: import("pinia").StoreDefinition<"notifications", {
3
+ count: number;
4
+ snackbars: Snackbar[];
5
+ timeouts: Record<number, number>;
6
+ }, {}, {
7
+ push(options: SnackbarOptions): void;
8
+ remove(snackbar: Snackbar): void;
9
+ clear(): void;
10
+ }>;
11
+ export declare const useNotificationsStore: import("pinia").StoreDefinition<"notifications", {
12
+ count: number;
13
+ snackbars: Snackbar[];
14
+ timeouts: Record<number, number>;
15
+ }, {}, {
16
+ push(options: SnackbarOptions): void;
17
+ remove(snackbar: Snackbar): void;
18
+ clear(): void;
19
+ }>;
@@ -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
@@ -134,15 +134,15 @@ export interface Dialog {
134
134
  onCancel: () => void;
135
135
  }
136
136
  /**
137
- * Notification
137
+ * Snackbar
138
138
  */
139
- export interface NotificationOptions {
139
+ export interface SnackbarOptions {
140
140
  title: string;
141
141
  text: string;
142
142
  color?: 'info' | 'success' | 'danger' | 'warning';
143
143
  duration?: number;
144
144
  }
145
- export interface Notification {
145
+ export interface Snackbar {
146
146
  id: number;
147
147
  title: string;
148
148
  text: string;
@@ -150,7 +150,7 @@ export interface Notification {
150
150
  duration: number;
151
151
  }
152
152
  /**
153
- * App Notification
153
+ * Notification
154
154
  */
155
155
  export interface NotificationsConfig {
156
156
  count: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.87",
3
+ "version": "0.7.0",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -3,7 +3,7 @@
3
3
  <slot />
4
4
 
5
5
  <!-- Notifications -->
6
- <BaseAppNotifications />
6
+ <BaseAppSnackbars />
7
7
 
8
8
  <!-- Dialogs -->
9
9
  <BaseAppDialogs />
@@ -12,5 +12,5 @@
12
12
 
13
13
  <script lang="ts" setup>
14
14
  import BaseAppDialogs from './BaseAppDialogs.vue';
15
- import BaseAppNotifications from './BaseAppNotifications.vue';
15
+ import BaseAppSnackbars from './BaseAppSnackbars.vue';
16
16
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
3
  <div
4
- class="pointer-events-none fixed inset-0 z-notifications flex items-end justify-end p-6 md:p-8"
4
+ class="pointer-events-none fixed inset-0 z-snackbars flex items-end justify-end p-6 md:p-8"
5
5
  >
6
6
  <div class="w-full">
7
7
  <TransitionGroup
@@ -13,13 +13,13 @@
13
13
  leave-to-class="translate-y-2 opacity-0"
14
14
  >
15
15
  <div
16
- v-for="notification in notifications"
17
- :key="notification.id"
16
+ v-for="snackbar in snackbars"
17
+ :key="snackbar.id"
18
18
  >
19
19
  <BaseToast
20
20
  class="mt-4"
21
- :text="notification.text"
22
- :color="notification.color"
21
+ :text="snackbar.text"
22
+ :color="snackbar.color"
23
23
  />
24
24
  </div>
25
25
  </TransitionGroup>
@@ -29,12 +29,12 @@
29
29
  </template>
30
30
 
31
31
  <script lang="ts" setup>
32
- import { useNotificationsStore } from '@/index';
32
+ import { useSnackbarsStore } from '@/index';
33
33
  import BaseToast from './BaseToast.vue';
34
34
 
35
- const notificationsStore = useNotificationsStore();
35
+ const snackbarsStore = useSnackbarsStore();
36
36
 
37
- const notifications = computed(() => {
38
- return notificationsStore.notifications;
37
+ const snackbars = computed(() => {
38
+ return snackbarsStore.snackbars;
39
39
  });
40
40
  </script>
@@ -1,6 +1,6 @@
1
1
  import BaseCropper from '@/components/BaseCropper.vue';
2
2
  import BaseLoadingCover from '@/components/BaseLoadingCover.vue';
3
- import BaseAppNotifications from '@/components/BaseAppNotifications.vue';
3
+ import BaseAppSnackbars from '@/components/BaseAppSnackbars.vue';
4
4
  import { Icon as BaseIcon } from '@iconify/vue';
5
5
 
6
6
  export default {
@@ -17,7 +17,7 @@ const Template = (args) => ({
17
17
  BaseCropper,
18
18
  BaseIcon,
19
19
  BaseLoadingCover,
20
- BaseAppNotifications,
20
+ BaseAppSnackbars,
21
21
  },
22
22
  setup() {
23
23
  const cropperRef = ref(null);
@@ -74,7 +74,7 @@ const Template = (args) => ({
74
74
  </template>
75
75
  </BaseCropper>
76
76
 
77
- <BaseAppNotifications></BaseAppNotifications>
77
+ <BaseAppSnackbars></BaseAppSnackbars>
78
78
  `,
79
79
  });
80
80
 
@@ -1,5 +1,5 @@
1
1
  import BaseCropperModal from '@/components/BaseCropperModal.vue';
2
- import BaseAppNotifications from '@/components/BaseAppNotifications.vue';
2
+ import BaseAppSnackbars from '@/components/BaseAppSnackbars.vue';
3
3
 
4
4
  const source =
5
5
  'https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&q=80';
@@ -13,7 +13,7 @@ export default {
13
13
  const Template = (args) => ({
14
14
  components: {
15
15
  BaseCropperModal,
16
- BaseAppNotifications,
16
+ BaseAppSnackbars,
17
17
  },
18
18
  setup() {
19
19
  const value = ref(true);
@@ -21,7 +21,7 @@ const Template = (args) => ({
21
21
  },
22
22
  template: `
23
23
  <BaseCropperModal v-bind="args" v-model="value"></BaseCropperModal>
24
- <BaseAppNotifications></BaseAppNotifications>
24
+ <BaseAppSnackbars></BaseAppSnackbars>
25
25
  `,
26
26
  });
27
27
 
@@ -3,7 +3,7 @@ import BaseTableColumn from './BaseTableColumn.vue';
3
3
  import BaseBoolean from './BaseBoolean.vue';
4
4
  import BaseSelect from './BaseSelect.vue';
5
5
  import BaseBadge from './BaseBadge.vue';
6
- import BaseAppNotifications from './BaseAppNotifications.vue';
6
+ import BaseAppSnackbars from './BaseAppSnackbars.vue';
7
7
  import BaseAppDialogs from './BaseAppDialogs.vue';
8
8
  import { onBeforeUnmount } from 'vue';
9
9
  import { DateTime } from 'luxon';
@@ -37,7 +37,7 @@ const templateComponents = {
37
37
  BaseBoolean,
38
38
  BaseSelect,
39
39
  BaseBadge,
40
- BaseAppNotifications,
40
+ BaseAppSnackbars,
41
41
  BaseAppDialogs,
42
42
  };
43
43
 
@@ -45,7 +45,7 @@ const template = `
45
45
  <div class="font-mono text-sm bg-black px-2 py-1 rounded text-white">Last fetch: {{ lastFetch?.getTime() }} (should update on each fetch)</div>
46
46
  <br/>
47
47
  ${templateDataTable}
48
- <BaseAppNotifications></BaseAppNotifications>
48
+ <BaseAppSnackbars></BaseAppSnackbars>
49
49
  <BaseAppDialogs></BaseAppDialogs>
50
50
  `;
51
51
 
@@ -239,7 +239,7 @@ import {
239
239
  RowAction,
240
240
  } from '@/types';
241
241
  import { useDialogsStore } from '@/stores/dialogs';
242
- import { useNotificationsStore } from '../stores/notifications';
242
+ import { useSnackbarsStore } from '../stores/snackbars';
243
243
  import BaseDataIterator from './BaseDataIterator.vue';
244
244
  import { cloneDeep, isArray } from 'lodash';
245
245
 
@@ -262,7 +262,7 @@ const router = useRouter();
262
262
  const http = config.http;
263
263
 
264
264
  const dialogs = useDialogsStore();
265
- const notifications = useNotificationsStore();
265
+ const snackbars = useSnackbarsStore();
266
266
 
267
267
  const table = ref<null | InstanceType<typeof BaseDataTableTemplate>>(null);
268
268
 
@@ -564,7 +564,7 @@ const onDelete = (row: CollectionItem) => {
564
564
  .delete(props.deleteUrl(row))
565
565
  .then((response) => {
566
566
  if (response.data && response.data.message) {
567
- notifications.push({
567
+ snackbars.push({
568
568
  title: t('sui.success'),
569
569
  text: response.data.message,
570
570
  color: 'success',
@@ -576,7 +576,7 @@ const onDelete = (row: CollectionItem) => {
576
576
  fetch();
577
577
  })
578
578
  .catch((error) => {
579
- notifications.push({
579
+ snackbars.push({
580
580
  title: t('sui.error'),
581
581
  text: error.response.data?.message ?? 'Unknown error',
582
582
  color: 'danger',
@@ -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
@@ -1,7 +1,7 @@
1
1
  import BaseFilePicker from './BaseFilePicker.vue';
2
2
  import { Icon as BaseIcon } from '@iconify/vue';
3
3
  import ShowValue from '../../.storybook/components/ShowValue.vue';
4
- import BaseAppNotifications from '@/components/BaseAppNotifications.vue';
4
+ import BaseAppSnackbars from '@/components/BaseAppSnackbars.vue';
5
5
  import { t } from '@/i18n';
6
6
 
7
7
  export default {
@@ -11,7 +11,7 @@ export default {
11
11
  };
12
12
 
13
13
  const Template = (args) => ({
14
- components: { BaseFilePicker, BaseIcon, ShowValue, BaseAppNotifications },
14
+ components: { BaseFilePicker, BaseIcon, ShowValue, BaseAppSnackbars },
15
15
  setup() {
16
16
  const file = ref(null);
17
17
 
@@ -56,7 +56,7 @@ const Template = (args) => ({
56
56
 
57
57
  <ShowValue :value="file" />
58
58
 
59
- <BaseAppNotifications></BaseAppNotifications>
59
+ <BaseAppSnackbars></BaseAppSnackbars>
60
60
  `,
61
61
  });
62
62