@djb25/digit-ui-module-ekyc 1.0.72 → 1.0.74

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.
@@ -101,29 +101,36 @@ const EKYCCard = () => {
101
101
  return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
102
102
  };
103
103
 
104
- const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
105
- const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
104
+ // A type of promise-like that resolves synchronously and supports only one observer
105
+
106
+ const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
107
+
108
+ const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
109
+
110
+ // Asynchronously call a function and send errors to recovery continuation
106
111
  function _catch(body, recover) {
107
- try {
108
- var result = body();
109
- } catch (e) {
110
- return recover(e);
111
- }
112
- if (result && result.then) {
113
- return result.then(void 0, recover);
114
- }
115
- return result;
112
+ try {
113
+ var result = body();
114
+ } catch(e) {
115
+ return recover(e);
116
+ }
117
+ if (result && result.then) {
118
+ return result.then(void 0, recover);
119
+ }
120
+ return result;
116
121
  }
122
+
123
+ // Asynchronously await a promise and pass the result to a finally continuation
117
124
  function _finallyRethrows(body, finalizer) {
118
- try {
119
- var result = body();
120
- } catch (e) {
121
- return finalizer(true, e);
122
- }
123
- if (result && result.then) {
124
- return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
125
- }
126
- return finalizer(false, result);
125
+ try {
126
+ var result = body();
127
+ } catch (e) {
128
+ return finalizer(true, e);
129
+ }
130
+ if (result && result.then) {
131
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
132
+ }
133
+ return finalizer(false, result);
127
134
  }
128
135
 
129
136
  const excludedKeys = ["status", "source", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile", "doorPhotoFilestoreId", "panFilestoreId", "documentProofFilestoreId", "buildingImageFileStoreId", "propertyDocumentFileStoreId", "meterPhotoFileStoreId", "modifiedBy", "zoneCode", "propertyType", "subPropertyCategory"];
@@ -2079,249 +2086,263 @@ const useInboxTableConfig = _ref => {
2079
2086
  };
2080
2087
  };
2081
2088
 
2082
- var isNullOrUndefined = value => value == null;
2083
- const isObjectType = value => typeof value === 'object';
2084
- var isObject = value => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !(value instanceof Date);
2085
- var isKey = value => /^\w*$/.test(value);
2086
- var compact = value => value.filter(Boolean);
2087
- var stringToPath = input => compact(input.replace(/["|']/g, '').replace(/\[/g, '.').replace(/\]/g, '').split('.'));
2088
- function set(object, path, value) {
2089
- let index = -1;
2090
- const tempPath = isKey(path) ? [path] : stringToPath(path);
2091
- const length = tempPath.length;
2092
- const lastIndex = length - 1;
2093
- while (++index < length) {
2094
- const key = tempPath[index];
2095
- let newValue = value;
2096
- if (index !== lastIndex) {
2097
- const objValue = object[key];
2098
- newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
2099
- }
2100
- object[key] = newValue;
2101
- object = object[key];
2102
- }
2103
- return object;
2089
+ var isNullOrUndefined = (value) => value == null;
2090
+
2091
+ const isObjectType = (value) => typeof value === 'object';
2092
+ var isObject = (value) => !isNullOrUndefined(value) &&
2093
+ !Array.isArray(value) &&
2094
+ isObjectType(value) &&
2095
+ !(value instanceof Date);
2096
+
2097
+ var isKey = (value) => /^\w*$/.test(value);
2098
+
2099
+ var compact = (value) => value.filter(Boolean);
2100
+
2101
+ var stringToPath = (input) => compact(input
2102
+ .replace(/["|']/g, '')
2103
+ .replace(/\[/g, '.')
2104
+ .replace(/\]/g, '')
2105
+ .split('.'));
2106
+
2107
+ function set(object, path, value) {
2108
+ let index = -1;
2109
+ const tempPath = isKey(path) ? [path] : stringToPath(path);
2110
+ const length = tempPath.length;
2111
+ const lastIndex = length - 1;
2112
+ while (++index < length) {
2113
+ const key = tempPath[index];
2114
+ let newValue = value;
2115
+ if (index !== lastIndex) {
2116
+ const objValue = object[key];
2117
+ newValue =
2118
+ isObject(objValue) || Array.isArray(objValue)
2119
+ ? objValue
2120
+ : !isNaN(+tempPath[index + 1])
2121
+ ? []
2122
+ : {};
2123
+ }
2124
+ object[key] = newValue;
2125
+ object = object[key];
2126
+ }
2127
+ return object;
2104
2128
  }
2105
- var isUndefined = val => val === undefined;
2106
- var get = function (obj, path, defaultValue) {
2107
- if (obj === void 0) {
2108
- obj = {};
2109
- }
2110
- const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);
2111
- return isUndefined(result) || result === obj ? isUndefined(obj[path]) ? defaultValue : obj[path] : result;
2129
+
2130
+ var isUndefined = (val) => val === undefined;
2131
+
2132
+ var get = (obj = {}, path, defaultValue) => {
2133
+ const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => (isNullOrUndefined(result) ? result : result[key]), obj);
2134
+ return isUndefined(result) || result === obj
2135
+ ? isUndefined(obj[path])
2136
+ ? defaultValue
2137
+ : obj[path]
2138
+ : result;
2112
2139
  };
2113
- var isPrimitive = value => isNullOrUndefined(value) || !isObjectType(value);
2114
- var isFunction = value => typeof value === 'function';
2115
- var skipValidation = _ref8 => {
2116
- let {
2117
- isOnBlur,
2118
- isOnChange,
2119
- isOnTouch,
2120
- isTouched,
2121
- isReValidateOnBlur,
2122
- isReValidateOnChange,
2123
- isBlurEvent,
2124
- isSubmitted,
2125
- isOnAll
2126
- } = _ref8;
2127
- if (isOnAll) {
2128
- return false;
2129
- } else if (!isSubmitted && isOnTouch) {
2130
- return !(isTouched || isBlurEvent);
2131
- } else if (isSubmitted ? isReValidateOnBlur : isOnBlur) {
2132
- return !isBlurEvent;
2133
- } else if (isSubmitted ? isReValidateOnChange : isOnChange) {
2134
- return isBlurEvent;
2135
- }
2136
- return true;
2140
+
2141
+ var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
2142
+
2143
+ var isFunction = (value) => typeof value === 'function';
2144
+
2145
+ var skipValidation = ({ isOnBlur, isOnChange, isOnTouch, isTouched, isReValidateOnBlur, isReValidateOnChange, isBlurEvent, isSubmitted, isOnAll, }) => {
2146
+ if (isOnAll) {
2147
+ return false;
2148
+ }
2149
+ else if (!isSubmitted && isOnTouch) {
2150
+ return !(isTouched || isBlurEvent);
2151
+ }
2152
+ else if (isSubmitted ? isReValidateOnBlur : isOnBlur) {
2153
+ return !isBlurEvent;
2154
+ }
2155
+ else if (isSubmitted ? isReValidateOnChange : isOnChange) {
2156
+ return isBlurEvent;
2157
+ }
2158
+ return true;
2137
2159
  };
2138
- const isMatchFieldArrayName = (name, searchName) => RegExp(`^${searchName}([|.)\\d+`.replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name);
2139
- var isNameInFieldArray = (names, name) => [...names].some(current => isMatchFieldArrayName(name, current));
2140
- function __rest(s, e) {
2141
- var t = {};
2142
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2143
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2144
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2145
- }
2146
- return t;
2160
+
2161
+ const isMatchFieldArrayName = (name, searchName) => RegExp(`^${searchName}([|.)\\d+`.replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name);
2162
+ var isNameInFieldArray = (names, name) => [...names].some((current) => isMatchFieldArrayName(name, current));
2163
+
2164
+ /*! *****************************************************************************
2165
+ Copyright (c) Microsoft Corporation.
2166
+
2167
+ Permission to use, copy, modify, and/or distribute this software for any
2168
+ purpose with or without fee is hereby granted.
2169
+
2170
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2171
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2172
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2173
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2174
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2175
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2176
+ PERFORMANCE OF THIS SOFTWARE.
2177
+ ***************************************************************************** */
2178
+
2179
+ function __rest(s, e) {
2180
+ var t = {};
2181
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2182
+ t[p] = s[p];
2183
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
2184
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2185
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2186
+ t[p[i]] = s[p[i]];
2187
+ }
2188
+ return t;
2147
2189
  }
2148
- const FormContext = createContext(null);
2149
- FormContext.displayName = 'RHFContext';
2150
- const useFormContext = () => useContext(FormContext);
2151
- var getInputValue = event => isPrimitive(event) || !isObject(event.target) || isObject(event.target) && !event.type ? event : isUndefined(event.target.value) ? event.target.checked : event.target.value;
2152
- function useController(_ref17) {
2153
- let {
2154
- name,
2155
- rules,
2156
- defaultValue,
2157
- control,
2158
- onFocus
2159
- } = _ref17;
2160
- const methods = useFormContext();
2161
- if (process.env.NODE_ENV !== 'production') {
2162
- if (!control && !methods) {
2163
- throw new Error('📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller');
2164
- }
2165
- }
2166
- const {
2167
- defaultValuesRef,
2168
- setValue,
2169
- register,
2170
- unregister,
2171
- trigger,
2172
- mode,
2173
- reValidateMode: {
2174
- isReValidateOnBlur,
2175
- isReValidateOnChange
2176
- },
2177
- formState,
2178
- formStateRef: {
2179
- current: {
2180
- isSubmitted,
2181
- touched,
2182
- errors
2183
- }
2184
- },
2185
- updateFormState,
2186
- readFormStateRef,
2187
- fieldsRef,
2188
- fieldArrayNamesRef,
2189
- shallowFieldsStateRef
2190
- } = control || methods.control;
2191
- const isNotFieldArray = !isNameInFieldArray(fieldArrayNamesRef.current, name);
2192
- const getInitialValue = () => !isUndefined(get(shallowFieldsStateRef.current, name)) && isNotFieldArray ? get(shallowFieldsStateRef.current, name) : isUndefined(defaultValue) ? get(defaultValuesRef.current, name) : defaultValue;
2193
- const [value, setInputStateValue] = useState(getInitialValue());
2194
- const valueRef = useRef(value);
2195
- const ref = useRef({
2196
- focus: () => null
2197
- });
2198
- const onFocusRef = useRef(onFocus || (() => {
2199
- if (isFunction(ref.current.focus)) {
2200
- ref.current.focus();
2201
- }
2202
- if (process.env.NODE_ENV !== 'production') {
2203
- if (!isFunction(ref.current.focus)) {
2204
- console.warn(`📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method`);
2205
- }
2206
- }
2207
- }));
2208
- const shouldValidate = useCallback(isBlurEvent => !skipValidation(Object.assign({
2209
- isBlurEvent,
2210
- isReValidateOnBlur,
2211
- isReValidateOnChange,
2212
- isSubmitted,
2213
- isTouched: !!get(touched, name)
2214
- }, mode)), [isReValidateOnBlur, isReValidateOnChange, isSubmitted, touched, name, mode]);
2215
- const commonTask = useCallback(_ref18 => {
2216
- let [event] = _ref18;
2217
- const data = getInputValue(event);
2218
- setInputStateValue(data);
2219
- valueRef.current = data;
2220
- return data;
2221
- }, []);
2222
- const registerField = useCallback(shouldUpdateValue => {
2223
- if (process.env.NODE_ENV !== 'production') {
2224
- if (!name) {
2225
- return console.warn('📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller');
2226
- }
2227
- }
2228
- if (fieldsRef.current[name]) {
2229
- fieldsRef.current[name] = Object.assign({
2230
- ref: fieldsRef.current[name].ref
2231
- }, rules);
2232
- } else {
2233
- register(Object.defineProperties({
2234
- name,
2235
- focus: onFocusRef.current
2236
- }, {
2237
- value: {
2238
- set(data) {
2239
- setInputStateValue(data);
2240
- valueRef.current = data;
2241
- },
2242
- get() {
2243
- return valueRef.current;
2244
- }
2245
- }
2246
- }), rules);
2247
- shouldUpdateValue = isUndefined(get(defaultValuesRef.current, name));
2248
- }
2249
- shouldUpdateValue && isNotFieldArray && setInputStateValue(getInitialValue());
2250
- }, [rules, name, register]);
2251
- useEffect(() => () => unregister(name), [name]);
2252
- useEffect(() => {
2253
- if (process.env.NODE_ENV !== 'production') {
2254
- if (isUndefined(value)) {
2255
- console.warn(`📋 ${name} is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)`);
2256
- }
2257
- if (!isNotFieldArray && isUndefined(defaultValue)) {
2258
- console.warn('📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller');
2259
- }
2260
- }
2261
- registerField();
2262
- }, [registerField]);
2263
- useEffect(() => {
2264
- !fieldsRef.current[name] && registerField(true);
2265
- });
2266
- const onBlur = useCallback(() => {
2267
- if (readFormStateRef.current.touched && !get(touched, name)) {
2268
- set(touched, name, true);
2269
- updateFormState({
2270
- touched
2271
- });
2272
- }
2273
- shouldValidate(true) && trigger(name);
2274
- }, [name, updateFormState, shouldValidate, trigger, readFormStateRef]);
2275
- const onChange = useCallback(function () {
2276
- for (var _len = arguments.length, event = new Array(_len), _key = 0; _key < _len; _key++) {
2277
- event[_key] = arguments[_key];
2278
- }
2279
- return setValue(name, commonTask(event), {
2280
- shouldValidate: shouldValidate(),
2281
- shouldDirty: true
2282
- });
2283
- }, [setValue, name, shouldValidate]);
2284
- return {
2285
- field: {
2286
- onChange,
2287
- onBlur,
2288
- name,
2289
- value,
2290
- ref
2291
- },
2292
- meta: Object.defineProperties({
2293
- invalid: !!get(errors, name)
2294
- }, {
2295
- isDirty: {
2296
- get() {
2297
- return !!get(formState.dirtyFields, name);
2298
- }
2299
- },
2300
- isTouched: {
2301
- get() {
2302
- return !!get(formState.touched, name);
2303
- }
2304
- }
2305
- })
2306
- };
2190
+
2191
+ const FormContext = createContext(null);
2192
+ FormContext.displayName = 'RHFContext';
2193
+ const useFormContext = () => useContext(FormContext);
2194
+
2195
+ var getInputValue = (event) => isPrimitive(event) ||
2196
+ !isObject(event.target) ||
2197
+ (isObject(event.target) && !event.type)
2198
+ ? event
2199
+ : isUndefined(event.target.value)
2200
+ ? event.target.checked
2201
+ : event.target.value;
2202
+
2203
+ function useController({ name, rules, defaultValue, control, onFocus, }) {
2204
+ const methods = useFormContext();
2205
+ if (process.env.NODE_ENV !== 'production') {
2206
+ if (!control && !methods) {
2207
+ throw new Error('📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller');
2208
+ }
2209
+ }
2210
+ const { defaultValuesRef, setValue, register, unregister, trigger, mode, reValidateMode: { isReValidateOnBlur, isReValidateOnChange }, formState, formStateRef: { current: { isSubmitted, touched, errors }, }, updateFormState, readFormStateRef, fieldsRef, fieldArrayNamesRef, shallowFieldsStateRef, } = control || methods.control;
2211
+ const isNotFieldArray = !isNameInFieldArray(fieldArrayNamesRef.current, name);
2212
+ const getInitialValue = () => !isUndefined(get(shallowFieldsStateRef.current, name)) && isNotFieldArray
2213
+ ? get(shallowFieldsStateRef.current, name)
2214
+ : isUndefined(defaultValue)
2215
+ ? get(defaultValuesRef.current, name)
2216
+ : defaultValue;
2217
+ const [value, setInputStateValue] = useState(getInitialValue());
2218
+ const valueRef = useRef(value);
2219
+ const ref = useRef({
2220
+ focus: () => null,
2221
+ });
2222
+ const onFocusRef = useRef(onFocus ||
2223
+ (() => {
2224
+ if (isFunction(ref.current.focus)) {
2225
+ ref.current.focus();
2226
+ }
2227
+ if (process.env.NODE_ENV !== 'production') {
2228
+ if (!isFunction(ref.current.focus)) {
2229
+ console.warn(`📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method`);
2230
+ }
2231
+ }
2232
+ }));
2233
+ const shouldValidate = useCallback((isBlurEvent) => !skipValidation(Object.assign({ isBlurEvent,
2234
+ isReValidateOnBlur,
2235
+ isReValidateOnChange,
2236
+ isSubmitted, isTouched: !!get(touched, name) }, mode)), [
2237
+ isReValidateOnBlur,
2238
+ isReValidateOnChange,
2239
+ isSubmitted,
2240
+ touched,
2241
+ name,
2242
+ mode,
2243
+ ]);
2244
+ const commonTask = useCallback(([event]) => {
2245
+ const data = getInputValue(event);
2246
+ setInputStateValue(data);
2247
+ valueRef.current = data;
2248
+ return data;
2249
+ }, []);
2250
+ const registerField = useCallback((shouldUpdateValue) => {
2251
+ if (process.env.NODE_ENV !== 'production') {
2252
+ if (!name) {
2253
+ return console.warn('📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller');
2254
+ }
2255
+ }
2256
+ if (fieldsRef.current[name]) {
2257
+ fieldsRef.current[name] = Object.assign({ ref: fieldsRef.current[name].ref }, rules);
2258
+ }
2259
+ else {
2260
+ register(Object.defineProperties({
2261
+ name,
2262
+ focus: onFocusRef.current,
2263
+ }, {
2264
+ value: {
2265
+ set(data) {
2266
+ setInputStateValue(data);
2267
+ valueRef.current = data;
2268
+ },
2269
+ get() {
2270
+ return valueRef.current;
2271
+ },
2272
+ },
2273
+ }), rules);
2274
+ shouldUpdateValue = isUndefined(get(defaultValuesRef.current, name));
2275
+ }
2276
+ shouldUpdateValue &&
2277
+ isNotFieldArray &&
2278
+ setInputStateValue(getInitialValue());
2279
+ }, [rules, name, register]);
2280
+ useEffect(() => () => unregister(name), [name]);
2281
+ useEffect(() => {
2282
+ if (process.env.NODE_ENV !== 'production') {
2283
+ if (isUndefined(value)) {
2284
+ console.warn(`📋 ${name} is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)`);
2285
+ }
2286
+ if (!isNotFieldArray && isUndefined(defaultValue)) {
2287
+ console.warn('📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller');
2288
+ }
2289
+ }
2290
+ registerField();
2291
+ }, [registerField]);
2292
+ useEffect(() => {
2293
+ !fieldsRef.current[name] && registerField(true);
2294
+ });
2295
+ const onBlur = useCallback(() => {
2296
+ if (readFormStateRef.current.touched && !get(touched, name)) {
2297
+ set(touched, name, true);
2298
+ updateFormState({
2299
+ touched,
2300
+ });
2301
+ }
2302
+ shouldValidate(true) && trigger(name);
2303
+ }, [name, updateFormState, shouldValidate, trigger, readFormStateRef]);
2304
+ const onChange = useCallback((...event) => setValue(name, commonTask(event), {
2305
+ shouldValidate: shouldValidate(),
2306
+ shouldDirty: true,
2307
+ }), [setValue, name, shouldValidate]);
2308
+ return {
2309
+ field: {
2310
+ onChange,
2311
+ onBlur,
2312
+ name,
2313
+ value,
2314
+ ref,
2315
+ },
2316
+ meta: Object.defineProperties({
2317
+ invalid: !!get(errors, name),
2318
+ }, {
2319
+ isDirty: {
2320
+ get() {
2321
+ return !!get(formState.dirtyFields, name);
2322
+ },
2323
+ },
2324
+ isTouched: {
2325
+ get() {
2326
+ return !!get(formState.touched, name);
2327
+ },
2328
+ },
2329
+ }),
2330
+ };
2307
2331
  }
2308
- const Controller = props => {
2309
- const {
2310
- rules,
2311
- as,
2312
- render,
2313
- defaultValue,
2314
- control,
2315
- onFocus
2316
- } = props,
2317
- rest = __rest(props, ["rules", "as", "render", "defaultValue", "control", "onFocus"]);
2318
- const {
2319
- field,
2320
- meta
2321
- } = useController(props);
2322
- const componentProps = Object.assign(Object.assign({}, rest), field);
2323
- return as ? isValidElement(as) ? cloneElement(as, componentProps) : createElement(as, componentProps) : render ? render(field, meta) : null;
2332
+
2333
+ const Controller = (props) => {
2334
+ const { rules, as, render, defaultValue, control, onFocus } = props, rest = __rest(props, ["rules", "as", "render", "defaultValue", "control", "onFocus"]);
2335
+ const { field, meta } = useController(props);
2336
+ const componentProps = Object.assign(Object.assign({}, rest), field);
2337
+ return as
2338
+ ? isValidElement(as)
2339
+ ? cloneElement(as, componentProps)
2340
+ : createElement(as, componentProps)
2341
+ : render
2342
+ ? render(field, meta)
2343
+ : null;
2324
2344
  };
2345
+ //# sourceMappingURL=index.esm.js.map
2325
2346
 
2326
2347
  const SearchFormFieldsComponents = _ref => {
2327
2348
  let {
@@ -4828,7 +4849,7 @@ const AdminDashboard = () => {
4828
4849
  };
4829
4850
 
4830
4851
  const SupervisorDetailsCard = () => {
4831
- var _Digit$SessionStorage, _fullName$charAt;
4852
+ var _Digit$SessionStorage, _progressData$supervi, _fullName$charAt;
4832
4853
  const {
4833
4854
  t
4834
4855
  } = useTranslation();
@@ -5034,6 +5055,10 @@ const SupervisorDetailsCard = () => {
5034
5055
  const surveyors = useMemo(() => {
5035
5056
  return (supervisor === null || supervisor === void 0 ? void 0 : supervisor.surveyors) || [];
5036
5057
  }, [supervisor]);
5058
+ const [currentPage, setCurrentPage] = useState(0);
5059
+ const [pageSize, setPageSize] = useState(20);
5060
+ const currentSupervisor = progressData === null || progressData === void 0 ? void 0 : (_progressData$supervi = progressData.supervisorReport) === null || _progressData$supervi === void 0 ? void 0 : _progressData$supervi.find(ele => ele.supervisorId === supervisorId);
5061
+ const surveyorsData = (currentSupervisor === null || currentSupervisor === void 0 ? void 0 : currentSupervisor.surveyors) || [];
5037
5062
  const cards = useMemo(() => [{
5038
5063
  label: "TOTAL_EKYC_APPLICATIONS",
5039
5064
  count: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.totalKnos) || 0,
@@ -5059,13 +5084,6 @@ const SupervisorDetailsCard = () => {
5059
5084
  type: "progress",
5060
5085
  icon: /*#__PURE__*/React.createElement(FaChartLine, null)
5061
5086
  }], [supervisor]);
5062
- const [currentPage, setCurrentPage] = useState(0);
5063
- const [pageSize, setPageSize] = useState(20);
5064
- const paginatedSurveyors = useMemo(() => {
5065
- const start = currentPage * pageSize;
5066
- const end = start + pageSize;
5067
- return surveyors.slice(start, end);
5068
- }, [surveyors, currentPage, pageSize]);
5069
5087
  const surveyorColumns = useMemo(() => [{
5070
5088
  Header: t("SURVEYOR_NAME") || "Surveyor Name",
5071
5089
  accessor: row => (row === null || row === void 0 ? void 0 : row.surveyorName) || "N/A",
@@ -5481,7 +5499,7 @@ const SupervisorDetailsCard = () => {
5481
5499
  tableTitle: t("CONNECTED_SURVEYORS") || "Connected Surveyors",
5482
5500
  tableClass: "ekycTable",
5483
5501
  isTableScrollable: true,
5484
- data: paginatedSurveyors,
5502
+ data: surveyorsData,
5485
5503
  columns: surveyorColumns,
5486
5504
  isLoading: isProgressLoading,
5487
5505
  totalRecords: surveyors.length,
@@ -5624,7 +5642,7 @@ const AssignEkycModal = _ref => {
5624
5642
  isFetching: isLoading,
5625
5643
  refetch: refetchApplicationList
5626
5644
  } = Digit.Hooks.ekyc.useEkycApplicationList({
5627
- unassignedOnly: !isReassign,
5645
+ assignedOnly: isReassign,
5628
5646
  ...(filters.kno && {
5629
5647
  kno: filters.kno
5630
5648
  }),
@@ -5954,8 +5972,8 @@ const AssignEkycModal = _ref => {
5954
5972
  }));
5955
5973
  };
5956
5974
 
5957
- const SurveyorDetailsDashboard = () => {
5958
- var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4, _fullName$charAt, _dashboardData$dashbo, _dashboardData$dashbo2, _dashboardData$dashbo3, _dashboardData$dashbo4, _surveyor$owner7, _surveyor$owner8, _surveyor$owner9, _dashboardData$dashbo5, _dashboardData$dashbo6;
5975
+ const SurveyorDetailsCard = () => {
5976
+ var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4, _surveyor$owner7, _surveyor$owner8, _surveyor$owner9, _dashboardData$dashbo, _dashboardData$dashbo2, _dashboardData$dashbo3, _dashboardData$dashbo4, _dashboardData$dashbo5, _dashboardData$dashbo6;
5959
5977
  const tenantId = Digit.ULBService.getCurrentTenantId();
5960
5978
  const [showModal, setShowModal] = useState(null);
5961
5979
  const [showOptions, setShowOptions] = useState(false);
@@ -6310,55 +6328,27 @@ const SurveyorDetailsDashboard = () => {
6310
6328
  className: "surveyor-dashboard"
6311
6329
  }, /*#__PURE__*/React.createElement("div", {
6312
6330
  className: "ekyc-dashboard-section"
6331
+ }, /*#__PURE__*/React.createElement("div", {
6332
+ className: "ekyc-details-wrapper"
6333
+ }, /*#__PURE__*/React.createElement("div", {
6334
+ className: "details-top-row"
6335
+ }, /*#__PURE__*/React.createElement("div", {
6336
+ className: "detail-item first-row"
6313
6337
  }, /*#__PURE__*/React.createElement("div", {
6314
6338
  className: "ekyc-dashboard-header"
6315
6339
  }, /*#__PURE__*/React.createElement("div", {
6316
- className: "avatar"
6317
- }, fullName === null || fullName === void 0 ? void 0 : (_fullName$charAt = fullName.charAt(0)) === null || _fullName$charAt === void 0 ? void 0 : _fullName$charAt.toUpperCase()), /*#__PURE__*/React.createElement("div", {
6318
6340
  className: "header-content"
6319
6341
  }, /*#__PURE__*/React.createElement("h2", {
6320
6342
  className: "name"
6321
6343
  }, fullName), /*#__PURE__*/React.createElement("div", {
6322
6344
  className: "designation"
6323
- }, (surveyor === null || surveyor === void 0 ? void 0 : surveyor.description) || t("FIELD_SURVEYOR")))), /*#__PURE__*/React.createElement("div", {
6345
+ }, "(", (surveyor === null || surveyor === void 0 ? void 0 : surveyor.description) || t("FIELD_SURVEYOR"), ")"))), /*#__PURE__*/React.createElement("div", {
6324
6346
  className: "report-download"
6325
6347
  }, /*#__PURE__*/React.createElement("button", {
6326
6348
  className: "download-btn",
6327
6349
  disabled: reportLoading,
6328
6350
  onClick: handleDownload
6329
- }, reportLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_REPORT") || "Download Report"))), /*#__PURE__*/React.createElement("div", {
6330
- className: "stats-wrapper"
6331
- }, /*#__PURE__*/React.createElement(StatCard, {
6332
- title: t("TOTAL_ASSIGNED"),
6333
- value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.total) || 0,
6334
- type: "today",
6335
- isLoading: isDashboardLoading,
6336
- icon: /*#__PURE__*/React.createElement(FaUsers, null)
6337
- }), /*#__PURE__*/React.createElement(StatCard, {
6338
- title: t("COMPLETED"),
6339
- value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo2 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo2 === void 0 ? void 0 : _dashboardData$dashbo2.completed) || 0,
6340
- type: "week",
6341
- isLoading: isDashboardLoading,
6342
- icon: /*#__PURE__*/React.createElement(FaCheckCircle, null)
6343
- }), /*#__PURE__*/React.createElement(StatCard, {
6344
- title: t("PENDING"),
6345
- value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo3 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo3 === void 0 ? void 0 : _dashboardData$dashbo3.pending) || 0,
6346
- type: "pending",
6347
- isLoading: isDashboardLoading,
6348
- icon: /*#__PURE__*/React.createElement(FaClock, null)
6349
- }), /*#__PURE__*/React.createElement(StatCard, {
6350
- title: t("SUBMITTED"),
6351
- value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo4 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo4 === void 0 ? void 0 : _dashboardData$dashbo4.submittedCount) || 0,
6352
- type: "month",
6353
- isLoading: isDashboardLoading,
6354
- icon: /*#__PURE__*/React.createElement(FaChartLine, null)
6355
- })), /*#__PURE__*/React.createElement("div", {
6356
- className: "charts-wrapper"
6357
- }), /*#__PURE__*/React.createElement("div", {
6358
- className: "ekyc-dashboard-section"
6359
- }, /*#__PURE__*/React.createElement("div", {
6360
- className: "ekyc-details-wrapper"
6361
- }, /*#__PURE__*/React.createElement("div", {
6351
+ }, reportLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_REPORT") || "Download Report")))), /*#__PURE__*/React.createElement("div", {
6362
6352
  className: "details-top-row"
6363
6353
  }, /*#__PURE__*/React.createElement("div", {
6364
6354
  className: "detail-item"
@@ -6488,7 +6478,33 @@ const SurveyorDetailsDashboard = () => {
6488
6478
  className: "label"
6489
6479
  }, t("SUPERVISOR_NAME") || "Supervisor Name"), /*#__PURE__*/React.createElement("span", {
6490
6480
  className: "value"
6491
- }, supervisorName))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, {
6481
+ }, supervisorName))))), /*#__PURE__*/React.createElement("div", {
6482
+ className: "stats-wrapper"
6483
+ }, /*#__PURE__*/React.createElement(StatCard, {
6484
+ title: t("TOTAL_ASSIGNED"),
6485
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.total) || 0,
6486
+ type: "today",
6487
+ isLoading: isDashboardLoading,
6488
+ icon: /*#__PURE__*/React.createElement(FaUsers, null)
6489
+ }), /*#__PURE__*/React.createElement(StatCard, {
6490
+ title: t("IN_PROGRESS"),
6491
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo2 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo2 === void 0 ? void 0 : _dashboardData$dashbo2.inProgressCount) || 0,
6492
+ type: "week",
6493
+ isLoading: isDashboardLoading,
6494
+ icon: /*#__PURE__*/React.createElement(FaCheckCircle, null)
6495
+ }), /*#__PURE__*/React.createElement(StatCard, {
6496
+ title: t("PENDING"),
6497
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo3 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo3 === void 0 ? void 0 : _dashboardData$dashbo3.pending) || 0,
6498
+ type: "pending",
6499
+ isLoading: isDashboardLoading,
6500
+ icon: /*#__PURE__*/React.createElement(FaClock, null)
6501
+ }), /*#__PURE__*/React.createElement(StatCard, {
6502
+ title: t("SUBMITTED"),
6503
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo4 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo4 === void 0 ? void 0 : _dashboardData$dashbo4.submittedCount) || 0,
6504
+ type: "month",
6505
+ isLoading: isDashboardLoading,
6506
+ icon: /*#__PURE__*/React.createElement(FaChartLine, null)
6507
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, {
6492
6508
  t: t,
6493
6509
  tableTitle: t("ASSIGNED_KNOS"),
6494
6510
  tableClass: "ekycTable",
@@ -7174,7 +7190,7 @@ const getEkycRoutes = (userType, t) => [{
7174
7190
  breadcrumb: breadcrumb(userType, "EKYC_SUPERVISOR_DASHBOARD", "supervisor-dashboard:id", "EKYC_SUPERVISOR_DETAILS")
7175
7191
  }, {
7176
7192
  path: ["/surveyor-dashboard/:id", "/surveyor-dashboard"],
7177
- component: SurveyorDetailsDashboard,
7193
+ component: SurveyorDetailsCard,
7178
7194
  layout: "action",
7179
7195
  breadcrumb: breadcrumb(userType, "EKYC_SURVEYOR_DASHBOARD", "surveyor-dashboard/:id", "EKYC_SURVEYOR_DETAILS")
7180
7196
  }];
@@ -7275,7 +7291,7 @@ const EmployeeApp = _ref => {
7275
7291
  exact: true,
7276
7292
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7277
7293
  layoutClass: "action"
7278
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
7294
+ }, /*#__PURE__*/React.createElement(SurveyorDetailsCard, null))
7279
7295
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7280
7296
  path: formStepRoutes.map(route => `${path}/${route}`),
7281
7297
  component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
@@ -7307,7 +7323,7 @@ const EmployeeApp = _ref => {
7307
7323
  path: [`${path}/surveyor-dashboard/:id`, `${path}/surveyor-dashboard`],
7308
7324
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7309
7325
  layoutClass: "normal"
7310
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
7326
+ }, /*#__PURE__*/React.createElement(SurveyorDetailsCard, null))
7311
7327
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7312
7328
  path: `${path}/work-order`,
7313
7329
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
@@ -8865,6 +8881,7 @@ const EkycStatus = () => {
8865
8881
  };
8866
8882
 
8867
8883
  const CitizenApp = () => {
8884
+ var _Digit$SessionStorage, _Digit$SessionStorage2;
8868
8885
  const {
8869
8886
  t
8870
8887
  } = useTranslation();
@@ -8872,11 +8889,7 @@ const CitizenApp = () => {
8872
8889
  const {
8873
8890
  path
8874
8891
  } = useRouteMatch();
8875
- const {
8876
- data: {
8877
- stateInfo
8878
- } = {}
8879
- } = Digit.Hooks.useStore.getInitData();
8892
+ const roles = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : _Digit$SessionStorage2.roles.map(ele => ele.code);
8880
8893
  sessionStorage.removeItem("revalidateddone");
8881
8894
  const getDynamicBreadcrumbs = () => {
8882
8895
  const pathname = location.pathname;
@@ -9007,7 +9020,7 @@ const CitizenApp = () => {
9007
9020
  exact: true,
9008
9021
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9009
9022
  layoutClass: "action"
9010
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9023
+ }, /*#__PURE__*/React.createElement(SurveyorDetailsCard, null))
9011
9024
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9012
9025
  path: `${path}/status/:applicationId`,
9013
9026
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
@@ -9031,13 +9044,13 @@ const CitizenApp = () => {
9031
9044
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9032
9045
  path: `${path}/surveyor-dashboard/:id`,
9033
9046
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9034
- layoutClass: "action"
9035
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9047
+ layoutClass: roles.includes("EKYC_SUPERVISOR") ? "action" : "normal"
9048
+ }, /*#__PURE__*/React.createElement(SurveyorDetailsCard, null))
9036
9049
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9037
9050
  path: `${path}/surveyor-dashboard`,
9038
9051
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9039
9052
  layoutClass: "normal"
9040
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9053
+ }, /*#__PURE__*/React.createElement(SurveyorDetailsCard, null))
9041
9054
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9042
9055
  path: `${path}/:id`,
9043
9056
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {