@knime/kds-components 7.2.3 → 8.0.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.
@@ -1,7 +1,7 @@
1
1
  import { KdsFormFieldExpose } from '../types';
2
- import { KdsFileSelectorValidationReason } from './types';
2
+ import { KdsFileSelectorRejectedFile } from './types';
3
3
  type __VLS_ModelProps = {
4
- modelValue?: File | null;
4
+ modelValue?: File[];
5
5
  };
6
6
  declare const __VLS_export: import('vue').DefineComponent<({
7
7
  description?: string;
@@ -17,6 +17,7 @@ declare const __VLS_export: import('vue').DefineComponent<({
17
17
  preserveSubTextSpace?: boolean | undefined;
18
18
  } & {
19
19
  disabled?: boolean;
20
+ multiple?: boolean;
20
21
  accept?: string;
21
22
  maxSizeBytes?: number;
22
23
  invalidTypeMessage?: string;
@@ -38,6 +39,7 @@ declare const __VLS_export: import('vue').DefineComponent<({
38
39
  preserveSubTextSpace?: boolean | undefined;
39
40
  } & {
40
41
  disabled?: boolean;
42
+ multiple?: boolean;
41
43
  accept?: string;
42
44
  maxSizeBytes?: number;
43
45
  invalidTypeMessage?: string;
@@ -46,10 +48,9 @@ declare const __VLS_export: import('vue').DefineComponent<({
46
48
  emptyText?: string;
47
49
  clearLabel?: string;
48
50
  } & __VLS_ModelProps), KdsFormFieldExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
49
- "update:modelValue": (value: File | null) => any;
51
+ "update:modelValue": (value: File[]) => any;
50
52
  "validation-error": (payload: {
51
- file: File;
52
- reason: KdsFileSelectorValidationReason;
53
+ files: KdsFileSelectorRejectedFile[];
53
54
  }) => any;
54
55
  }, string, import('vue').PublicProps, Readonly<({
55
56
  description?: string;
@@ -65,6 +66,7 @@ declare const __VLS_export: import('vue').DefineComponent<({
65
66
  preserveSubTextSpace?: boolean | undefined;
66
67
  } & {
67
68
  disabled?: boolean;
69
+ multiple?: boolean;
68
70
  accept?: string;
69
71
  maxSizeBytes?: number;
70
72
  invalidTypeMessage?: string;
@@ -86,6 +88,7 @@ declare const __VLS_export: import('vue').DefineComponent<({
86
88
  preserveSubTextSpace?: boolean | undefined;
87
89
  } & {
88
90
  disabled?: boolean;
91
+ multiple?: boolean;
89
92
  accept?: string;
90
93
  maxSizeBytes?: number;
91
94
  invalidTypeMessage?: string;
@@ -94,10 +97,9 @@ declare const __VLS_export: import('vue').DefineComponent<({
94
97
  emptyText?: string;
95
98
  clearLabel?: string;
96
99
  } & __VLS_ModelProps)> & Readonly<{
97
- "onUpdate:modelValue"?: ((value: File | null) => any) | undefined;
100
+ "onUpdate:modelValue"?: ((value: File[]) => any) | undefined;
98
101
  "onValidation-error"?: ((payload: {
99
- file: File;
100
- reason: KdsFileSelectorValidationReason;
102
+ files: KdsFileSelectorRejectedFile[];
101
103
  }) => any) | undefined;
102
104
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
103
105
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"KdsFileSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/FileSelector/KdsFileSelector.vue"],"names":[],"mappings":"AAyQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,KAAK,EAGV,+BAA+B,EAChC,MAAM,SAAS,CAAC;AA8JjB,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAyKF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"KdsFileSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/FileSelector/KdsFileSelector.vue"],"names":[],"mappings":"AAySA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,KAAK,EAGV,2BAA2B,EAE5B,MAAM,SAAS,CAAC;AAwLjB,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;CACnB,CAAC;AAqLF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,22 +1,30 @@
1
1
  import { KdsFormFieldProps } from '../types';
2
2
  export type KdsFileSelectorValidationReason = "type" | "size";
3
+ export type KdsFileSelectorRejectedFile = {
4
+ file: File;
5
+ reason: KdsFileSelectorValidationReason;
6
+ };
3
7
  export type KdsFileSelectorEmits = {
4
8
  /**
5
- * Fired when a selected file fails validation. The file is rejected and
6
- * the model value stays `null`.
9
+ * Fired once per pick when the picked files fail validation. The whole
10
+ * selection is rejected, the model value stays empty, and `files` lists
11
+ * every invalid file with the reason it was rejected.
7
12
  */
8
- "validation-error": [
9
- payload: {
10
- file: File;
11
- reason: KdsFileSelectorValidationReason;
12
- }
13
- ];
13
+ "validation-error": [payload: {
14
+ files: KdsFileSelectorRejectedFile[];
15
+ }];
14
16
  };
15
17
  export type KdsFileSelectorProps = KdsFormFieldProps & {
16
18
  /**
17
19
  * Whether the file selector is disabled and non-interactive.
18
20
  */
19
21
  disabled?: boolean;
22
+ /**
23
+ * Whether more than one file can be picked at once. The selected names are
24
+ * then shown as a comma-separated list, and each pick replaces the previous
25
+ * selection instead of adding to it.
26
+ */
27
+ multiple?: boolean;
20
28
  /**
21
29
  * File types the user can pick, passed to the underlying `<input type="file">`.
22
30
  * Accepts MIME types (`image/*`) or extensions (`.csv,.xlsx`). The value is
@@ -40,14 +48,17 @@ export type KdsFileSelectorProps = KdsFormFieldProps & {
40
48
  invalidSizeMessage?: string;
41
49
  /**
42
50
  * Text for the button that opens the file dialog.
51
+ * @default "Select file" ("Select files" with `multiple`)
43
52
  */
44
53
  selectLabel?: string;
45
54
  /**
46
55
  * Text shown next to the button when no file is selected.
56
+ * @default "No file selected" ("No files selected" with `multiple`)
47
57
  */
48
58
  emptyText?: string;
49
59
  /**
50
60
  * Accessible label for the clear (trash) button shown when a file is selected.
61
+ * @default "Remove file" ("Remove files" with `multiple`)
51
62
  */
52
63
  clearLabel?: string;
53
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/FileSelector/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,kBAAkB,EAAE;QAClB,OAAO,EAAE;YAAE,IAAI,EAAE,IAAI,CAAC;YAAC,MAAM,EAAE,+BAA+B,CAAA;SAAE;KACjE,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/FileSelector/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,2BAA2B,EAAE,CAAA;KAAE,CAAC,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/kds-components",
3
- "version": "7.2.3",
3
+ "version": "8.0.0",
4
4
  "description": "Package containing basic Vue components of the KNIME Design System",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "consola": "^3.4.2",
39
39
  "motion": "^12.42.2",
40
40
  "temporal-polyfill": "^1.0.1",
41
- "@knime/kds-styles": "^7.2.3",
41
+ "@knime/kds-styles": "^8.0.0",
42
42
  "@knime/utils": "^2.0.2"
43
43
  },
44
44
  "devDependencies": {
@@ -57,8 +57,8 @@
57
57
  "vite-svg-loader": "^5.1.1",
58
58
  "vue": "3.5.40",
59
59
  "vue-tsc": "^3.3.8",
60
- "@knime/kds-code-editor": "^7.2.3",
61
- "@knime/kds-table": "^7.2.3"
60
+ "@knime/kds-table": "^8.0.0",
61
+ "@knime/kds-code-editor": "^8.0.0"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=24"