@scenid/react-formulator 0.1.6 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scenid/react-formulator",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "repository": "https://dennykoch@bitbucket.org/scenid/react-formulator.git",
@@ -69,7 +69,6 @@
69
69
  "remark-gfm": "^3.0.1",
70
70
  "rollup": "^2.70.2",
71
71
  "rollup-plugin-import-css": "^3.0.3",
72
- "rollup-plugin-peer-deps-external": "^2.2.4",
73
- "rollup-plugin-terser": "^7.0.2"
72
+ "rollup-plugin-peer-deps-external": "^2.2.4"
74
73
  }
75
74
  }
package/rollup.config.js CHANGED
@@ -2,7 +2,6 @@ import babel from '@rollup/plugin-babel'
2
2
 
3
3
  import peerDepsExternal from 'rollup-plugin-peer-deps-external'
4
4
  import resolve from '@rollup/plugin-node-resolve'
5
- import { terser } from 'rollup-plugin-terser'
6
5
  import commonjs from '@rollup/plugin-commonjs'
7
6
  import css from "rollup-plugin-import-css"
8
7
 
@@ -33,10 +32,9 @@ export default {
33
32
  }),
34
33
  resolve({
35
34
  extensions: ['.js', '.jsx'],
36
- preferBuiltins: false
35
+ preferBuiltins: true
37
36
  }),
38
37
  commonjs(),
39
- css(),
40
- terser()
38
+ css()
41
39
  ]
42
40
  }
@@ -3,7 +3,7 @@ import React from 'react'
3
3
  import ReactMarkdown from 'react-markdown'
4
4
 
5
5
  import StoryBase from './StoryBase'
6
- import FormulatorForm from '../src/index'
6
+ import { FormulatorForm } from '../src/index'
7
7
 
8
8
  import getTypesSchemas from './forms/types.schemas.js'
9
9
 
@@ -16,6 +16,10 @@ import loginRender from './forms/login.render.schema.json'
16
16
  import registerValidation from './forms/register.validation.schema.json'
17
17
  import registerRender from './forms/register.render.schema.json'
18
18
 
19
+ import rlpValidation from './forms/rlp.validation.schema.json'
20
+ import rlpRender from './forms/rlp.render.schema.json'
21
+ import rlpTranslations from './forms/rlp.translations.json'
22
+
19
23
  const {
20
24
  validation: typesValidation,
21
25
  render: typesRender,
@@ -38,6 +42,11 @@ const schemas = {
38
42
  register: {
39
43
  validation: registerValidation,
40
44
  render: registerRender
45
+ },
46
+ rlp: {
47
+ validation: rlpValidation,
48
+ render: rlpRender,
49
+ translations: rlpTranslations
41
50
  }
42
51
  }
43
52
 
@@ -124,3 +133,48 @@ Register.args = {
124
133
  },
125
134
  data: {}
126
135
  }
136
+
137
+ export const RLP = Template.bind({})
138
+ RLP.args = {
139
+ baseProps: { maxWidth: 'sm' },
140
+ id: 'unique-form-id',
141
+ schema: schemas.rlp.validation,
142
+ renderSchema: schemas.rlp.render,
143
+ inputVariant: 'filled',
144
+ textAlign: 'center',
145
+ translations: schemas.rlp.translations,
146
+ errorMessages: {
147
+ "required": "Pflichtfeld",
148
+ "IBAN": "IBAN bitte ohne Sonder- und Trennzeichen angeben",
149
+ "Int": "Bitte geben Sie ein gültige Zahl ein",
150
+ "URL": "Ungültiger Link",
151
+ "Email": "Ungültige E-Mail Adresse",
152
+ "Date": "Ungültiges Datum",
153
+ "Length": "Länge muss zwischen {{min}} und {{max}} liegen",
154
+ "RegExp": "Ungültiges Format oder Zeichen",
155
+ "invalid-email": "Ungültige E-Mail Adresse",
156
+ "invalid-phone": "Ungültige Telefonnummer",
157
+ "invalid-fax": "Ungültige Faxnummer"
158
+ },
159
+ data: {},
160
+ renderComponentMap: {
161
+ // contacts: <RoleContactsRepeater />,
162
+ // reporterId: <FormUnique entityType="ou" />,
163
+ // iknr: <FormUnique entityType="ou" />,
164
+ // bsnr: <FormUnique entityType="ou" excludeInactive />,
165
+ contacts: <div/>,
166
+ reporterId: <div/>,
167
+ iknr: <div/>,
168
+ bsnr: <div/>,
169
+ productOwner: <div />,
170
+ inheritedIKNR: <div />,
171
+ inheritedBSNR: <div />,
172
+ reportingCodesTrigger: (
173
+ <div className="action-group right">
174
+ {/* <Button onClick={() => {}}>
175
+ Automatisch generieren
176
+ </Button> */}
177
+ </div>
178
+ )
179
+ }
180
+ }
@@ -0,0 +1,247 @@
1
+ {
2
+ "properties": {},
3
+ "groups": [
4
+ {
5
+ "id": "new-ou",
6
+ "label": "Stammdaten",
7
+ "fields": [
8
+ "active",
9
+ "ouType",
10
+ [
11
+ "name",
12
+ {
13
+ "action": "copy"
14
+ }
15
+ ],
16
+ [
17
+ "legalForm",
18
+ {
19
+ "noPreselected": true
20
+ }
21
+ ]
22
+ ]
23
+ },
24
+ {
25
+ "label": "Einrichtungsdetails",
26
+ "id": "miscData",
27
+ "fields": [
28
+ [
29
+ "medicalField",
30
+ {
31
+ "noPreselected": true
32
+ }
33
+ ],
34
+ [
35
+ "typeOfPractice",
36
+ {
37
+ "noPreselected": true
38
+ }
39
+ ],
40
+ "numTumorPatients",
41
+ "openingHours",
42
+ "website"
43
+ ]
44
+ },
45
+ {
46
+ "label": "Kontaktdaten",
47
+ "id": "contacts",
48
+ "fields": [
49
+ [
50
+ "@@render",
51
+ "contacts"
52
+ ]
53
+ ]
54
+ },
55
+ {
56
+ "label": "Schlüsselmerkmal",
57
+ "id": "schluesselmerkmal",
58
+ "fields": [
59
+ "iknrUnlocked",
60
+ [
61
+ "@@render",
62
+ "iknr"
63
+ ],
64
+ "bsnrUnlocked",
65
+ [
66
+ "@@render",
67
+ "bsnr"
68
+ ],
69
+ [
70
+ "locationType",
71
+ {
72
+ "noPreselected": true
73
+ }
74
+ ],
75
+ "creditorNumber"
76
+ ]
77
+ },
78
+ {
79
+ "label": "Melderdaten",
80
+ "id": "reporterData",
81
+ "fields": [
82
+ [
83
+ "@@render",
84
+ "reporterId"
85
+ ],
86
+ "isReporting",
87
+ "isReportingActive",
88
+ "reportingPin",
89
+ "reportingAuthCode",
90
+ "hasPortalAccessTest",
91
+ [
92
+ "hasPortalTestGroup",
93
+ {
94
+ "noPreselected": true
95
+ }
96
+ ],
97
+ [
98
+ "hasPortalTestVersion",
99
+ {
100
+ "noPreselected": true
101
+ }
102
+ ],
103
+ "hasPortalAccessProd",
104
+ [
105
+ "hasPortalProdGroup",
106
+ {
107
+ "noPreselected": true
108
+ }
109
+ ],
110
+ [
111
+ "hasPortalProdVersion",
112
+ {
113
+ "noPreselected": true
114
+ }
115
+ ],
116
+ [
117
+ "reportingChannel",
118
+ {
119
+ "noPreselected": true
120
+ }
121
+ ],
122
+ [
123
+ "reportingSoftware",
124
+ {
125
+ "noPreselected": true
126
+ }
127
+ ],
128
+ "reporterCertified",
129
+ [
130
+ "certifiedVersion",
131
+ {
132
+ "noPreselected": true
133
+ }
134
+ ]
135
+ ]
136
+ },
137
+ {
138
+ "label": "Onkologisches Zentrum",
139
+ "id": "oncologyCenterData",
140
+ "fields": [
141
+ [
142
+ "oncologyCenterType",
143
+ {
144
+ "noPreselected": true
145
+ }
146
+ ],
147
+ "oncologyCenterId",
148
+ "isCertifiedOncologyCenter",
149
+ [
150
+ "oncologyCenterCertificate",
151
+ {
152
+ "noPreselected": true
153
+ }
154
+ ],
155
+ "oncologyCenterDateCertified"
156
+ ]
157
+ },
158
+ {
159
+ "label": "Lieferant",
160
+ "id": "supplierData",
161
+ "fields": [
162
+ "supplierBlocked",
163
+ "supplierVatIdentificationNumber",
164
+ "supplierCreditorNumber",
165
+ "language",
166
+ "supplierPaymentType",
167
+ "supplierPaymentPeriod",
168
+ "supplierCashDiscount",
169
+ "supplierDeliveryType",
170
+ "supplierCurrency"
171
+ ]
172
+ },
173
+ {
174
+ "label": "Softwaredeveloper",
175
+ "id": "developerData",
176
+ "fields": [
177
+ "certified",
178
+ [
179
+ "products",
180
+ {
181
+ "noPreselected": true
182
+ }
183
+ ],
184
+ "version"
185
+ ]
186
+ },
187
+ {
188
+ "label": "Kostenträger",
189
+ "id": "healthInsuranceData",
190
+ "fields": [
191
+ [
192
+ "typeOfInsuranceCompany",
193
+ {
194
+ "noPreselected": true
195
+ }
196
+ ],
197
+ "debitNumber"
198
+ ]
199
+ },
200
+ {
201
+ "label": "Bankdaten",
202
+ "id": "bankData",
203
+ "fields": [
204
+ "hasBank",
205
+ "bankUnlocked",
206
+ "bankNoteOnly",
207
+ "customBankNote",
208
+ "bankAccountOwner",
209
+ "iban",
210
+ "bankNote",
211
+ "bankValidFrom"
212
+ ]
213
+ },
214
+ {
215
+ "label": "Adresse",
216
+ "id": "address",
217
+ "fields": [
218
+ "hasAddress",
219
+ "extra",
220
+ "street",
221
+ "houseNo",
222
+ "zipCode",
223
+ "city",
224
+ "countryCode"
225
+ ]
226
+ },
227
+ {
228
+ "label": "Verbünde (Alt)",
229
+ "id": "federations",
230
+ "fields": [
231
+ "federationHead",
232
+ "federationMembers"
233
+ ]
234
+ },
235
+ {
236
+ "label": "Kontaktdaten (Alt)",
237
+ "id": "contactOld",
238
+ "fields": [
239
+ "phonePrefix",
240
+ "phone",
241
+ "faxPrefix",
242
+ "fax",
243
+ "email"
244
+ ]
245
+ }
246
+ ]
247
+ }