@updog/data-editor-wc 0.1.77 → 0.1.79

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 (4) hide show
  1. package/index.css +1 -1
  2. package/index.d.ts +12 -11
  3. package/index.js +8083 -8014
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -473,7 +473,7 @@ declare var export_default = {
473
473
  matchColumns: "Match columns",
474
474
  matchColumnsOf: "Match columns ({{current}} of {{total}})",
475
475
  matchValues: "Match values",
476
- primaryKey: "Primary key",
476
+ addOrUpdate: "Add or update",
477
477
  },
478
478
  uploadFile: {
479
479
  parseError: "Failed to parse file",
@@ -558,10 +558,11 @@ declare var export_default = {
558
558
  separator: "Separator",
559
559
  separatedBy: "Values separated by",
560
560
  },
561
- primaryKey: {
562
- none: "No primary key",
563
- noneHint:
564
- "All rows will be appended as new entries without deduplication.",
561
+ addOrUpdate: {
562
+ addEvery: "Add every row",
563
+ addEveryHint:
564
+ "Every row becomes a new entry, even if it repeats one you already have.",
565
+ updateBy: "Update by {{column}}",
565
566
  },
566
567
  },
567
568
  chat: {
@@ -976,8 +977,8 @@ type ChatErrorSummary = {
976
977
  type ChatDataContext<TRow extends DataEditorRow = DataEditorRow> = {
977
978
  /** Full column definitions. */
978
979
  columns: DataEditorColumn[];
979
- /** Row identifier field. */
980
- primaryKey: keyof TRow;
980
+ /** Row identifier field, or the list of fields that identify a row together. */
981
+ primaryKey: keyof TRow | readonly (keyof TRow)[];
981
982
  /** Total rows in the dataset. */
982
983
  totalRowCount: number;
983
984
  /** Rows in the current filtered view. */
@@ -1317,11 +1318,11 @@ type DataEditorBaseProps<TRow extends DataEditorRow = DataEditorRow> = {
1317
1318
  /** Column definitions. Each entry describes one column in the grid. */
1318
1319
  columns: DataEditorColumn[];
1319
1320
  /**
1320
- * The column ID used to uniquely identify each row (e.g. `"id"` or
1321
- * `"employeeId"`). Used to match imported rows against existing data and to
1322
- * track edits.
1321
+ * The column or columns that uniquely identify a row (`"id"`, or
1322
+ * `["orgId", "externalId"]`). Used to match imported rows against existing
1323
+ * data. A row matches only when every listed column matches.
1323
1324
  */
1324
- primaryKey: keyof TRow;
1325
+ primaryKey: keyof TRow | readonly (keyof TRow)[];
1325
1326
  /**
1326
1327
  * Async function that feeds data into the editor. Called once when the editor opens.
1327
1328
  * Call `onChunk` one or more times to stream rows in batches.