@bpmn-io/form-js-viewer 1.0.0-alpha.9 → 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.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Ids from 'ids';
|
|
2
|
-
import { isString, isArray, isFunction, isNumber, bind, assign, isNil,
|
|
2
|
+
import { isString, isArray, isFunction, isNumber, bind, assign, isNil, get, set, groupBy, flatten, isUndefined, findIndex, isObject } from 'min-dash';
|
|
3
3
|
import { parseExpressions, parseUnaryTests, evaluate, unaryTest } from 'feelin';
|
|
4
4
|
import { evaluate as evaluate$1, parser, buildSimpleTree } from 'feelers';
|
|
5
5
|
import showdown from 'showdown';
|
|
@@ -8,7 +8,8 @@ import classNames from 'classnames';
|
|
|
8
8
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'preact/jsx-runtime';
|
|
9
9
|
import { useContext, useMemo, useEffect, useState, useRef, useCallback } from 'preact/hooks';
|
|
10
10
|
import { createContext, createElement, Fragment, render } from 'preact';
|
|
11
|
-
import
|
|
11
|
+
import * as React from 'preact/compat';
|
|
12
|
+
import { createPortal } from 'preact/compat';
|
|
12
13
|
import flatpickr from 'flatpickr';
|
|
13
14
|
import Markup from 'preact-markup';
|
|
14
15
|
import { Injector } from 'didi';
|
|
@@ -42,26 +43,26 @@ const getFlavouredFeelVariableNames = (feelString, feelFlavour, options = {}) =>
|
|
|
42
43
|
}(simpleExpressionTree);
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
/**
|
|
46
|
-
* Get the variable name at the specified index in a given path expression.
|
|
47
|
-
*
|
|
48
|
-
* @param {Object} root - The root node of the path expression tree.
|
|
49
|
-
* @param {number} index - The index of the variable name to retrieve.
|
|
50
|
-
* @returns {string|null} The variable name at the specified index or null if index is out of bounds.
|
|
46
|
+
/**
|
|
47
|
+
* Get the variable name at the specified index in a given path expression.
|
|
48
|
+
*
|
|
49
|
+
* @param {Object} root - The root node of the path expression tree.
|
|
50
|
+
* @param {number} index - The index of the variable name to retrieve.
|
|
51
|
+
* @returns {string|null} The variable name at the specified index or null if index is out of bounds.
|
|
51
52
|
*/
|
|
52
53
|
const _getVariableNameAtPathIndex = (root, index) => {
|
|
53
54
|
const accessors = _deconstructPathExpression(root);
|
|
54
55
|
return accessors[index] || null;
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
/**
|
|
58
|
-
* Extracts the variables which are required of the external context for a given path expression.
|
|
59
|
-
* This is done by traversing the path expression tree and keeping track of the current depth relative to the external context.
|
|
60
|
-
*
|
|
61
|
-
* @param {Object} node - The root node of the path expression tree.
|
|
62
|
-
* @param {number} initialDepth - The depth at which the root node is located in the outer context.
|
|
63
|
-
* @param {Object} specialDepthAccessors - Definitions of special keywords which represent more complex accesses of the outer context.
|
|
64
|
-
* @returns {Set} - A set containing the extracted variable names.
|
|
58
|
+
/**
|
|
59
|
+
* Extracts the variables which are required of the external context for a given path expression.
|
|
60
|
+
* This is done by traversing the path expression tree and keeping track of the current depth relative to the external context.
|
|
61
|
+
*
|
|
62
|
+
* @param {Object} node - The root node of the path expression tree.
|
|
63
|
+
* @param {number} initialDepth - The depth at which the root node is located in the outer context.
|
|
64
|
+
* @param {Object} specialDepthAccessors - Definitions of special keywords which represent more complex accesses of the outer context.
|
|
65
|
+
* @returns {Set} - A set containing the extracted variable names.
|
|
65
66
|
*/
|
|
66
67
|
const _smartExtractVariableNames = (node, initialDepth, specialDepthAccessors) => {
|
|
67
68
|
// depth info represents the previous (initialised as null) and current depth of the current accessor in the path expression
|
|
@@ -107,11 +108,11 @@ const _smartExtractVariableNames = (node, initialDepth, specialDepthAccessors) =
|
|
|
107
108
|
return new Set(extractedVariables);
|
|
108
109
|
};
|
|
109
110
|
|
|
110
|
-
/**
|
|
111
|
-
* Deconstructs a path expression tree into an array of components.
|
|
112
|
-
*
|
|
113
|
-
* @param {Object} root - The root node of the path expression tree.
|
|
114
|
-
* @returns {Array<string>} An array of components in the path expression, in the correct order.
|
|
111
|
+
/**
|
|
112
|
+
* Deconstructs a path expression tree into an array of components.
|
|
113
|
+
*
|
|
114
|
+
* @param {Object} root - The root node of the path expression tree.
|
|
115
|
+
* @returns {Array<string>} An array of components in the path expression, in the correct order.
|
|
115
116
|
*/
|
|
116
117
|
const _deconstructPathExpression = root => {
|
|
117
118
|
let node = root;
|
|
@@ -130,13 +131,13 @@ const _deconstructPathExpression = root => {
|
|
|
130
131
|
return parts.reverse();
|
|
131
132
|
};
|
|
132
133
|
|
|
133
|
-
/**
|
|
134
|
-
* Builds a simplified feel structure tree from the given parse tree and feel string.
|
|
135
|
-
* The nodes follow this structure: `{ name: string, children: Array, variableName?: string }`
|
|
136
|
-
*
|
|
137
|
-
* @param {Object} parseTree - The parse tree generated by a parser.
|
|
138
|
-
* @param {string} feelString - The feel string used for parsing.
|
|
139
|
-
* @returns {Object} The simplified feel structure tree.
|
|
134
|
+
/**
|
|
135
|
+
* Builds a simplified feel structure tree from the given parse tree and feel string.
|
|
136
|
+
* The nodes follow this structure: `{ name: string, children: Array, variableName?: string }`
|
|
137
|
+
*
|
|
138
|
+
* @param {Object} parseTree - The parse tree generated by a parser.
|
|
139
|
+
* @param {string} feelString - The feel string used for parsing.
|
|
140
|
+
* @returns {Object} The simplified feel structure tree.
|
|
140
141
|
*/
|
|
141
142
|
const _buildSimpleFeelStructureTree = (parseTree, feelString) => {
|
|
142
143
|
const stack = [{
|
|
@@ -167,25 +168,25 @@ class FeelExpressionLanguage {
|
|
|
167
168
|
this._eventBus = eventBus;
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
/**
|
|
171
|
-
* Determines if the given value is a FEEL expression.
|
|
172
|
-
*
|
|
173
|
-
* @param {any} value
|
|
174
|
-
* @returns {boolean}
|
|
175
|
-
*
|
|
171
|
+
/**
|
|
172
|
+
* Determines if the given value is a FEEL expression.
|
|
173
|
+
*
|
|
174
|
+
* @param {any} value
|
|
175
|
+
* @returns {boolean}
|
|
176
|
+
*
|
|
176
177
|
*/
|
|
177
178
|
isExpression(value) {
|
|
178
179
|
return isString(value) && value.startsWith('=');
|
|
179
180
|
}
|
|
180
181
|
|
|
181
|
-
/**
|
|
182
|
-
* Retrieve variable names from a given FEEL expression.
|
|
183
|
-
*
|
|
184
|
-
* @param {string} expression
|
|
185
|
-
* @param {object} [options]
|
|
186
|
-
* @param {string} [options.type]
|
|
187
|
-
*
|
|
188
|
-
* @returns {string[]}
|
|
182
|
+
/**
|
|
183
|
+
* Retrieve variable names from a given FEEL expression.
|
|
184
|
+
*
|
|
185
|
+
* @param {string} expression
|
|
186
|
+
* @param {object} [options]
|
|
187
|
+
* @param {string} [options.type]
|
|
188
|
+
*
|
|
189
|
+
* @returns {string[]}
|
|
189
190
|
*/
|
|
190
191
|
getVariableNames(expression, options = {}) {
|
|
191
192
|
const {
|
|
@@ -200,13 +201,13 @@ class FeelExpressionLanguage {
|
|
|
200
201
|
return getFlavouredFeelVariableNames(expression, type);
|
|
201
202
|
}
|
|
202
203
|
|
|
203
|
-
/**
|
|
204
|
-
* Evaluate an expression.
|
|
205
|
-
*
|
|
206
|
-
* @param {string} expression
|
|
207
|
-
* @param {import('../../types').Data} [data]
|
|
208
|
-
*
|
|
209
|
-
* @returns {any}
|
|
204
|
+
/**
|
|
205
|
+
* Evaluate an expression.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} expression
|
|
208
|
+
* @param {import('../../types').Data} [data]
|
|
209
|
+
*
|
|
210
|
+
* @returns {any}
|
|
210
211
|
*/
|
|
211
212
|
evaluate(expression, data = {}) {
|
|
212
213
|
if (!expression) {
|
|
@@ -231,23 +232,23 @@ FeelExpressionLanguage.$inject = ['eventBus'];
|
|
|
231
232
|
class FeelersTemplating {
|
|
232
233
|
constructor() {}
|
|
233
234
|
|
|
234
|
-
/**
|
|
235
|
-
* Determines if the given value is a feelers template.
|
|
236
|
-
*
|
|
237
|
-
* @param {any} value
|
|
238
|
-
* @returns {boolean}
|
|
239
|
-
*
|
|
235
|
+
/**
|
|
236
|
+
* Determines if the given value is a feelers template.
|
|
237
|
+
*
|
|
238
|
+
* @param {any} value
|
|
239
|
+
* @returns {boolean}
|
|
240
|
+
*
|
|
240
241
|
*/
|
|
241
242
|
isTemplate(value) {
|
|
242
243
|
return isString(value) && (value.startsWith('=') || /{{.*?}}/.test(value));
|
|
243
244
|
}
|
|
244
245
|
|
|
245
|
-
/**
|
|
246
|
-
* Retrieve variable names from a given feelers template.
|
|
247
|
-
*
|
|
248
|
-
* @param {string} template
|
|
249
|
-
*
|
|
250
|
-
* @returns {string[]}
|
|
246
|
+
/**
|
|
247
|
+
* Retrieve variable names from a given feelers template.
|
|
248
|
+
*
|
|
249
|
+
* @param {string} template
|
|
250
|
+
*
|
|
251
|
+
* @returns {string[]}
|
|
251
252
|
*/
|
|
252
253
|
getVariableNames(template) {
|
|
253
254
|
if (!this.isTemplate(template)) {
|
|
@@ -273,17 +274,17 @@ class FeelersTemplating {
|
|
|
273
274
|
}, []);
|
|
274
275
|
}
|
|
275
276
|
|
|
276
|
-
/**
|
|
277
|
-
* Evaluate a template.
|
|
278
|
-
*
|
|
279
|
-
* @param {string} template
|
|
280
|
-
* @param {Object<string, any>} context
|
|
281
|
-
* @param {Object} options
|
|
282
|
-
* @param {boolean} [options.debug = false]
|
|
283
|
-
* @param {boolean} [options.strict = false]
|
|
284
|
-
* @param {Function} [options.buildDebugString]
|
|
285
|
-
*
|
|
286
|
-
* @returns
|
|
277
|
+
/**
|
|
278
|
+
* Evaluate a template.
|
|
279
|
+
*
|
|
280
|
+
* @param {string} template
|
|
281
|
+
* @param {Object<string, any>} context
|
|
282
|
+
* @param {Object} options
|
|
283
|
+
* @param {boolean} [options.debug = false]
|
|
284
|
+
* @param {boolean} [options.strict = false]
|
|
285
|
+
* @param {Function} [options.buildDebugString]
|
|
286
|
+
*
|
|
287
|
+
* @returns
|
|
287
288
|
*/
|
|
288
289
|
evaluate(template, context = {}, options = {}) {
|
|
289
290
|
const {
|
|
@@ -298,22 +299,22 @@ class FeelersTemplating {
|
|
|
298
299
|
});
|
|
299
300
|
}
|
|
300
301
|
|
|
301
|
-
/**
|
|
302
|
-
* @typedef {Object} ExpressionWithDepth
|
|
303
|
-
* @property {number} depth - The depth of the expression in the syntax tree.
|
|
304
|
-
* @property {string} expression - The extracted expression
|
|
302
|
+
/**
|
|
303
|
+
* @typedef {Object} ExpressionWithDepth
|
|
304
|
+
* @property {number} depth - The depth of the expression in the syntax tree.
|
|
305
|
+
* @property {string} expression - The extracted expression
|
|
305
306
|
*/
|
|
306
307
|
|
|
307
|
-
/**
|
|
308
|
-
* Extracts all feel expressions in the template along with their depth in the syntax tree.
|
|
309
|
-
* The depth is incremented for child expressions of loops to account for context drilling.
|
|
310
|
-
|
|
311
|
-
* @param {string} template - A feelers template string.
|
|
312
|
-
* @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
|
|
313
|
-
*
|
|
314
|
-
* @example
|
|
315
|
-
* const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
|
|
316
|
-
* const extractedExpressions = _extractExpressionsWithDepth(template);
|
|
308
|
+
/**
|
|
309
|
+
* Extracts all feel expressions in the template along with their depth in the syntax tree.
|
|
310
|
+
* The depth is incremented for child expressions of loops to account for context drilling.
|
|
311
|
+
* @name extractExpressionsWithDepth
|
|
312
|
+
* @param {string} template - A feelers template string.
|
|
313
|
+
* @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
|
|
317
|
+
* const extractedExpressions = _extractExpressionsWithDepth(template);
|
|
317
318
|
*/
|
|
318
319
|
_extractExpressionsWithDepth(template) {
|
|
319
320
|
// build simplified feelers syntax tree
|
|
@@ -344,9 +345,9 @@ class FeelersTemplating {
|
|
|
344
345
|
}
|
|
345
346
|
FeelersTemplating.$inject = [];
|
|
346
347
|
|
|
347
|
-
/**
|
|
348
|
-
* @typedef {object} Condition
|
|
349
|
-
* @property {string} [hide]
|
|
348
|
+
/**
|
|
349
|
+
* @typedef {object} Condition
|
|
350
|
+
* @property {string} [hide]
|
|
350
351
|
*/
|
|
351
352
|
|
|
352
353
|
class ConditionChecker {
|
|
@@ -355,11 +356,11 @@ class ConditionChecker {
|
|
|
355
356
|
this._eventBus = eventBus;
|
|
356
357
|
}
|
|
357
358
|
|
|
358
|
-
/**
|
|
359
|
-
* For given data, remove properties based on condition.
|
|
360
|
-
*
|
|
361
|
-
* @param {Object<string, any>} properties
|
|
362
|
-
* @param {Object<string, any>} data
|
|
359
|
+
/**
|
|
360
|
+
* For given data, remove properties based on condition.
|
|
361
|
+
*
|
|
362
|
+
* @param {Object<string, any>} properties
|
|
363
|
+
* @param {Object<string, any>} data
|
|
363
364
|
*/
|
|
364
365
|
applyConditions(properties, data = {}) {
|
|
365
366
|
const conditions = this._getConditions();
|
|
@@ -378,13 +379,13 @@ class ConditionChecker {
|
|
|
378
379
|
return newProperties;
|
|
379
380
|
}
|
|
380
381
|
|
|
381
|
-
/**
|
|
382
|
-
* Check if given condition is met. Returns null for invalid/missing conditions.
|
|
383
|
-
*
|
|
384
|
-
* @param {string} condition
|
|
385
|
-
* @param {import('../../types').Data} [data]
|
|
386
|
-
*
|
|
387
|
-
* @returns {boolean|null}
|
|
382
|
+
/**
|
|
383
|
+
* Check if given condition is met. Returns null for invalid/missing conditions.
|
|
384
|
+
*
|
|
385
|
+
* @param {string} condition
|
|
386
|
+
* @param {import('../../types').Data} [data]
|
|
387
|
+
*
|
|
388
|
+
* @returns {boolean|null}
|
|
388
389
|
*/
|
|
389
390
|
check(condition, data = {}) {
|
|
390
391
|
if (!condition) {
|
|
@@ -405,12 +406,12 @@ class ConditionChecker {
|
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
408
|
|
|
408
|
-
/**
|
|
409
|
-
* Check if hide condition is met.
|
|
410
|
-
*
|
|
411
|
-
* @param {Condition} condition
|
|
412
|
-
* @param {Object<string, any>} data
|
|
413
|
-
* @returns {boolean}
|
|
409
|
+
/**
|
|
410
|
+
* Check if hide condition is met.
|
|
411
|
+
*
|
|
412
|
+
* @param {Condition} condition
|
|
413
|
+
* @param {Object<string, any>} data
|
|
414
|
+
* @returns {boolean}
|
|
414
415
|
*/
|
|
415
416
|
_checkHideCondition(condition, data) {
|
|
416
417
|
if (!condition.hide) {
|
|
@@ -452,12 +453,12 @@ class MarkdownRenderer {
|
|
|
452
453
|
this._converter = new showdown.Converter();
|
|
453
454
|
}
|
|
454
455
|
|
|
455
|
-
/**
|
|
456
|
-
* Render markdown to HTML.
|
|
457
|
-
*
|
|
458
|
-
* @param {string} markdown - The markdown to render
|
|
459
|
-
*
|
|
460
|
-
* @returns {string} HTML
|
|
456
|
+
/**
|
|
457
|
+
* Render markdown to HTML.
|
|
458
|
+
*
|
|
459
|
+
* @param {string} markdown - The markdown to render
|
|
460
|
+
*
|
|
461
|
+
* @returns {string} HTML
|
|
461
462
|
*/
|
|
462
463
|
render(markdown) {
|
|
463
464
|
return this._converter.makeHtml(markdown);
|
|
@@ -997,7 +998,13 @@ function isNullEquivalentValue(value) {
|
|
|
997
998
|
|
|
998
999
|
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])?)*$/;
|
|
999
1000
|
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}$/;
|
|
1001
|
+
const VALIDATE_FEEL_PROPERTIES = ['min', 'max', 'minLength', 'maxLength'];
|
|
1000
1002
|
class Validator {
|
|
1003
|
+
constructor(expressionLanguage, conditionChecker, form) {
|
|
1004
|
+
this._expressionLanguage = expressionLanguage;
|
|
1005
|
+
this._conditionChecker = conditionChecker;
|
|
1006
|
+
this._form = form;
|
|
1007
|
+
}
|
|
1001
1008
|
validateField(field, value) {
|
|
1002
1009
|
const {
|
|
1003
1010
|
type,
|
|
@@ -1030,10 +1037,11 @@ class Validator {
|
|
|
1030
1037
|
if (!validate) {
|
|
1031
1038
|
return errors;
|
|
1032
1039
|
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1040
|
+
const evaluatedValidation = evaluateFEELValues(validate, this._expressionLanguage, this._conditionChecker, this._form);
|
|
1041
|
+
if (evaluatedValidation.pattern && value && !new RegExp(evaluatedValidation.pattern).test(value)) {
|
|
1042
|
+
errors = [...errors, `Field must match pattern ${evaluatedValidation.pattern}.`];
|
|
1035
1043
|
}
|
|
1036
|
-
if (
|
|
1044
|
+
if (evaluatedValidation.required) {
|
|
1037
1045
|
const isUncheckedCheckbox = type === 'checkbox' && value === false;
|
|
1038
1046
|
const isUnsetValue = isNil(value) || value === '';
|
|
1039
1047
|
const isEmptyMultiselect = Array.isArray(value) && value.length === 0;
|
|
@@ -1041,28 +1049,64 @@ class Validator {
|
|
|
1041
1049
|
errors = [...errors, 'Field is required.'];
|
|
1042
1050
|
}
|
|
1043
1051
|
}
|
|
1044
|
-
if ('min' in
|
|
1045
|
-
errors = [...errors, `Field must have minimum value of ${
|
|
1052
|
+
if ('min' in evaluatedValidation && (value || value === 0) && value < evaluatedValidation.min) {
|
|
1053
|
+
errors = [...errors, `Field must have minimum value of ${evaluatedValidation.min}.`];
|
|
1046
1054
|
}
|
|
1047
|
-
if ('max' in
|
|
1048
|
-
errors = [...errors, `Field must have maximum value of ${
|
|
1055
|
+
if ('max' in evaluatedValidation && (value || value === 0) && value > evaluatedValidation.max) {
|
|
1056
|
+
errors = [...errors, `Field must have maximum value of ${evaluatedValidation.max}.`];
|
|
1049
1057
|
}
|
|
1050
|
-
if ('minLength' in
|
|
1051
|
-
errors = [...errors, `Field must have minimum length of ${
|
|
1058
|
+
if ('minLength' in evaluatedValidation && value && value.trim().length < evaluatedValidation.minLength) {
|
|
1059
|
+
errors = [...errors, `Field must have minimum length of ${evaluatedValidation.minLength}.`];
|
|
1052
1060
|
}
|
|
1053
|
-
if ('maxLength' in
|
|
1054
|
-
errors = [...errors, `Field must have maximum length of ${
|
|
1061
|
+
if ('maxLength' in evaluatedValidation && value && value.trim().length > evaluatedValidation.maxLength) {
|
|
1062
|
+
errors = [...errors, `Field must have maximum length of ${evaluatedValidation.maxLength}.`];
|
|
1055
1063
|
}
|
|
1056
|
-
if ('validationType' in
|
|
1064
|
+
if ('validationType' in evaluatedValidation && value && evaluatedValidation.validationType === 'phone' && !PHONE_PATTERN.test(value)) {
|
|
1057
1065
|
errors = [...errors, 'Field must be a valid international phone number. (e.g. +4930664040900)'];
|
|
1058
1066
|
}
|
|
1059
|
-
if ('validationType' in
|
|
1067
|
+
if ('validationType' in evaluatedValidation && value && evaluatedValidation.validationType === 'email' && !EMAIL_PATTERN.test(value)) {
|
|
1060
1068
|
errors = [...errors, 'Field must be a valid email.'];
|
|
1061
1069
|
}
|
|
1062
1070
|
return errors;
|
|
1063
1071
|
}
|
|
1064
1072
|
}
|
|
1065
|
-
Validator.$inject = [];
|
|
1073
|
+
Validator.$inject = ['expressionLanguage', 'conditionChecker', 'form'];
|
|
1074
|
+
|
|
1075
|
+
// helpers //////////
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Helper function to evaluate optional FEEL validation values.
|
|
1079
|
+
*/
|
|
1080
|
+
function evaluateFEELValues(validate, expressionLanguage, conditionChecker, form) {
|
|
1081
|
+
const evaluatedValidate = {
|
|
1082
|
+
...validate
|
|
1083
|
+
};
|
|
1084
|
+
VALIDATE_FEEL_PROPERTIES.forEach(property => {
|
|
1085
|
+
const path = property.split('.');
|
|
1086
|
+
const value = get(evaluatedValidate, path);
|
|
1087
|
+
|
|
1088
|
+
// mirroring FEEL evaluation of our hooks
|
|
1089
|
+
if (!expressionLanguage || !expressionLanguage.isExpression(value)) {
|
|
1090
|
+
return value;
|
|
1091
|
+
}
|
|
1092
|
+
const {
|
|
1093
|
+
initialData,
|
|
1094
|
+
data
|
|
1095
|
+
} = form._getState();
|
|
1096
|
+
const newData = conditionChecker ? conditionChecker.applyConditions(data, data) : data;
|
|
1097
|
+
const filteredData = {
|
|
1098
|
+
...initialData,
|
|
1099
|
+
...newData
|
|
1100
|
+
};
|
|
1101
|
+
const evaluatedValue = expressionLanguage.evaluate(value, filteredData);
|
|
1102
|
+
|
|
1103
|
+
// replace validate property with evaluated value
|
|
1104
|
+
if (evaluatedValue) {
|
|
1105
|
+
set(evaluatedValidate, path, evaluatedValue);
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
return evaluatedValidate;
|
|
1109
|
+
}
|
|
1066
1110
|
|
|
1067
1111
|
class FormFieldRegistry {
|
|
1068
1112
|
constructor(eventBus) {
|
|
@@ -1113,23 +1157,23 @@ class FormFieldRegistry {
|
|
|
1113
1157
|
}
|
|
1114
1158
|
FormFieldRegistry.$inject = ['eventBus'];
|
|
1115
1159
|
|
|
1116
|
-
/**
|
|
1117
|
-
* @typedef { { id: String, components: Array<String> } } FormRow
|
|
1118
|
-
* @typedef { { formFieldId: String, rows: Array<FormRow> } } FormRows
|
|
1160
|
+
/**
|
|
1161
|
+
* @typedef { { id: String, components: Array<String> } } FormRow
|
|
1162
|
+
* @typedef { { formFieldId: String, rows: Array<FormRow> } } FormRows
|
|
1119
1163
|
*/
|
|
1120
1164
|
|
|
1121
|
-
/**
|
|
1122
|
-
* Maintains the Form layout in a given structure, for example
|
|
1123
|
-
*
|
|
1124
|
-
* [
|
|
1125
|
-
* {
|
|
1126
|
-
* formFieldId: 'FormField_1',
|
|
1127
|
-
* rows: [
|
|
1128
|
-
* { id: 'Row_1', components: [ 'Text_1', 'Textdield_1', ... ] }
|
|
1129
|
-
* ]
|
|
1130
|
-
* }
|
|
1131
|
-
* ]
|
|
1132
|
-
*
|
|
1165
|
+
/**
|
|
1166
|
+
* Maintains the Form layout in a given structure, for example
|
|
1167
|
+
*
|
|
1168
|
+
* [
|
|
1169
|
+
* {
|
|
1170
|
+
* formFieldId: 'FormField_1',
|
|
1171
|
+
* rows: [
|
|
1172
|
+
* { id: 'Row_1', components: [ 'Text_1', 'Textdield_1', ... ] }
|
|
1173
|
+
* ]
|
|
1174
|
+
* }
|
|
1175
|
+
* ]
|
|
1176
|
+
*
|
|
1133
1177
|
*/
|
|
1134
1178
|
class FormLayouter {
|
|
1135
1179
|
constructor(eventBus) {
|
|
@@ -1139,8 +1183,8 @@ class FormLayouter {
|
|
|
1139
1183
|
this._eventBus = eventBus;
|
|
1140
1184
|
}
|
|
1141
1185
|
|
|
1142
|
-
/**
|
|
1143
|
-
* @param {FormRow} row
|
|
1186
|
+
/**
|
|
1187
|
+
* @param {FormRow} row
|
|
1144
1188
|
*/
|
|
1145
1189
|
addRow(formFieldId, row) {
|
|
1146
1190
|
let rowsPerComponent = this._rows.find(r => r.formFieldId === formFieldId);
|
|
@@ -1154,18 +1198,18 @@ class FormLayouter {
|
|
|
1154
1198
|
rowsPerComponent.rows.push(row);
|
|
1155
1199
|
}
|
|
1156
1200
|
|
|
1157
|
-
/**
|
|
1158
|
-
* @param {String} id
|
|
1159
|
-
* @returns {FormRow}
|
|
1201
|
+
/**
|
|
1202
|
+
* @param {String} id
|
|
1203
|
+
* @returns {FormRow}
|
|
1160
1204
|
*/
|
|
1161
1205
|
getRow(id) {
|
|
1162
1206
|
const rows = allRows(this._rows);
|
|
1163
1207
|
return rows.find(r => r.id === id);
|
|
1164
1208
|
}
|
|
1165
1209
|
|
|
1166
|
-
/**
|
|
1167
|
-
* @param {any} formField
|
|
1168
|
-
* @returns {FormRow}
|
|
1210
|
+
/**
|
|
1211
|
+
* @param {any} formField
|
|
1212
|
+
* @returns {FormRow}
|
|
1169
1213
|
*/
|
|
1170
1214
|
getRowForField(formField) {
|
|
1171
1215
|
return allRows(this._rows).find(r => {
|
|
@@ -1176,9 +1220,9 @@ class FormLayouter {
|
|
|
1176
1220
|
});
|
|
1177
1221
|
}
|
|
1178
1222
|
|
|
1179
|
-
/**
|
|
1180
|
-
* @param {String} formFieldId
|
|
1181
|
-
* @returns { Array<FormRow> }
|
|
1223
|
+
/**
|
|
1224
|
+
* @param {String} formFieldId
|
|
1225
|
+
* @returns { Array<FormRow> }
|
|
1182
1226
|
*/
|
|
1183
1227
|
getRows(formFieldId) {
|
|
1184
1228
|
const rowsForField = this._rows.find(r => formFieldId === r.formFieldId);
|
|
@@ -1188,15 +1232,15 @@ class FormLayouter {
|
|
|
1188
1232
|
return rowsForField.rows;
|
|
1189
1233
|
}
|
|
1190
1234
|
|
|
1191
|
-
/**
|
|
1192
|
-
* @returns {string}
|
|
1235
|
+
/**
|
|
1236
|
+
* @returns {string}
|
|
1193
1237
|
*/
|
|
1194
1238
|
nextRowId() {
|
|
1195
1239
|
return this._ids.nextPrefixed('Row_');
|
|
1196
1240
|
}
|
|
1197
1241
|
|
|
1198
|
-
/**
|
|
1199
|
-
* @param {any} formField
|
|
1242
|
+
/**
|
|
1243
|
+
* @param {any} formField
|
|
1200
1244
|
*/
|
|
1201
1245
|
calculateLayout(formField) {
|
|
1202
1246
|
const {
|
|
@@ -1250,9 +1294,9 @@ function groupByRow(components, ids) {
|
|
|
1250
1294
|
});
|
|
1251
1295
|
}
|
|
1252
1296
|
|
|
1253
|
-
/**
|
|
1254
|
-
* @param {Array<FormRows>} formRows
|
|
1255
|
-
* @returns {Array<FormRow>}
|
|
1297
|
+
/**
|
|
1298
|
+
* @param {Array<FormRows>} formRows
|
|
1299
|
+
* @returns {Array<FormRow>}
|
|
1256
1300
|
*/
|
|
1257
1301
|
function allRows(formRows) {
|
|
1258
1302
|
return flatten(formRows.map(c => c.rows));
|
|
@@ -1293,23 +1337,27 @@ const TIME_SERIALISING_FORMAT_PATH = ['timeSerializingFormat'];
|
|
|
1293
1337
|
|
|
1294
1338
|
const VALUES_SOURCES = {
|
|
1295
1339
|
STATIC: 'static',
|
|
1296
|
-
INPUT: 'input'
|
|
1340
|
+
INPUT: 'input',
|
|
1341
|
+
EXPRESSION: 'expression'
|
|
1297
1342
|
};
|
|
1298
1343
|
const VALUES_SOURCE_DEFAULT = VALUES_SOURCES.STATIC;
|
|
1299
1344
|
const VALUES_SOURCES_LABELS = {
|
|
1300
1345
|
[VALUES_SOURCES.STATIC]: 'Static',
|
|
1301
|
-
[VALUES_SOURCES.INPUT]: 'Input data'
|
|
1346
|
+
[VALUES_SOURCES.INPUT]: 'Input data',
|
|
1347
|
+
[VALUES_SOURCES.EXPRESSION]: 'Expression'
|
|
1302
1348
|
};
|
|
1303
1349
|
const VALUES_SOURCES_PATHS = {
|
|
1304
1350
|
[VALUES_SOURCES.STATIC]: ['values'],
|
|
1305
|
-
[VALUES_SOURCES.INPUT]: ['valuesKey']
|
|
1351
|
+
[VALUES_SOURCES.INPUT]: ['valuesKey'],
|
|
1352
|
+
[VALUES_SOURCES.EXPRESSION]: ['valuesExpression']
|
|
1306
1353
|
};
|
|
1307
1354
|
const VALUES_SOURCES_DEFAULTS = {
|
|
1308
1355
|
[VALUES_SOURCES.STATIC]: [{
|
|
1309
1356
|
label: 'Value',
|
|
1310
1357
|
value: 'value'
|
|
1311
1358
|
}],
|
|
1312
|
-
[VALUES_SOURCES.INPUT]: ''
|
|
1359
|
+
[VALUES_SOURCES.INPUT]: '',
|
|
1360
|
+
[VALUES_SOURCES.EXPRESSION]: '='
|
|
1313
1361
|
};
|
|
1314
1362
|
|
|
1315
1363
|
// helpers ///////////////////
|
|
@@ -1329,10 +1377,10 @@ function createInjector(bootstrapModules) {
|
|
|
1329
1377
|
return injector;
|
|
1330
1378
|
}
|
|
1331
1379
|
|
|
1332
|
-
/**
|
|
1333
|
-
* @param {string?} prefix
|
|
1334
|
-
*
|
|
1335
|
-
* @returns Element
|
|
1380
|
+
/**
|
|
1381
|
+
* @param {string?} prefix
|
|
1382
|
+
*
|
|
1383
|
+
* @returns Element
|
|
1336
1384
|
*/
|
|
1337
1385
|
function createFormContainer(prefix = 'fjs') {
|
|
1338
1386
|
const container = document.createElement('div');
|
|
@@ -1340,8 +1388,8 @@ function createFormContainer(prefix = 'fjs') {
|
|
|
1340
1388
|
return container;
|
|
1341
1389
|
}
|
|
1342
1390
|
|
|
1343
|
-
const EXPRESSION_PROPERTIES = ['alt', 'description', 'label', 'source', 'readonly', 'text'];
|
|
1344
|
-
const TEMPLATE_PROPERTIES = ['description', 'label', 'text'];
|
|
1391
|
+
const EXPRESSION_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'conditional.hide', 'description', 'label', 'source', 'readonly', 'text', 'validate.min', 'validate.max', 'validate.minLength', 'validate.maxLength', 'valuesExpression'];
|
|
1392
|
+
const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text'];
|
|
1345
1393
|
function findErrors(errors, path) {
|
|
1346
1394
|
return errors[pathStringify(path)];
|
|
1347
1395
|
}
|
|
@@ -1378,22 +1426,22 @@ function generateIdForType(type) {
|
|
|
1378
1426
|
return `${type}${generateIndexForType(type)}`;
|
|
1379
1427
|
}
|
|
1380
1428
|
|
|
1381
|
-
/**
|
|
1382
|
-
* @template T
|
|
1383
|
-
* @param {T} data
|
|
1384
|
-
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
1385
|
-
* @return {T}
|
|
1429
|
+
/**
|
|
1430
|
+
* @template T
|
|
1431
|
+
* @param {T} data
|
|
1432
|
+
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
1433
|
+
* @return {T}
|
|
1386
1434
|
*/
|
|
1387
1435
|
function clone(data, replacer) {
|
|
1388
1436
|
return JSON.parse(JSON.stringify(data, replacer));
|
|
1389
1437
|
}
|
|
1390
1438
|
|
|
1391
|
-
/**
|
|
1392
|
-
* Parse the schema for input variables a form might make use of
|
|
1393
|
-
*
|
|
1394
|
-
* @param {any} schema
|
|
1395
|
-
*
|
|
1396
|
-
* @return {string[]}
|
|
1439
|
+
/**
|
|
1440
|
+
* Parse the schema for input variables a form might make use of
|
|
1441
|
+
*
|
|
1442
|
+
* @param {any} schema
|
|
1443
|
+
*
|
|
1444
|
+
* @return {string[]}
|
|
1397
1445
|
*/
|
|
1398
1446
|
function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLanguage(null), templating = new FeelersTemplating()) {
|
|
1399
1447
|
if (!schema.components) {
|
|
@@ -1403,8 +1451,7 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1403
1451
|
const {
|
|
1404
1452
|
key,
|
|
1405
1453
|
valuesKey,
|
|
1406
|
-
type
|
|
1407
|
-
conditional
|
|
1454
|
+
type
|
|
1408
1455
|
} = component;
|
|
1409
1456
|
if (['button'].includes(type)) {
|
|
1410
1457
|
return variables;
|
|
@@ -1415,14 +1462,8 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1415
1462
|
if (valuesKey) {
|
|
1416
1463
|
variables = [...variables, valuesKey];
|
|
1417
1464
|
}
|
|
1418
|
-
if (conditional && conditional.hide) {
|
|
1419
|
-
const conditionVariables = expressionLanguage.getVariableNames(conditional.hide, {
|
|
1420
|
-
type: 'unaryTest'
|
|
1421
|
-
});
|
|
1422
|
-
variables = [...variables, ...conditionVariables];
|
|
1423
|
-
}
|
|
1424
1465
|
EXPRESSION_PROPERTIES.forEach(prop => {
|
|
1425
|
-
const property = component
|
|
1466
|
+
const property = get(component, prop.split('.'));
|
|
1426
1467
|
if (property && expressionLanguage.isExpression(property)) {
|
|
1427
1468
|
const expressionVariables = expressionLanguage.getVariableNames(property, {
|
|
1428
1469
|
type: 'expression'
|
|
@@ -1431,7 +1472,7 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1431
1472
|
}
|
|
1432
1473
|
});
|
|
1433
1474
|
TEMPLATE_PROPERTIES.forEach(prop => {
|
|
1434
|
-
const property = component
|
|
1475
|
+
const property = get(component, prop.split('.'));
|
|
1435
1476
|
if (property && !expressionLanguage.isExpression(property) && templating.isTemplate(property)) {
|
|
1436
1477
|
const templateVariables = templating.getVariableNames(property);
|
|
1437
1478
|
variables = [...variables, ...templateVariables];
|
|
@@ -1445,11 +1486,11 @@ function getSchemaVariables(schema, expressionLanguage = new FeelExpressionLangu
|
|
|
1445
1486
|
}
|
|
1446
1487
|
|
|
1447
1488
|
class Importer {
|
|
1448
|
-
/**
|
|
1449
|
-
* @constructor
|
|
1450
|
-
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
1451
|
-
* @param { import('../render/FormFields').default } formFields
|
|
1452
|
-
* @param { import('../core').FormLayouter } formLayouter
|
|
1489
|
+
/**
|
|
1490
|
+
* @constructor
|
|
1491
|
+
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
1492
|
+
* @param { import('../render/FormFields').default } formFields
|
|
1493
|
+
* @param { import('../core').FormLayouter } formLayouter
|
|
1453
1494
|
*/
|
|
1454
1495
|
constructor(formFieldRegistry, formFields, formLayouter) {
|
|
1455
1496
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -1457,15 +1498,15 @@ class Importer {
|
|
|
1457
1498
|
this._formLayouter = formLayouter;
|
|
1458
1499
|
}
|
|
1459
1500
|
|
|
1460
|
-
/**
|
|
1461
|
-
* Import schema adding `id`, `_parent` and `_path`
|
|
1462
|
-
* information to each field and adding it to the
|
|
1463
|
-
* form field registry.
|
|
1464
|
-
*
|
|
1465
|
-
* @param {any} schema
|
|
1466
|
-
* @param {any} [data]
|
|
1467
|
-
*
|
|
1468
|
-
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
1501
|
+
/**
|
|
1502
|
+
* Import schema adding `id`, `_parent` and `_path`
|
|
1503
|
+
* information to each field and adding it to the
|
|
1504
|
+
* form field registry.
|
|
1505
|
+
*
|
|
1506
|
+
* @param {any} schema
|
|
1507
|
+
* @param {any} [data]
|
|
1508
|
+
*
|
|
1509
|
+
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
1469
1510
|
*/
|
|
1470
1511
|
importSchema(schema, data = {}) {
|
|
1471
1512
|
// TODO: Add warnings - https://github.com/bpmn-io/form-js/issues/289
|
|
@@ -1486,11 +1527,11 @@ class Importer {
|
|
|
1486
1527
|
}
|
|
1487
1528
|
}
|
|
1488
1529
|
|
|
1489
|
-
/**
|
|
1490
|
-
* @param {any} formField
|
|
1491
|
-
* @param {string} [parentId]
|
|
1492
|
-
*
|
|
1493
|
-
* @return {any} importedField
|
|
1530
|
+
/**
|
|
1531
|
+
* @param {any} formField
|
|
1532
|
+
* @param {string} [parentId]
|
|
1533
|
+
*
|
|
1534
|
+
* @return {any} importedField
|
|
1494
1535
|
*/
|
|
1495
1536
|
importFormField(formField, parentId) {
|
|
1496
1537
|
const {
|
|
@@ -1541,10 +1582,10 @@ class Importer {
|
|
|
1541
1582
|
});
|
|
1542
1583
|
}
|
|
1543
1584
|
|
|
1544
|
-
/**
|
|
1545
|
-
* @param {Object} data
|
|
1546
|
-
*
|
|
1547
|
-
* @return {Object} initializedData
|
|
1585
|
+
/**
|
|
1586
|
+
* @param {Object} data
|
|
1587
|
+
*
|
|
1588
|
+
* @return {Object} initializedData
|
|
1548
1589
|
*/
|
|
1549
1590
|
initializeFieldValues(data) {
|
|
1550
1591
|
return this._formFieldRegistry.getAll().reduce((initializedData, formField) => {
|
|
@@ -1682,11 +1723,11 @@ const FormRenderContext = createContext({
|
|
|
1682
1723
|
});
|
|
1683
1724
|
var FormRenderContext$1 = FormRenderContext;
|
|
1684
1725
|
|
|
1685
|
-
/**
|
|
1686
|
-
* @param {string} type
|
|
1687
|
-
* @param {boolean} [strict]
|
|
1688
|
-
*
|
|
1689
|
-
* @returns {any}
|
|
1726
|
+
/**
|
|
1727
|
+
* @param {string} type
|
|
1728
|
+
* @param {boolean} [strict]
|
|
1729
|
+
*
|
|
1730
|
+
* @returns {any}
|
|
1690
1731
|
*/
|
|
1691
1732
|
function getService(type, strict) {}
|
|
1692
1733
|
const FormContext = createContext({
|
|
@@ -1702,10 +1743,10 @@ function useService(type, strict) {
|
|
|
1702
1743
|
return getService(type, strict);
|
|
1703
1744
|
}
|
|
1704
1745
|
|
|
1705
|
-
/**
|
|
1706
|
-
* Returns the conditionally filtered data of a form reactively.
|
|
1707
|
-
* Memoised to minimize re-renders
|
|
1708
|
-
*
|
|
1746
|
+
/**
|
|
1747
|
+
* Returns the conditionally filtered data of a form reactively.
|
|
1748
|
+
* Memoised to minimize re-renders
|
|
1749
|
+
*
|
|
1709
1750
|
*/
|
|
1710
1751
|
function useFilteredFormData() {
|
|
1711
1752
|
const {
|
|
@@ -1722,12 +1763,12 @@ function useFilteredFormData() {
|
|
|
1722
1763
|
}, [conditionChecker, data, initialData]);
|
|
1723
1764
|
}
|
|
1724
1765
|
|
|
1725
|
-
/**
|
|
1726
|
-
* Evaluate if condition is met reactively based on the conditionChecker and form data.
|
|
1727
|
-
*
|
|
1728
|
-
* @param {string | undefined} condition
|
|
1729
|
-
*
|
|
1730
|
-
* @returns {boolean} true if condition is met or no condition or condition checker exists
|
|
1766
|
+
/**
|
|
1767
|
+
* Evaluate if condition is met reactively based on the conditionChecker and form data.
|
|
1768
|
+
*
|
|
1769
|
+
* @param {string | undefined} condition
|
|
1770
|
+
*
|
|
1771
|
+
* @returns {boolean} true if condition is met or no condition or condition checker exists
|
|
1731
1772
|
*/
|
|
1732
1773
|
function useCondition(condition) {
|
|
1733
1774
|
const conditionChecker = useService('conditionChecker', false);
|
|
@@ -1737,13 +1778,13 @@ function useCondition(condition) {
|
|
|
1737
1778
|
}, [conditionChecker, condition, filteredData]);
|
|
1738
1779
|
}
|
|
1739
1780
|
|
|
1740
|
-
/**
|
|
1741
|
-
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
1742
|
-
* If the string is not an expression, it is returned as is.
|
|
1743
|
-
* Memoised to minimize re-renders.
|
|
1744
|
-
*
|
|
1745
|
-
* @param {string} value
|
|
1746
|
-
*
|
|
1781
|
+
/**
|
|
1782
|
+
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
1783
|
+
* If the string is not an expression, it is returned as is.
|
|
1784
|
+
* Memoised to minimize re-renders.
|
|
1785
|
+
*
|
|
1786
|
+
* @param {string} value
|
|
1787
|
+
*
|
|
1747
1788
|
*/
|
|
1748
1789
|
function useExpressionEvaluation(value) {
|
|
1749
1790
|
const formData = useFilteredFormData();
|
|
@@ -1772,16 +1813,16 @@ function useKeyDownAction(targetKey, action, listenerElement = window) {
|
|
|
1772
1813
|
});
|
|
1773
1814
|
}
|
|
1774
1815
|
|
|
1775
|
-
/**
|
|
1776
|
-
* Retrieve readonly value of a form field, given it can be an
|
|
1777
|
-
* expression optionally or configured globally.
|
|
1778
|
-
*
|
|
1779
|
-
* @typedef { import('../../types').FormProperties } FormProperties
|
|
1780
|
-
*
|
|
1781
|
-
* @param {any} formField
|
|
1782
|
-
* @param {FormProperties} properties
|
|
1783
|
-
*
|
|
1784
|
-
* @returns {boolean}
|
|
1816
|
+
/**
|
|
1817
|
+
* Retrieve readonly value of a form field, given it can be an
|
|
1818
|
+
* expression optionally or configured globally.
|
|
1819
|
+
*
|
|
1820
|
+
* @typedef { import('../../types').FormProperties } FormProperties
|
|
1821
|
+
*
|
|
1822
|
+
* @param {any} formField
|
|
1823
|
+
* @param {FormProperties} properties
|
|
1824
|
+
*
|
|
1825
|
+
* @returns {boolean}
|
|
1785
1826
|
*/
|
|
1786
1827
|
function useReadonly(formField, properties = {}) {
|
|
1787
1828
|
const expressionLanguage = useService('expressionLanguage');
|
|
@@ -1799,16 +1840,16 @@ function useReadonly(formField, properties = {}) {
|
|
|
1799
1840
|
return readonly || false;
|
|
1800
1841
|
}
|
|
1801
1842
|
|
|
1802
|
-
/**
|
|
1803
|
-
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1804
|
-
* Memoised to minimize re-renders
|
|
1805
|
-
*
|
|
1806
|
-
* @param {string} value
|
|
1807
|
-
* @param {Object} options
|
|
1808
|
-
* @param {boolean} [options.debug = false]
|
|
1809
|
-
* @param {boolean} [options.strict = false]
|
|
1810
|
-
* @param {Function} [options.buildDebugString]
|
|
1811
|
-
*
|
|
1843
|
+
/**
|
|
1844
|
+
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1845
|
+
* Memoised to minimize re-renders
|
|
1846
|
+
*
|
|
1847
|
+
* @param {string} value
|
|
1848
|
+
* @param {Object} options
|
|
1849
|
+
* @param {boolean} [options.debug = false]
|
|
1850
|
+
* @param {boolean} [options.strict = false]
|
|
1851
|
+
* @param {Function} [options.buildDebugString]
|
|
1852
|
+
*
|
|
1812
1853
|
*/
|
|
1813
1854
|
function useTemplateEvaluation(value, options) {
|
|
1814
1855
|
const filteredData = useFilteredFormData();
|
|
@@ -1821,17 +1862,17 @@ function useTemplateEvaluation(value, options) {
|
|
|
1821
1862
|
}, [filteredData, templating, value, options]);
|
|
1822
1863
|
}
|
|
1823
1864
|
|
|
1824
|
-
/**
|
|
1825
|
-
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1826
|
-
* If the string contains multiple lines, only the first line is returned.
|
|
1827
|
-
* Memoised to minimize re-renders
|
|
1828
|
-
*
|
|
1829
|
-
* @param {string} value
|
|
1830
|
-
* @param {Object} [options]
|
|
1831
|
-
* @param {boolean} [options.debug = false]
|
|
1832
|
-
* @param {boolean} [options.strict = false]
|
|
1833
|
-
* @param {Function} [options.buildDebugString]
|
|
1834
|
-
*
|
|
1865
|
+
/**
|
|
1866
|
+
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
1867
|
+
* If the string contains multiple lines, only the first line is returned.
|
|
1868
|
+
* Memoised to minimize re-renders
|
|
1869
|
+
*
|
|
1870
|
+
* @param {string} value
|
|
1871
|
+
* @param {Object} [options]
|
|
1872
|
+
* @param {boolean} [options.debug = false]
|
|
1873
|
+
* @param {boolean} [options.strict = false]
|
|
1874
|
+
* @param {Function} [options.buildDebugString]
|
|
1875
|
+
*
|
|
1835
1876
|
*/
|
|
1836
1877
|
function useSingleLineTemplateEvaluation(value, options = {}) {
|
|
1837
1878
|
const evaluatedTemplate = useTemplateEvaluation(value, options);
|
|
@@ -2018,8 +2059,8 @@ function _isValueSomething(value) {
|
|
|
2018
2059
|
return value || value === 0 || value === false;
|
|
2019
2060
|
}
|
|
2020
2061
|
|
|
2021
|
-
/**
|
|
2022
|
-
* @enum { String }
|
|
2062
|
+
/**
|
|
2063
|
+
* @enum { String }
|
|
2023
2064
|
*/
|
|
2024
2065
|
const LOAD_STATES = {
|
|
2025
2066
|
LOADING: 'loading',
|
|
@@ -2027,20 +2068,21 @@ const LOAD_STATES = {
|
|
|
2027
2068
|
ERROR: 'error'
|
|
2028
2069
|
};
|
|
2029
2070
|
|
|
2030
|
-
/**
|
|
2031
|
-
* @typedef {Object} ValuesGetter
|
|
2032
|
-
* @property {Object[]} values - The values data
|
|
2033
|
-
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
2071
|
+
/**
|
|
2072
|
+
* @typedef {Object} ValuesGetter
|
|
2073
|
+
* @property {Object[]} values - The values data
|
|
2074
|
+
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
2034
2075
|
*/
|
|
2035
2076
|
|
|
2036
|
-
/**
|
|
2037
|
-
* A hook to load values for single and multiselect components.
|
|
2038
|
-
*
|
|
2039
|
-
* @param {Object} field - The form field to handle values for
|
|
2040
|
-
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
2077
|
+
/**
|
|
2078
|
+
* A hook to load values for single and multiselect components.
|
|
2079
|
+
*
|
|
2080
|
+
* @param {Object} field - The form field to handle values for
|
|
2081
|
+
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
2041
2082
|
*/
|
|
2042
2083
|
function useValuesAsync (field) {
|
|
2043
2084
|
const {
|
|
2085
|
+
valuesExpression,
|
|
2044
2086
|
valuesKey,
|
|
2045
2087
|
values: staticValues
|
|
2046
2088
|
} = field;
|
|
@@ -2050,6 +2092,11 @@ function useValuesAsync (field) {
|
|
|
2050
2092
|
state: LOAD_STATES.LOADING
|
|
2051
2093
|
});
|
|
2052
2094
|
const initialData = useService('form')._getState().initialData;
|
|
2095
|
+
const evaluatedValues = useMemo(() => {
|
|
2096
|
+
if (valuesExpression) {
|
|
2097
|
+
return useExpressionEvaluation(valuesExpression);
|
|
2098
|
+
}
|
|
2099
|
+
}, [valuesExpression]);
|
|
2053
2100
|
useEffect(() => {
|
|
2054
2101
|
let values = [];
|
|
2055
2102
|
|
|
@@ -2059,11 +2106,14 @@ function useValuesAsync (field) {
|
|
|
2059
2106
|
if (keyedValues && Array.isArray(keyedValues)) {
|
|
2060
2107
|
values = keyedValues;
|
|
2061
2108
|
}
|
|
2062
|
-
}
|
|
2063
2109
|
|
|
2064
|
-
|
|
2065
|
-
else if (staticValues !== undefined) {
|
|
2110
|
+
// static values
|
|
2111
|
+
} else if (staticValues !== undefined) {
|
|
2066
2112
|
values = Array.isArray(staticValues) ? staticValues : [];
|
|
2113
|
+
|
|
2114
|
+
// expression
|
|
2115
|
+
} else if (evaluatedValues && Array.isArray(evaluatedValues)) {
|
|
2116
|
+
values = evaluatedValues;
|
|
2067
2117
|
} else {
|
|
2068
2118
|
setValuesGetter(buildErrorState('No values source defined in the form definition'));
|
|
2069
2119
|
return;
|
|
@@ -2496,22 +2546,23 @@ Default.config = {
|
|
|
2496
2546
|
})
|
|
2497
2547
|
};
|
|
2498
2548
|
|
|
2549
|
+
var _path$g;
|
|
2499
2550
|
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); }
|
|
2500
|
-
var
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2551
|
+
var SvgCalendar = function SvgCalendar(props) {
|
|
2552
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
2553
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2554
|
+
width: 14,
|
|
2555
|
+
height: 15,
|
|
2556
|
+
fill: "none",
|
|
2557
|
+
viewBox: "0 0 28 30"
|
|
2558
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
2559
|
+
fill: "currentColor",
|
|
2560
|
+
fillRule: "evenodd",
|
|
2561
|
+
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",
|
|
2562
|
+
clipRule: "evenodd"
|
|
2563
|
+
})));
|
|
2564
|
+
};
|
|
2565
|
+
var CalendarIcon = SvgCalendar;
|
|
2515
2566
|
|
|
2516
2567
|
function InputAdorner(props) {
|
|
2517
2568
|
const {
|
|
@@ -2692,25 +2743,26 @@ function Datepicker(props) {
|
|
|
2692
2743
|
});
|
|
2693
2744
|
}
|
|
2694
2745
|
|
|
2746
|
+
var _path$f, _path2$3;
|
|
2695
2747
|
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); }
|
|
2696
|
-
var
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2748
|
+
var SvgClock = function SvgClock(props) {
|
|
2749
|
+
return /*#__PURE__*/React.createElement("svg", _extends$i({
|
|
2750
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2751
|
+
width: 16,
|
|
2752
|
+
height: 16,
|
|
2753
|
+
fill: "none",
|
|
2754
|
+
viewBox: "0 0 28 29"
|
|
2755
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
2756
|
+
fill: "currentColor",
|
|
2757
|
+
d: "M13 14.41 18.59 20 20 18.59l-5-5.01V5h-2v9.41Z"
|
|
2758
|
+
})), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
|
|
2759
|
+
fill: "currentColor",
|
|
2760
|
+
fillRule: "evenodd",
|
|
2761
|
+
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",
|
|
2762
|
+
clipRule: "evenodd"
|
|
2763
|
+
})));
|
|
2764
|
+
};
|
|
2765
|
+
var ClockIcon = SvgClock;
|
|
2714
2766
|
|
|
2715
2767
|
const DEFAULT_LABEL_GETTER = value => value;
|
|
2716
2768
|
const NOOP = () => {};
|
|
@@ -3159,10 +3211,10 @@ Datetime.config = {
|
|
|
3159
3211
|
}
|
|
3160
3212
|
};
|
|
3161
3213
|
|
|
3162
|
-
/**
|
|
3163
|
-
* This file must not be changed or exchanged.
|
|
3164
|
-
*
|
|
3165
|
-
* @see http://bpmn.io/license for more information.
|
|
3214
|
+
/**
|
|
3215
|
+
* This file must not be changed or exchanged.
|
|
3216
|
+
*
|
|
3217
|
+
* @see http://bpmn.io/license for more information.
|
|
3166
3218
|
*/
|
|
3167
3219
|
function Logo() {
|
|
3168
3220
|
return jsxs("svg", {
|
|
@@ -3294,11 +3346,11 @@ const ATTR_WHITESPACE_PATTERN = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u
|
|
|
3294
3346
|
|
|
3295
3347
|
const FORM_ELEMENT = document.createElement('form');
|
|
3296
3348
|
|
|
3297
|
-
/**
|
|
3298
|
-
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3299
|
-
*
|
|
3300
|
-
* @param {string} html
|
|
3301
|
-
* @return {string}
|
|
3349
|
+
/**
|
|
3350
|
+
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3351
|
+
*
|
|
3352
|
+
* @param {string} html
|
|
3353
|
+
* @return {string}
|
|
3302
3354
|
*/
|
|
3303
3355
|
|
|
3304
3356
|
// see https://github.com/developit/snarkdown/issues/70
|
|
@@ -3316,29 +3368,29 @@ function sanitizeHTML(html) {
|
|
|
3316
3368
|
}
|
|
3317
3369
|
}
|
|
3318
3370
|
|
|
3319
|
-
/**
|
|
3320
|
-
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
3321
|
-
* that start with http(s).
|
|
3322
|
-
*
|
|
3323
|
-
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
3324
|
-
*
|
|
3325
|
-
* @param {string} src
|
|
3326
|
-
* @returns {string}
|
|
3371
|
+
/**
|
|
3372
|
+
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
3373
|
+
* that start with http(s).
|
|
3374
|
+
*
|
|
3375
|
+
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
3376
|
+
*
|
|
3377
|
+
* @param {string} src
|
|
3378
|
+
* @returns {string}
|
|
3327
3379
|
*/
|
|
3328
3380
|
function sanitizeImageSource(src) {
|
|
3329
3381
|
const valid = ALLOWED_IMAGE_SRC_PATTERN.test(src);
|
|
3330
3382
|
return valid ? src : '';
|
|
3331
3383
|
}
|
|
3332
3384
|
|
|
3333
|
-
/**
|
|
3334
|
-
* Recursively sanitize a HTML node, potentially
|
|
3335
|
-
* removing it, its children or attributes.
|
|
3336
|
-
*
|
|
3337
|
-
* Inspired by https://github.com/developit/snarkdown/issues/70
|
|
3338
|
-
* and https://github.com/cure53/DOMPurify. Simplified
|
|
3339
|
-
* for our use-case.
|
|
3340
|
-
*
|
|
3341
|
-
* @param {Element} node
|
|
3385
|
+
/**
|
|
3386
|
+
* Recursively sanitize a HTML node, potentially
|
|
3387
|
+
* removing it, its children or attributes.
|
|
3388
|
+
*
|
|
3389
|
+
* Inspired by https://github.com/developit/snarkdown/issues/70
|
|
3390
|
+
* and https://github.com/cure53/DOMPurify. Simplified
|
|
3391
|
+
* for our use-case.
|
|
3392
|
+
*
|
|
3393
|
+
* @param {Element} node
|
|
3342
3394
|
*/
|
|
3343
3395
|
function sanitizeNode(node) {
|
|
3344
3396
|
// allow text nodes
|
|
@@ -3382,13 +3434,13 @@ function sanitizeNode(node) {
|
|
|
3382
3434
|
}
|
|
3383
3435
|
}
|
|
3384
3436
|
|
|
3385
|
-
/**
|
|
3386
|
-
* Validates attributes for validity.
|
|
3387
|
-
*
|
|
3388
|
-
* @param {string} lcTag
|
|
3389
|
-
* @param {string} lcName
|
|
3390
|
-
* @param {string} value
|
|
3391
|
-
* @return {boolean}
|
|
3437
|
+
/**
|
|
3438
|
+
* Validates attributes for validity.
|
|
3439
|
+
*
|
|
3440
|
+
* @param {string} lcTag
|
|
3441
|
+
* @param {string} lcName
|
|
3442
|
+
* @param {string} value
|
|
3443
|
+
* @return {boolean}
|
|
3392
3444
|
*/
|
|
3393
3445
|
function isValidAttribute(lcTag, lcName, value) {
|
|
3394
3446
|
// disallow most attributes based on whitelist
|
|
@@ -3412,34 +3464,45 @@ function isValidAttribute(lcTag, lcName, value) {
|
|
|
3412
3464
|
}
|
|
3413
3465
|
|
|
3414
3466
|
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); }
|
|
3415
|
-
var
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
}
|
|
3467
|
+
var SvgImagePlaceholder = function SvgImagePlaceholder(props) {
|
|
3468
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
3469
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3470
|
+
xmlSpace: "preserve",
|
|
3471
|
+
width: 64,
|
|
3472
|
+
height: 64,
|
|
3473
|
+
style: {
|
|
3474
|
+
fillRule: "evenodd",
|
|
3475
|
+
clipRule: "evenodd",
|
|
3476
|
+
strokeLinejoin: "round",
|
|
3477
|
+
strokeMiterlimit: 2
|
|
3478
|
+
},
|
|
3479
|
+
viewBox: "0 0 1280 1280"
|
|
3480
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
3481
|
+
d: "M0 0h1280v1280H0z",
|
|
3482
|
+
style: {
|
|
3483
|
+
fill: "#e5e9ed"
|
|
3484
|
+
}
|
|
3485
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3486
|
+
d: "M910 410H370v470h540V410Zm-57.333 57.333v355.334H427.333V467.333h425.334Z",
|
|
3487
|
+
style: {
|
|
3488
|
+
fill: "#cad3db"
|
|
3489
|
+
}
|
|
3490
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3491
|
+
d: "M810 770H480v-60l100-170 130 170 100-65v125Z",
|
|
3492
|
+
style: {
|
|
3493
|
+
fill: "#cad3db"
|
|
3494
|
+
}
|
|
3495
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
3496
|
+
cx: 750,
|
|
3497
|
+
cy: 550,
|
|
3498
|
+
r: 50,
|
|
3499
|
+
style: {
|
|
3500
|
+
fill: "#cad3db"
|
|
3501
|
+
},
|
|
3502
|
+
transform: "translate(10 10)"
|
|
3503
|
+
}));
|
|
3504
|
+
};
|
|
3505
|
+
var ImagePlaceholder = SvgImagePlaceholder;
|
|
3443
3506
|
|
|
3444
3507
|
const type$7 = 'image';
|
|
3445
3508
|
function Image(props) {
|
|
@@ -3451,9 +3514,13 @@ function Image(props) {
|
|
|
3451
3514
|
id,
|
|
3452
3515
|
source
|
|
3453
3516
|
} = field;
|
|
3454
|
-
const evaluatedImageSource =
|
|
3517
|
+
const evaluatedImageSource = useSingleLineTemplateEvaluation(source, {
|
|
3518
|
+
debug: true
|
|
3519
|
+
});
|
|
3455
3520
|
const safeSource = useMemo(() => sanitizeImageSource(evaluatedImageSource), [evaluatedImageSource]);
|
|
3456
|
-
const altText =
|
|
3521
|
+
const altText = useSingleLineTemplateEvaluation(alt, {
|
|
3522
|
+
debug: true
|
|
3523
|
+
});
|
|
3457
3524
|
const {
|
|
3458
3525
|
formId
|
|
3459
3526
|
} = useContext(FormContext$1);
|
|
@@ -3485,39 +3552,59 @@ Image.config = {
|
|
|
3485
3552
|
})
|
|
3486
3553
|
};
|
|
3487
3554
|
|
|
3555
|
+
function TemplatedInputAdorner(props) {
|
|
3556
|
+
const {
|
|
3557
|
+
pre,
|
|
3558
|
+
post
|
|
3559
|
+
} = props;
|
|
3560
|
+
const evaluatedPre = useSingleLineTemplateEvaluation(pre, {
|
|
3561
|
+
debug: true
|
|
3562
|
+
});
|
|
3563
|
+
const evaluatedPost = useSingleLineTemplateEvaluation(post, {
|
|
3564
|
+
debug: true
|
|
3565
|
+
});
|
|
3566
|
+
return jsx(InputAdorner, {
|
|
3567
|
+
...props,
|
|
3568
|
+
pre: evaluatedPre,
|
|
3569
|
+
post: evaluatedPost
|
|
3570
|
+
});
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
var _path$e;
|
|
3488
3574
|
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); }
|
|
3489
|
-
var
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3575
|
+
var SvgAngelDown = function SvgAngelDown(props) {
|
|
3576
|
+
return /*#__PURE__*/React.createElement("svg", _extends$g({
|
|
3577
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3578
|
+
width: 8,
|
|
3579
|
+
height: 8
|
|
3580
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
3581
|
+
fill: "currentColor",
|
|
3582
|
+
fillRule: "evenodd",
|
|
3583
|
+
stroke: "currentColor",
|
|
3584
|
+
strokeWidth: 0.5,
|
|
3585
|
+
d: "M7.75 1.336 4 6.125.258 1.335 0 1.54l4 5.125L8 1.54Zm0 0",
|
|
3586
|
+
clipRule: "evenodd"
|
|
3587
|
+
})));
|
|
3588
|
+
};
|
|
3589
|
+
var AngelDownIcon = SvgAngelDown;
|
|
3504
3590
|
|
|
3591
|
+
var _path$d;
|
|
3505
3592
|
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); }
|
|
3506
|
-
var
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3593
|
+
var SvgAngelUp = function SvgAngelUp(props) {
|
|
3594
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
3595
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3596
|
+
width: 8,
|
|
3597
|
+
height: 8
|
|
3598
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
3599
|
+
fill: "currentColor",
|
|
3600
|
+
fillRule: "evenodd",
|
|
3601
|
+
stroke: "currentColor",
|
|
3602
|
+
strokeWidth: 0.5,
|
|
3603
|
+
d: "M7.75 6.664 4 1.875.258 6.665 0 6.46l4-5.125L8 6.46Zm0 0",
|
|
3604
|
+
clipRule: "evenodd"
|
|
3605
|
+
})));
|
|
3606
|
+
};
|
|
3607
|
+
var AngelUpIcon = SvgAngelUp;
|
|
3521
3608
|
|
|
3522
3609
|
const type$6 = 'number';
|
|
3523
3610
|
function Numberfield(props) {
|
|
@@ -3665,7 +3752,7 @@ function Numberfield(props) {
|
|
|
3665
3752
|
id: prefixId(id, formId),
|
|
3666
3753
|
label: label,
|
|
3667
3754
|
required: required
|
|
3668
|
-
}), jsx(
|
|
3755
|
+
}), jsx(TemplatedInputAdorner, {
|
|
3669
3756
|
disabled: disabled,
|
|
3670
3757
|
readonly: readonly,
|
|
3671
3758
|
pre: prefixAdorner,
|
|
@@ -3842,22 +3929,23 @@ Radio.config = {
|
|
|
3842
3929
|
}
|
|
3843
3930
|
};
|
|
3844
3931
|
|
|
3932
|
+
var _path$c;
|
|
3845
3933
|
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); }
|
|
3846
|
-
var
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3934
|
+
var SvgXMark = function SvgXMark(props) {
|
|
3935
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
3936
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3937
|
+
width: 8,
|
|
3938
|
+
height: 8
|
|
3939
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
3940
|
+
fill: "currentColor",
|
|
3941
|
+
fillRule: "evenodd",
|
|
3942
|
+
stroke: "currentColor",
|
|
3943
|
+
strokeWidth: 0.5,
|
|
3944
|
+
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",
|
|
3945
|
+
clipRule: "evenodd"
|
|
3946
|
+
})));
|
|
3947
|
+
};
|
|
3948
|
+
var XMarkIcon = SvgXMark;
|
|
3861
3949
|
|
|
3862
3950
|
function SearchableSelect(props) {
|
|
3863
3951
|
const {
|
|
@@ -4544,7 +4632,7 @@ function Textfield(props) {
|
|
|
4544
4632
|
id: prefixId(id, formId),
|
|
4545
4633
|
label: label,
|
|
4546
4634
|
required: required
|
|
4547
|
-
}), jsx(
|
|
4635
|
+
}), jsx(TemplatedInputAdorner, {
|
|
4548
4636
|
disabled: disabled,
|
|
4549
4637
|
readonly: readonly,
|
|
4550
4638
|
pre: prefixAdorner,
|
|
@@ -4679,245 +4767,259 @@ Textarea.config = {
|
|
|
4679
4767
|
})
|
|
4680
4768
|
};
|
|
4681
4769
|
|
|
4770
|
+
var _path$b;
|
|
4682
4771
|
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); }
|
|
4683
|
-
var
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4772
|
+
var SvgButton = function SvgButton(props) {
|
|
4773
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
4774
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4775
|
+
width: 54,
|
|
4776
|
+
height: 54,
|
|
4777
|
+
fill: "currentcolor"
|
|
4778
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
4779
|
+
fillRule: "evenodd",
|
|
4780
|
+
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"
|
|
4781
|
+
})));
|
|
4782
|
+
};
|
|
4783
|
+
var ButtonIcon = SvgButton;
|
|
4695
4784
|
|
|
4785
|
+
var _path$a;
|
|
4696
4786
|
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); }
|
|
4697
|
-
var
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
}
|
|
4706
|
-
|
|
4707
|
-
|
|
4787
|
+
var SvgCheckbox = function SvgCheckbox(props) {
|
|
4788
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
4789
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4790
|
+
width: 54,
|
|
4791
|
+
height: 54,
|
|
4792
|
+
fill: "currentcolor"
|
|
4793
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
4794
|
+
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"
|
|
4795
|
+
})));
|
|
4796
|
+
};
|
|
4797
|
+
var CheckboxIcon = SvgCheckbox;
|
|
4708
4798
|
|
|
4799
|
+
var _g, _use, _use2, _use3, _defs;
|
|
4709
4800
|
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); }
|
|
4710
|
-
var
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
},
|
|
4720
|
-
|
|
4721
|
-
}, /*#__PURE__*/React.createElement("use", {
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
})), /*#__PURE__*/React.createElement("use", {
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4801
|
+
var SvgChecklist = function SvgChecklist(props) {
|
|
4802
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
4803
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4804
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
4805
|
+
width: 54,
|
|
4806
|
+
height: 54,
|
|
4807
|
+
fill: "currentcolor"
|
|
4808
|
+
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
4809
|
+
fillRule: "evenodd"
|
|
4810
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
4811
|
+
xlinkHref: "#Checklist_svg__a"
|
|
4812
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4813
|
+
xlinkHref: "#Checklist_svg__a",
|
|
4814
|
+
y: 24
|
|
4815
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4816
|
+
xlinkHref: "#Checklist_svg__a",
|
|
4817
|
+
y: 12
|
|
4818
|
+
}))), _use || (_use = /*#__PURE__*/React.createElement("use", {
|
|
4819
|
+
xlinkHref: "#Checklist_svg__b"
|
|
4820
|
+
})), _use2 || (_use2 = /*#__PURE__*/React.createElement("use", {
|
|
4821
|
+
xlinkHref: "#Checklist_svg__b",
|
|
4822
|
+
y: 12
|
|
4823
|
+
})), _use3 || (_use3 = /*#__PURE__*/React.createElement("use", {
|
|
4824
|
+
xlinkHref: "#Checklist_svg__b",
|
|
4825
|
+
y: 24
|
|
4826
|
+
})), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
4827
|
+
id: "Checklist_svg__a",
|
|
4828
|
+
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"
|
|
4829
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4830
|
+
id: "Checklist_svg__b",
|
|
4831
|
+
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"
|
|
4832
|
+
}))));
|
|
4833
|
+
};
|
|
4834
|
+
var ChecklistIcon = SvgChecklist;
|
|
4744
4835
|
|
|
4836
|
+
var _path$9, _path2$2, _path3;
|
|
4745
4837
|
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); }
|
|
4746
|
-
var
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4838
|
+
var SvgDatetime = function SvgDatetime(props) {
|
|
4839
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
4840
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4841
|
+
width: 54,
|
|
4842
|
+
height: 54,
|
|
4843
|
+
fill: "currentcolor"
|
|
4844
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
4845
|
+
fillRule: "evenodd",
|
|
4846
|
+
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"
|
|
4847
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
|
|
4848
|
+
d: "m35.13 37.603 1.237-1.237-3.468-3.475v-5.926h-1.754v6.654l3.984 3.984Z"
|
|
4849
|
+
})), _path3 || (_path3 = /*#__PURE__*/React.createElement("path", {
|
|
4850
|
+
fillRule: "evenodd",
|
|
4851
|
+
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"
|
|
4852
|
+
})));
|
|
4853
|
+
};
|
|
4854
|
+
var DatetimeIcon = SvgDatetime;
|
|
4763
4855
|
|
|
4856
|
+
var _path$8, _path2$1;
|
|
4764
4857
|
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); }
|
|
4765
|
-
var
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
})
|
|
4777
|
-
|
|
4778
|
-
|
|
4858
|
+
var SvgTaglist = function SvgTaglist(props) {
|
|
4859
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
4860
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4861
|
+
width: 54,
|
|
4862
|
+
height: 54,
|
|
4863
|
+
fill: "currentcolor"
|
|
4864
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
|
|
4865
|
+
fillRule: "evenodd",
|
|
4866
|
+
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"
|
|
4867
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
|
|
4868
|
+
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"
|
|
4869
|
+
})));
|
|
4870
|
+
};
|
|
4871
|
+
var TaglistIcon = SvgTaglist;
|
|
4779
4872
|
|
|
4873
|
+
var _rect, _rect2, _rect3;
|
|
4780
4874
|
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); }
|
|
4781
|
-
var
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4875
|
+
var SvgForm = function SvgForm(props) {
|
|
4876
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
4877
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4878
|
+
width: 54,
|
|
4879
|
+
height: 54
|
|
4880
|
+
}, props), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
|
|
4881
|
+
width: 24,
|
|
4882
|
+
height: 4,
|
|
4883
|
+
x: 15,
|
|
4884
|
+
y: 17,
|
|
4885
|
+
rx: 1
|
|
4886
|
+
})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement("rect", {
|
|
4887
|
+
width: 24,
|
|
4888
|
+
height: 4,
|
|
4889
|
+
x: 15,
|
|
4890
|
+
y: 25,
|
|
4891
|
+
rx: 1
|
|
4892
|
+
})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement("rect", {
|
|
4893
|
+
width: 13,
|
|
4894
|
+
height: 4,
|
|
4895
|
+
x: 15,
|
|
4896
|
+
y: 33,
|
|
4897
|
+
rx: 1
|
|
4898
|
+
})));
|
|
4899
|
+
};
|
|
4900
|
+
var FormIcon = SvgForm;
|
|
4807
4901
|
|
|
4902
|
+
var _path$7;
|
|
4808
4903
|
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); }
|
|
4809
|
-
var
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4904
|
+
var SvgGroup = function SvgGroup(props) {
|
|
4905
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
4906
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4907
|
+
width: 54,
|
|
4908
|
+
height: 54
|
|
4909
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
|
|
4910
|
+
fillRule: "evenodd",
|
|
4911
|
+
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"
|
|
4912
|
+
})));
|
|
4913
|
+
};
|
|
4914
|
+
var ColumnsIcon = SvgGroup;
|
|
4820
4915
|
|
|
4916
|
+
var _path$6;
|
|
4821
4917
|
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); }
|
|
4822
|
-
var
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4918
|
+
var SvgNumber = function SvgNumber(props) {
|
|
4919
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
4920
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4921
|
+
width: 54,
|
|
4922
|
+
height: 54,
|
|
4923
|
+
fill: "currentcolor"
|
|
4924
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
|
|
4925
|
+
fillRule: "evenodd",
|
|
4926
|
+
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"
|
|
4927
|
+
})));
|
|
4928
|
+
};
|
|
4929
|
+
var NumberIcon = SvgNumber;
|
|
4834
4930
|
|
|
4931
|
+
var _path$5;
|
|
4835
4932
|
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); }
|
|
4836
|
-
var
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
}
|
|
4845
|
-
|
|
4846
|
-
|
|
4933
|
+
var SvgRadio = function SvgRadio(props) {
|
|
4934
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
4935
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4936
|
+
width: 54,
|
|
4937
|
+
height: 54,
|
|
4938
|
+
fill: "currentcolor"
|
|
4939
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
|
|
4940
|
+
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"
|
|
4941
|
+
})));
|
|
4942
|
+
};
|
|
4943
|
+
var RadioIcon = SvgRadio;
|
|
4847
4944
|
|
|
4945
|
+
var _path$4;
|
|
4848
4946
|
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); }
|
|
4849
|
-
var
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4947
|
+
var SvgSelect = function SvgSelect(props) {
|
|
4948
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
4949
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4950
|
+
width: 54,
|
|
4951
|
+
height: 54,
|
|
4952
|
+
fill: "currentcolor"
|
|
4953
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
|
|
4954
|
+
fillRule: "evenodd",
|
|
4955
|
+
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"
|
|
4956
|
+
})));
|
|
4957
|
+
};
|
|
4958
|
+
var SelectIcon = SvgSelect;
|
|
4861
4959
|
|
|
4960
|
+
var _path$3;
|
|
4862
4961
|
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); }
|
|
4863
|
-
var
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
}
|
|
4872
|
-
|
|
4873
|
-
|
|
4962
|
+
var SvgText = function SvgText(props) {
|
|
4963
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
4964
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4965
|
+
width: 54,
|
|
4966
|
+
height: 54,
|
|
4967
|
+
fill: "currentcolor"
|
|
4968
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
4969
|
+
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"
|
|
4970
|
+
})));
|
|
4971
|
+
};
|
|
4972
|
+
var TextIcon = SvgText;
|
|
4874
4973
|
|
|
4974
|
+
var _path$2;
|
|
4875
4975
|
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); }
|
|
4876
|
-
var
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4976
|
+
var SvgTextfield = function SvgTextfield(props) {
|
|
4977
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
4978
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4979
|
+
width: 54,
|
|
4980
|
+
height: 54,
|
|
4981
|
+
fill: "currentcolor"
|
|
4982
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
4983
|
+
fillRule: "evenodd",
|
|
4984
|
+
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"
|
|
4985
|
+
})));
|
|
4986
|
+
};
|
|
4987
|
+
var TextfieldIcon = SvgTextfield;
|
|
4888
4988
|
|
|
4989
|
+
var _path$1;
|
|
4889
4990
|
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); }
|
|
4890
|
-
var
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4991
|
+
var SvgTextarea = function SvgTextarea(props) {
|
|
4992
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
4993
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4994
|
+
width: 54,
|
|
4995
|
+
height: 54,
|
|
4996
|
+
fill: "currentcolor"
|
|
4997
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
4998
|
+
fillRule: "evenodd",
|
|
4999
|
+
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"
|
|
5000
|
+
})));
|
|
5001
|
+
};
|
|
5002
|
+
var TextareaIcon = SvgTextarea;
|
|
4902
5003
|
|
|
5004
|
+
var _path, _path2;
|
|
4903
5005
|
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); }
|
|
4904
|
-
var
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
5006
|
+
var SvgImage = function SvgImage(props) {
|
|
5007
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
5008
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5009
|
+
width: 54,
|
|
5010
|
+
height: 54,
|
|
5011
|
+
fill: "currentcolor"
|
|
5012
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
5013
|
+
fillRule: "evenodd",
|
|
5014
|
+
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",
|
|
5015
|
+
clipRule: "evenodd"
|
|
5016
|
+
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
5017
|
+
fillRule: "evenodd",
|
|
5018
|
+
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",
|
|
5019
|
+
clipRule: "evenodd"
|
|
5020
|
+
})));
|
|
5021
|
+
};
|
|
5022
|
+
var ImageIcon = SvgImage;
|
|
4921
5023
|
|
|
4922
5024
|
const iconsByType = type => {
|
|
4923
5025
|
return {
|