tsv2-library 1.0.61-beta.8 → 1.0.65

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 (29) hide show
  1. package/dist/src/build-entry.d.ts +4 -3
  2. package/dist/src/components/v2/AssetAttribute/UrlFormat.vue.d.ts +22 -0
  3. package/dist/src/components/v2/CustomColumn/ColumnList.vue.d.ts +4 -0
  4. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +3 -0
  5. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +1 -3
  6. package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +5 -0
  7. package/dist/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +20 -0
  8. package/dist/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +17 -0
  9. package/dist/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  10. package/dist/src/components/v2/index.d.ts +3 -1
  11. package/dist/src/services/assetName.service.d.ts +1 -2
  12. package/dist/src/services/settingsAttribute.service.d.ts +8 -0
  13. package/dist/src/store/assetAttribute.store.d.ts +12 -0
  14. package/dist/src/store/index.d.ts +1 -0
  15. package/dist/src/types/filterField.type.d.ts +35 -0
  16. package/dist/src/types/settingsAttribute.type.d.ts +28 -0
  17. package/dist/src/utils/index.d.ts +2 -2
  18. package/dist/src/utils/textFormater.util.d.ts +2 -0
  19. package/dist/style.css +1 -1
  20. package/dist/tsv2-library.es.js +6468 -5985
  21. package/dist/tsv2-library.umd.js +6 -6
  22. package/package.json +1 -1
  23. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +3 -0
  24. package/src/components/v2/DataTable/DataTable.vue.d.ts +1 -3
  25. package/src/components/v2/DialogForm/DialogForm.vue.d.ts +5 -0
  26. package/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +20 -0
  27. package/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +17 -0
  28. package/src/components/v2/TransactionRoles/TransactionRoles.vue.d.ts +1 -0
  29. package/src/services/settingsAttribute.service.ts +41 -0
@@ -19,17 +19,18 @@ 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, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail } from './utils';
22
+ import { handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUserLocale, formatAssetValue, 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
23
  import { default as eventBus, extendEventBus } from './event-bus';
24
24
  import { flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys } from './components/v2/Tree/helpers';
25
25
  import useLoadingStore from './components/v2/Loading/store/loading.store';
26
+ import { useAssetAttributeStore } from './store';
26
27
  import Tooltip from '../node_modules/primevue/tooltip';
27
28
  import Focus from './directives/v-focus';
28
29
  import VueHtmlToPaper from './plugins/VueHtmlToPaper';
29
- import { DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAnimation, 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, TSFailedLoad, 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';
30
+ import { DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAnimation, 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, TSFailedLoad, TSFilterContainer, TSFilterAssetValue, TSFilterCustomField, 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';
30
31
  declare const TSi18n: import("vue-i18n").I18n<{}, {}, {}, string, false>;
31
32
  declare const _default: {
32
33
  install: (app: App) => void;
33
34
  };
34
35
  export default _default;
35
- export { LibConfig, TSToastService, TSi18n, VueHtmlToPaper, Tooltip, Focus, DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAnimation, 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, TSFailedLoad, 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, };
36
+ export { LibConfig, TSToastService, TSi18n, VueHtmlToPaper, Tooltip, Focus, DialogDamageLog, DialogMissingLog, DialogTransferLog, TSAnimation, 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, TSFailedLoad, TSFilterContainer, TSFilterAssetValue, TSFilterCustomField, 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, formatAssetValue, 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, useAssetAttributeStore, eventBus, extendEventBus, Presets, };
@@ -0,0 +1,22 @@
1
+ import type { PropType as __PropType } from 'vue';
2
+ import { CustomField } from '../../../types/settingsAttribute.type';
3
+ declare const _sfc_main: import("vue").DefineComponent<{
4
+ data: {
5
+ type: __PropType<CustomField>;
6
+ required: true;
7
+ };
8
+ value: {
9
+ type: __PropType<string>;
10
+ required: true;
11
+ };
12
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ data: {
14
+ type: __PropType<CustomField>;
15
+ required: true;
16
+ };
17
+ value: {
18
+ type: __PropType<string>;
19
+ required: true;
20
+ };
21
+ }>>, {}, {}>;
22
+ export default _sfc_main;
@@ -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;
@@ -1,6 +1,8 @@
1
1
  import { TableColumn } from '../DataTable/DataTable.vue.d';
2
2
  import { ClassComponent } from '../ts-helpers';
3
3
 
4
+ export type DragableColumn = TableColumn & { order?: number };
5
+
4
6
  export interface DataTableColumnConfig {
5
7
  field: string;
6
8
  pinned: boolean;
@@ -19,6 +21,7 @@ export interface CustomColumnProps {
19
21
  tableName?: string;
20
22
  tableData?: Data[];
21
23
  defaultColumns: TableColumn[];
24
+ defaultReorderColumns?: TableColumn[];
22
25
  visibleColumns: TableColumn[];
23
26
  /**
24
27
  * The maximum column count allowed
@@ -5,9 +5,7 @@ import { ClassComponent } from '../ts-helpers';
5
5
 
6
6
  type Data = Record<string, any>;
7
7
 
8
- export type QueryParams = {
9
- [key: string]: unknown;
10
- };
8
+ export type QueryParams = Partial<Record<string, unknown>>;
11
9
 
12
10
  export type FetchResponse<T = Data> = {
13
11
  data: T[];
@@ -128,6 +128,11 @@ export interface DialogFormProps extends FormProps {
128
128
  * @defaultValue true
129
129
  */
130
130
  autoZIndex?: boolean | undefined;
131
+ /**
132
+ * Base zIndex value to use in layering.
133
+ * @defaultValue 0
134
+ */
135
+ baseZIndex?: number | undefined;
131
136
  }
132
137
 
133
138
  export interface ConfirmSlots {
@@ -0,0 +1,20 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { QueryParams } from '../DataTable/DataTable.vue.d';
3
+
4
+ export interface FilterAssetAttributeProps {
5
+ /**
6
+ * The filter object.
7
+ */
8
+ filter: QueryParams;
9
+ }
10
+
11
+ export type FilterAssetAttributeEmits = {
12
+ updateFields: [];
13
+ };
14
+
15
+ declare const FilterAssetValue: DefineComponent<
16
+ FilterAssetAttributeProps,
17
+ FilterAssetAttributeEmits
18
+ >;
19
+
20
+ export default FilterAssetValue;
@@ -0,0 +1,17 @@
1
+ import { DefineComponent } from 'vue';
2
+ import {
3
+ FilterAssetAttributeProps,
4
+ FilterAssetAttributeEmits,
5
+ } from '../FilterAssetValue/FilterAssetValue.vue.d';
6
+ import { FilterField } from '../../../types/filterField.type';
7
+
8
+ export interface FilterCustomFieldProps extends FilterAssetAttributeProps {
9
+ customFieldFetchOptionFn: FilterField<QueryParams>['fetchOptionFn'];
10
+ }
11
+
12
+ declare const FilterCustomField: DefineComponent<
13
+ FilterCustomFieldProps,
14
+ FilterAssetAttributeEmits
15
+ >;
16
+
17
+ export default FilterCustomField;
@@ -3,6 +3,7 @@ export type TransactionRoles = Addon & {
3
3
  assignment: boolean;
4
4
  transfer: boolean;
5
5
  disposal: boolean;
6
+ registration: boolean;
6
7
  };
7
8
 
8
9
  export type Addon = {
@@ -49,6 +49,8 @@ import TSDialogSelectUser from './DialogSelectUser/DialogSelectUser.vue';
49
49
  import TSDisposalReport from './DisposalReport/DisposalReport.vue';
50
50
  import TSFailedLoad from './FailedLoad/FailedLoad.vue';
51
51
  import TSFilterContainer from './FilterContainer/FilterContainer.vue';
52
+ import TSFilterAssetValue from './FilterAssetValue/FilterAssetValue.vue';
53
+ import TSFilterCustomField from './FilterCustomField/FilterCustomField.vue';
52
54
  import TSFileUpload from './FileUpload/FileUpload.vue';
53
55
  import TSForm from './Form/Form.vue';
54
56
  import TSIcon from './Icon/Icon.vue';
@@ -86,4 +88,4 @@ import TSTree from './Tree/Tree.vue';
86
88
  import TSTreeSearchInput from './TreeSearchInput/TreeSearchInput.vue';
87
89
  import TSUserWithIcon from './UserWithIcon/UserWithIcon.vue';
88
90
  import TSValidatorMessage from './ValidatorMessage/ValidatorMessage.vue';
89
- export { DialogTransferLog, DialogDamageLog, DialogMissingLog, TSAnimation, 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, TSFailedLoad, 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, };
91
+ export { DialogTransferLog, DialogDamageLog, DialogMissingLog, TSAnimation, 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, TSFailedLoad, TSFilterContainer, TSFilterAssetValue, TSFilterCustomField, 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,5 +1,4 @@
1
1
  import { AxiosInstance, AxiosResponse } from 'axios';
2
- import { QueryParams } from '../components/v2/DataTable/DataTable.vue.d';
3
2
  export interface ServiceOptions {
4
3
  headers?: Record<string, unknown>;
5
4
  params?: Record<string, unknown>;
@@ -30,7 +29,7 @@ export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstan
30
29
  declare const _default: {
31
30
  getAssetNameDetail: (id: string) => Promise<AxiosResponse<any, any>>;
32
31
  getAssetNameList: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
33
- getAssetsByAssetName: (id: string, params?: QueryParams | undefined) => Promise<AxiosResponse<any, any>>;
32
+ getAssetsByAssetName: (id: string, params?: Partial<Record<string, unknown>> | undefined) => Promise<AxiosResponse<any, any>>;
34
33
  getUnpairedAssetName: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
35
34
  getAssetNameDropdown: () => Promise<AxiosResponse<GetAssetNameDropdownResponse, any>>;
36
35
  getOptions: (params: AssetNameOptionsQueryParams) => Promise<AxiosResponse<any, any>>;
@@ -0,0 +1,8 @@
1
+ import { ShortFetchResponse } from '../components/v2/DataTable/DataTable.vue.d';
2
+ import { CustomField, DepreciationCategory } from '../types/settingsAttribute.type';
3
+ import { AxiosResponse } from 'axios';
4
+ declare const SettingsAttributeServices: {
5
+ getGeneralCustomFields: () => Promise<AxiosResponse<ShortFetchResponse<CustomField[]>>>;
6
+ getDepreciationCategory: () => Promise<AxiosResponse<ShortFetchResponse<DepreciationCategory[]>>>;
7
+ };
8
+ export default SettingsAttributeServices;
@@ -0,0 +1,12 @@
1
+ import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
2
+ import { FilterField } from '../types/filterField.type';
3
+ import { Ref } from 'vue';
4
+ export interface AssetAttributeStore {
5
+ customFieldColumns: Ref<TableColumn[]>;
6
+ assetValueColumns: Ref<TableColumn[]>;
7
+ customFieldFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
8
+ assetValueFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
9
+ getFields: () => void;
10
+ }
11
+ declare const useAssetAttributeStore: () => AssetAttributeStore;
12
+ export default useAssetAttributeStore;
@@ -0,0 +1 @@
1
+ export { default as useAssetAttributeStore } from './assetAttribute.store';
@@ -0,0 +1,35 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { DropdownOption, MultiSelectOption } from './options';
3
+ import { QueryParams } from '../components/v2/DataTable/DataTable.vue.d';
4
+ export type FilterFieldTypes = 'dropdown' | 'multiselect' | 'calendar' | 'rangenumber';
5
+ export type FilterOptions<Opt = Record<string, boolean>> = Record<keyof Opt, DropdownOption[] | MultiSelectOption[]>;
6
+ export interface FilterField<OptionsQueryParams extends QueryParams = QueryParams> {
7
+ /**
8
+ * Represents a function type for fetching options based on query parameters.
9
+ *
10
+ * @template OptionsQueryParams - The type of query parameters, extending `QueryParams`. Defaults to `any`.
11
+ *
12
+ * This function can have one of the following signatures:
13
+ * - A synchronous function that takes query parameters and returns an array of `Option` objects.
14
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
15
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
16
+ *
17
+ * @param args - The query parameters of type `T` used to fetch the options.
18
+ * @returns One of the following:
19
+ * - An array of `Option` objects.
20
+ * - A `Promise` resolving to an array of `Option` objects.
21
+ * - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
22
+ */
23
+ fetchOptionFn(args?: OptionsQueryParams): DropdownOption[] | Promise<DropdownOption[]> | Promise<AxiosResponse<CustomFieldFetchOptionResponse>>;
24
+ type: FilterFieldTypes;
25
+ field: keyof OptionsQueryParams;
26
+ label: string;
27
+ optionField?: keyof OptionsQueryParams;
28
+ params?: OptionsQueryParams;
29
+ }
30
+ export type CustomFieldFetchOptionResponse<Opt = Record<string, boolean>> = {
31
+ message: string;
32
+ data: FilterOptions<Opt> & {
33
+ customFieldOptions?: FilterOptions<Opt>;
34
+ };
35
+ };
@@ -0,0 +1,28 @@
1
+ export interface AssetAttributeTableData {
2
+ customFields?: Partial<{
3
+ [key: string]: Pick<CustomField, 'name' | 'dataType'> & {
4
+ value?: string;
5
+ };
6
+ }>;
7
+ assetValues?: Partial<{
8
+ [key: string]: Pick<DepreciationCategory, 'name' | 'isDefault'> & {
9
+ value?: string;
10
+ formattedValue?: string | null;
11
+ currency?: string;
12
+ };
13
+ }>;
14
+ }
15
+ export declare const FILTERABLE_CUSTOM_FIELD_TYPES: readonly ["Dropdown", "MultiDropdown", "Date", "Datetime", "Currency"];
16
+ export type FilterableCustomFieldTypes = (typeof FILTERABLE_CUSTOM_FIELD_TYPES)[number];
17
+ export type CustomFieldTypes = FilterableCustomFieldTypes | 'Text' | 'Textarea' | 'Numeric' | 'Phone' | 'Percentage' | 'Email' | 'URL' | 'Document';
18
+ export interface CustomField {
19
+ _id: string;
20
+ name: string;
21
+ dataType: CustomFieldTypes;
22
+ }
23
+ export interface DepreciationCategory {
24
+ _id: string;
25
+ name: string;
26
+ isDefault: boolean;
27
+ isActive: boolean;
28
+ }
@@ -1,4 +1,4 @@
1
- import { formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName } from './textFormater.util';
1
+ import { formatAssetValue, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName } from './textFormater.util';
2
2
  import handleTokenExpiration from './handleTokenExpiration.util';
3
3
  import exportToExcel from './exportToExcel.util';
4
4
  import { formatGoDate, formatDate, formatDateReadable, getUserLocale } from './date.util';
@@ -19,4 +19,4 @@ import { formatLogResponseData } from './changelog.util';
19
19
  import { googleMapLoader } from './googleMapLoader.util';
20
20
  declare const isObjectEmpty: (object: object) => boolean;
21
21
  declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
22
- export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
22
+ export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatAssetValue, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
@@ -1,4 +1,6 @@
1
1
  import { Asset } from '../types/assets.type';
2
+ import { AssetAttributeTableData } from '../types/settingsAttribute.type';
3
+ export declare const formatAssetValue: (each: AssetAttributeTableData) => AssetAttributeTableData;
2
4
  export declare const formatVowelSoundLabel: (label?: string) => string;
3
5
  export declare const formatUserName: (name?: string) => string;
4
6
  export declare const formatTagCode: (tagCode?: string) => string;