@nolwenture/formik-jsonschema-form 1.0.0-beta.32 → 1.0.0-beta.34

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 (28) hide show
  1. package/dist/cjs/Form/components/FieldInfo.js +1 -0
  2. package/dist/cjs/Form/components/Form.js +3 -23
  3. package/dist/cjs/Form/fields/ObjectField/styledComponents.js +11 -38
  4. package/dist/cjs/Form/styles/common.js +1 -1
  5. package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +7 -2
  6. package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +2 -3
  7. package/dist/cjs/utils/index.js +1 -0
  8. package/dist/cjs/utils/setTitleValues.js +20 -0
  9. package/dist/esm/Form/components/FieldInfo.js +1 -0
  10. package/dist/esm/Form/components/Form.js +3 -23
  11. package/dist/esm/Form/fields/ObjectField/styledComponents.js +10 -37
  12. package/dist/esm/Form/styles/common.js +1 -1
  13. package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +8 -3
  14. package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +2 -3
  15. package/dist/esm/utils/index.js +1 -0
  16. package/dist/esm/utils/setTitleValues.js +16 -0
  17. package/dist/types/Form/components/Form.d.ts +2 -1
  18. package/dist/types/Form/components/index.d.ts +13 -36
  19. package/dist/types/Form/fields/ArrayField/styledComponents.d.ts +6 -18
  20. package/dist/types/Form/fields/ObjectField/index.d.ts +5 -16
  21. package/dist/types/Form/fields/ObjectField/styledComponents.d.ts +6 -16
  22. package/dist/types/Form/fields/ObjectField/types.d.ts +2 -0
  23. package/dist/types/Form/fields/index.d.ts +11 -34
  24. package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.d.ts +3 -2
  25. package/dist/types/Form/templates/index.d.ts +1 -1
  26. package/dist/types/utils/index.d.ts +1 -0
  27. package/dist/types/utils/setTitleValues.d.ts +1 -0
  28. package/package.json +1 -1
@@ -90,6 +90,7 @@ exports.FieldInfoContainer = styled_components_1.styled.a `
90
90
  padding: ${(props) => `0 ${props.theme.spacing.s}`};
91
91
  text-decoration: unset;
92
92
  margin: ${(props) => `0 ${props.theme.spacing.s} 0 -${props.theme.spacing.xs}`};
93
+ width: fit-content;
93
94
 
94
95
  &:active,
95
96
  &:focus {
@@ -39,34 +39,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.FormButton = exports.FormButtonWrapper = exports.Form = void 0;
40
40
  const styled_components_1 = __importDefault(require("styled-components"));
41
41
  const formik = __importStar(require("formik"));
42
- const polished_1 = require("polished");
42
+ const component_library_1 = require("@nolwenture/component-library");
43
43
  exports.Form = (0, styled_components_1.default)(formik.Form) `
44
-
45
-
46
44
  color: ${(props) => props.theme.color.text.default};
47
45
  font-family: ${(props) => props.theme.typography.fontFamily.base};
48
-
49
46
 
50
-
51
- :focus {
47
+ :focus {
52
48
  ${(props) => props.theme.focus.default};
53
49
  }
54
50
  `;
55
51
  exports.FormButtonWrapper = styled_components_1.default.div ``;
56
- exports.FormButton = styled_components_1.default.button `
57
- background-color: ${(props) => props.theme.color.intent.default.none};
58
- border: none;
59
- font-family: ${(props) => props.theme.typography.fontFamily.base};
60
- font-size: ${(props) => props.theme.typography.size.base};
61
- padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
62
- transition: 0.2s background ease;
63
-
64
- &:hover {
65
- background-color: ${(props) => (0, polished_1.darken)(0.1, props.theme.color.intent.default.none)};
66
- color: ${(props) => (0, polished_1.readableColor)((0, polished_1.darken)(0.1, props.theme.color.intent.default.none))};
67
- }
68
-
69
- &:focus {
70
- ${(props) => props.theme.focus.default};
71
- }
72
- `;
52
+ exports.FormButton = (0, styled_components_1.default)(component_library_1.Button) ``;
@@ -1,54 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectFieldSectionTitle = exports.ObjectFieldSectionWrapper = exports.ObjectFieldAddButton = exports.ObjectFieldRemoveButton = exports.ObjectFieldDownButton = exports.ObjectFieldUpButton = exports.ObjectFieldLineButton = exports.ObjectFieldButton = exports.ObjectFieldItemButtons = exports.ObjectFieldItem = exports.ObjectFieldWrapper = void 0;
3
+ exports.ObjectFieldSectionTitle = exports.ObjectFieldSectionWrapper = exports.ObjectFieldAddButton = exports.ObjectFieldRemoveButton = exports.ObjectFieldDownButton = exports.ObjectFieldUpButton = exports.ObjectFieldButton = exports.ObjectFieldItemButtons = exports.ObjectFieldItem = exports.ObjectFieldWrapper = void 0;
4
4
  const styled_components_1 = require("styled-components");
5
- const polished_1 = require("polished");
6
5
  const common_1 = require("../../styles/common");
7
- exports.ObjectFieldWrapper = (0, styled_components_1.styled)(common_1.CommonFieldWrapper) `
8
- button {
9
- background-color: ${(props) => props.theme.color.intent.default.none};
10
- border: none;
11
- font-family: ${(props) => props.theme.typography.fontFamily.base};
12
- font-size: ${(props) => props.theme.typography.size.base};
13
- padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
14
- transition: 0.2s background ease;
15
-
16
- &:hover {
17
- background-color: ${(props) => (0, polished_1.darken)(0.1, props.theme.color.intent.default.none)};
18
- color: ${(props) => (0, polished_1.readableColor)((0, polished_1.darken)(0.1, props.theme.color.intent.default.none))};
19
- }
20
-
21
- &:focus {
22
- ${(props) => props.theme.focus.default};
23
- }
24
- }
25
-
26
- `;
6
+ const component_library_1 = require("@nolwenture/component-library");
7
+ exports.ObjectFieldWrapper = (0, styled_components_1.styled)(common_1.CommonFieldWrapper) ``;
27
8
  exports.ObjectFieldItem = styled_components_1.styled.li `
28
9
  color: ${(props) => props.theme.color.text.default};
29
10
  display: flex;
30
11
  `;
31
12
  exports.ObjectFieldItemButtons = styled_components_1.styled.div `
13
+ align-items: flex-start;
32
14
  display: flex;
15
+ gap: ${(props) => props.theme.spacing.s};
33
16
  margin: ${(props) => props.theme.spacing.s};
34
17
  `;
35
- exports.ObjectFieldButton = styled_components_1.styled.a `
36
- background-color: ${(props) => props.theme.color.intent.default.none};
37
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
38
- color: ${(props) => props.theme.color.palette.neutral[900]};
39
- cursor: pointer;
40
- display: inline-block;
41
- font-weight: ${(props) => props.theme.typography.weight.bold};
42
- height: ${(props) => props.theme.spacing.l};
43
- line-height: ${(props) => props.theme.spacing.l};
44
- width: auto;
45
- padding: ${(props) => `${props.theme.spacing.xs} ${props.theme.spacing.s}`};
46
- text-align: center;
18
+ exports.ObjectFieldButton = (0, styled_components_1.styled)(component_library_1.Button) `
19
+ line-height: 1;
20
+ padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.m}`};
47
21
  `;
48
- exports.ObjectFieldLineButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
49
- exports.ObjectFieldUpButton = (0, styled_components_1.styled)(exports.ObjectFieldLineButton) ``;
50
- exports.ObjectFieldDownButton = (0, styled_components_1.styled)(exports.ObjectFieldLineButton) ``;
51
- exports.ObjectFieldRemoveButton = (0, styled_components_1.styled)(exports.ObjectFieldLineButton) ``;
22
+ exports.ObjectFieldUpButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
23
+ exports.ObjectFieldDownButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
24
+ exports.ObjectFieldRemoveButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
52
25
  exports.ObjectFieldAddButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
53
26
  exports.ObjectFieldSectionWrapper = styled_components_1.styled.fieldset ``;
54
27
  exports.ObjectFieldSectionTitle = styled_components_1.styled.legend ``;
@@ -44,7 +44,7 @@ exports.CommonFieldWrapper = styled_components_1.styled.div `
44
44
  font-size: ${(props) => props.theme.typography.size.base};
45
45
  font-weight: ${(props) => props.theme.typography.weight.normal};
46
46
  outline: none;
47
- padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.m}`};
47
+ padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.xxxxl} ${props.theme.spacing.s} ${props.theme.spacing.m}`};
48
48
  width: 100%;
49
49
 
50
50
  background-image: ${(props) => `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 320 512'%3E%3Cpath fill='${encodeURIComponent(props.theme.color.text.default)}' d='M31 192h258c17 0 26 21 14 33l-129 129c-8 8-21 8-29 0L17 225c-12-12-3-33 14-33z'/%3E%3C/svg%3E")`};
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CollapsibleObjectFieldTemplate = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const formik_1 = require("formik");
5
6
  const react_1 = require("react");
6
7
  const utils_1 = require("../../../utils");
7
8
  const FormRegistry_1 = require("../../FormRegistry");
@@ -10,7 +11,9 @@ const CollapsibleObjectFieldTemplate = (props) => {
10
11
  const { components } = (0, react_1.useContext)(FormRegistry_1.FormRegistry);
11
12
  const { Toggle, ChildrenWrapper, RequiredIndicator, Icon, Description, Title, Wrapper, Help, Info, } = (0, styledComponents_1.getComponents)(components);
12
13
  const { children, name, uiSchema, ...otherProps } = props;
13
- const title = (0, utils_1.getTitle)(props);
14
+ const formikCtx = (0, formik_1.useFormikContext)();
15
+ const values = formikCtx.values ? formikCtx.values : {};
16
+ const title = (0, utils_1.setTitleValues)(name, ((0, utils_1.getTitle)(props) ?? ""), values);
14
17
  const description = (0, utils_1.getDescription)(props);
15
18
  const { help, info, isCollapsedOnLoad = true, openIcon, collapsedIcon,
16
19
  //TODO: This is not right
@@ -29,6 +32,8 @@ const CollapsibleObjectFieldTemplate = (props) => {
29
32
  };
30
33
  const [collapsed, setCollapsed] = (0, react_1.useState)(isCollapsedOnLoad);
31
34
  const hide = collapsed;
32
- return ((0, jsx_runtime_1.jsxs)(Wrapper, { ...mergedWrapperProps, children: [title && ((0, jsx_runtime_1.jsx)(Toggle, { onClick: () => setCollapsed(!collapsed), ariaExpanded: !hide, ariaLabel: ariaLabel ?? name, children: (0, jsx_runtime_1.jsxs)(Title, { ...titleProps, children: [title, props?.required && (0, jsx_runtime_1.jsx)(RequiredIndicator, {}), (0, jsx_runtime_1.jsx)(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && (0, jsx_runtime_1.jsx)(Info, { ...info }), description && ((0, jsx_runtime_1.jsx)(Description, { ...descriptionProps, children: description })), !hide && (0, jsx_runtime_1.jsx)(ChildrenWrapper, { children: children }), help && (0, jsx_runtime_1.jsx)(Help, { ...helpProps, children: help })] }));
35
+ return ((0, jsx_runtime_1.jsxs)(Wrapper, { ...mergedWrapperProps, children: [title && ((0, jsx_runtime_1.jsx)(Toggle, { onClick: () => setCollapsed(!collapsed),
36
+ //ariaExpanded={!hide}
37
+ ariaLabel: ariaLabel ?? name, children: (0, jsx_runtime_1.jsxs)(Title, { ...titleProps, children: [title, props?.required && (0, jsx_runtime_1.jsx)(RequiredIndicator, {}), (0, jsx_runtime_1.jsx)(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && (0, jsx_runtime_1.jsx)(Info, { ...info }), description && ((0, jsx_runtime_1.jsx)(Description, { ...descriptionProps, children: description })), !hide && (0, jsx_runtime_1.jsx)(ChildrenWrapper, { children: children }), help && (0, jsx_runtime_1.jsx)(Help, { ...helpProps, children: help })] }));
33
38
  };
34
39
  exports.CollapsibleObjectFieldTemplate = CollapsibleObjectFieldTemplate;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CollapsibleObjectFieldTemplateChildWrapper = exports.CollapsibleObjectFieldTemplateToggle = exports.CollapsibleObjectFieldTemplateErrorMessage = exports.CollapsibleObjectFieldTemplateRequiredIndicator = exports.CollapsibleObjectFieldTemplateInfo = exports.CollapsibleObjectFieldTemplateHelp = exports.CollapsibleObjectFieldTemplateDescription = exports.CollapsibleObjectFieldTemplateTitle = exports.CollapsibleObjectFieldTemplateIcon = exports.CollapsibleObjectFieldTemplateWrapper = void 0;
4
4
  exports.getComponents = getComponents;
5
5
  const styled_components_1 = require("styled-components");
6
- const Clickable_1 = require("../../components/Clickable");
7
6
  const styledComponents_1 = require("../ObjectFieldTemplate/styledComponents");
7
+ const component_library_1 = require("@nolwenture/component-library");
8
8
  exports.CollapsibleObjectFieldTemplateWrapper = undefined;
9
9
  exports.CollapsibleObjectFieldTemplateIcon = undefined;
10
10
  exports.CollapsibleObjectFieldTemplateTitle = (0, styled_components_1.styled)(styledComponents_1.ObjectFieldTemplateTitle) `
@@ -16,10 +16,9 @@ exports.CollapsibleObjectFieldTemplateHelp = undefined;
16
16
  exports.CollapsibleObjectFieldTemplateInfo = undefined;
17
17
  exports.CollapsibleObjectFieldTemplateRequiredIndicator = undefined;
18
18
  exports.CollapsibleObjectFieldTemplateErrorMessage = undefined;
19
- exports.CollapsibleObjectFieldTemplateToggle = (0, styled_components_1.styled)(Clickable_1.Clickable) `
19
+ exports.CollapsibleObjectFieldTemplateToggle = (0, styled_components_1.styled)(component_library_1.Button) `
20
20
  display: flex;
21
21
  flex-direction: column;
22
- //width: 100%;
23
22
  `;
24
23
  exports.CollapsibleObjectFieldTemplateChildWrapper = styled_components_1.styled.div `
25
24
  `;
@@ -27,6 +27,7 @@ __exportStar(require("./createInitialValues"), exports);
27
27
  __exportStar(require("./createValidationSchema"), exports);
28
28
  __exportStar(require("./orderByUiSchema"), exports);
29
29
  __exportStar(require("./orderAdditionalProperties"), exports);
30
+ __exportStar(require("./setTitleValues"), exports);
30
31
  //TODO: REMOVE WHEN ALL SUPPORTED
31
32
  const warnFromUnsupportedKeys = (componentName, data, supportedKeys) => {
32
33
  Object.keys(data).forEach((key) => {
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setTitleValues = void 0;
4
+ const formik_1 = require("formik");
5
+ // Replaces template string variables with form data for CollapsibleObjectFieldTemplate titles
6
+ const setTitleValues = (name, title, values) => {
7
+ const match = name.match(/^([a-zA-Z_$][\w$]*)\[(\d+)\]$/);
8
+ if (match) {
9
+ name = match[1];
10
+ }
11
+ const index = match ? parseInt(match[2]) : -1;
12
+ const itemValues = match ? values[name][index] : values[name];
13
+ return title.replace(/\$\{([\w$.]+)\}/g, (match) => {
14
+ const keyMatch = match.match(/^\$\{([\w$.]+)\}$/);
15
+ const key = keyMatch ? keyMatch[1] : "";
16
+ return key === "index" ? (index + 1).toString() :
17
+ (0, formik_1.getIn)(itemValues, key) !== undefined ? (0, formik_1.getIn)(itemValues, key) : key;
18
+ });
19
+ };
20
+ exports.setTitleValues = setTitleValues;
@@ -87,6 +87,7 @@ export const FieldInfoContainer = styled.a `
87
87
  padding: ${(props) => `0 ${props.theme.spacing.s}`};
88
88
  text-decoration: unset;
89
89
  margin: ${(props) => `0 ${props.theme.spacing.s} 0 -${props.theme.spacing.xs}`};
90
+ width: fit-content;
90
91
 
91
92
  &:active,
92
93
  &:focus {
@@ -1,33 +1,13 @@
1
1
  import styled from "styled-components";
2
2
  import * as formik from "formik";
3
- import { darken, readableColor } from "polished";
3
+ import { Button } from "@nolwenture/component-library";
4
4
  export const Form = styled(formik.Form) `
5
-
6
-
7
5
  color: ${(props) => props.theme.color.text.default};
8
6
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
-
10
7
 
11
-
12
- :focus {
8
+ :focus {
13
9
  ${(props) => props.theme.focus.default};
14
10
  }
15
11
  `;
16
12
  export const FormButtonWrapper = styled.div ``;
17
- export const FormButton = styled.button `
18
- background-color: ${(props) => props.theme.color.intent.default.none};
19
- border: none;
20
- font-family: ${(props) => props.theme.typography.fontFamily.base};
21
- font-size: ${(props) => props.theme.typography.size.base};
22
- padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
23
- transition: 0.2s background ease;
24
-
25
- &:hover {
26
- background-color: ${(props) => darken(0.1, props.theme.color.intent.default.none)};
27
- color: ${(props) => readableColor(darken(0.1, props.theme.color.intent.default.none))};
28
- }
29
-
30
- &:focus {
31
- ${(props) => props.theme.focus.default};
32
- }
33
- `;
13
+ export const FormButton = styled(Button) ``;
@@ -1,51 +1,24 @@
1
1
  import { styled } from "styled-components";
2
- import { darken, readableColor } from "polished";
3
2
  import { CommonFieldWrapper } from "../../styles/common";
4
- export const ObjectFieldWrapper = styled(CommonFieldWrapper) `
5
- button {
6
- background-color: ${(props) => props.theme.color.intent.default.none};
7
- border: none;
8
- font-family: ${(props) => props.theme.typography.fontFamily.base};
9
- font-size: ${(props) => props.theme.typography.size.base};
10
- padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
11
- transition: 0.2s background ease;
12
-
13
- &:hover {
14
- background-color: ${(props) => darken(0.1, props.theme.color.intent.default.none)};
15
- color: ${(props) => readableColor(darken(0.1, props.theme.color.intent.default.none))};
16
- }
17
-
18
- &:focus {
19
- ${(props) => props.theme.focus.default};
20
- }
21
- }
22
-
23
- `;
3
+ import { Button } from "@nolwenture/component-library";
4
+ export const ObjectFieldWrapper = styled(CommonFieldWrapper) ``;
24
5
  export const ObjectFieldItem = styled.li `
25
6
  color: ${(props) => props.theme.color.text.default};
26
7
  display: flex;
27
8
  `;
28
9
  export const ObjectFieldItemButtons = styled.div `
10
+ align-items: flex-start;
29
11
  display: flex;
12
+ gap: ${(props) => props.theme.spacing.s};
30
13
  margin: ${(props) => props.theme.spacing.s};
31
14
  `;
32
- export const ObjectFieldButton = styled.a `
33
- background-color: ${(props) => props.theme.color.intent.default.none};
34
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
35
- color: ${(props) => props.theme.color.palette.neutral[900]};
36
- cursor: pointer;
37
- display: inline-block;
38
- font-weight: ${(props) => props.theme.typography.weight.bold};
39
- height: ${(props) => props.theme.spacing.l};
40
- line-height: ${(props) => props.theme.spacing.l};
41
- width: auto;
42
- padding: ${(props) => `${props.theme.spacing.xs} ${props.theme.spacing.s}`};
43
- text-align: center;
15
+ export const ObjectFieldButton = styled(Button) `
16
+ line-height: 1;
17
+ padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.m}`};
44
18
  `;
45
- export const ObjectFieldLineButton = styled(ObjectFieldButton) ``;
46
- export const ObjectFieldUpButton = styled(ObjectFieldLineButton) ``;
47
- export const ObjectFieldDownButton = styled(ObjectFieldLineButton) ``;
48
- export const ObjectFieldRemoveButton = styled(ObjectFieldLineButton) ``;
19
+ export const ObjectFieldUpButton = styled(ObjectFieldButton) ``;
20
+ export const ObjectFieldDownButton = styled(ObjectFieldButton) ``;
21
+ export const ObjectFieldRemoveButton = styled(ObjectFieldButton) ``;
49
22
  export const ObjectFieldAddButton = styled(ObjectFieldButton) ``;
50
23
  export const ObjectFieldSectionWrapper = styled.fieldset ``;
51
24
  export const ObjectFieldSectionTitle = styled.legend ``;
@@ -41,7 +41,7 @@ export const CommonFieldWrapper = styled.div `
41
41
  font-size: ${(props) => props.theme.typography.size.base};
42
42
  font-weight: ${(props) => props.theme.typography.weight.normal};
43
43
  outline: none;
44
- padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.m}`};
44
+ padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.xxxxl} ${props.theme.spacing.s} ${props.theme.spacing.m}`};
45
45
  width: 100%;
46
46
 
47
47
  background-image: ${(props) => `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 320 512'%3E%3Cpath fill='${encodeURIComponent(props.theme.color.text.default)}' d='M31 192h258c17 0 26 21 14 33l-129 129c-8 8-21 8-29 0L17 225c-12-12-3-33 14-33z'/%3E%3C/svg%3E")`};
@@ -1,13 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useFormikContext } from "formik";
2
3
  import { useContext, useMemo, useState } from "react";
3
- import { extractUiSchema, getDescription, getTitle } from "../../../utils";
4
+ import { extractUiSchema, getDescription, getTitle, setTitleValues } from "../../../utils";
4
5
  import { FormRegistry } from "../../FormRegistry";
5
6
  import { getComponents } from "./styledComponents";
6
7
  export const CollapsibleObjectFieldTemplate = (props) => {
7
8
  const { components } = useContext(FormRegistry);
8
9
  const { Toggle, ChildrenWrapper, RequiredIndicator, Icon, Description, Title, Wrapper, Help, Info, } = getComponents(components);
9
10
  const { children, name, uiSchema, ...otherProps } = props;
10
- const title = getTitle(props);
11
+ const formikCtx = useFormikContext();
12
+ const values = formikCtx.values ? formikCtx.values : {};
13
+ const title = setTitleValues(name, (getTitle(props) ?? ""), values);
11
14
  const description = getDescription(props);
12
15
  const { help, info, isCollapsedOnLoad = true, openIcon, collapsedIcon,
13
16
  //TODO: This is not right
@@ -26,5 +29,7 @@ export const CollapsibleObjectFieldTemplate = (props) => {
26
29
  };
27
30
  const [collapsed, setCollapsed] = useState(isCollapsedOnLoad);
28
31
  const hide = collapsed;
29
- return (_jsxs(Wrapper, { ...mergedWrapperProps, children: [title && (_jsx(Toggle, { onClick: () => setCollapsed(!collapsed), ariaExpanded: !hide, ariaLabel: ariaLabel ?? name, children: _jsxs(Title, { ...titleProps, children: [title, props?.required && _jsx(RequiredIndicator, {}), _jsx(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && _jsx(Info, { ...info }), description && (_jsx(Description, { ...descriptionProps, children: description })), !hide && _jsx(ChildrenWrapper, { children: children }), help && _jsx(Help, { ...helpProps, children: help })] }));
32
+ return (_jsxs(Wrapper, { ...mergedWrapperProps, children: [title && (_jsx(Toggle, { onClick: () => setCollapsed(!collapsed),
33
+ //ariaExpanded={!hide}
34
+ ariaLabel: ariaLabel ?? name, children: _jsxs(Title, { ...titleProps, children: [title, props?.required && _jsx(RequiredIndicator, {}), _jsx(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && _jsx(Info, { ...info }), description && (_jsx(Description, { ...descriptionProps, children: description })), !hide && _jsx(ChildrenWrapper, { children: children }), help && _jsx(Help, { ...helpProps, children: help })] }));
30
35
  };
@@ -1,6 +1,6 @@
1
1
  import { styled } from "styled-components";
2
- import { Clickable } from "../../components/Clickable";
3
2
  import { ObjectFieldTemplateTitle, } from "../ObjectFieldTemplate/styledComponents";
3
+ import { Button } from "@nolwenture/component-library";
4
4
  export const CollapsibleObjectFieldTemplateWrapper = undefined;
5
5
  export const CollapsibleObjectFieldTemplateIcon = undefined;
6
6
  export const CollapsibleObjectFieldTemplateTitle = styled(ObjectFieldTemplateTitle) `
@@ -12,10 +12,9 @@ export const CollapsibleObjectFieldTemplateHelp = undefined;
12
12
  export const CollapsibleObjectFieldTemplateInfo = undefined;
13
13
  export const CollapsibleObjectFieldTemplateRequiredIndicator = undefined;
14
14
  export const CollapsibleObjectFieldTemplateErrorMessage = undefined;
15
- export const CollapsibleObjectFieldTemplateToggle = styled(Clickable) `
15
+ export const CollapsibleObjectFieldTemplateToggle = styled(Button) `
16
16
  display: flex;
17
17
  flex-direction: column;
18
- //width: 100%;
19
18
  `;
20
19
  export const CollapsibleObjectFieldTemplateChildWrapper = styled.div `
21
20
  `;
@@ -10,6 +10,7 @@ export * from "./createInitialValues";
10
10
  export * from "./createValidationSchema";
11
11
  export * from "./orderByUiSchema";
12
12
  export * from "./orderAdditionalProperties";
13
+ export * from "./setTitleValues";
13
14
  //TODO: REMOVE WHEN ALL SUPPORTED
14
15
  export const warnFromUnsupportedKeys = (componentName, data, supportedKeys) => {
15
16
  Object.keys(data).forEach((key) => {
@@ -0,0 +1,16 @@
1
+ import { getIn } from "formik";
2
+ // Replaces template string variables with form data for CollapsibleObjectFieldTemplate titles
3
+ export const setTitleValues = (name, title, values) => {
4
+ const match = name.match(/^([a-zA-Z_$][\w$]*)\[(\d+)\]$/);
5
+ if (match) {
6
+ name = match[1];
7
+ }
8
+ const index = match ? parseInt(match[2]) : -1;
9
+ const itemValues = match ? values[name][index] : values[name];
10
+ return title.replace(/\$\{([\w$.]+)\}/g, (match) => {
11
+ const keyMatch = match.match(/^\$\{([\w$.]+)\}$/);
12
+ const key = keyMatch ? keyMatch[1] : "";
13
+ return key === "index" ? (index + 1).toString() :
14
+ getIn(itemValues, key) !== undefined ? getIn(itemValues, key) : key;
15
+ });
16
+ };
@@ -1,5 +1,6 @@
1
+ import { Button } from "@nolwenture/component-library";
1
2
  export declare const Form: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>, "ref"> & {
2
3
  ref?: ((instance: HTMLFormElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLFormElement> | null | undefined;
3
4
  }, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>>, keyof import("react").Component<any, {}, any>>;
4
5
  export declare const FormButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
- export declare const FormButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
6
+ export declare const FormButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof Button, keyof import("react").Component<any, {}, any>>;
@@ -11,7 +11,7 @@ export declare const components: {
11
11
  ref?: ((instance: HTMLFormElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLFormElement> | null | undefined;
12
12
  }, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>>, keyof import("react").Component<any, {}, any>>;
13
13
  FormButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
14
- FormButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
14
+ FormButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
15
15
  FieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
16
16
  FieldTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
17
17
  FieldDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
@@ -67,7 +67,7 @@ export declare const components: {
67
67
  CollapsibleObjectFieldTemplateInfo: typeof import("../templates/ObjectFieldTemplate/styledComponents").ObjectFieldTemplateInfo | undefined;
68
68
  CollapsibleObjectFieldTemplateRequiredIndicator: typeof import("../templates/ObjectFieldTemplate/styledComponents").ObjectFieldTemplateRequiredIndicator | undefined;
69
69
  CollapsibleObjectFieldTemplateErrorMessage: typeof import("../templates/ObjectFieldTemplate/styledComponents").ObjectFieldTemplateErrorMessage | undefined;
70
- CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Clickable.ClickableProps, never>> & string & Omit<import("react").FC<Clickable.ClickableProps>, keyof import("react").Component<any, {}, any>>;
70
+ CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
71
71
  CollapsibleObjectFieldTemplateChildWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
72
72
  ArrayFieldTemplateWrapper: typeof import("../templates/ObjectFieldTemplate/styledComponents").ObjectFieldTemplateWrapper | undefined;
73
73
  ArrayFieldTemplateIcon: typeof Icon.Icon | undefined;
@@ -151,22 +151,11 @@ export declare const components: {
151
151
  }, never>> & string;
152
152
  ObjectFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
153
153
  ObjectFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
154
- ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
155
- ObjectFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
156
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
157
- }, never>> & string;
158
- ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
159
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
160
- }, never>, never>> & string;
161
- ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
162
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
163
- }, never>, never>> & string;
164
- ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
165
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
166
- }, never>, never>> & string;
167
- ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
168
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
169
- }, never>> & string;
154
+ ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
155
+ ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
156
+ ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
157
+ ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
158
+ ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
170
159
  ObjectFieldSectionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
171
160
  ObjectFieldSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>> & string;
172
161
  MultipleChoiceFieldInput: ({ inputProps, name, className, enums, style, value, form, }: import("../fields/MultipleChoiceField").MultipleChoiceFieldInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -206,23 +195,11 @@ export declare const components: {
206
195
  }, never>> & string;
207
196
  ArrayFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
208
197
  ArrayFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
209
- ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
210
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
211
- }, never>> & string;
212
- ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
213
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
214
- }, never>, never>> & string;
215
- ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
216
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
217
- }, never>, never>, never>> & string;
218
- ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
219
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
220
- }, never>, never>, never>> & string;
221
- ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
222
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
223
- }, never>, never>, never>> & string;
224
- ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
225
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
226
- }, never>, never>> & string;
198
+ ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
199
+ ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
200
+ ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
201
+ ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
202
+ ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
203
+ ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
227
204
  };
228
205
  export type ComponentsType = typeof components;
@@ -3,21 +3,9 @@ export declare const SelectFieldInputWrapper: import("styled-components/dist/typ
3
3
  }, never>> & string;
4
4
  export declare const ArrayFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
5
5
  export declare const ArrayFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
- export declare const ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
7
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
8
- }, never>> & string;
9
- export declare const ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
10
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
11
- }, never>, never>> & string;
12
- export declare const ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
13
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
14
- }, never>, never>, never>> & string;
15
- export declare const ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
16
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
17
- }, never>, never>, never>> & string;
18
- export declare const ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
19
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
20
- }, never>, never>, never>> & string;
21
- export declare const ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
22
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
23
- }, never>, never>> & string;
6
+ export declare const ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
7
+ export declare const ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
8
+ export declare const ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
9
+ export declare const ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
10
+ export declare const ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
11
+ export declare const ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
@@ -6,22 +6,11 @@ declare const components: {
6
6
  }, never>> & string;
7
7
  ObjectFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
8
8
  ObjectFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
- ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
10
- ObjectFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
11
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
12
- }, never>> & string;
13
- ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
14
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
15
- }, never>, never>> & string;
16
- ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
17
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
18
- }, never>, never>> & string;
19
- ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
20
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
21
- }, never>, never>> & string;
22
- ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
23
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
24
- }, never>> & string;
9
+ ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
10
+ ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
11
+ ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
12
+ ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
13
+ ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
25
14
  ObjectFieldSectionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
26
15
  ObjectFieldSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>> & string;
27
16
  };
@@ -1,23 +1,13 @@
1
+ import { Button } from "@nolwenture/component-library";
1
2
  export declare const ObjectFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
2
3
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
4
  }, never>> & string;
4
5
  export declare const ObjectFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
5
6
  export declare const ObjectFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
- export declare const ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
7
- export declare const ObjectFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
8
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
9
- }, never>> & string;
10
- export declare const ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
11
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
12
- }, never>, never>> & string;
13
- export declare const ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
14
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
15
- }, never>, never>> & string;
16
- export declare const ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
17
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
18
- }, never>, never>> & string;
19
- export declare const ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
20
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
21
- }, never>> & string;
7
+ export declare const ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof Button, keyof import("react").Component<any, {}, any>>;
8
+ export declare const ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
9
+ export declare const ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
10
+ export declare const ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
11
+ export declare const ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
22
12
  export declare const ObjectFieldSectionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
23
13
  export declare const ObjectFieldSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>> & string;
@@ -9,6 +9,8 @@ export type ObjectFieldButtonProps = {
9
9
  purpose: ObjectFieldButtonPurpose;
10
10
  onClick: () => void;
11
11
  uiSchema: UiSchema;
12
+ size?: string;
13
+ intent?: string;
12
14
  };
13
15
  export type ObjectFieldSectionProps = {
14
16
  title: string;
@@ -80,22 +80,11 @@ export declare const fieldComponents: {
80
80
  }, never>> & string;
81
81
  ObjectFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
82
82
  ObjectFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
83
- ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
84
- ObjectFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
85
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
86
- }, never>> & string;
87
- ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
88
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
89
- }, never>, never>> & string;
90
- ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
91
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
92
- }, never>, never>> & string;
93
- ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
94
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
95
- }, never>, never>> & string;
96
- ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
97
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
98
- }, never>> & string;
83
+ ObjectFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
84
+ ObjectFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
85
+ ObjectFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
86
+ ObjectFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
87
+ ObjectFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
99
88
  ObjectFieldSectionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
100
89
  ObjectFieldSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>> & string;
101
90
  MultipleChoiceFieldInput: ({ inputProps, name, className, enums, style, value, form, }: MultipleChoiceField.MultipleChoiceFieldInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -135,24 +124,12 @@ export declare const fieldComponents: {
135
124
  }, never>> & string;
136
125
  ArrayFieldItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
137
126
  ArrayFieldItemButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
138
- ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
139
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
140
- }, never>> & string;
141
- ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
142
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
143
- }, never>, never>> & string;
144
- ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
145
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
146
- }, never>, never>, never>> & string;
147
- ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
148
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
149
- }, never>, never>, never>> & string;
150
- ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
151
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
152
- }, never>, never>, never>> & string;
153
- ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>, "ref"> & {
154
- ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
155
- }, never>, never>> & string;
127
+ ArrayFieldButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>> & string;
128
+ ArrayFieldLineButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
129
+ ArrayFieldUpButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
130
+ ArrayFieldDownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
131
+ ArrayFieldRemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>, never>> & string;
132
+ ArrayFieldAddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>, never>, never>> & string;
156
133
  };
157
134
  export declare const fields: {
158
135
  ToggleField: Field;
@@ -1,6 +1,7 @@
1
1
  import type { ComponentsType } from "../../components";
2
2
  import { ObjectFieldTemplateDescription, ObjectFieldTemplateErrorMessage, ObjectFieldTemplateHelp, ObjectFieldTemplateInfo, ObjectFieldTemplateRequiredIndicator, ObjectFieldTemplateWrapper } from "../ObjectFieldTemplate/styledComponents";
3
3
  import { Icon } from "../../components/Icon";
4
+ import { Button } from "@nolwenture/component-library";
4
5
  export declare const CollapsibleObjectFieldTemplateWrapper: typeof ObjectFieldTemplateWrapper | undefined;
5
6
  export declare const CollapsibleObjectFieldTemplateIcon: typeof Icon | undefined;
6
7
  export declare const CollapsibleObjectFieldTemplateTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, never>, "ref"> & {
@@ -11,7 +12,7 @@ export declare const CollapsibleObjectFieldTemplateHelp: typeof ObjectFieldTempl
11
12
  export declare const CollapsibleObjectFieldTemplateInfo: typeof ObjectFieldTemplateInfo | undefined;
12
13
  export declare const CollapsibleObjectFieldTemplateRequiredIndicator: typeof ObjectFieldTemplateRequiredIndicator | undefined;
13
14
  export declare const CollapsibleObjectFieldTemplateErrorMessage: typeof ObjectFieldTemplateErrorMessage | undefined;
14
- export declare const CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../../components/Clickable").ClickableProps, never>> & string & Omit<import("react").FC<import("../../components/Clickable").ClickableProps>, keyof import("react").Component<any, {}, any>>;
15
+ export declare const CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof Button, keyof import("react").Component<any, {}, any>>;
15
16
  export declare const CollapsibleObjectFieldTemplateChildWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
16
17
  export declare function getComponents(components: ComponentsType): {
17
18
  Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
@@ -28,6 +29,6 @@ export declare function getComponents(components: ComponentsType): {
28
29
  formik: import("formik").FormikContextType<any>;
29
30
  }>;
30
31
  }, any>, {}>, keyof import("react").Component<any, {}, any>>;
31
- Toggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../../components/Clickable").ClickableProps, never>> & string & Omit<import("react").FC<import("../../components/Clickable").ClickableProps>, keyof import("react").Component<any, {}, any>>;
32
+ Toggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof Button, keyof import("react").Component<any, {}, any>>;
32
33
  ChildrenWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
33
34
  };
@@ -31,7 +31,7 @@ export declare const templateComponents: {
31
31
  CollapsibleObjectFieldTemplateInfo: typeof ObjectFieldTemplate.components.ObjectFieldTemplateInfo | undefined;
32
32
  CollapsibleObjectFieldTemplateRequiredIndicator: typeof ObjectFieldTemplate.components.ObjectFieldTemplateRequiredIndicator | undefined;
33
33
  CollapsibleObjectFieldTemplateErrorMessage: typeof ObjectFieldTemplate.components.ObjectFieldTemplateErrorMessage | undefined;
34
- CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../components/Clickable").ClickableProps, never>> & string & Omit<import("react").FC<import("../components/Clickable").ClickableProps>, keyof import("react").Component<any, {}, any>>;
34
+ CollapsibleObjectFieldTemplateToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Readonly<import("@nolwenture/component-library").ButtonProps>, never>> & string & Omit<typeof import("@nolwenture/component-library").Button, keyof import("react").Component<any, {}, any>>;
35
35
  CollapsibleObjectFieldTemplateChildWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
36
36
  ArrayFieldTemplateWrapper: typeof ObjectFieldTemplate.components.ObjectFieldTemplateWrapper | undefined;
37
37
  ArrayFieldTemplateIcon: typeof import("../components/Icon").Icon | undefined;
@@ -10,4 +10,5 @@ export * from "./createInitialValues";
10
10
  export * from "./createValidationSchema";
11
11
  export * from "./orderByUiSchema";
12
12
  export * from "./orderAdditionalProperties";
13
+ export * from "./setTitleValues";
13
14
  export declare const warnFromUnsupportedKeys: (componentName: string, data: Record<string, any>, supportedKeys: string[]) => void;
@@ -0,0 +1 @@
1
+ export declare const setTitleValues: (name: string, title: string, values: Record<string, Array<Record<string, unknown>>>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolwenture/formik-jsonschema-form",
3
- "version": "1.0.0-beta.32",
3
+ "version": "1.0.0-beta.34",
4
4
  "description": "Formik form generation from json schema",
5
5
  "author": "anttivikman <antti.vikman@nolwenture.com>",
6
6
  "contributors": [