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.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBrowserHistory } from 'history';
|
|
2
2
|
import { createAction, createReducer, configureStore } from '@reduxjs/toolkit';
|
|
3
3
|
import React, { useState, useCallback, useEffect, Fragment } from 'react';
|
|
4
|
-
import { Row, Col, Form, Modal, ModalHeader, ModalBody, ModalFooter, Button, Pagination, PaginationItem, PaginationLink, FormGroup, Input, Label } from 'reactstrap';
|
|
4
|
+
import { Row, Col, Form, Modal, ModalHeader, ModalBody, ModalFooter, Button, Pagination, PaginationItem, PaginationLink, FormGroup, Input, Label, Tooltip } from 'reactstrap';
|
|
5
5
|
import GoogleLogin, { useGoogleLogout } from '@leecheuk/react-google-login';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import moment from 'moment';
|
|
@@ -10,7 +10,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
10
10
|
import { gapi } from 'gapi-script';
|
|
11
11
|
import { Box, Typography } from '@mui/material';
|
|
12
12
|
export { ToastContainer, toast } from 'react-toastify';
|
|
13
|
-
import
|
|
13
|
+
import ReactSelect, { components } from 'react-select';
|
|
14
14
|
import { FaCaretDown } from 'react-icons/fa';
|
|
15
15
|
import CreatableSelect from 'react-select/creatable';
|
|
16
16
|
|
|
@@ -71,7 +71,8 @@ var COLORS = {
|
|
|
71
71
|
darkBrandBlue: "#025675",
|
|
72
72
|
darkBrandBlueHover: "#007a99",
|
|
73
73
|
brandAccent: "#ffce09",
|
|
74
|
-
red: "#ce3636"
|
|
74
|
+
red: "#ce3636",
|
|
75
|
+
lightYellow: "#fff5ce"
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
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"};
|
|
@@ -1225,7 +1226,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1225
1226
|
}
|
|
1226
1227
|
}, label && React.createElement("span", {
|
|
1227
1228
|
className: styles$3["label"]
|
|
1228
|
-
}, label), React.createElement(
|
|
1229
|
+
}, label), React.createElement(ReactSelect, {
|
|
1229
1230
|
name: name,
|
|
1230
1231
|
value: options.filter(function (i) {
|
|
1231
1232
|
return value && (isMulti ? value.includes(i.value) : i.value === value);
|
|
@@ -1383,40 +1384,7 @@ var CoreRange = function CoreRange(props) {
|
|
|
1383
1384
|
}));
|
|
1384
1385
|
};
|
|
1385
1386
|
|
|
1386
|
-
var styles$8 = {"core-text-area":"_1b_C3"};
|
|
1387
|
-
|
|
1388
|
-
var CoreTextArea = function CoreTextArea(props) {
|
|
1389
|
-
var name = props.name,
|
|
1390
|
-
_onChange = props.onChange,
|
|
1391
|
-
value = props.value,
|
|
1392
|
-
_props$cols = props.cols,
|
|
1393
|
-
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1394
|
-
label = props.label,
|
|
1395
|
-
_props$rows = props.rows,
|
|
1396
|
-
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1397
|
-
_props$placeholder = props.placeholder,
|
|
1398
|
-
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1399
|
-
width = props.width;
|
|
1400
|
-
return React.createElement("div", {
|
|
1401
|
-
className: styles$8["core-text-area"],
|
|
1402
|
-
style: {
|
|
1403
|
-
width: width != null ? width : "100%"
|
|
1404
|
-
}
|
|
1405
|
-
}, label && React.createElement("label", null, label), React.createElement("textarea", {
|
|
1406
|
-
style: {
|
|
1407
|
-
whiteSpace: "pre-wrap"
|
|
1408
|
-
},
|
|
1409
|
-
placeholder: placeholder,
|
|
1410
|
-
value: value,
|
|
1411
|
-
cols: cols,
|
|
1412
|
-
rows: rows,
|
|
1413
|
-
onChange: function onChange(e) {
|
|
1414
|
-
return _onChange(name, e.target.value);
|
|
1415
|
-
}
|
|
1416
|
-
}));
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1419
|
-
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1387
|
+
var styles$8 = {"core-text-area":"_1b_C3","label":"_15n2K","optional":"_1fHZB","icon":"_38AfS"};
|
|
1420
1388
|
|
|
1421
1389
|
var Search = function Search(props) {
|
|
1422
1390
|
var _props$size = props.size,
|
|
@@ -1430,13 +1398,13 @@ var Search = function Search(props) {
|
|
|
1430
1398
|
fill: "none",
|
|
1431
1399
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1432
1400
|
}, React.createElement("path", {
|
|
1433
|
-
|
|
1434
|
-
|
|
1401
|
+
fillRule: "evenodd",
|
|
1402
|
+
clipRule: "evenodd",
|
|
1435
1403
|
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",
|
|
1436
1404
|
fill: color
|
|
1437
1405
|
}), React.createElement("path", {
|
|
1438
|
-
|
|
1439
|
-
|
|
1406
|
+
fillRule: "evenodd",
|
|
1407
|
+
clipRule: "evenodd",
|
|
1440
1408
|
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",
|
|
1441
1409
|
fill: color
|
|
1442
1410
|
}));
|
|
@@ -1480,14 +1448,95 @@ var Close = function Close(props) {
|
|
|
1480
1448
|
}))));
|
|
1481
1449
|
};
|
|
1482
1450
|
|
|
1451
|
+
var Info = function Info() {
|
|
1452
|
+
return React.createElement("svg", {
|
|
1453
|
+
width: "12",
|
|
1454
|
+
height: "12",
|
|
1455
|
+
viewBox: "0 0 12 12",
|
|
1456
|
+
fill: "none",
|
|
1457
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1458
|
+
}, React.createElement("path", {
|
|
1459
|
+
fillRule: "evenodd",
|
|
1460
|
+
clipRule: "evenodd",
|
|
1461
|
+
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",
|
|
1462
|
+
fill: "#A6A6AD"
|
|
1463
|
+
}), React.createElement("path", {
|
|
1464
|
+
fillRule: "evenodd",
|
|
1465
|
+
clipRule: "evenodd",
|
|
1466
|
+
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",
|
|
1467
|
+
fill: "#A6A6AD"
|
|
1468
|
+
}), React.createElement("path", {
|
|
1469
|
+
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",
|
|
1470
|
+
fill: "#A6A6AD"
|
|
1471
|
+
}));
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
var CoreTextArea = function CoreTextArea(props) {
|
|
1475
|
+
var name = props.name,
|
|
1476
|
+
_onChange = props.onChange,
|
|
1477
|
+
value = props.value,
|
|
1478
|
+
_props$cols = props.cols,
|
|
1479
|
+
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1480
|
+
label = props.label,
|
|
1481
|
+
_props$rows = props.rows,
|
|
1482
|
+
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1483
|
+
_props$placeholder = props.placeholder,
|
|
1484
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1485
|
+
width = props.width,
|
|
1486
|
+
_props$tooltip = props.tooltip,
|
|
1487
|
+
tooltip = _props$tooltip === void 0 ? '' : _props$tooltip,
|
|
1488
|
+
_props$isOptional = props.isOptional,
|
|
1489
|
+
isOptional = _props$isOptional === void 0 ? false : _props$isOptional;
|
|
1490
|
+
var _useState = useState(false),
|
|
1491
|
+
isOpenTooltip = _useState[0],
|
|
1492
|
+
setIsOpenTooltip = _useState[1];
|
|
1493
|
+
var toggleTooltip = function toggleTooltip() {
|
|
1494
|
+
return setIsOpenTooltip(!isOpenTooltip);
|
|
1495
|
+
};
|
|
1496
|
+
return React.createElement("div", {
|
|
1497
|
+
className: styles$8["core-text-area"],
|
|
1498
|
+
style: {
|
|
1499
|
+
width: width != null ? width : "100%"
|
|
1500
|
+
}
|
|
1501
|
+
}, label && React.createElement("div", {
|
|
1502
|
+
className: styles$8['label']
|
|
1503
|
+
}, React.createElement("div", {
|
|
1504
|
+
className: styles$8['text']
|
|
1505
|
+
}, label), isOptional && React.createElement("div", {
|
|
1506
|
+
className: styles$8['optional']
|
|
1507
|
+
}, "(optional)"), React.createElement("div", {
|
|
1508
|
+
className: styles$8['icon'],
|
|
1509
|
+
id: name
|
|
1510
|
+
}, React.createElement(Info, null)), tooltip ? React.createElement(Tooltip, {
|
|
1511
|
+
target: name,
|
|
1512
|
+
isOpen: isOpenTooltip,
|
|
1513
|
+
toggle: toggleTooltip
|
|
1514
|
+
}, tooltip) : null), React.createElement("textarea", {
|
|
1515
|
+
style: {
|
|
1516
|
+
whiteSpace: "pre-wrap"
|
|
1517
|
+
},
|
|
1518
|
+
placeholder: placeholder,
|
|
1519
|
+
value: value,
|
|
1520
|
+
cols: cols,
|
|
1521
|
+
rows: rows,
|
|
1522
|
+
onChange: function onChange(e) {
|
|
1523
|
+
return _onChange(name, e.target.value);
|
|
1524
|
+
}
|
|
1525
|
+
}));
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1529
|
+
|
|
1483
1530
|
var CoreSearch = function CoreSearch(props) {
|
|
1484
1531
|
var _props$name = props.name,
|
|
1485
1532
|
name = _props$name === void 0 ? "" : _props$name,
|
|
1486
1533
|
value = props.value,
|
|
1487
1534
|
_onChange = props.onChange,
|
|
1488
|
-
width = props.width
|
|
1535
|
+
width = props.width,
|
|
1536
|
+
onPressEnter = props.onPressEnter;
|
|
1489
1537
|
var handleClear = function handleClear() {
|
|
1490
1538
|
_onChange(name, "");
|
|
1539
|
+
onPressEnter && onPressEnter();
|
|
1491
1540
|
};
|
|
1492
1541
|
return React.createElement("div", {
|
|
1493
1542
|
className: styles$9["core-search"],
|
|
@@ -1503,13 +1552,270 @@ var CoreSearch = function CoreSearch(props) {
|
|
|
1503
1552
|
onChange: function onChange(e) {
|
|
1504
1553
|
return _onChange(name, e.target.value);
|
|
1505
1554
|
},
|
|
1506
|
-
placeholder: "Search..."
|
|
1555
|
+
placeholder: "Search...",
|
|
1556
|
+
onKeyDown: function onKeyDown(e) {
|
|
1557
|
+
if (e.key === "Enter") {
|
|
1558
|
+
onPressEnter && onPressEnter();
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1507
1561
|
}), value.length ? React.createElement("div", {
|
|
1508
1562
|
className: styles$9["clear"],
|
|
1509
1563
|
onClick: handleClear
|
|
1510
1564
|
}, React.createElement(Close, null)) : null);
|
|
1511
1565
|
};
|
|
1512
1566
|
|
|
1567
|
+
var styles$a = {"core-select-compact":"_3ql5D","label":"_3fPQC"};
|
|
1568
|
+
|
|
1569
|
+
var Option$1 = function Option(props) {
|
|
1570
|
+
return React.createElement("div", null, React.createElement(components.Option, Object.assign({}, props), React.createElement(CoreInput$1, {
|
|
1571
|
+
checked: props.isSelected,
|
|
1572
|
+
onChange: function onChange() {
|
|
1573
|
+
return null;
|
|
1574
|
+
},
|
|
1575
|
+
name: "",
|
|
1576
|
+
label: props.label
|
|
1577
|
+
})));
|
|
1578
|
+
};
|
|
1579
|
+
var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
1580
|
+
var _props$name = props.name,
|
|
1581
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1582
|
+
options = props.options,
|
|
1583
|
+
value = props.value,
|
|
1584
|
+
onChange = props.onChange,
|
|
1585
|
+
_props$disabled = props.disabled,
|
|
1586
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1587
|
+
label = props.label,
|
|
1588
|
+
width = props.width,
|
|
1589
|
+
_props$placeholder = props.placeholder,
|
|
1590
|
+
placeholder = _props$placeholder === void 0 ? "Select" : _props$placeholder,
|
|
1591
|
+
_props$isMulti = props.isMulti,
|
|
1592
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
1593
|
+
_props$isShowDropdown = props.isShowDropdown,
|
|
1594
|
+
isShowDropdown = _props$isShowDropdown === void 0 ? false : _props$isShowDropdown,
|
|
1595
|
+
_props$error = props.error,
|
|
1596
|
+
error = _props$error === void 0 ? false : _props$error;
|
|
1597
|
+
var handleChange = function handleChange(value) {
|
|
1598
|
+
var newValue = isMulti ? value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
1599
|
+
return item.value;
|
|
1600
|
+
}) : value === null || value === void 0 ? void 0 : value.value;
|
|
1601
|
+
onChange(name, newValue);
|
|
1602
|
+
};
|
|
1603
|
+
var controlStyle = function controlStyle(base, state) {
|
|
1604
|
+
var styles = _extends({}, base, {
|
|
1605
|
+
fontSize: "14px",
|
|
1606
|
+
fontWeight: "400",
|
|
1607
|
+
padding: "0",
|
|
1608
|
+
backgroundColor: state.isDisabled ? "transparent" : error ? COLORS.lightYellow : COLORS.white,
|
|
1609
|
+
border: "none",
|
|
1610
|
+
height: isMulti ? undefined : "26px",
|
|
1611
|
+
minHeight: "26px",
|
|
1612
|
+
boxShadow: "none",
|
|
1613
|
+
cursor: "pointer",
|
|
1614
|
+
"&:hover": {
|
|
1615
|
+
backgroundColor: COLORS.lightBlueHover
|
|
1616
|
+
},
|
|
1617
|
+
"&>div": {
|
|
1618
|
+
padding: "0 2px"
|
|
1619
|
+
}
|
|
1620
|
+
});
|
|
1621
|
+
return styles;
|
|
1622
|
+
};
|
|
1623
|
+
var inputStyles = function inputStyles(base) {
|
|
1624
|
+
var styles = _extends({}, base, {
|
|
1625
|
+
margin: "0",
|
|
1626
|
+
padding: "0",
|
|
1627
|
+
color: "inherit",
|
|
1628
|
+
position: "relative",
|
|
1629
|
+
top: "-2px"
|
|
1630
|
+
});
|
|
1631
|
+
return styles;
|
|
1632
|
+
};
|
|
1633
|
+
var placeholderStyles = function placeholderStyles(base) {
|
|
1634
|
+
var styles = _extends({}, base, {
|
|
1635
|
+
color: COLORS.lightGray
|
|
1636
|
+
});
|
|
1637
|
+
return styles;
|
|
1638
|
+
};
|
|
1639
|
+
var dropdownIndicatorStyles = function dropdownIndicatorStyles(base) {
|
|
1640
|
+
var styles = _extends({}, base, {
|
|
1641
|
+
position: "relative",
|
|
1642
|
+
padding: "2px 0"
|
|
1643
|
+
});
|
|
1644
|
+
return styles;
|
|
1645
|
+
};
|
|
1646
|
+
var indicatorsContainerStyles = function indicatorsContainerStyles(base) {
|
|
1647
|
+
var styles = _extends({}, base, {
|
|
1648
|
+
display: isShowDropdown && !isMulti ? "block" : "none"
|
|
1649
|
+
});
|
|
1650
|
+
return styles;
|
|
1651
|
+
};
|
|
1652
|
+
var valueContainerStyles = function valueContainerStyles(base) {
|
|
1653
|
+
var styles = _extends({}, base, {
|
|
1654
|
+
height: isMulti ? undefined : "26px",
|
|
1655
|
+
position: "relative"
|
|
1656
|
+
});
|
|
1657
|
+
return styles;
|
|
1658
|
+
};
|
|
1659
|
+
var singleValueStyles = function singleValueStyles(base) {
|
|
1660
|
+
var styles = _extends({}, base);
|
|
1661
|
+
return styles;
|
|
1662
|
+
};
|
|
1663
|
+
var optionStyles = function optionStyles(base, state) {
|
|
1664
|
+
var styles = _extends({}, base, {
|
|
1665
|
+
padding: "8px",
|
|
1666
|
+
borderRadius: "8px",
|
|
1667
|
+
cursor: "pointer",
|
|
1668
|
+
fontSize: "14px",
|
|
1669
|
+
fontWeight: 400,
|
|
1670
|
+
color: COLORS.blackText,
|
|
1671
|
+
backgroundColor: state.isSelected ? COLORS.lightBlueHover : "transparent",
|
|
1672
|
+
"&:hover": {
|
|
1673
|
+
backgroundColor: COLORS.lightBlueHover
|
|
1674
|
+
}
|
|
1675
|
+
});
|
|
1676
|
+
return styles;
|
|
1677
|
+
};
|
|
1678
|
+
var multiValueStyles = function multiValueStyles(base) {
|
|
1679
|
+
var styles = _extends({}, base, {
|
|
1680
|
+
backgroundColor: COLORS.lightBlue,
|
|
1681
|
+
borderRadius: "4px",
|
|
1682
|
+
padding: "0 4px",
|
|
1683
|
+
display: "flex",
|
|
1684
|
+
alignItems: "center",
|
|
1685
|
+
fontSize: "13px",
|
|
1686
|
+
color: COLORS.blackText
|
|
1687
|
+
});
|
|
1688
|
+
return styles;
|
|
1689
|
+
};
|
|
1690
|
+
var multiValueRemoveStyles = function multiValueRemoveStyles(base) {
|
|
1691
|
+
var styles = _extends({}, base, {
|
|
1692
|
+
color: COLORS.lightGray,
|
|
1693
|
+
cursor: "pointer"
|
|
1694
|
+
});
|
|
1695
|
+
return styles;
|
|
1696
|
+
};
|
|
1697
|
+
var multiValueLabelStyles = function multiValueLabelStyles(base) {
|
|
1698
|
+
var styles = _extends({}, base, {
|
|
1699
|
+
color: COLORS.blackText,
|
|
1700
|
+
fontWeight: "400",
|
|
1701
|
+
fontSize: "13px",
|
|
1702
|
+
padding: 0
|
|
1703
|
+
});
|
|
1704
|
+
return styles;
|
|
1705
|
+
};
|
|
1706
|
+
return React.createElement("div", {
|
|
1707
|
+
className: "" + styles$a["core-select-compact"],
|
|
1708
|
+
style: {
|
|
1709
|
+
width: width != null ? width : "100%"
|
|
1710
|
+
}
|
|
1711
|
+
}, label && React.createElement("div", {
|
|
1712
|
+
className: styles$a["label"]
|
|
1713
|
+
}, React.createElement("label", null, label), React.createElement(Info, null)), React.createElement(ReactSelect, {
|
|
1714
|
+
name: name,
|
|
1715
|
+
value: options.filter(function (i) {
|
|
1716
|
+
return value && (isMulti ? value.includes(i.value) : i.value === value);
|
|
1717
|
+
}),
|
|
1718
|
+
onChange: handleChange,
|
|
1719
|
+
placeholder: placeholder,
|
|
1720
|
+
isDisabled: disabled,
|
|
1721
|
+
isMulti: isMulti,
|
|
1722
|
+
closeMenuOnSelect: !isMulti,
|
|
1723
|
+
hideSelectedOptions: false,
|
|
1724
|
+
options: options,
|
|
1725
|
+
components: isMulti ? {
|
|
1726
|
+
Option: Option$1
|
|
1727
|
+
} : undefined,
|
|
1728
|
+
styles: {
|
|
1729
|
+
control: controlStyle,
|
|
1730
|
+
input: inputStyles,
|
|
1731
|
+
placeholder: placeholderStyles,
|
|
1732
|
+
dropdownIndicator: dropdownIndicatorStyles,
|
|
1733
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
1734
|
+
return {
|
|
1735
|
+
display: "none"
|
|
1736
|
+
};
|
|
1737
|
+
},
|
|
1738
|
+
indicatorsContainer: indicatorsContainerStyles,
|
|
1739
|
+
valueContainer: valueContainerStyles,
|
|
1740
|
+
singleValue: singleValueStyles,
|
|
1741
|
+
option: optionStyles,
|
|
1742
|
+
multiValue: multiValueStyles,
|
|
1743
|
+
multiValueRemove: multiValueRemoveStyles,
|
|
1744
|
+
multiValueLabel: multiValueLabelStyles
|
|
1745
|
+
}
|
|
1746
|
+
}));
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
var styles$b = {"core-input-compact":"_1qmXW","label":"_1argp"};
|
|
1750
|
+
|
|
1751
|
+
var CoreInputCompact = function CoreInputCompact(props) {
|
|
1752
|
+
var _props$name = props.name,
|
|
1753
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1754
|
+
value = props.value,
|
|
1755
|
+
_onChange = props.onChange,
|
|
1756
|
+
_props$disabled = props.disabled,
|
|
1757
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1758
|
+
label = props.label,
|
|
1759
|
+
width = props.width,
|
|
1760
|
+
_props$placeholder = props.placeholder,
|
|
1761
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1762
|
+
error = props.error;
|
|
1763
|
+
return React.createElement("div", {
|
|
1764
|
+
className: "" + styles$b["core-input-compact"],
|
|
1765
|
+
style: {
|
|
1766
|
+
width: width != null ? width : "100%"
|
|
1767
|
+
}
|
|
1768
|
+
}, label && React.createElement("div", {
|
|
1769
|
+
className: styles$b["label"]
|
|
1770
|
+
}, React.createElement("label", null, label), React.createElement(Info, null)), React.createElement("input", {
|
|
1771
|
+
style: {
|
|
1772
|
+
backgroundColor: error ? COLORS.lightYellow : "transparent"
|
|
1773
|
+
},
|
|
1774
|
+
name: name,
|
|
1775
|
+
value: value,
|
|
1776
|
+
onChange: function onChange(e) {
|
|
1777
|
+
return _onChange(name, e.target.value);
|
|
1778
|
+
},
|
|
1779
|
+
disabled: disabled,
|
|
1780
|
+
placeholder: placeholder
|
|
1781
|
+
}));
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
var styles$c = {"core-label-input":"_2YqZu","size-h1":"_23-uu","size-h2":"_16lQL"};
|
|
1785
|
+
|
|
1786
|
+
var CoreTitleInput = function CoreTitleInput(props) {
|
|
1787
|
+
var _props$name = props.name,
|
|
1788
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1789
|
+
value = props.value,
|
|
1790
|
+
_onChange = props.onChange,
|
|
1791
|
+
_props$disabled = props.disabled,
|
|
1792
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1793
|
+
width = props.width,
|
|
1794
|
+
_props$placeholder = props.placeholder,
|
|
1795
|
+
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1796
|
+
error = props.error,
|
|
1797
|
+
_props$size = props.size,
|
|
1798
|
+
size = _props$size === void 0 ? "h1" : _props$size;
|
|
1799
|
+
return React.createElement("div", {
|
|
1800
|
+
className: "" + styles$c["core-label-input"],
|
|
1801
|
+
style: {
|
|
1802
|
+
width: width != null ? width : "100%"
|
|
1803
|
+
}
|
|
1804
|
+
}, React.createElement("input", {
|
|
1805
|
+
className: "" + styles$c["size-" + size],
|
|
1806
|
+
style: {
|
|
1807
|
+
backgroundColor: error ? COLORS.lightYellow : "transparent"
|
|
1808
|
+
},
|
|
1809
|
+
name: name,
|
|
1810
|
+
value: value,
|
|
1811
|
+
onChange: function onChange(e) {
|
|
1812
|
+
return _onChange(name, e.target.value);
|
|
1813
|
+
},
|
|
1814
|
+
disabled: disabled,
|
|
1815
|
+
placeholder: placeholder
|
|
1816
|
+
}));
|
|
1817
|
+
};
|
|
1818
|
+
|
|
1513
1819
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
1514
1820
|
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
|
1515
1821
|
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;
|
|
@@ -1591,7 +1897,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
|
1591
1897
|
}) : options === null || options === void 0 ? void 0 : options.find(function (i) {
|
|
1592
1898
|
return i.value == value;
|
|
1593
1899
|
});
|
|
1594
|
-
return React.createElement(
|
|
1900
|
+
return React.createElement(ReactSelect, Object.assign({
|
|
1595
1901
|
isDisabled: isDisabled,
|
|
1596
1902
|
options: options,
|
|
1597
1903
|
value: !isDefault ? initialValues != null ? initialValues : null : undefined,
|
|
@@ -1626,7 +1932,7 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
|
1626
1932
|
}) : options.find(function (i) {
|
|
1627
1933
|
return i.value == value;
|
|
1628
1934
|
});
|
|
1629
|
-
return React.createElement(
|
|
1935
|
+
return React.createElement(ReactSelect, Object.assign({
|
|
1630
1936
|
isDisabled: isDisabled,
|
|
1631
1937
|
options: options,
|
|
1632
1938
|
value: !isDefault ? initialValues : undefined,
|
|
@@ -1691,7 +1997,7 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
1691
1997
|
var initialValues = defaultValue !== null && typeof defaultValue !== "undefined" ? options.find(function (option) {
|
|
1692
1998
|
return option.value === defaultValue;
|
|
1693
1999
|
}) || null : null;
|
|
1694
|
-
return React.createElement(
|
|
2000
|
+
return React.createElement(ReactSelect, Object.assign({
|
|
1695
2001
|
isDisabled: isDisabled,
|
|
1696
2002
|
options: options,
|
|
1697
2003
|
value: value,
|
|
@@ -1712,5 +2018,5 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
1712
2018
|
|
|
1713
2019
|
var historyCore = createBrowserHistory();
|
|
1714
2020
|
|
|
1715
|
-
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreModal, CoreRadio, CoreRange, CoreSearch, CoreSelect, CoreTextArea, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setMenuCollapse, setUser, store, useGoogleSignOut };
|
|
2021
|
+
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreInputCompact, CoreModal, CoreRadio, CoreRange, CoreSearch, CoreSelect, CoreSelectCompact, CoreTextArea, CoreTitleInput, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setMenuCollapse, setUser, store, useGoogleSignOut };
|
|
1716
2022
|
//# sourceMappingURL=index.modern.js.map
|