@updog/data-editor-wc 0.1.92 → 0.1.93

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 +18 -1
  3. package/index.js +5518 -5341
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -409,6 +409,7 @@ declare var export_default = {
409
409
  validation: {
410
410
  alreadyExists: "Already exists in your database",
411
411
  endDateBeforeStart: "End date must be after start date",
412
+ invalidBoolean: "Invalid boolean",
412
413
  invalidCountry: "Invalid country",
413
414
  invalidCurrency: "Invalid currency",
414
415
  invalidDate: "Invalid date",
@@ -745,6 +746,16 @@ type CurrencyEditorCell = {
745
746
  /** The ISO 4217 codes the column takes, in the order the dropdown shows them. */
746
747
  only?: string[];
747
748
  };
749
+ /**
750
+ * Boolean cell. Stores a real `true`/`false`. Reads `true/yes/y/1/t/on/+`,
751
+ * `false/no/n/0/f/off/-` and Excel's localized TRUE/FALSE on the way in,
752
+ * case and surrounding spaces ignored; an empty cell reads as `false`. A
753
+ * value the dictionary has not got stays as it came and is flagged by the
754
+ * column's implicit `{ type: "boolean" }` validator.
755
+ */
756
+ type BooleanEditorCell = {
757
+ type: "boolean";
758
+ };
748
759
  /** Number input cell with locale-aware formatting. Bounds and decimal digits come from the column's `{ type: "number" }` validator. */
749
760
  type NumberEditorCell = {
750
761
  type: "number";
@@ -764,8 +775,9 @@ type NumberEditorCell = {
764
775
  * - `"country"` — dropdown over the ISO country list; stores the alpha-2 code, shows the name.
765
776
  * - `"currency"` — dropdown over the ISO 4217 list; stores and shows the three-letter code.
766
777
  * - `"number"` — number input with locale-aware formatting.
778
+ * - `"boolean"` — stores a real `true`/`false`; reads yes/no, 1/0, on/off and Excel's localized TRUE/FALSE.
767
779
  */
768
- type CellEditor = TextEditorCell | DateEditorCell | TimeEditorCell | SelectEditorCell | MultiSelectEditorCell | CountryEditorCell | CurrencyEditorCell | NumberEditorCell;
780
+ type CellEditor = TextEditorCell | DateEditorCell | TimeEditorCell | SelectEditorCell | MultiSelectEditorCell | CountryEditorCell | CurrencyEditorCell | NumberEditorCell | BooleanEditorCell;
769
781
  /** Dropdown filter shown in the sidebar Filters panel. */
770
782
  type SelectColumnFilter = {
771
783
  type: "select";
@@ -911,6 +923,11 @@ type BuiltInValidator = {
911
923
  | {
912
924
  type: "currency";
913
925
  message?: string;
926
+ }
927
+ /** The cell holds a real boolean. Implicit on every boolean column. */
928
+ | {
929
+ type: "boolean";
930
+ message?: string;
914
931
  } | {
915
932
  type: "number";
916
933
  /** Inclusive lower bound. */