@egovernments/digit-ui-module-core 1.3.4 → 1.4.0-beta2

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,9 +1,9 @@
1
- import React, { useContext, useRef, useEffect, useState, useMemo } from 'react';
1
+ import React, { useContext, useRef, useEffect, useState, Fragment as Fragment$1, useMemo } from 'react';
2
2
  import { QueryClient, QueryClientProvider } from 'react-query';
3
3
  import { Provider } from 'react-redux';
4
- import { useLocation, useRouteMatch, useHistory, Switch, Route, Link, Redirect, BrowserRouter } from 'react-router-dom';
4
+ import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, BrowserRouter } from 'react-router-dom';
5
5
  import { useTranslation, getI18n } from 'react-i18next';
6
- import { FormStep, OTPInput, CardText, CardLabelError, AppContainer, BackButton, Toast, Dropdown, Loader, FormComposer, CardSubHeader, CardLabel, CardLabelDesc, TextInput, CustomButton, TopBar as TopBar$1, Hamburger, HomeIcon, LanguageIcon, LogoutIcon, NavBar, Body } from '@egovernments/digit-ui-react-components';
6
+ import { FormStep, OTPInput, CardText, CardLabelError, AppContainer, BackButton, Toast, Loader, Dropdown, FormComposer, CardSubHeader, Card, CustomButton, SubmitBar, TopBar as TopBar$1, Hamburger, HomeIcon, LanguageIcon, LogoutIcon, NavBar, ComplaintIcon, PTIcon, CaseIcon, OBPSIcon, Calender, DocumentIcon, StandaloneSearchBar, CardBasedOptions, WhatsNewCard, PageBasedInput, CardHeader, RadioButtons, SearchOnRadioButtons, Body } from '@egovernments/digit-ui-react-components';
7
7
  import { compose, applyMiddleware, createStore, combineReducers } from 'redux';
8
8
  import thunk from 'redux-thunk';
9
9
 
@@ -23,7 +23,9 @@ var CitizenHome = function CitizenHome(_ref) {
23
23
  var showQuickPay = moduleArr.some(function (module) {
24
24
  return module.code === "QuickPayLinks";
25
25
  });
26
- return /*#__PURE__*/React.createElement(React.Fragment, null, moduleArray.map(function (_ref4, index) {
26
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
27
+ className: "citizenAllServiceGrid"
28
+ }, moduleArray.map(function (_ref4, index) {
27
29
  var code = _ref4.code;
28
30
 
29
31
  var Links = Digit.ComponentRegistryService.getComponent(code + "Links") || function () {
@@ -41,7 +43,7 @@ var CitizenHome = function CitizenHome(_ref) {
41
43
  matchPath: "/digit-ui/citizen/" + code.toLowerCase(),
42
44
  userType: "citizen"
43
45
  });
44
- }));
46
+ })));
45
47
  };
46
48
 
47
49
  var EmployeeHome = function EmployeeHome(_ref5) {
@@ -49,7 +51,7 @@ var EmployeeHome = function EmployeeHome(_ref5) {
49
51
  return /*#__PURE__*/React.createElement("div", {
50
52
  className: "employee-app-container"
51
53
  }, /*#__PURE__*/React.createElement("div", {
52
- className: "ground-container moduleCardWrapper"
54
+ className: "ground-container moduleCardWrapper gridModuleWrapper"
53
55
  }, modules.map(function (_ref6, index) {
54
56
  var code = _ref6.code;
55
57
 
@@ -163,8 +165,11 @@ var loginSteps = [{
163
165
  label: "CORE_COMMON_NAME",
164
166
  type: "text",
165
167
  name: "name",
168
+ error: "CORE_COMMON_NAME_VALIDMSG",
166
169
  validation: {
167
- required: true
170
+ required: true,
171
+ minLength: 1,
172
+ pattern: /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i
168
173
  }
169
174
  }]
170
175
  }];
@@ -212,7 +217,9 @@ var SelectOtp = function SelectOtp(_ref) {
212
217
  onResend = _ref.onResend,
213
218
  onSelect = _ref.onSelect,
214
219
  t = _ref.t,
215
- error = _ref.error;
220
+ error = _ref.error,
221
+ _ref$userType = _ref.userType,
222
+ userType = _ref$userType === void 0 ? "citizen" : _ref$userType;
216
223
 
217
224
  var _useState = useState(30),
218
225
  timeLeft = _useState[0],
@@ -227,6 +234,17 @@ var SelectOtp = function SelectOtp(_ref) {
227
234
  setTimeLeft(2);
228
235
  };
229
236
 
237
+ if (userType === "employee") {
238
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(OTPInput, {
239
+ length: 6,
240
+ onChange: onOtpChange,
241
+ value: otp
242
+ }), timeLeft > 0 ? /*#__PURE__*/React.createElement(CardText, null, t("CS_RESEND_ANOTHER_OTP") + " " + timeLeft + " " + t("CS_RESEND_SECONDS")) : /*#__PURE__*/React.createElement("p", {
243
+ className: "card-text-button",
244
+ onClick: handleResendOtp
245
+ }, t("CS_RESEND_OTP")), !error && /*#__PURE__*/React.createElement(CardLabelError, null, t("CS_INVALID_OTP")));
246
+ }
247
+
230
248
  return /*#__PURE__*/React.createElement(FormStep, {
231
249
  onSelect: onSelect,
232
250
  config: config,
@@ -253,6 +271,8 @@ var SelectName = function SelectName(_ref) {
253
271
  });
254
272
  };
255
273
 
274
+ var _excluded = ["ResponseInfo", "UserRequest"],
275
+ _excluded2 = ["ResponseInfo", "UserRequest"];
256
276
  var TYPE_REGISTER = {
257
277
  type: "register"
258
278
  };
@@ -261,12 +281,27 @@ var TYPE_LOGIN = {
261
281
  };
262
282
  var DEFAULT_REDIRECT_URL = "/digit-ui/citizen";
263
283
 
284
+ var setCitizenDetail = function setCitizenDetail(userObject, token, tenantId) {
285
+ var _JSON$parse, _JSON$parse$value;
286
+
287
+ var locale = (_JSON$parse = JSON.parse(sessionStorage.getItem("Digit.initData"))) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$value = _JSON$parse.value) === null || _JSON$parse$value === void 0 ? void 0 : _JSON$parse$value.selectedLanguage;
288
+ localStorage.setItem("Citizen.tenant-id", tenantId);
289
+ localStorage.setItem("tenant-id", tenantId);
290
+ localStorage.setItem("citizen.userRequestObject", JSON.stringify(userObject));
291
+ localStorage.setItem("locale", locale);
292
+ localStorage.setItem("Citizen.locale", locale);
293
+ localStorage.setItem("token", token);
294
+ localStorage.setItem("Citizen.token", token);
295
+ localStorage.setItem("user-info", JSON.stringify(userObject));
296
+ localStorage.setItem("Citizen.user-info", JSON.stringify(userObject));
297
+ };
298
+
264
299
  var getFromLocation = function getFromLocation(state, searchParams) {
265
300
  return (state === null || state === void 0 ? void 0 : state.from) || (searchParams === null || searchParams === void 0 ? void 0 : searchParams.from) || DEFAULT_REDIRECT_URL;
266
301
  };
267
302
 
268
303
  var Login = function Login(_ref) {
269
- var _location$state5;
304
+ var _location$state, _location$state6;
270
305
 
271
306
  var stateCode = _ref.stateCode,
272
307
  _ref$isUserRegistered = _ref.isUserRegistered,
@@ -296,7 +331,7 @@ var Login = function Login(_ref) {
296
331
 
297
332
  var _useState4 = useState(null);
298
333
 
299
- var _useState5 = useState({}),
334
+ var _useState5 = useState(isUserRegistered ? {} : location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.data),
300
335
  params = _useState5[0],
301
336
  setParmas = _useState5[1];
302
337
 
@@ -315,6 +350,7 @@ var Login = function Login(_ref) {
315
350
  }
316
351
 
317
352
  errorTimeout = setTimeout(function () {
353
+ console.error("clearing err");
318
354
  setError("");
319
355
  }, 5000);
320
356
  setErrorTO(errorTimeout);
@@ -325,14 +361,15 @@ var Login = function Login(_ref) {
325
361
  };
326
362
  }, [error]);
327
363
  useEffect(function () {
328
- var _location$state;
364
+ var _location$state2;
329
365
 
330
366
  if (!user) {
331
367
  return;
332
368
  }
333
369
 
334
370
  Digit.UserService.setUser(user);
335
- var redirectPath = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.from) || DEFAULT_REDIRECT_URL;
371
+ setCitizenDetail(user === null || user === void 0 ? void 0 : user.info, user === null || user === void 0 ? void 0 : user.access_token, stateCode);
372
+ var redirectPath = ((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.from) || DEFAULT_REDIRECT_URL;
336
373
  history.replace(redirectPath);
337
374
  }, [user]);
338
375
  var stepItems = useMemo(function () {
@@ -380,26 +417,27 @@ var Login = function Login(_ref) {
380
417
  return Promise.resolve(sendOtp({
381
418
  otp: _extends({}, data, TYPE_LOGIN)
382
419
  })).then(function (_ref2) {
383
- var _location$state3;
420
+ var _location$state4;
384
421
 
385
422
  var res = _ref2[0],
386
423
  err = _ref2[1];
387
424
 
388
425
  if (!err) {
389
- var _location$state2;
426
+ var _location$state3;
390
427
 
391
428
  history.replace(path + "/otp", {
392
429
  from: getFromLocation(location.state, searchParams),
393
- role: (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.role
430
+ role: (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.role
394
431
  });
395
432
  return;
396
433
  } else {
397
- history.replace("/digit-ui/citizen/register/name", {
398
- from: getFromLocation(location.state, searchParams)
434
+ history.push("/digit-ui/citizen/register/name", {
435
+ from: getFromLocation(location.state, searchParams),
436
+ data: data
399
437
  });
400
438
  }
401
439
 
402
- if ((_location$state3 = location.state) !== null && _location$state3 !== void 0 && _location$state3.role) {
440
+ if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
403
441
  setError("User not registered.");
404
442
  }
405
443
  });
@@ -428,13 +466,21 @@ var Login = function Login(_ref) {
428
466
  var data = _extends({}, params, {
429
467
  tenantId: stateCode,
430
468
  userType: getUserType()
431
- });
469
+ }, name);
432
470
 
433
471
  setParmas(_extends({}, params, name));
434
- history.replace(path + "/otp", {
435
- from: getFromLocation(location.state, searchParams)
472
+ return Promise.resolve(sendOtp({
473
+ otp: _extends({}, data, TYPE_REGISTER)
474
+ })).then(function (_ref4) {
475
+ var res = _ref4[0],
476
+ err = _ref4[1];
477
+
478
+ if (res) {
479
+ history.replace(path + "/otp", {
480
+ from: getFromLocation(location.state, searchParams)
481
+ });
482
+ }
436
483
  });
437
- return Promise.resolve();
438
484
  } catch (e) {
439
485
  return Promise.reject(e);
440
486
  }
@@ -455,14 +501,14 @@ var Login = function Login(_ref) {
455
501
  tenantId: stateCode,
456
502
  userType: getUserType()
457
503
  };
458
- return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref4) {
459
- var _location$state4;
504
+ return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref5) {
505
+ var _location$state5, _window, _window$globalConfigs;
460
506
 
461
- var ResponseInfo = _ref4.ResponseInfo,
462
- info = _ref4.UserRequest,
463
- tokens = _objectWithoutPropertiesLoose(_ref4, ["ResponseInfo", "UserRequest"]);
507
+ var ResponseInfo = _ref5.ResponseInfo,
508
+ info = _ref5.UserRequest,
509
+ tokens = _objectWithoutPropertiesLoose(_ref5, _excluded);
464
510
 
465
- if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
511
+ if ((_location$state5 = location.state) !== null && _location$state5 !== void 0 && _location$state5.role) {
466
512
  var roleInfo = info.roles.find(function (userRole) {
467
513
  return userRole.code === location.state.role;
468
514
  });
@@ -476,6 +522,10 @@ var Login = function Login(_ref) {
476
522
  }
477
523
  }
478
524
 
525
+ if ((_window = window) !== null && _window !== void 0 && (_window$globalConfigs = _window.globalConfigs) !== null && _window$globalConfigs !== void 0 && _window$globalConfigs.getConfig("ENABLE_SINGLEINSTANCE")) {
526
+ info.tenantId = Digit.ULBService.getStateId();
527
+ }
528
+
479
529
  setUser(_extends({
480
530
  info: info
481
531
  }, tokens));
@@ -489,10 +539,16 @@ var Login = function Login(_ref) {
489
539
  otpReference: otp,
490
540
  tenantId: stateCode
491
541
  };
492
- return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref5) {
493
- var ResponseInfo = _ref5.ResponseInfo,
494
- info = _ref5.UserRequest,
495
- tokens = _objectWithoutPropertiesLoose(_ref5, ["ResponseInfo", "UserRequest"]);
542
+ return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref6) {
543
+ var _window2, _window2$globalConfig;
544
+
545
+ var ResponseInfo = _ref6.ResponseInfo,
546
+ info = _ref6.UserRequest,
547
+ tokens = _objectWithoutPropertiesLoose(_ref6, _excluded2);
548
+
549
+ if ((_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE")) {
550
+ info.tenantId = Digit.ULBService.getStateId();
551
+ }
496
552
 
497
553
  setUser(_extends({
498
554
  info: info
@@ -504,8 +560,9 @@ var Login = function Login(_ref) {
504
560
  if (_temp2 && _temp2.then) return _temp2.then(function () {});
505
561
  }
506
562
  }();
507
- }, function () {
563
+ }, function (err) {
508
564
  setIsOtpValid(false);
565
+ console.error(err);
509
566
  }));
510
567
  } catch (e) {
511
568
  return Promise.reject(e);
@@ -563,7 +620,7 @@ var Login = function Login(_ref) {
563
620
  config: stepItems[0],
564
621
  mobileNumber: params.mobileNumber || "",
565
622
  onMobileChange: handleMobileChange,
566
- showRegisterLink: isUserRegistered && !((_location$state5 = location.state) !== null && _location$state5 !== void 0 && _location$state5.role),
623
+ showRegisterLink: isUserRegistered && !((_location$state6 = location.state) !== null && _location$state6 !== void 0 && _location$state6.role),
567
624
  t: t
568
625
  })), /*#__PURE__*/React.createElement(Route, {
569
626
  path: path + "/otp"
@@ -596,17 +653,17 @@ var Login = function Login(_ref) {
596
653
 
597
654
  var loginConfig = [{
598
655
  texts: {
599
- header: "CS_LOGIN",
600
- submitButtonLabel: "CS_LOGIN",
601
- secondaryButtonLabel: "CS_FORGOT_PASSWORD"
656
+ header: "CORE_COMMON_LOGIN",
657
+ submitButtonLabel: "CORE_COMMON_CONTINUE",
658
+ secondaryButtonLabel: "CORE_COMMON_FORGOT_PASSWORD"
602
659
  },
603
660
  inputs: [{
604
- label: "CORE_COMMON_USER_ID",
661
+ label: "CORE_LOGIN_USERNAME",
605
662
  type: "text",
606
663
  name: "username",
607
664
  error: "ERR_HRMS_INVALID_USER_ID"
608
665
  }, {
609
- label: "CORE_COMMON_PASSWORD",
666
+ label: "CORE_LOGIN_PASSWORD",
610
667
  type: "password",
611
668
  name: "password",
612
669
  error: "ERR_HRMS_WRONG_PASSWORD"
@@ -1052,12 +1109,14 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
1052
1109
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1053
1110
  var ReactPropTypesSecret_1 = ReactPropTypesSecret;
1054
1111
 
1112
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
1113
+
1055
1114
  var printWarning = function printWarning() {};
1056
1115
 
1057
1116
  if (process.env.NODE_ENV !== 'production') {
1058
1117
  var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
1059
1118
  var loggedTypeFailures = {};
1060
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
1119
+ var has$1 = has;
1061
1120
 
1062
1121
  printWarning = function printWarning(text) {
1063
1122
  var message = 'Warning: ' + text;
@@ -1075,12 +1134,12 @@ if (process.env.NODE_ENV !== 'production') {
1075
1134
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1076
1135
  if (process.env.NODE_ENV !== 'production') {
1077
1136
  for (var typeSpecName in typeSpecs) {
1078
- if (has(typeSpecs, typeSpecName)) {
1137
+ if (has$1(typeSpecs, typeSpecName)) {
1079
1138
  var error;
1080
1139
 
1081
1140
  try {
1082
1141
  if (typeof typeSpecs[typeSpecName] !== 'function') {
1083
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');
1142
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
1084
1143
  err.name = 'Invariant Violation';
1085
1144
  throw err;
1086
1145
  }
@@ -1112,8 +1171,6 @@ checkPropTypes.resetWarningCache = function () {
1112
1171
 
1113
1172
  var checkPropTypes_1 = checkPropTypes;
1114
1173
 
1115
- var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
1116
-
1117
1174
  var printWarning$1 = function printWarning() {};
1118
1175
 
1119
1176
  if (process.env.NODE_ENV !== 'production') {
@@ -1149,6 +1206,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1149
1206
  var ANONYMOUS = '<<anonymous>>';
1150
1207
  var ReactPropTypes = {
1151
1208
  array: createPrimitiveTypeChecker('array'),
1209
+ bigint: createPrimitiveTypeChecker('bigint'),
1152
1210
  bool: createPrimitiveTypeChecker('boolean'),
1153
1211
  func: createPrimitiveTypeChecker('function'),
1154
1212
  number: createPrimitiveTypeChecker('number'),
@@ -1176,8 +1234,9 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1176
1234
  }
1177
1235
  }
1178
1236
 
1179
- function PropTypeError(message) {
1237
+ function PropTypeError(message, data) {
1180
1238
  this.message = message;
1239
+ this.data = data && typeof data === 'object' ? data : {};
1181
1240
  this.stack = '';
1182
1241
  }
1183
1242
 
@@ -1236,7 +1295,9 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1236
1295
 
1237
1296
  if (propType !== expectedType) {
1238
1297
  var preciseType = getPreciseType(propValue);
1239
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
1298
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
1299
+ expectedType: expectedType
1300
+ });
1240
1301
  }
1241
1302
 
1242
1303
  return null;
@@ -1371,7 +1432,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1371
1432
  }
1372
1433
 
1373
1434
  for (var key in propValue) {
1374
- if (has$1(propValue, key)) {
1435
+ if (has(propValue, key)) {
1375
1436
  var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1376
1437
 
1377
1438
  if (error instanceof Error) {
@@ -1402,15 +1463,23 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1402
1463
  }
1403
1464
 
1404
1465
  function validate(props, propName, componentName, location, propFullName) {
1466
+ var expectedTypes = [];
1467
+
1405
1468
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1406
1469
  var checker = arrayOfTypeCheckers[i];
1470
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
1407
1471
 
1408
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
1472
+ if (checkerResult == null) {
1409
1473
  return null;
1410
1474
  }
1475
+
1476
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1477
+ expectedTypes.push(checkerResult.data.expectedType);
1478
+ }
1411
1479
  }
1412
1480
 
1413
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
1481
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
1482
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1414
1483
  }
1415
1484
 
1416
1485
  return createChainableTypeChecker(validate);
@@ -1428,6 +1497,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1428
1497
  return createChainableTypeChecker(validate);
1429
1498
  }
1430
1499
 
1500
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
1501
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
1502
+ }
1503
+
1431
1504
  function createShapeTypeChecker(shapeTypes) {
1432
1505
  function validate(props, propName, componentName, location, propFullName) {
1433
1506
  var propValue = props[propName];
@@ -1440,8 +1513,8 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1440
1513
  for (var key in shapeTypes) {
1441
1514
  var checker = shapeTypes[key];
1442
1515
 
1443
- if (!checker) {
1444
- continue;
1516
+ if (typeof checker !== 'function') {
1517
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1445
1518
  }
1446
1519
 
1447
1520
  var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
@@ -1471,6 +1544,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1471
1544
  for (var key in allKeys) {
1472
1545
  var checker = shapeTypes[key];
1473
1546
 
1547
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
1548
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1549
+ }
1550
+
1474
1551
  if (!checker) {
1475
1552
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
1476
1553
  }
@@ -1652,6 +1729,7 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
1652
1729
  }
1653
1730
  var ReactPropTypes = {
1654
1731
  array: shim,
1732
+ bigint: shim,
1655
1733
  bool: shim,
1656
1734
  func: shim,
1657
1735
  number: shim,
@@ -1686,7 +1764,38 @@ var propTypes = createCommonjsModule(function (module) {
1686
1764
  }
1687
1765
  });
1688
1766
 
1767
+ var Background = function Background(_ref) {
1768
+ var children = _ref.children;
1769
+ return /*#__PURE__*/React.createElement("div", {
1770
+ className: "banner"
1771
+ }, children);
1772
+ };
1773
+
1774
+ var Header = function Header() {
1775
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
1776
+ storeData = _Digit$Hooks$useStore.data,
1777
+ isLoading = _Digit$Hooks$useStore.isLoading;
1778
+
1779
+ var _ref = storeData || {},
1780
+ stateInfo = _ref.stateInfo;
1781
+
1782
+ var _useTranslation = useTranslation(),
1783
+ t = _useTranslation.t;
1784
+
1785
+ if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
1786
+ return /*#__PURE__*/React.createElement("div", {
1787
+ className: "bannerHeader"
1788
+ }, /*#__PURE__*/React.createElement("img", {
1789
+ className: "bannerLogo",
1790
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrl
1791
+ }), /*#__PURE__*/React.createElement("p", null, t("TENANT_TENANTS_" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.code.toUpperCase()))));
1792
+ };
1793
+
1794
+ var _excluded$1 = ["UserRequest"];
1795
+
1689
1796
  var Login$1 = function Login(_ref) {
1797
+ var _window, _window$globalConfigs, _window$globalConfigs2;
1798
+
1690
1799
  var propsConfig = _ref.config,
1691
1800
  t = _ref.t;
1692
1801
 
@@ -1694,16 +1803,18 @@ var Login$1 = function Login(_ref) {
1694
1803
  cities = _Digit$Hooks$useTenan.data,
1695
1804
  isLoading = _Digit$Hooks$useTenan.isLoading;
1696
1805
 
1806
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
1807
+ isStoreLoading = _Digit$Hooks$useStore.isLoading;
1808
+
1697
1809
  var _useState = useState(null),
1698
1810
  user = _useState[0],
1699
1811
  setUser = _useState[1];
1700
1812
 
1701
- var history = useHistory();
1702
-
1703
- var getUserType = function getUserType() {
1704
- return Digit.UserService.getType();
1705
- };
1813
+ var _useState2 = useState(null),
1814
+ showToast = _useState2[0],
1815
+ setShowToast = _useState2[1];
1706
1816
 
1817
+ var history = useHistory();
1707
1818
  useEffect(function () {
1708
1819
  var _location$state;
1709
1820
 
@@ -1724,17 +1835,18 @@ var Login$1 = function Login(_ref) {
1724
1835
  }
1725
1836
 
1726
1837
  var requestData = _extends({}, data, {
1727
- userType: getUserType()
1838
+ userType: "EMPLOYEE"
1728
1839
  });
1729
1840
 
1730
1841
  requestData.tenantId = data.city.code;
1731
1842
  delete requestData.city;
1732
1843
 
1733
1844
  var _temp2 = _catch(function () {
1734
- return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref2) {
1735
- var info = _ref2.UserRequest,
1736
- tokens = _objectWithoutPropertiesLoose(_ref2, ["UserRequest"]);
1845
+ return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref3) {
1846
+ var info = _ref3.UserRequest,
1847
+ tokens = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
1737
1848
 
1849
+ Digit.SessionStorage.set("Employee.tenantId", info === null || info === void 0 ? void 0 : info.tenantId);
1738
1850
  setUser(_extends({
1739
1851
  info: info
1740
1852
  }, tokens));
@@ -1742,7 +1854,8 @@ var Login$1 = function Login(_ref) {
1742
1854
  }, function (err) {
1743
1855
  var _err$response, _err$response$data;
1744
1856
 
1745
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
1857
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
1858
+ setTimeout(closeToast, 5000);
1746
1859
  });
1747
1860
 
1748
1861
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -1751,8 +1864,12 @@ var Login$1 = function Login(_ref) {
1751
1864
  }
1752
1865
  };
1753
1866
 
1867
+ var closeToast = function closeToast() {
1868
+ setShowToast(null);
1869
+ };
1870
+
1754
1871
  var onForgotPassword = function onForgotPassword() {
1755
- history.push("/digit-ui/employee/forgot-password");
1872
+ history.push("/digit-ui/employee/user/forgot-password");
1756
1873
  };
1757
1874
 
1758
1875
  var _propsConfig$inputs = propsConfig.inputs,
@@ -1783,17 +1900,26 @@ var Login$1 = function Login(_ref) {
1783
1900
  component: function component(props, customProps) {
1784
1901
  return /*#__PURE__*/React.createElement(Dropdown, _extends({
1785
1902
  option: cities,
1903
+ className: "login-city-dd",
1786
1904
  optionKey: "i18nKey",
1787
1905
  select: function select(d) {
1788
1906
  props.onChange(d);
1789
- }
1907
+ },
1908
+ t: t
1790
1909
  }, customProps));
1791
1910
  }
1792
1911
  },
1793
1912
  isMandatory: true
1794
1913
  }]
1795
1914
  }];
1796
- return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(FormComposer, {
1915
+ return isLoading || isStoreLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
1916
+ className: "employeeBackbuttonAlign"
1917
+ }, /*#__PURE__*/React.createElement(BackButton, {
1918
+ variant: "white",
1919
+ style: {
1920
+ borderBottom: "none"
1921
+ }
1922
+ })), /*#__PURE__*/React.createElement(FormComposer, {
1797
1923
  onSubmit: onLogin,
1798
1924
  noBoxShadow: true,
1799
1925
  inline: true,
@@ -1807,10 +1933,31 @@ var Login$1 = function Login(_ref) {
1807
1933
  textAlign: "center"
1808
1934
  },
1809
1935
  cardStyle: {
1810
- maxWidth: "400px",
1811
- margin: "auto"
1936
+ margin: "auto",
1937
+ minWidth: "408px"
1938
+ },
1939
+ className: "loginFormStyleEmployee"
1940
+ }, /*#__PURE__*/React.createElement(Header, null)), showToast && /*#__PURE__*/React.createElement(Toast, {
1941
+ error: true,
1942
+ label: t(showToast),
1943
+ onClose: closeToast
1944
+ }), /*#__PURE__*/React.createElement("div", {
1945
+ className: "employee-home-footer",
1946
+ style: {
1947
+ backgroundColor: "unset"
1812
1948
  }
1813
- });
1949
+ }, /*#__PURE__*/React.createElement("img", {
1950
+ alt: "Powered by DIGIT",
1951
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
1952
+ style: {
1953
+ cursor: "pointer"
1954
+ },
1955
+ onClick: function onClick() {
1956
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
1957
+
1958
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
1959
+ }
1960
+ }), " "));
1814
1961
  };
1815
1962
 
1816
1963
  Login$1.propTypes = {
@@ -1840,18 +1987,18 @@ var EmployeeLogin = function EmployeeLogin() {
1840
1987
  });
1841
1988
  }, [loginConfig]);
1842
1989
  });
1843
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
1990
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
1844
1991
  path: "" + path,
1845
1992
  exact: true
1846
1993
  }, /*#__PURE__*/React.createElement(Login$1, {
1847
1994
  config: loginParams[0],
1848
1995
  t: t
1849
- }))));
1996
+ })));
1850
1997
  };
1851
1998
 
1852
1999
  var config = [{
1853
2000
  texts: {
1854
- header: "CORE_COMMON_FORGOT_PASSWORD_LABEL",
2001
+ header: "CORE_COMMON_RESET_PASSWORD_LABEL",
1855
2002
  submitButtonLabel: "CORE_COMMON_CHANGE_PASSWORD"
1856
2003
  },
1857
2004
  inputs: [{
@@ -1873,6 +2020,8 @@ var config = [{
1873
2020
  }];
1874
2021
 
1875
2022
  var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
2023
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2024
+
1876
2025
  var propsConfig = _ref.config,
1877
2026
  t = _ref.t;
1878
2027
 
@@ -1885,15 +2034,26 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1885
2034
 
1886
2035
  var history = useHistory();
1887
2036
 
2037
+ var _useState2 = useState(""),
2038
+ otp = _useState2[0],
2039
+ setOtp = _useState2[1];
2040
+
2041
+ var _useState3 = useState(true),
2042
+ isOtpValid = _useState3[0];
2043
+
2044
+ var _useState4 = useState(null),
2045
+ showToast = _useState4[0],
2046
+ setShowToast = _useState4[1];
2047
+
1888
2048
  var getUserType = function getUserType() {
1889
2049
  return Digit.UserService.getType();
1890
2050
  };
1891
2051
 
1892
- var otpReference = "";
1893
2052
  useEffect(function () {
1894
2053
  var _location$state;
1895
2054
 
1896
2055
  if (!user) {
2056
+ Digit.UserService.setType("employee");
1897
2057
  return;
1898
2058
  }
1899
2059
 
@@ -1902,8 +2062,16 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1902
2062
  history.replace(redirectPath);
1903
2063
  }, [user]);
1904
2064
 
2065
+ var closeToast = function closeToast() {
2066
+ setShowToast(null);
2067
+ };
2068
+
1905
2069
  var onResendOTP = function onResendOTP() {
1906
2070
  try {
2071
+ var _temp3 = function _temp3() {
2072
+ setTimeout(closeToast, 5000);
2073
+ };
2074
+
1907
2075
  var requestData = {
1908
2076
  otp: {
1909
2077
  mobileNumber: mobileNumber,
@@ -1913,17 +2081,17 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1913
2081
  }
1914
2082
  };
1915
2083
 
1916
- var _temp2 = _catch(function () {
2084
+ var _temp4 = _catch(function () {
1917
2085
  return Promise.resolve(Digit.UserService.sendOtp(requestData, tenantId)).then(function () {
1918
- alert("OTP resend successfull");
2086
+ setShowToast(t("ES_OTP_RESEND"));
1919
2087
  });
1920
2088
  }, function (err) {
1921
2089
  var _err$response, _err$response$data;
1922
2090
 
1923
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
2091
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || t("ES_INVALID_LOGIN_CREDENTIALS"));
1924
2092
  });
1925
2093
 
1926
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2094
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
1927
2095
  } catch (e) {
1928
2096
  return Promise.reject(e);
1929
2097
  }
@@ -1933,11 +2101,11 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1933
2101
  try {
1934
2102
  return Promise.resolve(_catch(function () {
1935
2103
  if (data.newPassword !== data.confirmPassword) {
1936
- return alert(t("ERR_PASSWORD_DO_NOT_MATCH"));
2104
+ return setShowToast(t("ERR_PASSWORD_DO_NOT_MATCH"));
1937
2105
  }
1938
2106
 
1939
2107
  var requestData = _extends({}, data, {
1940
- otpReference: otpReference,
2108
+ otpReference: otp,
1941
2109
  tenantId: tenantId,
1942
2110
  type: getUserType().toUpperCase()
1943
2111
  });
@@ -1946,21 +2114,18 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1946
2114
  navigateToLogin();
1947
2115
  });
1948
2116
  }, function (err) {
1949
- var _err$response2, _err$response2$data, _err$response2$data$E;
2117
+ var _err$response2, _err$response2$data, _err$response2$data$e, _err$response2$data$e2, _err$response2$data$e3;
1950
2118
 
1951
- alert((err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$E = _err$response2$data.Errors[0]) === null || _err$response2$data$E === void 0 ? void 0 : _err$response2$data$E.message) || "Something went wrong!");
2119
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$e = _err$response2$data.error) === null || _err$response2$data$e === void 0 ? void 0 : (_err$response2$data$e2 = _err$response2$data$e.fields) === null || _err$response2$data$e2 === void 0 ? void 0 : (_err$response2$data$e3 = _err$response2$data$e2[0]) === null || _err$response2$data$e3 === void 0 ? void 0 : _err$response2$data$e3.message) || t("ES_SOMETHING_WRONG"));
2120
+ setTimeout(closeToast, 5000);
1952
2121
  }));
1953
2122
  } catch (e) {
1954
2123
  return Promise.reject(e);
1955
2124
  }
1956
2125
  };
1957
2126
 
1958
- var updateOtp = function updateOtp(data) {
1959
- otpReference = data.target.value || "";
1960
- };
1961
-
1962
2127
  var navigateToLogin = function navigateToLogin() {
1963
- history.replace("/digit-ui/employee/login");
2128
+ history.replace("/digit-ui/employee/user/login");
1964
2129
  };
1965
2130
 
1966
2131
  var _propsConfig$inputs = propsConfig.inputs,
@@ -1991,7 +2156,14 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1991
2156
  isMandatory: true
1992
2157
  }]
1993
2158
  }];
1994
- return /*#__PURE__*/React.createElement(FormComposer, {
2159
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
2160
+ className: "employeeBackbuttonAlign"
2161
+ }, /*#__PURE__*/React.createElement(BackButton, {
2162
+ variant: "white",
2163
+ style: {
2164
+ borderBottom: "none"
2165
+ }
2166
+ })), /*#__PURE__*/React.createElement(FormComposer, {
1995
2167
  onSubmit: onChangePassword,
1996
2168
  noBoxShadow: true,
1997
2169
  inline: true,
@@ -1999,44 +2171,39 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1999
2171
  config: config,
2000
2172
  label: propsConfig.texts.submitButtonLabel,
2001
2173
  cardStyle: {
2002
- maxWidth: "400px",
2174
+ maxWidth: "408px",
2003
2175
  margin: "auto"
2004
- }
2005
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
2176
+ },
2177
+ className: "employeeChangePassword"
2178
+ }, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(CardSubHeader, {
2006
2179
  style: {
2007
2180
  textAlign: "center"
2008
2181
  }
2009
- }, " ", propsConfig.texts.header, " "), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
2010
- style: {
2011
- marginBottom: "8px"
2012
- }
2013
- }, t("CORE_OTP_SENT_MESSAGE")), /*#__PURE__*/React.createElement(CardLabelDesc, {
2014
- style: {
2015
- marginBottom: "0px"
2016
- }
2017
- }, " ", mobileNumber, " "), /*#__PURE__*/React.createElement(CardLabelDesc, {
2018
- style: {
2019
- marginBottom: "8px"
2020
- }
2021
- }, " ", t("CORE_EMPLOYEE_OTP_CHECK_MESSAGE"))), /*#__PURE__*/React.createElement(CardLabel, {
2022
- style: {
2023
- marginBottom: "8px"
2024
- }
2025
- }, t("CORE_OTP_OTP"), " *"), /*#__PURE__*/React.createElement(TextInput, {
2026
- className: "field",
2027
- name: otpReference,
2028
- isRequired: true,
2029
- onChange: updateOtp,
2030
- type: "text",
2182
+ }, " ", propsConfig.texts.header, " "), /*#__PURE__*/React.createElement(CardText, null, t("CS_LOGIN_OTP_TEXT") + " ", /*#__PURE__*/React.createElement("b", null, " ", "" + t("+ 91 - "), " ", mobileNumber)), /*#__PURE__*/React.createElement(SelectOtp, {
2183
+ t: t,
2184
+ userType: "employee",
2185
+ otp: otp,
2186
+ onOtpChange: setOtp,
2187
+ error: isOtpValid,
2188
+ onResend: onResendOTP
2189
+ })), showToast && /*#__PURE__*/React.createElement(Toast, {
2190
+ error: true,
2191
+ label: t(showToast),
2192
+ onClose: closeToast
2193
+ }), /*#__PURE__*/React.createElement("div", {
2194
+ className: "EmployeeLoginFooter"
2195
+ }, /*#__PURE__*/React.createElement("img", {
2196
+ alt: "Powered by DIGIT",
2197
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2031
2198
  style: {
2032
- marginBottom: "10px"
2199
+ cursor: "pointer"
2200
+ },
2201
+ onClick: function onClick() {
2202
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2203
+
2204
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2033
2205
  }
2034
- }), /*#__PURE__*/React.createElement("div", {
2035
- className: "flex-right"
2036
- }, /*#__PURE__*/React.createElement("div", {
2037
- className: "primary-label-btn",
2038
- onClick: onResendOTP
2039
- }, t("CORE_OTP_RESEND"))));
2206
+ }), " "));
2040
2207
  };
2041
2208
 
2042
2209
  ChangePasswordComponent.propTypes = {
@@ -2066,20 +2233,20 @@ var EmployeeChangePassword = function EmployeeChangePassword() {
2066
2233
  });
2067
2234
  }, [config]);
2068
2235
  });
2069
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
2236
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
2070
2237
  path: "" + path,
2071
2238
  exact: true
2072
2239
  }, /*#__PURE__*/React.createElement(ChangePasswordComponent, {
2073
2240
  config: params[0],
2074
2241
  t: t
2075
- }))));
2242
+ })));
2076
2243
  };
2077
2244
 
2078
2245
  var loginConfig$1 = [{
2079
2246
  texts: {
2080
- header: "CS_FORGOT_PASSWORD",
2081
- submitButtonLabel: "CS_CONTINUE",
2082
- secondaryButtonLabel: "CS_BACK_TO_LOGIN"
2247
+ header: "CORE_COMMON_FORGOT_PASSWORD_LABEL",
2248
+ description: "ES_FORGOT_PASSWORD_DESC",
2249
+ submitButtonLabel: "CORE_COMMON_CONTINUE"
2083
2250
  },
2084
2251
  inputs: [{
2085
2252
  label: "CORE_COMMON_MOBILE_NUMBER",
@@ -2095,15 +2262,24 @@ var loginConfig$1 = [{
2095
2262
  }];
2096
2263
 
2097
2264
  var ForgotPassword = function ForgotPassword(_ref) {
2265
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2266
+
2098
2267
  var propsConfig = _ref.config,
2099
2268
  t = _ref.t;
2100
- var cities = Digit.Hooks.fsm.useTenants();
2269
+
2270
+ var _Digit$Hooks$useTenan = Digit.Hooks.useTenants(),
2271
+ cities = _Digit$Hooks$useTenan.data,
2272
+ isLoading = _Digit$Hooks$useTenan.isLoading;
2101
2273
 
2102
2274
  var _useState = useState(null),
2103
2275
  user = _useState[0];
2104
2276
 
2105
2277
  var history = useHistory();
2106
2278
 
2279
+ var _useState2 = useState(null),
2280
+ showToast = _useState2[0],
2281
+ setShowToast = _useState2[1];
2282
+
2107
2283
  var getUserType = function getUserType() {
2108
2284
  return Digit.UserService.getType();
2109
2285
  };
@@ -2112,6 +2288,7 @@ var ForgotPassword = function ForgotPassword(_ref) {
2112
2288
  var _location$state;
2113
2289
 
2114
2290
  if (!user) {
2291
+ Digit.UserService.setType("employee");
2115
2292
  return;
2116
2293
  }
2117
2294
 
@@ -2120,6 +2297,10 @@ var ForgotPassword = function ForgotPassword(_ref) {
2120
2297
  history.replace(redirectPath);
2121
2298
  }, [user]);
2122
2299
 
2300
+ var closeToast = function closeToast() {
2301
+ setShowToast(null);
2302
+ };
2303
+
2123
2304
  var onForgotPassword = function onForgotPassword(data) {
2124
2305
  try {
2125
2306
  if (!data.city) {
@@ -2128,21 +2309,23 @@ var ForgotPassword = function ForgotPassword(_ref) {
2128
2309
  }
2129
2310
 
2130
2311
  var requestData = {
2131
- otp: _extends({}, data, {
2312
+ otp: {
2313
+ mobileNumber: data.mobileNumber,
2132
2314
  userType: getUserType().toUpperCase(),
2133
2315
  type: "passwordreset",
2134
2316
  tenantId: data.city.code
2135
- })
2317
+ }
2136
2318
  };
2137
2319
 
2138
2320
  var _temp2 = _catch(function () {
2139
2321
  return Promise.resolve(Digit.UserService.sendOtp(requestData, data.city.code)).then(function () {
2140
- history.push("/digit-ui/employee/change-password?mobile_number=" + data.mobileNumber + "&tenantId=" + data.city.code);
2322
+ history.push("/digit-ui/employee/user/change-password?mobile_number=" + data.mobileNumber + "&tenantId=" + data.city.code);
2141
2323
  });
2142
2324
  }, function (err) {
2143
- var _err$response, _err$response$data;
2325
+ var _err$response, _err$response$data, _err$response$data$er, _err$response$data$er2, _err$response$data$er3;
2144
2326
 
2145
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
2327
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$er = _err$response$data.error) === null || _err$response$data$er === void 0 ? void 0 : (_err$response$data$er2 = _err$response$data$er.fields) === null || _err$response$data$er2 === void 0 ? void 0 : (_err$response$data$er3 = _err$response$data$er2[0]) === null || _err$response$data$er3 === void 0 ? void 0 : _err$response$data$er3.message) || "Invalid login credentials!");
2328
+ setTimeout(closeToast, 5000);
2146
2329
  });
2147
2330
 
2148
2331
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -2163,7 +2346,8 @@ var ForgotPassword = function ForgotPassword(_ref) {
2163
2346
  label: t(userId.label),
2164
2347
  type: userId.type,
2165
2348
  populators: {
2166
- name: userId.name
2349
+ name: userId.name,
2350
+ componentInFront: "+91"
2167
2351
  },
2168
2352
  isMandatory: true
2169
2353
  }, {
@@ -2177,6 +2361,7 @@ var ForgotPassword = function ForgotPassword(_ref) {
2177
2361
  option: cities,
2178
2362
  optionKey: "name",
2179
2363
  id: city.name,
2364
+ className: "login-city-dd",
2180
2365
  select: function select(d) {
2181
2366
  props.onChange(d);
2182
2367
  }
@@ -2186,7 +2371,19 @@ var ForgotPassword = function ForgotPassword(_ref) {
2186
2371
  isMandatory: true
2187
2372
  }]
2188
2373
  }];
2189
- return /*#__PURE__*/React.createElement(FormComposer, {
2374
+
2375
+ if (isLoading) {
2376
+ return /*#__PURE__*/React.createElement(Loader, null);
2377
+ }
2378
+
2379
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
2380
+ className: "employeeBackbuttonAlign"
2381
+ }, /*#__PURE__*/React.createElement(BackButton, {
2382
+ variant: "white",
2383
+ style: {
2384
+ borderBottom: "none"
2385
+ }
2386
+ })), /*#__PURE__*/React.createElement(FormComposer, {
2190
2387
  onSubmit: onForgotPassword,
2191
2388
  noBoxShadow: true,
2192
2389
  inline: true,
@@ -2196,14 +2393,33 @@ var ForgotPassword = function ForgotPassword(_ref) {
2196
2393
  secondaryActionLabel: propsConfig.texts.secondaryButtonLabel,
2197
2394
  onSecondayActionClick: navigateToLogin,
2198
2395
  heading: propsConfig.texts.header,
2396
+ description: propsConfig.texts.description,
2199
2397
  headingStyle: {
2200
2398
  textAlign: "center"
2201
2399
  },
2202
2400
  cardStyle: {
2203
- maxWidth: "400px",
2401
+ maxWidth: "408px",
2204
2402
  margin: "auto"
2403
+ },
2404
+ className: "employeeForgotPassword"
2405
+ }, /*#__PURE__*/React.createElement(Header, null)), showToast && /*#__PURE__*/React.createElement(Toast, {
2406
+ error: true,
2407
+ label: t(showToast),
2408
+ onClose: closeToast
2409
+ }), /*#__PURE__*/React.createElement("div", {
2410
+ className: "EmployeeLoginFooter"
2411
+ }, /*#__PURE__*/React.createElement("img", {
2412
+ alt: "Powered by DIGIT",
2413
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2414
+ style: {
2415
+ cursor: "pointer"
2416
+ },
2417
+ onClick: function onClick() {
2418
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2419
+
2420
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2205
2421
  }
2206
- });
2422
+ }), " "));
2207
2423
  };
2208
2424
 
2209
2425
  ForgotPassword.propTypes = {
@@ -2233,18 +2449,99 @@ var EmployeeForgotPassword = function EmployeeForgotPassword() {
2233
2449
  });
2234
2450
  }, [loginConfig$1]);
2235
2451
  });
2236
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
2452
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
2237
2453
  path: "" + path,
2238
2454
  exact: true
2239
2455
  }, /*#__PURE__*/React.createElement(ForgotPassword, {
2240
2456
  config: params[0],
2241
2457
  t: t
2242
- }))));
2458
+ })));
2459
+ };
2460
+
2461
+ var LanguageSelection = function LanguageSelection() {
2462
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2463
+
2464
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
2465
+ storeData = _Digit$Hooks$useStore.data,
2466
+ isLoading = _Digit$Hooks$useStore.isLoading;
2467
+
2468
+ var _useTranslation = useTranslation(),
2469
+ t = _useTranslation.t;
2470
+
2471
+ var history = useHistory();
2472
+
2473
+ var _ref = storeData || {},
2474
+ languages = _ref.languages,
2475
+ stateInfo = _ref.stateInfo;
2476
+
2477
+ var selectedLanguage = Digit.StoreData.getCurrentLanguage();
2478
+
2479
+ var _useState = useState(selectedLanguage),
2480
+ selected = _useState[0],
2481
+ setselected = _useState[1];
2482
+
2483
+ var handleChangeLanguage = function handleChangeLanguage(language) {
2484
+ setselected(language.value);
2485
+ Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
2486
+ };
2487
+
2488
+ var handleSubmit = function handleSubmit(event) {
2489
+ history.push("/digit-ui/employee/user/login");
2490
+ };
2491
+
2492
+ if (isLoading) return null;
2493
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement(Card, {
2494
+ className: "bannerCard removeBottomMargin"
2495
+ }, /*#__PURE__*/React.createElement("div", {
2496
+ className: "bannerHeader"
2497
+ }, /*#__PURE__*/React.createElement("img", {
2498
+ className: "bannerLogo",
2499
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrl,
2500
+ alt: "Digit"
2501
+ }), /*#__PURE__*/React.createElement("p", null, t("TENANT_TENANTS_" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.code.toUpperCase())))), /*#__PURE__*/React.createElement("div", {
2502
+ className: "language-selector",
2503
+ style: {
2504
+ justifyContent: "space-between",
2505
+ marginBottom: "24px"
2506
+ }
2507
+ }, languages.map(function (language, index) {
2508
+ return /*#__PURE__*/React.createElement("div", {
2509
+ className: "language-button-container",
2510
+ key: index
2511
+ }, /*#__PURE__*/React.createElement(CustomButton, {
2512
+ selected: language.value === selected,
2513
+ text: language.label,
2514
+ onClick: function onClick() {
2515
+ return handleChangeLanguage(language);
2516
+ }
2517
+ }));
2518
+ })), /*#__PURE__*/React.createElement(SubmitBar, {
2519
+ style: {
2520
+ width: "100%"
2521
+ },
2522
+ label: t("CORE_COMMON_CONTINUE"),
2523
+ onSubmit: handleSubmit
2524
+ })), /*#__PURE__*/React.createElement("div", {
2525
+ className: "EmployeeLoginFooter"
2526
+ }, /*#__PURE__*/React.createElement("img", {
2527
+ alt: "Powered by DIGIT",
2528
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2529
+ style: {
2530
+ cursor: "pointer"
2531
+ },
2532
+ onClick: function onClick() {
2533
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2534
+
2535
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2536
+ }
2537
+ }), " "));
2243
2538
  };
2244
2539
 
2245
2540
  var getTenants = function getTenants(codes, tenants) {
2246
2541
  return tenants.filter(function (tenant) {
2247
- return codes.map(function (item) {
2542
+ var _codes$map;
2543
+
2544
+ return codes === null || codes === void 0 ? void 0 : (_codes$map = codes.map) === null || _codes$map === void 0 ? void 0 : _codes$map.call(codes, function (item) {
2248
2545
  return item.code;
2249
2546
  }).includes(tenant.code);
2250
2547
  });
@@ -2260,11 +2557,25 @@ var AppModules = function AppModules(_ref) {
2260
2557
  var _useRouteMatch = useRouteMatch(),
2261
2558
  path = _useRouteMatch.path;
2262
2559
 
2560
+ var location = useLocation();
2561
+ var user = Digit.UserService.getUser();
2562
+
2563
+ if (!user) {
2564
+ return /*#__PURE__*/React.createElement(Redirect, {
2565
+ to: {
2566
+ pathname: "/digit-ui/employee/user/login",
2567
+ state: {
2568
+ from: location.pathname + location.search
2569
+ }
2570
+ }
2571
+ });
2572
+ }
2573
+
2263
2574
  var appRoutes = modules.map(function (_ref2, index) {
2264
2575
  var code = _ref2.code,
2265
2576
  tenants = _ref2.tenants;
2266
2577
  var Module = Digit.ComponentRegistryService.getComponent(code + "Module");
2267
- return /*#__PURE__*/React.createElement(Route, {
2578
+ return Module ? /*#__PURE__*/React.createElement(Route, {
2268
2579
  key: index,
2269
2580
  path: path + "/" + code.toLowerCase()
2270
2581
  }, /*#__PURE__*/React.createElement(Module, {
@@ -2272,25 +2583,27 @@ var AppModules = function AppModules(_ref) {
2272
2583
  moduleCode: code,
2273
2584
  userType: userType,
2274
2585
  tenants: getTenants(tenants, appTenants)
2275
- }));
2586
+ })) : null;
2276
2587
  });
2277
- return /*#__PURE__*/React.createElement(Switch, null, appRoutes, /*#__PURE__*/React.createElement(Route, {
2588
+ return /*#__PURE__*/React.createElement("div", {
2589
+ className: "ground-container"
2590
+ }, /*#__PURE__*/React.createElement(Switch, null, appRoutes, /*#__PURE__*/React.createElement(Route, {
2278
2591
  path: path + "/login"
2279
- }, userType === "citizen" ? /*#__PURE__*/React.createElement(Login, {
2280
- stateCode: stateCode
2281
- }) : /*#__PURE__*/React.createElement(EmployeeLogin, null)), /*#__PURE__*/React.createElement(Route, {
2592
+ }, " ", /*#__PURE__*/React.createElement(Redirect, {
2593
+ to: {
2594
+ pathname: "/digit-ui/employee/user/login",
2595
+ state: {
2596
+ from: location.pathname + location.search
2597
+ }
2598
+ }
2599
+ })), /*#__PURE__*/React.createElement(Route, {
2282
2600
  path: path + "/forgot-password"
2283
- }, userType === "citizen" ? null : /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
2601
+ }, /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
2284
2602
  path: path + "/change-password"
2285
- }, userType === "citizen" ? null : /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), userType === "citizen" && /*#__PURE__*/React.createElement(Route, {
2286
- path: path + "/register"
2287
- }, /*#__PURE__*/React.createElement(Login, {
2288
- stateCode: stateCode,
2289
- isUserRegistered: false
2290
- })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(AppHome, {
2603
+ }, " ", /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(AppHome, {
2291
2604
  userType: userType,
2292
2605
  modules: modules
2293
- })));
2606
+ }))));
2294
2607
  };
2295
2608
 
2296
2609
  var ChangeLanguage = function ChangeLanguage(prop) {
@@ -2363,7 +2676,7 @@ var TextToImg = function TextToImg(props) {
2363
2676
  };
2364
2677
 
2365
2678
  var TopBar = function TopBar(_ref) {
2366
- var _cityDetails$city, _userDetails$info, _userDetails$info2, _userDetails$info2$us;
2679
+ var _Digit$SessionStorage, _cityDetails$city, _cityDetails$city2, _stateInfo$code, _userDetails$info, _userDetails$info2, _userDetails$info2$us;
2367
2680
 
2368
2681
  var t = _ref.t,
2369
2682
  stateInfo = _ref.stateInfo,
@@ -2375,7 +2688,38 @@ var TopBar = function TopBar(_ref) {
2375
2688
  mobileView = _ref.mobileView,
2376
2689
  userOptions = _ref.userOptions,
2377
2690
  handleUserDropdownSelection = _ref.handleUserDropdownSelection,
2378
- logoUrl = _ref.logoUrl;
2691
+ logoUrl = _ref.logoUrl,
2692
+ _ref$showLanguageChan = _ref.showLanguageChange,
2693
+ showLanguageChange = _ref$showLanguageChan === void 0 ? true : _ref$showLanguageChan;
2694
+ var CitizenHomePageTenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
2695
+ var history = useHistory();
2696
+
2697
+ var _useLocation = useLocation(),
2698
+ pathname = _useLocation.pathname;
2699
+
2700
+ var conditionsToDisableNotificationCountTrigger = function conditionsToDisableNotificationCountTrigger() {
2701
+ var _Digit$UserService, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService2, _Digit$UserService2$g, _Digit$UserService2$g2;
2702
+
2703
+ if (((_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : (_Digit$UserService$ge = _Digit$UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type) === "EMPLOYEE") return false;
2704
+
2705
+ if (((_Digit$UserService2 = Digit.UserService) === null || _Digit$UserService2 === void 0 ? void 0 : (_Digit$UserService2$g = _Digit$UserService2.getUser()) === null || _Digit$UserService2$g === void 0 ? void 0 : (_Digit$UserService2$g2 = _Digit$UserService2$g.info) === null || _Digit$UserService2$g2 === void 0 ? void 0 : _Digit$UserService2$g2.type) === "CITIZEN") {
2706
+ if (!CitizenHomePageTenantId) return false;else return true;
2707
+ }
2708
+
2709
+ return false;
2710
+ };
2711
+
2712
+ var _Digit$Hooks$useNotif = Digit.Hooks.useNotificationCount({
2713
+ tenantId: CitizenHomePageTenantId,
2714
+ config: {
2715
+ enabled: conditionsToDisableNotificationCountTrigger()
2716
+ }
2717
+ }),
2718
+ _Digit$Hooks$useNotif2 = _Digit$Hooks$useNotif.data;
2719
+
2720
+ _Digit$Hooks$useNotif2 = _Digit$Hooks$useNotif2 === void 0 ? {} : _Digit$Hooks$useNotif2;
2721
+ var unreadNotificationCount = _Digit$Hooks$useNotif2.unreadCount,
2722
+ notificationCountLoaded = _Digit$Hooks$useNotif.isSuccess;
2379
2723
 
2380
2724
  var updateSidebar = function updateSidebar() {
2381
2725
  if (!Digit.clikOusideFired) {
@@ -2385,6 +2729,16 @@ var TopBar = function TopBar(_ref) {
2385
2729
  }
2386
2730
  };
2387
2731
 
2732
+ function onNotificationIconClick() {
2733
+ history.push("/digit-ui/citizen/engagement/notifications");
2734
+ }
2735
+
2736
+ var urlsToDisableNotificationIcon = function urlsToDisableNotificationIcon(pathname) {
2737
+ var _Digit$UserService3, _Digit$UserService3$g;
2738
+
2739
+ return !!((_Digit$UserService3 = Digit.UserService) !== null && _Digit$UserService3 !== void 0 && (_Digit$UserService3$g = _Digit$UserService3.getUser()) !== null && _Digit$UserService3$g !== void 0 && _Digit$UserService3$g.access_token) ? false : ["/digit-ui/citizen/select-language", "/digit-ui/citizen/select-location"].includes(pathname);
2740
+ };
2741
+
2388
2742
  if (CITIZEN) {
2389
2743
  return /*#__PURE__*/React.createElement(TopBar$1, {
2390
2744
  img: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrlWhite,
@@ -2392,10 +2746,16 @@ var TopBar = function TopBar(_ref) {
2392
2746
  toggleSidebar: updateSidebar,
2393
2747
  logoUrl: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrlWhite,
2394
2748
  onLogout: handleLogout,
2395
- userDetails: userDetails
2749
+ userDetails: userDetails,
2750
+ notificationCount: unreadNotificationCount < 99 ? unreadNotificationCount : 99,
2751
+ notificationCountLoaded: notificationCountLoaded,
2752
+ cityOfCitizenShownBesideLogo: t(CitizenHomePageTenantId),
2753
+ onNotificationIconClick: onNotificationIconClick,
2754
+ hideNotificationIconOnSomeUrlsWhenNotLoggedIn: urlsToDisableNotificationIcon(pathname)
2396
2755
  });
2397
2756
  }
2398
2757
 
2758
+ var loggedin = userDetails !== null && userDetails !== void 0 && userDetails.access_token ? true : false;
2399
2759
  return /*#__PURE__*/React.createElement("div", {
2400
2760
  className: "topbar"
2401
2761
  }, mobileView ? /*#__PURE__*/React.createElement(Hamburger, {
@@ -2403,18 +2763,30 @@ var TopBar = function TopBar(_ref) {
2403
2763
  color: "#9E9E9E"
2404
2764
  }) : null, /*#__PURE__*/React.createElement("img", {
2405
2765
  className: "city",
2406
- src: cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.logoId
2407
- }), /*#__PURE__*/React.createElement("p", {
2766
+ src: loggedin ? cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.logoId : stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.statelogo
2767
+ }), loggedin && (cityDetails !== null && cityDetails !== void 0 && (_cityDetails$city = cityDetails.city) !== null && _cityDetails$city !== void 0 && _cityDetails$city.ulbGrade ? /*#__PURE__*/React.createElement("p", {
2768
+ className: "ulb",
2769
+ style: mobileView ? {
2770
+ fontSize: "14px",
2771
+ display: "inline-block"
2772
+ } : {}
2773
+ }, t(cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.i18nKey).toUpperCase(), " ", t("ULBGRADE_" + (cityDetails === null || cityDetails === void 0 ? void 0 : (_cityDetails$city2 = cityDetails.city) === null || _cityDetails$city2 === void 0 ? void 0 : _cityDetails$city2.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_"))).toUpperCase()) : /*#__PURE__*/React.createElement("img", {
2774
+ className: "state",
2775
+ src: logoUrl
2776
+ })), !loggedin && /*#__PURE__*/React.createElement("p", {
2408
2777
  className: "ulb",
2409
2778
  style: mobileView ? {
2410
2779
  fontSize: "14px",
2411
2780
  display: "inline-block"
2412
2781
  } : {}
2413
- }, t(cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.i18nKey).toUpperCase(), " ", t("ULBGRADE_" + (cityDetails === null || cityDetails === void 0 ? void 0 : (_cityDetails$city = cityDetails.city) === null || _cityDetails$city === void 0 ? void 0 : _cityDetails$city.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_"))).toUpperCase()), !mobileView && /*#__PURE__*/React.createElement("div", {
2414
- className: mobileView ? "right" : "flex-right right w-80 column-gap-15"
2782
+ }, t("MYCITY_" + (stateInfo === null || stateInfo === void 0 ? void 0 : (_stateInfo$code = stateInfo.code) === null || _stateInfo$code === void 0 ? void 0 : _stateInfo$code.toUpperCase()) + "_LABEL"), " ", t("MYCITY_STATECODE_LABEL")), !mobileView && /*#__PURE__*/React.createElement("div", {
2783
+ className: mobileView ? "right" : "flex-right right w-80 column-gap-15",
2784
+ style: !loggedin ? {
2785
+ width: '80%'
2786
+ } : {}
2415
2787
  }, /*#__PURE__*/React.createElement("div", {
2416
2788
  className: "left"
2417
- }, /*#__PURE__*/React.createElement(ChangeLanguage, {
2789
+ }, showLanguageChange && /*#__PURE__*/React.createElement(ChangeLanguage, {
2418
2790
  dropdown: true
2419
2791
  })), (userDetails === null || userDetails === void 0 ? void 0 : userDetails.access_token) && /*#__PURE__*/React.createElement("div", {
2420
2792
  className: "left"
@@ -2439,9 +2811,10 @@ var TopBar = function TopBar(_ref) {
2439
2811
  })));
2440
2812
  };
2441
2813
 
2442
- var SideBarMenu = function SideBarMenu(t, closeSidebar, isEmployee) {
2814
+ var SideBarMenu = function SideBarMenu(t, closeSidebar, redirectToLoginPage, isEmployee) {
2443
2815
  return [{
2444
2816
  type: "link",
2817
+ element: "HOME",
2445
2818
  text: t("COMMON_BOTTOM_NAVIGATION_HOME"),
2446
2819
  link: isEmployee ? "/digit-ui/employee/" : "/digit-ui/citizen/",
2447
2820
  icon: /*#__PURE__*/React.createElement(HomeIcon, {
@@ -2452,17 +2825,24 @@ var SideBarMenu = function SideBarMenu(t, closeSidebar, isEmployee) {
2452
2825
  }
2453
2826
  }, {
2454
2827
  type: "component",
2828
+ element: "LANGUAGE",
2455
2829
  action: /*#__PURE__*/React.createElement(ChangeLanguage, null),
2456
2830
  icon: /*#__PURE__*/React.createElement(LanguageIcon, {
2457
2831
  className: "icon"
2458
2832
  })
2833
+ }, {
2834
+ id: 'login-btn',
2835
+ element: "LOGIN",
2836
+ text: t("CORE_COMMON_LOGIN"),
2837
+ icon: /*#__PURE__*/React.createElement(LogoutIcon, {
2838
+ className: "icon"
2839
+ }),
2840
+ populators: {
2841
+ onClick: redirectToLoginPage
2842
+ }
2459
2843
  }];
2460
2844
  };
2461
2845
 
2462
- var digitImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAREAAABACAYAAAA9MUNoAAAACXBIWX" + "MAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB+qSURBVHgB7Z0JfF" + "TV1cDPfe/NZLLMZCMLhJAAsiWIskoAEeoSCCGTiGBF6lLlo59WK2rVWvqJSytVq63aX639Way2oK" + "Q2JIRFpAq4ogYQZUkgLNlIgEC2yWzvvfudO5lBIAl5b+bNos7/95vMZObOm/vuu/fcc8859zyAMG" + "HChAkTJkyYMGHChAkTJkyYMGHChAkTJkyYMGHChAnzHYEo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abLZ693ItoDz44IPRTU1Ng9n+rnPfx4nMjo+6lStX+pSq40JCKG9bFyhIRq" + "E6fyVOKoNE0cHURrQk2xydnbadeFE+yMvLC0pyIqbCgpcEoyN5AxsQ7ufQu2HKd4BQaz82QezYsc" + "PVb9mdFVH78EuEXcgJEQ9oJzFYLJaojo4OcfLkyaGU1SxMmDBhwoQJEyZMmDBhwoQJEyZMmDA/cP" + "4ffyGJt9D+/HMAAAAASUVORK5CYII=";
2463
-
2464
- var powered = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR4AAAA2CAYAAAARQfY5AAAACXBIWX" + "MAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABFBSURBVHgB7Z1hct" + "s2FoAfICdNnR+rnqDMCeqcoMoJKu/MzthOG8mzB0hygtonSHqAndDdjpPZzuwqJ4hygnhPEPUG2h" + "+bet2IWLwHWhaJBxKgRUlO8M2kriiRBEHg4b2HhweASCQSiUQikU8dAZFIJIj+/qMUhBgUj2aHo9" + "O/p7Bk+geD9/pPUryVeDB6lY7hBiMhEolEVsxWf//7PojOM2iCgsnCpzOQ2W9wMRuPfj09g0gkEn" + "GwpVXGLpRVOV9E4bweKK1A3ZKoHk60PnjchuoZiURuPm2ZWom+9Au0T/sHPwwhEolEFmjbx5MYAf" + "ToR4hEIpGcLcfxqXbg/AQ+KOhqc+1r/XenZHotII608IHR6c/HEIlEPnucgkcLiSMIpL837IFU6K" + "jesb/Vwmdv+PamTwNGIpHrs1RTC4XK6PTkvhYyvGYj1QuIRCKfPa34eEan6ZHDVEto+j4SiXzWtO" + "dcvi2PSnE+OZ3HEIlEPmu2oCVGaTrVDuUTbXYVZ7QE5/8Jo98fduHOeZc+nN+ZjkbpFCIW/b295P" + "L/R69eTWBFzN/PNd/Nqsv/KbSrdb3zUFoTPMQfcgS3VHkqvfvng79+/c/Tv/0GnlCDuDsbQia/0z" + "raDiilG8cX5sttBf2HgylkMAaRvYasM9a+pon3tf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0+fVCUInYnj4gugvFDv0Oj5UhR8EQikSKZ7ILMt7OpcsbMxNOmMU" + "7R1IpEIg0Qx6N/pM0WOGv+D0SMWAJo82FCAAAAAElFTkSuQmCC";
2465
-
2466
2846
  var defaultImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL" + "/" + "/" + "/" + "/Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf/" + "/a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKs" + "qXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpds" + "Lb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7Xl" + "Xyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37Z" + "B+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl" + "/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ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Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulq" + "Ue6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7L" + "XZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvn" + "L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";
2467
2847
 
2468
2848
  var Profile = function Profile(_ref) {
@@ -2493,15 +2873,22 @@ var Profile = function Profile(_ref) {
2493
2873
  };
2494
2874
 
2495
2875
  var PoweredBy = function PoweredBy() {
2876
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2877
+
2496
2878
  return /*#__PURE__*/React.createElement("div", {
2497
2879
  className: "digit-footer"
2498
2880
  }, /*#__PURE__*/React.createElement("img", {
2499
- src: powered,
2500
- alt: "Powered by"
2501
- }), /*#__PURE__*/React.createElement("img", {
2502
- src: digitImg,
2503
- alt: "DIGIT"
2504
- }));
2881
+ alt: "Powered by DIGIT",
2882
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2883
+ style: {
2884
+ cursor: "pointer"
2885
+ },
2886
+ onClick: function onClick() {
2887
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2888
+
2889
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2890
+ }
2891
+ }), " ");
2505
2892
  };
2506
2893
 
2507
2894
  var CitizenSideBar = function CitizenSideBar(_ref2) {
@@ -2523,12 +2910,19 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2523
2910
  var _useTranslation = useTranslation(),
2524
2911
  t = _useTranslation.t;
2525
2912
 
2913
+ var history = useHistory();
2914
+
2526
2915
  var closeSidebar = function closeSidebar() {
2527
2916
  Digit.clikOusideFired = true;
2528
2917
  toggleSidebar(false);
2529
2918
  };
2530
2919
 
2531
- var menuItems = [].concat(SideBarMenu(t, closeSidebar, isEmployee));
2920
+ var redirectToLoginPage = function redirectToLoginPage() {
2921
+ history.push("/digit-ui/citizen/login");
2922
+ closeSidebar();
2923
+ };
2924
+
2925
+ var menuItems = [].concat(SideBarMenu(t, closeSidebar, redirectToLoginPage, isEmployee));
2532
2926
  var profileItem;
2533
2927
 
2534
2928
  if (isFetched && user && user.access_token) {
@@ -2536,8 +2930,12 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2536
2930
  info: user.info,
2537
2931
  stateName: stateInfo.name
2538
2932
  });
2933
+ menuItems = menuItems.filter(function (item) {
2934
+ return (item === null || item === void 0 ? void 0 : item.id) !== "login-btn";
2935
+ });
2539
2936
  menuItems = [].concat(menuItems, [{
2540
2937
  text: t("CORE_COMMON_LOGOUT"),
2938
+ element: "LOGOUT",
2541
2939
  icon: /*#__PURE__*/React.createElement(LogoutIcon, {
2542
2940
  className: "icon"
2543
2941
  }),
@@ -2547,6 +2945,13 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2547
2945
  }]);
2548
2946
  }
2549
2947
 
2948
+ if (history.location.pathname.includes("/openlink")) {
2949
+ profileItem = /*#__PURE__*/React.createElement("span", null);
2950
+ menuItems = menuItems.filter(function (ele) {
2951
+ return ele.element === "LANGUAGE";
2952
+ });
2953
+ }
2954
+
2550
2955
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NavBar, {
2551
2956
  open: isOpen,
2552
2957
  profileItem: profileItem,
@@ -2662,7 +3067,10 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2662
3067
  cityDetails = _ref.cityDetails,
2663
3068
  mobileView = _ref.mobileView,
2664
3069
  handleUserDropdownSelection = _ref.handleUserDropdownSelection,
2665
- logoUrl = _ref.logoUrl;
3070
+ logoUrl = _ref.logoUrl,
3071
+ _ref$showSidebar = _ref.showSidebar,
3072
+ showSidebar = _ref$showSidebar === void 0 ? true : _ref$showSidebar,
3073
+ showLanguageChange = _ref.showLanguageChange;
2666
3074
 
2667
3075
  var _useState = useState(false),
2668
3076
  isSidebarOpen = _useState[0],
@@ -2692,8 +3100,9 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2692
3100
  mobileView: mobileView,
2693
3101
  userOptions: userOptions,
2694
3102
  handleUserDropdownSelection: handleUserDropdownSelection,
2695
- logoUrl: logoUrl
2696
- }), /*#__PURE__*/React.createElement(SideBar, {
3103
+ logoUrl: logoUrl,
3104
+ showLanguageChange: showLanguageChange
3105
+ }), showSidebar && /*#__PURE__*/React.createElement(SideBar, {
2697
3106
  t: t,
2698
3107
  CITIZEN: CITIZEN,
2699
3108
  isSidebarOpen: isSidebarOpen,
@@ -2705,6 +3114,8 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2705
3114
  };
2706
3115
 
2707
3116
  var EmployeeApp = function EmployeeApp(_ref) {
3117
+ var _location$pathname, _window, _window$globalConfigs, _window$globalConfigs2;
3118
+
2708
3119
  var stateInfo = _ref.stateInfo,
2709
3120
  userDetails = _ref.userDetails,
2710
3121
  CITIZEN = _ref.CITIZEN,
@@ -2715,15 +3126,50 @@ var EmployeeApp = function EmployeeApp(_ref) {
2715
3126
  DSO = _ref.DSO,
2716
3127
  stateCode = _ref.stateCode,
2717
3128
  modules = _ref.modules,
2718
- appTenants = _ref.appTenants,
2719
- sourceUrl = _ref.sourceUrl;
3129
+ appTenants = _ref.appTenants;
2720
3130
 
2721
3131
  var _useTranslation = useTranslation(),
2722
3132
  t = _useTranslation.t;
2723
3133
 
3134
+ var _useRouteMatch = useRouteMatch(),
3135
+ path = _useRouteMatch.path;
3136
+
3137
+ var location = useLocation();
3138
+ var showLanguageChange = location === null || location === void 0 ? void 0 : (_location$pathname = location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.includes("language-selection");
3139
+ useEffect(function () {
3140
+ Digit.UserService.setType("employee");
3141
+ }, []);
2724
3142
  return /*#__PURE__*/React.createElement("div", {
2725
3143
  className: "employee"
3144
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3145
+ path: path + "/user"
2726
3146
  }, /*#__PURE__*/React.createElement(TopBarSideBar, {
3147
+ t: t,
3148
+ stateInfo: stateInfo,
3149
+ userDetails: userDetails,
3150
+ CITIZEN: CITIZEN,
3151
+ cityDetails: cityDetails,
3152
+ mobileView: mobileView,
3153
+ handleUserDropdownSelection: handleUserDropdownSelection,
3154
+ logoUrl: logoUrl,
3155
+ showSidebar: false,
3156
+ showLanguageChange: !showLanguageChange
3157
+ }), /*#__PURE__*/React.createElement("div", {
3158
+ className: "loginContainer",
3159
+ style: {
3160
+ "--banner-url": "url(" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl) + ")"
3161
+ }
3162
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3163
+ path: path + "/user/login"
3164
+ }, /*#__PURE__*/React.createElement(EmployeeLogin, null)), /*#__PURE__*/React.createElement(Route, {
3165
+ path: path + "/user/forgot-password"
3166
+ }, /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
3167
+ path: path + "/user/change-password"
3168
+ }, " ", /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), /*#__PURE__*/React.createElement(Route, {
3169
+ path: path + "/user/language-selection"
3170
+ }, /*#__PURE__*/React.createElement(LanguageSelection, null)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3171
+ to: path + "/user/language-selection"
3172
+ }))))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(TopBarSideBar, {
2727
3173
  t: t,
2728
3174
  stateInfo: stateInfo,
2729
3175
  userDetails: userDetails,
@@ -2742,18 +3188,278 @@ var EmployeeApp = function EmployeeApp(_ref) {
2742
3188
  })), /*#__PURE__*/React.createElement("div", {
2743
3189
  className: "employee-home-footer"
2744
3190
  }, /*#__PURE__*/React.createElement("img", {
2745
- src: sourceUrl + "/digit-footer.png",
3191
+ alt: "Powered by DIGIT",
3192
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2746
3193
  style: {
2747
3194
  height: "1.1em",
2748
3195
  cursor: "pointer"
2749
3196
  },
2750
3197
  onClick: function onClick() {
2751
- window.open("https://www.digit.org/", "_blank").focus();
3198
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
3199
+
3200
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2752
3201
  }
3202
+ })))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3203
+ to: path + "/user/language-selection"
2753
3204
  }))));
2754
3205
  };
2755
3206
 
2756
- var CitizenApp = function CitizenApp(_ref) {
3207
+ var Home = function Home() {
3208
+ var _Digit$SessionStorage;
3209
+
3210
+ var _useTranslation = useTranslation(),
3211
+ t = _useTranslation.t;
3212
+
3213
+ var history = useHistory();
3214
+ var tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
3215
+
3216
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
3217
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
3218
+
3219
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
3220
+ var stateInfo = _Digit$Hooks$useStore2.stateInfo,
3221
+ isLoading = _Digit$Hooks$useStore.isLoading;
3222
+
3223
+ var conditionsToDisableNotificationCountTrigger = function conditionsToDisableNotificationCountTrigger() {
3224
+ var _Digit$UserService, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService2, _Digit$UserService2$g;
3225
+
3226
+ if (((_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : (_Digit$UserService$ge = _Digit$UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type) === "EMPLOYEE") return false;
3227
+ if (!((_Digit$UserService2 = Digit.UserService) !== null && _Digit$UserService2 !== void 0 && (_Digit$UserService2$g = _Digit$UserService2.getUser()) !== null && _Digit$UserService2$g !== void 0 && _Digit$UserService2$g.access_token)) return false;
3228
+ return true;
3229
+ };
3230
+
3231
+ var _Digit$Hooks$useEvent = Digit.Hooks.useEvents({
3232
+ tenantId: tenantId,
3233
+ variant: "whats-new",
3234
+ config: {
3235
+ enabled: conditionsToDisableNotificationCountTrigger()
3236
+ }
3237
+ }),
3238
+ EventsData = _Digit$Hooks$useEvent.data,
3239
+ EventsDataLoading = _Digit$Hooks$useEvent.isLoading;
3240
+
3241
+ if (!tenantId) {
3242
+ history.push("/digit-ui/citizen/select-language");
3243
+ }
3244
+
3245
+ var allCitizenServicesProps = {
3246
+ header: t("DASHBOARD_CITIZEN_SERVICES_LABEL"),
3247
+ sideOption: {
3248
+ name: t("DASHBOARD_VIEW_ALL_LABEL"),
3249
+ onClick: function onClick() {
3250
+ return history.push("/digit-ui/citizen/all-services");
3251
+ }
3252
+ },
3253
+ options: [{
3254
+ name: t("ES_PGR_HEADER_COMPLAINT"),
3255
+ Icon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
3256
+ onClick: function onClick() {
3257
+ return history.push("/digit-ui/citizen/pgr-home");
3258
+ }
3259
+ }, {
3260
+ name: t("MODULE_PT"),
3261
+ Icon: /*#__PURE__*/React.createElement(PTIcon, {
3262
+ className: "fill-path-primary-main"
3263
+ }),
3264
+ onClick: function onClick() {
3265
+ return history.push("/digit-ui/citizen/pt-home");
3266
+ }
3267
+ }, {
3268
+ name: t("MODULE_TL"),
3269
+ Icon: /*#__PURE__*/React.createElement(CaseIcon, {
3270
+ className: "fill-path-primary-main"
3271
+ }),
3272
+ onClick: function onClick() {
3273
+ return history.push("/digit-ui/citizen/tl-home");
3274
+ }
3275
+ }, {
3276
+ name: t("CS_COMMON_INBOX_BPA"),
3277
+ Icon: /*#__PURE__*/React.createElement(OBPSIcon, null),
3278
+ onClick: function onClick() {
3279
+ return history.push("/digit-ui/citizen/obps-home");
3280
+ }
3281
+ }],
3282
+ styles: {
3283
+ display: "flex",
3284
+ flexWrap: "wrap",
3285
+ justifyContent: "flex-start",
3286
+ width: "100%"
3287
+ }
3288
+ };
3289
+ var allInfoAndUpdatesProps = {
3290
+ header: t("CS_COMMON_DASHBOARD_INFO_UPDATES"),
3291
+ sideOption: {
3292
+ name: t("DASHBOARD_VIEW_ALL_LABEL"),
3293
+ onClick: function onClick() {
3294
+ return console.debug("view all");
3295
+ }
3296
+ },
3297
+ options: [{
3298
+ name: t("CS_HEADER_MYCITY"),
3299
+ Icon: /*#__PURE__*/React.createElement(HomeIcon, null)
3300
+ }, {
3301
+ name: t("EVENTS_EVENTS_HEADER"),
3302
+ Icon: /*#__PURE__*/React.createElement(Calender, null),
3303
+ onClick: function onClick() {
3304
+ return history.push("/digit-ui/citizen/engagement/events");
3305
+ }
3306
+ }, {
3307
+ name: t("CS_COMMON_DOCUMENTS"),
3308
+ Icon: /*#__PURE__*/React.createElement(DocumentIcon, null),
3309
+ onClick: function onClick() {
3310
+ return history.push("/digit-ui/citizen/engagement/docs");
3311
+ }
3312
+ }, {
3313
+ name: t("CS_COMMON_SURVEYS"),
3314
+ Icon: /*#__PURE__*/React.createElement(DocumentIcon, null),
3315
+ onClick: function onClick() {
3316
+ return history.push("/digit-ui/citizen/engagement/SurveyList");
3317
+ }
3318
+ }],
3319
+ styles: {
3320
+ display: "flex",
3321
+ flexWrap: "wrap",
3322
+ justifyContent: "flex-start",
3323
+ width: "100%"
3324
+ }
3325
+ };
3326
+ return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
3327
+ className: "HomePageWrapper"
3328
+ }, /*#__PURE__*/React.createElement("div", {
3329
+ className: "BannerWithSearch"
3330
+ }, /*#__PURE__*/React.createElement("img", {
3331
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl
3332
+ }), /*#__PURE__*/React.createElement("div", {
3333
+ className: "Search"
3334
+ }, /*#__PURE__*/React.createElement(StandaloneSearchBar, {
3335
+ placeholder: t("CS_COMMON_SEARCH_PLACEHOLDER")
3336
+ }))), /*#__PURE__*/React.createElement("div", {
3337
+ className: "ServicesSection"
3338
+ }, /*#__PURE__*/React.createElement(CardBasedOptions, allCitizenServicesProps), /*#__PURE__*/React.createElement(CardBasedOptions, allInfoAndUpdatesProps)), conditionsToDisableNotificationCountTrigger() ? EventsDataLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
3339
+ className: "WhatsNewSection"
3340
+ }, /*#__PURE__*/React.createElement("div", {
3341
+ className: "headSection"
3342
+ }, /*#__PURE__*/React.createElement("h2", null, t("DASHBOARD_WHATS_NEW_LABEL")), /*#__PURE__*/React.createElement("p", {
3343
+ onClick: function onClick() {
3344
+ return history.push("/digit-ui/citizen/engagement/whats-new");
3345
+ }
3346
+ }, t("DASHBOARD_VIEW_ALL_LABEL"))), /*#__PURE__*/React.createElement(WhatsNewCard, EventsData === null || EventsData === void 0 ? void 0 : EventsData[0])) : null);
3347
+ };
3348
+
3349
+ var LanguageSelection$1 = function LanguageSelection() {
3350
+ var _useTranslation = useTranslation(),
3351
+ t = _useTranslation.t;
3352
+
3353
+ var history = useHistory();
3354
+
3355
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
3356
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
3357
+
3358
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
3359
+ var languages = _Digit$Hooks$useStore2.languages,
3360
+ stateInfo = _Digit$Hooks$useStore2.stateInfo,
3361
+ isLoading = _Digit$Hooks$useStore.isLoading;
3362
+ var selectedLanguage = Digit.StoreData.getCurrentLanguage();
3363
+ var texts = useMemo(function () {
3364
+ return {
3365
+ header: t("CS_COMMON_CHOOSE_LANGUAGE"),
3366
+ submitBarLabel: t("CORE_COMMON_CONTINUE")
3367
+ };
3368
+ }, [t]);
3369
+ var RadioButtonProps = useMemo(function () {
3370
+ return {
3371
+ options: languages,
3372
+ optionsKey: "label",
3373
+ additionalWrapperClass: "reverse-radio-selection-wrapper",
3374
+ onSelect: function onSelect(language) {
3375
+ return Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
3376
+ },
3377
+ selectedOption: languages === null || languages === void 0 ? void 0 : languages.filter(function (i) {
3378
+ return i.value === selectedLanguage;
3379
+ })[0]
3380
+ };
3381
+ }, [selectedLanguage, languages]);
3382
+
3383
+ function onSubmit() {
3384
+ history.push("/digit-ui/citizen/select-location");
3385
+ }
3386
+
3387
+ return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(PageBasedInput, {
3388
+ texts: texts,
3389
+ onSubmit: onSubmit
3390
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("CS_COMMON_CHOOSE_LANGUAGE")), /*#__PURE__*/React.createElement(RadioButtons, RadioButtonProps));
3391
+ };
3392
+
3393
+ var LocationSelection = function LocationSelection() {
3394
+ var _useTranslation = useTranslation(),
3395
+ t = _useTranslation.t;
3396
+
3397
+ var history = useHistory();
3398
+
3399
+ var _Digit$Hooks$useTenan = Digit.Hooks.useTenants(),
3400
+ cities = _Digit$Hooks$useTenan.data,
3401
+ isLoading = _Digit$Hooks$useTenan.isLoading;
3402
+
3403
+ var _useState = useState(function () {
3404
+ return Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY");
3405
+ }),
3406
+ selectedCity = _useState[0],
3407
+ setSelectedCity = _useState[1];
3408
+
3409
+ var _useState2 = useState(false),
3410
+ showError = _useState2[0],
3411
+ setShowError = _useState2[1];
3412
+
3413
+ var texts = useMemo(function () {
3414
+ return {
3415
+ header: t("CS_COMMON_CHOOSE_LOCATION"),
3416
+ submitBarLabel: t("CORE_COMMON_CONTINUE")
3417
+ };
3418
+ }, [t]);
3419
+
3420
+ function selectCity(city) {
3421
+ setSelectedCity(city);
3422
+ setShowError(false);
3423
+ }
3424
+
3425
+ var RadioButtonProps = useMemo(function () {
3426
+ return {
3427
+ options: cities,
3428
+ optionsKey: "i18nKey",
3429
+ additionalWrapperClass: "reverse-radio-selection-wrapper",
3430
+ onSelect: selectCity,
3431
+ selectedOption: selectedCity
3432
+ };
3433
+ }, [cities, t, selectedCity]);
3434
+
3435
+ function onSubmit() {
3436
+ if (selectedCity) {
3437
+ Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY", selectedCity);
3438
+ history.push("/digit-ui/citizen");
3439
+ } else {
3440
+ setShowError(true);
3441
+ }
3442
+ }
3443
+
3444
+ return isLoading ? /*#__PURE__*/React.createElement("loader", null) : /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(BackButton, null), /*#__PURE__*/React.createElement(PageBasedInput, {
3445
+ texts: texts,
3446
+ onSubmit: onSubmit
3447
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("CS_COMMON_CHOOSE_LOCATION")), /*#__PURE__*/React.createElement(SearchOnRadioButtons, _extends({}, RadioButtonProps, {
3448
+ placeholder: t("COMMON_TABLE_SEARCH")
3449
+ })), showError ? /*#__PURE__*/React.createElement(CardLabelError, null, t("CS_COMMON_LOCATION_SELECTION_ERROR")) : null));
3450
+ };
3451
+
3452
+ var getTenants$1 = function getTenants(codes, tenants) {
3453
+ return tenants.filter(function (tenant) {
3454
+ return codes.map(function (item) {
3455
+ return item.code;
3456
+ }).includes(tenant.code);
3457
+ });
3458
+ };
3459
+
3460
+ var Home$1 = function Home$1(_ref) {
3461
+ var _window, _window$globalConfigs, _window$globalConfigs2;
3462
+
2757
3463
  var stateInfo = _ref.stateInfo,
2758
3464
  userDetails = _ref.userDetails,
2759
3465
  CITIZEN = _ref.CITIZEN,
@@ -2764,13 +3470,54 @@ var CitizenApp = function CitizenApp(_ref) {
2764
3470
  stateCode = _ref.stateCode,
2765
3471
  modules = _ref.modules,
2766
3472
  appTenants = _ref.appTenants,
2767
- sourceUrl = _ref.sourceUrl,
2768
3473
  pathname = _ref.pathname;
3474
+ var classname = Digit.Hooks.fsm.useRouteSubscription(pathname);
2769
3475
 
2770
3476
  var _useTranslation = useTranslation(),
2771
3477
  t = _useTranslation.t;
2772
3478
 
2773
- var classname = Digit.Hooks.fsm.useRouteSubscription(pathname);
3479
+ var _useRouteMatch = useRouteMatch(),
3480
+ path = _useRouteMatch.path;
3481
+
3482
+ var appRoutes = modules.map(function (_ref2, index) {
3483
+ var code = _ref2.code,
3484
+ tenants = _ref2.tenants;
3485
+ var Module = Digit.ComponentRegistryService.getComponent(code + "Module");
3486
+ return /*#__PURE__*/React.createElement(Route, {
3487
+ key: index,
3488
+ path: path + "/" + code.toLowerCase()
3489
+ }, /*#__PURE__*/React.createElement(Module, {
3490
+ stateCode: stateCode,
3491
+ moduleCode: code,
3492
+ userType: "citizen",
3493
+ tenants: getTenants$1(tenants, appTenants)
3494
+ }));
3495
+ });
3496
+ var ModuleLevelLinkHomePages = modules.map(function (_ref3, index) {
3497
+ var code = _ref3.code,
3498
+ bannerImage = _ref3.bannerImage;
3499
+
3500
+ var Links = Digit.ComponentRegistryService.getComponent(code + "Links") || function () {
3501
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
3502
+ };
3503
+
3504
+ return /*#__PURE__*/React.createElement(Route, {
3505
+ key: index,
3506
+ path: path + "/" + code.toLowerCase() + "-home"
3507
+ }, /*#__PURE__*/React.createElement("div", {
3508
+ className: "moduleLinkHomePage"
3509
+ }, /*#__PURE__*/React.createElement("img", {
3510
+ src: bannerImage || (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl)
3511
+ }), /*#__PURE__*/React.createElement(BackButton, {
3512
+ className: "moduleLinkHomePageBackButton"
3513
+ }), /*#__PURE__*/React.createElement("h1", null, t("MODULE_" + code.toUpperCase()))), /*#__PURE__*/React.createElement("div", {
3514
+ className: "moduleLinkHomePageModuleLinks"
3515
+ }, /*#__PURE__*/React.createElement(Links, {
3516
+ key: index,
3517
+ matchPath: "/digit-ui/citizen/" + code.toLowerCase(),
3518
+ userType: "citizen"
3519
+ })));
3520
+ });
2774
3521
  return /*#__PURE__*/React.createElement("div", {
2775
3522
  className: classname
2776
3523
  }, /*#__PURE__*/React.createElement(TopBarSideBar, {
@@ -2783,24 +3530,48 @@ var CitizenApp = function CitizenApp(_ref) {
2783
3530
  handleUserDropdownSelection: handleUserDropdownSelection,
2784
3531
  logoUrl: logoUrl
2785
3532
  }), /*#__PURE__*/React.createElement("div", {
2786
- className: "main center-container mb-50"
2787
- }, /*#__PURE__*/React.createElement(AppModules, {
2788
- stateCode: stateCode,
3533
+ className: "main center-container mb-25"
3534
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3535
+ exact: true,
3536
+ path: path
3537
+ }, /*#__PURE__*/React.createElement(Home, null)), /*#__PURE__*/React.createElement(Route, {
3538
+ exact: true,
3539
+ path: path + "/select-language"
3540
+ }, /*#__PURE__*/React.createElement(LanguageSelection$1, null)), /*#__PURE__*/React.createElement(Route, {
3541
+ exact: true,
3542
+ path: path + "/select-location"
3543
+ }, /*#__PURE__*/React.createElement(LocationSelection, null)), /*#__PURE__*/React.createElement(Route, {
3544
+ path: path + "/all-services"
3545
+ }, /*#__PURE__*/React.createElement(AppHome, {
2789
3546
  userType: "citizen",
2790
- modules: modules,
2791
- appTenants: appTenants
2792
- }), /*#__PURE__*/React.createElement("div", {
2793
- className: "citizen-home-footer"
3547
+ modules: modules
3548
+ })), /*#__PURE__*/React.createElement(Route, {
3549
+ path: path + "/login"
3550
+ }, " ", /*#__PURE__*/React.createElement(Login, {
3551
+ stateCode: stateCode
3552
+ })), /*#__PURE__*/React.createElement(Route, {
3553
+ path: path + "/register"
3554
+ }, /*#__PURE__*/React.createElement(Login, {
3555
+ stateCode: stateCode,
3556
+ isUserRegistered: false
3557
+ })), appRoutes, ModuleLevelLinkHomePages)), /*#__PURE__*/React.createElement("div", {
3558
+ className: "citizen-home-footer",
3559
+ style: window.location.href.includes("citizen/obps") ? {
3560
+ zIndex: "-1"
3561
+ } : {}
2794
3562
  }, /*#__PURE__*/React.createElement("img", {
2795
- src: sourceUrl + "/digit-footer.png",
3563
+ alt: "Powered by DIGIT",
3564
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2796
3565
  style: {
2797
3566
  height: "1.2em",
2798
3567
  cursor: "pointer"
2799
3568
  },
2800
3569
  onClick: function onClick() {
2801
- window.open("https://www.digit.org/", "_blank").focus();
3570
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
3571
+
3572
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2802
3573
  }
2803
- }))));
3574
+ })));
2804
3575
  };
2805
3576
 
2806
3577
  var DigitApp = function DigitApp(_ref) {
@@ -2877,7 +3648,7 @@ var DigitApp = function DigitApp(_ref) {
2877
3648
  path: "/digit-ui/employee"
2878
3649
  }, /*#__PURE__*/React.createElement(EmployeeApp, commonProps)), /*#__PURE__*/React.createElement(Route, {
2879
3650
  path: "/digit-ui/citizen"
2880
- }, /*#__PURE__*/React.createElement(CitizenApp, commonProps)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3651
+ }, /*#__PURE__*/React.createElement(Home$1, commonProps)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
2881
3652
  to: "/digit-ui/citizen"
2882
3653
  })));
2883
3654
  };
@@ -2973,6 +3744,14 @@ var DigitUI = function DigitUI(_ref2) {
2973
3744
  moduleReducers: moduleReducers
2974
3745
  }))));
2975
3746
  };
3747
+ var componentsToRegister = {};
3748
+ var initCoreComponents = function initCoreComponents() {
3749
+ Object.entries(componentsToRegister).forEach(function (_ref3) {
3750
+ var key = _ref3[0],
3751
+ value = _ref3[1];
3752
+ Digit.ComponentRegistryService.setComponent(key, value);
3753
+ });
3754
+ };
2976
3755
 
2977
- export { DigitUI };
3756
+ export { DigitUI, initCoreComponents };
2978
3757
  //# sourceMappingURL=index.modern.js.map