@djb25/digit-ui-module-ekyc 1.0.34 → 1.0.35
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 +254 -324
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +254 -325
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -294,12 +294,7 @@ const DesktopInbox = _ref => {
|
|
|
294
294
|
let row = _ref2.row;
|
|
295
295
|
const kno = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.kno) || ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationNumber) || "NA";
|
|
296
296
|
return /*#__PURE__*/React.createElement("span", {
|
|
297
|
-
className: "
|
|
298
|
-
style: {
|
|
299
|
-
color: "#add8f7",
|
|
300
|
-
cursor: "pointer",
|
|
301
|
-
fontWeight: "bold"
|
|
302
|
-
},
|
|
297
|
+
className: "link",
|
|
303
298
|
onClick: () => handleReview(kno)
|
|
304
299
|
}, kno);
|
|
305
300
|
}
|
|
@@ -341,12 +336,7 @@ const DesktopInbox = _ref => {
|
|
|
341
336
|
let row = _ref6.row;
|
|
342
337
|
const kno = ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.kno) || ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.applicationNumber) || "NA";
|
|
343
338
|
return /*#__PURE__*/React.createElement("span", {
|
|
344
|
-
className: "
|
|
345
|
-
style: {
|
|
346
|
-
color: "#add8f7",
|
|
347
|
-
cursor: "pointer",
|
|
348
|
-
fontWeight: "bold"
|
|
349
|
-
},
|
|
339
|
+
className: "link",
|
|
350
340
|
onClick: () => handleReview(kno)
|
|
351
341
|
}, t("EKYC_REVIEW"));
|
|
352
342
|
}
|
|
@@ -1795,7 +1785,7 @@ const useInboxTableConfig = _ref => {
|
|
|
1795
1785
|
let row = _ref2.row;
|
|
1796
1786
|
const kno = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.kno) || ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationNumber) || "NA";
|
|
1797
1787
|
return /*#__PURE__*/React.createElement("span", {
|
|
1798
|
-
className: "
|
|
1788
|
+
className: "link",
|
|
1799
1789
|
onClick: () => handleReview(kno)
|
|
1800
1790
|
}, kno);
|
|
1801
1791
|
}
|
|
@@ -1829,23 +1819,6 @@ const useInboxTableConfig = _ref => {
|
|
|
1829
1819
|
className: "ekyc-status-tag " + ekycStatus
|
|
1830
1820
|
}, t("" + ekycStatus));
|
|
1831
1821
|
}
|
|
1832
|
-
}, {
|
|
1833
|
-
Header: t("EKYC_REVIEW"),
|
|
1834
|
-
accessor: "review",
|
|
1835
|
-
Cell: _ref6 => {
|
|
1836
|
-
var _row$original7, _row$original8;
|
|
1837
|
-
let row = _ref6.row;
|
|
1838
|
-
const kno = ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.kno) || ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.applicationNumber) || "NA";
|
|
1839
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
1840
|
-
className: "ekyc-application-link",
|
|
1841
|
-
style: {
|
|
1842
|
-
color: "#add8f7",
|
|
1843
|
-
cursor: "pointer",
|
|
1844
|
-
fontWeight: "bold"
|
|
1845
|
-
},
|
|
1846
|
-
onClick: () => handleReview(kno)
|
|
1847
|
-
}, t("EKYC_REVIEW"));
|
|
1848
|
-
}
|
|
1849
1822
|
}];
|
|
1850
1823
|
return {
|
|
1851
1824
|
disableSort: false,
|
|
@@ -1899,263 +1872,260 @@ const useInboxTableConfig = _ref => {
|
|
|
1899
1872
|
};
|
|
1900
1873
|
};
|
|
1901
1874
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
while (++index < length) {
|
|
1926
|
-
const key = tempPath[index];
|
|
1927
|
-
let newValue = value;
|
|
1928
|
-
if (index !== lastIndex) {
|
|
1929
|
-
const objValue = object[key];
|
|
1930
|
-
newValue =
|
|
1931
|
-
isObject(objValue) || Array.isArray(objValue)
|
|
1932
|
-
? objValue
|
|
1933
|
-
: !isNaN(+tempPath[index + 1])
|
|
1934
|
-
? []
|
|
1935
|
-
: {};
|
|
1936
|
-
}
|
|
1937
|
-
object[key] = newValue;
|
|
1938
|
-
object = object[key];
|
|
1939
|
-
}
|
|
1940
|
-
return object;
|
|
1875
|
+
const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
1876
|
+
const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
1877
|
+
function _catch(body, recover) {
|
|
1878
|
+
try {
|
|
1879
|
+
var result = body();
|
|
1880
|
+
} catch (e) {
|
|
1881
|
+
return recover(e);
|
|
1882
|
+
}
|
|
1883
|
+
if (result && result.then) {
|
|
1884
|
+
return result.then(void 0, recover);
|
|
1885
|
+
}
|
|
1886
|
+
return result;
|
|
1887
|
+
}
|
|
1888
|
+
function _finallyRethrows(body, finalizer) {
|
|
1889
|
+
try {
|
|
1890
|
+
var result = body();
|
|
1891
|
+
} catch (e) {
|
|
1892
|
+
return finalizer(true, e);
|
|
1893
|
+
}
|
|
1894
|
+
if (result && result.then) {
|
|
1895
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1896
|
+
}
|
|
1897
|
+
return finalizer(false, result);
|
|
1941
1898
|
}
|
|
1942
1899
|
|
|
1943
|
-
var
|
|
1944
|
-
|
|
1945
|
-
var
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1900
|
+
var isNullOrUndefined = value => value == null;
|
|
1901
|
+
const isObjectType = value => typeof value === 'object';
|
|
1902
|
+
var isObject = value => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !(value instanceof Date);
|
|
1903
|
+
var isKey = value => /^\w*$/.test(value);
|
|
1904
|
+
var compact = value => value.filter(Boolean);
|
|
1905
|
+
var stringToPath = input => compact(input.replace(/["|']/g, '').replace(/\[/g, '.').replace(/\]/g, '').split('.'));
|
|
1906
|
+
function set(object, path, value) {
|
|
1907
|
+
let index = -1;
|
|
1908
|
+
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
1909
|
+
const length = tempPath.length;
|
|
1910
|
+
const lastIndex = length - 1;
|
|
1911
|
+
while (++index < length) {
|
|
1912
|
+
const key = tempPath[index];
|
|
1913
|
+
let newValue = value;
|
|
1914
|
+
if (index !== lastIndex) {
|
|
1915
|
+
const objValue = object[key];
|
|
1916
|
+
newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
|
|
1917
|
+
}
|
|
1918
|
+
object[key] = newValue;
|
|
1919
|
+
object = object[key];
|
|
1920
|
+
}
|
|
1921
|
+
return object;
|
|
1922
|
+
}
|
|
1923
|
+
var isUndefined = val => val === undefined;
|
|
1924
|
+
var get = function (obj, path, defaultValue) {
|
|
1925
|
+
if (obj === void 0) {
|
|
1926
|
+
obj = {};
|
|
1927
|
+
}
|
|
1928
|
+
const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);
|
|
1929
|
+
return isUndefined(result) || result === obj ? isUndefined(obj[path]) ? defaultValue : obj[path] : result;
|
|
1952
1930
|
};
|
|
1953
|
-
|
|
1954
|
-
var
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1931
|
+
var isPrimitive = value => isNullOrUndefined(value) || !isObjectType(value);
|
|
1932
|
+
var isFunction = value => typeof value === 'function';
|
|
1933
|
+
var skipValidation = _ref9 => {
|
|
1934
|
+
let isOnBlur = _ref9.isOnBlur,
|
|
1935
|
+
isOnChange = _ref9.isOnChange,
|
|
1936
|
+
isOnTouch = _ref9.isOnTouch,
|
|
1937
|
+
isTouched = _ref9.isTouched,
|
|
1938
|
+
isReValidateOnBlur = _ref9.isReValidateOnBlur,
|
|
1939
|
+
isReValidateOnChange = _ref9.isReValidateOnChange,
|
|
1940
|
+
isBlurEvent = _ref9.isBlurEvent,
|
|
1941
|
+
isSubmitted = _ref9.isSubmitted,
|
|
1942
|
+
isOnAll = _ref9.isOnAll;
|
|
1943
|
+
if (isOnAll) {
|
|
1944
|
+
return false;
|
|
1945
|
+
} else if (!isSubmitted && isOnTouch) {
|
|
1946
|
+
return !(isTouched || isBlurEvent);
|
|
1947
|
+
} else if (isSubmitted ? isReValidateOnBlur : isOnBlur) {
|
|
1948
|
+
return !isBlurEvent;
|
|
1949
|
+
} else if (isSubmitted ? isReValidateOnChange : isOnChange) {
|
|
1950
|
+
return isBlurEvent;
|
|
1951
|
+
}
|
|
1952
|
+
return true;
|
|
1972
1953
|
};
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1984
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1985
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1986
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1987
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1988
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1989
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1990
|
-
***************************************************************************** */
|
|
1991
|
-
|
|
1992
|
-
function __rest(s, e) {
|
|
1993
|
-
var t = {};
|
|
1994
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1995
|
-
t[p] = s[p];
|
|
1996
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1997
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1998
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1999
|
-
t[p[i]] = s[p[i]];
|
|
2000
|
-
}
|
|
2001
|
-
return t;
|
|
1954
|
+
const isMatchFieldArrayName = (name, searchName) => RegExp(("^" + searchName + "([|.)\\d+").replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name);
|
|
1955
|
+
var isNameInFieldArray = (names, name) => [...names].some(current => isMatchFieldArrayName(name, current));
|
|
1956
|
+
function __rest(s, e) {
|
|
1957
|
+
var t = {};
|
|
1958
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1959
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1960
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1961
|
+
}
|
|
1962
|
+
return t;
|
|
2002
1963
|
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
1964
|
+
const FormContext = createContext(null);
|
|
1965
|
+
FormContext.displayName = 'RHFContext';
|
|
1966
|
+
const useFormContext = () => useContext(FormContext);
|
|
1967
|
+
var getInputValue = event => isPrimitive(event) || !isObject(event.target) || isObject(event.target) && !event.type ? event : isUndefined(event.target.value) ? event.target.checked : event.target.value;
|
|
1968
|
+
function useController(_ref20) {
|
|
1969
|
+
let name = _ref20.name,
|
|
1970
|
+
rules = _ref20.rules,
|
|
1971
|
+
defaultValue = _ref20.defaultValue,
|
|
1972
|
+
control = _ref20.control,
|
|
1973
|
+
onFocus = _ref20.onFocus;
|
|
1974
|
+
const methods = useFormContext();
|
|
1975
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1976
|
+
if (!control && !methods) {
|
|
1977
|
+
throw new Error('📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller');
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
const _ref21 = control || methods.control,
|
|
1981
|
+
defaultValuesRef = _ref21.defaultValuesRef,
|
|
1982
|
+
setValue = _ref21.setValue,
|
|
1983
|
+
register = _ref21.register,
|
|
1984
|
+
unregister = _ref21.unregister,
|
|
1985
|
+
trigger = _ref21.trigger,
|
|
1986
|
+
mode = _ref21.mode,
|
|
1987
|
+
_ref21$reValidateMode = _ref21.reValidateMode,
|
|
1988
|
+
isReValidateOnBlur = _ref21$reValidateMode.isReValidateOnBlur,
|
|
1989
|
+
isReValidateOnChange = _ref21$reValidateMode.isReValidateOnChange,
|
|
1990
|
+
formState = _ref21.formState,
|
|
1991
|
+
_ref21$formStateRef$c = _ref21.formStateRef.current,
|
|
1992
|
+
isSubmitted = _ref21$formStateRef$c.isSubmitted,
|
|
1993
|
+
touched = _ref21$formStateRef$c.touched,
|
|
1994
|
+
errors = _ref21$formStateRef$c.errors,
|
|
1995
|
+
updateFormState = _ref21.updateFormState,
|
|
1996
|
+
readFormStateRef = _ref21.readFormStateRef,
|
|
1997
|
+
fieldsRef = _ref21.fieldsRef,
|
|
1998
|
+
fieldArrayNamesRef = _ref21.fieldArrayNamesRef,
|
|
1999
|
+
shallowFieldsStateRef = _ref21.shallowFieldsStateRef;
|
|
2000
|
+
const isNotFieldArray = !isNameInFieldArray(fieldArrayNamesRef.current, name);
|
|
2001
|
+
const getInitialValue = () => !isUndefined(get(shallowFieldsStateRef.current, name)) && isNotFieldArray ? get(shallowFieldsStateRef.current, name) : isUndefined(defaultValue) ? get(defaultValuesRef.current, name) : defaultValue;
|
|
2002
|
+
const _useState3 = useState(getInitialValue()),
|
|
2003
|
+
value = _useState3[0],
|
|
2004
|
+
setInputStateValue = _useState3[1];
|
|
2005
|
+
const valueRef = useRef(value);
|
|
2006
|
+
const ref = useRef({
|
|
2007
|
+
focus: () => null
|
|
2008
|
+
});
|
|
2009
|
+
const onFocusRef = useRef(onFocus || (() => {
|
|
2010
|
+
if (isFunction(ref.current.focus)) {
|
|
2011
|
+
ref.current.focus();
|
|
2012
|
+
}
|
|
2013
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2014
|
+
if (!isFunction(ref.current.focus)) {
|
|
2015
|
+
console.warn("\uD83D\uDCCB 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method");
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}));
|
|
2019
|
+
const shouldValidate = useCallback(isBlurEvent => !skipValidation(Object.assign({
|
|
2020
|
+
isBlurEvent,
|
|
2021
|
+
isReValidateOnBlur,
|
|
2022
|
+
isReValidateOnChange,
|
|
2023
|
+
isSubmitted,
|
|
2024
|
+
isTouched: !!get(touched, name)
|
|
2025
|
+
}, mode)), [isReValidateOnBlur, isReValidateOnChange, isSubmitted, touched, name, mode]);
|
|
2026
|
+
const commonTask = useCallback(_ref22 => {
|
|
2027
|
+
let event = _ref22[0];
|
|
2028
|
+
const data = getInputValue(event);
|
|
2029
|
+
setInputStateValue(data);
|
|
2030
|
+
valueRef.current = data;
|
|
2031
|
+
return data;
|
|
2032
|
+
}, []);
|
|
2033
|
+
const registerField = useCallback(shouldUpdateValue => {
|
|
2034
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2035
|
+
if (!name) {
|
|
2036
|
+
return console.warn('📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller');
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
if (fieldsRef.current[name]) {
|
|
2040
|
+
fieldsRef.current[name] = Object.assign({
|
|
2041
|
+
ref: fieldsRef.current[name].ref
|
|
2042
|
+
}, rules);
|
|
2043
|
+
} else {
|
|
2044
|
+
register(Object.defineProperties({
|
|
2045
|
+
name,
|
|
2046
|
+
focus: onFocusRef.current
|
|
2047
|
+
}, {
|
|
2048
|
+
value: {
|
|
2049
|
+
set(data) {
|
|
2050
|
+
setInputStateValue(data);
|
|
2051
|
+
valueRef.current = data;
|
|
2052
|
+
},
|
|
2053
|
+
get() {
|
|
2054
|
+
return valueRef.current;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
}), rules);
|
|
2058
|
+
shouldUpdateValue = isUndefined(get(defaultValuesRef.current, name));
|
|
2059
|
+
}
|
|
2060
|
+
shouldUpdateValue && isNotFieldArray && setInputStateValue(getInitialValue());
|
|
2061
|
+
}, [rules, name, register]);
|
|
2062
|
+
useEffect(() => () => unregister(name), [name]);
|
|
2063
|
+
useEffect(() => {
|
|
2064
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2065
|
+
if (isUndefined(value)) {
|
|
2066
|
+
console.warn("\uD83D\uDCCB " + 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)");
|
|
2067
|
+
}
|
|
2068
|
+
if (!isNotFieldArray && isUndefined(defaultValue)) {
|
|
2069
|
+
console.warn('📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller');
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
registerField();
|
|
2073
|
+
}, [registerField]);
|
|
2074
|
+
useEffect(() => {
|
|
2075
|
+
!fieldsRef.current[name] && registerField(true);
|
|
2076
|
+
});
|
|
2077
|
+
const onBlur = useCallback(() => {
|
|
2078
|
+
if (readFormStateRef.current.touched && !get(touched, name)) {
|
|
2079
|
+
set(touched, name, true);
|
|
2080
|
+
updateFormState({
|
|
2081
|
+
touched
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
shouldValidate(true) && trigger(name);
|
|
2085
|
+
}, [name, updateFormState, shouldValidate, trigger, readFormStateRef]);
|
|
2086
|
+
const onChange = useCallback(function () {
|
|
2087
|
+
for (var _len = arguments.length, event = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2088
|
+
event[_key] = arguments[_key];
|
|
2089
|
+
}
|
|
2090
|
+
return setValue(name, commonTask(event), {
|
|
2091
|
+
shouldValidate: shouldValidate(),
|
|
2092
|
+
shouldDirty: true
|
|
2093
|
+
});
|
|
2094
|
+
}, [setValue, name, shouldValidate]);
|
|
2095
|
+
return {
|
|
2096
|
+
field: {
|
|
2097
|
+
onChange,
|
|
2098
|
+
onBlur,
|
|
2099
|
+
name,
|
|
2100
|
+
value,
|
|
2101
|
+
ref
|
|
2102
|
+
},
|
|
2103
|
+
meta: Object.defineProperties({
|
|
2104
|
+
invalid: !!get(errors, name)
|
|
2105
|
+
}, {
|
|
2106
|
+
isDirty: {
|
|
2107
|
+
get() {
|
|
2108
|
+
return !!get(formState.dirtyFields, name);
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
isTouched: {
|
|
2112
|
+
get() {
|
|
2113
|
+
return !!get(formState.touched, name);
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
})
|
|
2117
|
+
};
|
|
2144
2118
|
}
|
|
2145
|
-
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
: render
|
|
2155
|
-
? render(field, meta)
|
|
2156
|
-
: null;
|
|
2119
|
+
const Controller = props => {
|
|
2120
|
+
const as = props.as,
|
|
2121
|
+
render = props.render,
|
|
2122
|
+
rest = __rest(props, ["rules", "as", "render", "defaultValue", "control", "onFocus"]);
|
|
2123
|
+
const _useController = useController(props),
|
|
2124
|
+
field = _useController.field,
|
|
2125
|
+
meta = _useController.meta;
|
|
2126
|
+
const componentProps = Object.assign(Object.assign({}, rest), field);
|
|
2127
|
+
return as ? isValidElement(as) ? cloneElement(as, componentProps) : createElement(as, componentProps) : render ? render(field, meta) : null;
|
|
2157
2128
|
};
|
|
2158
|
-
//# sourceMappingURL=index.esm.js.map
|
|
2159
2129
|
|
|
2160
2130
|
const SearchFormFieldsComponents = _ref => {
|
|
2161
2131
|
let searchFormState = _ref.searchFormState,
|
|
@@ -2366,28 +2336,24 @@ const Inbox = _ref => {
|
|
|
2366
2336
|
onSearchFormReset,
|
|
2367
2337
|
className: "search-form-wns-inbox"
|
|
2368
2338
|
};
|
|
2369
|
-
const FilterFormFields = useCallback(_ref3 => {
|
|
2370
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2371
|
-
}, []);
|
|
2372
2339
|
function formReducer(state, payload) {
|
|
2373
|
-
const storageKey = payload.checkPathName ? "EKYC.INBOX" : "EKYC.SW.INBOX";
|
|
2374
2340
|
switch (payload.action) {
|
|
2375
2341
|
case "mutateSearchForm":
|
|
2376
|
-
Digit.SessionStorage.set(
|
|
2342
|
+
Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
|
|
2377
2343
|
searchForm: payload.data
|
|
2378
2344
|
}));
|
|
2379
2345
|
return _extends({}, state, {
|
|
2380
2346
|
searchForm: payload.data
|
|
2381
2347
|
});
|
|
2382
2348
|
case "mutateFilterForm":
|
|
2383
|
-
Digit.SessionStorage.set(
|
|
2349
|
+
Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
|
|
2384
2350
|
filterForm: payload.data
|
|
2385
2351
|
}));
|
|
2386
2352
|
return _extends({}, state, {
|
|
2387
2353
|
filterForm: payload.data
|
|
2388
2354
|
});
|
|
2389
2355
|
case "mutateTableForm":
|
|
2390
|
-
Digit.SessionStorage.set(
|
|
2356
|
+
Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
|
|
2391
2357
|
tableForm: payload.data
|
|
2392
2358
|
}));
|
|
2393
2359
|
return _extends({}, state, {
|
|
@@ -3190,38 +3156,6 @@ const Create = () => {
|
|
|
3190
3156
|
}));
|
|
3191
3157
|
};
|
|
3192
3158
|
|
|
3193
|
-
// A type of promise-like that resolves synchronously and supports only one observer
|
|
3194
|
-
|
|
3195
|
-
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
3196
|
-
|
|
3197
|
-
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
3198
|
-
|
|
3199
|
-
// Asynchronously call a function and send errors to recovery continuation
|
|
3200
|
-
function _catch(body, recover) {
|
|
3201
|
-
try {
|
|
3202
|
-
var result = body();
|
|
3203
|
-
} catch(e) {
|
|
3204
|
-
return recover(e);
|
|
3205
|
-
}
|
|
3206
|
-
if (result && result.then) {
|
|
3207
|
-
return result.then(void 0, recover);
|
|
3208
|
-
}
|
|
3209
|
-
return result;
|
|
3210
|
-
}
|
|
3211
|
-
|
|
3212
|
-
// Asynchronously await a promise and pass the result to a finally continuation
|
|
3213
|
-
function _finallyRethrows(body, finalizer) {
|
|
3214
|
-
try {
|
|
3215
|
-
var result = body();
|
|
3216
|
-
} catch (e) {
|
|
3217
|
-
return finalizer(true, e);
|
|
3218
|
-
}
|
|
3219
|
-
if (result && result.then) {
|
|
3220
|
-
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
3221
|
-
}
|
|
3222
|
-
return finalizer(false, result);
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
3159
|
const ActionButton = _ref => {
|
|
3226
3160
|
let jumpTo = _ref.jumpTo,
|
|
3227
3161
|
state = _ref.state;
|
|
@@ -6045,12 +5979,7 @@ const tableColumnConfig = (t, handleReview) => [{
|
|
|
6045
5979
|
let row = _ref.row;
|
|
6046
5980
|
const id = (_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.id;
|
|
6047
5981
|
return /*#__PURE__*/React.createElement("span", {
|
|
6048
|
-
className: "
|
|
6049
|
-
style: {
|
|
6050
|
-
color: "#318ED0",
|
|
6051
|
-
cursor: "pointer",
|
|
6052
|
-
fontSize: "16px"
|
|
6053
|
-
},
|
|
5982
|
+
className: "link",
|
|
6054
5983
|
onClick: () => handleReview(id)
|
|
6055
5984
|
}, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.surveyorName) || ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.name) || "NA");
|
|
6056
5985
|
}
|