tsv2-library 1.0.65 → 1.1.0-dev-alpha.0

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 (93) hide show
  1. package/dist/no-data-fa-7f1ccd18.js +4 -0
  2. package/dist/src/build-entry.d.ts +7 -4
  3. package/dist/src/components/v2/Animation/Animation.vue.d.ts +1 -1
  4. package/dist/src/components/v2/AssetTable/AssetFilters.vue.d.ts +70 -0
  5. package/dist/src/components/v2/{AssetAttribute → AssetTable}/UrlFormat.vue.d.ts +6 -7
  6. package/dist/src/components/v2/AssetTable/columns/assetColumns.d.ts +7 -0
  7. package/dist/src/components/v2/AssetTable/helpers/assetFilters.d.ts +7 -0
  8. package/dist/src/components/v2/AssetTable/helpers/formatAssetData.d.ts +3 -0
  9. package/dist/src/components/v2/AssetTable/helpers/index.d.ts +2 -0
  10. package/dist/src/components/v2/AssetTable/store/assetTable.store.d.ts +16 -0
  11. package/dist/src/components/v2/AssetTable/store/index.d.ts +1 -0
  12. package/dist/src/components/v2/Calendar/Calendar.vue.d.ts +31 -0
  13. package/dist/src/components/v2/Calendar/CustomCalendar.vue.d.ts +12 -0
  14. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +1 -1
  15. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  16. package/dist/src/components/v2/DatePicker/DatePicker.vue.d.ts +23 -0
  17. package/dist/src/components/v2/DayOfYearPicker/DayOfYearPicker.vue.d.ts +97 -0
  18. package/dist/src/components/v2/DayPicker/DayPicker.vue.d.ts +23 -0
  19. package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +23 -3
  20. package/dist/src/components/v2/DialogDataLocked/DialogDataLocked.vue.d.ts +6 -0
  21. package/dist/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +1 -1
  22. package/dist/src/components/v2/DialogSelectAssetName/DialogSelectAssetName.vue.d.ts +75 -0
  23. package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +9 -1
  24. package/dist/src/components/v2/Dropdown/Dropdown.vue.d.ts +1 -0
  25. package/dist/src/components/v2/Image/Image.vue.d.ts +5 -0
  26. package/dist/src/components/v2/InputNumber/InputNumber.vue.d.ts +6 -0
  27. package/dist/src/components/v2/InputRangeNumber/InputRangeNumber.vue.d.ts +2 -2
  28. package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  29. package/dist/src/components/v2/MultiSelect/MultiSelect.vue.d.ts +4 -0
  30. package/dist/src/components/v2/Textarea/Textarea.vue.d.ts +5 -0
  31. package/dist/src/components/v2/index.d.ts +5 -3
  32. package/dist/src/dto/customField.dto.d.ts +9 -0
  33. package/dist/src/event-bus/index.d.ts +10 -3
  34. package/dist/src/presets/datepicker/index.js +13 -1
  35. package/dist/src/presets/dayofyearpicker/index.js +73 -0
  36. package/dist/src/presets/daypicker/index.js +14 -2
  37. package/dist/src/services/assetName.service.d.ts +8 -6
  38. package/dist/src/services/assets.service.d.ts +13 -13
  39. package/dist/src/services/damage.service.d.ts +1 -1
  40. package/dist/src/services/dataLock.service.d.ts +7 -0
  41. package/dist/src/services/globalSettings.service.d.ts +6 -0
  42. package/dist/src/services/missing.service.d.ts +1 -1
  43. package/dist/src/services/scanLog.service.d.ts +1 -1
  44. package/dist/src/services/settingsAttribute.service.d.ts +2 -0
  45. package/dist/src/services/tagQr.service.d.ts +1 -1
  46. package/dist/src/services/tagTransaction.service.d.ts +1 -1
  47. package/dist/src/services/tracking.service.d.ts +2 -2
  48. package/dist/src/services/transferTransaction.service.d.ts +1 -1
  49. package/dist/src/types/assets.type.d.ts +64 -1
  50. package/dist/src/types/globalSettings.type.d.ts +9 -0
  51. package/dist/src/types/settingsAttribute.type.d.ts +0 -14
  52. package/dist/src/utils/getVisibleColumns.util.d.ts +2 -0
  53. package/dist/src/utils/index.d.ts +3 -2
  54. package/dist/src/utils/role.util.d.ts +1 -1
  55. package/dist/src/utils/textFormater.util.d.ts +0 -2
  56. package/dist/style.css +1 -1
  57. package/dist/tsv2-library.es.js +58961 -57256
  58. package/dist/tsv2-library.umd.js +7 -7
  59. package/package.json +4 -3
  60. package/src/components/v2/Animation/Animation.vue.d.ts +1 -1
  61. package/src/components/v2/AssetTable/AssetFilters.vue.d.ts +70 -0
  62. package/src/components/v2/Calendar/Calendar.vue.d.ts +31 -0
  63. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +1 -1
  64. package/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  65. package/src/components/v2/DatePicker/DatePicker.vue.d.ts +23 -0
  66. package/src/components/v2/DayOfYearPicker/DayOfYearPicker.vue.d.ts +97 -0
  67. package/src/components/v2/DayPicker/DayPicker.vue.d.ts +23 -0
  68. package/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +1 -1
  69. package/src/components/v2/DialogSelectAssetName/DialogSelectAssetName.vue.d.ts +75 -0
  70. package/src/components/v2/Dropdown/Dropdown.vue.d.ts +1 -0
  71. package/src/components/v2/Image/Image.vue.d.ts +5 -0
  72. package/src/components/v2/InputNumber/InputNumber.vue.d.ts +6 -0
  73. package/src/components/v2/InputRangeNumber/InputRangeNumber.vue.d.ts +2 -2
  74. package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  75. package/src/components/v2/MultiSelect/MultiSelect.vue.d.ts +4 -0
  76. package/src/components/v2/Textarea/Textarea.vue.d.ts +5 -0
  77. package/src/module.d.ts +3 -0
  78. package/src/presets/datepicker/index.js +13 -1
  79. package/src/presets/dayofyearpicker/index.js +73 -0
  80. package/src/presets/daypicker/index.js +14 -2
  81. package/src/services/assetDamage.service.ts +1 -1
  82. package/src/services/assetName.service.ts +10 -0
  83. package/src/services/column.service.ts +2 -2
  84. package/src/services/dataLock.service.ts +33 -0
  85. package/src/services/globalSettings.service.ts +33 -0
  86. package/src/services/settingsAttribute.service.ts +13 -0
  87. package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +0 -59
  88. package/dist/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +0 -20
  89. package/dist/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +0 -17
  90. package/dist/src/store/assetAttribute.store.d.ts +0 -12
  91. package/dist/src/store/index.d.ts +0 -1
  92. package/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +0 -20
  93. package/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +0 -17
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
3
  "author": "fixedassetv2-fe",
4
- "version": "1.0.65",
4
+ "version": "1.1.0-dev-alpha.0",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
7
7
  "repository": {
@@ -25,6 +25,7 @@
25
25
  "scripts": {
26
26
  "dev": "vite",
27
27
  "build": "rimraf dist && vue-tsc && vite build && sh ./src/scripts/postbuild.sh",
28
+ "build:dev-alpha": "npm run build && npm link && npm publish --tag dev-alpha",
28
29
  "build:dev": "npm run build && npm link && npm publish --tag alpha",
29
30
  "build:stage": "npm run build && npm link && npm publish --tag beta",
30
31
  "build:prod": "npm run build && npm link && npm publish",
@@ -44,7 +45,7 @@
44
45
  "@types/google.maps": "^3.58.1",
45
46
  "@types/lodash": "^4.17.7",
46
47
  "@vueuse/core": "^10.7.2",
47
- "axios": "^1.3.4",
48
+ "axios": "1.14.0",
48
49
  "base64toblob": "^0.0.2",
49
50
  "debounce": "^2.1.0",
50
51
  "idb": "^8.0.0",
@@ -145,4 +146,4 @@
145
146
  }
146
147
  },
147
148
  "types": "./dist/main.d.ts"
148
- }
149
+ }
@@ -7,7 +7,7 @@ export interface AnimationDefaultConfig {
7
7
  }
8
8
 
9
9
  export interface AnimationProps {
10
- animation: 'loading-table-fa';
10
+ animation: 'loading-table-fa' | 'no-data-fa';
11
11
  /**
12
12
  * @default true
13
13
  */
@@ -0,0 +1,70 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { FilterField } from '@/types/filterField.type';
3
+ import { QueryParams } from '../DataTable/DataTable.vue.d';
4
+
5
+ export type AssetFilterFields =
6
+ | 'name'
7
+ | 'assetValue'
8
+ | 'category'
9
+ | 'brand'
10
+ | 'model'
11
+ | 'tagType'
12
+ | 'group'
13
+ | 'maintenanceAuditStatus'
14
+ | 'isTransactionable'
15
+ | 'measurement'
16
+ | 'lastScannedAt'
17
+ | 'warrantyStatus'
18
+ | 'customField';
19
+
20
+ export interface AssetFilterQuery extends QueryParams {
21
+ name?: string[];
22
+ brand?: string[];
23
+ model?: string[];
24
+ tagType?: string[];
25
+ maintenanceAuditStatus?: string[];
26
+ isTransactionable?: boolean[];
27
+ audit?: string[];
28
+ maintenance?: string[];
29
+ measurement?: string[];
30
+ warrantyStatus?: string[];
31
+ category?: string[];
32
+ group?: string[];
33
+ lastScannedAt?: number[];
34
+ linkedAssetCount?: number[];
35
+ }
36
+
37
+ export interface AssetFilterProps {
38
+ /**
39
+ * The filter object.
40
+ */
41
+ filter: AssetFilterQuery;
42
+ /*
43
+ * The columns set as visible by the user. Used to determine which filters to show.
44
+ */
45
+ visibleColumns: Record<string, boolean> | undefined;
46
+ /*
47
+ * The name of the table attached to the filter.
48
+ */
49
+ tableName: string;
50
+ fetchOptions: FilterField<QueryParams>['fetchOptionFn'];
51
+ /*
52
+ * The list of filter fields to show.
53
+ */
54
+ showFields?: AssetFilterFields[];
55
+ /*
56
+ * The list of filter fields to hide. This has a higher priority than `showFields`.
57
+ */
58
+ hideFields?: AssetFilterFields[];
59
+ }
60
+
61
+ export type AssetFilterEmits = {
62
+ /*
63
+ * Used to update the filter container's key.
64
+ */
65
+ updateFields: [];
66
+ };
67
+
68
+ declare const AssetFilters: DefineComponent<AssetFilterProps, AssetFilterEmits>;
69
+
70
+ export default AssetFilters;
@@ -22,6 +22,12 @@ export interface TSCalendarProps {
22
22
  * Whether single date or date range model value.
23
23
  */
24
24
  mode?: 'range' | 'single';
25
+ /**
26
+ * In range selection mode, if the same date is chosen twice,
27
+ * set whether it should be shown as separate dates ("date 1" - "date 1") or not ("date 1").
28
+ * @default true
29
+ */
30
+ separateSameDate?: boolean;
25
31
  /**
26
32
  * Set the end date to 23.59.59
27
33
  *
@@ -71,6 +77,31 @@ export interface TSCalendarProps {
71
77
  * By default each field has preserved with its validator message, you don't need to worrying about the message.
72
78
  */
73
79
  validatorMessage?: string;
80
+ /**
81
+ * Validate value while the overlay is shown. This function is run on clicking the overlay's Apply button.
82
+ *
83
+ * @returns {boolean} - Return true if the value is valid.
84
+ */
85
+ overlayValidatorFunction?: (
86
+ value?: number | number[],
87
+ ) => Promise<boolean> | boolean;
88
+ /**
89
+ * Set the custom validator message to show on the overlay.
90
+ * Used alongside overlayValidatorFunction.
91
+ */
92
+ overlayValidatorMessage?: string;
93
+ /**
94
+ * Condition to show the date picker message.
95
+ *
96
+ * @returns {boolean} - Return true if the value is valid.
97
+ */
98
+ datePickerMessageFunction?: (
99
+ value?: number | number[],
100
+ ) => Promise<boolean> | boolean;
101
+ /**
102
+ * Set a message to be shown below the date picker.
103
+ */
104
+ datePickerMessage?: string;
74
105
  /**
75
106
  * Set custom validation message for certain condition
76
107
  */
@@ -6,7 +6,7 @@ export type DragableColumn = TableColumn & { order?: number };
6
6
  export interface DataTableColumnConfig {
7
7
  field: string;
8
8
  pinned: boolean;
9
- width: number | string;
9
+ width?: number | string;
10
10
  visible: boolean;
11
11
  }
12
12
 
@@ -302,6 +302,11 @@ export interface DataTableSelectAllChangeEvent {
302
302
  }
303
303
 
304
304
  export interface TSDataTableProps {
305
+ /**
306
+ * Index of the first row to be displayed.
307
+ * @defaultValue 0
308
+ */
309
+ first?: number;
305
310
  /**
306
311
  * Optional property to set a unique name for the table. This name will be used as part of the unique table ID.
307
312
  *
@@ -553,6 +558,16 @@ export type TSDataTableEmits = {
553
558
  * This will update the `selectedData` value whenever a row is selected or deselected.
554
559
  */
555
560
  'update:selectedData': [datas: Data[]];
561
+ /**
562
+ * Emitted when the rows changes.
563
+ * @param {number} value - New value.
564
+ */
565
+ 'update:rows': [value: number];
566
+ /**
567
+ * Emitted when the first changes.
568
+ * @param {number} value - New value.
569
+ */
570
+ 'update:first': [value: number];
556
571
  };
557
572
 
558
573
  declare class DataTable extends ClassComponent<
@@ -38,6 +38,27 @@ export interface TSDatePickerProps {
38
38
  * By default each field has preserved with its validator message, you don't need to worrying about the message.
39
39
  */
40
40
  errorMessage?: { empty: string };
41
+ /**
42
+ * Whether multiple date or date range model value.
43
+ *
44
+ * @default 'range'
45
+ */
46
+ selectionMode?: 'range' | 'multiple';
47
+ /**
48
+ * Validate value while the overlay is shown. This function is run on clicking the dates in the overlay.
49
+ *
50
+ * @returns {boolean} - Return true if the value is valid.
51
+ */
52
+ overlayValidatorFunction?: (value?: number[]) => Promise<boolean> | boolean;
53
+ /**
54
+ * Set the custom validator message to show on the overlay.
55
+ * Used alongside overlayValidatorFunction.
56
+ */
57
+ overlayValidatorMessage?: string;
58
+ /**
59
+ * Set a message to be shown on top of the overlay.
60
+ */
61
+ overlayMessage?: string;
41
62
  }
42
63
 
43
64
  /**
@@ -45,6 +66,8 @@ export interface TSDatePickerProps {
45
66
  */
46
67
  export type TSDatePickerEmits = {
47
68
  'update:modelValue': [days?: number[]];
69
+ // Emits when overlay is hidden
70
+ 'hide': [];
48
71
  };
49
72
 
50
73
  /**
@@ -0,0 +1,97 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ /**
4
+ * TSDayOfYearPicker component props
5
+ */
6
+ export interface TSDayOfYearPickerProps {
7
+ /**
8
+ * TSDayOfYearPicker modelValue is array of timestamps
9
+ */
10
+ modelValue?: number[];
11
+ /**
12
+ * TSDayOfYearPicker initialValue is array of timestamps
13
+ */
14
+ initialValue?: number[];
15
+ /**
16
+ * Array of timestamps representing dates that cannot be selected
17
+ * @default []
18
+ */
19
+ disabledDates?: number[];
20
+ /**
21
+ * Display label on top of Date Input.
22
+ */
23
+ label?: string;
24
+ /**
25
+ * Enable Validator using vee-validate. Combine with TSForm that handle form validation.
26
+ */
27
+ useValidator?: boolean;
28
+ /**
29
+ * When used as field in From Validation using TSForm,
30
+ * specify the unique field name, match with your needs for API request.
31
+ */
32
+ fieldName?: string;
33
+ /**
34
+ * Whether this field should be filled or not.
35
+ */
36
+ mandatory?: boolean;
37
+ /**
38
+ * Sets the invalid state.
39
+ */
40
+ invalid?: boolean;
41
+ /**
42
+ * Set the custom validator message.
43
+ * By default each field has preserved with its validator message, you don't need to worrying about the message.
44
+ */
45
+ errorMessage?: { empty: string };
46
+ /**
47
+ * Year to display (defaults to 2024 due to leap year requirement)
48
+ */
49
+ year?: number;
50
+ /**
51
+ * Validate value while the overlay is shown. This function is run on clicking the dates in the overlay.
52
+ *
53
+ * @returns {boolean} - Return true if the value is valid.
54
+ */
55
+ overlayValidatorFunction?: (value?: number[]) => Promise<boolean> | boolean;
56
+ /**
57
+ * Set the custom validator message to show on the overlay.
58
+ * Used alongside overlayValidatorFunction.
59
+ */
60
+ overlayValidatorMessage?: string;
61
+ /**
62
+ * Set a message to be shown on top of the overlay.
63
+ */
64
+ overlayMessage?: string;
65
+ /**
66
+ * In range selection mode, if the same date is chosen twice,
67
+ * set whether it should be shown as separate dates ("date 1" - "date 1") or not ("date 1").
68
+ * @default true
69
+ */
70
+ separateSameDate?: boolean;
71
+ }
72
+
73
+ /**
74
+ * TSDayOfYearPicker component emits
75
+ */
76
+ export type TSDayOfYearPickerEmits = {
77
+ 'update:modelValue': [days?: number[]];
78
+ // Emits when overlay is hidden
79
+ 'hide': [];
80
+ };
81
+
82
+ /**
83
+ * **TSVue - TSDayOfYearPicker**
84
+ *
85
+ * _Handle input day with form validation._
86
+ *
87
+ * --- ---
88
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
89
+ *
90
+ * @group form
91
+ */
92
+ declare const TSDayOfYearPicker: DefineComponent<
93
+ TSDayOfYearPickerProps,
94
+ TSDayOfYearPickerEmits
95
+ >;
96
+
97
+ export default TSDayOfYearPicker;
@@ -38,6 +38,27 @@ export interface TSDayPickerProps {
38
38
  * By default each field has preserved with its validator message, you don't need to worrying about the message.
39
39
  */
40
40
  errorMessage?: { empty: string };
41
+ /**
42
+ * Whether multiple date or date range model value.
43
+ *
44
+ * @default 'range'
45
+ */
46
+ selectionMode?: 'range' | 'multiple';
47
+ /**
48
+ * Validate value while the overlay is shown. This function is run on clicking the days in the overlay.
49
+ *
50
+ * @returns {boolean} - Return true if the value is valid.
51
+ */
52
+ overlayValidatorFunction?: (value?: number[]) => Promise<boolean> | boolean;
53
+ /**
54
+ * Set the custom validator message to show on the overlay.
55
+ * Used alongside overlayValidatorFunction.
56
+ */
57
+ overlayValidatorMessage?: string;
58
+ /**
59
+ * Set a message to be shown on top of the overlay.
60
+ */
61
+ overlayMessage?: string;
41
62
  }
42
63
 
43
64
  /**
@@ -45,6 +66,8 @@ export interface TSDayPickerProps {
45
66
  */
46
67
  export type TSDayPickerEmits = {
47
68
  'update:modelValue': [days?: number[]];
69
+ // Emits when overlay is hidden
70
+ 'hide': [];
48
71
  };
49
72
 
50
73
  /**
@@ -7,7 +7,7 @@ export interface DialogSelectAssetFilterModels {
7
7
  brands?: string[];
8
8
  models?: string[];
9
9
  tagType?: string[];
10
- group?: number[];
10
+ group?: string[];
11
11
  }
12
12
 
13
13
  export type AssetStatus =
@@ -0,0 +1,75 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export type DialogSelectAssetNameFilter = {
4
+ category?: string[];
5
+ };
6
+
7
+ export type DialogSelectAssetNameFilterQueryParams = Partial<
8
+ Record<keyof DialogSelectAssetNameFilter, string>
9
+ >;
10
+
11
+ export type FetchResponse = {
12
+ data: Data[];
13
+ totalRecords: number;
14
+ };
15
+
16
+ export interface AssetName {
17
+ _id: string;
18
+ name: string;
19
+ code: string;
20
+ aliasCode: string;
21
+ category: Category;
22
+ addOn: AddOn;
23
+ tagType: string;
24
+ brands: Category[];
25
+ models: Model[];
26
+ measurement: string;
27
+ totalAssets: number;
28
+ hasPairedAsset: boolean;
29
+ brandsLength: number;
30
+ modelsLength: number;
31
+ depreciationGroupsLength: number;
32
+ accountCode?: string;
33
+ updatedAt: string;
34
+ }
35
+
36
+ export type AssetNamePayload = Pick<AssetName, '_id' | 'name'>;
37
+
38
+ interface Model {
39
+ _id: string;
40
+ name: string;
41
+ brand: string;
42
+ category: string;
43
+ }
44
+
45
+ interface AddOn {
46
+ maintenance: boolean;
47
+ repairTicketing: boolean;
48
+ tracking: boolean;
49
+ assetControl: boolean;
50
+ audit: boolean;
51
+ map: boolean;
52
+ }
53
+
54
+ interface Category {
55
+ _id: string;
56
+ name: string;
57
+ }
58
+
59
+ export interface DialogSelectAssetNameProps {
60
+ visible?: boolean;
61
+ selectedAssetNames?: AssetNamePayload[];
62
+ // This prop is used only for CustomField
63
+ customFieldType?: 'General Information' | 'Purchase' | 'Accounting';
64
+ }
65
+
66
+ export type DialogSelectAssetNameEmit = {
67
+ select: [payload: AssetNamePayload[]];
68
+ };
69
+
70
+ declare const DialogSelectAssetName: DefineComponent<
71
+ DialogSelectAssetNameProps,
72
+ DialogSelectAssetNameEmit
73
+ >;
74
+
75
+ export default DialogSelectAssetName;
@@ -109,6 +109,7 @@ export interface DropdownProps {
109
109
  }
110
110
 
111
111
  export interface DropdownSlots {
112
+ 'value': Slot<{ value: OptionValue }>;
112
113
  'option': Slot<{ option: DropdownOption }>;
113
114
  'addon-left': Slot;
114
115
  'addon-right': Slot;
@@ -260,6 +260,11 @@ export interface ImageProps {
260
260
  * @defaultValue false
261
261
  */
262
262
  unstyled?: boolean;
263
+ /**
264
+ * Determines the thumbnail's width and height in pixels.
265
+ */
266
+ thumbnailWidth?: number;
267
+ thumbnailHeight?: number;
263
268
  }
264
269
 
265
270
  /**
@@ -69,6 +69,12 @@ export interface InputNumberProps {
69
69
  * @default true;
70
70
  */
71
71
  showValidatorMessage?: boolean;
72
+ /**
73
+ * Wether to format the message
74
+ *
75
+ * @default true
76
+ */
77
+ formatValidatorMessage?: boolean;
72
78
  /**
73
79
  * Specify the input placeholder.
74
80
  *
@@ -7,7 +7,7 @@ export interface InputRangeNumberProps {
7
7
  /**
8
8
  * Number modelValue of the input.
9
9
  */
10
- modelValue?: number[];
10
+ modelValue?: (number | null)[];
11
11
  /**
12
12
  * The input label. Tell the user what input is this.
13
13
  */
@@ -43,7 +43,7 @@ export type InputRangeNumberEmits = {
43
43
  /**
44
44
  * Emits when the both input already filled.
45
45
  */
46
- 'update:modelValue': [payload?: number[]];
46
+ 'update:modelValue': [payload?: (number | null)[]];
47
47
  };
48
48
 
49
49
  /**
@@ -66,6 +66,12 @@ export interface InputTextProps {
66
66
  * Classes for validator message in input field.
67
67
  */
68
68
  validatorMessageClass?: string;
69
+ /**
70
+ * Wether to format the message
71
+ *
72
+ * @default true
73
+ */
74
+ formatValidatorMessage?: boolean;
69
75
  /**
70
76
  * Specify the input placeholder.
71
77
  *
@@ -108,6 +108,10 @@ export interface MultiSelectProps {
108
108
  * Decides how many selected item labels to show at most.
109
109
  */
110
110
  maxSelectedLabels?: number;
111
+ /**
112
+ * Set custom invalid state.
113
+ */
114
+ invalid?: boolean;
111
115
  }
112
116
 
113
117
  /**
@@ -102,6 +102,10 @@ export interface TextareaProps
102
102
  * @default unlimited
103
103
  */
104
104
  maxLength?: number;
105
+ /**
106
+ * Auto blur while input value has reached the max length.
107
+ */
108
+ blurOnReachMax?: boolean;
105
109
  invalid?: boolean;
106
110
  customValidation?: CustomValidation;
107
111
  inputClass?: string;
@@ -129,6 +133,7 @@ export type TextareaEmits = {
129
133
  */
130
134
  'update:modelValue': [value: Nullable<string>];
131
135
  'blur': [value?: Nullable<string>];
136
+ 'input': [value?: Nullable<string>];
132
137
  };
133
138
 
134
139
  /**
package/src/module.d.ts CHANGED
@@ -12,4 +12,7 @@ declare module 'qrcode' {
12
12
  interface Window {
13
13
  scannerWorker: Worker;
14
14
  toastGroups: string[] | undefined;
15
+ __wdio?: boolean;
16
+ __e2eMockScanCode__?: string;
17
+ __e2eMockSerialNumber__?: string;
15
18
  }
@@ -16,7 +16,11 @@ export default {
16
16
  },
17
17
 
18
18
  panelcontent: {
19
- class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)] p-6'],
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)]'],
20
24
  },
21
25
 
22
26
  date: {
@@ -36,4 +40,12 @@ export default {
36
40
  'text-center p-2 cursor-pointer',
37
41
  ],
38
42
  },
43
+
44
+ overlaymessage: {
45
+ class: 'self-start text-xs font-medium',
46
+ },
47
+
48
+ validatormessage: {
49
+ class: 'self-start',
50
+ },
39
51
  };
@@ -0,0 +1,73 @@
1
+ export default {
2
+ inputgroup: {
3
+ class: ['grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1'],
4
+ },
5
+
6
+ inputtext: {
7
+ class: ['!p-0'],
8
+ },
9
+
10
+ inputtrigger: {
11
+ class: ['w-4 h-4 shrink-0 !text-general-500'],
12
+ },
13
+
14
+ panel: {
15
+ class: ['border-none !mt-0 !shadow-panel'],
16
+ },
17
+
18
+ panelcontent: {
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)]'],
24
+ },
25
+
26
+ header: {
27
+ class: 'flex items-center justify-between',
28
+ },
29
+
30
+ title: {
31
+ class: 'text-xs font-medium',
32
+ },
33
+
34
+ previousButton: {
35
+ class:
36
+ 'relative inline-flex items-center justify-center p-1.5 m-0 text-general-800 dark:text-general-950 border-0 rounded-full bg-transparent hover:bg-general-50 dark:hover:bg-general-300 cursor-pointer overflow-hidden',
37
+ },
38
+
39
+ nextButton: {
40
+ class:
41
+ 'relative inline-flex items-center justify-center p-1.5 m-0 text-general-800 dark:text-general-950 border-0 rounded-full bg-transparent hover:bg-general-50 dark:hover:bg-general-300 cursor-pointer overflow-hidden',
42
+ },
43
+
44
+ date: {
45
+ class: [
46
+ 'text-body-medium text-general-800',
47
+ 'bg-white hover:bg-primary-100',
48
+ 'rounded-[20px]',
49
+ // In range selection
50
+ '[&[data-in-range="true"]]:bg-primary-200',
51
+ '[&[data-in-range="true"]]:text-general-800',
52
+ '[&[data-in-range="true"]]:rounded-[0]',
53
+
54
+ // Selected State
55
+ '[&[aria-selected="true"]]:bg-primary-500',
56
+ '[&[aria-selected="true"]]:text-white',
57
+
58
+ // Disabled State
59
+ '[&[aria-disabled="true"]]:cursor-default',
60
+ '[&[aria-disabled="true"]]:opacity-40',
61
+
62
+ 'text-center p-2 cursor-pointer',
63
+ ],
64
+ },
65
+
66
+ overlaymessage: {
67
+ class: 'self-start text-xs font-medium',
68
+ },
69
+
70
+ validatormessage: {
71
+ class: 'self-start',
72
+ },
73
+ };
@@ -16,7 +16,11 @@ export default {
16
16
  },
17
17
 
18
18
  panelcontent: {
19
- class: ['grid grid-cols-3 grid-rows-[repeat(3,max-content)] p-6 gap-y-4'],
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-3 grid-rows-[repeat(3,max-content)] gap-y-4'],
20
24
  },
21
25
 
22
26
  day: {
@@ -32,7 +36,15 @@ export default {
32
36
  '[&[aria-selected="true"]]:text-white',
33
37
  '[&[aria-selected="true"]]:rounded-[20px]',
34
38
 
35
- 'last:col-span-3 text-center p-2 cursor-pointer',
39
+ 'last:col-span-3 text-center py-2 cursor-pointer',
36
40
  ],
37
41
  },
42
+
43
+ overlaymessage: {
44
+ class: 'self-start text-xs font-medium',
45
+ },
46
+
47
+ validatormessage: {
48
+ class: 'self-start',
49
+ },
38
50
  };