tsv2-library 1.0.64 → 1.0.66

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.
Files changed (79) hide show
  1. package/dist/loading-table-fa-8b779ca8.js +4 -0
  2. package/dist/src/build-entry.d.ts +5 -3
  3. package/dist/src/components/v2/Animation/Animation.vue.d.ts +40 -0
  4. package/dist/src/components/v2/AssetAttribute/UrlFormat.vue.d.ts +22 -0
  5. package/dist/src/components/v2/CustomColumn/ColumnList.vue.d.ts +4 -0
  6. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +23 -1
  7. package/dist/src/components/v2/CustomColumn/DialogColumnSetup.vue.d.ts +4 -0
  8. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +16 -6
  9. package/dist/src/components/v2/Dialog/Dialog.vue.d.ts +1 -0
  10. package/dist/src/components/v2/DialogConfirm/DialogConfirm.vue.d.ts +5 -0
  11. package/dist/src/components/v2/DialogCoordinate/AssetList.vue.d.ts +4 -0
  12. package/dist/src/components/v2/DialogCoordinate/AssetListFilter.vue.d.ts +4 -0
  13. package/dist/src/components/v2/DialogCoordinate/CoordinateHeader.vue.d.ts +4 -0
  14. package/dist/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +24 -0
  15. package/dist/src/components/v2/DialogCoordinate/MapSearch.vue.d.ts +4 -2
  16. package/dist/src/components/v2/DialogCoordinate/Marker.vue.d.ts +13 -0
  17. package/dist/src/components/v2/DialogCoordinate/PopupDetail.vue.d.ts +13 -0
  18. package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +11 -0
  19. package/dist/src/components/v2/FailedLoad/FailedLoad.vue.d.ts +26 -0
  20. package/dist/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +20 -0
  21. package/dist/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +17 -0
  22. package/dist/src/components/v2/Icon/Icon.vue.d.ts +10 -0
  23. package/dist/src/components/v2/ImageCompressor/ImageCompressor.vue.d.ts +1 -1
  24. package/dist/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +9 -3
  25. package/dist/src/components/v2/InputPhoneNumber/InputPhoneNumber.vue.d.ts +1 -0
  26. package/dist/src/components/v2/InputText/InputText.vue.d.ts +1 -1
  27. package/dist/src/components/v2/InputURL/InputURL.vue.d.ts +1 -0
  28. package/dist/src/components/v2/LazyLoadTrigger/LazyLoadTrigger.vue.d.ts +4 -0
  29. package/dist/src/components/v2/Textarea/Textarea.vue.d.ts +1 -0
  30. package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +2 -0
  31. package/dist/src/components/v2/index.d.ts +6 -1
  32. package/dist/src/dto/assets.dto.d.ts +15 -0
  33. package/dist/src/event-bus/index.d.ts +8 -0
  34. package/dist/src/event-bus/mitt.d.ts +26 -0
  35. package/dist/src/presets/datatable/index.js +1 -1
  36. package/dist/src/services/assetName.service.d.ts +1 -2
  37. package/dist/src/services/assets.service.d.ts +6 -2
  38. package/dist/src/services/column.service.d.ts +13 -0
  39. package/dist/src/services/settingsAttribute.service.d.ts +8 -0
  40. package/dist/src/store/assetAttribute.store.d.ts +12 -0
  41. package/dist/src/store/index.d.ts +1 -0
  42. package/dist/src/types/assets.type.d.ts +24 -6
  43. package/dist/src/types/filterField.type.d.ts +35 -0
  44. package/dist/src/types/settingsAttribute.type.d.ts +28 -0
  45. package/dist/src/utils/customMarker.util.d.ts +64 -0
  46. package/dist/src/utils/debounce.util.d.ts +1 -0
  47. package/dist/src/utils/googleMapLoader.util.d.ts +1 -0
  48. package/dist/src/utils/index.d.ts +3 -2
  49. package/dist/src/utils/role.util.d.ts +1 -1
  50. package/dist/src/utils/textFormater.util.d.ts +5 -0
  51. package/dist/src/utils/toast.util.d.ts +1 -1
  52. package/dist/style.css +1 -1
  53. package/dist/tsv2-library.es.js +14206 -9773
  54. package/dist/tsv2-library.umd.js +7 -7
  55. package/package.json +3 -1
  56. package/src/components/v2/Animation/Animation.vue.d.ts +40 -0
  57. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +23 -1
  58. package/src/components/v2/DataTable/DataTable.vue.d.ts +16 -6
  59. package/src/components/v2/Dialog/Dialog.vue.d.ts +1 -0
  60. package/src/components/v2/DialogConfirm/DialogConfirm.vue.d.ts +5 -0
  61. package/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +24 -0
  62. package/src/components/v2/DialogForm/DialogForm.vue.d.ts +11 -0
  63. package/src/components/v2/FailedLoad/FailedLoad.vue.d.ts +26 -0
  64. package/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +20 -0
  65. package/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +17 -0
  66. package/src/components/v2/Icon/Icon.vue.d.ts +10 -0
  67. package/src/components/v2/ImageCompressor/ImageCompressor.vue.d.ts +1 -1
  68. package/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +9 -3
  69. package/src/components/v2/InputPhoneNumber/InputPhoneNumber.vue.d.ts +1 -0
  70. package/src/components/v2/InputText/InputText.vue.d.ts +1 -1
  71. package/src/components/v2/InputURL/InputURL.vue.d.ts +1 -0
  72. package/src/components/v2/Textarea/Textarea.vue.d.ts +1 -0
  73. package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +2 -0
  74. package/src/module.d.ts +3 -0
  75. package/src/presets/datatable/index.js +1 -1
  76. package/src/services/assets.service.ts +40 -1
  77. package/src/services/column.service.ts +42 -0
  78. package/src/services/settingsAttribute.service.ts +41 -0
  79. package/dist/src/components/v2/DataTable/store/dataTable.store.d.ts +0 -22
@@ -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
+ }
@@ -84,7 +84,7 @@ export default {
84
84
  tbody: ({ instance, context }) => ({
85
85
  class: [
86
86
  // 'border-t border-surface-300 dark:border-surface-600',
87
- '[&_tr:last-of-type>td]:!border-b-0',
87
+ // '[&_tr:last-of-type>td]:!border-b-0',
88
88
  '[&_tr:last-of-type>td:last-child]:!rounded-br-lg',
89
89
  '[&_tr:last-of-type>td:first-child]:!rounded-bl-lg',
90
90
  {
@@ -1,5 +1,4 @@
1
1
  import { AxiosInstance, AxiosResponse } from 'axios';
2
- import { QueryParams } from '../components/v2/DataTable/DataTable.vue.d';
3
2
  export interface ServiceOptions {
4
3
  headers?: Record<string, unknown>;
5
4
  params?: Record<string, unknown>;
@@ -30,7 +29,7 @@ export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstan
30
29
  declare const _default: {
31
30
  getAssetNameDetail: (id: string) => Promise<AxiosResponse<any, any>>;
32
31
  getAssetNameList: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
33
- getAssetsByAssetName: (id: string, params?: QueryParams | undefined) => Promise<AxiosResponse<any, any>>;
32
+ getAssetsByAssetName: (id: string, params?: Partial<Record<string, unknown>> | undefined) => Promise<AxiosResponse<any, any>>;
34
33
  getUnpairedAssetName: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
35
34
  getAssetNameDropdown: () => Promise<AxiosResponse<GetAssetNameDropdownResponse, any>>;
36
35
  getOptions: (params: AssetNameOptionsQueryParams) => Promise<AxiosResponse<any, any>>;
@@ -1,13 +1,16 @@
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>>;
12
15
  postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
13
16
  getAssetsById: (_id: string, params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
@@ -21,5 +24,6 @@ declare const _default: {
21
24
  mode?: string | undefined;
22
25
  }) | undefined) => Promise<AxiosResponse<any, any>>;
23
26
  scanAsset: (tag: string) => Promise<AxiosResponse<any, any>>;
27
+ getAssetMaps: (params?: GetAssetMapParams | undefined) => Promise<AxiosResponse<GetAssetMapResponse, any>>;
24
28
  };
25
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;
@@ -0,0 +1,8 @@
1
+ import { ShortFetchResponse } from '../components/v2/DataTable/DataTable.vue.d';
2
+ import { CustomField, DepreciationCategory } from '../types/settingsAttribute.type';
3
+ import { AxiosResponse } from 'axios';
4
+ declare const SettingsAttributeServices: {
5
+ getGeneralCustomFields: () => Promise<AxiosResponse<ShortFetchResponse<CustomField[]>>>;
6
+ getDepreciationCategory: () => Promise<AxiosResponse<ShortFetchResponse<DepreciationCategory[]>>>;
7
+ };
8
+ export default SettingsAttributeServices;
@@ -0,0 +1,12 @@
1
+ import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
2
+ import { FilterField } from '../types/filterField.type';
3
+ import { Ref } from 'vue';
4
+ export interface AssetAttributeStore {
5
+ customFieldColumns: Ref<TableColumn[]>;
6
+ assetValueColumns: Ref<TableColumn[]>;
7
+ customFieldFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
8
+ assetValueFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
9
+ getFields: () => void;
10
+ }
11
+ declare const useAssetAttributeStore: () => AssetAttributeStore;
12
+ export default useAssetAttributeStore;
@@ -0,0 +1 @@
1
+ export { default as useAssetAttributeStore } from './assetAttribute.store';
@@ -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?: {
@@ -65,14 +67,30 @@ export type Asset = {
65
67
  qr?: string;
66
68
  };
67
69
  firstImage?: string;
68
- secondImageSmall?: string;
69
- secondImageMedium?: string;
70
- secondImageBig?: string;
71
- assetImageSmall?: string;
72
- assetImageMedium?: string;
73
- assetImageBig?: string;
70
+ secondImage?: string;
74
71
  assetImage?: string;
75
72
  setDefault?: 'firstImage' | 'secondImage';
76
73
  auditStatus?: string;
77
74
  maintenanceStatus?: string;
75
+ transactions?: TransactionPolicyType;
76
+ formattedAssetValue?: string;
77
+ address?: string;
78
+ latitude: number | null;
79
+ longitude: number | null;
80
+ registeredAssetId?: string;
78
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;
91
+ };
92
+ export interface AssetMap {
93
+ _id: string;
94
+ latitude: number;
95
+ longitude: number;
96
+ }
@@ -0,0 +1,35 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { DropdownOption, MultiSelectOption } from './options';
3
+ import { QueryParams } from '../components/v2/DataTable/DataTable.vue.d';
4
+ export type FilterFieldTypes = 'dropdown' | 'multiselect' | 'calendar' | 'rangenumber';
5
+ export type FilterOptions<Opt = Record<string, boolean>> = Record<keyof Opt, DropdownOption[] | MultiSelectOption[]>;
6
+ export interface FilterField<OptionsQueryParams extends QueryParams = QueryParams> {
7
+ /**
8
+ * Represents a function type for fetching options based on query parameters.
9
+ *
10
+ * @template OptionsQueryParams - The type of query parameters, extending `QueryParams`. Defaults to `any`.
11
+ *
12
+ * This function can have one of the following signatures:
13
+ * - A synchronous function that takes query parameters and returns an array of `Option` objects.
14
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
15
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
16
+ *
17
+ * @param args - The query parameters of type `T` used to fetch the options.
18
+ * @returns One of the following:
19
+ * - An array of `Option` objects.
20
+ * - A `Promise` resolving to an array of `Option` objects.
21
+ * - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
22
+ */
23
+ fetchOptionFn(args?: OptionsQueryParams): DropdownOption[] | Promise<DropdownOption[]> | Promise<AxiosResponse<CustomFieldFetchOptionResponse>>;
24
+ type: FilterFieldTypes;
25
+ field: keyof OptionsQueryParams;
26
+ label: string;
27
+ optionField?: keyof OptionsQueryParams;
28
+ params?: OptionsQueryParams;
29
+ }
30
+ export type CustomFieldFetchOptionResponse<Opt = Record<string, boolean>> = {
31
+ message: string;
32
+ data: FilterOptions<Opt> & {
33
+ customFieldOptions?: FilterOptions<Opt>;
34
+ };
35
+ };
@@ -0,0 +1,28 @@
1
+ export interface AssetAttributeTableData {
2
+ customFields?: Partial<{
3
+ [key: string]: Pick<CustomField, 'name' | 'dataType'> & {
4
+ value?: string;
5
+ };
6
+ }>;
7
+ assetValues?: Partial<{
8
+ [key: string]: Pick<DepreciationCategory, 'name' | 'isDefault'> & {
9
+ value?: string;
10
+ formattedValue?: string | null;
11
+ currency?: string;
12
+ };
13
+ }>;
14
+ }
15
+ export declare const FILTERABLE_CUSTOM_FIELD_TYPES: readonly ["Dropdown", "MultiDropdown", "Date", "Datetime", "Currency"];
16
+ export type FilterableCustomFieldTypes = (typeof FILTERABLE_CUSTOM_FIELD_TYPES)[number];
17
+ export type CustomFieldTypes = FilterableCustomFieldTypes | 'Text' | 'Textarea' | 'Numeric' | 'Phone' | 'Percentage' | 'Email' | 'URL' | 'Document';
18
+ export interface CustomField {
19
+ _id: string;
20
+ name: string;
21
+ dataType: CustomFieldTypes;
22
+ }
23
+ export interface DepreciationCategory {
24
+ _id: string;
25
+ name: string;
26
+ isDefault: boolean;
27
+ isActive: boolean;
28
+ }
@@ -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;
@@ -0,0 +1 @@
1
+ export declare const googleMapLoader: () => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { formatUserName, formatVowelSoundLabel } from './textFormater.util';
1
+ import { formatAssetValue, 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';
@@ -16,6 +16,7 @@ import reLogin from './reLogin.util';
16
16
  import { isValidJSONString } from './json.util';
17
17
  import { buildBodyParams } from './request.util';
18
18
  import { formatLogResponseData } from './changelog.util';
19
+ import { googleMapLoader } from './googleMapLoader.util';
19
20
  declare const isObjectEmpty: (object: object) => boolean;
20
21
  declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
21
- export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatUserName, formatVowelSoundLabel, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
22
+ export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatAssetValue, 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, };
@@ -12,7 +12,7 @@ export type SystemRole = {
12
12
  delete: boolean;
13
13
  };
14
14
  export type SystemRoleAttribute = 'importData' | 'assetAttribute' | 'assetPolicies' | 'depreciationGroup' | 'depreciationMethod' | 'documentDeletion' | 'group' | 'iotReader' | 'license' | 'purchaseDocument' | 'purchaseInformation' | 'userAndRole' | 'tag' | 'tagType' | 'registerAsset';
15
- export type TransactionAttribute = 'borrowingRole' | 'assignmentRole' | 'disposalRole' | 'transferRole' | 'auditRole' | 'maintenanceRole' | 'repairRole' | 'trackingRole' | 'damagedRole' | 'missingRole';
15
+ export type TransactionAttribute = 'borrowingRole' | 'assignmentRole' | 'disposalRole' | 'transferRole' | 'auditRole' | 'maintenanceRole' | 'repairRole' | 'trackingRole' | 'damagedRole' | 'registrationRole' | 'missingRole';
16
16
  export interface UserLogin {
17
17
  transactionRoles: Record<TransactionAttribute, TransactionRole>;
18
18
  systemRoles: Record<SystemRoleAttribute, SystemRole>;
@@ -1,4 +1,9 @@
1
+ import { Asset } from '../types/assets.type';
2
+ import { AssetAttributeTableData } from '../types/settingsAttribute.type';
3
+ export declare const formatAssetValue: (each: AssetAttributeTableData) => AssetAttributeTableData;
1
4
  export declare const formatVowelSoundLabel: (label?: string) => string;
2
5
  export declare const formatUserName: (name?: string) => string;
3
6
  export declare const formatTagCode: (tagCode?: string) => string;
7
+ export declare const formatDisplayAssetName: (asset: Asset) => string;
8
+ export declare const formatDisplayAssetId: (asset: Asset) => string;
4
9
  export default formatUserName;
@@ -8,7 +8,7 @@ interface ToastParams {
8
8
  /**
9
9
  * Set the duration of toast in milisecond.
10
10
  *
11
- * @default 3000 - 3s
11
+ * @default 5000 - 5s
12
12
  */
13
13
  life?: number;
14
14
  group?: string;