tsv2-library 0.0.25 → 0.0.26
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/main.d.ts +2 -0
- package/dist/src/build-entry.d.ts +9 -0
- package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +12 -12
- package/dist/src/components/v2/Icon/Icon.vue.d.ts +3 -0
- package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +33 -0
- package/dist/src/components/v2/index.d.ts +29 -0
- package/dist/src/types/fieldValidation.type.d.ts +9 -0
- package/dist/src/types/generalSettings.type.d.ts +27 -0
- package/dist/src/types/options.d.ts +21 -0
- package/dist/src/utils/date.util.d.ts +9 -0
- package/dist/src/utils/exportToExcel.util.d.ts +7 -0
- package/dist/src/utils/index.d.ts +9 -0
- package/dist/src/utils/textFormater.util.d.ts +3 -0
- package/dist/tsv2-library.cjs.js +61 -61
- package/dist/tsv2-library.cjs.js.map +1 -1
- package/dist/tsv2-library.es.js +1296 -1111
- package/dist/tsv2-library.es.js.map +1 -1
- package/dist/tsv2-library.umd.js +76 -76
- package/dist/tsv2-library.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/v2/DataTable/DataTable.vue.d.ts +12 -12
- package/src/components/v2/Icon/Icon.vue.d.ts +3 -0
- package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +33 -0
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import LibConfig from '../node_modules/primevue/config';
|
|
3
|
+
import { addTokenExpirationHandling, exportToExcel, filterSelectedTreeKeys, formatDate, formatUserName, formatVowelSoundLabel, getImgURL, isObjectEmpty } from './utils';
|
|
4
|
+
import { TSBadge, TSBreadcrumb, TSButton, TSButtonBulkAction, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonSearch, TSButtonToggle, TSCalendar, TSCard, TSCheckbox, TSDataTable, TSDialog, TSDialogConfirm, TSDropdown, TSFilterContainer, TSForm, TSIcon, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSTransactionRoles, TSValidatorMessage } from './components/v2';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
install: (app: App) => void;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export { LibConfig, TSBadge, TSBreadcrumb, TSButton, TSButtonBulkAction, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonSearch, TSButtonToggle, TSCalendar, TSCard, TSCheckbox, TSDataTable, TSDialog, TSDialogConfirm, TSDropdown, TSFilterContainer, TSForm, TSIcon, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSTransactionRoles, TSValidatorMessage, addTokenExpirationHandling, exportToExcel, filterSelectedTreeKeys, formatDate, formatUserName, formatVowelSoundLabel, getImgURL, isObjectEmpty, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { Component } from 'vue';
|
|
3
3
|
|
|
4
|
-
type Data = Record<string,
|
|
4
|
+
type Data = Record<string, any>;
|
|
5
5
|
|
|
6
6
|
export type FetchResponse = {
|
|
7
7
|
data: Data[];
|
|
@@ -11,9 +11,9 @@ export type FetchResponse = {
|
|
|
11
11
|
export type TableCellComponent = {
|
|
12
12
|
component: string | Component;
|
|
13
13
|
props?: object;
|
|
14
|
-
model?:
|
|
15
|
-
events?:
|
|
16
|
-
onChange?: (itemData:
|
|
14
|
+
model?: any;
|
|
15
|
+
events?: any;
|
|
16
|
+
onChange?: (itemData: any) => void;
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -27,25 +27,25 @@ export type TableColumn = {
|
|
|
27
27
|
* Exclude column from download/export excel.
|
|
28
28
|
*/
|
|
29
29
|
excluded?: boolean;
|
|
30
|
-
bodyStyle?: (props:
|
|
31
|
-
bodyTemplate?: (data:
|
|
32
|
-
bodyComponent?: (data:
|
|
30
|
+
bodyStyle?: (props: any) => string;
|
|
31
|
+
bodyTemplate?: (data: any) => string | undefined;
|
|
32
|
+
bodyComponent?: (data: any) => TableCellComponent;
|
|
33
33
|
headerTemplate?: () => string;
|
|
34
34
|
headerComponent?: () => {
|
|
35
35
|
component: string | Component;
|
|
36
36
|
props?: object;
|
|
37
|
-
model?:
|
|
38
|
-
events?:
|
|
39
|
-
onChange?: (data:
|
|
37
|
+
model?: any;
|
|
38
|
+
events?: any;
|
|
39
|
+
onChange?: (data: any) => void;
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export type TableOption = {
|
|
45
45
|
label?: string;
|
|
46
|
-
command?: (data?:
|
|
46
|
+
command?: (data?: any) => any;
|
|
47
47
|
icon?: string;
|
|
48
|
-
items?:
|
|
48
|
+
items?: any[];
|
|
49
49
|
class?: string;
|
|
50
50
|
disabled?: boolean;
|
|
51
51
|
separator?: boolean;
|
|
@@ -13,6 +13,8 @@ export type TSVueIcons =
|
|
|
13
13
|
| 'arrow-down'
|
|
14
14
|
| 'arrow-drop-down'
|
|
15
15
|
| 'arrow-left'
|
|
16
|
+
| 'audit'
|
|
17
|
+
| 'borrow'
|
|
16
18
|
| 'calendar'
|
|
17
19
|
| 'check'
|
|
18
20
|
| 'checkbox-circle'
|
|
@@ -45,6 +47,7 @@ export type TSVueIcons =
|
|
|
45
47
|
| 'refresh'
|
|
46
48
|
| 'replace-tag'
|
|
47
49
|
| 'report-tag'
|
|
50
|
+
| 'repair-ticketing'
|
|
48
51
|
| 'search'
|
|
49
52
|
| 'search-eye'
|
|
50
53
|
| 'settings'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type TransactionRoles = {
|
|
2
|
+
borrowAssign: boolean;
|
|
3
|
+
audit: boolean;
|
|
4
|
+
repairTicketing: boolean;
|
|
5
|
+
disposal: boolean;
|
|
6
|
+
maintenance: boolean;
|
|
7
|
+
tracking: boolean;
|
|
8
|
+
transfer: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type RoleData = {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
transactionRoles: TransactionRoles;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface TransactionRolesProps {
|
|
17
|
+
asset?: RoleData;
|
|
18
|
+
user?: RoleData;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* **TSVue V2 - TransactionRoles**
|
|
23
|
+
*
|
|
24
|
+
* _TransactionRoles is a component to show list of transaction role._
|
|
25
|
+
*
|
|
26
|
+
* --- ---
|
|
27
|
+
* 
|
|
28
|
+
*
|
|
29
|
+
* @group buttons
|
|
30
|
+
*/
|
|
31
|
+
declare const TransactionRoles: DefineComponent<TransactionRolesProps>;
|
|
32
|
+
|
|
33
|
+
export default TransactionRoles;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import TSBadge from './Badge/Badge.vue';
|
|
2
|
+
import TSBreadcrumb from './Breadcrumb/Breadcrumb.vue';
|
|
3
|
+
import TSButton from './Button/Button.vue';
|
|
4
|
+
import TSButtonBulkAction from './ButtonBulkAction/ButtonBulkAction.vue';
|
|
5
|
+
import TSButtonFilter from './ButtonFilter/ButtonFilter.vue';
|
|
6
|
+
import TSButtonDownload from './ButtonDownload/ButtonDownload.vue';
|
|
7
|
+
import TSButtonLogHistory from './ButtonLogHistory/ButtonLogHistory.vue';
|
|
8
|
+
import TSButtonRadio from './ButtonRadio/ButtonRadio.vue';
|
|
9
|
+
import TSButtonSearch from './ButtonSearch/ButtonSearch.vue';
|
|
10
|
+
import TSButtonToggle from './ButtonToggle/ButtonToggle.vue';
|
|
11
|
+
import TSButtonViewLog from './ButtonViewLog/ButtonViewLog.vue';
|
|
12
|
+
import TSCalendar from './Calendar/Calendar.vue';
|
|
13
|
+
import TSCard from './Card/Card.vue';
|
|
14
|
+
import TSCheckbox from './Checkbox/Checkbox.vue';
|
|
15
|
+
import TSDataTable from './DataTable/DataTable.vue';
|
|
16
|
+
import TSDropdown from './Dropdown/Dropdown.vue';
|
|
17
|
+
import TSDialog from './Dialog/Dialog.vue';
|
|
18
|
+
import TSDialogConfirm from './DialogConfirm/DialogConfirm.vue';
|
|
19
|
+
import TSFilterContainer from './FilterContainer/FilterContainer.vue';
|
|
20
|
+
import TSForm from './Form/Form.vue';
|
|
21
|
+
import TSIcon from './Icon/Icon.vue';
|
|
22
|
+
import TSInputEmail from './InputEmail/InputEmail.vue';
|
|
23
|
+
import TSInputNumber from './InputNumber/InputNumber.vue';
|
|
24
|
+
import TSInputText from './InputText/InputText.vue';
|
|
25
|
+
import TSMultiSelect from './MultiSelect/MultiSelect.vue';
|
|
26
|
+
import TSTabMenu from './TabMenu/TabMenu.vue';
|
|
27
|
+
import TSTransactionRoles from './TransactionRoles/TransactionRoles.vue';
|
|
28
|
+
import TSValidatorMessage from './ValidatorMessage/ValidatorMessage.vue';
|
|
29
|
+
export { TSBadge, TSBreadcrumb, TSButton, TSButtonBulkAction, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonSearch, TSButtonToggle, TSCalendar, TSCard, TSCheckbox, TSDataTable, TSDialog, TSDialogConfirm, TSDropdown, TSFilterContainer, TSForm, TSIcon, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSTransactionRoles, TSValidatorMessage, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldContext } from 'vee-validate';
|
|
2
|
+
import { Nullable } from '../../node_modules/primevue/ts-helpers';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
type FieldValue = Nullable<string> | Nullable<number> | string | string[] | number | number[] | boolean | undefined | null | object;
|
|
5
|
+
export type FieldValidation = {
|
|
6
|
+
value?: FieldValue;
|
|
7
|
+
errorMessage?: Ref<string | undefined>;
|
|
8
|
+
} | FieldContext;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type DateTextFormatOptions = {
|
|
2
|
+
localeMatcher?: 'best fit' | 'lookup';
|
|
3
|
+
weekday?: 'long' | 'short' | 'narrow';
|
|
4
|
+
era?: 'long' | 'short' | 'narrow';
|
|
5
|
+
year?: 'numeric' | '2-digit';
|
|
6
|
+
month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
|
|
7
|
+
day?: 'numeric' | '2-digit';
|
|
8
|
+
hour?: 'numeric' | '2-digit';
|
|
9
|
+
minute?: 'numeric' | '2-digit';
|
|
10
|
+
second?: 'numeric' | '2-digit';
|
|
11
|
+
timeZoneName?: 'short' | 'long' | 'shortOffset' | 'longOffset' | 'shortGeneric' | 'longGeneric';
|
|
12
|
+
formatMatcher?: 'best fit' | 'basic';
|
|
13
|
+
hour12?: boolean;
|
|
14
|
+
timeZone?: string;
|
|
15
|
+
};
|
|
16
|
+
export type DateFormat = {
|
|
17
|
+
locale: 'en-gb' | 'en-us' | 'id' | 'ja' | 'fr' | 'de';
|
|
18
|
+
year: 'numeric' | '2-digit';
|
|
19
|
+
month: 'numeric' | '2-digit' | 'short' | 'long';
|
|
20
|
+
day: 'numeric' | '2-digit';
|
|
21
|
+
} & Pick<DateTextFormatOptions, 'weekday'>;
|
|
22
|
+
export type GeneralSetting = {
|
|
23
|
+
currency: 'IDR' | 'USD' | 'EUR' | 'GBP';
|
|
24
|
+
timezone: string;
|
|
25
|
+
dateFormat: DateFormat;
|
|
26
|
+
timeFormat: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TSVueIcons } from '../components/v2/Icon/Icon.vue.d';
|
|
2
|
+
export type MenuOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
command: (data?: unknown) => unknown;
|
|
5
|
+
icon?: TSVueIcons;
|
|
6
|
+
items?: MenuOption[];
|
|
7
|
+
class?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
danger?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type OptionValue = string | number | boolean | Record<string, unknown>;
|
|
12
|
+
export type DropdownOption = {
|
|
13
|
+
label: string;
|
|
14
|
+
value?: OptionValue;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type MultiSelectOption = {
|
|
18
|
+
label: string;
|
|
19
|
+
value?: OptionValue;
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date according to the user's general settings.
|
|
3
|
+
*
|
|
4
|
+
* @param date - The date to be displayed. Can be a Date object or a string in a recognized date format.
|
|
5
|
+
* @param useTime - Whether to include the time in the formatted date string. Defaults to false.
|
|
6
|
+
* @returns The formatted date string.
|
|
7
|
+
*/
|
|
8
|
+
declare const formatDate: (date: Date | string, useTime?: boolean) => string;
|
|
9
|
+
export default formatDate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { formatUserName, formatVowelSoundLabel } from './textFormater.util';
|
|
3
|
+
import exportToExcel from './exportToExcel.util';
|
|
4
|
+
import formatDate from './date.util';
|
|
5
|
+
declare const isObjectEmpty: (obj: object) => boolean;
|
|
6
|
+
declare const addTokenExpirationHandling: (instance: AxiosInstance) => void;
|
|
7
|
+
declare const filterSelectedTreeKeys: (keys: any) => number[];
|
|
8
|
+
declare const getImgURL: (fileName: string) => string;
|
|
9
|
+
export { isObjectEmpty, addTokenExpirationHandling, filterSelectedTreeKeys, getImgURL, formatUserName, formatVowelSoundLabel, exportToExcel, formatDate, };
|