@dmitryvim/form-builder 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo.js +81 -5
- package/dist/elements.html +702 -0
- package/dist/elements.js +450 -0
- package/dist/form-builder.js +1208 -110
- package/dist/index.html +3 -0
- package/package.json +2 -2
- package/dist/images/final_video.mp4 +0 -0
- package/dist/images/infographic_draft.jpg +0 -0
package/dist/demo.js
CHANGED
|
@@ -25,18 +25,19 @@ const EXAMPLE_SCHEMA = {
|
|
|
25
25
|
],
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
type: "
|
|
28
|
+
type: "file",
|
|
29
29
|
key: "assets",
|
|
30
30
|
label: "Другие изображения",
|
|
31
31
|
description:
|
|
32
32
|
"Additional images that provide context, show different angles, or demonstrate product usage. These will be used to enhance the infographic composition.",
|
|
33
33
|
required: false,
|
|
34
|
+
multiple: true,
|
|
35
|
+
minCount: 0,
|
|
36
|
+
maxCount: 10,
|
|
34
37
|
accept: {
|
|
35
38
|
extensions: ["png", "jpg", "gif"],
|
|
36
39
|
mime: ["image/png", "image/jpeg", "image/gif"],
|
|
37
40
|
},
|
|
38
|
-
minCount: 0,
|
|
39
|
-
maxCount: 10,
|
|
40
41
|
maxSizeMB: 5,
|
|
41
42
|
},
|
|
42
43
|
{
|
|
@@ -47,6 +48,9 @@ const EXAMPLE_SCHEMA = {
|
|
|
47
48
|
description:
|
|
48
49
|
"The exact product name as it should appear on the infographic. Use the official product name without marketing terms or decorative elements.",
|
|
49
50
|
required: true,
|
|
51
|
+
multiple: true,
|
|
52
|
+
minCount: 1,
|
|
53
|
+
maxCount: 4,
|
|
50
54
|
minLength: 1,
|
|
51
55
|
maxLength: 100,
|
|
52
56
|
pattern: "^[A-Za-zА-Яа-я0-9 _*-]+$",
|
|
@@ -97,6 +101,68 @@ const EXAMPLE_SCHEMA = {
|
|
|
97
101
|
step: 0.01,
|
|
98
102
|
default: 0.5,
|
|
99
103
|
},
|
|
104
|
+
{
|
|
105
|
+
type: "text",
|
|
106
|
+
key: "tags",
|
|
107
|
+
label: "Теги товара",
|
|
108
|
+
description: "Добавьте ключевые теги для лучшего описания товара",
|
|
109
|
+
placeholder: "Введите тег",
|
|
110
|
+
required: false,
|
|
111
|
+
multiple: true,
|
|
112
|
+
minCount: 1,
|
|
113
|
+
maxCount: 5,
|
|
114
|
+
minLength: 2,
|
|
115
|
+
maxLength: 20,
|
|
116
|
+
default: "popular"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: "textarea",
|
|
120
|
+
key: "features",
|
|
121
|
+
label: "Особенности товара",
|
|
122
|
+
description: "Опишите ключевые особенности и преимущества товара",
|
|
123
|
+
placeholder: "Опишите особенность...",
|
|
124
|
+
required: false,
|
|
125
|
+
multiple: true,
|
|
126
|
+
minCount: 2,
|
|
127
|
+
maxCount: 4,
|
|
128
|
+
minLength: 10,
|
|
129
|
+
maxLength: 200,
|
|
130
|
+
rows: 3
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: "number",
|
|
134
|
+
key: "dimensions",
|
|
135
|
+
label: "Размеры (см)",
|
|
136
|
+
description: "Укажите размеры товара в сантиметрах: длина, ширина, высота",
|
|
137
|
+
placeholder: "0",
|
|
138
|
+
required: false,
|
|
139
|
+
multiple: true,
|
|
140
|
+
minCount: 2,
|
|
141
|
+
maxCount: 3,
|
|
142
|
+
min: 0,
|
|
143
|
+
max: 500,
|
|
144
|
+
step: 0.1,
|
|
145
|
+
decimals: 1
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: "select",
|
|
149
|
+
key: "colors",
|
|
150
|
+
label: "Доступные цвета",
|
|
151
|
+
description: "Выберите доступные цветовые варианты товара",
|
|
152
|
+
required: false,
|
|
153
|
+
multiple: true,
|
|
154
|
+
minCount: 1,
|
|
155
|
+
maxCount: 3,
|
|
156
|
+
options: [
|
|
157
|
+
{ value: "white", label: "Белый" },
|
|
158
|
+
{ value: "black", label: "Черный" },
|
|
159
|
+
{ value: "red", label: "Красный" },
|
|
160
|
+
{ value: "blue", label: "Синий" },
|
|
161
|
+
{ value: "green", label: "Зеленый" },
|
|
162
|
+
{ value: "gray", label: "Серый" }
|
|
163
|
+
],
|
|
164
|
+
default: "white"
|
|
165
|
+
},
|
|
100
166
|
{
|
|
101
167
|
type: "file",
|
|
102
168
|
key: "video",
|
|
@@ -111,12 +177,14 @@ const EXAMPLE_SCHEMA = {
|
|
|
111
177
|
maxSizeMB: 50,
|
|
112
178
|
},
|
|
113
179
|
{
|
|
114
|
-
type: "
|
|
180
|
+
type: "container",
|
|
115
181
|
key: "slides",
|
|
116
182
|
label: "Слайды",
|
|
117
183
|
description:
|
|
118
184
|
"Additional slides to showcase different aspects of your product. Each slide can have its own main image and decorative elements to create a comprehensive infographic presentation.",
|
|
119
|
-
|
|
185
|
+
multiple: true,
|
|
186
|
+
minCount: 1,
|
|
187
|
+
maxCount: 5,
|
|
120
188
|
elements: [
|
|
121
189
|
{
|
|
122
190
|
type: "text",
|
|
@@ -140,6 +208,14 @@ const EXAMPLE_SCHEMA = {
|
|
|
140
208
|
},
|
|
141
209
|
],
|
|
142
210
|
},
|
|
211
|
+
{
|
|
212
|
+
type: "text",
|
|
213
|
+
key: "session_id",
|
|
214
|
+
label: "Session ID",
|
|
215
|
+
description: "Hidden session identifier for tracking purposes",
|
|
216
|
+
hidden: true,
|
|
217
|
+
default: "session_" + Math.random().toString(36).substr(2, 9),
|
|
218
|
+
},
|
|
143
219
|
],
|
|
144
220
|
};
|
|
145
221
|
|