@fewangsit/wangsvue-fats 1.0.0-alpha.34 → 1.0.0-alpha.36
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.
- package/components/animation/Animation.vue.d.ts +6 -6
- package/components/approverinfo/ApproverInfo.vue.d.ts +36 -36
- package/components/assetinfo/AssetInfo.vue.d.ts +21 -18
- package/components/badge/Badge.vue.d.ts +46 -46
- package/components/badgegroup/BadgeGroup.vue.d.ts +38 -38
- package/components/basecomponent/index.d.ts +15 -15
- package/components/basetree/BaseTree.vue.d.ts +458 -458
- package/components/basetree/TreeNode.vue.d.ts +25 -25
- package/components/breadcrumb/Breadcrumb.vue.d.ts +7 -7
- package/components/button/Button.vue.d.ts +142 -147
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +73 -73
- package/components/buttoncopy/ButtonCopy.vue.d.ts +7 -7
- package/components/buttondownload/ButtonDownload.vue.d.ts +26 -26
- package/components/buttonfilter/ButtonFilter.vue.d.ts +4 -4
- package/components/buttonradio/ButtonRadio.vue.d.ts +189 -189
- package/components/buttonscan/ButtonScan.vue.d.ts +154 -154
- package/components/buttonsearch/ButtonSearch.vue.d.ts +13 -13
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +164 -164
- package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +10 -10
- package/components/buttontoggle/ButtonToggle.vue.d.ts +4 -4
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +6 -6
- package/components/calendar/Calendar.vue.d.ts +469 -469
- package/components/card/Card.vue.d.ts +82 -82
- package/components/checkbox/Checkbox.vue.d.ts +245 -245
- package/components/customcolumn/CustomColumn.vue.d.ts +21 -21
- package/components/datatable/DataTable.vue.d.ts +595 -595
- package/components/dialog/Dialog.vue.d.ts +367 -367
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +117 -117
- package/components/dialogform/DialogForm.vue.d.ts +288 -288
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +98 -98
- package/components/dropdown/Dropdown.vue.d.ts +226 -226
- package/components/editor/Editor.vue.d.ts +156 -156
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +48 -48
- package/components/fileupload/FileUpload.vue.d.ts +132 -132
- package/components/filtercontainer/FilterContainer.vue.d.ts +116 -113
- package/components/form/Form.vue.d.ts +258 -258
- package/components/icon/Icon.vue.d.ts +235 -237
- package/components/image/Image.vue.d.ts +306 -306
- package/components/imagecompressor/ImageCompressor.vue.d.ts +186 -186
- package/components/index.d.ts +57 -58
- package/components/inputbadge/InputBadge.vue.d.ts +90 -90
- package/components/inputcurrency/InputCurrency.vue.d.ts +126 -126
- package/components/inputcurrency/helpers/currency.helper.d.ts +3 -3
- package/components/inputnumber/InputNumber.vue.d.ts +245 -245
- package/components/inputpassword/InputPassword.vue.d.ts +19 -19
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +68 -68
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +88 -88
- package/components/inputsearch/InputSearch.vue.d.ts +14 -11
- package/components/inputtext/InputText.vue.d.ts +281 -281
- package/components/inputurl/InputURL.vue.d.ts +9 -6
- package/components/invisiblefield/InvisibleField.vue.d.ts +18 -18
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +64 -64
- package/components/loading/Loading.vue.d.ts +5 -5
- package/components/loading/store/loading.store.d.ts +3 -3
- package/components/menu/Menu.vue.d.ts +282 -282
- package/components/menuitem/index.d.ts +84 -84
- package/components/multiselect/MultiSelect.vue.d.ts +161 -161
- package/components/overlaypanel/OverlayPanel.vue.d.ts +207 -207
- package/components/passthrough/index.d.ts +8 -8
- package/components/tabmenu/TabMenu.vue.d.ts +185 -185
- package/components/textarea/Textarea.vue.d.ts +131 -131
- package/components/timeline/Timeline.vue.d.ts +60 -60
- package/components/toast/Toast.vue.d.ts +265 -265
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +211 -211
- package/components/tree/Tree.vue.d.ts +116 -116
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +4 -4
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +1 -1
- package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +41 -43
- package/components/username/UserName.vue.d.ts +71 -71
- package/components/userwithicon/UserWithIcon.vue.d.ts +8 -8
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +51 -51
- package/event-bus/mitt.d.ts +21 -24
- package/package.json +8 -4
- package/plugins/WangsVue.d.ts +226 -226
- package/plugins/formValidation.d.ts +11 -11
- package/plugins/i18n-extension.d.ts +1 -1
- package/plugins/i18n.d.ts +80 -80
- package/style.css +1 -1
- package/utils/date.util.d.ts +53 -53
- package/utils/index.d.ts +2 -28
- package/utils/listenSidebarChanges.util.d.ts +9 -9
- package/utils/object.util.d.ts +8 -8
- package/utils/role.util.d.ts +43 -44
- package/utils/toast.util.d.ts +78 -78
- package/wangsvue-fats.es.js +117520 -117825
- package/wangsvue-fats.system.js +234 -234
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
- package/components/buttonscan/helpers/index.d.ts +0 -1
- package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
- package/components/calendar/BaseCalendar.vue.d.ts +0 -127
- package/components/customcolumn/ColumnList.vue.d.ts +0 -47
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -16
- package/components/datatable/MultiRow.vue.d.ts +0 -36
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
- package/components/datatable/helpers/filter.helper.d.ts +0 -38
- package/components/datatable/helpers/index.d.ts +0 -6
- package/components/datatable/helpers/readConfig.helper.d.ts +0 -5
- package/components/datatable/store/dataTable.store.d.ts +0 -25
- package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -152
- package/components/editor/EditorButton.vue.d.ts +0 -35
- package/components/editor/MentionList.vue.d.ts +0 -49
- package/components/editor/MentionSection.vue.d.ts +0 -152
- package/components/editor/codeSnippetExtension.d.ts +0 -3
- package/components/editor/mentionSectionExtension.d.ts +0 -3
- package/components/editor/suggestion.d.ts +0 -2
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -14
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
- package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -12
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -59
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -55
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
- package/components/menu/helpers/filterMenu.helper.d.ts +0 -15
- package/components/menu/helpers/index.d.ts +0 -1
- package/components/menuitem/MenuItem.vue +0 -70
- package/components/menuitem/MenuItem.vue.d.ts +0 -39
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -64
- package/components/transactionroles/TransactionRoles.vue.d.ts +0 -58
- package/components/tree/helpers/index.d.ts +0 -3
- package/utils/addAttachment.util.d.ts +0 -59
- package/utils/exportToExcel.util.d.ts +0 -20
- package/utils/filterOptions.util.d.ts +0 -5
- package/utils/genPlaceholder.util.d.ts +0 -13
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/mergePropsWithDefaults.util.d.ts +0 -23
- package/utils/textFormatter.util.d.ts +0 -29
|
@@ -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 '
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
144
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
AllowedComponentProps,
|
|
4
|
+
ComponentCustomProps,
|
|
5
|
+
ObjectEmitsOptions,
|
|
6
|
+
VNode,
|
|
7
|
+
VNodeProps,
|
|
8
8
|
} from 'vue';
|
|
9
9
|
|
|
10
10
|
declare type PublicProps = VNodeProps &
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
AllowedComponentProps &
|
|
12
|
+
ComponentCustomProps;
|
|
13
13
|
|
|
14
14
|
declare type UnionToIntersection<U> = (
|
|
15
|
-
|
|
15
|
+
U extends any ? (k: U) => void : never
|
|
16
16
|
) extends (k: infer I) => void
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
? I
|
|
18
|
+
: never;
|
|
19
19
|
|
|
20
20
|
declare type EmitFn<
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Options = ObjectEmitsOptions,
|
|
22
|
+
Event extends keyof Options = keyof Options,
|
|
23
23
|
> =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
$props: Props & PublicProps;
|
|
38
|
+
$slots: Slots;
|
|
39
|
+
$emit: EmitFn<Emits>;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export type GlobalComponentConstructor<T> = {
|
|
45
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
class?: any;
|
|
67
|
+
style?: any;
|
|
68
|
+
[key: string]: any;
|
|
71
69
|
};
|
|
72
70
|
|
|
73
71
|
export declare type PresetMethodOptions = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
82
|
+
options: Partial<Opt>,
|
|
85
83
|
) => PresetAttributes;
|
|
@@ -1,91 +1,91 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
ClassComponent,
|
|
3
|
+
GlobalComponentConstructor,
|
|
4
|
+
PresetAttributes,
|
|
5
|
+
PresetOptionMethodType,
|
|
6
6
|
} from '../ts-helpers';
|
|
7
7
|
|
|
8
8
|
export interface UserNamePresetOptions {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @example `/tim-member/member/{userId}/detail-member`
|
|
32
|
+
*/
|
|
33
|
+
detailUserPath: string;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @default 'picture' - Show user profile picture instead of user icon
|
|
37
|
+
*/
|
|
38
|
+
type?: 'icon' | 'picture';
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
/**
|
|
81
|
+
* The full user Object
|
|
82
|
+
*/
|
|
83
|
+
user?: GeneralUser;
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
UserNameProps,
|
|
103
|
+
unknown,
|
|
104
|
+
unknown
|
|
105
105
|
> {}
|
|
106
106
|
|
|
107
107
|
declare module '@vue/runtime-core' {
|
|
108
|
-
|
|
109
|
-
|
|
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 '
|
|
2
|
+
import { ClassComponent } from '../../components/ts-helpers';
|
|
3
3
|
|
|
4
4
|
export interface UserWithIconProps {
|
|
5
|
-
|
|
5
|
+
user: UserDetail;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
declare class UserWithIcon extends ClassComponent<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
UserWithIconProps,
|
|
10
|
+
unknown,
|
|
11
|
+
unknown
|
|
12
12
|
> {}
|
|
13
13
|
|
|
14
14
|
declare module 'vue' {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
interface GlobalComponents {
|
|
16
|
+
UserWithIcon: typeof UserWithIcon;
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export default UserWithIcon;
|