|
| 1 | +import { AccordionSettingValues } from '../accordion'; |
| 2 | +import { AttachmentSettingValues } from '../attachment'; |
| 3 | +import { TextSize } from '../text'; |
| 4 | +import { PrefillKey } from './signature'; |
| 5 | +import { AddressType, InputMode } from './types'; |
| 6 | + |
| 7 | +type ComponentDataSrc = 'values' | 'url' | 'json' | 'custom' | 'resource'; |
| 8 | +export interface ComponentData { |
| 9 | + values?: ComponentValue[]; |
| 10 | + url?: string; |
| 11 | + custom?: any; |
| 12 | +} |
| 13 | + |
| 14 | +export type AttachmentType = 'default' | 'other'; |
| 15 | +export interface ComponentValue { |
| 16 | + value: string; |
| 17 | + label: string; |
| 18 | + description?: string; |
| 19 | +} |
| 20 | + |
| 21 | +export interface CustomLabels { |
| 22 | + [key: string]: string; |
| 23 | +} |
| 24 | + |
| 25 | +export interface Component { |
| 26 | + id?: string; |
| 27 | + navId?: string; |
| 28 | + key: string; |
| 29 | + label: string; |
| 30 | + customLabels?: CustomLabels; |
| 31 | + type: string; |
| 32 | + content?: string; |
| 33 | + calculateValue?: string; |
| 34 | + allowCalculateOverride?: boolean; |
| 35 | + data?: ComponentData; |
| 36 | + dataSrc?: ComponentDataSrc; |
| 37 | + validate?: ComponentValidate; |
| 38 | + conditional?: ComponentConditional; |
| 39 | + customConditional?: string; |
| 40 | + valueProperty?: string; |
| 41 | + labelProperty?: string; |
| 42 | + properties?: ComponentProperties; |
| 43 | + component?: Component; |
| 44 | + components?: Component[]; |
| 45 | + otherDocumentation?: boolean; |
| 46 | + isAttachmentPanel?: boolean; |
| 47 | + prefillKey?: PrefillKey; |
| 48 | + values?: ComponentValue[]; |
| 49 | + attachmentValues?: AttachmentSettingValues; |
| 50 | + accordionValues?: AccordionSettingValues; |
| 51 | + attachmentType?: AttachmentType; |
| 52 | + hideLabel?: boolean; |
| 53 | + description?: string; |
| 54 | + suffix?: string; |
| 55 | + prefix?: string; |
| 56 | + title?: string; |
| 57 | + html?: string; |
| 58 | + legend?: string; |
| 59 | + additionalDescriptionLabel?: string; |
| 60 | + additionalDescriptionText?: string; |
| 61 | + contentForPdf?: string; |
| 62 | + altText?: string; |
| 63 | + buttonText?: string; |
| 64 | + addAnother?: string; |
| 65 | + removeAnother?: string; |
| 66 | + input?: boolean; |
| 67 | + readOnly?: boolean; |
| 68 | + weight?: number; |
| 69 | + tag?: string; |
| 70 | + collapsible?: boolean; |
| 71 | + collapsed?: boolean; |
| 72 | + fieldSize?: string; |
| 73 | + titleSize?: TextSize; |
| 74 | + autocomplete?: string; |
| 75 | + spellCheck?: boolean; |
| 76 | + rows?: number; |
| 77 | + editor?: string; |
| 78 | + wysiwyg?: object | boolean; |
| 79 | + as?: string; |
| 80 | + style?: object; |
| 81 | + theme?: string; |
| 82 | + defaultValue?: string | number | boolean | any[] | object; |
| 83 | + tooltip?: string; |
| 84 | + reorder?: boolean; |
| 85 | + dataGridLabel?: boolean; |
| 86 | + alerttype?: string; |
| 87 | + fileMaxSize?: string; |
| 88 | + storage?: string; |
| 89 | + image?: any; |
| 90 | + filePattern?: string; |
| 91 | + webcam?: boolean; |
| 92 | + multiple?: boolean; |
| 93 | + customDefaultValue?: string; |
| 94 | + keyLabel?: string; |
| 95 | + valueComponent?: Component; |
| 96 | + isInline?: boolean; |
| 97 | + textDisplay?: 'form' | 'formPdf' | 'pdf'; |
| 98 | + autoExpand?: boolean; |
| 99 | + customClass?: string; |
| 100 | + validateOn?: string; |
| 101 | + isNavDataGrid?: boolean; |
| 102 | + hidden?: boolean; |
| 103 | + clearOnHide?: boolean; |
| 104 | + specificEarliestAllowedDate?: string; |
| 105 | + specificLatestAllowedDate?: string; |
| 106 | + beforeDateInputKey?: string; |
| 107 | + mayBeEqual?: string; |
| 108 | + earliestAllowedDate?: string; |
| 109 | + latestAllowedDate?: string; |
| 110 | + getValue?: () => string; |
| 111 | + rerender?: () => void; |
| 112 | + onChange?: (props) => void; |
| 113 | + inputType?: InputMode; |
| 114 | + ignoreNorway?: boolean; |
| 115 | + tree?: boolean; |
| 116 | + path?: string; |
| 117 | + protected?: boolean; |
| 118 | + disableAddingRemovingRows?: boolean; |
| 119 | + addressPriority?: 'bostedsadresse' | 'oppholdsadresse' | 'kontaktadresse'; |
| 120 | + addressType?: AddressType; |
| 121 | + prefillValue?: string | object; |
| 122 | + protectedApiKey?: boolean; |
| 123 | + yourInformation?: boolean; |
| 124 | + widthPercent?: number; |
| 125 | +} |
| 126 | + |
| 127 | +export interface ComponentProperties { |
| 128 | + vedleggstittel?: string; |
| 129 | + vedleggskode?: string; |
| 130 | + vedleggskjema?: string; |
| 131 | +} |
| 132 | + |
| 133 | +export interface Attachment { |
| 134 | + vedleggstittel?: string; |
| 135 | + vedleggskode?: string; |
| 136 | + label?: string; |
| 137 | +} |
| 138 | + |
| 139 | +export interface Panel extends Component { |
| 140 | + title: string; |
| 141 | +} |
| 142 | + |
| 143 | +export interface ComponentValidate { |
| 144 | + custom?: string; |
| 145 | + json?: string; |
| 146 | + required?: boolean; |
| 147 | + pattern?: string; |
| 148 | + patternMessage?: string; |
| 149 | + min?: number; |
| 150 | + max?: number; |
| 151 | + minLength?: number; |
| 152 | + maxLength?: number; |
| 153 | + minYear?: number; |
| 154 | + maxYear?: number; |
| 155 | + digitsOnly?: number; |
| 156 | +} |
| 157 | + |
| 158 | +export interface ComponentConditional { |
| 159 | + when?: string; |
| 160 | + json?: object; |
| 161 | +} |
0 commit comments