@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.
- package/dist/index.js +330 -318
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +331 -318
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
108
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
2087
|
-
|
|
2088
|
-
var
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
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
|
-
|
|
2109
|
-
var
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
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
|
-
|
|
2117
|
-
var
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
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
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
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
|
-
|
|
2152
|
-
FormContext
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
setValue,
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
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
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
5961
|
-
var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4,
|
|
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("COMPLETED"),
|
|
6342
|
-
value: (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo2 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo2 === void 0 ? void 0 : _dashboardData$dashbo2.completed) || 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",
|
|
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:
|
|
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(
|
|
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(
|
|
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, {
|
|
@@ -8868,6 +8883,7 @@ const EkycStatus = () => {
|
|
|
8868
8883
|
};
|
|
8869
8884
|
|
|
8870
8885
|
const CitizenApp = () => {
|
|
8886
|
+
var _Digit$SessionStorage, _Digit$SessionStorage2;
|
|
8871
8887
|
const {
|
|
8872
8888
|
t
|
|
8873
8889
|
} = reactI18next.useTranslation();
|
|
@@ -8875,11 +8891,7 @@ const CitizenApp = () => {
|
|
|
8875
8891
|
const {
|
|
8876
8892
|
path
|
|
8877
8893
|
} = reactRouterDom.useRouteMatch();
|
|
8878
|
-
const
|
|
8879
|
-
data: {
|
|
8880
|
-
stateInfo
|
|
8881
|
-
} = {}
|
|
8882
|
-
} = Digit.Hooks.useStore.getInitData();
|
|
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);
|
|
8883
8895
|
sessionStorage.removeItem("revalidateddone");
|
|
8884
8896
|
const getDynamicBreadcrumbs = () => {
|
|
8885
8897
|
const pathname = location.pathname;
|
|
@@ -9010,7 +9022,7 @@ const CitizenApp = () => {
|
|
|
9010
9022
|
exact: true,
|
|
9011
9023
|
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
9012
9024
|
layoutClass: "action"
|
|
9013
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9025
|
+
}, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
|
|
9014
9026
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9015
9027
|
path: `${path}/status/:applicationId`,
|
|
9016
9028
|
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
@@ -9034,13 +9046,13 @@ const CitizenApp = () => {
|
|
|
9034
9046
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9035
9047
|
path: `${path}/surveyor-dashboard/:id`,
|
|
9036
9048
|
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
9037
|
-
layoutClass: "action"
|
|
9038
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9049
|
+
layoutClass: roles.includes("EKYC_SUPERVISOR") ? "action" : "normal"
|
|
9050
|
+
}, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
|
|
9039
9051
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9040
9052
|
path: `${path}/surveyor-dashboard`,
|
|
9041
9053
|
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
9042
9054
|
layoutClass: "normal"
|
|
9043
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9055
|
+
}, /*#__PURE__*/React__default.createElement(SurveyorDetailsCard, null))
|
|
9044
9056
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9045
9057
|
path: `${path}/:id`,
|
|
9046
9058
|
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|