@egovernments/digit-ui-libraries 1.3.3 → 1.3.7
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/README.md +32 -32
- package/dist/index.js +42 -37
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +42 -37
- package/dist/index.modern.js.map +1 -1
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# digit-ui-libraries
|
|
2
|
-
|
|
3
|
-
> Made with @egovernments/create-ui-library
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install --save @egovernments/digit-ui-libraries
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```jsx
|
|
14
|
-
import React from "react";
|
|
15
|
-
import initLibraries from "@egovernments/digit-ui-libraries";
|
|
16
|
-
|
|
17
|
-
import defaultConfig from "./config";
|
|
18
|
-
|
|
19
|
-
const App = ({ deltaConfig, stateCode, cityCode, moduleCode }) => {
|
|
20
|
-
initLibraries();
|
|
21
|
-
|
|
22
|
-
const store = eGov.Services.useStore(defaultConfig, { deltaConfig, stateCode, cityCode, moduleCode });
|
|
23
|
-
|
|
24
|
-
return <p>Create React Library Example 😄</p>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default App;
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## License
|
|
31
|
-
|
|
32
|
-
MIT © [](https://github.com/)
|
|
1
|
+
# digit-ui-libraries
|
|
2
|
+
|
|
3
|
+
> Made with @egovernments/create-ui-library
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save @egovernments/digit-ui-libraries
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import React from "react";
|
|
15
|
+
import initLibraries from "@egovernments/digit-ui-libraries";
|
|
16
|
+
|
|
17
|
+
import defaultConfig from "./config";
|
|
18
|
+
|
|
19
|
+
const App = ({ deltaConfig, stateCode, cityCode, moduleCode }) => {
|
|
20
|
+
initLibraries();
|
|
21
|
+
|
|
22
|
+
const store = eGov.Services.useStore(defaultConfig, { deltaConfig, stateCode, cityCode, moduleCode });
|
|
23
|
+
|
|
24
|
+
return <p>Create React Library Example 😄</p>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default App;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT © [](https://github.com/)
|
package/dist/index.js
CHANGED
|
@@ -220,7 +220,6 @@ var actionHandler = function actionHandler(action, id, fieldList) {
|
|
|
220
220
|
var index = getIndex(id, fieldList);
|
|
221
221
|
|
|
222
222
|
if (!action) {
|
|
223
|
-
console.log("no action found");
|
|
224
223
|
return;
|
|
225
224
|
}
|
|
226
225
|
|
|
@@ -637,8 +636,10 @@ var ServiceRequest = function ServiceRequest(_ref2) {
|
|
|
637
636
|
|
|
638
637
|
var _temp = function () {
|
|
639
638
|
if (window[postHookName] && typeof window[postHookName] === "function") {
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
return Promise.resolve(window[postHookName](resData)).then(function (_await$window$postHoo) {
|
|
640
|
+
_exit = true;
|
|
641
|
+
return _await$window$postHoo;
|
|
642
|
+
});
|
|
642
643
|
}
|
|
643
644
|
}();
|
|
644
645
|
|
|
@@ -2555,7 +2556,6 @@ var StoreService = {
|
|
|
2555
2556
|
},
|
|
2556
2557
|
defaultData: function (stateCode, moduleCode, language) {
|
|
2557
2558
|
try {
|
|
2558
|
-
console.log(moduleCode, stateCode);
|
|
2559
2559
|
var LocalePromise = LocalizationService.getLocale({
|
|
2560
2560
|
modules: ["rainmaker-" + moduleCode.toLowerCase()],
|
|
2561
2561
|
locale: language,
|
|
@@ -36253,9 +36253,7 @@ var useSessionStorage = function useSessionStorage(key, initialValue) {
|
|
|
36253
36253
|
var valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
36254
36254
|
setStoredValue(valueToStore);
|
|
36255
36255
|
Digit.SessionStorage.set(key, valueToStore);
|
|
36256
|
-
} catch (err) {
|
|
36257
|
-
console.log(err);
|
|
36258
|
-
}
|
|
36256
|
+
} catch (err) {}
|
|
36259
36257
|
};
|
|
36260
36258
|
|
|
36261
36259
|
var clearValue = function clearValue() {
|
|
@@ -36371,7 +36369,6 @@ var useFetchBillsForBuissnessService = function useFetchBillsForBuissnessService
|
|
|
36371
36369
|
return Digit.PaymentService.fetchBill(_tenantId, params);
|
|
36372
36370
|
}, _extends({
|
|
36373
36371
|
retry: function retry(count, err) {
|
|
36374
|
-
console.log(err, "inside the payment hook");
|
|
36375
36372
|
return false;
|
|
36376
36373
|
}
|
|
36377
36374
|
}, config)),
|
|
@@ -36670,7 +36667,7 @@ var useLocalities = function useLocalities(tenant, boundaryType, config, t) {
|
|
|
36670
36667
|
}
|
|
36671
36668
|
|
|
36672
36669
|
return reactQuery.useQuery(["BOUNDARY_DATA", tenant, boundaryType], function () {
|
|
36673
|
-
return getLocalities$1[boundaryType](tenant);
|
|
36670
|
+
return getLocalities$1[boundaryType.toLowerCase()](tenant);
|
|
36674
36671
|
}, _extends({
|
|
36675
36672
|
select: function select(data) {
|
|
36676
36673
|
return LocalityService.get(data).map(function (key) {
|
|
@@ -37022,43 +37019,38 @@ var defaultRawSearchHandler = function defaultRawSearchHandler(_ref2, searchKey,
|
|
|
37022
37019
|
};
|
|
37023
37020
|
|
|
37024
37021
|
var defaultCatchSearch = function defaultCatchSearch(Err) {
|
|
37025
|
-
var _Err$response, _Err$response$data, _Err$response$data$Er
|
|
37022
|
+
var _Err$response, _Err$response$data, _Err$response$data$Er;
|
|
37026
37023
|
|
|
37027
37024
|
if (Err !== null && Err !== void 0 && (_Err$response = Err.response) !== null && _Err$response !== void 0 && (_Err$response$data = _Err$response.data) !== null && _Err$response$data !== void 0 && (_Err$response$data$Er = _Err$response$data.Errors) !== null && _Err$response$data$Er !== void 0 && _Err$response$data$Er.some(function (e) {
|
|
37028
37025
|
return e.code === "EG_PT_INVALID_SEARCH" && e.message === " Search is not allowed on empty Criteria, Atleast one criteria should be provided with tenantId for EMPLOYEE";
|
|
37029
37026
|
})) return [];
|
|
37030
|
-
console.log(Err === null || Err === void 0 ? void 0 : (_Err$response2 = Err.response) === null || _Err$response2 === void 0 ? void 0 : _Err$response2.data, " this is error");
|
|
37031
37027
|
throw Err;
|
|
37032
37028
|
};
|
|
37033
37029
|
|
|
37034
37030
|
var callMiddlewares = function callMiddlewares(data, middlewares) {
|
|
37035
|
-
|
|
37036
|
-
|
|
37037
|
-
var itr = -1;
|
|
37031
|
+
var applyBreak = false;
|
|
37032
|
+
var itr = -1;
|
|
37038
37033
|
|
|
37039
|
-
|
|
37040
|
-
|
|
37041
|
-
|
|
37034
|
+
var _break = function _break() {
|
|
37035
|
+
return applyBreak = true;
|
|
37036
|
+
};
|
|
37042
37037
|
|
|
37043
|
-
|
|
37044
|
-
|
|
37045
|
-
|
|
37046
|
-
|
|
37047
|
-
|
|
37048
|
-
|
|
37049
|
-
|
|
37050
|
-
|
|
37051
|
-
|
|
37052
|
-
|
|
37053
|
-
|
|
37054
|
-
|
|
37038
|
+
var _next = function _next(data) {
|
|
37039
|
+
try {
|
|
37040
|
+
if (!applyBreak && ++itr < middlewares.length) {
|
|
37041
|
+
var key = Object.keys(middlewares[itr])[0];
|
|
37042
|
+
var nextMiddleware = middlewares[itr][key];
|
|
37043
|
+
var isAsync = nextMiddleware.constructor.name === "AsyncFunction";
|
|
37044
|
+
if (isAsync) return Promise.resolve(nextMiddleware(data, _break, _next));else return Promise.resolve(nextMiddleware(data, _break, _next));
|
|
37045
|
+
} else return Promise.resolve(data);
|
|
37046
|
+
} catch (e) {
|
|
37047
|
+
return Promise.reject(e);
|
|
37048
|
+
}
|
|
37049
|
+
};
|
|
37055
37050
|
|
|
37056
|
-
|
|
37057
|
-
|
|
37058
|
-
|
|
37059
|
-
} catch (e) {
|
|
37060
|
-
return Promise.reject(e);
|
|
37061
|
-
}
|
|
37051
|
+
return Promise.resolve(_next(data)).then(function (ret) {
|
|
37052
|
+
return ret || [];
|
|
37053
|
+
});
|
|
37062
37054
|
};
|
|
37063
37055
|
|
|
37064
37056
|
var useInboxGeneral = function useInboxGeneral(_ref4) {
|
|
@@ -37611,7 +37603,6 @@ var fetchComplaintDetails = function fetchComplaintDetails(tenantId, id) {
|
|
|
37611
37603
|
}) : null;
|
|
37612
37604
|
return ids ? Promise.resolve(getThumbnails(ids, service.tenantId)).then(_temp2) : _temp2(null);
|
|
37613
37605
|
} else {
|
|
37614
|
-
console.log("error fetching complaint details or service defs");
|
|
37615
37606
|
return {};
|
|
37616
37607
|
}
|
|
37617
37608
|
});
|
|
@@ -38312,6 +38303,9 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
|
|
|
38312
38303
|
|
|
38313
38304
|
case "PostFieldsConfig":
|
|
38314
38305
|
return usePostFieldsConfig();
|
|
38306
|
+
|
|
38307
|
+
default:
|
|
38308
|
+
return null;
|
|
38315
38309
|
}
|
|
38316
38310
|
};
|
|
38317
38311
|
|
|
@@ -39631,6 +39625,9 @@ var usePTGenderMDMS = function usePTGenderMDMS(tenantId, moduleCode, type, confi
|
|
|
39631
39625
|
switch (type) {
|
|
39632
39626
|
case "GenderType":
|
|
39633
39627
|
return usePTGenders();
|
|
39628
|
+
|
|
39629
|
+
default:
|
|
39630
|
+
return null;
|
|
39634
39631
|
}
|
|
39635
39632
|
};
|
|
39636
39633
|
|
|
@@ -39743,6 +39740,9 @@ var useMCollectMDMS = function useMCollectMDMS(tenantId, moduleCode, type, filte
|
|
|
39743
39740
|
|
|
39744
39741
|
case "applicationStatus":
|
|
39745
39742
|
return useMCollectApplcationStatus();
|
|
39743
|
+
|
|
39744
|
+
default:
|
|
39745
|
+
return null;
|
|
39746
39746
|
}
|
|
39747
39747
|
};
|
|
39748
39748
|
|
|
@@ -40486,6 +40486,9 @@ var useTLGenderMDMS = function useTLGenderMDMS(tenantId, moduleCode, type, confi
|
|
|
40486
40486
|
switch (type) {
|
|
40487
40487
|
case "GenderType":
|
|
40488
40488
|
return useTLGenders();
|
|
40489
|
+
|
|
40490
|
+
default:
|
|
40491
|
+
return null;
|
|
40489
40492
|
}
|
|
40490
40493
|
};
|
|
40491
40494
|
|
|
@@ -40979,6 +40982,9 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
|
|
|
40979
40982
|
|
|
40980
40983
|
case "CancelReceiptReasonAndStatus":
|
|
40981
40984
|
return useCancelReceiptReasonAndStatus();
|
|
40985
|
+
|
|
40986
|
+
default:
|
|
40987
|
+
return null;
|
|
40982
40988
|
}
|
|
40983
40989
|
};
|
|
40984
40990
|
|
|
@@ -41138,7 +41144,6 @@ var mobileCheck = function mobileCheck() {
|
|
|
41138
41144
|
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
|
|
41139
41145
|
})(navigator.userAgent || navigator.vendor || window.opera);
|
|
41140
41146
|
|
|
41141
|
-
console.log("check", check);
|
|
41142
41147
|
return check;
|
|
41143
41148
|
};
|
|
41144
41149
|
|