@genesislcap/foundation-forms 14.429.2 → 14.430.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 +266 -245
- package/dist/dts/form.d.ts +11 -3
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/form.styles.d.ts.map +1 -1
- package/dist/dts/form.template.d.ts.map +1 -1
- package/dist/dts/jsonforms/json-forms.d.ts +3 -1
- package/dist/dts/jsonforms/json-forms.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/EnumControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/dispatch-renderer.d.ts +3 -1
- package/dist/dts/jsonforms/renderers/dispatch-renderer.d.ts.map +1 -1
- package/dist/esm/form.js +19 -1
- package/dist/esm/form.styles.js +4 -0
- package/dist/esm/form.template.js +22 -10
- package/dist/esm/jsonforms/json-forms.js +11 -5
- package/dist/esm/jsonforms/renderers/ArrayListWrapperRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/CategorizationWrapperRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/EnumControlRenderer.js +18 -7
- package/dist/esm/jsonforms/renderers/LayoutFormGridRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/LayoutGroupRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/LayoutHorizontalRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/LayoutRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/SegmentedControlRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/StepperWrapperRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/VerticalCategorizationWrapperRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/dispatch-renderer.js +13 -6
- package/dist/foundation-forms.api.json +30 -0
- package/dist/foundation-forms.d.ts +14 -4
- package/package.json +15 -15
|
@@ -173,6 +173,15 @@
|
|
|
173
173
|
"description": "Controls the visibility of the submit button.",
|
|
174
174
|
"privacy": "public"
|
|
175
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"kind": "field",
|
|
178
|
+
"name": "showReset",
|
|
179
|
+
"type": {
|
|
180
|
+
"text": "boolean"
|
|
181
|
+
},
|
|
182
|
+
"description": "When set, shows a Reset button in the actions area that clears the form data and resets validation state.",
|
|
183
|
+
"privacy": "public"
|
|
184
|
+
},
|
|
176
185
|
{
|
|
177
186
|
"kind": "field",
|
|
178
187
|
"name": "bulkInsert",
|
|
@@ -578,6 +587,14 @@
|
|
|
578
587
|
"description": "Controls the visibility of the submit button.",
|
|
579
588
|
"fieldName": "hideSubmit"
|
|
580
589
|
},
|
|
590
|
+
{
|
|
591
|
+
"name": "show-reset-button",
|
|
592
|
+
"type": {
|
|
593
|
+
"text": "boolean"
|
|
594
|
+
},
|
|
595
|
+
"description": "When set, shows a Reset button in the actions area that clears the form data and resets validation state.",
|
|
596
|
+
"fieldName": "showReset"
|
|
597
|
+
},
|
|
581
598
|
{
|
|
582
599
|
"name": "bulk-insert",
|
|
583
600
|
"type": {
|
|
@@ -1348,6 +1365,15 @@
|
|
|
1348
1365
|
"description": "JSON Forms host element for schema-driven UI.",
|
|
1349
1366
|
"name": "JSONForms",
|
|
1350
1367
|
"members": [
|
|
1368
|
+
{
|
|
1369
|
+
"kind": "field",
|
|
1370
|
+
"name": "_submitted",
|
|
1371
|
+
"type": {
|
|
1372
|
+
"text": "boolean"
|
|
1373
|
+
},
|
|
1374
|
+
"privacy": "private",
|
|
1375
|
+
"default": "false"
|
|
1376
|
+
},
|
|
1351
1377
|
{
|
|
1352
1378
|
"kind": "field",
|
|
1353
1379
|
"name": "submitted",
|
|
@@ -1527,12 +1553,6 @@
|
|
|
1527
1553
|
}
|
|
1528
1554
|
],
|
|
1529
1555
|
"attributes": [
|
|
1530
|
-
{
|
|
1531
|
-
"type": {
|
|
1532
|
-
"text": "boolean"
|
|
1533
|
-
},
|
|
1534
|
-
"fieldName": "submitted"
|
|
1535
|
-
},
|
|
1536
1556
|
{
|
|
1537
1557
|
"type": {
|
|
1538
1558
|
"text": "boolean"
|
|
@@ -1949,232 +1969,6 @@
|
|
|
1949
1969
|
}
|
|
1950
1970
|
]
|
|
1951
1971
|
},
|
|
1952
|
-
{
|
|
1953
|
-
"kind": "javascript-module",
|
|
1954
|
-
"path": "src/jsonforms/testers/isArray.ts",
|
|
1955
|
-
"declarations": [
|
|
1956
|
-
{
|
|
1957
|
-
"kind": "function",
|
|
1958
|
-
"name": "isArray",
|
|
1959
|
-
"parameters": [
|
|
1960
|
-
{
|
|
1961
|
-
"name": "itemsType",
|
|
1962
|
-
"type": {
|
|
1963
|
-
"text": "ArrayItemsType"
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
]
|
|
1967
|
-
}
|
|
1968
|
-
],
|
|
1969
|
-
"exports": [
|
|
1970
|
-
{
|
|
1971
|
-
"kind": "js",
|
|
1972
|
-
"name": "isArray",
|
|
1973
|
-
"declaration": {
|
|
1974
|
-
"name": "isArray",
|
|
1975
|
-
"module": "src/jsonforms/testers/isArray.ts"
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
]
|
|
1979
|
-
},
|
|
1980
|
-
{
|
|
1981
|
-
"kind": "javascript-module",
|
|
1982
|
-
"path": "src/jsonforms/testers/isDate.ts",
|
|
1983
|
-
"declarations": [
|
|
1984
|
-
{
|
|
1985
|
-
"kind": "variable",
|
|
1986
|
-
"name": "isOneOfDate"
|
|
1987
|
-
}
|
|
1988
|
-
],
|
|
1989
|
-
"exports": [
|
|
1990
|
-
{
|
|
1991
|
-
"kind": "js",
|
|
1992
|
-
"name": "isOneOfDate",
|
|
1993
|
-
"declaration": {
|
|
1994
|
-
"name": "isOneOfDate",
|
|
1995
|
-
"module": "src/jsonforms/testers/isDate.ts"
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
]
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
"kind": "javascript-module",
|
|
2002
|
-
"path": "src/jsonforms/testers/isInvisible.ts",
|
|
2003
|
-
"declarations": [
|
|
2004
|
-
{
|
|
2005
|
-
"kind": "function",
|
|
2006
|
-
"name": "isInvisible",
|
|
2007
|
-
"return": {
|
|
2008
|
-
"type": {
|
|
2009
|
-
"text": "boolean"
|
|
2010
|
-
}
|
|
2011
|
-
},
|
|
2012
|
-
"parameters": [
|
|
2013
|
-
{
|
|
2014
|
-
"name": "uischema",
|
|
2015
|
-
"type": {
|
|
2016
|
-
"text": "UISchemaElement"
|
|
2017
|
-
}
|
|
2018
|
-
},
|
|
2019
|
-
{
|
|
2020
|
-
"name": "schema",
|
|
2021
|
-
"type": {
|
|
2022
|
-
"text": "JsonSchema"
|
|
2023
|
-
}
|
|
2024
|
-
},
|
|
2025
|
-
{
|
|
2026
|
-
"name": "context",
|
|
2027
|
-
"type": {
|
|
2028
|
-
"text": "TesterContext"
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
]
|
|
2032
|
-
}
|
|
2033
|
-
],
|
|
2034
|
-
"exports": [
|
|
2035
|
-
{
|
|
2036
|
-
"kind": "js",
|
|
2037
|
-
"name": "isInvisible",
|
|
2038
|
-
"declaration": {
|
|
2039
|
-
"name": "isInvisible",
|
|
2040
|
-
"module": "src/jsonforms/testers/isInvisible.ts"
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
]
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
"kind": "javascript-module",
|
|
2047
|
-
"path": "src/jsonforms/testers/isOneOfBoolean.ts",
|
|
2048
|
-
"declarations": [
|
|
2049
|
-
{
|
|
2050
|
-
"kind": "variable",
|
|
2051
|
-
"name": "isOneOfBoolean"
|
|
2052
|
-
}
|
|
2053
|
-
],
|
|
2054
|
-
"exports": [
|
|
2055
|
-
{
|
|
2056
|
-
"kind": "js",
|
|
2057
|
-
"name": "isOneOfBoolean",
|
|
2058
|
-
"declaration": {
|
|
2059
|
-
"name": "isOneOfBoolean",
|
|
2060
|
-
"module": "src/jsonforms/testers/isOneOfBoolean.ts"
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
]
|
|
2064
|
-
},
|
|
2065
|
-
{
|
|
2066
|
-
"kind": "javascript-module",
|
|
2067
|
-
"path": "src/jsonforms/testers/isOneOfEnum.ts",
|
|
2068
|
-
"declarations": [
|
|
2069
|
-
{
|
|
2070
|
-
"kind": "variable",
|
|
2071
|
-
"name": "isOneOfEnum"
|
|
2072
|
-
}
|
|
2073
|
-
],
|
|
2074
|
-
"exports": [
|
|
2075
|
-
{
|
|
2076
|
-
"kind": "js",
|
|
2077
|
-
"name": "isOneOfEnum",
|
|
2078
|
-
"declaration": {
|
|
2079
|
-
"name": "isOneOfEnum",
|
|
2080
|
-
"module": "src/jsonforms/testers/isOneOfEnum.ts"
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
]
|
|
2084
|
-
},
|
|
2085
|
-
{
|
|
2086
|
-
"kind": "javascript-module",
|
|
2087
|
-
"path": "src/jsonforms/testers/isOneOfNumber.ts",
|
|
2088
|
-
"declarations": [
|
|
2089
|
-
{
|
|
2090
|
-
"kind": "variable",
|
|
2091
|
-
"name": "isOneOfNumber"
|
|
2092
|
-
}
|
|
2093
|
-
],
|
|
2094
|
-
"exports": [
|
|
2095
|
-
{
|
|
2096
|
-
"kind": "js",
|
|
2097
|
-
"name": "isOneOfNumber",
|
|
2098
|
-
"declaration": {
|
|
2099
|
-
"name": "isOneOfNumber",
|
|
2100
|
-
"module": "src/jsonforms/testers/isOneOfNumber.ts"
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
]
|
|
2104
|
-
},
|
|
2105
|
-
{
|
|
2106
|
-
"kind": "javascript-module",
|
|
2107
|
-
"path": "src/jsonforms/testers/isOneOfOptionMultiselect.ts",
|
|
2108
|
-
"declarations": [
|
|
2109
|
-
{
|
|
2110
|
-
"kind": "variable",
|
|
2111
|
-
"name": "isOneOfOptionMultiselect"
|
|
2112
|
-
}
|
|
2113
|
-
],
|
|
2114
|
-
"exports": [
|
|
2115
|
-
{
|
|
2116
|
-
"kind": "js",
|
|
2117
|
-
"name": "isOneOfOptionMultiselect",
|
|
2118
|
-
"declaration": {
|
|
2119
|
-
"name": "isOneOfOptionMultiselect",
|
|
2120
|
-
"module": "src/jsonforms/testers/isOneOfOptionMultiselect.ts"
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
]
|
|
2124
|
-
},
|
|
2125
|
-
{
|
|
2126
|
-
"kind": "javascript-module",
|
|
2127
|
-
"path": "src/jsonforms/testers/isTime.ts",
|
|
2128
|
-
"declarations": [
|
|
2129
|
-
{
|
|
2130
|
-
"kind": "variable",
|
|
2131
|
-
"name": "isOneOfTime"
|
|
2132
|
-
}
|
|
2133
|
-
],
|
|
2134
|
-
"exports": [
|
|
2135
|
-
{
|
|
2136
|
-
"kind": "js",
|
|
2137
|
-
"name": "isOneOfTime",
|
|
2138
|
-
"declaration": {
|
|
2139
|
-
"name": "isOneOfTime",
|
|
2140
|
-
"module": "src/jsonforms/testers/isTime.ts"
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
]
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
"kind": "javascript-module",
|
|
2147
|
-
"path": "src/jsonforms/testers/optionIs.ts",
|
|
2148
|
-
"declarations": [
|
|
2149
|
-
{
|
|
2150
|
-
"kind": "function",
|
|
2151
|
-
"name": "optionIs",
|
|
2152
|
-
"return": {
|
|
2153
|
-
"type": {
|
|
2154
|
-
"text": "Tester"
|
|
2155
|
-
}
|
|
2156
|
-
},
|
|
2157
|
-
"parameters": [
|
|
2158
|
-
{
|
|
2159
|
-
"name": "optionName",
|
|
2160
|
-
"type": {
|
|
2161
|
-
"text": "string"
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
]
|
|
2165
|
-
}
|
|
2166
|
-
],
|
|
2167
|
-
"exports": [
|
|
2168
|
-
{
|
|
2169
|
-
"kind": "js",
|
|
2170
|
-
"name": "optionIs",
|
|
2171
|
-
"declaration": {
|
|
2172
|
-
"name": "optionIs",
|
|
2173
|
-
"module": "src/jsonforms/testers/optionIs.ts"
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
]
|
|
2177
|
-
},
|
|
2178
1972
|
{
|
|
2179
1973
|
"kind": "javascript-module",
|
|
2180
1974
|
"path": "src/jsonforms/renderers/ArrayListWrapperRenderer.ts",
|
|
@@ -3133,7 +2927,7 @@
|
|
|
3133
2927
|
{
|
|
3134
2928
|
"kind": "variable",
|
|
3135
2929
|
"name": "LayoutFormGridRendererTemplate",
|
|
3136
|
-
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 8px;\n \"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n
|
|
2930
|
+
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 8px;\n \"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n :submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :prefix=${(x, ctx) => ctx.parent.prefix}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n `,\n )}\n </div>\n `,\n })}\n </template>\n`"
|
|
3137
2931
|
},
|
|
3138
2932
|
{
|
|
3139
2933
|
"kind": "variable",
|
|
@@ -3170,7 +2964,7 @@
|
|
|
3170
2964
|
{
|
|
3171
2965
|
"kind": "variable",
|
|
3172
2966
|
"name": "LayoutGroupRendererTemplate",
|
|
3173
|
-
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n hideLabel: true,\n innerTemplate: html<DispatchRenderer>`\n <div>\n ${when(\n (x) => x.control.label,\n html<DispatchRenderer>`\n <div\n for=\"${(x) => x.control.path + '-wrapper'}\"\n style=\"color: var(--neutral-foreground-rest);\n padding-bottom: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 4px);\n font-weight: 600;\n font-size: var(--type-ramp-base-font-size);\n display: flex;\n justify-content: space-between;\"\n >\n ${(x) => x.control.label}\n </div>\n `,\n )}\n ${repeat(\n (x) => x.control.uischema.options.childElements,\n html`\n <dispatch-renderer\n
|
|
2967
|
+
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n hideLabel: true,\n innerTemplate: html<DispatchRenderer>`\n <div>\n ${when(\n (x) => x.control.label,\n html<DispatchRenderer>`\n <div\n for=\"${(x) => x.control.path + '-wrapper'}\"\n style=\"color: var(--neutral-foreground-rest);\n padding-bottom: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 4px);\n font-weight: 600;\n font-size: var(--type-ramp-base-font-size);\n display: flex;\n justify-content: space-between;\"\n >\n ${(x) => x.control.label}\n </div>\n `,\n )}\n ${repeat(\n (x) => x.control.uischema.options.childElements,\n html`\n <dispatch-renderer\n :submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :prefix=${(x, ctx) => ctx.parent.prefix}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n `,\n )}\n </div>\n `,\n })}\n </template>\n`"
|
|
3174
2968
|
},
|
|
3175
2969
|
{
|
|
3176
2970
|
"kind": "variable",
|
|
@@ -3207,7 +3001,7 @@
|
|
|
3207
3001
|
{
|
|
3208
3002
|
"kind": "variable",
|
|
3209
3003
|
"name": "LayoutHorizontalRendererTemplate",
|
|
3210
|
-
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: flex;\n flex-direction: row;\n gap: 10px\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n style=\"flex: 1; min-width: 0\"\n
|
|
3004
|
+
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: flex;\n flex-direction: row;\n gap: 10px\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n style=\"flex: 1; min-width: 0\"\n :submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :prefix=${(x, ctx) => ctx.parent.prefix}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n `,\n )}\n </div>\n `,\n })}\n </template>\n`"
|
|
3211
3005
|
},
|
|
3212
3006
|
{
|
|
3213
3007
|
"kind": "variable",
|
|
@@ -3263,7 +3057,7 @@
|
|
|
3263
3057
|
{
|
|
3264
3058
|
"kind": "variable",
|
|
3265
3059
|
"name": "LayoutRendererTemplate",
|
|
3266
|
-
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div>\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n
|
|
3060
|
+
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div>\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <dispatch-renderer\n :submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :prefix=${(x, ctx) => ctx.parent.prefix}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n `,\n )}\n </div>\n `,\n })}\n </template>\n`"
|
|
3267
3061
|
},
|
|
3268
3062
|
{
|
|
3269
3063
|
"kind": "variable",
|
|
@@ -3397,7 +3191,7 @@
|
|
|
3397
3191
|
{
|
|
3398
3192
|
"kind": "variable",
|
|
3399
3193
|
"name": "LayoutVertical2ColumnsRendererTemplate",
|
|
3400
|
-
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <div style=\"width: 49%\">\n <dispatch-renderer\n
|
|
3194
|
+
"default": "html<DispatchRenderer>`\n <template>\n ${layoutWrapperTemplate({\n innerTemplate: html<DispatchRenderer>`\n <div\n style=\"\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <div style=\"width: 49%\">\n <dispatch-renderer\n :submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :prefix=${(x, ctx) => ctx.parent.prefix}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n </div>\n `,\n )}\n </div>\n `,\n })}\n </template>\n`"
|
|
3401
3195
|
},
|
|
3402
3196
|
{
|
|
3403
3197
|
"kind": "variable",
|
|
@@ -4299,6 +4093,15 @@
|
|
|
4299
4093
|
"kind": "field",
|
|
4300
4094
|
"name": "touched"
|
|
4301
4095
|
},
|
|
4096
|
+
{
|
|
4097
|
+
"kind": "field",
|
|
4098
|
+
"name": "_submitted",
|
|
4099
|
+
"type": {
|
|
4100
|
+
"text": "boolean"
|
|
4101
|
+
},
|
|
4102
|
+
"privacy": "private",
|
|
4103
|
+
"default": "false"
|
|
4104
|
+
},
|
|
4302
4105
|
{
|
|
4303
4106
|
"kind": "field",
|
|
4304
4107
|
"name": "submitted",
|
|
@@ -4344,14 +4147,6 @@
|
|
|
4344
4147
|
"readonly": true
|
|
4345
4148
|
}
|
|
4346
4149
|
],
|
|
4347
|
-
"attributes": [
|
|
4348
|
-
{
|
|
4349
|
-
"type": {
|
|
4350
|
-
"text": "boolean"
|
|
4351
|
-
},
|
|
4352
|
-
"fieldName": "submitted"
|
|
4353
|
-
}
|
|
4354
|
-
],
|
|
4355
4150
|
"superclass": {
|
|
4356
4151
|
"name": "FASTElement",
|
|
4357
4152
|
"package": "@microsoft/fast-element"
|
|
@@ -4378,6 +4173,232 @@
|
|
|
4378
4173
|
}
|
|
4379
4174
|
}
|
|
4380
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
|
+
]
|
|
4381
4402
|
}
|
|
4382
4403
|
]
|
|
4383
4404
|
}
|
package/dist/dts/form.d.ts
CHANGED
|
@@ -370,9 +370,7 @@ declare const Form_base: (new (...args: any[]) => {
|
|
|
370
370
|
nonce?: string;
|
|
371
371
|
tabIndex: number;
|
|
372
372
|
blur(): void;
|
|
373
|
-
focus(options
|
|
374
|
-
* @internal
|
|
375
|
-
*/: FocusOptions): void;
|
|
373
|
+
focus(options?: FocusOptions): void;
|
|
376
374
|
}) & typeof FoundationElement;
|
|
377
375
|
/**
|
|
378
376
|
* Foundation form component for automatically generated forms based on json schema
|
|
@@ -556,6 +554,11 @@ export declare class Form extends Form_base {
|
|
|
556
554
|
* @public
|
|
557
555
|
*/
|
|
558
556
|
hideSubmit: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* When set, shows a Reset button in the actions area that clears the form data and resets validation state.
|
|
559
|
+
* @public
|
|
560
|
+
*/
|
|
561
|
+
showReset: boolean;
|
|
559
562
|
/**
|
|
560
563
|
* When enabled, transforms the form into bulk insert mode where multiple records can be added.
|
|
561
564
|
* The JSON schema will be wrapped as an array, and each item will be submitted separately.
|
|
@@ -635,6 +638,11 @@ export declare class Form extends Form_base {
|
|
|
635
638
|
* @internal
|
|
636
639
|
*/
|
|
637
640
|
get isSubmitHidden(): boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Controls the visibility of the reset button.
|
|
643
|
+
* @internal
|
|
644
|
+
*/
|
|
645
|
+
get isResetVisible(): boolean;
|
|
638
646
|
/**
|
|
639
647
|
* @internal
|
|
640
648
|
*/
|
package/dist/dts/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAMA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAMA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDAoFhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiBnC,gBAAgB;AAChB,eAAO,MAAM,eAAe,GAAI,WAAM,
|
|
1
|
+
{"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiBnC,gBAAgB;AAChB,eAAO,MAAM,eAAe,GAAI,WAAM,8DAiHrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,2DAElC,CAAC"}
|
|
@@ -10,7 +10,9 @@ import { BulkRowStatus } from '../types';
|
|
|
10
10
|
* @fires data-change - Fired when bound form data changes
|
|
11
11
|
*/
|
|
12
12
|
export declare class JSONForms extends FASTElement {
|
|
13
|
-
|
|
13
|
+
private _submitted;
|
|
14
|
+
get submitted(): boolean;
|
|
15
|
+
set submitted(value: boolean);
|
|
14
16
|
prefix: any;
|
|
15
17
|
prefixChanged(): void;
|
|
16
18
|
jsonforms: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-forms.d.ts","sourceRoot":"","sources":["../../../src/jsonforms/json-forms.ts"],"names":[],"mappings":"AACA,OAAO,EASL,8BAA8B,EAE9B,aAAa,EAEb,eAAe,EACf,YAAY,EACZ,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,WAAW,
|
|
1
|
+
{"version":3,"file":"json-forms.d.ts","sourceRoot":"","sources":["../../../src/jsonforms/json-forms.ts"],"names":[],"mappings":"AACA,OAAO,EASL,8BAA8B,EAE9B,aAAa,EAEb,eAAe,EACf,YAAY,EACZ,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,WAAW,EAKZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAmCzC;;;;;;GAMG;AACH,qBAUa,SAAU,SAAQ,WAAW;IACxC,OAAO,CAAC,UAAU,CAAS;IAE3B,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAG3B;IAEW,MAAM,MAAC;IACnB,aAAa;IAGD,SAAS,MAAC;IACV,IAAI,MAAC;IACL,YAAY,MAAC;IAEb,MAAM,MAAC;IACnB,aAAa;IAmDD,QAAQ,EAAE,eAAe,CAAC;IACtC,eAAe;IAIH,IAAI,MAAC;IACjB,WAAW;IA+BC,SAAS,EAAE,8BAA8B,EAAE,CAAC;IACxD,gBAAgB;IAIJ,cAAc,EAAE,cAAc,CAAC;IAC3C,qBAAqB;IAIT,GAAG,EAAE,GAAG,CAAiD;IACrE,UAAU;IAIiB,QAAQ,EAAE,OAAO,CAAC;IAC7C,eAAe;IAIH,MAAM,EAAE,GAAG,CAAC;IACxB,aAAa;IAIb;;;OAGG;IACS,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAa;IACtE,wBAAwB;IAUxB;;;OAGG;IACS,UAAU,EAAE,OAAO,CAAS;IACxC,iBAAiB;IAUjB,IAAI,KAAK,IAAI,aAAa,CAuBzB;IAED,QAAQ,GAAI,QAAQ,YAAY,UAgB9B;IAEF;;;;OAIG;IACH,QAAQ,GAAI,aAAQ,KAAG,WAAW,EAAE,CAwClC;IAEI,uBAAuB;CAQ9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/EnumControlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,cAAc,EAEd,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD,eAAO,MAAM,0BAA0B,GACrC,OAAO,cAAc,EACrB,UAAU,iBAAiB,GAAG,cAAc,KAC3C,mBAAmB,GAAG,cAwBxB,CAAC;
|
|
1
|
+
{"version":3,"file":"EnumControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/EnumControlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,cAAc,EAEd,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD,eAAO,MAAM,0BAA0B,GACrC,OAAO,cAAc,EACrB,UAAU,iBAAiB,GAAG,cAAc,KAC3C,mBAAmB,GAAG,cAwBxB,CAAC;AAuCF,eAAO,MAAM,2BAA2B,GAAI,SAAQ,MAAe,0EAiClE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,aAMtC,CAAC"}
|
|
@@ -5,7 +5,9 @@ export declare class DispatchRenderer extends FASTElement {
|
|
|
5
5
|
props: any;
|
|
6
6
|
propsChanged(): void;
|
|
7
7
|
touched: any;
|
|
8
|
-
|
|
8
|
+
private _submitted;
|
|
9
|
+
get submitted(): boolean;
|
|
10
|
+
set submitted(value: boolean);
|
|
9
11
|
submittedChanged(): void;
|
|
10
12
|
dispatch: any;
|
|
11
13
|
control: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-renderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/dispatch-renderer.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
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/esm/form.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Connect } from '@genesislcap/foundation-comms';
|
|
|
3
3
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
4
4
|
import JsonSchemaDereferencer from '@json-schema-tools/dereferencer';
|
|
5
5
|
import { isControl, isStringControl, mapStateToControlProps, rankWith } from '@jsonforms/core';
|
|
6
|
-
import { attr, customElement, DOM, observable, volatile } from '@microsoft/fast-element';
|
|
6
|
+
import { attr, customElement, DOM, observable, Observable, volatile, } from '@microsoft/fast-element';
|
|
7
7
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
8
8
|
import { foundationFormStyles as styles } from './form.styles';
|
|
9
9
|
import { foundationFormTemplate as template } from './form.template';
|
|
@@ -524,6 +524,13 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
|
|
|
524
524
|
return true;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* Controls the visibility of the reset button.
|
|
529
|
+
* @internal
|
|
530
|
+
*/
|
|
531
|
+
get isResetVisible() {
|
|
532
|
+
return !this.readonly && this.showReset;
|
|
533
|
+
}
|
|
527
534
|
/**
|
|
528
535
|
* @internal
|
|
529
536
|
*/
|
|
@@ -550,6 +557,10 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
|
|
|
550
557
|
onChange(event) {
|
|
551
558
|
logger.debug('Form data changed:', event.detail);
|
|
552
559
|
if (event.detail) {
|
|
560
|
+
// Prevent the internal json-forms event from bubbling to consumers alongside
|
|
561
|
+
// the re-emitted event below — without this, parent listeners receive two
|
|
562
|
+
// data-change events per field change.
|
|
563
|
+
event.stopPropagation();
|
|
553
564
|
this.data = event.detail.data;
|
|
554
565
|
this.errors = event.detail.errors;
|
|
555
566
|
if (event.detail.additionalErrors.length) {
|
|
@@ -576,6 +587,7 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
|
|
|
576
587
|
if (clearData) {
|
|
577
588
|
this.data = {};
|
|
578
589
|
}
|
|
590
|
+
Observable.notify(this, 'submitted');
|
|
579
591
|
}
|
|
580
592
|
/**
|
|
581
593
|
* Show the approval message modal
|
|
@@ -800,6 +812,9 @@ __decorate([
|
|
|
800
812
|
__decorate([
|
|
801
813
|
attr({ attribute: 'hide-submit-button', mode: 'boolean' })
|
|
802
814
|
], Form.prototype, "hideSubmit", void 0);
|
|
815
|
+
__decorate([
|
|
816
|
+
attr({ attribute: 'show-reset-button', mode: 'boolean' })
|
|
817
|
+
], Form.prototype, "showReset", void 0);
|
|
803
818
|
__decorate([
|
|
804
819
|
attr({ attribute: 'bulk-insert', mode: 'boolean' })
|
|
805
820
|
], Form.prototype, "bulkInsert", void 0);
|
|
@@ -827,6 +842,9 @@ __decorate([
|
|
|
827
842
|
__decorate([
|
|
828
843
|
volatile
|
|
829
844
|
], Form.prototype, "isSubmitHidden", null);
|
|
845
|
+
__decorate([
|
|
846
|
+
volatile
|
|
847
|
+
], Form.prototype, "isResetVisible", null);
|
|
830
848
|
Form = __decorate([
|
|
831
849
|
customElement({
|
|
832
850
|
name: 'foundation-form',
|
package/dist/esm/form.styles.js
CHANGED
|
@@ -45,7 +45,7 @@ export const getPrefixedForm = (prefix) => html `
|
|
|
45
45
|
@submit-single-row=${(x, c) => x.submitSingleRow(c.event.detail.index)}
|
|
46
46
|
@reset-form=${(x) => x.reset(false)}
|
|
47
47
|
?readonly=${(x) => x.readonly}
|
|
48
|
-
|
|
48
|
+
:submitted=${(x) => x.submitted}
|
|
49
49
|
:renderers=${(x) => x.mergedRenderers}
|
|
50
50
|
:uischema=${(x) => x.uischema}
|
|
51
51
|
:schema=${(x) => x.jsonSchema}
|
|
@@ -55,16 +55,28 @@ export const getPrefixedForm = (prefix) => html `
|
|
|
55
55
|
:bulkInsert=${(x) => x.bulkInsert}
|
|
56
56
|
@data-change=${(x, c) => x.onChange(c.event)}
|
|
57
57
|
></json-forms>
|
|
58
|
-
${when((x) => x.isSubmitHidden, html `
|
|
58
|
+
${when((x) => x.isSubmitHidden || x.isResetVisible, html `
|
|
59
59
|
<slot name="userActions" part="userActions" class="actions">
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
${when((x) => x.isResetVisible, html `
|
|
61
|
+
<${prefix}-button
|
|
62
|
+
@click="${(x) => x.reset()}"
|
|
63
|
+
class="reset-button"
|
|
64
|
+
appearance="neutral"
|
|
65
|
+
data-test-id="reset-button"
|
|
66
|
+
>
|
|
67
|
+
Reset
|
|
68
|
+
</${prefix}-button>
|
|
69
|
+
`)}
|
|
70
|
+
${when((x) => x.isSubmitHidden, html `
|
|
71
|
+
<${prefix}-button
|
|
72
|
+
@click="${(x) => x._submit()}"
|
|
73
|
+
?disable=${(x) => !x.submitting}
|
|
74
|
+
class="submit-button"
|
|
75
|
+
appearance="accent"
|
|
76
|
+
>
|
|
77
|
+
${(x) => (x.bulkInsert ? 'Submit All' : 'Submit')}
|
|
78
|
+
</${prefix}-button>
|
|
79
|
+
`)}
|
|
68
80
|
</slot>
|
|
69
81
|
`)}
|
|
70
82
|
<${prefix}-modal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { isDev } from '@genesislcap/foundation-utils';
|
|
3
3
|
import { Actions, configReducer, coreReducer, createAjv, Generate, i18nReducer, } from '@jsonforms/core';
|
|
4
|
-
import { attr, css, customElement, FASTElement, html, observable, when, } from '@microsoft/fast-element';
|
|
4
|
+
import { attr, css, customElement, FASTElement, html, Observable, observable, when, } from '@microsoft/fast-element';
|
|
5
5
|
import { genesisErrorTranslator, logger } from '../utils';
|
|
6
6
|
const TIMESTAMP_FIELD = '#/properties/TIMESTAMP';
|
|
7
7
|
const template = html `
|
|
@@ -17,7 +17,7 @@ const template = html `
|
|
|
17
17
|
:dispatch=${(x) => x.dispatch}
|
|
18
18
|
:props=${(x) => x.props}
|
|
19
19
|
:prefix=${(x) => x.prefix}
|
|
20
|
-
|
|
20
|
+
:submitted=${(x) => x.submitted}
|
|
21
21
|
/>
|
|
22
22
|
`)}
|
|
23
23
|
</template>
|
|
@@ -36,6 +36,7 @@ const errorTranslator = (error, t, uischema) => {
|
|
|
36
36
|
let JSONForms = class JSONForms extends FASTElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super(...arguments);
|
|
39
|
+
this._submitted = false;
|
|
39
40
|
this.ajv = createAjv({ useDefaults: true, $data: true });
|
|
40
41
|
/**
|
|
41
42
|
* Row submit statuses for bulk insert mode.
|
|
@@ -104,6 +105,14 @@ let JSONForms = class JSONForms extends FASTElement {
|
|
|
104
105
|
return errors;
|
|
105
106
|
};
|
|
106
107
|
}
|
|
108
|
+
get submitted() {
|
|
109
|
+
Observable.track(this, 'submitted');
|
|
110
|
+
return this._submitted;
|
|
111
|
+
}
|
|
112
|
+
set submitted(value) {
|
|
113
|
+
this._submitted = value;
|
|
114
|
+
Observable.notify(this, 'submitted');
|
|
115
|
+
}
|
|
107
116
|
prefixChanged() {
|
|
108
117
|
this.schemaChanged();
|
|
109
118
|
}
|
|
@@ -231,9 +240,6 @@ let JSONForms = class JSONForms extends FASTElement {
|
|
|
231
240
|
});
|
|
232
241
|
}
|
|
233
242
|
};
|
|
234
|
-
__decorate([
|
|
235
|
-
attr({ mode: 'boolean' })
|
|
236
|
-
], JSONForms.prototype, "submitted", void 0);
|
|
237
243
|
__decorate([
|
|
238
244
|
observable
|
|
239
245
|
], JSONForms.prototype, "prefix", void 0);
|
|
@@ -123,7 +123,7 @@ export const ArrayListWrapperRendererTemplate = (prefix = 'zero') => html `
|
|
|
123
123
|
></${prefix}-icon>
|
|
124
124
|
</div>
|
|
125
125
|
<dispatch-renderer
|
|
126
|
-
|
|
126
|
+
:submitted=${(x, ctx) => ctx.parent.form.submitted}
|
|
127
127
|
:dispatch=${(x, ctx) => ctx.parent.form.dispatch}
|
|
128
128
|
:jsonforms=${(x, ctx) => ctx.parent.form.jsonforms}
|
|
129
129
|
:prefix=${(x, ctx) => ctx.parent.form.prefix}
|
|
@@ -21,7 +21,7 @@ export const CategorizationWrapperRendererTemplate = (prefix = 'zero') => html `
|
|
|
21
21
|
<${prefix}-tab-panel class="tab-panel-control">
|
|
22
22
|
${repeat((x) => x.options.childElements, html `
|
|
23
23
|
<dispatch-renderer
|
|
24
|
-
|
|
24
|
+
:submitted=${(x, ctx) => ctx.parentContext.parent.form.submitted}
|
|
25
25
|
:dispatch=${(x, ctx) => ctx.parentContext.parent.form.dispatch}
|
|
26
26
|
:jsonforms=${(x, ctx) => ctx.parentContext.parent.form.jsonforms}
|
|
27
27
|
:prefix=${(x, ctx) => ctx.parentContext.parent.form.prefix}
|
|
@@ -23,20 +23,31 @@ const updateEnumData = (dispatchRenderer, data) => {
|
|
|
23
23
|
dispatchRenderer.control.handleChange(dispatchRenderer.control.path, (_c = dispatchRenderer.control.options.find((option) => getOptionLabel(option, formatter) === data)) === null || _c === void 0 ? void 0 : _c.value);
|
|
24
24
|
dispatchRenderer.onBlur();
|
|
25
25
|
};
|
|
26
|
+
const applyEnumDefault = (dispatchRenderer) => {
|
|
27
|
+
var _a, _b, _c, _d, _e, _f;
|
|
28
|
+
const enumDefault = (_c = (_b = (_a = dispatchRenderer.control.schema) === null || _a === void 0 ? void 0 : _a.oneOf) === null || _b === void 0 ? void 0 : _b.find((x) => x.hasOwnProperty('default'))) === null || _c === void 0 ? void 0 : _c.default;
|
|
29
|
+
if (!enumDefault)
|
|
30
|
+
return undefined;
|
|
31
|
+
const label = capitalCase(enumDefault);
|
|
32
|
+
const formatter = (_e = (_d = dispatchRenderer.control.uischema) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.labelRowFormatter;
|
|
33
|
+
const value = (_f = dispatchRenderer.control.options.find((option) => getOptionLabel(option, formatter) === label)) === null || _f === void 0 ? void 0 : _f.value;
|
|
34
|
+
if (!value)
|
|
35
|
+
return undefined;
|
|
36
|
+
dispatchRenderer.control.handleChange(dispatchRenderer.control.path, value);
|
|
37
|
+
return value;
|
|
38
|
+
};
|
|
26
39
|
const displaySetOrDefaultData = (dispatchRenderer) => {
|
|
27
|
-
var _a, _b
|
|
40
|
+
var _a, _b;
|
|
28
41
|
let data = dispatchRenderer.control.data;
|
|
29
42
|
if (!data) {
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
updateEnumData(dispatchRenderer, data);
|
|
34
|
-
}
|
|
43
|
+
data = applyEnumDefault(dispatchRenderer);
|
|
44
|
+
if (!data)
|
|
45
|
+
return '';
|
|
35
46
|
}
|
|
36
47
|
const option = dispatchRenderer.control.options.find((opt) => opt.value === data);
|
|
37
48
|
if (!option)
|
|
38
49
|
return '';
|
|
39
|
-
const formatter = (
|
|
50
|
+
const formatter = (_b = (_a = dispatchRenderer.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.labelRowFormatter;
|
|
40
51
|
return getOptionLabel(option, formatter);
|
|
41
52
|
};
|
|
42
53
|
export const EnumControlRendererTemplate = (prefix = 'zero') => html `
|
|
@@ -15,7 +15,7 @@ export const LayoutFormGridRendererTemplate = html `
|
|
|
15
15
|
>
|
|
16
16
|
${repeat((x) => x.control.uischema.elements, html `
|
|
17
17
|
<dispatch-renderer
|
|
18
|
-
|
|
18
|
+
:submitted=${(x, ctx) => ctx.parent.submitted}
|
|
19
19
|
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
20
20
|
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
21
21
|
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
@@ -24,7 +24,7 @@ export const LayoutGroupRendererTemplate = html `
|
|
|
24
24
|
`)}
|
|
25
25
|
${repeat((x) => x.control.uischema.options.childElements, html `
|
|
26
26
|
<dispatch-renderer
|
|
27
|
-
|
|
27
|
+
:submitted=${(x, ctx) => ctx.parent.submitted}
|
|
28
28
|
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
29
29
|
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
30
30
|
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
@@ -15,7 +15,7 @@ export const LayoutHorizontalRendererTemplate = html `
|
|
|
15
15
|
${repeat((x) => x.control.uischema.elements, html `
|
|
16
16
|
<dispatch-renderer
|
|
17
17
|
style="flex: 1; min-width: 0"
|
|
18
|
-
|
|
18
|
+
:submitted=${(x, ctx) => ctx.parent.submitted}
|
|
19
19
|
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
20
20
|
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
21
21
|
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
@@ -27,7 +27,7 @@ export const LayoutRendererTemplate = html `
|
|
|
27
27
|
<div>
|
|
28
28
|
${repeat((x) => x.control.uischema.elements, html `
|
|
29
29
|
<dispatch-renderer
|
|
30
|
-
|
|
30
|
+
:submitted=${(x, ctx) => ctx.parent.submitted}
|
|
31
31
|
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
32
32
|
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
33
33
|
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
@@ -16,7 +16,7 @@ export const LayoutVertical2ColumnsRendererTemplate = html `
|
|
|
16
16
|
${repeat((x) => x.control.uischema.elements, html `
|
|
17
17
|
<div style="width: 49%">
|
|
18
18
|
<dispatch-renderer
|
|
19
|
-
|
|
19
|
+
:submitted=${(x, ctx) => ctx.parent.submitted}
|
|
20
20
|
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
21
21
|
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
22
22
|
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
@@ -24,7 +24,7 @@ export const SegmentedControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
24
24
|
prefix,
|
|
25
25
|
innerTemplate: html `
|
|
26
26
|
<${prefix}-segmented-control
|
|
27
|
-
value=${(x) =>
|
|
27
|
+
:value=${(x) => x.control.data}
|
|
28
28
|
?disabled=${(x) => !x.control.enabled}
|
|
29
29
|
id=${(x) => x.control.path}
|
|
30
30
|
data-test-id=${(x) => x.control.path}
|
|
@@ -23,7 +23,7 @@ export const StepperWrapperRendererTemplate = (prefix = 'zero') => html `
|
|
|
23
23
|
<${prefix}-stepper-tab-panel class="tab-panel-control">
|
|
24
24
|
${repeat((x) => x.options.childElements, html `
|
|
25
25
|
<dispatch-renderer
|
|
26
|
-
|
|
26
|
+
:submitted=${(x, ctx) => ctx.parentContext.parent.form.submitted}
|
|
27
27
|
:dispatch=${(x, ctx) => ctx.parentContext.parent.form.dispatch}
|
|
28
28
|
:jsonforms=${(x, ctx) => ctx.parentContext.parent.form.jsonforms}
|
|
29
29
|
:prefix=${(x, ctx) => ctx.parentContext.parent.form.prefix}
|
|
@@ -18,7 +18,7 @@ export const VerticalCategorizationWrapperRendererTemplate = (prefix = 'zero') =
|
|
|
18
18
|
<${prefix}-tab-panel class="tab-panel-control">
|
|
19
19
|
${repeat((x) => x.options.childElements, html `
|
|
20
20
|
<dispatch-renderer
|
|
21
|
-
|
|
21
|
+
:submitted=${(x, ctx) => ctx.parentContext.parent.form.submitted}
|
|
22
22
|
:dispatch=${(x, ctx) => ctx.parentContext.parent.form.dispatch}
|
|
23
23
|
:jsonforms=${(x, ctx) => ctx.parentContext.parent.form.jsonforms}
|
|
24
24
|
:prefix=${(x, ctx) => ctx.parentContext.parent.form.prefix}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __rest } from "tslib";
|
|
2
2
|
import { mapDispatchToControlProps, mapStateToJsonFormsRendererProps } from '@jsonforms/core';
|
|
3
|
-
import { FASTElement, html, css, observable,
|
|
3
|
+
import { FASTElement, html, css, observable, Observable, customElement, } from '@microsoft/fast-element';
|
|
4
4
|
import maxBy from 'lodash/maxBy';
|
|
5
5
|
import { logger } from '../../utils';
|
|
6
6
|
const template = html `
|
|
@@ -16,6 +16,7 @@ const useControl = (props, jsonforms, dispatch, stateMapper, dispatchMapper) =>
|
|
|
16
16
|
let DispatchRenderer = class DispatchRenderer extends FASTElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
+
this._submitted = false;
|
|
19
20
|
this.createRenderer = () => {
|
|
20
21
|
if (!this.jsonforms || !this.dispatch || !this.props) {
|
|
21
22
|
return;
|
|
@@ -36,8 +37,17 @@ let DispatchRenderer = class DispatchRenderer extends FASTElement {
|
|
|
36
37
|
propsChanged() {
|
|
37
38
|
this.createRenderer();
|
|
38
39
|
}
|
|
40
|
+
get submitted() {
|
|
41
|
+
Observable.track(this, 'submitted');
|
|
42
|
+
return this._submitted;
|
|
43
|
+
}
|
|
44
|
+
set submitted(value) {
|
|
45
|
+
this._submitted = value;
|
|
46
|
+
Observable.notify(this, 'submitted');
|
|
47
|
+
this.submittedChanged();
|
|
48
|
+
}
|
|
39
49
|
submittedChanged() {
|
|
40
|
-
this.touched = !!this.
|
|
50
|
+
this.touched = !!this._submitted;
|
|
41
51
|
}
|
|
42
52
|
prefixChanged() {
|
|
43
53
|
this.createRenderer();
|
|
@@ -62,7 +72,7 @@ let DispatchRenderer = class DispatchRenderer extends FASTElement {
|
|
|
62
72
|
disconnectedCallback() {
|
|
63
73
|
super.disconnectedCallback();
|
|
64
74
|
this.touched = false;
|
|
65
|
-
this.
|
|
75
|
+
this._submitted = false;
|
|
66
76
|
}
|
|
67
77
|
};
|
|
68
78
|
__decorate([
|
|
@@ -74,9 +84,6 @@ __decorate([
|
|
|
74
84
|
__decorate([
|
|
75
85
|
observable
|
|
76
86
|
], DispatchRenderer.prototype, "touched", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
attr({ mode: 'boolean' })
|
|
79
|
-
], DispatchRenderer.prototype, "submitted", void 0);
|
|
80
87
|
__decorate([
|
|
81
88
|
observable
|
|
82
89
|
], DispatchRenderer.prototype, "dispatch", void 0);
|
|
@@ -2516,6 +2516,36 @@
|
|
|
2516
2516
|
"isProtected": false,
|
|
2517
2517
|
"isAbstract": false
|
|
2518
2518
|
},
|
|
2519
|
+
{
|
|
2520
|
+
"kind": "Property",
|
|
2521
|
+
"canonicalReference": "@genesislcap/foundation-forms!Form#showReset:member",
|
|
2522
|
+
"docComment": "/**\n * When set, shows a Reset button in the actions area that clears the form data and resets validation state.\n *\n * @public\n */\n",
|
|
2523
|
+
"excerptTokens": [
|
|
2524
|
+
{
|
|
2525
|
+
"kind": "Content",
|
|
2526
|
+
"text": "showReset: "
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
"kind": "Content",
|
|
2530
|
+
"text": "boolean"
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"kind": "Content",
|
|
2534
|
+
"text": ";"
|
|
2535
|
+
}
|
|
2536
|
+
],
|
|
2537
|
+
"isReadonly": false,
|
|
2538
|
+
"isOptional": false,
|
|
2539
|
+
"releaseTag": "Public",
|
|
2540
|
+
"name": "showReset",
|
|
2541
|
+
"propertyTypeTokenRange": {
|
|
2542
|
+
"startIndex": 1,
|
|
2543
|
+
"endIndex": 2
|
|
2544
|
+
},
|
|
2545
|
+
"isStatic": false,
|
|
2546
|
+
"isProtected": false,
|
|
2547
|
+
"isAbstract": false
|
|
2548
|
+
},
|
|
2519
2549
|
{
|
|
2520
2550
|
"kind": "Method",
|
|
2521
2551
|
"canonicalReference": "@genesislcap/foundation-forms!Form#submitSingleRow:member(1)",
|
|
@@ -453,7 +453,9 @@ declare class DispatchRenderer extends FASTElement {
|
|
|
453
453
|
props: any;
|
|
454
454
|
propsChanged(): void;
|
|
455
455
|
touched: any;
|
|
456
|
-
|
|
456
|
+
private _submitted;
|
|
457
|
+
get submitted(): boolean;
|
|
458
|
+
set submitted(value: boolean);
|
|
457
459
|
submittedChanged(): void;
|
|
458
460
|
dispatch: any;
|
|
459
461
|
control: any;
|
|
@@ -1173,6 +1175,11 @@ export declare class Form extends Form_base {
|
|
|
1173
1175
|
* @public
|
|
1174
1176
|
*/
|
|
1175
1177
|
hideSubmit: boolean;
|
|
1178
|
+
/**
|
|
1179
|
+
* When set, shows a Reset button in the actions area that clears the form data and resets validation state.
|
|
1180
|
+
* @public
|
|
1181
|
+
*/
|
|
1182
|
+
showReset: boolean;
|
|
1176
1183
|
/**
|
|
1177
1184
|
* When enabled, transforms the form into bulk insert mode where multiple records can be added.
|
|
1178
1185
|
* The JSON schema will be wrapped as an array, and each item will be submitted separately.
|
|
@@ -1252,6 +1259,11 @@ export declare class Form extends Form_base {
|
|
|
1252
1259
|
* @internal
|
|
1253
1260
|
*/
|
|
1254
1261
|
get isSubmitHidden(): boolean;
|
|
1262
|
+
/**
|
|
1263
|
+
* Controls the visibility of the reset button.
|
|
1264
|
+
* @internal
|
|
1265
|
+
*/
|
|
1266
|
+
get isResetVisible(): boolean;
|
|
1255
1267
|
/**
|
|
1256
1268
|
* @internal
|
|
1257
1269
|
*/
|
|
@@ -1673,9 +1685,7 @@ declare const Form_base: (new (...args: any[]) => {
|
|
|
1673
1685
|
nonce?: string;
|
|
1674
1686
|
tabIndex: number;
|
|
1675
1687
|
blur(): void;
|
|
1676
|
-
focus(options
|
|
1677
|
-
* @internal
|
|
1678
|
-
*/: FocusOptions): void;
|
|
1688
|
+
focus(options?: FocusOptions): void;
|
|
1679
1689
|
}) & typeof FoundationElement;
|
|
1680
1690
|
|
|
1681
1691
|
/** @internal */
|
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.430.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.430.0",
|
|
59
|
+
"@genesislcap/genx": "14.430.0",
|
|
60
|
+
"@genesislcap/rollup-builder": "14.430.0",
|
|
61
|
+
"@genesislcap/ts-builder": "14.430.0",
|
|
62
|
+
"@genesislcap/uvu-playwright-builder": "14.430.0",
|
|
63
|
+
"@genesislcap/vite-builder": "14.430.0",
|
|
64
|
+
"@genesislcap/webpack-builder": "14.430.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.430.0",
|
|
70
|
+
"@genesislcap/foundation-criteria": "14.430.0",
|
|
71
|
+
"@genesislcap/foundation-logger": "14.430.0",
|
|
72
|
+
"@genesislcap/foundation-notifications": "14.430.0",
|
|
73
|
+
"@genesislcap/foundation-ui": "14.430.0",
|
|
74
|
+
"@genesislcap/foundation-utils": "14.430.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": "cd88c05bb6e4995f0a1ca4102345d3cb73d94c6c"
|
|
97
97
|
}
|