l-min-components 1.0.708 → 1.0.715

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.0.708",
3
+ "version": "1.0.715",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -222,7 +222,8 @@ const AppMainLayout = () => {
222
222
  />
223
223
  )}
224
224
 
225
- {window.location.pathname.includes("enterprise") && planState === "GRACE PERIOD" ? (
225
+ {window.location.pathname.includes("enterprise") &&
226
+ planState === "GRACE PERIOD" ? (
226
227
  <GracePeriod
227
228
  getCurrentSubscriptionData={getCurrentSubscriptionData}
228
229
  handleCurrentSubscription={handleCurrentSubscription}
@@ -238,7 +239,11 @@ const AppMainLayout = () => {
238
239
  {rightComponent ??
239
240
  (window.location.pathname.includes("enterprise") &&
240
241
  !window.location.pathname.includes("file-manager") ? (
241
- <EnterpriseRightBar gracePeriod={gracePeriod} setGracePeriod={setGracePeriod} planState={planState} />
242
+ <EnterpriseRightBar
243
+ gracePeriod={gracePeriod}
244
+ setGracePeriod={setGracePeriod}
245
+ planState={planState}
246
+ />
242
247
  ) : window.location.pathname.includes("personal/dashboard") ? (
243
248
  <PersonalRightBar />
244
249
  ) : window.location.pathname.includes("personal/addons") ? (
@@ -246,7 +251,7 @@ const AppMainLayout = () => {
246
251
  ) : window.location.pathname.includes("personal/courses") ? (
247
252
  <InstructorRightBar personal />
248
253
  ) : window.location.pathname.includes(
249
- "personal/library/selectlanguage"
254
+ "personal/library/selectlanguage",
250
255
  ) ? (
251
256
  <InstructorRightBar personal />
252
257
  ) : window.location.pathname.includes("personal/library") ? (
@@ -1,51 +1,58 @@
1
- import React, { useState } from "react";
2
- import DatePicker from "react-datepicker";
3
- import { CalendarIcon } from "./svg/calendar";
4
- import { DownloadIcon } from "./svg/download";
5
- import CustomDatePickerHeader from "./dateNavigation";
6
- import { DatePickerWrapper, DateCont } from "./style";
7
- import moment from "moment";
1
+ import React, { useState } from 'react';
2
+ import DatePicker from 'react-datepicker';
3
+ import { CalendarIcon } from './svg/calendar';
4
+ import { DownloadIcon } from './svg/download';
5
+ import CustomDatePickerHeader from './dateNavigation';
6
+ import { DatePickerWrapper, DateCont } from './style';
7
+ import moment from 'moment';
8
8
 
9
9
  const DatePickerCalender = ({
10
- borderColor,
11
- opacity,
12
- dateFormat,
13
- ...props
10
+ borderColor,
11
+ opacity,
12
+ dateFormat,
13
+ icon,
14
+ ...props
14
15
  }) => {
15
- const [dateRange, setDateRange] = useState({
16
- startDate: new Date(),
17
- endDate: new Date(),
18
- });
16
+ const [dateRange, setDateRange] = useState({
17
+ startDate: new Date(),
18
+ endDate: new Date(),
19
+ });
19
20
 
20
- return(
21
- <DatePickerWrapper {...props}>
22
- <DateCont className="datepicker__wrapper" borderColor={borderColor} opacity={opacity} >
23
- <DatePicker
24
- selected={dateRange.endDate}
25
- endDate={dateRange.endDate}
26
- dateFormat={dateFormat ? dateFormat : "d MMM yyyy"}
27
- renderCustomHeader={({ date, decreaseMonth, increaseMonth }) => (
28
- <CustomDatePickerHeader selected={date} onMonthChange={(value) => {
21
+ return (
22
+ <DatePickerWrapper {...props}>
23
+ <DateCont
24
+ className="datepicker__wrapper"
25
+ borderColor={borderColor}
26
+ opacity={opacity}
27
+ >
28
+ <DatePicker
29
+ selected={dateRange.endDate}
30
+ endDate={dateRange.endDate}
31
+ dateFormat={dateFormat ? dateFormat : 'd MMM yyyy'}
32
+ renderCustomHeader={({ date, decreaseMonth, increaseMonth }) => (
33
+ <CustomDatePickerHeader
34
+ selected={date}
35
+ onMonthChange={(value) => {
29
36
  if (value === -1) {
30
- decreaseMonth();
37
+ decreaseMonth();
31
38
  } else if (value === 1) {
32
- increaseMonth();
39
+ increaseMonth();
33
40
  }
34
- }} />
35
- )}
36
- onChange={(dates) =>
37
- setDateRange({
38
- ...dateRange,
39
- endDate: dates,
40
- })
41
- }
42
- calendarClassName="datepicker_style"
41
+ }}
43
42
  />
44
- <CalendarIcon />
45
- </DateCont>
46
- </DatePickerWrapper>
43
+ )}
44
+ onChange={(dates) =>
45
+ setDateRange({
46
+ ...dateRange,
47
+ endDate: dates,
48
+ })
49
+ }
50
+ calendarClassName="datepicker_style"
51
+ />
52
+ {icon ? icon : <CalendarIcon />}
53
+ </DateCont>
54
+ </DatePickerWrapper>
55
+ );
56
+ };
47
57
 
48
- )
49
- }
50
-
51
- export default DatePickerCalender
58
+ export default DatePickerCalender;
@@ -26,11 +26,11 @@ const SideMenu = ({
26
26
  setIsOpen,
27
27
  affiliatesActive,
28
28
  setRightComponent,
29
- planState
29
+ planState,
30
30
  }) => {
31
31
  console.log("user type", userType);
32
32
  // const [isOpen, setIsOpen] = useState(false);
33
- const [gracePeriod, setGracePeriod] = useState(true)
33
+ const [gracePeriod, setGracePeriod] = useState(true);
34
34
 
35
35
  const { setGeneralData, generalData } = useContext(OutletContext);
36
36
  const onToggle = () => {
@@ -52,10 +52,6 @@ const SideMenu = ({
52
52
  }
53
53
  }, [userType]);
54
54
 
55
- console.log("====================================");
56
- console.log(filteredRoutes, "rar");
57
- console.log("====================================");
58
-
59
55
  const [routeFilter, setRouteFilter] = useState();
60
56
  useEffect(() => {
61
57
  setRouteFilter(filteredRoutes);
@@ -260,7 +256,6 @@ const SideMenu = ({
260
256
  };
261
257
  const active = handlePathCheck();
262
258
 
263
-
264
259
  return (
265
260
  <NavigationItemContainer
266
261
  onClick={() => {
@@ -292,7 +287,18 @@ const SideMenu = ({
292
287
  }}
293
288
  // to={route.path}
294
289
  key={index}
295
- className={cx(`${route.text} ${active && planState !== "GRACE PERIOD" ? "active" : active && planState === "GRACE PERIOD" ? "grace_period_active" : "grace_period"}`)}
290
+ className={cx(
291
+ `${route.text} ${
292
+ active && "active"
293
+ // active && planState !== "GRACE PERIOD"
294
+ // ? "active"
295
+ // : active && planState === "GRACE PERIOD"
296
+ // ? "grace_period_active"
297
+ // : !active && planState === "GRACE PERIOD"
298
+ // ? "grace_period"
299
+ // : ""
300
+ }`
301
+ )}
296
302
  minimal={isOpen}
297
303
  >
298
304
  <IconContainer active={active}>
@@ -311,7 +317,10 @@ const SideMenu = ({
311
317
  };
312
318
 
313
319
  return (
314
- <SideMenuContainer isOpen={isOpen} className={planState === "GRACE PERIOD" ? "grace_period disabled" : ""}>
320
+ <SideMenuContainer
321
+ isOpen={isOpen}
322
+ // className={planState === "GRACE PERIOD" ? "grace_period disabled" : ""}
323
+ >
315
324
  <UserCard user={user} isOpen={isOpen} />
316
325
 
317
326
  <NavigationContainer>