@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
@@ -1,93 +1,93 @@
1
1
  import { Slot } from 'vue';
2
2
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
3
  import { TreeSelectionKeys } from 'primevue/tree';
4
- import { MenuItem } from '../menuitem';
4
+ import { MenuItem } from '../../components/menuitem';
5
5
  import { BaseTreeProps, TreeNode } from '../basetree/BaseTree.vue.d';
6
6
  import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
7
7
 
8
8
  export interface TreeProps extends BaseTreeProps {
9
- /**
10
- * Keyword to filter the Tree by name/label.
11
- */
12
- filter: string;
13
- type: 'group' | 'category';
14
- fetchTree?: (
15
- type: 'group' | 'category',
16
- params?: QueryParams,
17
- ) => Promise<ShortFetchResponse<TreeNode> | undefined>;
18
- params?: QueryParams;
19
- selectedKeys?: TreeSelectionKeys | number[] | undefined;
20
- selectedTreeNodes?: TreeNode[] | undefined;
21
- selectionMode?: 'single' | 'checkbox' | undefined;
22
- /**
23
- * Wether show node button action or not.
24
- *
25
- * @default false;
26
- */
27
- useOption?: boolean;
28
- /**
29
- * List of labels that has no menu option
30
- */
31
- listLabelsNoOption?: string[];
32
- treeNodeMenus?: MenuItem[];
33
- /**
34
- * Specify wether the all tree node should be auto checked once it rendered.
35
- * @default false
36
- */
37
- autoSelectAll?: boolean;
38
- selectLastNode?: boolean;
39
- /**
40
- * Disable node 'All' selection
41
- */
42
- disableNodeAll?: boolean;
43
- /**
44
- * Include node All key (-1) on Checkbox Selection
45
- *
46
- * @default false - (-1) is excluded
47
- */
48
- includeNodeAllKey?: boolean;
49
- /**
50
- * A list of node keys that should be disabled along with their children.
51
- */
52
- disableKeys?: number[];
53
- /**
54
- * A list of node keys that should be disabled, affecting only the specified nodes and not their children.
55
- */
56
- exactDisableKeys?: number[];
57
- /**
58
- * Defines the tree is readonly and disabled.
59
- */
60
- readonly?: boolean;
61
- /**
62
- * Defines the tree to select disposable group only.
63
- */
64
- selectDisposableOnly?: boolean;
65
- /**
66
- * Defines the tree to be flattened and shows disposable only
67
- */
68
- flattenDisposableNode?: boolean;
69
- /**
70
- * Defines the group tree to disable excluded keys
71
- */
72
- excludedKeys?: number[];
73
- /**
74
- * Will emit update selection when value is `true`
75
- *
76
- * @default false - to prevent auto emit in every possible unhandled way
77
- */
78
- shouldEmitEventOnChange?: boolean;
9
+ /**
10
+ * Keyword to filter the Tree by name/label.
11
+ */
12
+ filter: string;
13
+ type: 'group' | 'category';
14
+ fetchTree?: (
15
+ type: 'group' | 'category',
16
+ params?: QueryParams,
17
+ ) => Promise<ShortFetchResponse<TreeNode> | undefined>;
18
+ params?: QueryParams;
19
+ selectedKeys?: TreeSelectionKeys | number[] | undefined;
20
+ selectedTreeNodes?: TreeNode[] | undefined;
21
+ selectionMode?: 'single' | 'checkbox' | undefined;
22
+ /**
23
+ * Wether show node button action or not.
24
+ *
25
+ * @default false;
26
+ */
27
+ useOption?: boolean;
28
+ /**
29
+ * List of labels that has no menu option
30
+ */
31
+ listLabelsNoOption?: string[];
32
+ treeNodeMenus?: MenuItem[];
33
+ /**
34
+ * Specify wether the all tree node should be auto checked once it rendered.
35
+ * @default false
36
+ */
37
+ autoSelectAll?: boolean;
38
+ selectLastNode?: boolean;
39
+ /**
40
+ * Disable node 'All' selection
41
+ */
42
+ disableNodeAll?: boolean;
43
+ /**
44
+ * Include node All key (-1) on Checkbox Selection
45
+ *
46
+ * @default false - (-1) is excluded
47
+ */
48
+ includeNodeAllKey?: boolean;
49
+ /**
50
+ * A list of node keys that should be disabled along with their children.
51
+ */
52
+ disableKeys?: number[];
53
+ /**
54
+ * A list of node keys that should be disabled, affecting only the specified nodes and not their children.
55
+ */
56
+ exactDisableKeys?: number[];
57
+ /**
58
+ * Defines the tree is readonly and disabled.
59
+ */
60
+ readonly?: boolean;
61
+ /**
62
+ * Defines the tree to select disposable group only.
63
+ */
64
+ selectDisposableOnly?: boolean;
65
+ /**
66
+ * Defines the tree to be flattened and shows disposable only
67
+ */
68
+ flattenDisposableNode?: boolean;
69
+ /**
70
+ * Defines the group tree to disable excluded keys
71
+ */
72
+ excludedKeys?: number[];
73
+ /**
74
+ * Will emit update selection when value is `true`
75
+ *
76
+ * @default false - to prevent auto emit in every possible unhandled way
77
+ */
78
+ shouldEmitEventOnChange?: boolean;
79
79
  }
80
80
 
81
81
  export type TreeEmits = {
82
- 'update:selectedKeys': [keys: TreeSelectionKeys];
83
- 'update:selectedTreeNodes': [nodes: TreeNode[] | undefined];
84
- 'nodeSelect': [node: TreeNode];
85
- 'nodeUnselect': [node: TreeNode];
86
- 'toggleMenu': [node: TreeNode];
82
+ 'update:selectedKeys': [keys: TreeSelectionKeys];
83
+ 'update:selectedTreeNodes': [nodes: TreeNode[] | undefined];
84
+ 'nodeSelect': [node: TreeNode];
85
+ 'nodeUnselect': [node: TreeNode];
86
+ 'toggleMenu': [node: TreeNode];
87
87
  };
88
88
 
89
89
  export interface TreeSlots {
90
- default: Slot<{ node: TreeNode; checked: boolean; disabled: boolean }>;
90
+ default: Slot<{ node: TreeNode; checked: boolean; disabled: boolean }>;
91
91
  }
92
92
 
93
93
  /**
@@ -101,48 +101,48 @@ export interface TreeSlots {
101
101
  * @group Component
102
102
  */
103
103
  declare class Tree extends ClassComponent<TreeProps, TreeSlots, TreeEmits> {
104
- /**
105
- * The Tree Node array.
106
- */
107
- treeNodes: TreeNode[];
108
- /**
109
- * The Flat Tree Node array.
110
- */
111
- flatNodes: TreeNode[];
112
- /**
113
- * Tree Nodes loading state.
114
- */
115
- isLoading: boolean;
116
- /**
117
- * Show disposable group icon.
118
- */
119
- showDisposableGroups: boolean;
120
- /**
121
- * State where all tree node expanded.
122
- */
123
- isExpandedAll: boolean;
124
- /**
125
- * Method to collapse all node.
126
- */
127
- collapseAll: () => void;
128
- /**
129
- * Method to expand all node.
130
- */
131
- expandAll: () => void;
132
- /**
133
- * Expand the All node to show all Parent Group
134
- */
135
- expandNodeAll: () => void;
136
- /**
137
- * Trigger fetch tree list
138
- */
139
- fetchTreeList: () => void;
104
+ /**
105
+ * The Tree Node array.
106
+ */
107
+ treeNodes: TreeNode[];
108
+ /**
109
+ * The Flat Tree Node array.
110
+ */
111
+ flatNodes: TreeNode[];
112
+ /**
113
+ * Tree Nodes loading state.
114
+ */
115
+ isLoading: boolean;
116
+ /**
117
+ * Show disposable group icon.
118
+ */
119
+ showDisposableGroups: boolean;
120
+ /**
121
+ * State where all tree node expanded.
122
+ */
123
+ isExpandedAll: boolean;
124
+ /**
125
+ * Method to collapse all node.
126
+ */
127
+ collapseAll: () => void;
128
+ /**
129
+ * Method to expand all node.
130
+ */
131
+ expandAll: () => void;
132
+ /**
133
+ * Expand the All node to show all Parent Group
134
+ */
135
+ expandNodeAll: () => void;
136
+ /**
137
+ * Trigger fetch tree list
138
+ */
139
+ fetchTreeList: () => void;
140
140
  }
141
141
 
142
142
  declare module '@vue/runtime-core' {
143
- interface GlobalComponents {
144
- Tree: GlobalComponentConstructor<Tree>;
145
- }
143
+ interface GlobalComponents {
144
+ Tree: GlobalComponentConstructor<Tree>;
145
+ }
146
146
  }
147
147
 
148
148
  export default Tree;
@@ -6,8 +6,8 @@ import { TreeSelectionKeys } from 'primevue/tree';
6
6
  * @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
7
7
  */
8
8
  export declare const parseNodeKeys: (
9
- nodeKeys: TreeSelectionKeys,
10
- includeNodeAllKey?: boolean,
9
+ nodeKeys: TreeSelectionKeys,
10
+ includeNodeAllKey?: boolean,
11
11
  ) => number[];
12
12
  /**
13
13
  * Filters a collection of selected node keys based on specific criteria.
@@ -17,6 +17,6 @@ export declare const parseNodeKeys: (
17
17
  * @returns A new collection of filtered node keys.
18
18
  */
19
19
  export declare const filterNodeKeys: (
20
- nodeKeys: TreeSelectionKeys,
21
- includeNodeAllKey?: boolean,
20
+ nodeKeys: TreeSelectionKeys,
21
+ includeNodeAllKey?: boolean,
22
22
  ) => TreeSelectionKeys;
@@ -3,6 +3,6 @@ import { TreeNode } from '../../basetree/BaseTree.vue.d';
3
3
  * Covert deeply nested tree node into one level array.
4
4
  */
5
5
  declare const flattenTreeNodeChildren: (
6
- nodes: TreeNode[] | undefined,
6
+ nodes: TreeNode[] | undefined,
7
7
  ) => TreeNode[];
8
8
  export default flattenTreeNodeChildren;
@@ -0,0 +1,16 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export type TreeSearchInputProps = {
4
+ modelValue?: string;
5
+ };
6
+
7
+ export type TreeSearchInputEmits = {
8
+ 'update:modelValue': [payload: string];
9
+ };
10
+
11
+ declare const TreeSearchInput: DefineComponent<
12
+ TreeSearchInputProps,
13
+ TreeSearchInputEmits
14
+ >;
15
+
16
+ export default TreeSearchInput;
@@ -1,48 +1,46 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import {
3
- AllowedComponentProps,
4
- ComponentCustomProps,
5
- ObjectEmitsOptions,
6
- VNode,
7
- VNodeProps,
3
+ AllowedComponentProps,
4
+ ComponentCustomProps,
5
+ ObjectEmitsOptions,
6
+ VNode,
7
+ VNodeProps,
8
8
  } from 'vue';
9
9
 
10
10
  declare type PublicProps = VNodeProps &
11
- AllowedComponentProps &
12
- ComponentCustomProps;
11
+ AllowedComponentProps &
12
+ ComponentCustomProps;
13
13
 
14
14
  declare type UnionToIntersection<U> = (
15
- U extends any ? (k: U) => void : never
15
+ U extends any ? (k: U) => void : never
16
16
  ) extends (k: infer I) => void
17
- ? I
18
- : never;
17
+ ? I
18
+ : never;
19
19
 
20
20
  declare type EmitFn<
21
- Options = ObjectEmitsOptions,
22
- Event extends keyof Options = keyof Options,
21
+ Options = ObjectEmitsOptions,
22
+ Event extends keyof Options = keyof Options,
23
23
  > =
24
- Options extends Array<infer V>
25
- ? (event: V, ...args: any[]) => void
26
- : object extends Options
27
- ? (event: string, ...args: any[]) => void
28
- : UnionToIntersection<
29
- {
30
- [key in Event]: Options[key] extends (
31
- ...args: infer Args
32
- ) => any
33
- ? (event: key, ...args: Args) => void
34
- : (event: key, ...args: any[]) => void;
35
- }[Event]
36
- >;
24
+ Options extends Array<infer V>
25
+ ? (event: V, ...args: any[]) => void
26
+ : object extends Options
27
+ ? (event: string, ...args: any[]) => void
28
+ : UnionToIntersection<
29
+ {
30
+ [key in Event]: Options[key] extends (...args: infer Args) => any
31
+ ? (event: key, ...args: Args) => void
32
+ : (event: key, ...args: any[]) => void;
33
+ }[Event]
34
+ >;
37
35
 
38
36
  export class ClassComponent<Props, Slots, Emits> {
39
- $props: Props & PublicProps;
40
- $slots: Slots;
41
- $emit: EmitFn<Emits>;
37
+ $props: Props & PublicProps;
38
+ $slots: Slots;
39
+ $emit: EmitFn<Emits>;
42
40
  }
43
41
 
44
42
  export type GlobalComponentConstructor<T> = {
45
- new (): T;
43
+ new (): T;
46
44
  };
47
45
 
48
46
  /**
@@ -58,28 +56,28 @@ export declare type PassThrough<T = void> = T | object | undefined;
58
56
  export declare type Preset<T = void> = T | object | undefined;
59
57
 
60
58
  export declare type DefaultPassThrough<T = void> =
61
- | T
62
- | ((instance?: VNode) => T | undefined)
63
- | undefined;
59
+ | T
60
+ | ((instance?: VNode) => T | undefined)
61
+ | undefined;
64
62
 
65
63
  export declare type HintedString<T extends string> = (string & {}) | T;
66
64
 
67
65
  export declare type PresetAttributes = {
68
- class?: any;
69
- style?: any;
70
- [key: string]: any;
66
+ class?: any;
67
+ style?: any;
68
+ [key: string]: any;
71
69
  };
72
70
 
73
71
  export declare type PresetMethodOptions = {
74
- instance: any;
75
- props: any;
76
- state: any;
77
- context: any;
78
- attrs: any;
79
- parent: any;
80
- global: object | undefined;
72
+ instance: any;
73
+ props: any;
74
+ state: any;
75
+ context: any;
76
+ attrs: any;
77
+ parent: any;
78
+ global: object | undefined;
81
79
  };
82
80
 
83
81
  export declare type PresetOptionMethodType<Opt = PresetMethodOptions> = (
84
- options: Partial<Opt>,
82
+ options: Partial<Opt>,
85
83
  ) => PresetAttributes;
@@ -1,91 +1,91 @@
1
1
  import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- PresetAttributes,
5
- PresetOptionMethodType,
2
+ ClassComponent,
3
+ GlobalComponentConstructor,
4
+ PresetAttributes,
5
+ PresetOptionMethodType,
6
6
  } from '../ts-helpers';
7
7
 
8
8
  export interface UserNamePresetOptions {
9
- root: PresetAttributes;
10
- displayname: PresetOptionMethodType;
11
- panel: {
12
- background: PresetAttributes;
13
- username: PresetAttributes;
14
- useremail: PresetAttributes;
15
- positiondivision: PresetAttributes;
16
- userdetaillink: PresetAttributes;
17
- contentwrapper: PresetAttributes;
18
- detailwrapper: PresetAttributes;
19
- };
9
+ root: PresetAttributes;
10
+ displayname: PresetOptionMethodType;
11
+ panel: {
12
+ background: PresetAttributes;
13
+ username: PresetAttributes;
14
+ useremail: PresetAttributes;
15
+ positiondivision: PresetAttributes;
16
+ userdetaillink: PresetAttributes;
17
+ contentwrapper: PresetAttributes;
18
+ detailwrapper: PresetAttributes;
19
+ };
20
20
  }
21
21
 
22
22
  export interface UserNameLocaleConfig {
23
- /**
24
- * The anchor text for user detail link on user panel
25
- */
26
- detailUserAnchorText?: string;
23
+ /**
24
+ * The anchor text for user detail link on user panel
25
+ */
26
+ detailUserAnchorText?: string;
27
27
  }
28
28
 
29
29
  export interface UserNameComponentConfigs {
30
- /**
31
- * @example `/tim-member/member/{userId}/detail-member`
32
- */
33
- detailUserPath: string;
30
+ /**
31
+ * @example `/tim-member/member/{userId}/detail-member`
32
+ */
33
+ detailUserPath: string;
34
34
 
35
- /**
36
- * @default 'picture' - Show user profile picture instead of user icon
37
- */
38
- type?: 'icon' | 'picture';
35
+ /**
36
+ * @default 'picture' - Show user profile picture instead of user icon
37
+ */
38
+ type?: 'icon' | 'picture';
39
39
 
40
- /**
41
- * Specify the field of user to be used as display name
42
- *
43
- * @example 'name.fullName'
44
- */
45
- userNameField?: string;
46
- /**
47
- * Specify the field of user to be used as display picture
48
- *
49
- * @example 'image.profile'
50
- */
51
- profilePictureField?: string;
40
+ /**
41
+ * Specify the field of user to be used as display name
42
+ *
43
+ * @example 'name.fullName'
44
+ */
45
+ userNameField?: string;
46
+ /**
47
+ * Specify the field of user to be used as display picture
48
+ *
49
+ * @example 'image.profile'
50
+ */
51
+ profilePictureField?: string;
52
52
 
53
- /**
54
- * Function to get user detail on panel shown
55
- * @param userId The user id
56
- * @returns Full user detail object
57
- */
58
- getUserDetail: (
59
- userId: string,
60
- ) => UserNameProps['user'] | Promise<UserNameProps['user']>;
53
+ /**
54
+ * Function to get user detail on panel shown
55
+ * @param userId The user id
56
+ * @returns Full user detail object
57
+ */
58
+ getUserDetail: (
59
+ userId: string,
60
+ ) => UserNameProps['user'] | Promise<UserNameProps['user']>;
61
61
  }
62
62
 
63
63
  export interface GeneralUser {
64
- _id: string;
65
- profilePicture?: string;
66
- firstName?: string;
67
- lastName?: string;
68
- fullName?: string;
69
- email?: string;
70
- nickName?: string;
71
- position?: string;
72
- division?: string;
73
- [key: string]: any;
64
+ _id: string;
65
+ profilePicture?: string;
66
+ firstName?: string;
67
+ lastName?: string;
68
+ fullName?: string;
69
+ email?: string;
70
+ nickName?: string;
71
+ position?: string;
72
+ division?: string;
73
+ [key: string]: any;
74
74
  }
75
75
 
76
76
  /**
77
77
  * Defines valid properties in UserName component.
78
78
  */
79
79
  export interface UserNameProps extends Partial<UserNameComponentConfigs> {
80
- /**
81
- * The full user Object
82
- */
83
- user?: GeneralUser;
80
+ /**
81
+ * The full user Object
82
+ */
83
+ user?: GeneralUser;
84
84
 
85
- /**
86
- * When it sets to false, the props.user will be used
87
- */
88
- fetchDetailOnPanelShow?: boolean;
85
+ /**
86
+ * When it sets to false, the props.user will be used
87
+ */
88
+ fetchDetailOnPanelShow?: boolean;
89
89
  }
90
90
 
91
91
  /**
@@ -99,15 +99,15 @@ export interface UserNameProps extends Partial<UserNameComponentConfigs> {
99
99
  *
100
100
  */
101
101
  declare class UserName extends ClassComponent<
102
- UserNameProps,
103
- unknown,
104
- unknown
102
+ UserNameProps,
103
+ unknown,
104
+ unknown
105
105
  > {}
106
106
 
107
107
  declare module '@vue/runtime-core' {
108
- interface GlobalComponents {
109
- UserName: GlobalComponentConstructor<UserName>;
110
- }
108
+ interface GlobalComponents {
109
+ UserName: GlobalComponentConstructor<UserName>;
110
+ }
111
111
  }
112
112
 
113
113
  export default UserName;
@@ -1,20 +1,20 @@
1
1
  import { UserDetail } from '@tagsamurai/fats-api-services/src/types/user.type';
2
- import { ClassComponent } from '../ts-helpers';
2
+ import { ClassComponent } from '../../components/ts-helpers';
3
3
 
4
4
  export interface UserWithIconProps {
5
- user: UserDetail;
5
+ user: UserDetail;
6
6
  }
7
7
 
8
8
  declare class UserWithIcon extends ClassComponent<
9
- UserWithIconProps,
10
- unknown,
11
- unknown
9
+ UserWithIconProps,
10
+ unknown,
11
+ unknown
12
12
  > {}
13
13
 
14
14
  declare module 'vue' {
15
- interface GlobalComponents {
16
- UserWithIcon: typeof UserWithIcon;
17
- }
15
+ interface GlobalComponents {
16
+ UserWithIcon: typeof UserWithIcon;
17
+ }
18
18
  }
19
19
 
20
20
  export default UserWithIcon;
@@ -2,6 +2,6 @@
2
2
  * This directive is used to focus the html input on a component.
3
3
  */
4
4
  declare const Focus: {
5
- mounted: (el: HTMLElement) => Promise<void>;
5
+ mounted: (el: HTMLElement) => Promise<void>;
6
6
  };
7
7
  export default Focus;