acsi-core 0.1.9 → 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/components/CoreInputCompact/index.d.ts +13 -0
- package/dist/components/CoreSearch/index.d.ts +1 -0
- package/dist/components/CoreSelectCompact/index.d.ts +20 -0
- package/dist/components/CoreTextArea/index.d.ts +2 -0
- package/dist/components/CoreTitleInput/index.d.ts +13 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.css +81 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +359 -50
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +354 -48
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/icons/Info.d.ts +3 -0
- package/dist/utils/icons/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var reactRedux = require('react-redux');
|
|
|
14
14
|
var gapiScript = require('gapi-script');
|
|
15
15
|
var material = require('@mui/material');
|
|
16
16
|
var reactToastify = require('react-toastify');
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var ReactSelect = require('react-select');
|
|
18
|
+
var ReactSelect__default = _interopDefault(ReactSelect);
|
|
19
19
|
var fa = require('react-icons/fa');
|
|
20
20
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
|
21
21
|
|
|
@@ -76,7 +76,8 @@ var COLORS = {
|
|
|
76
76
|
darkBrandBlue: "#025675",
|
|
77
77
|
darkBrandBlueHover: "#007a99",
|
|
78
78
|
brandAccent: "#ffce09",
|
|
79
|
-
red: "#ce3636"
|
|
79
|
+
red: "#ce3636",
|
|
80
|
+
lightYellow: "#fff5ce"
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
var styleGlobal = {"signup_wrap":"_1KLz9","box-signin":"_2Jo1o","signin_title":"_3egBO","signup_link":"_1DoIT","google_button":"_34hK_","box-field":"_2e9xO","box-input":"_3zXRp","box-button-email":"_21FPk","box-signin-container":"_1QERu","box-signin-text":"_2-znH","box-signin-logo":"_1aB2m","box-right":"_3qndF","box-right-body":"_JzdCr","box-right-footer":"_19aCA","pr-30":"_2HB5r"};
|
|
@@ -1073,7 +1074,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1073
1074
|
var styles$3 = {"core-select":"_2sg12","label":"_1-XBo"};
|
|
1074
1075
|
|
|
1075
1076
|
var Option = function Option(props) {
|
|
1076
|
-
return React__default.createElement("div", null, React__default.createElement(
|
|
1077
|
+
return React__default.createElement("div", null, React__default.createElement(ReactSelect.components.Option, Object.assign({}, props), React__default.createElement(CoreInput$1, {
|
|
1077
1078
|
checked: props.isSelected,
|
|
1078
1079
|
onChange: function onChange() {
|
|
1079
1080
|
return null;
|
|
@@ -1228,7 +1229,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1228
1229
|
}
|
|
1229
1230
|
}, label && React__default.createElement("span", {
|
|
1230
1231
|
className: styles$3["label"]
|
|
1231
|
-
}, label), React__default.createElement(
|
|
1232
|
+
}, label), React__default.createElement(ReactSelect__default, {
|
|
1232
1233
|
name: name,
|
|
1233
1234
|
value: options.filter(function (i) {
|
|
1234
1235
|
return value && (isMulti ? value.includes(i.value) : i.value === value);
|
|
@@ -1386,40 +1387,7 @@ var CoreRange = function CoreRange(props) {
|
|
|
1386
1387
|
}));
|
|
1387
1388
|
};
|
|
1388
1389
|
|
|
1389
|
-
var styles$8 = {"core-text-area":"_1b_C3"};
|
|
1390
|
-
|
|
1391
|
-
var CoreTextArea = function CoreTextArea(props) {
|
|
1392
|
-
var name = props.name,
|
|
1393
|
-
_onChange = props.onChange,
|
|
1394
|
-
value = props.value,
|
|
1395
|
-
_props$cols = props.cols,
|
|
1396
|
-
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1397
|
-
label = props.label,
|
|
1398
|
-
_props$rows = props.rows,
|
|
1399
|
-
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1400
|
-
_props$placeholder = props.placeholder,
|
|
1401
|
-
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1402
|
-
width = props.width;
|
|
1403
|
-
return React__default.createElement("div", {
|
|
1404
|
-
className: styles$8["core-text-area"],
|
|
1405
|
-
style: {
|
|
1406
|
-
width: width != null ? width : "100%"
|
|
1407
|
-
}
|
|
1408
|
-
}, label && React__default.createElement("label", null, label), React__default.createElement("textarea", {
|
|
1409
|
-
style: {
|
|
1410
|
-
whiteSpace: "pre-wrap"
|
|
1411
|
-
},
|
|
1412
|
-
placeholder: placeholder,
|
|
1413
|
-
value: value,
|
|
1414
|
-
cols: cols,
|
|
1415
|
-
rows: rows,
|
|
1416
|
-
onChange: function onChange(e) {
|
|
1417
|
-
return _onChange(name, e.target.value);
|
|
1418
|
-
}
|
|
1419
|
-
}));
|
|
1420
|
-
};
|
|
1421
|
-
|
|
1422
|
-
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1390
|
+
var styles$8 = {"core-text-area":"_1b_C3","label":"_15n2K","optional":"_1fHZB","icon":"_38AfS"};
|
|
1423
1391
|
|
|
1424
1392
|
var Search = function Search(props) {
|
|
1425
1393
|
var _props$size = props.size,
|
|
@@ -1433,13 +1401,13 @@ var Search = function Search(props) {
|
|
|
1433
1401
|
fill: "none",
|
|
1434
1402
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1435
1403
|
}, React__default.createElement("path", {
|
|
1436
|
-
|
|
1437
|
-
|
|
1404
|
+
fillRule: "evenodd",
|
|
1405
|
+
clipRule: "evenodd",
|
|
1438
1406
|
d: "M9.40376 9.40352C9.63808 9.1692 10.018 9.1692 10.2523 9.40352L13.4243 12.5755C13.6586 12.8098 13.6586 13.1897 13.4243 13.424C13.19 13.6584 12.8101 13.6584 12.5758 13.424L9.40376 10.252C9.16945 10.0177 9.16945 9.63783 9.40376 9.40352Z",
|
|
1439
1407
|
fill: color
|
|
1440
1408
|
}), React__default.createElement("path", {
|
|
1441
|
-
|
|
1442
|
-
|
|
1409
|
+
fillRule: "evenodd",
|
|
1410
|
+
clipRule: "evenodd",
|
|
1443
1411
|
d: "M6.9999 3.5999C5.12213 3.5999 3.5999 5.12213 3.5999 6.9999C3.5999 8.87767 5.12213 10.3999 6.9999 10.3999C8.87767 10.3999 10.3999 8.87767 10.3999 6.9999C10.3999 5.12213 8.87767 3.5999 6.9999 3.5999ZM2.3999 6.9999C2.3999 4.45939 4.45939 2.3999 6.9999 2.3999C9.54041 2.3999 11.5999 4.45939 11.5999 6.9999C11.5999 9.54041 9.54041 11.5999 6.9999 11.5999C4.45939 11.5999 2.3999 9.54041 2.3999 6.9999Z",
|
|
1444
1412
|
fill: color
|
|
1445
1413
|
}));
|
|
@@ -1483,14 +1451,95 @@ var Close = function Close(props) {
|
|
|
1483
1451
|
}))));
|
|
1484
1452
|
};
|
|
1485
1453
|
|
|
1454
|
+
var Info = function Info() {
|
|
1455
|
+
return React__default.createElement("svg", {
|
|
1456
|
+
width: "12",
|
|
1457
|
+
height: "12",
|
|
1458
|
+
viewBox: "0 0 12 12",
|
|
1459
|
+
fill: "none",
|
|
1460
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1461
|
+
}, React__default.createElement("path", {
|
|
1462
|
+
fillRule: "evenodd",
|
|
1463
|
+
clipRule: "evenodd",
|
|
1464
|
+
d: "M6.0002 2.1002C3.84628 2.1002 2.1002 3.84628 2.1002 6.0002C2.1002 8.15411 3.84628 9.9002 6.0002 9.9002C8.15411 9.9002 9.9002 8.15411 9.9002 6.0002C9.9002 3.84628 8.15411 2.1002 6.0002 2.1002ZM1.2002 6.0002C1.2002 3.34923 3.34923 1.2002 6.0002 1.2002C8.65116 1.2002 10.8002 3.34923 10.8002 6.0002C10.8002 8.65116 8.65116 10.8002 6.0002 10.8002C3.34923 10.8002 1.2002 8.65116 1.2002 6.0002Z",
|
|
1465
|
+
fill: "#A6A6AD"
|
|
1466
|
+
}), React__default.createElement("path", {
|
|
1467
|
+
fillRule: "evenodd",
|
|
1468
|
+
clipRule: "evenodd",
|
|
1469
|
+
d: "M5.9998 5.1001C6.24833 5.1001 6.4498 5.30157 6.4498 5.5501V8.2915C6.4498 8.54003 6.24833 8.7415 5.9998 8.7415C5.75128 8.7415 5.5498 8.54003 5.5498 8.2915V5.5501C5.5498 5.30157 5.75128 5.1001 5.9998 5.1001Z",
|
|
1470
|
+
fill: "#A6A6AD"
|
|
1471
|
+
}), React__default.createElement("path", {
|
|
1472
|
+
d: "M5.9999 4.6502C5.6687 4.6502 5.3999 4.3808 5.3999 4.0502C5.3999 3.7196 5.6687 3.4502 5.9999 3.4502C6.3311 3.4502 6.5999 3.7196 6.5999 4.0502C6.5999 4.3808 6.3311 4.6502 5.9999 4.6502Z",
|
|
1473
|
+
fill: "#A6A6AD"
|
|
1474
|
+
}));
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1477
|
+
var CoreTextArea = function CoreTextArea(props) {
|
|
1478
|
+
var name = props.name,
|
|
1479
|
+
_onChange = props.onChange,
|
|
1480
|
+
value = props.value,
|
|
1481
|
+
_props$cols = props.cols,
|
|
1482
|
+
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1483
|
+
label = props.label,
|
|
1484
|
+
_props$rows = props.rows,
|
|
1485
|
+
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1486
|
+
_props$placeholder = props.placeholder,
|
|
1487
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1488
|
+
width = props.width,
|
|
1489
|
+
_props$tooltip = props.tooltip,
|
|
1490
|
+
tooltip = _props$tooltip === void 0 ? '' : _props$tooltip,
|
|
1491
|
+
_props$isOptional = props.isOptional,
|
|
1492
|
+
isOptional = _props$isOptional === void 0 ? false : _props$isOptional;
|
|
1493
|
+
var _useState = React.useState(false),
|
|
1494
|
+
isOpenTooltip = _useState[0],
|
|
1495
|
+
setIsOpenTooltip = _useState[1];
|
|
1496
|
+
var toggleTooltip = function toggleTooltip() {
|
|
1497
|
+
return setIsOpenTooltip(!isOpenTooltip);
|
|
1498
|
+
};
|
|
1499
|
+
return React__default.createElement("div", {
|
|
1500
|
+
className: styles$8["core-text-area"],
|
|
1501
|
+
style: {
|
|
1502
|
+
width: width != null ? width : "100%"
|
|
1503
|
+
}
|
|
1504
|
+
}, label && React__default.createElement("div", {
|
|
1505
|
+
className: styles$8['label']
|
|
1506
|
+
}, React__default.createElement("div", {
|
|
1507
|
+
className: styles$8['text']
|
|
1508
|
+
}, label), isOptional && React__default.createElement("div", {
|
|
1509
|
+
className: styles$8['optional']
|
|
1510
|
+
}, "(optional)"), React__default.createElement("div", {
|
|
1511
|
+
className: styles$8['icon'],
|
|
1512
|
+
id: name
|
|
1513
|
+
}, React__default.createElement(Info, null)), tooltip ? React__default.createElement(reactstrap.Tooltip, {
|
|
1514
|
+
target: name,
|
|
1515
|
+
isOpen: isOpenTooltip,
|
|
1516
|
+
toggle: toggleTooltip
|
|
1517
|
+
}, tooltip) : null), React__default.createElement("textarea", {
|
|
1518
|
+
style: {
|
|
1519
|
+
whiteSpace: "pre-wrap"
|
|
1520
|
+
},
|
|
1521
|
+
placeholder: placeholder,
|
|
1522
|
+
value: value,
|
|
1523
|
+
cols: cols,
|
|
1524
|
+
rows: rows,
|
|
1525
|
+
onChange: function onChange(e) {
|
|
1526
|
+
return _onChange(name, e.target.value);
|
|
1527
|
+
}
|
|
1528
|
+
}));
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1532
|
+
|
|
1486
1533
|
var CoreSearch = function CoreSearch(props) {
|
|
1487
1534
|
var _props$name = props.name,
|
|
1488
1535
|
name = _props$name === void 0 ? "" : _props$name,
|
|
1489
1536
|
value = props.value,
|
|
1490
1537
|
_onChange = props.onChange,
|
|
1491
|
-
width = props.width
|
|
1538
|
+
width = props.width,
|
|
1539
|
+
onPressEnter = props.onPressEnter;
|
|
1492
1540
|
var handleClear = function handleClear() {
|
|
1493
1541
|
_onChange(name, "");
|
|
1542
|
+
onPressEnter && onPressEnter();
|
|
1494
1543
|
};
|
|
1495
1544
|
return React__default.createElement("div", {
|
|
1496
1545
|
className: styles$9["core-search"],
|
|
@@ -1506,13 +1555,270 @@ var CoreSearch = function CoreSearch(props) {
|
|
|
1506
1555
|
onChange: function onChange(e) {
|
|
1507
1556
|
return _onChange(name, e.target.value);
|
|
1508
1557
|
},
|
|
1509
|
-
placeholder: "Search..."
|
|
1558
|
+
placeholder: "Search...",
|
|
1559
|
+
onKeyDown: function onKeyDown(e) {
|
|
1560
|
+
if (e.key === "Enter") {
|
|
1561
|
+
onPressEnter && onPressEnter();
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1510
1564
|
}), value.length ? React__default.createElement("div", {
|
|
1511
1565
|
className: styles$9["clear"],
|
|
1512
1566
|
onClick: handleClear
|
|
1513
1567
|
}, React__default.createElement(Close, null)) : null);
|
|
1514
1568
|
};
|
|
1515
1569
|
|
|
1570
|
+
var styles$a = {"core-select-compact":"_3ql5D","label":"_3fPQC"};
|
|
1571
|
+
|
|
1572
|
+
var Option$1 = function Option(props) {
|
|
1573
|
+
return React__default.createElement("div", null, React__default.createElement(ReactSelect.components.Option, Object.assign({}, props), React__default.createElement(CoreInput$1, {
|
|
1574
|
+
checked: props.isSelected,
|
|
1575
|
+
onChange: function onChange() {
|
|
1576
|
+
return null;
|
|
1577
|
+
},
|
|
1578
|
+
name: "",
|
|
1579
|
+
label: props.label
|
|
1580
|
+
})));
|
|
1581
|
+
};
|
|
1582
|
+
var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
1583
|
+
var _props$name = props.name,
|
|
1584
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1585
|
+
options = props.options,
|
|
1586
|
+
value = props.value,
|
|
1587
|
+
onChange = props.onChange,
|
|
1588
|
+
_props$disabled = props.disabled,
|
|
1589
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1590
|
+
label = props.label,
|
|
1591
|
+
width = props.width,
|
|
1592
|
+
_props$placeholder = props.placeholder,
|
|
1593
|
+
placeholder = _props$placeholder === void 0 ? "Select" : _props$placeholder,
|
|
1594
|
+
_props$isMulti = props.isMulti,
|
|
1595
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
1596
|
+
_props$isShowDropdown = props.isShowDropdown,
|
|
1597
|
+
isShowDropdown = _props$isShowDropdown === void 0 ? false : _props$isShowDropdown,
|
|
1598
|
+
_props$error = props.error,
|
|
1599
|
+
error = _props$error === void 0 ? false : _props$error;
|
|
1600
|
+
var handleChange = function handleChange(value) {
|
|
1601
|
+
var newValue = isMulti ? value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
1602
|
+
return item.value;
|
|
1603
|
+
}) : value === null || value === void 0 ? void 0 : value.value;
|
|
1604
|
+
onChange(name, newValue);
|
|
1605
|
+
};
|
|
1606
|
+
var controlStyle = function controlStyle(base, state) {
|
|
1607
|
+
var styles = _extends({}, base, {
|
|
1608
|
+
fontSize: "14px",
|
|
1609
|
+
fontWeight: "400",
|
|
1610
|
+
padding: "0",
|
|
1611
|
+
backgroundColor: state.isDisabled ? "transparent" : error ? COLORS.lightYellow : COLORS.white,
|
|
1612
|
+
border: "none",
|
|
1613
|
+
height: isMulti ? undefined : "26px",
|
|
1614
|
+
minHeight: "26px",
|
|
1615
|
+
boxShadow: "none",
|
|
1616
|
+
cursor: "pointer",
|
|
1617
|
+
"&:hover": {
|
|
1618
|
+
backgroundColor: COLORS.lightBlueHover
|
|
1619
|
+
},
|
|
1620
|
+
"&>div": {
|
|
1621
|
+
padding: "0 2px"
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
return styles;
|
|
1625
|
+
};
|
|
1626
|
+
var inputStyles = function inputStyles(base) {
|
|
1627
|
+
var styles = _extends({}, base, {
|
|
1628
|
+
margin: "0",
|
|
1629
|
+
padding: "0",
|
|
1630
|
+
color: "inherit",
|
|
1631
|
+
position: "relative",
|
|
1632
|
+
top: "-2px"
|
|
1633
|
+
});
|
|
1634
|
+
return styles;
|
|
1635
|
+
};
|
|
1636
|
+
var placeholderStyles = function placeholderStyles(base) {
|
|
1637
|
+
var styles = _extends({}, base, {
|
|
1638
|
+
color: COLORS.lightGray
|
|
1639
|
+
});
|
|
1640
|
+
return styles;
|
|
1641
|
+
};
|
|
1642
|
+
var dropdownIndicatorStyles = function dropdownIndicatorStyles(base) {
|
|
1643
|
+
var styles = _extends({}, base, {
|
|
1644
|
+
position: "relative",
|
|
1645
|
+
padding: "2px 0"
|
|
1646
|
+
});
|
|
1647
|
+
return styles;
|
|
1648
|
+
};
|
|
1649
|
+
var indicatorsContainerStyles = function indicatorsContainerStyles(base) {
|
|
1650
|
+
var styles = _extends({}, base, {
|
|
1651
|
+
display: isShowDropdown && !isMulti ? "block" : "none"
|
|
1652
|
+
});
|
|
1653
|
+
return styles;
|
|
1654
|
+
};
|
|
1655
|
+
var valueContainerStyles = function valueContainerStyles(base) {
|
|
1656
|
+
var styles = _extends({}, base, {
|
|
1657
|
+
height: isMulti ? undefined : "26px",
|
|
1658
|
+
position: "relative"
|
|
1659
|
+
});
|
|
1660
|
+
return styles;
|
|
1661
|
+
};
|
|
1662
|
+
var singleValueStyles = function singleValueStyles(base) {
|
|
1663
|
+
var styles = _extends({}, base);
|
|
1664
|
+
return styles;
|
|
1665
|
+
};
|
|
1666
|
+
var optionStyles = function optionStyles(base, state) {
|
|
1667
|
+
var styles = _extends({}, base, {
|
|
1668
|
+
padding: "8px",
|
|
1669
|
+
borderRadius: "8px",
|
|
1670
|
+
cursor: "pointer",
|
|
1671
|
+
fontSize: "14px",
|
|
1672
|
+
fontWeight: 400,
|
|
1673
|
+
color: COLORS.blackText,
|
|
1674
|
+
backgroundColor: state.isSelected ? COLORS.lightBlueHover : "transparent",
|
|
1675
|
+
"&:hover": {
|
|
1676
|
+
backgroundColor: COLORS.lightBlueHover
|
|
1677
|
+
}
|
|
1678
|
+
});
|
|
1679
|
+
return styles;
|
|
1680
|
+
};
|
|
1681
|
+
var multiValueStyles = function multiValueStyles(base) {
|
|
1682
|
+
var styles = _extends({}, base, {
|
|
1683
|
+
backgroundColor: COLORS.lightBlue,
|
|
1684
|
+
borderRadius: "4px",
|
|
1685
|
+
padding: "0 4px",
|
|
1686
|
+
display: "flex",
|
|
1687
|
+
alignItems: "center",
|
|
1688
|
+
fontSize: "13px",
|
|
1689
|
+
color: COLORS.blackText
|
|
1690
|
+
});
|
|
1691
|
+
return styles;
|
|
1692
|
+
};
|
|
1693
|
+
var multiValueRemoveStyles = function multiValueRemoveStyles(base) {
|
|
1694
|
+
var styles = _extends({}, base, {
|
|
1695
|
+
color: COLORS.lightGray,
|
|
1696
|
+
cursor: "pointer"
|
|
1697
|
+
});
|
|
1698
|
+
return styles;
|
|
1699
|
+
};
|
|
1700
|
+
var multiValueLabelStyles = function multiValueLabelStyles(base) {
|
|
1701
|
+
var styles = _extends({}, base, {
|
|
1702
|
+
color: COLORS.blackText,
|
|
1703
|
+
fontWeight: "400",
|
|
1704
|
+
fontSize: "13px",
|
|
1705
|
+
padding: 0
|
|
1706
|
+
});
|
|
1707
|
+
return styles;
|
|
1708
|
+
};
|
|
1709
|
+
return React__default.createElement("div", {
|
|
1710
|
+
className: "" + styles$a["core-select-compact"],
|
|
1711
|
+
style: {
|
|
1712
|
+
width: width != null ? width : "100%"
|
|
1713
|
+
}
|
|
1714
|
+
}, label && React__default.createElement("div", {
|
|
1715
|
+
className: styles$a["label"]
|
|
1716
|
+
}, React__default.createElement("label", null, label), React__default.createElement(Info, null)), React__default.createElement(ReactSelect__default, {
|
|
1717
|
+
name: name,
|
|
1718
|
+
value: options.filter(function (i) {
|
|
1719
|
+
return value && (isMulti ? value.includes(i.value) : i.value === value);
|
|
1720
|
+
}),
|
|
1721
|
+
onChange: handleChange,
|
|
1722
|
+
placeholder: placeholder,
|
|
1723
|
+
isDisabled: disabled,
|
|
1724
|
+
isMulti: isMulti,
|
|
1725
|
+
closeMenuOnSelect: !isMulti,
|
|
1726
|
+
hideSelectedOptions: false,
|
|
1727
|
+
options: options,
|
|
1728
|
+
components: isMulti ? {
|
|
1729
|
+
Option: Option$1
|
|
1730
|
+
} : undefined,
|
|
1731
|
+
styles: {
|
|
1732
|
+
control: controlStyle,
|
|
1733
|
+
input: inputStyles,
|
|
1734
|
+
placeholder: placeholderStyles,
|
|
1735
|
+
dropdownIndicator: dropdownIndicatorStyles,
|
|
1736
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
1737
|
+
return {
|
|
1738
|
+
display: "none"
|
|
1739
|
+
};
|
|
1740
|
+
},
|
|
1741
|
+
indicatorsContainer: indicatorsContainerStyles,
|
|
1742
|
+
valueContainer: valueContainerStyles,
|
|
1743
|
+
singleValue: singleValueStyles,
|
|
1744
|
+
option: optionStyles,
|
|
1745
|
+
multiValue: multiValueStyles,
|
|
1746
|
+
multiValueRemove: multiValueRemoveStyles,
|
|
1747
|
+
multiValueLabel: multiValueLabelStyles
|
|
1748
|
+
}
|
|
1749
|
+
}));
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
var styles$b = {"core-input-compact":"_1qmXW","label":"_1argp"};
|
|
1753
|
+
|
|
1754
|
+
var CoreInputCompact = function CoreInputCompact(props) {
|
|
1755
|
+
var _props$name = props.name,
|
|
1756
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1757
|
+
value = props.value,
|
|
1758
|
+
_onChange = props.onChange,
|
|
1759
|
+
_props$disabled = props.disabled,
|
|
1760
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1761
|
+
label = props.label,
|
|
1762
|
+
width = props.width,
|
|
1763
|
+
_props$placeholder = props.placeholder,
|
|
1764
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1765
|
+
error = props.error;
|
|
1766
|
+
return React__default.createElement("div", {
|
|
1767
|
+
className: "" + styles$b["core-input-compact"],
|
|
1768
|
+
style: {
|
|
1769
|
+
width: width != null ? width : "100%"
|
|
1770
|
+
}
|
|
1771
|
+
}, label && React__default.createElement("div", {
|
|
1772
|
+
className: styles$b["label"]
|
|
1773
|
+
}, React__default.createElement("label", null, label), React__default.createElement(Info, null)), React__default.createElement("input", {
|
|
1774
|
+
style: {
|
|
1775
|
+
backgroundColor: error ? COLORS.lightYellow : "transparent"
|
|
1776
|
+
},
|
|
1777
|
+
name: name,
|
|
1778
|
+
value: value,
|
|
1779
|
+
onChange: function onChange(e) {
|
|
1780
|
+
return _onChange(name, e.target.value);
|
|
1781
|
+
},
|
|
1782
|
+
disabled: disabled,
|
|
1783
|
+
placeholder: placeholder
|
|
1784
|
+
}));
|
|
1785
|
+
};
|
|
1786
|
+
|
|
1787
|
+
var styles$c = {"core-label-input":"_2YqZu","size-h1":"_23-uu","size-h2":"_16lQL"};
|
|
1788
|
+
|
|
1789
|
+
var CoreTitleInput = function CoreTitleInput(props) {
|
|
1790
|
+
var _props$name = props.name,
|
|
1791
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1792
|
+
value = props.value,
|
|
1793
|
+
_onChange = props.onChange,
|
|
1794
|
+
_props$disabled = props.disabled,
|
|
1795
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1796
|
+
width = props.width,
|
|
1797
|
+
_props$placeholder = props.placeholder,
|
|
1798
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1799
|
+
error = props.error,
|
|
1800
|
+
_props$size = props.size,
|
|
1801
|
+
size = _props$size === void 0 ? "h1" : _props$size;
|
|
1802
|
+
return React__default.createElement("div", {
|
|
1803
|
+
className: "" + styles$c["core-label-input"],
|
|
1804
|
+
style: {
|
|
1805
|
+
width: width != null ? width : "100%"
|
|
1806
|
+
}
|
|
1807
|
+
}, React__default.createElement("input", {
|
|
1808
|
+
className: "" + styles$c["size-" + size],
|
|
1809
|
+
style: {
|
|
1810
|
+
backgroundColor: error ? COLORS.lightYellow : "transparent"
|
|
1811
|
+
},
|
|
1812
|
+
name: name,
|
|
1813
|
+
value: value,
|
|
1814
|
+
onChange: function onChange(e) {
|
|
1815
|
+
return _onChange(name, e.target.value);
|
|
1816
|
+
},
|
|
1817
|
+
disabled: disabled,
|
|
1818
|
+
placeholder: placeholder
|
|
1819
|
+
}));
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1516
1822
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
1517
1823
|
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
|
1518
1824
|
var errorMessage = error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.title;
|
|
@@ -1564,13 +1870,13 @@ var customStyles = {
|
|
|
1564
1870
|
};
|
|
1565
1871
|
|
|
1566
1872
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
1567
|
-
return React__default.createElement(
|
|
1873
|
+
return React__default.createElement(ReactSelect.components.DropdownIndicator, Object.assign({}, props), React__default.createElement(fa.FaCaretDown, {
|
|
1568
1874
|
size: 20,
|
|
1569
1875
|
color: styleGlobal.darker
|
|
1570
1876
|
}));
|
|
1571
1877
|
};
|
|
1572
1878
|
var CustomOption = function CustomOption(props) {
|
|
1573
|
-
return React__default.createElement(
|
|
1879
|
+
return React__default.createElement(ReactSelect.components.Option, Object.assign({}, props), React__default.createElement("div", {
|
|
1574
1880
|
style: {
|
|
1575
1881
|
fontSize: "14px",
|
|
1576
1882
|
fontWeight: 500
|
|
@@ -1594,7 +1900,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
|
1594
1900
|
}) : options === null || options === void 0 ? void 0 : options.find(function (i) {
|
|
1595
1901
|
return i.value == value;
|
|
1596
1902
|
});
|
|
1597
|
-
return React__default.createElement(
|
|
1903
|
+
return React__default.createElement(ReactSelect__default, Object.assign({
|
|
1598
1904
|
isDisabled: isDisabled,
|
|
1599
1905
|
options: options,
|
|
1600
1906
|
value: !isDefault ? initialValues != null ? initialValues : null : undefined,
|
|
@@ -1629,7 +1935,7 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
|
1629
1935
|
}) : options.find(function (i) {
|
|
1630
1936
|
return i.value == value;
|
|
1631
1937
|
});
|
|
1632
|
-
return React__default.createElement(
|
|
1938
|
+
return React__default.createElement(ReactSelect__default, Object.assign({
|
|
1633
1939
|
isDisabled: isDisabled,
|
|
1634
1940
|
options: options,
|
|
1635
1941
|
value: !isDefault ? initialValues : undefined,
|
|
@@ -1694,7 +2000,7 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
1694
2000
|
var initialValues = defaultValue !== null && typeof defaultValue !== "undefined" ? options.find(function (option) {
|
|
1695
2001
|
return option.value === defaultValue;
|
|
1696
2002
|
}) || null : null;
|
|
1697
|
-
return React__default.createElement(
|
|
2003
|
+
return React__default.createElement(ReactSelect__default, Object.assign({
|
|
1698
2004
|
isDisabled: isDisabled,
|
|
1699
2005
|
options: options,
|
|
1700
2006
|
value: value,
|
|
@@ -1735,12 +2041,15 @@ exports.CoreButton = CoreButton;
|
|
|
1735
2041
|
exports.CoreCheckbox = CoreInput$1;
|
|
1736
2042
|
exports.CoreError = CoreError;
|
|
1737
2043
|
exports.CoreInput = CoreInput;
|
|
2044
|
+
exports.CoreInputCompact = CoreInputCompact;
|
|
1738
2045
|
exports.CoreModal = CoreModal;
|
|
1739
2046
|
exports.CoreRadio = CoreRadio;
|
|
1740
2047
|
exports.CoreRange = CoreRange;
|
|
1741
2048
|
exports.CoreSearch = CoreSearch;
|
|
1742
2049
|
exports.CoreSelect = CoreSelect;
|
|
2050
|
+
exports.CoreSelectCompact = CoreSelectCompact;
|
|
1743
2051
|
exports.CoreTextArea = CoreTextArea;
|
|
2052
|
+
exports.CoreTitleInput = CoreTitleInput;
|
|
1744
2053
|
exports.CustomAsyncSelect = CustomAsyncSelect;
|
|
1745
2054
|
exports.CustomCreatable = CustomCreatable;
|
|
1746
2055
|
exports.CustomPagination = CustomPagination;
|