@djb25/digit-ui-module-ws 1.0.5 → 1.0.7
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +14 -25
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useMemo, Fragment as Fragment$2, useReducer, useCallback } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Link, useLocation, Switch, Route, useHistory, useRouteMatch, Redirect, useParams } from 'react-router-dom';
|
|
4
|
-
import { Loader as Loader$1, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, BreadcrumbHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CardLabelError, DeleteIcon, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown,
|
|
4
|
+
import { Loader as Loader$1, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, BreadcrumbHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CardLabelError, DeleteIcon, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, Localities, Modal, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, EditIcon, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, ViewsIcon, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
|
|
5
5
|
import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
|
|
6
6
|
import { read, utils as utils$1 } from 'xlsx';
|
|
7
7
|
import { useQueryClient } from 'react-query';
|
|
@@ -371,7 +371,8 @@ const getPattern = type => {
|
|
|
371
371
|
case "WSOnlyNumbers":
|
|
372
372
|
return /^[0-9]*$/i;
|
|
373
373
|
case "Name":
|
|
374
|
-
|
|
374
|
+
case "Name":
|
|
375
|
+
return /^[^{0-9}^\$\"<>?\\~!@#$%^()+={}\[\]*,/_:;]{1,50}$/i;
|
|
375
376
|
case "MobileNo":
|
|
376
377
|
return /^[6789][0-9]{9}$/i;
|
|
377
378
|
case "MobileNoWithPrivacy":
|
|
@@ -19379,14 +19380,14 @@ const SearchFormFieldsComponents = ({
|
|
|
19379
19380
|
componentInFront: "+91"
|
|
19380
19381
|
};
|
|
19381
19382
|
let validation = {};
|
|
19382
|
-
return /*#__PURE__*/React.createElement(Fragment
|
|
19383
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchField, {
|
|
19383
19384
|
className: "wns-search-field"
|
|
19384
19385
|
}, /*#__PURE__*/React.createElement("label", null, t("WS_ACK_COMMON_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
19385
19386
|
name: "applicationNumber",
|
|
19386
19387
|
inputRef: registerRef({})
|
|
19387
19388
|
}, validation = {
|
|
19388
19389
|
isRequired: false,
|
|
19389
|
-
pattern: "^[a-zA-Z0-9-_
|
|
19390
|
+
pattern: "^[a-zA-Z0-9-_/]*$",
|
|
19390
19391
|
type: "text",
|
|
19391
19392
|
title: t("ERR_INVALID_APPLICATION_NO")
|
|
19392
19393
|
}))), /*#__PURE__*/React.createElement(SearchField, {
|
|
@@ -19396,7 +19397,7 @@ const SearchFormFieldsComponents = ({
|
|
|
19396
19397
|
inputRef: registerRef({})
|
|
19397
19398
|
}, validation = {
|
|
19398
19399
|
isRequired: false,
|
|
19399
|
-
pattern: "^[a-zA-Z0-9
|
|
19400
|
+
pattern: "^[a-zA-Z0-9/-]*$",
|
|
19400
19401
|
type: "text",
|
|
19401
19402
|
title: t("ERR_INVALID_CONSUMER_NO")
|
|
19402
19403
|
}))), /*#__PURE__*/React.createElement(SearchField, {
|
|
@@ -19978,24 +19979,10 @@ const WSInbox = ({
|
|
|
19978
19979
|
...formState
|
|
19979
19980
|
}
|
|
19980
19981
|
});
|
|
19981
|
-
let links = [{
|
|
19982
|
-
text: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
|
|
19983
|
-
link: `/digit-ui/employee/ws/create-application`,
|
|
19984
|
-
roles: ["WS_CEMP", "SW_CEMP"]
|
|
19985
|
-
}];
|
|
19986
|
-
links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
|
|
19987
19982
|
const PropsForInboxLinks = {
|
|
19988
19983
|
logoIcon: /*#__PURE__*/React.createElement(DropIcon, null),
|
|
19989
19984
|
headerText: checkPathName ? "MODULE_WATER" : "MODULE_SW",
|
|
19990
|
-
links: [
|
|
19991
|
-
text: t("WS_SEWERAGE_CONNECTION_SEARCH_LABEL"),
|
|
19992
|
-
link: checkPathName ? `/digit-ui/employee/ws/water/search-connection?from=WS_SEWERAGE_INBOX` : `/digit-ui/employee/ws/sewerage/search-connection?from=WS_SEWERAGE_INBOX`,
|
|
19993
|
-
roles: checkPathName ? ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"] : ["SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
19994
|
-
}, {
|
|
19995
|
-
text: t("WS_SEWERAGE_APPLICATION_SEARCH"),
|
|
19996
|
-
link: checkPathName ? `/digit-ui/employee/ws/water/search-application?from=WS_SEWERAGE_INBOX` : `/digit-ui/employee/ws/sewerage/search-application?from=WS_SEWERAGE_INBOX`,
|
|
19997
|
-
roles: checkPathName ? ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"] : ["SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
19998
|
-
}]
|
|
19985
|
+
links: []
|
|
19999
19986
|
};
|
|
20000
19987
|
const SearchFormFields = useCallback(({
|
|
20001
19988
|
registerRef,
|
|
@@ -34260,13 +34247,15 @@ const ActionModal$b = ({
|
|
|
34260
34247
|
}
|
|
34261
34248
|
});
|
|
34262
34249
|
let vendorDescription = [];
|
|
34263
|
-
dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$vendor = dsoData.vendor) === null || _dsoData$vendor === void 0 ? void 0 : _dsoData$vendor.
|
|
34264
|
-
var _item$additionalDetai;
|
|
34265
|
-
if ((item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.description) === "WT") {
|
|
34250
|
+
dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$vendor = dsoData.vendor) === null || _dsoData$vendor === void 0 ? void 0 : _dsoData$vendor.forEach(item => {
|
|
34251
|
+
var _item$additionalDetai, _item$additionalDetai2;
|
|
34252
|
+
if ((item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.description) === "WT" || (item === null || item === void 0 ? void 0 : (_item$additionalDetai2 = item.additionalDetails) === null || _item$additionalDetai2 === void 0 ? void 0 : _item$additionalDetai2.serviceType) === "WT") {
|
|
34253
|
+
var _item$owner;
|
|
34254
|
+
const displayLabel = `${item === null || item === void 0 ? void 0 : item.name} (${item === null || item === void 0 ? void 0 : (_item$owner = item.owner) === null || _item$owner === void 0 ? void 0 : _item$owner.mobileNumber})`;
|
|
34266
34255
|
vendorDescription.push({
|
|
34267
34256
|
code: item === null || item === void 0 ? void 0 : item.name,
|
|
34268
|
-
name:
|
|
34269
|
-
i18nKey:
|
|
34257
|
+
name: displayLabel,
|
|
34258
|
+
i18nKey: displayLabel,
|
|
34270
34259
|
vendorId: item === null || item === void 0 ? void 0 : item.id
|
|
34271
34260
|
});
|
|
34272
34261
|
}
|