@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.
Files changed (101) hide show
  1. package/components/animation/Animation.vue.d.ts +24 -0
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  3. package/components/assetinfo/AssetInfo.vue.d.ts +34 -0
  4. package/components/badge/Badge.vue.d.ts +73 -0
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
  6. package/components/basecomponent/index.d.ts +28 -0
  7. package/components/basetree/BaseTree.vue.d.ts +591 -0
  8. package/components/basetree/TreeNode.vue.d.ts +35 -0
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  10. package/components/button/Button.vue.d.ts +188 -0
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  13. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  14. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  15. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  16. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  17. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  18. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  19. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  20. package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
  21. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  22. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  23. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  24. package/components/calendar/Calendar.vue.d.ts +570 -0
  25. package/components/card/Card.vue.d.ts +139 -0
  26. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  27. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  28. package/components/datatable/DataTable.vue.d.ts +735 -0
  29. package/components/dialog/Dialog.vue.d.ts +464 -0
  30. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  31. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  33. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  34. package/components/editor/Editor.vue.d.ts +191 -0
  35. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  36. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  37. package/components/filtercontainer/FilterContainer.vue.d.ts +184 -0
  38. package/components/form/Form.vue.d.ts +316 -0
  39. package/components/icon/Icon.vue.d.ts +256 -0
  40. package/components/image/Image.vue.d.ts +403 -0
  41. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  42. package/components/index.d.ts +58 -0
  43. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  44. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  45. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  46. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  47. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  48. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  49. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  50. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  51. package/components/inputsearch/InputSearch.vue.d.ts +36 -0
  52. package/components/inputtext/InputText.vue.d.ts +352 -0
  53. package/components/inputurl/InputURL.vue.d.ts +39 -0
  54. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  55. package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
  56. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  57. package/components/loading/Loading.vue.d.ts +47 -0
  58. package/components/loading/store/loading.store.d.ts +8 -0
  59. package/components/menu/Menu.vue.d.ts +390 -0
  60. package/components/menuitem/index.d.ts +106 -0
  61. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  62. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  63. package/components/passthrough/index.d.ts +16 -0
  64. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  65. package/components/textarea/Textarea.vue.d.ts +170 -0
  66. package/components/timeline/Timeline.vue.d.ts +121 -0
  67. package/components/toast/Toast.vue.d.ts +367 -0
  68. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  69. package/components/tree/Tree.vue.d.ts +148 -0
  70. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  71. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  72. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  73. package/components/ts-helpers.d.ts +83 -0
  74. package/components/username/UserName.vue.d.ts +113 -0
  75. package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
  76. package/config/defaultProps.d.ts +3 -0
  77. package/config/index.d.ts +3 -0
  78. package/config/locale.d.ts +3 -0
  79. package/directives/focus.d.ts +1 -1
  80. package/event-bus/index.d.ts +51 -51
  81. package/event-bus/mitt.d.ts +29 -14
  82. package/main.d.ts +31 -0
  83. package/package.json +8 -4
  84. package/plugins/WangsVue.d.ts +249 -199
  85. package/plugins/formValidation.d.ts +15 -6
  86. package/plugins/i18n-extension.d.ts +4 -0
  87. package/plugins/i18n.d.ts +82 -78
  88. package/utils/date.util.d.ts +59 -30
  89. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  90. package/utils/index.d.ts +8 -0
  91. package/utils/listenSidebarChanges.util.d.ts +16 -0
  92. package/utils/object.util.d.ts +14 -3
  93. package/utils/role.util.d.ts +68 -0
  94. package/utils/toast.util.d.ts +78 -78
  95. package/utils/addAttachment.util.d.ts +0 -43
  96. package/utils/exportToExcel.util.d.ts +0 -20
  97. package/utils/filterOptions.util.d.ts +0 -3
  98. package/utils/genPlaceholder.util.d.ts +0 -8
  99. package/utils/getAttachmentIcon.util.d.ts +0 -8
  100. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  101. package/utils/textFormatter.util.d.ts +0 -17
@@ -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;
@@ -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
- tableName?: string;
5
+ tableName?: string;
6
6
  };
7
7
  export type Events<CustomEvents = Record<string, any>> = CustomEvents & {
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
- };
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>>;
@@ -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>> = (type: keyof T, event: T[keyof T]) => void;
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<WildcardHandler<T>>;
6
- export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
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
- all: EventHandlerMap<Events>;
9
- on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
10
- on(type: '*', handler: WildcardHandler<Events>): void;
11
- off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
12
- off(type: '*', handler: WildcardHandler<Events>): void;
13
- emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
14
- emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void;
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>>(all?: EventHandlerMap<Events>): Emitter<Events>;
34
+ export default function mitt<Events extends Record<EventType, unknown>>(
35
+ all?: EventHandlerMap<Events>,
36
+ ): Emitter<Events>;
22
37
  declare global {
23
- interface Window {
24
- eventBus: Emitter<any>;
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.31",
4
- "author": "fewangsit",
5
- "description": "Admin Console Tagsamurai VueJS Component Library",
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
- "./types": "./types",
13
+ "./config": "./config",
14
+ "./plugins": "./plugins",
15
+ "./directives": "./directives",
16
+ "./components": "./components",
13
17
  "./event-bus": "./event-bus",
14
18
  "./utils": "./utils"
15
19
  }