tsv2-library 1.0.61-alpha.99 → 1.0.61-beta.0

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 (57) hide show
  1. package/dist/node_modules/@googlemaps/js-api-loader/src/deprecated.d.ts +7 -0
  2. package/dist/node_modules/@googlemaps/js-api-loader/src/index.d.ts +52 -0
  3. package/dist/node_modules/@googlemaps/js-api-loader/src/messages.d.ts +9 -0
  4. package/dist/src/build-entry.d.ts +4 -3
  5. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
  6. package/dist/src/components/v2/CustomColumn/DialogColumnSetup.vue.d.ts +4 -0
  7. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +22 -2
  8. package/dist/src/components/v2/DialogCoordinate/AssetList.vue.d.ts +4 -0
  9. package/dist/src/components/v2/DialogCoordinate/AssetListFilter.vue.d.ts +4 -0
  10. package/dist/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
  11. package/dist/src/components/v2/DialogCoordinate/FullscreenToggle.vue.d.ts +4 -0
  12. package/dist/src/components/v2/DialogCoordinate/MapSearch.vue.d.ts +15 -0
  13. package/dist/src/components/v2/DialogCoordinate/Marker.vue.d.ts +13 -0
  14. package/dist/src/components/v2/DialogCoordinate/PopupDetail.vue.d.ts +13 -0
  15. package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +10 -0
  16. package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +59 -0
  17. package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
  18. package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +8 -0
  19. package/dist/src/components/v2/Icon/Icon.vue.d.ts +11 -0
  20. package/dist/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  21. package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  22. package/dist/src/components/v2/LazyLoadTrigger/LazyLoadTrigger.vue.d.ts +4 -0
  23. package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  24. package/dist/src/components/v2/index.d.ts +3 -1
  25. package/dist/src/dto/assets.dto.d.ts +15 -0
  26. package/dist/src/event-bus/index.d.ts +8 -0
  27. package/dist/src/event-bus/mitt.d.ts +26 -0
  28. package/dist/src/presets/multiselect/index.js +1 -0
  29. package/dist/src/presets/paginator/index.js +1 -1
  30. package/dist/src/services/assets.service.d.ts +6 -2
  31. package/dist/src/services/column.service.d.ts +13 -0
  32. package/dist/src/types/assets.type.d.ts +24 -6
  33. package/dist/src/utils/changelog.util.d.ts +69 -0
  34. package/dist/src/utils/createVueControl.d.ts +8 -0
  35. package/dist/src/utils/customMarker.util.d.ts +64 -0
  36. package/dist/src/utils/debounce.util.d.ts +1 -0
  37. package/dist/src/utils/exportToExcel.util.d.ts +1 -0
  38. package/dist/src/utils/googleMapLoader.util.d.ts +1 -0
  39. package/dist/src/utils/index.d.ts +4 -2
  40. package/dist/src/utils/textFormater.util.d.ts +3 -0
  41. package/dist/style.css +1 -1
  42. package/dist/tsv2-library.es.js +5739 -1972
  43. package/dist/tsv2-library.umd.js +7 -7
  44. package/package.json +4 -1
  45. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +10 -0
  46. package/src/components/v2/DataTable/DataTable.vue.d.ts +22 -2
  47. package/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +99 -0
  48. package/src/components/v2/DialogForm/DialogForm.vue.d.ts +6 -0
  49. package/src/components/v2/Icon/Icon.vue.d.ts +11 -0
  50. package/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  51. package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  52. package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  53. package/src/presets/multiselect/index.js +1 -0
  54. package/src/presets/paginator/index.js +1 -1
  55. package/src/services/assets.service.ts +40 -1
  56. package/src/services/column.service.ts +42 -0
  57. package/dist/src/components/v2/DataTable/store/dataTable.store.d.ts +0 -22
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @deprecated Use the new functional API: `setOptions()` and `importLibrary()`.
3
+ * See the migration guide for more details: MIGRATION.md
4
+ */
5
+ export declare class Loader {
6
+ constructor(...args: any[]);
7
+ }
@@ -0,0 +1,52 @@
1
+ export type APIOptions = {
2
+ key?: string;
3
+ v?: string;
4
+ language?: string;
5
+ region?: string;
6
+ libraries?: string[];
7
+ authReferrerPolicy?: string;
8
+ mapIds?: string[];
9
+ channel?: string;
10
+ solutionChannel?: string;
11
+ };
12
+ interface APILibraryMap {
13
+ core: google.maps.CoreLibrary;
14
+ drawing: google.maps.DrawingLibrary;
15
+ elevation: google.maps.ElevationLibrary;
16
+ geocoding: google.maps.GeocodingLibrary;
17
+ geometry: google.maps.GeometryLibrary;
18
+ journeySharing: google.maps.JourneySharingLibrary;
19
+ maps: google.maps.MapsLibrary;
20
+ maps3d: google.maps.Maps3DLibrary;
21
+ marker: google.maps.MarkerLibrary;
22
+ places: google.maps.PlacesLibrary;
23
+ routes: google.maps.RoutesLibrary;
24
+ streetView: google.maps.StreetViewLibrary;
25
+ visualization: google.maps.VisualizationLibrary;
26
+ }
27
+ type APILibraryName = keyof APILibraryMap;
28
+ /**
29
+ * Sets the options for the Maps JavaScript API.
30
+ *
31
+ * Has to be called before any library is loaded.
32
+ *
33
+ * See https://developers.google.com/maps/documentation/javascript/load-maps-js-api#required_parameters
34
+ * for the full documentation of available options.
35
+ *
36
+ * @param options The options to set.
37
+ */
38
+ export declare function setOptions(options: APIOptions): void;
39
+ /**
40
+ * Imports the specified library from the Maps JavaScript API.
41
+ *
42
+ * The first call to this function will start actually loading the Maps
43
+ * JavaScript API.
44
+ *
45
+ * @param libraryName The name of the library to load.
46
+ * @returns A promise that resolves with the loaded library. In case of an
47
+ * error (due to poor network conditions, browser extensions, etc.), the
48
+ * returned promise is rejected with an error.
49
+ */
50
+ export declare function importLibrary<TLibraryName extends APILibraryName>(libraryName: TLibraryName): Promise<APILibraryMap[TLibraryName]>;
51
+ export declare function importLibrary(...parameters: Parameters<typeof google.maps.importLibrary>): ReturnType<typeof google.maps.importLibrary>;
52
+ export * from "./deprecated.js";
@@ -0,0 +1,9 @@
1
+ import { APIOptions } from "./index.js";
2
+ export declare const MSG_DEPRECATED_LOADER: string;
3
+ export declare const MSG_REPEATED_SET_OPTIONS: (options: APIOptions) => string;
4
+ export declare const MSG_IMPORT_LIBRARY_EXISTS: (options: APIOptions) => string;
5
+ export declare const MSG_SET_OPTIONS_NOT_CALLED: string;
6
+ export declare const MSG_SCRIPT_ELEMENT_EXISTS: string;
7
+ export declare const logError: (message: string) => void;
8
+ export declare const logDevWarning: (message: string) => void;
9
+ export declare const logDevNotice: (message: string) => void;
@@ -19,16 +19,17 @@ interface TSFormContext<T> {
19
19
  declare const useForm: <T>() => TSFormContext<T>;
20
20
  declare const useField: <T>(path: MaybeRefOrGetter<string>, rules?: MaybeRef<RuleExpression<T>>, opts?: Partial<FieldOptions<T>> | undefined) => FieldContext<T>;
21
21
  import Presets from './presets';
22
- import { handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, downloadFile, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n, getNestedProperyValue, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail } from './utils';
22
+ import { handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, downloadFile, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n, getNestedProperyValue, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail } from './utils';
23
+ import { default as eventBus, extendEventBus } from './event-bus';
23
24
  import { flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys } from './components/v2/Tree/helpers';
24
25
  import useLoadingStore from './components/v2/Loading/store/loading.store';
25
26
  import Tooltip from '../node_modules/primevue/tooltip';
26
27
  import Focus from './directives/v-focus';
27
28
  import VueHtmlToPaper from './plugins/VueHtmlToPaper';
28
- import { DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearchByScan, TSButtonSearch, TSButtonSync, TSButtonSelectTree, TSButtonSelectUser, 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, TSInputCurrencyReference, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputSearch, TSInputText, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage } from './components/v2';
29
+ import { DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearchByScan, TSButtonSearch, TSButtonSync, TSButtonSelectTree, TSButtonSelectUser, 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, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage } from './components/v2';
29
30
  declare const TSi18n: import("vue-i18n").I18n<{}, {}, {}, string, false>;
30
31
  declare const _default: {
31
32
  install: (app: App) => void;
32
33
  };
33
34
  export default _default;
34
- export { LibConfig, TSToastService, TSi18n, VueHtmlToPaper, Tooltip, Focus, DialogDamageLog, DialogMissingLog, DialogTransferLog, 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, TSDatePicker, TSDataTable, 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, TSInputCurrencyReference, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputText, TSInputSearch, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, downloadFile, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n, useForm, useField, getNestedProperyValue, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys, TreeAPI, RoutineAPI, DisposalAPI, RoutineServices, AssetsServices, AssetNameService, AssetBrandService, DisposalServices, FilterMatchMode, useLoadingStore, Presets, };
35
+ export { LibConfig, TSToastService, TSi18n, VueHtmlToPaper, Tooltip, Focus, DialogDamageLog, DialogMissingLog, DialogTransferLog, 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, TSDatePicker, TSDataTable, 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, TSInputText, TSInputSearch, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, formatUserName, formatVowelSoundLabel, getImageURL, downloadFile, isObjectEmpty, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getHostName, getBaseURL, useI18n, useForm, useField, getNestedProperyValue, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys, TreeAPI, RoutineAPI, DisposalAPI, RoutineServices, AssetsServices, AssetNameService, AssetBrandService, DisposalServices, FilterMatchMode, useLoadingStore, eventBus, extendEventBus, Presets, };
@@ -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
  /**
@@ -0,0 +1,4 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<any, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, Readonly<any>, {} | {
2
+ [x: string]: any;
3
+ }, {}>;
4
+ export default _sfc_main;
@@ -9,11 +9,21 @@ export type QueryParams = {
9
9
  [key: string]: unknown;
10
10
  };
11
11
 
12
- export type FetchResponse = {
13
- data: Data[];
12
+ export type FetchResponse<T = Data> = {
13
+ data: T[];
14
14
  totalRecords: number;
15
15
  };
16
16
 
17
+ export type TableFetchResponse<T = Data> = {
18
+ message: string;
19
+ data: FetchResponse<T>;
20
+ };
21
+
22
+ export type ShortFetchResponse<T = Data> = {
23
+ message: string;
24
+ data: T;
25
+ };
26
+
17
27
  export type TableCellComponent = {
18
28
  component: string | Component;
19
29
  props?: object;
@@ -149,8 +159,14 @@ export type TableColumn = {
149
159
  reorderable?: boolean;
150
160
  /**
151
161
  * Make the column cannot reordered by disabled dragability.
162
+ * Unlike `reorderable`, the column will still appear in the column visibility
163
+ * overlay if this is set to false.
152
164
  */
153
165
  dragable?: boolean;
166
+ /**
167
+ * Whether the column is pinned to the left of the table.
168
+ */
169
+ pinned?: boolean;
154
170
  fixed?: boolean;
155
171
  visible?: boolean;
156
172
  /**
@@ -468,6 +484,10 @@ export interface TSDataTableProps {
468
484
  * The return value is added to the row's :classes array (see Vue.js class bindings).
469
485
  */
470
486
  rowClass?: (data: any) => string | object | undefined;
487
+ /**
488
+ * An array of arrays to display in the exported excel file before the main data.
489
+ */
490
+ preContentData?: (string | number)[][];
471
491
  }
472
492
 
473
493
  export type TSDataTableEmits = {
@@ -0,0 +1,4 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<any, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, Readonly<any>, {} | {
2
+ [x: string]: any;
3
+ }, {}>;
4
+ export default _sfc_main;
@@ -0,0 +1,4 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "apply"[], "apply", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
2
+ onApply?: ((...args: any[]) => any) | undefined;
3
+ }, {}, {}>;
4
+ export default _sfc_main;
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggleFullscreen"[], "toggleFullscreen", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
2
+ onToggleFullscreen?: ((...args: any[]) => any) | undefined;
3
+ }, {}, {}>;
4
+ export default _sfc_main;
@@ -0,0 +1,15 @@
1
+ import type { PropType as __PropType } from 'vue';
2
+ declare const _sfc_main: import("vue").DefineComponent<{
3
+ map: {
4
+ type: __PropType<google.maps.Map>;
5
+ required: true;
6
+ };
7
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "searched"[], "searched", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ map: {
9
+ type: __PropType<google.maps.Map>;
10
+ required: true;
11
+ };
12
+ }>> & {
13
+ onSearched?: ((...args: any[]) => any) | undefined;
14
+ }, {}, {}>;
15
+ export default _sfc_main;
@@ -0,0 +1,13 @@
1
+ import type { PropType as __PropType } from 'vue';
2
+ declare const _sfc_main: import("vue").DefineComponent<{
3
+ type: {
4
+ type: __PropType<"detail" | "input">;
5
+ required: true;
6
+ };
7
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ type: {
9
+ type: __PropType<"detail" | "input">;
10
+ required: true;
11
+ };
12
+ }>>, {}, {}>;
13
+ export default _sfc_main;
@@ -0,0 +1,13 @@
1
+ import type { PropType as __PropType } from 'vue';
2
+ declare const _sfc_main: import("vue").DefineComponent<{
3
+ assetId: {
4
+ type: __PropType<string>;
5
+ required: true;
6
+ };
7
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ assetId: {
9
+ type: __PropType<string>;
10
+ required: true;
11
+ };
12
+ }>>, {}, {}>;
13
+ export default _sfc_main;
@@ -0,0 +1,10 @@
1
+ export { type ReverseGeocodeResult } from './openStreetMapService';
2
+ export { formatAddress } from './openStreetMapService';
3
+ /**
4
+ * Reverse geocodes coordinates to get full address using Google Maps Geocoding API
5
+ * @param lat - Latitude coordinate
6
+ * @param lon - Longitude coordinate
7
+ * @returns Promise with the reverse geocoding result or null if failed
8
+ */
9
+ export declare const reverseGeocode: (lat: number, lon: number) => Promise<import('./openStreetMapService').ReverseGeocodeResult | null>;
10
+ export declare const ensureGoogleMapsPlaces: () => Promise<void>;
@@ -0,0 +1,59 @@
1
+ export interface NominatimResponse {
2
+ place_id: number;
3
+ licence: string;
4
+ osm_type: string;
5
+ osm_id: number;
6
+ lat: string;
7
+ lon: string;
8
+ class: string;
9
+ type: string;
10
+ place_rank: number;
11
+ importance: number;
12
+ addresstype: string;
13
+ name?: string;
14
+ display_name: string;
15
+ address?: {
16
+ house_number?: string;
17
+ road?: string;
18
+ suburb?: string;
19
+ city?: string;
20
+ town?: string;
21
+ village?: string;
22
+ county?: string;
23
+ state?: string;
24
+ postcode?: string;
25
+ country?: string;
26
+ country_code?: string;
27
+ [key: string]: string | undefined;
28
+ };
29
+ boundingbox: string[];
30
+ }
31
+ export interface ReverseGeocodeResult {
32
+ displayName: string;
33
+ address?: {
34
+ house_number?: string;
35
+ road?: string;
36
+ suburb?: string;
37
+ city?: string;
38
+ town?: string;
39
+ village?: string;
40
+ county?: string;
41
+ state?: string;
42
+ postcode?: string;
43
+ country?: string;
44
+ country_code?: string;
45
+ };
46
+ }
47
+ /**
48
+ * Reverse geocodes coordinates to get full address using OpenStreetMap Nominatim API
49
+ * @param lat - Latitude coordinate
50
+ * @param lon - Longitude coordinate
51
+ * @returns Promise with the reverse geocoding result or null if failed
52
+ */
53
+ export declare const reverseGeocode: (lat: number, lon: number) => Promise<ReverseGeocodeResult | null>;
54
+ /**
55
+ * Formats the address object into a readable string
56
+ * @param address - Address object from the API response
57
+ * @returns Formatted address string
58
+ */
59
+ export declare const formatAddress: (address: NonNullable<ReverseGeocodeResult['address']>) => string;
@@ -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 {
@@ -147,6 +147,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
147
147
  type: FunctionConstructor;
148
148
  required: false;
149
149
  };
150
+ preContentData: {
151
+ type: ArrayConstructor;
152
+ required: false;
153
+ };
150
154
  router: {
151
155
  type: ObjectConstructor;
152
156
  required: true;
@@ -304,6 +308,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
304
308
  type: FunctionConstructor;
305
309
  required: false;
306
310
  };
311
+ preContentData: {
312
+ type: ArrayConstructor;
313
+ required: false;
314
+ };
307
315
  router: {
308
316
  type: ObjectConstructor;
309
317
  required: true;
@@ -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;
@@ -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
  /**
@@ -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;
@@ -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;
@@ -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';
@@ -55,6 +56,7 @@ import TSInlineMessage from './InlineMessage/InlineMessage.vue';
55
56
  import TSInputBadge from './InputBadge/InputBadge.vue';
56
57
  import TSInputCurrency from './InputCurrency/InputCurrency.vue';
57
58
  import TSInputCurrencyReference from './InputCurrencyReference/InputCurrencyReference.vue';
59
+ import TSInputCoordinate from './InputCoordinate/InputCoordinate.vue';
58
60
  import TSInputEmail from './InputEmail/InputEmail.vue';
59
61
  import TSInputNumber from './InputNumber/InputNumber.vue';
60
62
  import TSInputOTP from './InputOTP/InputOTP.vue';
@@ -82,4 +84,4 @@ import TSTree from './Tree/Tree.vue';
82
84
  import TSTreeSearchInput from './TreeSearchInput/TreeSearchInput.vue';
83
85
  import TSUserWithIcon from './UserWithIcon/UserWithIcon.vue';
84
86
  import TSValidatorMessage from './ValidatorMessage/ValidatorMessage.vue';
85
- 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, TSInputCurrencyReference, 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>>;
@@ -7,6 +8,8 @@ export type GetAllAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQ
7
8
  excludeId?: string;
8
9
  tag?: string;
9
10
  maintenanceAuditStatus?: string[];
11
+ coordinate?: boolean;
12
+ map?: boolean[];
10
13
  };
11
14
  export type GetAvailableAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQueryParams & {
12
15
  search?: string;
@@ -24,6 +27,18 @@ export interface GetLinkedAssetFamiliesResponse {
24
27
  message: string;
25
28
  data: Datum[];
26
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
+ }
27
42
  interface Datum {
28
43
  _id: string;
29
44
  parent: Parent;