Skip to content

Commit

Permalink
[pickers] Clean the validation internals DX to prepare for publication
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Sep 4, 2024
1 parent 48b1714 commit 96e2c3b
Show file tree
Hide file tree
Showing 123 changed files with 641 additions and 628 deletions.
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-field.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-time-field.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-time-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/desktop-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/desktop-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/desktop-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/desktop-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onOpen": { "type": { "name": "func" } },
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/mobile-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/mobile-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/mobile-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/mobile-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onOpen": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/static-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/static-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/static-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onMonthChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/static-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onViewChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/time-field.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onSelectedSectionsChange": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"onError": {
"type": { "name": "func" },
"signature": {
"type": "function(error: TError, value: TValue) => void",
"describedArgs": ["error", "value"]
"type": "function(reason: TError, value: TValue) => void",
"describedArgs": ["reason", "value"]
}
},
"onOpen": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@
},
"onClear": { "description": "Callback fired when the clear button is clicked." },
"onError": {
"description": "Callback fired when the error associated to the current value changes.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
"description": "Callback fired when the popup requests to be closed. Use in controlled mode (see <code>open</code>)."
},
"onError": {
"description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the <code>TextField</code> will be rendered in <code>error</code> state.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error describing why the current value is not valid.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onMonthChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
"description": "Callback fired when the popup requests to be closed. Use in controlled mode (see <code>open</code>)."
},
"onError": {
"description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the <code>TextField</code> will be rendered in <code>error</code> state.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error describing why the current value is not valid.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onMonthChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
},
"onClear": { "description": "Callback fired when the clear button is clicked." },
"onError": {
"description": "Callback fired when the error associated to the current value changes.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onSelectedSectionsChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
"description": "Callback fired when the popup requests to be closed. Use in controlled mode (see <code>open</code>)."
},
"onError": {
"description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the <code>TextField</code> will be rendered in <code>error</code> state.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error describing why the current value is not valid.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onMonthChange": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
"description": "Callback fired when the popup requests to be closed. Use in controlled mode (see <code>open</code>)."
},
"onError": {
"description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the <code>TextField</code> will be rendered in <code>error</code> state.",
"description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the <code>reason</code> parameter contains a non-null value. This can be used to render an appropriate form error.",
"typeDescriptions": {
"error": "The new error describing why the current value is not valid.",
"value": "The value associated to the error."
"reason": "The reason why the current value is not valid.",
"value": "The invalid value."
}
},
"onMonthChange": {
Expand Down
Loading

0 comments on commit 96e2c3b

Please sign in to comment.