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.
Files changed (103) hide show
  1. package/dist/loading-0-1a7cddc8.js +4 -0
  2. package/dist/loading-1-892eee7c.js +4 -0
  3. package/dist/loading-2-bf39c889.js +4 -0
  4. package/dist/loading-3-f1ea4b15.js +4 -0
  5. package/dist/node_modules/@googlemaps/js-api-loader/src/deprecated.d.ts +7 -0
  6. package/dist/node_modules/@googlemaps/js-api-loader/src/index.d.ts +52 -0
  7. package/dist/node_modules/@googlemaps/js-api-loader/src/messages.d.ts +9 -0
  8. package/dist/src/build-entry.d.ts +5 -2830
  9. package/dist/src/components/v2/AssetInfo/AssetInfo.vue.d.ts +4 -4
  10. package/dist/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
  11. package/dist/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +7 -1
  12. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
  13. package/dist/src/components/v2/CustomColumn/DialogColumnSetup.vue.d.ts +4 -0
  14. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  15. package/dist/src/components/v2/DialogAssetNameDetail/DialogAssetNameDetail.vue.d.ts +3 -1
  16. package/dist/src/components/v2/DialogCoordinate/AssetList.vue.d.ts +4 -0
  17. package/dist/src/components/v2/DialogCoordinate/AssetListFilter.vue.d.ts +4 -0
  18. package/dist/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
  19. package/dist/src/components/v2/DialogCoordinate/FullscreenToggle.vue.d.ts +4 -0
  20. package/dist/src/components/v2/DialogCoordinate/MapSearch.vue.d.ts +15 -0
  21. package/dist/src/components/v2/DialogCoordinate/Marker.vue.d.ts +13 -0
  22. package/dist/src/components/v2/DialogCoordinate/PopupDetail.vue.d.ts +13 -0
  23. package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +10 -0
  24. package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +59 -0
  25. package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
  26. package/dist/src/components/v2/DialogReportDamage/DialogReportDamage.vue.d.ts +8 -0
  27. package/dist/src/components/v2/DialogReportMissing/DialogReportMissing.vue.d.ts +8 -0
  28. package/dist/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +13 -9
  29. package/dist/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +9 -1
  30. package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +16 -0
  31. package/dist/src/components/v2/FileUpload/FileUpload.vue.d.ts +4 -0
  32. package/dist/src/components/v2/Form/Form.vue.d.ts +2 -0
  33. package/dist/src/components/v2/HardwareSync/HardwareSync.vue.d.ts +2 -2
  34. package/dist/src/components/v2/Icon/Icon.vue.d.ts +11 -0
  35. package/dist/src/components/v2/ImageCompressor/BackgroundImageCropper.vue.d.ts +1 -1
  36. package/dist/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  37. package/dist/src/components/v2/InputCurrency/InputCurrency.vue.d.ts +5 -0
  38. package/dist/src/components/v2/InputCurrencyReference/InputCurrencyReference.vue.d.ts +30 -0
  39. package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  40. package/dist/src/components/v2/LazyLoadTrigger/LazyLoadTrigger.vue.d.ts +4 -0
  41. package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  42. package/dist/src/components/v2/Tree/Tree.vue.d.ts +4 -0
  43. package/dist/src/components/v2/index.d.ts +4 -1
  44. package/dist/src/dto/assets.dto.d.ts +17 -0
  45. package/dist/src/dto/missing.dto.d.ts +1 -0
  46. package/dist/src/dto/tagTransaction.dto.d.ts +9 -0
  47. package/dist/src/event-bus/index.d.ts +8 -0
  48. package/dist/src/event-bus/mitt.d.ts +26 -0
  49. package/dist/src/presets/multiselect/index.js +1 -0
  50. package/dist/src/presets/paginator/index.js +1 -1
  51. package/dist/src/services/assets.service.d.ts +7 -2
  52. package/dist/src/services/column.service.d.ts +13 -0
  53. package/dist/src/services/deviceIOT.service.d.ts +1 -0
  54. package/dist/src/services/tagTransaction.service.d.ts +1 -1
  55. package/dist/src/services/tree.service.d.ts +1 -0
  56. package/dist/src/types/assets.type.d.ts +32 -11
  57. package/dist/src/utils/changelog.util.d.ts +69 -0
  58. package/dist/src/utils/createVueControl.d.ts +8 -0
  59. package/dist/src/utils/customMarker.util.d.ts +64 -0
  60. package/dist/src/utils/debounce.util.d.ts +1 -0
  61. package/dist/src/utils/exportToExcel.util.d.ts +1 -0
  62. package/dist/src/utils/getImageURL.util.d.ts +11 -2
  63. package/dist/src/utils/googleMapLoader.util.d.ts +1 -0
  64. package/dist/src/utils/index.d.ts +8 -4
  65. package/dist/src/utils/json.util.d.ts +17 -0
  66. package/dist/src/utils/request.util.d.ts +17 -0
  67. package/dist/src/utils/role.util.d.ts +19 -1
  68. package/dist/src/utils/textFormater.util.d.ts +3 -0
  69. package/dist/style.css +1 -1
  70. package/dist/tsv2-library.es.js +66435 -67823
  71. package/dist/tsv2-library.umd.js +47 -609
  72. package/package.json +6 -1
  73. package/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
  74. package/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +7 -1
  75. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
  76. package/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  77. package/src/components/v2/DialogAssetNameDetail/DialogAssetNameDetail.vue.d.ts +3 -1
  78. package/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
  79. package/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
  80. package/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +13 -9
  81. package/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +9 -1
  82. package/src/components/v2/FileUpload/FileUpload.vue.d.ts +4 -0
  83. package/src/components/v2/Form/Form.vue.d.ts +2 -0
  84. package/src/components/v2/Icon/Icon.vue.d.ts +11 -0
  85. package/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  86. package/src/components/v2/InputCurrency/InputCurrency.vue.d.ts +5 -0
  87. package/src/components/v2/InputCurrencyReference/InputCurrencyReference.vue.d.ts +30 -0
  88. package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  89. package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  90. package/src/components/v2/Tree/Tree.vue.d.ts +4 -0
  91. package/src/presets/multiselect/index.js +1 -0
  92. package/src/presets/paginator/index.js +1 -1
  93. package/src/services/assets.service.ts +49 -1
  94. package/src/services/column.service.ts +42 -0
  95. package/src/services/deviceIOT.service.ts +8 -0
  96. package/src/services/tagTransaction.service.ts +2 -2
  97. package/src/services/tracking.service.ts +1 -1
  98. package/src/services/tree.service.ts +1 -0
  99. package/dist/loading-0-7762a473.js +0 -4
  100. package/dist/loading-1-55418796.js +0 -4
  101. package/dist/loading-2-b6abf641.js +0 -4
  102. package/dist/loading-3-705786b6.js +0 -4
  103. package/dist/src/components/v2/DataTable/store/dataTable.store.d.ts +0 -22
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
3
  "author": "fixedassetv2-fe",
4
- "version": "1.0.61-alpha.13",
4
+ "version": "1.0.61-alpha.131",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
7
7
  "repository": {
@@ -38,6 +38,9 @@
38
38
  "cy:test-all": "npm run tailwind && start-server-and-test dev cy:run-e2e && npm run cy:run-ct"
39
39
  },
40
40
  "dependencies": {
41
+ "@googlemaps/js-api-loader": "^2.0.2",
42
+ "@googlemaps/markerclusterer": "^2.6.2",
43
+ "@types/google.maps": "^3.58.1",
41
44
  "@types/lodash": "^4.17.7",
42
45
  "@vueuse/core": "^10.7.2",
43
46
  "axios": "^1.3.4",
@@ -55,6 +58,7 @@
55
58
  "vue-i18n": "^9.13.1",
56
59
  "vue-router": "^4.1.6",
57
60
  "vuex": "^4.0.2",
61
+ "write-excel-file": "^2.3.5",
58
62
  "xlsx": "^0.18.5"
59
63
  },
60
64
  "devDependencies": {
@@ -92,6 +96,7 @@
92
96
  "prettier": "^3.2.5",
93
97
  "rimraf": "^5.0.5",
94
98
  "rollup-plugin-typescript2": "0.34.1",
99
+ "rollup-plugin-visualizer": "^6.0.3",
95
100
  "sass": "^1.78.0",
96
101
  "start-server-and-test": "^2.0.3",
97
102
  "tailwindcss": "3.4.1",
@@ -23,6 +23,12 @@ export type Device = {
23
23
  name: string;
24
24
  };
25
25
 
26
+ export type BaseRegisteredDevice = {
27
+ _id: string;
28
+ serialNumber: string;
29
+ name: string;
30
+ };
31
+
26
32
  export type RegisteredDevice = {
27
33
  _id: string;
28
34
  imageSmall: string;
@@ -150,6 +150,10 @@ export interface ButtonSelectTreeProps {
150
150
  * @default false
151
151
  */
152
152
  fetchTreeOnButtonRender?: boolean;
153
+ /**
154
+ * Disable level 2 (All > Level 1 > Level 2)
155
+ */
156
+ disableSubChildren?: boolean;
153
157
  }
154
158
 
155
159
  export type ButtonSelectTreeEmits = {
@@ -171,7 +175,9 @@ export type ButtonSelectTreeEmits = {
171
175
  *
172
176
  * @group Component
173
177
  */
174
- declare class ButtonSelectTree extends ClassComponent<ButtonSelectTreeProps> {}
178
+ declare class ButtonSelectTree extends ClassComponent<ButtonSelectTreeProps> {
179
+ dialogTreeKey: Ref<number>;
180
+ }
175
181
 
176
182
  declare module '@vue/runtime-core' {
177
183
  interface GlobalComponents {
@@ -1,7 +1,17 @@
1
1
  import { ClassComponent } from '../ts-helpers';
2
2
 
3
+ export interface DataTableColumnConfig {
4
+ field: string;
5
+ pinned: boolean;
6
+ width: number | string;
7
+ visible: boolean;
8
+ }
9
+
3
10
  export interface CustomColumnProps {
4
11
  tableId: string;
12
+ tableKey: string;
13
+ tableName: string;
14
+ tableData: Data[] | undefined;
5
15
  defaultColumns: TableColumn[];
6
16
  visibleColumns: TableColumn[];
7
17
  /**
@@ -149,8 +149,14 @@ export type TableColumn = {
149
149
  reorderable?: boolean;
150
150
  /**
151
151
  * Make the column cannot reordered by disabled dragability.
152
+ * Unlike `reorderable`, the column will still appear in the column visibility
153
+ * overlay if this is set to false.
152
154
  */
153
155
  dragable?: boolean;
156
+ /**
157
+ * Whether the column is pinned to the left of the table.
158
+ */
159
+ pinned?: boolean;
154
160
  fixed?: boolean;
155
161
  visible?: boolean;
156
162
  /**
@@ -463,6 +469,15 @@ export interface TSDataTableProps {
463
469
  * Total disabled rows in table (used for synchronizing with bulk action button)
464
470
  */
465
471
  totalDisabledRows?: number;
472
+ /**
473
+ * A function that takes the row data as a parameter and returns a string to apply a particular class for the row.
474
+ * The return value is added to the row's :classes array (see Vue.js class bindings).
475
+ */
476
+ rowClass?: (data: any) => string | object | undefined;
477
+ /**
478
+ * An array of arrays to display in the exported excel file before the main data.
479
+ */
480
+ preContentData?: (string | number)[][];
466
481
  }
467
482
 
468
483
  export type TSDataTableEmits = {
@@ -12,10 +12,12 @@ export interface DialogAssetNameDetailProps {
12
12
  header?: string;
13
13
 
14
14
  /**
15
- * The ID of the asset.
15
+ * The ID of the asset name.
16
16
  */
17
17
  id: string;
18
18
 
19
+ currentTagType?: 'RFID' | 'QR' | 'RFID & QR' | 'Non TAG';
20
+
19
21
  /**
20
22
  * The query params for fetching assets.
21
23
  */
@@ -0,0 +1,99 @@
1
+ export type MapEngine = 'leaflet' | 'maplibre' | 'openlayers' | 'google';
2
+
3
+ export interface RasterSource {
4
+ type: 'raster';
5
+ urlTemplate: string;
6
+ attribution?: string;
7
+ maxZoom?: number;
8
+ }
9
+
10
+ export interface MapLibreStyleSource {
11
+ type: 'maplibre-style';
12
+ styleUrl: string;
13
+ }
14
+
15
+ export interface OpenLayersOsmSource {
16
+ type: 'openlayers-osm';
17
+ }
18
+
19
+ export interface GoogleMapsSource {
20
+ type: 'google';
21
+ mapId?: string;
22
+ }
23
+
24
+ export type BaseMapSource =
25
+ | RasterSource
26
+ | MapLibreStyleSource
27
+ | OpenLayersOsmSource
28
+ | GoogleMapsSource;
29
+
30
+ export interface BaseMapMarker {
31
+ id?: string | number;
32
+ lat: number;
33
+ lng: number;
34
+ popup?: string;
35
+ }
36
+
37
+ export interface LatLngValue {
38
+ lat: number | null;
39
+ lng: number | null;
40
+ }
41
+
42
+ export interface CoordinateValue extends LatLngValue {
43
+ address?: string;
44
+ }
45
+
46
+ export type InputMapMode = 'click' | 'drag' | 'center';
47
+
48
+ export type MarkerConfig =
49
+ | {
50
+ kind: 'pin';
51
+ pinOptions?: google.maps.marker.PinElementOptions;
52
+ title?: string;
53
+ }
54
+ | {
55
+ kind: 'img';
56
+ src: string;
57
+ title?: string;
58
+ }
59
+ | {
60
+ kind: 'svgString';
61
+ svg: string;
62
+ title?: string;
63
+ }
64
+ | {
65
+ kind: 'customElement';
66
+ createElement: () => HTMLElement;
67
+ title?: string;
68
+ };
69
+
70
+ export interface MapControl {
71
+ position?: google.maps.ControlPosition;
72
+ index?: number;
73
+ createElement: (ctx: { map: google.maps.Map }) => HTMLElement;
74
+ }
75
+
76
+ export interface MapFocusConfig {
77
+ name: string;
78
+ featureType: google.maps.FeatureType;
79
+ featureStyleOptions: google.maps.FeatureStyleOptions;
80
+ }
81
+
82
+ export interface DialogCoordinateProps {
83
+ value?: LatLngValue & { _id?: string };
84
+ center?: [number, number];
85
+ zoom?: number;
86
+ mode?: InputMapMode;
87
+ colorScheme?: 'LIGHT' | 'DARK';
88
+ mapOptions?: google.maps.MapOptions;
89
+ customMarkers?: CustomMarker[];
90
+ inputMarkerConfig?: MarkerConfig;
91
+ type: 'input' | 'detail';
92
+ }
93
+
94
+ export interface CustomMarker {
95
+ lat: number;
96
+ lng: number;
97
+ title?: string;
98
+ desc?: string;
99
+ }
@@ -122,6 +122,12 @@ export interface DialogFormProps extends FormProps {
122
122
  * The severity will determine the dialog icons and color scheme.
123
123
  */
124
124
  severity?: 'success' | 'danger' | 'primary';
125
+ maskClass?: string | string[];
126
+ /**
127
+ * Whether to automatically manage layering.
128
+ * @defaultValue true
129
+ */
130
+ autoZIndex?: boolean | undefined;
125
131
  }
126
132
 
127
133
  export interface ConfirmSlots {
@@ -115,15 +115,9 @@ export interface Asset {
115
115
  auditStatus?: string | null;
116
116
  rfid?: boolean;
117
117
  qr?: boolean;
118
- assetImageSmall?: null | 'string';
119
- assetImageMedium?: null | 'string';
120
- assetImageBig?: null | 'string';
121
- imageSmall?: null | 'string';
122
- imageMedium?: null | 'string';
123
- imageBig?: null | 'string';
124
- firstImageSmall?: string;
125
- firstImageMedium?: string;
126
- firstImageBig?: string;
118
+ assetImage?: 'string';
119
+ image?: 'string';
120
+ firstImage?: string;
127
121
  }
128
122
 
129
123
  export type QueryParams = {
@@ -171,6 +165,16 @@ export interface DialogSelectAssetProps {
171
165
  * The list of asset name key to be excluded in fetch list
172
166
  */
173
167
  excludedKey?: string[];
168
+ /**
169
+ *
170
+ * The list of asset name _id to be excluded in fetch list
171
+ */
172
+ excludeId?: string[];
173
+ /**
174
+ *
175
+ * The list of group _id of asset names to be excluded in fetch list
176
+ */
177
+ excludeInitialGroup?: string[];
174
178
  /**
175
179
  * The header of the dialog.
176
180
  *
@@ -62,6 +62,10 @@ export interface SelectTreeDialogProps {
62
62
  * Render hidden dialog to trigger fetch tree
63
63
  */
64
64
  hidden?: boolean;
65
+ /**
66
+ * Disable level 2 (All > Level 1 > Level 2)
67
+ */
68
+ disableSubChildren?: boolean;
65
69
  }
66
70
 
67
71
  type TreeSelectPayload = {
@@ -76,6 +80,10 @@ export type SelectTreeDialogEmits = {
76
80
  'hide': [];
77
81
  };
78
82
 
83
+ export interface SelectTreeDialogSlots {
84
+ description: VNode[];
85
+ }
86
+
79
87
  /**
80
88
  * **TSVue v2 - SelectTreeDialog**
81
89
  *
@@ -86,7 +94,7 @@ export type SelectTreeDialogEmits = {
86
94
  */
87
95
  declare class SelectTreeDialog extends ClassComponent<
88
96
  SelectTreeDialogProps,
89
- Record<string, unknown>,
97
+ SelectTreeDialogSlots,
90
98
  SelectTreeDialogEmits
91
99
  > {}
92
100
 
@@ -106,6 +106,10 @@ export type FileUploadProps = {
106
106
  * Wether show validator message on invalid file input
107
107
  */
108
108
  showValidatorMessage?: boolean;
109
+ /**
110
+ * Wether show validator message on invalid file input
111
+ */
112
+ validatorMessage?: boolean;
109
113
  };
110
114
 
111
115
  export type FileUploadEmits = {
@@ -105,6 +105,8 @@ export type FormEmits = {
105
105
  * @group components
106
106
  */
107
107
  declare class Form extends ClassComponent<FormProps, FormSlots, FormEmits> {
108
+ values: GenericObject;
109
+ errors: ComputedRef<Partial<Record<string, string | undefined>>>;
108
110
  /**
109
111
  * Wether to keep the dialog remains visible or not after submit.
110
112
  */
@@ -20,10 +20,12 @@ export type TSVueIcons =
20
20
  | 'arrow-left-right'
21
21
  | 'arrow-right'
22
22
  | 'arrow-right-fill'
23
+ | 'asset'
23
24
  | 'asset-view'
24
25
  | 'asset-name-view'
25
26
  | 'assignment'
26
27
  | 'audit'
28
+ | 'award-fill'
27
29
  | 'bell'
28
30
  | 'bell-alert'
29
31
  | 'borrow'
@@ -68,6 +70,8 @@ export type TSVueIcons =
68
70
  | 'file-shield-2-line'
69
71
  | 'filter-fill'
70
72
  | 'filter-line'
73
+ | 'fullscreen-line'
74
+ | 'fullscreen-exit-line'
71
75
  | 'folder-line'
72
76
  | 'gate'
73
77
  | 'group'
@@ -77,8 +81,11 @@ export type TSVueIcons =
77
81
  | 'image-add'
78
82
  | 'indeterminate-circle-fill'
79
83
  | 'info'
84
+ | 'layout-grid-line'
80
85
  | 'link-unlink-m'
81
86
  | 'list-settings-line'
87
+ | 'list-check'
88
+ | 'list-check-2'
82
89
  | 'loader-4'
83
90
  | 'logout-box-r-line'
84
91
  | 'mail-open-line'
@@ -86,6 +93,7 @@ export type TSVueIcons =
86
93
  | 'map-2-line'
87
94
  | 'map-pin-line'
88
95
  | 'menu-line'
96
+ | 'menu-fold'
89
97
  | 'menu-unfold'
90
98
  | 'more'
91
99
  | 'move-to'
@@ -97,6 +105,8 @@ export type TSVueIcons =
97
105
  | 'phone-line'
98
106
  | 'printer'
99
107
  | 'price-tag-3-line'
108
+ | 'pushpin-2-line'
109
+ | 'pushpin-fill'
100
110
  | 'qr'
101
111
  | 'qr-scan-line'
102
112
  | 'recycle-bin'
@@ -125,6 +135,7 @@ export type TSVueIcons =
125
135
  | 'user'
126
136
  | 'user-add-line'
127
137
  | 'user-follow-line'
138
+ | 'user-unfollow-line'
128
139
  | 'user-search'
129
140
  | 'user-settings'
130
141
  | 'verification';
@@ -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
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
56
+ *
57
+ * @group form
58
+ */
59
+ declare const InputCoordinate: DefineComponent<
60
+ InputCoordinateProps,
61
+ InputCoordinateEmits
62
+ >;
63
+
64
+ export default InputCoordinate;
@@ -90,6 +90,11 @@ export interface InputCurrencyProps {
90
90
  */
91
91
  fieldInfo?: string;
92
92
  inputnNumberId?: string;
93
+ /**
94
+ * Wether the currency dropdown should be selectable or not.
95
+ * @defaultValue false
96
+ */
97
+ selectable?: boolean;
93
98
  }
94
99
 
95
100
  /**
@@ -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;
@@ -106,6 +106,12 @@ export interface InputTextProps {
106
106
  * @default true
107
107
  */
108
108
  allowSpecialCharacters?: boolean;
109
+ /**
110
+ * Wether the input should be trimmed or not.
111
+ *
112
+ * @default true
113
+ */
114
+ trimInput?: boolean;
109
115
  }
110
116
 
111
117
  /**
@@ -8,6 +8,7 @@ export type TransactionRoles = Addon & {
8
8
  export type Addon = {
9
9
  repairTicketing: boolean;
10
10
  maintenance: boolean;
11
+ map: boolean;
11
12
  tracking: boolean;
12
13
  audit: boolean;
13
14
  assetControl: boolean;
@@ -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
  *
@@ -137,6 +137,7 @@ export default {
137
137
  // Position
138
138
  'absolute top-0 left-0',
139
139
  'mt-2',
140
+ '!z-[2222]',
140
141
 
141
142
  'max-w-[30vw]',
142
143
 
@@ -304,7 +304,7 @@ export default {
304
304
  class: [
305
305
  // Position
306
306
  'absolute top-0 left-0',
307
- 'mt-1',
307
+ 'mt-1 !z-[1111]',
308
308
 
309
309
  // Shape
310
310
  'border-0',
@@ -2,25 +2,30 @@ import axios, { AxiosInstance, AxiosResponse } from 'axios';
2
2
  import {
3
3
  GetAllAssetsQueryParams,
4
4
  GetAssetDetailParams,
5
+ GetAssetMapParams,
6
+ GetAssetMapResponse,
5
7
  GetAvailableAssetsQueryParams,
6
8
  GetLinkedAssetFamiliesResponse,
7
9
  } from '@/dto/assets.dto';
8
10
  import { AssetOptionField } from '@/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d';
11
+ import { buildBodyParams } from '@/utils';
9
12
 
10
13
  export interface ServiceOptions {
11
14
  headers?: Record<string, unknown>;
12
15
  params?: Record<string, unknown>;
16
+ usePrefix?: boolean;
13
17
  }
14
18
 
15
19
  export const API = ({
16
20
  headers = {},
17
21
  params = {},
22
+ usePrefix = true,
18
23
  }: ServiceOptions = {}): AxiosInstance => {
19
24
  const user = JSON.parse(localStorage.getItem('user') ?? '{}');
20
25
  const BASE_URL = import.meta.env.VITE_APP_TAGSAMURAI_API;
21
26
 
22
27
  const instance = axios.create({
23
- baseURL: `${BASE_URL}/assets/v2/assets`,
28
+ baseURL: `${BASE_URL}/assets/v2${usePrefix ? '/assets' : ''}`,
24
29
  headers: {
25
30
  'Content-type': 'application/json',
26
31
  'Authorization': `Bearer ${user.token}`,
@@ -32,6 +37,20 @@ export const API = ({
32
37
  return instance;
33
38
  };
34
39
 
40
+ const postAssetList = (
41
+ params?: GetAllAssetsQueryParams,
42
+ ): Promise<AxiosResponse> => {
43
+ const body = buildBodyParams(params);
44
+ return API().post('/list', body);
45
+ };
46
+
47
+ const postAssetOption = (
48
+ params?: GetAllAssetsQueryParams,
49
+ ): Promise<AxiosResponse> => {
50
+ const body = buildBodyParams(params);
51
+ return API().post('/list/options', body);
52
+ };
53
+
35
54
  const getAllAssets = (
36
55
  params: GetAllAssetsQueryParams,
37
56
  ): Promise<AxiosResponse> => {
@@ -44,6 +63,13 @@ const getAvailableAssets = (
44
63
  return API({ params }).get('/available');
45
64
  };
46
65
 
66
+ const postAssetAvailableList = (
67
+ params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams,
68
+ ): Promise<AxiosResponse> => {
69
+ const body = buildBodyParams(params);
70
+ return API().post('/available/list', body);
71
+ };
72
+
47
73
  const scanAsset = (tag: string): Promise<AxiosResponse> => {
48
74
  return API({ params: { tag } }).get('');
49
75
  };
@@ -96,9 +122,30 @@ const matchAssetWithTag = (
96
122
  return API({ params }).get('/by-id');
97
123
  };
98
124
 
125
+ const getAssetMaps = (
126
+ params?: GetAssetMapParams,
127
+ ): Promise<AxiosResponse<GetAssetMapResponse>> => {
128
+ let abortController: AbortController | null = null;
129
+
130
+ // Cancel previous request
131
+ if (abortController) {
132
+ (abortController as AbortController).abort();
133
+ }
134
+
135
+ abortController = new AbortController();
136
+
137
+ return API({
138
+ usePrefix: false,
139
+ params: params as Record<string, unknown>,
140
+ }).get('/asset-maps', { signal: abortController.signal });
141
+ };
142
+
99
143
  export default {
100
144
  getAllAssets,
145
+ postAssetList,
146
+ postAssetOption,
101
147
  getAvailableAssets,
148
+ postAssetAvailableList,
102
149
  getAssetsById,
103
150
  getAssetDetail,
104
151
  matchAssetWithTag,
@@ -106,4 +153,5 @@ export default {
106
153
  getUnlinkedAssets,
107
154
  getOptions,
108
155
  scanAsset,
156
+ getAssetMaps,
109
157
  };