@updog/data-editor-wc 0.1.94 → 0.1.95
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.d.ts +26 -1
- package/index.js +5048 -5004
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -418,6 +418,7 @@ declare var export_default = {
|
|
|
418
418
|
invalidNumber: "Invalid number",
|
|
419
419
|
invalidOption: "Invalid option",
|
|
420
420
|
invalidTime: "Invalid time",
|
|
421
|
+
invalidUrl: "Invalid URL",
|
|
421
422
|
outOfRange: "Out of range",
|
|
422
423
|
required: "This field is required",
|
|
423
424
|
structuralMismatch: "This might be in the wrong column.",
|
|
@@ -670,6 +671,23 @@ type CellValidator = (value: unknown, row: DataEditorRow) => ValidationError | n
|
|
|
670
671
|
type TextEditorCell = {
|
|
671
672
|
type: "text";
|
|
672
673
|
};
|
|
674
|
+
/**
|
|
675
|
+
* Email cell. A plain text input; the column is checked against
|
|
676
|
+
* `{ type: "email" }` even when it declares no validator. On the way in,
|
|
677
|
+
* surrounding spaces are cut and the domain is lower-cased.
|
|
678
|
+
*/
|
|
679
|
+
type EmailEditorCell = {
|
|
680
|
+
type: "email";
|
|
681
|
+
};
|
|
682
|
+
/**
|
|
683
|
+
* Web address cell. A plain text input; the column is checked against
|
|
684
|
+
* `{ type: "url" }` even when it declares no validator. On the way in,
|
|
685
|
+
* surrounding spaces are cut and a bare host such as `acme.com` becomes
|
|
686
|
+
* `https://acme.com`.
|
|
687
|
+
*/
|
|
688
|
+
type UrlEditorCell = {
|
|
689
|
+
type: "url";
|
|
690
|
+
};
|
|
673
691
|
/** Date picker cell. Bounds come from the column's `{ type: "date" }` validator. */
|
|
674
692
|
type DateEditorCell = {
|
|
675
693
|
type: "date";
|
|
@@ -768,6 +786,8 @@ type NumberEditorCell = {
|
|
|
768
786
|
* Controls how a cell is edited.
|
|
769
787
|
*
|
|
770
788
|
* - `"text"` — plain text input (default).
|
|
789
|
+
* - `"email"` — plain text input; the column is checked against `{ type: "email" }`, spaces cut and the domain lower-cased on the way in.
|
|
790
|
+
* - `"url"` — plain text input; the column is checked against `{ type: "url" }`, a bare host such as `acme.com` becomes `https://acme.com` on the way in.
|
|
771
791
|
* - `"date"` — date picker; the calendar honours the column's date validator bounds.
|
|
772
792
|
* - `"time"` — plain text input for a time of day; the column is checked against `{ type: "time" }`.
|
|
773
793
|
* - `"select"` — dropdown with a fixed list of options.
|
|
@@ -777,7 +797,7 @@ type NumberEditorCell = {
|
|
|
777
797
|
* - `"number"` — number input with locale-aware formatting.
|
|
778
798
|
* - `"boolean"` — stores a real `true`/`false`; reads yes/no, 1/0, on/off and Excel's localized TRUE/FALSE.
|
|
779
799
|
*/
|
|
780
|
-
type CellEditor = TextEditorCell | DateEditorCell | TimeEditorCell | SelectEditorCell | MultiSelectEditorCell | CountryEditorCell | CurrencyEditorCell | NumberEditorCell | BooleanEditorCell;
|
|
800
|
+
type CellEditor = TextEditorCell | EmailEditorCell | UrlEditorCell | DateEditorCell | TimeEditorCell | SelectEditorCell | MultiSelectEditorCell | CountryEditorCell | CurrencyEditorCell | NumberEditorCell | BooleanEditorCell;
|
|
781
801
|
/** Dropdown filter shown in the sidebar Filters panel. */
|
|
782
802
|
type SelectColumnFilter = {
|
|
783
803
|
type: "select";
|
|
@@ -940,6 +960,11 @@ type BuiltInValidator = {
|
|
|
940
960
|
} | {
|
|
941
961
|
type: "email";
|
|
942
962
|
message?: string;
|
|
963
|
+
}
|
|
964
|
+
/** The cell holds an `http` or `https` address with a dotted host. Implicit on every url column. */
|
|
965
|
+
| {
|
|
966
|
+
type: "url";
|
|
967
|
+
message?: string;
|
|
943
968
|
} | {
|
|
944
969
|
type: "date";
|
|
945
970
|
min?: string;
|