@bpmn-io/form-js-viewer 1.0.0-alpha.7 → 1.0.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/LICENSE +22 -22
- package/README.md +164 -164
- package/dist/assets/form-js-base.css +917 -880
- package/dist/assets/form-js.css +38 -1
- package/dist/index.cjs +754 -634
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +738 -636
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +22 -0
- package/dist/types/core/Validator.d.ts +5 -1
- package/dist/types/render/components/form-fields/parts/TemplatedInputAdorner.d.ts +1 -0
- package/dist/types/types.d.ts +35 -35
- package/dist/types/util/constants/ValuesSourceConstants.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -15,6 +15,25 @@ var flatpickr = require('flatpickr');
|
|
|
15
15
|
var Markup = require('preact-markup');
|
|
16
16
|
var didi = require('didi');
|
|
17
17
|
|
|
18
|
+
function _interopNamespaceDefault(e) {
|
|
19
|
+
var n = Object.create(null);
|
|
20
|
+
if (e) {
|
|
21
|
+
Object.keys(e).forEach(function (k) {
|
|
22
|
+
if (k !== 'default') {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return e[k]; }
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n.default = e;
|
|
32
|
+
return Object.freeze(n);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
36
|
+
|
|
18
37
|
const getFlavouredFeelVariableNames = (feelString, feelFlavour, options = {}) => {
|
|
19
38
|
const {
|
|
20
39
|
depth = 0,
|
|
@@ -44,26 +63,26 @@ const getFlavouredFeelVariableNames = (feelString, feelFlavour, options = {}) =>
|
|
|
44
63
|
}(simpleExpressionTree);
|
|
45
64
|
};
|
|
46
65
|
|
|
47
|
-
/**
|
|
48
|
-
* Get the variable name at the specified index in a given path expression.
|
|
49
|
-
*
|
|
50
|
-
* @param {Object} root - The root node of the path expression tree.
|
|
51
|
-
* @param {number} index - The index of the variable name to retrieve.
|
|
52
|
-
* @returns {string|null} The variable name at the specified index or null if index is out of bounds.
|
|
66
|
+
/**
|
|
67
|
+
* Get the variable name at the specified index in a given path expression.
|
|
68
|
+
*
|
|
69
|
+
* @param {Object} root - The root node of the path expression tree.
|
|
70
|
+
* @param {number} index - The index of the variable name to retrieve.
|
|
71
|
+
* @returns {string|null} The variable name at the specified index or null if index is out of bounds.
|
|
53
72
|
*/
|
|
54
73
|
const _getVariableNameAtPathIndex = (root, index) => {
|
|
55
74
|
const accessors = _deconstructPathExpression(root);
|
|
56
75
|
return accessors[index] || null;
|
|
57
76
|
};
|
|
58
77
|
|
|
59
|
-
/**
|
|
60
|
-
* Extracts the variables which are required of the external context for a given path expression.
|
|
61
|
-
* This is done by traversing the path expression tree and keeping track of the current depth relative to the external context.
|
|
62
|
-
*
|
|
63
|
-
* @param {Object} node - The root node of the path expression tree.
|
|
64
|
-
* @param {number} initialDepth - The depth at which the root node is located in the outer context.
|
|
65
|
-
* @param {Object} specialDepthAccessors - Definitions of special keywords which represent more complex accesses of the outer context.
|
|
66
|
-
* @returns {Set} - A set containing the extracted variable names.
|
|
78
|
+
/**
|
|
79
|
+
* Extracts the variables which are required of the external context for a given path expression.
|
|
80
|
+
* This is done by traversing the path expression tree and keeping track of the current depth relative to the external context.
|
|
81
|
+
*
|
|
82
|
+
* @param {Object} node - The root node of the path expression tree.
|
|
83
|
+
* @param {number} initialDepth - The depth at which the root node is located in the outer context.
|
|
84
|
+
* @param {Object} specialDepthAccessors - Definitions of special keywords which represent more complex accesses of the outer context.
|
|
85
|
+
* @returns {Set} - A set containing the extracted variable names.
|
|
67
86
|
*/
|
|
68
87
|
const _smartExtractVariableNames = (node, initialDepth, specialDepthAccessors) => {
|
|
69
88
|
// depth info represents the previous (initialised as null) and current depth of the current accessor in the path expression
|
|
@@ -109,11 +128,11 @@ const _smartExtractVariableNames = (node, initialDepth, specialDepthAccessors) =
|
|
|
109
128
|
return new Set(extractedVariables);
|
|
110
129
|
};
|
|
111
130
|
|
|
112
|
-
/**
|
|
113
|
-
* Deconstructs a path expression tree into an array of components.
|
|
114
|
-
*
|
|
115
|
-
* @param {Object} root - The root node of the path expression tree.
|
|
116
|
-
* @returns {Array<string>} An array of components in the path expression, in the correct order.
|
|
131
|
+
/**
|
|
132
|
+
* Deconstructs a path expression tree into an array of components.
|
|
133
|
+
*
|
|
134
|
+
* @param {Object} root - The root node of the path expression tree.
|
|
135
|
+
* @returns {Array<string>} An array of components in the path expression, in the correct order.
|
|
117
136
|
*/
|
|
118
137
|
const _deconstructPathExpression = root => {
|
|
119
138
|
let node = root;
|
|
@@ -132,13 +151,13 @@ const _deconstructPathExpression = root => {
|
|
|
132
151
|
return parts.reverse();
|
|
133
152
|
};
|
|
134
153
|
|
|
135
|
-
/**
|
|
136
|
-
* Builds a simplified feel structure tree from the given parse tree and feel string.
|
|
137
|
-
* The nodes follow this structure: `{ name: string, children: Array, variableName?: string }`
|
|
138
|
-
*
|
|
139
|
-
* @param {Object} parseTree - The parse tree generated by a parser.
|
|
140
|
-
* @param {string} feelString - The feel string used for parsing.
|
|
141
|
-
* @returns {Object} The simplified feel structure tree.
|
|
154
|
+
/**
|
|
155
|
+
* Builds a simplified feel structure tree from the given parse tree and feel string.
|
|
156
|
+
* The nodes follow this structure: `{ name: string, children: Array, variableName?: string }`
|
|
157
|
+
*
|
|
158
|
+
* @param {Object} parseTree - The parse tree generated by a parser.
|
|
159
|
+
* @param {string} feelString - The feel string used for parsing.
|
|
160
|
+
* @returns {Object} The simplified feel structure tree.
|
|
142
161
|
*/
|
|
143
162
|
const _buildSimpleFeelStructureTree = (parseTree, feelString) => {
|
|
144
163
|
const stack = [{
|
|
@@ -169,25 +188,25 @@ class FeelExpressionLanguage {
|
|
|
169
188
|
this._eventBus = eventBus;
|
|
170
189
|
}
|
|
171
190
|
|
|
172
|
-
/**
|
|
173
|
-
* Determines if the given value is a FEEL expression.
|
|
174
|
-
*
|
|
175
|
-
* @param {any} value
|
|
176
|
-
* @returns {boolean}
|
|
177
|
-
*
|
|
191
|
+
/**
|
|
192
|
+
* Determines if the given value is a FEEL expression.
|
|
193
|
+
*
|
|
194
|
+
* @param {any} value
|
|
195
|
+
* @returns {boolean}
|
|
196
|
+
*
|
|
178
197
|
*/
|
|
179
198
|
isExpression(value) {
|
|
180
199
|
return minDash.isString(value) && value.startsWith('=');
|
|
181
200
|
}
|
|
182
201
|
|
|
183
|
-
/**
|
|
184
|
-
* Retrieve variable names from a given FEEL expression.
|
|
185
|
-
*
|
|
186
|
-
* @param {string} expression
|
|
187
|
-
* @param {object} [options]
|
|
188
|
-
* @param {string} [options.type]
|
|
189
|
-
*
|
|
190
|
-
* @returns {string[]}
|
|
202
|
+
/**
|
|
203
|
+
* Retrieve variable names from a given FEEL expression.
|
|
204
|
+
*
|
|
205
|
+
* @param {string} expression
|
|
206
|
+
* @param {object} [options]
|
|
207
|
+
* @param {string} [options.type]
|
|
208
|
+
*
|
|
209
|
+
* @returns {string[]}
|
|
191
210
|
*/
|
|
192
211
|
getVariableNames(expression, options = {}) {
|
|
193
212
|
const {
|
|
@@ -202,13 +221,13 @@ class FeelExpressionLanguage {
|
|
|
202
221
|
return getFlavouredFeelVariableNames(expression, type);
|
|
203
222
|
}
|
|
204
223
|
|
|
205
|
-
/**
|
|
206
|
-
* Evaluate an expression.
|
|
207
|
-
*
|
|
208
|
-
* @param {string} expression
|
|
209
|
-
* @param {import('../../types').Data} [data]
|
|
210
|
-
*
|
|
211
|
-
* @returns {any}
|
|
224
|
+
/**
|
|
225
|
+
* Evaluate an expression.
|
|
226
|
+
*
|
|
227
|
+
* @param {string} expression
|
|
228
|
+
* @param {import('../../types').Data} [data]
|
|
229
|
+
*
|
|
230
|
+
* @returns {any}
|
|
212
231
|
*/
|
|
213
232
|
evaluate(expression, data = {}) {
|
|
214
233
|
if (!expression) {
|
|
@@ -233,23 +252,23 @@ FeelExpressionLanguage.$inject = ['eventBus'];
|
|
|
233
252
|
class FeelersTemplating {
|
|
234
253
|
constructor() {}
|
|
235
254
|
|
|
236
|
-
/**
|
|
237
|
-
* Determines if the given value is a feelers template.
|
|
238
|
-
*
|
|
239
|
-
* @param {any} value
|
|
240
|
-
* @returns {boolean}
|
|
241
|
-
*
|
|
255
|
+
/**
|
|
256
|
+
* Determines if the given value is a feelers template.
|
|
257
|
+
*
|
|
258
|
+
* @param {any} value
|
|
259
|
+
* @returns {boolean}
|
|
260
|
+
*
|
|
242
261
|
*/
|
|
243
262
|
isTemplate(value) {
|
|
244
263
|
return minDash.isString(value) && (value.startsWith('=') || /{{.*?}}/.test(value));
|
|
245
264
|
}
|
|
246
265
|
|
|
247
|
-
/**
|
|
248
|
-
* Retrieve variable names from a given feelers template.
|
|
249
|
-
*
|
|
250
|
-
* @param {string} template
|
|
251
|
-
*
|
|
252
|
-
* @returns {string[]}
|
|
266
|
+
/**
|
|
267
|
+
* Retrieve variable names from a given feelers template.
|
|
268
|
+
*
|
|
269
|
+
* @param {string} template
|
|
270
|
+
*
|
|
271
|
+
* @returns {string[]}
|
|
253
272
|
*/
|
|
254
273
|
getVariableNames(template) {
|
|
255
274
|
if (!this.isTemplate(template)) {
|
|
@@ -275,17 +294,17 @@ class FeelersTemplating {
|
|
|
275
294
|
}, []);
|
|
276
295
|
}
|
|
277
296
|
|
|
278
|
-
/**
|
|
279
|
-
* Evaluate a template.
|
|
280
|
-
*
|
|
281
|
-
* @param {string} template
|
|
282
|
-
* @param {Object<string, any>} context
|
|
283
|
-
* @param {Object} options
|
|
284
|
-
* @param {boolean} [options.debug = false]
|
|
285
|
-
* @param {boolean} [options.strict = false]
|
|
286
|
-
* @param {Function} [options.buildDebugString]
|
|
287
|
-
*
|
|
288
|
-
* @returns
|
|
297
|
+
/**
|
|
298
|
+
* Evaluate a template.
|
|
299
|
+
*
|
|
300
|
+
* @param {string} template
|
|
301
|
+
* @param {Object<string, any>} context
|
|
302
|
+
* @param {Object} options
|
|
303
|
+
* @param {boolean} [options.debug = false]
|
|
304
|
+
* @param {boolean} [options.strict = false]
|
|
305
|
+
* @param {Function} [options.buildDebugString]
|
|
306
|
+
*
|
|
307
|
+
* @returns
|
|
289
308
|
*/
|
|
290
309
|
evaluate(template, context = {}, options = {}) {
|
|
291
310
|
const {
|
|
@@ -300,22 +319,22 @@ class FeelersTemplating {
|
|
|
300
319
|
});
|
|
301
320
|
}
|
|
302
321
|
|
|
303
|
-
/**
|
|
304
|
-
* @typedef {Object} ExpressionWithDepth
|
|
305
|
-
* @property {number} depth - The depth of the expression in the syntax tree.
|
|
306
|
-
* @property {string} expression - The extracted expression
|
|
322
|
+
/**
|
|
323
|
+
* @typedef {Object} ExpressionWithDepth
|
|
324
|
+
* @property {number} depth - The depth of the expression in the syntax tree.
|
|
325
|
+
* @property {string} expression - The extracted expression
|
|
307
326
|
*/
|
|
308
327
|
|
|
309
|
-
/**
|
|
310
|
-
* Extracts all feel expressions in the template along with their depth in the syntax tree.
|
|
311
|
-
* The depth is incremented for child expressions of loops to account for context drilling.
|
|
312
|
-
|
|
313
|
-
* @param {string} template - A feelers template string.
|
|
314
|
-
* @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
|
|
315
|
-
*
|
|
316
|
-
* @example
|
|
317
|
-
* const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
|
|
318
|
-
* const extractedExpressions = _extractExpressionsWithDepth(template);
|
|
328
|
+
/**
|
|
329
|
+
* Extracts all feel expressions in the template along with their depth in the syntax tree.
|
|
330
|
+
* The depth is incremented for child expressions of loops to account for context drilling.
|
|
331
|
+
* @name extractExpressionsWithDepth
|
|
332
|
+
* @param {string} template - A feelers template string.
|
|
333
|
+
* @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
|
|
337
|
+
* const extractedExpressions = _extractExpressionsWithDepth(template);
|
|
319
338
|
*/
|
|
320
339
|
_extractExpressionsWithDepth(template) {
|
|
321
340
|
// build simplified feelers syntax tree
|
|
@@ -346,9 +365,9 @@ class FeelersTemplating {
|
|
|
346
365
|
}
|
|
347
366
|
FeelersTemplating.$inject = [];
|
|
348
367
|
|
|
349
|
-
/**
|
|
350
|
-
* @typedef {object} Condition
|
|
351
|
-
* @property {string} [hide]
|
|
368
|
+
/**
|
|
369
|
+
* @typedef {object} Condition
|
|
370
|
+
* @property {string} [hide]
|
|
352
371
|
*/
|
|
353
372
|
|
|
354
373
|
class ConditionChecker {
|
|
@@ -357,11 +376,11 @@ class ConditionChecker {
|
|
|
357
376
|
this._eventBus = eventBus;
|
|
358
377
|
}
|
|
359
378
|
|
|
360
|
-
/**
|
|
361
|
-
* For given data, remove properties based on condition.
|
|
362
|
-
*
|
|
363
|
-
* @param {Object<string, any>} properties
|
|
364
|
-
* @param {Object<string, any>} data
|
|
379
|
+
/**
|
|
380
|
+
* For given data, remove properties based on condition.
|
|
381
|
+
*
|
|
382
|
+
* @param {Object<string, any>} properties
|
|
383
|
+
* @param {Object<string, any>} data
|
|
365
384
|
*/
|
|
366
385
|
applyConditions(properties, data = {}) {
|
|
367
386
|
const conditions = this._getConditions();
|
|
@@ -380,13 +399,13 @@ class ConditionChecker {
|
|
|
380
399
|
return newProperties;
|
|
381
400
|
}
|
|
382
401
|
|
|
383
|
-
/**
|
|
384
|
-
* Check if given condition is met. Returns null for invalid/missing conditions.
|
|
385
|
-
*
|
|
386
|
-
* @param {string} condition
|
|
387
|
-
* @param {import('../../types').Data} [data]
|
|
388
|
-
*
|
|
389
|
-
* @returns {boolean|null}
|
|
402
|
+
/**
|
|
403
|
+
* Check if given condition is met. Returns null for invalid/missing conditions.
|
|
404
|
+
*
|
|
405
|
+
* @param {string} condition
|
|
406
|
+
* @param {import('../../types').Data} [data]
|
|
407
|
+
*
|
|
408
|
+
* @returns {boolean|null}
|
|
390
409
|
*/
|
|
391
410
|
check(condition, data = {}) {
|
|
392
411
|
if (!condition) {
|
|
@@ -407,12 +426,12 @@ class ConditionChecker {
|
|
|
407
426
|
}
|
|
408
427
|
}
|
|
409
428
|
|
|
410
|
-
/**
|
|
411
|
-
* Check if hide condition is met.
|
|
412
|
-
*
|
|
413
|
-
* @param {Condition} condition
|
|
414
|
-
* @param {Object<string, any>} data
|
|
415
|
-
* @returns {boolean}
|
|
429
|
+
/**
|
|
430
|
+
* Check if hide condition is met.
|
|
431
|
+
*
|
|
432
|
+
* @param {Condition} condition
|
|
433
|
+
* @param {Object<string, any>} data
|
|
434
|
+
* @returns {boolean}
|
|
416
435
|
*/
|
|
417
436
|
_checkHideCondition(condition, data) {
|
|
418
437
|
if (!condition.hide) {
|
|
@@ -454,12 +473,12 @@ class MarkdownRenderer {
|
|
|
454
473
|
this._converter = new showdown.Converter();
|
|
455
474
|
}
|
|
456
475
|
|
|
457
|
-
/**
|
|
458
|
-
* Render markdown to HTML.
|
|
459
|
-
*
|
|
460
|
-
* @param {string} markdown - The markdown to render
|
|
461
|
-
*
|
|
462
|
-
* @returns {string} HTML
|
|
476
|
+
/**
|
|
477
|
+
* Render markdown to HTML.
|
|
478
|
+
*
|
|
479
|
+
* @param {string} markdown - The markdown to render
|
|
480
|
+
*
|
|
481
|
+
* @returns {string} HTML
|
|
463
482
|
*/
|
|
464
483
|
render(markdown) {
|
|
465
484
|
return this._converter.makeHtml(markdown);
|
|
@@ -999,7 +1018,13 @@ function isNullEquivalentValue(value) {
|
|
|
999
1018
|
|
|
1000
1019
|
const EMAIL_PATTERN = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
1001
1020
|
const PHONE_PATTERN = /(\+|00)(297|93|244|1264|358|355|376|971|54|374|1684|1268|61|43|994|257|32|229|226|880|359|973|1242|387|590|375|501|1441|591|55|1246|673|975|267|236|1|61|41|56|86|225|237|243|242|682|57|269|238|506|53|5999|61|1345|357|420|49|253|1767|45|1809|1829|1849|213|593|20|291|212|34|372|251|358|679|500|33|298|691|241|44|995|44|233|350|224|590|220|245|240|30|1473|299|502|594|1671|592|852|504|385|509|36|62|44|91|246|353|98|964|354|972|39|1876|44|962|81|76|77|254|996|855|686|1869|82|383|965|856|961|231|218|1758|423|94|266|370|352|371|853|590|212|377|373|261|960|52|692|389|223|356|95|382|976|1670|258|222|1664|596|230|265|60|262|264|687|227|672|234|505|683|31|47|977|674|64|968|92|507|64|51|63|680|675|48|1787|1939|850|351|595|970|689|974|262|40|7|250|966|249|221|65|500|4779|677|232|503|378|252|508|381|211|239|597|421|386|46|268|1721|248|963|1649|235|228|66|992|690|993|670|676|1868|216|90|688|886|255|256|380|598|1|998|3906698|379|1784|58|1284|1340|84|678|681|685|967|27|260|263)(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{4,20}$/;
|
|
1021
|
+
const VALIDATE_FEEL_PROPERTIES = ['min', 'max', 'minLength', 'maxLength'];
|
|
1002
1022
|
class Validator {
|
|
1023
|
+
constructor(expressionLanguage, conditionChecker, form) {
|
|
1024
|
+
this._expressionLanguage = expressionLanguage;
|
|
1025
|
+
this._conditionChecker = conditionChecker;
|
|
1026
|
+
this._form = form;
|
|
1027
|
+
}
|
|
1003
1028
|
validateField(field, value) {
|
|
1004
1029
|
const {
|
|
1005
1030
|
type,
|
|
@@ -1032,10 +1057,11 @@ class Validator {
|
|
|
1032
1057
|
if (!validate) {
|
|
1033
1058
|
return errors;
|
|
1034
1059
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1060
|
+
const evaluatedValidation = evaluateFEELValues(validate, this._expressionLanguage, this._conditionChecker, this._form);
|
|
1061
|
+
if (evaluatedValidation.pattern && value && !new RegExp(evaluatedValidation.pattern).test(value)) {
|
|
1062
|
+
errors = [...errors, `Field must match pattern ${evaluatedValidation.pattern}.`];
|
|
1037
1063
|
}
|
|
1038
|
-
if (
|
|
1064
|
+
if (evaluatedValidation.required) {
|
|
1039
1065
|
const isUncheckedCheckbox = type === 'checkbox' && value === false;
|
|
1040
1066
|
const isUnsetValue = minDash.isNil(value) || value === '';
|
|
1041
1067
|
const isEmptyMultiselect = Array.isArray(value) && value.length === 0;
|
|
@@ -1043,28 +1069,64 @@ class Validator {
|
|
|
1043
1069
|
errors = [...errors, 'Field is required.'];
|
|
1044
1070
|
}
|
|
1045
1071
|
}
|
|
1046
|
-
if ('min' in
|
|
1047
|
-
errors = [...errors, `Field must have minimum value of ${
|
|
1072
|
+
if ('min' in evaluatedValidation && (value || value === 0) && value < evaluatedValidation.min) {
|
|
1073
|
+
errors = [...errors, `Field must have minimum value of ${evaluatedValidation.min}.`];
|
|
1048
1074
|
}
|
|
1049
|
-
if ('max' in
|
|
1050
|
-
errors = [...errors, `Field must have maximum value of ${
|
|
1075
|
+
if ('max' in evaluatedValidation && (value || value === 0) && value > evaluatedValidation.max) {
|
|
1076
|
+
errors = [...errors, `Field must have maximum value of ${evaluatedValidation.max}.`];
|
|
1051
1077
|
}
|
|
1052
|
-
if ('minLength' in
|
|
1053
|
-
errors = [...errors, `Field must have minimum length of ${
|
|
1078
|
+
if ('minLength' in evaluatedValidation && value && value.trim().length < evaluatedValidation.minLength) {
|
|
1079
|
+
errors = [...errors, `Field must have minimum length of ${evaluatedValidation.minLength}.`];
|
|
1054
1080
|
}
|
|
1055
|
-
if ('maxLength' in
|
|
1056
|
-
errors = [...errors, `Field must have maximum length of ${
|
|
1081
|
+
if ('maxLength' in evaluatedValidation && value && value.trim().length > evaluatedValidation.maxLength) {
|
|
1082
|
+
errors = [...errors, `Field must have maximum length of ${evaluatedValidation.maxLength}.`];
|
|
1057
1083
|
}
|
|
1058
|
-
if ('validationType' in
|
|
1084
|
+
if ('validationType' in evaluatedValidation && value && evaluatedValidation.validationType === 'phone' && !PHONE_PATTERN.test(value)) {
|
|
1059
1085
|
errors = [...errors, 'Field must be a valid international phone number. (e.g. +4930664040900)'];
|
|
1060
1086
|
}
|
|
1061
|
-
if ('validationType' in
|
|
1087
|
+
if ('validationType' in evaluatedValidation && value && evaluatedValidation.validationType === 'email' && !EMAIL_PATTERN.test(value)) {
|
|
1062
1088
|
errors = [...errors, 'Field must be a valid email.'];
|
|
1063
1089
|
}
|
|
1064
1090
|
return errors;
|
|
1065
1091
|
}
|
|
1066
1092
|
}
|
|
1067
|
-
Validator.$inject = [];
|
|
1093
|
+
Validator.$inject = ['expressionLanguage', 'conditionChecker', 'form'];
|
|
1094
|
+
|
|
1095
|
+
// helpers //////////
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Helper function to evaluate optional FEEL validation values.
|
|
1099
|
+
*/
|
|
1100
|
+
function evaluateFEELValues(validate, expressionLanguage, conditionChecker, form) {
|
|
1101
|
+
const evaluatedValidate = {
|
|
1102
|
+
...validate
|
|
1103
|
+
};
|
|
1104
|
+
VALIDATE_FEEL_PROPERTIES.forEach(property => {
|
|
1105
|
+
const path = property.split('.');
|
|
1106
|
+
const value = minDash.get(evaluatedValidate, path);
|
|
1107
|
+
|
|
1108
|
+
// mirroring FEEL evaluation of our hooks
|
|
1109
|
+
if (!expressionLanguage || !expressionLanguage.isExpression(value)) {
|
|
1110
|
+
return value;
|
|
1111
|
+
}
|
|
1112
|
+
const {
|
|
1113
|
+
initialData,
|
|
1114
|
+
data
|
|
1115
|
+
} = form._getState();
|
|
1116
|
+
const newData = conditionChecker ? conditionChecker.applyConditions(data, data) : data;
|
|
1117
|
+
const filteredData = {
|
|
1118
|
+
...initialData,
|
|
1119
|
+
...newData
|
|
1120
|
+
};
|
|
1121
|
+
const evaluatedValue = expressionLanguage.evaluate(value, filteredData);
|
|
1122
|
+
|
|
1123
|
+
// replace validate property with evaluated value
|
|
1124
|
+
if (evaluatedValue) {
|
|
1125
|
+
minDash.set(evaluatedValidate, path, evaluatedValue);
|
|
1126
|
+
}
|
|
1127
|
+
});
|
|
1128
|
+
return evaluatedValidate;
|
|
1129
|
+
}
|
|
1068
1130
|
|
|
1069
1131
|
class FormFieldRegistry {
|
|
1070
1132
|
constructor(eventBus) {
|
|
@@ -1115,23 +1177,23 @@ class FormFieldRegistry {
|
|
|
1115
1177
|
}
|
|
1116
1178
|
FormFieldRegistry.$inject = ['eventBus'];
|
|
1117
1179
|
|
|
1118
|
-
/**
|
|
1119
|
-
* @typedef { { id: String, components: Array<String> } } FormRow
|
|
1120
|
-
* @typedef { { formFieldId: String, rows: Array<FormRow> } } FormRows
|
|
1180
|
+
/**
|
|
1181
|
+
* @typedef { { id: String, components: Array<String> } } FormRow
|
|
1182
|
+
* @typedef { { formFieldId: String, rows: Array<FormRow> } } FormRows
|
|
1121
1183
|
*/
|
|
1122
1184
|
|
|
1123
|
-
/**
|
|
1124
|
-
* Maintains the Form layout in a given structure, for example
|
|
1125
|
-
*
|
|
1126
|
-
* [
|
|
1127
|
-
* {
|
|
1128
|
-
* formFieldId: 'FormField_1',
|
|
1129
|
-
* rows: [
|
|
1130
|
-
* { id: 'Row_1', components: [ 'Text_1', 'Textdield_1', ... ] }
|
|
1131
|
-
* ]
|
|
1132
|
-
* }
|
|
1133
|
-
* ]
|
|
1134
|
-
*
|
|
1185
|
+
/**
|
|
1186
|
+
* Maintains the Form layout in a given structure, for example
|
|
1187
|
+
*
|
|
1188
|
+
* [
|
|
1189
|
+
* {
|
|
1190
|
+
* formFieldId: 'FormField_1',
|
|
1191
|
+
* rows: [
|
|
1192
|
+
* { id: 'Row_1', components: [ 'Text_1', 'Textdield_1', ... ] }
|
|
1193
|
+
* ]
|
|
1194
|
+
* }
|
|
1195
|
+
* ]
|
|
1196
|
+
*
|
|
1135
1197
|
*/
|
|
1136
1198
|
class FormLayouter {
|
|
1137
1199
|
constructor(eventBus) {
|
|
@@ -1141,8 +1203,8 @@ class FormLayouter {
|
|
|
1141
1203
|
this._eventBus = eventBus;
|
|
1142
1204
|
}
|
|
1143
1205
|
|
|
1144
|
-
/**
|
|
1145
|
-
* @param {FormRow} row
|
|
1206
|
+
/**
|
|
1207
|
+
* @param {FormRow} row
|
|
1146
1208
|
*/
|
|
1147
1209
|
addRow(formFieldId, row) {
|
|
1148
1210
|
let rowsPerComponent = this._rows.find(r => r.formFieldId === formFieldId);
|
|
@@ -1156,18 +1218,18 @@ class FormLayouter {
|
|
|
1156
1218
|
rowsPerComponent.rows.push(row);
|
|
1157
1219
|
}
|
|
1158
1220
|
|
|
1159
|
-
/**
|
|
1160
|
-
* @param {String} id
|
|
1161
|
-
* @returns {FormRow}
|
|
1221
|
+
/**
|
|
1222
|
+
* @param {String} id
|
|
1223
|
+
* @returns {FormRow}
|
|
1162
1224
|
*/
|
|
1163
1225
|
getRow(id) {
|
|
1164
1226
|
const rows = allRows(this._rows);
|
|
1165
1227
|
return rows.find(r => r.id === id);
|
|
1166
1228
|
}
|
|
1167
1229
|
|
|
1168
|
-
/**
|
|
1169
|
-
* @param {any} formField
|
|
1170
|
-
* @returns {FormRow}
|
|
1230
|
+
/**
|
|
1231
|
+
* @param {any} formField
|
|
1232
|
+
* @returns {FormRow}
|
|
1171
1233
|
*/
|
|
1172
1234
|
getRowForField(formField) {
|
|
1173
1235
|
return allRows(this._rows).find(r => {
|
|
@@ -1178,9 +1240,9 @@ class FormLayouter {
|
|
|
1178
1240
|
});
|
|
1179
1241
|
}
|
|
1180
1242
|
|
|
1181
|
-
/**
|
|
1182
|
-
* @param {String} formFieldId
|
|
1183
|
-
* @returns { Array<FormRow> }
|
|
1243
|
+
/**
|
|
1244
|
+
* @param {String} formFieldId
|
|
1245
|
+
* @returns { Array<FormRow> }
|
|
1184
1246
|
*/
|
|
1185
1247
|
getRows(formFieldId) {
|
|
1186
1248
|
const rowsForField = this._rows.find(r => formFieldId === r.formFieldId);
|
|
@@ -1190,15 +1252,15 @@ class FormLayouter {
|
|
|
1190
1252
|
return rowsForField.rows;
|
|
1191
1253
|
}
|
|
1192
1254
|
|
|
1193
|
-
/**
|
|
1194
|
-
* @returns {string}
|
|
1255
|
+
/**
|
|
1256
|
+
* @returns {string}
|
|
1195
1257
|
*/
|
|
1196
1258
|
nextRowId() {
|
|
1197
1259
|
return this._ids.nextPrefixed('Row_');
|
|
1198
1260
|
}
|
|
1199
1261
|
|
|
1200
|
-
/**
|
|
1201
|
-
* @param {any} formField
|
|
1262
|
+
/**
|
|
1263
|
+
* @param {any} formField
|
|
1202
1264
|
*/
|
|
1203
1265
|
calculateLayout(formField) {
|
|
1204
1266
|
const {
|
|
@@ -1252,9 +1314,9 @@ function groupByRow(components, ids) {
|
|
|
1252
1314
|
});
|
|
1253
1315
|
}
|
|
1254
1316
|
|
|
1255
|
-
/**
|
|
1256
|
-
* @param {Array<FormRows>} formRows
|
|
1257
|
-
* @returns {Array<FormRow>}
|
|
1317
|
+
/**
|
|
1318
|
+
* @param {Array<FormRows>} formRows
|
|
1319
|
+
* @returns {Array<FormRow>}
|
|
1258
1320
|
*/
|
|
1259
1321
|
function allRows(formRows) {
|
|
1260
1322
|
return minDash.flatten(formRows.map(c => c.rows));
|
|
@@ -1295,23 +1357,27 @@ const TIME_SERIALISING_FORMAT_PATH = ['timeSerializingFormat'];
|
|
|
1295
1357
|
|
|
1296
1358
|
const VALUES_SOURCES = {
|
|
1297
1359
|
STATIC: 'static',
|
|
1298
|
-
INPUT: 'input'
|
|
1360
|
+
INPUT: 'input',
|
|
1361
|
+
EXPRESSION: 'expression'
|
|
1299
1362
|
};
|
|
1300
1363
|
const VALUES_SOURCE_DEFAULT = VALUES_SOURCES.STATIC;
|
|
1301
1364
|
const VALUES_SOURCES_LABELS = {
|
|
1302
1365
|
[VALUES_SOURCES.STATIC]: 'Static',
|
|
1303
|
-
[VALUES_SOURCES.INPUT]: 'Input data'
|
|
1366
|
+
[VALUES_SOURCES.INPUT]: 'Input data',
|
|
1367
|
+
[VALUES_SOURCES.EXPRESSION]: 'Expression'
|
|
1304
1368
|
};
|
|
1305
1369
|
const VALUES_SOURCES_PATHS = {
|
|
1306
1370
|
[VALUES_SOURCES.STATIC]: ['values'],
|
|
1307
|
-
[VALUES_SOURCES.INPUT]: ['valuesKey']
|
|
1371
|
+
[VALUES_SOURCES.INPUT]: ['valuesKey'],
|
|
1372
|
+
[VALUES_SOURCES.EXPRESSION]: ['valuesExpression']
|
|
1308
1373
|
};
|
|
1309
1374
|
const VALUES_SOURCES_DEFAULTS = {
|
|
1310
1375
|
[VALUES_SOURCES.STATIC]: [{
|
|
1311
1376
|
label: 'Value',
|
|
1312
1377
|
value: 'value'
|
|
1313
1378
|
}],
|
|
1314
|
-
[VALUES_SOURCES.INPUT]: ''
|
|
1379
|
+
[VALUES_SOURCES.INPUT]: '',
|
|
1380
|
+
[VALUES_SOURCES.EXPRESSION]: '='
|
|
1315
1381
|
};
|
|
1316
1382
|
|
|
1317
1383
|
// helpers ///////////////////
|
|
@@ -1331,10 +1397,10 @@ function createInjector(bootstrapModules) {
|
|
|
1331
1397
|
return injector;
|
|
1332
1398
|
}
|
|
1333
1399
|
|
|
1334
|
-
/**
|
|
1335
|
-
* @param {string?} prefix
|
|
1336
|
-
*
|
|
1337
|
-
* @returns Element
|
|
1400
|
+
/**
|
|
1401
|
+
* @param {string?} prefix
|
|
1402
|
+
*
|
|
1403
|
+
* @returns Element
|
|
1338
1404
|
*/
|
|
1339
1405
|
function createFormContainer(prefix = 'fjs') {
|
|
1340
1406
|
const container = document.createElement('div');
|
|
@@ -1342,8 +1408,8 @@ function createFormContainer(prefix = 'fjs') {
|
|
|
1342
1408
|
return container;
|
|
1343
1409
|
}
|
|
1344
1410
|
|
|
1345
|
-
const EXPRESSION_PROPERTIES = ['alt', 'description', 'label', 'source', 'readonly', 'text'];
|
|
1346
|
-
const TEMPLATE_PROPERTIES = ['description', 'label', 'text'];
|
|
1411
|
+
const EXPRESSION_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'conditional.hide', 'description', 'label', 'source', 'readonly', 'text', 'validate.min', 'validate.max', 'validate.minLength', 'validate.maxLength', 'valuesExpression'];
|
|
1412
|
+
const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text'];
|
|
1347
1413
|
function findErrors(errors, path) {
|
|
1348
1414
|
return errors[pathStringify(path)];
|
|
1349
1415
|
}
|
|
@@ -1380,22 +1446,22 @@ function generateIdForType(type) {
|
|
|
1380
1446
|
return `${type}${generateIndexForType(type)}`;
|
|
1381
1447
|
}
|
|
1382
1448
|
|
|
1383
|
-
/**
|
|
1384
|
-
* @template T
|
|
1385
|
-
* @param {T} data
|
|
1386
|
-
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
1387
|
-
* @return {T}
|
|
1449
|
+
/**
|
|
1450
|
+
* @template T
|
|
1451
|
+
* @param {T} data
|
|
1452
|
+
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
1453
|
+
* @return {T}
|
|
1388
1454
|
*/
|
|
1389
1455
|
function clone(data, replacer) {
|
|
1390
1456
|
return JSON.parse(JSON.stringify(data, replacer));
|
|
1391
1457
|
}
|
|
1392
1458
|
|
|
1393
|
-
/**
|
|
1394
|
-
* Parse the schema for input variables a form might make use of
|
|
1395
|
-
*
|
|
1396
|
-
* @param {any} schema
|
|
1397
|
-
*
|
|
1398
|
-
* @return {string[]}
|
|
1459
|
+
/**
|
|
1460
|
+
* Parse the schema for input variables a form might make use of
|
|
1461
|
+
*
|
|
1462
|
+
* @param {any} schema
|
|
1463
|
+
*
|
|
1464
|
+
* @return {string[]}
|
|
1399
1465
|
*/
|
|
1400
1466
|
function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLanguage(null), templating = new FeelersTemplating()) {
|
|
1401
1467
|
if (!schema.components) {
|
|
@@ -1405,8 +1471,7 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1405
1471
|
const {
|
|
1406
1472
|
key,
|
|
1407
1473
|
valuesKey,
|
|
1408
|
-
type
|
|
1409
|
-
conditional
|
|
1474
|
+
type
|
|
1410
1475
|
} = component;
|
|
1411
1476
|
if (['button'].includes(type)) {
|
|
1412
1477
|
return variables;
|
|
@@ -1417,14 +1482,8 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1417
1482
|
if (valuesKey) {
|
|
1418
1483
|
variables = [...variables, valuesKey];
|
|
1419
1484
|
}
|
|
1420
|
-
if (conditional && conditional.hide) {
|
|
1421
|
-
const conditionVariables = expressionLanguage.getVariableNames(conditional.hide, {
|
|
1422
|
-
type: 'unaryTest'
|
|
1423
|
-
});
|
|
1424
|
-
variables = [...variables, ...conditionVariables];
|
|
1425
|
-
}
|
|
1426
1485
|
EXPRESSION_PROPERTIES.forEach(prop => {
|
|
1427
|
-
const property = component
|
|
1486
|
+
const property = minDash.get(component, prop.split('.'));
|
|
1428
1487
|
if (property && expressionLanguage.isExpression(property)) {
|
|
1429
1488
|
const expressionVariables = expressionLanguage.getVariableNames(property, {
|
|
1430
1489
|
type: 'expression'
|
|
@@ -1433,7 +1492,7 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1433
1492
|
}
|
|
1434
1493
|
});
|
|
1435
1494
|
TEMPLATE_PROPERTIES.forEach(prop => {
|
|
1436
|
-
const property = component
|
|
1495
|
+
const property = minDash.get(component, prop.split('.'));
|
|
1437
1496
|
if (property && !expressionLanguage.isExpression(property) && templating.isTemplate(property)) {
|
|
1438
1497
|
const templateVariables = templating.getVariableNames(property);
|
|
1439
1498
|
variables = [...variables, ...templateVariables];
|
|
@@ -1447,11 +1506,11 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1447
1506
|
}
|
|
1448
1507
|
|
|
1449
1508
|
class Importer {
|
|
1450
|
-
/**
|
|
1451
|
-
* @constructor
|
|
1452
|
-
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
1453
|
-
* @param { import('../render/FormFields').default } formFields
|
|
1454
|
-
* @param { import('../core').FormLayouter } formLayouter
|
|
1509
|
+
/**
|
|
1510
|
+
* @constructor
|
|
1511
|
+
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
1512
|
+
* @param { import('../render/FormFields').default } formFields
|
|
1513
|
+
* @param { import('../core').FormLayouter } formLayouter
|
|
1455
1514
|
*/
|
|
1456
1515
|
constructor(formFieldRegistry, formFields, formLayouter) {
|
|
1457
1516
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -1459,15 +1518,15 @@ class Importer {
|
|
|
1459
1518
|
this._formLayouter = formLayouter;
|
|
1460
1519
|
}
|
|
1461
1520
|
|
|
1462
|
-
/**
|
|
1463
|
-
* Import schema adding `id`, `_parent` and `_path`
|
|
1464
|
-
* information to each field and adding it to the
|
|
1465
|
-
* form field registry.
|
|
1466
|
-
*
|
|
1467
|
-
* @param {any} schema
|
|
1468
|
-
* @param {any} [data]
|
|
1469
|
-
*
|
|
1470
|
-
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
1521
|
+
/**
|
|
1522
|
+
* Import schema adding `id`, `_parent` and `_path`
|
|
1523
|
+
* information to each field and adding it to the
|
|
1524
|
+
* form field registry.
|
|
1525
|
+
*
|
|
1526
|
+
* @param {any} schema
|
|
1527
|
+
* @param {any} [data]
|
|
1528
|
+
*
|
|
1529
|
+
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
1471
1530
|
*/
|
|
1472
1531
|
importSchema(schema, data = {}) {
|
|
1473
1532
|
// TODO: Add warnings - https://github.com/bpmn-io/form-js/issues/289
|
|
@@ -1488,11 +1547,11 @@ class Importer {
|
|
|
1488
1547
|
}
|
|
1489
1548
|
}
|
|
1490
1549
|
|
|
1491
|
-
/**
|
|
1492
|
-
* @param {any} formField
|
|
1493
|
-
* @param {string} [parentId]
|
|
1494
|
-
*
|
|
1495
|
-
* @return {any} importedField
|
|
1550
|
+
/**
|
|
1551
|
+
* @param {any} formField
|
|
1552
|
+
* @param {string} [parentId]
|
|
1553
|
+
*
|
|
1554
|
+
* @return {any} importedField
|
|
1496
1555
|
*/
|
|
1497
1556
|
importFormField(formField, parentId) {
|
|
1498
1557
|
const {
|
|
@@ -1543,10 +1602,10 @@ class Importer {
|
|
|
1543
1602
|
});
|
|
1544
1603
|
}
|
|
1545
1604
|
|
|
1546
|
-
/**
|
|
1547
|
-
* @param {Object} data
|
|
1548
|
-
*
|
|
1549
|
-
* @return {Object} initializedData
|
|
1605
|
+
/**
|
|
1606
|
+
* @param {Object} data
|
|
1607
|
+
*
|
|
1608
|
+
* @return {Object} initializedData
|
|
1550
1609
|
*/
|
|
1551
1610
|
initializeFieldValues(data) {
|
|
1552
1611
|
return this._formFieldRegistry.getAll().reduce((initializedData, formField) => {
|
|
@@ -1684,11 +1743,11 @@ const FormRenderContext = preact.createContext({
|
|
|
1684
1743
|
});
|
|
1685
1744
|
var FormRenderContext$1 = FormRenderContext;
|
|
1686
1745
|
|
|
1687
|
-
/**
|
|
1688
|
-
* @param {string} type
|
|
1689
|
-
* @param {boolean} [strict]
|
|
1690
|
-
*
|
|
1691
|
-
* @returns {any}
|
|
1746
|
+
/**
|
|
1747
|
+
* @param {string} type
|
|
1748
|
+
* @param {boolean} [strict]
|
|
1749
|
+
*
|
|
1750
|
+
* @returns {any}
|
|
1692
1751
|
*/
|
|
1693
1752
|
function getService(type, strict) {}
|
|
1694
1753
|
const FormContext = preact.createContext({
|
|
@@ -1704,10 +1763,10 @@ function useService(type, strict) {
|
|
|
1704
1763
|
return getService(type, strict);
|
|
1705
1764
|
}
|
|
1706
1765
|
|
|
1707
|
-
/**
|
|
1708
|
-
* Returns the conditionally filtered data of a form reactively.
|
|
1709
|
-
* Memoised to minimize re-renders
|
|
1710
|
-
*
|
|
1766
|
+
/**
|
|
1767
|
+
* Returns the conditionally filtered data of a form reactively.
|
|
1768
|
+
* Memoised to minimize re-renders
|
|
1769
|
+
*
|
|
1711
1770
|
*/
|
|
1712
1771
|
function useFilteredFormData() {
|
|
1713
1772
|
const {
|
|
@@ -1724,12 +1783,12 @@ function useFilteredFormData() {
|
|
|
1724
1783
|
}, [conditionChecker, data, initialData]);
|
|
1725
1784
|
}
|
|
1726
1785
|
|
|
1727
|
-
/**
|
|
1728
|
-
* Evaluate if condition is met reactively based on the conditionChecker and form data.
|
|
1729
|
-
*
|
|
1730
|
-
* @param {string | undefined} condition
|
|
1731
|
-
*
|
|
1732
|
-
* @returns {boolean} true if condition is met or no condition or condition checker exists
|
|
1786
|
+
/**
|
|
1787
|
+
* Evaluate if condition is met reactively based on the conditionChecker and form data.
|
|
1788
|
+
*
|
|
1789
|
+
* @param {string | undefined} condition
|
|
1790
|
+
*
|
|
1791
|
+
* @returns {boolean} true if condition is met or no condition or condition checker exists
|
|
1733
1792
|
*/
|
|
1734
1793
|
function useCondition(condition) {
|
|
1735
1794
|
const conditionChecker = useService('conditionChecker', false);
|
|
@@ -1739,13 +1798,13 @@ function useCondition(condition) {
|
|
|
1739
1798
|
}, [conditionChecker, condition, filteredData]);
|
|
1740
1799
|
}
|
|
1741
1800
|
|
|
1742
|
-
/**
|
|
1743
|
-
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
1744
|
-
* If the string is not an expression, it is returned as is.
|
|
1745
|
-
* Memoised to minimize re-renders.
|
|
1746
|
-
*
|
|
1747
|
-
* @param {string} value
|
|
1748
|
-
*
|
|
1801
|
+
/**
|
|
1802
|
+
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
1803
|
+
* If the string is not an expression, it is returned as is.
|
|
1804
|
+
* Memoised to minimize re-renders.
|
|
1805
|
+
*
|
|
1806
|
+
* @param {string} value
|
|
1807
|
+
*
|
|
1749
1808
|
*/
|
|
1750
1809
|
function useExpressionEvaluation(value) {
|
|
1751
1810
|
const formData = useFilteredFormData();
|
|
@@ -1774,16 +1833,16 @@ function useKeyDownAction(targetKey, action, listenerElement = window) {
|
|
|
1774
1833
|
});
|
|
1775
1834
|
}
|
|
1776
1835
|
|
|
1777
|
-
/**
|
|
1778
|
-
* Retrieve readonly value of a form field, given it can be an
|
|
1779
|
-
* expression optionally or configured globally.
|
|
1780
|
-
*
|
|
1781
|
-
* @typedef { import('../../types').FormProperties } FormProperties
|
|
1782
|
-
*
|
|
1783
|
-
* @param {any} formField
|
|
1784
|
-
* @param {FormProperties} properties
|
|
1785
|
-
*
|
|
1786
|
-
* @returns {boolean}
|
|
1836
|
+
/**
|
|
1837
|
+
* Retrieve readonly value of a form field, given it can be an
|
|
1838
|
+
* expression optionally or configured globally.
|
|
1839
|
+
*
|
|
1840
|
+
* @typedef { import('../../types').FormProperties } FormProperties
|
|
1841
|
+
*
|
|
1842
|
+
* @param {any} formField
|
|
1843
|
+
* @param {FormProperties} properties
|
|
1844
|
+
*
|
|
1845
|
+
* @returns {boolean}
|
|
1787
1846
|
*/
|
|
1788
1847
|
function useReadonly(formField, properties = {}) {
|
|
1789
1848
|
const expressionLanguage = useService('expressionLanguage');
|
|
@@ -1801,16 +1860,16 @@ function useReadonly(formField, properties = {}) {
|
|
|
1801
1860
|
return readonly || false;
|
|
1802
1861
|
}
|
|
1803
1862
|
|
|
1804
|
-
/**
|
|
1805
|
-
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1806
|
-
* Memoised to minimize re-renders
|
|
1807
|
-
*
|
|
1808
|
-
* @param {string} value
|
|
1809
|
-
* @param {Object} options
|
|
1810
|
-
* @param {boolean} [options.debug = false]
|
|
1811
|
-
* @param {boolean} [options.strict = false]
|
|
1812
|
-
* @param {Function} [options.buildDebugString]
|
|
1813
|
-
*
|
|
1863
|
+
/**
|
|
1864
|
+
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1865
|
+
* Memoised to minimize re-renders
|
|
1866
|
+
*
|
|
1867
|
+
* @param {string} value
|
|
1868
|
+
* @param {Object} options
|
|
1869
|
+
* @param {boolean} [options.debug = false]
|
|
1870
|
+
* @param {boolean} [options.strict = false]
|
|
1871
|
+
* @param {Function} [options.buildDebugString]
|
|
1872
|
+
*
|
|
1814
1873
|
*/
|
|
1815
1874
|
function useTemplateEvaluation(value, options) {
|
|
1816
1875
|
const filteredData = useFilteredFormData();
|
|
@@ -1823,17 +1882,17 @@ function useTemplateEvaluation(value, options) {
|
|
|
1823
1882
|
}, [filteredData, templating, value, options]);
|
|
1824
1883
|
}
|
|
1825
1884
|
|
|
1826
|
-
/**
|
|
1827
|
-
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1828
|
-
* If the string contains multiple lines, only the first line is returned.
|
|
1829
|
-
* Memoised to minimize re-renders
|
|
1830
|
-
*
|
|
1831
|
-
* @param {string} value
|
|
1832
|
-
* @param {Object} [options]
|
|
1833
|
-
* @param {boolean} [options.debug = false]
|
|
1834
|
-
* @param {boolean} [options.strict = false]
|
|
1835
|
-
* @param {Function} [options.buildDebugString]
|
|
1836
|
-
*
|
|
1885
|
+
/**
|
|
1886
|
+
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1887
|
+
* If the string contains multiple lines, only the first line is returned.
|
|
1888
|
+
* Memoised to minimize re-renders
|
|
1889
|
+
*
|
|
1890
|
+
* @param {string} value
|
|
1891
|
+
* @param {Object} [options]
|
|
1892
|
+
* @param {boolean} [options.debug = false]
|
|
1893
|
+
* @param {boolean} [options.strict = false]
|
|
1894
|
+
* @param {Function} [options.buildDebugString]
|
|
1895
|
+
*
|
|
1837
1896
|
*/
|
|
1838
1897
|
function useSingleLineTemplateEvaluation(value, options = {}) {
|
|
1839
1898
|
const evaluatedTemplate = useTemplateEvaluation(value, options);
|
|
@@ -2020,8 +2079,8 @@ function _isValueSomething(value) {
|
|
|
2020
2079
|
return value || value === 0 || value === false;
|
|
2021
2080
|
}
|
|
2022
2081
|
|
|
2023
|
-
/**
|
|
2024
|
-
* @enum { String }
|
|
2082
|
+
/**
|
|
2083
|
+
* @enum { String }
|
|
2025
2084
|
*/
|
|
2026
2085
|
const LOAD_STATES = {
|
|
2027
2086
|
LOADING: 'loading',
|
|
@@ -2029,20 +2088,21 @@ const LOAD_STATES = {
|
|
|
2029
2088
|
ERROR: 'error'
|
|
2030
2089
|
};
|
|
2031
2090
|
|
|
2032
|
-
/**
|
|
2033
|
-
* @typedef {Object} ValuesGetter
|
|
2034
|
-
* @property {Object[]} values - The values data
|
|
2035
|
-
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
2091
|
+
/**
|
|
2092
|
+
* @typedef {Object} ValuesGetter
|
|
2093
|
+
* @property {Object[]} values - The values data
|
|
2094
|
+
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
2036
2095
|
*/
|
|
2037
2096
|
|
|
2038
|
-
/**
|
|
2039
|
-
* A hook to load values for single and multiselect components.
|
|
2040
|
-
*
|
|
2041
|
-
* @param {Object} field - The form field to handle values for
|
|
2042
|
-
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
2097
|
+
/**
|
|
2098
|
+
* A hook to load values for single and multiselect components.
|
|
2099
|
+
*
|
|
2100
|
+
* @param {Object} field - The form field to handle values for
|
|
2101
|
+
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
2043
2102
|
*/
|
|
2044
2103
|
function useValuesAsync (field) {
|
|
2045
2104
|
const {
|
|
2105
|
+
valuesExpression,
|
|
2046
2106
|
valuesKey,
|
|
2047
2107
|
values: staticValues
|
|
2048
2108
|
} = field;
|
|
@@ -2052,6 +2112,11 @@ function useValuesAsync (field) {
|
|
|
2052
2112
|
state: LOAD_STATES.LOADING
|
|
2053
2113
|
});
|
|
2054
2114
|
const initialData = useService('form')._getState().initialData;
|
|
2115
|
+
const evaluatedValues = hooks.useMemo(() => {
|
|
2116
|
+
if (valuesExpression) {
|
|
2117
|
+
return useExpressionEvaluation(valuesExpression);
|
|
2118
|
+
}
|
|
2119
|
+
}, [valuesExpression]);
|
|
2055
2120
|
hooks.useEffect(() => {
|
|
2056
2121
|
let values = [];
|
|
2057
2122
|
|
|
@@ -2061,11 +2126,14 @@ function useValuesAsync (field) {
|
|
|
2061
2126
|
if (keyedValues && Array.isArray(keyedValues)) {
|
|
2062
2127
|
values = keyedValues;
|
|
2063
2128
|
}
|
|
2064
|
-
}
|
|
2065
2129
|
|
|
2066
|
-
|
|
2067
|
-
else if (staticValues !== undefined) {
|
|
2130
|
+
// static values
|
|
2131
|
+
} else if (staticValues !== undefined) {
|
|
2068
2132
|
values = Array.isArray(staticValues) ? staticValues : [];
|
|
2133
|
+
|
|
2134
|
+
// expression
|
|
2135
|
+
} else if (evaluatedValues && Array.isArray(evaluatedValues)) {
|
|
2136
|
+
values = evaluatedValues;
|
|
2069
2137
|
} else {
|
|
2070
2138
|
setValuesGetter(buildErrorState('No values source defined in the form definition'));
|
|
2071
2139
|
return;
|
|
@@ -2498,22 +2566,23 @@ Default.config = {
|
|
|
2498
2566
|
})
|
|
2499
2567
|
};
|
|
2500
2568
|
|
|
2569
|
+
var _path$g;
|
|
2501
2570
|
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
2502
|
-
var
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2571
|
+
var SvgCalendar = function SvgCalendar(props) {
|
|
2572
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
2573
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2574
|
+
width: 14,
|
|
2575
|
+
height: 15,
|
|
2576
|
+
fill: "none",
|
|
2577
|
+
viewBox: "0 0 28 30"
|
|
2578
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2579
|
+
fill: "currentColor",
|
|
2580
|
+
fillRule: "evenodd",
|
|
2581
|
+
d: "M19 2H9V0H7v2H2a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-5V0h-2v2ZM7 7V4H2v5h24V4h-5v3h-2V4H9v3H7Zm-5 4v17h24V11H2Z",
|
|
2582
|
+
clipRule: "evenodd"
|
|
2583
|
+
})));
|
|
2584
|
+
};
|
|
2585
|
+
var CalendarIcon = SvgCalendar;
|
|
2517
2586
|
|
|
2518
2587
|
function InputAdorner(props) {
|
|
2519
2588
|
const {
|
|
@@ -2694,25 +2763,26 @@ function Datepicker(props) {
|
|
|
2694
2763
|
});
|
|
2695
2764
|
}
|
|
2696
2765
|
|
|
2766
|
+
var _path$f, _path2$3;
|
|
2697
2767
|
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
|
|
2698
|
-
var
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2768
|
+
var SvgClock = function SvgClock(props) {
|
|
2769
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
2770
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2771
|
+
width: 16,
|
|
2772
|
+
height: 16,
|
|
2773
|
+
fill: "none",
|
|
2774
|
+
viewBox: "0 0 28 29"
|
|
2775
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2776
|
+
fill: "currentColor",
|
|
2777
|
+
d: "M13 14.41 18.59 20 20 18.59l-5-5.01V5h-2v9.41Z"
|
|
2778
|
+
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2779
|
+
fill: "currentColor",
|
|
2780
|
+
fillRule: "evenodd",
|
|
2781
|
+
d: "M6.222 25.64A14 14 0 1 0 21.778 2.36 14 14 0 0 0 6.222 25.64ZM7.333 4.023a12 12 0 1 1 13.334 19.955A12 12 0 0 1 7.333 4.022Z",
|
|
2782
|
+
clipRule: "evenodd"
|
|
2783
|
+
})));
|
|
2784
|
+
};
|
|
2785
|
+
var ClockIcon = SvgClock;
|
|
2716
2786
|
|
|
2717
2787
|
const DEFAULT_LABEL_GETTER = value => value;
|
|
2718
2788
|
const NOOP = () => {};
|
|
@@ -3161,10 +3231,10 @@ Datetime.config = {
|
|
|
3161
3231
|
}
|
|
3162
3232
|
};
|
|
3163
3233
|
|
|
3164
|
-
/**
|
|
3165
|
-
* This file must not be changed or exchanged.
|
|
3166
|
-
*
|
|
3167
|
-
* @see http://bpmn.io/license for more information.
|
|
3234
|
+
/**
|
|
3235
|
+
* This file must not be changed or exchanged.
|
|
3236
|
+
*
|
|
3237
|
+
* @see http://bpmn.io/license for more information.
|
|
3168
3238
|
*/
|
|
3169
3239
|
function Logo() {
|
|
3170
3240
|
return jsxRuntime.jsxs("svg", {
|
|
@@ -3296,11 +3366,11 @@ const ATTR_WHITESPACE_PATTERN = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u
|
|
|
3296
3366
|
|
|
3297
3367
|
const FORM_ELEMENT = document.createElement('form');
|
|
3298
3368
|
|
|
3299
|
-
/**
|
|
3300
|
-
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3301
|
-
*
|
|
3302
|
-
* @param {string} html
|
|
3303
|
-
* @return {string}
|
|
3369
|
+
/**
|
|
3370
|
+
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3371
|
+
*
|
|
3372
|
+
* @param {string} html
|
|
3373
|
+
* @return {string}
|
|
3304
3374
|
*/
|
|
3305
3375
|
|
|
3306
3376
|
// see https://github.com/developit/snarkdown/issues/70
|
|
@@ -3318,29 +3388,29 @@ function sanitizeHTML(html) {
|
|
|
3318
3388
|
}
|
|
3319
3389
|
}
|
|
3320
3390
|
|
|
3321
|
-
/**
|
|
3322
|
-
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
3323
|
-
* that start with http(s).
|
|
3324
|
-
*
|
|
3325
|
-
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
3326
|
-
*
|
|
3327
|
-
* @param {string} src
|
|
3328
|
-
* @returns {string}
|
|
3391
|
+
/**
|
|
3392
|
+
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
3393
|
+
* that start with http(s).
|
|
3394
|
+
*
|
|
3395
|
+
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
3396
|
+
*
|
|
3397
|
+
* @param {string} src
|
|
3398
|
+
* @returns {string}
|
|
3329
3399
|
*/
|
|
3330
3400
|
function sanitizeImageSource(src) {
|
|
3331
3401
|
const valid = ALLOWED_IMAGE_SRC_PATTERN.test(src);
|
|
3332
3402
|
return valid ? src : '';
|
|
3333
3403
|
}
|
|
3334
3404
|
|
|
3335
|
-
/**
|
|
3336
|
-
* Recursively sanitize a HTML node, potentially
|
|
3337
|
-
* removing it, its children or attributes.
|
|
3338
|
-
*
|
|
3339
|
-
* Inspired by https://github.com/developit/snarkdown/issues/70
|
|
3340
|
-
* and https://github.com/cure53/DOMPurify. Simplified
|
|
3341
|
-
* for our use-case.
|
|
3342
|
-
*
|
|
3343
|
-
* @param {Element} node
|
|
3405
|
+
/**
|
|
3406
|
+
* Recursively sanitize a HTML node, potentially
|
|
3407
|
+
* removing it, its children or attributes.
|
|
3408
|
+
*
|
|
3409
|
+
* Inspired by https://github.com/developit/snarkdown/issues/70
|
|
3410
|
+
* and https://github.com/cure53/DOMPurify. Simplified
|
|
3411
|
+
* for our use-case.
|
|
3412
|
+
*
|
|
3413
|
+
* @param {Element} node
|
|
3344
3414
|
*/
|
|
3345
3415
|
function sanitizeNode(node) {
|
|
3346
3416
|
// allow text nodes
|
|
@@ -3384,13 +3454,13 @@ function sanitizeNode(node) {
|
|
|
3384
3454
|
}
|
|
3385
3455
|
}
|
|
3386
3456
|
|
|
3387
|
-
/**
|
|
3388
|
-
* Validates attributes for validity.
|
|
3389
|
-
*
|
|
3390
|
-
* @param {string} lcTag
|
|
3391
|
-
* @param {string} lcName
|
|
3392
|
-
* @param {string} value
|
|
3393
|
-
* @return {boolean}
|
|
3457
|
+
/**
|
|
3458
|
+
* Validates attributes for validity.
|
|
3459
|
+
*
|
|
3460
|
+
* @param {string} lcTag
|
|
3461
|
+
* @param {string} lcName
|
|
3462
|
+
* @param {string} value
|
|
3463
|
+
* @return {boolean}
|
|
3394
3464
|
*/
|
|
3395
3465
|
function isValidAttribute(lcTag, lcName, value) {
|
|
3396
3466
|
// disallow most attributes based on whitelist
|
|
@@ -3414,34 +3484,45 @@ function isValidAttribute(lcTag, lcName, value) {
|
|
|
3414
3484
|
}
|
|
3415
3485
|
|
|
3416
3486
|
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
3417
|
-
var
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
}), /*#__PURE__*/
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
}
|
|
3487
|
+
var SvgImagePlaceholder = function SvgImagePlaceholder(props) {
|
|
3488
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
3489
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3490
|
+
xmlSpace: "preserve",
|
|
3491
|
+
width: 64,
|
|
3492
|
+
height: 64,
|
|
3493
|
+
style: {
|
|
3494
|
+
fillRule: "evenodd",
|
|
3495
|
+
clipRule: "evenodd",
|
|
3496
|
+
strokeLinejoin: "round",
|
|
3497
|
+
strokeMiterlimit: 2
|
|
3498
|
+
},
|
|
3499
|
+
viewBox: "0 0 1280 1280"
|
|
3500
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3501
|
+
d: "M0 0h1280v1280H0z",
|
|
3502
|
+
style: {
|
|
3503
|
+
fill: "#e5e9ed"
|
|
3504
|
+
}
|
|
3505
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3506
|
+
d: "M910 410H370v470h540V410Zm-57.333 57.333v355.334H427.333V467.333h425.334Z",
|
|
3507
|
+
style: {
|
|
3508
|
+
fill: "#cad3db"
|
|
3509
|
+
}
|
|
3510
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3511
|
+
d: "M810 770H480v-60l100-170 130 170 100-65v125Z",
|
|
3512
|
+
style: {
|
|
3513
|
+
fill: "#cad3db"
|
|
3514
|
+
}
|
|
3515
|
+
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3516
|
+
cx: 750,
|
|
3517
|
+
cy: 550,
|
|
3518
|
+
r: 50,
|
|
3519
|
+
style: {
|
|
3520
|
+
fill: "#cad3db"
|
|
3521
|
+
},
|
|
3522
|
+
transform: "translate(10 10)"
|
|
3523
|
+
}));
|
|
3524
|
+
};
|
|
3525
|
+
var ImagePlaceholder = SvgImagePlaceholder;
|
|
3445
3526
|
|
|
3446
3527
|
const type$7 = 'image';
|
|
3447
3528
|
function Image(props) {
|
|
@@ -3453,9 +3534,13 @@ function Image(props) {
|
|
|
3453
3534
|
id,
|
|
3454
3535
|
source
|
|
3455
3536
|
} = field;
|
|
3456
|
-
const evaluatedImageSource =
|
|
3537
|
+
const evaluatedImageSource = useSingleLineTemplateEvaluation(source, {
|
|
3538
|
+
debug: true
|
|
3539
|
+
});
|
|
3457
3540
|
const safeSource = hooks.useMemo(() => sanitizeImageSource(evaluatedImageSource), [evaluatedImageSource]);
|
|
3458
|
-
const altText =
|
|
3541
|
+
const altText = useSingleLineTemplateEvaluation(alt, {
|
|
3542
|
+
debug: true
|
|
3543
|
+
});
|
|
3459
3544
|
const {
|
|
3460
3545
|
formId
|
|
3461
3546
|
} = hooks.useContext(FormContext$1);
|
|
@@ -3487,39 +3572,59 @@ Image.config = {
|
|
|
3487
3572
|
})
|
|
3488
3573
|
};
|
|
3489
3574
|
|
|
3575
|
+
function TemplatedInputAdorner(props) {
|
|
3576
|
+
const {
|
|
3577
|
+
pre,
|
|
3578
|
+
post
|
|
3579
|
+
} = props;
|
|
3580
|
+
const evaluatedPre = useSingleLineTemplateEvaluation(pre, {
|
|
3581
|
+
debug: true
|
|
3582
|
+
});
|
|
3583
|
+
const evaluatedPost = useSingleLineTemplateEvaluation(post, {
|
|
3584
|
+
debug: true
|
|
3585
|
+
});
|
|
3586
|
+
return jsxRuntime.jsx(InputAdorner, {
|
|
3587
|
+
...props,
|
|
3588
|
+
pre: evaluatedPre,
|
|
3589
|
+
post: evaluatedPost
|
|
3590
|
+
});
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
var _path$e;
|
|
3490
3594
|
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
3491
|
-
var
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3595
|
+
var SvgAngelDown = function SvgAngelDown(props) {
|
|
3596
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
3597
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3598
|
+
width: 8,
|
|
3599
|
+
height: 8
|
|
3600
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3601
|
+
fill: "currentColor",
|
|
3602
|
+
fillRule: "evenodd",
|
|
3603
|
+
stroke: "currentColor",
|
|
3604
|
+
strokeWidth: 0.5,
|
|
3605
|
+
d: "M7.75 1.336 4 6.125.258 1.335 0 1.54l4 5.125L8 1.54Zm0 0",
|
|
3606
|
+
clipRule: "evenodd"
|
|
3607
|
+
})));
|
|
3608
|
+
};
|
|
3609
|
+
var AngelDownIcon = SvgAngelDown;
|
|
3506
3610
|
|
|
3611
|
+
var _path$d;
|
|
3507
3612
|
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
3508
|
-
var
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3613
|
+
var SvgAngelUp = function SvgAngelUp(props) {
|
|
3614
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
3615
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3616
|
+
width: 8,
|
|
3617
|
+
height: 8
|
|
3618
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3619
|
+
fill: "currentColor",
|
|
3620
|
+
fillRule: "evenodd",
|
|
3621
|
+
stroke: "currentColor",
|
|
3622
|
+
strokeWidth: 0.5,
|
|
3623
|
+
d: "M7.75 6.664 4 1.875.258 6.665 0 6.46l4-5.125L8 6.46Zm0 0",
|
|
3624
|
+
clipRule: "evenodd"
|
|
3625
|
+
})));
|
|
3626
|
+
};
|
|
3627
|
+
var AngelUpIcon = SvgAngelUp;
|
|
3523
3628
|
|
|
3524
3629
|
const type$6 = 'number';
|
|
3525
3630
|
function Numberfield(props) {
|
|
@@ -3667,7 +3772,7 @@ function Numberfield(props) {
|
|
|
3667
3772
|
id: prefixId(id, formId),
|
|
3668
3773
|
label: label,
|
|
3669
3774
|
required: required
|
|
3670
|
-
}), jsxRuntime.jsx(
|
|
3775
|
+
}), jsxRuntime.jsx(TemplatedInputAdorner, {
|
|
3671
3776
|
disabled: disabled,
|
|
3672
3777
|
readonly: readonly,
|
|
3673
3778
|
pre: prefixAdorner,
|
|
@@ -3844,22 +3949,23 @@ Radio.config = {
|
|
|
3844
3949
|
}
|
|
3845
3950
|
};
|
|
3846
3951
|
|
|
3952
|
+
var _path$c;
|
|
3847
3953
|
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
3848
|
-
var
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3954
|
+
var SvgXMark = function SvgXMark(props) {
|
|
3955
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
3956
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3957
|
+
width: 8,
|
|
3958
|
+
height: 8
|
|
3959
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3960
|
+
fill: "currentColor",
|
|
3961
|
+
fillRule: "evenodd",
|
|
3962
|
+
stroke: "currentColor",
|
|
3963
|
+
strokeWidth: 0.5,
|
|
3964
|
+
d: "M4 3.766 7.43.336l.234.234L4.234 4l3.43 3.43-.234.234L4 4.234.57 7.664.336 7.43 3.766 4 .336.57.57.336Zm0 0",
|
|
3965
|
+
clipRule: "evenodd"
|
|
3966
|
+
})));
|
|
3967
|
+
};
|
|
3968
|
+
var XMarkIcon = SvgXMark;
|
|
3863
3969
|
|
|
3864
3970
|
function SearchableSelect(props) {
|
|
3865
3971
|
const {
|
|
@@ -4546,7 +4652,7 @@ function Textfield(props) {
|
|
|
4546
4652
|
id: prefixId(id, formId),
|
|
4547
4653
|
label: label,
|
|
4548
4654
|
required: required
|
|
4549
|
-
}), jsxRuntime.jsx(
|
|
4655
|
+
}), jsxRuntime.jsx(TemplatedInputAdorner, {
|
|
4550
4656
|
disabled: disabled,
|
|
4551
4657
|
readonly: readonly,
|
|
4552
4658
|
pre: prefixAdorner,
|
|
@@ -4681,245 +4787,259 @@ Textarea.config = {
|
|
|
4681
4787
|
})
|
|
4682
4788
|
};
|
|
4683
4789
|
|
|
4790
|
+
var _path$b;
|
|
4684
4791
|
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
4685
|
-
var
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4792
|
+
var SvgButton = function SvgButton(props) {
|
|
4793
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
4794
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4795
|
+
width: 54,
|
|
4796
|
+
height: 54,
|
|
4797
|
+
fill: "currentcolor"
|
|
4798
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4799
|
+
fillRule: "evenodd",
|
|
4800
|
+
d: "M45 17a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V20a3 3 0 0 1 3-3h36zm-9 8.889H18v2.222h18v-2.222z"
|
|
4801
|
+
})));
|
|
4802
|
+
};
|
|
4803
|
+
var ButtonIcon = SvgButton;
|
|
4697
4804
|
|
|
4805
|
+
var _path$a;
|
|
4698
4806
|
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
4699
|
-
var
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
}
|
|
4708
|
-
|
|
4709
|
-
|
|
4807
|
+
var SvgCheckbox = function SvgCheckbox(props) {
|
|
4808
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
4809
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4810
|
+
width: 54,
|
|
4811
|
+
height: 54,
|
|
4812
|
+
fill: "currentcolor"
|
|
4813
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4814
|
+
d: "M34 18H20a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V20a2 2 0 0 0-2-2zm-9 14-5-5 1.41-1.41L25 29.17l7.59-7.59L34 23l-9 9z"
|
|
4815
|
+
})));
|
|
4816
|
+
};
|
|
4817
|
+
var CheckboxIcon = SvgCheckbox;
|
|
4710
4818
|
|
|
4819
|
+
var _g, _use, _use2, _use3, _defs;
|
|
4711
4820
|
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
4712
|
-
var
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
},
|
|
4722
|
-
|
|
4723
|
-
}, /*#__PURE__*/
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
})), /*#__PURE__*/
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4821
|
+
var SvgChecklist = function SvgChecklist(props) {
|
|
4822
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
4823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4824
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
4825
|
+
width: 54,
|
|
4826
|
+
height: 54,
|
|
4827
|
+
fill: "currentcolor"
|
|
4828
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
4829
|
+
fillRule: "evenodd"
|
|
4830
|
+
}, /*#__PURE__*/React__namespace.createElement("use", {
|
|
4831
|
+
xlinkHref: "#Checklist_svg__a"
|
|
4832
|
+
}), /*#__PURE__*/React__namespace.createElement("use", {
|
|
4833
|
+
xlinkHref: "#Checklist_svg__a",
|
|
4834
|
+
y: 24
|
|
4835
|
+
}), /*#__PURE__*/React__namespace.createElement("use", {
|
|
4836
|
+
xlinkHref: "#Checklist_svg__a",
|
|
4837
|
+
y: 12
|
|
4838
|
+
}))), _use || (_use = /*#__PURE__*/React__namespace.createElement("use", {
|
|
4839
|
+
xlinkHref: "#Checklist_svg__b"
|
|
4840
|
+
})), _use2 || (_use2 = /*#__PURE__*/React__namespace.createElement("use", {
|
|
4841
|
+
xlinkHref: "#Checklist_svg__b",
|
|
4842
|
+
y: 12
|
|
4843
|
+
})), _use3 || (_use3 = /*#__PURE__*/React__namespace.createElement("use", {
|
|
4844
|
+
xlinkHref: "#Checklist_svg__b",
|
|
4845
|
+
y: 24
|
|
4846
|
+
})), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
4847
|
+
id: "Checklist_svg__a",
|
|
4848
|
+
d: "M18 12h-6v6h6v-6zm-6-2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-6z"
|
|
4849
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
4850
|
+
id: "Checklist_svg__b",
|
|
4851
|
+
d: "M23 14.5a1 1 0 0 1 1-1h19a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H24a1 1 0 0 1-1-1v-1z"
|
|
4852
|
+
}))));
|
|
4853
|
+
};
|
|
4854
|
+
var ChecklistIcon = SvgChecklist;
|
|
4746
4855
|
|
|
4856
|
+
var _path$9, _path2$2, _path3;
|
|
4747
4857
|
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
4748
|
-
var
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
}), /*#__PURE__*/
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4858
|
+
var SvgDatetime = function SvgDatetime(props) {
|
|
4859
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
4860
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4861
|
+
width: 54,
|
|
4862
|
+
height: 54,
|
|
4863
|
+
fill: "currentcolor"
|
|
4864
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4865
|
+
fillRule: "evenodd",
|
|
4866
|
+
d: "M37.908 13.418h-5.004v-2.354h-1.766v2.354H21.13v-2.354h-1.766v2.354H14.36a2.07 2.07 0 0 0-2.06 2.06v23.549a2.07 2.07 0 0 0 2.06 2.06h6.77v-1.766h-6.358a.707.707 0 0 1-.706-.706V15.89c0-.39.316-.707.706-.707h4.592v2.355h1.766v-2.355h10.008v2.355h1.766v-2.355h4.592a.71.71 0 0 1 .707.707v6.358h1.765v-6.77c0-1.133-.927-2.06-2.06-2.06z"
|
|
4867
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4868
|
+
d: "m35.13 37.603 1.237-1.237-3.468-3.475v-5.926h-1.754v6.654l3.984 3.984Z"
|
|
4869
|
+
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4870
|
+
fillRule: "evenodd",
|
|
4871
|
+
d: "M23.08 36.962a9.678 9.678 0 1 0 17.883-7.408 9.678 9.678 0 0 0-17.882 7.408Zm4.54-10.292a7.924 7.924 0 1 1 8.805 13.177A7.924 7.924 0 0 1 27.62 26.67Z"
|
|
4872
|
+
})));
|
|
4873
|
+
};
|
|
4874
|
+
var DatetimeIcon = SvgDatetime;
|
|
4765
4875
|
|
|
4876
|
+
var _path$8, _path2$1;
|
|
4766
4877
|
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
4767
|
-
var
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
})
|
|
4779
|
-
|
|
4780
|
-
|
|
4878
|
+
var SvgTaglist = function SvgTaglist(props) {
|
|
4879
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
4880
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4881
|
+
width: 54,
|
|
4882
|
+
height: 54,
|
|
4883
|
+
fill: "currentcolor"
|
|
4884
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4885
|
+
fillRule: "evenodd",
|
|
4886
|
+
d: "M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3h36Zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1Z"
|
|
4887
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4888
|
+
d: "M11 22a1 1 0 0 1 1-1h19a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H12a1 1 0 0 1-1-1V22Z"
|
|
4889
|
+
})));
|
|
4890
|
+
};
|
|
4891
|
+
var TaglistIcon = SvgTaglist;
|
|
4781
4892
|
|
|
4893
|
+
var _rect, _rect2, _rect3;
|
|
4782
4894
|
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
4783
|
-
var
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4895
|
+
var SvgForm = function SvgForm(props) {
|
|
4896
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
4897
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4898
|
+
width: 54,
|
|
4899
|
+
height: 54
|
|
4900
|
+
}, props), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4901
|
+
width: 24,
|
|
4902
|
+
height: 4,
|
|
4903
|
+
x: 15,
|
|
4904
|
+
y: 17,
|
|
4905
|
+
rx: 1
|
|
4906
|
+
})), _rect2 || (_rect2 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4907
|
+
width: 24,
|
|
4908
|
+
height: 4,
|
|
4909
|
+
x: 15,
|
|
4910
|
+
y: 25,
|
|
4911
|
+
rx: 1
|
|
4912
|
+
})), _rect3 || (_rect3 = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4913
|
+
width: 13,
|
|
4914
|
+
height: 4,
|
|
4915
|
+
x: 15,
|
|
4916
|
+
y: 33,
|
|
4917
|
+
rx: 1
|
|
4918
|
+
})));
|
|
4919
|
+
};
|
|
4920
|
+
var FormIcon = SvgForm;
|
|
4809
4921
|
|
|
4922
|
+
var _path$7;
|
|
4810
4923
|
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
4811
|
-
var
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4924
|
+
var SvgGroup = function SvgGroup(props) {
|
|
4925
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
4926
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4927
|
+
width: 54,
|
|
4928
|
+
height: 54
|
|
4929
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4930
|
+
fillRule: "evenodd",
|
|
4931
|
+
d: "M8 33v5a1 1 0 0 0 1 1h4v2H9a3 3 0 0 1-3-3v-5h2Zm18 6v2H15v-2h11Zm13 0v2H28v-2h11Zm9-6v5a3 3 0 0 1-3 3h-4v-2h4a1 1 0 0 0 .993-.883L46 38v-5h2ZM8 22v9H6v-9h2Zm40 0v9h-2v-9h2Zm-35-9v2H9a1 1 0 0 0-.993.883L8 16v4H6v-4a3 3 0 0 1 3-3h4Zm32 0a3 3 0 0 1 3 3v4h-2v-4a1 1 0 0 0-.883-.993L45 15h-4v-2h4Zm-6 0v2H28v-2h11Zm-13 0v2H15v-2h11Z"
|
|
4932
|
+
})));
|
|
4933
|
+
};
|
|
4934
|
+
var ColumnsIcon = SvgGroup;
|
|
4822
4935
|
|
|
4936
|
+
var _path$6;
|
|
4823
4937
|
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
4824
|
-
var
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4938
|
+
var SvgNumber = function SvgNumber(props) {
|
|
4939
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
4940
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4941
|
+
width: 54,
|
|
4942
|
+
height: 54,
|
|
4943
|
+
fill: "currentcolor"
|
|
4944
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4945
|
+
fillRule: "evenodd",
|
|
4946
|
+
d: "M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3h36zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1zM35 28.444h7l-3.5 4-3.5-4zM35 26h7l-3.5-4-3.5 4z"
|
|
4947
|
+
})));
|
|
4948
|
+
};
|
|
4949
|
+
var NumberIcon = SvgNumber;
|
|
4836
4950
|
|
|
4951
|
+
var _path$5;
|
|
4837
4952
|
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
4838
|
-
var
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
}
|
|
4847
|
-
|
|
4848
|
-
|
|
4953
|
+
var SvgRadio = function SvgRadio(props) {
|
|
4954
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
4955
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4956
|
+
width: 54,
|
|
4957
|
+
height: 54,
|
|
4958
|
+
fill: "currentcolor"
|
|
4959
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4960
|
+
d: "M27 22c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0 18a8 8 0 1 1 0-16 8 8 0 1 1 0 16z"
|
|
4961
|
+
})));
|
|
4962
|
+
};
|
|
4963
|
+
var RadioIcon = SvgRadio;
|
|
4849
4964
|
|
|
4965
|
+
var _path$4;
|
|
4850
4966
|
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
4851
|
-
var
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4967
|
+
var SvgSelect = function SvgSelect(props) {
|
|
4968
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
4969
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4970
|
+
width: 54,
|
|
4971
|
+
height: 54,
|
|
4972
|
+
fill: "currentcolor"
|
|
4973
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4974
|
+
fillRule: "evenodd",
|
|
4975
|
+
d: "M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3h36zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1zm-12 7h9l-4.5 6-4.5-6z"
|
|
4976
|
+
})));
|
|
4977
|
+
};
|
|
4978
|
+
var SelectIcon = SvgSelect;
|
|
4863
4979
|
|
|
4980
|
+
var _path$3;
|
|
4864
4981
|
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
4865
|
-
var
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
}
|
|
4874
|
-
|
|
4875
|
-
|
|
4982
|
+
var SvgText = function SvgText(props) {
|
|
4983
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
4984
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4985
|
+
width: 54,
|
|
4986
|
+
height: 54,
|
|
4987
|
+
fill: "currentcolor"
|
|
4988
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4989
|
+
d: "M20.58 33.77h-3l-1.18-3.08H11l-1.1 3.08H7l5.27-13.54h2.89zm-5-5.36-1.86-5-1.83 5zM22 20.23h5.41a15.47 15.47 0 0 1 2.4.14 3.42 3.42 0 0 1 1.41.55 3.47 3.47 0 0 1 1 1.14 3 3 0 0 1 .42 1.58 3.26 3.26 0 0 1-1.91 2.94 3.63 3.63 0 0 1 1.91 1.22 3.28 3.28 0 0 1 .66 2 4 4 0 0 1-.43 1.8 3.63 3.63 0 0 1-1.09 1.4 3.89 3.89 0 0 1-1.83.65q-.69.07-3.3.09H22zm2.73 2.25v3.13h3.8a1.79 1.79 0 0 0 1.1-.49 1.41 1.41 0 0 0 .41-1 1.49 1.49 0 0 0-.35-1 1.54 1.54 0 0 0-1-.48c-.27 0-1.05-.05-2.34-.05zm0 5.39v3.62h2.57a11.52 11.52 0 0 0 1.88-.09 1.65 1.65 0 0 0 1-.54 1.6 1.6 0 0 0 .38-1.14 1.75 1.75 0 0 0-.29-1 1.69 1.69 0 0 0-.86-.62 9.28 9.28 0 0 0-2.41-.23zm19.62.92 2.65.84a5.94 5.94 0 0 1-2 3.29A5.74 5.74 0 0 1 41.38 34a5.87 5.87 0 0 1-4.44-1.84 7.09 7.09 0 0 1-1.73-5A7.43 7.43 0 0 1 37 21.87 6 6 0 0 1 41.54 20a5.64 5.64 0 0 1 4 1.47A5.33 5.33 0 0 1 47 24l-2.7.65a2.8 2.8 0 0 0-2.86-2.27A3.09 3.09 0 0 0 39 23.42a5.31 5.31 0 0 0-.93 3.5 5.62 5.62 0 0 0 .93 3.65 3 3 0 0 0 2.4 1.09 2.72 2.72 0 0 0 1.82-.66 4 4 0 0 0 1.13-2.21z"
|
|
4990
|
+
})));
|
|
4991
|
+
};
|
|
4992
|
+
var TextIcon = SvgText;
|
|
4876
4993
|
|
|
4994
|
+
var _path$2;
|
|
4877
4995
|
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
4878
|
-
var
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4996
|
+
var SvgTextfield = function SvgTextfield(props) {
|
|
4997
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
4998
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4999
|
+
width: 54,
|
|
5000
|
+
height: 54,
|
|
5001
|
+
fill: "currentcolor"
|
|
5002
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
5003
|
+
fillRule: "evenodd",
|
|
5004
|
+
d: "M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3h36zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1zm-32 4v10h-2V22h2z"
|
|
5005
|
+
})));
|
|
5006
|
+
};
|
|
5007
|
+
var TextfieldIcon = SvgTextfield;
|
|
4890
5008
|
|
|
5009
|
+
var _path$1;
|
|
4891
5010
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
4892
|
-
var
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
5011
|
+
var SvgTextarea = function SvgTextarea(props) {
|
|
5012
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
5013
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5014
|
+
width: 54,
|
|
5015
|
+
height: 54,
|
|
5016
|
+
fill: "currentcolor"
|
|
5017
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
5018
|
+
fillRule: "evenodd",
|
|
5019
|
+
d: "M45 13a3 3 0 0 1 3 3v22a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V16a3 3 0 0 1 3-3h36zm0 2H9a1 1 0 0 0-1 1v22a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V16a1 1 0 0 0-1-1zm-1.136 15.5.849.849-6.364 6.364-.849-.849 6.364-6.364zm.264 3.5.849.849-2.828 2.828-.849-.849L44.128 34zM13 19v10h-2V19h2z"
|
|
5020
|
+
})));
|
|
5021
|
+
};
|
|
5022
|
+
var TextareaIcon = SvgTextarea;
|
|
4904
5023
|
|
|
5024
|
+
var _path, _path2;
|
|
4905
5025
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4906
|
-
var
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
5026
|
+
var SvgImage = function SvgImage(props) {
|
|
5027
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
5028
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5029
|
+
width: 54,
|
|
5030
|
+
height: 54,
|
|
5031
|
+
fill: "currentcolor"
|
|
5032
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
5033
|
+
fillRule: "evenodd",
|
|
5034
|
+
d: "M34.636 21.91A3.818 3.818 0 1 1 27 21.908a3.818 3.818 0 0 1 7.636 0Zm-2 0A1.818 1.818 0 1 1 29 21.908a1.818 1.818 0 0 1 3.636 0Z",
|
|
5035
|
+
clipRule: "evenodd"
|
|
5036
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
5037
|
+
fillRule: "evenodd",
|
|
5038
|
+
d: "M15 13a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V15a2 2 0 0 0-2-2H15Zm24 2H15v12.45l4.71-4.709a1.91 1.91 0 0 1 2.702 0l6.695 6.695 2.656-1.77a1.91 1.91 0 0 1 2.411.239L39 32.73V15ZM15 39v-8.754a.975.975 0 0 0 .168-.135l5.893-5.893 6.684 6.685a1.911 1.911 0 0 0 2.41.238l2.657-1.77 6.02 6.02c.052.051.108.097.168.135V39H15Z",
|
|
5039
|
+
clipRule: "evenodd"
|
|
5040
|
+
})));
|
|
5041
|
+
};
|
|
5042
|
+
var ImageIcon = SvgImage;
|
|
4923
5043
|
|
|
4924
5044
|
const iconsByType = type => {
|
|
4925
5045
|
return {
|