tsv2-library 0.0.1 → 0.0.2

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 (43) hide show
  1. package/dist/components/Button/Button.vue.d.ts +14 -0
  2. package/dist/components/Button/Button.vue.d.ts.map +1 -0
  3. package/dist/components/icon/Icon.vue.d.ts +4 -0
  4. package/dist/components/icon/Icon.vue.d.ts.map +1 -0
  5. package/dist/components/index.d.ts +2 -0
  6. package/dist/components/main.d.ts +7 -0
  7. package/dist/components/v2/Badge/Badge.vue.d.ts +48 -0
  8. package/dist/components/v2/buttonbulkaction/ButtonBulkAction.vue.d.ts +69 -0
  9. package/dist/components/v2/icon/Icon.vue.d.ts +4 -4
  10. package/dist/components/v2/inputtext/InputText.vue.d.ts +71 -0
  11. package/dist/main.d.ts +3 -0
  12. package/dist/tsv2-library.cjs.js +15 -17
  13. package/dist/tsv2-library.es.js +339 -584
  14. package/dist/tsv2-library.umd.js +15 -17
  15. package/package.json +19 -44
  16. package/dist/components/v2/Button/Button.vue.d.ts +0 -4
  17. package/dist/components/v2/Button/Button.vue.d.ts.map +0 -1
  18. package/dist/components/v2/Checkbox/Checkbox.vue.d.ts +0 -4
  19. package/dist/components/v2/Checkbox/Checkbox.vue.d.ts.map +0 -1
  20. package/dist/components/v2/icon/Icon.vue.d.ts.map +0 -1
  21. package/dist/components/v2/index.d.ts +0 -8
  22. package/dist/routers/index.d.ts +0 -2
  23. package/dist/services/category.service.d.ts +0 -4
  24. package/dist/services/group.service.d.ts +0 -4
  25. package/dist/services/scanner.service.d.ts +0 -10
  26. package/dist/services/scanner_old.service.d.ts +0 -9
  27. package/dist/tsv2-library.cjs.js.map +0 -1
  28. package/dist/tsv2-library.es.js.map +0 -1
  29. package/dist/tsv2-library.umd.js.map +0 -1
  30. package/dist/types/columns.d.ts +0 -26
  31. package/dist/types/fieldValidation.type.d.ts +0 -8
  32. package/dist/types/options.d.ts +0 -9
  33. package/dist/types/table.type.d.ts +0 -28
  34. package/dist/utils/date.util.d.ts +0 -4
  35. package/dist/utils/exportToExcel.util.d.ts +0 -7
  36. package/dist/utils/index.d.ts +0 -8
  37. package/dist/utils/string.util.d.ts +0 -4
  38. package/dist/utils/textFormater.util.d.ts +0 -3
  39. package/src/utils/date.util.ts +0 -58
  40. package/src/utils/exportToExcel.util.ts +0 -32
  41. package/src/utils/index.ts +0 -45
  42. package/src/utils/string.util.ts +0 -23
  43. package/src/utils/textFormater.util.ts +0 -46
@@ -0,0 +1,14 @@
1
+ import type { PropType as __PropType } from 'vue';
2
+ import { TSVueIcons } from '../../components/icon/Icon.vue.d';
3
+ declare const _sfc_main: import("vue").DefineComponent<{
4
+ icon: {
5
+ type: __PropType<TSVueIcons | undefined>;
6
+ required: false;
7
+ };
8
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ icon: {
10
+ type: __PropType<TSVueIcons | undefined>;
11
+ required: false;
12
+ };
13
+ }>>, {}, {}>;
14
+ export default _sfc_main;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4IAA4I,CAAC;AACnK,cAAc,4IAA4I,CAAC;AAC3J,eAAe,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * List of all available icons.
3
+ */
4
+ export type TSVueIcons = 'close' | 'arrow-down' | 'check';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.vue.d.ts","sourceRoot":"","sources":["../../../src/components/icon/Icon.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wIAAwI,CAAC;AAC/J,cAAc,wIAAwI,CAAC;AACvJ,eAAe,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ import Button from './Button/Button.vue';
2
+ export { Button };
@@ -0,0 +1,7 @@
1
+ import type { App } from 'vue';
2
+ import { Button } from '../components';
3
+ declare const _default: {
4
+ install: (app: App) => void;
5
+ };
6
+ export default _default;
7
+ export { Button };
@@ -0,0 +1,48 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ /**
4
+ * Props for Badge component
5
+ */
6
+ export interface BadgeProps {
7
+ /**
8
+ * The text to be displayed.
9
+ */
10
+ label: string;
11
+ /**
12
+ * Sets the severity level for styling purposes.
13
+ */
14
+ severity?: 'success' | 'danger' | 'warning' | 'dark' | 'primary';
15
+ /**
16
+ * Determines if the name should be truncated when it exceeds a certain length.
17
+ */
18
+ truncate?: boolean;
19
+ /**
20
+ * Specifies the type for text truncation rules based on the usage context.
21
+ */
22
+ type?: 'user' | 'status';
23
+ /**
24
+ * Whether to show the remove icon or not. Clicking the remove icon will emit 'remove' event.
25
+ */
26
+ removable?: boolean;
27
+ }
28
+
29
+ /**
30
+ * Emits for Badge component
31
+ */
32
+ export type BadgeEmits = {
33
+ remove: [];
34
+ };
35
+
36
+ /**
37
+ * **TSVue V2 - Badge**
38
+ *
39
+ * _Badge is a component for displaying a text with optional remove functionality._
40
+ *
41
+ * --- ---
42
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
43
+ *
44
+ * @group components
45
+ */
46
+ declare const Badge: DefineComponent<BadgeProps, BadgeEmits>;
47
+
48
+ export default Badge;
@@ -0,0 +1,69 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { MenuItem } from '../../../../node_modules/primevue/menuitem';
3
+ import { TSVueIcons } from '../../../components/v2/icon/Icon.vue.d';
4
+
5
+ export type MenuOption = Omit<MenuItem, 'label', 'command', 'icon'> & {
6
+ label?: string;
7
+ /**
8
+ * Specify the severity of action to danger (red).
9
+ */
10
+ danger?: boolean;
11
+ /**
12
+ * Define the command to be executed when Apply button is clicked.
13
+ * __ __
14
+ * **NOTE**: _Add the command to do the real action, not sets the bulk action label_
15
+ *
16
+ * Changing bulk action label is already handled by the component it self.
17
+ * @returns void
18
+ */
19
+ command?: () => void;
20
+ /**
21
+ * The action icon.
22
+ */
23
+ icon?: TSVueIcons;
24
+ };
25
+
26
+ export interface ButtonBulkActionProps {
27
+ /**
28
+ * An array of data objects to be included in an action.
29
+ * Use as 'v-model:selectedDatas' to automatically reset on Cancel or Apply.
30
+ */
31
+ selectedDatas: Record<string, unknown>[];
32
+ options: MenuOption[];
33
+ /**
34
+ * Specify the name/label for selected data.
35
+ * @example 'Asset(s)' will be displayed as '3 Asset(s) Selected'
36
+ */
37
+ naming?: string;
38
+ }
39
+
40
+ export type ButtonBulkActionEmits = {
41
+ /**
42
+ * Emits when Apply button is clicked.
43
+ *
44
+ * By default 'command' on MenuOption will be executed.
45
+ * With this event, You can do additional actions.
46
+ */
47
+ 'apply': [];
48
+ /**
49
+ * Emits when Cancel or Apply button is clicked.
50
+ */
51
+ 'update:selectedDatas': [datas: Record<string, unknown>[]];
52
+ };
53
+
54
+ /**
55
+ * **TSVue V2 - ButtonBulkAction**
56
+ *
57
+ * _ButtonBulkAction is a component for handling bulk action for multiple data at once._
58
+ *
59
+ * --- ---
60
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
61
+ *
62
+ * @group buttons
63
+ */
64
+ declare const ButtonBulkAction: DefineComponent<
65
+ ButtonBulkActionProps,
66
+ ButtonBulkActionEmits
67
+ >;
68
+
69
+ export default ButtonBulkAction;
@@ -1,4 +1,4 @@
1
- import _sfc_main from "C:/Users/HP/Documents/Programming/Works/TS-CONSOLE-MFE-V2/tsv2-library/src/components/v2/icon/Icon.vue?vue&type=script&setup=true&lang.ts";
2
- export * from "C:/Users/HP/Documents/Programming/Works/TS-CONSOLE-MFE-V2/tsv2-library/src/components/v2/icon/Icon.vue?vue&type=script&setup=true&lang.ts";
3
- export default _sfc_main;
4
- //# sourceMappingURL=Icon.vue.d.ts.map
1
+ /**
2
+ * List of all available icons.
3
+ */
4
+ export type TSVueIcons = 'close' | 'arrow-down' | 'check';
@@ -0,0 +1,71 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ /**
4
+ * InputText component props
5
+ */
6
+ export interface InputTextProps {
7
+ /**
8
+ * String modelValue of the input.
9
+ */
10
+ modelValue?: string;
11
+ /**
12
+ * The input label. Tell the user what input is this.
13
+ */
14
+ label?: string;
15
+ /**
16
+ * Wether the input should be validated with vee-validator or not.
17
+ * If you use this component within form input, you need to set this props as true.
18
+ */
19
+ useValidator?: boolean;
20
+ /**
21
+ * This prop is required if you use this component in a form input.
22
+ * Specify the unique field name, match with your needs for API request.
23
+ *
24
+ * @default 'textInput'
25
+ */
26
+ fieldName?: string;
27
+ /**
28
+ * Wether this input field is required or not.
29
+ */
30
+ mandatory?: boolean;
31
+ /**
32
+ * Set custom validator message.
33
+ * It is rarely use, this component has handled the validator message.
34
+ */
35
+ validatorMessage?: string;
36
+ /**
37
+ * Specify the input placeholder.
38
+ *
39
+ * @default 'Enter {label}' or 'Enter {type}'
40
+ */
41
+ placeholder?: string;
42
+ /**
43
+ * Specify the validation type. Wether 'email' or 'text' validation.
44
+ */
45
+ type?: 'email' | 'text';
46
+ /**
47
+ * Disabled the input.
48
+ */
49
+ disabled?: boolean;
50
+ }
51
+
52
+ /**
53
+ * InputText component emits
54
+ */
55
+ export type InputTextEmits = {
56
+ 'update:modelValue': [payload?: string];
57
+ };
58
+
59
+ /**
60
+ * **TSVue - InputText**
61
+ *
62
+ * _Handle input text with form validation._
63
+ *
64
+ * --- ---
65
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
66
+ *
67
+ * @group form
68
+ */
69
+ declare const InputText: DefineComponent<InputTextProps, InputTextEmits>;
70
+
71
+ export default InputText;
package/dist/main.d.ts CHANGED
@@ -0,0 +1,3 @@
1
+ export * from './components/main'
2
+ import tsv2Library from './components/main'
3
+ export default tsv2Library