@mseva/digit-ui-module-ptr 1.1.93 → 1.1.94

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.
@@ -1,4 +1,4 @@
1
- import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, SearchForm, SearchField, BreadCrumb, PTRIcon, EmployeeModuleCard, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
1
+ import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp, SearchForm, SearchField, BreadCrumb, PTRIcon, EmployeeModuleCard, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
2
2
  import React, { useState, useEffect, useMemo, useRef, Fragment as Fragment$1, useCallback } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
@@ -23035,64 +23035,6 @@ const ApplicationCard = ({
23035
23035
  }))));
23036
23036
  };
23037
23037
 
23038
- const ApplicationLinks = ({
23039
- linkPrefix,
23040
- classNameForMobileView: _classNameForMobileView = ""
23041
- }) => {
23042
- const {
23043
- t
23044
- } = useTranslation();
23045
- const allLinks = [{
23046
- text: t("ES_TITLE_NEW_REGISTRATION"),
23047
- link: "/digit-ui/employee/ptr/new-application"
23048
- }, {
23049
- text: t("ES_TITILE_SEARCH_APPLICATION"),
23050
- link: `${linkPrefix}/search`
23051
- }];
23052
- const [links, setLinks] = useState([]);
23053
- const {
23054
- roles
23055
- } = Digit.UserService.getUser().info;
23056
- const hasAccess = accessTo => {
23057
- return roles.filter(role => accessTo.includes(role.code)).length;
23058
- };
23059
- useEffect(() => {
23060
- let linksToShow = [];
23061
- allLinks.forEach(link => {
23062
- if (link.accessTo) {
23063
- if (hasAccess(link.accessTo)) {
23064
- linksToShow.push(link);
23065
- }
23066
- } else {
23067
- linksToShow.push(link);
23068
- }
23069
- });
23070
- setLinks(linksToShow);
23071
- }, []);
23072
- const GetLogo = () => /*#__PURE__*/React.createElement("div", {
23073
- className: "header"
23074
- }, /*#__PURE__*/React.createElement("span", {
23075
- className: "logo"
23076
- }, /*#__PURE__*/React.createElement(ShippingTruck, null)), " ", /*#__PURE__*/React.createElement("span", {
23077
- className: "text"
23078
- }, t("ES_TITLE_PET_REGISTRATION")));
23079
- return /*#__PURE__*/React.createElement(Card, {
23080
- className: "employeeCard filter"
23081
- }, /*#__PURE__*/React.createElement("div", {
23082
- className: `complaint-links-container ${_classNameForMobileView}`
23083
- }, GetLogo(), /*#__PURE__*/React.createElement("div", {
23084
- className: "body"
23085
- }, links.map(({
23086
- link,
23087
- text
23088
- }, index) => /*#__PURE__*/React.createElement("span", {
23089
- className: "link",
23090
- key: index
23091
- }, /*#__PURE__*/React.createElement(Link, {
23092
- to: link
23093
- }, text))))));
23094
- };
23095
-
23096
23038
  const MobileInbox = ({
23097
23039
  data,
23098
23040
  isLoading,
@@ -23129,11 +23071,7 @@ const MobileInbox = ({
23129
23071
  className: "inbox-container"
23130
23072
  }, /*#__PURE__*/React.createElement("div", {
23131
23073
  className: "filters-container"
23132
- }, !isSearch && /*#__PURE__*/React.createElement(ApplicationLinks, {
23133
- classNameForMobileView: "linksWrapperForMobileInbox",
23134
- linkPrefix: parentRoute,
23135
- isMobile: true
23136
- }), /*#__PURE__*/React.createElement(ApplicationCard, {
23074
+ }, /*#__PURE__*/React.createElement(ApplicationCard, {
23137
23075
  t: t,
23138
23076
  data: getData(),
23139
23077
  onFilterChange: onFilterChange,
@@ -25179,7 +25117,7 @@ const StepWrapper = ({
25179
25117
  const stepStyle = (isActive, isLast) => ({
25180
25118
  display: "flex",
25181
25119
  alignItems: "center",
25182
- justifyContent: "flex-end",
25120
+ justifyContent: "flex-start",
25183
25121
  flex: "0 0 auto",
25184
25122
  color: isActive ? "#0D43A7" : "#9CA3AF",
25185
25123
  padding: "14px 12px",
@@ -25232,14 +25170,36 @@ const StepWrapper = ({
25232
25170
  };
25233
25171
  const isMobile = window.Digit.Utils.browser.isMobile();
25234
25172
  const totalSteps = _stepsList.length;
25173
+ const mobileNavBarStyle = isMobile ? {
25174
+ flexDirection: "row",
25175
+ overflowX: "auto",
25176
+ whiteSpace: "nowrap",
25177
+ minWidth: "100%",
25178
+ maxWidth: "100%",
25179
+ gap: "8px",
25180
+ padding: "10px"
25181
+ } : {};
25182
+ const mobileCircleStyle = isMobile ? {
25183
+ width: "32px",
25184
+ height: "32px",
25185
+ fontSize: "12px"
25186
+ } : {};
25187
+ const mobileLabelStyle = isMobile ? {
25188
+ fontSize: "10px"
25189
+ } : {};
25190
+ const mobileStepStyle = isMobile ? {
25191
+ width: "auto",
25192
+ padding: "6px",
25193
+ marginBottom: "0",
25194
+ flexDirection: "column",
25195
+ alignItems: "center"
25196
+ } : {};
25235
25197
  return /*#__PURE__*/React.createElement("div", {
25236
25198
  className: "stepper",
25237
25199
  style: {
25238
25200
  width: "100%",
25239
25201
  display: "flex",
25240
- flexDirection: "row",
25241
- alignItems: "flex-start",
25242
- justifyContent: "flex-start",
25202
+ flexDirection: isMobile ? "column" : "row",
25243
25203
  gap: "24px"
25244
25204
  }
25245
25205
  }, /*#__PURE__*/React.createElement("div", {
@@ -25251,32 +25211,45 @@ const StepWrapper = ({
25251
25211
  padding: "18px",
25252
25212
  minWidth: "120px",
25253
25213
  maxWidth: "320px",
25254
- marginBottom: "20px"
25214
+ marginBottom: "20px",
25215
+ marginTop: isMobile ? "20px" : "0",
25216
+ height: isMobile ? "106px" : "",
25217
+ ...mobileNavBarStyle
25255
25218
  }
25256
25219
  }, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
25257
25220
  className: "step-content",
25258
25221
  key: index,
25259
- style: stepStyle(index + 1 <= _currentStep, index === totalSteps - 1)
25222
+ style: {
25223
+ ...stepStyle(index + 1 <= _currentStep, index === totalSteps - 1),
25224
+ ...mobileStepStyle
25225
+ }
25260
25226
  }, /*#__PURE__*/React.createElement("div", {
25227
+ className: "step-circle",
25228
+ style: {
25229
+ ...circleStyle(index + 1),
25230
+ ...mobileCircleStyle
25231
+ }
25232
+ }, index + 1, index < totalSteps - 1 && !isMobile && /*#__PURE__*/React.createElement("div", {
25233
+ style: lineStyle
25234
+ })), /*#__PURE__*/React.createElement("div", {
25261
25235
  className: "step-sub-content",
25262
25236
  style: {
25263
25237
  display: "flex",
25264
25238
  flexDirection: "column",
25265
- alignItems: "flex-end",
25266
- margin: "10px"
25239
+ alignItems: isMobile ? "center" : "flex-end",
25240
+ margin: isMobile ? "4px" : "10px"
25267
25241
  }
25268
25242
  }, index + 1 === totalSteps ? null : /*#__PURE__*/React.createElement("div", {
25269
25243
  className: "step-number",
25270
25244
  style: stepNumberStyle
25271
25245
  }), /*#__PURE__*/React.createElement("div", {
25272
25246
  className: "step-label",
25273
- style: labelStyle
25274
- }, t(_stepsList[index].stepLabel))), /*#__PURE__*/React.createElement("div", {
25275
- className: "step-circle",
25276
- style: circleStyle(index + 1)
25277
- }, index + 1, index < totalSteps - 1 && /*#__PURE__*/React.createElement("div", {
25278
- style: lineStyle
25279
- }))))), /*#__PURE__*/React.createElement("div", {
25247
+ style: {
25248
+ ...labelStyle,
25249
+ ...mobileLabelStyle,
25250
+ textAlign: isMobile ? "center" : "right"
25251
+ }
25252
+ }, t(_stepsList[index].stepLabel)))))), /*#__PURE__*/React.createElement("div", {
25280
25253
  className: "stepper-body",
25281
25254
  style: {
25282
25255
  width: "100%",
@@ -26260,7 +26233,7 @@ const RenewPTRStepForm = () => {
26260
26233
  }
26261
26234
  }, [defaultValues]);
26262
26235
  return /*#__PURE__*/React.createElement("div", {
26263
- className: "pageCard"
26236
+ className: "card"
26264
26237
  }, /*#__PURE__*/React.createElement(CardHeader, {
26265
26238
  styles: {
26266
26239
  fontSize: "28px",