@scenid/react-formulator 1.2.5 → 2.1.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/dist/index.esm.js CHANGED
@@ -1,41 +1,15 @@
1
1
  import React, { useCallback, useState, useEffect, useRef, cloneElement } from 'react';
2
2
  import PropTypes from 'prop-types';
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';
3
+ import { Box, Typography, Paper, FormGroup, InputAdornment, FormControl, FormControlLabel, FormHelperText, Stack, TextField, CircularProgress, MenuItem, Checkbox, Switch, List, ListItem, ListItemText, ListItemSecondaryAction, IconButton, Button, ClickAwayListener, Alert, Input } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
13
5
  import cx from 'classnames';
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';
6
+ import { makeStyles as makeStyles$1, useTheme } from '@mui/styles';
7
+ import { Autorenew, Delete, Save, Clear, Check, Close } from '@mui/icons-material';
8
+ import Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete';
32
9
  import path$3 from 'path';
33
10
  import proc from 'process';
34
11
  import { fileURLToPath } from 'url';
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';
12
+ import { alpha as alpha$1 } from '@mui/material/styles';
39
13
 
40
14
  function _classCallCheck(instance, Constructor) {
41
15
  if (!(instance instanceof Constructor)) {
@@ -2254,19 +2228,19 @@ var anObject$1E = anObject$1G;
2254
2228
  var concat$6 = uncurryThis$1k([].concat);
2255
2229
 
2256
2230
  // all object keys, includes non-enumerable and symbols
2257
- var ownKeys$9 = getBuiltIn$I('Reflect', 'ownKeys') || function ownKeys(it) {
2231
+ var ownKeys$8 = getBuiltIn$I('Reflect', 'ownKeys') || function ownKeys(it) {
2258
2232
  var keys = getOwnPropertyNamesModule$2.f(anObject$1E(it));
2259
2233
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$3.f;
2260
2234
  return getOwnPropertySymbols ? concat$6(keys, getOwnPropertySymbols(it)) : keys;
2261
2235
  };
2262
2236
 
2263
2237
  var hasOwn$v = hasOwnProperty_1;
2264
- var ownKeys$8 = ownKeys$9;
2238
+ var ownKeys$7 = ownKeys$8;
2265
2239
  var getOwnPropertyDescriptorModule$6 = objectGetOwnPropertyDescriptor;
2266
2240
  var definePropertyModule$a = objectDefineProperty;
2267
2241
 
2268
2242
  var copyConstructorProperties$4 = function (target, source, exceptions) {
2269
- var keys = ownKeys$8(source);
2243
+ var keys = ownKeys$7(source);
2270
2244
  var defineProperty = definePropertyModule$a.f;
2271
2245
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule$6.f;
2272
2246
  for (var i = 0; i < keys.length; i++) {
@@ -7973,7 +7947,7 @@ $$3p({ target: 'Object', stat: true, forced: FORCED$9, sham: !DESCRIPTORS$i }, {
7973
7947
 
7974
7948
  var $$3o = _export;
7975
7949
  var DESCRIPTORS$h = descriptors;
7976
- var ownKeys$7 = ownKeys$9;
7950
+ var ownKeys$6 = ownKeys$8;
7977
7951
  var toIndexedObject$7 = toIndexedObject$k;
7978
7952
  var getOwnPropertyDescriptorModule$4 = objectGetOwnPropertyDescriptor;
7979
7953
  var createProperty$1 = createProperty$9;
@@ -7984,7 +7958,7 @@ $$3o({ target: 'Object', stat: true, sham: !DESCRIPTORS$h }, {
7984
7958
  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
7985
7959
  var O = toIndexedObject$7(object);
7986
7960
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule$4.f;
7987
- var keys = ownKeys$7(O);
7961
+ var keys = ownKeys$6(O);
7988
7962
  var result = {};
7989
7963
  var index = 0;
7990
7964
  var key, descriptor;
@@ -9350,12 +9324,12 @@ $$2S({ target: 'Reflect', stat: true }, {
9350
9324
  });
9351
9325
 
9352
9326
  var $$2R = _export;
9353
- var ownKeys$6 = ownKeys$9;
9327
+ var ownKeys$5 = ownKeys$8;
9354
9328
 
9355
9329
  // `Reflect.ownKeys` method
9356
9330
  // https://tc39.es/ecma262/#sec-reflect.ownkeys
9357
9331
  $$2R({ target: 'Reflect', stat: true }, {
9358
- ownKeys: ownKeys$6
9332
+ ownKeys: ownKeys$5
9359
9333
  });
9360
9334
 
9361
9335
  var $$2Q = _export;
@@ -29393,20 +29367,20 @@ var FormGroupHeader = function FormGroupHeader(_ref) {
29393
29367
  descVariant = _ref.descVariant,
29394
29368
  textAlign = _ref.textAlign;
29395
29369
  if (!label && !desc) return false;
29396
- return /*#__PURE__*/React.createElement(_Box, {
29370
+ return /*#__PURE__*/React.createElement(Box, {
29397
29371
  style: {
29398
29372
  width: '100%',
29399
29373
  display: 'flex',
29400
29374
  flexDirection: 'column'
29401
29375
  }
29402
- }, label && /*#__PURE__*/React.createElement(_Box, {
29376
+ }, label && /*#__PURE__*/React.createElement(Box, {
29403
29377
  mb: 2
29404
- }, /*#__PURE__*/React.createElement(_Typography, {
29378
+ }, /*#__PURE__*/React.createElement(Typography, {
29405
29379
  variant: labelVariant,
29406
29380
  align: textAlign
29407
- }, label)), desc && /*#__PURE__*/React.createElement(_Box, {
29381
+ }, label)), desc && /*#__PURE__*/React.createElement(Box, {
29408
29382
  mb: 2
29409
- }, /*#__PURE__*/React.createElement(_Typography, {
29383
+ }, /*#__PURE__*/React.createElement(Typography, {
29410
29384
  variant: descVariant,
29411
29385
  align: textAlign
29412
29386
  }, desc)));
@@ -29432,11 +29406,11 @@ var FormSectionCard = function FormSectionCard(_ref) {
29432
29406
  descVariant = _ref.descVariant,
29433
29407
  textAlign = _ref.textAlign,
29434
29408
  children = _ref.children;
29435
- return /*#__PURE__*/React.createElement(_Box, {
29409
+ return /*#__PURE__*/React.createElement(Box, {
29436
29410
  mb: 2
29437
- }, /*#__PURE__*/React.createElement(_Paper, {
29411
+ }, /*#__PURE__*/React.createElement(Paper, {
29438
29412
  elevation: 0
29439
- }, /*#__PURE__*/React.createElement(_Box, {
29413
+ }, /*#__PURE__*/React.createElement(Box, {
29440
29414
  p: 2
29441
29415
  }, /*#__PURE__*/React.createElement(FormGroupHeader, {
29442
29416
  label: label,
@@ -29474,7 +29448,7 @@ var FormSectionBlock = function FormSectionBlock(_ref) {
29474
29448
  textAlign = _ref.textAlign,
29475
29449
  children = _ref.children;
29476
29450
  var styles = useStyles$4();
29477
- return /*#__PURE__*/React.createElement(_Box, {
29451
+ return /*#__PURE__*/React.createElement(Box, {
29478
29452
  className: styles.formSectionBlock
29479
29453
  }, /*#__PURE__*/React.createElement(FormGroupHeader, {
29480
29454
  label: label,
@@ -29496,9 +29470,9 @@ FormSectionBlock.propTypes = {
29496
29470
 
29497
29471
  var _excluded$7 = ["prepend", "append", "componentProps"];
29498
29472
 
29499
- function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29473
+ function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29500
29474
 
29501
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29475
+ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29502
29476
  var useStyles$3 = makeStyles$1(function (theme) {
29503
29477
  return {
29504
29478
  error: {
@@ -29527,7 +29501,7 @@ var FormControlField$1 = function FormControlField(_ref) {
29527
29501
  onChange = _ref.onChange;
29528
29502
  var styles = useStyles$3();
29529
29503
 
29530
- var finalProps = _objectSpread$5(_objectSpread$5({
29504
+ var finalProps = _objectSpread$4(_objectSpread$4({
29531
29505
  formVariant: formVariant,
29532
29506
  name: name,
29533
29507
  label: label,
@@ -29543,9 +29517,9 @@ var FormControlField$1 = function FormControlField(_ref) {
29543
29517
  var isRender = type === '@@render';
29544
29518
 
29545
29519
  if (validating) {
29546
- finalProps.endAdornment = [/*#__PURE__*/React.createElement(_InputAdornment, {
29520
+ finalProps.endAdornment = [/*#__PURE__*/React.createElement(InputAdornment, {
29547
29521
  position: "end"
29548
- }, /*#__PURE__*/React.createElement(AutorenewIcon, null))];
29522
+ }, /*#__PURE__*/React.createElement(Autorenew, null))];
29549
29523
  }
29550
29524
 
29551
29525
  var control;
@@ -29553,7 +29527,7 @@ var FormControlField$1 = function FormControlField(_ref) {
29553
29527
  if (isRender) {
29554
29528
  try {
29555
29529
  var oldProps = component.props || {};
29556
- control = /*#__PURE__*/React.cloneElement(component, _objectSpread$5(_objectSpread$5(_objectSpread$5({
29530
+ control = /*#__PURE__*/React.cloneElement(component, _objectSpread$4(_objectSpread$4(_objectSpread$4({
29557
29531
  variant: variant
29558
29532
  }, finalProps), oldProps), {}, {
29559
29533
  label: label,
@@ -29566,7 +29540,7 @@ var FormControlField$1 = function FormControlField(_ref) {
29566
29540
  }
29567
29541
  } else {
29568
29542
  try {
29569
- control = /*#__PURE__*/React.createElement(component, _objectSpread$5({
29543
+ control = /*#__PURE__*/React.createElement(component, _objectSpread$4({
29570
29544
  variant: variant
29571
29545
  }, finalProps));
29572
29546
  } catch (e) {
@@ -29581,19 +29555,19 @@ var FormControlField$1 = function FormControlField(_ref) {
29581
29555
  return control;
29582
29556
  }
29583
29557
 
29584
- return /*#__PURE__*/React.createElement(_FormControl, {
29558
+ return /*#__PURE__*/React.createElement(FormControl, {
29585
29559
  className: "data-card-field",
29586
29560
  error: dirty && hasErrors,
29587
29561
  variant: variant,
29588
29562
  margin: "dense",
29589
29563
  fullWidth: true,
29590
29564
  required: required
29591
- }, isSwitch && /*#__PURE__*/React.createElement(_FormControlLabel, {
29565
+ }, isSwitch && /*#__PURE__*/React.createElement(FormControlLabel, {
29592
29566
  className: cx(_defineProperty({}, styles.error, dirty && hasErrors)),
29593
29567
  control: control,
29594
29568
  label: label,
29595
29569
  labelPlacement: finalProps.labelPlacement || 'end'
29596
- }), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(_FormHelperText, null, errors.map(function (e) {
29570
+ }), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(FormHelperText, null, errors.map(function (e) {
29597
29571
  return e.message;
29598
29572
  }).join('. ')));
29599
29573
  };
@@ -29627,7 +29601,7 @@ var FormField = function FormField(_ref2) {
29627
29601
  componentProps = _ref2.componentProps,
29628
29602
  fieldProps = _objectWithoutProperties(_ref2, _excluded$7);
29629
29603
 
29630
- var finalProps = _objectSpread$5({
29604
+ var finalProps = _objectSpread$4({
29631
29605
  componentProps: componentProps
29632
29606
  }, fieldProps);
29633
29607
 
@@ -29639,7 +29613,7 @@ var FormField = function FormField(_ref2) {
29639
29613
  });
29640
29614
  }
29641
29615
 
29642
- return /*#__PURE__*/React.createElement(_FormGroup, null, prepend, /*#__PURE__*/React.createElement(FormControlField$1, finalProps), append);
29616
+ return /*#__PURE__*/React.createElement(FormGroup, null, prepend, /*#__PURE__*/React.createElement(FormControlField$1, finalProps), append);
29643
29617
  };
29644
29618
 
29645
29619
  FormField.propTypes = {
@@ -29685,29 +29659,172 @@ function _extends() {
29685
29659
  return _extends.apply(this, arguments);
29686
29660
  }
29687
29661
 
29688
- function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29662
+ var FormDateRange = function FormDateRange(_ref) {
29663
+ var type = _ref.type,
29664
+ name = _ref.name,
29665
+ label = _ref.label,
29666
+ variant = _ref.variant,
29667
+ value = _ref.value,
29668
+ defaultValue = _ref.defaultValue,
29669
+ required = _ref.required,
29670
+ loading = _ref.loading,
29671
+ disabled = _ref.disabled,
29672
+ onChange = _ref.onChange;
29689
29673
 
29690
- function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29674
+ var changeHandler = function changeHandler(newValue) {
29675
+ if (onChange) {
29676
+ onChange({
29677
+ target: {
29678
+ name: name,
29679
+ value: newValue
29680
+ }
29681
+ });
29682
+ }
29683
+ };
29691
29684
 
29692
- var FormText = function FormText(props) {
29693
- var type = props.type;
29685
+ var handleStartChange = function handleStartChange(e) {
29686
+ var newValue = structuredClone(value || {});
29687
+ newValue.start = e.target.value;
29688
+ changeHandler(newValue);
29689
+ };
29694
29690
 
29695
- var finalProps = _objectSpread$4({}, props);
29691
+ var handleEndChange = function handleEndChange(e) {
29692
+ var newValue = structuredClone(value || {});
29693
+ newValue.end = e.target.value;
29694
+ changeHandler(newValue);
29695
+ };
29696
+
29697
+ return /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Typography, {
29698
+ mb: 1
29699
+ }, label), /*#__PURE__*/React.createElement(Stack, {
29700
+ direction: "row",
29701
+ sx: {
29702
+ flex: '1 1 auto',
29703
+ width: '100%'
29704
+ }
29705
+ }, /*#__PURE__*/React.createElement(TextField, {
29706
+ sx: {
29707
+ flex: '1 1 auto'
29708
+ },
29709
+ type: type,
29710
+ name: "".concat(name, ".start"),
29711
+ label: "von",
29712
+ variant: variant,
29713
+ InputLabelProps: {
29714
+ shrink: true
29715
+ },
29716
+ value: (value === null || value === void 0 ? void 0 : value.start) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.start) || '',
29717
+ max: (value === null || value === void 0 ? void 0 : value.end) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.end) || '',
29718
+ required: required,
29719
+ disabled: disabled || loading,
29720
+ onChange: handleStartChange
29721
+ }), /*#__PURE__*/React.createElement(Box, {
29722
+ sx: {
29723
+ display: 'flex',
29724
+ justifyContent: 'center',
29725
+ alignItems: 'center',
29726
+ ml: 2,
29727
+ mr: 2
29728
+ }
29729
+ }, /*#__PURE__*/React.createElement(Typography, {
29730
+ color: "GrayText"
29731
+ }, "\u2013")), /*#__PURE__*/React.createElement(TextField, {
29732
+ sx: {
29733
+ flex: '1 1 auto'
29734
+ },
29735
+ type: type,
29736
+ name: "".concat(name, ".end"),
29737
+ label: "bis",
29738
+ variant: variant,
29739
+ InputLabelProps: {
29740
+ shrink: true
29741
+ },
29742
+ value: (value === null || value === void 0 ? void 0 : value.end) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.end) || '',
29743
+ min: (value === null || value === void 0 ? void 0 : value.start) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.start) || '',
29744
+ required: required,
29745
+ disabled: disabled || loading,
29746
+ onChange: handleEndChange
29747
+ })));
29748
+ };
29749
+
29750
+ FormDateRange.propTypes = {
29751
+ type: PropTypes.string,
29752
+ name: PropTypes.string,
29753
+ label: PropTypes.string,
29754
+ variant: PropTypes.string,
29755
+ value: PropTypes.object,
29756
+ defaultValue: PropTypes.string,
29757
+ required: PropTypes.bool,
29758
+ loading: PropTypes.bool,
29759
+ disabled: PropTypes.bool,
29760
+ onChange: PropTypes.func
29761
+ };
29762
+
29763
+ var FormText = function FormText(_ref) {
29764
+ var type = _ref.type,
29765
+ name = _ref.name,
29766
+ label = _ref.label,
29767
+ variant = _ref.variant,
29768
+ value = _ref.value,
29769
+ defaultValue = _ref.defaultValue,
29770
+ multiline = _ref.multiline,
29771
+ minRows = _ref.minRows,
29772
+ range = _ref.range,
29773
+ required = _ref.required,
29774
+ loading = _ref.loading,
29775
+ disabled = _ref.disabled,
29776
+ onChange = _ref.onChange;
29777
+ var extraProps = {};
29696
29778
 
29697
29779
  if (type === 'date' || type === 'datetime-local') {
29698
- finalProps.InputLabelProps = {
29780
+ extraProps.InputLabelProps = {
29699
29781
  shrink: true
29700
29782
  };
29701
- } // eslint-disable-next-line react/jsx-props-no-spreading
29783
+ }
29702
29784
 
29785
+ if (range) {
29786
+ return /*#__PURE__*/React.createElement(FormDateRange, {
29787
+ type: type,
29788
+ name: name,
29789
+ label: label,
29790
+ variant: variant,
29791
+ value: value || defaultValue || '',
29792
+ required: required,
29793
+ disabled: disabled || loading,
29794
+ onChange: onChange || function () {}
29795
+ });
29796
+ }
29703
29797
 
29704
- return /*#__PURE__*/React.createElement(_TextField, _extends({
29705
- type: type
29706
- }, finalProps));
29798
+ return /*#__PURE__*/React.createElement(TextField, _extends({
29799
+ type: type,
29800
+ name: name,
29801
+ label: label,
29802
+ variant: variant,
29803
+ value: value || defaultValue || '',
29804
+ multiline: multiline,
29805
+ minRows: minRows,
29806
+ range: range,
29807
+ required: required,
29808
+ disabled: disabled || loading,
29809
+ onChange: onChange || function () {} // eslint-disable-next-line react/jsx-props-no-spreading
29810
+
29811
+ }, extraProps));
29707
29812
  };
29708
29813
 
29709
29814
  FormText.propTypes = {
29710
- type: PropTypes.string
29815
+ type: PropTypes.string,
29816
+ name: PropTypes.string,
29817
+ label: PropTypes.string,
29818
+ variant: PropTypes.string,
29819
+ value: PropTypes.string,
29820
+ defaultValue: PropTypes.string,
29821
+ multiline: PropTypes.bool,
29822
+ minRows: PropTypes.number,
29823
+ range: PropTypes.bool,
29824
+ required: PropTypes.bool,
29825
+ loading: PropTypes.bool,
29826
+ disabled: PropTypes.bool,
29827
+ onChange: PropTypes.func
29711
29828
  };
29712
29829
 
29713
29830
  var castToNumber = function castToNumber(value, step) {
@@ -29730,7 +29847,7 @@ var FormNumber = function FormNumber(_ref) {
29730
29847
  _onChange = _ref.onChange,
29731
29848
  props = _objectWithoutProperties(_ref, _excluded$6);
29732
29849
 
29733
- return /*#__PURE__*/React.createElement(_TextField, _extends({
29850
+ return /*#__PURE__*/React.createElement(TextField, _extends({
29734
29851
  name: name,
29735
29852
  type: "number",
29736
29853
  value: castToNumber(value, step),
@@ -36757,24 +36874,33 @@ function friendlyDateTime(dateTimeish) {
36757
36874
  }
36758
36875
  }
36759
36876
 
36877
+ var formatDate = function formatDate(value, renderFormat) {
36878
+ var formatter = DateTime.DATETIME_FULL;
36879
+
36880
+ if (renderFormat) {
36881
+ if (typeof renderFormat === 'string') formatter = DateTime[renderFormat];else formatter = renderFormat;
36882
+ }
36883
+
36884
+ return DateTime.fromISO(value).toLocaleString(formatter);
36885
+ };
36886
+
36760
36887
  var FormReadOnlyText = function FormReadOnlyText(_ref) {
36761
36888
  var value = _ref.value,
36762
36889
  type = _ref.type,
36763
36890
  renderFormat = _ref.renderFormat,
36891
+ range = _ref.range,
36764
36892
  multiline = _ref.multiline;
36765
36893
  var finalValue = value;
36766
36894
 
36767
36895
  if (type === 'date' || type === 'datetime-local') {
36768
- var formatter = DateTime.DATETIME_FULL;
36769
-
36770
- if (renderFormat) {
36771
- if (typeof renderFormat === 'string') formatter = DateTime[renderFormat];else formatter = renderFormat;
36896
+ if (range) {
36897
+ finalValue = "".concat(formatDate((value === null || value === void 0 ? void 0 : value.start) || '', renderFormat), " - ").concat(formatDate((value === null || value === void 0 ? void 0 : value.end) || '', renderFormat));
36898
+ } else {
36899
+ finalValue = formatDate(value, renderFormat);
36772
36900
  }
36773
-
36774
- finalValue = DateTime.fromISO(value).toLocaleString(formatter);
36775
36901
  }
36776
36902
 
36777
- return /*#__PURE__*/React.createElement(_Typography, {
36903
+ return /*#__PURE__*/React.createElement(Typography, {
36778
36904
  variant: "body1",
36779
36905
  style: {
36780
36906
  whiteSpace: multiline ? 'pre-line' : 'inherit'
@@ -36785,6 +36911,7 @@ var FormReadOnlyText = function FormReadOnlyText(_ref) {
36785
36911
  FormReadOnlyText.propTypes = {
36786
36912
  value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
36787
36913
  type: PropTypes.string,
36914
+ range: PropTypes.bool,
36788
36915
  renderFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
36789
36916
  multiline: PropTypes.bool
36790
36917
  };
@@ -36801,16 +36928,17 @@ var _renderInput = function renderInput(_ref, params) {
36801
36928
 
36802
36929
  if (loading) {
36803
36930
  InputProps = {
36804
- endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
36931
+ endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
36805
36932
  position: "end"
36806
- }, /*#__PURE__*/React.createElement(_CircularProgress, {
36933
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
36807
36934
  size: 20,
36808
36935
  thickness: 4
36809
36936
  }))
36810
36937
  };
36811
36938
  }
36812
36939
 
36813
- return /*#__PURE__*/React.createElement(_TextField, _extends({}, params, {
36940
+ return /*#__PURE__*/React.createElement(TextField // eslint-disable-next-line react/jsx-props-no-spreading
36941
+ , _extends({}, params, {
36814
36942
  required: required,
36815
36943
  label: label,
36816
36944
  variant: variant,
@@ -36838,7 +36966,7 @@ var SelectOrCreate = function SelectOrCreate(_ref2) {
36838
36966
  onInputChange = _ref2.onInputChange;
36839
36967
  return /*#__PURE__*/React.createElement(Autocomplete, {
36840
36968
  id: id,
36841
- value: value,
36969
+ value: value || '',
36842
36970
  fullWidth: true,
36843
36971
  disabled: disabled,
36844
36972
  onOpen: onOpen,
@@ -36870,6 +36998,7 @@ var SelectOrCreate = function SelectOrCreate(_ref2) {
36870
36998
  clearOnBlur: true,
36871
36999
  handleHomeEndKeys: true,
36872
37000
  options: options,
37001
+ freeSolo: allowCreate,
36873
37002
  getOptionLabel: function getOptionLabel(option) {
36874
37003
  // Value selected with enter, right from the input
36875
37004
  if (typeof option === 'string') {
@@ -36880,15 +37009,17 @@ var SelectOrCreate = function SelectOrCreate(_ref2) {
36880
37009
  } // Add "xxx" option created dynamically
36881
37010
 
36882
37011
 
36883
- if (option.inputValue) {
36884
- return option.inputValue;
37012
+ if (option !== null && option !== void 0 && option.inputValue) {
37013
+ return option === null || option === void 0 ? void 0 : option.inputValue;
36885
37014
  } // Regular option
36886
37015
 
36887
37016
 
36888
37017
  return option[searchKey];
36889
37018
  },
37019
+ isOptionEqualToValue: function isOptionEqualToValue(option, testValue) {
37020
+ return option[searchKey] === testValue;
37021
+ },
36890
37022
  renderOption: renderOption,
36891
- freeSolo: true,
36892
37023
  renderInput: function renderInput(params) {
36893
37024
  return _renderInput({
36894
37025
  required: required,
@@ -36914,11 +37045,11 @@ SelectOrCreate.propTypes = {
36914
37045
  searchKey: PropTypes.string.isRequired,
36915
37046
  renderOption: PropTypes.func.isRequired,
36916
37047
  renderNewOption: PropTypes.func.isRequired,
36917
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
37048
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
36918
37049
  onOpen: PropTypes.func,
36919
37050
  onClose: PropTypes.func,
36920
- onChange: PropTypes.func.isRequired,
36921
- onInputChange: PropTypes.func.isRequired
37051
+ onChange: PropTypes.func,
37052
+ onInputChange: PropTypes.func
36922
37053
  };
36923
37054
 
36924
37055
  var FormAutocomplete = function FormAutocomplete(_ref) {
@@ -36955,20 +37086,20 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
36955
37086
  }
36956
37087
 
36957
37088
  if (!options) {
36958
- return /*#__PURE__*/React.createElement(_FormControl, {
37089
+ return /*#__PURE__*/React.createElement(FormControl, {
36959
37090
  error: dirty && hasErrors,
36960
37091
  margin: "dense",
36961
37092
  fullWidth: true,
36962
37093
  required: required
36963
- }, /*#__PURE__*/React.createElement(_TextField, {
37094
+ }, /*#__PURE__*/React.createElement(TextField, {
36964
37095
  label: label,
36965
37096
  variant: variant,
36966
37097
  value: value,
36967
37098
  disabled: true,
36968
37099
  InputProps: {
36969
- endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
37100
+ endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
36970
37101
  position: "end"
36971
- }, /*#__PURE__*/React.createElement(_CircularProgress, {
37102
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
36972
37103
  size: 20,
36973
37104
  thickness: 4
36974
37105
  }))
@@ -36976,7 +37107,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
36976
37107
  }));
36977
37108
  }
36978
37109
 
36979
- return /*#__PURE__*/React.createElement(_FormControl, {
37110
+ return /*#__PURE__*/React.createElement(FormControl, {
36980
37111
  error: dirty && hasErrors,
36981
37112
  margin: "dense",
36982
37113
  fullWidth: true,
@@ -36990,15 +37121,23 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
36990
37121
  searchKey: "entry",
36991
37122
  required: required,
36992
37123
  disabled: disabled,
36993
- renderOption: function renderOption(option) {
36994
- return /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Typography, {
37124
+ renderOption: function renderOption(props, option) {
37125
+ return /*#__PURE__*/React.createElement(Box // eslint-disable-next-line react/jsx-props-no-spreading
37126
+ , _extends({}, props, {
37127
+ sx: {
37128
+ display: 'flex',
37129
+ flexDirection: 'column',
37130
+ justifyContent: 'flex-start',
37131
+ alignItems: 'flex-start'
37132
+ }
37133
+ }), /*#__PURE__*/React.createElement(Typography, {
36995
37134
  variant: "body1"
36996
- }, option.entry), option.count !== undefined && option.count !== null && /*#__PURE__*/React.createElement(_Typography, {
37135
+ }, option.entry), option.count !== undefined && option.count !== null && /*#__PURE__*/React.createElement(Typography, {
36997
37136
  variant: "caption"
36998
37137
  }, "".concat(option.count, " Eintr\xE4ge")));
36999
37138
  },
37000
37139
  renderNewOption: function renderNewOption(newValue) {
37001
- return /*#__PURE__*/React.createElement(_Typography, {
37140
+ return /*#__PURE__*/React.createElement(Typography, {
37002
37141
  variant: "body1"
37003
37142
  }, /*#__PURE__*/React.createElement("strong", null, "\"".concat(newValue, "\" ")), "erstellen");
37004
37143
  },
@@ -37013,7 +37152,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
37013
37152
  if (abort) abort();
37014
37153
  },
37015
37154
  onChange: changeValue
37016
- }), dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(_FormHelperText, null, errors.map(function (e) {
37155
+ }), dirty && !disabled && hasErrors && /*#__PURE__*/React.createElement(FormHelperText, null, errors.map(function (e) {
37017
37156
  return e.message;
37018
37157
  }).join('. ')));
37019
37158
  };
@@ -37026,7 +37165,7 @@ FormAutocomplete.propTypes = {
37026
37165
  options: PropTypes.arrayOf(PropTypes.shape({
37027
37166
  entry: PropTypes.string.isRequired,
37028
37167
  count: PropTypes.number
37029
- })).isRequired,
37168
+ })),
37030
37169
  allowCreate: PropTypes.bool,
37031
37170
  variant: PropTypes.oneOf(['standard', 'filled', 'outlined']),
37032
37171
  required: PropTypes.bool,
@@ -37040,39 +37179,44 @@ FormAutocomplete.propTypes = {
37040
37179
  onChange: PropTypes.func
37041
37180
  };
37042
37181
 
37043
- var _excluded$5 = ["options", "required", "defaultValue", "value", "noSort"];
37182
+ var _excluded$5 = ["name", "options", "required", "defaultValue", "value", "noSort", "onChange"];
37044
37183
 
37045
37184
  var FormSelect = function FormSelect(_ref) {
37046
- var options = _ref.options,
37185
+ var name = _ref.name,
37186
+ options = _ref.options,
37047
37187
  required = _ref.required,
37048
37188
  defaultValue = _ref.defaultValue,
37049
37189
  value = _ref.value,
37050
37190
  noSort = _ref.noSort,
37191
+ onChange = _ref.onChange,
37051
37192
  props = _objectWithoutProperties(_ref, _excluded$5);
37052
37193
 
37053
37194
  var allOptions = noSort ? options : options.sort(function (l, r) {
37054
37195
  return l.label.localeCompare(r.label);
37055
37196
  });
37056
37197
 
37057
- if (!required) {
37198
+ if (!required && !defaultValue) {
37058
37199
  allOptions.unshift({
37059
37200
  label: 'Auswahl löschen',
37060
- value: undefined
37201
+ value: ''
37061
37202
  });
37062
37203
  }
37063
37204
 
37064
37205
  var finalValue = '';
37065
37206
  if (value !== undefined) finalValue = value;
37066
37207
  if (finalValue === '' && defaultValue !== undefined) finalValue = defaultValue;
37067
- return /*#__PURE__*/React.createElement(_TextField, _extends({
37208
+ return /*#__PURE__*/React.createElement(TextField, _extends({
37209
+ name: name,
37068
37210
  select: true,
37069
37211
  required: required,
37070
37212
  value: finalValue // eslint-disable-next-line react/jsx-props-no-spreading
37071
37213
 
37072
- }, props), allOptions.map(function (_ref2) {
37214
+ }, props, {
37215
+ onChange: onChange
37216
+ }), allOptions.map(function (_ref2) {
37073
37217
  var itemLabel = _ref2.label,
37074
37218
  itemValue = _ref2.value;
37075
- return /*#__PURE__*/React.createElement(_MenuItem, {
37219
+ return /*#__PURE__*/React.createElement(MenuItem, {
37076
37220
  key: itemLabel,
37077
37221
  value: itemValue
37078
37222
  }, itemLabel);
@@ -37080,16 +37224,16 @@ var FormSelect = function FormSelect(_ref) {
37080
37224
  };
37081
37225
 
37082
37226
  FormSelect.propTypes = {
37083
- name: PropTypes.string.isRequired,
37227
+ name: PropTypes.string,
37084
37228
  defaultValue: PropTypes.string,
37085
37229
  value: PropTypes.string,
37086
37230
  options: PropTypes.arrayOf(PropTypes.shape({
37087
37231
  label: PropTypes.string.isRequired,
37088
37232
  value: PropTypes.any
37089
- })).isRequired,
37233
+ })),
37090
37234
  required: PropTypes.bool,
37091
37235
  noSort: PropTypes.bool,
37092
- onChange: PropTypes.func.isRequired
37236
+ onChange: PropTypes.func
37093
37237
  };
37094
37238
 
37095
37239
  var _excluded$4 = ["type", "options", "autocomplete"];
@@ -37154,7 +37298,7 @@ var FormBoolean = function FormBoolean(_ref) {
37154
37298
  };
37155
37299
 
37156
37300
  if (variant === 'checkbox') {
37157
- return /*#__PURE__*/React.createElement(_Checkbox, {
37301
+ return /*#__PURE__*/React.createElement(Checkbox, {
37158
37302
  color: "primary",
37159
37303
  name: name,
37160
37304
  checked: isChecked$2(value, defaultValue),
@@ -37162,7 +37306,7 @@ var FormBoolean = function FormBoolean(_ref) {
37162
37306
  });
37163
37307
  }
37164
37308
 
37165
- return /*#__PURE__*/React.createElement(_Switch, {
37309
+ return /*#__PURE__*/React.createElement(Switch, {
37166
37310
  color: "primary",
37167
37311
  name: name,
37168
37312
  checked: isChecked$2(value, defaultValue),
@@ -37293,72 +37437,72 @@ var FormRepeater = function FormRepeater(_ref) {
37293
37437
  });
37294
37438
  }
37295
37439
 
37296
- return /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Typography, {
37440
+ return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Typography, {
37297
37441
  variant: "body1"
37298
- }, label), (!entries || (entries === null || entries === void 0 ? void 0 : entries.length) === 0) && /*#__PURE__*/React.createElement(_Box, {
37442
+ }, label), (!entries || (entries === null || entries === void 0 ? void 0 : entries.length) === 0) && /*#__PURE__*/React.createElement(Box, {
37299
37443
  mt: 1,
37300
37444
  pl: 2
37301
- }, /*#__PURE__*/React.createElement(_Typography, {
37445
+ }, /*#__PURE__*/React.createElement(Typography, {
37302
37446
  variant: "body2",
37303
37447
  color: "textSecondary"
37304
- }, "Keine Eintr\xE4ge vorhanden")), /*#__PURE__*/React.createElement(_List, {
37448
+ }, "Keine Eintr\xE4ge vorhanden")), /*#__PURE__*/React.createElement(List, {
37305
37449
  dense: true
37306
37450
  }, entries.map(function (entry, index) {
37307
37451
  return (
37308
37452
  /*#__PURE__*/
37309
37453
  // eslint-disable-next-line react/no-array-index-key
37310
- React.createElement(_ListItem, {
37454
+ React.createElement(ListItem, {
37311
37455
  key: "entry-".concat(index)
37312
- }, /*#__PURE__*/React.createElement(_ListItemText, {
37456
+ }, /*#__PURE__*/React.createElement(ListItemText, {
37313
37457
  primary: getValue$1(entry, options)
37314
- }), /*#__PURE__*/React.createElement(_ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(_IconButton, {
37458
+ }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(IconButton, {
37315
37459
  edge: "end",
37316
37460
  "aria-label": "delete",
37317
37461
  size: "small",
37318
37462
  onClick: function onClick() {
37319
37463
  return handleEntryDel(index);
37320
37464
  }
37321
- }, /*#__PURE__*/React.createElement(_Delete, {
37465
+ }, /*#__PURE__*/React.createElement(Delete, {
37322
37466
  fontSize: "small"
37323
37467
  }))))
37324
37468
  );
37325
- })), !inEdit && /*#__PURE__*/React.createElement(_Box, null, /*#__PURE__*/React.createElement(_Button, {
37469
+ })), !inEdit && /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Button, {
37326
37470
  color: "primary",
37327
37471
  variant: "outlined",
37328
37472
  onClick: function onClick() {
37329
37473
  return setInEdit(true);
37330
37474
  }
37331
- }, "Eintr\xE4ge hinzuf\xFCgen")), inEdit && !options && /*#__PURE__*/React.createElement(_Box, {
37475
+ }, "Eintr\xE4ge hinzuf\xFCgen")), inEdit && !options && /*#__PURE__*/React.createElement(Box, {
37332
37476
  width: "100%",
37333
37477
  display: "flex",
37334
37478
  alignItems: "center"
37335
- }, /*#__PURE__*/React.createElement(_ClickAwayListener, {
37479
+ }, /*#__PURE__*/React.createElement(ClickAwayListener, {
37336
37480
  onClickAway: function onClickAway() {
37337
37481
  if (inputValue === '') {
37338
37482
  setInEdit(false);
37339
37483
  }
37340
37484
  }
37341
- }, /*#__PURE__*/React.createElement(_FormControl, {
37485
+ }, /*#__PURE__*/React.createElement(FormControl, {
37342
37486
  variant: "filled",
37343
37487
  fullWidth: true
37344
- }, /*#__PURE__*/React.createElement(_TextField, {
37488
+ }, /*#__PURE__*/React.createElement(TextField, {
37345
37489
  label: "Neuer Eintrag",
37346
37490
  variant: variant,
37347
37491
  value: inputValue,
37348
37492
  InputProps: {
37349
- endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
37493
+ endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
37350
37494
  position: "end"
37351
- }, /*#__PURE__*/React.createElement(_Box, {
37495
+ }, /*#__PURE__*/React.createElement(Box, {
37352
37496
  mr: 1
37353
- }, /*#__PURE__*/React.createElement(_IconButton, {
37497
+ }, /*#__PURE__*/React.createElement(IconButton, {
37354
37498
  size: "small",
37355
37499
  onClick: handleEntryAdd
37356
- }, /*#__PURE__*/React.createElement(_Save, {
37500
+ }, /*#__PURE__*/React.createElement(Save, {
37357
37501
  fontSize: "small"
37358
- }))), /*#__PURE__*/React.createElement(_IconButton, {
37502
+ }))), /*#__PURE__*/React.createElement(IconButton, {
37359
37503
  size: "small",
37360
37504
  onClick: handleCancelNewEntry
37361
- }, /*#__PURE__*/React.createElement(_Clear, {
37505
+ }, /*#__PURE__*/React.createElement(Clear, {
37362
37506
  fontSize: "small"
37363
37507
  })))
37364
37508
  },
@@ -37369,14 +37513,14 @@ var FormRepeater = function FormRepeater(_ref) {
37369
37513
  onChange: function onChange(e) {
37370
37514
  return setInputValue(e.target.value);
37371
37515
  }
37372
- })))), inEdit && options && /*#__PURE__*/React.createElement(_Box, {
37516
+ })))), inEdit && options && /*#__PURE__*/React.createElement(Box, {
37373
37517
  width: "100%",
37374
37518
  display: "flex",
37375
37519
  alignItems: "center"
37376
- }, /*#__PURE__*/React.createElement(_FormControl, {
37520
+ }, /*#__PURE__*/React.createElement(FormControl, {
37377
37521
  variant: "filled",
37378
37522
  fullWidth: true
37379
- }, /*#__PURE__*/React.createElement(_TextField, {
37523
+ }, /*#__PURE__*/React.createElement(TextField, {
37380
37524
  label: "Eintrag ausw\xE4hlen",
37381
37525
  select: true,
37382
37526
  variant: variant,
@@ -37389,7 +37533,7 @@ var FormRepeater = function FormRepeater(_ref) {
37389
37533
  }, Object.entries(options).sort(function (a, b) {
37390
37534
  return a[1].localeCompare(b[1]);
37391
37535
  }).map(function (e) {
37392
- return /*#__PURE__*/React.createElement(_MenuItem, {
37536
+ return /*#__PURE__*/React.createElement(MenuItem, {
37393
37537
  key: "option-".concat(e[0]),
37394
37538
  value: e[0],
37395
37539
  disabled: blockedOptions.includes(e[0])
@@ -37455,9 +37599,9 @@ var FormControlField = function FormControlField(_ref) {
37455
37599
 
37456
37600
  var control;
37457
37601
  if (type === '@@render') control = /*#__PURE__*/React.cloneElement(component, finalProps);else control = /*#__PURE__*/React.createElement(component, finalProps);
37458
- return /*#__PURE__*/React.createElement(_Box, {
37602
+ return /*#__PURE__*/React.createElement(Box, {
37459
37603
  className: styles.readOnlyField
37460
- }, label && !isSwitch && /*#__PURE__*/React.createElement(_Typography, {
37604
+ }, label && !isSwitch && /*#__PURE__*/React.createElement(Typography, {
37461
37605
  variant: "caption",
37462
37606
  color: "textSecondary"
37463
37607
  }, label), control);
@@ -75784,22 +75928,22 @@ var FormReadOnlyBoolean = function FormReadOnlyBoolean(_ref) {
75784
75928
  labelPlacement = _ref.labelPlacement;
75785
75929
 
75786
75930
  if (variant === 'checkbox') {
75787
- return /*#__PURE__*/React.createElement(_FormControlLabel, {
75931
+ return /*#__PURE__*/React.createElement(FormControlLabel, {
75788
75932
  label: label,
75789
75933
  labelPlacement: labelPlacement || 'end',
75790
75934
  disabled: true,
75791
- control: /*#__PURE__*/React.createElement(_Checkbox, {
75935
+ control: /*#__PURE__*/React.createElement(Checkbox, {
75792
75936
  name: name,
75793
75937
  checked: isChecked$1(value, defaultValue)
75794
75938
  })
75795
75939
  });
75796
75940
  }
75797
75941
 
75798
- return /*#__PURE__*/React.createElement(_FormControlLabel, {
75942
+ return /*#__PURE__*/React.createElement(FormControlLabel, {
75799
75943
  label: label,
75800
75944
  labelPlacement: labelPlacement || 'end',
75801
75945
  disabled: true,
75802
- control: /*#__PURE__*/React.createElement(_Switch, {
75946
+ control: /*#__PURE__*/React.createElement(Switch, {
75803
75947
  name: name,
75804
75948
  checked: isChecked$1(value, defaultValue)
75805
75949
  })
@@ -75833,16 +75977,16 @@ var FormReadOnlyRepeater = function FormReadOnlyRepeater(_ref) {
75833
75977
  var value = _ref.value,
75834
75978
  options = _ref.options;
75835
75979
  var styles = useStyles$1();
75836
- return /*#__PURE__*/React.createElement(_List, {
75980
+ return /*#__PURE__*/React.createElement(List, {
75837
75981
  className: styles.formRepeater,
75838
75982
  dense: true
75839
75983
  }, value && value.map(function (entry, index) {
75840
75984
  return (
75841
75985
  /*#__PURE__*/
75842
75986
  // eslint-disable-next-line react/no-array-index-key
75843
- React.createElement(_ListItem, {
75987
+ React.createElement(ListItem, {
75844
75988
  key: "entry-".concat(index)
75845
- }, /*#__PURE__*/React.createElement(_ListItemText, {
75989
+ }, /*#__PURE__*/React.createElement(ListItemText, {
75846
75990
  primary: getValue(entry, options),
75847
75991
  style: {
75848
75992
  margin: 0
@@ -75860,11 +76004,11 @@ FormReadOnlyRepeater.propTypes = {
75860
76004
  var HiddenData = function HiddenData(_ref) {
75861
76005
  var subject = _ref.subject,
75862
76006
  label = _ref.label;
75863
- return /*#__PURE__*/React.createElement(_Box, {
76007
+ return /*#__PURE__*/React.createElement(Box, {
75864
76008
  mb: 2
75865
76009
  }, /*#__PURE__*/React.createElement(Alert, {
75866
76010
  severity: "warning"
75867
- }, /*#__PURE__*/React.createElement(_Typography, {
76011
+ }, /*#__PURE__*/React.createElement(Typography, {
75868
76012
  variant: "body1"
75869
76013
  }, subject ? "".concat(subject, " ") : '', /*#__PURE__*/React.createElement("span", {
75870
76014
  style: {
@@ -75906,8 +76050,8 @@ var formComponentMap = {
75906
76050
  array: FormRepeater
75907
76051
  };
75908
76052
  var apComponentMap = {
75909
- "default": _Input,
75910
- string: _Input,
76053
+ "default": Input,
76054
+ string: Input,
75911
76055
  number: FormNumber,
75912
76056
  select: FormCatalogType,
75913
76057
  "boolean": FormBoolean
@@ -77046,20 +77190,20 @@ var FormOptionsLoader = function FormOptionsLoader(_ref) {
77046
77190
  }, []);
77047
77191
 
77048
77192
  if (!options) {
77049
- return /*#__PURE__*/React.createElement(_FormControl, {
77193
+ return /*#__PURE__*/React.createElement(FormControl, {
77050
77194
  error: dirty && hasErrors,
77051
77195
  margin: "dense",
77052
77196
  fullWidth: true,
77053
77197
  required: required
77054
- }, /*#__PURE__*/React.createElement(_TextField, {
77198
+ }, /*#__PURE__*/React.createElement(TextField, {
77055
77199
  label: label,
77056
77200
  variant: variant,
77057
77201
  value: value,
77058
77202
  disabled: true,
77059
77203
  InputProps: {
77060
- endAdornment: /*#__PURE__*/React.createElement(_InputAdornment, {
77204
+ endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
77061
77205
  position: "end"
77062
- }, /*#__PURE__*/React.createElement(_CircularProgress, {
77206
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
77063
77207
  size: 20,
77064
77208
  thickness: 4
77065
77209
  }))
@@ -77067,7 +77211,7 @@ var FormOptionsLoader = function FormOptionsLoader(_ref) {
77067
77211
  }));
77068
77212
  }
77069
77213
 
77070
- return /*#__PURE__*/React.createElement(_FormControl, {
77214
+ return /*#__PURE__*/React.createElement(FormControl, {
77071
77215
  error: dirty && hasErrors,
77072
77216
  margin: "dense",
77073
77217
  fullWidth: true,
@@ -77195,33 +77339,33 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
77195
77339
  };
77196
77340
 
77197
77341
  var checked = isChecked(value, defaultValue);
77198
- return /*#__PURE__*/React.createElement(_Paper, {
77342
+ return /*#__PURE__*/React.createElement(Paper, {
77199
77343
  elevation: 0,
77200
77344
  className: cx(styles["default"], (_cx = {
77201
77345
  clickable: !readOnly
77202
77346
  }, _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)),
77203
77347
  onClick: handleToggleChange
77204
- }, /*#__PURE__*/React.createElement(_Box, {
77348
+ }, /*#__PURE__*/React.createElement(Box, {
77205
77349
  display: "flex",
77206
77350
  flexDirection: "row",
77207
77351
  justifyContent: readOnly ? 'flex-start' : 'space-between',
77208
77352
  alignItems: "center"
77209
- }, readOnly && checked && /*#__PURE__*/React.createElement(_Box, {
77353
+ }, readOnly && checked && /*#__PURE__*/React.createElement(Box, {
77210
77354
  mr: 2,
77211
77355
  mb: -0.5
77212
- }, /*#__PURE__*/React.createElement(_Check, {
77356
+ }, /*#__PURE__*/React.createElement(Check, {
77213
77357
  fontSize: solitary ? 'large' : 'medium',
77214
77358
  htmlColor: theme.palette.text.secondary
77215
- })), readOnly && !checked && /*#__PURE__*/React.createElement(_Box, {
77359
+ })), readOnly && !checked && /*#__PURE__*/React.createElement(Box, {
77216
77360
  mr: 2,
77217
77361
  mb: -0.5
77218
- }, /*#__PURE__*/React.createElement(_Close, {
77362
+ }, /*#__PURE__*/React.createElement(Close, {
77219
77363
  fontSize: solitary ? 'large' : 'medium',
77220
77364
  htmlColor: theme.palette.text.secondary
77221
- })), /*#__PURE__*/React.createElement(_Typography, {
77365
+ })), /*#__PURE__*/React.createElement(Typography, {
77222
77366
  variant: solitary ? 'h5' : 'body1',
77223
77367
  color: checked && !readOnly ? 'primary' : 'textSecondary'
77224
- }, checked ? checkedLabel : uncheckedLabel), !readOnly && /*#__PURE__*/React.createElement(_Switch, {
77368
+ }, checked ? checkedLabel : uncheckedLabel), !readOnly && /*#__PURE__*/React.createElement(Switch, {
77225
77369
  color: "primary",
77226
77370
  name: name,
77227
77371
  checked: checked,