@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.33

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 (146) hide show
  1. package/components/animation/Animation.vue.d.ts +24 -0
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  3. package/components/assetinfo/AssetInfo.vue.d.ts +30 -0
  4. package/components/badge/Badge.vue.d.ts +73 -0
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
  6. package/components/basecomponent/index.d.ts +28 -0
  7. package/components/basetree/BaseTree.vue.d.ts +591 -0
  8. package/components/basetree/TreeNode.vue.d.ts +35 -0
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  10. package/components/button/Button.vue.d.ts +193 -0
  11. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  12. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  13. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  14. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  15. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  16. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  17. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
  18. package/components/buttonscan/helpers/index.d.ts +1 -0
  19. package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
  20. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  21. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  22. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  23. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  24. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +16 -0
  25. package/components/calendar/BaseCalendar.vue.d.ts +127 -0
  26. package/components/calendar/Calendar.vue.d.ts +570 -0
  27. package/components/card/Card.vue.d.ts +139 -0
  28. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  29. package/components/customcolumn/ColumnList.vue.d.ts +47 -0
  30. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  31. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +16 -0
  32. package/components/datatable/DataTable.vue.d.ts +735 -0
  33. package/components/datatable/MultiRow.vue.d.ts +36 -0
  34. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
  35. package/components/datatable/helpers/filter.helper.d.ts +38 -0
  36. package/components/datatable/helpers/index.d.ts +6 -0
  37. package/components/datatable/helpers/readConfig.helper.d.ts +5 -0
  38. package/components/datatable/store/dataTable.store.d.ts +25 -0
  39. package/components/dialog/Dialog.vue.d.ts +464 -0
  40. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  41. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  42. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  43. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  44. package/components/editor/CodeSnippetAdapter.vue.d.ts +152 -0
  45. package/components/editor/Editor.vue.d.ts +191 -0
  46. package/components/editor/EditorButton.vue.d.ts +35 -0
  47. package/components/editor/MentionList.vue.d.ts +49 -0
  48. package/components/editor/MentionSection.vue.d.ts +152 -0
  49. package/components/editor/codeSnippetExtension.d.ts +3 -0
  50. package/components/editor/mentionSectionExtension.d.ts +3 -0
  51. package/components/editor/suggestion.d.ts +2 -0
  52. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  53. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  54. package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
  55. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +14 -0
  56. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
  57. package/components/filtercontainer/helpers/getOption.helper.d.ts +12 -0
  58. package/components/form/Form.vue.d.ts +316 -0
  59. package/components/icon/Icon.vue.d.ts +256 -0
  60. package/components/image/Image.vue.d.ts +403 -0
  61. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +59 -0
  62. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  63. package/components/imagecompressor/ImageInputInfo.vue.d.ts +55 -0
  64. package/components/index.d.ts +58 -0
  65. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  66. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  67. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  68. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  69. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  70. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  71. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  72. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
  73. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  74. package/components/inputsearch/InputSearch.vue.d.ts +32 -0
  75. package/components/inputtext/InputText.vue.d.ts +352 -0
  76. package/components/inputurl/InputURL.vue.d.ts +36 -0
  77. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  78. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  79. package/components/loading/Loading.vue.d.ts +47 -0
  80. package/components/loading/store/loading.store.d.ts +8 -0
  81. package/components/menu/Menu.vue.d.ts +390 -0
  82. package/components/menu/helpers/filterMenu.helper.d.ts +15 -0
  83. package/components/menu/helpers/index.d.ts +1 -0
  84. package/components/menuitem/MenuItem.vue +70 -0
  85. package/components/menuitem/MenuItem.vue.d.ts +39 -0
  86. package/components/menuitem/index.d.ts +106 -0
  87. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  88. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  89. package/components/passthrough/index.d.ts +16 -0
  90. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  91. package/components/textarea/Textarea.vue.d.ts +170 -0
  92. package/components/timeline/Timeline.vue.d.ts +121 -0
  93. package/components/timeline/TimelineContentByType.vue.d.ts +64 -0
  94. package/components/toast/Toast.vue.d.ts +367 -0
  95. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  96. package/components/tree/Tree.vue.d.ts +148 -0
  97. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  98. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  99. package/components/tree/helpers/index.d.ts +3 -0
  100. package/components/ts-helpers.d.ts +85 -0
  101. package/components/username/UserName.vue.d.ts +113 -0
  102. package/components/userwithicon/UserWithIcon.vue.d.ts +19 -0
  103. package/config/defaultProps.d.ts +3 -0
  104. package/config/index.d.ts +3 -0
  105. package/config/locale.d.ts +3 -0
  106. package/event-bus/mitt.d.ts +25 -7
  107. package/loading-page-BrQattYE.js +1 -0
  108. package/loading-page-CgfbWppy.js +1 -0
  109. package/loading-page-CoC9UhfC.js +4 -0
  110. package/loading-page-CoXtqoc9.js +4 -0
  111. package/loading-page-DbLuqCHa.js +1 -0
  112. package/loading-page-f8D03l3G.js +4 -0
  113. package/loading-plane-CgfbWppy.js +1 -0
  114. package/loading-plane-CoXtqoc9.js +4 -0
  115. package/loading-table-Bdr9ZhtP.js +1 -0
  116. package/loading-table-ByUoWqUo.js +4 -0
  117. package/loading-table-BygEMzFM.js +4 -0
  118. package/loading-table-BzrSQlA0.js +1 -0
  119. package/loading-table-D9bw9OcI.js +4 -0
  120. package/loading-table-chOgXi94.js +1 -0
  121. package/main.d.ts +31 -0
  122. package/no-data-CTKux8RI.js +4 -0
  123. package/no-data-Cgze_Rvp.js +1 -0
  124. package/no-data-DLHO1L_u.js +4 -0
  125. package/no-data-Dep79CBh.js +1 -0
  126. package/no-data-g0dJCy2p.js +4 -0
  127. package/no-data-y1X5WtcQ.js +1 -0
  128. package/package.json +1 -1
  129. package/plugins/WangsVue.d.ts +64 -14
  130. package/plugins/formValidation.d.ts +11 -2
  131. package/plugins/i18n-extension.d.ts +4 -0
  132. package/plugins/i18n.d.ts +8 -4
  133. package/style.css +1 -0
  134. package/utils/addAttachment.util.d.ts +18 -2
  135. package/utils/date.util.d.ts +33 -4
  136. package/utils/filterOptions.util.d.ts +3 -1
  137. package/utils/genPlaceholder.util.d.ts +11 -6
  138. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  139. package/utils/index.d.ts +34 -0
  140. package/utils/listenSidebarChanges.util.d.ts +16 -0
  141. package/utils/mergePropsWithDefaults.util.d.ts +4 -1
  142. package/utils/object.util.d.ts +14 -3
  143. package/utils/role.util.d.ts +69 -0
  144. package/utils/textFormatter.util.d.ts +15 -3
  145. package/wangsvue-fats.es.js +123730 -0
  146. package/wangsvue-fats.system.js +478 -0
@@ -0,0 +1,16 @@
1
+ import { TreeNode } from '../components/basetree/BaseTree.vue.d';
2
+ export type SidebarEvent = CustomEvent<{
3
+ /**
4
+ * Stringified keys array.
5
+ */
6
+ keys: string;
7
+ node: TreeNode;
8
+ }>;
9
+ export declare const listenSidebarChanges: (
10
+ type: 'group' | 'category',
11
+ callback: (e: SidebarEvent) => any,
12
+ ) => void;
13
+ export declare const unListenSidebarChanges: (
14
+ type: 'group' | 'category',
15
+ callback: (e: SidebarEvent) => any,
16
+ ) => void;
@@ -17,4 +17,7 @@
17
17
  * const mergedProps = mergePropsWithDefaults(defaultProps, props);
18
18
  * console.log(mergedProps); // Output: { showOptionalText: true, tooltipPos: 'bottom' }
19
19
  */
20
- export default function mergePropsWithDefaults<T extends Record<string, any>>(props: Record<string, any>, defaultProps: T): T;
20
+ export default function mergePropsWithDefaults<T extends Record<string, any>>(
21
+ props: Record<string, any>,
22
+ defaultProps: T,
23
+ ): T;
@@ -1,14 +1,25 @@
1
1
  /**
2
2
  * Utility function to get nested property value.
3
3
  */
4
- export declare const getNestedPropertyValue: (obj: Record<string, any>, path: string) => any;
4
+ export declare const getNestedPropertyValue: (
5
+ obj: Record<string, any>,
6
+ path: string,
7
+ ) => any;
5
8
  /**
6
9
  * Utility function to set nested property value.
7
10
  */
8
- export declare const setNestedPropertyValue: (obj: Record<string, any>, path: string, value: any) => void;
11
+ export declare const setNestedPropertyValue: (
12
+ obj: Record<string, any>,
13
+ path: string,
14
+ value: any,
15
+ ) => void;
9
16
  export declare const isEmptyObject: (obj: object) => boolean;
10
17
  export declare const deepEquals: (a: object, b: object) => boolean;
11
- export declare const equals: (obj1: object, obj2: object, field?: string) => boolean;
18
+ export declare const equals: (
19
+ obj1: object,
20
+ obj2: object,
21
+ field?: string,
22
+ ) => boolean;
12
23
  export declare const resolveFieldData: (data: object, field?: string) => object;
13
24
  export declare const contains: (value: object, list: object[]) => boolean;
14
25
  export declare const isNotEmpty: (value: object) => boolean;
@@ -0,0 +1,69 @@
1
+ import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
2
+ export * from '../utils';
3
+ export type TransactionRole = {
4
+ manager: boolean;
5
+ monitoringReport: boolean;
6
+ staff: boolean;
7
+ approver: boolean;
8
+ };
9
+ export type SystemRole = {
10
+ create: boolean;
11
+ view: boolean;
12
+ update: boolean;
13
+ delete: boolean;
14
+ };
15
+ 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';
31
+ export type TransactionAttribute =
32
+ | 'borrowingRole'
33
+ | 'assignmentRole'
34
+ | 'disposalRole'
35
+ | 'transferRole'
36
+ | 'auditRole'
37
+ | 'maintenanceRole'
38
+ | 'repairRole'
39
+ | 'trackingRole'
40
+ | 'damagedRole'
41
+ | 'missingRole';
42
+ export interface UserLogin {
43
+ transactionRoles: Record<TransactionAttribute, TransactionRole>;
44
+ systemRoles: Record<SystemRoleAttribute, SystemRole>;
45
+ userType: 'Admin' | 'Basic';
46
+ }
47
+ export declare const getTransactionRole: (
48
+ name: keyof UserLogin['transactionRoles'],
49
+ ) => TransactionRole;
50
+ export declare const getSystemRole: (
51
+ name: keyof UserLogin['systemRoles'],
52
+ ) => SystemRole;
53
+ export declare const hasSystemRole: (name: SystemRoleAttribute) => boolean;
54
+ export declare const hasTransactionRole: (
55
+ name: TransactionAttribute,
56
+ ) => boolean;
57
+ export declare const hasManagerRole: (name: TransactionAttribute) => boolean;
58
+ export declare const hasAnyManagerRole: () => boolean;
59
+ export declare const hasAnyMonitoringReportRole: () => boolean;
60
+ export declare const hasStaffRole: (name: TransactionAttribute) => boolean;
61
+ export declare const hasMonitoringReportRole: (
62
+ name: TransactionAttribute,
63
+ ) => boolean;
64
+ export declare const hasApprovalRole: (name: TransactionAttribute) => boolean;
65
+ export declare const checkRouteAccess: (
66
+ to: RouteLocationNormalized,
67
+ from: RouteLocationNormalized,
68
+ next: NavigationGuardNext,
69
+ ) => void;
@@ -1,7 +1,19 @@
1
1
  export declare const formatUserName: (name?: string) => string;
2
- export declare const getInititalName: (existing: string[], fullName?: string, maxLength?: number) => string;
3
- export declare const getInitialsByConsonant: (existingInitials: string[], fullName: string, maxLength: number) => string;
4
- export declare const getInitialsBy3FirstLetter: (existingInitials: string[], fullName: string, maxLength: number) => string;
2
+ export declare const getInititalName: (
3
+ existing: string[],
4
+ fullName?: string,
5
+ maxLength?: number,
6
+ ) => string;
7
+ export declare const getInitialsByConsonant: (
8
+ existingInitials: string[],
9
+ fullName: string,
10
+ maxLength: number,
11
+ ) => string;
12
+ export declare const getInitialsBy3FirstLetter: (
13
+ existingInitials: string[],
14
+ fullName: string,
15
+ maxLength: number,
16
+ ) => string;
5
17
  /**
6
18
  * Formats the label with the appropriate article ("a" or "an") based on its vowel sound.
7
19
  * This function checks if the label starts with a vowel or has a special case for silent "h" words.