@unicef/material-ui 0.8.0 → 0.9.1
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/README.md +30 -0
- package/lib/dev.js +389 -70
- package/lib/dev.js.map +1 -1
- package/lib/prod.js +389 -70
- package/lib/prod.js.map +1 -1
- package/package.json +17 -7
package/lib/prod.js
CHANGED
|
@@ -11082,6 +11082,65 @@ var debounce = function debounce(func, wait, immediate) {
|
|
|
11082
11082
|
return debounced;
|
|
11083
11083
|
};
|
|
11084
11084
|
|
|
11085
|
+
/**
|
|
11086
|
+
*
|
|
11087
|
+
* @param {String} value Value text to be validated
|
|
11088
|
+
* @returns {Boolean} Whether the given value string is a phone number
|
|
11089
|
+
*/
|
|
11090
|
+
function isPhoneNumberText(value) {
|
|
11091
|
+
var valueToTest = value || '';
|
|
11092
|
+
var phoneRegexp = new RegExp(/^[0-9.,+-;()\/\extEXT+# ]*$/i);
|
|
11093
|
+
if (!phoneRegexp.test(valueToTest)) {
|
|
11094
|
+
return false;
|
|
11095
|
+
}
|
|
11096
|
+
return true;
|
|
11097
|
+
}
|
|
11098
|
+
|
|
11099
|
+
/**
|
|
11100
|
+
*
|
|
11101
|
+
* @param {String} value Value text to be validated
|
|
11102
|
+
* @returns {Boolean} Whether the given value string contains safe text (no html tags)
|
|
11103
|
+
*/
|
|
11104
|
+
function isSafeText(value) {
|
|
11105
|
+
var valueToTest = value || '';
|
|
11106
|
+
var htmlRegexp = new RegExp(/<\/?[a-z][\s\S]*>/i);
|
|
11107
|
+
if (htmlRegexp.test(valueToTest)) {
|
|
11108
|
+
return false;
|
|
11109
|
+
}
|
|
11110
|
+
return true;
|
|
11111
|
+
}
|
|
11112
|
+
|
|
11113
|
+
/**
|
|
11114
|
+
*
|
|
11115
|
+
* @param {String} value Value text to be validated
|
|
11116
|
+
* @returns {Boolean} Whether the given value string is an acceptable alphanumeric text in any language (also spaces are accepted)
|
|
11117
|
+
*/
|
|
11118
|
+
function isAlphanumericText(value) {
|
|
11119
|
+
var valueToTest = value || '';
|
|
11120
|
+
// With Unicode Property Escapes, we can match a letter from any language with the following simple regular expression (https://javascript.info/regexp-unicode) => /\p{Letter}/u
|
|
11121
|
+
// Unicode Property Escapes can be transpiled down to ES5 with a tool called regexpu. OR it can be taken from the lib Steve Levithan's XRegExp package with Unicode add-on (https://xregexp.com/plugins/)
|
|
11122
|
+
// The following is transpiled code for all language char with space and numbers
|
|
11123
|
+
// ( taken from https://stackoverflow.com/a/15861883/1874080 with some modifications) :
|
|
11124
|
+
|
|
11125
|
+
var wordsInAllLanguages = /^[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\ \0|0-9\0|1-9]*$/;
|
|
11126
|
+
|
|
11127
|
+
return wordsInAllLanguages.test(valueToTest);
|
|
11128
|
+
}
|
|
11129
|
+
|
|
11130
|
+
/**
|
|
11131
|
+
*
|
|
11132
|
+
* @param {String} value Value text to be validated
|
|
11133
|
+
* @returns {Boolean} Whether the given value string is an acceptable url
|
|
11134
|
+
*/
|
|
11135
|
+
function isUrlText(value) {
|
|
11136
|
+
var valueToTest = value || '';
|
|
11137
|
+
var urlRegexp = new RegExp('^http(s?)://[0-9a-zA-Z]([-.w]*[0-9a-zA-Z])*?[a-z0-9][-a-z0-9]{0,61}[a-z0-9]\\.[a-z]{2,6}(/[\\w\\s-\\w@\\+\\.~#\\?&/=%]*)?$');
|
|
11138
|
+
if (valueToTest && !urlRegexp.test(valueToTest)) {
|
|
11139
|
+
return false;
|
|
11140
|
+
}
|
|
11141
|
+
return true;
|
|
11142
|
+
}
|
|
11143
|
+
|
|
11085
11144
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
11086
11145
|
//
|
|
11087
11146
|
// A strict capitalization should uppercase the first letter of each word a the sentence.
|
|
@@ -32329,6 +32388,18 @@ var useStyles$5 = makeStyles$1(function (theme) {
|
|
|
32329
32388
|
avatar: {
|
|
32330
32389
|
width: 24,
|
|
32331
32390
|
height: 24
|
|
32391
|
+
},
|
|
32392
|
+
deleteIconReadOnly: {
|
|
32393
|
+
display: 'none!important'
|
|
32394
|
+
},
|
|
32395
|
+
rootReadOnly: {
|
|
32396
|
+
fontSize: '1rem',
|
|
32397
|
+
marginLeft: 0,
|
|
32398
|
+
background: 'transparent'
|
|
32399
|
+
},
|
|
32400
|
+
labelReadOnly: {
|
|
32401
|
+
paddingLeft: 0,
|
|
32402
|
+
marginLeft: 0
|
|
32332
32403
|
}
|
|
32333
32404
|
};
|
|
32334
32405
|
});
|
|
@@ -32344,14 +32415,22 @@ function MultiValue$1(_ref) {
|
|
|
32344
32415
|
var classes = useStyles$5();
|
|
32345
32416
|
var hideAvatar = selectProps && selectProps.TextFieldProps && selectProps.TextFieldProps.hideAvatar;
|
|
32346
32417
|
|
|
32347
|
-
|
|
32348
|
-
|
|
32418
|
+
var readOnly = selectProps && selectProps.TextFieldProps && selectProps.TextFieldProps.readOnly;
|
|
32419
|
+
|
|
32420
|
+
return React__default.createElement(Chip$1, _extends$1({
|
|
32349
32421
|
avatar: hideAvatar ? null : data.avatar ? data.avatar : React__default.createElement(Avatar$1, { className: classes.avatar }),
|
|
32350
32422
|
label: children,
|
|
32351
32423
|
className: clsx(classes.chip, defineProperty$1({}, classes.chipFocused, props.isFocused)),
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32424
|
+
classes: {
|
|
32425
|
+
deleteIcon: readOnly ? classes.deleteIconReadOnly : '',
|
|
32426
|
+
root: readOnly ? classes.rootReadOnly : '',
|
|
32427
|
+
label: readOnly ? classes.labelReadOnly : ''
|
|
32428
|
+
},
|
|
32429
|
+
onDelete: removeProps.onClick
|
|
32430
|
+
}, readOnly ? {} : {
|
|
32431
|
+
deleteIcon: React__default.createElement(props.components.Remove, removeProps),
|
|
32432
|
+
variant: 'outlined'
|
|
32433
|
+
}));
|
|
32355
32434
|
}
|
|
32356
32435
|
|
|
32357
32436
|
MultiValue$1.propTypes = {
|
|
@@ -33950,6 +34029,7 @@ var useStyles$8 = makeStyles$1(function (theme) {
|
|
|
33950
34029
|
return {
|
|
33951
34030
|
root: {
|
|
33952
34031
|
marginRight: theme.spacing(-1),
|
|
34032
|
+
marginTop: theme.spacing(-0.5),
|
|
33953
34033
|
paddingLeft: theme.spacing(1.5),
|
|
33954
34034
|
order: 999,
|
|
33955
34035
|
display: 'inline-flex',
|
|
@@ -34045,6 +34125,15 @@ var styles$U = {
|
|
|
34045
34125
|
pointerEvents: 'auto',
|
|
34046
34126
|
display: 'flex',
|
|
34047
34127
|
alignItems: 'center'
|
|
34128
|
+
},
|
|
34129
|
+
inputHover: {
|
|
34130
|
+
'&:hover $notchedOutline': {
|
|
34131
|
+
borderColor: 'transparent'
|
|
34132
|
+
}
|
|
34133
|
+
},
|
|
34134
|
+
notchedOutline: {
|
|
34135
|
+
borderRadius: 2,
|
|
34136
|
+
borderColor: 'transparent'
|
|
34048
34137
|
}
|
|
34049
34138
|
};
|
|
34050
34139
|
|
|
@@ -34057,6 +34146,7 @@ function Control$1(_ref) {
|
|
|
34057
34146
|
TextFieldProps = _ref$selectProps.TextFieldProps,
|
|
34058
34147
|
InputLabelProps = _ref.InputLabelProps;
|
|
34059
34148
|
|
|
34149
|
+
var readOnly = TextFieldProps && TextFieldProps.readOnly;
|
|
34060
34150
|
return React__default.createElement(TextField$1, _extends$1({
|
|
34061
34151
|
fullWidth: true,
|
|
34062
34152
|
variant: 'outlined',
|
|
@@ -34065,8 +34155,14 @@ function Control$1(_ref) {
|
|
|
34065
34155
|
inputProps: _extends$1({
|
|
34066
34156
|
className: classes.input,
|
|
34067
34157
|
ref: innerRef,
|
|
34068
|
-
children: children
|
|
34069
|
-
|
|
34158
|
+
children: children,
|
|
34159
|
+
readOnly: Boolean(readOnly),
|
|
34160
|
+
disabled: Boolean(readOnly)
|
|
34161
|
+
}, innerProps),
|
|
34162
|
+
classes: {
|
|
34163
|
+
root: '' + (readOnly && classes.inputHover),
|
|
34164
|
+
notchedOutline: '' + (!readOnly ? '' : classes.notchedOutline)
|
|
34165
|
+
}
|
|
34070
34166
|
},
|
|
34071
34167
|
InputLabelProps: _extends$1({}, InputLabelProps, {
|
|
34072
34168
|
style: _extends$1({}, styles$U.labelRoot)
|
|
@@ -34128,13 +34224,32 @@ NoOptionsMessage$1.propTypes = {
|
|
|
34128
34224
|
innerProps: PropTypes__default.object
|
|
34129
34225
|
};
|
|
34130
34226
|
|
|
34227
|
+
var useStyles$a = makeStyles$1(function (theme) {
|
|
34228
|
+
return {
|
|
34229
|
+
rootReadOnly: {},
|
|
34230
|
+
lineByLineOption: {
|
|
34231
|
+
flexDirection: 'column!important',
|
|
34232
|
+
alignItems: 'flex-start!important'
|
|
34233
|
+
}
|
|
34234
|
+
};
|
|
34235
|
+
});
|
|
34236
|
+
|
|
34131
34237
|
function ValueContainer$1(_ref) {
|
|
34132
|
-
var
|
|
34238
|
+
var isMulti = _ref.isMulti,
|
|
34239
|
+
selectProps = _ref.selectProps,
|
|
34133
34240
|
children = _ref.children;
|
|
34134
34241
|
|
|
34242
|
+
var classes = useStyles$a();
|
|
34243
|
+
|
|
34244
|
+
var lineByLineOption = selectProps && selectProps.TextFieldProps && selectProps.TextFieldProps.lineByLineOption;
|
|
34245
|
+
|
|
34246
|
+
var readOnly = selectProps && selectProps.TextFieldProps && selectProps.TextFieldProps.readOnly;
|
|
34247
|
+
|
|
34135
34248
|
return React__default.createElement(
|
|
34136
34249
|
'div',
|
|
34137
|
-
{
|
|
34250
|
+
{
|
|
34251
|
+
className: (lineByLineOption && isMulti ? classes.lineByLineOption : '') + ' ' + (readOnly ? classes.rootReadOnly : '') + ' ' + selectProps.classes.valueContainer
|
|
34252
|
+
},
|
|
34138
34253
|
children
|
|
34139
34254
|
);
|
|
34140
34255
|
}
|
|
@@ -34213,7 +34328,7 @@ Option$1.propTypes = {
|
|
|
34213
34328
|
isSelected: PropTypes__default.bool
|
|
34214
34329
|
};
|
|
34215
34330
|
|
|
34216
|
-
var useStyles$
|
|
34331
|
+
var useStyles$b = makeStyles$1(function (theme) {
|
|
34217
34332
|
return {
|
|
34218
34333
|
input: {
|
|
34219
34334
|
display: 'flex',
|
|
@@ -34252,6 +34367,15 @@ var useStyles$a = makeStyles$1(function (theme) {
|
|
|
34252
34367
|
pointerEvents: 'auto',
|
|
34253
34368
|
display: 'flex',
|
|
34254
34369
|
alignItems: 'center'
|
|
34370
|
+
},
|
|
34371
|
+
inputHover: {
|
|
34372
|
+
'&:hover $notchedOutline': {
|
|
34373
|
+
borderColor: 'transparent'
|
|
34374
|
+
}
|
|
34375
|
+
},
|
|
34376
|
+
notchedOutline: {
|
|
34377
|
+
borderRadius: 2,
|
|
34378
|
+
borderColor: 'transparent'
|
|
34255
34379
|
}
|
|
34256
34380
|
};
|
|
34257
34381
|
});
|
|
@@ -34281,7 +34405,7 @@ var defaultComponents$1 = {
|
|
|
34281
34405
|
*
|
|
34282
34406
|
*/
|
|
34283
34407
|
};function USelectPicker(props) {
|
|
34284
|
-
var classes = useStyles$
|
|
34408
|
+
var classes = useStyles$b(props);
|
|
34285
34409
|
var theme = useTheme$1();
|
|
34286
34410
|
var label = props.label,
|
|
34287
34411
|
variant = props.variant,
|
|
@@ -34293,7 +34417,14 @@ var defaultComponents$1 = {
|
|
|
34293
34417
|
InputLabelProps = props.InputLabelProps,
|
|
34294
34418
|
InputLabelHelpProps = props.InputLabelHelpProps,
|
|
34295
34419
|
hideAvatar = props.hideAvatar,
|
|
34296
|
-
|
|
34420
|
+
readOnly = props.readOnly,
|
|
34421
|
+
lineByLineOption = props.lineByLineOption,
|
|
34422
|
+
isClearable = props.isClearable,
|
|
34423
|
+
isSearchable = props.isSearchable,
|
|
34424
|
+
isDisabled = props.isDisabled,
|
|
34425
|
+
menuIsOpen = props.menuIsOpen,
|
|
34426
|
+
placeholder = props.placeholder,
|
|
34427
|
+
others = objectWithoutProperties(props, ['label', 'variant', 'TextFieldProps', 'showNoOptionsWithEmptyTextField', 'onInputChange', 'components', 'showLabelHelp', 'InputLabelProps', 'InputLabelHelpProps', 'hideAvatar', 'readOnly', 'lineByLineOption', 'isClearable', 'isSearchable', 'isDisabled', 'menuIsOpen', 'placeholder']);
|
|
34297
34428
|
|
|
34298
34429
|
var _useState = React.useState(true),
|
|
34299
34430
|
_useState2 = slicedToArray(_useState, 2),
|
|
@@ -34324,6 +34455,8 @@ var defaultComponents$1 = {
|
|
|
34324
34455
|
shrink: true,
|
|
34325
34456
|
classes: { root: classes.labelRoot }
|
|
34326
34457
|
}, InputLabelProps),
|
|
34458
|
+
readOnly: readOnly,
|
|
34459
|
+
lineByLineOption: lineByLineOption,
|
|
34327
34460
|
hideAvatar: hideAvatar,
|
|
34328
34461
|
showLabelHelp: showLabelHelp,
|
|
34329
34462
|
InputLabelHelpProps: InputLabelHelpProps
|
|
@@ -34337,18 +34470,30 @@ var defaultComponents$1 = {
|
|
|
34337
34470
|
onInputChange && onInputChange(value);
|
|
34338
34471
|
};
|
|
34339
34472
|
|
|
34473
|
+
var extraComponents = readOnly ? {
|
|
34474
|
+
DropdownIndicator: function DropdownIndicator() {
|
|
34475
|
+
return null;
|
|
34476
|
+
}
|
|
34477
|
+
} : {};
|
|
34478
|
+
|
|
34479
|
+
var selectPlaceholder = readOnly ? '' : placeholder;
|
|
34480
|
+
|
|
34340
34481
|
return React__default.createElement(index$1, _extends$1({
|
|
34341
34482
|
classes: classes,
|
|
34342
|
-
isClearable: true,
|
|
34343
34483
|
styles: selectStyles,
|
|
34344
|
-
components: _extends$1({}, defaultComponents$1, components),
|
|
34484
|
+
components: _extends$1({}, defaultComponents$1, components, extraComponents),
|
|
34345
34485
|
TextFieldProps: mergedTextFieldProps,
|
|
34346
34486
|
onInputChange: function onInputChange(value) {
|
|
34347
34487
|
return handleInputChange(value);
|
|
34348
34488
|
},
|
|
34349
34489
|
noOptionsMessage: function noOptionsMessage() {
|
|
34350
34490
|
return showNoOptions ? NoOptionsMessage$1 : null;
|
|
34351
|
-
}
|
|
34491
|
+
},
|
|
34492
|
+
isClearable: readOnly ? false : isClearable,
|
|
34493
|
+
isSearchable: readOnly ? false : isSearchable,
|
|
34494
|
+
isDisabled: readOnly ? true : isDisabled,
|
|
34495
|
+
menuIsOpen: readOnly ? false : menuIsOpen,
|
|
34496
|
+
placeholder: selectPlaceholder
|
|
34352
34497
|
}, others));
|
|
34353
34498
|
}
|
|
34354
34499
|
|
|
@@ -34408,7 +34553,19 @@ USelectPicker.propTypes = {
|
|
|
34408
34553
|
/** Props applied to the input label help element. E.g. InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
|
|
34409
34554
|
InputLabelHelpProps: PropTypes__default.object,
|
|
34410
34555
|
/** Hide people avatar */
|
|
34411
|
-
hideAvatar: PropTypes__default.bool
|
|
34556
|
+
hideAvatar: PropTypes__default.bool,
|
|
34557
|
+
/** Is the read only field or not */
|
|
34558
|
+
readOnly: PropTypes__default.bool,
|
|
34559
|
+
/** Whether the selected options displayed in the new line or not in multiple selected options */
|
|
34560
|
+
lineByLineOption: PropTypes__default.bool,
|
|
34561
|
+
/** Is the select value clearable */
|
|
34562
|
+
isClearable: PropTypes__default.bool,
|
|
34563
|
+
/** Whether to enable search functionality */
|
|
34564
|
+
isSearchable: PropTypes__default.bool,
|
|
34565
|
+
/** Whether the input is disabled */
|
|
34566
|
+
isDisabled: PropTypes__default.bool,
|
|
34567
|
+
/** Whether the menu is open */
|
|
34568
|
+
menuIsOpen: PropTypes__default.bool
|
|
34412
34569
|
};
|
|
34413
34570
|
|
|
34414
34571
|
USelectPicker.defaultProps = {
|
|
@@ -34418,7 +34575,13 @@ USelectPicker.defaultProps = {
|
|
|
34418
34575
|
showNoOptionsWithEmptyTextField: true,
|
|
34419
34576
|
showLabelHelp: false,
|
|
34420
34577
|
InputLabelHelpProps: {},
|
|
34421
|
-
hideAvatar: true
|
|
34578
|
+
hideAvatar: true,
|
|
34579
|
+
readOnly: false,
|
|
34580
|
+
isClearable: undefined,
|
|
34581
|
+
isSearchable: true,
|
|
34582
|
+
isDisabled: false,
|
|
34583
|
+
menuIsOpen: undefined,
|
|
34584
|
+
lineByLineOption: false
|
|
34422
34585
|
};
|
|
34423
34586
|
|
|
34424
34587
|
/**
|
|
@@ -40324,7 +40487,7 @@ var DIALOG_WIDTH = 310;
|
|
|
40324
40487
|
var DIALOG_WIDTH_WIDER = 325;
|
|
40325
40488
|
var VIEW_HEIGHT = 305;
|
|
40326
40489
|
|
|
40327
|
-
var useStyles$
|
|
40490
|
+
var useStyles$c = makeStyles$1(function (theme) {
|
|
40328
40491
|
return {
|
|
40329
40492
|
staticWrapperRoot: {
|
|
40330
40493
|
overflow: 'hidden',
|
|
@@ -40339,7 +40502,7 @@ var useStyles$b = makeStyles$1(function (theme) {
|
|
|
40339
40502
|
});
|
|
40340
40503
|
var StaticWrapper = function StaticWrapper(_ref) {
|
|
40341
40504
|
var children = _ref.children;
|
|
40342
|
-
var classes = useStyles$
|
|
40505
|
+
var classes = useStyles$c();
|
|
40343
40506
|
return React.createElement("div", {
|
|
40344
40507
|
className: classes.staticWrapperRoot,
|
|
40345
40508
|
children: children
|
|
@@ -40833,7 +40996,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
40833
40996
|
if (superClass) _setPrototypeOf$2(subClass, superClass);
|
|
40834
40997
|
}
|
|
40835
40998
|
|
|
40836
|
-
var useStyles$
|
|
40999
|
+
var useStyles$d = makeStyles$1(function (theme) {
|
|
40837
41000
|
return {
|
|
40838
41001
|
day: {
|
|
40839
41002
|
width: 36,
|
|
@@ -40876,7 +41039,7 @@ var Day = function Day(_ref) {
|
|
|
40876
41039
|
selected = _ref.selected,
|
|
40877
41040
|
other = _objectWithoutProperties$1(_ref, ["children", "disabled", "hidden", "current", "selected"]);
|
|
40878
41041
|
|
|
40879
|
-
var classes = useStyles$
|
|
41042
|
+
var classes = useStyles$d();
|
|
40880
41043
|
var className = clsx(classes.day, hidden && classes.hidden, current && classes.current, selected && classes.daySelected, disabled && classes.dayDisabled);
|
|
40881
41044
|
return React.createElement(IconButton$1, _extends$4({
|
|
40882
41045
|
className: className,
|
|
@@ -41981,7 +42144,7 @@ var DayWrapper = function DayWrapper(_ref) {
|
|
|
41981
42144
|
};
|
|
41982
42145
|
|
|
41983
42146
|
var animationDuration = 350;
|
|
41984
|
-
var useStyles$
|
|
42147
|
+
var useStyles$e = makeStyles$1(function (theme) {
|
|
41985
42148
|
var slideTransition = theme.transitions.create('transform', {
|
|
41986
42149
|
duration: animationDuration,
|
|
41987
42150
|
easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)'
|
|
@@ -42033,7 +42196,7 @@ var SlideTransition = function SlideTransition(_ref) {
|
|
|
42033
42196
|
slideDirection = _ref.slideDirection,
|
|
42034
42197
|
_ref$className = _ref.className,
|
|
42035
42198
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
42036
|
-
var classes = useStyles$
|
|
42199
|
+
var classes = useStyles$e();
|
|
42037
42200
|
var transitionClasses = {
|
|
42038
42201
|
exit: classes.slideExit,
|
|
42039
42202
|
enterActive: classes.slideEnterActive,
|
|
@@ -42881,7 +43044,7 @@ var positions$1 = {
|
|
|
42881
43044
|
22: [-64, 77],
|
|
42882
43045
|
23: [-37, 50]
|
|
42883
43046
|
};
|
|
42884
|
-
var useStyles$
|
|
43047
|
+
var useStyles$f = makeStyles$1(function (theme) {
|
|
42885
43048
|
var size = theme.spacing(4);
|
|
42886
43049
|
return {
|
|
42887
43050
|
clockNumber: {
|
|
@@ -42908,7 +43071,7 @@ var ClockNumber = function ClockNumber(_ref) {
|
|
|
42908
43071
|
label = _ref.label,
|
|
42909
43072
|
index = _ref.index,
|
|
42910
43073
|
isInner = _ref.isInner;
|
|
42911
|
-
var classes = useStyles$
|
|
43074
|
+
var classes = useStyles$f();
|
|
42912
43075
|
var className = clsx(classes.clockNumber, selected && classes.clockNumberSelected);
|
|
42913
43076
|
var transformStyle = React.useMemo(function () {
|
|
42914
43077
|
var position = positions$1[index];
|
|
@@ -43152,7 +43315,7 @@ function useViews(views, openTo, onChange) {
|
|
|
43152
43315
|
};
|
|
43153
43316
|
}
|
|
43154
43317
|
|
|
43155
|
-
var useStyles$
|
|
43318
|
+
var useStyles$g = makeStyles$1(function (theme) {
|
|
43156
43319
|
return {
|
|
43157
43320
|
root: {
|
|
43158
43321
|
height: 40,
|
|
@@ -43187,7 +43350,7 @@ var Year = function Year(_ref) {
|
|
|
43187
43350
|
children = _ref.children,
|
|
43188
43351
|
other = _objectWithoutProperties$1(_ref, ["onSelect", "forwardedRef", "value", "selected", "disabled", "children"]);
|
|
43189
43352
|
|
|
43190
|
-
var classes = useStyles$
|
|
43353
|
+
var classes = useStyles$g();
|
|
43191
43354
|
var handleClick = React.useCallback(function () {
|
|
43192
43355
|
return onSelect(value);
|
|
43193
43356
|
}, [onSelect, value]);
|
|
@@ -43519,7 +43682,7 @@ Picker.defaultProps = _objectSpread$1$1({}, datePickerDefaultProps, {
|
|
|
43519
43682
|
views: Object.keys(viewsMap)
|
|
43520
43683
|
});
|
|
43521
43684
|
|
|
43522
|
-
var useStyles$
|
|
43685
|
+
var useStyles$h = makeStyles$1(function (theme) {
|
|
43523
43686
|
var textColor = theme.palette.type === 'light' ? theme.palette.primary.contrastText : theme.palette.getContrastText(theme.palette.background["default"]);
|
|
43524
43687
|
return {
|
|
43525
43688
|
toolbarTxt: {
|
|
@@ -43540,7 +43703,7 @@ var ToolbarText = function ToolbarText(_ref) {
|
|
|
43540
43703
|
className = _ref$className === void 0 ? null : _ref$className,
|
|
43541
43704
|
other = _objectWithoutProperties$1(_ref, ["selected", "label", "className"]);
|
|
43542
43705
|
|
|
43543
|
-
var classes = useStyles$
|
|
43706
|
+
var classes = useStyles$h();
|
|
43544
43707
|
return React.createElement(Typography$1, _extends$4({
|
|
43545
43708
|
children: label,
|
|
43546
43709
|
className: clsx(classes.toolbarTxt, className, selected && classes.toolbarBtnSelected)
|
|
@@ -44156,7 +44319,7 @@ function makePickerWithState(_ref) {
|
|
|
44156
44319
|
return PickerWithState;
|
|
44157
44320
|
}
|
|
44158
44321
|
|
|
44159
|
-
var useStyles$
|
|
44322
|
+
var useStyles$i = makeStyles$1({
|
|
44160
44323
|
toolbar: {
|
|
44161
44324
|
flexDirection: 'column',
|
|
44162
44325
|
alignItems: 'flex-start'
|
|
@@ -44177,7 +44340,7 @@ var DatePickerToolbar = function DatePickerToolbar(_ref) {
|
|
|
44177
44340
|
isLandscape = _ref.isLandscape,
|
|
44178
44341
|
openView = _ref.openView;
|
|
44179
44342
|
var utils = useUtils();
|
|
44180
|
-
var classes = useStyles$
|
|
44343
|
+
var classes = useStyles$i();
|
|
44181
44344
|
var isYearOnly = React.useMemo(function () {
|
|
44182
44345
|
return isYearOnlyView(views);
|
|
44183
44346
|
}, [views]);
|
|
@@ -44246,7 +44409,7 @@ var KeyboardDatePicker = makePickerWithState({
|
|
|
44246
44409
|
DatePicker.defaultProps = defaultProps$5;
|
|
44247
44410
|
KeyboardDatePicker.defaultProps = defaultProps$5;
|
|
44248
44411
|
|
|
44249
|
-
var useStyles$
|
|
44412
|
+
var useStyles$j = makeStyles$1({
|
|
44250
44413
|
toolbarLandscape: {
|
|
44251
44414
|
flexWrap: 'wrap'
|
|
44252
44415
|
},
|
|
@@ -44312,7 +44475,7 @@ var TimePickerToolbar = function TimePickerToolbar(_ref) {
|
|
|
44312
44475
|
setOpenView = _ref.setOpenView;
|
|
44313
44476
|
var utils = useUtils();
|
|
44314
44477
|
var theme = useTheme$1();
|
|
44315
|
-
var classes = useStyles$
|
|
44478
|
+
var classes = useStyles$j();
|
|
44316
44479
|
|
|
44317
44480
|
var _useMeridiemMode = useMeridiemMode(date, ampm, onChange),
|
|
44318
44481
|
meridiemMode = _useMeridiemMode.meridiemMode,
|
|
@@ -44457,7 +44620,7 @@ var tabIndexToView = function tabIndexToView(tab) {
|
|
|
44457
44620
|
return 'hours';
|
|
44458
44621
|
};
|
|
44459
44622
|
|
|
44460
|
-
var useStyles$
|
|
44623
|
+
var useStyles$k = makeStyles$1(function (theme) {
|
|
44461
44624
|
// prettier-ignore
|
|
44462
44625
|
var tabsBackground = theme.palette.type === 'light' ? theme.palette.primary.main : theme.palette.background["default"];
|
|
44463
44626
|
return {
|
|
@@ -44474,7 +44637,7 @@ var DateTimePickerTabs = function DateTimePickerTabs(_ref) {
|
|
|
44474
44637
|
onChange = _ref.onChange,
|
|
44475
44638
|
dateRangeIcon = _ref.dateRangeIcon,
|
|
44476
44639
|
timeIcon = _ref.timeIcon;
|
|
44477
|
-
var classes = useStyles$
|
|
44640
|
+
var classes = useStyles$k();
|
|
44478
44641
|
var theme = useTheme$1();
|
|
44479
44642
|
var indicatorColor = theme.palette.type === 'light' ? 'secondary' : 'primary';
|
|
44480
44643
|
|
|
@@ -46192,7 +46355,10 @@ var defaultErrorMessages = {
|
|
|
46192
46355
|
allowedExtensions: 'File type not allowed',
|
|
46193
46356
|
isUrl: 'It should start with http:// or https://',
|
|
46194
46357
|
isLatitude: 'It should be between -90 and 90',
|
|
46195
|
-
isLongitude: 'It should be between -180 and 180'
|
|
46358
|
+
isLongitude: 'It should be between -180 and 180',
|
|
46359
|
+
isPhone: 'Only numbers,(,),-,.,# and (ext) are allowed',
|
|
46360
|
+
isSafeText: 'HTML not allowed',
|
|
46361
|
+
isAlphanumeric: 'Only letters and numbers are allowed'
|
|
46196
46362
|
};
|
|
46197
46363
|
|
|
46198
46364
|
/* eslint-disable */
|
|
@@ -46236,6 +46402,9 @@ var styles$13 = {
|
|
|
46236
46402
|
* * isString
|
|
46237
46403
|
* * maxFileSize
|
|
46238
46404
|
* * allowedExtensions
|
|
46405
|
+
* * isPhone
|
|
46406
|
+
* * isAlphanumeric
|
|
46407
|
+
* * isSafeText
|
|
46239
46408
|
*
|
|
46240
46409
|
* It accepts all the props of Material-ui [TextField](https://material-ui.com/api/text-field/#textfield-api)
|
|
46241
46410
|
*/
|
|
@@ -46444,7 +46613,7 @@ UValidatorComponent.propTypes = {
|
|
|
46444
46613
|
/** Allow to use required validator in any validation trigger, not only form submit. */
|
|
46445
46614
|
withRequiredValidator: PropTypes__default.bool,
|
|
46446
46615
|
/** you must provide this prop, it will be used only for validation. */
|
|
46447
|
-
value: PropTypes__default.
|
|
46616
|
+
value: PropTypes__default.any.isRequired
|
|
46448
46617
|
};
|
|
46449
46618
|
|
|
46450
46619
|
/**
|
|
@@ -46465,11 +46634,7 @@ function ForwardRefForm(props, ref) {
|
|
|
46465
46634
|
};
|
|
46466
46635
|
|
|
46467
46636
|
lib_2.addValidationRule('isUrl', function (value) {
|
|
46468
|
-
|
|
46469
|
-
if (value != '' && !urlRegexp.test(value)) {
|
|
46470
|
-
return false;
|
|
46471
|
-
}
|
|
46472
|
-
return true;
|
|
46637
|
+
return isUrlText(value);
|
|
46473
46638
|
});
|
|
46474
46639
|
|
|
46475
46640
|
lib_2.addValidationRule('isLatitude', function (value) {
|
|
@@ -46485,6 +46650,18 @@ function ForwardRefForm(props, ref) {
|
|
|
46485
46650
|
return true;
|
|
46486
46651
|
});
|
|
46487
46652
|
|
|
46653
|
+
lib_2.addValidationRule('isPhone', function (value) {
|
|
46654
|
+
return isPhoneNumberText(value);
|
|
46655
|
+
});
|
|
46656
|
+
|
|
46657
|
+
lib_2.addValidationRule('isSafeText', function (value) {
|
|
46658
|
+
return isSafeText(value);
|
|
46659
|
+
});
|
|
46660
|
+
|
|
46661
|
+
lib_2.addValidationRule('isAlphanumeric', function (value) {
|
|
46662
|
+
return isAlphanumericText(value);
|
|
46663
|
+
});
|
|
46664
|
+
|
|
46488
46665
|
return React__default.createElement(lib_2, _extends$1({}, props, { ref: ref }));
|
|
46489
46666
|
}
|
|
46490
46667
|
|
|
@@ -46508,7 +46685,7 @@ UValidatorForm.defaultProps = {
|
|
|
46508
46685
|
onSubmit: function onSubmit() {}
|
|
46509
46686
|
};
|
|
46510
46687
|
|
|
46511
|
-
var useStyles$
|
|
46688
|
+
var useStyles$l = makeStyles$1(function (theme) {
|
|
46512
46689
|
return {
|
|
46513
46690
|
textField: {
|
|
46514
46691
|
marginTop: theme.spacing(0.25),
|
|
@@ -46555,7 +46732,7 @@ var useStyles$k = makeStyles$1(function (theme) {
|
|
|
46555
46732
|
*
|
|
46556
46733
|
*/
|
|
46557
46734
|
function ActiveFormTextField(props) {
|
|
46558
|
-
var classes = useStyles$
|
|
46735
|
+
var classes = useStyles$l(props);
|
|
46559
46736
|
var typographyVariant = props.typographyVariant,
|
|
46560
46737
|
className = props.className,
|
|
46561
46738
|
variant = props.variant,
|
|
@@ -46634,7 +46811,7 @@ ActiveFormTextField.defaultProps = {
|
|
|
46634
46811
|
|
|
46635
46812
|
var _ActiveFormSelect$pro;
|
|
46636
46813
|
|
|
46637
|
-
var useStyles$
|
|
46814
|
+
var useStyles$m = makeStyles$1(function (theme) {
|
|
46638
46815
|
return {
|
|
46639
46816
|
textField: {
|
|
46640
46817
|
marginTop: theme.spacing(0.25),
|
|
@@ -46675,7 +46852,7 @@ var useStyles$l = makeStyles$1(function (theme) {
|
|
|
46675
46852
|
*
|
|
46676
46853
|
*/
|
|
46677
46854
|
function ActiveFormSelect(props) {
|
|
46678
|
-
var classes = useStyles$
|
|
46855
|
+
var classes = useStyles$m(props);
|
|
46679
46856
|
var select = props.select,
|
|
46680
46857
|
typographyVariant = props.typographyVariant,
|
|
46681
46858
|
className = props.className,
|
|
@@ -46797,6 +46974,71 @@ UPositiveInteger.propTypes = {
|
|
|
46797
46974
|
withRequiredValidator: PropTypes__default.bool
|
|
46798
46975
|
};
|
|
46799
46976
|
|
|
46977
|
+
var useStyles$n = makeStyles$1(function (theme) {
|
|
46978
|
+
return {
|
|
46979
|
+
startAdornmentContainer: {
|
|
46980
|
+
marginRight: theme.spacing(0.5)
|
|
46981
|
+
}
|
|
46982
|
+
};
|
|
46983
|
+
});
|
|
46984
|
+
|
|
46985
|
+
function UCurrencyField(_ref) {
|
|
46986
|
+
var inputPrefix = _ref.inputPrefix,
|
|
46987
|
+
decimalScale = _ref.decimalScale,
|
|
46988
|
+
InputProps = _ref.InputProps,
|
|
46989
|
+
inputProps = _ref.inputProps,
|
|
46990
|
+
props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
|
|
46991
|
+
|
|
46992
|
+
var classes = useStyles$n(props);
|
|
46993
|
+
return React__default.createElement(UPositiveInteger, _extends$1({
|
|
46994
|
+
variant: 'outlined',
|
|
46995
|
+
InputProps: _extends$1({
|
|
46996
|
+
startAdornment: React__default.createElement(
|
|
46997
|
+
'span',
|
|
46998
|
+
{ className: classes.startAdornmentContainer },
|
|
46999
|
+
inputPrefix
|
|
47000
|
+
)
|
|
47001
|
+
}, InputProps),
|
|
47002
|
+
inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
|
|
47003
|
+
}, props));
|
|
47004
|
+
}
|
|
47005
|
+
|
|
47006
|
+
UCurrencyField.propTypes = {
|
|
47007
|
+
/** label */
|
|
47008
|
+
label: PropTypes__default.string,
|
|
47009
|
+
/** placeholder text*/
|
|
47010
|
+
placeholder: PropTypes__default.string,
|
|
47011
|
+
/**
|
|
47012
|
+
* Array of validators.See list of default validators above.
|
|
47013
|
+
*
|
|
47014
|
+
* Ex: `validators={['required', 'isEmail']}`
|
|
47015
|
+
*/
|
|
47016
|
+
validators: PropTypes__default.array,
|
|
47017
|
+
/** Attributes applied to the input element. */
|
|
47018
|
+
inputProps: PropTypes__default.object,
|
|
47019
|
+
/** Props applied to the Input element. */
|
|
47020
|
+
InputProps: PropTypes__default.object,
|
|
47021
|
+
/** Prefix string for the input. */
|
|
47022
|
+
inputPrefix: PropTypes__default.string,
|
|
47023
|
+
/** Decimal digit number to be used as default. */
|
|
47024
|
+
decimalScale: PropTypes__default.number,
|
|
47025
|
+
/**
|
|
47026
|
+
* customErrorMessages is an object with key as validator and value as customised error message.
|
|
47027
|
+
*
|
|
47028
|
+
* Ex: `customErrorMessages={{required: 'This field is required'}`
|
|
47029
|
+
*/
|
|
47030
|
+
customErrorMessages: PropTypes__default.object,
|
|
47031
|
+
/** To make the content readOnly */
|
|
47032
|
+
readOnly: PropTypes__default.bool,
|
|
47033
|
+
/** Name of input. */
|
|
47034
|
+
name: PropTypes__default.string
|
|
47035
|
+
};
|
|
47036
|
+
|
|
47037
|
+
UCurrencyField.defaultProps = {
|
|
47038
|
+
inputPrefix: '$',
|
|
47039
|
+
decimalScale: 2
|
|
47040
|
+
};
|
|
47041
|
+
|
|
46800
47042
|
function ActiveFormPositiveInteger(_ref) {
|
|
46801
47043
|
var InputProps = _ref.InputProps,
|
|
46802
47044
|
props = objectWithoutProperties(_ref, ['InputProps']);
|
|
@@ -46845,6 +47087,81 @@ ActiveFormPositiveInteger.propTypes = {
|
|
|
46845
47087
|
withRequiredValidator: PropTypes__default.bool
|
|
46846
47088
|
};
|
|
46847
47089
|
|
|
47090
|
+
var useStyles$o = makeStyles$1(function (theme) {
|
|
47091
|
+
return {
|
|
47092
|
+
startAdornmentContainer: {
|
|
47093
|
+
marginRight: theme.spacing(0.5)
|
|
47094
|
+
}
|
|
47095
|
+
};
|
|
47096
|
+
});
|
|
47097
|
+
|
|
47098
|
+
function ActiveCurrencyField(_ref) {
|
|
47099
|
+
var inputPrefix = _ref.inputPrefix,
|
|
47100
|
+
decimalScale = _ref.decimalScale,
|
|
47101
|
+
InputProps = _ref.InputProps,
|
|
47102
|
+
inputProps = _ref.inputProps,
|
|
47103
|
+
props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
|
|
47104
|
+
|
|
47105
|
+
var classes = useStyles$o(props);
|
|
47106
|
+
return React__default.createElement(ActiveFormPositiveInteger, _extends$1({
|
|
47107
|
+
variant: 'outlined',
|
|
47108
|
+
InputProps: _extends$1({
|
|
47109
|
+
startAdornment: React__default.createElement(
|
|
47110
|
+
'span',
|
|
47111
|
+
{ className: classes.startAdornmentContainer },
|
|
47112
|
+
inputPrefix
|
|
47113
|
+
)
|
|
47114
|
+
}, InputProps),
|
|
47115
|
+
inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
|
|
47116
|
+
}, props));
|
|
47117
|
+
}
|
|
47118
|
+
|
|
47119
|
+
ActiveCurrencyField.propTypes = {
|
|
47120
|
+
/** label */
|
|
47121
|
+
label: PropTypes__default.string,
|
|
47122
|
+
/** placeholder text*/
|
|
47123
|
+
placeholder: PropTypes__default.string,
|
|
47124
|
+
/** Typography for text inside the input (Ex: h1, div, etc.) */
|
|
47125
|
+
typographyVariant: PropTypes__default.string,
|
|
47126
|
+
/** Input has some default padding already, to make changes to it pass padding like `inputPadding='0px 2px'` */
|
|
47127
|
+
inputPadding: PropTypes__default.string,
|
|
47128
|
+
/** To hide or display the textfied border*/
|
|
47129
|
+
showBorder: PropTypes__default.bool,
|
|
47130
|
+
/**
|
|
47131
|
+
* Array of validators.See list of default validators above.
|
|
47132
|
+
*
|
|
47133
|
+
* Ex: `validators={['required', 'isEmail']}`
|
|
47134
|
+
*/
|
|
47135
|
+
validators: PropTypes__default.array,
|
|
47136
|
+
/** Attributes applied to the input element. */
|
|
47137
|
+
inputProps: PropTypes__default.object,
|
|
47138
|
+
/** Props applied to the Input element. */
|
|
47139
|
+
InputProps: PropTypes__default.object,
|
|
47140
|
+
/** Prefix string for the input. */
|
|
47141
|
+
inputPrefix: PropTypes__default.string,
|
|
47142
|
+
/** Decimal digit number to be used as default. */
|
|
47143
|
+
decimalScale: PropTypes__default.number,
|
|
47144
|
+
/**
|
|
47145
|
+
* customErrorMessages is an object with key as validator and value as customised error message.
|
|
47146
|
+
*
|
|
47147
|
+
* Ex: `customErrorMessages={{required: 'This field is required'}`
|
|
47148
|
+
*/
|
|
47149
|
+
customErrorMessages: PropTypes__default.object,
|
|
47150
|
+
/** To make the content readOnly */
|
|
47151
|
+
readOnly: PropTypes__default.bool,
|
|
47152
|
+
/** Name of input. */
|
|
47153
|
+
name: PropTypes__default.string,
|
|
47154
|
+
/** It triggers after each validation.It will return true or false. */
|
|
47155
|
+
validatorListener: PropTypes__default.func,
|
|
47156
|
+
/** Allow to use required validator in any validation trigger, not only form submit. */
|
|
47157
|
+
withRequiredValidator: PropTypes__default.bool
|
|
47158
|
+
};
|
|
47159
|
+
|
|
47160
|
+
ActiveCurrencyField.defaultProps = {
|
|
47161
|
+
inputPrefix: '$',
|
|
47162
|
+
decimalScale: 2
|
|
47163
|
+
};
|
|
47164
|
+
|
|
46848
47165
|
var DeleteOutlined = createCommonjsModule(function (module, exports) {
|
|
46849
47166
|
|
|
46850
47167
|
|
|
@@ -46869,7 +47186,7 @@ exports.default = _default;
|
|
|
46869
47186
|
|
|
46870
47187
|
var DeleteOutlinedIcon = unwrapExports(DeleteOutlined);
|
|
46871
47188
|
|
|
46872
|
-
var useStyles$
|
|
47189
|
+
var useStyles$p = makeStyles$1(function (theme) {
|
|
46873
47190
|
return {
|
|
46874
47191
|
menuDelete: {
|
|
46875
47192
|
width: '500px'
|
|
@@ -46889,7 +47206,7 @@ var useStyles$m = makeStyles$1(function (theme) {
|
|
|
46889
47206
|
* It has two varint icon/menu item
|
|
46890
47207
|
*/
|
|
46891
47208
|
function UConfirmationButton(props) {
|
|
46892
|
-
var classes = useStyles$
|
|
47209
|
+
var classes = useStyles$p();
|
|
46893
47210
|
var onConfirm = props.onConfirm,
|
|
46894
47211
|
id = props.id,
|
|
46895
47212
|
buttonText = props.buttonText,
|
|
@@ -47004,7 +47321,7 @@ UConfirmationButton.defaultProps = {
|
|
|
47004
47321
|
/**
|
|
47005
47322
|
* displays radio buttons
|
|
47006
47323
|
*/
|
|
47007
|
-
var useStyles$
|
|
47324
|
+
var useStyles$q = makeStyles$1(function (theme) {
|
|
47008
47325
|
return {
|
|
47009
47326
|
padding: {
|
|
47010
47327
|
paddingLeft: theme.spacing(3)
|
|
@@ -47025,7 +47342,7 @@ function URadioButtons(_ref) {
|
|
|
47025
47342
|
optionLabels = _ref.optionLabels,
|
|
47026
47343
|
optionValues = _ref.optionValues;
|
|
47027
47344
|
|
|
47028
|
-
var classes = useStyles$
|
|
47345
|
+
var classes = useStyles$q();
|
|
47029
47346
|
var handleOnChange = function handleOnChange(event) {
|
|
47030
47347
|
onChange && onChange(event);
|
|
47031
47348
|
};
|
|
@@ -47129,7 +47446,7 @@ exports.default = _default;
|
|
|
47129
47446
|
|
|
47130
47447
|
var DoneIcon = unwrapExports(Done);
|
|
47131
47448
|
|
|
47132
|
-
var useStyles$
|
|
47449
|
+
var useStyles$r = makeStyles$1(function (theme) {
|
|
47133
47450
|
return {
|
|
47134
47451
|
root: {
|
|
47135
47452
|
position: 'fixed',
|
|
@@ -47161,7 +47478,7 @@ function UAsyncBadge(_ref) {
|
|
|
47161
47478
|
visible = _ref.visible,
|
|
47162
47479
|
onReset = _ref.onReset;
|
|
47163
47480
|
|
|
47164
|
-
var classes = useStyles$
|
|
47481
|
+
var classes = useStyles$r();
|
|
47165
47482
|
|
|
47166
47483
|
/** If variant is success or error, after few seconds, it will set asyncResponse visible to false */
|
|
47167
47484
|
React.useEffect(function () {
|
|
@@ -47200,7 +47517,7 @@ UAsyncBadge.propTypes = {
|
|
|
47200
47517
|
onReset: PropTypes__default.func
|
|
47201
47518
|
};
|
|
47202
47519
|
|
|
47203
|
-
var useStyles$
|
|
47520
|
+
var useStyles$s = makeStyles$1(function () {
|
|
47204
47521
|
return {
|
|
47205
47522
|
pageLoadingProgress: {
|
|
47206
47523
|
height: '50vh',
|
|
@@ -47215,7 +47532,7 @@ var useStyles$p = makeStyles$1(function () {
|
|
|
47215
47532
|
* 2. Display text message
|
|
47216
47533
|
*/
|
|
47217
47534
|
function UPageLoadingProgress(props) {
|
|
47218
|
-
var classes = useStyles$
|
|
47535
|
+
var classes = useStyles$s();
|
|
47219
47536
|
var text = props.text;
|
|
47220
47537
|
|
|
47221
47538
|
return React__default.createElement(
|
|
@@ -49068,7 +49385,7 @@ UErrorAlert.defaultProps = {
|
|
|
49068
49385
|
|
|
49069
49386
|
var filter = createFilterOptions();
|
|
49070
49387
|
|
|
49071
|
-
var useStyles$
|
|
49388
|
+
var useStyles$t = makeStyles$1(function (theme) {
|
|
49072
49389
|
return {
|
|
49073
49390
|
controlStyle: {
|
|
49074
49391
|
marginTop: theme.spacing(2),
|
|
@@ -49096,7 +49413,7 @@ function UAutoComplete(_ref) {
|
|
|
49096
49413
|
allowContextSpecific = _ref.allowContextSpecific,
|
|
49097
49414
|
props = _ref.props;
|
|
49098
49415
|
|
|
49099
|
-
var classes = useStyles$
|
|
49416
|
+
var classes = useStyles$t();
|
|
49100
49417
|
//const dispatch = useDispatch()
|
|
49101
49418
|
|
|
49102
49419
|
var _useState = React.useState(value || null),
|
|
@@ -49245,7 +49562,7 @@ UAutoComplete.defaultProps = {
|
|
|
49245
49562
|
|
|
49246
49563
|
/* eslint-disable no-nested-ternary */
|
|
49247
49564
|
|
|
49248
|
-
var useStyles$
|
|
49565
|
+
var useStyles$u = makeStyles$1(function (theme) {
|
|
49249
49566
|
var _ref;
|
|
49250
49567
|
|
|
49251
49568
|
return _ref = {
|
|
@@ -49277,7 +49594,7 @@ var useStyles$r = makeStyles$1(function (theme) {
|
|
|
49277
49594
|
* Breadcrumbs is a component to implement current user path of the application
|
|
49278
49595
|
*/
|
|
49279
49596
|
function UBreadcrumbs(props) {
|
|
49280
|
-
var classes = useStyles$
|
|
49597
|
+
var classes = useStyles$u();
|
|
49281
49598
|
var breadcrumbLinks = props.breadcrumbLinks;
|
|
49282
49599
|
|
|
49283
49600
|
|
|
@@ -49354,7 +49671,7 @@ UInfiniteScroll.propTypes = {
|
|
|
49354
49671
|
onEndOfScroll: PropTypes__default.func
|
|
49355
49672
|
};
|
|
49356
49673
|
|
|
49357
|
-
var useStyles$
|
|
49674
|
+
var useStyles$v = makeStyles$1(function (theme) {
|
|
49358
49675
|
return {
|
|
49359
49676
|
small: {
|
|
49360
49677
|
width: theme.spacing(4),
|
|
@@ -49399,7 +49716,7 @@ function UAvatarImage(_ref) {
|
|
|
49399
49716
|
zIndexValue = _ref.zIndexValue,
|
|
49400
49717
|
loadPhoto = _ref.loadPhoto;
|
|
49401
49718
|
|
|
49402
|
-
var classes = useStyles$
|
|
49719
|
+
var classes = useStyles$v();
|
|
49403
49720
|
|
|
49404
49721
|
var _useState = React.useState(''),
|
|
49405
49722
|
_useState2 = slicedToArray(_useState, 2),
|
|
@@ -49831,7 +50148,7 @@ exports.default = _default;
|
|
|
49831
50148
|
|
|
49832
50149
|
var CloseIcon$1 = unwrapExports(Close);
|
|
49833
50150
|
|
|
49834
|
-
var useStyles$
|
|
50151
|
+
var useStyles$w = makeStyles$1(function (theme) {
|
|
49835
50152
|
return {
|
|
49836
50153
|
root: {
|
|
49837
50154
|
width: '100%',
|
|
@@ -49871,7 +50188,7 @@ function USearchBox(_ref) {
|
|
|
49871
50188
|
searchValue = _useState2[0],
|
|
49872
50189
|
setSearch = _useState2[1];
|
|
49873
50190
|
|
|
49874
|
-
var classes = useStyles$
|
|
50191
|
+
var classes = useStyles$w();
|
|
49875
50192
|
|
|
49876
50193
|
var handleChange = function handleChange(event) {
|
|
49877
50194
|
setSearch(event.target.value);
|
|
@@ -49972,7 +50289,7 @@ var styles$16 = {
|
|
|
49972
50289
|
}
|
|
49973
50290
|
};
|
|
49974
50291
|
|
|
49975
|
-
var useStyles$
|
|
50292
|
+
var useStyles$x = makeStyles$1(function (theme) {
|
|
49976
50293
|
return {
|
|
49977
50294
|
textField: {
|
|
49978
50295
|
marginTop: theme.spacing(0.25),
|
|
@@ -50015,7 +50332,7 @@ var useStyles$u = makeStyles$1(function (theme) {
|
|
|
50015
50332
|
* ActiveKeyboardDatePicker is a customized [Material Ui KeyboardDatePicker]('https://material-ui-pickers.dev/api/KeyboardDatePicker') for more details
|
|
50016
50333
|
*/
|
|
50017
50334
|
function ActiveKeyboardDatePicker(props) {
|
|
50018
|
-
var classes = useStyles$
|
|
50335
|
+
var classes = useStyles$x(props);
|
|
50019
50336
|
var autoOk = props.autoOk,
|
|
50020
50337
|
variant = props.variant,
|
|
50021
50338
|
inputVariant = props.inputVariant,
|
|
@@ -50134,7 +50451,7 @@ var styles$17 = {
|
|
|
50134
50451
|
}
|
|
50135
50452
|
};
|
|
50136
50453
|
|
|
50137
|
-
var useStyles$
|
|
50454
|
+
var useStyles$y = makeStyles$1(function (theme) {
|
|
50138
50455
|
return {
|
|
50139
50456
|
textField: {
|
|
50140
50457
|
marginTop: theme.spacing(0.25),
|
|
@@ -50173,7 +50490,7 @@ var useStyles$v = makeStyles$1(function (theme) {
|
|
|
50173
50490
|
* Please have look at [Material Ui Date Picker]('https://material-ui-pickers.dev/api/DatePicker') for more details
|
|
50174
50491
|
*/
|
|
50175
50492
|
function ActiveDatePicker(props) {
|
|
50176
|
-
var classes = useStyles$
|
|
50493
|
+
var classes = useStyles$y(props);
|
|
50177
50494
|
var autoOk = props.autoOk,
|
|
50178
50495
|
variant = props.variant,
|
|
50179
50496
|
inputVariant = props.inputVariant,
|
|
@@ -50267,7 +50584,7 @@ var styles$18 = {
|
|
|
50267
50584
|
}
|
|
50268
50585
|
};
|
|
50269
50586
|
|
|
50270
|
-
var useStyles$
|
|
50587
|
+
var useStyles$z = makeStyles$1(function (theme) {
|
|
50271
50588
|
return {
|
|
50272
50589
|
textField: {
|
|
50273
50590
|
marginTop: theme.spacing(0.25),
|
|
@@ -50306,7 +50623,7 @@ var useStyles$w = makeStyles$1(function (theme) {
|
|
|
50306
50623
|
* Please have look at [Material Ui TimePicker]('https://material-ui-pickers.dev/api/TimePicker') for more details
|
|
50307
50624
|
*/
|
|
50308
50625
|
function ActiveTimePicker(props) {
|
|
50309
|
-
var classes = useStyles$
|
|
50626
|
+
var classes = useStyles$z(props);
|
|
50310
50627
|
var inputVariant = props.inputVariant,
|
|
50311
50628
|
readOnly = props.readOnly,
|
|
50312
50629
|
interactiveMode = props.interactiveMode,
|
|
@@ -50391,7 +50708,7 @@ var styles$19 = {
|
|
|
50391
50708
|
}
|
|
50392
50709
|
};
|
|
50393
50710
|
|
|
50394
|
-
var useStyles$
|
|
50711
|
+
var useStyles$A = makeStyles$1(function (theme) {
|
|
50395
50712
|
return {
|
|
50396
50713
|
textField: {
|
|
50397
50714
|
marginTop: theme.spacing(0.25),
|
|
@@ -50434,7 +50751,7 @@ var useStyles$x = makeStyles$1(function (theme) {
|
|
|
50434
50751
|
* ActiveKeyboardTimePicker is customized [ Material Ui KeyboardTimePicker](https://material-ui-pickers.dev/api/KeyboardTimePicker)
|
|
50435
50752
|
*/
|
|
50436
50753
|
function ActiveKeyboardTimePicker(props) {
|
|
50437
|
-
var classes = useStyles$
|
|
50754
|
+
var classes = useStyles$A(props);
|
|
50438
50755
|
var inputVariant = props.inputVariant,
|
|
50439
50756
|
readOnly = props.readOnly,
|
|
50440
50757
|
interactiveMode = props.interactiveMode,
|
|
@@ -50536,6 +50853,7 @@ ActiveKeyboardTimePicker.defaultProps = {
|
|
|
50536
50853
|
variant: 'inline'
|
|
50537
50854
|
};
|
|
50538
50855
|
|
|
50856
|
+
exports.ActiveCurrencyField = ActiveCurrencyField;
|
|
50539
50857
|
exports.ActiveDatePicker = ActiveDatePicker;
|
|
50540
50858
|
exports.ActiveFormCoordinateField = ActiveFormCoordinateField;
|
|
50541
50859
|
exports.ActiveFormPositiveInteger = ActiveFormPositiveInteger;
|
|
@@ -50552,6 +50870,7 @@ exports.UButton = UButton;
|
|
|
50552
50870
|
exports.UConfirmationButton = UConfirmationButton;
|
|
50553
50871
|
exports.UContent = UContent;
|
|
50554
50872
|
exports.UCoordinateField = UCoordinateField;
|
|
50873
|
+
exports.UCurrencyField = UCurrencyField;
|
|
50555
50874
|
exports.UDatePicker = UDatePicker;
|
|
50556
50875
|
exports.UDateTimePicker = UDateTimePicker;
|
|
50557
50876
|
exports.UErrorAlert = UErrorAlert;
|