@fewangsit/wangsvue-gsts 1.0.0-alpha.1

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 (173) hide show
  1. package/assets/json/currencies.json.d.ts +1068 -0
  2. package/assets/json/languages.json.d.ts +180 -0
  3. package/assets/lottie/admin/loading-page.lottie +0 -0
  4. package/assets/lottie/admin/loading-table.lottie +0 -0
  5. package/assets/lottie/admin/no-data.lottie +0 -0
  6. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  7. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  8. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  9. package/assets/lottie/workspace/loading-page.lottie +0 -0
  10. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  11. package/assets/lottie/workspace/loading-table.lottie +0 -0
  12. package/assets/lottie/workspace/no-data.lottie +0 -0
  13. package/build-entry.d.ts +14 -0
  14. package/components/animation/Animation.vue.d.ts +24 -0
  15. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  16. package/components/badge/Badge.vue.d.ts +66 -0
  17. package/components/badgegroup/BadgeGroup.vue.d.ts +40 -0
  18. package/components/badgegrouptree/BadgeGroupTree.vue.d.ts +34 -0
  19. package/components/basecomponent/index.d.ts +28 -0
  20. package/components/basetree/BaseTree.vue.d.ts +567 -0
  21. package/components/basetree/TreeNode.vue.d.ts +35 -0
  22. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  23. package/components/button/Button.vue.d.ts +185 -0
  24. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +26 -0
  25. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +97 -0
  26. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  27. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  28. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  29. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  30. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +193 -0
  31. package/components/buttonsplit/ButtonSplit.d.ts +350 -0
  32. package/components/buttonsplit/ButtonSplit.vue.d.ts +34 -0
  33. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  34. package/components/calendar/BaseCalendar.vue.d.ts +83 -0
  35. package/components/calendar/Calendar.vue.d.ts +561 -0
  36. package/components/card/Card.vue.d.ts +139 -0
  37. package/components/changelog/Changelog.vue.d.ts +158 -0
  38. package/components/changelogpage/ChangelogFilter.vue.d.ts +16 -0
  39. package/components/changelogpage/ChangelogPage.vue.d.ts +124 -0
  40. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  41. package/components/codesnippet/CodeSnippet.vue.d.ts +14 -0
  42. package/components/customcolumn/CustomColumn.vue.d.ts +35 -0
  43. package/components/datatable/DataTable.vue.d.ts +704 -0
  44. package/components/datatable/MultiRow.vue.d.ts +16 -0
  45. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
  46. package/components/datatable/helpers/filter.helper.d.ts +28 -0
  47. package/components/datatable/helpers/index.d.ts +3 -0
  48. package/components/datatable/helpers/readConfig.helper.d.ts +2 -0
  49. package/components/datatable/store/dataTable.store.d.ts +22 -0
  50. package/components/dialog/Dialog.vue.d.ts +464 -0
  51. package/components/dialogconfirm/DialogConfirm.vue.d.ts +153 -0
  52. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  53. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +111 -0
  54. package/components/dropdown/Dropdown.vue.d.ts +257 -0
  55. package/components/editor/CodeSnippetAdapter.vue.d.ts +92 -0
  56. package/components/editor/Editor.vue.d.ts +191 -0
  57. package/components/editor/EditorButton.vue.d.ts +15 -0
  58. package/components/editor/MentionList.vue.d.ts +35 -0
  59. package/components/editor/MentionSection.vue.d.ts +92 -0
  60. package/components/editor/codeSnippetExtension.d.ts +3 -0
  61. package/components/editor/mentionSectionExtension.d.ts +3 -0
  62. package/components/editor/suggestion.d.ts +2 -0
  63. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  64. package/components/fileupload/FileUpload.vue.d.ts +153 -0
  65. package/components/filtercontainer/FilterContainer.vue.d.ts +141 -0
  66. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +3 -0
  67. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
  68. package/components/filtercontainer/helpers/getOption.helper.d.ts +3 -0
  69. package/components/form/Form.vue.d.ts +306 -0
  70. package/components/gallerypreview/GalleryPreview.vue.d.ts +31 -0
  71. package/components/helpers/convertToArrayClass.helper.d.ts +2 -0
  72. package/components/helpers/index.d.ts +2 -0
  73. package/components/helpers/label.d.ts +15 -0
  74. package/components/icon/Icon.vue.d.ts +245 -0
  75. package/components/image/Image.vue.d.ts +403 -0
  76. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +36 -0
  77. package/components/imagecompressor/ImageCompressor.vue.d.ts +191 -0
  78. package/components/imagecompressor/ImageInputInfo.vue.d.ts +30 -0
  79. package/components/index.d.ts +66 -0
  80. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  81. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  82. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  83. package/components/inputcurrency/helpers/currency.helper.d.ts +4 -0
  84. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  85. package/components/inputgroup/InputGroup.vue.d.ts +141 -0
  86. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  87. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  88. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  89. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
  90. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  91. package/components/inputtext/InputText.vue.d.ts +352 -0
  92. package/components/inputurl/InputURL.vue.d.ts +39 -0
  93. package/components/invisiblefield/InvisibleField.vue.d.ts +36 -0
  94. package/components/languagedropdown/LanguageDropdown.vue.d.ts +58 -0
  95. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +18 -0
  96. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  97. package/components/loading/Loading.vue.d.ts +47 -0
  98. package/components/loading/store/loading.store.d.ts +8 -0
  99. package/components/menu/Menu.vue.d.ts +390 -0
  100. package/components/menu/helpers/filterMenu.helper.d.ts +12 -0
  101. package/components/menu/helpers/index.d.ts +1 -0
  102. package/components/menuitem/MenuItem.vue.d.ts +19 -0
  103. package/components/menuitem/index.d.ts +104 -0
  104. package/components/multiselect/MultiSelect.vue.d.ts +192 -0
  105. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  106. package/components/passthrough/index.d.ts +16 -0
  107. package/components/progressbar/ProgressBar.vue.d.ts +72 -0
  108. package/components/quickfilter/QuickFilter.vue.d.ts +25 -0
  109. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  110. package/components/tagtype/TagType.vue.d.ts +22 -0
  111. package/components/textarea/Textarea.vue.d.ts +170 -0
  112. package/components/timeline/Timeline.vue.d.ts +115 -0
  113. package/components/timeline/TimelineContentByType.vue.d.ts +16 -0
  114. package/components/toast/Toast.vue.d.ts +367 -0
  115. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  116. package/components/tooltipspan/TooltipSpan.vue.d.ts +20 -0
  117. package/components/tree/Tree.vue.d.ts +146 -0
  118. package/components/tree/helpers/filterNodeKeys.helper.d.ts +16 -0
  119. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +6 -0
  120. package/components/tree/helpers/index.d.ts +3 -0
  121. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  122. package/components/ts-helpers.d.ts +63 -0
  123. package/components/usergroup/UserGroup.vue.d.ts +57 -0
  124. package/components/username/UserName.vue.d.ts +61 -0
  125. package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
  126. package/config/defaultProps.d.ts +3 -0
  127. package/config/index.d.ts +3 -0
  128. package/config/locale.d.ts +3 -0
  129. package/directives/focus.d.ts +7 -0
  130. package/directives/index.d.ts +1 -0
  131. package/event-bus/index.d.ts +55 -0
  132. package/event-bus/mitt.d.ts +26 -0
  133. package/loading-page-BrQattYE.js +1 -0
  134. package/loading-page-CgfbWppy.js +1 -0
  135. package/loading-page-CoC9UhfC.js +4 -0
  136. package/loading-page-CoXtqoc9.js +4 -0
  137. package/loading-page-DbLuqCHa.js +1 -0
  138. package/loading-page-f8D03l3G.js +4 -0
  139. package/loading-plane-CgfbWppy.js +1 -0
  140. package/loading-plane-CoXtqoc9.js +4 -0
  141. package/loading-table-Bb2MtjdD.js +4 -0
  142. package/loading-table-Br25QIny.js +1 -0
  143. package/loading-table-ByUoWqUo.js +4 -0
  144. package/loading-table-BygEMzFM.js +4 -0
  145. package/loading-table-BzrSQlA0.js +1 -0
  146. package/loading-table-chOgXi94.js +1 -0
  147. package/main.d.ts +2 -0
  148. package/no-data-CTKux8RI.js +4 -0
  149. package/no-data-Cgze_Rvp.js +1 -0
  150. package/no-data-DLHO1L_u.js +4 -0
  151. package/no-data-Dep79CBh.js +1 -0
  152. package/no-data-g0dJCy2p.js +4 -0
  153. package/no-data-y1X5WtcQ.js +1 -0
  154. package/package.json +16 -0
  155. package/plugins/WangsVue.d.ts +121 -0
  156. package/plugins/formValidation.d.ts +10 -0
  157. package/plugins/translation.d.ts +37 -0
  158. package/style.css +1 -0
  159. package/types/options.type.d.ts +16 -0
  160. package/utils/date.util.d.ts +37 -0
  161. package/utils/exportToExcel.util.d.ts +20 -0
  162. package/utils/filterOptions.util.d.ts +3 -0
  163. package/utils/genPlaceholder.util.d.ts +8 -0
  164. package/utils/getAttachmentIcon.util.d.ts +8 -0
  165. package/utils/getStatusSeverity.util.d.ts +3 -0
  166. package/utils/index.d.ts +18 -0
  167. package/utils/mergePropsWithDefaults.util.d.ts +20 -0
  168. package/utils/object.util.d.ts +9 -0
  169. package/utils/role.util.d.ts +2 -0
  170. package/utils/textFormatter.util.d.ts +17 -0
  171. package/utils/toast.util.d.ts +114 -0
  172. package/wangsvue-gsts.es.js +133347 -0
  173. package/wangsvue-gsts.system.js +454 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Merges the provided props with default props.
3
+ * If a value in `props` is `undefined` or `null`
4
+ * it will be replaced by the corresponding value from `defaultProps`.
5
+ *
6
+ * This ensures that props always have a fallback value from `defaultProps`
7
+ *
8
+ * @param defaultProps - The default values for the props, used as fallbacks.
9
+ * @param props - The props passed to the component, which may have missing or falsy values.
10
+ *
11
+ * @returns A new object that combines the `defaultProps` and `props`, with `props` values
12
+ * overriding `defaultProps` where they are provided (unless `undefined` or `null`).
13
+ *
14
+ * @example
15
+ * const defaultProps = { showOptionalText: true, tooltipPos: 'top' };
16
+ * const props = { tooltipPos: 'bottom' };
17
+ * const mergedProps = mergePropsWithDefaults(defaultProps, props);
18
+ * console.log(mergedProps); // Output: { showOptionalText: true, tooltipPos: 'bottom' }
19
+ */
20
+ export default function mergePropsWithDefaults<T extends Record<string, any>>(props: Record<string, any>, defaultProps: T): T;
@@ -0,0 +1,9 @@
1
+ export declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
2
+ export declare const isEmptyObject: (obj: object) => boolean;
3
+ export declare const deepEquals: (a: object, b: object) => boolean;
4
+ export declare const equals: (obj1: object, obj2: object, field?: string) => boolean;
5
+ export declare const resolveFieldData: (data: object, field?: string) => object;
6
+ export declare const contains: (value: object, list: object[]) => boolean;
7
+ export declare const isNotEmpty: (value: object) => boolean;
8
+ export declare const isEmpty: (value: object | string) => boolean;
9
+ export declare const deepMerge: <T>(target: T, source: Partial<T>) => T;
@@ -0,0 +1,2 @@
1
+ import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
2
+ export declare const checkRouteAccess: (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => void;
@@ -0,0 +1,17 @@
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;
5
+ /**
6
+ * Formats the label with the appropriate article ("a" or "an") based on its vowel sound.
7
+ * This function checks if the label starts with a vowel or has a special case for silent "h" words.
8
+ * It ensures that the correct article ("a" or "an") is used according to English pronunciation rules.
9
+ *
10
+ * For example:
11
+ * - "hour" will be prefixed with "an" (due to the silent "h").
12
+ * - "unicorn" will be prefixed with "a" (due to the "u" sound).
13
+ *
14
+ * @param {string} [label] - The label to be formatted. If no label is provided, returns an empty string.
15
+ * @returns {string} The label prefixed with the appropriate article ("a" or "an").
16
+ */
17
+ export declare const formatVowelSoundLabel: (label?: string) => string;
@@ -0,0 +1,114 @@
1
+ import { WangsIcons } from '../components/icon/Icon.vue.d';
2
+ export type ToastSeverity = 'success' | 'error' | 'info';
3
+ export interface ToastParams {
4
+ /**
5
+ * The main message to display in the toast. Will be formatted based on template message.
6
+ */
7
+ message: string;
8
+ /**
9
+ * Indicates whether the message is customized and does not follow the default message template.
10
+ * If true, custom formatting will be applied.
11
+ */
12
+ customMessage?: boolean;
13
+ /**
14
+ * The severity level of the toast message.
15
+ * Can be 'success', 'error', or 'info'.
16
+ */
17
+ severity?: ToastSeverity;
18
+ /**
19
+ * The icon to display in the toast.
20
+ */
21
+ icon?: WangsIcons;
22
+ /**
23
+ * The custom CSS class to apply to the icon.
24
+ */
25
+ iconClass?: any;
26
+ /**
27
+ * The error object from a catch statement, used to provide additional details for error toasts.
28
+ * Accepts any type of error object.
29
+ */
30
+ error?: unknown;
31
+ /**
32
+ * The duration for which the toast will be displayed, in milliseconds.
33
+ * Set to 0 to show the message infinitely.
34
+ *
35
+ * @default 3000 - 3 seconds
36
+ */
37
+ life?: number;
38
+ /**
39
+ * The name of the message group to which this toast belongs.
40
+ */
41
+ group?: string;
42
+ /**
43
+ * Unique identifier of the toast message.
44
+ */
45
+ messageId?: string;
46
+ }
47
+ export interface ToastMethod {
48
+ add(params: ToastParams): void;
49
+ /**
50
+ * Clears the messages that belongs to the group.
51
+ * @param {string} group - Name of the message group.
52
+ */
53
+ removeGroup(group: string): void;
54
+ removeAllGroups(): void;
55
+ }
56
+ /**
57
+ * Configuration options for the `useToast` hook.
58
+ */
59
+ export interface UseToastConfig {
60
+ /**
61
+ * Default message templates for each severity level.
62
+ * Keys represent the severity, and values are the template strings.
63
+ *
64
+ * @example
65
+ * {
66
+ * success: 'Success, {message}',
67
+ * error: 'Error, {message} {additionalMessage}',
68
+ * info: 'Info, {message} {additionalMessage}',
69
+ * }
70
+ */
71
+ template?: Record<string, string>;
72
+ /**
73
+ * Icons for each severity level.
74
+ * Keys represent the severity, and values are the corresponding icon identifiers.
75
+ *
76
+ * @example
77
+ * {
78
+ * success: 'emotion-happy-fill',
79
+ * error: 'emotion-unhappy-fill',
80
+ * }
81
+ */
82
+ icons?: Record<string, WangsIcons>;
83
+ }
84
+ /**
85
+ * Hook to create and manage toast notifications.
86
+ *
87
+ * @param {UseToastConfig} config - Configuration object for the toast notifications.
88
+ * Refer to {@link UseToastConfig} for the structure and details of this object.
89
+ *
90
+ * @returns {ToastMethod} A method to trigger toast notifications.
91
+ * The method accepts {@link ToastParams} to customize individual notifications.
92
+ *
93
+ * @example
94
+ * const toast = useToast({
95
+ * template: {
96
+ * success: 'Success, {message}',
97
+ * error: 'Error, {message} {additionalMessage}',
98
+ * info: 'Info, {message} {additionalMessage}',
99
+ * },
100
+ * icons: {
101
+ * success: 'emotion-happy-fill',
102
+ * error: 'emotion-unhappy-fill',
103
+ * }
104
+ * });
105
+ *
106
+ * // Overiding the default config with ToastParams
107
+ * toast.add({
108
+ * message: 'Operation completed successfully!',
109
+ * customMessage: true,
110
+ * icon: 'custom-success-icon',
111
+ * });
112
+ */
113
+ declare const useToast: ({ icons, template }?: UseToastConfig) => ToastMethod;
114
+ export default useToast;