tsv2-library 0.2.4 → 0.2.6
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/dist/src/build-entry.d.ts +2 -2
- package/dist/src/components/v2/Calendar/Calendar.vue.d.ts +5 -0
- package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +22 -6
- package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +25 -9
- package/dist/src/utils/index.d.ts +2 -1
- package/dist/src/utils/transactionRoles.util.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/tsv2-library.es.js +3137 -3108
- package/package.json +1 -1
- package/src/components/v2/Calendar/Calendar.vue.d.ts +5 -0
- package/src/components/v2/DataTable/DataTable.vue.d.ts +22 -6
- package/src/presets/datatable/index.js +2 -2
- package/src/presets/dialog/index.js +2 -0
- package/src/presets/image/index.js +4 -5
- package/src/presets/tabmenu/index.js +6 -2
|
@@ -12,7 +12,7 @@ interface TSFormContext<T> {
|
|
|
12
12
|
handleSubmit: FormContext['handleSubmit'];
|
|
13
13
|
}
|
|
14
14
|
declare const useForm: <T>() => TSFormContext<T>;
|
|
15
|
-
import { handleTokenExpiration, exportToExcel, formatDate, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n } from './utils';
|
|
15
|
+
import { handleTokenExpiration, exportToExcel, formatDate, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, getTransactionRole, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n } from './utils';
|
|
16
16
|
import { flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys } from './components/v2/Tree/helpers';
|
|
17
17
|
import useLoadingStore from './components/v2/Loading/store/loading.store';
|
|
18
18
|
import Tooltip from '../node_modules/primevue/tooltip';
|
|
@@ -23,4 +23,4 @@ declare const _default: {
|
|
|
23
23
|
install: (app: App) => void;
|
|
24
24
|
};
|
|
25
25
|
export default _default;
|
|
26
|
-
export { LibConfig, TSToastService, VueHtmlToPaper, Tooltip, Focus, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearch, TSButtonSearchByScan, TSButtonSelectTree, TSButtonSelectUser, TSButtonSync, TSButtonToggle, TSCalendar, TSCard, TSCarousel, TSCheckbox, TSDataTable, TSDialog, TSDialogApprovalList, TSDialogAssetNameDetail, TSDialogConfirm, TSDialogForm, TSDialogLinkedAsset, TSDialogPrintQR, TSDialogReportDamage, TSDialogReportMissing, TSDialogReportTag, TSDialogSelectTree, TSDialogSelectAsset, TSDialogSelectUser, TSDisposalReport, TSDropdown, TSFilterContainer, TSFileUpload, TSForm, TSIcon, TSImage, TSImageCompressor, TSInlineMessage, TSInputBadge, TSInputCurrency, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputText, TSInputSearch, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, handleTokenExpiration, exportToExcel, formatDate, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n, useForm, flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys, TreeAPI, RoutineAPI, DisposalAPI, RoutineServices, AssetsServices, DisposalServices, FilterMatchMode, useLoadingStore, };
|
|
26
|
+
export { LibConfig, TSToastService, VueHtmlToPaper, Tooltip, Focus, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearch, TSButtonSearchByScan, TSButtonSelectTree, TSButtonSelectUser, TSButtonSync, TSButtonToggle, TSCalendar, TSCard, TSCarousel, TSCheckbox, TSDataTable, TSDialog, TSDialogApprovalList, TSDialogAssetNameDetail, TSDialogConfirm, TSDialogForm, TSDialogLinkedAsset, TSDialogPrintQR, TSDialogReportDamage, TSDialogReportMissing, TSDialogReportTag, TSDialogSelectTree, TSDialogSelectAsset, TSDialogSelectUser, TSDisposalReport, TSDropdown, TSFilterContainer, TSFileUpload, TSForm, TSIcon, TSImage, TSImageCompressor, TSInlineMessage, TSInputBadge, TSInputCurrency, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputText, TSInputSearch, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, handleTokenExpiration, exportToExcel, formatDate, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, getTransactionRole, formatCurrency, getHostName, getBaseURL, useI18n, useForm, flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys, TreeAPI, RoutineAPI, DisposalAPI, RoutineServices, AssetsServices, DisposalServices, FilterMatchMode, useLoadingStore, };
|
|
@@ -179,6 +179,24 @@ export interface TSDataTableProps {
|
|
|
179
179
|
* An array of table columns for children table.
|
|
180
180
|
*/
|
|
181
181
|
childrenColumns?: TableColumn[];
|
|
182
|
+
/**
|
|
183
|
+
* Whether show single action option in children table.
|
|
184
|
+
* @default true;
|
|
185
|
+
*/
|
|
186
|
+
childrenUseOption?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* The options that will be visible for each row data in children table.
|
|
189
|
+
*
|
|
190
|
+
* __Provide at least one option to display an Options Menu for each row.__
|
|
191
|
+
*
|
|
192
|
+
* The options menu will be displayed on the right side of the children table row.
|
|
193
|
+
*/
|
|
194
|
+
childrenOptions?: MenuOption[];
|
|
195
|
+
/**
|
|
196
|
+
* The key of the data object to use as a unique identifier for chlidren table.
|
|
197
|
+
* @default '_id'
|
|
198
|
+
*/
|
|
199
|
+
childrenDataKey?: string;
|
|
182
200
|
/**
|
|
183
201
|
* An array of objects to display in the table.
|
|
184
202
|
*/
|
|
@@ -280,12 +298,6 @@ export interface TSDataTableProps {
|
|
|
280
298
|
* Set the scrollHeight in px
|
|
281
299
|
*/
|
|
282
300
|
scrollHeight?: string;
|
|
283
|
-
/**
|
|
284
|
-
* Define the shape of header table is rounded
|
|
285
|
-
*
|
|
286
|
-
* @default true
|
|
287
|
-
*/
|
|
288
|
-
roundedHeader?: boolean;
|
|
289
301
|
}
|
|
290
302
|
|
|
291
303
|
export type TSDataTableEmits = {
|
|
@@ -293,6 +305,10 @@ export type TSDataTableEmits = {
|
|
|
293
305
|
* Emits when option menu button clicked.
|
|
294
306
|
*/
|
|
295
307
|
'toggleOption': [data: Data];
|
|
308
|
+
/**
|
|
309
|
+
* Emits when option menu button in children table was clicked.
|
|
310
|
+
*/
|
|
311
|
+
'toggleChildrenOption': [data: Data];
|
|
296
312
|
/**
|
|
297
313
|
* @deprecated use 'v-model:selected-data' instead.
|
|
298
314
|
*/
|
|
@@ -11,6 +11,18 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
11
11
|
type: ArrayConstructor;
|
|
12
12
|
required: false;
|
|
13
13
|
};
|
|
14
|
+
childrenUseOption: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
childrenOptions: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
required: false;
|
|
21
|
+
};
|
|
22
|
+
childrenDataKey: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
required: false;
|
|
25
|
+
};
|
|
14
26
|
data: {
|
|
15
27
|
type: ArrayConstructor;
|
|
16
28
|
required: false;
|
|
@@ -95,10 +107,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
95
107
|
type: StringConstructor;
|
|
96
108
|
required: false;
|
|
97
109
|
};
|
|
98
|
-
roundedHeader: {
|
|
99
|
-
type: BooleanConstructor;
|
|
100
|
-
required: false;
|
|
101
|
-
};
|
|
102
110
|
router: {
|
|
103
111
|
type: ObjectConstructor;
|
|
104
112
|
required: true;
|
|
@@ -120,6 +128,18 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
120
128
|
type: ArrayConstructor;
|
|
121
129
|
required: false;
|
|
122
130
|
};
|
|
131
|
+
childrenUseOption: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
required: false;
|
|
134
|
+
};
|
|
135
|
+
childrenOptions: {
|
|
136
|
+
type: ArrayConstructor;
|
|
137
|
+
required: false;
|
|
138
|
+
};
|
|
139
|
+
childrenDataKey: {
|
|
140
|
+
type: StringConstructor;
|
|
141
|
+
required: false;
|
|
142
|
+
};
|
|
123
143
|
data: {
|
|
124
144
|
type: ArrayConstructor;
|
|
125
145
|
required: false;
|
|
@@ -204,10 +224,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
204
224
|
type: StringConstructor;
|
|
205
225
|
required: false;
|
|
206
226
|
};
|
|
207
|
-
roundedHeader: {
|
|
208
|
-
type: BooleanConstructor;
|
|
209
|
-
required: false;
|
|
210
|
-
};
|
|
211
227
|
router: {
|
|
212
228
|
type: ObjectConstructor;
|
|
213
229
|
required: true;
|
|
@@ -219,6 +235,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
219
235
|
}>>, {
|
|
220
236
|
loading: boolean;
|
|
221
237
|
useOption: boolean;
|
|
238
|
+
childrenUseOption: boolean;
|
|
222
239
|
disableAllRows: boolean;
|
|
223
240
|
isSelectedAll: boolean;
|
|
224
241
|
lazy: boolean;
|
|
@@ -226,6 +243,5 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
226
243
|
usePaginator: boolean;
|
|
227
244
|
singleSelect: boolean;
|
|
228
245
|
customColumn: boolean;
|
|
229
|
-
roundedHeader: boolean;
|
|
230
246
|
}, {}>;
|
|
231
247
|
export default _sfc_main;
|
|
@@ -4,6 +4,7 @@ import exportToExcel from './exportToExcel.util';
|
|
|
4
4
|
import { formatDate, formatDateReadable } from './date.util';
|
|
5
5
|
import useToast from './toast.util';
|
|
6
6
|
import getImageURL from './getImageURL.util';
|
|
7
|
+
import getTransactionRole from './transactionRoles.util';
|
|
7
8
|
import { getCurrency, formatCurrency } from './currency.util';
|
|
8
9
|
import { unListenSidebarChanges, listenSidebarChanges } from './listenSidebarChanges.util';
|
|
9
10
|
import { getBaseURL, getHostName } from './getBaseURL.util';
|
|
@@ -11,4 +12,4 @@ import useI18n from './tanslation.util';
|
|
|
11
12
|
import { getSeverityByAssetStatus } from './getSeverityByAssetStatus.util';
|
|
12
13
|
declare const isObjectEmpty: (object: object) => boolean;
|
|
13
14
|
declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
|
|
14
|
-
export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, formatUserName, formatVowelSoundLabel, exportToExcel, formatDate, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, };
|
|
15
|
+
export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, formatUserName, formatVowelSoundLabel, exportToExcel, formatDate, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, getTransactionRole, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type TransactionRole = {
|
|
2
|
+
manager: boolean;
|
|
3
|
+
monitoringReport: boolean;
|
|
4
|
+
staff: boolean;
|
|
5
|
+
approver: boolean;
|
|
6
|
+
};
|
|
7
|
+
export interface UserLogin {
|
|
8
|
+
transactionRoles: {
|
|
9
|
+
auditRole: TransactionRole;
|
|
10
|
+
borrowingRole: TransactionRole;
|
|
11
|
+
disposalRole: TransactionRole;
|
|
12
|
+
maintenanceRole: TransactionRole;
|
|
13
|
+
repairRole: TransactionRole;
|
|
14
|
+
trackingRole: TransactionRole;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const getTransactionRole: (name: keyof UserLogin['transactionRoles']) => TransactionRole;
|
|
18
|
+
export default getTransactionRole;
|