react-hook-form-cloudscape 1.5.0 → 1.6.0
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/README.md +5 -5
- package/components/attribute-editor/attribute-editor.d.ts +1 -2
- package/components/attribute-editor/attribute-editor.js +4 -3
- package/components/attribute-editor/attribute-editor.js.map +1 -1
- package/components/autosuggest/autosuggest.d.ts +1 -4
- package/components/autosuggest/autosuggest.js +10 -10
- package/components/autosuggest/autosuggest.js.map +1 -1
- package/components/cards/cards.d.ts +5 -3
- package/components/cards/cards.js +4 -3
- package/components/cards/cards.js.map +1 -1
- package/components/checkbox/checkbox.d.ts +1 -2
- package/components/checkbox/checkbox.js +3 -2
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/code-editor/code-editor.d.ts +1 -2
- package/components/code-editor/code-editor.js +3 -2
- package/components/code-editor/code-editor.js.map +1 -1
- package/components/components/attribute-editor/attribute-editor.d.ts +1 -2
- package/components/components/autosuggest/autosuggest.d.ts +1 -4
- package/components/components/cards/cards.d.ts +5 -3
- package/components/components/checkbox/checkbox.d.ts +1 -2
- package/components/components/code-editor/code-editor.d.ts +1 -2
- package/components/components/date-picker/date-picker.d.ts +1 -2
- package/components/components/date-range-picker/date-range-picker.d.ts +1 -2
- package/components/components/multiselect/multiselect.d.ts +1 -2
- package/components/components/property-filter/property-filter.d.ts +1 -2
- package/components/components/radio-group/radio-group.d.ts +1 -2
- package/components/components/select/select.d.ts +1 -2
- package/components/components/slider/slider.d.ts +1 -2
- package/components/components/tag-editor/tag-editor.d.ts +1 -2
- package/components/components/text-filter/text-filter.d.ts +1 -2
- package/components/components/textarea/textarea.d.ts +1 -2
- package/components/components/tiles/tiles.d.ts +1 -2
- package/components/components/time-input/time-input.d.ts +1 -2
- package/components/components/toggle/toggle.d.ts +1 -2
- package/components/date-picker/date-picker.d.ts +1 -2
- package/components/date-picker/date-picker.js +3 -2
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +1 -2
- package/components/date-range-picker/date-range-picker.js +3 -2
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/file-upload/file-upload.js +3 -2
- package/components/file-upload/file-upload.js.map +1 -1
- package/components/input/input.js +3 -2
- package/components/input/input.js.map +1 -1
- package/components/multiselect/multiselect.d.ts +1 -2
- package/components/multiselect/multiselect.js +4 -3
- package/components/multiselect/multiselect.js.map +1 -1
- package/components/property-filter/property-filter.d.ts +1 -2
- package/components/property-filter/property-filter.js +4 -3
- package/components/property-filter/property-filter.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +1 -2
- package/components/radio-group/radio-group.js +3 -2
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/s3-resource-selector/s3-resource-selector.js +3 -2
- package/components/s3-resource-selector/s3-resource-selector.js.map +1 -1
- package/components/select/select.d.ts +1 -2
- package/components/select/select.js +3 -2
- package/components/select/select.js.map +1 -1
- package/components/slider/slider.d.ts +1 -2
- package/components/slider/slider.js +3 -2
- package/components/slider/slider.js.map +1 -1
- package/components/tag-editor/tag-editor.d.ts +1 -2
- package/components/tag-editor/tag-editor.js +3 -2
- package/components/tag-editor/tag-editor.js.map +1 -1
- package/components/text-filter/text-filter.d.ts +1 -2
- package/components/text-filter/text-filter.js +3 -2
- package/components/text-filter/text-filter.js.map +1 -1
- package/components/textarea/textarea.d.ts +1 -2
- package/components/textarea/textarea.js +3 -2
- package/components/textarea/textarea.js.map +1 -1
- package/components/tiles/tiles.d.ts +1 -2
- package/components/tiles/tiles.js +3 -2
- package/components/tiles/tiles.js.map +1 -1
- package/components/time-input/time-input.d.ts +1 -2
- package/components/time-input/time-input.js +3 -2
- package/components/time-input/time-input.js.map +1 -1
- package/components/toggle/toggle.d.ts +1 -2
- package/components/toggle/toggle.js +3 -2
- package/components/toggle/toggle.js.map +1 -1
- package/package.json +44 -34
- package/react-hook-form-cloudscape.es.js +445 -442
- package/react-hook-form-cloudscape.es.js.map +1 -1
- package/react-hook-form-cloudscape.umd.js +9 -9
- package/react-hook-form-cloudscape.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
## React-hook-form wrapper for Cloudscape Design System
|
|
2
2
|
|
|
3
|
-
A React library that simplifies the integration of [`react-hook-form`](https://github.com/react-hook-form/react-hook-form) with [`Cloudscape Design System`](https://github.com/cloudscape-design/components).
|
|
3
|
+
A React library that simplifies the integration of [`react-hook-form`](https://github.com/react-hook-form/react-hook-form) with [`Cloudscape Design System`](https://github.com/cloudscape-design/components). It provides a set of pre-built, controlled input components that handle validation, allowing you to focus on building complex form logic with minimal effort.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/react-hook-form-cloudscape)
|
|
6
|
-
|
|
6
|
+

|
|
7
7
|
[](https://github.com/abudayah/react-hook-form-cloudscape/actions/workflows/dependabot/dependabot-updates)
|
|
8
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/abudayah/react-hook-form-cloudscape)
|
|
8
9
|
[](https://github.com/abudayah/react-hook-form-cloudscape)
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
11
|
## Installation
|
|
13
12
|
|
|
14
13
|
```
|
|
15
|
-
npm install react-hook-form @cloudscape-design/components
|
|
14
|
+
npm install react-hook-form @cloudscape-design/components react-hook-form-cloudscape
|
|
16
15
|
```
|
|
17
16
|
|
|
18
17
|
## How to use it
|
|
@@ -40,6 +39,7 @@ function App {
|
|
|
40
39
|
You can [create bug reports or feature requests](https://github.com/abudayah/react-hook-form-cloudscape/issues/new/choose), or [start a discussion](https://github.com/abudayah/react-hook-form-cloudscape/discussions) to ask a question. To minimize duplicates, we recommend that you search for existing bug reports, feature requests, or discussions before initiating a new thread.
|
|
41
40
|
|
|
42
41
|
## Articles and guides
|
|
42
|
+
|
|
43
43
|
- [Cloudscape Form Validation Made Easy: A Step-by-Step Guide with React-hook-form-cloudscape](https://medium.com/@abudayah/cloudscape-form-validation-made-easy-a-step-by-step-guide-with-react-hook-form-cloudscape-f2238225f125)
|
|
44
44
|
|
|
45
45
|
## License
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { AttributeEditorProps, NonCancelableCustomEvent } from '@cloudscape-design/components';
|
|
3
2
|
import { Control, FieldArray, FieldArrayPath, FieldValues, UseFieldArrayRemove, UseFieldArrayAppend, ArrayPath } from 'react-hook-form';
|
|
4
3
|
export interface Definition<T> extends Omit<AttributeEditorProps.FieldDefinition<T>, 'errorText'> {
|
|
@@ -14,5 +13,5 @@ export interface CAttributeEditorProps<T extends FieldValues> extends Omit<Attri
|
|
|
14
13
|
onRemoveButtonClick?: (event: NonCancelableCustomEvent<AttributeEditorProps.RemoveButtonClickDetail>, remove: UseFieldArrayRemove) => void;
|
|
15
14
|
onAddButtonClick?: (event: NonCancelableCustomEvent<object>, append: UseFieldArrayAppend<T, ArrayPath<T>>) => void;
|
|
16
15
|
}
|
|
17
|
-
declare const CAttributeEditor: <TFieldValues extends FieldValues>({ name, control,
|
|
16
|
+
declare const CAttributeEditor: <TFieldValues extends FieldValues>({ name, control, definition, defaultValue, handleState, onAddButtonClick, onRemoveButtonClick, ...props }: CAttributeEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
export default CAttributeEditor;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from 'react';
|
|
3
4
|
import { AttributeEditor } from '@cloudscape-design/components';
|
|
4
5
|
import { useFieldArray, useFormState, get, } from 'react-hook-form';
|
|
5
6
|
const CAttributeEditor = (_a) => {
|
|
6
|
-
var { name, control,
|
|
7
|
+
var { name, control, definition, defaultValue, handleState = true, onAddButtonClick, onRemoveButtonClick } = _a, props = __rest(_a, ["name", "control", "definition", "defaultValue", "handleState", "onAddButtonClick", "onRemoveButtonClick"]);
|
|
7
8
|
const { errors } = useFormState({ control });
|
|
8
9
|
const { fields, append, remove } = useFieldArray({
|
|
9
10
|
name,
|
|
@@ -11,7 +12,7 @@ const CAttributeEditor = (_a) => {
|
|
|
11
12
|
});
|
|
12
13
|
const definitionWithError = useMemo(() => definition.map((def) => (Object.assign({ errorText: (_item, index) => def.label &&
|
|
13
14
|
get(errors, `${name}.${index}.${def.label.toString().toLowerCase()}.message`) }, def))), [definition, errors, name]);
|
|
14
|
-
return (
|
|
15
|
+
return (_jsx(AttributeEditor, Object.assign({ definition: definitionWithError, items: fields || [], onRemoveButtonClick: (e) => {
|
|
15
16
|
if (handleState) {
|
|
16
17
|
remove(e.detail.itemIndex);
|
|
17
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-editor.js","sourceRoot":"","sources":["../../src/components/attribute-editor/attribute-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attribute-editor.js","sourceRoot":"","sources":["../../src/components/attribute-editor/attribute-editor.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAkD,MAAM,+BAA+B,CAAC;AAChH,OAAO,EAIL,aAAa,EACb,YAAY,EACZ,GAAG,GAKJ,MAAM,iBAAiB,CAAC;AAqBzB,MAAM,gBAAgB,GAAG,CAAmC,EAStB,EAAE,EAAE;QATkB,EAC1D,IAAI,EACJ,OAAO,EACP,UAAU,EACV,YAAY,EACZ,WAAW,GAAG,IAAI,EAClB,gBAAgB,EAChB,mBAAmB,OAEiB,EADjC,KAAK,cARkD,2GAS3D,CADS;IAER,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAe;QAC7D,IAAI;QACJ,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAG,OAAO,CACjC,GAAG,EAAE,CACH,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,iBACtB,SAAS,EAAE,CAAC,KAAmB,EAAE,KAAa,EAAE,EAAE,CAChD,GAAG,CAAC,KAAK;YACR,GAAG,CAAC,MAAM,EAAE,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,UAAU,CAAwB,IACpG,GAAG,EACN,CAAC,EACL,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,kBACd,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAG,MAAyB,IAAI,EAAE,EACvC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE;YACzB,IAAI,WAAW,EAAE,CAAC;gBAChB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YACD,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QACnC,CAAC,EACD,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE;YACtB,IAAI,WAAW,EAAE,CAAC;gBAChB,MAAM,CAAC,YAAY,CAAC,CAAC;YACvB,CAAC;YACD,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QAChC,CAAC,IACG,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Control, Path, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { AutosuggestProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CAutosuggestProps<T extends FieldValues> extends Omit<AutosuggestProps, 'value'> {
|
|
@@ -7,8 +6,6 @@ export interface CAutosuggestProps<T extends FieldValues> extends Omit<Autosugge
|
|
|
7
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
7
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
|
-
onBlur?: AutosuggestProps['onBlur'];
|
|
11
|
-
onChange?: AutosuggestProps['onChange'];
|
|
12
9
|
}
|
|
13
|
-
export declare const CAutosuggest: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CAutosuggestProps<T>) =>
|
|
10
|
+
export declare const CAutosuggest: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CAutosuggestProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export default CAutosuggest;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { Controller } from 'react-hook-form';
|
|
4
5
|
import { Autosuggest } from '@cloudscape-design/components';
|
|
5
6
|
export const CAutosuggest = (_a) => {
|
|
6
7
|
var { name, control, defaultValue, rules, shouldUnregister = false, onBlur, onChange } = _a, props = __rest(_a, ["name", "control", "defaultValue", "rules", "shouldUnregister", "onBlur", "onChange"]);
|
|
7
|
-
const handleOnBlur = useCallback((event) => {
|
|
8
|
+
const handleOnBlur = useCallback((formOnBlur, event) => {
|
|
9
|
+
var _a;
|
|
10
|
+
if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) {
|
|
11
|
+
formOnBlur(event.detail.value);
|
|
12
|
+
}
|
|
8
13
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
9
14
|
}, [onBlur]);
|
|
10
|
-
const handleOnChange = useCallback((event) => {
|
|
15
|
+
const handleOnChange = useCallback((formOnChange, event) => {
|
|
16
|
+
formOnChange(event.detail.value);
|
|
11
17
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
12
18
|
}, [onChange]);
|
|
13
|
-
return (
|
|
14
|
-
formOnBlur();
|
|
15
|
-
handleOnBlur(e);
|
|
16
|
-
}, onChange: (e) => {
|
|
17
|
-
formOnChange(e.detail.value);
|
|
18
|
-
handleOnChange(e);
|
|
19
|
-
} }, props))) }));
|
|
19
|
+
return (_jsx(Controller, { name: name, control: control, defaultValue: defaultValue, rules: rules, shouldUnregister: shouldUnregister, render: ({ field: { ref, onBlur, onChange, value } }) => (_jsx(Autosuggest, Object.assign({ ref: ref, name: name, value: value || '', onBlur: handleOnBlur.bind(null, onBlur), onChange: handleOnChange.bind(null, onChange) }, props))) }));
|
|
20
20
|
};
|
|
21
21
|
export default CAutosuggest;
|
|
22
22
|
//# sourceMappingURL=autosuggest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autosuggest.js","sourceRoot":"","sources":["../../src/components/autosuggest/autosuggest.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"autosuggest.js","sourceRoot":"","sources":["../../src/components/autosuggest/autosuggest.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,UAAU,EAA0E,MAAM,iBAAiB,CAAC;AACrH,OAAO,EAAE,WAAW,EAA8C,MAAM,+BAA+B,CAAC;AAUxG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAwB,EAS7B,EAAE,EAAE;QATyB,EAClD,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,KAAK,EACL,gBAAgB,GAAG,KAAK,EACxB,MAAM,EACN,QAAQ,OAEa,EADlB,KAAK,cAR0C,sFASnD,CADS;IAER,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,UAAmC,EAAE,KAAyD,EAAE,EAAE;;QACjG,IAAI,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,EAAE,CAAC;YACxB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;QACD,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,KAAuC,CAAC,CAAC;IACpD,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,YAAqC,EAAE,KAA8D,EAAE,EAAE;QACxG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAA2E,CAAC,CAAC;IAC1F,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CACvD,KAAC,WAAW,kBACV,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAG,KAAgB,IAAI,EAAE,EAC9B,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EACvC,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,IACzC,KAAK,EACT,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CardsProps } from '@cloudscape-design/components';
|
|
2
|
-
import {
|
|
3
|
-
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { Control, FieldValues, Path, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
4
3
|
export interface ControlledCardsProps<T extends FieldValues> extends Omit<Required<Pick<CardsProps, 'trackBy'>> & Required<Pick<CardsProps, 'selectionType'>> & CardsProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
6
|
+
shouldUnregister?: boolean;
|
|
7
|
+
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
7
9
|
}
|
|
8
|
-
export declare const CCards: <TFieldValues extends FieldValues>({ name, control, onSelectionChange, ...props }: ControlledCardsProps<TFieldValues>) =>
|
|
10
|
+
export declare const CCards: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onSelectionChange, ...props }: ControlledCardsProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export default CCards;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
2
4
|
import { Cards } from '@cloudscape-design/components';
|
|
3
|
-
import React, { useCallback } from 'react';
|
|
4
5
|
import { Controller } from 'react-hook-form';
|
|
5
6
|
export const CCards = (_a) => {
|
|
6
|
-
var { name, control, onSelectionChange } = _a, props = __rest(_a, ["name", "control", "onSelectionChange"]);
|
|
7
|
+
var { name, control, defaultValue, rules, shouldUnregister = false, onSelectionChange } = _a, props = __rest(_a, ["name", "control", "defaultValue", "rules", "shouldUnregister", "onSelectionChange"]);
|
|
7
8
|
const handleOnChange = useCallback((formOnChange, e) => {
|
|
8
9
|
formOnChange(e.detail.selectedItems);
|
|
9
10
|
onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
|
|
10
11
|
}, [onSelectionChange]);
|
|
11
|
-
return (
|
|
12
|
+
return (_jsx(Controller, { name: name, control: control, defaultValue: defaultValue, rules: rules, shouldUnregister: shouldUnregister, render: ({ field: { onChange, value } }) => (_jsx(Cards, Object.assign({ onSelectionChange: handleOnChange.bind(null, onChange), selectedItems: value }, props))) }));
|
|
12
13
|
};
|
|
13
14
|
export default CCards;
|
|
14
15
|
//# sourceMappingURL=cards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/components/cards/cards.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/components/cards/cards.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAwC,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,UAAU,EAA0E,MAAM,iBAAiB,CAAC;AAcrH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAmC,EAQpB,EAAE,EAAE;QARgB,EACvD,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,KAAK,EACL,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,OAEkB,EADhC,KAAK,cAP+C,qFAQxD,CADS;IAER,MAAM,cAAc,GAAG,WAAW,CAChC,CACE,YAAqD,EACrD,CAA2E,EAC3E,EAAE;QACF,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAG,CAAC,CAAC,CAAC;IACzB,CAAC,EACD,CAAC,iBAAiB,CAAC,CACpB,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAC1C,KAAC,KAAK,kBAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,aAAa,EAAE,KAAK,IAAM,KAAK,EAAI,CACnG,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { CheckboxProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CCheckboxProps<T extends FieldValues> extends Omit<CheckboxProps, 'checked'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CCheckbox: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCheckboxProps<TFieldValues>) =>
|
|
7
|
+
declare const CCheckbox: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CCheckbox;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { Controller } from 'react-hook-form';
|
|
4
5
|
import { Checkbox } from '@cloudscape-design/components';
|
|
5
6
|
const CCheckbox = (_a) => {
|
|
@@ -8,7 +9,7 @@ const CCheckbox = (_a) => {
|
|
|
8
9
|
formOnChange(e.detail.checked);
|
|
9
10
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
10
11
|
}, [onChange]);
|
|
11
|
-
return (
|
|
12
|
+
return (_jsx(Controller, { name: name, control: control, render: ({ field: { ref, onChange, value = false } }) => (_jsx(Checkbox, Object.assign({ ref: ref, onChange: handleOnChange.bind(null, onChange), checked: value }, props))) }));
|
|
12
13
|
};
|
|
13
14
|
export default CCheckbox;
|
|
14
15
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":";;AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAW,UAAU,EAAqB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAA2C,MAAM,+BAA+B,CAAC;AAOlG,MAAM,SAAS,GAAG,CAAmC,EAKtB,EAAE,EAAE;QALkB,EACnD,IAAI,EACJ,OAAO,EACP,QAAQ,OAEqB,EAD1B,KAAK,cAJ2C,+BAKpD,CADS;IAER,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,YAAwC,EAAE,CAAuD,EAAE,EAAE;QACpG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/B,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,CAAC;IAChB,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CACvD,KAAC,QAAQ,kBAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,IAAM,KAAK,EAAI,CACjG,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { CodeEditorProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CCodeEditorProps<T extends FieldValues> extends Omit<CodeEditorProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CCodeEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCodeEditorProps<TFieldValues>) =>
|
|
7
|
+
declare const CCodeEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCodeEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CCodeEditor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { Controller } from 'react-hook-form';
|
|
4
5
|
import { CodeEditor } from '@cloudscape-design/components';
|
|
5
6
|
const CCodeEditor = (_a) => {
|
|
@@ -8,7 +9,7 @@ const CCodeEditor = (_a) => {
|
|
|
8
9
|
formOnChange(e.detail.value);
|
|
9
10
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
10
11
|
}, [onChange]);
|
|
11
|
-
return (
|
|
12
|
+
return (_jsx(Controller, { name: name, control: control, render: ({ field: { onChange, value } }) => (_jsx(CodeEditor, Object.assign({ value: value || '', onChange: handleOnChange.bind(null, onChange) }, props))) }));
|
|
12
13
|
};
|
|
13
14
|
export default CCodeEditor;
|
|
14
15
|
//# sourceMappingURL=code-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../src/components/code-editor/code-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../src/components/code-editor/code-editor.tsx"],"names":[],"mappings":";;AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAA8B,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,UAAU,EAA6C,MAAM,+BAA+B,CAAC;AAOtG,MAAM,WAAW,GAAG,CAAmC,EAKtB,EAAE,EAAE;QALkB,EACrD,IAAI,EACJ,OAAO,EACP,QAAQ,OAEuB,EAD5B,KAAK,cAJ6C,+BAKtD,CADS;IAER,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,YAAqC,EAAE,CAAyD,EAAE,EAAE;QACnG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7B,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,CAAC;IAChB,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAC1C,KAAC,UAAU,kBAAC,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAM,KAAK,EAAI,CAC7F,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { AttributeEditorProps, NonCancelableCustomEvent } from '@cloudscape-design/components';
|
|
3
2
|
import { Control, FieldArray, FieldArrayPath, FieldValues, UseFieldArrayRemove, UseFieldArrayAppend, ArrayPath } from 'react-hook-form';
|
|
4
3
|
export interface Definition<T> extends Omit<AttributeEditorProps.FieldDefinition<T>, 'errorText'> {
|
|
@@ -14,5 +13,5 @@ export interface CAttributeEditorProps<T extends FieldValues> extends Omit<Attri
|
|
|
14
13
|
onRemoveButtonClick?: (event: NonCancelableCustomEvent<AttributeEditorProps.RemoveButtonClickDetail>, remove: UseFieldArrayRemove) => void;
|
|
15
14
|
onAddButtonClick?: (event: NonCancelableCustomEvent<object>, append: UseFieldArrayAppend<T, ArrayPath<T>>) => void;
|
|
16
15
|
}
|
|
17
|
-
declare const CAttributeEditor: <TFieldValues extends FieldValues>({ name, control,
|
|
16
|
+
declare const CAttributeEditor: <TFieldValues extends FieldValues>({ name, control, definition, defaultValue, handleState, onAddButtonClick, onRemoveButtonClick, ...props }: CAttributeEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
export default CAttributeEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, Path, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { AutosuggestProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CAutosuggestProps<T extends FieldValues> extends Omit<AutosuggestProps, 'value'> {
|
|
@@ -7,8 +6,6 @@ export interface CAutosuggestProps<T extends FieldValues> extends Omit<Autosugge
|
|
|
7
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
7
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
|
-
onBlur?: AutosuggestProps['onBlur'];
|
|
11
|
-
onChange?: AutosuggestProps['onChange'];
|
|
12
9
|
}
|
|
13
|
-
export declare const CAutosuggest: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CAutosuggestProps<T>) =>
|
|
10
|
+
export declare const CAutosuggest: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CAutosuggestProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export default CAutosuggest;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CardsProps } from '@cloudscape-design/components';
|
|
2
|
-
import
|
|
3
|
-
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { Control, FieldValues, Path, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
4
3
|
export interface ControlledCardsProps<T extends FieldValues> extends Omit<Required<Pick<CardsProps, 'trackBy'>> & Required<Pick<CardsProps, 'selectionType'>> & CardsProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
6
|
+
shouldUnregister?: boolean;
|
|
7
|
+
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
7
9
|
}
|
|
8
|
-
export declare const CCards: <TFieldValues extends FieldValues>({ name, control, onSelectionChange, ...props }: ControlledCardsProps<TFieldValues>) =>
|
|
10
|
+
export declare const CCards: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onSelectionChange, ...props }: ControlledCardsProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export default CCards;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { CheckboxProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CCheckboxProps<T extends FieldValues> extends Omit<CheckboxProps, 'checked'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CCheckbox: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCheckboxProps<TFieldValues>) =>
|
|
7
|
+
declare const CCheckbox: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CCheckbox;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { CodeEditorProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CCodeEditorProps<T extends FieldValues> extends Omit<CodeEditorProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CCodeEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCodeEditorProps<TFieldValues>) =>
|
|
7
|
+
declare const CCodeEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CCodeEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CCodeEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, RegisterOptions, FieldPath } from 'react-hook-form';
|
|
3
2
|
import { DatePickerProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CDatePickerProps<T extends FieldValues> extends Omit<DatePickerProps, 'value'> {
|
|
@@ -10,5 +9,5 @@ export interface CDatePickerProps<T extends FieldValues> extends Omit<DatePicker
|
|
|
10
9
|
onBlur?: DatePickerProps['onBlur'];
|
|
11
10
|
onChange?: DatePickerProps['onChange'];
|
|
12
11
|
}
|
|
13
|
-
declare const CDatePicker: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CDatePickerProps<TFieldValues>) =>
|
|
12
|
+
declare const CDatePicker: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default CDatePicker;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DateRangePickerProps } from '@cloudscape-design/components';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { Control, Path, FieldValues } from 'react-hook-form';
|
|
4
3
|
export interface CDateRangePickerProps<T extends FieldValues> extends Omit<DateRangePickerProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CDateRangePicker: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CDateRangePickerProps<TFieldValues>) =>
|
|
7
|
+
declare const CDateRangePicker: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CDateRangePicker;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { MultiselectProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface ControlledMultiselectProps<T extends FieldValues> extends Omit<MultiselectProps, 'selectedOptions'> {
|
|
@@ -9,5 +8,5 @@ export interface ControlledMultiselectProps<T extends FieldValues> extends Omit<
|
|
|
9
8
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
10
9
|
shouldUnregister?: boolean;
|
|
11
10
|
}
|
|
12
|
-
declare const CMultiselect: <TFieldValues extends FieldValues>({ name, control, options, defaultValue, rules, onBlur, onChange, shouldUnregister, ...props }: ControlledMultiselectProps<TFieldValues>) =>
|
|
11
|
+
declare const CMultiselect: <TFieldValues extends FieldValues>({ name, control, options, defaultValue, rules, onBlur, onChange, shouldUnregister, ...props }: ControlledMultiselectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default CMultiselect;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { PropertyFilterProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface ControlledPropertyFilterProps<T extends FieldValues> extends Omit<PropertyFilterProps, 'query' | 'onChange'> {
|
|
@@ -8,5 +7,5 @@ export interface ControlledPropertyFilterProps<T extends FieldValues> extends Om
|
|
|
8
7
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
9
|
}
|
|
11
|
-
export declare const CPropertyFilter: <TFieldValues extends FieldValues>(CPropertyFilterProperties: ControlledPropertyFilterProps<TFieldValues>) =>
|
|
10
|
+
export declare const CPropertyFilter: <TFieldValues extends FieldValues>(CPropertyFilterProperties: ControlledPropertyFilterProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default CPropertyFilter;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { RadioGroupProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CRadioGroupProps<T extends FieldValues> extends Omit<RadioGroupProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CRadioGroup: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CRadioGroupProps<TFieldValues>) =>
|
|
7
|
+
declare const CRadioGroup: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CRadioGroupProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CRadioGroup;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { SelectProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CSelectProps<T extends FieldValues> extends Omit<SelectProps, 'selectedOption'> {
|
|
@@ -8,5 +7,5 @@ export interface CSelectProps<T extends FieldValues> extends Omit<SelectProps, '
|
|
|
8
7
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
9
|
}
|
|
11
|
-
declare const CSelect: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CSelectProps<TFieldValues>) =>
|
|
10
|
+
declare const CSelect: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CSelectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default CSelect;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
3
2
|
import { NonCancelableCustomEvent, SliderProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CSliderProps<T extends FieldValues> extends Omit<SliderProps, 'value' | 'onChange'> {
|
|
@@ -9,5 +8,5 @@ export interface CSliderProps<T extends FieldValues> extends Omit<SliderProps, '
|
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
9
|
onChange?: (event: NonCancelableCustomEvent<SliderProps.ChangeDetail>) => void;
|
|
11
10
|
}
|
|
12
|
-
declare const CSlider: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CSliderProps<TFieldValues>) =>
|
|
11
|
+
declare const CSlider: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CSliderProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default CSlider;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, Path, FieldValues } from 'react-hook-form';
|
|
3
2
|
import { TagEditorProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CTagEditorProps<T extends FieldValues> extends Omit<TagEditorProps, 'tags'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CTagEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTagEditorProps<TFieldValues>) =>
|
|
7
|
+
declare const CTagEditor: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTagEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CTagEditor;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { TextFilterProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CTextFilterProps<T extends FieldValues> extends Omit<TextFilterProps, 'filteringText'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CTextFilter: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTextFilterProps<TFieldValues>) =>
|
|
7
|
+
declare const CTextFilter: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTextFilterProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CTextFilter;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextareaProps } from '@cloudscape-design/components';
|
|
3
2
|
import { Control, Path, FieldValues, FieldPathValue, FieldPath, RegisterOptions } from 'react-hook-form';
|
|
4
3
|
export interface CTextareaProps<T extends FieldValues> extends Omit<TextareaProps, 'value'> {
|
|
@@ -8,5 +7,5 @@ export interface CTextareaProps<T extends FieldValues> extends Omit<TextareaProp
|
|
|
8
7
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
9
8
|
shouldUnregister?: boolean;
|
|
10
9
|
}
|
|
11
|
-
declare const CTextarea: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CTextareaProps<TFieldValues>) =>
|
|
10
|
+
declare const CTextarea: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CTextareaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default CTextarea;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { TilesProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CTilesProps<T extends FieldValues> extends Omit<TilesProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CTiles: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTilesProps<TFieldValues>) =>
|
|
7
|
+
declare const CTiles: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CTilesProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CTiles;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { TimeInputProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CTimeInputProps<T extends FieldValues> extends Omit<TimeInputProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CTimeInput: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CTimeInputProps<TFieldValues>) =>
|
|
7
|
+
declare const CTimeInput: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CTimeInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CTimeInput;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
2
|
import { ToggleProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CToggleProps<T extends FieldValues> extends Omit<ToggleProps, 'checked'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CToggle: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CToggleProps<TFieldValues>) =>
|
|
7
|
+
declare const CToggle: <TFieldValues extends FieldValues>({ name, control, onChange, ...props }: CToggleProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CToggle;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Control, FieldValues, FieldPathValue, RegisterOptions, FieldPath } from 'react-hook-form';
|
|
3
2
|
import { DatePickerProps } from '@cloudscape-design/components';
|
|
4
3
|
export interface CDatePickerProps<T extends FieldValues> extends Omit<DatePickerProps, 'value'> {
|
|
@@ -10,5 +9,5 @@ export interface CDatePickerProps<T extends FieldValues> extends Omit<DatePicker
|
|
|
10
9
|
onBlur?: DatePickerProps['onBlur'];
|
|
11
10
|
onChange?: DatePickerProps['onChange'];
|
|
12
11
|
}
|
|
13
|
-
declare const CDatePicker: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CDatePickerProps<TFieldValues>) =>
|
|
12
|
+
declare const CDatePicker: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default CDatePicker;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { Controller } from 'react-hook-form';
|
|
4
5
|
import { DatePicker } from '@cloudscape-design/components';
|
|
5
6
|
const CDatePicker = (_a) => {
|
|
@@ -10,7 +11,7 @@ const CDatePicker = (_a) => {
|
|
|
10
11
|
const handleOnChange = useCallback((event) => {
|
|
11
12
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
12
13
|
}, [onChange]);
|
|
13
|
-
return (
|
|
14
|
+
return (_jsx(Controller, { name: name, control: control, defaultValue: defaultValue, rules: rules, shouldUnregister: shouldUnregister, render: ({ field: { ref, onChange: formOnChange, onBlur: formOnBlur, value } }) => (_jsx(DatePicker, Object.assign({ ref: ref, name: name, value: value, onBlur: (e) => {
|
|
14
15
|
formOnBlur();
|
|
15
16
|
handleOnBlur(e);
|
|
16
17
|
}, onChange: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../src/components/date-picker/date-picker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../src/components/date-picker/date-picker.tsx"],"names":[],"mappings":";;AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAoE,MAAM,iBAAiB,CAAC;AAC/G,OAAO,EAAE,UAAU,EAA6C,MAAM,+BAA+B,CAAC;AAYtG,MAAM,WAAW,GAAG,CAAmC,EAStB,EAAE,EAAE;QATkB,EACrD,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,KAAK,EACL,gBAAgB,GAAG,KAAK,EACxB,MAAM,EACN,QAAQ,OAEuB,EAD5B,KAAK,cAR6C,sFAStD,CADS;IAER,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAqC,EAAE,EAAE;QACxC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,KAAK,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,KAA6D,EAAE,EAAE;QAChE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAAK,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CACjF,KAAC,UAAU,kBACT,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;gBACZ,UAAU,EAAE,CAAC;gBACb,YAAY,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC7B,cAAc,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC,IACG,KAAK,EACT,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DateRangePickerProps } from '@cloudscape-design/components';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
import { Control, Path, FieldValues } from 'react-hook-form';
|
|
4
3
|
export interface CDateRangePickerProps<T extends FieldValues> extends Omit<DateRangePickerProps, 'value'> {
|
|
5
4
|
name: Path<T>;
|
|
6
5
|
control?: Control<T>;
|
|
7
6
|
}
|
|
8
|
-
declare const CDateRangePicker: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CDateRangePickerProps<TFieldValues>) =>
|
|
7
|
+
declare const CDateRangePicker: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, ...props }: CDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CDateRangePicker;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { DateRangePicker } from '@cloudscape-design/components';
|
|
3
|
-
import
|
|
4
|
+
import { useCallback } from 'react';
|
|
4
5
|
import { Controller } from 'react-hook-form';
|
|
5
6
|
const CDateRangePicker = (_a) => {
|
|
6
7
|
var { name, control, onBlur, onChange } = _a, props = __rest(_a, ["name", "control", "onBlur", "onChange"]);
|
|
@@ -10,7 +11,7 @@ const CDateRangePicker = (_a) => {
|
|
|
10
11
|
const handleOnChange = useCallback((event) => {
|
|
11
12
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
12
13
|
}, [onChange]);
|
|
13
|
-
return (
|
|
14
|
+
return (_jsx(Controller, { name: name, control: control, render: ({ field: { ref, onBlur: formOnBlur, onChange: formOnChange, value } }) => (_jsx(DateRangePicker, Object.assign({ ref: ref, value: value, onBlur: (e) => {
|
|
14
15
|
formOnBlur();
|
|
15
16
|
handleOnBlur(e);
|
|
16
17
|
}, onChange: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker.js","sourceRoot":"","sources":["../../src/components/date-range-picker/date-range-picker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-range-picker.js","sourceRoot":"","sources":["../../src/components/date-range-picker/date-range-picker.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAwB,eAAe,EAA4B,MAAM,+BAA+B,CAAC;AAChH,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAA8B,MAAM,iBAAiB,CAAC;AAOzE,MAAM,gBAAgB,GAAG,CAAmC,EAMtB,EAAE,EAAE;QANkB,EAC1D,IAAI,EACJ,OAAO,EACP,MAAM,EACN,QAAQ,OAE4B,EADjC,KAAK,cALkD,yCAM3D,CADS;IAER,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAqC,EAAE,EAAE;QACxC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,KAAK,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,KAAkE,EAAE,EAAE;QACrE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAAK,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CACjF,KAAC,eAAe,kBACd,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAmC,EAC1C,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;gBACZ,UAAU,EAAE,CAAC;gBACb,YAAY,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC7B,cAAc,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC,IACG,KAAK,EACT,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|