acsi-core 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ var GoogleLogin__default = _interopDefault(GoogleLogin);
10
10
  var axios = _interopDefault(require('axios'));
11
11
  var moment = _interopDefault(require('moment'));
12
12
  var reactRouterDom = require('react-router-dom');
13
- var gapiScript = require('gapi-script');
14
13
  var reactRedux = require('react-redux');
14
+ var gapiScript = require('gapi-script');
15
15
  var material = require('@mui/material');
16
16
  var reactToastify = require('react-toastify');
17
17
  var Select = require('react-select');
@@ -24,6 +24,7 @@ var setAlert = toolkit.createAction("common/setAlert");
24
24
  var setUser = toolkit.createAction("common/setUser");
25
25
  var setLanguage = toolkit.createAction("common/setLanguage");
26
26
  var reset = toolkit.createAction("common/reset");
27
+ var setMenuCollapse = toolkit.createAction("common/setMenuCollapse");
27
28
 
28
29
  var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
29
30
  var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
@@ -37,6 +38,7 @@ var PUSHER_CONFIG = {
37
38
  };
38
39
  var ACCESS_TOKEN = "ACCESS_TOKEN";
39
40
  var ACADEMY_DOMAIN = "ACADEMY_DOMAIN";
41
+ var DATE_TIME_MIN_VALUE = "0001-01-01T00:00:00";
40
42
  var DefaultErrorMessage = "an_unexpected_error_has_occurred";
41
43
  var getAccessToken = function getAccessToken() {
42
44
  try {
@@ -52,13 +54,32 @@ var encodeParams = function encodeParams(params) {
52
54
  if (Array.isArray(params[key])) {
53
55
  return params[key].map(function (i) {
54
56
  return encodeURIComponent(key) + "=" + encodeURIComponent(i);
55
- }).join('&');
57
+ }).join("&");
56
58
  }
57
59
  return encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
58
- }).join('&');
60
+ }).join("&");
61
+ };
62
+ var COLORS = {
63
+ brandBlack: "#101129",
64
+ grayText: "#585869",
65
+ blackText: "#212126",
66
+ lightGray: "#a6a6ad",
67
+ lightGray2: "rgba(0, 0, 0, 0.08)",
68
+ lightGray2Text: "#c6c6cc",
69
+ grayLines: "#e6e6eb",
70
+ lightGrayBg: "#f5f9fa",
71
+ white: "#ffffff",
72
+ brandBlue: "#00afda",
73
+ lightBlue: "#caeffc",
74
+ lightBlueHover: "#e5f9ff",
75
+ brandBlueHover: "#008fb2",
76
+ darkBrandBlue: "#025675",
77
+ darkBrandBlueHover: "#007a99",
78
+ brandAccent: "#ffce09",
79
+ red: "#ce3636"
59
80
  };
60
81
 
61
- 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"};
82
+ 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"};
62
83
 
63
84
  var api = axios.create({
64
85
  baseURL: BASE_URL,
@@ -114,9 +135,10 @@ var itemLogin = ['Seamless lesson planning', 'Flexibility and customization', 'D
114
135
  var BlockLogin = function BlockLogin(_ref) {
115
136
  var onNavigate = _ref.onNavigate,
116
137
  role = _ref.role;
138
+ var dispatch = reactRedux.useDispatch();
117
139
  var onSuccessGoogle = function onSuccessGoogle(res) {
118
140
  try {
119
- var _temp = function () {
141
+ return Promise.resolve(function () {
120
142
  if (!!(res !== null && res !== void 0 && res.accessToken)) {
121
143
  var _res$profileObj = res.profileObj,
122
144
  email = _res$profileObj.email,
@@ -136,14 +158,21 @@ var BlockLogin = function BlockLogin(_ref) {
136
158
  googleId: googleId,
137
159
  role: role
138
160
  };
161
+ dispatch(setLoading(true));
139
162
  return Promise.resolve(apiLoginGoogle(infoLogin)).then(function (res1) {
163
+ var _res1$data;
164
+ if (((_res1$data = res1.data) === null || _res1$data === void 0 ? void 0 : _res1$data.id) == null) {
165
+ dispatch(setLoading(false));
166
+ alert("Please contact admin.");
167
+ return;
168
+ }
140
169
  var tokenJWT = res1.data.token;
141
170
  localStorage.setItem(ACCESS_TOKEN, tokenJWT);
142
171
  onNavigate("/dashboard");
172
+ dispatch(setLoading(false));
143
173
  });
144
174
  }
145
- }();
146
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
175
+ }());
147
176
  } catch (e) {
148
177
  return Promise.reject(e);
149
178
  }
@@ -157,7 +186,7 @@ var BlockLogin = function BlockLogin(_ref) {
157
186
  }
158
187
  }, React__default.createElement(reactstrap.Col, {
159
188
  sm: 12,
160
- lg: 7
189
+ lg: role != "Admin" ? 7 : 12
161
190
  }, React__default.createElement("div", {
162
191
  className: "" + styleGlobal["box-signin-container"]
163
192
  }, React__default.createElement("div", {
@@ -175,7 +204,7 @@ var BlockLogin = function BlockLogin(_ref) {
175
204
  className: styleGlobal["box-signin"] + " "
176
205
  }, React__default.createElement("div", {
177
206
  className: "" + styleGlobal["signin_title"]
178
- }, React__default.createElement("span", null, "Welcome to Edusfere")), React__default.createElement("div", {
207
+ }, React__default.createElement("span", null, "Welcome to Edusfere")), role != "Admin" && React__default.createElement("div", {
179
208
  className: "" + styleGlobal["signup_link"]
180
209
  }, React__default.createElement("span", null, "Don't have an account?", " ", React__default.createElement(reactRouterDom.Link, {
181
210
  to: "/",
@@ -201,7 +230,7 @@ var BlockLogin = function BlockLogin(_ref) {
201
230
  onSuccess: onSuccessGoogle,
202
231
  onFailure: onFailureGoogle,
203
232
  cookiePolicy: "single_host_origin"
204
- }), React__default.createElement("span", {
233
+ }), role != "Admin" && React__default.createElement(React__default.Fragment, null, React__default.createElement("span", {
205
234
  className: "" + styleGlobal["box-field"]
206
235
  }, "OR"), React__default.createElement(reactstrap.Form, null, React__default.createElement("div", {
207
236
  className: "" + styleGlobal["box-input"]
@@ -216,17 +245,17 @@ var BlockLogin = function BlockLogin(_ref) {
216
245
  height: 20,
217
246
  alt: "Email sign-in",
218
247
  src: "/images/icons/Login_icon.png"
219
- }), "Sign in with Email"))), React__default.createElement("div", {
248
+ }), "Sign in with Email")))), React__default.createElement("div", {
220
249
  className: styleGlobal["box-signin-text"] + " "
221
250
  }, React__default.createElement("span", {
222
251
  style: {
223
252
  fontSize: "13px",
224
253
  color: "#A6A6AD"
225
254
  }
226
- }, "By signing in, you agree to our Terms & Privacy Policy")))), React__default.createElement(reactstrap.Col, {
255
+ }, "By signing in, you agree to our Terms & Privacy Policy")))), role != "Admin" && React__default.createElement(reactstrap.Col, {
227
256
  sm: 12,
228
257
  lg: 5,
229
- className: "d-none d-lg-block"
258
+ className: "d-none d-lg-block " + styleGlobal["pr-30"]
230
259
  }, React__default.createElement("div", {
231
260
  className: "" + styleGlobal["box-right"],
232
261
  style: {
@@ -529,7 +558,8 @@ var initialState = {
529
558
  message: ""
530
559
  },
531
560
  user: null,
532
- academy: null
561
+ academy: null,
562
+ menuCollapse: false
533
563
  };
534
564
  var commonReducer = toolkit.createReducer(initialState, function (builder) {
535
565
  builder.addCase(setLoading, function (state, action) {
@@ -542,6 +572,8 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
542
572
  state.language = action.payload;
543
573
  }).addCase(reset, function (_state, _action) {
544
574
  return initialState;
575
+ }).addCase(setMenuCollapse, function (state, action) {
576
+ state.menuCollapse = action.payload;
545
577
  });
546
578
  });
547
579
 
@@ -950,40 +982,69 @@ var CoreButton = function CoreButton(props) {
950
982
  onClick = props.onClick,
951
983
  icon = props.icon,
952
984
  _props$disabled = props.disabled,
953
- disabled = _props$disabled === void 0 ? false : _props$disabled;
985
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
986
+ _props$htmlType = props.htmlType,
987
+ htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType;
954
988
  return React__default.createElement("button", {
955
989
  className: styles["core-button"] + " " + styles[type],
956
990
  onClick: onClick,
957
- disabled: disabled
991
+ disabled: disabled,
992
+ type: htmlType
958
993
  }, icon && icon, children);
959
994
  };
960
995
 
961
- var styles$1 = {"core-input":"_1WdX2","error":"_n7n3Q"};
996
+ var styles$1 = {"core-input":"_1WdX2","outline":"_3X2RJ","no-outline":"_bVYtv","error":"_n7n3Q"};
997
+
998
+ var styles$2 = {"core-error":"_1Mmxr"};
999
+
1000
+ var CoreError = function CoreError(props) {
1001
+ var message = props.message;
1002
+ return React__default.createElement("div", {
1003
+ className: "" + styles$2["core-error"]
1004
+ }, React__default.createElement("p", null, message));
1005
+ };
962
1006
 
963
1007
  var CoreInput = function CoreInput(props) {
964
1008
  var name = props.name,
965
1009
  value = props.value,
966
1010
  _onChange = props.onChange,
1011
+ _props$type = props.type,
1012
+ type = _props$type === void 0 ? "outline" : _props$type,
967
1013
  _props$disabled = props.disabled,
968
1014
  disabled = _props$disabled === void 0 ? false : _props$disabled,
969
1015
  label = props.label,
970
1016
  width = props.width,
971
1017
  _props$placeholder = props.placeholder,
972
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
973
- error = props.error;
1018
+ placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
1019
+ error = props.error,
1020
+ _props$errorMessage = props.errorMessage,
1021
+ errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage,
1022
+ fontSize = props.fontSize,
1023
+ fontWeight = props.fontWeight,
1024
+ _onKeyDown = props.onKeyDown,
1025
+ ref = props.ref;
974
1026
  return React__default.createElement("div", {
975
- className: styles$1["core-input"] + " " + (error ? styles$1["error"] : ""),
1027
+ className: styles$1["core-input"] + " " + styles$1[type] + " " + (error ? styles$1["error"] : ""),
976
1028
  style: {
977
1029
  width: width != null ? width : "100%"
978
1030
  }
979
- }, label && React__default.createElement("label", null, label), React__default.createElement("input", {
1031
+ }, label && React__default.createElement("label", null, label), React__default.createElement("input", Object.assign({
1032
+ style: {
1033
+ fontSize: fontSize,
1034
+ fontWeight: fontWeight
1035
+ },
980
1036
  name: name,
981
1037
  value: value,
982
1038
  onChange: function onChange(e) {
983
1039
  return _onChange(name, e.target.value);
984
1040
  },
985
1041
  disabled: disabled,
986
- placeholder: placeholder
1042
+ placeholder: placeholder,
1043
+ onKeyDown: function onKeyDown(e) {
1044
+ return _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
1045
+ }
1046
+ }, ref)), error && React__default.createElement(CoreError, {
1047
+ message: errorMessage
987
1048
  }));
988
1049
  };
989
1050
 
@@ -1006,95 +1067,206 @@ function _objectWithoutPropertiesLoose(r, e) {
1006
1067
  return t;
1007
1068
  }
1008
1069
 
1009
- var styles$2 = {"core-select":"_2sg12"};
1070
+ var styles$3 = {"core-select":"_2sg12","label":"_1-XBo"};
1010
1071
 
1072
+ var Option = function Option(props) {
1073
+ return React__default.createElement("div", null, React__default.createElement(Select.components.Option, Object.assign({}, props), React__default.createElement(CoreInput$1, {
1074
+ checked: props.isSelected,
1075
+ onChange: function onChange() {
1076
+ return null;
1077
+ },
1078
+ name: "",
1079
+ label: props.label
1080
+ })));
1081
+ };
1011
1082
  var CoreSelect = function CoreSelect(props) {
1012
- var _options$find;
1013
1083
  var name = props.name,
1014
1084
  options = props.options,
1015
1085
  value = props.value,
1016
- _onChange = props.onChange,
1086
+ onChange = props.onChange,
1017
1087
  _props$disabled = props.disabled,
1018
1088
  disabled = _props$disabled === void 0 ? false : _props$disabled,
1019
1089
  label = props.label,
1020
1090
  width = props.width,
1021
1091
  _props$placeholder = props.placeholder,
1022
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
1023
- error = props.error;
1092
+ placeholder = _props$placeholder === void 0 ? "Select" : _props$placeholder,
1093
+ error = props.error,
1094
+ _props$errorMessage = props.errorMessage,
1095
+ errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage,
1096
+ _props$type = props.type,
1097
+ type = _props$type === void 0 ? "outline" : _props$type,
1098
+ _props$isMulti = props.isMulti,
1099
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
1100
+ _props$closeMenuOnSel = props.closeMenuOnSelect,
1101
+ closeMenuOnSelect = _props$closeMenuOnSel === void 0 ? true : _props$closeMenuOnSel,
1102
+ _props$hideSelectedOp = props.hideSelectedOptions,
1103
+ hideSelectedOptions = _props$hideSelectedOp === void 0 ? true : _props$hideSelectedOp;
1104
+ var handleChange = function handleChange(e) {
1105
+ var newValue = isMulti ? e.map(function (item) {
1106
+ return item.value;
1107
+ }) : e === null || e === void 0 ? void 0 : e.value;
1108
+ onChange(name, newValue);
1109
+ };
1110
+ var controlStyle = function controlStyle(base, state) {
1111
+ var styles = _extends({}, base, {
1112
+ fontSize: "14px",
1113
+ fontWeight: "400",
1114
+ padding: "0 4px",
1115
+ borderRadius: "8px",
1116
+ backgroundColor: state.isDisabled ? COLORS.lightGrayBg : COLORS.white,
1117
+ border: state.isFocused ? "2px solid " + (!error ? COLORS.brandBlue : COLORS.red) : "1px solid " + (!error ? COLORS.grayLines : COLORS.red),
1118
+ height: isMulti ? undefined : "32px",
1119
+ minHeight: 0,
1120
+ boxShadow: "none"
1121
+ });
1122
+ switch (type) {
1123
+ case "outline":
1124
+ styles.overflow = "hidden";
1125
+ styles[":hover"] = {
1126
+ backgroundColor: COLORS.lightBlueHover
1127
+ };
1128
+ break;
1129
+ case "no-outline":
1130
+ styles.border = "none";
1131
+ styles.padding = 0;
1132
+ styles["&>div"] = {
1133
+ padding: 0
1134
+ };
1135
+ break;
1136
+ }
1137
+ return styles;
1138
+ };
1139
+ var inputStyles = function inputStyles(base) {
1140
+ var styles = _extends({}, base, {
1141
+ margin: "0",
1142
+ padding: "0",
1143
+ color: "inherit"
1144
+ });
1145
+ return styles;
1146
+ };
1147
+ var placeholderStyles = function placeholderStyles(base) {
1148
+ var styles = _extends({}, base, {
1149
+ color: COLORS.lightGray,
1150
+ position: "relative",
1151
+ top: "-4px"
1152
+ });
1153
+ return styles;
1154
+ };
1155
+ var dropdownIndicatorStyles = function dropdownIndicatorStyles(base) {
1156
+ var styles = _extends({}, base, {
1157
+ position: "relative",
1158
+ top: "-4px",
1159
+ padding: "8px 0"
1160
+ });
1161
+ return styles;
1162
+ };
1163
+ var valueContainerStyles = function valueContainerStyles(base) {
1164
+ var styles = _extends({}, base, {
1165
+ height: isMulti ? undefined : "32px"
1166
+ });
1167
+ return styles;
1168
+ };
1169
+ var singleValueStyles = function singleValueStyles(base) {
1170
+ var styles = _extends({}, base, {
1171
+ position: "relative",
1172
+ top: "-4px"
1173
+ });
1174
+ return styles;
1175
+ };
1176
+ var optionStyles = function optionStyles(base, state) {
1177
+ var styles = _extends({}, base, {
1178
+ padding: "8px",
1179
+ borderRadius: "8px",
1180
+ cursor: "pointer",
1181
+ fontSize: "14px",
1182
+ fontWeight: 400,
1183
+ backgroundColor: state.isSelected ? COLORS.lightBlueHover : "transparent",
1184
+ "&:hover": {
1185
+ backgroundColor: COLORS.lightBlueHover
1186
+ }
1187
+ });
1188
+ return styles;
1189
+ };
1190
+ var indicatorsContainerStyles = function indicatorsContainerStyles(base) {
1191
+ var styles = _extends({}, base, {
1192
+ display: type === "no-outline" ? "none" : "block"
1193
+ });
1194
+ return styles;
1195
+ };
1196
+ var multiValueStyles = function multiValueStyles(base) {
1197
+ var styles = _extends({}, base, {
1198
+ backgroundColor: COLORS.lightBlue,
1199
+ borderRadius: "4px",
1200
+ padding: "2px 8px",
1201
+ display: "flex",
1202
+ alignItems: "center",
1203
+ fontSize: "13px",
1204
+ color: COLORS.blackText
1205
+ });
1206
+ return styles;
1207
+ };
1208
+ var multiValueRemoveStyles = function multiValueRemoveStyles(base) {
1209
+ var styles = _extends({}, base, {
1210
+ color: COLORS.lightGray,
1211
+ cursor: "pointer"
1212
+ });
1213
+ return styles;
1214
+ };
1215
+ var multiValueLabelStyles = function multiValueLabelStyles(base) {
1216
+ var styles = _extends({}, base, {
1217
+ color: COLORS.blackText,
1218
+ fontWeight: "400",
1219
+ fontSize: "13px",
1220
+ padding: 0
1221
+ });
1222
+ return styles;
1223
+ };
1024
1224
  return React__default.createElement("div", {
1025
- className: "" + styles$2["core-select"],
1225
+ className: "" + styles$3["core-select"],
1026
1226
  style: {
1027
1227
  width: width != null ? width : "100%"
1028
1228
  }
1029
- }, label && React__default.createElement("label", null, label), React__default.createElement(Select__default, {
1229
+ }, label && React__default.createElement("span", {
1230
+ className: styles$3["label"]
1231
+ }, label), React__default.createElement(Select__default, {
1030
1232
  name: name,
1031
- value: (_options$find = options.find(function (i) {
1032
- return i.value === value;
1033
- })) != null ? _options$find : null,
1034
- onChange: function onChange(e) {
1035
- return _onChange(name, e === null || e === void 0 ? void 0 : e.value);
1036
- },
1233
+ value: options.filter(function (i) {
1234
+ return value && (isMulti ? value.includes(i.value) : i.value === value);
1235
+ }),
1236
+ onChange: handleChange,
1037
1237
  placeholder: placeholder,
1038
1238
  isDisabled: disabled,
1239
+ isMulti: isMulti,
1240
+ closeMenuOnSelect: closeMenuOnSelect,
1241
+ hideSelectedOptions: hideSelectedOptions,
1039
1242
  options: options,
1243
+ components: isMulti ? {
1244
+ Option: Option
1245
+ } : undefined,
1040
1246
  styles: {
1041
- control: function control(base, state) {
1042
- return _extends({}, base, {
1043
- borderRadius: "8px",
1044
- border: state.isFocused ? "2px solid " + (!error ? "#00AFDA" : "#CE3636") : "1px solid " + (!error ? "#E6E6EB" : "#CE3636"),
1045
- height: "32px",
1046
- minHeight: 0,
1047
- fontSize: "14px",
1048
- fontWeight: "400",
1049
- padding: "0 4px",
1050
- backgroundColor: state.isDisabled ? "#F5F9FA)" : "#FFF",
1051
- boxShadow: "none",
1052
- "&:hover": {
1053
- backgroundColor: "#F5F9FA"
1054
- }
1055
- });
1056
- },
1057
- input: function input(base) {
1058
- return _extends({}, base, {
1059
- margin: "0",
1060
- padding: "0",
1061
- color: "inherit"
1062
- });
1063
- },
1064
- placeholder: function placeholder(base) {
1065
- return _extends({}, base, {
1066
- color: "#A6A6AD",
1067
- position: "relative",
1068
- top: "-4px"
1069
- });
1070
- },
1071
- dropdownIndicator: function dropdownIndicator(base) {
1072
- return _extends({}, base, {
1073
- position: "relative",
1074
- top: "-4px"
1075
- });
1076
- },
1247
+ control: controlStyle,
1248
+ input: inputStyles,
1249
+ placeholder: placeholderStyles,
1250
+ dropdownIndicator: dropdownIndicatorStyles,
1077
1251
  indicatorSeparator: function indicatorSeparator() {
1078
1252
  return {
1079
1253
  display: "none"
1080
1254
  };
1081
1255
  },
1082
- valueContainer: function valueContainer(base) {
1083
- return _extends({}, base, {
1084
- height: "32px"
1085
- });
1086
- },
1087
- singleValue: function singleValue(base) {
1088
- return _extends({}, base, {
1089
- position: "relative",
1090
- top: "-4px"
1091
- });
1092
- }
1256
+ indicatorsContainer: indicatorsContainerStyles,
1257
+ valueContainer: valueContainerStyles,
1258
+ singleValue: singleValueStyles,
1259
+ option: optionStyles,
1260
+ multiValue: multiValueStyles,
1261
+ multiValueRemove: multiValueRemoveStyles,
1262
+ multiValueLabel: multiValueLabelStyles
1093
1263
  }
1264
+ }), error && React__default.createElement(CoreError, {
1265
+ message: errorMessage
1094
1266
  }));
1095
1267
  };
1096
1268
 
1097
- var styles$3 = {"core-checkbox":"_3HY4f"};
1269
+ var styles$4 = {"core-checkbox":"_3HY4f"};
1098
1270
 
1099
1271
  var CoreInput$1 = function CoreInput(props) {
1100
1272
  var name = props.name,
@@ -1104,7 +1276,7 @@ var CoreInput$1 = function CoreInput(props) {
1104
1276
  disabled = _props$disabled === void 0 ? false : _props$disabled,
1105
1277
  label = props.label;
1106
1278
  return React__default.createElement("div", {
1107
- className: "" + styles$3["core-checkbox"]
1279
+ className: "" + styles$4["core-checkbox"]
1108
1280
  }, React__default.createElement(reactstrap.FormGroup, {
1109
1281
  check: true,
1110
1282
  inline: true
@@ -1123,7 +1295,7 @@ var CoreInput$1 = function CoreInput(props) {
1123
1295
  }, label)));
1124
1296
  };
1125
1297
 
1126
- var styles$4 = {"core-radio":"_kvUpe","form-check":"_3ToPe"};
1298
+ var styles$5 = {"core-radio":"_kvUpe","form-check":"_3ToPe"};
1127
1299
 
1128
1300
  var CoreRadio = function CoreRadio(props) {
1129
1301
  var name = props.name,
@@ -1133,7 +1305,7 @@ var CoreRadio = function CoreRadio(props) {
1133
1305
  _props$disabled = props.disabled,
1134
1306
  disabled = _props$disabled === void 0 ? false : _props$disabled;
1135
1307
  return React__default.createElement("div", {
1136
- className: "" + styles$4["core-radio"]
1308
+ className: "" + styles$5["core-radio"]
1137
1309
  }, React__default.createElement(reactstrap.FormGroup, {
1138
1310
  check: true
1139
1311
  }, options.map(function (i) {
@@ -1156,29 +1328,14 @@ var CoreRadio = function CoreRadio(props) {
1156
1328
  })));
1157
1329
  };
1158
1330
 
1159
- var styles$5 = {"core-error":"_1Mmxr"};
1160
-
1161
- var icons = {
1162
- ErrorRedIcon: "/images/icons/error_red.svg"
1163
- };
1164
-
1165
- var CoreError = function CoreError(props) {
1166
- var message = props.message;
1167
- return React__default.createElement("div", {
1168
- className: "" + styles$5["core-error"]
1169
- }, React__default.createElement("img", {
1170
- src: icons.ErrorRedIcon,
1171
- alt: "error-icon"
1172
- }), React__default.createElement("p", null, message));
1173
- };
1174
-
1175
1331
  var styles$6 = {"core-modal-header":"_2y5ln"};
1176
1332
 
1177
1333
  var CoreModal = function CoreModal(props) {
1178
1334
  var open = props.open,
1179
1335
  onClose = props.onClose,
1180
1336
  children = props.children,
1181
- title = props.title;
1337
+ title = props.title,
1338
+ footer = props.footer;
1182
1339
  return React__default.createElement(reactstrap.Modal, {
1183
1340
  isOpen: open,
1184
1341
  toggle: onClose,
@@ -1187,7 +1344,66 @@ var CoreModal = function CoreModal(props) {
1187
1344
  }, React__default.createElement(reactstrap.ModalHeader, {
1188
1345
  toggle: onClose,
1189
1346
  className: styles$6["core-modal-header"]
1190
- }, title), React__default.createElement(reactstrap.ModalBody, null, children));
1347
+ }, title), React__default.createElement(reactstrap.ModalBody, null, children), footer && React__default.createElement(reactstrap.ModalFooter, null, footer));
1348
+ };
1349
+
1350
+ var styles$7 = {"core-range":"_1dzD7"};
1351
+
1352
+ var CoreRange = function CoreRange(props) {
1353
+ var name = props.name,
1354
+ value = props.value,
1355
+ _onChange = props.onChange,
1356
+ label = props.label,
1357
+ width = props.width,
1358
+ min = props.min,
1359
+ max = props.max,
1360
+ step = props.step;
1361
+ return React__default.createElement("div", {
1362
+ className: "" + styles$7["core-range"],
1363
+ style: {
1364
+ width: width != null ? width : "100%"
1365
+ }
1366
+ }, label && React__default.createElement("label", null, label), React__default.createElement("input", {
1367
+ type: "range",
1368
+ name: name,
1369
+ value: value,
1370
+ onChange: function onChange(e) {
1371
+ return _onChange(name, +e.target.value);
1372
+ },
1373
+ min: min,
1374
+ max: max,
1375
+ step: step
1376
+ }));
1377
+ };
1378
+
1379
+ var styles$8 = {"core-text-area":"_1b_C3"};
1380
+
1381
+ var CoreTextArea = function CoreTextArea(props) {
1382
+ var name = props.name,
1383
+ _onChange = props.onChange,
1384
+ value = props.value,
1385
+ _props$cols = props.cols,
1386
+ cols = _props$cols === void 0 ? 0 : _props$cols,
1387
+ label = props.label,
1388
+ _props$rows = props.rows,
1389
+ rows = _props$rows === void 0 ? 2 : _props$rows,
1390
+ _props$placeholder = props.placeholder,
1391
+ placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
1392
+ width = props.width;
1393
+ return React__default.createElement("div", {
1394
+ className: styles$8["core-text-area"],
1395
+ style: {
1396
+ width: width != null ? width : "100%"
1397
+ }
1398
+ }, label && React__default.createElement("label", null, label), React__default.createElement("textarea", {
1399
+ placeholder: placeholder,
1400
+ value: value,
1401
+ cols: cols,
1402
+ rows: rows,
1403
+ onChange: function onChange(e) {
1404
+ return _onChange(name, e.target.value);
1405
+ }
1406
+ }));
1191
1407
  };
1192
1408
 
1193
1409
  var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
@@ -1393,16 +1609,16 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
1393
1609
  var historyCore = history.createBrowserHistory();
1394
1610
 
1395
1611
  Object.defineProperty(exports, 'ToastContainer', {
1396
- enumerable: true,
1397
- get: function () {
1398
- return reactToastify.ToastContainer;
1399
- }
1612
+ enumerable: true,
1613
+ get: function () {
1614
+ return reactToastify.ToastContainer;
1615
+ }
1400
1616
  });
1401
1617
  Object.defineProperty(exports, 'toast', {
1402
- enumerable: true,
1403
- get: function () {
1404
- return reactToastify.toast;
1405
- }
1618
+ enumerable: true,
1619
+ get: function () {
1620
+ return reactToastify.toast;
1621
+ }
1406
1622
  });
1407
1623
  exports.ACCESS_TOKEN = ACCESS_TOKEN;
1408
1624
  exports.BASE_URL = BASE_URL;
@@ -1414,12 +1630,15 @@ exports.CoreError = CoreError;
1414
1630
  exports.CoreInput = CoreInput;
1415
1631
  exports.CoreModal = CoreModal;
1416
1632
  exports.CoreRadio = CoreRadio;
1633
+ exports.CoreRange = CoreRange;
1417
1634
  exports.CoreSelect = CoreSelect;
1635
+ exports.CoreTextArea = CoreTextArea;
1418
1636
  exports.CustomAsyncSelect = CustomAsyncSelect;
1419
1637
  exports.CustomCreatable = CustomCreatable;
1420
1638
  exports.CustomPagination = CustomPagination;
1421
1639
  exports.CustomSelect = CustomSelect;
1422
1640
  exports.CustomSelectOption = CustomSelectOption;
1641
+ exports.DATE_TIME_MIN_VALUE = DATE_TIME_MIN_VALUE;
1423
1642
  exports.LayoutContext = LayoutContext;
1424
1643
  exports.Loading = Loading;
1425
1644
  exports.Login = Login;
@@ -1430,6 +1649,7 @@ exports.getErrorMessage = getErrorMessage;
1430
1649
  exports.historyCore = historyCore;
1431
1650
  exports.setAlert = setAlert;
1432
1651
  exports.setLoading = setLoading;
1652
+ exports.setMenuCollapse = setMenuCollapse;
1433
1653
  exports.setUser = setUser;
1434
1654
  exports.store = store;
1435
1655
  exports.useGoogleSignOut = useGoogleSignOut;