tsv2-library 1.0.61-alpha.13 → 1.0.61-alpha.131
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/loading-0-1a7cddc8.js +4 -0
- package/dist/loading-1-892eee7c.js +4 -0
- package/dist/loading-2-bf39c889.js +4 -0
- package/dist/loading-3-f1ea4b15.js +4 -0
- package/dist/node_modules/@googlemaps/js-api-loader/src/deprecated.d.ts +7 -0
- package/dist/node_modules/@googlemaps/js-api-loader/src/index.d.ts +52 -0
- package/dist/node_modules/@googlemaps/js-api-loader/src/messages.d.ts +9 -0
- package/dist/src/build-entry.d.ts +5 -2830
- package/dist/src/components/v2/AssetInfo/AssetInfo.vue.d.ts +4 -4
- package/dist/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
- package/dist/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +7 -1
- package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
- package/dist/src/components/v2/CustomColumn/DialogColumnSetup.vue.d.ts +4 -0
- package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
- package/dist/src/components/v2/DialogAssetNameDetail/DialogAssetNameDetail.vue.d.ts +3 -1
- package/dist/src/components/v2/DialogCoordinate/AssetList.vue.d.ts +4 -0
- package/dist/src/components/v2/DialogCoordinate/AssetListFilter.vue.d.ts +4 -0
- package/dist/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
- package/dist/src/components/v2/DialogCoordinate/FullscreenToggle.vue.d.ts +4 -0
- package/dist/src/components/v2/DialogCoordinate/MapSearch.vue.d.ts +15 -0
- package/dist/src/components/v2/DialogCoordinate/Marker.vue.d.ts +13 -0
- package/dist/src/components/v2/DialogCoordinate/PopupDetail.vue.d.ts +13 -0
- package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +10 -0
- package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +59 -0
- package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
- package/dist/src/components/v2/DialogReportDamage/DialogReportDamage.vue.d.ts +8 -0
- package/dist/src/components/v2/DialogReportMissing/DialogReportMissing.vue.d.ts +8 -0
- package/dist/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +13 -9
- package/dist/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +9 -1
- package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +16 -0
- package/dist/src/components/v2/FileUpload/FileUpload.vue.d.ts +4 -0
- package/dist/src/components/v2/Form/Form.vue.d.ts +2 -0
- package/dist/src/components/v2/HardwareSync/HardwareSync.vue.d.ts +2 -2
- package/dist/src/components/v2/Icon/Icon.vue.d.ts +11 -0
- package/dist/src/components/v2/ImageCompressor/BackgroundImageCropper.vue.d.ts +1 -1
- package/dist/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
- package/dist/src/components/v2/InputCurrency/InputCurrency.vue.d.ts +5 -0
- package/dist/src/components/v2/InputCurrencyReference/InputCurrencyReference.vue.d.ts +30 -0
- package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
- package/dist/src/components/v2/LazyLoadTrigger/LazyLoadTrigger.vue.d.ts +4 -0
- package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
- package/dist/src/components/v2/Tree/Tree.vue.d.ts +4 -0
- package/dist/src/components/v2/index.d.ts +4 -1
- package/dist/src/dto/assets.dto.d.ts +17 -0
- package/dist/src/dto/missing.dto.d.ts +1 -0
- package/dist/src/dto/tagTransaction.dto.d.ts +9 -0
- package/dist/src/event-bus/index.d.ts +8 -0
- package/dist/src/event-bus/mitt.d.ts +26 -0
- package/dist/src/presets/multiselect/index.js +1 -0
- package/dist/src/presets/paginator/index.js +1 -1
- package/dist/src/services/assets.service.d.ts +7 -2
- package/dist/src/services/column.service.d.ts +13 -0
- package/dist/src/services/deviceIOT.service.d.ts +1 -0
- package/dist/src/services/tagTransaction.service.d.ts +1 -1
- package/dist/src/services/tree.service.d.ts +1 -0
- package/dist/src/types/assets.type.d.ts +32 -11
- package/dist/src/utils/changelog.util.d.ts +69 -0
- package/dist/src/utils/createVueControl.d.ts +8 -0
- package/dist/src/utils/customMarker.util.d.ts +64 -0
- package/dist/src/utils/debounce.util.d.ts +1 -0
- package/dist/src/utils/exportToExcel.util.d.ts +1 -0
- package/dist/src/utils/getImageURL.util.d.ts +11 -2
- package/dist/src/utils/googleMapLoader.util.d.ts +1 -0
- package/dist/src/utils/index.d.ts +8 -4
- package/dist/src/utils/json.util.d.ts +17 -0
- package/dist/src/utils/request.util.d.ts +17 -0
- package/dist/src/utils/role.util.d.ts +19 -1
- package/dist/src/utils/textFormater.util.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/tsv2-library.es.js +66435 -67823
- package/dist/tsv2-library.umd.js +47 -609
- package/package.json +6 -1
- package/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
- package/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +7 -1
- package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
- package/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
- package/src/components/v2/DialogAssetNameDetail/DialogAssetNameDetail.vue.d.ts +3 -1
- package/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
- package/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
- package/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +13 -9
- package/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +9 -1
- package/src/components/v2/FileUpload/FileUpload.vue.d.ts +4 -0
- package/src/components/v2/Form/Form.vue.d.ts +2 -0
- package/src/components/v2/Icon/Icon.vue.d.ts +11 -0
- package/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
- package/src/components/v2/InputCurrency/InputCurrency.vue.d.ts +5 -0
- package/src/components/v2/InputCurrencyReference/InputCurrencyReference.vue.d.ts +30 -0
- package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
- package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
- package/src/components/v2/Tree/Tree.vue.d.ts +4 -0
- package/src/presets/multiselect/index.js +1 -0
- package/src/presets/paginator/index.js +1 -1
- package/src/services/assets.service.ts +49 -1
- package/src/services/column.service.ts +42 -0
- package/src/services/deviceIOT.service.ts +8 -0
- package/src/services/tagTransaction.service.ts +2 -2
- package/src/services/tracking.service.ts +1 -1
- package/src/services/tree.service.ts +1 -0
- package/dist/loading-0-7762a473.js +0 -4
- package/dist/loading-1-55418796.js +0 -4
- package/dist/loading-2-b6abf641.js +0 -4
- package/dist/loading-3-705786b6.js +0 -4
- package/dist/src/components/v2/DataTable/store/dataTable.store.d.ts +0 -22
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { Nullable } from '../ts-helpers';
|
|
3
|
+
import { CoordinateValue } from '../DialogCoordinate/DialogCoordinate.vue.d';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* InputCoordinate component props
|
|
7
|
+
*/
|
|
8
|
+
export interface InputCoordinateProps {
|
|
9
|
+
modelValue?: Nullable<CoordinateValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Disabled state for both input fields.
|
|
12
|
+
*/
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Wether the input should be validated with vee-validator or not.
|
|
16
|
+
* If you use this component within form input, you need to set this props as true.
|
|
17
|
+
*/
|
|
18
|
+
useValidator?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* This prop is required if you use this component in a form input.
|
|
21
|
+
* Specify the unique field name, match with your needs for API request.
|
|
22
|
+
*
|
|
23
|
+
* @default 'coordinate'
|
|
24
|
+
*/
|
|
25
|
+
fieldName?: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Wether this input field is required or not.
|
|
29
|
+
*/
|
|
30
|
+
mandatory?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Invalid input state.
|
|
33
|
+
*/
|
|
34
|
+
invalid?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Set custom validator message.
|
|
37
|
+
* It is rarely use, this component has handled the validator message.
|
|
38
|
+
*/
|
|
39
|
+
validatorMessage?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* InputCoordinate component emits
|
|
44
|
+
*/
|
|
45
|
+
export type InputCoordinateEmits = {
|
|
46
|
+
'update:modelValue': [payload?: Nullable<CoordinateValue>];
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* **TSVue - InputCoordinate**
|
|
51
|
+
*
|
|
52
|
+
* _Handle coordinate input with latitude and longitude fields._
|
|
53
|
+
*
|
|
54
|
+
* --- ---
|
|
55
|
+
* 
|
|
56
|
+
*
|
|
57
|
+
* @group form
|
|
58
|
+
*/
|
|
59
|
+
declare const InputCoordinate: DefineComponent<
|
|
60
|
+
InputCoordinateProps,
|
|
61
|
+
InputCoordinateEmits
|
|
62
|
+
>;
|
|
63
|
+
|
|
64
|
+
export default InputCoordinate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import {
|
|
3
|
+
InputCurrencyEmits,
|
|
4
|
+
InputCurrencyProps,
|
|
5
|
+
} from '../InputCurrency/InputCurrency.vue.d';
|
|
6
|
+
|
|
7
|
+
export interface CurrencyValue {
|
|
8
|
+
currency: string; // Currency ISO Code
|
|
9
|
+
value?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* InputCurrencyReference component props
|
|
14
|
+
*/
|
|
15
|
+
export interface InputCurrencyReferenceProps extends InputCurrencyProps {
|
|
16
|
+
inputWrapperClass?: string;
|
|
17
|
+
inputClass?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* InputCurrencyReference component emits
|
|
22
|
+
*/
|
|
23
|
+
export type InputCurrencyReferenceEmits = InputCurrencyEmits;
|
|
24
|
+
|
|
25
|
+
declare const InputCurrencyReference: DefineComponent<
|
|
26
|
+
InputCurrencyReferenceProps,
|
|
27
|
+
InputCurrencyReferenceEmits
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export default InputCurrencyReference;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "visible"[], "visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
2
|
+
onVisible?: ((...args: any[]) => any) | undefined;
|
|
3
|
+
}, {}, {}>;
|
|
4
|
+
export default _sfc_main;
|
|
@@ -95,6 +95,10 @@ export interface TreeProps {
|
|
|
95
95
|
* Disable node 'All' selection
|
|
96
96
|
*/
|
|
97
97
|
disableNodeAll?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Disable level 2 (All > Level 1 > Level 2)
|
|
100
|
+
*/
|
|
101
|
+
disableSubChildren?: boolean;
|
|
98
102
|
/**
|
|
99
103
|
* Include node All key (-1) on Checkbox Selection
|
|
100
104
|
*
|
|
@@ -36,6 +36,7 @@ import TSDialog from './Dialog/Dialog.vue';
|
|
|
36
36
|
import TSDialogApprovalList from './DialogApprovalList/DialogApprovalList.vue';
|
|
37
37
|
import TSDialogAssetNameDetail from './DialogAssetNameDetail/DialogAssetNameDetail.vue';
|
|
38
38
|
import TSDialogConfirm from './DialogConfirm/DialogConfirm.vue';
|
|
39
|
+
import TSDialogCoordinate from './DialogCoordinate/DialogCoordinate.vue';
|
|
39
40
|
import TSDialogForm from './DialogForm/DialogForm.vue';
|
|
40
41
|
import TSDialogLinkedAsset from './DialogLinkedAsset/DialogLinkedAsset.vue';
|
|
41
42
|
import TSDialogPrintQR from './DialogPrintQR/DialogPrintQR.vue';
|
|
@@ -54,6 +55,8 @@ import TSImageCompressor from './ImageCompressor/ImageCompressor.vue';
|
|
|
54
55
|
import TSInlineMessage from './InlineMessage/InlineMessage.vue';
|
|
55
56
|
import TSInputBadge from './InputBadge/InputBadge.vue';
|
|
56
57
|
import TSInputCurrency from './InputCurrency/InputCurrency.vue';
|
|
58
|
+
import TSInputCurrencyReference from './InputCurrencyReference/InputCurrencyReference.vue';
|
|
59
|
+
import TSInputCoordinate from './InputCoordinate/InputCoordinate.vue';
|
|
57
60
|
import TSInputEmail from './InputEmail/InputEmail.vue';
|
|
58
61
|
import TSInputNumber from './InputNumber/InputNumber.vue';
|
|
59
62
|
import TSInputOTP from './InputOTP/InputOTP.vue';
|
|
@@ -81,4 +84,4 @@ import TSTree from './Tree/Tree.vue';
|
|
|
81
84
|
import TSTreeSearchInput from './TreeSearchInput/TreeSearchInput.vue';
|
|
82
85
|
import TSUserWithIcon from './UserWithIcon/UserWithIcon.vue';
|
|
83
86
|
import TSValidatorMessage from './ValidatorMessage/ValidatorMessage.vue';
|
|
84
|
-
export { DialogTransferLog, DialogDamageLog, DialogMissingLog, 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, TSCustomColumn, TSDataTable, TSDatePicker, TSDayPicker, 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, TSInputSearch, TSInputText, TSInputTextArea, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, };
|
|
87
|
+
export { DialogTransferLog, DialogDamageLog, DialogMissingLog, 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, TSCustomColumn, TSDataTable, TSDatePicker, TSDayPicker, TSDialog, TSDialogApprovalList, TSDialogAssetNameDetail, TSDialogConfirm, TSDialogCoordinate, TSDialogForm, TSDialogLinkedAsset, TSDialogPrintQR, TSDialogReportDamage, TSDialogReportMissing, TSDialogReportTag, TSDialogSelectTree, TSDialogSelectAsset, TSDialogSelectUser, TSDisposalReport, TSDropdown, TSFilterContainer, TSFileUpload, TSForm, TSIcon, TSImage, TSImageCompressor, TSInlineMessage, TSInputBadge, TSInputCurrency, TSInputCurrencyReference, TSInputCoordinate, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputSearch, TSInputText, TSInputTextArea, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AssetMap } from '../types/assets.type';
|
|
1
2
|
import { DataTableParams } from '../types/dataTable.type';
|
|
2
3
|
import { DialogSelectAssetFilterModels } from '../components/v2/DialogSelectAsset/DialogSelectAsset.vue.d';
|
|
3
4
|
export type DialogSelectAssetFilterQueryParams = Partial<Record<keyof DialogSelectAssetFilterModels, string>>;
|
|
@@ -6,6 +7,9 @@ export type GetAllAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQ
|
|
|
6
7
|
search?: string;
|
|
7
8
|
excludeId?: string;
|
|
8
9
|
tag?: string;
|
|
10
|
+
maintenanceAuditStatus?: string[];
|
|
11
|
+
coordinate?: boolean;
|
|
12
|
+
map?: boolean[];
|
|
9
13
|
};
|
|
10
14
|
export type GetAvailableAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQueryParams & {
|
|
11
15
|
search?: string;
|
|
@@ -13,6 +17,7 @@ export type GetAvailableAssetsQueryParams = DataTableParams & DialogSelectAssetF
|
|
|
13
17
|
tag?: string;
|
|
14
18
|
mode?: string;
|
|
15
19
|
asset?: string;
|
|
20
|
+
maintenanceAuditStatus?: string[];
|
|
16
21
|
};
|
|
17
22
|
export type GetAssetDetailParams = DataTableParams & {
|
|
18
23
|
tag?: string;
|
|
@@ -22,6 +27,18 @@ export interface GetLinkedAssetFamiliesResponse {
|
|
|
22
27
|
message: string;
|
|
23
28
|
data: Datum[];
|
|
24
29
|
}
|
|
30
|
+
export interface GetAssetMapResponse {
|
|
31
|
+
status: number;
|
|
32
|
+
message: string;
|
|
33
|
+
data: AssetMap[];
|
|
34
|
+
}
|
|
35
|
+
export interface GetAssetMapParams {
|
|
36
|
+
east?: number;
|
|
37
|
+
west?: number;
|
|
38
|
+
north?: number;
|
|
39
|
+
south?: number;
|
|
40
|
+
search?: string;
|
|
41
|
+
}
|
|
25
42
|
interface Datum {
|
|
26
43
|
_id: string;
|
|
27
44
|
parent: Parent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Emitter } from './mitt';
|
|
2
|
+
export type TableEvent = {
|
|
3
|
+
tableName?: string;
|
|
4
|
+
};
|
|
5
|
+
export type Events<CustomEvents = Record<string, unknown>> = CustomEvents;
|
|
6
|
+
declare const eventBus: Emitter<Record<string, unknown>>;
|
|
7
|
+
export declare const extendEventBus: <T extends Record<string, unknown>>() => Emitter<T>;
|
|
8
|
+
export default eventBus;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type EventType = string | symbol;
|
|
2
|
+
export type Handler<T = unknown> = (event: T) => void;
|
|
3
|
+
export type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
|
|
4
|
+
export type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
5
|
+
export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
|
|
6
|
+
export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
|
|
7
|
+
export interface Emitter<Events extends Record<EventType, unknown>> {
|
|
8
|
+
all: EventHandlerMap<Events>;
|
|
9
|
+
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
|
|
10
|
+
on(type: '*', handler: WildcardHandler<Events>): void;
|
|
11
|
+
off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
|
|
12
|
+
off(type: '*', handler: WildcardHandler<Events>): void;
|
|
13
|
+
emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
|
|
14
|
+
emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Mitt: Tiny (~200b) functional event emitter / pubsub.
|
|
18
|
+
* @name mitt
|
|
19
|
+
* @returns {Mitt}
|
|
20
|
+
*/
|
|
21
|
+
export default function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>;
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
eventBus: Emitter<any>;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
-
import { GetAllAssetsQueryParams, GetAssetDetailParams, GetAvailableAssetsQueryParams, GetLinkedAssetFamiliesResponse } from '../dto/assets.dto';
|
|
2
|
+
import { GetAllAssetsQueryParams, GetAssetDetailParams, GetAssetMapParams, GetAssetMapResponse, GetAvailableAssetsQueryParams, GetLinkedAssetFamiliesResponse } from '../dto/assets.dto';
|
|
3
3
|
import { AssetOptionField } from '../components/v2/DialogSelectAsset/DialogSelectAsset.vue.d';
|
|
4
4
|
export interface ServiceOptions {
|
|
5
5
|
headers?: Record<string, unknown>;
|
|
6
6
|
params?: Record<string, unknown>;
|
|
7
|
+
usePrefix?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
|
|
9
|
+
export declare const API: ({ headers, params, usePrefix, }?: ServiceOptions) => AxiosInstance;
|
|
9
10
|
declare const _default: {
|
|
10
11
|
getAllAssets: (params: GetAllAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
|
|
12
|
+
postAssetList: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
|
|
13
|
+
postAssetOption: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
|
|
11
14
|
getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
|
|
15
|
+
postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
|
|
12
16
|
getAssetsById: (_id: string, params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
|
|
13
17
|
getAssetDetail: (id: string, params?: GetAssetDetailParams | undefined) => Promise<AxiosResponse<any, any>>;
|
|
14
18
|
matchAssetWithTag: (id: string, tag?: string | undefined) => Promise<AxiosResponse<any, any>>;
|
|
@@ -20,5 +24,6 @@ declare const _default: {
|
|
|
20
24
|
mode?: string | undefined;
|
|
21
25
|
}) | undefined) => Promise<AxiosResponse<any, any>>;
|
|
22
26
|
scanAsset: (tag: string) => Promise<AxiosResponse<any, any>>;
|
|
27
|
+
getAssetMaps: (params?: GetAssetMapParams | undefined) => Promise<AxiosResponse<GetAssetMapResponse, any>>;
|
|
23
28
|
};
|
|
24
29
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DataTableColumnConfig } from '../components/v2/CustomColumn/CustomColumn.vue.d';
|
|
2
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
3
|
+
export declare const API: ({ headers, params }?: {
|
|
4
|
+
headers?: {} | undefined;
|
|
5
|
+
params?: {} | undefined;
|
|
6
|
+
}) => AxiosInstance;
|
|
7
|
+
declare const ColumnServices: {
|
|
8
|
+
getColumnSetup: (tableId: string) => Promise<AxiosResponse<{
|
|
9
|
+
data: DataTableColumnConfig[];
|
|
10
|
+
}>>;
|
|
11
|
+
editColumnSetup: (tableId: string, body: DataTableColumnConfig[]) => Promise<AxiosResponse>;
|
|
12
|
+
};
|
|
13
|
+
export default ColumnServices;
|
|
@@ -6,6 +6,6 @@ export interface ServiceOptions {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
|
|
8
8
|
declare const _default: {
|
|
9
|
-
reportTag: (
|
|
9
|
+
reportTag: (body: ReportTagBody) => Promise<AxiosResponse<any, any>>;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -19,6 +19,7 @@ export interface TreeQueryParams {
|
|
|
19
19
|
systemRole?: string;
|
|
20
20
|
transactionAttribute?: string;
|
|
21
21
|
roleType?: string;
|
|
22
|
+
showAll?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare const API: ({ type, headers, params, }?: ServiceOptions) => AxiosInstance;
|
|
24
25
|
declare const TreeServices: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CurrencyValue } from '../components/v2/InputCurrency/InputCurrency.vue.d';
|
|
1
2
|
import { LinkedAsset } from '../components/v2/DialogLinkedAsset/DialogLinkedAsset.vue.d';
|
|
2
3
|
export type AssetFieldObject = {
|
|
3
4
|
_id?: string;
|
|
@@ -44,6 +45,7 @@ export type Asset = {
|
|
|
44
45
|
assetBrand?: AssetFieldObject;
|
|
45
46
|
assetModel?: AssetFieldObject;
|
|
46
47
|
assetTagType?: string;
|
|
48
|
+
assetValue?: CurrencyValue;
|
|
47
49
|
assignedTo?: string;
|
|
48
50
|
isTransactionable?: boolean;
|
|
49
51
|
addOn?: {
|
|
@@ -60,16 +62,35 @@ export type Asset = {
|
|
|
60
62
|
};
|
|
61
63
|
lastModifier?: string;
|
|
62
64
|
updatedAt?: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
secondImageBig?: string;
|
|
71
|
-
assetImageSmall?: string;
|
|
72
|
-
assetImageMedium?: string;
|
|
73
|
-
assetImageBig?: string;
|
|
65
|
+
tagReported: {
|
|
66
|
+
rfid?: string;
|
|
67
|
+
qr?: string;
|
|
68
|
+
};
|
|
69
|
+
firstImage?: string;
|
|
70
|
+
secondImage?: string;
|
|
71
|
+
assetImage?: string;
|
|
74
72
|
setDefault?: 'firstImage' | 'secondImage';
|
|
73
|
+
auditStatus?: string;
|
|
74
|
+
maintenanceStatus?: string;
|
|
75
|
+
transactions?: TransactionPolicyType;
|
|
76
|
+
formattedAssetValue?: string;
|
|
77
|
+
address?: string;
|
|
78
|
+
latitude: number | null;
|
|
79
|
+
longitude: number | null;
|
|
80
|
+
registeredAssetId?: string;
|
|
81
|
+
};
|
|
82
|
+
export type TransactionPolicyType = {
|
|
83
|
+
borrowing: boolean;
|
|
84
|
+
assignment: boolean;
|
|
85
|
+
transfer: boolean;
|
|
86
|
+
disposal: boolean;
|
|
87
|
+
maintenance: boolean;
|
|
88
|
+
audit: boolean;
|
|
89
|
+
repairTicketing: boolean;
|
|
90
|
+
tracking: boolean;
|
|
75
91
|
};
|
|
92
|
+
export interface AssetMap {
|
|
93
|
+
_id: string;
|
|
94
|
+
latitude: number;
|
|
95
|
+
longitude: number;
|
|
96
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { FetchResponse } from '../components/v2/DataTable/DataTable.vue.d';
|
|
2
|
+
/**
|
|
3
|
+
* Format the response data from the API to display in the changelog table.
|
|
4
|
+
* This function formats the date and currency fields in the response data.
|
|
5
|
+
* It also formats the datetime fields if the field value is a valid ISO datetime string.
|
|
6
|
+
* @param {object} data - The response data from the API.
|
|
7
|
+
* @param {ChangelogObject} object - The changelog object.
|
|
8
|
+
* @returns {FetchResponse} - The formatted response data.
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatLogResponseData: (data: {
|
|
11
|
+
data: {
|
|
12
|
+
data: Record<string, unknown>[];
|
|
13
|
+
totalRecords?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
}) => FetchResponse;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if a given value is a valid ISO datetime string.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} [value] - The value to be checked.
|
|
20
|
+
* @returns {boolean} - `true` if the value is a valid ISO datetime string, `false` otherwise.
|
|
21
|
+
*/
|
|
22
|
+
export declare const isValidDateISOString: (value?: string) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Safely parse a JSON string into an object of type T.
|
|
25
|
+
* If the input is not a string or is not a valid JSON string, return null.
|
|
26
|
+
* If the parsing fails, return null.
|
|
27
|
+
* @template T
|
|
28
|
+
* @param {unknown} value - The value to parse.
|
|
29
|
+
* @returns {T | null}
|
|
30
|
+
*/
|
|
31
|
+
export declare const safeJsonParse: <T = string>(value?: unknown) => T | null;
|
|
32
|
+
/**
|
|
33
|
+
* Formats a date value from a string into a human-readable format.
|
|
34
|
+
* If the input is not a valid ISO datetime string, returns the original value.
|
|
35
|
+
* If the input is a valid ISO datetime string, returns a formatted date string.
|
|
36
|
+
* If the withTime parameter is true, includes the time in the formatted date string.
|
|
37
|
+
* @param {string} [value] - The date value to format.
|
|
38
|
+
* @param {boolean} [withTime] - Whether to include the time in the formatted date string.
|
|
39
|
+
* @returns {string | unknown} - The formatted date string, or the original value if the input is not a valid ISO datetime string.
|
|
40
|
+
*/
|
|
41
|
+
export declare const formatDateValue: (value?: string, withTime?: boolean) => string | unknown;
|
|
42
|
+
/**
|
|
43
|
+
* Checks if a given value is a valid JSON string that contains the 'dataType' key.
|
|
44
|
+
* @param {unknown} [value] - The value to be checked.
|
|
45
|
+
* @returns {boolean} - `true` if the value is a valid JSON string that contains the 'dataType' key, `false` otherwise.
|
|
46
|
+
*/
|
|
47
|
+
export declare const hasDataType: (value?: unknown) => boolean;
|
|
48
|
+
export declare const isCurrency: (value?: unknown) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Formats the 'newValue' and 'oldValue' properties of a given object from ISO datetime strings into human-readable formats.
|
|
51
|
+
* If the input values are not valid ISO datetime strings, they are left unchanged.
|
|
52
|
+
* The formatted date strings will include the time.
|
|
53
|
+
* @param {Record<string, unknown>} d - The object with 'newValue' and 'oldValue' properties to format.
|
|
54
|
+
*/
|
|
55
|
+
export declare const formatDateTimeField: (d: Record<string, unknown>) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Formats the 'newValue' and 'oldValue' properties of a given object from JSON strings containing ISO datetime strings into human-readable formats.
|
|
58
|
+
* If the input values are not valid JSON strings or do not contain the 'value' key, they are left unchanged.
|
|
59
|
+
* The formatted date strings will include the time.
|
|
60
|
+
* @param {Record<string, unknown>} d - The object with 'newValue' and 'oldValue' properties to format.
|
|
61
|
+
*/
|
|
62
|
+
export declare const formatDateFieldFromJson: (d: Record<string, unknown>) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Formats a given value from a JSON string containing a 'currency' and 'value' key into a human-readable currency string.
|
|
65
|
+
* If the input value is not a valid JSON string or does not contain the 'currency' key, it is left unchanged.
|
|
66
|
+
* @param {unknown} value - The value to be formatted.
|
|
67
|
+
* @returns {unknown} - The formatted value if it is a valid JSON string containing the 'currency' key, the original value otherwise.
|
|
68
|
+
*/
|
|
69
|
+
export declare const formatCurrencyField: (value: unknown) => unknown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export declare const createVueControl: (component: Component, options?: {
|
|
3
|
+
props?: Record<string, unknown> | undefined;
|
|
4
|
+
emits?: Record<string, (...args: unknown[]) => void> | undefined;
|
|
5
|
+
} | undefined) => {
|
|
6
|
+
el: HTMLDivElement;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export type MarkerConfig = {
|
|
3
|
+
kind: 'pin';
|
|
4
|
+
pinOptions?: google.maps.marker.PinElementOptions;
|
|
5
|
+
title?: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'img';
|
|
8
|
+
src: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'svgString';
|
|
12
|
+
svg: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'customElement';
|
|
16
|
+
createElement: () => HTMLElement;
|
|
17
|
+
title?: string;
|
|
18
|
+
};
|
|
19
|
+
export interface MapControl {
|
|
20
|
+
position?: google.maps.ControlPosition;
|
|
21
|
+
index?: number;
|
|
22
|
+
createElement: (ctx: {
|
|
23
|
+
map: google.maps.Map;
|
|
24
|
+
}) => HTMLElement;
|
|
25
|
+
}
|
|
26
|
+
export interface MapFocusConfig {
|
|
27
|
+
name: string;
|
|
28
|
+
featureType: google.maps.FeatureType;
|
|
29
|
+
featureStyleOptions: google.maps.FeatureStyleOptions;
|
|
30
|
+
}
|
|
31
|
+
export interface CustomMarkerOptions {
|
|
32
|
+
position: {
|
|
33
|
+
lat: number;
|
|
34
|
+
lng: number;
|
|
35
|
+
};
|
|
36
|
+
marker?: MarkerConfig;
|
|
37
|
+
title?: string;
|
|
38
|
+
popup?: string;
|
|
39
|
+
hoverable?: boolean;
|
|
40
|
+
draggable?: boolean;
|
|
41
|
+
clickable?: boolean;
|
|
42
|
+
onClick?: (marker: google.maps.marker.AdvancedMarkerElement) => void;
|
|
43
|
+
onDragEnd?: (marker: google.maps.marker.AdvancedMarkerElement) => void;
|
|
44
|
+
onHover?: (marker: google.maps.marker.AdvancedMarkerElement, isHovering: boolean) => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const createMarker: (options: CustomMarkerOptions) => Promise<google.maps.marker.AdvancedMarkerElement>;
|
|
47
|
+
type MarkerContext<T = unknown> = {
|
|
48
|
+
id: string;
|
|
49
|
+
marker: google.maps.marker.AdvancedMarkerElement;
|
|
50
|
+
data: T;
|
|
51
|
+
};
|
|
52
|
+
type UseMapMarkersReturn<T = unknown> = {
|
|
53
|
+
markers: Map<string, MarkerContext<T>>;
|
|
54
|
+
setMap: (nextMap: google.maps.Map) => void;
|
|
55
|
+
addMarker: (id: string, marker: google.maps.marker.AdvancedMarkerElement, data: T, onClick?: () => void) => void;
|
|
56
|
+
openMarker: (id: string, options?: {
|
|
57
|
+
component?: Component;
|
|
58
|
+
props?: Record<string, unknown>;
|
|
59
|
+
loadData?: () => Promise<Record<string, unknown>>;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
clearMarkers: () => void;
|
|
62
|
+
};
|
|
63
|
+
export declare const useMapMarkers: <T = unknown>() => UseMapMarkersReturn<T>;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const debounce: <T extends (...args: any[]) => void>(fn: T, delay?: number) => (...args: Parameters<T>) => void;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
1
|
+
export declare const buildFileURL: (name?: string, width?: number, height?: number) => string;
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param name The full URL, or the file token as it appears on the server
|
|
5
|
+
* @param fileName Custom File name
|
|
6
|
+
* @param immediateRevoke Immediately revoke the object URL after download - default to true
|
|
7
|
+
* @param viewNewTab View the file in a new tab - default to false
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const downloadFile: (name: string, customFileName?: string, immediateRevoke?: boolean, viewNewTab?: boolean) => Promise<string>;
|
|
11
|
+
export declare const getImageURL: (name?: string | null, width?: number, height?: number, returnURLOnly?: boolean) => Promise<string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const googleMapLoader: () => Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { formatUserName, formatVowelSoundLabel } from './textFormater.util';
|
|
1
|
+
import { formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName } from './textFormater.util';
|
|
2
2
|
import handleTokenExpiration from './handleTokenExpiration.util';
|
|
3
3
|
import exportToExcel from './exportToExcel.util';
|
|
4
4
|
import { formatGoDate, formatDate, formatDateReadable, getUserLocale } from './date.util';
|
|
5
5
|
import useToast from './toast.util';
|
|
6
|
-
import getImageURL from './getImageURL.util';
|
|
7
|
-
import { getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasAnyMonitoringReportRole, hasMonitoringReportRole, hasStaffRole } from './role.util';
|
|
6
|
+
import { getImageURL, downloadFile } from './getImageURL.util';
|
|
7
|
+
import { getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasAnyMonitoringReportRole, hasMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail } from './role.util';
|
|
8
8
|
import { getCurrency, formatCurrency } from './currency.util';
|
|
9
9
|
import { unListenSidebarChanges, listenSidebarChanges } from './listenSidebarChanges.util';
|
|
10
10
|
import { getBaseURL, getHostName } from './getBaseURL.util';
|
|
@@ -13,6 +13,10 @@ import { getSeverityByAssetStatus } from './getSeverityByAssetStatus.util';
|
|
|
13
13
|
import clearStorage from './clearStorage.util';
|
|
14
14
|
import forceLogout from './forceLogout.util';
|
|
15
15
|
import reLogin from './reLogin.util';
|
|
16
|
+
import { isValidJSONString } from './json.util';
|
|
17
|
+
import { buildBodyParams } from './request.util';
|
|
18
|
+
import { formatLogResponseData } from './changelog.util';
|
|
19
|
+
import { googleMapLoader } from './googleMapLoader.util';
|
|
16
20
|
declare const isObjectEmpty: (object: object) => boolean;
|
|
17
21
|
declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
|
|
18
|
-
export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, formatUserName, formatVowelSoundLabel, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, };
|
|
22
|
+
export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given value is a valid JSON string that represents an object or array.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The value to be checked
|
|
5
|
+
* @returns `true` if the value is a non-empty string that can be parsed into a valid JSON object or array,
|
|
6
|
+
* `false` otherwise
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* isValidJSONString('{"name": "John"}') // returns true
|
|
11
|
+
* isValidJSONString('[1, 2, 3]') // returns true
|
|
12
|
+
* isValidJSONString('123') // returns false (not an object/array)
|
|
13
|
+
* isValidJSONString('invalid json') // returns false
|
|
14
|
+
* isValidJSONString(null) // returns false
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const isValidJSONString: (value: unknown) => boolean;
|