@next-bricks/form 1.21.9 → 1.21.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +19 -19
- package/dist/chunks/9949.753e2720.js.map +1 -1
- package/dist/chunks/eo-checkbox.0b875e8b.js.map +1 -1
- package/dist/chunks/eo-dynamic-form-item.3837c24e.js.map +1 -1
- package/dist/chunks/eo-form.9db78cdb.js.map +1 -1
- package/dist/chunks/eo-select.9c05c45b.js.map +1 -1
- package/dist/chunks/{main.7bc729a9.js → main.87225246.js} +2 -2
- package/dist/chunks/{main.7bc729a9.js.map → main.87225246.js.map} +1 -1
- package/dist/examples.json +10 -10
- package/dist/{index.cfcc28b9.js → index.6833e5c3.js} +2 -2
- package/dist/{index.cfcc28b9.js.map → index.6833e5c3.js.map} +1 -1
- package/dist/manifest.json +320 -320
- package/dist/types.json +192 -160
- package/dist-types/checkbox/index.d.ts +5 -4
- package/dist-types/dynamic-form-item/index.d.ts +2 -2
- package/dist-types/form/index.d.ts +13 -1
- package/dist-types/select/index.d.ts +20 -17
- package/package.json +2 -2
package/dist/types.json
CHANGED
|
@@ -996,39 +996,11 @@
|
|
|
996
996
|
"name": "options.change",
|
|
997
997
|
"detail": {
|
|
998
998
|
"annotation": {
|
|
999
|
-
"type": "
|
|
1000
|
-
"
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
"type": "identifier",
|
|
1005
|
-
"name": "options"
|
|
1006
|
-
},
|
|
1007
|
-
"annotation": {
|
|
1008
|
-
"type": "array",
|
|
1009
|
-
"elementType": {
|
|
1010
|
-
"type": "reference",
|
|
1011
|
-
"typeName": {
|
|
1012
|
-
"type": "identifier",
|
|
1013
|
-
"name": "CheckboxOptionType"
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
"computed": false
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
"type": "propertySignature",
|
|
1021
|
-
"key": {
|
|
1022
|
-
"type": "identifier",
|
|
1023
|
-
"name": "name"
|
|
1024
|
-
},
|
|
1025
|
-
"annotation": {
|
|
1026
|
-
"type": "keyword",
|
|
1027
|
-
"value": "string"
|
|
1028
|
-
},
|
|
1029
|
-
"computed": false
|
|
1030
|
-
}
|
|
1031
|
-
]
|
|
999
|
+
"type": "reference",
|
|
1000
|
+
"typeName": {
|
|
1001
|
+
"type": "identifier",
|
|
1002
|
+
"name": "OptionsChangeEventDetail"
|
|
1003
|
+
}
|
|
1032
1004
|
}
|
|
1033
1005
|
}
|
|
1034
1006
|
}
|
|
@@ -1224,6 +1196,42 @@
|
|
|
1224
1196
|
"computed": false
|
|
1225
1197
|
}
|
|
1226
1198
|
]
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"type": "interface",
|
|
1202
|
+
"name": "OptionsChangeEventDetail",
|
|
1203
|
+
"body": [
|
|
1204
|
+
{
|
|
1205
|
+
"type": "propertySignature",
|
|
1206
|
+
"key": {
|
|
1207
|
+
"type": "identifier",
|
|
1208
|
+
"name": "options"
|
|
1209
|
+
},
|
|
1210
|
+
"annotation": {
|
|
1211
|
+
"type": "array",
|
|
1212
|
+
"elementType": {
|
|
1213
|
+
"type": "reference",
|
|
1214
|
+
"typeName": {
|
|
1215
|
+
"type": "identifier",
|
|
1216
|
+
"name": "CheckboxOptionType"
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
"computed": false
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"type": "propertySignature",
|
|
1224
|
+
"key": {
|
|
1225
|
+
"type": "identifier",
|
|
1226
|
+
"name": "name"
|
|
1227
|
+
},
|
|
1228
|
+
"annotation": {
|
|
1229
|
+
"type": "keyword",
|
|
1230
|
+
"value": "string"
|
|
1231
|
+
},
|
|
1232
|
+
"computed": false
|
|
1233
|
+
}
|
|
1234
|
+
]
|
|
1227
1235
|
}
|
|
1228
1236
|
]
|
|
1229
1237
|
},
|
|
@@ -2140,51 +2148,11 @@
|
|
|
2140
2148
|
"name": "change",
|
|
2141
2149
|
"detail": {
|
|
2142
2150
|
"annotation": {
|
|
2143
|
-
"type": "
|
|
2144
|
-
"
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
"type": "identifier",
|
|
2149
|
-
"name": "value"
|
|
2150
|
-
},
|
|
2151
|
-
"annotation": {
|
|
2152
|
-
"type": "union",
|
|
2153
|
-
"types": [
|
|
2154
|
-
{
|
|
2155
|
-
"type": "keyword",
|
|
2156
|
-
"value": "string"
|
|
2157
|
-
},
|
|
2158
|
-
{
|
|
2159
|
-
"type": "array",
|
|
2160
|
-
"elementType": {
|
|
2161
|
-
"type": "keyword",
|
|
2162
|
-
"value": "string"
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
]
|
|
2166
|
-
},
|
|
2167
|
-
"computed": false
|
|
2168
|
-
},
|
|
2169
|
-
{
|
|
2170
|
-
"type": "propertySignature",
|
|
2171
|
-
"key": {
|
|
2172
|
-
"type": "identifier",
|
|
2173
|
-
"name": "options"
|
|
2174
|
-
},
|
|
2175
|
-
"annotation": {
|
|
2176
|
-
"type": "array",
|
|
2177
|
-
"elementType": {
|
|
2178
|
-
"type": "reference",
|
|
2179
|
-
"typeName": {
|
|
2180
|
-
"type": "identifier",
|
|
2181
|
-
"name": "GeneralComplexOption"
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
},
|
|
2185
|
-
"computed": false
|
|
2186
|
-
}
|
|
2187
|
-
]
|
|
2151
|
+
"type": "reference",
|
|
2152
|
+
"typeName": {
|
|
2153
|
+
"type": "identifier",
|
|
2154
|
+
"name": "ChangeEventDetail"
|
|
2155
|
+
}
|
|
2188
2156
|
}
|
|
2189
2157
|
}
|
|
2190
2158
|
},
|
|
@@ -2213,21 +2181,11 @@
|
|
|
2213
2181
|
"name": "search",
|
|
2214
2182
|
"detail": {
|
|
2215
2183
|
"annotation": {
|
|
2216
|
-
"type": "
|
|
2217
|
-
"
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
"type": "identifier",
|
|
2222
|
-
"name": "value"
|
|
2223
|
-
},
|
|
2224
|
-
"annotation": {
|
|
2225
|
-
"type": "keyword",
|
|
2226
|
-
"value": "string"
|
|
2227
|
-
},
|
|
2228
|
-
"computed": false
|
|
2229
|
-
}
|
|
2230
|
-
]
|
|
2184
|
+
"type": "reference",
|
|
2185
|
+
"typeName": {
|
|
2186
|
+
"type": "identifier",
|
|
2187
|
+
"name": "SearchEventDetail"
|
|
2188
|
+
}
|
|
2231
2189
|
}
|
|
2232
2190
|
}
|
|
2233
2191
|
},
|
|
@@ -2244,73 +2202,11 @@
|
|
|
2244
2202
|
"name": "options.change",
|
|
2245
2203
|
"detail": {
|
|
2246
2204
|
"annotation": {
|
|
2247
|
-
"type": "
|
|
2248
|
-
"
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
"type": "identifier",
|
|
2253
|
-
"name": "options"
|
|
2254
|
-
},
|
|
2255
|
-
"annotation": {
|
|
2256
|
-
"type": "typeLiteral",
|
|
2257
|
-
"members": [
|
|
2258
|
-
{
|
|
2259
|
-
"type": "propertySignature",
|
|
2260
|
-
"key": {
|
|
2261
|
-
"type": "identifier",
|
|
2262
|
-
"name": "label"
|
|
2263
|
-
},
|
|
2264
|
-
"annotation": {
|
|
2265
|
-
"type": "keyword",
|
|
2266
|
-
"value": "string"
|
|
2267
|
-
},
|
|
2268
|
-
"computed": false
|
|
2269
|
-
},
|
|
2270
|
-
{
|
|
2271
|
-
"type": "propertySignature",
|
|
2272
|
-
"key": {
|
|
2273
|
-
"type": "identifier",
|
|
2274
|
-
"name": "value"
|
|
2275
|
-
},
|
|
2276
|
-
"annotation": {
|
|
2277
|
-
"type": "keyword",
|
|
2278
|
-
"value": "any"
|
|
2279
|
-
},
|
|
2280
|
-
"computed": false
|
|
2281
|
-
},
|
|
2282
|
-
{
|
|
2283
|
-
"type": "indexSignature",
|
|
2284
|
-
"parameter": {
|
|
2285
|
-
"type": "identifier",
|
|
2286
|
-
"name": "key",
|
|
2287
|
-
"annotation": {
|
|
2288
|
-
"type": "keyword",
|
|
2289
|
-
"value": "string"
|
|
2290
|
-
}
|
|
2291
|
-
},
|
|
2292
|
-
"annotation": {
|
|
2293
|
-
"type": "keyword",
|
|
2294
|
-
"value": "any"
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
]
|
|
2298
|
-
},
|
|
2299
|
-
"computed": false
|
|
2300
|
-
},
|
|
2301
|
-
{
|
|
2302
|
-
"type": "propertySignature",
|
|
2303
|
-
"key": {
|
|
2304
|
-
"type": "identifier",
|
|
2305
|
-
"name": "name"
|
|
2306
|
-
},
|
|
2307
|
-
"annotation": {
|
|
2308
|
-
"type": "keyword",
|
|
2309
|
-
"value": "string"
|
|
2310
|
-
},
|
|
2311
|
-
"computed": false
|
|
2312
|
-
}
|
|
2313
|
-
]
|
|
2205
|
+
"type": "reference",
|
|
2206
|
+
"typeName": {
|
|
2207
|
+
"type": "identifier",
|
|
2208
|
+
"name": "OptionsChangeEventDetail"
|
|
2209
|
+
}
|
|
2314
2210
|
}
|
|
2315
2211
|
}
|
|
2316
2212
|
}
|
|
@@ -2509,6 +2405,142 @@
|
|
|
2509
2405
|
"computed": false
|
|
2510
2406
|
}
|
|
2511
2407
|
]
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
"type": "interface",
|
|
2411
|
+
"name": "ChangeEventDetail",
|
|
2412
|
+
"body": [
|
|
2413
|
+
{
|
|
2414
|
+
"type": "propertySignature",
|
|
2415
|
+
"key": {
|
|
2416
|
+
"type": "identifier",
|
|
2417
|
+
"name": "value"
|
|
2418
|
+
},
|
|
2419
|
+
"annotation": {
|
|
2420
|
+
"type": "union",
|
|
2421
|
+
"types": [
|
|
2422
|
+
{
|
|
2423
|
+
"type": "keyword",
|
|
2424
|
+
"value": "string"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"type": "array",
|
|
2428
|
+
"elementType": {
|
|
2429
|
+
"type": "keyword",
|
|
2430
|
+
"value": "string"
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
]
|
|
2434
|
+
},
|
|
2435
|
+
"computed": false
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"type": "propertySignature",
|
|
2439
|
+
"key": {
|
|
2440
|
+
"type": "identifier",
|
|
2441
|
+
"name": "options"
|
|
2442
|
+
},
|
|
2443
|
+
"annotation": {
|
|
2444
|
+
"type": "array",
|
|
2445
|
+
"elementType": {
|
|
2446
|
+
"type": "reference",
|
|
2447
|
+
"typeName": {
|
|
2448
|
+
"type": "identifier",
|
|
2449
|
+
"name": "GeneralComplexOption"
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2453
|
+
"computed": false
|
|
2454
|
+
}
|
|
2455
|
+
]
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
"type": "interface",
|
|
2459
|
+
"name": "SearchEventDetail",
|
|
2460
|
+
"body": [
|
|
2461
|
+
{
|
|
2462
|
+
"type": "propertySignature",
|
|
2463
|
+
"key": {
|
|
2464
|
+
"type": "identifier",
|
|
2465
|
+
"name": "value"
|
|
2466
|
+
},
|
|
2467
|
+
"annotation": {
|
|
2468
|
+
"type": "keyword",
|
|
2469
|
+
"value": "string"
|
|
2470
|
+
},
|
|
2471
|
+
"computed": false
|
|
2472
|
+
}
|
|
2473
|
+
]
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"type": "interface",
|
|
2477
|
+
"name": "OptionsChangeEventDetail",
|
|
2478
|
+
"body": [
|
|
2479
|
+
{
|
|
2480
|
+
"type": "propertySignature",
|
|
2481
|
+
"key": {
|
|
2482
|
+
"type": "identifier",
|
|
2483
|
+
"name": "options"
|
|
2484
|
+
},
|
|
2485
|
+
"annotation": {
|
|
2486
|
+
"type": "typeLiteral",
|
|
2487
|
+
"members": [
|
|
2488
|
+
{
|
|
2489
|
+
"type": "propertySignature",
|
|
2490
|
+
"key": {
|
|
2491
|
+
"type": "identifier",
|
|
2492
|
+
"name": "label"
|
|
2493
|
+
},
|
|
2494
|
+
"annotation": {
|
|
2495
|
+
"type": "keyword",
|
|
2496
|
+
"value": "string"
|
|
2497
|
+
},
|
|
2498
|
+
"computed": false
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
"type": "propertySignature",
|
|
2502
|
+
"key": {
|
|
2503
|
+
"type": "identifier",
|
|
2504
|
+
"name": "value"
|
|
2505
|
+
},
|
|
2506
|
+
"annotation": {
|
|
2507
|
+
"type": "keyword",
|
|
2508
|
+
"value": "any"
|
|
2509
|
+
},
|
|
2510
|
+
"computed": false
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"type": "indexSignature",
|
|
2514
|
+
"parameter": {
|
|
2515
|
+
"type": "identifier",
|
|
2516
|
+
"name": "key",
|
|
2517
|
+
"annotation": {
|
|
2518
|
+
"type": "keyword",
|
|
2519
|
+
"value": "string"
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
"annotation": {
|
|
2523
|
+
"type": "keyword",
|
|
2524
|
+
"value": "any"
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
]
|
|
2528
|
+
},
|
|
2529
|
+
"computed": false
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
"type": "propertySignature",
|
|
2533
|
+
"key": {
|
|
2534
|
+
"type": "identifier",
|
|
2535
|
+
"name": "name"
|
|
2536
|
+
},
|
|
2537
|
+
"annotation": {
|
|
2538
|
+
"type": "keyword",
|
|
2539
|
+
"value": "string"
|
|
2540
|
+
},
|
|
2541
|
+
"computed": false
|
|
2542
|
+
}
|
|
2543
|
+
]
|
|
2512
2544
|
}
|
|
2513
2545
|
]
|
|
2514
2546
|
},
|
|
@@ -31,12 +31,13 @@ export interface CheckboxProps extends FormItemProps {
|
|
|
31
31
|
optionGroups?: OptionGroup[];
|
|
32
32
|
themeVariant?: "default" | "elevo";
|
|
33
33
|
}
|
|
34
|
+
export interface OptionsChangeEventDetail {
|
|
35
|
+
options: CheckboxOptionType[];
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
34
38
|
export interface CheckboxEventsMap {
|
|
35
39
|
change: CustomEvent<CheckboxOptionType[]>;
|
|
36
|
-
|
|
37
|
-
options: CheckboxOptionType[];
|
|
38
|
-
name: string;
|
|
39
|
-
}>;
|
|
40
|
+
"options.change": CustomEvent<OptionsChangeEventDetail>;
|
|
40
41
|
}
|
|
41
42
|
export interface CheckboxEventsMapping {
|
|
42
43
|
onChange: "change";
|
|
@@ -28,8 +28,8 @@ type rowDataType = {
|
|
|
28
28
|
export declare const getRealValue: (property: boolean | ((...args: any[]) => boolean), args: any[]) => boolean;
|
|
29
29
|
export interface DynamicFormItemEventsMap {
|
|
30
30
|
change: CustomEvent<DynamicFormValuesItem[]>;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
"row.add": CustomEvent<rowDataType>;
|
|
32
|
+
"row.remove": CustomEvent<rowDataType>;
|
|
33
33
|
}
|
|
34
34
|
export interface DynamicFormItemEventsMapping {
|
|
35
35
|
onChange: "change";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
-
import { AbstractForm, FormStore, ColProps } from "@next-shared/form";
|
|
3
|
+
import { AbstractForm, FormStore, MessageBody, ColProps } from "@next-shared/form";
|
|
4
4
|
import { ComponentSize, Layout } from "../interface.js";
|
|
5
5
|
interface FormProps {
|
|
6
6
|
values?: Record<string, any>;
|
|
@@ -18,6 +18,18 @@ export interface FormMapEvents {
|
|
|
18
18
|
onValidateSuccess: "validate.success";
|
|
19
19
|
onValidateError: "validate.error";
|
|
20
20
|
}
|
|
21
|
+
export interface EoFormEventsMap {
|
|
22
|
+
"values.change": CustomEvent<Record<string, unknown>>;
|
|
23
|
+
"validate.success": CustomEvent<Record<string, unknown>>;
|
|
24
|
+
"validate.error": CustomEvent<(MessageBody & {
|
|
25
|
+
name: string;
|
|
26
|
+
})[]>;
|
|
27
|
+
}
|
|
28
|
+
export interface EoFormEventsMapping {
|
|
29
|
+
onValuesChange: "values.change";
|
|
30
|
+
onValidateSuccess: "validate.success";
|
|
31
|
+
onValidateError: "validate.error";
|
|
32
|
+
}
|
|
21
33
|
/**
|
|
22
34
|
* 表单构件
|
|
23
35
|
* @author sailor
|
|
@@ -54,24 +54,27 @@ export interface SelectProps extends FormItemProps {
|
|
|
54
54
|
onSelectFocus?: () => void;
|
|
55
55
|
onSearch?: (value: string) => void;
|
|
56
56
|
}
|
|
57
|
+
export interface ChangeEventDetail {
|
|
58
|
+
value: string | string[];
|
|
59
|
+
options: GeneralComplexOption[];
|
|
60
|
+
}
|
|
61
|
+
export interface SearchEventDetail {
|
|
62
|
+
value: string;
|
|
63
|
+
}
|
|
64
|
+
export interface OptionsChangeEventDetail {
|
|
65
|
+
options: {
|
|
66
|
+
label: string;
|
|
67
|
+
value: any;
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
};
|
|
70
|
+
name: string;
|
|
71
|
+
}
|
|
57
72
|
export interface SelectEventsMap {
|
|
58
|
-
change: CustomEvent<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
search: CustomEvent<{
|
|
64
|
-
value: string;
|
|
65
|
-
}>;
|
|
66
|
-
selectFocus: CustomEvent<void>;
|
|
67
|
-
optionsChange: CustomEvent<{
|
|
68
|
-
options: {
|
|
69
|
-
label: string;
|
|
70
|
-
value: any;
|
|
71
|
-
[key: string]: any;
|
|
72
|
-
};
|
|
73
|
-
name: string;
|
|
74
|
-
}>;
|
|
73
|
+
change: CustomEvent<ChangeEventDetail>;
|
|
74
|
+
"change.v2": CustomEvent<string | string[]>;
|
|
75
|
+
search: CustomEvent<SearchEventDetail>;
|
|
76
|
+
"select.focus": CustomEvent<void>;
|
|
77
|
+
"options.change": CustomEvent<OptionsChangeEventDetail>;
|
|
75
78
|
}
|
|
76
79
|
export interface SelectEventsMapping {
|
|
77
80
|
onChange: "change";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/form",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.10",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/form",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@next-bricks/icons": "*",
|
|
47
47
|
"@next-bricks/illustrations": "*"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "1bd932762c765bd5b970f06e76171b8c3cc7ba0a"
|
|
50
50
|
}
|