@fewangsit/wangsvue-fats 1.0.0-alpha.34 → 1.0.0-alpha.35

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 (150) hide show
  1. package/components/animation/Animation.vue.d.ts +6 -6
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +36 -36
  3. package/components/assetinfo/AssetInfo.vue.d.ts +21 -18
  4. package/components/badge/Badge.vue.d.ts +46 -46
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +38 -38
  6. package/components/basecomponent/index.d.ts +15 -15
  7. package/components/basetree/BaseTree.vue.d.ts +458 -458
  8. package/components/basetree/TreeNode.vue.d.ts +25 -25
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +7 -7
  10. package/components/button/Button.vue.d.ts +142 -147
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +73 -73
  13. package/components/buttoncopy/ButtonCopy.vue.d.ts +7 -7
  14. package/components/buttondownload/ButtonDownload.vue.d.ts +26 -26
  15. package/components/buttonfilter/ButtonFilter.vue.d.ts +4 -4
  16. package/components/buttonradio/ButtonRadio.vue.d.ts +189 -189
  17. package/components/buttonscan/ButtonScan.vue.d.ts +154 -154
  18. package/components/buttonsearch/ButtonSearch.vue.d.ts +13 -13
  19. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +164 -164
  20. package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
  21. package/components/buttonsync/ButtonSync.vue.d.ts +10 -10
  22. package/components/buttontoggle/ButtonToggle.vue.d.ts +4 -4
  23. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +6 -6
  24. package/components/calendar/Calendar.vue.d.ts +469 -469
  25. package/components/card/Card.vue.d.ts +82 -82
  26. package/components/checkbox/Checkbox.vue.d.ts +245 -245
  27. package/components/customcolumn/CustomColumn.vue.d.ts +21 -21
  28. package/components/datatable/DataTable.vue.d.ts +595 -595
  29. package/components/dialog/Dialog.vue.d.ts +367 -367
  30. package/components/dialogconfirm/DialogConfirm.vue.d.ts +117 -117
  31. package/components/dialogform/DialogForm.vue.d.ts +288 -288
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +98 -98
  33. package/components/dropdown/Dropdown.vue.d.ts +226 -226
  34. package/components/editor/Editor.vue.d.ts +156 -156
  35. package/components/fieldwrapper/FieldWrapper.vue.d.ts +48 -48
  36. package/components/fileupload/FileUpload.vue.d.ts +132 -132
  37. package/components/filtercontainer/FilterContainer.vue.d.ts +116 -113
  38. package/components/form/Form.vue.d.ts +258 -258
  39. package/components/icon/Icon.vue.d.ts +235 -237
  40. package/components/image/Image.vue.d.ts +306 -306
  41. package/components/imagecompressor/ImageCompressor.vue.d.ts +186 -186
  42. package/components/index.d.ts +57 -58
  43. package/components/inputbadge/InputBadge.vue.d.ts +90 -90
  44. package/components/inputcurrency/InputCurrency.vue.d.ts +126 -126
  45. package/components/inputcurrency/helpers/currency.helper.d.ts +3 -3
  46. package/components/inputnumber/InputNumber.vue.d.ts +245 -245
  47. package/components/inputpassword/InputPassword.vue.d.ts +19 -19
  48. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +68 -68
  49. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +88 -88
  50. package/components/inputsearch/InputSearch.vue.d.ts +14 -11
  51. package/components/inputtext/InputText.vue.d.ts +281 -281
  52. package/components/inputurl/InputURL.vue.d.ts +9 -6
  53. package/components/invisiblefield/InvisibleField.vue.d.ts +18 -18
  54. package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
  55. package/components/litedropdown/LiteDropdown.vue.d.ts +64 -64
  56. package/components/loading/Loading.vue.d.ts +5 -5
  57. package/components/loading/store/loading.store.d.ts +3 -3
  58. package/components/menu/Menu.vue.d.ts +282 -282
  59. package/components/menuitem/index.d.ts +84 -84
  60. package/components/multiselect/MultiSelect.vue.d.ts +161 -161
  61. package/components/overlaypanel/OverlayPanel.vue.d.ts +207 -207
  62. package/components/passthrough/index.d.ts +8 -8
  63. package/components/tabmenu/TabMenu.vue.d.ts +185 -185
  64. package/components/textarea/Textarea.vue.d.ts +131 -131
  65. package/components/timeline/Timeline.vue.d.ts +60 -60
  66. package/components/toast/Toast.vue.d.ts +265 -265
  67. package/components/toggleswitch/ToggleSwitch.vue.d.ts +211 -211
  68. package/components/tree/Tree.vue.d.ts +116 -116
  69. package/components/tree/helpers/filterNodeKeys.helper.d.ts +4 -4
  70. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +1 -1
  71. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  72. package/components/ts-helpers.d.ts +41 -43
  73. package/components/username/UserName.vue.d.ts +71 -71
  74. package/components/userwithicon/UserWithIcon.vue.d.ts +8 -8
  75. package/directives/focus.d.ts +1 -1
  76. package/event-bus/index.d.ts +51 -51
  77. package/event-bus/mitt.d.ts +21 -24
  78. package/package.json +8 -4
  79. package/plugins/WangsVue.d.ts +226 -226
  80. package/plugins/formValidation.d.ts +11 -11
  81. package/plugins/i18n-extension.d.ts +1 -1
  82. package/plugins/i18n.d.ts +80 -80
  83. package/utils/date.util.d.ts +53 -53
  84. package/utils/index.d.ts +2 -28
  85. package/utils/listenSidebarChanges.util.d.ts +9 -9
  86. package/utils/object.util.d.ts +8 -8
  87. package/utils/role.util.d.ts +43 -44
  88. package/utils/toast.util.d.ts +78 -78
  89. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
  90. package/components/buttonscan/helpers/index.d.ts +0 -1
  91. package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
  92. package/components/calendar/BaseCalendar.vue.d.ts +0 -127
  93. package/components/customcolumn/ColumnList.vue.d.ts +0 -47
  94. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -16
  95. package/components/datatable/MultiRow.vue.d.ts +0 -36
  96. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  97. package/components/datatable/helpers/filter.helper.d.ts +0 -38
  98. package/components/datatable/helpers/index.d.ts +0 -6
  99. package/components/datatable/helpers/readConfig.helper.d.ts +0 -5
  100. package/components/datatable/store/dataTable.store.d.ts +0 -25
  101. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -152
  102. package/components/editor/EditorButton.vue.d.ts +0 -35
  103. package/components/editor/MentionList.vue.d.ts +0 -49
  104. package/components/editor/MentionSection.vue.d.ts +0 -152
  105. package/components/editor/codeSnippetExtension.d.ts +0 -3
  106. package/components/editor/mentionSectionExtension.d.ts +0 -3
  107. package/components/editor/suggestion.d.ts +0 -2
  108. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -14
  109. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  110. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -12
  111. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -59
  112. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -55
  113. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  114. package/components/menu/helpers/filterMenu.helper.d.ts +0 -15
  115. package/components/menu/helpers/index.d.ts +0 -1
  116. package/components/menuitem/MenuItem.vue +0 -70
  117. package/components/menuitem/MenuItem.vue.d.ts +0 -39
  118. package/components/timeline/TimelineContentByType.vue.d.ts +0 -64
  119. package/components/transactionroles/TransactionRoles.vue.d.ts +0 -58
  120. package/components/tree/helpers/index.d.ts +0 -3
  121. package/loading-page-BrQattYE.js +0 -1
  122. package/loading-page-CgfbWppy.js +0 -1
  123. package/loading-page-CoC9UhfC.js +0 -4
  124. package/loading-page-CoXtqoc9.js +0 -4
  125. package/loading-page-DbLuqCHa.js +0 -1
  126. package/loading-page-f8D03l3G.js +0 -4
  127. package/loading-plane-CgfbWppy.js +0 -1
  128. package/loading-plane-CoXtqoc9.js +0 -4
  129. package/loading-table-Bdr9ZhtP.js +0 -1
  130. package/loading-table-ByUoWqUo.js +0 -4
  131. package/loading-table-BygEMzFM.js +0 -4
  132. package/loading-table-BzrSQlA0.js +0 -1
  133. package/loading-table-D9bw9OcI.js +0 -4
  134. package/loading-table-chOgXi94.js +0 -1
  135. package/no-data-CTKux8RI.js +0 -4
  136. package/no-data-Cgze_Rvp.js +0 -1
  137. package/no-data-DLHO1L_u.js +0 -4
  138. package/no-data-Dep79CBh.js +0 -1
  139. package/no-data-g0dJCy2p.js +0 -4
  140. package/no-data-y1X5WtcQ.js +0 -1
  141. package/style.css +0 -1
  142. package/utils/addAttachment.util.d.ts +0 -59
  143. package/utils/exportToExcel.util.d.ts +0 -20
  144. package/utils/filterOptions.util.d.ts +0 -5
  145. package/utils/genPlaceholder.util.d.ts +0 -13
  146. package/utils/getAttachmentIcon.util.d.ts +0 -8
  147. package/utils/mergePropsWithDefaults.util.d.ts +0 -23
  148. package/utils/textFormatter.util.d.ts +0 -29
  149. package/wangsvue-fats.es.js +0 -123948
  150. package/wangsvue-fats.system.js +0 -478
package/plugins/i18n.d.ts CHANGED
@@ -2,97 +2,97 @@ import { App, Ref } from 'vue';
2
2
  import { AxiosResponse } from 'axios';
3
3
  export type Locale = string;
4
4
  export interface LanguageOption {
5
- /**
6
- * ISO 639-1 language code (e.g., "en" for English, "fr" for French).
7
- */
8
- isoCode?: string;
9
- /**
10
- * The name of the language in English (e.g., "English", "Français").
11
- */
12
- name: string;
13
- /**
14
- * The URL of the country's flag image.
15
- * Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
16
- */
17
- flag?: string;
5
+ /**
6
+ * ISO 639-1 language code (e.g., "en" for English, "fr" for French).
7
+ */
8
+ isoCode?: string;
9
+ /**
10
+ * The name of the language in English (e.g., "English", "Français").
11
+ */
12
+ name: string;
13
+ /**
14
+ * The URL of the country's flag image.
15
+ * Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
16
+ */
17
+ flag?: string;
18
18
  }
19
19
  export interface I18n {
20
- /**
21
- * Locale message translation
22
- *
23
- * @param key - The translation key
24
- * @param params - A values of named interpolation
25
- * @param args - Positional interpolation values
26
- *
27
- * @returns translation message
28
- * @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
29
- * @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
30
- */
31
- t: {
32
- (key: string, params: Record<string, any>): string;
33
- (key: string, ...args: (string | number | boolean)[]): string;
34
- };
35
- /**
36
- * Change the locale dynamically
37
- *
38
- * @param newLocale - The locale to switch to
39
- */
40
- setLocale: (newLocale: Locale) => Promise<void>;
41
- /**
42
- * Get the current locale
43
- *
44
- * @returns Current locale
45
- */
46
- locale: Ref<Locale>;
47
- /**
48
- * Service methods handle fetch requests
49
- */
50
- service?: I18nService;
20
+ /**
21
+ * Locale message translation
22
+ *
23
+ * @param key - The translation key
24
+ * @param params - A values of named interpolation
25
+ * @param args - Positional interpolation values
26
+ *
27
+ * @returns translation message
28
+ * @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
29
+ * @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
30
+ */
31
+ t: {
32
+ (key: string, params: Record<string, any>): string;
33
+ (key: string, ...args: (string | number | boolean)[]): string;
34
+ };
35
+ /**
36
+ * Change the locale dynamically
37
+ *
38
+ * @param newLocale - The locale to switch to
39
+ */
40
+ setLocale: (newLocale: Locale) => Promise<void>;
41
+ /**
42
+ * Get the current locale
43
+ *
44
+ * @returns Current locale
45
+ */
46
+ locale: Ref<Locale>;
47
+ /**
48
+ * Service methods handle fetch requests
49
+ */
50
+ service?: I18nService;
51
51
  }
52
52
  type MessageMap = Record<string, string>;
53
53
  export interface I18nService {
54
- /**
55
- * Fetch all translation messages for a specific locale.
56
- * @param locale The locale code (e.g., 'en', 'id').
57
- * @returns A promise resolving to a key-value record of messages.
58
- */
59
- getMessages(locale: string): Promise<
60
- AxiosResponse<{
61
- data: MessageMap;
62
- }>
63
- >;
64
- /**
65
- * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
66
- *
67
- * @returns Promise Array of options
68
- */
69
- getLanguageOptions(): Promise<LanguageOption[]>;
70
- /**
71
- * Fetch single lang option meta data
72
- *
73
- * @param locale The locale code (e.g., 'en', 'id').
74
- * @returns Promise LanguageMeta
75
- */
76
- getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
77
- /**
78
- * Translate a specific text to the target locale.
79
- * @param key Unique translation key.
80
- * @param locale Target locale code.
81
- * @returns A promise resolving to the translated string.
82
- */
83
- translateText(key: string, locale: string): Promise<string>;
54
+ /**
55
+ * Fetch all translation messages for a specific locale.
56
+ * @param locale The locale code (e.g., 'en', 'id').
57
+ * @returns A promise resolving to a key-value record of messages.
58
+ */
59
+ getMessages(locale: string): Promise<
60
+ AxiosResponse<{
61
+ data: MessageMap;
62
+ }>
63
+ >;
64
+ /**
65
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
66
+ *
67
+ * @returns Promise Array of options
68
+ */
69
+ getLanguageOptions(): Promise<LanguageOption[]>;
70
+ /**
71
+ * Fetch single lang option meta data
72
+ *
73
+ * @param locale The locale code (e.g., 'en', 'id').
74
+ * @returns Promise LanguageMeta
75
+ */
76
+ getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
77
+ /**
78
+ * Translate a specific text to the target locale.
79
+ * @param key Unique translation key.
80
+ * @param locale Target locale code.
81
+ * @returns A promise resolving to the translated string.
82
+ */
83
+ translateText(key: string, locale: string): Promise<string>;
84
84
  }
85
85
  export declare const useI18n: () => I18n;
86
86
  declare const i18n: {
87
- install: (app: App) => void;
87
+ install: (app: App) => void;
88
88
  };
89
89
  export declare const createI18nWithExtension: (
90
- service: I18nService,
90
+ service: I18nService,
91
91
  ) => typeof i18n;
92
92
  export default i18n;
93
93
  declare module 'vue' {
94
- interface ComponentCustomProperties {
95
- $i18n: I18n;
96
- $t: I18n['t'];
97
- }
94
+ interface ComponentCustomProperties {
95
+ $i18n: I18n;
96
+ $t: I18n['t'];
97
+ }
98
98
  }
@@ -1,58 +1,58 @@
1
1
  export type TDateFormat =
2
- | 'd/m/yy'
3
- | 'm/d/yy'
4
- | 'd/mm/yy'
5
- | 'dd/mm/yy'
6
- | 'dd/mm/yyyy'
7
- | 'dd M yy'
8
- | 'dd M yyyy'
9
- | 'dd MM yy'
10
- | 'dd MM yyyy'
11
- | 'D dd M yy'
12
- | 'D dd M yyyy'
13
- | 'DD dd MM yy'
14
- | 'DD dd MM yyyy'
15
- | 'D, dd M yy'
16
- | 'D, dd M yyyy'
17
- | 'DD, dd MM yy'
18
- | 'DD, dd MM yyyy';
2
+ | 'd/m/yy'
3
+ | 'm/d/yy'
4
+ | 'd/mm/yy'
5
+ | 'dd/mm/yy'
6
+ | 'dd/mm/yyyy'
7
+ | 'dd M yy'
8
+ | 'dd M yyyy'
9
+ | 'dd MM yy'
10
+ | 'dd MM yyyy'
11
+ | 'D dd M yy'
12
+ | 'D dd M yyyy'
13
+ | 'DD dd MM yy'
14
+ | 'DD dd MM yyyy'
15
+ | 'D, dd M yy'
16
+ | 'D, dd M yyyy'
17
+ | 'DD, dd MM yy'
18
+ | 'DD, dd MM yyyy';
19
19
  export type GoDateLayout =
20
- | '02/01/06'
21
- | '_2/_1/06'
22
- | '_1/_2/06'
23
- | '02 Jan 06'
24
- | 'Mon, 02 Jan 06'
25
- | 'Mon, 02 Jan 2006';
20
+ | '02/01/06'
21
+ | '_2/_1/06'
22
+ | '_1/_2/06'
23
+ | '02 Jan 06'
24
+ | 'Mon, 02 Jan 06'
25
+ | 'Mon, 02 Jan 2006';
26
26
  export type TTimeFormat = 'HH:mm' | 'HH:mm a' | 'HH:mm:ss' | 'HH:mm:ss a';
27
27
  export type GoTimeLayout = '15:04' | '03:04 PM' | '15:04:05' | '03:04:05 PM';
28
28
  export type CustomDateTimeFormatOptions = Omit<
29
- Intl.DateTimeFormatOptions,
30
- 'timeZone'
29
+ Intl.DateTimeFormatOptions,
30
+ 'timeZone'
31
31
  > & {
32
- timezone?: string;
33
- locale?: string;
32
+ timezone?: string;
33
+ locale?: string;
34
34
  };
35
35
  export type DateOptions = {
36
- locale?: string;
37
- dateFormat?: TDateFormat | GoDateLayout;
38
- timeFormat?: TTimeFormat | GoTimeLayout;
39
- timezone?: string;
40
- /**
41
- * Show the time in the formatted date.
42
- *
43
- * @default true - when `timeFormat` is provided
44
- */
45
- showTime?: boolean;
46
- /**
47
- * Show the date in the formatted date.
48
- *
49
- * @default true
50
- */
51
- showDate?: boolean;
52
- /**
53
- * This is old format (general settings), if configuration still using old settings then this option parameter can be used
54
- */
55
- formatPreset?: CustomDateTimeFormatOptions;
36
+ locale?: string;
37
+ dateFormat?: TDateFormat | GoDateLayout;
38
+ timeFormat?: TTimeFormat | GoTimeLayout;
39
+ timezone?: string;
40
+ /**
41
+ * Show the time in the formatted date.
42
+ *
43
+ * @default true - when `timeFormat` is provided
44
+ */
45
+ showTime?: boolean;
46
+ /**
47
+ * Show the date in the formatted date.
48
+ *
49
+ * @default true
50
+ */
51
+ showDate?: boolean;
52
+ /**
53
+ * This is old format (general settings), if configuration still using old settings then this option parameter can be used
54
+ */
55
+ formatPreset?: CustomDateTimeFormatOptions;
56
56
  };
57
57
  export declare const formatDate: (date: Date, options?: DateOptions) => string;
58
58
  export declare const formatISODate: (date: string | Date) => string;
@@ -64,12 +64,12 @@ export declare const formatISODate: (date: string | Date) => string;
64
64
  * @returns The formatted date string.
65
65
  */
66
66
  export declare const formatDateReadable: (
67
- date: Date,
68
- maxSeconds?: number,
67
+ date: Date,
68
+ maxSeconds?: number,
69
69
  ) => string;
70
70
  export declare const getRemainingTime: (deadline: string) => {
71
- seconds: number;
72
- days: number;
73
- hours: number;
74
- minutes: number;
71
+ seconds: number;
72
+ days: number;
73
+ hours: number;
74
+ minutes: number;
75
75
  };
package/utils/index.d.ts CHANGED
@@ -1,34 +1,8 @@
1
+ export { formatDate } from '../utils/date.util';
1
2
  export * from '../components/tree/helpers/filterNodeKeys.helper';
2
3
  export * from './role.util';
3
4
  export * from './listenSidebarChanges.util';
4
- export {
5
- checkRouteAccess,
6
- getTransactionRole,
7
- getSystemRole,
8
- hasSystemRole,
9
- hasTransactionRole,
10
- hasManagerRole,
11
- hasAnyManagerRole,
12
- hasAnyMonitoringReportRole,
13
- hasStaffRole,
14
- hasMonitoringReportRole,
15
- hasApprovalRole,
16
- } from './role.util';
5
+ export { checkRouteAccess } from './role.util';
17
6
  export { ZIndexUtils } from 'primevue/utils';
18
7
  export { default as useToast } from './toast.util';
19
8
  export { default as flattenTreeNodeChildren } from '../components/tree/helpers/flattenTreeNodeChildren.helper';
20
-
21
- export * from './addAttachment.util';
22
- export * from './object.util';
23
- export * from './date.util';
24
- export type { ToastParams, ToastMethod, UseToastConfig } from './toast.util';
25
- export type { ITable } from './exportToExcel.util';
26
- export type { FileType, FormattedFile } from './addAttachment.util';
27
- export { default as exportToExcel } from './exportToExcel.util';
28
- export { default as getAttachmentIcon } from './getAttachmentIcon.util';
29
- export { default as filterOptions } from './filterOptions.util';
30
- export { default as mergePropsWithDefaults } from './mergePropsWithDefaults.util';
31
- export { formatUserName, getInititalName } from './textFormatter.util';
32
- export { formatISODate } from './date.util';
33
- export { genPlaceholder } from './genPlaceholder.util';
34
- export { checkRouteAccess } from './role.util';
@@ -1,16 +1,16 @@
1
1
  import { TreeNode } from '../components/basetree/BaseTree.vue.d';
2
2
  export type SidebarEvent = CustomEvent<{
3
- /**
4
- * Stringified keys array.
5
- */
6
- keys: string;
7
- node: TreeNode;
3
+ /**
4
+ * Stringified keys array.
5
+ */
6
+ keys: string;
7
+ node: TreeNode;
8
8
  }>;
9
9
  export declare const listenSidebarChanges: (
10
- type: 'group' | 'category',
11
- callback: (e: SidebarEvent) => any,
10
+ type: 'group' | 'category',
11
+ callback: (e: SidebarEvent) => any,
12
12
  ) => void;
13
13
  export declare const unListenSidebarChanges: (
14
- type: 'group' | 'category',
15
- callback: (e: SidebarEvent) => any,
14
+ type: 'group' | 'category',
15
+ callback: (e: SidebarEvent) => any,
16
16
  ) => void;
@@ -2,23 +2,23 @@
2
2
  * Utility function to get nested property value.
3
3
  */
4
4
  export declare const getNestedPropertyValue: (
5
- obj: Record<string, any>,
6
- path: string,
5
+ obj: Record<string, any>,
6
+ path: string,
7
7
  ) => any;
8
8
  /**
9
9
  * Utility function to set nested property value.
10
10
  */
11
11
  export declare const setNestedPropertyValue: (
12
- obj: Record<string, any>,
13
- path: string,
14
- value: any,
12
+ obj: Record<string, any>,
13
+ path: string,
14
+ value: any,
15
15
  ) => void;
16
16
  export declare const isEmptyObject: (obj: object) => boolean;
17
17
  export declare const deepEquals: (a: object, b: object) => boolean;
18
18
  export declare const equals: (
19
- obj1: object,
20
- obj2: object,
21
- field?: string,
19
+ obj1: object,
20
+ obj2: object,
21
+ field?: string,
22
22
  ) => boolean;
23
23
  export declare const resolveFieldData: (data: object, field?: string) => object;
24
24
  export declare const contains: (value: object, list: object[]) => boolean;
@@ -1,69 +1,68 @@
1
1
  import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
2
- export * from '../utils';
3
2
  export type TransactionRole = {
4
- manager: boolean;
5
- monitoringReport: boolean;
6
- staff: boolean;
7
- approver: boolean;
3
+ manager: boolean;
4
+ monitoringReport: boolean;
5
+ staff: boolean;
6
+ approver: boolean;
8
7
  };
9
8
  export type SystemRole = {
10
- create: boolean;
11
- view: boolean;
12
- update: boolean;
13
- delete: boolean;
9
+ create: boolean;
10
+ view: boolean;
11
+ update: boolean;
12
+ delete: boolean;
14
13
  };
15
14
  export type SystemRoleAttribute =
16
- | 'importData'
17
- | 'assetAttribute'
18
- | 'assetPolicies'
19
- | 'depreciationGroup'
20
- | 'depreciationMethod'
21
- | 'documentDeletion'
22
- | 'group'
23
- | 'iotReader'
24
- | 'license'
25
- | 'purchaseDocument'
26
- | 'purchaseInformation'
27
- | 'userAndRole'
28
- | 'tag'
29
- | 'tagType'
30
- | 'registerAsset';
15
+ | 'importData'
16
+ | 'assetAttribute'
17
+ | 'assetPolicies'
18
+ | 'depreciationGroup'
19
+ | 'depreciationMethod'
20
+ | 'documentDeletion'
21
+ | 'group'
22
+ | 'iotReader'
23
+ | 'license'
24
+ | 'purchaseDocument'
25
+ | 'purchaseInformation'
26
+ | 'userAndRole'
27
+ | 'tag'
28
+ | 'tagType'
29
+ | 'registerAsset';
31
30
  export type TransactionAttribute =
32
- | 'borrowingRole'
33
- | 'assignmentRole'
34
- | 'disposalRole'
35
- | 'transferRole'
36
- | 'auditRole'
37
- | 'maintenanceRole'
38
- | 'repairRole'
39
- | 'trackingRole'
40
- | 'damagedRole'
41
- | 'missingRole';
31
+ | 'borrowingRole'
32
+ | 'assignmentRole'
33
+ | 'disposalRole'
34
+ | 'transferRole'
35
+ | 'auditRole'
36
+ | 'maintenanceRole'
37
+ | 'repairRole'
38
+ | 'trackingRole'
39
+ | 'damagedRole'
40
+ | 'missingRole';
42
41
  export interface UserLogin {
43
- transactionRoles: Record<TransactionAttribute, TransactionRole>;
44
- systemRoles: Record<SystemRoleAttribute, SystemRole>;
45
- userType: 'Admin' | 'Basic';
42
+ transactionRoles: Record<TransactionAttribute, TransactionRole>;
43
+ systemRoles: Record<SystemRoleAttribute, SystemRole>;
44
+ userType: 'Admin' | 'Basic';
46
45
  }
47
46
  export declare const getTransactionRole: (
48
- name: keyof UserLogin['transactionRoles'],
47
+ name: keyof UserLogin['transactionRoles'],
49
48
  ) => TransactionRole;
50
49
  export declare const getSystemRole: (
51
- name: keyof UserLogin['systemRoles'],
50
+ name: keyof UserLogin['systemRoles'],
52
51
  ) => SystemRole;
53
52
  export declare const hasSystemRole: (name: SystemRoleAttribute) => boolean;
54
53
  export declare const hasTransactionRole: (
55
- name: TransactionAttribute,
54
+ name: TransactionAttribute,
56
55
  ) => boolean;
57
56
  export declare const hasManagerRole: (name: TransactionAttribute) => boolean;
58
57
  export declare const hasAnyManagerRole: () => boolean;
59
58
  export declare const hasAnyMonitoringReportRole: () => boolean;
60
59
  export declare const hasStaffRole: (name: TransactionAttribute) => boolean;
61
60
  export declare const hasMonitoringReportRole: (
62
- name: TransactionAttribute,
61
+ name: TransactionAttribute,
63
62
  ) => boolean;
64
63
  export declare const hasApprovalRole: (name: TransactionAttribute) => boolean;
65
64
  export declare const checkRouteAccess: (
66
- to: RouteLocationNormalized,
67
- from: RouteLocationNormalized,
68
- next: NavigationGuardNext,
65
+ to: RouteLocationNormalized,
66
+ from: RouteLocationNormalized,
67
+ next: NavigationGuardNext,
69
68
  ) => void;