react-hook-form-cloudscape 1.7.9-dev.1 → 1.7.10
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/dist/components/attribute-editor/index.d.ts +0 -1
- package/dist/components/attribute-editor/index.js +2 -3
- package/dist/components/autosuggest/index.d.ts +0 -1
- package/dist/components/autosuggest/index.js +2 -3
- package/dist/components/cards/index.d.ts +0 -1
- package/dist/components/cards/index.js +1 -2
- package/dist/components/checkbox/index.d.ts +0 -1
- package/dist/components/checkbox/index.js +1 -2
- package/dist/components/code-editor/index.d.ts +0 -1
- package/dist/components/code-editor/index.js +2 -3
- package/dist/components/date-picker/index.d.ts +0 -1
- package/dist/components/date-picker/index.js +2 -3
- package/dist/components/date-range-picker/index.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +2 -3
- package/dist/components/file-upload/index.d.ts +0 -1
- package/dist/components/file-upload/index.js +2 -3
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/input/index.js +2 -3
- package/dist/components/multiselect/index.d.ts +0 -2
- package/dist/components/multiselect/index.js +2 -5
- package/dist/components/multiselect/index.js.map +1 -1
- package/dist/components/multiselect/utils.js +9 -10
- package/dist/components/multiselect/utils.js.map +1 -1
- package/dist/components/property-filter/index.d.ts +0 -1
- package/dist/components/property-filter/index.js +2 -3
- package/dist/components/radio-group/index.d.ts +0 -1
- package/dist/components/radio-group/index.js +2 -3
- package/dist/components/s3-resource-selector/index.d.ts +0 -1
- package/dist/components/s3-resource-selector/index.js +2 -3
- package/dist/components/select/index.d.ts +0 -2
- package/dist/components/select/index.js +2 -5
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +0 -1
- package/dist/components/slider/index.js +2 -3
- package/dist/components/tag-editor/index.d.ts +0 -1
- package/dist/components/tag-editor/index.js +2 -3
- package/dist/components/text-filter/index.d.ts +0 -1
- package/dist/components/text-filter/index.js +2 -3
- package/dist/components/textarea/index.d.ts +0 -1
- package/dist/components/textarea/index.js +2 -3
- package/dist/components/tiles/index.d.ts +0 -1
- package/dist/components/tiles/index.js +2 -3
- package/dist/components/time-input/index.d.ts +0 -1
- package/dist/components/time-input/index.js +2 -3
- package/dist/components/toggle/index.d.ts +0 -1
- package/dist/components/toggle/index.js +2 -3
- package/dist/index.d.ts +42 -21
- package/dist/index.js +30 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as u } from "./utils.js";
|
|
1
|
+
import { default as o } from "./multiselect.js";
|
|
3
2
|
export {
|
|
4
|
-
|
|
5
|
-
u as MultiSelectUtils,
|
|
6
|
-
a as default
|
|
3
|
+
o as default
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const g = (f = []) => f != null && f.length ? f.map((r) => "options" in r ? g(r.options) : r.value).flat() : [], v = (f = [], r = []) => f != null && f.length && (r != null && r.length) ? f.reduce((a, h) => {
|
|
2
2
|
if (f != null && f.length) {
|
|
3
|
-
if ("options" in
|
|
4
|
-
const u =
|
|
5
|
-
u != null && u.length &&
|
|
3
|
+
if ("options" in h) {
|
|
4
|
+
const u = v(h.options, r);
|
|
5
|
+
u != null && u.length && a.push(...u);
|
|
6
6
|
}
|
|
7
|
-
"value" in
|
|
7
|
+
"value" in h && r.find((u) => u === h.value) && a.push(h);
|
|
8
8
|
}
|
|
9
|
-
return
|
|
10
|
-
}, []).flat() : []
|
|
9
|
+
return a;
|
|
10
|
+
}, []).flat() : [];
|
|
11
11
|
export {
|
|
12
|
-
v as
|
|
13
|
-
g as
|
|
14
|
-
l as transformMultiselectOptionsToArray
|
|
12
|
+
v as mapSelectedOptionsWithOptions,
|
|
13
|
+
g as transformMultiselectOptionsToArray
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/components/multiselect/utils.ts"],"sourcesContent":["import { MultiselectProps } from \"@cloudscape-design/components/multiselect/interfaces\";\n\nexport const transformMultiselectOptionsToArray = (\n selectedOptions: MultiselectProps.Options = [],\n): string[] => {\n if (selectedOptions?.length) {\n return selectedOptions\n .map((option: MultiselectProps.Option | MultiselectProps.OptionGroup) => {\n if (\"options\" in option) {\n return transformMultiselectOptionsToArray(option.options);\n }\n\n return option.value;\n })\n .flat() as string[];\n }\n\n return [];\n};\n\nexport const mapSelectedOptionsWithOptions = (\n options: MultiselectProps.Options = [],\n selectedOptions: string[] = [],\n): Array<MultiselectProps.Option | MultiselectProps.OptionGroup> => {\n if (options?.length && selectedOptions?.length) {\n return options\n .reduce((accOptions: Array<MultiselectProps.Option | MultiselectProps.OptionGroup>, currentOption) => {\n if (options?.length) {\n if (\"options\" in currentOption) {\n const matchedOptions = mapSelectedOptionsWithOptions(currentOption.options, selectedOptions);\n\n if (matchedOptions?.length) {\n accOptions.push(...matchedOptions);\n }\n }\n\n if (\"value\" in currentOption) {\n if (selectedOptions.find((record) => record === currentOption.value)) {\n accOptions.push(currentOption);\n }\n }\n }\n\n return accOptions;\n }, [])\n .flat();\n }\n\n return [];\n};\n\nconst MultiSelectUtils = { transformMultiselectOptionsToArray, mapSelectedOptionsWithOptions };\n\nexport default MultiSelectUtils;\n"],"names":["transformMultiselectOptionsToArray","selectedOptions","option","mapSelectedOptionsWithOptions","options","accOptions","currentOption","matchedOptions","record"
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/components/multiselect/utils.ts"],"sourcesContent":["import { MultiselectProps } from \"@cloudscape-design/components/multiselect/interfaces\";\n\nexport const transformMultiselectOptionsToArray = (\n selectedOptions: MultiselectProps.Options = [],\n): string[] => {\n if (selectedOptions?.length) {\n return selectedOptions\n .map((option: MultiselectProps.Option | MultiselectProps.OptionGroup) => {\n if (\"options\" in option) {\n return transformMultiselectOptionsToArray(option.options);\n }\n\n return option.value;\n })\n .flat() as string[];\n }\n\n return [];\n};\n\nexport const mapSelectedOptionsWithOptions = (\n options: MultiselectProps.Options = [],\n selectedOptions: string[] = [],\n): Array<MultiselectProps.Option | MultiselectProps.OptionGroup> => {\n if (options?.length && selectedOptions?.length) {\n return options\n .reduce((accOptions: Array<MultiselectProps.Option | MultiselectProps.OptionGroup>, currentOption) => {\n if (options?.length) {\n if (\"options\" in currentOption) {\n const matchedOptions = mapSelectedOptionsWithOptions(currentOption.options, selectedOptions);\n\n if (matchedOptions?.length) {\n accOptions.push(...matchedOptions);\n }\n }\n\n if (\"value\" in currentOption) {\n if (selectedOptions.find((record) => record === currentOption.value)) {\n accOptions.push(currentOption);\n }\n }\n }\n\n return accOptions;\n }, [])\n .flat();\n }\n\n return [];\n};\n\nconst MultiSelectUtils = { transformMultiselectOptionsToArray, mapSelectedOptionsWithOptions };\n\nexport default MultiSelectUtils;\n"],"names":["transformMultiselectOptionsToArray","selectedOptions","option","mapSelectedOptionsWithOptions","options","accOptions","currentOption","matchedOptions","record"],"mappings":"AAEO,MAAMA,IAAqC,CAChDC,IAA4C,OAExCA,KAAA,QAAAA,EAAiB,SACZA,EACJ,IAAI,CAACC,MACA,aAAaA,IACRF,EAAmCE,EAAO,OAAO,IAGnDA,EAAO,KACf,EACA,KAAK,IAGH,CAAC,GAGGC,IAAgC,CAC3CC,IAAoC,IACpCH,IAA4B,CAAA,MAExBG,KAAA,QAAAA,EAAS,WAAUH,KAAA,QAAAA,EAAiB,UAC/BG,EACJ,OAAO,CAACC,GAA2EC,MAAkB;AACpG,MAAIF,KAAA,QAAAA,EAAS,QAAQ;AACnB,QAAI,aAAaE,GAAe;AAC9B,YAAMC,IAAiBJ,EAA8BG,EAAc,SAASL,CAAe;AAE3F,MAAIM,KAAA,QAAAA,EAAgB,UACPF,EAAA,KAAK,GAAGE,CAAc;AAAA,IACnC;AAGF,IAAI,WAAWD,KACTL,EAAgB,KAAK,CAACO,MAAWA,MAAWF,EAAc,KAAK,KACjED,EAAW,KAAKC,CAAa;AAAA,EAEjC;AAGK,SAAAD;AAAA,GACN,CAAA,CAAE,EACJ,KAAK,IAGH,CAAC;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CS3ResourceSelector as r
|
|
1
|
+
import { CS3ResourceSelector as r } from "./s3-resource-selector.js";
|
|
2
2
|
export {
|
|
3
|
-
r as
|
|
4
|
-
c as default
|
|
3
|
+
r as default
|
|
5
4
|
};
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as o } from "./utils.js";
|
|
1
|
+
import { default as o } from "./select.js";
|
|
3
2
|
export {
|
|
4
|
-
|
|
5
|
-
o as SelectUtils,
|
|
6
|
-
a as default
|
|
3
|
+
o as default
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
1
|
+
export { default as CAttributeEditor } from './components/attribute-editor';
|
|
2
|
+
export type { CAttributeEditorProps } from './components/attribute-editor';
|
|
3
|
+
export { default as CAutosuggest } from './components/autosuggest';
|
|
4
|
+
export type { CAutosuggestProps } from './components/autosuggest';
|
|
5
|
+
export { default as CCards } from './components/cards';
|
|
6
|
+
export type { ControlledCardsProps } from './components/cards';
|
|
7
|
+
export { default as CCheckbox } from './components/checkbox';
|
|
8
|
+
export type { CCheckboxProps } from './components/checkbox';
|
|
9
|
+
export { default as CCodeEditor } from './components/code-editor';
|
|
10
|
+
export type { CCodeEditorProps } from './components/code-editor';
|
|
11
|
+
export { default as CDatePicker } from './components/date-picker';
|
|
12
|
+
export type { CDatePickerProps } from './components/date-picker';
|
|
13
|
+
export { default as CDateRangePicker } from './components/date-range-picker';
|
|
14
|
+
export type { CDateRangePickerProps } from './components/date-range-picker';
|
|
15
|
+
export { default as CFileUpload } from './components/file-upload';
|
|
16
|
+
export type { ControlledFileUploadProps } from './components/file-upload';
|
|
17
|
+
export { default as CInput } from './components/input';
|
|
18
|
+
export type { CInputProps } from './components/input';
|
|
19
|
+
export { default as CMultiselect } from './components/multiselect';
|
|
20
|
+
export type { ControlledMultiselectProps } from './components/multiselect';
|
|
21
|
+
export { default as CPropertyFilter } from './components/property-filter';
|
|
22
|
+
export type { ControlledPropertyFilterProps } from './components/property-filter';
|
|
23
|
+
export { default as CRadioGroup } from './components/radio-group';
|
|
24
|
+
export type { CRadioGroupProps } from './components/radio-group';
|
|
25
|
+
export { default as CS3ResourceSelector } from './components/s3-resource-selector';
|
|
26
|
+
export type { ControlledS3ResourceSelectorProps } from './components/s3-resource-selector';
|
|
27
|
+
export { default as CSelect } from './components/select';
|
|
28
|
+
export type { CSelectProps } from './components/select';
|
|
29
|
+
export { default as CSlider } from './components/slider';
|
|
30
|
+
export type { CSliderProps } from './components/slider';
|
|
31
|
+
export { default as CTagEditor } from './components/tag-editor';
|
|
32
|
+
export type { CTagEditorProps } from './components/tag-editor';
|
|
33
|
+
export { default as CTextFilter } from './components/text-filter';
|
|
34
|
+
export type { CTextFilterProps } from './components/text-filter';
|
|
35
|
+
export { default as CTextarea } from './components/textarea';
|
|
36
|
+
export type { CTextareaProps } from './components/textarea';
|
|
37
|
+
export { default as CTiles } from './components/tiles';
|
|
38
|
+
export type { CTilesProps } from './components/tiles';
|
|
39
|
+
export { default as CTimeInput } from './components/time-input';
|
|
40
|
+
export type { CTimeInputProps } from './components/time-input';
|
|
41
|
+
export { default as CToggle } from './components/toggle';
|
|
42
|
+
export type { CToggleProps } from './components/toggle';
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,45 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
1
|
+
import { default as t } from "./components/attribute-editor/attribute-editor.js";
|
|
2
|
+
import { CAutosuggest as a } from "./components/autosuggest/autosuggest.js";
|
|
3
|
+
import { CCards as l } from "./components/cards/cards.js";
|
|
4
|
+
import { default as d } from "./components/checkbox/checkbox.js";
|
|
5
|
+
import { default as x } from "./components/code-editor/code-editor.js";
|
|
6
6
|
import { default as m } from "./components/date-picker/date-picker.js";
|
|
7
7
|
import { default as i } from "./components/date-range-picker/date-range-picker.js";
|
|
8
8
|
import { CFileUpload as g } from "./components/file-upload/file-upload.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as n } from "./components/multiselect/
|
|
9
|
+
import { default as S } from "./components/input/input.js";
|
|
10
|
+
import { default as n } from "./components/multiselect/multiselect.js";
|
|
11
11
|
import { CPropertyFilter as F } from "./components/property-filter/property-filter.js";
|
|
12
12
|
import { default as R } from "./components/radio-group/radio-group.js";
|
|
13
|
-
import { CS3ResourceSelector as
|
|
14
|
-
import { default as
|
|
13
|
+
import { CS3ResourceSelector as A } from "./components/s3-resource-selector/s3-resource-selector.js";
|
|
14
|
+
import { default as I } from "./components/select/select.js";
|
|
15
|
+
import { default as y } from "./components/slider/slider.js";
|
|
15
16
|
import { default as M } from "./components/tag-editor/tag-editor.js";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { default as K } from "./components/code-editor/code-editor.js";
|
|
22
|
-
import { default as N } from "./components/attribute-editor/attribute-editor.js";
|
|
23
|
-
import { default as Q } from "./components/tiles/tiles.js";
|
|
17
|
+
import { default as j } from "./components/text-filter/text-filter.js";
|
|
18
|
+
import { default as v } from "./components/textarea/textarea.js";
|
|
19
|
+
import { default as z } from "./components/tiles/tiles.js";
|
|
20
|
+
import { default as H } from "./components/time-input/time-input.js";
|
|
21
|
+
import { default as K } from "./components/toggle/toggle.js";
|
|
24
22
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
t as CAttributeEditor,
|
|
24
|
+
a as CAutosuggest,
|
|
25
|
+
l as CCards,
|
|
26
|
+
d as CCheckbox,
|
|
27
|
+
x as CCodeEditor,
|
|
30
28
|
m as CDatePicker,
|
|
31
29
|
i as CDateRangePicker,
|
|
32
30
|
g as CFileUpload,
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
S as CInput,
|
|
32
|
+
n as CMultiselect,
|
|
35
33
|
F as CPropertyFilter,
|
|
36
34
|
R as CRadioGroup,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
A as CS3ResourceSelector,
|
|
36
|
+
I as CSelect,
|
|
37
|
+
y as CSlider,
|
|
40
38
|
M as CTagEditor,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
n as MultiSelectUtils,
|
|
47
|
-
u as SelectUtils
|
|
39
|
+
j as CTextFilter,
|
|
40
|
+
v as CTextarea,
|
|
41
|
+
z as CTiles,
|
|
42
|
+
H as CTimeInput,
|
|
43
|
+
K as CToggle
|
|
48
44
|
};
|
|
49
45
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED