@genesislcap/foundation-forms 14.419.2 → 14.420.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 +2 -2
- package/dist/dts/form.d.ts +5 -1
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/types.d.ts +24 -2
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/form.js +5 -1
- package/dist/esm/form.template.js +1 -1
- package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +1 -1
- package/dist/foundation-forms.api.json +237 -2
- package/dist/foundation-forms.d.ts +29 -2
- package/package.json +15 -15
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"text": "RendererEntry[]"
|
|
112
112
|
},
|
|
113
113
|
"default": "[]",
|
|
114
|
-
"description": "Allows to provide set of additional renderers used by the form.",
|
|
114
|
+
"description": "Allows to provide a set of additional renderers used by the form.",
|
|
115
115
|
"privacy": "public"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
@@ -2268,7 +2268,7 @@
|
|
|
2268
2268
|
{
|
|
2269
2269
|
"kind": "variable",
|
|
2270
2270
|
"name": "ControlWrapperRendererTemplate",
|
|
2271
|
-
"default": "html`\n <template>\n ${when(\n (x) => x.control?.visible,\n html`\n <div\n class=${(x) =>\n classNames(\n ['wrapperRoot', true],\n ['labelLeft', x.jsonForms?.core?.uischema?.options?.labelPlacement === 'left'],\n )}\n id=${(x) => x.control.path + '-wrapper'}\n data-test-id=${(x) => x.control.path + '-wrapper'}\n role=\"group\"\n aria-labelledby=${(x) => (x.computedLabel ? x.control.path + '-label' : null)}\n >\n ${when(\n (x) => x.computedLabel,\n html`\n <label\n id=\"${(x) => x.control.path + '-label'}\"\n for=\"${(x) => x.control.path}\"\n class=\"${(x) => classNames('label', ['visually-hidden', x.hideLabel])}\"\n >\n <span>\n ${(x) => x.computedLabel}${when(\n (x) => x.control.uischema?.options?.tooltip,\n (x) => x.getPrefixedTooltip,\n )}\n </span>\n </label>\n `,\n )}\n\n <div class=\"wrapper\">\n <slot></slot>\n </div>\n <div\n class=\"${(x) =>\n (x.control.errors || x.anyOfError) && x.touched ? 'error' : 'description'}\"\n >\n ${(x) =>\n x.touched && (x.control.errors || x.anyOfError)\n ? [x.control.errors, x.anyOfError].filter(Boolean).join(' ')\n : x.showDescription\n ? x.control.description\n : ''}\n </div>\n </div>\n `,\n )}\n </template>\n`"
|
|
2271
|
+
"default": "html`\n <template>\n ${when(\n (x) => x.control?.visible,\n html`\n <div\n class=${(x) =>\n classNames(\n ['wrapperRoot', true],\n ['labelLeft', x.jsonForms?.core?.uischema?.options?.labelPlacement === 'left'],\n )}\n id=${(x) => x.control.path + '-wrapper'}\n data-test-id=${(x) => x.control.path + '-wrapper'}\n role=\"group\"\n aria-labelledby=${(x) => (x.computedLabel ? x.control.path + '-label' : null)}\n >\n ${when(\n (x) => x.computedLabel,\n html`\n <label\n id=\"${(x) => x.control.path + '-label'}\"\n for=\"${(x) => x.control.path}\"\n class=\"${(x) => classNames('label', ['visually-hidden', x.hideLabel])}\"\n >\n <span>\n ${(x) => x.computedLabel}${when(\n (x) => x.control.uischema?.options?.tooltip,\n (x) => x.getPrefixedTooltip,\n )}\n </span>\n </label>\n `,\n )}\n\n <div class=\"wrapper\" part=\"wrapper\">\n <slot></slot>\n </div>\n <div\n class=\"${(x) =>\n (x.control.errors || x.anyOfError) && x.touched ? 'error' : 'description'}\"\n >\n ${(x) =>\n x.touched && (x.control.errors || x.anyOfError)\n ? [x.control.errors, x.anyOfError].filter(Boolean).join(' ')\n : x.showDescription\n ? x.control.description\n : ''}\n </div>\n </div>\n `,\n )}\n </template>\n`"
|
|
2272
2272
|
},
|
|
2273
2273
|
{
|
|
2274
2274
|
"kind": "class",
|
package/dist/dts/form.d.ts
CHANGED
|
@@ -509,7 +509,11 @@ export declare class Form extends Form_base {
|
|
|
509
509
|
*/
|
|
510
510
|
renderersChanged(): void;
|
|
511
511
|
/**
|
|
512
|
-
* Allows to provide set of additional renderers used by the form.
|
|
512
|
+
* Allows to provide a set of additional renderers used by the form.
|
|
513
|
+
* @remarks
|
|
514
|
+
* If you are writing a React renderer, use `createReactRenderer` from
|
|
515
|
+
* `@genesislcap/foundation-react-utils` to produce a `RendererEntry` —
|
|
516
|
+
* do not write a raw FAST `ViewTemplate` directly.
|
|
513
517
|
* @public
|
|
514
518
|
*/
|
|
515
519
|
additionalRenderers: RendererEntry[];
|
package/dist/dts/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA0B1C,OAAO,EAAE,aAAa,EAAmC,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAyBlG;;;GAGG;AACH,eAAO,MAAM,SAAS,OAwBrB,CAAC;;;;;;;kBA5CO,CAAC;;;;;;;;8BAmDqD,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAqBvE,CAAC;4IAKH,CAAC;wFAIL,CAAD;+IAKe,CAAC;2FAKR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCR;;;OAGG;IACH,CAJF,CAAE;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;mBAgE+E,CAAC;;;;;;;;;;;;;6BAiCT,CAAC;8BAGlE,CAAC;kBAC8C,CAAC;;oBAK5C,CAAC;;sBAIO,CAAC;oBAEL,CAAC;;;;;;;;gDAqBjB,CAAC;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA0B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;;OAGG;IACH,OAAO,CAAC,oBAAoB,CAAuB;IAEnD;;;;OAIG;IACS,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAa;IAEtE;;OAEG;IACG,OAAO;IAiEb;;;;OAIG;YACW,WAAW;IAsGzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAQvB;;;OAGG;IACH,sBAAsB;IAItB;;;;;OAKG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiDnD;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAwB5B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;;OAGG;IACH,IAAc,cAAc,YAM3B;IAED;;OAEG;IACM,SAAS,IAAI,IAAI;IAW1B;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,WAAW;IAI7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW;IAe3B;;OAEG;IACH,oBAAoB;IAKpB;;;OAGG;IACH,KAAK,CAAC,SAAS,UAAO;IAQtB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACH,kBAAkB;IAQlB;;;OAGG;IACG,kBAAkB;IA+BxB;;;;;OAKG;IACG,qBAAqB,CAAC,KAAK,EAAE,KAAK;IAyFxC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACH,mBAAmB;CA2BpB"}
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
2
2
|
import { FilterMode } from '@genesislcap/foundation-ui';
|
|
3
|
-
import { JsonFormsState, OwnPropsOfControl, RankedTester, StatePropsOfControl } from '@jsonforms/core';
|
|
3
|
+
import { JsonFormsState, OwnPropsOfControl, RankedTester, StatePropsOfControl, UISchemaElement } from '@jsonforms/core';
|
|
4
4
|
import { RuleEffect, SchemaBasedCondition } from '@jsonforms/core';
|
|
5
5
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
6
6
|
import { ErrorObject } from 'ajv';
|
|
@@ -589,14 +589,36 @@ export type UiSchema = {
|
|
|
589
589
|
*/
|
|
590
590
|
options?: UiSchemaOptions;
|
|
591
591
|
};
|
|
592
|
+
/**
|
|
593
|
+
* Props received by a React component used as a custom JSON Forms renderer.
|
|
594
|
+
* Pass this as the props type when writing a React renderer for use with
|
|
595
|
+
* `createReactRenderer` from `@genesislcap/foundation-react-utils`.
|
|
596
|
+
*
|
|
597
|
+
* @public
|
|
598
|
+
*/
|
|
599
|
+
export interface RendererControlProps {
|
|
600
|
+
data: any;
|
|
601
|
+
path: string;
|
|
602
|
+
label: string;
|
|
603
|
+
errors: string;
|
|
604
|
+
enabled: boolean;
|
|
605
|
+
required: boolean;
|
|
606
|
+
handleChange: (path: string, value: any) => void;
|
|
607
|
+
uischema: UISchemaElement;
|
|
608
|
+
}
|
|
592
609
|
/**
|
|
593
610
|
* Defines a renderer configuration in JSON forms.
|
|
594
611
|
* Allows to specify the renderer component,
|
|
595
612
|
* a tester function to determine renderer applicability,
|
|
596
613
|
* and a mapper function to connect JSON forms state to renderer's props.
|
|
597
614
|
*
|
|
615
|
+
* @remarks
|
|
616
|
+
* If you are writing a React renderer, use `createReactRenderer` from
|
|
617
|
+
* `@genesislcap/foundation-react-utils` instead of constructing this type directly.
|
|
618
|
+
* It handles the FAST template boilerplate and shadow DOM event wiring for you.
|
|
619
|
+
*
|
|
598
620
|
* @example
|
|
599
|
-
* Here's a simple example:
|
|
621
|
+
* Here's a simple example (FAST/web-component renderer):
|
|
600
622
|
* ```
|
|
601
623
|
* const stringEntry: RendererEntry = {
|
|
602
624
|
* renderer: StringControlRendererTemplate,
|
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,iBAAiB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,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC;;OAEG;IACH,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAAC"}
|
package/dist/esm/form.js
CHANGED
|
@@ -121,7 +121,11 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
|
|
|
121
121
|
*/
|
|
122
122
|
this.renderers = renderers;
|
|
123
123
|
/**
|
|
124
|
-
* Allows to provide set of additional renderers used by the form.
|
|
124
|
+
* Allows to provide a set of additional renderers used by the form.
|
|
125
|
+
* @remarks
|
|
126
|
+
* If you are writing a React renderer, use `createReactRenderer` from
|
|
127
|
+
* `@genesislcap/foundation-react-utils` to produce a `RendererEntry` —
|
|
128
|
+
* do not write a raw FAST `ViewTemplate` directly.
|
|
125
129
|
* @public
|
|
126
130
|
*/
|
|
127
131
|
this.additionalRenderers = [];
|
|
@@ -3,10 +3,10 @@ import { html, ref, when } from '@microsoft/fast-element';
|
|
|
3
3
|
import { JSONForms } from './jsonforms/json-forms';
|
|
4
4
|
import { ArrayListWrapper } from './jsonforms/renderers/ArrayListWrapperRenderer';
|
|
5
5
|
import { CategorizationWrapper } from './jsonforms/renderers/CategorizationWrapperRenderer';
|
|
6
|
-
import { VerticalCategorizationWrapper } from './jsonforms/renderers/VerticalCategorizationWrapperRenderer';
|
|
7
6
|
import { ControlWrapper } from './jsonforms/renderers/ControlWrapperRenderer';
|
|
8
7
|
import { DispatchRenderer } from './jsonforms/renderers/dispatch-renderer';
|
|
9
8
|
import { StepperWrapper } from './jsonforms/renderers/StepperWrapperRenderer';
|
|
9
|
+
import { VerticalCategorizationWrapper } from './jsonforms/renderers/VerticalCategorizationWrapperRenderer';
|
|
10
10
|
avoidTreeShaking(JSONForms, ArrayListWrapper, CategorizationWrapper, VerticalCategorizationWrapper, ControlWrapper, DispatchRenderer, StepperWrapper);
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const getPrefixedForm = (prefix) => html `
|
|
@@ -1486,7 +1486,7 @@
|
|
|
1486
1486
|
{
|
|
1487
1487
|
"kind": "Property",
|
|
1488
1488
|
"canonicalReference": "@genesislcap/foundation-forms!Form#additionalRenderers:member",
|
|
1489
|
-
"docComment": "/**\n * Allows to provide set of additional renderers used by the form.\n *\n * @public\n */\n",
|
|
1489
|
+
"docComment": "/**\n * Allows to provide a set of additional renderers used by the form.\n *\n * @remarks\n *\n * If you are writing a React renderer, use `createReactRenderer` from `@genesislcap/foundation-react-utils` to produce a `RendererEntry` — do not write a raw FAST `ViewTemplate` directly.\n *\n * @public\n */\n",
|
|
1490
1490
|
"excerptTokens": [
|
|
1491
1491
|
{
|
|
1492
1492
|
"kind": "Content",
|
|
@@ -3029,10 +3029,245 @@
|
|
|
3029
3029
|
"endIndex": 2
|
|
3030
3030
|
}
|
|
3031
3031
|
},
|
|
3032
|
+
{
|
|
3033
|
+
"kind": "Interface",
|
|
3034
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps:interface",
|
|
3035
|
+
"docComment": "/**\n * Props received by a React component used as a custom JSON Forms renderer. Pass this as the props type when writing a React renderer for use with `createReactRenderer` from `@genesislcap/foundation-react-utils`.\n *\n * @public\n */\n",
|
|
3036
|
+
"excerptTokens": [
|
|
3037
|
+
{
|
|
3038
|
+
"kind": "Content",
|
|
3039
|
+
"text": "export interface RendererControlProps "
|
|
3040
|
+
}
|
|
3041
|
+
],
|
|
3042
|
+
"fileUrlPath": "src/types.ts",
|
|
3043
|
+
"releaseTag": "Public",
|
|
3044
|
+
"name": "RendererControlProps",
|
|
3045
|
+
"preserveMemberOrder": false,
|
|
3046
|
+
"members": [
|
|
3047
|
+
{
|
|
3048
|
+
"kind": "PropertySignature",
|
|
3049
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#data:member",
|
|
3050
|
+
"docComment": "",
|
|
3051
|
+
"excerptTokens": [
|
|
3052
|
+
{
|
|
3053
|
+
"kind": "Content",
|
|
3054
|
+
"text": "data: "
|
|
3055
|
+
},
|
|
3056
|
+
{
|
|
3057
|
+
"kind": "Content",
|
|
3058
|
+
"text": "any"
|
|
3059
|
+
},
|
|
3060
|
+
{
|
|
3061
|
+
"kind": "Content",
|
|
3062
|
+
"text": ";"
|
|
3063
|
+
}
|
|
3064
|
+
],
|
|
3065
|
+
"isReadonly": false,
|
|
3066
|
+
"isOptional": false,
|
|
3067
|
+
"releaseTag": "Public",
|
|
3068
|
+
"name": "data",
|
|
3069
|
+
"propertyTypeTokenRange": {
|
|
3070
|
+
"startIndex": 1,
|
|
3071
|
+
"endIndex": 2
|
|
3072
|
+
}
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"kind": "PropertySignature",
|
|
3076
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#enabled:member",
|
|
3077
|
+
"docComment": "",
|
|
3078
|
+
"excerptTokens": [
|
|
3079
|
+
{
|
|
3080
|
+
"kind": "Content",
|
|
3081
|
+
"text": "enabled: "
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
"kind": "Content",
|
|
3085
|
+
"text": "boolean"
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"kind": "Content",
|
|
3089
|
+
"text": ";"
|
|
3090
|
+
}
|
|
3091
|
+
],
|
|
3092
|
+
"isReadonly": false,
|
|
3093
|
+
"isOptional": false,
|
|
3094
|
+
"releaseTag": "Public",
|
|
3095
|
+
"name": "enabled",
|
|
3096
|
+
"propertyTypeTokenRange": {
|
|
3097
|
+
"startIndex": 1,
|
|
3098
|
+
"endIndex": 2
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
"kind": "PropertySignature",
|
|
3103
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#errors:member",
|
|
3104
|
+
"docComment": "",
|
|
3105
|
+
"excerptTokens": [
|
|
3106
|
+
{
|
|
3107
|
+
"kind": "Content",
|
|
3108
|
+
"text": "errors: "
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
"kind": "Content",
|
|
3112
|
+
"text": "string"
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
"kind": "Content",
|
|
3116
|
+
"text": ";"
|
|
3117
|
+
}
|
|
3118
|
+
],
|
|
3119
|
+
"isReadonly": false,
|
|
3120
|
+
"isOptional": false,
|
|
3121
|
+
"releaseTag": "Public",
|
|
3122
|
+
"name": "errors",
|
|
3123
|
+
"propertyTypeTokenRange": {
|
|
3124
|
+
"startIndex": 1,
|
|
3125
|
+
"endIndex": 2
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
"kind": "PropertySignature",
|
|
3130
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#handleChange:member",
|
|
3131
|
+
"docComment": "",
|
|
3132
|
+
"excerptTokens": [
|
|
3133
|
+
{
|
|
3134
|
+
"kind": "Content",
|
|
3135
|
+
"text": "handleChange: "
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"kind": "Content",
|
|
3139
|
+
"text": "(path: string, value: any) => void"
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
"kind": "Content",
|
|
3143
|
+
"text": ";"
|
|
3144
|
+
}
|
|
3145
|
+
],
|
|
3146
|
+
"isReadonly": false,
|
|
3147
|
+
"isOptional": false,
|
|
3148
|
+
"releaseTag": "Public",
|
|
3149
|
+
"name": "handleChange",
|
|
3150
|
+
"propertyTypeTokenRange": {
|
|
3151
|
+
"startIndex": 1,
|
|
3152
|
+
"endIndex": 2
|
|
3153
|
+
}
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
"kind": "PropertySignature",
|
|
3157
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#label:member",
|
|
3158
|
+
"docComment": "",
|
|
3159
|
+
"excerptTokens": [
|
|
3160
|
+
{
|
|
3161
|
+
"kind": "Content",
|
|
3162
|
+
"text": "label: "
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
"kind": "Content",
|
|
3166
|
+
"text": "string"
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
"kind": "Content",
|
|
3170
|
+
"text": ";"
|
|
3171
|
+
}
|
|
3172
|
+
],
|
|
3173
|
+
"isReadonly": false,
|
|
3174
|
+
"isOptional": false,
|
|
3175
|
+
"releaseTag": "Public",
|
|
3176
|
+
"name": "label",
|
|
3177
|
+
"propertyTypeTokenRange": {
|
|
3178
|
+
"startIndex": 1,
|
|
3179
|
+
"endIndex": 2
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
{
|
|
3183
|
+
"kind": "PropertySignature",
|
|
3184
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#path:member",
|
|
3185
|
+
"docComment": "",
|
|
3186
|
+
"excerptTokens": [
|
|
3187
|
+
{
|
|
3188
|
+
"kind": "Content",
|
|
3189
|
+
"text": "path: "
|
|
3190
|
+
},
|
|
3191
|
+
{
|
|
3192
|
+
"kind": "Content",
|
|
3193
|
+
"text": "string"
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"kind": "Content",
|
|
3197
|
+
"text": ";"
|
|
3198
|
+
}
|
|
3199
|
+
],
|
|
3200
|
+
"isReadonly": false,
|
|
3201
|
+
"isOptional": false,
|
|
3202
|
+
"releaseTag": "Public",
|
|
3203
|
+
"name": "path",
|
|
3204
|
+
"propertyTypeTokenRange": {
|
|
3205
|
+
"startIndex": 1,
|
|
3206
|
+
"endIndex": 2
|
|
3207
|
+
}
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"kind": "PropertySignature",
|
|
3211
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#required:member",
|
|
3212
|
+
"docComment": "",
|
|
3213
|
+
"excerptTokens": [
|
|
3214
|
+
{
|
|
3215
|
+
"kind": "Content",
|
|
3216
|
+
"text": "required: "
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
"kind": "Content",
|
|
3220
|
+
"text": "boolean"
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
"kind": "Content",
|
|
3224
|
+
"text": ";"
|
|
3225
|
+
}
|
|
3226
|
+
],
|
|
3227
|
+
"isReadonly": false,
|
|
3228
|
+
"isOptional": false,
|
|
3229
|
+
"releaseTag": "Public",
|
|
3230
|
+
"name": "required",
|
|
3231
|
+
"propertyTypeTokenRange": {
|
|
3232
|
+
"startIndex": 1,
|
|
3233
|
+
"endIndex": 2
|
|
3234
|
+
}
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
"kind": "PropertySignature",
|
|
3238
|
+
"canonicalReference": "@genesislcap/foundation-forms!RendererControlProps#uischema:member",
|
|
3239
|
+
"docComment": "",
|
|
3240
|
+
"excerptTokens": [
|
|
3241
|
+
{
|
|
3242
|
+
"kind": "Content",
|
|
3243
|
+
"text": "uischema: "
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
"kind": "Reference",
|
|
3247
|
+
"text": "UISchemaElement",
|
|
3248
|
+
"canonicalReference": "@jsonforms/core!UISchemaElement:type"
|
|
3249
|
+
},
|
|
3250
|
+
{
|
|
3251
|
+
"kind": "Content",
|
|
3252
|
+
"text": ";"
|
|
3253
|
+
}
|
|
3254
|
+
],
|
|
3255
|
+
"isReadonly": false,
|
|
3256
|
+
"isOptional": false,
|
|
3257
|
+
"releaseTag": "Public",
|
|
3258
|
+
"name": "uischema",
|
|
3259
|
+
"propertyTypeTokenRange": {
|
|
3260
|
+
"startIndex": 1,
|
|
3261
|
+
"endIndex": 2
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
],
|
|
3265
|
+
"extendsTokenRanges": []
|
|
3266
|
+
},
|
|
3032
3267
|
{
|
|
3033
3268
|
"kind": "TypeAlias",
|
|
3034
3269
|
"canonicalReference": "@genesislcap/foundation-forms!RendererEntry:type",
|
|
3035
|
-
"docComment": "/**\n * Defines a renderer configuration in JSON forms. Allows to specify the renderer component, a tester function to determine renderer applicability, and a mapper function to connect JSON forms state to renderer's props.\n *\n * @example\n *\n * Here's a simple example:\n * ```\n * const stringEntry: RendererEntry = {\n * renderer: StringControlRendererTemplate,\n * tester: rankWith(2, isStringControl),\n * mapper: mapStateToControlProps,\n * };\n * ```\n *\n * @public\n */\n",
|
|
3270
|
+
"docComment": "/**\n * Defines a renderer configuration in JSON forms. Allows to specify the renderer component, a tester function to determine renderer applicability, and a mapper function to connect JSON forms state to renderer's props.\n *\n * @remarks\n *\n * If you are writing a React renderer, use `createReactRenderer` from `@genesislcap/foundation-react-utils` instead of constructing this type directly. It handles the FAST template boilerplate and shadow DOM event wiring for you.\n *\n * @example\n *\n * Here's a simple example (FAST/web-component renderer):\n * ```\n * const stringEntry: RendererEntry = {\n * renderer: StringControlRendererTemplate,\n * tester: rankWith(2, isStringControl),\n * mapper: mapStateToControlProps,\n * };\n * ```\n *\n * @public\n */\n",
|
|
3036
3271
|
"excerptTokens": [
|
|
3037
3272
|
{
|
|
3038
3273
|
"kind": "Content",
|
|
@@ -1066,7 +1066,11 @@ export declare class Form extends Form_base {
|
|
|
1066
1066
|
*/
|
|
1067
1067
|
renderersChanged(): void;
|
|
1068
1068
|
/**
|
|
1069
|
-
* Allows to provide set of additional renderers used by the form.
|
|
1069
|
+
* Allows to provide a set of additional renderers used by the form.
|
|
1070
|
+
* @remarks
|
|
1071
|
+
* If you are writing a React renderer, use `createReactRenderer` from
|
|
1072
|
+
* `@genesislcap/foundation-react-utils` to produce a `RendererEntry` —
|
|
1073
|
+
* do not write a raw FAST `ViewTemplate` directly.
|
|
1070
1074
|
* @public
|
|
1071
1075
|
*/
|
|
1072
1076
|
additionalRenderers: RendererEntry[];
|
|
@@ -1920,14 +1924,37 @@ export declare type RadioOption = {
|
|
|
1920
1924
|
label: string;
|
|
1921
1925
|
};
|
|
1922
1926
|
|
|
1927
|
+
/**
|
|
1928
|
+
* Props received by a React component used as a custom JSON Forms renderer.
|
|
1929
|
+
* Pass this as the props type when writing a React renderer for use with
|
|
1930
|
+
* `createReactRenderer` from `@genesislcap/foundation-react-utils`.
|
|
1931
|
+
*
|
|
1932
|
+
* @public
|
|
1933
|
+
*/
|
|
1934
|
+
export declare interface RendererControlProps {
|
|
1935
|
+
data: any;
|
|
1936
|
+
path: string;
|
|
1937
|
+
label: string;
|
|
1938
|
+
errors: string;
|
|
1939
|
+
enabled: boolean;
|
|
1940
|
+
required: boolean;
|
|
1941
|
+
handleChange: (path: string, value: any) => void;
|
|
1942
|
+
uischema: UISchemaElement;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1923
1945
|
/**
|
|
1924
1946
|
* Defines a renderer configuration in JSON forms.
|
|
1925
1947
|
* Allows to specify the renderer component,
|
|
1926
1948
|
* a tester function to determine renderer applicability,
|
|
1927
1949
|
* and a mapper function to connect JSON forms state to renderer's props.
|
|
1928
1950
|
*
|
|
1951
|
+
* @remarks
|
|
1952
|
+
* If you are writing a React renderer, use `createReactRenderer` from
|
|
1953
|
+
* `@genesislcap/foundation-react-utils` instead of constructing this type directly.
|
|
1954
|
+
* It handles the FAST template boilerplate and shadow DOM event wiring for you.
|
|
1955
|
+
*
|
|
1929
1956
|
* @example
|
|
1930
|
-
* Here's a simple example:
|
|
1957
|
+
* Here's a simple example (FAST/web-component renderer):
|
|
1931
1958
|
* ```
|
|
1932
1959
|
* const stringEntry: RendererEntry = {
|
|
1933
1960
|
* renderer: StringControlRendererTemplate,
|
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.420.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.420.0",
|
|
59
|
+
"@genesislcap/genx": "14.420.0",
|
|
60
|
+
"@genesislcap/rollup-builder": "14.420.0",
|
|
61
|
+
"@genesislcap/ts-builder": "14.420.0",
|
|
62
|
+
"@genesislcap/uvu-playwright-builder": "14.420.0",
|
|
63
|
+
"@genesislcap/vite-builder": "14.420.0",
|
|
64
|
+
"@genesislcap/webpack-builder": "14.420.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.420.0",
|
|
70
|
+
"@genesislcap/foundation-criteria": "14.420.0",
|
|
71
|
+
"@genesislcap/foundation-logger": "14.420.0",
|
|
72
|
+
"@genesislcap/foundation-notifications": "14.420.0",
|
|
73
|
+
"@genesislcap/foundation-ui": "14.420.0",
|
|
74
|
+
"@genesislcap/foundation-utils": "14.420.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",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@microsoft/fast-react-wrapper": ">=0.3.0"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "52c9259f8fb7a203979c832b08388579ae728a38"
|
|
100
100
|
}
|