@djb25/digit-ui-module-ekyc 1.0.73 → 1.0.75

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, _Digit$UserService$ge, _Digit$UserService$ge2, _progressData$supervi, _fullName$charAt;
4835
4855
  const {
4836
4856
  t
4837
4857
  } = reactI18next.useTranslation();
@@ -4863,10 +4883,9 @@ const SupervisorDetailsCard = () => {
4863
4883
  const {
4864
4884
  isLoading: isProgressLoading,
4865
4885
  data: progressData
4866
- } = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
4867
- vendorId: targetVendorId,
4868
- vendorIds: [targetVendorId]
4869
- } : {}, {
4886
+ } = Digit.Hooks.ekyc.useEkycAssignmentProgress({
4887
+ vendorId: targetVendorId
4888
+ }, {
4870
4889
  enabled: !!tenantId,
4871
4890
  keepPreviousData: true
4872
4891
  });
@@ -5037,6 +5056,12 @@ const SupervisorDetailsCard = () => {
5037
5056
  const surveyors = React.useMemo(() => {
5038
5057
  return (supervisor === null || supervisor === void 0 ? void 0 : supervisor.surveyors) || [];
5039
5058
  }, [supervisor]);
5059
+ const [currentPage, setCurrentPage] = React.useState(0);
5060
+ const [pageSize, setPageSize] = React.useState(20);
5061
+ const userRoles = (_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.roles;
5062
+ const isSupervisor = userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => role.code === "EKYC_SUPERVISOR");
5063
+ const currentSupervisor = isSupervisor ? (progressData === null || progressData === void 0 ? void 0 : progressData.supervisorReport[0]) || [] : 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);
5064
+ const surveyorsData = (currentSupervisor === null || currentSupervisor === void 0 ? void 0 : currentSupervisor.surveyors) || [];
5040
5065
  const cards = React.useMemo(() => [{
5041
5066
  label: "TOTAL_EKYC_APPLICATIONS",
5042
5067
  count: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.totalKnos) || 0,
@@ -5062,13 +5087,6 @@ const SupervisorDetailsCard = () => {
5062
5087
  type: "progress",
5063
5088
  icon: /*#__PURE__*/React__default.createElement(fa.FaChartLine, null)
5064
5089
  }], [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
5090
  const surveyorColumns = React.useMemo(() => [{
5073
5091
  Header: t("SURVEYOR_NAME") || "Surveyor Name",
5074
5092
  accessor: row => (row === null || row === void 0 ? void 0 : row.surveyorName) || "N/A",
@@ -5484,7 +5502,7 @@ const SupervisorDetailsCard = () => {
5484
5502
  tableTitle: t("CONNECTED_SURVEYORS") || "Connected Surveyors",
5485
5503
  tableClass: "ekycTable",
5486
5504
  isTableScrollable: true,
5487
- data: paginatedSurveyors,
5505
+ data: surveyorsData,
5488
5506
  columns: surveyorColumns,
5489
5507
  isLoading: isProgressLoading,
5490
5508
  totalRecords: surveyors.length,
@@ -5627,7 +5645,7 @@ const AssignEkycModal = _ref => {
5627
5645
  isFetching: isLoading,
5628
5646
  refetch: refetchApplicationList
5629
5647
  } = Digit.Hooks.ekyc.useEkycApplicationList({
5630
- unassignedOnly: !isReassign,
5648
+ assignedOnly: isReassign,
5631
5649
  ...(filters.kno && {
5632
5650
  kno: filters.kno
5633
5651
  }),
@@ -5957,8 +5975,8 @@ const AssignEkycModal = _ref => {
5957
5975
  }));
5958
5976
  };
5959
5977
 
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;
5978
+ const SurveyorDetailsCard = () => {
5979
+ 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
5980
  const tenantId = Digit.ULBService.getCurrentTenantId();
5963
5981
  const [showModal, setShowModal] = React.useState(null);
5964
5982
  const [showOptions, setShowOptions] = React.useState(false);
@@ -6313,55 +6331,27 @@ const SurveyorDetailsDashboard = () => {
6313
6331
  className: "surveyor-dashboard"
6314
6332
  }, /*#__PURE__*/React__default.createElement("div", {
6315
6333
  className: "ekyc-dashboard-section"
6334
+ }, /*#__PURE__*/React__default.createElement("div", {
6335
+ className: "ekyc-details-wrapper"
6336
+ }, /*#__PURE__*/React__default.createElement("div", {
6337
+ className: "details-top-row"
6338
+ }, /*#__PURE__*/React__default.createElement("div", {
6339
+ className: "detail-item first-row"
6316
6340
  }, /*#__PURE__*/React__default.createElement("div", {
6317
6341
  className: "ekyc-dashboard-header"
6318
6342
  }, /*#__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
6343
  className: "header-content"
6322
6344
  }, /*#__PURE__*/React__default.createElement("h2", {
6323
6345
  className: "name"
6324
6346
  }, fullName), /*#__PURE__*/React__default.createElement("div", {
6325
6347
  className: "designation"
6326
- }, (surveyor === null || surveyor === void 0 ? void 0 : surveyor.description) || t("FIELD_SURVEYOR")))), /*#__PURE__*/React__default.createElement("div", {
6348
+ }, "(", (surveyor === null || surveyor === void 0 ? void 0 : surveyor.description) || t("FIELD_SURVEYOR"), ")"))), /*#__PURE__*/React__default.createElement("div", {
6327
6349
  className: "report-download"
6328
6350
  }, /*#__PURE__*/React__default.createElement("button", {
6329
6351
  className: "download-btn",
6330
6352
  disabled: reportLoading,
6331
6353
  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", {
6354
+ }, reportLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_REPORT") || "Download Report")))), /*#__PURE__*/React__default.createElement("div", {
6365
6355
  className: "details-top-row"
6366
6356
  }, /*#__PURE__*/React__default.createElement("div", {
6367
6357
  className: "detail-item"
@@ -6491,7 +6481,33 @@ const SurveyorDetailsDashboard = () => {
6491
6481
  className: "label"
6492
6482
  }, t("SUPERVISOR_NAME") || "Supervisor Name"), /*#__PURE__*/React__default.createElement("span", {
6493
6483
  className: "value"
6494
- }, supervisorName))))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
6484
+ }, supervisorName))))), /*#__PURE__*/React__default.createElement("div", {
6485
+ className: "stats-wrapper"
6486
+ }, /*#__PURE__*/React__default.createElement(StatCard, {
6487
+ title: t("TOTAL_ASSIGNED"),
6488
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.total) || 0,
6489
+ type: "today",
6490
+ isLoading: isDashboardLoading,
6491
+ icon: /*#__PURE__*/React__default.createElement(fa.FaUsers, null)
6492
+ }), /*#__PURE__*/React__default.createElement(StatCard, {
6493
+ title: t("IN_PROGRESS"),
6494
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo2 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo2 === void 0 ? void 0 : _dashboardData$dashbo2.inProgressCount) || 0,
6495
+ type: "week",
6496
+ isLoading: isDashboardLoading,
6497
+ icon: /*#__PURE__*/React__default.createElement(fa.FaCheckCircle, null)
6498
+ }), /*#__PURE__*/React__default.createElement(StatCard, {
6499
+ title: t("PENDING"),
6500
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo3 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo3 === void 0 ? void 0 : _dashboardData$dashbo3.pending) || 0,
6501
+ type: "pending",
6502
+ isLoading: isDashboardLoading,
6503
+ icon: /*#__PURE__*/React__default.createElement(fa.FaClock, null)
6504
+ }), /*#__PURE__*/React__default.createElement(StatCard, {
6505
+ title: t("SUBMITTED"),
6506
+ value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo4 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo4 === void 0 ? void 0 : _dashboardData$dashbo4.submittedCount) || 0,
6507
+ type: "month",
6508
+ isLoading: isDashboardLoading,
6509
+ icon: /*#__PURE__*/React__default.createElement(fa.FaChartLine, null)
6510
+ })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
6495
6511
  t: t,
6496
6512
  tableTitle: t("ASSIGNED_KNOS"),
6497
6513
  tableClass: "ekycTable",
@@ -7177,7 +7193,7 @@ const getEkycRoutes = (userType, t) => [{
7177
7193
  breadcrumb: breadcrumb(userType, "EKYC_SUPERVISOR_DASHBOARD", "supervisor-dashboard:id", "EKYC_SUPERVISOR_DETAILS")
7178
7194
  }, {
7179
7195
  path: ["/surveyor-dashboard/:id", "/surveyor-dashboard"],
7180
- component: SurveyorDetailsDashboard,
7196
+ component: SurveyorDetailsCard,
7181
7197
  layout: "action",
7182
7198
  breadcrumb: breadcrumb(userType, "EKYC_SURVEYOR_DASHBOARD", "surveyor-dashboard/:id", "EKYC_SURVEYOR_DETAILS")
7183
7199
  }];
@@ -7278,7 +7294,7 @@ const EmployeeApp = _ref => {
7278
7294
  exact: true,
7279
7295
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
7280
7296
  layoutClass: "action"
7281
- }, /*#__PURE__*/React__default.createElement(SurveyorDetailsDashboard, null))
7297
+ }, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
7282
7298
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
7283
7299
  path: formStepRoutes.map(route => `${path}/${route}`),
7284
7300
  component: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
@@ -7310,7 +7326,7 @@ const EmployeeApp = _ref => {
7310
7326
  path: [`${path}/surveyor-dashboard/:id`, `${path}/surveyor-dashboard`],
7311
7327
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
7312
7328
  layoutClass: "normal"
7313
- }, /*#__PURE__*/React__default.createElement(SurveyorDetailsDashboard, null))
7329
+ }, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
7314
7330
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
7315
7331
  path: `${path}/work-order`,
7316
7332
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
@@ -8877,11 +8893,6 @@ const CitizenApp = () => {
8877
8893
  path
8878
8894
  } = reactRouterDom.useRouteMatch();
8879
8895
  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
8896
  sessionStorage.removeItem("revalidateddone");
8886
8897
  const getDynamicBreadcrumbs = () => {
8887
8898
  const pathname = location.pathname;
@@ -9012,7 +9023,7 @@ const CitizenApp = () => {
9012
9023
  exact: true,
9013
9024
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
9014
9025
  layoutClass: "action"
9015
- }, /*#__PURE__*/React__default.createElement(SurveyorDetailsDashboard, null))
9026
+ }, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
9016
9027
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
9017
9028
  path: `${path}/status/:applicationId`,
9018
9029
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
@@ -9037,12 +9048,12 @@ const CitizenApp = () => {
9037
9048
  path: `${path}/surveyor-dashboard/:id`,
9038
9049
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
9039
9050
  layoutClass: roles.includes("EKYC_SUPERVISOR") ? "action" : "normal"
9040
- }, /*#__PURE__*/React__default.createElement(SurveyorDetailsDashboard, null))
9051
+ }, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
9041
9052
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
9042
9053
  path: `${path}/surveyor-dashboard`,
9043
9054
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
9044
9055
  layoutClass: "normal"
9045
- }, /*#__PURE__*/React__default.createElement(SurveyorDetailsDashboard, null))
9056
+ }, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
9046
9057
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
9047
9058
  path: `${path}/:id`,
9048
9059
  component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {