@maropost-ui/liquidsky-ui 0.1.74 → 0.1.77

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.
@@ -7,7 +7,11 @@ export interface DataTableColumn {
7
7
  key: string;
8
8
  title: string;
9
9
  sortable?: boolean;
10
- width?: number;
10
+ width?: number | string;
11
+ minWidth?: number | string;
12
+ maxWidth?: number | string;
13
+ align?: 'start' | 'center' | 'end';
14
+ nowrap?: boolean;
11
15
  missingIndicator?: string;
12
16
  schema?: {
13
17
  type: 'link' | 'number' | 'date' | 'date-only' | 'multi-value' | 'currency' | 'chip' | 'text';
@@ -8,4 +8,9 @@ export interface AppDialogWrapperProps extends MpTestIdProps {
8
8
  showSaveBtn?: boolean;
9
9
  showCancelBtn?: boolean;
10
10
  dataGsPrefix?: string;
11
+ /**
12
+ * Disable the save button when the form is invalid.
13
+ * @default true
14
+ */
15
+ disableSaveOnInvalid?: boolean;
11
16
  }
@@ -0,0 +1,18 @@
1
+ import type { Anchor } from 'vuetify';
2
+ import type { MpTestIdProps } from './MpTestIdProps';
3
+ export interface TSplitButtonMenuOption {
4
+ title: string;
5
+ disabled?: boolean;
6
+ icon?: string;
7
+ onClick: () => void;
8
+ }
9
+ export interface TAppSplitButtonProps extends MpTestIdProps {
10
+ label: string;
11
+ options: TSplitButtonMenuOption[];
12
+ prependIcon?: string;
13
+ type?: 'primary' | 'secondary' | 'text' | 'default';
14
+ isValid?: boolean;
15
+ noSpacing?: boolean;
16
+ disabled?: boolean;
17
+ location?: Anchor;
18
+ }
@@ -25,6 +25,10 @@ export interface AppTableActionMenuProps extends MpTestIdProps {
25
25
  index?: number | null;
26
26
  /** icon e.g. "mdi-dots-vertical" */
27
27
  icon?: string;
28
+ /** buttonColor e.g. "red" or "#f5f5f5" */
29
+ buttonColor?: string;
30
+ /** iconColor e.g. "black" or "#006cae" */
31
+ iconColor?: string;
28
32
  /** Any additional props will be passed to v-menu via v-bind */
29
33
  [key: string]: any;
30
34
  }
@@ -0,0 +1,141 @@
1
+ export interface BreadcrumbNode {
2
+ label: string;
3
+ id: number | null;
4
+ }
5
+ export interface DateRange {
6
+ startDate: string | null;
7
+ endDate: string | null;
8
+ }
9
+ export interface FilterOption {
10
+ label: string;
11
+ value: string;
12
+ }
13
+ export interface PageAction {
14
+ label: string;
15
+ onClick?: () => void;
16
+ link?: string;
17
+ }
18
+ export declare enum GenericIndexTableMenuActionType {
19
+ EDIT = "edit",
20
+ DELETE = "delete",
21
+ VIEW = "view",
22
+ ARCHIVE = "archive",
23
+ DUPLICATE = "duplicate",
24
+ RESET = "reset",
25
+ ADD = "add",
26
+ SHOW = "show",
27
+ PREVIEW = "preview"
28
+ }
29
+ export interface GenericIndexTableMenuItem {
30
+ icon?: string;
31
+ text: string;
32
+ type: GenericIndexTableMenuActionType | string;
33
+ isDisabled?: boolean;
34
+ }
35
+ export interface GenericIndexTableChipStatus {
36
+ name: string;
37
+ color: string;
38
+ value: string;
39
+ }
40
+ export interface GenericIndexTableActionItem {
41
+ menuItems: GenericIndexTableMenuItem[];
42
+ customActions?: GenericIndexTableMenuItem;
43
+ /** Background of the action buttons, e.g. "red" or "#f5f5f5" */
44
+ buttonColor?: string;
45
+ /** Icon color of the action buttons, e.g. "black" or "#006cae" */
46
+ iconColor?: string;
47
+ }
48
+ export declare enum GenericIndexTableCellType {
49
+ TEXT = "text",
50
+ CHIP = "chip",
51
+ TOGGLE = "toggle",
52
+ CURRENCY = "currency",
53
+ DATE = "date",
54
+ SELECT = "select",
55
+ ACTIONS = "actions"
56
+ }
57
+ export interface GenericIndexTableColumnDefinition {
58
+ key: string;
59
+ title: string;
60
+ sortable?: boolean;
61
+ width?: string;
62
+ minWidth?: string;
63
+ maxWidth?: string;
64
+ flexible?: boolean;
65
+ align?: "start" | "center" | "end";
66
+ }
67
+ export interface GenericIndexTableConfig {
68
+ columns: GenericIndexTableColumnDefinition[];
69
+ rowsPerPageOptions?: number[];
70
+ defaultRowsPerPage?: number;
71
+ showSelect?: boolean;
72
+ isDragable?: boolean;
73
+ noDataText?: string;
74
+ }
75
+ export interface GenericIndexTableCell<T = any> {
76
+ key: string;
77
+ value: T;
78
+ type: GenericIndexTableCellType;
79
+ hidden?: boolean;
80
+ onClick?: () => void;
81
+ isLink?: boolean;
82
+ tooltip?: string;
83
+ title?: string;
84
+ additionalIcon?: {
85
+ icon: string;
86
+ tooltip?: string;
87
+ color?: string;
88
+ onClick?: () => void;
89
+ };
90
+ }
91
+ export interface GenericIndexTableData<T = any> {
92
+ referenceId?: string;
93
+ /**
94
+ * All cells rendered in the table
95
+ */
96
+ columnData: GenericIndexTableCell[];
97
+ /**
98
+ * Original object received from API
99
+ */
100
+ originalObject?: T;
101
+ /**
102
+ * Table state
103
+ */
104
+ selected?: boolean;
105
+ isRowSelected?: boolean;
106
+ highlightRowSelected?: boolean;
107
+ }
108
+ export interface GenericIndexTableCellTogglePayload {
109
+ row: GenericIndexTableData;
110
+ column?: string;
111
+ value: boolean;
112
+ }
113
+ export interface GenericIndexTableCellActionPayload {
114
+ row: GenericIndexTableData;
115
+ menuItem: GenericIndexTableMenuItem;
116
+ }
117
+ export interface GenericIndexTableFetchDataPayload {
118
+ page: number;
119
+ itemsPerPage: number;
120
+ sortBy: any[];
121
+ }
122
+ export interface GenericIndexPageData {
123
+ breadcrumbs: BreadcrumbNode[];
124
+ title: string;
125
+ isReports?: boolean;
126
+ isIndex?: boolean;
127
+ tableData: GenericIndexTableData[];
128
+ tableConfig: GenericIndexTableConfig;
129
+ loading?: boolean;
130
+ loadingText?: string;
131
+ serverItemsLength?: number;
132
+ page?: number;
133
+ itemsPerPage?: number;
134
+ sortBy?: any[];
135
+ filterOptions?: FilterOption[];
136
+ selectedFilter?: string;
137
+ onFilterChange?: (value: string) => void;
138
+ currentDateRange?: DateRange;
139
+ onDateRangeChange?: (value: string) => void;
140
+ newButtonAction?: PageAction;
141
+ }
@@ -7,3 +7,5 @@ export * from './unitTypes';
7
7
  export * from './SlVueTreeNextProps';
8
8
  export * from './TreeDropdownProps';
9
9
  export * from './AppSnackbarProps';
10
+ export * from './AppSplitButtonProps';
11
+ export * from './GenericIndexPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maropost-ui/liquidsky-ui",
3
- "version": "0.1.74",
3
+ "version": "0.1.77",
4
4
  "description": "Shared UI components, composables, and utils for Vue + Vuetify",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",