@genesislcap/foundation-forms 14.432.2-form-change-handlers.1 → 14.433.0
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/custom-elements.json +226 -226
- package/dist/dts/jsonforms/renderers/dispatch-renderer.d.ts.map +1 -1
- package/dist/dts/types.d.ts +0 -63
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/jsonforms/renderers/dispatch-renderer.js +0 -13
- package/dist/foundation-forms.api.json +2 -72
- package/dist/foundation-forms.d.ts +0 -65
- package/package.json +15 -15
|
@@ -1969,232 +1969,6 @@
|
|
|
1969
1969
|
}
|
|
1970
1970
|
]
|
|
1971
1971
|
},
|
|
1972
|
-
{
|
|
1973
|
-
"kind": "javascript-module",
|
|
1974
|
-
"path": "src/jsonforms/testers/isArray.ts",
|
|
1975
|
-
"declarations": [
|
|
1976
|
-
{
|
|
1977
|
-
"kind": "function",
|
|
1978
|
-
"name": "isArray",
|
|
1979
|
-
"parameters": [
|
|
1980
|
-
{
|
|
1981
|
-
"name": "itemsType",
|
|
1982
|
-
"type": {
|
|
1983
|
-
"text": "ArrayItemsType"
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
]
|
|
1987
|
-
}
|
|
1988
|
-
],
|
|
1989
|
-
"exports": [
|
|
1990
|
-
{
|
|
1991
|
-
"kind": "js",
|
|
1992
|
-
"name": "isArray",
|
|
1993
|
-
"declaration": {
|
|
1994
|
-
"name": "isArray",
|
|
1995
|
-
"module": "src/jsonforms/testers/isArray.ts"
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
]
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
"kind": "javascript-module",
|
|
2002
|
-
"path": "src/jsonforms/testers/isDate.ts",
|
|
2003
|
-
"declarations": [
|
|
2004
|
-
{
|
|
2005
|
-
"kind": "variable",
|
|
2006
|
-
"name": "isOneOfDate"
|
|
2007
|
-
}
|
|
2008
|
-
],
|
|
2009
|
-
"exports": [
|
|
2010
|
-
{
|
|
2011
|
-
"kind": "js",
|
|
2012
|
-
"name": "isOneOfDate",
|
|
2013
|
-
"declaration": {
|
|
2014
|
-
"name": "isOneOfDate",
|
|
2015
|
-
"module": "src/jsonforms/testers/isDate.ts"
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
]
|
|
2019
|
-
},
|
|
2020
|
-
{
|
|
2021
|
-
"kind": "javascript-module",
|
|
2022
|
-
"path": "src/jsonforms/testers/isInvisible.ts",
|
|
2023
|
-
"declarations": [
|
|
2024
|
-
{
|
|
2025
|
-
"kind": "function",
|
|
2026
|
-
"name": "isInvisible",
|
|
2027
|
-
"return": {
|
|
2028
|
-
"type": {
|
|
2029
|
-
"text": "boolean"
|
|
2030
|
-
}
|
|
2031
|
-
},
|
|
2032
|
-
"parameters": [
|
|
2033
|
-
{
|
|
2034
|
-
"name": "uischema",
|
|
2035
|
-
"type": {
|
|
2036
|
-
"text": "UISchemaElement"
|
|
2037
|
-
}
|
|
2038
|
-
},
|
|
2039
|
-
{
|
|
2040
|
-
"name": "schema",
|
|
2041
|
-
"type": {
|
|
2042
|
-
"text": "JsonSchema"
|
|
2043
|
-
}
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
"name": "context",
|
|
2047
|
-
"type": {
|
|
2048
|
-
"text": "TesterContext"
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
]
|
|
2052
|
-
}
|
|
2053
|
-
],
|
|
2054
|
-
"exports": [
|
|
2055
|
-
{
|
|
2056
|
-
"kind": "js",
|
|
2057
|
-
"name": "isInvisible",
|
|
2058
|
-
"declaration": {
|
|
2059
|
-
"name": "isInvisible",
|
|
2060
|
-
"module": "src/jsonforms/testers/isInvisible.ts"
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
]
|
|
2064
|
-
},
|
|
2065
|
-
{
|
|
2066
|
-
"kind": "javascript-module",
|
|
2067
|
-
"path": "src/jsonforms/testers/isOneOfBoolean.ts",
|
|
2068
|
-
"declarations": [
|
|
2069
|
-
{
|
|
2070
|
-
"kind": "variable",
|
|
2071
|
-
"name": "isOneOfBoolean"
|
|
2072
|
-
}
|
|
2073
|
-
],
|
|
2074
|
-
"exports": [
|
|
2075
|
-
{
|
|
2076
|
-
"kind": "js",
|
|
2077
|
-
"name": "isOneOfBoolean",
|
|
2078
|
-
"declaration": {
|
|
2079
|
-
"name": "isOneOfBoolean",
|
|
2080
|
-
"module": "src/jsonforms/testers/isOneOfBoolean.ts"
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
]
|
|
2084
|
-
},
|
|
2085
|
-
{
|
|
2086
|
-
"kind": "javascript-module",
|
|
2087
|
-
"path": "src/jsonforms/testers/isOneOfEnum.ts",
|
|
2088
|
-
"declarations": [
|
|
2089
|
-
{
|
|
2090
|
-
"kind": "variable",
|
|
2091
|
-
"name": "isOneOfEnum"
|
|
2092
|
-
}
|
|
2093
|
-
],
|
|
2094
|
-
"exports": [
|
|
2095
|
-
{
|
|
2096
|
-
"kind": "js",
|
|
2097
|
-
"name": "isOneOfEnum",
|
|
2098
|
-
"declaration": {
|
|
2099
|
-
"name": "isOneOfEnum",
|
|
2100
|
-
"module": "src/jsonforms/testers/isOneOfEnum.ts"
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
]
|
|
2104
|
-
},
|
|
2105
|
-
{
|
|
2106
|
-
"kind": "javascript-module",
|
|
2107
|
-
"path": "src/jsonforms/testers/isOneOfNumber.ts",
|
|
2108
|
-
"declarations": [
|
|
2109
|
-
{
|
|
2110
|
-
"kind": "variable",
|
|
2111
|
-
"name": "isOneOfNumber"
|
|
2112
|
-
}
|
|
2113
|
-
],
|
|
2114
|
-
"exports": [
|
|
2115
|
-
{
|
|
2116
|
-
"kind": "js",
|
|
2117
|
-
"name": "isOneOfNumber",
|
|
2118
|
-
"declaration": {
|
|
2119
|
-
"name": "isOneOfNumber",
|
|
2120
|
-
"module": "src/jsonforms/testers/isOneOfNumber.ts"
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
]
|
|
2124
|
-
},
|
|
2125
|
-
{
|
|
2126
|
-
"kind": "javascript-module",
|
|
2127
|
-
"path": "src/jsonforms/testers/isOneOfOptionMultiselect.ts",
|
|
2128
|
-
"declarations": [
|
|
2129
|
-
{
|
|
2130
|
-
"kind": "variable",
|
|
2131
|
-
"name": "isOneOfOptionMultiselect"
|
|
2132
|
-
}
|
|
2133
|
-
],
|
|
2134
|
-
"exports": [
|
|
2135
|
-
{
|
|
2136
|
-
"kind": "js",
|
|
2137
|
-
"name": "isOneOfOptionMultiselect",
|
|
2138
|
-
"declaration": {
|
|
2139
|
-
"name": "isOneOfOptionMultiselect",
|
|
2140
|
-
"module": "src/jsonforms/testers/isOneOfOptionMultiselect.ts"
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
]
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
"kind": "javascript-module",
|
|
2147
|
-
"path": "src/jsonforms/testers/isTime.ts",
|
|
2148
|
-
"declarations": [
|
|
2149
|
-
{
|
|
2150
|
-
"kind": "variable",
|
|
2151
|
-
"name": "isOneOfTime"
|
|
2152
|
-
}
|
|
2153
|
-
],
|
|
2154
|
-
"exports": [
|
|
2155
|
-
{
|
|
2156
|
-
"kind": "js",
|
|
2157
|
-
"name": "isOneOfTime",
|
|
2158
|
-
"declaration": {
|
|
2159
|
-
"name": "isOneOfTime",
|
|
2160
|
-
"module": "src/jsonforms/testers/isTime.ts"
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
]
|
|
2164
|
-
},
|
|
2165
|
-
{
|
|
2166
|
-
"kind": "javascript-module",
|
|
2167
|
-
"path": "src/jsonforms/testers/optionIs.ts",
|
|
2168
|
-
"declarations": [
|
|
2169
|
-
{
|
|
2170
|
-
"kind": "function",
|
|
2171
|
-
"name": "optionIs",
|
|
2172
|
-
"return": {
|
|
2173
|
-
"type": {
|
|
2174
|
-
"text": "Tester"
|
|
2175
|
-
}
|
|
2176
|
-
},
|
|
2177
|
-
"parameters": [
|
|
2178
|
-
{
|
|
2179
|
-
"name": "optionName",
|
|
2180
|
-
"type": {
|
|
2181
|
-
"text": "string"
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
]
|
|
2185
|
-
}
|
|
2186
|
-
],
|
|
2187
|
-
"exports": [
|
|
2188
|
-
{
|
|
2189
|
-
"kind": "js",
|
|
2190
|
-
"name": "optionIs",
|
|
2191
|
-
"declaration": {
|
|
2192
|
-
"name": "optionIs",
|
|
2193
|
-
"module": "src/jsonforms/testers/optionIs.ts"
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
]
|
|
2197
|
-
},
|
|
2198
1972
|
{
|
|
2199
1973
|
"kind": "javascript-module",
|
|
2200
1974
|
"path": "src/jsonforms/renderers/ArrayListWrapperRenderer.ts",
|
|
@@ -4399,6 +4173,232 @@
|
|
|
4399
4173
|
}
|
|
4400
4174
|
}
|
|
4401
4175
|
]
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
"kind": "javascript-module",
|
|
4179
|
+
"path": "src/jsonforms/testers/isArray.ts",
|
|
4180
|
+
"declarations": [
|
|
4181
|
+
{
|
|
4182
|
+
"kind": "function",
|
|
4183
|
+
"name": "isArray",
|
|
4184
|
+
"parameters": [
|
|
4185
|
+
{
|
|
4186
|
+
"name": "itemsType",
|
|
4187
|
+
"type": {
|
|
4188
|
+
"text": "ArrayItemsType"
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
]
|
|
4192
|
+
}
|
|
4193
|
+
],
|
|
4194
|
+
"exports": [
|
|
4195
|
+
{
|
|
4196
|
+
"kind": "js",
|
|
4197
|
+
"name": "isArray",
|
|
4198
|
+
"declaration": {
|
|
4199
|
+
"name": "isArray",
|
|
4200
|
+
"module": "src/jsonforms/testers/isArray.ts"
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
]
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
"kind": "javascript-module",
|
|
4207
|
+
"path": "src/jsonforms/testers/isDate.ts",
|
|
4208
|
+
"declarations": [
|
|
4209
|
+
{
|
|
4210
|
+
"kind": "variable",
|
|
4211
|
+
"name": "isOneOfDate"
|
|
4212
|
+
}
|
|
4213
|
+
],
|
|
4214
|
+
"exports": [
|
|
4215
|
+
{
|
|
4216
|
+
"kind": "js",
|
|
4217
|
+
"name": "isOneOfDate",
|
|
4218
|
+
"declaration": {
|
|
4219
|
+
"name": "isOneOfDate",
|
|
4220
|
+
"module": "src/jsonforms/testers/isDate.ts"
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
]
|
|
4224
|
+
},
|
|
4225
|
+
{
|
|
4226
|
+
"kind": "javascript-module",
|
|
4227
|
+
"path": "src/jsonforms/testers/isInvisible.ts",
|
|
4228
|
+
"declarations": [
|
|
4229
|
+
{
|
|
4230
|
+
"kind": "function",
|
|
4231
|
+
"name": "isInvisible",
|
|
4232
|
+
"return": {
|
|
4233
|
+
"type": {
|
|
4234
|
+
"text": "boolean"
|
|
4235
|
+
}
|
|
4236
|
+
},
|
|
4237
|
+
"parameters": [
|
|
4238
|
+
{
|
|
4239
|
+
"name": "uischema",
|
|
4240
|
+
"type": {
|
|
4241
|
+
"text": "UISchemaElement"
|
|
4242
|
+
}
|
|
4243
|
+
},
|
|
4244
|
+
{
|
|
4245
|
+
"name": "schema",
|
|
4246
|
+
"type": {
|
|
4247
|
+
"text": "JsonSchema"
|
|
4248
|
+
}
|
|
4249
|
+
},
|
|
4250
|
+
{
|
|
4251
|
+
"name": "context",
|
|
4252
|
+
"type": {
|
|
4253
|
+
"text": "TesterContext"
|
|
4254
|
+
}
|
|
4255
|
+
}
|
|
4256
|
+
]
|
|
4257
|
+
}
|
|
4258
|
+
],
|
|
4259
|
+
"exports": [
|
|
4260
|
+
{
|
|
4261
|
+
"kind": "js",
|
|
4262
|
+
"name": "isInvisible",
|
|
4263
|
+
"declaration": {
|
|
4264
|
+
"name": "isInvisible",
|
|
4265
|
+
"module": "src/jsonforms/testers/isInvisible.ts"
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4268
|
+
]
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
"kind": "javascript-module",
|
|
4272
|
+
"path": "src/jsonforms/testers/isOneOfBoolean.ts",
|
|
4273
|
+
"declarations": [
|
|
4274
|
+
{
|
|
4275
|
+
"kind": "variable",
|
|
4276
|
+
"name": "isOneOfBoolean"
|
|
4277
|
+
}
|
|
4278
|
+
],
|
|
4279
|
+
"exports": [
|
|
4280
|
+
{
|
|
4281
|
+
"kind": "js",
|
|
4282
|
+
"name": "isOneOfBoolean",
|
|
4283
|
+
"declaration": {
|
|
4284
|
+
"name": "isOneOfBoolean",
|
|
4285
|
+
"module": "src/jsonforms/testers/isOneOfBoolean.ts"
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
]
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"kind": "javascript-module",
|
|
4292
|
+
"path": "src/jsonforms/testers/isOneOfEnum.ts",
|
|
4293
|
+
"declarations": [
|
|
4294
|
+
{
|
|
4295
|
+
"kind": "variable",
|
|
4296
|
+
"name": "isOneOfEnum"
|
|
4297
|
+
}
|
|
4298
|
+
],
|
|
4299
|
+
"exports": [
|
|
4300
|
+
{
|
|
4301
|
+
"kind": "js",
|
|
4302
|
+
"name": "isOneOfEnum",
|
|
4303
|
+
"declaration": {
|
|
4304
|
+
"name": "isOneOfEnum",
|
|
4305
|
+
"module": "src/jsonforms/testers/isOneOfEnum.ts"
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4308
|
+
]
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
"kind": "javascript-module",
|
|
4312
|
+
"path": "src/jsonforms/testers/isOneOfNumber.ts",
|
|
4313
|
+
"declarations": [
|
|
4314
|
+
{
|
|
4315
|
+
"kind": "variable",
|
|
4316
|
+
"name": "isOneOfNumber"
|
|
4317
|
+
}
|
|
4318
|
+
],
|
|
4319
|
+
"exports": [
|
|
4320
|
+
{
|
|
4321
|
+
"kind": "js",
|
|
4322
|
+
"name": "isOneOfNumber",
|
|
4323
|
+
"declaration": {
|
|
4324
|
+
"name": "isOneOfNumber",
|
|
4325
|
+
"module": "src/jsonforms/testers/isOneOfNumber.ts"
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
]
|
|
4329
|
+
},
|
|
4330
|
+
{
|
|
4331
|
+
"kind": "javascript-module",
|
|
4332
|
+
"path": "src/jsonforms/testers/isOneOfOptionMultiselect.ts",
|
|
4333
|
+
"declarations": [
|
|
4334
|
+
{
|
|
4335
|
+
"kind": "variable",
|
|
4336
|
+
"name": "isOneOfOptionMultiselect"
|
|
4337
|
+
}
|
|
4338
|
+
],
|
|
4339
|
+
"exports": [
|
|
4340
|
+
{
|
|
4341
|
+
"kind": "js",
|
|
4342
|
+
"name": "isOneOfOptionMultiselect",
|
|
4343
|
+
"declaration": {
|
|
4344
|
+
"name": "isOneOfOptionMultiselect",
|
|
4345
|
+
"module": "src/jsonforms/testers/isOneOfOptionMultiselect.ts"
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
]
|
|
4349
|
+
},
|
|
4350
|
+
{
|
|
4351
|
+
"kind": "javascript-module",
|
|
4352
|
+
"path": "src/jsonforms/testers/isTime.ts",
|
|
4353
|
+
"declarations": [
|
|
4354
|
+
{
|
|
4355
|
+
"kind": "variable",
|
|
4356
|
+
"name": "isOneOfTime"
|
|
4357
|
+
}
|
|
4358
|
+
],
|
|
4359
|
+
"exports": [
|
|
4360
|
+
{
|
|
4361
|
+
"kind": "js",
|
|
4362
|
+
"name": "isOneOfTime",
|
|
4363
|
+
"declaration": {
|
|
4364
|
+
"name": "isOneOfTime",
|
|
4365
|
+
"module": "src/jsonforms/testers/isTime.ts"
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
]
|
|
4369
|
+
},
|
|
4370
|
+
{
|
|
4371
|
+
"kind": "javascript-module",
|
|
4372
|
+
"path": "src/jsonforms/testers/optionIs.ts",
|
|
4373
|
+
"declarations": [
|
|
4374
|
+
{
|
|
4375
|
+
"kind": "function",
|
|
4376
|
+
"name": "optionIs",
|
|
4377
|
+
"return": {
|
|
4378
|
+
"type": {
|
|
4379
|
+
"text": "Tester"
|
|
4380
|
+
}
|
|
4381
|
+
},
|
|
4382
|
+
"parameters": [
|
|
4383
|
+
{
|
|
4384
|
+
"name": "optionName",
|
|
4385
|
+
"type": {
|
|
4386
|
+
"text": "string"
|
|
4387
|
+
}
|
|
4388
|
+
}
|
|
4389
|
+
]
|
|
4390
|
+
}
|
|
4391
|
+
],
|
|
4392
|
+
"exports": [
|
|
4393
|
+
{
|
|
4394
|
+
"kind": "js",
|
|
4395
|
+
"name": "optionIs",
|
|
4396
|
+
"declaration": {
|
|
4397
|
+
"name": "optionIs",
|
|
4398
|
+
"module": "src/jsonforms/testers/optionIs.ts"
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
]
|
|
4402
4402
|
}
|
|
4403
4403
|
]
|
|
4404
4404
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-renderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/dispatch-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAMZ,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch-renderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/dispatch-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAMZ,MAAM,yBAAyB,CAAC;AAsBjC,qBAMa,gBAAiB,SAAQ,WAAW;IACnC,SAAS,MAAC;IACtB,gBAAgB;IAIJ,KAAK,MAAC;IAClB,YAAY;IAGA,OAAO,MAAC;IAEpB,OAAO,CAAC,UAAU,CAAS;IAE3B,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAI3B;IAED,gBAAgB;IAGJ,QAAQ,MAAC;IACT,OAAO,MAAC;IACR,QAAQ,MAAC;IACT,MAAM,MAAC;IACnB,aAAa;IAIb,cAAc,aAmBZ;IAEF,MAAM;IAIN,IAAI,kBAAkB,QAgBrB;IAED,oBAAoB;CAKrB"}
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -475,62 +475,6 @@ export type NumberRendererOptions = {
|
|
|
475
475
|
*/
|
|
476
476
|
changeOnInput?: boolean;
|
|
477
477
|
};
|
|
478
|
-
/**
|
|
479
|
-
* Parameters supplied to the {@link ControlOnChangeFn} callback.
|
|
480
|
-
* @public
|
|
481
|
-
*/
|
|
482
|
-
export type ControlOnChangeParams = {
|
|
483
|
-
/**
|
|
484
|
-
* The new value written to the form field at `path`.
|
|
485
|
-
* @public
|
|
486
|
-
*/
|
|
487
|
-
value: any;
|
|
488
|
-
/**
|
|
489
|
-
* Dot-notation path of the field that changed (e.g. `"quantity"`, `"items.0.price"`).
|
|
490
|
-
* @public
|
|
491
|
-
*/
|
|
492
|
-
path: string;
|
|
493
|
-
/**
|
|
494
|
-
* A snapshot of the full form data with the current change already applied.
|
|
495
|
-
* Supports arbitrarily nested objects and array paths.
|
|
496
|
-
* @public
|
|
497
|
-
*/
|
|
498
|
-
data: any;
|
|
499
|
-
/**
|
|
500
|
-
* Updates any other field in the form by its dot-notation path.
|
|
501
|
-
* Works for top-level fields, nested object properties, and array item fields
|
|
502
|
-
* (e.g. `handleChange("items.0.total", 42)`).
|
|
503
|
-
* @public
|
|
504
|
-
*/
|
|
505
|
-
handleChange: (path: string, value: any) => void;
|
|
506
|
-
};
|
|
507
|
-
/**
|
|
508
|
-
* Optional change handler for a form control, set via `options.onChange` in the uischema.
|
|
509
|
-
* Called after the primary field value is written to form state.
|
|
510
|
-
* Use `handleChange` inside the callback to update other fields — including fields inside
|
|
511
|
-
* arrays and nested objects — without needing to listen to `data-change` at the form level.
|
|
512
|
-
*
|
|
513
|
-
* @example
|
|
514
|
-
* ```ts
|
|
515
|
-
* {
|
|
516
|
-
* type: 'Control',
|
|
517
|
-
* scope: '#/properties/QUANTITY',
|
|
518
|
-
* options: {
|
|
519
|
-
* onChange: ({ value, path, data, handleChange }) => {
|
|
520
|
-
* // Recompute a derived field whenever QUANTITY changes
|
|
521
|
-
* handleChange('TOTAL', value * data.PRICE);
|
|
522
|
-
* // Update a nested field
|
|
523
|
-
* handleChange('meta.lastEdited', Date.now());
|
|
524
|
-
* // Update a field inside the same array row (path already includes row index)
|
|
525
|
-
* const rowPrefix = path.split('.').slice(0, -1).join('.');
|
|
526
|
-
* handleChange(`${rowPrefix}.SUBTOTAL`, value * 10);
|
|
527
|
-
* },
|
|
528
|
-
* },
|
|
529
|
-
* }
|
|
530
|
-
* ```
|
|
531
|
-
* @public
|
|
532
|
-
*/
|
|
533
|
-
export type ControlOnChangeFn = (params: ControlOnChangeParams) => void;
|
|
534
478
|
/**
|
|
535
479
|
* Standard configuration options available for all renderers.
|
|
536
480
|
* @public
|
|
@@ -570,13 +514,6 @@ export type StandardRendererOptions = {
|
|
|
570
514
|
* @public
|
|
571
515
|
*/
|
|
572
516
|
useNumberControl?: boolean;
|
|
573
|
-
/**
|
|
574
|
-
* Optional callback fired after this control's value is written to form state.
|
|
575
|
-
* Receives the new value, the field path, a full-data snapshot, and a `handleChange`
|
|
576
|
-
* function for updating other fields (including nested objects and array items).
|
|
577
|
-
* @public
|
|
578
|
-
*/
|
|
579
|
-
onChange?: ControlOnChangeFn;
|
|
580
517
|
};
|
|
581
518
|
/**
|
|
582
519
|
* Configuration options for the segmented control renderer.
|
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AAC;IACpC;;OAEG;IACH,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { __decorate, __rest } from "tslib";
|
|
2
2
|
import { mapDispatchToControlProps, mapStateToJsonFormsRendererProps } from '@jsonforms/core';
|
|
3
3
|
import { FASTElement, html, css, observable, Observable, customElement, } from '@microsoft/fast-element';
|
|
4
|
-
import cloneDeep from 'lodash/cloneDeep';
|
|
5
4
|
import maxBy from 'lodash/maxBy';
|
|
6
|
-
import set from 'lodash/set';
|
|
7
5
|
import { logger } from '../../utils';
|
|
8
6
|
const template = html `
|
|
9
7
|
<template>${(x) => x.determinedRenderer.renderer}</template>
|
|
@@ -20,7 +18,6 @@ let DispatchRenderer = class DispatchRenderer extends FASTElement {
|
|
|
20
18
|
super(...arguments);
|
|
21
19
|
this._submitted = false;
|
|
22
20
|
this.createRenderer = () => {
|
|
23
|
-
var _a, _b;
|
|
24
21
|
if (!this.jsonforms || !this.dispatch || !this.props) {
|
|
25
22
|
return;
|
|
26
23
|
}
|
|
@@ -32,16 +29,6 @@ let DispatchRenderer = class DispatchRenderer extends FASTElement {
|
|
|
32
29
|
this.determinedRenderer.mapper,
|
|
33
30
|
// @ts-ignore
|
|
34
31
|
this.determinedRenderer.dispatchMapper);
|
|
35
|
-
const onChange = (_b = (_a = this.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.onChange;
|
|
36
|
-
if (typeof onChange === 'function') {
|
|
37
|
-
const originalHandleChange = this.control.handleChange;
|
|
38
|
-
this.control = Object.assign(Object.assign({}, this.control), { handleChange: (path, value) => {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
originalHandleChange(path, value);
|
|
41
|
-
const updatedData = set(cloneDeep((_c = (_b = (_a = this.jsonforms) === null || _a === void 0 ? void 0 : _a.core) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : {}), path, value);
|
|
42
|
-
onChange({ value, path, data: updatedData, handleChange: originalHandleChange });
|
|
43
|
-
} });
|
|
44
|
-
}
|
|
45
32
|
};
|
|
46
33
|
}
|
|
47
34
|
jsonformsChanged() {
|
|
@@ -562,67 +562,6 @@
|
|
|
562
562
|
"endIndex": 6
|
|
563
563
|
}
|
|
564
564
|
},
|
|
565
|
-
{
|
|
566
|
-
"kind": "TypeAlias",
|
|
567
|
-
"canonicalReference": "@genesislcap/foundation-forms!ControlOnChangeFn:type",
|
|
568
|
-
"docComment": "/**\n * Optional change handler for a form control, set via `options.onChange` in the uischema. Called after the primary field value is written to form state. Use `handleChange` inside the callback to update other fields — including fields inside arrays and nested objects — without needing to listen to `data-change` at the form level.\n *\n * @example\n * ```ts\n * {\n * type: 'Control',\n * scope: '#/properties/QUANTITY',\n * options: {\n * onChange: ({ value, path, data, handleChange }) => {\n * // Recompute a derived field whenever QUANTITY changes\n * handleChange('TOTAL', value * data.PRICE);\n * // Update a nested field\n * handleChange('meta.lastEdited', Date.now());\n * // Update a field inside the same array row (path already includes row index)\n * const rowPrefix = path.split('.').slice(0, -1).join('.');\n * handleChange(`${rowPrefix}.SUBTOTAL`, value * 10);\n * },\n * },\n * }\n * ```\n *\n * @public\n */\n",
|
|
569
|
-
"excerptTokens": [
|
|
570
|
-
{
|
|
571
|
-
"kind": "Content",
|
|
572
|
-
"text": "export type ControlOnChangeFn = "
|
|
573
|
-
},
|
|
574
|
-
{
|
|
575
|
-
"kind": "Content",
|
|
576
|
-
"text": "(params: "
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"kind": "Reference",
|
|
580
|
-
"text": "ControlOnChangeParams",
|
|
581
|
-
"canonicalReference": "@genesislcap/foundation-forms!ControlOnChangeParams:type"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"kind": "Content",
|
|
585
|
-
"text": ") => void"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"kind": "Content",
|
|
589
|
-
"text": ";"
|
|
590
|
-
}
|
|
591
|
-
],
|
|
592
|
-
"fileUrlPath": "src/types.ts",
|
|
593
|
-
"releaseTag": "Public",
|
|
594
|
-
"name": "ControlOnChangeFn",
|
|
595
|
-
"typeTokenRange": {
|
|
596
|
-
"startIndex": 1,
|
|
597
|
-
"endIndex": 4
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
"kind": "TypeAlias",
|
|
602
|
-
"canonicalReference": "@genesislcap/foundation-forms!ControlOnChangeParams:type",
|
|
603
|
-
"docComment": "/**\n * Parameters supplied to the {@link ControlOnChangeFn} callback.\n *\n * @public\n */\n",
|
|
604
|
-
"excerptTokens": [
|
|
605
|
-
{
|
|
606
|
-
"kind": "Content",
|
|
607
|
-
"text": "export type ControlOnChangeParams = "
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
"kind": "Content",
|
|
611
|
-
"text": "{\n value: any;\n path: string;\n data: any;\n handleChange: (path: string, value: any) => void;\n}"
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
"kind": "Content",
|
|
615
|
-
"text": ";"
|
|
616
|
-
}
|
|
617
|
-
],
|
|
618
|
-
"fileUrlPath": "src/types.ts",
|
|
619
|
-
"releaseTag": "Public",
|
|
620
|
-
"name": "ControlOnChangeParams",
|
|
621
|
-
"typeTokenRange": {
|
|
622
|
-
"startIndex": 1,
|
|
623
|
-
"endIndex": 2
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
565
|
{
|
|
627
566
|
"kind": "Class",
|
|
628
567
|
"canonicalReference": "@genesislcap/foundation-forms!ControlWrapper:class",
|
|
@@ -4082,16 +4021,7 @@
|
|
|
4082
4021
|
},
|
|
4083
4022
|
{
|
|
4084
4023
|
"kind": "Content",
|
|
4085
|
-
"text": "[];\n i18n?: {\n [key: string]: any;\n };\n tooltip?: string;\n tabIndex?: number;\n useNumberControl?: boolean;\n
|
|
4086
|
-
},
|
|
4087
|
-
{
|
|
4088
|
-
"kind": "Reference",
|
|
4089
|
-
"text": "ControlOnChangeFn",
|
|
4090
|
-
"canonicalReference": "@genesislcap/foundation-forms!ControlOnChangeFn:type"
|
|
4091
|
-
},
|
|
4092
|
-
{
|
|
4093
|
-
"kind": "Content",
|
|
4094
|
-
"text": ";\n}"
|
|
4024
|
+
"text": "[];\n i18n?: {\n [key: string]: any;\n };\n tooltip?: string;\n tabIndex?: number;\n useNumberControl?: boolean;\n}"
|
|
4095
4025
|
},
|
|
4096
4026
|
{
|
|
4097
4027
|
"kind": "Content",
|
|
@@ -4103,7 +4033,7 @@
|
|
|
4103
4033
|
"name": "StandardRendererOptions",
|
|
4104
4034
|
"typeTokenRange": {
|
|
4105
4035
|
"startIndex": 1,
|
|
4106
|
-
"endIndex":
|
|
4036
|
+
"endIndex": 4
|
|
4107
4037
|
}
|
|
4108
4038
|
},
|
|
4109
4039
|
{
|
|
@@ -353,64 +353,6 @@ export declare type ConnectedRenderersOptions = {
|
|
|
353
353
|
labelRowFormatter?: (any: any) => string;
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
-
/**
|
|
357
|
-
* Optional change handler for a form control, set via `options.onChange` in the uischema.
|
|
358
|
-
* Called after the primary field value is written to form state.
|
|
359
|
-
* Use `handleChange` inside the callback to update other fields — including fields inside
|
|
360
|
-
* arrays and nested objects — without needing to listen to `data-change` at the form level.
|
|
361
|
-
*
|
|
362
|
-
* @example
|
|
363
|
-
* ```ts
|
|
364
|
-
* {
|
|
365
|
-
* type: 'Control',
|
|
366
|
-
* scope: '#/properties/QUANTITY',
|
|
367
|
-
* options: {
|
|
368
|
-
* onChange: ({ value, path, data, handleChange }) => {
|
|
369
|
-
* // Recompute a derived field whenever QUANTITY changes
|
|
370
|
-
* handleChange('TOTAL', value * data.PRICE);
|
|
371
|
-
* // Update a nested field
|
|
372
|
-
* handleChange('meta.lastEdited', Date.now());
|
|
373
|
-
* // Update a field inside the same array row (path already includes row index)
|
|
374
|
-
* const rowPrefix = path.split('.').slice(0, -1).join('.');
|
|
375
|
-
* handleChange(`${rowPrefix}.SUBTOTAL`, value * 10);
|
|
376
|
-
* },
|
|
377
|
-
* },
|
|
378
|
-
* }
|
|
379
|
-
* ```
|
|
380
|
-
* @public
|
|
381
|
-
*/
|
|
382
|
-
export declare type ControlOnChangeFn = (params: ControlOnChangeParams) => void;
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Parameters supplied to the {@link ControlOnChangeFn} callback.
|
|
386
|
-
* @public
|
|
387
|
-
*/
|
|
388
|
-
export declare type ControlOnChangeParams = {
|
|
389
|
-
/**
|
|
390
|
-
* The new value written to the form field at `path`.
|
|
391
|
-
* @public
|
|
392
|
-
*/
|
|
393
|
-
value: any;
|
|
394
|
-
/**
|
|
395
|
-
* Dot-notation path of the field that changed (e.g. `"quantity"`, `"items.0.price"`).
|
|
396
|
-
* @public
|
|
397
|
-
*/
|
|
398
|
-
path: string;
|
|
399
|
-
/**
|
|
400
|
-
* A snapshot of the full form data with the current change already applied.
|
|
401
|
-
* Supports arbitrarily nested objects and array paths.
|
|
402
|
-
* @public
|
|
403
|
-
*/
|
|
404
|
-
data: any;
|
|
405
|
-
/**
|
|
406
|
-
* Updates any other field in the form by its dot-notation path.
|
|
407
|
-
* Works for top-level fields, nested object properties, and array item fields
|
|
408
|
-
* (e.g. `handleChange("items.0.total", 42)`).
|
|
409
|
-
* @public
|
|
410
|
-
*/
|
|
411
|
-
handleChange: (path: string, value: any) => void;
|
|
412
|
-
};
|
|
413
|
-
|
|
414
356
|
/**
|
|
415
357
|
* @deprecated Use `controlWrapperTemplate` instead. The `<control-wrapper>` custom element
|
|
416
358
|
* will be removed in a future major version. Migrate to the light-DOM `controlWrapperTemplate`
|
|
@@ -2204,13 +2146,6 @@ export declare type StandardRendererOptions = {
|
|
|
2204
2146
|
* @public
|
|
2205
2147
|
*/
|
|
2206
2148
|
useNumberControl?: boolean;
|
|
2207
|
-
/**
|
|
2208
|
-
* Optional callback fired after this control's value is written to form state.
|
|
2209
|
-
* Receives the new value, the field path, a full-data snapshot, and a `handleChange`
|
|
2210
|
-
* function for updating other fields (including nested objects and array items).
|
|
2211
|
-
* @public
|
|
2212
|
-
*/
|
|
2213
|
-
onChange?: ControlOnChangeFn;
|
|
2214
2149
|
};
|
|
2215
2150
|
|
|
2216
2151
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-forms",
|
|
3
3
|
"description": "Genesis Foundation Forms",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.433.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -55,23 +55,23 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@genesislcap/foundation-testing": "14.
|
|
59
|
-
"@genesislcap/genx": "14.
|
|
60
|
-
"@genesislcap/rollup-builder": "14.
|
|
61
|
-
"@genesislcap/ts-builder": "14.
|
|
62
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
63
|
-
"@genesislcap/vite-builder": "14.
|
|
64
|
-
"@genesislcap/webpack-builder": "14.
|
|
58
|
+
"@genesislcap/foundation-testing": "14.433.0",
|
|
59
|
+
"@genesislcap/genx": "14.433.0",
|
|
60
|
+
"@genesislcap/rollup-builder": "14.433.0",
|
|
61
|
+
"@genesislcap/ts-builder": "14.433.0",
|
|
62
|
+
"@genesislcap/uvu-playwright-builder": "14.433.0",
|
|
63
|
+
"@genesislcap/vite-builder": "14.433.0",
|
|
64
|
+
"@genesislcap/webpack-builder": "14.433.0",
|
|
65
65
|
"@types/json-schema": "^7.0.11",
|
|
66
66
|
"@types/papaparse": "^5.3.14"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@genesislcap/foundation-comms": "14.
|
|
70
|
-
"@genesislcap/foundation-criteria": "14.
|
|
71
|
-
"@genesislcap/foundation-logger": "14.
|
|
72
|
-
"@genesislcap/foundation-notifications": "14.
|
|
73
|
-
"@genesislcap/foundation-ui": "14.
|
|
74
|
-
"@genesislcap/foundation-utils": "14.
|
|
69
|
+
"@genesislcap/foundation-comms": "14.433.0",
|
|
70
|
+
"@genesislcap/foundation-criteria": "14.433.0",
|
|
71
|
+
"@genesislcap/foundation-logger": "14.433.0",
|
|
72
|
+
"@genesislcap/foundation-notifications": "14.433.0",
|
|
73
|
+
"@genesislcap/foundation-ui": "14.433.0",
|
|
74
|
+
"@genesislcap/foundation-utils": "14.433.0",
|
|
75
75
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
76
76
|
"@jsonforms/core": "^3.2.1",
|
|
77
77
|
"@microsoft/fast-components": "2.30.6",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
95
|
"customElements": "dist/custom-elements.json",
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "0ddedcdfa75d7b64b9c7b1397dcfa3008e23cd04"
|
|
97
97
|
}
|