magneto365.ui 2.55.0 → 2.55.2

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.
Files changed (22) hide show
  1. package/dist/cjs/index.js +13 -13
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/UI/molecules/FraudCardJob/FraudCardJob.component.d.ts +3 -3
  4. package/dist/cjs/types/components/UI/molecules/FraudCardJob/FraudCardJob.interface.d.ts +18 -0
  5. package/dist/cjs/types/components/UI/molecules/MegaMenuCard/MegaMenuCard.interface.d.ts +1 -1
  6. package/dist/cjs/types/components/UI/molecules/MegaMenuSideCards/MegaMenuSideCards.interface.d.ts +1 -0
  7. package/dist/cjs/types/components/UI/organism/JobDetailsDrawer/JobDetailsDrawer.interface.d.ts +3 -2
  8. package/dist/cjs/types/components/UI/organism/MobileJobDetailsDrawer/MobileJobDetailsDrawer.interface.d.ts +5 -4
  9. package/dist/cjs/types/constants/icons.constants.d.ts +1 -1
  10. package/dist/cjs/types/constants/stories/fraudCardJob.constant.d.ts +2 -0
  11. package/dist/esm/index.js +13 -13
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/types/components/UI/molecules/FraudCardJob/FraudCardJob.component.d.ts +3 -3
  14. package/dist/esm/types/components/UI/molecules/FraudCardJob/FraudCardJob.interface.d.ts +18 -0
  15. package/dist/esm/types/components/UI/molecules/MegaMenuCard/MegaMenuCard.interface.d.ts +1 -1
  16. package/dist/esm/types/components/UI/molecules/MegaMenuSideCards/MegaMenuSideCards.interface.d.ts +1 -0
  17. package/dist/esm/types/components/UI/organism/JobDetailsDrawer/JobDetailsDrawer.interface.d.ts +3 -2
  18. package/dist/esm/types/components/UI/organism/MobileJobDetailsDrawer/MobileJobDetailsDrawer.interface.d.ts +5 -4
  19. package/dist/esm/types/constants/icons.constants.d.ts +1 -1
  20. package/dist/esm/types/constants/stories/fraudCardJob.constant.d.ts +2 -0
  21. package/dist/index.d.ts +26 -8
  22. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- export declare const FraudCardJob: ({ fraudLink }: {
2
- fraudLink: string;
3
- }) => JSX.Element;
1
+ import React from 'react';
2
+ import { IFraudCardJob } from './FraudCardJob.interface';
3
+ export declare const FraudCardJob: React.FC<IFraudCardJob>;
@@ -0,0 +1,18 @@
1
+ export interface IFraudCardJob {
2
+ /**
3
+ * This is the text that display in the title of the card
4
+ */
5
+ title: string;
6
+ /**
7
+ *This is the text that display in the body of the card
8
+ */
9
+ content: string;
10
+ /**
11
+ * This is the text that display in the report button of the card
12
+ */
13
+ linkText: string;
14
+ /**
15
+ * This is the link to redirect to the fraud form
16
+ */
17
+ link: string;
18
+ }
@@ -30,7 +30,7 @@ export interface IMegaMenuCard {
30
30
  /**
31
31
  * Onclick callback
32
32
  * */
33
- onClick: () => void;
33
+ onClick?: () => void;
34
34
  /**
35
35
  * Show arrow icon
36
36
  * */
@@ -5,4 +5,5 @@ export interface IMegaMenuSideCards {
5
5
  onSelectCard?: (index: number) => void;
6
6
  action?: IMegaMenuLink;
7
7
  maxCards?: number;
8
+ initValue?: number;
8
9
  }
@@ -8,6 +8,7 @@ import { ReactNode } from 'react';
8
8
  import { ISimilarJobs } from '../SimilarJobs/SimilarJobs.interface';
9
9
  import { IJobVideo } from '@components/UI/molecules/JobVideo';
10
10
  import { ICityDetail } from '../../molecules/CitiesDetailDrawer';
11
+ import { IFraudCardJob } from '../../molecules/FraudCardJob/FraudCardJob.interface';
11
12
  export interface IJobDetailsDrawer {
12
13
  /**
13
14
  * Props for the job company logo and header section.
@@ -74,7 +75,7 @@ export interface IJobDetailsDrawer {
74
75
  isRemote: boolean;
75
76
  textRemote: string;
76
77
  /**
77
- * set link to fraud card
78
+ * Props for the fraud card job.
78
79
  */
79
- fraudLink: string;
80
+ fraudCardJobProps: IFraudCardJob;
80
81
  }
@@ -1,9 +1,10 @@
1
+ import { ReactNode } from 'react';
1
2
  import { IJobApplyCard, IJobCompanyHeader, IJobDetailCard, IJobFooterCard, IJobSkillsCard, ICityDetail } from '@components/UI/molecules';
2
3
  import { IMobileJobDetailsActionsBar } from '../MobileJobDetailsActionsBar';
3
- import { ReactNode } from 'react';
4
- import { ISimilarJobs } from '../SimilarJobs/SimilarJobs.interface';
5
4
  import { IJobVideo } from '@components/UI/molecules/JobVideo';
5
+ import { ISimilarJobs } from '../SimilarJobs/SimilarJobs.interface';
6
6
  import { SwipeProps } from '../Swipe/Swipe.interface';
7
+ import { IFraudCardJob } from './../../molecules/FraudCardJob/FraudCardJob.interface';
7
8
  export interface IMobileJobDetailsDrawer {
8
9
  /**
9
10
  * Props for the job company logo and header section.
@@ -84,7 +85,7 @@ export interface IMobileJobDetailsDrawer {
84
85
  isRemote: boolean;
85
86
  textRemote: string;
86
87
  /**
87
- * set link to fraud card
88
+ * Props for the fraud card job.
88
89
  */
89
- fraudLink: string;
90
+ fraudCardJobProps: IFraudCardJob;
90
91
  }
@@ -33,7 +33,7 @@ export { default as Calendar1 } from '../assets/Calendar1.svg';
33
33
  export { default as Checked } from '../assets/Checked.svg';
34
34
  export { default as ClipboardClose } from '../assets/ClipboardClose.svg';
35
35
  export { default as Clock } from '../assets/Clock.svg';
36
- export { default as ClockLine } from '../assets/clock.svg';
36
+ export { default as ClockLine } from '../assets/clock-line.svg';
37
37
  export { default as Close } from '../assets/Close.svg';
38
38
  export { default as CloseCircle } from '../assets/closeCircle.svg';
39
39
  export { default as CloseCircleRedBold } from '../assets/closeCircleRedBold.svg';
@@ -0,0 +1,2 @@
1
+ import { IFraudCardJob } from '../../components/UI/molecules/FraudCardJob/FraudCardJob.interface';
2
+ export declare const fraudCardJob: IFraudCardJob;
package/dist/esm/index.js CHANGED
@@ -1365,8 +1365,8 @@ var MegaMenuCard = function (_a) {
1365
1365
  };
1366
1366
 
1367
1367
  var MegaMenuSideCards = function (_a) {
1368
- var jobs = _a.jobs, action = _a.action, onSelectCard = _a.onSelectCard, _b = _a.maxCards, maxCards = _b === void 0 ? 10 : _b;
1369
- var _c = useState(0), selected = _c[0], setSelected = _c[1];
1368
+ var jobs = _a.jobs, action = _a.action, onSelectCard = _a.onSelectCard, initValue = _a.initValue, _b = _a.maxCards, maxCards = _b === void 0 ? 10 : _b;
1369
+ var _c = useState(initValue || 0), selected = _c[0], setSelected = _c[1];
1370
1370
  var handleClick = useCallback(function (index) { return function () {
1371
1371
  setSelected(index);
1372
1372
  onSelectCard && onSelectCard(index);
@@ -1374,7 +1374,7 @@ var MegaMenuSideCards = function (_a) {
1374
1374
  return (React.createElement("ul", { className: "".concat(style$S["mega-menu-side-cards"]) },
1375
1375
  jobs &&
1376
1376
  jobs.slice(0, maxCards).map(function (job, key) { return (React.createElement("li", { key: key },
1377
- React.createElement(MegaMenuCard, __assign({}, job, { showRigthArrow: selected == key, className: "".concat(style$S["mega-menu-side-cards__card"], " ").concat(selected == key ? style$S["mega-menu-side-cards__card--selected"] : ''), onClick: handleClick(key) })))); }),
1377
+ React.createElement(MegaMenuCard, __assign({}, job, { showRigthArrow: selected == key, className: "".concat(style$S["mega-menu-side-cards__card"], " ").concat(selected == key ? style$S["mega-menu-side-cards__card--selected"] : ''), onClick: onSelectCard ? handleClick(key) : undefined })))); }),
1378
1378
  action && (React.createElement("li", null,
1379
1379
  React.createElement(SearchItem, { url: action.url, tag: action.label, className: "".concat(style$S["mega-menu-side-cards__action"]), icon: ArrowRightWhite })))));
1380
1380
  };
@@ -1578,16 +1578,16 @@ var FilterSearchItem = function (_a) {
1578
1578
  var styles$1Q = {"fraud-card-job":"mg_fraud_card_job_fraud-card-job_136f2","fraud-card-job__header":"mg_fraud_card_job_fraud-card-job_header_136f2","fraud-card-job__text":"mg_fraud_card_job_fraud-card-job_text_136f2","fraud-card-job__link":"mg_fraud_card_job_fraud-card-job_link_136f2"};
1579
1579
 
1580
1580
  var Component$23 = function (_a) {
1581
- var fraudLink = _a.fraudLink;
1581
+ var title = _a.title, content = _a.content, linkText = _a.linkText, link = _a.link;
1582
1582
  return (React.createElement("div", { className: styles$1Q['fraud-card-job'] },
1583
1583
  React.createElement("div", { className: styles$1Q['fraud-card-job__header'] },
1584
1584
  React.createElement("img", { src: Warning3D, alt: "warning" }),
1585
- React.createElement("h4", null, "\u00A1Ten cuidado con el fraude!")),
1585
+ React.createElement("h4", null, title)),
1586
1586
  React.createElement("div", null,
1587
- React.createElement("p", { className: styles$1Q['fraud-card-job__text'] }, "Magneto y sus empresas aliadas nunca te pedir\u00E1n dinero a cambio en un proceso de selecci\u00F3n. Ten cuidado, revisa bien la vacante y si ves algo sospechoso rep\u00F3rtalo."),
1588
- React.createElement("a", { target: "_blank", rel: "noreferrer", className: styles$1Q['fraud-card-job__link'], href: fraudLink },
1587
+ React.createElement("p", { className: styles$1Q['fraud-card-job__text'] }, content),
1588
+ React.createElement("a", { target: "_blank", rel: "noreferrer", className: styles$1Q['fraud-card-job__link'], href: link },
1589
1589
  React.createElement("img", { src: WarningHex, alt: "warning" }),
1590
- "Reportar fraude"))));
1590
+ linkText))));
1591
1591
  };
1592
1592
  var FraudCardJob = Component$23;
1593
1593
 
@@ -5231,7 +5231,7 @@ var SimilarJobs = function (_a) {
5231
5231
  };
5232
5232
 
5233
5233
  var Component$P = function (_a) {
5234
- var jobCompanyLogoProps = _a.jobCompanyLogoProps, jobActionsProps = _a.jobActionsProps, jobDetailsProps = _a.jobDetailsProps, jobDetailCardProps = _a.jobDetailCardProps, jobSkillsCardProps = _a.jobSkillsCardProps, jobApplyCardProps = _a.jobApplyCardProps, jobFooterCardProps = _a.jobFooterCardProps, jobDetailAction = _a.jobDetailAction, modalPendingInfoComponent = _a.modalPendingInfoComponent, isLoading = _a.isLoading, selectedJobId = _a.selectedJobId, similarJobsProps = _a.similarJobsProps, jobVideo = _a.jobVideo, loadVideo = _a.loadVideo, setLoadVideo = _a.setLoadVideo, cities = _a.cities, isRemote = _a.isRemote, textRemote = _a.textRemote, fraudLink = _a.fraudLink;
5234
+ var jobCompanyLogoProps = _a.jobCompanyLogoProps, jobActionsProps = _a.jobActionsProps, jobDetailsProps = _a.jobDetailsProps, jobDetailCardProps = _a.jobDetailCardProps, jobSkillsCardProps = _a.jobSkillsCardProps, jobApplyCardProps = _a.jobApplyCardProps, jobFooterCardProps = _a.jobFooterCardProps, jobDetailAction = _a.jobDetailAction, modalPendingInfoComponent = _a.modalPendingInfoComponent, isLoading = _a.isLoading, selectedJobId = _a.selectedJobId, similarJobsProps = _a.similarJobsProps, jobVideo = _a.jobVideo, loadVideo = _a.loadVideo, setLoadVideo = _a.setLoadVideo, cities = _a.cities, isRemote = _a.isRemote, textRemote = _a.textRemote, fraudCardJobProps = _a.fraudCardJobProps;
5235
5235
  var jobDetailsRef = useRef(null);
5236
5236
  useEffect(function () {
5237
5237
  if (jobDetailsRef.current) {
@@ -5250,7 +5250,7 @@ var Component$P = function (_a) {
5250
5250
  jobVideo && React.createElement(JobVideo, __assign({}, jobVideo, { loadVideo: loadVideo, setLoadVideo: setLoadVideo })),
5251
5251
  React.createElement(JobDetailCard, __assign({}, jobDetailCardProps)),
5252
5252
  React.createElement(JobSkillsCard, __assign({}, jobSkillsCardProps)),
5253
- React.createElement(FraudCardJob, { fraudLink: fraudLink }),
5253
+ React.createElement(FraudCardJob, __assign({}, fraudCardJobProps)),
5254
5254
  React.createElement(JobApplyCard, __assign({}, jobApplyCardProps)),
5255
5255
  React.createElement(JobFooterCard, __assign({ iconList: iconFooterList }, jobFooterCardProps)),
5256
5256
  similarJobsProps ? React.createElement(SimilarJobs, __assign({}, similarJobsProps)) : null))),
@@ -5788,7 +5788,7 @@ var Swipe = function (_a) {
5788
5788
  };
5789
5789
 
5790
5790
  var Component$G = function (_a) {
5791
- var jobCompanyLogoProps = _a.jobCompanyLogoProps, jobDetailsHeaderText = _a.jobDetailsHeaderText, jobDetailsProps = _a.jobDetailsProps, jobDetailCardProps = _a.jobDetailCardProps, jobSkillsCardProps = _a.jobSkillsCardProps, jobApplyCardProps = _a.jobApplyCardProps, jobFooterCardProps = _a.jobFooterCardProps, mobileJobDetailsBarProps = _a.mobileJobDetailsBarProps, jobDetailAction = _a.jobDetailAction, modalPendingInfoComponent = _a.modalPendingInfoComponent, _b = _a.isOpen, isOpen = _b === void 0 ? true : _b, isLoading = _a.isLoading, onClose = _a.onClose, similarJobsProps = _a.similarJobsProps, jobVideo = _a.jobVideo, loadVideo = _a.loadVideo, setLoadVideo = _a.setLoadVideo, swipeProps = _a.swipeProps, cities = _a.cities, isRemote = _a.isRemote, textRemote = _a.textRemote, fraudLink = _a.fraudLink;
5791
+ var jobCompanyLogoProps = _a.jobCompanyLogoProps, jobDetailsHeaderText = _a.jobDetailsHeaderText, jobDetailsProps = _a.jobDetailsProps, jobDetailCardProps = _a.jobDetailCardProps, jobSkillsCardProps = _a.jobSkillsCardProps, jobApplyCardProps = _a.jobApplyCardProps, jobFooterCardProps = _a.jobFooterCardProps, mobileJobDetailsBarProps = _a.mobileJobDetailsBarProps, jobDetailAction = _a.jobDetailAction, modalPendingInfoComponent = _a.modalPendingInfoComponent, _b = _a.isOpen, isOpen = _b === void 0 ? true : _b, isLoading = _a.isLoading, onClose = _a.onClose, similarJobsProps = _a.similarJobsProps, jobVideo = _a.jobVideo, loadVideo = _a.loadVideo, setLoadVideo = _a.setLoadVideo, swipeProps = _a.swipeProps, cities = _a.cities, isRemote = _a.isRemote, textRemote = _a.textRemote, fraudCardJobProps = _a.fraudCardJobProps;
5792
5792
  var handleClose = useCallback(function () {
5793
5793
  if (onClose) {
5794
5794
  onClose();
@@ -5802,7 +5802,7 @@ var Component$G = function (_a) {
5802
5802
  jobVideo && React.createElement(JobVideo, __assign({}, jobVideo, { loadVideo: loadVideo, setLoadVideo: setLoadVideo })),
5803
5803
  React.createElement(JobDetailCard, __assign({}, jobDetailCardProps)),
5804
5804
  jobSkillsCardProps && React.createElement(JobSkillsCard, __assign({}, jobSkillsCardProps)),
5805
- React.createElement(FraudCardJob, { fraudLink: fraudLink }),
5805
+ React.createElement(FraudCardJob, __assign({}, fraudCardJobProps)),
5806
5806
  React.createElement(JobApplyCard, __assign({}, jobApplyCardProps)),
5807
5807
  React.createElement(JobFooterCard, __assign({ iconList: iconFooterList }, jobFooterCardProps)),
5808
5808
  similarJobsProps ? React.createElement(SimilarJobs, __assign({}, similarJobsProps)) : null));
@@ -5821,7 +5821,7 @@ var Component$G = function (_a) {
5821
5821
  setLoadVideo,
5822
5822
  jobDetailCardProps,
5823
5823
  jobSkillsCardProps,
5824
- fraudLink,
5824
+ fraudCardJobProps,
5825
5825
  jobApplyCardProps,
5826
5826
  jobFooterCardProps,
5827
5827
  similarJobsProps