@updog/data-editor-wc 0.1.84 → 0.1.86

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 (3) hide show
  1. package/index.d.ts +16 -2
  2. package/index.js +11126 -10580
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -492,6 +492,7 @@ declare var export_default = {
492
492
  matchColumns: {
493
493
  allMatched: "All columns are matched",
494
494
  banner: "Some columns could not be automatically matched",
495
+ changeHeaderRow: "Change header row",
495
496
  importedColumns: "Imported columns",
496
497
  matchedCount: "{{matched}}/{{total}} matched",
497
498
  targetColumns: "Target columns",
@@ -768,8 +769,21 @@ type DataEditorColumn = {
768
769
  /** Format the display value without changing stored data. E.g. add `$` prefix. */
769
770
  formatter?: (value: string) => string;
770
771
  /**
771
- * Transform a value before it enters the store. Runs when rows are uploaded
772
- * to the data editor.
772
+ * Transform a value on its way into the store. Runs on every value arriving
773
+ * from outside the editor, so `loadData`, a file import, a remote source, a
774
+ * custom format, and a paste of text from another app all call it. A value
775
+ * moving inside the grid is left alone, so a manual edit, a fill, a paste of
776
+ * cells copied from the grid itself, undo, and redo never call it.
777
+ *
778
+ * The value arrives in the shape the cell is stored in. Numbers and dates
779
+ * canonicalize first, and a `select` value resolves through value matching
780
+ * first, so the transformer sees the option the user confirmed. On a
781
+ * `multiselect` column it runs once per token, the way `formatter` already
782
+ * reads that column. A token it empties leaves the list, and two tokens it
783
+ * makes equal collapse into one.
784
+ *
785
+ * It runs before validation, so a transformer that moves a value outside
786
+ * `editor.options` makes its own column fail a `oneOf` rule.
773
787
  */
774
788
  transformer?: (value: unknown) => unknown;
775
789
  /** How the cell is edited. Defaults to text input. */