mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore(build): uplift several outdated frontend packages (#29652)
Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
@@ -115,8 +115,8 @@ describe('QueryLimitSelect', () => {
|
||||
const expectedLabels = [10, 100, 1000, 10000, 50000].map(i =>
|
||||
convertToNumWithSpaces(i),
|
||||
);
|
||||
const actualLabels = getAllByRole('menuitem').map(
|
||||
elem => elem.textContent?.trim(),
|
||||
const actualLabels = getAllByRole('menuitem').map(elem =>
|
||||
elem.textContent?.trim(),
|
||||
);
|
||||
|
||||
expect(actualLabels).toEqual(expectedLabels);
|
||||
@@ -135,8 +135,8 @@ describe('QueryLimitSelect', () => {
|
||||
await waitFor(() => expect(getByRole('menu')).toBeInTheDocument());
|
||||
|
||||
const expectedLabels = [5].map(i => convertToNumWithSpaces(i));
|
||||
const actualLabels = getAllByRole('menuitem').map(
|
||||
elem => elem.textContent?.trim(),
|
||||
const actualLabels = getAllByRole('menuitem').map(elem =>
|
||||
elem.textContent?.trim(),
|
||||
);
|
||||
|
||||
expect(actualLabels).toEqual(expectedLabels);
|
||||
@@ -157,8 +157,8 @@ describe('QueryLimitSelect', () => {
|
||||
const expectedLabels = [10, 100, 1000, 10000].map(i =>
|
||||
convertToNumWithSpaces(i),
|
||||
);
|
||||
const actualLabels = getAllByRole('menuitem').map(
|
||||
elem => elem.textContent?.trim(),
|
||||
const actualLabels = getAllByRole('menuitem').map(elem =>
|
||||
elem.textContent?.trim(),
|
||||
);
|
||||
|
||||
expect(actualLabels).toEqual(expectedLabels);
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
*/
|
||||
import { FunctionComponent, useState, useRef, ChangeEvent } from 'react';
|
||||
|
||||
import SchemaForm, { FormProps, FormValidation } from 'react-jsonschema-form';
|
||||
import SchemaForm, { FormProps } from '@rjsf/core';
|
||||
import { FormValidation } from '@rjsf/utils';
|
||||
import validator from '@rjsf/validator-ajv8';
|
||||
import { Row, Col } from 'src/components';
|
||||
import { Input, TextArea } from 'src/components/Input';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
@@ -71,7 +73,7 @@ const getValidator = () => {
|
||||
const args = rule.arguments.map((name: string) => formData[name]);
|
||||
const container = rule.container || rule.arguments.slice(-1)[0];
|
||||
if (!test(...args)) {
|
||||
errors[container].addError(rule.message);
|
||||
errors[container]?.addError(rule.message);
|
||||
}
|
||||
});
|
||||
return errors;
|
||||
@@ -151,7 +153,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
|
||||
const onScheduleSubmit = ({
|
||||
formData,
|
||||
}: {
|
||||
formData: Omit<FormProps<Record<string, any>>, 'schema'>;
|
||||
formData?: Omit<FormProps<Record<string, any>>, 'schema'>;
|
||||
}) => {
|
||||
const query = {
|
||||
label,
|
||||
@@ -202,7 +204,8 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
|
||||
schema={getJSONSchema()}
|
||||
uiSchema={getUISchema()}
|
||||
onSubmit={onScheduleSubmit}
|
||||
validate={getValidator()}
|
||||
customValidate={getValidator()}
|
||||
validator={validator}
|
||||
>
|
||||
<Button
|
||||
buttonStyle="primary"
|
||||
|
||||
Reference in New Issue
Block a user