@updog/data-editor-wc 0.1.86 → 0.1.87
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 +35 -2
- package/index.js +6950 -6326
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ declare var export_default = {
|
|
|
65
65
|
clearField: "Clear field",
|
|
66
66
|
showPassword: "Show password",
|
|
67
67
|
hidePassword: "Hide password",
|
|
68
|
+
switchToAm: "Switch to AM",
|
|
69
|
+
switchToPm: "Switch to PM",
|
|
68
70
|
},
|
|
69
71
|
select: {
|
|
70
72
|
noResults: "No results",
|
|
@@ -412,10 +414,12 @@ declare var export_default = {
|
|
|
412
414
|
invalidFormat: "Invalid format",
|
|
413
415
|
invalidNumber: "Invalid number",
|
|
414
416
|
invalidOption: "Invalid option",
|
|
417
|
+
invalidTime: "Invalid time",
|
|
415
418
|
outOfRange: "Out of range",
|
|
416
419
|
required: "This field is required",
|
|
417
420
|
structuralMismatch: "This might be in the wrong column.",
|
|
418
421
|
tooManyDecimals: "Too many decimal places",
|
|
422
|
+
tooPreciseTime: "Too precise for this column",
|
|
419
423
|
valueMustBeUnique: "Value must be unique",
|
|
420
424
|
},
|
|
421
425
|
license: {
|
|
@@ -663,6 +667,16 @@ type TextEditorCell = {
|
|
|
663
667
|
type DateEditorCell = {
|
|
664
668
|
type: "date";
|
|
665
669
|
};
|
|
670
|
+
/** Time-of-day cell. Bounds come from the column's `{ type: "time" }` validator. */
|
|
671
|
+
type TimeEditorCell = {
|
|
672
|
+
type: "time";
|
|
673
|
+
/**
|
|
674
|
+
* The clock the cell draws, `h23` for `18:00` and `h12` for `6:00 PM`.
|
|
675
|
+
* Defaults to the clock the reader's own browser uses. Whichever is drawn,
|
|
676
|
+
* both forms stay readable when the person types.
|
|
677
|
+
*/
|
|
678
|
+
hourCycle?: "h12" | "h23";
|
|
679
|
+
};
|
|
666
680
|
/** Dropdown select cell. The user picks from a fixed list of options. */
|
|
667
681
|
type SelectEditorCell = {
|
|
668
682
|
type: "select";
|
|
@@ -697,11 +711,12 @@ type NumberEditorCell = {
|
|
|
697
711
|
*
|
|
698
712
|
* - `"text"` — plain text input (default).
|
|
699
713
|
* - `"date"` — date picker; the calendar honours the column's date validator bounds.
|
|
714
|
+
* - `"time"` — plain text input for a time of day; the column is checked against `{ type: "time" }`.
|
|
700
715
|
* - `"select"` — dropdown with a fixed list of options.
|
|
701
716
|
* - `"multiselect"` — dropdown allowing zero or more options; stored as `string[]`.
|
|
702
717
|
* - `"number"` — number input with locale-aware formatting.
|
|
703
718
|
*/
|
|
704
|
-
type CellEditor = TextEditorCell | DateEditorCell | SelectEditorCell | MultiSelectEditorCell | NumberEditorCell;
|
|
719
|
+
type CellEditor = TextEditorCell | DateEditorCell | TimeEditorCell | SelectEditorCell | MultiSelectEditorCell | NumberEditorCell;
|
|
705
720
|
/** Dropdown filter shown in the sidebar Filters panel. */
|
|
706
721
|
type SelectColumnFilter = {
|
|
707
722
|
type: "select";
|
|
@@ -726,14 +741,21 @@ type DateRangeColumnFilter = {
|
|
|
726
741
|
/** Label displayed above the filter. */
|
|
727
742
|
label?: string;
|
|
728
743
|
};
|
|
744
|
+
/** Time-of-day min/max range filter shown in the sidebar Filters panel. */
|
|
745
|
+
type TimeRangeColumnFilter = {
|
|
746
|
+
type: "time-range";
|
|
747
|
+
/** Label displayed above the filter. */
|
|
748
|
+
label?: string;
|
|
749
|
+
};
|
|
729
750
|
/**
|
|
730
751
|
* Filter control shown in the sidebar Filters panel for a column.
|
|
731
752
|
*
|
|
732
753
|
* - `"select"` — dropdown to pick one or more values.
|
|
733
754
|
* - `"number-range"` — two inputs for min and max number.
|
|
734
755
|
* - `"date-range"` — two date pickers for start and end date.
|
|
756
|
+
* - `"time-range"` — two time fields for the earliest and latest time of day.
|
|
735
757
|
*/
|
|
736
|
-
type ColumnFilter = SelectColumnFilter | NumberRangeColumnFilter | DateRangeColumnFilter;
|
|
758
|
+
type ColumnFilter = SelectColumnFilter | NumberRangeColumnFilter | DateRangeColumnFilter | TimeRangeColumnFilter;
|
|
737
759
|
/** Lock mode for a column. `"all"` locks for every row; `"default"` locks only default-source rows. */
|
|
738
760
|
type ColumnLockMode = "all" | "default";
|
|
739
761
|
/**
|
|
@@ -808,6 +830,8 @@ type DataEditorColumn = {
|
|
|
808
830
|
locked?: boolean | ColumnLockMode;
|
|
809
831
|
};
|
|
810
832
|
|
|
833
|
+
/** How precisely a time-of-day column is written. */
|
|
834
|
+
type TimePrecision = "minutes" | "seconds" | "milliseconds";
|
|
811
835
|
/**
|
|
812
836
|
* A built-in declarative validator — a declarative object the SDK interprets.
|
|
813
837
|
*/
|
|
@@ -840,6 +864,15 @@ type BuiltInValidator = {
|
|
|
840
864
|
min?: string;
|
|
841
865
|
max?: string;
|
|
842
866
|
message?: string;
|
|
867
|
+
} | {
|
|
868
|
+
type: "time";
|
|
869
|
+
/** Inclusive lower bound, canonical, any of the three precisions. */
|
|
870
|
+
min?: string;
|
|
871
|
+
/** Inclusive upper bound, canonical, any of the three precisions. */
|
|
872
|
+
max?: string;
|
|
873
|
+
/** The finest the column is written. A value carrying more is flagged, never trimmed. */
|
|
874
|
+
precision?: TimePrecision;
|
|
875
|
+
message?: string;
|
|
843
876
|
} | {
|
|
844
877
|
type: "unique";
|
|
845
878
|
message?: string;
|