tsv2-library 1.0.61-alpha.99 → 1.0.64

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 (28) 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 +2 -2
  5. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +8 -0
  6. package/dist/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +76 -0
  7. package/dist/src/components/v2/DialogCoordinate/FullscreenToggle.vue.d.ts +4 -0
  8. package/dist/src/components/v2/DialogCoordinate/MapSearch.vue.d.ts +13 -0
  9. package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +10 -0
  10. package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +59 -0
  11. package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +8 -0
  12. package/dist/src/components/v2/Icon/Icon.vue.d.ts +4 -0
  13. package/dist/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  14. package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  15. package/dist/src/components/v2/index.d.ts +2 -1
  16. package/dist/src/utils/changelog.util.d.ts +69 -0
  17. package/dist/src/utils/createVueControl.d.ts +8 -0
  18. package/dist/src/utils/exportToExcel.util.d.ts +1 -0
  19. package/dist/src/utils/index.d.ts +2 -1
  20. package/dist/style.css +1 -1
  21. package/dist/tsv2-library.es.js +182 -57
  22. package/dist/tsv2-library.umd.js +7 -7
  23. package/package.json +3 -1
  24. package/src/components/v2/DataTable/DataTable.vue.d.ts +8 -0
  25. package/src/components/v2/DialogCoordinate/DialogCoordinate.vue.d.ts +76 -0
  26. package/src/components/v2/Icon/Icon.vue.d.ts +4 -0
  27. package/src/components/v2/InputCoordinate/InputCoordinate.vue.d.ts +64 -0
  28. package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
@@ -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,7 +19,7 @@ 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, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail } from './utils';
23
23
  import { flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys } from './components/v2/Tree/helpers';
24
24
  import useLoadingStore from './components/v2/Loading/store/loading.store';
25
25
  import Tooltip from '../node_modules/primevue/tooltip';
@@ -31,4 +31,4 @@ declare const _default: {
31
31
  install: (app: App) => void;
32
32
  };
33
33
  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, };
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, formatLogResponseData, 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, };
@@ -151,6 +151,10 @@ export type TableColumn = {
151
151
  * Make the column cannot reordered by disabled dragability.
152
152
  */
153
153
  dragable?: boolean;
154
+ /**
155
+ * Whether the column is pinned to the left of the table.
156
+ */
157
+ pinned?: boolean;
154
158
  fixed?: boolean;
155
159
  visible?: boolean;
156
160
  /**
@@ -468,6 +472,10 @@ export interface TSDataTableProps {
468
472
  * The return value is added to the row's :classes array (see Vue.js class bindings).
469
473
  */
470
474
  rowClass?: (data: any) => string | object | undefined;
475
+ /**
476
+ * An array of arrays to display in the exported excel file before the main data.
477
+ */
478
+ preContentData?: (string | number)[][];
471
479
  }
472
480
 
473
481
  export type TSDataTableEmits = {
@@ -0,0 +1,76 @@
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 type InputMapMode = 'click' | 'drag' | 'center';
43
+
44
+ export type MarkerConfig =
45
+ | {
46
+ kind: 'pin';
47
+ pinOptions?: google.maps.marker.PinElementOptions;
48
+ title?: string;
49
+ }
50
+ | {
51
+ kind: 'img';
52
+ src: string;
53
+ title?: string;
54
+ }
55
+ | {
56
+ kind: 'svgString';
57
+ svg: string;
58
+ title?: string;
59
+ }
60
+ | {
61
+ kind: 'customElement';
62
+ createElement: () => HTMLElement;
63
+ title?: string;
64
+ };
65
+
66
+ export interface MapControl {
67
+ position?: google.maps.ControlPosition;
68
+ index?: number;
69
+ createElement: (ctx: { map: google.maps.Map }) => HTMLElement;
70
+ }
71
+
72
+ export interface MapFocusConfig {
73
+ name: string;
74
+ featureType: google.maps.FeatureType;
75
+ featureStyleOptions: google.maps.FeatureStyleOptions;
76
+ }
@@ -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,13 @@
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, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ map: {
9
+ type: __PropType<google.maps.Map>;
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;
@@ -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;
@@ -68,6 +68,8 @@ export type TSVueIcons =
68
68
  | 'file-shield-2-line'
69
69
  | 'filter-fill'
70
70
  | 'filter-line'
71
+ | 'fullscreen-line'
72
+ | 'fullscreen-exit-line'
71
73
  | 'folder-line'
72
74
  | 'gate'
73
75
  | 'group'
@@ -97,6 +99,8 @@ export type TSVueIcons =
97
99
  | 'phone-line'
98
100
  | 'printer'
99
101
  | 'price-tag-3-line'
102
+ | 'pushpin-2-line'
103
+ | 'pushpin-fill'
100
104
  | 'qr'
101
105
  | 'qr-scan-line'
102
106
  | 'recycle-bin'
@@ -0,0 +1,64 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { Nullable } from '../ts-helpers';
3
+ import { LatLngValue } from '../DialogCoordinate/DialogCoordinate.vue';
4
+
5
+ /**
6
+ * InputCoordinate component props
7
+ */
8
+ export interface InputCoordinateProps {
9
+ modelValue?: Nullable<LatLngValue>;
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<LatLngValue>];
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
  /**
@@ -55,6 +55,7 @@ import TSInlineMessage from './InlineMessage/InlineMessage.vue';
55
55
  import TSInputBadge from './InputBadge/InputBadge.vue';
56
56
  import TSInputCurrency from './InputCurrency/InputCurrency.vue';
57
57
  import TSInputCurrencyReference from './InputCurrencyReference/InputCurrencyReference.vue';
58
+ import TSInputCoordinate from './InputCoordinate/InputCoordinate.vue';
58
59
  import TSInputEmail from './InputEmail/InputEmail.vue';
59
60
  import TSInputNumber from './InputNumber/InputNumber.vue';
60
61
  import TSInputOTP from './InputOTP/InputOTP.vue';
@@ -82,4 +83,4 @@ import TSTree from './Tree/Tree.vue';
82
83
  import TSTreeSearchInput from './TreeSearchInput/TreeSearchInput.vue';
83
84
  import TSUserWithIcon from './UserWithIcon/UserWithIcon.vue';
84
85
  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, };
86
+ 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, 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, };
@@ -0,0 +1,69 @@
1
+ import { FetchResponse } from '../components/v2/DataTable/DataTable.vue.d';
2
+ /**
3
+ * Format the response data from the API to display in the changelog table.
4
+ * This function formats the date and currency fields in the response data.
5
+ * It also formats the datetime fields if the field value is a valid ISO datetime string.
6
+ * @param {object} data - The response data from the API.
7
+ * @param {ChangelogObject} object - The changelog object.
8
+ * @returns {FetchResponse} - The formatted response data.
9
+ */
10
+ export declare const formatLogResponseData: (data: {
11
+ data: {
12
+ data: Record<string, unknown>[];
13
+ totalRecords?: number | undefined;
14
+ };
15
+ }) => FetchResponse;
16
+ /**
17
+ * Checks if a given value is a valid ISO datetime string.
18
+ *
19
+ * @param {string} [value] - The value to be checked.
20
+ * @returns {boolean} - `true` if the value is a valid ISO datetime string, `false` otherwise.
21
+ */
22
+ export declare const isValidDateISOString: (value?: string) => boolean;
23
+ /**
24
+ * Safely parse a JSON string into an object of type T.
25
+ * If the input is not a string or is not a valid JSON string, return null.
26
+ * If the parsing fails, return null.
27
+ * @template T
28
+ * @param {unknown} value - The value to parse.
29
+ * @returns {T | null}
30
+ */
31
+ export declare const safeJsonParse: <T = string>(value?: unknown) => T | null;
32
+ /**
33
+ * Formats a date value from a string into a human-readable format.
34
+ * If the input is not a valid ISO datetime string, returns the original value.
35
+ * If the input is a valid ISO datetime string, returns a formatted date string.
36
+ * If the withTime parameter is true, includes the time in the formatted date string.
37
+ * @param {string} [value] - The date value to format.
38
+ * @param {boolean} [withTime] - Whether to include the time in the formatted date string.
39
+ * @returns {string | unknown} - The formatted date string, or the original value if the input is not a valid ISO datetime string.
40
+ */
41
+ export declare const formatDateValue: (value?: string, withTime?: boolean) => string | unknown;
42
+ /**
43
+ * Checks if a given value is a valid JSON string that contains the 'dataType' key.
44
+ * @param {unknown} [value] - The value to be checked.
45
+ * @returns {boolean} - `true` if the value is a valid JSON string that contains the 'dataType' key, `false` otherwise.
46
+ */
47
+ export declare const hasDataType: (value?: unknown) => boolean;
48
+ export declare const isCurrency: (value?: unknown) => boolean;
49
+ /**
50
+ * Formats the 'newValue' and 'oldValue' properties of a given object from ISO datetime strings into human-readable formats.
51
+ * If the input values are not valid ISO datetime strings, they are left unchanged.
52
+ * The formatted date strings will include the time.
53
+ * @param {Record<string, unknown>} d - The object with 'newValue' and 'oldValue' properties to format.
54
+ */
55
+ export declare const formatDateTimeField: (d: Record<string, unknown>) => void;
56
+ /**
57
+ * Formats the 'newValue' and 'oldValue' properties of a given object from JSON strings containing ISO datetime strings into human-readable formats.
58
+ * If the input values are not valid JSON strings or do not contain the 'value' key, they are left unchanged.
59
+ * The formatted date strings will include the time.
60
+ * @param {Record<string, unknown>} d - The object with 'newValue' and 'oldValue' properties to format.
61
+ */
62
+ export declare const formatDateFieldFromJson: (d: Record<string, unknown>) => void;
63
+ /**
64
+ * Formats a given value from a JSON string containing a 'currency' and 'value' key into a human-readable currency string.
65
+ * If the input value is not a valid JSON string or does not contain the 'currency' key, it is left unchanged.
66
+ * @param {unknown} value - The value to be formatted.
67
+ * @returns {unknown} - The formatted value if it is a valid JSON string containing the 'currency' key, the original value otherwise.
68
+ */
69
+ export declare const formatCurrencyField: (value: unknown) => unknown;
@@ -0,0 +1,8 @@
1
+ import { Component } from 'vue';
2
+ export declare const createVueControl: (component: Component, options?: {
3
+ props?: Record<string, unknown> | undefined;
4
+ emits?: Record<string, (...args: unknown[]) => void> | undefined;
5
+ } | undefined) => {
6
+ el: HTMLDivElement;
7
+ destroy(): void;
8
+ };
@@ -2,6 +2,7 @@ interface IExcelOptions {
2
2
  headers?: string[];
3
3
  data: object[];
4
4
  fileName: string;
5
+ preContentData?: (string | number)[][];
5
6
  }
6
7
  declare const exportToExcel: (options: IExcelOptions) => Promise<void>;
7
8
  export default exportToExcel;
@@ -15,6 +15,7 @@ import forceLogout from './forceLogout.util';
15
15
  import reLogin from './reLogin.util';
16
16
  import { isValidJSONString } from './json.util';
17
17
  import { buildBodyParams } from './request.util';
18
+ import { formatLogResponseData } from './changelog.util';
18
19
  declare const isObjectEmpty: (object: object) => boolean;
19
20
  declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
20
- 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, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
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, };