tsv2-library 1.0.61-alpha.13 → 1.0.61-alpha.132
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 +27 -2
- 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 +27 -2
- 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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds and transforms body parameters by parsing JSON strings if valid.
|
|
3
|
+
* @param params - Optional record of key-value pairs where values can be of any type
|
|
4
|
+
* @returns A new record with the same keys but JSON strings parsed into objects
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // With JSON string value
|
|
9
|
+
* buildBodyParams({ data: '{"foo": "bar"}' })
|
|
10
|
+
* // Returns: { data: { foo: "bar" } }
|
|
11
|
+
*
|
|
12
|
+
* // With non-JSON value
|
|
13
|
+
* buildBodyParams({ data: "plain string" })
|
|
14
|
+
* // Returns: { data: "plain string" }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const buildBodyParams: (params?: Record<string, unknown>) => Record<string, unknown>;
|
|
@@ -28,5 +28,23 @@ declare const hasAnyMonitoringReportRole: () => boolean;
|
|
|
28
28
|
declare const hasStaffRole: (name: TransactionAttribute) => boolean;
|
|
29
29
|
declare const hasMonitoringReportRole: (name: TransactionAttribute) => boolean;
|
|
30
30
|
declare const hasApprovalRole: (name: TransactionAttribute) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Vue Router navigation guard that checks user access based on the route's metadata
|
|
33
|
+
* and the user's type retrieved from local storage.
|
|
34
|
+
*
|
|
35
|
+
* Access is granted if:
|
|
36
|
+
* 1. The user is currently logging out (flag checked by `checkLogoutFlag`).
|
|
37
|
+
* 2. The route's `meta.hasAccess` is true AND the user is an 'Admin'.
|
|
38
|
+
* 3. The route's `meta.hasAccess` is true AND the route is a special exemption path
|
|
39
|
+
* ('handover-confirmation' or 'my-profile').
|
|
40
|
+
*
|
|
41
|
+
* If access is denied, navigation is redirected to '/not-found'.
|
|
42
|
+
*
|
|
43
|
+
* @param {RouteLocationNormalized} to - The target route location object.
|
|
44
|
+
* @param {RouteLocationNormalized} from - The current route location object.
|
|
45
|
+
* @param {NavigationGuardNext} next - The function to call to resolve the hook.
|
|
46
|
+
* @returns {void}
|
|
47
|
+
*/
|
|
31
48
|
declare const checkRouteAccess: (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => void;
|
|
32
|
-
|
|
49
|
+
declare const hasAccessToAssetDetail: () => boolean;
|
|
50
|
+
export { getTransactionRole, getSystemRole, hasTransactionRole, hasApprovalRole, hasSystemRole, checkRouteAccess, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Asset } from '../types/assets.type';
|
|
1
2
|
export declare const formatVowelSoundLabel: (label?: string) => string;
|
|
2
3
|
export declare const formatUserName: (name?: string) => string;
|
|
3
4
|
export declare const formatTagCode: (tagCode?: string) => string;
|
|
5
|
+
export declare const formatDisplayAssetName: (asset: Asset) => string;
|
|
6
|
+
export declare const formatDisplayAssetId: (asset: Asset) => string;
|
|
4
7
|
export default formatUserName;
|