@fewangsit/wangsvue-fats 1.0.0-alpha.15 → 1.0.0-alpha.150
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 +9 -1
- package/components/assetinfo/AssetInfo.vue.d.ts +15 -16
- package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
- package/components/basetree/BaseTree.vue.d.ts +6 -1
- package/components/button/Button.vue.d.ts +3 -2
- package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +31 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +1 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +3 -2
- package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +2 -1
- package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -34
- package/components/buttonsync/ButtonSync.vue.d.ts +13 -1
- package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +32 -4
- package/components/card/Card.vue.d.ts +1 -0
- package/components/carousel/Carousel.vue.d.ts +28 -0
- package/components/checkbox/Checkbox.vue.d.ts +1 -0
- package/components/datatable/DataTable.vue.d.ts +12 -4
- package/components/dialog/Dialog.vue.d.ts +4 -3
- package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
- package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
- package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +2 -1
- package/components/dialogform/DialogForm.vue.d.ts +3 -2
- package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
- package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
- package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
- package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
- package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +3 -2
- package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
- package/components/dialogselectuser/options/columns.d.ts +3 -0
- package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
- package/components/dropdown/Dropdown.vue.d.ts +28 -4
- package/components/editor/Editor.vue.d.ts +1 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +19 -2
- package/components/fileupload/FileUpload.vue.d.ts +1 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +104 -69
- package/components/form/Form.vue.d.ts +4 -1
- package/components/icon/Icon.vue.d.ts +4 -0
- package/components/image/Image.vue.d.ts +8 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +14 -0
- package/components/index.d.ts +34 -22
- package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
- package/components/inputemail/InputEmail.vue.d.ts +1 -0
- package/components/inputnumber/InputNumber.vue.d.ts +6 -0
- package/components/inputotp/InputOtp.vue.d.ts +3 -0
- package/components/inputpassword/InputPassword.vue.d.ts +1 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
- package/components/inputsearch/InputSearch.vue.d.ts +7 -1
- package/components/inputtext/InputText.vue.d.ts +2 -1
- package/components/inputurl/InputURL.vue.d.ts +4 -2
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +5 -19
- package/components/litedropdown/LiteDropdown.vue.d.ts +5 -3
- package/components/loading/store/loading.store.d.ts +3 -3
- package/components/menu/Menu.vue.d.ts +2 -1
- package/components/multiselect/MultiSelect.vue.d.ts +7 -4
- package/components/overlaypanel/OverlayPanel.vue.d.ts +1 -0
- package/components/paginator/Paginator.vue.d.ts +285 -0
- package/components/steps/Steps.vue.d.ts +20 -0
- package/components/tabmenu/TabMenu.vue.d.ts +7 -191
- package/components/tagtype/TagType.vue.d.ts +5 -0
- package/components/textarea/Textarea.vue.d.ts +2 -1
- package/components/timeline/Timeline.vue.d.ts +21 -2
- package/components/toast/Toast.vue.d.ts +2 -1
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
- package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
- package/components/tree/Tree.vue.d.ts +6 -3
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
- package/components/ts-helpers.d.ts +8 -0
- package/components/username/UserName.vue.d.ts +6 -1
- package/components/userwithicon/UserWithIcon.vue.d.ts +2 -2
- package/config/defaultProps.d.ts +1 -1
- package/config/index.d.ts +1 -1
- package/config/locale.d.ts +1 -1
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +59 -53
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +34 -2
- package/package.json +16 -8
- package/plugins/VueHtmlToPaper.d.ts +11 -0
- package/plugins/WangsVue.d.ts +278 -98
- package/plugins/formValidation.d.ts +16 -6
- package/plugins/i18n-extension.d.ts +1 -1
- package/plugins/i18n.d.ts +90 -67
- package/stats.html +4949 -0
- package/style.css +1 -1
- package/utils/date.util.d.ts +64 -31
- package/utils/exportToExcel.util.d.ts +23 -16
- package/utils/formatTagCode.util.d.ts +1 -0
- package/utils/getStatusSeverity.util.d.ts +30 -0
- package/utils/index.d.ts +8 -21
- package/utils/isBasic.util.d.ts +1 -0
- package/utils/listenSidebarChanges.util.d.ts +14 -9
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +63 -26
- package/utils/toast.util.d.ts +78 -78
- package/utils/xlsx.util.d.ts +19 -0
- package/wangsvue-fats.js +56980 -0
- package/wangsvue-fats.system.js +199 -281
- package/assets/json/currencies.json.d.ts +0 -1068
- package/assets/lottie/admin/loading-page.lottie +0 -0
- package/assets/lottie/admin/loading-table.lottie +0 -0
- package/assets/lottie/admin/no-data.lottie +0 -0
- package/assets/lottie/supplyasset/loading-page.lottie +0 -0
- package/assets/lottie/supplyasset/loading-table.lottie +0 -0
- package/assets/lottie/supplyasset/no-data.lottie +0 -0
- package/assets/lottie/workspace/loading-page.lottie +0 -0
- package/assets/lottie/workspace/loading-plane.lottie +0 -0
- package/assets/lottie/workspace/loading-table.lottie +0 -0
- package/assets/lottie/workspace/no-data.lottie +0 -0
- package/build-entry.d.ts +0 -14
- 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/buttonsplit/ButtonSplit.d.ts +0 -350
- package/components/calendar/BaseCalendar.vue.d.ts +0 -86
- package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
- package/components/customcolumn/ColumnList.vue.d.ts +0 -27
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
- package/components/datatable/MultiRow.vue.d.ts +0 -16
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
- package/components/datatable/helpers/filter.helper.d.ts +0 -28
- package/components/datatable/helpers/index.d.ts +0 -3
- package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
- package/components/datatable/store/dataTable.store.d.ts +0 -22
- package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
- package/components/editor/EditorButton.vue.d.ts +0 -15
- package/components/editor/MentionList.vue.d.ts +0 -35
- package/components/editor/MentionSection.vue.d.ts +0 -92
- 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 -5
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
- package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
- package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
- package/components/hardwaresync/store/device.store.d.ts +0 -36
- package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
- package/components/helpers/index.d.ts +0 -2
- package/components/helpers/label.d.ts +0 -15
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
- package/components/inputgroup/InputGroup.vue.d.ts +0 -141
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
- package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
- package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
- package/components/menu/helpers/index.d.ts +0 -1
- package/components/menuitem/MenuItem.vue.d.ts +0 -19
- package/components/progressbar/ProgressBar.vue.d.ts +0 -72
- package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
- package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
- package/components/tree/helpers/index.d.ts +0 -3
- package/components/usergroup/UserGroup.vue.d.ts +0 -57
- package/types/options.type.d.ts +0 -16
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/filterOptions.util.d.ts +0 -3
- package/utils/genPlaceholder.util.d.ts +0 -8
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
- package/utils/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
- package/wangsvue-fats.es.js +0 -133778
|
@@ -7,126 +7,11 @@
|
|
|
7
7
|
* @module tabmenu
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { VNode } from 'vue';
|
|
11
|
-
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { MenuItem } from '../menuitem';
|
|
13
|
-
import { PassThroughOptions } from '../passthrough';
|
|
14
|
-
import { ClassComponent, PassThrough } from '../ts-helpers';
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| ((
|
|
19
|
-
options: TabMenuPassThroughMethodOptions,
|
|
20
|
-
) => TabMenuPassThroughAttributes | string)
|
|
21
|
-
| string
|
|
22
|
-
| null
|
|
23
|
-
| undefined;
|
|
11
|
+
import { TabMenuProps as WangsUITabMenuProps } from '@wangs-ui/core';
|
|
12
|
+
import { MenuItem } from '@wangs-ui/core/dist/types/components/menuitem/menuitem.type';
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
* Custom passthrough(pt) option method.
|
|
27
|
-
*/
|
|
28
|
-
export interface TabMenuPassThroughMethodOptions {
|
|
29
|
-
/**
|
|
30
|
-
* Defines instance.
|
|
31
|
-
*/
|
|
32
|
-
instance: any;
|
|
33
|
-
/**
|
|
34
|
-
* Defines valid properties.
|
|
35
|
-
*/
|
|
36
|
-
props: TabMenuProps;
|
|
37
|
-
/**
|
|
38
|
-
* Defines current inline state.
|
|
39
|
-
*/
|
|
40
|
-
state: TabMenuState;
|
|
41
|
-
/**
|
|
42
|
-
* Defines current options.
|
|
43
|
-
*/
|
|
44
|
-
context: TabMenuContext;
|
|
45
|
-
/**
|
|
46
|
-
* Defines valid attributes.
|
|
47
|
-
*/
|
|
48
|
-
attrs: any;
|
|
49
|
-
/**
|
|
50
|
-
* Defines parent options.
|
|
51
|
-
*/
|
|
52
|
-
parent: any;
|
|
53
|
-
/**
|
|
54
|
-
* Defines passthrough(pt) options in global config.
|
|
55
|
-
*/
|
|
56
|
-
global: object | undefined;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Custom passthrough(pt) options.
|
|
61
|
-
* @see {@link TabMenuProps.pt}
|
|
62
|
-
*/
|
|
63
|
-
export interface TabMenuPassThroughOptions {
|
|
64
|
-
/**
|
|
65
|
-
* Used to pass attributes to the root's DOM element.
|
|
66
|
-
*/
|
|
67
|
-
root?: TabMenuPassThroughOptionType;
|
|
68
|
-
/**
|
|
69
|
-
* Used to pass attributes to the list's DOM element.
|
|
70
|
-
*/
|
|
71
|
-
menu?: TabMenuPassThroughOptionType;
|
|
72
|
-
/**
|
|
73
|
-
* Used to pass attributes to the list item's DOM element.
|
|
74
|
-
*/
|
|
75
|
-
menuitem?: TabMenuPassThroughOptionType;
|
|
76
|
-
/**
|
|
77
|
-
* Used to pass attributes to the action's DOM element.
|
|
78
|
-
*/
|
|
79
|
-
action?: TabMenuPassThroughOptionType;
|
|
80
|
-
/**
|
|
81
|
-
* Used to pass attributes to the icon's DOM element.
|
|
82
|
-
*/
|
|
83
|
-
icon?: TabMenuPassThroughOptionType;
|
|
84
|
-
/**
|
|
85
|
-
* Used to pass attributes to the label's DOM element.
|
|
86
|
-
*/
|
|
87
|
-
label?: TabMenuPassThroughOptionType;
|
|
88
|
-
/**
|
|
89
|
-
* Used to pass attributes to the inkbar's DOM element.
|
|
90
|
-
*/
|
|
91
|
-
inkbar?: TabMenuPassThroughOptionType;
|
|
92
|
-
/**
|
|
93
|
-
* Used to manage all lifecycle hooks.
|
|
94
|
-
* @see {@link BaseComponent.ComponentHooks}
|
|
95
|
-
*/
|
|
96
|
-
hooks?: ComponentHooks;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Custom passthrough attributes for each DOM elements
|
|
101
|
-
*/
|
|
102
|
-
export interface TabMenuPassThroughAttributes {
|
|
103
|
-
[key: string]: any;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Defines current inline state in TabMenu component.
|
|
108
|
-
*/
|
|
109
|
-
export interface TabMenuState {
|
|
110
|
-
/**
|
|
111
|
-
* Current active index state as a number.
|
|
112
|
-
* @defaulValue 0
|
|
113
|
-
*/
|
|
114
|
-
d_activeIndex: number;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Defines current options in TabMenu component.
|
|
119
|
-
*/
|
|
120
|
-
export interface TabMenuContext {
|
|
121
|
-
/**
|
|
122
|
-
* Current menuitem
|
|
123
|
-
*/
|
|
124
|
-
item: any;
|
|
125
|
-
/**
|
|
126
|
-
* Index of the menuitem
|
|
127
|
-
*/
|
|
128
|
-
index: number;
|
|
129
|
-
}
|
|
14
|
+
import { ClassComponent } from '../ts-helpers';
|
|
130
15
|
|
|
131
16
|
/**
|
|
132
17
|
* Custom change event.
|
|
@@ -164,7 +49,7 @@ export interface TabMenuRouterBindProps {
|
|
|
164
49
|
/**
|
|
165
50
|
* Defines valid properties in TabMenu component.
|
|
166
51
|
*/
|
|
167
|
-
export interface TabMenuProps {
|
|
52
|
+
export interface TabMenuProps extends WangsUITabMenuProps {
|
|
168
53
|
/**
|
|
169
54
|
* An array of menuitems.
|
|
170
55
|
*/
|
|
@@ -173,7 +58,7 @@ export interface TabMenuProps {
|
|
|
173
58
|
* Defines type of TabMenu.
|
|
174
59
|
* @defaultValue 'tab'
|
|
175
60
|
*/
|
|
176
|
-
type?: 'tab' | 'pill';
|
|
61
|
+
type?: 'tab' | 'pill' | 'segmented';
|
|
177
62
|
/**
|
|
178
63
|
* Active index of menuitem.
|
|
179
64
|
* @defaultValue 0
|
|
@@ -184,75 +69,6 @@ export interface TabMenuProps {
|
|
|
184
69
|
* @defaultValue true - when type is tab, otherwise true
|
|
185
70
|
*/
|
|
186
71
|
useTrailingLine?: boolean | undefined;
|
|
187
|
-
/**
|
|
188
|
-
* Defines a string value that labels an interactive element.
|
|
189
|
-
*/
|
|
190
|
-
ariaLabel?: string | undefined;
|
|
191
|
-
/**
|
|
192
|
-
* Identifier of the underlying input element.
|
|
193
|
-
*/
|
|
194
|
-
ariaLabelledby?: string | undefined;
|
|
195
|
-
/**
|
|
196
|
-
* Used to pass attributes to DOM elements inside the component.
|
|
197
|
-
* @type {TabMenuPassThroughOptions}
|
|
198
|
-
*/
|
|
199
|
-
pt?: PassThrough<TabMenuPassThroughOptions>;
|
|
200
|
-
/**
|
|
201
|
-
* Used to configure passthrough(pt) options of the component.
|
|
202
|
-
* @type {PassThroughOptions}
|
|
203
|
-
*/
|
|
204
|
-
ptOptions?: PassThroughOptions;
|
|
205
|
-
/**
|
|
206
|
-
* When enabled, it removes component related styles in the core.
|
|
207
|
-
* @defaultValue false
|
|
208
|
-
*/
|
|
209
|
-
unstyled?: boolean;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Defines valid slots in TabMenu component.
|
|
214
|
-
*/
|
|
215
|
-
export interface TabMenuSlots {
|
|
216
|
-
/**
|
|
217
|
-
* Custom content for each item.
|
|
218
|
-
* @param {Object} scope - item slot's params.
|
|
219
|
-
*/
|
|
220
|
-
item(scope: {
|
|
221
|
-
/**
|
|
222
|
-
* Menuitem instance
|
|
223
|
-
*/
|
|
224
|
-
item: MenuItem;
|
|
225
|
-
/**
|
|
226
|
-
* Index of the menuitem
|
|
227
|
-
*/
|
|
228
|
-
index: number;
|
|
229
|
-
/**
|
|
230
|
-
* Current active state of the menuitem
|
|
231
|
-
*/
|
|
232
|
-
active: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Label property of the menuitem
|
|
235
|
-
*/
|
|
236
|
-
label: string | ((...args: any) => string) | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* Binding properties of the menuitem
|
|
239
|
-
*/
|
|
240
|
-
props: TabMenuRouterBindProps;
|
|
241
|
-
}): VNode[];
|
|
242
|
-
/**
|
|
243
|
-
* Custom item icon template.
|
|
244
|
-
* @param {Object} scope - item icon slot's params.
|
|
245
|
-
*/
|
|
246
|
-
itemicon(scope: {
|
|
247
|
-
/**
|
|
248
|
-
* Menuitem instance
|
|
249
|
-
*/
|
|
250
|
-
item: MenuItem;
|
|
251
|
-
/**
|
|
252
|
-
* Style class of the item icon element.
|
|
253
|
-
*/
|
|
254
|
-
class: any;
|
|
255
|
-
}): VNode[];
|
|
256
72
|
}
|
|
257
73
|
|
|
258
74
|
/**
|
|
@@ -263,7 +79,7 @@ export type TabMenuEmits = {
|
|
|
263
79
|
* Callback to invoke when an active tab is changed.
|
|
264
80
|
* @param {TabMenuChangeEvent} event - Custom tab change event.
|
|
265
81
|
*/
|
|
266
|
-
'
|
|
82
|
+
'tabChange': [event: TabMenuChangeEvent];
|
|
267
83
|
'update:activeIndex': [index: number];
|
|
268
84
|
};
|
|
269
85
|
|
|
@@ -281,7 +97,7 @@ export type TabMenuEmits = {
|
|
|
281
97
|
*/
|
|
282
98
|
declare class TabMenu extends ClassComponent<
|
|
283
99
|
TabMenuProps,
|
|
284
|
-
|
|
100
|
+
unknown,
|
|
285
101
|
TabMenuEmits
|
|
286
102
|
> {}
|
|
287
103
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
2
4
|
import {
|
|
3
5
|
ClassComponent,
|
|
4
6
|
GlobalComponentConstructor,
|
|
5
7
|
Nullable,
|
|
6
8
|
Numberish,
|
|
7
9
|
} from '../ts-helpers.d';
|
|
8
|
-
import { CustomValidation } from '../form/Form.vue.d';
|
|
9
10
|
|
|
10
11
|
export interface TextareaLocaleConfig {
|
|
11
12
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
|
|
2
3
|
import { BadgeProps } from '../badge/Badge.vue.d';
|
|
4
|
+
import { JSONContent } from '../editor/Editor.vue.d';
|
|
3
5
|
import { ClassComponent } from '../ts-helpers';
|
|
4
6
|
|
|
5
7
|
export interface AttachmentFile {
|
|
@@ -70,12 +72,17 @@ export type DetailType =
|
|
|
70
72
|
| DetailJSONContent
|
|
71
73
|
| DetailBadge;
|
|
72
74
|
|
|
75
|
+
export type DetailAnyRecord = Record<string, any>;
|
|
76
|
+
|
|
77
|
+
export type SlotDetailType = string | DetailAnyRecord;
|
|
78
|
+
|
|
73
79
|
export type KeyValue = Record<string, string | DetailType>;
|
|
74
80
|
|
|
75
81
|
export type TimelineItem = {
|
|
76
82
|
_id: string;
|
|
77
83
|
action: string;
|
|
78
84
|
createdAt: string;
|
|
85
|
+
username?: string;
|
|
79
86
|
user?: {
|
|
80
87
|
_id: string;
|
|
81
88
|
nickName: string;
|
|
@@ -102,6 +109,18 @@ export type TimelineProps = {
|
|
|
102
109
|
noFormatDate?: boolean;
|
|
103
110
|
};
|
|
104
111
|
|
|
112
|
+
export type TimelineSlots = {
|
|
113
|
+
/**
|
|
114
|
+
* Custom detail template.
|
|
115
|
+
*
|
|
116
|
+
* Use this slot if you want to configure your own detail value in each timeline
|
|
117
|
+
*/
|
|
118
|
+
detail(slotProps: {
|
|
119
|
+
key: string;
|
|
120
|
+
value: SlotDetailType; // Type DetailAnyRecord only used when using slot since you can use your own object structure
|
|
121
|
+
}): VNode[];
|
|
122
|
+
};
|
|
123
|
+
|
|
105
124
|
/**
|
|
106
125
|
* **WangsVue - Timeline**
|
|
107
126
|
*
|
|
@@ -114,7 +133,7 @@ export type TimelineProps = {
|
|
|
114
133
|
*/
|
|
115
134
|
declare class Timeline extends ClassComponent<
|
|
116
135
|
TimelineProps,
|
|
117
|
-
|
|
136
|
+
TimelineSlots,
|
|
118
137
|
unknown
|
|
119
138
|
> {}
|
|
120
139
|
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
import { TransitionProps, VNode } from 'vue';
|
|
12
|
+
|
|
12
13
|
import { ComponentHooks } from '../basecomponent';
|
|
14
|
+
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
13
15
|
import { PassThroughOptions } from '../passthrough';
|
|
14
16
|
import {
|
|
15
17
|
ClassComponent,
|
|
16
18
|
GlobalComponentConstructor,
|
|
17
19
|
PassThrough,
|
|
18
20
|
} from '../ts-helpers';
|
|
19
|
-
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
20
21
|
|
|
21
22
|
export declare type ToastPassThroughOptionType =
|
|
22
23
|
| ToastPassThroughAttributes
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type TransactionRoles = Addon & {
|
|
4
|
+
borrowing: boolean;
|
|
5
|
+
assignment: boolean;
|
|
6
|
+
transfer: boolean;
|
|
7
|
+
disposal: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type Addon = {
|
|
11
|
+
repairTicketing: boolean;
|
|
12
|
+
maintenance: boolean;
|
|
13
|
+
tracking: boolean;
|
|
14
|
+
audit: boolean;
|
|
15
|
+
assetControl: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type LicenseStatus = 'Managed' | 'Unmanaged' | null;
|
|
19
|
+
|
|
20
|
+
export type LicenseStatuses = {
|
|
21
|
+
fixedAsset: LicenseStatus;
|
|
22
|
+
repairTicketing: LicenseStatus;
|
|
23
|
+
maintenance: LicenseStatus;
|
|
24
|
+
tracking: LicenseStatus;
|
|
25
|
+
audit: LicenseStatus;
|
|
26
|
+
assetControl: LicenseStatus;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type RoleData = {
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
transactionRoles?: TransactionRoles;
|
|
32
|
+
addOn?: Addon;
|
|
33
|
+
transactions?: TransactionRoles; // For Policy Assets
|
|
34
|
+
licenseStatuses?: LicenseStatuses;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export interface TransactionRolesProps {
|
|
38
|
+
asset?: RoleData;
|
|
39
|
+
user?: Omit<RoleData, 'addon'>;
|
|
40
|
+
/**
|
|
41
|
+
* @default transaction
|
|
42
|
+
*/
|
|
43
|
+
type?: 'transaction' | 'addon' | 'transaction-policy';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* **TSVue V2 - TransactionRoles**
|
|
48
|
+
*
|
|
49
|
+
* _TransactionRoles is a component to show list of transaction role._
|
|
50
|
+
*
|
|
51
|
+
* --- ---
|
|
52
|
+
* 
|
|
53
|
+
*
|
|
54
|
+
* @group buttons
|
|
55
|
+
*/
|
|
56
|
+
declare const TransactionRoles: DefineComponent<TransactionRolesProps>;
|
|
57
|
+
|
|
58
|
+
export default TransactionRoles;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
import { MenuItem } from '../../components/menuitem';
|
|
4
|
+
|
|
5
5
|
import { BaseTreeProps, TreeNode } from '../basetree/BaseTree.vue.d';
|
|
6
6
|
import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
7
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
8
|
+
|
|
9
|
+
import { TreeSelectionKeys } from 'primevue/tree';
|
|
7
10
|
|
|
8
11
|
export interface TreeProps extends BaseTreeProps {
|
|
9
12
|
/**
|
|
@@ -5,7 +5,10 @@ import { TreeSelectionKeys } from 'primevue/tree';
|
|
|
5
5
|
* @param nodeKeys - A collection of selected node keys.
|
|
6
6
|
* @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
|
|
7
7
|
*/
|
|
8
|
-
export declare const parseNodeKeys: (
|
|
8
|
+
export declare const parseNodeKeys: (
|
|
9
|
+
nodeKeys: TreeSelectionKeys,
|
|
10
|
+
includeNodeAllKey?: boolean,
|
|
11
|
+
) => number[];
|
|
9
12
|
/**
|
|
10
13
|
* Filters a collection of selected node keys based on specific criteria.
|
|
11
14
|
*
|
|
@@ -13,4 +16,7 @@ export declare const parseNodeKeys: (nodeKeys: TreeSelectionKeys, includeNodeAll
|
|
|
13
16
|
* @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
|
|
14
17
|
* @returns A new collection of filtered node keys.
|
|
15
18
|
*/
|
|
16
|
-
export declare const filterNodeKeys: (
|
|
19
|
+
export declare const filterNodeKeys: (
|
|
20
|
+
nodeKeys: TreeSelectionKeys,
|
|
21
|
+
includeNodeAllKey?: boolean,
|
|
22
|
+
) => TreeSelectionKeys;
|
|
@@ -2,5 +2,7 @@ import { TreeNode } from '../../basetree/BaseTree.vue.d';
|
|
|
2
2
|
/**
|
|
3
3
|
* Covert deeply nested tree node into one level array.
|
|
4
4
|
*/
|
|
5
|
-
declare const flattenTreeNodeChildren: (
|
|
5
|
+
declare const flattenTreeNodeChildren: (
|
|
6
|
+
nodes: TreeNode[] | undefined,
|
|
7
|
+
) => TreeNode[];
|
|
6
8
|
export default flattenTreeNodeChildren;
|
|
@@ -81,3 +81,11 @@ export declare type PresetMethodOptions = {
|
|
|
81
81
|
export declare type PresetOptionMethodType<Opt = PresetMethodOptions> = (
|
|
82
82
|
options: Partial<Opt>,
|
|
83
83
|
) => PresetAttributes;
|
|
84
|
+
|
|
85
|
+
export type StringKeyOf<T> = Extract<keyof T, string>;
|
|
86
|
+
|
|
87
|
+
declare const TypeException: unique symbol;
|
|
88
|
+
|
|
89
|
+
export type TypeError<T extends string> = {
|
|
90
|
+
[TypeException]: T;
|
|
91
|
+
};
|
|
@@ -37,6 +37,11 @@ export interface UserNameComponentConfigs {
|
|
|
37
37
|
*/
|
|
38
38
|
type?: 'icon' | 'picture';
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Whether to show the user's name. If false, only the user's icon will be shown.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showUserName?: boolean;
|
|
40
45
|
/**
|
|
41
46
|
* Specify the field of user to be used as display name
|
|
42
47
|
*
|
|
@@ -80,7 +85,7 @@ export interface UserNameProps extends Partial<UserNameComponentConfigs> {
|
|
|
80
85
|
/**
|
|
81
86
|
* The full user Object
|
|
82
87
|
*/
|
|
83
|
-
user?: GeneralUser
|
|
88
|
+
user?: Partial<GeneralUser>;
|
|
84
89
|
|
|
85
90
|
/**
|
|
86
91
|
* When it sets to false, the props.user will be used
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { UserDetail } from '@tagsamurai/fats-api-services/src/types/user.type';
|
|
2
|
-
import { ClassComponent } from '../.././components/ts-helpers';
|
|
3
2
|
|
|
3
|
+
import { ClassComponent } from '../../components/ts-helpers';
|
|
4
4
|
|
|
5
5
|
export interface UserWithIconProps {
|
|
6
|
-
user: UserDetail;
|
|
6
|
+
user: Partial<UserDetail> & { fullName: string };
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
declare class UserWithIcon extends ClassComponent<
|
package/config/defaultProps.d.ts
CHANGED
package/config/index.d.ts
CHANGED
package/config/locale.d.ts
CHANGED
package/directives/focus.d.ts
CHANGED
package/event-bus/index.d.ts
CHANGED
|
@@ -1,60 +1,66 @@
|
|
|
1
|
-
import { Data, QueryParams } from '../components/datatable/DataTable.vue.d';
|
|
2
|
-
import { ToastParams } from '../utils';
|
|
3
1
|
import { Emitter } from './mitt';
|
|
2
|
+
import { Data, QueryParams } from '../components/datatable/DataTable.vue.d';
|
|
3
|
+
import { ToastParams } from '../utils/toast.util';
|
|
4
4
|
export type TableEvent = {
|
|
5
|
-
|
|
5
|
+
tableName?: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'data-table:updated': TableEvent & {
|
|
28
|
-
data: Data[];
|
|
29
|
-
};
|
|
30
|
-
'data-table:download': TableEvent & {
|
|
31
|
-
fileName: string;
|
|
32
|
-
multiTableNames?: string[];
|
|
33
|
-
additionalTexts?: (string | string[])[];
|
|
34
|
-
};
|
|
35
|
-
'data-table:select-all-record': TableEvent;
|
|
36
|
-
'data-table:update-total-record': TableEvent & {
|
|
37
|
-
total: number;
|
|
38
|
-
};
|
|
39
|
-
'data-table:update-selected-data': TableEvent & {
|
|
40
|
-
data?: Data[];
|
|
41
|
-
};
|
|
42
|
-
'data-table:clear-selected-data': TableEvent;
|
|
43
|
-
'data-table:import-excel-to-json': TableEvent & {
|
|
44
|
-
data: Data[];
|
|
45
|
-
};
|
|
46
|
-
'work-calendar:reset-month': unknown;
|
|
47
|
-
'work-calendar:reset-year': unknown;
|
|
48
|
-
'toast:add': ToastParams;
|
|
49
|
-
'tree:update-tree-nodes': unknown;
|
|
50
|
-
'tree:tree-updated': unknown;
|
|
51
|
-
'tree:selection-changed': {
|
|
52
|
-
keys: string;
|
|
53
|
-
};
|
|
54
|
-
'overlay:show': {
|
|
55
|
-
overlayId: number;
|
|
7
|
+
type PredefinedEvents = {
|
|
8
|
+
'data-table:apply-filter': TableEvent & {
|
|
9
|
+
filter: QueryParams;
|
|
10
|
+
};
|
|
11
|
+
'search-table': TableEvent & {
|
|
12
|
+
search: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
'search-by-scan-table': TableEvent & {
|
|
15
|
+
tag?: string;
|
|
16
|
+
};
|
|
17
|
+
'show-filter': TableEvent & {
|
|
18
|
+
show: boolean;
|
|
19
|
+
};
|
|
20
|
+
'multi-select:hide-overlay': unknown;
|
|
21
|
+
'button-download:multi-tables': {
|
|
22
|
+
table: {
|
|
23
|
+
headers: string[];
|
|
24
|
+
data: Record<string, unknown>[];
|
|
25
|
+
tableName: string;
|
|
26
|
+
tableTitle?: string;
|
|
56
27
|
};
|
|
28
|
+
};
|
|
29
|
+
'data-table:update': TableEvent;
|
|
30
|
+
'data-table:updated': TableEvent & {
|
|
31
|
+
data: Data[];
|
|
32
|
+
};
|
|
33
|
+
'data-table:download': TableEvent & {
|
|
34
|
+
fileName: string;
|
|
35
|
+
multiTableNames?: string[];
|
|
36
|
+
additionalTexts?: (string | string[])[];
|
|
37
|
+
};
|
|
38
|
+
'data-table:select-all-record': TableEvent;
|
|
39
|
+
'data-table:update-total-record': TableEvent & {
|
|
40
|
+
total: number;
|
|
41
|
+
};
|
|
42
|
+
'data-table:update-selected-data': TableEvent & {
|
|
43
|
+
data?: Data[];
|
|
44
|
+
};
|
|
45
|
+
'data-table:clear-selected-data': TableEvent;
|
|
46
|
+
'data-table:import-excel-to-json': TableEvent & {
|
|
47
|
+
data: Data[];
|
|
48
|
+
};
|
|
49
|
+
'work-calendar:reset-month': unknown;
|
|
50
|
+
'work-calendar:reset-year': unknown;
|
|
51
|
+
'toast:add': ToastParams;
|
|
52
|
+
'tree:update-tree-nodes': unknown;
|
|
53
|
+
'tree:tree-updated': unknown;
|
|
54
|
+
'tree:selection-changed': {
|
|
55
|
+
keys: string;
|
|
56
|
+
};
|
|
57
|
+
'overlay:show': {
|
|
58
|
+
overlayId: number;
|
|
59
|
+
};
|
|
57
60
|
};
|
|
58
|
-
|
|
61
|
+
export type Events<CustomEvents = undefined> = CustomEvents extends undefined
|
|
62
|
+
? PredefinedEvents
|
|
63
|
+
: CustomEvents & PredefinedEvents;
|
|
64
|
+
declare const eventBus: Emitter<PredefinedEvents>;
|
|
59
65
|
export declare const extendEventBus: <T>() => Emitter<Events<T>>;
|
|
60
66
|
export default eventBus;
|