tsv2-library 0.0.16 → 0.0.18

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 (57) hide show
  1. package/dist/build-entry.d.ts +2 -2
  2. package/dist/components/v2/Button/Button.vue.d.ts +4 -0
  3. package/dist/components/v2/ButtonDownload/ButtonDownload.vue.d.ts +9 -0
  4. package/dist/components/v2/ButtonFilter/ButtonFilter.vue.d.ts +16 -0
  5. package/dist/components/v2/ButtonToggle/ButtonToggle.vue.d.ts +16 -0
  6. package/dist/components/v2/Calendar/Calendar.vue.d.ts +66 -0
  7. package/dist/components/v2/Card/Card.vue.d.ts +139 -0
  8. package/dist/components/v2/DataTable/DataTable.vue.d.ts +53 -0
  9. package/dist/components/v2/Dialog/Dialog.vue.d.ts +452 -0
  10. package/dist/components/v2/Dropdown/Dropdown.vue.d.ts +3 -3
  11. package/dist/components/v2/InputGroup/InputGroup.vue.d.ts +138 -0
  12. package/dist/components/v2/InputGroupAddon/InputGroupAddon.vue.d.ts +129 -0
  13. package/dist/components/v2/InputNumber/InputNumber.vue.d.ts +14 -1
  14. package/dist/components/v2/MultiSelect/MultiSelect.vue.d.ts +3 -3
  15. package/dist/components/v2/Toast/Toast.vue.d.ts +365 -0
  16. package/dist/components/v2/ValidatorMessage/ValidatorMessage.vue.d.ts +3 -0
  17. package/dist/components/v2/index.d.ts +12 -1
  18. package/dist/style.css +1 -1
  19. package/dist/tsv2-library.cjs.js +209 -24
  20. package/dist/tsv2-library.cjs.js.map +1 -1
  21. package/dist/tsv2-library.es.js +36763 -7933
  22. package/dist/tsv2-library.es.js.map +1 -1
  23. package/dist/tsv2-library.umd.js +221 -36
  24. package/dist/tsv2-library.umd.js.map +1 -1
  25. package/dist/types/options.d.ts +8 -7
  26. package/dist/utils/exportToExcel.util.d.ts +2 -2
  27. package/package.json +8 -2
  28. package/src/colors.config.json +117 -0
  29. package/src/components/v2/BaseComponent/BaseComponent.d.ts +28 -0
  30. package/src/components/v2/Button/Button.vue.d.ts +4 -0
  31. package/src/components/v2/ButtonDownload/ButtonDownload.vue.d.ts +9 -0
  32. package/src/components/v2/ButtonFilter/ButtonFilter.vue.d.ts +16 -0
  33. package/src/components/v2/ButtonToggle/ButtonToggle.vue.d.ts +16 -0
  34. package/src/components/v2/Calendar/Calendar.vue.d.ts +66 -0
  35. package/src/components/v2/Card/Card.vue.d.ts +139 -0
  36. package/src/components/v2/DataTable/DataTable.vue.d.ts +53 -0
  37. package/src/components/v2/Dialog/Dialog.vue.d.ts +452 -0
  38. package/src/components/v2/Dropdown/Dropdown.vue.d.ts +3 -3
  39. package/src/components/v2/InputGroup/InputGroup.vue.d.ts +138 -0
  40. package/src/components/v2/InputGroupAddon/InputGroupAddon.vue.d.ts +129 -0
  41. package/src/components/v2/InputNumber/InputNumber.vue.d.ts +14 -1
  42. package/src/components/v2/MultiSelect/MultiSelect.vue.d.ts +3 -3
  43. package/src/components/v2/PassThrough/index.d.ts +16 -0
  44. package/src/components/v2/Toast/Toast.vue.d.ts +365 -0
  45. package/src/components/v2/ValidatorMessage/ValidatorMessage.vue.d.ts +3 -0
  46. package/src/components/v2/ts-helpers.d.ts +61 -0
  47. package/src/custom-events.d.ts +7 -0
  48. package/src/presets/button/index.js +11 -11
  49. package/src/presets/calendar/index.js +121 -115
  50. package/src/presets/card/index.js +6 -7
  51. package/src/presets/dialog/index.js +9 -4
  52. package/src/presets/inputgroup/index.js +6 -1
  53. package/src/presets/inputgroupaddon/index.js +16 -15
  54. package/src/presets/inputnumber/index.js +7 -3
  55. package/src/presets/inputswitch/index.js +33 -20
  56. package/src/presets/toast/index.js +19 -26
  57. package/src/presets/tooltip/index.js +4 -1
@@ -1,8 +1,8 @@
1
1
  import type { App } from 'vue';
2
2
  import LibConfig from '../node_modules/primevue/config';
3
- import { TSBadge, TSBreadcrumb, TSButton, TSButtonLogHistory, TSButtonViewLog, TSCheckbox, TSDropdown, TSFilterContainer, TSForm, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSValidatorMessage } from './components/v2';
3
+ import { TSBadge, TSBreadcrumb, TSButton, TSButtonBulkAction, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonViewLog, TSButtonSearch, TSButtonToggle, TSCalendar, TSCard, TSCheckbox, TSDataTable, TSDialog, TSDialogConfirm, TSDropdown, TSFilterContainer, TSForm, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSValidatorMessage } from './components/v2';
4
4
  declare const _default: {
5
5
  install: (app: App) => void;
6
6
  };
7
7
  export default _default;
8
- export { LibConfig, TSBadge, TSBreadcrumb, TSButton, TSButtonLogHistory, TSButtonViewLog, TSCheckbox, TSDropdown, TSFilterContainer, TSForm, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSValidatorMessage, };
8
+ export { LibConfig, TSBadge, TSBreadcrumb, TSButton, TSButtonBulkAction, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonViewLog, TSButtonSearch, TSButtonToggle, TSCalendar, TSCard, TSCheckbox, TSDataTable, TSDialog, TSDialogConfirm, TSDropdown, TSFilterContainer, TSForm, TSInputEmail, TSInputNumber, TSInputText, TSMultiSelect, TSTabMenu, TSValidatorMessage, };
@@ -4,6 +4,10 @@ import type { TSVueIcons } from '../../../components/v2/Icon/Icon.vue.d';
4
4
 
5
5
  export interface TSButtonProps
6
6
  extends /* @vue-ignore */ Omit<ButtonProps, 'icon'> {
7
+ /**
8
+ * Tooltip/information to show on button hover.
9
+ */
10
+ tooltip?: string;
7
11
  icon?: TSVueIcons;
8
12
  }
9
13
 
@@ -0,0 +1,9 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export interface ButtonDownloadProps {
4
+ fileName: string;
5
+ }
6
+
7
+ declare const ButtonDownload: DefineComponent<ButtonDownloadProps>;
8
+
9
+ export default ButtonDownload;
@@ -0,0 +1,16 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export interface ButtonFilterProps {
4
+ showFilter?: boolean;
5
+ }
6
+
7
+ export type ButtonFilterEmits = {
8
+ 'update:showFilter': [state: boolean];
9
+ };
10
+
11
+ declare const ButtonFilter: DefineComponent<
12
+ ButtonFilterProps,
13
+ ButtonFilterEmits
14
+ >;
15
+
16
+ export default ButtonFilter;
@@ -0,0 +1,16 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export interface ButtonToggleProps {
4
+ modelValue: boolean;
5
+ }
6
+
7
+ export type ButtonToggleEmits = {
8
+ 'update:modelValue': [state: boolean];
9
+ };
10
+
11
+ declare const ButtonToggle: DefineComponent<
12
+ ButtonToggleProps,
13
+ ButtonToggleEmits
14
+ >;
15
+
16
+ export default ButtonToggle;
@@ -0,0 +1,66 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ /**
4
+ * TSCalendar component props
5
+ */
6
+ export interface TSCalendarProps {
7
+ /**
8
+ * TSCalendar modelValue is date timestamp: 1706423635731
9
+ */
10
+ modelValue?: number | number[];
11
+ /**
12
+ * To display the initial date value, used in edit form, taht sometime need to display the already inputed date.
13
+ */
14
+ dateValue?: number | number[];
15
+ /**
16
+ * Display label on top of Date Input.
17
+ */
18
+ label?: string;
19
+ /**
20
+ * Whether single date or date range model value.
21
+ */
22
+ mode?: 'range' | 'single';
23
+ /**
24
+ * Enable Validator using vee-validate. Combine with TSForm that handle form validation.
25
+ */
26
+ useValidator?: boolean;
27
+ /**
28
+ * When used as field in From Validation using TSForm,
29
+ * specify the unique field name, match with your needs for API request.
30
+ */
31
+ fieldName?: string;
32
+ /**
33
+ * Whether this field should be filled or not.
34
+ */
35
+ mandatory?: boolean;
36
+ /**
37
+ * Sets the invalid state.
38
+ */
39
+ invalid?: boolean;
40
+ /**
41
+ * Set the custom validator message.
42
+ * By default each field has preserved with its validator message, you don't need to worrying about the message.
43
+ */
44
+ validatorMessage?: string;
45
+ }
46
+
47
+ /**
48
+ * TSCalendar component emits
49
+ */
50
+ export type TSCalendarEmits = {
51
+ 'update:modelValue': [date: number | number[]];
52
+ };
53
+
54
+ /**
55
+ * **TSVue - TSCalendar**
56
+ *
57
+ * _Handle input date with form validation._
58
+ *
59
+ * --- ---
60
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
61
+ *
62
+ * @group form
63
+ */
64
+ declare const TSCalendar: DefineComponent<TSCalendarProps, TSCalendarEmits>;
65
+
66
+ export default TSCalendar;
@@ -0,0 +1,139 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /**
3
+ *
4
+ * Card is a flexible container component.
5
+ *
6
+ * @module card
7
+ *
8
+ */
9
+ import { VNode } from 'vue';
10
+ import { ComponentHooks } from '../BaseComponent/BaseComponent.d';
11
+ import { PassThroughOptions } from '../PassThrough';
12
+ import {
13
+ ClassComponent,
14
+ GlobalComponentConstructor,
15
+ PassThrough,
16
+ } from '../ts-helpers';
17
+
18
+ export declare type CardPassThroughOptionType =
19
+ | CardPassThroughAttributes
20
+ | null
21
+ | undefined;
22
+
23
+ /**
24
+ * Custom passthrough(pt) options.
25
+ * @see {@link CardProps.pt}
26
+ */
27
+ export interface CardPassThroughOptions {
28
+ /**
29
+ * Used to pass attributes to the root's DOM element.
30
+ */
31
+ root?: CardPassThroughOptionType;
32
+ /**
33
+ * Used to pass attributes to the header's DOM element.
34
+ */
35
+ header?: CardPassThroughOptionType;
36
+ /**
37
+ * Used to pass attributes to the body's DOM element.
38
+ */
39
+ body?: CardPassThroughOptionType;
40
+ /**
41
+ * Used to pass attributes to the caption's DOM element.
42
+ */
43
+ caption?: CardPassThroughOptionType;
44
+ /**
45
+ * Used to pass attributes to the title's DOM element.
46
+ */
47
+ title?: CardPassThroughOptionType;
48
+ /**
49
+ * Used to pass attributes to the subtitle's DOM element.
50
+ */
51
+ subtitle?: CardPassThroughOptionType;
52
+ /**
53
+ * Used to pass attributes to the content's DOM element.
54
+ */
55
+ content?: CardPassThroughOptionType;
56
+ /**
57
+ * Used to pass attributes to the footer's DOM element.
58
+ */
59
+ footer?: CardPassThroughOptionType;
60
+ /**
61
+ * Used to manage all lifecycle hooks.
62
+ * @see {@link BaseComponent.ComponentHooks}
63
+ */
64
+ hooks?: ComponentHooks;
65
+ }
66
+
67
+ /**
68
+ * Custom passthrough attributes for each DOM elements
69
+ */
70
+ export interface CardPassThroughAttributes {
71
+ [key: string]: any;
72
+ }
73
+
74
+ /**
75
+ * Defines valid properties in Card component.
76
+ */
77
+ export interface CardProps {
78
+ /**
79
+ * Used to pass attributes to DOM elements inside the component.
80
+ * @type {CardPassThroughOptions}
81
+ */
82
+ pt?: PassThrough<CardPassThroughOptions>;
83
+ /**
84
+ * Used to configure passthrough(pt) options of the component.
85
+ * @type {PassThroughOptions}
86
+ */
87
+ ptOptions?: PassThroughOptions;
88
+ /**
89
+ * When enabled, it removes component related styles in the core.
90
+ * @defaultValue false
91
+ */
92
+ unstyled?: boolean;
93
+ }
94
+
95
+ /**
96
+ * Defines valid slots in Card component.
97
+ */
98
+ export interface CardSlots {
99
+ /**
100
+ * Custom header template.
101
+ */
102
+ header(): VNode[];
103
+ /**
104
+ * Custom title template.
105
+ */
106
+ title(): VNode[];
107
+ /**
108
+ * Custom subtitle template.
109
+ */
110
+ subtitle(): VNode[];
111
+ /**
112
+ * Custom content template.
113
+ */
114
+ content(): VNode[];
115
+ /**
116
+ * Custom footer template.
117
+ */
118
+ footer(): VNode[];
119
+ }
120
+
121
+ /**
122
+ * **TSVue - Card**
123
+ *
124
+ * _Card is a flexible container component._
125
+ *
126
+ * --- ---
127
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
128
+ *
129
+ * @group Component
130
+ */
131
+ declare class Card extends ClassComponent<CardProps, CardSlots, CardEmits> {}
132
+
133
+ declare module '@vue/runtime-core' {
134
+ interface GlobalComponents {
135
+ Card: GlobalComponentConstructor<Card>;
136
+ }
137
+ }
138
+
139
+ export default Card;
@@ -0,0 +1,53 @@
1
+ import { Component } from 'vue';
2
+
3
+ type Data = Record<string, unknown>;
4
+
5
+ export type FetchResponse = {
6
+ data: Data[];
7
+ totalRecords: number;
8
+ };
9
+
10
+ export type TableCellComponent = {
11
+ component: string | Component;
12
+ props?: object;
13
+ model?: unknown;
14
+ events?: unknown;
15
+ onChange?: (itemData: unknown) => void;
16
+ disabled?: boolean;
17
+ };
18
+
19
+ export type TableColumn = {
20
+ header: string;
21
+ field: string;
22
+ style?: string;
23
+ sortable?: boolean;
24
+ fixed?: boolean;
25
+ /**
26
+ * Exclude column from download/export excel.
27
+ */
28
+ excluded?: boolean;
29
+ bodyStyle?: (props: unknown) => string;
30
+ bodyTemplate?: (data: unknown) => string | undefined;
31
+ bodyComponent?: (data: unknown) => TaCellbleComponent;
32
+ headerTemplate?: () => string;
33
+ headerComponent?: () => {
34
+ component: string | Component;
35
+ props?: object;
36
+ model?: unknown;
37
+ events?: unknown;
38
+ onChange?: (data: unknown) => void;
39
+ disabled?: boolean;
40
+ };
41
+ };
42
+
43
+ export type TableOption = {
44
+ label?: string;
45
+ command?: (data?: unknown) => unknown;
46
+ icon?: string;
47
+ items?: unknown[];
48
+ class?: string;
49
+ disabled?: boolean;
50
+ separator?: boolean;
51
+ danger?: boolean;
52
+ visible?: boolean;
53
+ };