@scenid/react-formulator 1.2.5-mui5-1 → 1.2.5
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/dist/index.cjs.css +96 -1
- package/dist/index.cjs.js +153 -102
- package/dist/index.esm.css +96 -1
- package/dist/index.esm.js +115 -90
- package/package.json +90 -95
package/dist/index.esm.css
CHANGED
|
@@ -1 +1,96 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shades of Purple Theme — for Highlightjs.
|
|
3
|
+
*
|
|
4
|
+
* @author (c) Ahmad Awais <https://twitter.com/mrahmadawais/>
|
|
5
|
+
* @link GitHub Repo → https://github.com/ahmadawais/Shades-of-Purple-HighlightJS
|
|
6
|
+
* @version 1.5.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.hljs {
|
|
10
|
+
display: block;
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
/* Custom font is optional */
|
|
13
|
+
/* font-family: 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; */
|
|
14
|
+
padding: 0.5em;
|
|
15
|
+
background: #2d2b57;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hljs-title {
|
|
20
|
+
color: #fad000;
|
|
21
|
+
font-weight: normal;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.hljs-name {
|
|
25
|
+
color: #a1feff;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hljs-tag {
|
|
29
|
+
color: #ffffff;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hljs-attr {
|
|
33
|
+
color: #f8d000;
|
|
34
|
+
font-style: italic;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hljs-built_in,
|
|
38
|
+
.hljs-selector-tag,
|
|
39
|
+
.hljs-section {
|
|
40
|
+
color: #fb9e00;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.hljs-keyword {
|
|
44
|
+
color: #fb9e00;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hljs,
|
|
48
|
+
.hljs-subst {
|
|
49
|
+
color: #e3dfff;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hljs-string,
|
|
53
|
+
.hljs-attribute,
|
|
54
|
+
.hljs-symbol,
|
|
55
|
+
.hljs-bullet,
|
|
56
|
+
.hljs-addition,
|
|
57
|
+
.hljs-code,
|
|
58
|
+
.hljs-regexp,
|
|
59
|
+
.hljs-selector-class,
|
|
60
|
+
.hljs-selector-attr,
|
|
61
|
+
.hljs-selector-pseudo,
|
|
62
|
+
.hljs-template-tag,
|
|
63
|
+
.hljs-quote,
|
|
64
|
+
.hljs-deletion {
|
|
65
|
+
color: #4cd213;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.hljs-meta,
|
|
69
|
+
.hljs-meta-string {
|
|
70
|
+
color: #fb9e00;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.hljs-comment {
|
|
74
|
+
color: #ac65ff;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hljs-keyword,
|
|
78
|
+
.hljs-selector-tag,
|
|
79
|
+
.hljs-literal,
|
|
80
|
+
.hljs-name,
|
|
81
|
+
.hljs-strong {
|
|
82
|
+
font-weight: normal;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hljs-literal,
|
|
86
|
+
.hljs-number {
|
|
87
|
+
color: #fa658d;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.hljs-emphasis {
|
|
91
|
+
font-style: italic;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.hljs-strong {
|
|
95
|
+
font-weight: bold;
|
|
96
|
+
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,15 +1,41 @@
|
|
|
1
1
|
import React, { useCallback, useState, useEffect, useRef, cloneElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import _Input from '@material-ui/core/esm/Input';
|
|
4
|
+
import _Paper from '@material-ui/core/esm/Paper';
|
|
5
|
+
import _Box from '@material-ui/core/esm/Box';
|
|
6
|
+
import _Typography from '@material-ui/core/esm/Typography';
|
|
7
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
8
|
+
import _FormGroup from '@material-ui/core/esm/FormGroup';
|
|
9
|
+
import _FormControl from '@material-ui/core/esm/FormControl';
|
|
10
|
+
import _FormHelperText from '@material-ui/core/esm/FormHelperText';
|
|
11
|
+
import _FormControlLabel from '@material-ui/core/esm/FormControlLabel';
|
|
12
|
+
import _InputAdornment from '@material-ui/core/esm/InputAdornment';
|
|
5
13
|
import cx from 'classnames';
|
|
6
|
-
import { makeStyles as makeStyles$1, useTheme } from '@
|
|
7
|
-
import
|
|
8
|
-
import
|
|
14
|
+
import { makeStyles as makeStyles$1, useTheme } from '@material-ui/styles';
|
|
15
|
+
import AutorenewIcon from '@material-ui/icons/Autorenew';
|
|
16
|
+
import _TextField from '@material-ui/core/esm/TextField';
|
|
17
|
+
import _CircularProgress from '@material-ui/core/esm/CircularProgress';
|
|
18
|
+
import Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';
|
|
19
|
+
import _MenuItem from '@material-ui/core/esm/MenuItem';
|
|
20
|
+
import _Switch from '@material-ui/core/esm/Switch';
|
|
21
|
+
import _Checkbox from '@material-ui/core/esm/Checkbox';
|
|
22
|
+
import _ClickAwayListener from '@material-ui/core/esm/ClickAwayListener';
|
|
23
|
+
import _Clear from '@material-ui/icons/esm/Clear';
|
|
24
|
+
import _Save from '@material-ui/icons/esm/Save';
|
|
25
|
+
import _Button from '@material-ui/core/esm/Button';
|
|
26
|
+
import _List from '@material-ui/core/esm/List';
|
|
27
|
+
import _ListItem from '@material-ui/core/esm/ListItem';
|
|
28
|
+
import _ListItemSecondaryAction from '@material-ui/core/esm/ListItemSecondaryAction';
|
|
29
|
+
import _IconButton from '@material-ui/core/esm/IconButton';
|
|
30
|
+
import _Delete from '@material-ui/icons/esm/Delete';
|
|
31
|
+
import _ListItemText from '@material-ui/core/esm/ListItemText';
|
|
9
32
|
import path$3 from 'path';
|
|
10
33
|
import proc from 'process';
|
|
11
34
|
import { fileURLToPath } from 'url';
|
|
12
|
-
import {
|
|
35
|
+
import { Alert } from '@material-ui/lab';
|
|
36
|
+
import _Close from '@material-ui/icons/esm/Close';
|
|
37
|
+
import _Check from '@material-ui/icons/esm/Check';
|
|
38
|
+
import { alpha as alpha$1 } from '@material-ui/core/styles/colorManipulator';
|
|
13
39
|
|
|
14
40
|
function _classCallCheck(instance, Constructor) {
|
|
15
41
|
if (!(instance instanceof Constructor)) {
|
|
@@ -29367,20 +29393,20 @@ var FormGroupHeader = function FormGroupHeader(_ref) {
|
|
|
29367
29393
|
descVariant = _ref.descVariant,
|
|
29368
29394
|
textAlign = _ref.textAlign;
|
|
29369
29395
|
if (!label && !desc) return false;
|
|
29370
|
-
return /*#__PURE__*/React.createElement(
|
|
29396
|
+
return /*#__PURE__*/React.createElement(_Box, {
|
|
29371
29397
|
style: {
|
|
29372
29398
|
width: '100%',
|
|
29373
29399
|
display: 'flex',
|
|
29374
29400
|
flexDirection: 'column'
|
|
29375
29401
|
}
|
|
29376
|
-
}, label && /*#__PURE__*/React.createElement(
|
|
29402
|
+
}, label && /*#__PURE__*/React.createElement(_Box, {
|
|
29377
29403
|
mb: 2
|
|
29378
|
-
}, /*#__PURE__*/React.createElement(
|
|
29404
|
+
}, /*#__PURE__*/React.createElement(_Typography, {
|
|
29379
29405
|
variant: labelVariant,
|
|
29380
29406
|
align: textAlign
|
|
29381
|
-
}, label)), desc && /*#__PURE__*/React.createElement(
|
|
29407
|
+
}, label)), desc && /*#__PURE__*/React.createElement(_Box, {
|
|
29382
29408
|
mb: 2
|
|
29383
|
-
}, /*#__PURE__*/React.createElement(
|
|
29409
|
+
}, /*#__PURE__*/React.createElement(_Typography, {
|
|
29384
29410
|
variant: descVariant,
|
|
29385
29411
|
align: textAlign
|
|
29386
29412
|
}, desc)));
|
|
@@ -29406,11 +29432,11 @@ var FormSectionCard = function FormSectionCard(_ref) {
|
|
|
29406
29432
|
descVariant = _ref.descVariant,
|
|
29407
29433
|
textAlign = _ref.textAlign,
|
|
29408
29434
|
children = _ref.children;
|
|
29409
|
-
return /*#__PURE__*/React.createElement(
|
|
29435
|
+
return /*#__PURE__*/React.createElement(_Box, {
|
|
29410
29436
|
mb: 2
|
|
29411
|
-
}, /*#__PURE__*/React.createElement(
|
|
29437
|
+
}, /*#__PURE__*/React.createElement(_Paper, {
|
|
29412
29438
|
elevation: 0
|
|
29413
|
-
}, /*#__PURE__*/React.createElement(
|
|
29439
|
+
}, /*#__PURE__*/React.createElement(_Box, {
|
|
29414
29440
|
p: 2
|
|
29415
29441
|
}, /*#__PURE__*/React.createElement(FormGroupHeader, {
|
|
29416
29442
|
label: label,
|
|
@@ -29448,7 +29474,7 @@ var FormSectionBlock = function FormSectionBlock(_ref) {
|
|
|
29448
29474
|
textAlign = _ref.textAlign,
|
|
29449
29475
|
children = _ref.children;
|
|
29450
29476
|
var styles = useStyles$4();
|
|
29451
|
-
return /*#__PURE__*/React.createElement(
|
|
29477
|
+
return /*#__PURE__*/React.createElement(_Box, {
|
|
29452
29478
|
className: styles.formSectionBlock
|
|
29453
29479
|
}, /*#__PURE__*/React.createElement(FormGroupHeader, {
|
|
29454
29480
|
label: label,
|
|
@@ -29517,9 +29543,9 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29517
29543
|
var isRender = type === '@@render';
|
|
29518
29544
|
|
|
29519
29545
|
if (validating) {
|
|
29520
|
-
finalProps.endAdornment = [/*#__PURE__*/React.createElement(
|
|
29546
|
+
finalProps.endAdornment = [/*#__PURE__*/React.createElement(_InputAdornment, {
|
|
29521
29547
|
position: "end"
|
|
29522
|
-
}, /*#__PURE__*/React.createElement(
|
|
29548
|
+
}, /*#__PURE__*/React.createElement(AutorenewIcon, null))];
|
|
29523
29549
|
}
|
|
29524
29550
|
|
|
29525
29551
|
var control;
|
|
@@ -29555,19 +29581,19 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29555
29581
|
return control;
|
|
29556
29582
|
}
|
|
29557
29583
|
|
|
29558
|
-
return /*#__PURE__*/React.createElement(
|
|
29584
|
+
return /*#__PURE__*/React.createElement(_FormControl, {
|
|
29559
29585
|
className: "data-card-field",
|
|
29560
29586
|
error: dirty && hasErrors,
|
|
29561
29587
|
variant: variant,
|
|
29562
29588
|
margin: "dense",
|
|
29563
29589
|
fullWidth: true,
|
|
29564
29590
|
required: required
|
|
29565
|
-
}, isSwitch && /*#__PURE__*/React.createElement(
|
|
29591
|
+
}, isSwitch && /*#__PURE__*/React.createElement(_FormControlLabel, {
|
|
29566
29592
|
className: cx(_defineProperty({}, styles.error, dirty && hasErrors)),
|
|
29567
29593
|
control: control,
|
|
29568
29594
|
label: label,
|
|
29569
29595
|
labelPlacement: finalProps.labelPlacement || 'end'
|
|
29570
|
-
}), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(
|
|
29596
|
+
}), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(_FormHelperText, null, errors.map(function (e) {
|
|
29571
29597
|
return e.message;
|
|
29572
29598
|
}).join('. ')));
|
|
29573
29599
|
};
|
|
@@ -29613,7 +29639,7 @@ var FormField = function FormField(_ref2) {
|
|
|
29613
29639
|
});
|
|
29614
29640
|
}
|
|
29615
29641
|
|
|
29616
|
-
return /*#__PURE__*/React.createElement(
|
|
29642
|
+
return /*#__PURE__*/React.createElement(_FormGroup, null, prepend, /*#__PURE__*/React.createElement(FormControlField$1, finalProps), append);
|
|
29617
29643
|
};
|
|
29618
29644
|
|
|
29619
29645
|
FormField.propTypes = {
|
|
@@ -29675,7 +29701,7 @@ var FormText = function FormText(props) {
|
|
|
29675
29701
|
} // eslint-disable-next-line react/jsx-props-no-spreading
|
|
29676
29702
|
|
|
29677
29703
|
|
|
29678
|
-
return /*#__PURE__*/React.createElement(
|
|
29704
|
+
return /*#__PURE__*/React.createElement(_TextField, _extends({
|
|
29679
29705
|
type: type
|
|
29680
29706
|
}, finalProps));
|
|
29681
29707
|
};
|
|
@@ -29704,7 +29730,7 @@ var FormNumber = function FormNumber(_ref) {
|
|
|
29704
29730
|
_onChange = _ref.onChange,
|
|
29705
29731
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
29706
29732
|
|
|
29707
|
-
return /*#__PURE__*/React.createElement(
|
|
29733
|
+
return /*#__PURE__*/React.createElement(_TextField, _extends({
|
|
29708
29734
|
name: name,
|
|
29709
29735
|
type: "number",
|
|
29710
29736
|
value: castToNumber(value, step),
|
|
@@ -36748,7 +36774,7 @@ var FormReadOnlyText = function FormReadOnlyText(_ref) {
|
|
|
36748
36774
|
finalValue = DateTime.fromISO(value).toLocaleString(formatter);
|
|
36749
36775
|
}
|
|
36750
36776
|
|
|
36751
|
-
return /*#__PURE__*/React.createElement(
|
|
36777
|
+
return /*#__PURE__*/React.createElement(_Typography, {
|
|
36752
36778
|
variant: "body1",
|
|
36753
36779
|
style: {
|
|
36754
36780
|
whiteSpace: multiline ? 'pre-line' : 'inherit'
|
|
@@ -36775,17 +36801,16 @@ var _renderInput = function renderInput(_ref, params) {
|
|
|
36775
36801
|
|
|
36776
36802
|
if (loading) {
|
|
36777
36803
|
InputProps = {
|
|
36778
|
-
endAdornment: /*#__PURE__*/React.createElement(
|
|
36804
|
+
endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
|
|
36779
36805
|
position: "end"
|
|
36780
|
-
}, /*#__PURE__*/React.createElement(
|
|
36806
|
+
}, /*#__PURE__*/React.createElement(_CircularProgress, {
|
|
36781
36807
|
size: 20,
|
|
36782
36808
|
thickness: 4
|
|
36783
36809
|
}))
|
|
36784
36810
|
};
|
|
36785
36811
|
}
|
|
36786
36812
|
|
|
36787
|
-
return /*#__PURE__*/React.createElement(
|
|
36788
|
-
, _extends({}, params, {
|
|
36813
|
+
return /*#__PURE__*/React.createElement(_TextField, _extends({}, params, {
|
|
36789
36814
|
required: required,
|
|
36790
36815
|
label: label,
|
|
36791
36816
|
variant: variant,
|
|
@@ -36930,20 +36955,20 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
|
|
|
36930
36955
|
}
|
|
36931
36956
|
|
|
36932
36957
|
if (!options) {
|
|
36933
|
-
return /*#__PURE__*/React.createElement(
|
|
36958
|
+
return /*#__PURE__*/React.createElement(_FormControl, {
|
|
36934
36959
|
error: dirty && hasErrors,
|
|
36935
36960
|
margin: "dense",
|
|
36936
36961
|
fullWidth: true,
|
|
36937
36962
|
required: required
|
|
36938
|
-
}, /*#__PURE__*/React.createElement(
|
|
36963
|
+
}, /*#__PURE__*/React.createElement(_TextField, {
|
|
36939
36964
|
label: label,
|
|
36940
36965
|
variant: variant,
|
|
36941
36966
|
value: value,
|
|
36942
36967
|
disabled: true,
|
|
36943
36968
|
InputProps: {
|
|
36944
|
-
endAdornment: /*#__PURE__*/React.createElement(
|
|
36969
|
+
endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
|
|
36945
36970
|
position: "end"
|
|
36946
|
-
}, /*#__PURE__*/React.createElement(
|
|
36971
|
+
}, /*#__PURE__*/React.createElement(_CircularProgress, {
|
|
36947
36972
|
size: 20,
|
|
36948
36973
|
thickness: 4
|
|
36949
36974
|
}))
|
|
@@ -36951,7 +36976,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
|
|
|
36951
36976
|
}));
|
|
36952
36977
|
}
|
|
36953
36978
|
|
|
36954
|
-
return /*#__PURE__*/React.createElement(
|
|
36979
|
+
return /*#__PURE__*/React.createElement(_FormControl, {
|
|
36955
36980
|
error: dirty && hasErrors,
|
|
36956
36981
|
margin: "dense",
|
|
36957
36982
|
fullWidth: true,
|
|
@@ -36966,14 +36991,14 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
|
|
|
36966
36991
|
required: required,
|
|
36967
36992
|
disabled: disabled,
|
|
36968
36993
|
renderOption: function renderOption(option) {
|
|
36969
|
-
return /*#__PURE__*/React.createElement(
|
|
36994
|
+
return /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Typography, {
|
|
36970
36995
|
variant: "body1"
|
|
36971
|
-
}, option.entry), option.count !== undefined && option.count !== null && /*#__PURE__*/React.createElement(
|
|
36996
|
+
}, option.entry), option.count !== undefined && option.count !== null && /*#__PURE__*/React.createElement(_Typography, {
|
|
36972
36997
|
variant: "caption"
|
|
36973
36998
|
}, "".concat(option.count, " Eintr\xE4ge")));
|
|
36974
36999
|
},
|
|
36975
37000
|
renderNewOption: function renderNewOption(newValue) {
|
|
36976
|
-
return /*#__PURE__*/React.createElement(
|
|
37001
|
+
return /*#__PURE__*/React.createElement(_Typography, {
|
|
36977
37002
|
variant: "body1"
|
|
36978
37003
|
}, /*#__PURE__*/React.createElement("strong", null, "\"".concat(newValue, "\" ")), "erstellen");
|
|
36979
37004
|
},
|
|
@@ -36988,7 +37013,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
|
|
|
36988
37013
|
if (abort) abort();
|
|
36989
37014
|
},
|
|
36990
37015
|
onChange: changeValue
|
|
36991
|
-
}), dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(
|
|
37016
|
+
}), dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(_FormHelperText, null, errors.map(function (e) {
|
|
36992
37017
|
return e.message;
|
|
36993
37018
|
}).join('. ')));
|
|
36994
37019
|
};
|
|
@@ -37039,7 +37064,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
37039
37064
|
var finalValue = '';
|
|
37040
37065
|
if (value !== undefined) finalValue = value;
|
|
37041
37066
|
if (finalValue === '' && defaultValue !== undefined) finalValue = defaultValue;
|
|
37042
|
-
return /*#__PURE__*/React.createElement(
|
|
37067
|
+
return /*#__PURE__*/React.createElement(_TextField, _extends({
|
|
37043
37068
|
select: true,
|
|
37044
37069
|
required: required,
|
|
37045
37070
|
value: finalValue // eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -37047,7 +37072,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
37047
37072
|
}, props), allOptions.map(function (_ref2) {
|
|
37048
37073
|
var itemLabel = _ref2.label,
|
|
37049
37074
|
itemValue = _ref2.value;
|
|
37050
|
-
return /*#__PURE__*/React.createElement(
|
|
37075
|
+
return /*#__PURE__*/React.createElement(_MenuItem, {
|
|
37051
37076
|
key: itemLabel,
|
|
37052
37077
|
value: itemValue
|
|
37053
37078
|
}, itemLabel);
|
|
@@ -37129,7 +37154,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
37129
37154
|
};
|
|
37130
37155
|
|
|
37131
37156
|
if (variant === 'checkbox') {
|
|
37132
|
-
return /*#__PURE__*/React.createElement(
|
|
37157
|
+
return /*#__PURE__*/React.createElement(_Checkbox, {
|
|
37133
37158
|
color: "primary",
|
|
37134
37159
|
name: name,
|
|
37135
37160
|
checked: isChecked$2(value, defaultValue),
|
|
@@ -37137,7 +37162,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
37137
37162
|
});
|
|
37138
37163
|
}
|
|
37139
37164
|
|
|
37140
|
-
return /*#__PURE__*/React.createElement(
|
|
37165
|
+
return /*#__PURE__*/React.createElement(_Switch, {
|
|
37141
37166
|
color: "primary",
|
|
37142
37167
|
name: name,
|
|
37143
37168
|
checked: isChecked$2(value, defaultValue),
|
|
@@ -37268,72 +37293,72 @@ var FormRepeater = function FormRepeater(_ref) {
|
|
|
37268
37293
|
});
|
|
37269
37294
|
}
|
|
37270
37295
|
|
|
37271
|
-
return /*#__PURE__*/React.createElement(
|
|
37296
|
+
return /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Typography, {
|
|
37272
37297
|
variant: "body1"
|
|
37273
|
-
}, label), (!entries || (entries === null || entries === void 0 ? void 0 : entries.length) === 0) && /*#__PURE__*/React.createElement(
|
|
37298
|
+
}, label), (!entries || (entries === null || entries === void 0 ? void 0 : entries.length) === 0) && /*#__PURE__*/React.createElement(_Box, {
|
|
37274
37299
|
mt: 1,
|
|
37275
37300
|
pl: 2
|
|
37276
|
-
}, /*#__PURE__*/React.createElement(
|
|
37301
|
+
}, /*#__PURE__*/React.createElement(_Typography, {
|
|
37277
37302
|
variant: "body2",
|
|
37278
37303
|
color: "textSecondary"
|
|
37279
|
-
}, "Keine Eintr\xE4ge vorhanden")), /*#__PURE__*/React.createElement(
|
|
37304
|
+
}, "Keine Eintr\xE4ge vorhanden")), /*#__PURE__*/React.createElement(_List, {
|
|
37280
37305
|
dense: true
|
|
37281
37306
|
}, entries.map(function (entry, index) {
|
|
37282
37307
|
return (
|
|
37283
37308
|
/*#__PURE__*/
|
|
37284
37309
|
// eslint-disable-next-line react/no-array-index-key
|
|
37285
|
-
React.createElement(
|
|
37310
|
+
React.createElement(_ListItem, {
|
|
37286
37311
|
key: "entry-".concat(index)
|
|
37287
|
-
}, /*#__PURE__*/React.createElement(
|
|
37312
|
+
}, /*#__PURE__*/React.createElement(_ListItemText, {
|
|
37288
37313
|
primary: getValue$1(entry, options)
|
|
37289
|
-
}), /*#__PURE__*/React.createElement(
|
|
37314
|
+
}), /*#__PURE__*/React.createElement(_ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(_IconButton, {
|
|
37290
37315
|
edge: "end",
|
|
37291
37316
|
"aria-label": "delete",
|
|
37292
37317
|
size: "small",
|
|
37293
37318
|
onClick: function onClick() {
|
|
37294
37319
|
return handleEntryDel(index);
|
|
37295
37320
|
}
|
|
37296
|
-
}, /*#__PURE__*/React.createElement(
|
|
37321
|
+
}, /*#__PURE__*/React.createElement(_Delete, {
|
|
37297
37322
|
fontSize: "small"
|
|
37298
37323
|
}))))
|
|
37299
37324
|
);
|
|
37300
|
-
})), !inEdit && /*#__PURE__*/React.createElement(
|
|
37325
|
+
})), !inEdit && /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Button, {
|
|
37301
37326
|
color: "primary",
|
|
37302
37327
|
variant: "outlined",
|
|
37303
37328
|
onClick: function onClick() {
|
|
37304
37329
|
return setInEdit(true);
|
|
37305
37330
|
}
|
|
37306
|
-
}, "Eintr\xE4ge hinzuf\xFCgen")), inEdit && !options && /*#__PURE__*/React.createElement(
|
|
37331
|
+
}, "Eintr\xE4ge hinzuf\xFCgen")), inEdit && !options && /*#__PURE__*/React.createElement(_Box, {
|
|
37307
37332
|
width: "100%",
|
|
37308
37333
|
display: "flex",
|
|
37309
37334
|
alignItems: "center"
|
|
37310
|
-
}, /*#__PURE__*/React.createElement(
|
|
37335
|
+
}, /*#__PURE__*/React.createElement(_ClickAwayListener, {
|
|
37311
37336
|
onClickAway: function onClickAway() {
|
|
37312
37337
|
if (inputValue === '') {
|
|
37313
37338
|
setInEdit(false);
|
|
37314
37339
|
}
|
|
37315
37340
|
}
|
|
37316
|
-
}, /*#__PURE__*/React.createElement(
|
|
37341
|
+
}, /*#__PURE__*/React.createElement(_FormControl, {
|
|
37317
37342
|
variant: "filled",
|
|
37318
37343
|
fullWidth: true
|
|
37319
|
-
}, /*#__PURE__*/React.createElement(
|
|
37344
|
+
}, /*#__PURE__*/React.createElement(_TextField, {
|
|
37320
37345
|
label: "Neuer Eintrag",
|
|
37321
37346
|
variant: variant,
|
|
37322
37347
|
value: inputValue,
|
|
37323
37348
|
InputProps: {
|
|
37324
|
-
endAdornment: /*#__PURE__*/React.createElement(
|
|
37349
|
+
endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
|
|
37325
37350
|
position: "end"
|
|
37326
|
-
}, /*#__PURE__*/React.createElement(
|
|
37351
|
+
}, /*#__PURE__*/React.createElement(_Box, {
|
|
37327
37352
|
mr: 1
|
|
37328
|
-
}, /*#__PURE__*/React.createElement(
|
|
37353
|
+
}, /*#__PURE__*/React.createElement(_IconButton, {
|
|
37329
37354
|
size: "small",
|
|
37330
37355
|
onClick: handleEntryAdd
|
|
37331
|
-
}, /*#__PURE__*/React.createElement(
|
|
37356
|
+
}, /*#__PURE__*/React.createElement(_Save, {
|
|
37332
37357
|
fontSize: "small"
|
|
37333
|
-
}))), /*#__PURE__*/React.createElement(
|
|
37358
|
+
}))), /*#__PURE__*/React.createElement(_IconButton, {
|
|
37334
37359
|
size: "small",
|
|
37335
37360
|
onClick: handleCancelNewEntry
|
|
37336
|
-
}, /*#__PURE__*/React.createElement(
|
|
37361
|
+
}, /*#__PURE__*/React.createElement(_Clear, {
|
|
37337
37362
|
fontSize: "small"
|
|
37338
37363
|
})))
|
|
37339
37364
|
},
|
|
@@ -37344,14 +37369,14 @@ var FormRepeater = function FormRepeater(_ref) {
|
|
|
37344
37369
|
onChange: function onChange(e) {
|
|
37345
37370
|
return setInputValue(e.target.value);
|
|
37346
37371
|
}
|
|
37347
|
-
})))), inEdit && options && /*#__PURE__*/React.createElement(
|
|
37372
|
+
})))), inEdit && options && /*#__PURE__*/React.createElement(_Box, {
|
|
37348
37373
|
width: "100%",
|
|
37349
37374
|
display: "flex",
|
|
37350
37375
|
alignItems: "center"
|
|
37351
|
-
}, /*#__PURE__*/React.createElement(
|
|
37376
|
+
}, /*#__PURE__*/React.createElement(_FormControl, {
|
|
37352
37377
|
variant: "filled",
|
|
37353
37378
|
fullWidth: true
|
|
37354
|
-
}, /*#__PURE__*/React.createElement(
|
|
37379
|
+
}, /*#__PURE__*/React.createElement(_TextField, {
|
|
37355
37380
|
label: "Eintrag ausw\xE4hlen",
|
|
37356
37381
|
select: true,
|
|
37357
37382
|
variant: variant,
|
|
@@ -37364,7 +37389,7 @@ var FormRepeater = function FormRepeater(_ref) {
|
|
|
37364
37389
|
}, Object.entries(options).sort(function (a, b) {
|
|
37365
37390
|
return a[1].localeCompare(b[1]);
|
|
37366
37391
|
}).map(function (e) {
|
|
37367
|
-
return /*#__PURE__*/React.createElement(
|
|
37392
|
+
return /*#__PURE__*/React.createElement(_MenuItem, {
|
|
37368
37393
|
key: "option-".concat(e[0]),
|
|
37369
37394
|
value: e[0],
|
|
37370
37395
|
disabled: blockedOptions.includes(e[0])
|
|
@@ -37430,9 +37455,9 @@ var FormControlField = function FormControlField(_ref) {
|
|
|
37430
37455
|
|
|
37431
37456
|
var control;
|
|
37432
37457
|
if (type === '@@render') control = /*#__PURE__*/React.cloneElement(component, finalProps);else control = /*#__PURE__*/React.createElement(component, finalProps);
|
|
37433
|
-
return /*#__PURE__*/React.createElement(
|
|
37458
|
+
return /*#__PURE__*/React.createElement(_Box, {
|
|
37434
37459
|
className: styles.readOnlyField
|
|
37435
|
-
}, label && !isSwitch && /*#__PURE__*/React.createElement(
|
|
37460
|
+
}, label && !isSwitch && /*#__PURE__*/React.createElement(_Typography, {
|
|
37436
37461
|
variant: "caption",
|
|
37437
37462
|
color: "textSecondary"
|
|
37438
37463
|
}, label), control);
|
|
@@ -75759,22 +75784,22 @@ var FormReadOnlyBoolean = function FormReadOnlyBoolean(_ref) {
|
|
|
75759
75784
|
labelPlacement = _ref.labelPlacement;
|
|
75760
75785
|
|
|
75761
75786
|
if (variant === 'checkbox') {
|
|
75762
|
-
return /*#__PURE__*/React.createElement(
|
|
75787
|
+
return /*#__PURE__*/React.createElement(_FormControlLabel, {
|
|
75763
75788
|
label: label,
|
|
75764
75789
|
labelPlacement: labelPlacement || 'end',
|
|
75765
75790
|
disabled: true,
|
|
75766
|
-
control: /*#__PURE__*/React.createElement(
|
|
75791
|
+
control: /*#__PURE__*/React.createElement(_Checkbox, {
|
|
75767
75792
|
name: name,
|
|
75768
75793
|
checked: isChecked$1(value, defaultValue)
|
|
75769
75794
|
})
|
|
75770
75795
|
});
|
|
75771
75796
|
}
|
|
75772
75797
|
|
|
75773
|
-
return /*#__PURE__*/React.createElement(
|
|
75798
|
+
return /*#__PURE__*/React.createElement(_FormControlLabel, {
|
|
75774
75799
|
label: label,
|
|
75775
75800
|
labelPlacement: labelPlacement || 'end',
|
|
75776
75801
|
disabled: true,
|
|
75777
|
-
control: /*#__PURE__*/React.createElement(
|
|
75802
|
+
control: /*#__PURE__*/React.createElement(_Switch, {
|
|
75778
75803
|
name: name,
|
|
75779
75804
|
checked: isChecked$1(value, defaultValue)
|
|
75780
75805
|
})
|
|
@@ -75808,16 +75833,16 @@ var FormReadOnlyRepeater = function FormReadOnlyRepeater(_ref) {
|
|
|
75808
75833
|
var value = _ref.value,
|
|
75809
75834
|
options = _ref.options;
|
|
75810
75835
|
var styles = useStyles$1();
|
|
75811
|
-
return /*#__PURE__*/React.createElement(
|
|
75836
|
+
return /*#__PURE__*/React.createElement(_List, {
|
|
75812
75837
|
className: styles.formRepeater,
|
|
75813
75838
|
dense: true
|
|
75814
75839
|
}, value && value.map(function (entry, index) {
|
|
75815
75840
|
return (
|
|
75816
75841
|
/*#__PURE__*/
|
|
75817
75842
|
// eslint-disable-next-line react/no-array-index-key
|
|
75818
|
-
React.createElement(
|
|
75843
|
+
React.createElement(_ListItem, {
|
|
75819
75844
|
key: "entry-".concat(index)
|
|
75820
|
-
}, /*#__PURE__*/React.createElement(
|
|
75845
|
+
}, /*#__PURE__*/React.createElement(_ListItemText, {
|
|
75821
75846
|
primary: getValue(entry, options),
|
|
75822
75847
|
style: {
|
|
75823
75848
|
margin: 0
|
|
@@ -75835,11 +75860,11 @@ FormReadOnlyRepeater.propTypes = {
|
|
|
75835
75860
|
var HiddenData = function HiddenData(_ref) {
|
|
75836
75861
|
var subject = _ref.subject,
|
|
75837
75862
|
label = _ref.label;
|
|
75838
|
-
return /*#__PURE__*/React.createElement(
|
|
75863
|
+
return /*#__PURE__*/React.createElement(_Box, {
|
|
75839
75864
|
mb: 2
|
|
75840
75865
|
}, /*#__PURE__*/React.createElement(Alert, {
|
|
75841
75866
|
severity: "warning"
|
|
75842
|
-
}, /*#__PURE__*/React.createElement(
|
|
75867
|
+
}, /*#__PURE__*/React.createElement(_Typography, {
|
|
75843
75868
|
variant: "body1"
|
|
75844
75869
|
}, subject ? "".concat(subject, " ") : '', /*#__PURE__*/React.createElement("span", {
|
|
75845
75870
|
style: {
|
|
@@ -75881,8 +75906,8 @@ var formComponentMap = {
|
|
|
75881
75906
|
array: FormRepeater
|
|
75882
75907
|
};
|
|
75883
75908
|
var apComponentMap = {
|
|
75884
|
-
"default":
|
|
75885
|
-
string:
|
|
75909
|
+
"default": _Input,
|
|
75910
|
+
string: _Input,
|
|
75886
75911
|
number: FormNumber,
|
|
75887
75912
|
select: FormCatalogType,
|
|
75888
75913
|
"boolean": FormBoolean
|
|
@@ -77021,20 +77046,20 @@ var FormOptionsLoader = function FormOptionsLoader(_ref) {
|
|
|
77021
77046
|
}, []);
|
|
77022
77047
|
|
|
77023
77048
|
if (!options) {
|
|
77024
|
-
return /*#__PURE__*/React.createElement(
|
|
77049
|
+
return /*#__PURE__*/React.createElement(_FormControl, {
|
|
77025
77050
|
error: dirty && hasErrors,
|
|
77026
77051
|
margin: "dense",
|
|
77027
77052
|
fullWidth: true,
|
|
77028
77053
|
required: required
|
|
77029
|
-
}, /*#__PURE__*/React.createElement(
|
|
77054
|
+
}, /*#__PURE__*/React.createElement(_TextField, {
|
|
77030
77055
|
label: label,
|
|
77031
77056
|
variant: variant,
|
|
77032
77057
|
value: value,
|
|
77033
77058
|
disabled: true,
|
|
77034
77059
|
InputProps: {
|
|
77035
|
-
endAdornment: /*#__PURE__*/React.createElement(
|
|
77060
|
+
endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
|
|
77036
77061
|
position: "end"
|
|
77037
|
-
}, /*#__PURE__*/React.createElement(
|
|
77062
|
+
}, /*#__PURE__*/React.createElement(_CircularProgress, {
|
|
77038
77063
|
size: 20,
|
|
77039
77064
|
thickness: 4
|
|
77040
77065
|
}))
|
|
@@ -77042,7 +77067,7 @@ var FormOptionsLoader = function FormOptionsLoader(_ref) {
|
|
|
77042
77067
|
}));
|
|
77043
77068
|
}
|
|
77044
77069
|
|
|
77045
|
-
return /*#__PURE__*/React.createElement(
|
|
77070
|
+
return /*#__PURE__*/React.createElement(_FormControl, {
|
|
77046
77071
|
error: dirty && hasErrors,
|
|
77047
77072
|
margin: "dense",
|
|
77048
77073
|
fullWidth: true,
|
|
@@ -77170,33 +77195,33 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
|
|
|
77170
77195
|
};
|
|
77171
77196
|
|
|
77172
77197
|
var checked = isChecked(value, defaultValue);
|
|
77173
|
-
return /*#__PURE__*/React.createElement(
|
|
77198
|
+
return /*#__PURE__*/React.createElement(_Paper, {
|
|
77174
77199
|
elevation: 0,
|
|
77175
77200
|
className: cx(styles["default"], (_cx = {
|
|
77176
77201
|
clickable: !readOnly
|
|
77177
77202
|
}, _defineProperty(_cx, styles.spanSolitaryToCard, solitary && formVariant === 'card'), _defineProperty(_cx, styles.spanBannerToCard, !solitary && formVariant === 'card'), _defineProperty(_cx, styles.sharpEdges, !solitary), _defineProperty(_cx, styles.checked, checked), _defineProperty(_cx, styles.unchecked, !checked), _cx)),
|
|
77178
77203
|
onClick: handleToggleChange
|
|
77179
|
-
}, /*#__PURE__*/React.createElement(
|
|
77204
|
+
}, /*#__PURE__*/React.createElement(_Box, {
|
|
77180
77205
|
display: "flex",
|
|
77181
77206
|
flexDirection: "row",
|
|
77182
77207
|
justifyContent: readOnly ? 'flex-start' : 'space-between',
|
|
77183
77208
|
alignItems: "center"
|
|
77184
|
-
}, readOnly && checked && /*#__PURE__*/React.createElement(
|
|
77209
|
+
}, readOnly && checked && /*#__PURE__*/React.createElement(_Box, {
|
|
77185
77210
|
mr: 2,
|
|
77186
77211
|
mb: -0.5
|
|
77187
|
-
}, /*#__PURE__*/React.createElement(
|
|
77212
|
+
}, /*#__PURE__*/React.createElement(_Check, {
|
|
77188
77213
|
fontSize: solitary ? 'large' : 'medium',
|
|
77189
77214
|
htmlColor: theme.palette.text.secondary
|
|
77190
|
-
})), readOnly && !checked && /*#__PURE__*/React.createElement(
|
|
77215
|
+
})), readOnly && !checked && /*#__PURE__*/React.createElement(_Box, {
|
|
77191
77216
|
mr: 2,
|
|
77192
77217
|
mb: -0.5
|
|
77193
|
-
}, /*#__PURE__*/React.createElement(
|
|
77218
|
+
}, /*#__PURE__*/React.createElement(_Close, {
|
|
77194
77219
|
fontSize: solitary ? 'large' : 'medium',
|
|
77195
77220
|
htmlColor: theme.palette.text.secondary
|
|
77196
|
-
})), /*#__PURE__*/React.createElement(
|
|
77221
|
+
})), /*#__PURE__*/React.createElement(_Typography, {
|
|
77197
77222
|
variant: solitary ? 'h5' : 'body1',
|
|
77198
77223
|
color: checked && !readOnly ? 'primary' : 'textSecondary'
|
|
77199
|
-
}, checked ? checkedLabel : uncheckedLabel), !readOnly && /*#__PURE__*/React.createElement(
|
|
77224
|
+
}, checked ? checkedLabel : uncheckedLabel), !readOnly && /*#__PURE__*/React.createElement(_Switch, {
|
|
77200
77225
|
color: "primary",
|
|
77201
77226
|
name: name,
|
|
77202
77227
|
checked: checked,
|