@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.32
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 +24 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/assetinfo/AssetInfo.vue.d.ts +34 -0
- package/components/badge/Badge.vue.d.ts +73 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +591 -0
- package/components/basetree/TreeNode.vue.d.ts +35 -0
- package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
- package/components/button/Button.vue.d.ts +188 -0
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
- package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +570 -0
- package/components/card/Card.vue.d.ts +139 -0
- package/components/checkbox/Checkbox.vue.d.ts +329 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
- package/components/datatable/DataTable.vue.d.ts +735 -0
- package/components/dialog/Dialog.vue.d.ts +464 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
- package/components/dialogform/DialogForm.vue.d.ts +349 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
- package/components/dropdown/Dropdown.vue.d.ts +274 -0
- package/components/editor/Editor.vue.d.ts +191 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
- package/components/fileupload/FileUpload.vue.d.ts +169 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +184 -0
- package/components/form/Form.vue.d.ts +316 -0
- package/components/icon/Icon.vue.d.ts +256 -0
- package/components/image/Image.vue.d.ts +403 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
- package/components/index.d.ts +58 -0
- package/components/inputbadge/InputBadge.vue.d.ts +122 -0
- package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
- package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
- package/components/inputemail/InputEmail.vue.d.ts +25 -0
- package/components/inputnumber/InputNumber.vue.d.ts +282 -0
- package/components/inputpassword/InputPassword.vue.d.ts +32 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputsearch/InputSearch.vue.d.ts +36 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +39 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
- package/components/loading/Loading.vue.d.ts +47 -0
- package/components/loading/store/loading.store.d.ts +8 -0
- package/components/menu/Menu.vue.d.ts +390 -0
- package/components/menuitem/index.d.ts +106 -0
- package/components/multiselect/MultiSelect.vue.d.ts +194 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/tabmenu/TabMenu.vue.d.ts +288 -0
- package/components/textarea/Textarea.vue.d.ts +170 -0
- package/components/timeline/Timeline.vue.d.ts +121 -0
- package/components/toast/Toast.vue.d.ts +367 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
- package/components/tree/Tree.vue.d.ts +148 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
- package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +83 -0
- package/components/username/UserName.vue.d.ts +113 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +51 -51
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +31 -0
- package/package.json +8 -4
- package/plugins/WangsVue.d.ts +249 -199
- package/plugins/formValidation.d.ts +15 -6
- package/plugins/i18n-extension.d.ts +4 -0
- package/plugins/i18n.d.ts +82 -78
- package/utils/date.util.d.ts +59 -30
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +8 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +68 -0
- package/utils/toast.util.d.ts +78 -78
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/exportToExcel.util.d.ts +0 -20
- 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/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
package/directives/focus.d.ts
CHANGED
package/event-bus/index.d.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import { Data, QueryParams } from '../components/datatable/DataTable.vue.d';
|
|
2
|
-
import { ToastParams } from '../utils';
|
|
2
|
+
import { ToastParams } from '../utils/toast.util';
|
|
3
3
|
import { Emitter } from './mitt';
|
|
4
4
|
export type TableEvent = {
|
|
5
|
-
|
|
5
|
+
tableName?: string;
|
|
6
6
|
};
|
|
7
7
|
export type Events<CustomEvents = Record<string, any>> = CustomEvents & {
|
|
8
|
-
|
|
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
|
-
|
|
8
|
+
'data-table:apply-filter': TableEvent & {
|
|
9
|
+
filter: QueryParams;
|
|
10
|
+
};
|
|
11
|
+
'search-table': TableEvent & {
|
|
12
|
+
search: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
'show-filter': TableEvent & {
|
|
15
|
+
show: boolean;
|
|
16
|
+
};
|
|
17
|
+
'multi-select:hide-overlay': unknown;
|
|
18
|
+
'button-download:multi-tables': {
|
|
19
|
+
table: {
|
|
20
|
+
headers: string[];
|
|
21
|
+
data: Record<string, unknown>[];
|
|
22
|
+
tableName: string;
|
|
23
|
+
tableTitle?: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
'data-table:update': TableEvent;
|
|
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;
|
|
56
|
+
};
|
|
57
57
|
};
|
|
58
58
|
declare const eventBus: Emitter<Events<Record<string, any>>>;
|
|
59
59
|
export declare const extendEventBus: <T>() => Emitter<Events<T>>;
|
package/event-bus/mitt.d.ts
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
export type EventType = string | symbol;
|
|
2
2
|
export type Handler<T = unknown> = (event: T) => void;
|
|
3
|
-
export type WildcardHandler<T = Record<string, unknown>> = (
|
|
3
|
+
export type WildcardHandler<T = Record<string, unknown>> = (
|
|
4
|
+
type: keyof T,
|
|
5
|
+
event: T[keyof T],
|
|
6
|
+
) => void;
|
|
4
7
|
export type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
5
|
-
export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<
|
|
6
|
-
|
|
8
|
+
export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<
|
|
9
|
+
WildcardHandler<T>
|
|
10
|
+
>;
|
|
11
|
+
export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<
|
|
12
|
+
keyof Events | '*',
|
|
13
|
+
EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>
|
|
14
|
+
>;
|
|
7
15
|
export interface Emitter<Events extends Record<EventType, unknown>> {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
all: EventHandlerMap<Events>;
|
|
17
|
+
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
|
|
18
|
+
on(type: '*', handler: WildcardHandler<Events>): void;
|
|
19
|
+
off<Key extends keyof Events>(
|
|
20
|
+
type: Key,
|
|
21
|
+
handler?: Handler<Events[Key]>,
|
|
22
|
+
): void;
|
|
23
|
+
off(type: '*', handler: WildcardHandler<Events>): void;
|
|
24
|
+
emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
|
|
25
|
+
emit<Key extends keyof Events>(
|
|
26
|
+
type: undefined extends Events[Key] ? Key : never,
|
|
27
|
+
): void;
|
|
15
28
|
}
|
|
16
29
|
/**
|
|
17
30
|
* Mitt: Tiny (~200b) functional event emitter / pubsub.
|
|
18
31
|
* @name mitt
|
|
19
32
|
* @returns {Mitt}
|
|
20
33
|
*/
|
|
21
|
-
export default function mitt<Events extends Record<EventType, unknown>>(
|
|
34
|
+
export default function mitt<Events extends Record<EventType, unknown>>(
|
|
35
|
+
all?: EventHandlerMap<Events>,
|
|
36
|
+
): Emitter<Events>;
|
|
22
37
|
declare global {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
interface Window {
|
|
39
|
+
eventBus: Emitter<any>;
|
|
40
|
+
}
|
|
26
41
|
}
|
package/main.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { default as mitt } from './event-bus/mitt';
|
|
2
|
+
export { default as eventBus, extendEventBus } from './event-bus';
|
|
3
|
+
|
|
4
|
+
// PrimeVue
|
|
5
|
+
export { default as ToastService } from 'primevue/toastservice';
|
|
6
|
+
|
|
7
|
+
// Utils
|
|
8
|
+
export * from './utils';
|
|
9
|
+
|
|
10
|
+
// Helpers
|
|
11
|
+
export { formatCurrency } from './components/inputcurrency/helpers/currency.helper';
|
|
12
|
+
|
|
13
|
+
// Component store
|
|
14
|
+
export { default as useLoadingStore } from './components/loading/store/loading.store';
|
|
15
|
+
|
|
16
|
+
// Directives
|
|
17
|
+
export { default as Tooltip } from 'primevue/tooltip';
|
|
18
|
+
export { Focus } from './directives';
|
|
19
|
+
|
|
20
|
+
// Plugins
|
|
21
|
+
export { useForm, useField } from './plugins/formValidation';
|
|
22
|
+
export type { FormContext } from './plugins/formValidation';
|
|
23
|
+
|
|
24
|
+
// Translation
|
|
25
|
+
export * from './plugins/i18n';
|
|
26
|
+
export { default as i18n } from './plugins/i18n-extension';
|
|
27
|
+
|
|
28
|
+
export * from './components';
|
|
29
|
+
|
|
30
|
+
// Config
|
|
31
|
+
export { default as WangsVue } from './config';
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fewangsit/wangsvue-fats",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
4
|
-
"author": "
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "1.0.0-alpha.32",
|
|
4
|
+
"author": "Wangsit FE Developer",
|
|
5
|
+
"description": "Fixed Asset Tagsamurai VueJS Component Library",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "./wangsvue-fats.es.js",
|
|
8
8
|
"types": "./main.d.ts",
|
|
9
|
+
"repository": "https://github.com/fewangsit/wangsvue",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": "./wangsvue-fats.es.js",
|
|
11
12
|
"./style.css": "./style.css",
|
|
12
|
-
"./
|
|
13
|
+
"./config": "./config",
|
|
14
|
+
"./plugins": "./plugins",
|
|
15
|
+
"./directives": "./directives",
|
|
16
|
+
"./components": "./components",
|
|
13
17
|
"./event-bus": "./event-bus",
|
|
14
18
|
"./utils": "./utils"
|
|
15
19
|
}
|