acsi-core 0.1.2 → 0.1.3
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/CoreButton/index.d.ts +3 -1
- package/dist/components/CoreInput/index.d.ts +6 -0
- package/dist/components/CoreModal/index.d.ts +1 -0
- package/dist/components/CoreRange/index.d.ts +14 -0
- package/dist/components/CoreSelect/index.d.ts +1 -0
- package/dist/components/CoreTextArea/index.d.ts +13 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +82 -43
- package/dist/index.d.ts +3 -3
- package/dist/index.js +133 -34
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +131 -35
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/commons/action.d.ts +1 -0
- package/package.json +2 -1
package/dist/index.modern.js
CHANGED
|
@@ -19,6 +19,7 @@ var setAlert = createAction("common/setAlert");
|
|
|
19
19
|
var setUser = createAction("common/setUser");
|
|
20
20
|
var setLanguage = createAction("common/setLanguage");
|
|
21
21
|
var reset = createAction("common/reset");
|
|
22
|
+
var setMenuCollapse = createAction("common/setMenuCollapse");
|
|
22
23
|
|
|
23
24
|
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
|
24
25
|
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
|
@@ -525,7 +526,8 @@ var initialState = {
|
|
|
525
526
|
message: ""
|
|
526
527
|
},
|
|
527
528
|
user: null,
|
|
528
|
-
academy: null
|
|
529
|
+
academy: null,
|
|
530
|
+
menuCollapse: false
|
|
529
531
|
};
|
|
530
532
|
var commonReducer = createReducer(initialState, function (builder) {
|
|
531
533
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -538,6 +540,8 @@ var commonReducer = createReducer(initialState, function (builder) {
|
|
|
538
540
|
state.language = action.payload;
|
|
539
541
|
}).addCase(reset, function (_state, _action) {
|
|
540
542
|
return initialState;
|
|
543
|
+
}).addCase(setMenuCollapse, function (state, action) {
|
|
544
|
+
state.menuCollapse = action.payload;
|
|
541
545
|
});
|
|
542
546
|
});
|
|
543
547
|
|
|
@@ -947,40 +951,81 @@ var CoreButton = function CoreButton(props) {
|
|
|
947
951
|
onClick = props.onClick,
|
|
948
952
|
icon = props.icon,
|
|
949
953
|
_props$disabled = props.disabled,
|
|
950
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled
|
|
954
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
955
|
+
_props$background = props.background,
|
|
956
|
+
background = _props$background === void 0 ? "#F5F9FA" : _props$background,
|
|
957
|
+
_props$color = props.color,
|
|
958
|
+
color = _props$color === void 0 ? "#585869" : _props$color;
|
|
951
959
|
return React.createElement("button", {
|
|
952
960
|
className: styles["core-button"] + " " + styles[type],
|
|
961
|
+
style: {
|
|
962
|
+
"background": background,
|
|
963
|
+
"color": color
|
|
964
|
+
},
|
|
953
965
|
onClick: onClick,
|
|
954
966
|
disabled: disabled
|
|
955
967
|
}, icon && icon, children);
|
|
956
968
|
};
|
|
957
969
|
|
|
958
|
-
var styles$1 = {"core-input":"_1WdX2","error":"_n7n3Q"};
|
|
970
|
+
var styles$1 = {"core-input":"_1WdX2","outline":"_3X2RJ","no-outline":"_bVYtv","error":"_n7n3Q"};
|
|
971
|
+
|
|
972
|
+
var styles$2 = {"core-error":"_1Mmxr"};
|
|
973
|
+
|
|
974
|
+
var icons = {
|
|
975
|
+
ErrorRedIcon: "/images/icons/error_red.svg"
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
var CoreError = function CoreError(props) {
|
|
979
|
+
var message = props.message;
|
|
980
|
+
return React.createElement("div", {
|
|
981
|
+
className: "" + styles$2["core-error"]
|
|
982
|
+
}, React.createElement("img", {
|
|
983
|
+
src: icons.ErrorRedIcon,
|
|
984
|
+
alt: "error-icon"
|
|
985
|
+
}), React.createElement("p", null, message));
|
|
986
|
+
};
|
|
959
987
|
|
|
960
988
|
var CoreInput = function CoreInput(props) {
|
|
961
989
|
var name = props.name,
|
|
962
990
|
value = props.value,
|
|
963
991
|
_onChange = props.onChange,
|
|
992
|
+
_props$type = props.type,
|
|
993
|
+
type = _props$type === void 0 ? "outline" : _props$type,
|
|
964
994
|
_props$disabled = props.disabled,
|
|
965
995
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
966
996
|
label = props.label,
|
|
967
997
|
width = props.width,
|
|
968
998
|
_props$placeholder = props.placeholder,
|
|
969
999
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
970
|
-
error = props.error
|
|
1000
|
+
error = props.error,
|
|
1001
|
+
_props$errorMessage = props.errorMessage,
|
|
1002
|
+
errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage,
|
|
1003
|
+
fontSize = props.fontSize,
|
|
1004
|
+
fontWeight = props.fontWeight,
|
|
1005
|
+
_onKeyDown = props.onKeyDown,
|
|
1006
|
+
ref = props.ref;
|
|
971
1007
|
return React.createElement("div", {
|
|
972
|
-
className: styles$1["core-input"] + " " + (error ? styles$1["error"] : ""),
|
|
1008
|
+
className: styles$1["core-input"] + " " + styles$1[type] + " " + (error ? styles$1["error"] : ""),
|
|
973
1009
|
style: {
|
|
974
1010
|
width: width != null ? width : "100%"
|
|
975
1011
|
}
|
|
976
|
-
}, label && React.createElement("label", null, label), React.createElement("input", {
|
|
1012
|
+
}, label && React.createElement("label", null, label), React.createElement("input", Object.assign({
|
|
1013
|
+
style: {
|
|
1014
|
+
fontSize: fontSize,
|
|
1015
|
+
fontWeight: fontWeight
|
|
1016
|
+
},
|
|
977
1017
|
name: name,
|
|
978
1018
|
value: value,
|
|
979
1019
|
onChange: function onChange(e) {
|
|
980
1020
|
return _onChange(name, e.target.value);
|
|
981
1021
|
},
|
|
982
1022
|
disabled: disabled,
|
|
983
|
-
placeholder: placeholder
|
|
1023
|
+
placeholder: placeholder,
|
|
1024
|
+
onKeyDown: function onKeyDown(e) {
|
|
1025
|
+
return _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
|
|
1026
|
+
}
|
|
1027
|
+
}, ref)), error && React.createElement(CoreError, {
|
|
1028
|
+
message: errorMessage
|
|
984
1029
|
}));
|
|
985
1030
|
};
|
|
986
1031
|
|
|
@@ -1003,7 +1048,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1003
1048
|
return t;
|
|
1004
1049
|
}
|
|
1005
1050
|
|
|
1006
|
-
var styles$
|
|
1051
|
+
var styles$3 = {"core-select":"_2sg12"};
|
|
1007
1052
|
|
|
1008
1053
|
var CoreSelect = function CoreSelect(props) {
|
|
1009
1054
|
var _options$find;
|
|
@@ -1017,9 +1062,11 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1017
1062
|
width = props.width,
|
|
1018
1063
|
_props$placeholder = props.placeholder,
|
|
1019
1064
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
1020
|
-
error = props.error
|
|
1065
|
+
error = props.error,
|
|
1066
|
+
_props$errorMessage = props.errorMessage,
|
|
1067
|
+
errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage;
|
|
1021
1068
|
return React.createElement("div", {
|
|
1022
|
-
className: "" + styles$
|
|
1069
|
+
className: "" + styles$3["core-select"],
|
|
1023
1070
|
style: {
|
|
1024
1071
|
width: width != null ? width : "100%"
|
|
1025
1072
|
}
|
|
@@ -1048,7 +1095,9 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1048
1095
|
boxShadow: "none",
|
|
1049
1096
|
"&:hover": {
|
|
1050
1097
|
backgroundColor: "#F5F9FA"
|
|
1051
|
-
}
|
|
1098
|
+
},
|
|
1099
|
+
transition: "all .3s",
|
|
1100
|
+
overflow: "hidden"
|
|
1052
1101
|
});
|
|
1053
1102
|
},
|
|
1054
1103
|
input: function input(base) {
|
|
@@ -1068,7 +1117,8 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1068
1117
|
dropdownIndicator: function dropdownIndicator(base) {
|
|
1069
1118
|
return _extends({}, base, {
|
|
1070
1119
|
position: "relative",
|
|
1071
|
-
top: "-4px"
|
|
1120
|
+
top: "-4px",
|
|
1121
|
+
padding: "8px 0"
|
|
1072
1122
|
});
|
|
1073
1123
|
},
|
|
1074
1124
|
indicatorSeparator: function indicatorSeparator() {
|
|
@@ -1088,10 +1138,12 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1088
1138
|
});
|
|
1089
1139
|
}
|
|
1090
1140
|
}
|
|
1141
|
+
}), error && React.createElement(CoreError, {
|
|
1142
|
+
message: errorMessage
|
|
1091
1143
|
}));
|
|
1092
1144
|
};
|
|
1093
1145
|
|
|
1094
|
-
var styles$
|
|
1146
|
+
var styles$4 = {"core-checkbox":"_3HY4f"};
|
|
1095
1147
|
|
|
1096
1148
|
var CoreInput$1 = function CoreInput(props) {
|
|
1097
1149
|
var name = props.name,
|
|
@@ -1101,7 +1153,7 @@ var CoreInput$1 = function CoreInput(props) {
|
|
|
1101
1153
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1102
1154
|
label = props.label;
|
|
1103
1155
|
return React.createElement("div", {
|
|
1104
|
-
className: "" + styles$
|
|
1156
|
+
className: "" + styles$4["core-checkbox"]
|
|
1105
1157
|
}, React.createElement(FormGroup, {
|
|
1106
1158
|
check: true,
|
|
1107
1159
|
inline: true
|
|
@@ -1120,7 +1172,7 @@ var CoreInput$1 = function CoreInput(props) {
|
|
|
1120
1172
|
}, label)));
|
|
1121
1173
|
};
|
|
1122
1174
|
|
|
1123
|
-
var styles$
|
|
1175
|
+
var styles$5 = {"core-radio":"_kvUpe","form-check":"_3ToPe"};
|
|
1124
1176
|
|
|
1125
1177
|
var CoreRadio = function CoreRadio(props) {
|
|
1126
1178
|
var name = props.name,
|
|
@@ -1130,7 +1182,7 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1130
1182
|
_props$disabled = props.disabled,
|
|
1131
1183
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
1132
1184
|
return React.createElement("div", {
|
|
1133
|
-
className: "" + styles$
|
|
1185
|
+
className: "" + styles$5["core-radio"]
|
|
1134
1186
|
}, React.createElement(FormGroup, {
|
|
1135
1187
|
check: true
|
|
1136
1188
|
}, options.map(function (i) {
|
|
@@ -1153,29 +1205,14 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1153
1205
|
})));
|
|
1154
1206
|
};
|
|
1155
1207
|
|
|
1156
|
-
var styles$5 = {"core-error":"_1Mmxr"};
|
|
1157
|
-
|
|
1158
|
-
var icons = {
|
|
1159
|
-
ErrorRedIcon: "/images/icons/error_red.svg"
|
|
1160
|
-
};
|
|
1161
|
-
|
|
1162
|
-
var CoreError = function CoreError(props) {
|
|
1163
|
-
var message = props.message;
|
|
1164
|
-
return React.createElement("div", {
|
|
1165
|
-
className: "" + styles$5["core-error"]
|
|
1166
|
-
}, React.createElement("img", {
|
|
1167
|
-
src: icons.ErrorRedIcon,
|
|
1168
|
-
alt: "error-icon"
|
|
1169
|
-
}), React.createElement("p", null, message));
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
1208
|
var styles$6 = {"core-modal-header":"_2y5ln"};
|
|
1173
1209
|
|
|
1174
1210
|
var CoreModal = function CoreModal(props) {
|
|
1175
1211
|
var open = props.open,
|
|
1176
1212
|
onClose = props.onClose,
|
|
1177
1213
|
children = props.children,
|
|
1178
|
-
title = props.title
|
|
1214
|
+
title = props.title,
|
|
1215
|
+
footer = props.footer;
|
|
1179
1216
|
return React.createElement(Modal, {
|
|
1180
1217
|
isOpen: open,
|
|
1181
1218
|
toggle: onClose,
|
|
@@ -1184,7 +1221,66 @@ var CoreModal = function CoreModal(props) {
|
|
|
1184
1221
|
}, React.createElement(ModalHeader, {
|
|
1185
1222
|
toggle: onClose,
|
|
1186
1223
|
className: styles$6["core-modal-header"]
|
|
1187
|
-
}, title), React.createElement(ModalBody, null, children));
|
|
1224
|
+
}, title), React.createElement(ModalBody, null, children), footer && React.createElement(ModalFooter, null, footer));
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
var styles$7 = {"core-range":"_1dzD7"};
|
|
1228
|
+
|
|
1229
|
+
var CoreRange = function CoreRange(props) {
|
|
1230
|
+
var name = props.name,
|
|
1231
|
+
value = props.value,
|
|
1232
|
+
_onChange = props.onChange,
|
|
1233
|
+
label = props.label,
|
|
1234
|
+
width = props.width,
|
|
1235
|
+
min = props.min,
|
|
1236
|
+
max = props.max,
|
|
1237
|
+
step = props.step;
|
|
1238
|
+
return React.createElement("div", {
|
|
1239
|
+
className: "" + styles$7["core-range"],
|
|
1240
|
+
style: {
|
|
1241
|
+
width: width != null ? width : "100%"
|
|
1242
|
+
}
|
|
1243
|
+
}, label && React.createElement("label", null, label), React.createElement("input", {
|
|
1244
|
+
type: "range",
|
|
1245
|
+
name: name,
|
|
1246
|
+
value: value,
|
|
1247
|
+
onChange: function onChange(e) {
|
|
1248
|
+
return _onChange(name, +e.target.value);
|
|
1249
|
+
},
|
|
1250
|
+
min: min,
|
|
1251
|
+
max: max,
|
|
1252
|
+
step: step
|
|
1253
|
+
}));
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
var styles$8 = {"core-text-area":"_1b_C3"};
|
|
1257
|
+
|
|
1258
|
+
var CoreTextArea = function CoreTextArea(props) {
|
|
1259
|
+
var name = props.name,
|
|
1260
|
+
_onChange = props.onChange,
|
|
1261
|
+
value = props.value,
|
|
1262
|
+
_props$cols = props.cols,
|
|
1263
|
+
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1264
|
+
label = props.label,
|
|
1265
|
+
_props$rows = props.rows,
|
|
1266
|
+
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1267
|
+
_props$placeholder = props.placeholder,
|
|
1268
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
1269
|
+
width = props.width;
|
|
1270
|
+
return React.createElement("div", {
|
|
1271
|
+
className: styles$8["core-text-area"]
|
|
1272
|
+
}, label && React.createElement("label", null, label), React.createElement("textarea", {
|
|
1273
|
+
placeholder: placeholder,
|
|
1274
|
+
value: value,
|
|
1275
|
+
cols: cols,
|
|
1276
|
+
rows: rows,
|
|
1277
|
+
onChange: function onChange(e) {
|
|
1278
|
+
return _onChange(name, e.target.value);
|
|
1279
|
+
},
|
|
1280
|
+
style: {
|
|
1281
|
+
width: width != null ? width : "100%"
|
|
1282
|
+
}
|
|
1283
|
+
}));
|
|
1188
1284
|
};
|
|
1189
1285
|
|
|
1190
1286
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
@@ -1389,5 +1485,5 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
1389
1485
|
|
|
1390
1486
|
var historyCore = createBrowserHistory();
|
|
1391
1487
|
|
|
1392
|
-
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreModal, CoreRadio, CoreSelect, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setUser, store, useGoogleSignOut };
|
|
1488
|
+
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreModal, CoreRadio, CoreRange, CoreSelect, CoreTextArea, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setMenuCollapse, setUser, store, useGoogleSignOut };
|
|
1393
1489
|
//# sourceMappingURL=index.modern.js.map
|