@scenid/react-formulator 0.1.10 → 0.1.11
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.js +43 -29
- package/dist/index.esm.js +43 -29
- package/package.json +3 -1
- package/src/Editable/FormField.jsx +2 -3
- package/src/Editable/FormSelect.jsx +2 -1
- package/src/FormulatorFormSection.jsx +18 -14
- package/src/ReadOnly/FormReadOnlyField.jsx +3 -3
- package/src/ReadOnly/FormReadOnlyText.jsx +17 -7
- package/stories/Forms.stories.jsx +3 -1
- package/stories/forms/rlp.render.schema.json +8 -29
- package/stories/forms/rlp.validation.schema.json +1 -560
package/dist/index.cjs.js
CHANGED
|
@@ -9,6 +9,7 @@ var cx = require('classnames');
|
|
|
9
9
|
var styles$n = require('@material-ui/styles');
|
|
10
10
|
var AutorenewIcon = require('@material-ui/icons/Autorenew');
|
|
11
11
|
var icons = require('@material-ui/icons');
|
|
12
|
+
var luxon = require('luxon');
|
|
12
13
|
var path$3 = require('path');
|
|
13
14
|
var proc = require('process');
|
|
14
15
|
var url = require('url');
|
|
@@ -29170,7 +29171,6 @@ var useStyles = styles$n.makeStyles(function (theme) {
|
|
|
29170
29171
|
var FormControlField$1 = function FormControlField(_ref) {
|
|
29171
29172
|
var variant = _ref.variant,
|
|
29172
29173
|
type = _ref.type,
|
|
29173
|
-
isRender = _ref.isRender,
|
|
29174
29174
|
name = _ref.name,
|
|
29175
29175
|
label = _ref.label,
|
|
29176
29176
|
component = _ref.component,
|
|
@@ -29199,6 +29199,8 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29199
29199
|
onChange: onChange
|
|
29200
29200
|
});
|
|
29201
29201
|
|
|
29202
|
+
var isRender = type === 'render';
|
|
29203
|
+
|
|
29202
29204
|
if (validating) {
|
|
29203
29205
|
finalProps.endAdornment = [/*#__PURE__*/React__default["default"].createElement(core$1.InputAdornment, {
|
|
29204
29206
|
position: "end"
|
|
@@ -29248,7 +29250,6 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29248
29250
|
|
|
29249
29251
|
FormControlField$1.propTypes = {
|
|
29250
29252
|
variant: PropTypes__default["default"].oneOf(['standard', 'filled', 'outlined']),
|
|
29251
|
-
isRender: PropTypes__default["default"].bool,
|
|
29252
29253
|
component: PropTypes__default["default"].any.isRequired,
|
|
29253
29254
|
componentProps: PropTypes__default["default"].object,
|
|
29254
29255
|
type: PropTypes__default["default"].string.isRequired,
|
|
@@ -29292,7 +29293,6 @@ var FormField = function FormField(_ref2) {
|
|
|
29292
29293
|
|
|
29293
29294
|
FormField.propTypes = {
|
|
29294
29295
|
variant: PropTypes__default["default"].oneOf(['standard', 'filled', 'outlined']),
|
|
29295
|
-
isRender: PropTypes__default["default"].bool,
|
|
29296
29296
|
component: PropTypes__default["default"].any.isRequired,
|
|
29297
29297
|
componentProps: PropTypes__default["default"].object,
|
|
29298
29298
|
type: PropTypes__default["default"].string.isRequired,
|
|
@@ -29399,11 +29399,12 @@ FormNumber.propTypes = {
|
|
|
29399
29399
|
onChange: PropTypes__default["default"].func.isRequired
|
|
29400
29400
|
};
|
|
29401
29401
|
|
|
29402
|
-
var _excluded$3 = ["options", "required"];
|
|
29402
|
+
var _excluded$3 = ["options", "required", "value"];
|
|
29403
29403
|
|
|
29404
29404
|
var FormSelect = function FormSelect(_ref) {
|
|
29405
29405
|
var options = _ref.options,
|
|
29406
29406
|
required = _ref.required,
|
|
29407
|
+
value = _ref.value,
|
|
29407
29408
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
29408
29409
|
|
|
29409
29410
|
var unselectOption = [];
|
|
@@ -29420,7 +29421,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
29420
29421
|
})));
|
|
29421
29422
|
return /*#__PURE__*/React__default["default"].createElement(core$1.TextField, _extends({
|
|
29422
29423
|
select: true,
|
|
29423
|
-
required: required
|
|
29424
|
+
required: required,
|
|
29425
|
+
value: value === undefined ? '' : value
|
|
29424
29426
|
}, props), allOptions.map(function (_ref2) {
|
|
29425
29427
|
var itemLabel = _ref2.label,
|
|
29426
29428
|
itemValue = _ref2.value;
|
|
@@ -29702,7 +29704,7 @@ function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
29702
29704
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29703
29705
|
|
|
29704
29706
|
var FormControlField = function FormControlField(_ref) {
|
|
29705
|
-
var
|
|
29707
|
+
var type = _ref.type,
|
|
29706
29708
|
name = _ref.name,
|
|
29707
29709
|
label = _ref.label,
|
|
29708
29710
|
component = _ref.component,
|
|
@@ -29725,7 +29727,7 @@ var FormControlField = function FormControlField(_ref) {
|
|
|
29725
29727
|
}
|
|
29726
29728
|
|
|
29727
29729
|
var control;
|
|
29728
|
-
if (
|
|
29730
|
+
if (type === 'render') control = /*#__PURE__*/React__default["default"].cloneElement(component, finalProps);else control = /*#__PURE__*/React__default["default"].createElement(component, finalProps);
|
|
29729
29731
|
return /*#__PURE__*/React__default["default"].createElement(core$1.Box, {
|
|
29730
29732
|
width: "100%",
|
|
29731
29733
|
display: "flex",
|
|
@@ -29738,10 +29740,10 @@ var FormControlField = function FormControlField(_ref) {
|
|
|
29738
29740
|
};
|
|
29739
29741
|
|
|
29740
29742
|
FormControlField.propTypes = {
|
|
29741
|
-
isRender: PropTypes__default["default"].bool,
|
|
29742
29743
|
component: PropTypes__default["default"].any.isRequired,
|
|
29743
29744
|
componentProps: PropTypes__default["default"].object,
|
|
29744
29745
|
name: PropTypes__default["default"].string.isRequired,
|
|
29746
|
+
type: PropTypes__default["default"].string.isRequired,
|
|
29745
29747
|
label: PropTypes__default["default"].string.isRequired,
|
|
29746
29748
|
value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number, PropTypes__default["default"].bool, PropTypes__default["default"].array]),
|
|
29747
29749
|
options: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
@@ -29800,14 +29802,21 @@ FormReadOnlyField.propTypes = {
|
|
|
29800
29802
|
};
|
|
29801
29803
|
var FormReadOnlyField$1 = /*#__PURE__*/React__default["default"].memo(FormReadOnlyField);
|
|
29802
29804
|
|
|
29803
|
-
var
|
|
29804
|
-
var value = _ref.value
|
|
29805
|
+
var FormReadOnlyText = function FormReadOnlyText(_ref) {
|
|
29806
|
+
var value = _ref.value,
|
|
29807
|
+
type = _ref.type;
|
|
29808
|
+
var finalValue = value;
|
|
29809
|
+
|
|
29810
|
+
if (type === 'date' || type === 'datetime-local') {
|
|
29811
|
+
finalValue = luxon.DateTime.fromISO(value).toLocaleString(luxon.DateTime.DATE_MED_WITH_WEEKDAY);
|
|
29812
|
+
}
|
|
29813
|
+
|
|
29805
29814
|
return /*#__PURE__*/React__default["default"].createElement(core$1.Typography, {
|
|
29806
29815
|
variant: "body1"
|
|
29807
|
-
},
|
|
29816
|
+
}, finalValue);
|
|
29808
29817
|
};
|
|
29809
29818
|
|
|
29810
|
-
|
|
29819
|
+
FormReadOnlyText.propTypes = {
|
|
29811
29820
|
value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string])
|
|
29812
29821
|
};
|
|
29813
29822
|
|
|
@@ -68022,7 +68031,7 @@ FormReadOnlyMarkdown.propTypes = {
|
|
|
68022
68031
|
|
|
68023
68032
|
var FormReadOnlyNumber = function FormReadOnlyNumber(_ref) {
|
|
68024
68033
|
var value = _ref.value;
|
|
68025
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
68034
|
+
return /*#__PURE__*/React__default["default"].createElement(FormReadOnlyText, {
|
|
68026
68035
|
value: castToNumber(value)
|
|
68027
68036
|
});
|
|
68028
68037
|
};
|
|
@@ -68036,7 +68045,7 @@ var FormReadOnlySelect = function FormReadOnlySelect(_ref) {
|
|
|
68036
68045
|
|
|
68037
68046
|
var value = _ref.value,
|
|
68038
68047
|
options = _ref.options;
|
|
68039
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
68048
|
+
return /*#__PURE__*/React__default["default"].createElement(FormReadOnlyText, {
|
|
68040
68049
|
value: (_options$find = options.find(function (o) {
|
|
68041
68050
|
return o.value === value;
|
|
68042
68051
|
})) === null || _options$find === void 0 ? void 0 : _options$find.label
|
|
@@ -75448,9 +75457,9 @@ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
75448
75457
|
|
|
75449
75458
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
75450
75459
|
var formReadOnlyComponentMap = {
|
|
75451
|
-
"default":
|
|
75460
|
+
"default": FormReadOnlyText,
|
|
75452
75461
|
markdown: FormReadOnlyMarkdown,
|
|
75453
|
-
string:
|
|
75462
|
+
string: FormReadOnlyText,
|
|
75454
75463
|
number: FormReadOnlyNumber,
|
|
75455
75464
|
select: FormReadOnlySelect,
|
|
75456
75465
|
"boolean": FormReadOnlyBoolean,
|
|
@@ -75492,17 +75501,23 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75492
75501
|
errorMessages = _this$props.errorMessages,
|
|
75493
75502
|
results = _this$props.results,
|
|
75494
75503
|
data = _this$props.data,
|
|
75495
|
-
fieldStates = _this$props.fieldStates
|
|
75504
|
+
fieldStates = _this$props.fieldStates,
|
|
75505
|
+
renderComponentMap = _this$props.renderComponentMap;
|
|
75496
75506
|
var field = fieldEntry,
|
|
75497
75507
|
specialProps = {};
|
|
75498
75508
|
|
|
75499
75509
|
if (Array.isArray(fieldEntry)) {
|
|
75500
75510
|
if (fieldEntry[0] === '@@render') {
|
|
75501
75511
|
field = fieldEntry[1];
|
|
75502
|
-
|
|
75503
|
-
|
|
75504
|
-
|
|
75505
|
-
|
|
75512
|
+
return {
|
|
75513
|
+
type: 'render',
|
|
75514
|
+
name: field,
|
|
75515
|
+
component: renderComponentMap[field],
|
|
75516
|
+
componentProps: fieldEntry[2] || {}
|
|
75517
|
+
};
|
|
75518
|
+
}
|
|
75519
|
+
|
|
75520
|
+
if (fieldEntry[0] === '@@markdown') {
|
|
75506
75521
|
return {
|
|
75507
75522
|
type: 'markdown',
|
|
75508
75523
|
name: fieldEntry[1],
|
|
@@ -75511,11 +75526,11 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75511
75526
|
content: fieldEntry[2]
|
|
75512
75527
|
}
|
|
75513
75528
|
};
|
|
75514
|
-
} else {
|
|
75515
|
-
field = fieldEntry[0];
|
|
75516
|
-
if (!fieldEntry[1]) throw new Error("field \"".concat(field, "\" is defined in an array, but has no props definition"));
|
|
75517
|
-
specialProps = fieldEntry[1];
|
|
75518
75529
|
}
|
|
75530
|
+
|
|
75531
|
+
field = fieldEntry[0];
|
|
75532
|
+
if (!fieldEntry[1]) throw new Error("field \"".concat(field, "\" is defined in an array, but has no props definition"));
|
|
75533
|
+
specialProps = fieldEntry[1];
|
|
75519
75534
|
}
|
|
75520
75535
|
|
|
75521
75536
|
var _specialProps = specialProps,
|
|
@@ -75536,8 +75551,8 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75536
75551
|
type = _schema$properties$fi.type,
|
|
75537
75552
|
defaultValue = _schema$properties$fi["default"];
|
|
75538
75553
|
var mapKey;
|
|
75539
|
-
if (
|
|
75540
|
-
var mapEntry =
|
|
75554
|
+
if (componentMap[field] !== undefined) mapKey = field;else if (typeof type === 'string' && componentMap[type] !== undefined) mapKey = type;else if (Array.isArray(type)) mapKey = 'select';else if (componentMap["default"] !== undefined) mapKey = 'default';else throw new Error("Could not find a Component to render for \"".concat(field, "\""));
|
|
75555
|
+
var mapEntry = componentMap[mapKey];
|
|
75541
75556
|
var component = mapEntry,
|
|
75542
75557
|
props = {};
|
|
75543
75558
|
|
|
@@ -75641,7 +75656,6 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75641
75656
|
type: _type,
|
|
75642
75657
|
label: _label,
|
|
75643
75658
|
value: _value,
|
|
75644
|
-
isRender: true,
|
|
75645
75659
|
required: _required,
|
|
75646
75660
|
hasErrors: _hasErrors,
|
|
75647
75661
|
errors: _errors,
|
|
@@ -76441,7 +76455,7 @@ exports.FormReadOnlyMarkdown = FormReadOnlyMarkdown;
|
|
|
76441
76455
|
exports.FormReadOnlyNumber = FormReadOnlyNumber;
|
|
76442
76456
|
exports.FormReadOnlyRepeater = FormReadOnlyRepeater;
|
|
76443
76457
|
exports.FormReadOnlySelect = FormReadOnlySelect;
|
|
76444
|
-
exports.FormReadOnlyText =
|
|
76458
|
+
exports.FormReadOnlyText = FormReadOnlyText;
|
|
76445
76459
|
exports.FormRepeater = FormRepeater;
|
|
76446
76460
|
exports.FormSelect = FormSelect;
|
|
76447
76461
|
exports.FormText = FormText;
|
package/dist/index.esm.js
CHANGED
|
@@ -7,6 +7,7 @@ import cx from 'classnames';
|
|
|
7
7
|
import { makeStyles as makeStyles$1 } from '@material-ui/styles';
|
|
8
8
|
import AutorenewIcon from '@material-ui/icons/Autorenew';
|
|
9
9
|
import { Delete, Save, Clear } from '@material-ui/icons';
|
|
10
|
+
import { DateTime } from 'luxon';
|
|
10
11
|
import path$3 from 'path';
|
|
11
12
|
import proc from 'process';
|
|
12
13
|
import { fileURLToPath } from 'url';
|
|
@@ -29126,7 +29127,6 @@ var useStyles = makeStyles$1(function (theme) {
|
|
|
29126
29127
|
var FormControlField$1 = function FormControlField(_ref) {
|
|
29127
29128
|
var variant = _ref.variant,
|
|
29128
29129
|
type = _ref.type,
|
|
29129
|
-
isRender = _ref.isRender,
|
|
29130
29130
|
name = _ref.name,
|
|
29131
29131
|
label = _ref.label,
|
|
29132
29132
|
component = _ref.component,
|
|
@@ -29155,6 +29155,8 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29155
29155
|
onChange: onChange
|
|
29156
29156
|
});
|
|
29157
29157
|
|
|
29158
|
+
var isRender = type === 'render';
|
|
29159
|
+
|
|
29158
29160
|
if (validating) {
|
|
29159
29161
|
finalProps.endAdornment = [/*#__PURE__*/React__default.createElement(InputAdornment, {
|
|
29160
29162
|
position: "end"
|
|
@@ -29204,7 +29206,6 @@ var FormControlField$1 = function FormControlField(_ref) {
|
|
|
29204
29206
|
|
|
29205
29207
|
FormControlField$1.propTypes = {
|
|
29206
29208
|
variant: PropTypes__default.oneOf(['standard', 'filled', 'outlined']),
|
|
29207
|
-
isRender: PropTypes__default.bool,
|
|
29208
29209
|
component: PropTypes__default.any.isRequired,
|
|
29209
29210
|
componentProps: PropTypes__default.object,
|
|
29210
29211
|
type: PropTypes__default.string.isRequired,
|
|
@@ -29248,7 +29249,6 @@ var FormField = function FormField(_ref2) {
|
|
|
29248
29249
|
|
|
29249
29250
|
FormField.propTypes = {
|
|
29250
29251
|
variant: PropTypes__default.oneOf(['standard', 'filled', 'outlined']),
|
|
29251
|
-
isRender: PropTypes__default.bool,
|
|
29252
29252
|
component: PropTypes__default.any.isRequired,
|
|
29253
29253
|
componentProps: PropTypes__default.object,
|
|
29254
29254
|
type: PropTypes__default.string.isRequired,
|
|
@@ -29355,11 +29355,12 @@ FormNumber.propTypes = {
|
|
|
29355
29355
|
onChange: PropTypes__default.func.isRequired
|
|
29356
29356
|
};
|
|
29357
29357
|
|
|
29358
|
-
var _excluded$3 = ["options", "required"];
|
|
29358
|
+
var _excluded$3 = ["options", "required", "value"];
|
|
29359
29359
|
|
|
29360
29360
|
var FormSelect = function FormSelect(_ref) {
|
|
29361
29361
|
var options = _ref.options,
|
|
29362
29362
|
required = _ref.required,
|
|
29363
|
+
value = _ref.value,
|
|
29363
29364
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
29364
29365
|
|
|
29365
29366
|
var unselectOption = [];
|
|
@@ -29376,7 +29377,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
29376
29377
|
})));
|
|
29377
29378
|
return /*#__PURE__*/React__default.createElement(TextField, _extends({
|
|
29378
29379
|
select: true,
|
|
29379
|
-
required: required
|
|
29380
|
+
required: required,
|
|
29381
|
+
value: value === undefined ? '' : value
|
|
29380
29382
|
}, props), allOptions.map(function (_ref2) {
|
|
29381
29383
|
var itemLabel = _ref2.label,
|
|
29382
29384
|
itemValue = _ref2.value;
|
|
@@ -29658,7 +29660,7 @@ function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
29658
29660
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29659
29661
|
|
|
29660
29662
|
var FormControlField = function FormControlField(_ref) {
|
|
29661
|
-
var
|
|
29663
|
+
var type = _ref.type,
|
|
29662
29664
|
name = _ref.name,
|
|
29663
29665
|
label = _ref.label,
|
|
29664
29666
|
component = _ref.component,
|
|
@@ -29681,7 +29683,7 @@ var FormControlField = function FormControlField(_ref) {
|
|
|
29681
29683
|
}
|
|
29682
29684
|
|
|
29683
29685
|
var control;
|
|
29684
|
-
if (
|
|
29686
|
+
if (type === 'render') control = /*#__PURE__*/React__default.cloneElement(component, finalProps);else control = /*#__PURE__*/React__default.createElement(component, finalProps);
|
|
29685
29687
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
29686
29688
|
width: "100%",
|
|
29687
29689
|
display: "flex",
|
|
@@ -29694,10 +29696,10 @@ var FormControlField = function FormControlField(_ref) {
|
|
|
29694
29696
|
};
|
|
29695
29697
|
|
|
29696
29698
|
FormControlField.propTypes = {
|
|
29697
|
-
isRender: PropTypes__default.bool,
|
|
29698
29699
|
component: PropTypes__default.any.isRequired,
|
|
29699
29700
|
componentProps: PropTypes__default.object,
|
|
29700
29701
|
name: PropTypes__default.string.isRequired,
|
|
29702
|
+
type: PropTypes__default.string.isRequired,
|
|
29701
29703
|
label: PropTypes__default.string.isRequired,
|
|
29702
29704
|
value: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number, PropTypes__default.bool, PropTypes__default.array]),
|
|
29703
29705
|
options: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
@@ -29756,14 +29758,21 @@ FormReadOnlyField.propTypes = {
|
|
|
29756
29758
|
};
|
|
29757
29759
|
var FormReadOnlyField$1 = /*#__PURE__*/React__default.memo(FormReadOnlyField);
|
|
29758
29760
|
|
|
29759
|
-
var
|
|
29760
|
-
var value = _ref.value
|
|
29761
|
+
var FormReadOnlyText = function FormReadOnlyText(_ref) {
|
|
29762
|
+
var value = _ref.value,
|
|
29763
|
+
type = _ref.type;
|
|
29764
|
+
var finalValue = value;
|
|
29765
|
+
|
|
29766
|
+
if (type === 'date' || type === 'datetime-local') {
|
|
29767
|
+
finalValue = DateTime.fromISO(value).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY);
|
|
29768
|
+
}
|
|
29769
|
+
|
|
29761
29770
|
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
29762
29771
|
variant: "body1"
|
|
29763
|
-
},
|
|
29772
|
+
}, finalValue);
|
|
29764
29773
|
};
|
|
29765
29774
|
|
|
29766
|
-
|
|
29775
|
+
FormReadOnlyText.propTypes = {
|
|
29767
29776
|
value: PropTypes__default.oneOfType([PropTypes__default.number, PropTypes__default.string])
|
|
29768
29777
|
};
|
|
29769
29778
|
|
|
@@ -67978,7 +67987,7 @@ FormReadOnlyMarkdown.propTypes = {
|
|
|
67978
67987
|
|
|
67979
67988
|
var FormReadOnlyNumber = function FormReadOnlyNumber(_ref) {
|
|
67980
67989
|
var value = _ref.value;
|
|
67981
|
-
return /*#__PURE__*/React__default.createElement(
|
|
67990
|
+
return /*#__PURE__*/React__default.createElement(FormReadOnlyText, {
|
|
67982
67991
|
value: castToNumber(value)
|
|
67983
67992
|
});
|
|
67984
67993
|
};
|
|
@@ -67992,7 +68001,7 @@ var FormReadOnlySelect = function FormReadOnlySelect(_ref) {
|
|
|
67992
68001
|
|
|
67993
68002
|
var value = _ref.value,
|
|
67994
68003
|
options = _ref.options;
|
|
67995
|
-
return /*#__PURE__*/React__default.createElement(
|
|
68004
|
+
return /*#__PURE__*/React__default.createElement(FormReadOnlyText, {
|
|
67996
68005
|
value: (_options$find = options.find(function (o) {
|
|
67997
68006
|
return o.value === value;
|
|
67998
68007
|
})) === null || _options$find === void 0 ? void 0 : _options$find.label
|
|
@@ -75404,9 +75413,9 @@ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
75404
75413
|
|
|
75405
75414
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
75406
75415
|
var formReadOnlyComponentMap = {
|
|
75407
|
-
"default":
|
|
75416
|
+
"default": FormReadOnlyText,
|
|
75408
75417
|
markdown: FormReadOnlyMarkdown,
|
|
75409
|
-
string:
|
|
75418
|
+
string: FormReadOnlyText,
|
|
75410
75419
|
number: FormReadOnlyNumber,
|
|
75411
75420
|
select: FormReadOnlySelect,
|
|
75412
75421
|
"boolean": FormReadOnlyBoolean,
|
|
@@ -75448,17 +75457,23 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75448
75457
|
errorMessages = _this$props.errorMessages,
|
|
75449
75458
|
results = _this$props.results,
|
|
75450
75459
|
data = _this$props.data,
|
|
75451
|
-
fieldStates = _this$props.fieldStates
|
|
75460
|
+
fieldStates = _this$props.fieldStates,
|
|
75461
|
+
renderComponentMap = _this$props.renderComponentMap;
|
|
75452
75462
|
var field = fieldEntry,
|
|
75453
75463
|
specialProps = {};
|
|
75454
75464
|
|
|
75455
75465
|
if (Array.isArray(fieldEntry)) {
|
|
75456
75466
|
if (fieldEntry[0] === '@@render') {
|
|
75457
75467
|
field = fieldEntry[1];
|
|
75458
|
-
|
|
75459
|
-
|
|
75460
|
-
|
|
75461
|
-
|
|
75468
|
+
return {
|
|
75469
|
+
type: 'render',
|
|
75470
|
+
name: field,
|
|
75471
|
+
component: renderComponentMap[field],
|
|
75472
|
+
componentProps: fieldEntry[2] || {}
|
|
75473
|
+
};
|
|
75474
|
+
}
|
|
75475
|
+
|
|
75476
|
+
if (fieldEntry[0] === '@@markdown') {
|
|
75462
75477
|
return {
|
|
75463
75478
|
type: 'markdown',
|
|
75464
75479
|
name: fieldEntry[1],
|
|
@@ -75467,11 +75482,11 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75467
75482
|
content: fieldEntry[2]
|
|
75468
75483
|
}
|
|
75469
75484
|
};
|
|
75470
|
-
} else {
|
|
75471
|
-
field = fieldEntry[0];
|
|
75472
|
-
if (!fieldEntry[1]) throw new Error("field \"".concat(field, "\" is defined in an array, but has no props definition"));
|
|
75473
|
-
specialProps = fieldEntry[1];
|
|
75474
75485
|
}
|
|
75486
|
+
|
|
75487
|
+
field = fieldEntry[0];
|
|
75488
|
+
if (!fieldEntry[1]) throw new Error("field \"".concat(field, "\" is defined in an array, but has no props definition"));
|
|
75489
|
+
specialProps = fieldEntry[1];
|
|
75475
75490
|
}
|
|
75476
75491
|
|
|
75477
75492
|
var _specialProps = specialProps,
|
|
@@ -75492,8 +75507,8 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75492
75507
|
type = _schema$properties$fi.type,
|
|
75493
75508
|
defaultValue = _schema$properties$fi["default"];
|
|
75494
75509
|
var mapKey;
|
|
75495
|
-
if (
|
|
75496
|
-
var mapEntry =
|
|
75510
|
+
if (componentMap[field] !== undefined) mapKey = field;else if (typeof type === 'string' && componentMap[type] !== undefined) mapKey = type;else if (Array.isArray(type)) mapKey = 'select';else if (componentMap["default"] !== undefined) mapKey = 'default';else throw new Error("Could not find a Component to render for \"".concat(field, "\""));
|
|
75511
|
+
var mapEntry = componentMap[mapKey];
|
|
75497
75512
|
var component = mapEntry,
|
|
75498
75513
|
props = {};
|
|
75499
75514
|
|
|
@@ -75597,7 +75612,6 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75597
75612
|
type: _type,
|
|
75598
75613
|
label: _label,
|
|
75599
75614
|
value: _value,
|
|
75600
|
-
isRender: true,
|
|
75601
75615
|
required: _required,
|
|
75602
75616
|
hasErrors: _hasErrors,
|
|
75603
75617
|
errors: _errors,
|
|
@@ -76388,4 +76402,4 @@ FormulatorForm.defaultProps = {
|
|
|
76388
76402
|
errorMessages: {}
|
|
76389
76403
|
};
|
|
76390
76404
|
|
|
76391
|
-
export { FormBoolean, FormField$1 as FormField, FormNumber, FormReadOnlyBoolean, FormReadOnlyField$1 as FormReadOnlyField, FormReadOnlyMarkdown, FormReadOnlyNumber, FormReadOnlyRepeater, FormReadOnlySelect,
|
|
76405
|
+
export { FormBoolean, FormField$1 as FormField, FormNumber, FormReadOnlyBoolean, FormReadOnlyField$1 as FormReadOnlyField, FormReadOnlyMarkdown, FormReadOnlyNumber, FormReadOnlyRepeater, FormReadOnlySelect, FormReadOnlyText, FormRepeater, FormSelect, FormText, FormulatorForm };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scenid/react-formulator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"repository": "https://dennykoch@bitbucket.org/scenid/react-formulator.git",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@material-ui/icons": "^4.11.3",
|
|
22
22
|
"@material-ui/styles": "^4.11.5",
|
|
23
23
|
"classnames": "^2.3.1",
|
|
24
|
+
"luxon": "^2.3.2",
|
|
24
25
|
"prop-types": "^15.8.1",
|
|
25
26
|
"react": "16.11.0",
|
|
26
27
|
"react-dom": "16.11.0"
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"@storybook/testing-library": "^0.0.11",
|
|
47
48
|
"babel-loader": "^8.2.5",
|
|
48
49
|
"classnames": "^2.3.1",
|
|
50
|
+
"luxon": "^2.3.2",
|
|
49
51
|
"cross-env": "^7.0.3",
|
|
50
52
|
"eslint": "^7.11.0",
|
|
51
53
|
"eslint-config-airbnb": "^18.0.1",
|
|
@@ -21,7 +21,6 @@ const useStyles = makeStyles(theme => ({ error: { color: theme.palette.error.mai
|
|
|
21
21
|
const FormControlField = ({
|
|
22
22
|
variant,
|
|
23
23
|
type,
|
|
24
|
-
isRender,
|
|
25
24
|
name,
|
|
26
25
|
label,
|
|
27
26
|
component,
|
|
@@ -51,6 +50,8 @@ const FormControlField = ({
|
|
|
51
50
|
onChange
|
|
52
51
|
}
|
|
53
52
|
|
|
53
|
+
const isRender = type === 'render'
|
|
54
|
+
|
|
54
55
|
if (validating) {
|
|
55
56
|
finalProps.endAdornment = [(
|
|
56
57
|
<InputAdornment position="end">
|
|
@@ -127,7 +128,6 @@ const FormControlField = ({
|
|
|
127
128
|
|
|
128
129
|
FormControlField.propTypes = {
|
|
129
130
|
variant: PropTypes.oneOf(['standard', 'filled', 'outlined']),
|
|
130
|
-
isRender: PropTypes.bool,
|
|
131
131
|
component: PropTypes.any.isRequired,
|
|
132
132
|
componentProps: PropTypes.object,
|
|
133
133
|
type: PropTypes.string.isRequired,
|
|
@@ -190,7 +190,6 @@ const FormField = ({
|
|
|
190
190
|
|
|
191
191
|
FormField.propTypes = {
|
|
192
192
|
variant: PropTypes.oneOf(['standard', 'filled', 'outlined']),
|
|
193
|
-
isRender: PropTypes.bool,
|
|
194
193
|
component: PropTypes.any.isRequired,
|
|
195
194
|
componentProps: PropTypes.object,
|
|
196
195
|
type: PropTypes.string.isRequired,
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
|
|
4
4
|
import { TextField, MenuItem } from '@material-ui/core'
|
|
5
5
|
|
|
6
|
-
const FormSelect = ({ options, required, ...props }) => {
|
|
6
|
+
const FormSelect = ({ options, required, value, ...props }) => {
|
|
7
7
|
let unselectOption = []
|
|
8
8
|
|
|
9
9
|
if (!required) {
|
|
@@ -19,6 +19,7 @@ const FormSelect = ({ options, required, ...props }) => {
|
|
|
19
19
|
<TextField
|
|
20
20
|
select
|
|
21
21
|
required={required}
|
|
22
|
+
value={value === undefined ? '' : value}
|
|
22
23
|
{...props}
|
|
23
24
|
>
|
|
24
25
|
{
|
|
@@ -60,18 +60,23 @@ class FormulatorFormSection extends React.Component {
|
|
|
60
60
|
errorMessages,
|
|
61
61
|
results,
|
|
62
62
|
data,
|
|
63
|
-
fieldStates
|
|
63
|
+
fieldStates,
|
|
64
|
+
renderComponentMap
|
|
64
65
|
} = this.props
|
|
65
66
|
|
|
66
67
|
let field = fieldEntry, specialProps = {}
|
|
67
68
|
if (Array.isArray(fieldEntry)) {
|
|
68
69
|
if (fieldEntry[0] === '@@render') {
|
|
69
70
|
field = fieldEntry[1]
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
return ({
|
|
72
|
+
type: 'render',
|
|
73
|
+
name: field,
|
|
74
|
+
component: renderComponentMap[field],
|
|
75
|
+
componentProps: fieldEntry[2] || {}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (fieldEntry[0] === '@@markdown') {
|
|
75
80
|
return ({
|
|
76
81
|
type: 'markdown',
|
|
77
82
|
name: fieldEntry[1],
|
|
@@ -80,11 +85,12 @@ class FormulatorFormSection extends React.Component {
|
|
|
80
85
|
content: fieldEntry[2]
|
|
81
86
|
}
|
|
82
87
|
})
|
|
83
|
-
} else {
|
|
84
|
-
field = fieldEntry[0]
|
|
85
|
-
if (!fieldEntry[1]) throw new Error(`field "${field}" is defined in an array, but has no props definition`)
|
|
86
|
-
specialProps = fieldEntry[1]
|
|
87
88
|
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
field = fieldEntry[0]
|
|
92
|
+
if (!fieldEntry[1]) throw new Error(`field "${field}" is defined in an array, but has no props definition`)
|
|
93
|
+
specialProps = fieldEntry[1]
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
const { hidden, hideLabel, ...extraProps } = specialProps
|
|
@@ -98,14 +104,13 @@ class FormulatorFormSection extends React.Component {
|
|
|
98
104
|
const { type, default: defaultValue } = schema.properties[field]
|
|
99
105
|
|
|
100
106
|
let mapKey
|
|
101
|
-
if (
|
|
102
|
-
else if (componentMap[field] !== undefined) mapKey = field
|
|
107
|
+
if (componentMap[field] !== undefined) mapKey = field
|
|
103
108
|
else if (typeof type === 'string' && componentMap[type] !== undefined) mapKey = type
|
|
104
109
|
else if (Array.isArray(type)) mapKey = 'select'
|
|
105
110
|
else if (componentMap.default !== undefined) mapKey = 'default'
|
|
106
111
|
else throw new Error(`Could not find a Component to render for "${field}"`)
|
|
107
112
|
|
|
108
|
-
const mapEntry =
|
|
113
|
+
const mapEntry = componentMap[mapKey]
|
|
109
114
|
let component = mapEntry, props = {}
|
|
110
115
|
|
|
111
116
|
if (mapKey === 'select') {
|
|
@@ -219,7 +224,6 @@ class FormulatorFormSection extends React.Component {
|
|
|
219
224
|
type,
|
|
220
225
|
label,
|
|
221
226
|
value,
|
|
222
|
-
isRender: true,
|
|
223
227
|
required,
|
|
224
228
|
hasErrors,
|
|
225
229
|
errors,
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import { Typography, Box } from '@material-ui/core'
|
|
5
5
|
|
|
6
6
|
const FormControlField = ({
|
|
7
|
-
|
|
7
|
+
type,
|
|
8
8
|
name,
|
|
9
9
|
label,
|
|
10
10
|
component,
|
|
@@ -28,7 +28,7 @@ const FormControlField = ({
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
let control
|
|
31
|
-
if (
|
|
31
|
+
if (type === 'render') control = React.cloneElement(component, finalProps)
|
|
32
32
|
else control = React.createElement(component, finalProps)
|
|
33
33
|
|
|
34
34
|
return (
|
|
@@ -55,10 +55,10 @@ const FormControlField = ({
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
FormControlField.propTypes = {
|
|
58
|
-
isRender: PropTypes.bool,
|
|
59
58
|
component: PropTypes.any.isRequired,
|
|
60
59
|
componentProps: PropTypes.object,
|
|
61
60
|
name: PropTypes.string.isRequired,
|
|
61
|
+
type: PropTypes.string.isRequired,
|
|
62
62
|
label: PropTypes.string.isRequired,
|
|
63
63
|
value: PropTypes.oneOfType([
|
|
64
64
|
PropTypes.string,
|
|
@@ -3,17 +3,27 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
|
|
4
4
|
import { Typography } from '@material-ui/core'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
<Typography variant="body1">
|
|
8
|
-
{value}
|
|
9
|
-
</Typography>
|
|
10
|
-
)
|
|
6
|
+
import { DateTime } from 'luxon'
|
|
11
7
|
|
|
12
|
-
|
|
8
|
+
const FormReadOnlyText = ({ value, type }) => {
|
|
9
|
+
let finalValue = value
|
|
10
|
+
|
|
11
|
+
if (type === 'date' || type === 'datetime-local') {
|
|
12
|
+
finalValue = DateTime.fromISO(value).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Typography variant="body1">
|
|
17
|
+
{finalValue}
|
|
18
|
+
</Typography>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
FormReadOnlyText.propTypes = {
|
|
13
23
|
value: PropTypes.oneOfType([
|
|
14
24
|
PropTypes.number,
|
|
15
25
|
PropTypes.string
|
|
16
26
|
])
|
|
17
27
|
}
|
|
18
28
|
|
|
19
|
-
export default
|
|
29
|
+
export default FormReadOnlyText
|
|
@@ -157,7 +157,9 @@ RLP.args = {
|
|
|
157
157
|
'invalid-fax': "Ungültige Faxnummer"
|
|
158
158
|
},
|
|
159
159
|
data: {
|
|
160
|
-
ouType: 'private-medical-practice'
|
|
160
|
+
ouType: 'private-medical-practice',
|
|
161
|
+
hasBank: true,
|
|
162
|
+
bankValidFrom: '2022-08-14'
|
|
161
163
|
},
|
|
162
164
|
renderComponentMap: {
|
|
163
165
|
// contacts: <RoleContactsRepeater />,
|
|
@@ -7,12 +7,7 @@
|
|
|
7
7
|
"fields": [
|
|
8
8
|
"active",
|
|
9
9
|
"ouType",
|
|
10
|
-
|
|
11
|
-
"name",
|
|
12
|
-
{
|
|
13
|
-
"action": "copy"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
10
|
+
"name",
|
|
16
11
|
"legalForm"
|
|
17
12
|
]
|
|
18
13
|
},
|
|
@@ -83,9 +78,7 @@
|
|
|
83
78
|
"label": "Onkologisches Zentrum",
|
|
84
79
|
"id": "oncologyCenterData",
|
|
85
80
|
"fields": [
|
|
86
|
-
|
|
87
|
-
"oncologyCenterType"
|
|
88
|
-
],
|
|
81
|
+
"oncologyCenterType",
|
|
89
82
|
"oncologyCenterId",
|
|
90
83
|
"isCertifiedOncologyCenter",
|
|
91
84
|
"oncologyCenterCertificate",
|
|
@@ -135,7 +128,12 @@
|
|
|
135
128
|
"bankAccountOwner",
|
|
136
129
|
"iban",
|
|
137
130
|
"bankNote",
|
|
138
|
-
|
|
131
|
+
[
|
|
132
|
+
"bankValidFrom",
|
|
133
|
+
{
|
|
134
|
+
"type": "date"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
139
137
|
]
|
|
140
138
|
},
|
|
141
139
|
{
|
|
@@ -150,25 +148,6 @@
|
|
|
150
148
|
"city",
|
|
151
149
|
"countryCode"
|
|
152
150
|
]
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"label": "Verbünde (Alt)",
|
|
156
|
-
"id": "federations",
|
|
157
|
-
"fields": [
|
|
158
|
-
"federationHead",
|
|
159
|
-
"federationMembers"
|
|
160
|
-
]
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"label": "Kontaktdaten (Alt)",
|
|
164
|
-
"id": "contactOld",
|
|
165
|
-
"fields": [
|
|
166
|
-
"phonePrefix",
|
|
167
|
-
"phone",
|
|
168
|
-
"faxPrefix",
|
|
169
|
-
"fax",
|
|
170
|
-
"email"
|
|
171
|
-
]
|
|
172
151
|
}
|
|
173
152
|
]
|
|
174
153
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"properties": {
|
|
3
3
|
"active": {
|
|
4
|
-
"type": "boolean"
|
|
5
|
-
"default": true
|
|
4
|
+
"type": "boolean"
|
|
6
5
|
},
|
|
7
6
|
"name": {
|
|
8
7
|
"type": "string",
|
|
@@ -61,26 +60,6 @@
|
|
|
61
60
|
"sdoer"
|
|
62
61
|
]
|
|
63
62
|
},
|
|
64
|
-
"federationHead": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"required": {
|
|
67
|
-
"ouType": [
|
|
68
|
-
"federation-center",
|
|
69
|
-
"federation-reporting",
|
|
70
|
-
"federation-accounting"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"federationMembers": {
|
|
75
|
-
"type": "array",
|
|
76
|
-
"required": {
|
|
77
|
-
"ouType": [
|
|
78
|
-
"federation-center",
|
|
79
|
-
"federation-reporting",
|
|
80
|
-
"federation-accounting"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
63
|
"oncologyCenterId": {
|
|
85
64
|
"type": "string",
|
|
86
65
|
"required": {
|
|
@@ -415,7 +394,6 @@
|
|
|
415
394
|
},
|
|
416
395
|
"isReportingActive": {
|
|
417
396
|
"type": "boolean",
|
|
418
|
-
"default": true,
|
|
419
397
|
"required": {
|
|
420
398
|
"isReporting": true
|
|
421
399
|
},
|
|
@@ -1565,543 +1543,6 @@
|
|
|
1565
1543
|
]
|
|
1566
1544
|
}
|
|
1567
1545
|
},
|
|
1568
|
-
"phonePrefix": {
|
|
1569
|
-
"type": [
|
|
1570
|
-
"de",
|
|
1571
|
-
"at",
|
|
1572
|
-
"ch",
|
|
1573
|
-
"af",
|
|
1574
|
-
"al",
|
|
1575
|
-
"dz",
|
|
1576
|
-
"as",
|
|
1577
|
-
"ad",
|
|
1578
|
-
"ao",
|
|
1579
|
-
"ai",
|
|
1580
|
-
"ag",
|
|
1581
|
-
"ar",
|
|
1582
|
-
"am",
|
|
1583
|
-
"aw",
|
|
1584
|
-
"au",
|
|
1585
|
-
"az",
|
|
1586
|
-
"bs",
|
|
1587
|
-
"bh",
|
|
1588
|
-
"bd",
|
|
1589
|
-
"bb",
|
|
1590
|
-
"by",
|
|
1591
|
-
"be",
|
|
1592
|
-
"bz",
|
|
1593
|
-
"bj",
|
|
1594
|
-
"bm",
|
|
1595
|
-
"bt",
|
|
1596
|
-
"ba",
|
|
1597
|
-
"bw",
|
|
1598
|
-
"br",
|
|
1599
|
-
"io",
|
|
1600
|
-
"bg",
|
|
1601
|
-
"bf",
|
|
1602
|
-
"bi",
|
|
1603
|
-
"kh",
|
|
1604
|
-
"cm",
|
|
1605
|
-
"ca",
|
|
1606
|
-
"cv",
|
|
1607
|
-
"ky",
|
|
1608
|
-
"cf",
|
|
1609
|
-
"td",
|
|
1610
|
-
"cl",
|
|
1611
|
-
"cn",
|
|
1612
|
-
"cx",
|
|
1613
|
-
"co",
|
|
1614
|
-
"km",
|
|
1615
|
-
"cg",
|
|
1616
|
-
"ck",
|
|
1617
|
-
"cr",
|
|
1618
|
-
"hr",
|
|
1619
|
-
"cu",
|
|
1620
|
-
"cy",
|
|
1621
|
-
"cz",
|
|
1622
|
-
"dk",
|
|
1623
|
-
"dj",
|
|
1624
|
-
"dm",
|
|
1625
|
-
"do",
|
|
1626
|
-
"ec",
|
|
1627
|
-
"eg",
|
|
1628
|
-
"sv",
|
|
1629
|
-
"gq",
|
|
1630
|
-
"er",
|
|
1631
|
-
"ee",
|
|
1632
|
-
"et",
|
|
1633
|
-
"fo",
|
|
1634
|
-
"fj",
|
|
1635
|
-
"fi",
|
|
1636
|
-
"fr",
|
|
1637
|
-
"gf",
|
|
1638
|
-
"pf",
|
|
1639
|
-
"ga",
|
|
1640
|
-
"gm",
|
|
1641
|
-
"ge",
|
|
1642
|
-
"gh",
|
|
1643
|
-
"gi",
|
|
1644
|
-
"gr",
|
|
1645
|
-
"gl",
|
|
1646
|
-
"gd",
|
|
1647
|
-
"gp",
|
|
1648
|
-
"gu",
|
|
1649
|
-
"gt",
|
|
1650
|
-
"gn",
|
|
1651
|
-
"gw",
|
|
1652
|
-
"gy",
|
|
1653
|
-
"ht",
|
|
1654
|
-
"hn",
|
|
1655
|
-
"hu",
|
|
1656
|
-
"is",
|
|
1657
|
-
"in",
|
|
1658
|
-
"id",
|
|
1659
|
-
"iq",
|
|
1660
|
-
"ie",
|
|
1661
|
-
"il",
|
|
1662
|
-
"it",
|
|
1663
|
-
"jm",
|
|
1664
|
-
"jp",
|
|
1665
|
-
"jo",
|
|
1666
|
-
"kz",
|
|
1667
|
-
"ke",
|
|
1668
|
-
"ki",
|
|
1669
|
-
"kw",
|
|
1670
|
-
"kg",
|
|
1671
|
-
"lv",
|
|
1672
|
-
"lb",
|
|
1673
|
-
"ls",
|
|
1674
|
-
"lr",
|
|
1675
|
-
"li",
|
|
1676
|
-
"lt",
|
|
1677
|
-
"lu",
|
|
1678
|
-
"mg",
|
|
1679
|
-
"mw",
|
|
1680
|
-
"my",
|
|
1681
|
-
"mv",
|
|
1682
|
-
"ml",
|
|
1683
|
-
"mt",
|
|
1684
|
-
"mh",
|
|
1685
|
-
"mq",
|
|
1686
|
-
"mr",
|
|
1687
|
-
"mu",
|
|
1688
|
-
"yt",
|
|
1689
|
-
"mx",
|
|
1690
|
-
"mc",
|
|
1691
|
-
"mn",
|
|
1692
|
-
"me",
|
|
1693
|
-
"ms",
|
|
1694
|
-
"ma",
|
|
1695
|
-
"mm",
|
|
1696
|
-
"na",
|
|
1697
|
-
"nr",
|
|
1698
|
-
"np",
|
|
1699
|
-
"nl",
|
|
1700
|
-
"an",
|
|
1701
|
-
"nc",
|
|
1702
|
-
"nz",
|
|
1703
|
-
"ni",
|
|
1704
|
-
"ne",
|
|
1705
|
-
"ng",
|
|
1706
|
-
"nu",
|
|
1707
|
-
"nf",
|
|
1708
|
-
"mp",
|
|
1709
|
-
"no",
|
|
1710
|
-
"om",
|
|
1711
|
-
"pk",
|
|
1712
|
-
"pw",
|
|
1713
|
-
"pa",
|
|
1714
|
-
"pg",
|
|
1715
|
-
"py",
|
|
1716
|
-
"pe",
|
|
1717
|
-
"ph",
|
|
1718
|
-
"pl",
|
|
1719
|
-
"pt",
|
|
1720
|
-
"pr",
|
|
1721
|
-
"qa",
|
|
1722
|
-
"ro",
|
|
1723
|
-
"rw",
|
|
1724
|
-
"ws",
|
|
1725
|
-
"sm",
|
|
1726
|
-
"sa",
|
|
1727
|
-
"sn",
|
|
1728
|
-
"rs",
|
|
1729
|
-
"sc",
|
|
1730
|
-
"sl",
|
|
1731
|
-
"sg",
|
|
1732
|
-
"sk",
|
|
1733
|
-
"si",
|
|
1734
|
-
"sb",
|
|
1735
|
-
"za",
|
|
1736
|
-
"gs",
|
|
1737
|
-
"es",
|
|
1738
|
-
"lk",
|
|
1739
|
-
"sd",
|
|
1740
|
-
"sr",
|
|
1741
|
-
"sz",
|
|
1742
|
-
"se",
|
|
1743
|
-
"tj",
|
|
1744
|
-
"th",
|
|
1745
|
-
"tg",
|
|
1746
|
-
"tk",
|
|
1747
|
-
"to",
|
|
1748
|
-
"tt",
|
|
1749
|
-
"tn",
|
|
1750
|
-
"tr",
|
|
1751
|
-
"tm",
|
|
1752
|
-
"tc",
|
|
1753
|
-
"tv",
|
|
1754
|
-
"ug",
|
|
1755
|
-
"ua",
|
|
1756
|
-
"ae",
|
|
1757
|
-
"gb",
|
|
1758
|
-
"us",
|
|
1759
|
-
"uy",
|
|
1760
|
-
"uz",
|
|
1761
|
-
"vu",
|
|
1762
|
-
"wf",
|
|
1763
|
-
"ye",
|
|
1764
|
-
"zm",
|
|
1765
|
-
"zw",
|
|
1766
|
-
"bo",
|
|
1767
|
-
"bn",
|
|
1768
|
-
"cc",
|
|
1769
|
-
"cd",
|
|
1770
|
-
"ci",
|
|
1771
|
-
"fk",
|
|
1772
|
-
"gg",
|
|
1773
|
-
"va",
|
|
1774
|
-
"hk",
|
|
1775
|
-
"ir",
|
|
1776
|
-
"im",
|
|
1777
|
-
"je",
|
|
1778
|
-
"kp",
|
|
1779
|
-
"kr",
|
|
1780
|
-
"la",
|
|
1781
|
-
"ly",
|
|
1782
|
-
"mo",
|
|
1783
|
-
"mk",
|
|
1784
|
-
"fm",
|
|
1785
|
-
"md",
|
|
1786
|
-
"mz",
|
|
1787
|
-
"ps",
|
|
1788
|
-
"pn",
|
|
1789
|
-
"re",
|
|
1790
|
-
"ru",
|
|
1791
|
-
"bl",
|
|
1792
|
-
"sh",
|
|
1793
|
-
"kn",
|
|
1794
|
-
"lc",
|
|
1795
|
-
"mf",
|
|
1796
|
-
"pm",
|
|
1797
|
-
"vc",
|
|
1798
|
-
"st",
|
|
1799
|
-
"so",
|
|
1800
|
-
"sj",
|
|
1801
|
-
"sy",
|
|
1802
|
-
"tw",
|
|
1803
|
-
"tz",
|
|
1804
|
-
"tl",
|
|
1805
|
-
"ve",
|
|
1806
|
-
"vn",
|
|
1807
|
-
"vg",
|
|
1808
|
-
"vi"
|
|
1809
|
-
],
|
|
1810
|
-
"prohibited": {
|
|
1811
|
-
"ouType": [
|
|
1812
|
-
"federation-center",
|
|
1813
|
-
"federation-reporting",
|
|
1814
|
-
"federation-accounting"
|
|
1815
|
-
]
|
|
1816
|
-
},
|
|
1817
|
-
"optional": true
|
|
1818
|
-
},
|
|
1819
|
-
"phone": {
|
|
1820
|
-
"type": "string",
|
|
1821
|
-
"validator": "Int",
|
|
1822
|
-
"prohibited": {
|
|
1823
|
-
"ouType": [
|
|
1824
|
-
"federation-center",
|
|
1825
|
-
"federation-reporting",
|
|
1826
|
-
"federation-accounting"
|
|
1827
|
-
]
|
|
1828
|
-
},
|
|
1829
|
-
"optional": true
|
|
1830
|
-
},
|
|
1831
|
-
"faxPrefix": {
|
|
1832
|
-
"type": [
|
|
1833
|
-
"de",
|
|
1834
|
-
"at",
|
|
1835
|
-
"ch",
|
|
1836
|
-
"af",
|
|
1837
|
-
"al",
|
|
1838
|
-
"dz",
|
|
1839
|
-
"as",
|
|
1840
|
-
"ad",
|
|
1841
|
-
"ao",
|
|
1842
|
-
"ai",
|
|
1843
|
-
"ag",
|
|
1844
|
-
"ar",
|
|
1845
|
-
"am",
|
|
1846
|
-
"aw",
|
|
1847
|
-
"au",
|
|
1848
|
-
"az",
|
|
1849
|
-
"bs",
|
|
1850
|
-
"bh",
|
|
1851
|
-
"bd",
|
|
1852
|
-
"bb",
|
|
1853
|
-
"by",
|
|
1854
|
-
"be",
|
|
1855
|
-
"bz",
|
|
1856
|
-
"bj",
|
|
1857
|
-
"bm",
|
|
1858
|
-
"bt",
|
|
1859
|
-
"ba",
|
|
1860
|
-
"bw",
|
|
1861
|
-
"br",
|
|
1862
|
-
"io",
|
|
1863
|
-
"bg",
|
|
1864
|
-
"bf",
|
|
1865
|
-
"bi",
|
|
1866
|
-
"kh",
|
|
1867
|
-
"cm",
|
|
1868
|
-
"ca",
|
|
1869
|
-
"cv",
|
|
1870
|
-
"ky",
|
|
1871
|
-
"cf",
|
|
1872
|
-
"td",
|
|
1873
|
-
"cl",
|
|
1874
|
-
"cn",
|
|
1875
|
-
"cx",
|
|
1876
|
-
"co",
|
|
1877
|
-
"km",
|
|
1878
|
-
"cg",
|
|
1879
|
-
"ck",
|
|
1880
|
-
"cr",
|
|
1881
|
-
"hr",
|
|
1882
|
-
"cu",
|
|
1883
|
-
"cy",
|
|
1884
|
-
"cz",
|
|
1885
|
-
"dk",
|
|
1886
|
-
"dj",
|
|
1887
|
-
"dm",
|
|
1888
|
-
"do",
|
|
1889
|
-
"ec",
|
|
1890
|
-
"eg",
|
|
1891
|
-
"sv",
|
|
1892
|
-
"gq",
|
|
1893
|
-
"er",
|
|
1894
|
-
"ee",
|
|
1895
|
-
"et",
|
|
1896
|
-
"fo",
|
|
1897
|
-
"fj",
|
|
1898
|
-
"fi",
|
|
1899
|
-
"fr",
|
|
1900
|
-
"gf",
|
|
1901
|
-
"pf",
|
|
1902
|
-
"ga",
|
|
1903
|
-
"gm",
|
|
1904
|
-
"ge",
|
|
1905
|
-
"gh",
|
|
1906
|
-
"gi",
|
|
1907
|
-
"gr",
|
|
1908
|
-
"gl",
|
|
1909
|
-
"gd",
|
|
1910
|
-
"gp",
|
|
1911
|
-
"gu",
|
|
1912
|
-
"gt",
|
|
1913
|
-
"gn",
|
|
1914
|
-
"gw",
|
|
1915
|
-
"gy",
|
|
1916
|
-
"ht",
|
|
1917
|
-
"hn",
|
|
1918
|
-
"hu",
|
|
1919
|
-
"is",
|
|
1920
|
-
"in",
|
|
1921
|
-
"id",
|
|
1922
|
-
"iq",
|
|
1923
|
-
"ie",
|
|
1924
|
-
"il",
|
|
1925
|
-
"it",
|
|
1926
|
-
"jm",
|
|
1927
|
-
"jp",
|
|
1928
|
-
"jo",
|
|
1929
|
-
"kz",
|
|
1930
|
-
"ke",
|
|
1931
|
-
"ki",
|
|
1932
|
-
"kw",
|
|
1933
|
-
"kg",
|
|
1934
|
-
"lv",
|
|
1935
|
-
"lb",
|
|
1936
|
-
"ls",
|
|
1937
|
-
"lr",
|
|
1938
|
-
"li",
|
|
1939
|
-
"lt",
|
|
1940
|
-
"lu",
|
|
1941
|
-
"mg",
|
|
1942
|
-
"mw",
|
|
1943
|
-
"my",
|
|
1944
|
-
"mv",
|
|
1945
|
-
"ml",
|
|
1946
|
-
"mt",
|
|
1947
|
-
"mh",
|
|
1948
|
-
"mq",
|
|
1949
|
-
"mr",
|
|
1950
|
-
"mu",
|
|
1951
|
-
"yt",
|
|
1952
|
-
"mx",
|
|
1953
|
-
"mc",
|
|
1954
|
-
"mn",
|
|
1955
|
-
"me",
|
|
1956
|
-
"ms",
|
|
1957
|
-
"ma",
|
|
1958
|
-
"mm",
|
|
1959
|
-
"na",
|
|
1960
|
-
"nr",
|
|
1961
|
-
"np",
|
|
1962
|
-
"nl",
|
|
1963
|
-
"an",
|
|
1964
|
-
"nc",
|
|
1965
|
-
"nz",
|
|
1966
|
-
"ni",
|
|
1967
|
-
"ne",
|
|
1968
|
-
"ng",
|
|
1969
|
-
"nu",
|
|
1970
|
-
"nf",
|
|
1971
|
-
"mp",
|
|
1972
|
-
"no",
|
|
1973
|
-
"om",
|
|
1974
|
-
"pk",
|
|
1975
|
-
"pw",
|
|
1976
|
-
"pa",
|
|
1977
|
-
"pg",
|
|
1978
|
-
"py",
|
|
1979
|
-
"pe",
|
|
1980
|
-
"ph",
|
|
1981
|
-
"pl",
|
|
1982
|
-
"pt",
|
|
1983
|
-
"pr",
|
|
1984
|
-
"qa",
|
|
1985
|
-
"ro",
|
|
1986
|
-
"rw",
|
|
1987
|
-
"ws",
|
|
1988
|
-
"sm",
|
|
1989
|
-
"sa",
|
|
1990
|
-
"sn",
|
|
1991
|
-
"rs",
|
|
1992
|
-
"sc",
|
|
1993
|
-
"sl",
|
|
1994
|
-
"sg",
|
|
1995
|
-
"sk",
|
|
1996
|
-
"si",
|
|
1997
|
-
"sb",
|
|
1998
|
-
"za",
|
|
1999
|
-
"gs",
|
|
2000
|
-
"es",
|
|
2001
|
-
"lk",
|
|
2002
|
-
"sd",
|
|
2003
|
-
"sr",
|
|
2004
|
-
"sz",
|
|
2005
|
-
"se",
|
|
2006
|
-
"tj",
|
|
2007
|
-
"th",
|
|
2008
|
-
"tg",
|
|
2009
|
-
"tk",
|
|
2010
|
-
"to",
|
|
2011
|
-
"tt",
|
|
2012
|
-
"tn",
|
|
2013
|
-
"tr",
|
|
2014
|
-
"tm",
|
|
2015
|
-
"tc",
|
|
2016
|
-
"tv",
|
|
2017
|
-
"ug",
|
|
2018
|
-
"ua",
|
|
2019
|
-
"ae",
|
|
2020
|
-
"gb",
|
|
2021
|
-
"us",
|
|
2022
|
-
"uy",
|
|
2023
|
-
"uz",
|
|
2024
|
-
"vu",
|
|
2025
|
-
"wf",
|
|
2026
|
-
"ye",
|
|
2027
|
-
"zm",
|
|
2028
|
-
"zw",
|
|
2029
|
-
"bo",
|
|
2030
|
-
"bn",
|
|
2031
|
-
"cc",
|
|
2032
|
-
"cd",
|
|
2033
|
-
"ci",
|
|
2034
|
-
"fk",
|
|
2035
|
-
"gg",
|
|
2036
|
-
"va",
|
|
2037
|
-
"hk",
|
|
2038
|
-
"ir",
|
|
2039
|
-
"im",
|
|
2040
|
-
"je",
|
|
2041
|
-
"kp",
|
|
2042
|
-
"kr",
|
|
2043
|
-
"la",
|
|
2044
|
-
"ly",
|
|
2045
|
-
"mo",
|
|
2046
|
-
"mk",
|
|
2047
|
-
"fm",
|
|
2048
|
-
"md",
|
|
2049
|
-
"mz",
|
|
2050
|
-
"ps",
|
|
2051
|
-
"pn",
|
|
2052
|
-
"re",
|
|
2053
|
-
"ru",
|
|
2054
|
-
"bl",
|
|
2055
|
-
"sh",
|
|
2056
|
-
"kn",
|
|
2057
|
-
"lc",
|
|
2058
|
-
"mf",
|
|
2059
|
-
"pm",
|
|
2060
|
-
"vc",
|
|
2061
|
-
"st",
|
|
2062
|
-
"so",
|
|
2063
|
-
"sj",
|
|
2064
|
-
"sy",
|
|
2065
|
-
"tw",
|
|
2066
|
-
"tz",
|
|
2067
|
-
"tl",
|
|
2068
|
-
"ve",
|
|
2069
|
-
"vn",
|
|
2070
|
-
"vg",
|
|
2071
|
-
"vi"
|
|
2072
|
-
],
|
|
2073
|
-
"prohibited": {
|
|
2074
|
-
"ouType": [
|
|
2075
|
-
"federation-center",
|
|
2076
|
-
"federation-reporting",
|
|
2077
|
-
"federation-accounting"
|
|
2078
|
-
]
|
|
2079
|
-
},
|
|
2080
|
-
"optional": true
|
|
2081
|
-
},
|
|
2082
|
-
"fax": {
|
|
2083
|
-
"type": "string",
|
|
2084
|
-
"validator": "Int",
|
|
2085
|
-
"prohibited": {
|
|
2086
|
-
"ouType": [
|
|
2087
|
-
"federation-center",
|
|
2088
|
-
"federation-reporting",
|
|
2089
|
-
"federation-accounting"
|
|
2090
|
-
]
|
|
2091
|
-
},
|
|
2092
|
-
"optional": true
|
|
2093
|
-
},
|
|
2094
|
-
"email": {
|
|
2095
|
-
"type": "string",
|
|
2096
|
-
"prohibited": {
|
|
2097
|
-
"ouType": [
|
|
2098
|
-
"federation-center",
|
|
2099
|
-
"federation-reporting",
|
|
2100
|
-
"federation-accounting"
|
|
2101
|
-
]
|
|
2102
|
-
},
|
|
2103
|
-
"optional": true
|
|
2104
|
-
},
|
|
2105
1546
|
"openingHours": {
|
|
2106
1547
|
"type": "string",
|
|
2107
1548
|
"prohibited": {
|