@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 +332 -321
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +333 -321
- 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, _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(
|
|
4867
|
-
vendorId: targetVendorId
|
|
4868
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
5961
|
-
var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4,
|
|
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",
|
|
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:
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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, {
|