@updog/data-editor-wc 0.1.46 → 0.1.48
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.
- package/index.css +1 -1
- package/index.d.ts +31 -1
- package/index.js +5709 -5215
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -496,6 +496,9 @@ declare var export_default = {
|
|
|
496
496
|
createOptionNamePlaceholder: "Enter option name",
|
|
497
497
|
createOptionNameTaken: "This option already exists",
|
|
498
498
|
createOptionSubmit: "Create",
|
|
499
|
+
reapplySeparator: "Reset to auto-detected separator",
|
|
500
|
+
separator: "Separator",
|
|
501
|
+
separatedBy: "Values separated by",
|
|
499
502
|
},
|
|
500
503
|
primaryKey: {
|
|
501
504
|
none: "No primary key",
|
|
@@ -687,6 +690,16 @@ type SelectEditorCell = {
|
|
|
687
690
|
*/
|
|
688
691
|
enableCustomValue?: boolean;
|
|
689
692
|
};
|
|
693
|
+
/** Multi-select cell. The user picks zero or more options; stored value is `string[]`. */
|
|
694
|
+
type MultiSelectEditorCell = {
|
|
695
|
+
type: "multiselect";
|
|
696
|
+
/** Options shown in the dropdown. Each string is both stored value and label. */
|
|
697
|
+
options: string[];
|
|
698
|
+
/** Let users add options via "Create option". Defaults to true. */
|
|
699
|
+
enableCustomValue?: boolean;
|
|
700
|
+
/** Splits a raw imported cell and joins on export. Omitted: import auto-detects, export joins with `", "`. */
|
|
701
|
+
delimiter?: string;
|
|
702
|
+
};
|
|
690
703
|
/** Number input cell with locale-aware formatting. */
|
|
691
704
|
type NumberEditorCell = {
|
|
692
705
|
type: "number";
|
|
@@ -705,9 +718,10 @@ type NumberEditorCell = {
|
|
|
705
718
|
* - `"text"` — plain text input (default).
|
|
706
719
|
* - `"date"` — date picker with optional min/max bounds.
|
|
707
720
|
* - `"select"` — dropdown with a fixed list of options.
|
|
721
|
+
* - `"multiselect"` — dropdown allowing zero or more options; stored as `string[]`.
|
|
708
722
|
* - `"number"` — number input with locale-aware formatting.
|
|
709
723
|
*/
|
|
710
|
-
type CellEditor = TextEditorCell | DateEditorCell | SelectEditorCell | NumberEditorCell;
|
|
724
|
+
type CellEditor = TextEditorCell | DateEditorCell | SelectEditorCell | MultiSelectEditorCell | NumberEditorCell;
|
|
711
725
|
/** Dropdown filter shown in the sidebar Filters panel. */
|
|
712
726
|
type SelectColumnFilter = {
|
|
713
727
|
type: "select";
|
|
@@ -1031,6 +1045,16 @@ type DataEditorSourceResult<TRow extends DataEditorRow = DataEditorRow> = {
|
|
|
1031
1045
|
* }}
|
|
1032
1046
|
* ```
|
|
1033
1047
|
*/
|
|
1048
|
+
/** A user-confirmed import mapping: `source` (imported) → `target` (canonical). */
|
|
1049
|
+
type LearnedSynonym = {
|
|
1050
|
+
source: string;
|
|
1051
|
+
target: string;
|
|
1052
|
+
};
|
|
1053
|
+
/** User-confirmed import mappings, split by where they were matched. */
|
|
1054
|
+
type LearnedSynonyms = {
|
|
1055
|
+
columns: LearnedSynonym[];
|
|
1056
|
+
values: LearnedSynonym[];
|
|
1057
|
+
};
|
|
1034
1058
|
type DataEditorResult<TRow extends DataEditorRow = DataEditorRow> = {
|
|
1035
1059
|
sources: DataEditorSourceResult<TRow>[];
|
|
1036
1060
|
counts: {
|
|
@@ -1039,6 +1063,12 @@ type DataEditorResult<TRow extends DataEditorRow = DataEditorRow> = {
|
|
|
1039
1063
|
deleted: number;
|
|
1040
1064
|
invalid: number;
|
|
1041
1065
|
};
|
|
1066
|
+
/**
|
|
1067
|
+
* Import mappings the user confirmed that weren't already known, split into
|
|
1068
|
+
* `columns` and `values`. Persist and feed back through `synonyms` so repeat
|
|
1069
|
+
* imports auto-match. Each list is `[]` when nothing new was learned.
|
|
1070
|
+
*/
|
|
1071
|
+
learnedSynonyms: LearnedSynonyms;
|
|
1042
1072
|
};
|
|
1043
1073
|
/**
|
|
1044
1074
|
* Describes the change state of a single row within a chunk, used to seed
|