@3sc/common-component 0.0.5 → 0.0.10
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/App.js +16 -16
- package/dist/components/alert/index.js +7 -4
- package/dist/config/axios.js +38 -37
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -13
- package/dist/index.css.map +1 -0
- package/dist/index.esm.mjs +2 -0
- package/dist/index.esm.mjs.map +1 -0
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/modules/common-component +2 -0
- package/dist/modules/common-component.cjs +2 -0
- package/dist/modules/common-component.cjs.map +1 -0
- package/dist/modules/common-component.css +2 -0
- package/dist/modules/common-component.css.map +1 -0
- package/dist/modules/common-component.map +1 -0
- package/dist/modules/common-component.modern.js +2 -0
- package/dist/modules/common-component.modern.js.map +1 -0
- package/dist/modules/common-component.umd.js +2 -0
- package/dist/modules/common-component.umd.js.map +1 -0
- package/dist/modules/notification.js +7 -2
- package/dist/services/notification.js +7 -5
- package/package.json +6 -7
|
@@ -9,7 +9,12 @@ var _alert = _interopRequireDefault(require("../components/alert"));
|
|
|
9
9
|
var _muiProvider = _interopRequireDefault(require("../config/mui-provider"));
|
|
10
10
|
var _myContext = _interopRequireDefault(require("../config/my-context"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
const Notification =
|
|
13
|
-
|
|
12
|
+
const Notification = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
baseURL
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_muiProvider.default, null, /*#__PURE__*/_react.default.createElement(_myContext.default, null, /*#__PURE__*/_react.default.createElement(_alert.default, {
|
|
17
|
+
baseURL: baseURL
|
|
18
|
+
})));
|
|
14
19
|
};
|
|
15
20
|
exports.Notification = Notification;
|
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.putNotification = exports.getNotification = void 0;
|
|
7
7
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
var _axios = _interopRequireDefault(require("../config/axios"));
|
|
9
8
|
var _Constant = require("../utils/Constant");
|
|
10
9
|
var _EndPoint = _interopRequireDefault(require("../utils/EndPoint"));
|
|
11
10
|
var _Env = _interopRequireDefault(require("../utils/Env"));
|
|
12
11
|
var _LocalStorage = _interopRequireDefault(require("../utils/LocalStorage"));
|
|
12
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
// import instanceAxios from "../config/axios";
|
|
15
|
+
|
|
14
16
|
const {
|
|
15
17
|
TENANT_ID,
|
|
16
18
|
BU_ID,
|
|
@@ -21,9 +23,9 @@ const {
|
|
|
21
23
|
BU_IDS,
|
|
22
24
|
SNOP_IDS
|
|
23
25
|
} = _LocalStorage.default;
|
|
24
|
-
const getNotification = async
|
|
26
|
+
const getNotification = async baseURL => {
|
|
25
27
|
try {
|
|
26
|
-
const url = "".concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
|
|
28
|
+
const url = "".concat(baseURL).concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
|
|
27
29
|
const response = await _axios.default.get(url);
|
|
28
30
|
return response;
|
|
29
31
|
} catch (e) {
|
|
@@ -32,9 +34,9 @@ const getNotification = async () => {
|
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
exports.getNotification = getNotification;
|
|
35
|
-
const putNotification = async payload => {
|
|
37
|
+
const putNotification = async (baseURL, payload) => {
|
|
36
38
|
try {
|
|
37
|
-
const url = "".concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
|
|
39
|
+
const url = "".concat(baseURL).concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
|
|
38
40
|
const response = await _axios.default.put(url, payload);
|
|
39
41
|
return response;
|
|
40
42
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3sc/common-component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react",
|
|
6
6
|
"components",
|
|
7
7
|
"ui"
|
|
8
8
|
],
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"source": "src/modules/index.js",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"README.md"
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
"@testing-library/react": "^13.4.0",
|
|
22
22
|
"@testing-library/user-event": "^13.5.0",
|
|
23
23
|
"axios": "^1.6.5",
|
|
24
|
-
"i": "^0.3.7",
|
|
25
|
-
"npm": "^10.3.0",
|
|
26
24
|
"react": "^18.2.0",
|
|
27
25
|
"react-dom": "^18.2.0",
|
|
28
26
|
"react-scripts": "5.0.1",
|
|
@@ -32,7 +30,7 @@
|
|
|
32
30
|
},
|
|
33
31
|
"scripts": {
|
|
34
32
|
"start": "react-scripts start",
|
|
35
|
-
"build": "
|
|
33
|
+
"build": "microbundle",
|
|
36
34
|
"test": "react-scripts test",
|
|
37
35
|
"eject": "react-scripts eject"
|
|
38
36
|
},
|
|
@@ -58,6 +56,7 @@
|
|
|
58
56
|
"@babel/cli": "^7.23.4",
|
|
59
57
|
"@babel/core": "^7.23.7",
|
|
60
58
|
"@babel/preset-env": "^7.23.8",
|
|
61
|
-
"babel-plugin-inline-dotenv": "^1.7.0"
|
|
59
|
+
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
60
|
+
"microbundle": "^0.15.1"
|
|
62
61
|
}
|
|
63
62
|
}
|