-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathAI.json
More file actions
415 lines (415 loc) · 12.4 KB
/
Copy pathAI.json
File metadata and controls
415 lines (415 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
{
"metadata": {
"name": "ww-input-basic",
"description": "A versatile form input element supporting text, email, password, number, decimal, date, time, phone, color, and currency types with validation.",
"keywords": [
"input",
"text input",
"form field",
"text field"
],
"features": [
"Multiple input types (text, textarea, email, password, number, decimal, date, time, tel, color, currency)",
"Currency formatting with symbol, separators, decimal places",
"Debounce support",
"Custom validation",
"Min/max constraints for numbers and dates",
"Placeholder with multi-language support",
"Read-only and required states",
"Password visibility toggle",
"Textarea with configurable rows and resize"
],
"inherit": [
"ww-text"
]
},
"properties": [
{
"name": "placeholderColor",
"description": "Mandatory color of the placeholder text. Inactive when advancedPlaceholder (inherited from ww-text) is true.",
"type": "string",
"responsive": true,
"inactiveProperty": {
"description": "Inactive when advancedPlaceholder (inherited from ww-text) is true."
}
},
{
"name": "initValue",
"wewebName": "value",
"description": "Initial value of the input",
"type": "string",
"defaultValue": ""
},
{
"name": "type",
"description": "Input type",
"type": "string",
"options": [
"text",
"textarea",
"email",
"search",
"password",
"number",
"decimal",
"date",
"time",
"tel",
"color",
"currency"
],
"defaultValue": "text"
},
{
"name": "displayPassword",
"description": "Show/hide password toggle. Inactive when type is not 'password'.",
"type": "boolean",
"defaultValue": false,
"inactiveProperty": {
"description": "Inactive when type is not 'password'."
}
},
{
"name": "readonly",
"description": "Whether the input is read-only",
"type": "boolean",
"defaultValue": false
},
{
"name": "required",
"description": "Whether the input is required",
"type": "boolean",
"defaultValue": true
},
{
"name": "precision",
"description": "Decimal precision for decimal type. Inactive when type is not 'decimal'.",
"type": "string",
"options": [
"0.1",
"0.01",
"0.001",
"0.0001",
"0.00001",
"0.000001",
"0.0000001",
"0.00000001"
],
"defaultValue": "0.1",
"inactiveProperty": {
"description": "Inactive when type is not 'decimal'."
}
},
{
"name": "step",
"description": "Step increment for number/decimal types. Inactive when type is not 'decimal' and not 'number'.",
"type": "number",
"defaultValue": 1,
"inactiveProperty": {
"description": "Inactive when type is not 'decimal' and not 'number'."
}
},
{
"name": "timePrecision",
"description": "Time precision: 3600 (hh), 60 (hh:mm), 1 (hh:mm:ss), 0.1 (hh:mm:ss.s). Inactive when type is not 'time'.",
"type": "number",
"options": [
3600,
60,
1,
0.1
],
"defaultValue": 1,
"inactiveProperty": {
"description": "Inactive when type is not 'time'."
}
},
{
"name": "placeholder",
"description": "Placeholder text. Supports multi-language object. Inactive when type is 'date' or 'time'.",
"type": "object",
"defaultValue": {},
"inactiveProperty": {
"description": "Inactive when type is 'date' or 'time'."
}
},
{
"name": "rows",
"description": "Number of rows for textarea type. Inactive when type is not 'textarea'.",
"type": "number",
"defaultValue": 4,
"inactiveProperty": {
"description": "Inactive when type is not 'textarea'."
}
},
{
"name": "resize",
"description": "Allow textarea resize. Inactive when type is not 'textarea'.",
"type": "boolean",
"defaultValue": false,
"inactiveProperty": {
"description": "Inactive when type is not 'textarea'."
}
},
{
"name": "min",
"description": "Minimum value for number/decimal types. Inactive when type is not 'number' and not 'decimal'.",
"type": "number",
"defaultValue": 0,
"inactiveProperty": {
"description": "Inactive when type is not 'number' and not 'decimal'."
}
},
{
"name": "max",
"description": "Maximum value for number/decimal types. Inactive when type is not 'number' and not 'decimal'.",
"type": "number",
"defaultValue": 10000,
"inactiveProperty": {
"description": "Inactive when type is not 'number' and not 'decimal'."
}
},
{
"name": "minDate",
"description": "Minimum date in yyyy-mm-dd format. Inactive when type is not 'date'.",
"type": "string",
"defaultValue": "",
"inactiveProperty": {
"description": "Inactive when type is not 'date'."
}
},
{
"name": "maxDate",
"description": "Maximum date in yyyy-mm-dd format. Inactive when type is not 'date'.",
"type": "string",
"defaultValue": "",
"inactiveProperty": {
"description": "Inactive when type is not 'date'."
}
},
{
"name": "hideArrows",
"description": "Hide number input arrows. Inactive when type is not 'number' and not 'decimal'.",
"type": "boolean",
"defaultValue": false,
"inactiveProperty": {
"description": "Inactive when type is not 'number' and not 'decimal'."
}
},
{
"name": "debounce",
"description": "Enable debounce on value changes",
"type": "boolean",
"defaultValue": false
},
{
"name": "debounceDelay",
"description": "Debounce delay (1-5000ms). Inactive when debounce is false.",
"type": "string",
"defaultValue": "500ms",
"responsive": true,
"inactiveProperty": {
"description": "Inactive when debounce is false."
}
},
{
"name": "autocomplete",
"description": "Enable browser autocomplete",
"type": "boolean",
"defaultValue": false
},
{
"name": "fieldName",
"description": "Field name used for form data when inside a form container. Inactive when the element is not placed inside a form container.",
"type": "string",
"defaultValue": "",
"inactiveProperty": {
"description": "Inactive when the element is not placed inside a form container (sidePanelContent.form?.uid is falsy)."
}
},
{
"name": "customValidation",
"description": "Enable custom validation formula. Inactive when the element is not placed inside a form container.",
"type": "boolean",
"defaultValue": false,
"inactiveProperty": {
"description": "Inactive when the element is not placed inside a form container (sidePanelContent.form?.uid is falsy)."
}
},
{
"name": "validation",
"description": "Custom validation formula. Inactive when the element is not in a form container or when customValidation is false.",
"type": "formula",
"defaultValue": "",
"inactiveProperty": {
"description": "Inactive when the element is not placed inside a form container (sidePanelContent.form?.uid is falsy) or when customValidation is false."
}
},
{
"name": "currencyShowSymbol",
"description": "Show currency symbol. Inactive when type is not 'currency'.",
"type": "boolean",
"defaultValue": true,
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencySymbol",
"description": "Currency symbol character. Inactive when currencyShowSymbol is false or type is not 'currency'.",
"type": "string",
"defaultValue": "$",
"inactiveProperty": {
"description": "Inactive when currencyShowSymbol is false or type is not 'currency'."
}
},
{
"name": "currencySymbolPosition",
"description": "Currency symbol position: before or after. Inactive when currencyShowSymbol is false or type is not 'currency'.",
"type": "string",
"options": [
"prefix",
"suffix"
],
"defaultValue": "prefix",
"inactiveProperty": {
"description": "Inactive when currencyShowSymbol is false or type is not 'currency'."
}
},
{
"name": "currencyDecimalPlaces",
"description": "Number of decimal places for currency. Inactive when type is not 'currency'.",
"type": "number",
"defaultValue": 2,
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencyThousandsSeparator",
"description": "Thousands separator character. Inactive when type is not 'currency'.",
"type": "string",
"options": [
",",
".",
" ",
"'",
""
],
"defaultValue": ",",
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencyDecimalSeparator",
"description": "Decimal separator character. Inactive when type is not 'currency'.",
"type": "string",
"options": [
".",
","
],
"defaultValue": ".",
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencySymbolColor",
"description": "Color of the currency symbol. Inactive when type is not 'currency'.",
"type": "string",
"responsive": true,
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencySymbolFontSize",
"description": "Font size of the currency symbol. Inactive when type is not 'currency'.",
"type": "string",
"defaultValue": "1em",
"responsive": true,
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
},
{
"name": "currencySymbolPadding",
"description": "Padding around the currency symbol. Inactive when type is not 'currency'.",
"type": "string",
"defaultValue": "4px",
"responsive": true,
"inactiveProperty": {
"description": "Inactive when type is not 'currency'."
}
}
],
"states": [
{
"name": "focus",
"description": "Input has focus"
},
{
"name": "readonly",
"description": "Input is read-only"
}
],
"events": [
{
"name": "change",
"description": "Triggered when the input value changes",
"payload": {
"domEvent": "object",
"value": "string"
}
},
{
"name": "initValueChange",
"description": "Triggered when the initial bound value changes",
"payload": {
"value": "string"
}
},
{
"name": "onEnterKey",
"description": "Triggered when the Enter key is pressed",
"payload": {
"value": "string"
}
},
{
"name": "focus",
"description": "Triggered when the input receives focus"
},
{
"name": "blur",
"description": "Triggered when the input loses focus"
}
],
"actions": [
{
"label": "Focus element",
"actionName": "focusInput",
"description": "Programmatically focus the input element"
}
],
"slots": [],
"variables": [
{
"name": "value",
"description": "The current value of the input",
"type": "string"
}
],
"specifications": [
"Inherits text properties from ww-text",
"Use type 'textarea' for multi-line input",
"Date constraints use yyyy-mm-dd format",
"Currency type provides formatted number input with symbol display",
"Inside a form container, set fieldName for form data binding",
"For styling, always set placeholderColor, especially in dark mode",
"Debounce delays the change event firing. Set debounce to true and debounceDelay to the desired delay (e.g. '500ms').",
"Use debounce with debounceDelay for auto-saving, searching scenarios or when the 'change' workflow performs expensive work (API calls, heavy computations) to avoid firing on every changes."
],
"examples": []
}