72 lines
1.8 KiB
TypeScript
72 lines
1.8 KiB
TypeScript
import type { JSX } from "react";
|
|
import type { IElixFormsComponentCustomFormFieldFactory } from "./IElixFormsComponentCustomFormFieldFactory";
|
|
|
|
export interface IElixFormsComponentProperties {
|
|
description: string;
|
|
isDarkTheme: boolean;
|
|
environmentMessage: string;
|
|
hasTeamsContext: boolean;
|
|
userDisplayName: string;
|
|
additionalFieldsJson?: string;
|
|
customFormFieldsConfiguration?: (formFieldFactory: IElixFormsComponentCustomFormFieldFactory) => JSX.Element;
|
|
}
|
|
|
|
// Additional Fields JSON Schema
|
|
/* // To test, just copy-paste the following JSON in the "Additional Fields JSON" property of the web part. Remember to remove comments before pasting.
|
|
[
|
|
{
|
|
"key": "field1",
|
|
"type": "text",
|
|
"label": "Field 1",
|
|
"required": true
|
|
},
|
|
{
|
|
"key": "field2",
|
|
"type": "checkbox",
|
|
"label": "Field 2",
|
|
"options": [
|
|
{ "value": 1, "label": "Checkbox Option 1" },
|
|
{ "value": 2, "label": "Checkbox Option 2" },
|
|
{ "value": 3, "label": "Checkbox Option 3" }
|
|
]
|
|
},
|
|
{
|
|
"key": "field3",
|
|
"type": "radio",
|
|
"label": "Field 3",
|
|
"required": true,
|
|
"options": [
|
|
{ "value": 1, "label": "Radio Option 1" },
|
|
{ "value": 2, "label": "Radio Option 2" },
|
|
{ "value": 3, "label": "Radio Option 3" }
|
|
]
|
|
},
|
|
{
|
|
"key": "field4",
|
|
"type": "boolean",
|
|
"label": "Field 4"
|
|
},
|
|
{
|
|
"key": "field5",
|
|
"type": "textarea",
|
|
"label": "Field 5",
|
|
"required": true
|
|
},
|
|
{
|
|
"key": "field6",
|
|
"type": "number",
|
|
"label": "Field 6"
|
|
},
|
|
{
|
|
"key": "field7",
|
|
"type": "dropdown",
|
|
"label": "Field 7",
|
|
"required": true,
|
|
"options": [
|
|
{ "value": 1, "label": "Dropdown Option 1" },
|
|
{ "value": 2, "label": "Dropdown Option 2" },
|
|
{ "value": 3, "label": "Dropdown Option 3" }
|
|
]
|
|
}
|
|
]
|
|
*/ |