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