@nvs-dynamic-form/react-core 2.3.1 → 2.4.1

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 (83) hide show
  1. package/dist/cjs/nvs-dynamic-form/_template.js +4 -17
  2. package/dist/cjs/nvs-dynamic-form/_template.js.map +1 -1
  3. package/dist/cjs/nvs-dynamic-form/components/arrayField/_template.js +24 -25
  4. package/dist/cjs/nvs-dynamic-form/components/arrayField/_template.js.map +1 -1
  5. package/dist/cjs/nvs-dynamic-form/components/elements/_template.d.ts +16 -0
  6. package/dist/cjs/nvs-dynamic-form/components/elements/_template.js +62 -0
  7. package/dist/cjs/nvs-dynamic-form/components/elements/_template.js.map +1 -0
  8. package/dist/cjs/nvs-dynamic-form/components/elements/index.d.ts +1 -0
  9. package/dist/cjs/nvs-dynamic-form/components/elements/index.js +18 -0
  10. package/dist/cjs/nvs-dynamic-form/components/elements/index.js.map +1 -0
  11. package/dist/cjs/nvs-dynamic-form/components/formBuilder/_template.d.ts +20 -0
  12. package/dist/cjs/nvs-dynamic-form/components/formBuilder/_template.js +84 -0
  13. package/dist/cjs/nvs-dynamic-form/components/formBuilder/_template.js.map +1 -0
  14. package/dist/cjs/nvs-dynamic-form/components/formBuilder/index.d.ts +1 -0
  15. package/dist/cjs/nvs-dynamic-form/components/formBuilder/index.js +18 -0
  16. package/dist/cjs/nvs-dynamic-form/components/formBuilder/index.js.map +1 -0
  17. package/dist/cjs/nvs-dynamic-form/components/groupField/_template.d.ts +2 -1
  18. package/dist/cjs/nvs-dynamic-form/components/groupField/_template.js +33 -17
  19. package/dist/cjs/nvs-dynamic-form/components/groupField/_template.js.map +1 -1
  20. package/dist/cjs/nvs-dynamic-form/components/groupField/_type.d.ts +1 -0
  21. package/dist/cjs/types/array-field.type.d.ts +4 -2
  22. package/dist/cjs/types/array-field.type.js +2 -0
  23. package/dist/cjs/types/array-field.type.js.map +1 -1
  24. package/dist/cjs/types/group-field.type.d.ts +5 -5
  25. package/dist/cjs/types/group-field.type.js +2 -0
  26. package/dist/cjs/types/group-field.type.js.map +1 -1
  27. package/dist/esm/nvs-dynamic-form/_template.js +4 -17
  28. package/dist/esm/nvs-dynamic-form/_template.js.map +1 -1
  29. package/dist/esm/nvs-dynamic-form/components/arrayField/_template.js +25 -26
  30. package/dist/esm/nvs-dynamic-form/components/arrayField/_template.js.map +1 -1
  31. package/dist/esm/nvs-dynamic-form/components/elements/_template.d.ts +16 -0
  32. package/dist/esm/nvs-dynamic-form/components/elements/_template.js +35 -0
  33. package/dist/esm/nvs-dynamic-form/components/elements/_template.js.map +1 -0
  34. package/dist/esm/nvs-dynamic-form/components/elements/index.d.ts +1 -0
  35. package/dist/esm/nvs-dynamic-form/components/elements/index.js +2 -0
  36. package/dist/esm/nvs-dynamic-form/components/elements/index.js.map +1 -0
  37. package/dist/esm/nvs-dynamic-form/components/formBuilder/_template.d.ts +20 -0
  38. package/dist/esm/nvs-dynamic-form/components/formBuilder/_template.js +57 -0
  39. package/dist/esm/nvs-dynamic-form/components/formBuilder/_template.js.map +1 -0
  40. package/dist/esm/nvs-dynamic-form/components/formBuilder/index.d.ts +1 -0
  41. package/dist/esm/nvs-dynamic-form/components/formBuilder/index.js +2 -0
  42. package/dist/esm/nvs-dynamic-form/components/formBuilder/index.js.map +1 -0
  43. package/dist/esm/nvs-dynamic-form/components/groupField/_template.d.ts +2 -1
  44. package/dist/esm/nvs-dynamic-form/components/groupField/_template.js +10 -17
  45. package/dist/esm/nvs-dynamic-form/components/groupField/_template.js.map +1 -1
  46. package/dist/esm/nvs-dynamic-form/components/groupField/_type.d.ts +1 -0
  47. package/dist/esm/types/array-field.type.d.ts +4 -2
  48. package/dist/esm/types/array-field.type.js +2 -0
  49. package/dist/esm/types/array-field.type.js.map +1 -1
  50. package/dist/esm/types/group-field.type.d.ts +5 -5
  51. package/dist/esm/types/group-field.type.js +2 -0
  52. package/dist/esm/types/group-field.type.js.map +1 -1
  53. package/lib/nvs-dynamic-form/_template.tsx +21 -18
  54. package/lib/nvs-dynamic-form/components/arrayField/_template.tsx +50 -39
  55. package/lib/nvs-dynamic-form/components/elements/_template.tsx +94 -0
  56. package/lib/nvs-dynamic-form/components/elements/index.tsx +1 -0
  57. package/lib/nvs-dynamic-form/components/formBuilder/_template.tsx +149 -0
  58. package/lib/nvs-dynamic-form/components/formBuilder/index.tsx +1 -0
  59. package/lib/nvs-dynamic-form/components/groupField/_template.tsx +33 -13
  60. package/lib/nvs-dynamic-form/components/groupField/_type.tsx +1 -0
  61. package/lib/nvs-dynamic-form/stories/components/button.tsx +17 -0
  62. package/lib/nvs-dynamic-form/stories/components/container.tsx +14 -0
  63. package/lib/nvs-dynamic-form/stories/components/index.tsx +3 -0
  64. package/lib/nvs-dynamic-form/stories/components/textboxElement.tsx +20 -0
  65. package/lib/nvs-dynamic-form/stories/fields/arrayField/basicExample.stories.tsx +87 -0
  66. package/lib/nvs-dynamic-form/stories/fields/arrayField/groupField.stories.tsx +102 -0
  67. package/lib/nvs-dynamic-form/stories/fields/arrayField/nested.stories.tsx +137 -0
  68. package/lib/nvs-dynamic-form/stories/fields/basicExample.stories.tsx +66 -0
  69. package/lib/nvs-dynamic-form/stories/fields/groupField/arrayFields.stories.tsx +113 -0
  70. package/lib/nvs-dynamic-form/stories/fields/groupField/basicExample.stories.tsx +86 -0
  71. package/lib/nvs-dynamic-form/stories/fields/groupField/container.stories.tsx +112 -0
  72. package/lib/nvs-dynamic-form/stories/fields/groupField/nested.stories.tsx +103 -0
  73. package/lib/types/array-field.type.tsx +6 -2
  74. package/lib/types/group-field.type.tsx +7 -3
  75. package/package.json +1 -1
  76. package/dist/cjs/nvs-dynamic-form/services/generateFormContentUtils.d.ts +0 -46
  77. package/dist/cjs/nvs-dynamic-form/services/generateFormContentUtils.js +0 -97
  78. package/dist/cjs/nvs-dynamic-form/services/generateFormContentUtils.js.map +0 -1
  79. package/dist/esm/nvs-dynamic-form/services/generateFormContentUtils.d.ts +0 -46
  80. package/dist/esm/nvs-dynamic-form/services/generateFormContentUtils.js +0 -90
  81. package/dist/esm/nvs-dynamic-form/services/generateFormContentUtils.js.map +0 -1
  82. package/lib/nvs-dynamic-form/_stories.tsx +0 -349
  83. package/lib/nvs-dynamic-form/services/generateFormContentUtils.tsx +0 -196
@@ -0,0 +1,102 @@
1
+ import * as Yup from "yup";
2
+
3
+ import { ArrayField, GroupField } from "../../../../types";
4
+ import {
5
+ ButtonComponent,
6
+ TextboxElement,
7
+ TextboxField,
8
+ } from "../../components";
9
+ import { INvsDynamicForm, NvsDynamicForm } from "../../..";
10
+
11
+ export default {
12
+ component: NvsDynamicForm,
13
+ title: "Array Field",
14
+ };
15
+
16
+ export const GroupFieldInArray: { args: INvsDynamicForm; name: string } = {
17
+ name: "Group Field In Array",
18
+ args: {
19
+ onSubmit: (values) => {
20
+ alert(JSON.stringify(values));
21
+ },
22
+ submitButtonIsFullWidth: false,
23
+ submitButtonLabel: "Save",
24
+ submitButtonVisible: true,
25
+ submitButtonPosition: "right",
26
+ submitButtonDefaultOptions: {
27
+ label: "Save",
28
+ isFullWidth: true,
29
+ position: "right",
30
+ },
31
+ buttonComponent: ButtonComponent,
32
+ formElements: {
33
+ textbox: {
34
+ component: TextboxElement,
35
+ class: TextboxField,
36
+ },
37
+ },
38
+ fields: [
39
+ new TextboxField({
40
+ id: "firstName",
41
+ placeholder: "Enter your first name",
42
+ defaultValue: "ismet",
43
+ validate: Yup.string().required(),
44
+ screenSize: {
45
+ desktop: 6,
46
+ mobile: 6,
47
+ },
48
+ }),
49
+ new TextboxField({
50
+ id: "lastName",
51
+ placeholder: "Enter your last name",
52
+ screenSize: {
53
+ desktop: 6,
54
+ mobile: 6,
55
+ },
56
+ }),
57
+ new ArrayField({
58
+ id: "addresses",
59
+ label: "Addresses",
60
+ addButtonOptions: {
61
+ label: "Add Address",
62
+ },
63
+ defaultValues: [
64
+ {
65
+ address: {
66
+ cityName: "Istanbul",
67
+ districtName: "Kadıköy",
68
+ },
69
+ },
70
+ ],
71
+ validate: Yup.array().min(2).max(3),
72
+ fields: [
73
+ new TextboxField({
74
+ id: "addressName",
75
+ label: "Address Name",
76
+ placeholder: "Enter your address name",
77
+ screenSize: 12,
78
+ validate: Yup.string().required(),
79
+ }),
80
+ new GroupField({
81
+ id: "address",
82
+ fields: [
83
+ new TextboxField({
84
+ id: "cityName",
85
+ label: "City Name",
86
+ placeholder: "Enter your city name",
87
+ screenSize: 6,
88
+ validate: Yup.string().required(),
89
+ }),
90
+ new TextboxField({
91
+ id: "districtName",
92
+ label: "district Name",
93
+ placeholder: "Enter your district name",
94
+ screenSize: 6,
95
+ }),
96
+ ],
97
+ }),
98
+ ],
99
+ }),
100
+ ],
101
+ },
102
+ };
@@ -0,0 +1,137 @@
1
+ import * as Yup from "yup";
2
+
3
+ import { ArrayField, GroupField } from "../../../../types";
4
+ import {
5
+ ButtonComponent,
6
+ TextboxElement,
7
+ TextboxField,
8
+ } from "../../components";
9
+ import { INvsDynamicForm, NvsDynamicForm } from "../../..";
10
+
11
+ import { ChangeEvent } from "react";
12
+
13
+ export default {
14
+ component: NvsDynamicForm,
15
+ title: "Array Field",
16
+ };
17
+
18
+ export const NestedGroupExample: { args: INvsDynamicForm; name: string } = {
19
+ name: "Nested Arraf Field",
20
+ args: {
21
+ onSubmit: (values) => {
22
+ console.log(values);
23
+ alert(JSON.stringify(values, null, 2));
24
+ },
25
+ submitButtonIsFullWidth: false,
26
+ submitButtonLabel: "Submit",
27
+ submitButtonVisible: true,
28
+ submitButtonPosition: "right",
29
+ submitButtonDefaultOptions: {
30
+ label: "Submit",
31
+ isFullWidth: true,
32
+ position: "right",
33
+ },
34
+ buttonComponent: ButtonComponent,
35
+ formElements: {
36
+ textbox: {
37
+ component: TextboxElement,
38
+ class: TextboxField,
39
+ },
40
+ },
41
+ fields: [
42
+ new TextboxField({
43
+ id: "firstName",
44
+ label: "First Name",
45
+ placeholder: "Enter your first name",
46
+ defaultValue: "ismet",
47
+ validate: Yup.string().required(),
48
+ screenSize: {
49
+ desktop: 6,
50
+ mobile: 12,
51
+ },
52
+ }),
53
+ new TextboxField({
54
+ id: "lastName",
55
+ label: "Last Name",
56
+ placeholder: "Enter your last name",
57
+ validate: Yup.string().required(),
58
+ screenSize: {
59
+ desktop: 6,
60
+ mobile: 12,
61
+ },
62
+ }),
63
+ new GroupField({
64
+ id: "contactDetails",
65
+ fields: [
66
+ new TextboxField({
67
+ id: "email",
68
+ label: "Email Address",
69
+ placeholder: "Enter your email",
70
+ validate: Yup.string().required(),
71
+ screenSize: {
72
+ desktop: 6,
73
+ mobile: 12,
74
+ },
75
+ }),
76
+ new TextboxField({
77
+ id: "phone",
78
+ label: "Phone Number",
79
+ placeholder: "Enter your phone number",
80
+ validate: Yup.string().required(),
81
+ screenSize: {
82
+ desktop: 6,
83
+ mobile: 12,
84
+ },
85
+ }),
86
+ ],
87
+ }),
88
+ new ArrayField({
89
+ id: "sources",
90
+ label: "Sources",
91
+ addButtonOptions: {
92
+ label: "Add Source",
93
+ },
94
+ defaultValues: [
95
+ {
96
+ sourceName: "Source 1",
97
+ addresses: [{ cityName: "İzmir", districtName: "Göztepe" }],
98
+ },
99
+ ],
100
+ validate: Yup.array().min(1),
101
+ fields: [
102
+ new TextboxField({
103
+ id: "sourceName",
104
+ label: "Source Name",
105
+ placeholder: "Enter source name",
106
+ screenSize: 12,
107
+ validate: Yup.string().required(),
108
+ }),
109
+ new ArrayField({
110
+ id: "addresses",
111
+ label: "Addresses",
112
+ addButtonOptions: {
113
+ label: "Add Address",
114
+ },
115
+ validate: Yup.array().min(1),
116
+ fields: [
117
+ new TextboxField({
118
+ id: "cityName",
119
+ label: "City Name",
120
+ placeholder: "Enter your city name",
121
+ screenSize: 6,
122
+ validate: Yup.string().required(),
123
+ }),
124
+ new TextboxField({
125
+ id: "districtName",
126
+ label: "District Name",
127
+ placeholder: "Enter your district name",
128
+ screenSize: 6,
129
+ validate: Yup.string().required(),
130
+ }),
131
+ ],
132
+ }),
133
+ ],
134
+ }),
135
+ ],
136
+ },
137
+ };
@@ -0,0 +1,66 @@
1
+ import * as Yup from "yup";
2
+
3
+ import { ButtonComponent, TextboxElement, TextboxField } from "../components";
4
+ import { INvsDynamicForm, NvsDynamicForm } from "../../";
5
+
6
+ import { ChangeEvent } from "react";
7
+
8
+ export default {
9
+ component: NvsDynamicForm,
10
+ title: "Basic Example",
11
+ };
12
+
13
+ export const Default: { args: INvsDynamicForm; name: string } = {
14
+ name: "Default",
15
+ args: {
16
+ onSubmit: (values) => {
17
+ alert(JSON.stringify(values));
18
+ },
19
+ submitButtonIsFullWidth: false,
20
+ submitButtonLabel: "Save",
21
+ submitButtonVisible: true,
22
+ submitButtonPosition: "right",
23
+ submitButtonDefaultOptions: {
24
+ label: "Save",
25
+ isFullWidth: true,
26
+ position: "right",
27
+ },
28
+ buttonComponent: ButtonComponent,
29
+ formElements: {
30
+ textbox: {
31
+ component: TextboxElement,
32
+ class: TextboxField,
33
+ },
34
+ },
35
+ fields: [
36
+ new TextboxField({
37
+ id: "firstName",
38
+ placeholder: "Enter your first name",
39
+ defaultValue: "ismet",
40
+ validate: Yup.string().required(),
41
+ onChange: (event) => {
42
+ console.log((event as ChangeEvent<HTMLInputElement>).target.value);
43
+ },
44
+ screenSize: {
45
+ desktop: 6,
46
+ mobile: 6,
47
+ },
48
+ }),
49
+ new TextboxField({
50
+ id: "lastName",
51
+ placeholder: "Enter your last name",
52
+ validate: Yup.string().required(),
53
+ screenSize: {
54
+ desktop: 6,
55
+ mobile: 6,
56
+ },
57
+ }),
58
+ new TextboxField({
59
+ id: "emailAddress",
60
+ placeholder: "Enter your e-mail address",
61
+ screenSize: 12,
62
+ type: "email",
63
+ }),
64
+ ],
65
+ },
66
+ };
@@ -0,0 +1,113 @@
1
+ import * as Yup from "yup";
2
+
3
+ import { ArrayField, GroupField } from "../../../../types";
4
+ import {
5
+ ButtonComponent,
6
+ TextboxElement,
7
+ TextboxField,
8
+ } from "../../components";
9
+ import { INvsDynamicForm, NvsDynamicForm } from "../../..";
10
+
11
+ import { ChangeEvent } from "react";
12
+
13
+ export default {
14
+ component: NvsDynamicForm,
15
+ title: "Group Field",
16
+ };
17
+
18
+ export const ArrayFieldsInGroup: { args: INvsDynamicForm; name: string } = {
19
+ name: "Array Fields In Group",
20
+ args: {
21
+ onSubmit: (values) => {
22
+ alert(JSON.stringify(values));
23
+ },
24
+ submitButtonIsFullWidth: false,
25
+ submitButtonLabel: "Save",
26
+ submitButtonVisible: true,
27
+ submitButtonPosition: "right",
28
+ submitButtonDefaultOptions: {
29
+ label: "Save",
30
+ isFullWidth: true,
31
+ position: "right",
32
+ },
33
+ buttonComponent: ButtonComponent,
34
+ formElements: {
35
+ textbox: {
36
+ component: TextboxElement,
37
+ class: TextboxField,
38
+ },
39
+ },
40
+ fields: [
41
+ new TextboxField({
42
+ id: "firstName",
43
+ label: "First Name",
44
+ placeholder: "Enter your first name",
45
+ defaultValue: "ismet",
46
+ validate: Yup.string().required(),
47
+ onChange: (event) => {
48
+ console.log((event as ChangeEvent<HTMLInputElement>).target.value);
49
+ },
50
+ screenSize: {
51
+ desktop: 6,
52
+ mobile: 6,
53
+ },
54
+ }),
55
+ new TextboxField({
56
+ id: "lastName",
57
+ label: "Last Name",
58
+ placeholder: "Enter your last name",
59
+ validate: Yup.string().required(),
60
+ screenSize: {
61
+ desktop: 6,
62
+ mobile: 6,
63
+ },
64
+ }),
65
+ new GroupField({
66
+ id: "contactInfo",
67
+ fields: [
68
+ new TextboxField({
69
+ id: "emailAddress",
70
+ label: "E-mail Address",
71
+ placeholder: "Enter your e-mail address",
72
+ screenSize: 6,
73
+ type: "email",
74
+ defaultValue: "info@ismetkizgin.com",
75
+ }),
76
+ new TextboxField({
77
+ id: "phoneNumber",
78
+ label: "Phone Number",
79
+ placeholder: "Enter your phone number",
80
+ screenSize: 6,
81
+ }),
82
+ new ArrayField({
83
+ id: "addresses",
84
+ label: "Addresses",
85
+ addButtonOptions: {
86
+ label: "Add Address",
87
+ },
88
+ defaultValues: [
89
+ { cityName: "İzmir", districtName: "Göztepe" },
90
+ { cityName: "İstanbul", districtName: "Kadıköy" },
91
+ ],
92
+ validate: Yup.array().min(2).max(3),
93
+ fields: [
94
+ new TextboxField({
95
+ id: "cityName",
96
+ label: "City Name",
97
+ placeholder: "Enter your city name",
98
+ screenSize: 6,
99
+ validate: Yup.string().required(),
100
+ }),
101
+ new TextboxField({
102
+ id: "districtName",
103
+ label: "district Name",
104
+ placeholder: "Enter your district name",
105
+ screenSize: 6,
106
+ }),
107
+ ],
108
+ }),
109
+ ],
110
+ }),
111
+ ],
112
+ },
113
+ };
@@ -0,0 +1,86 @@
1
+ import * as Yup from "yup";
2
+
3
+ import {
4
+ ButtonComponent,
5
+ TextboxElement,
6
+ TextboxField,
7
+ } from "../../components";
8
+ import { INvsDynamicForm, NvsDynamicForm } from "../../..";
9
+
10
+ import { ChangeEvent } from "react";
11
+ import { GroupField } from "../../../../types";
12
+
13
+ export default {
14
+ component: NvsDynamicForm,
15
+ title: "Group Field",
16
+ };
17
+
18
+ export const Default: { args: INvsDynamicForm; name: string } = {
19
+ name: "Default",
20
+ args: {
21
+ onSubmit: (values) => {
22
+ alert(JSON.stringify(values));
23
+ },
24
+ submitButtonIsFullWidth: false,
25
+ submitButtonLabel: "Save",
26
+ submitButtonVisible: true,
27
+ submitButtonPosition: "right",
28
+ submitButtonDefaultOptions: {
29
+ label: "Save",
30
+ isFullWidth: true,
31
+ position: "right",
32
+ },
33
+ buttonComponent: ButtonComponent,
34
+ formElements: {
35
+ textbox: {
36
+ component: TextboxElement,
37
+ class: TextboxField,
38
+ },
39
+ },
40
+ fields: [
41
+ new TextboxField({
42
+ id: "firstName",
43
+ label: "First Name",
44
+ placeholder: "Enter your first name",
45
+ defaultValue: "ismet",
46
+ validate: Yup.string().required(),
47
+ onChange: (event) => {
48
+ console.log((event as ChangeEvent<HTMLInputElement>).target.value);
49
+ },
50
+ screenSize: {
51
+ desktop: 6,
52
+ mobile: 6,
53
+ },
54
+ }),
55
+ new TextboxField({
56
+ id: "lastName",
57
+ label: "Last Name",
58
+ placeholder: "Enter your last name",
59
+ validate: Yup.string().required(),
60
+ screenSize: {
61
+ desktop: 6,
62
+ mobile: 6,
63
+ },
64
+ }),
65
+ new GroupField({
66
+ id: "contact",
67
+ fields: [
68
+ new TextboxField({
69
+ id: "emailAddress",
70
+ label: "E-mail Address",
71
+ placeholder: "Enter your e-mail address",
72
+ screenSize: 6,
73
+ type: "email",
74
+ defaultValue: "info@ismetkizgin.com",
75
+ }),
76
+ new TextboxField({
77
+ id: "phoneNumber",
78
+ label: "Phone Number",
79
+ placeholder: "Enter your phone number",
80
+ screenSize: 6,
81
+ }),
82
+ ],
83
+ }),
84
+ ],
85
+ },
86
+ };
@@ -0,0 +1,112 @@
1
+ import * as Yup from "yup";
2
+
3
+ import {
4
+ ButtonComponent,
5
+ Container,
6
+ TextboxElement,
7
+ TextboxField,
8
+ } from "../../components";
9
+ import { INvsDynamicForm, NvsDynamicForm } from "../../..";
10
+
11
+ import { ChangeEvent } from "react";
12
+ import { GroupField } from "../../../../types";
13
+
14
+ export default {
15
+ component: NvsDynamicForm,
16
+ title: "Group Field",
17
+ };
18
+
19
+ export const GroupAndContainer: { args: INvsDynamicForm; name: string } = {
20
+ name: "Container",
21
+ args: {
22
+ onSubmit: (values) => {
23
+ alert(JSON.stringify(values));
24
+ },
25
+ container: Container,
26
+ containerVisible: true,
27
+ useGroupContainer: true,
28
+ useContainersOutsideGroup: true,
29
+ containerOptions: {
30
+ title: "Personal Information",
31
+ },
32
+ submitButtonDefaultOptions: {
33
+ label: "Save",
34
+ isFullWidth: true,
35
+ position: "right",
36
+ },
37
+ buttonComponent: ButtonComponent,
38
+ formElements: {
39
+ textbox: {
40
+ component: TextboxElement,
41
+ class: TextboxField,
42
+ },
43
+ },
44
+ fields: [
45
+ new TextboxField({
46
+ id: "firstName",
47
+ label: "First Name",
48
+ placeholder: "Enter your first name",
49
+ defaultValue: "ismet",
50
+ validate: Yup.string().required(),
51
+ onChange: (event) => {
52
+ console.log((event as ChangeEvent<HTMLInputElement>).target.value);
53
+ },
54
+ screenSize: {
55
+ desktop: 6,
56
+ mobile: 6,
57
+ },
58
+ }),
59
+ new TextboxField({
60
+ id: "lastName",
61
+ label: "Last Name",
62
+ placeholder: "Enter your last name",
63
+ validate: Yup.string().required(),
64
+ screenSize: {
65
+ desktop: 6,
66
+ mobile: 6,
67
+ },
68
+ }),
69
+ new GroupField({
70
+ id: "contact",
71
+ containerVisible: true,
72
+ containerOptions: {
73
+ title: "Contact Information",
74
+ },
75
+ fields: [
76
+ new TextboxField({
77
+ id: "emailAddress",
78
+ label: "E-mail Address",
79
+ placeholder: "Enter your e-mail address",
80
+ screenSize: 6,
81
+ type: "email",
82
+ defaultValue: "info@ismetkizgin.com",
83
+ }),
84
+ new TextboxField({
85
+ id: "phoneNumber",
86
+ label: "Phone Number",
87
+ placeholder: "Enter your phone number",
88
+ screenSize: 6,
89
+ }),
90
+ ],
91
+ }),
92
+ new GroupField({
93
+ id: "location",
94
+ containerVisible: false,
95
+ fields: [
96
+ new TextboxField({
97
+ id: "cityName",
98
+ label: "City Name",
99
+ placeholder: "Enter your city name",
100
+ screenSize: 6,
101
+ }),
102
+ new TextboxField({
103
+ id: "districtName",
104
+ label: "district Name",
105
+ placeholder: "Enter your district name",
106
+ screenSize: 6,
107
+ }),
108
+ ],
109
+ }),
110
+ ],
111
+ },
112
+ };