@3sc/common-component 0.0.10 → 0.0.12
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 +8 -20
- package/dist/index.es.js +22242 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +253 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +48 -62
- package/dist/App.js +0 -17
- package/dist/App.test.js +0 -10
- package/dist/components/alert/alert-body.js +0 -155
- package/dist/components/alert/details-body.js +0 -128
- package/dist/components/alert/index.js +0 -266
- package/dist/components/alert/style.scss +0 -166
- package/dist/components/alert/table-detail.js +0 -37
- package/dist/components/bell.js +0 -45
- package/dist/components/index.js +0 -13
- package/dist/components/input-field/index.js +0 -67
- package/dist/components/my-dialog.js +0 -119
- package/dist/components/my-pagination/index.js +0 -54
- package/dist/components/my-pagination/logs.js +0 -24
- package/dist/components/notification-card/card.js +0 -107
- package/dist/components/notification-card/index.js +0 -36
- package/dist/components/select-field/index.js +0 -55
- package/dist/components/select-field/react-select.js +0 -31
- package/dist/components/sort-icon/index.js +0 -26
- package/dist/config/axios.js +0 -41
- package/dist/config/mui-provider.js +0 -19
- package/dist/config/my-context.js +0 -67
- package/dist/config/theme.js +0 -22
- package/dist/helper/common-fun.js +0 -90
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
- package/dist/index.esm.mjs +0 -2
- package/dist/index.esm.mjs.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/index.modern.js +0 -2
- package/dist/index.modern.js.map +0 -1
- package/dist/index.modern.mjs +0 -2
- package/dist/index.modern.mjs.map +0 -1
- package/dist/index.module.js +0 -2
- package/dist/index.module.js.map +0 -1
- package/dist/modules/common-component +0 -2
- package/dist/modules/common-component.cjs +0 -2
- package/dist/modules/common-component.cjs.map +0 -1
- package/dist/modules/common-component.css +0 -2
- package/dist/modules/common-component.css.map +0 -1
- package/dist/modules/common-component.map +0 -1
- package/dist/modules/common-component.modern.js +0 -2
- package/dist/modules/common-component.modern.js.map +0 -1
- package/dist/modules/common-component.umd.js +0 -2
- package/dist/modules/common-component.umd.js.map +0 -1
- package/dist/modules/index.js +0 -12
- package/dist/modules/notification.js +0 -20
- package/dist/reportWebVitals.js +0 -30
- package/dist/sass/_base.scss +0 -271
- package/dist/sass/_colors.scss +0 -7
- package/dist/sass/_typography.scss +0 -1
- package/dist/sass/fonts/montserrat-v25-latin-300.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-300.svg +0 -326
- package/dist/sass/fonts/montserrat-v25-latin-300.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-300.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-300.woff2 +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-500.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-500.svg +0 -328
- package/dist/sass/fonts/montserrat-v25-latin-500.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-500.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-500.woff2 +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-600.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-600.svg +0 -329
- package/dist/sass/fonts/montserrat-v25-latin-600.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-600.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-600.woff2 +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-700.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-700.svg +0 -329
- package/dist/sass/fonts/montserrat-v25-latin-700.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-700.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-700.woff2 +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-800.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-800.svg +0 -329
- package/dist/sass/fonts/montserrat-v25-latin-800.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-800.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-800.woff2 +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-regular.eot +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-regular.svg +0 -327
- package/dist/sass/fonts/montserrat-v25-latin-regular.ttf +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-regular.woff +0 -0
- package/dist/sass/fonts/montserrat-v25-latin-regular.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-300.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-300.svg +0 -321
- package/dist/sass/fonts/poppins-v20-latin-300.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-300.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-300.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-500.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-500.svg +0 -323
- package/dist/sass/fonts/poppins-v20-latin-500.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-500.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-500.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-600.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-600.svg +0 -322
- package/dist/sass/fonts/poppins-v20-latin-600.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-600.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-600.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-700.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-700.svg +0 -322
- package/dist/sass/fonts/poppins-v20-latin-700.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-700.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-700.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-800.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-800.svg +0 -320
- package/dist/sass/fonts/poppins-v20-latin-800.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-800.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-800.woff2 +0 -0
- package/dist/sass/fonts/poppins-v20-latin-regular.eot +0 -0
- package/dist/sass/fonts/poppins-v20-latin-regular.svg +0 -323
- package/dist/sass/fonts/poppins-v20-latin-regular.ttf +0 -0
- package/dist/sass/fonts/poppins-v20-latin-regular.woff +0 -0
- package/dist/sass/fonts/poppins-v20-latin-regular.woff2 +0 -0
- package/dist/sass/main.scss +0 -3
- package/dist/services/notification.js +0 -47
- package/dist/setupTests.js +0 -3
- package/dist/utils/ActionType.js +0 -13
- package/dist/utils/Constant.js +0 -54
- package/dist/utils/EndPoint.js +0 -10
- package/dist/utils/Env.js +0 -14
- package/dist/utils/ErrorMsg.js +0 -14
- package/dist/utils/LocalStorage.js +0 -17
- package/dist/utils/StatusCode.js +0 -16
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,*:after,*:before{margin:0;padding:0}html{font-size:65%}@media only screen and (min-width: 1600px){html{font-size:100%}}body{box-sizing:border-box;position:relative;font-family:Montserrat,sans-serif;font-style:normal;font-weight:500;font-size:1rem;line-height:1.25rem}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(./fonts/poppins-v20-latin-300.eot);src:local(""),url(./fonts/poppins-v20-latin-300.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-300.woff2) format("woff2"),url(./fonts/poppins-v20-latin-300.woff) format("woff"),url(./fonts/poppins-v20-latin-300.ttf) format("truetype"),url(./fonts/poppins-v20-latin-300.svg#Poppins) format("svg")}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(./fonts/poppins-v20-latin-regular.eot);src:local(""),url(./fonts/poppins-v20-latin-regular.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-regular.woff2) format("woff2"),url(./fonts/poppins-v20-latin-regular.woff) format("woff"),url(./fonts/poppins-v20-latin-regular.ttf) format("truetype"),url(./fonts/poppins-v20-latin-regular.svg#Poppins) format("svg")}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(./fonts/poppins-v20-latin-500.eot);src:local(""),url(./fonts/poppins-v20-latin-500.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-500.woff2) format("woff2"),url(./fonts/poppins-v20-latin-500.woff) format("woff"),url(./fonts/poppins-v20-latin-500.ttf) format("truetype"),url(./fonts/poppins-v20-latin-500.svg#Poppins) format("svg")}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(./fonts/poppins-v20-latin-600.eot);src:local(""),url(./fonts/poppins-v20-latin-600.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-600.woff2) format("woff2"),url(./fonts/poppins-v20-latin-600.woff) format("woff"),url(./fonts/poppins-v20-latin-600.ttf) format("truetype"),url(./fonts/poppins-v20-latin-600.svg#Poppins) format("svg")}@font-face{font-family:Poppins;font-style:normal;font-weight:700;src:url(./fonts/poppins-v20-latin-700.eot);src:local(""),url(./fonts/poppins-v20-latin-700.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-700.woff2) format("woff2"),url(./fonts/poppins-v20-latin-700.woff) format("woff"),url(./fonts/poppins-v20-latin-700.ttf) format("truetype"),url(./fonts/poppins-v20-latin-700.svg#Poppins) format("svg")}@font-face{font-family:Poppins;font-style:normal;font-weight:800;src:url(./fonts/poppins-v20-latin-800.eot);src:local(""),url(./fonts/poppins-v20-latin-800.eot?#iefix) format("embedded-opentype"),url(./fonts/poppins-v20-latin-800.woff2) format("woff2"),url(./fonts/poppins-v20-latin-800.woff) format("woff"),url(./fonts/poppins-v20-latin-800.ttf) format("truetype"),url(./fonts/poppins-v20-latin-800.svg#Poppins) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:300;src:url(./fonts/montserrat-v25-latin-300.eot);src:local(""),url(./fonts/montserrat-v25-latin-300.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-300.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-300.woff) format("woff"),url(./fonts/montserrat-v25-latin-300.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-300.svg#Montserrat) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:400;src:url(./fonts/montserrat-v25-latin-regular.eot);src:local(""),url(./fonts/montserrat-v25-latin-regular.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-regular.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-regular.woff) format("woff"),url(./fonts/montserrat-v25-latin-regular.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-regular.svg#Montserrat) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:500;src:url(./fonts/montserrat-v25-latin-500.eot);src:local(""),url(./fonts/montserrat-v25-latin-500.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-500.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-500.woff) format("woff"),url(./fonts/montserrat-v25-latin-500.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-500.svg#Montserrat) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:600;src:url(./fonts/montserrat-v25-latin-600.eot);src:local(""),url(./fonts/montserrat-v25-latin-600.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-600.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-600.woff) format("woff"),url(./fonts/montserrat-v25-latin-600.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-600.svg#Montserrat) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:700;src:url(./fonts/montserrat-v25-latin-700.eot);src:local(""),url(./fonts/montserrat-v25-latin-700.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-700.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-700.woff) format("woff"),url(./fonts/montserrat-v25-latin-700.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-700.svg#Montserrat) format("svg")}@font-face{font-family:Montserrat;font-style:normal;font-weight:800;src:url(./fonts/montserrat-v25-latin-800.eot);src:local(""),url(./fonts/montserrat-v25-latin-800.eot?#iefix) format("embedded-opentype"),url(./fonts/montserrat-v25-latin-800.woff2) format("woff2"),url(./fonts/montserrat-v25-latin-800.woff) format("woff"),url(./fonts/montserrat-v25-latin-800.ttf) format("truetype"),url(./fonts/montserrat-v25-latin-800.svg#Montserrat) format("svg")}.notification-dialog .title{color:#1d1d1b;font-family:Montserrat,sans-serif;font-size:1.6rem;font-weight:600;width:95%;line-height:1.2}.notification-dialog .sub-title{color:#e94f1c;font-weight:500;margin-top:.5rem}.notification-dialog .dialog-action{display:flex;align-items:center;justify-content:space-between}.notification-dialog .dialog-action .view-all{color:#1d1d1b;font-family:Montserrat,sans-serif;font-weight:500;text-transform:initial;font-size:1.2rem}.notification-dialog .cards{padding:.5rem 0}.notification-dialog .cards:not(:last-child){border-bottom:1px solid rgba(0,0,0,.12);padding-bottom:.5rem}.notification-dialog .cards .badge{margin-top:.6rem}.notification-dialog .cards .title-card{color:#1d1d1b;font-family:Montserrat,sans-serif;font-size:1rem;font-weight:600;max-height:2.625rem;overflow:hidden;text-overflow:ellipsis;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.notification-dialog .cards .sub-title{font-size:1rem;color:#acb2ba;font-family:Montserrat,sans-serif;font-weight:600;text-align:right;margin:.2rem 0}.notification-dialog .cards .read{font-weight:400}.alert-dialog-main .MuiPaper-root{width:35rem}.alert-dialog-main .no-record{font-family:Montserrat,sans-serif;font-size:1.2rem;font-weight:600;text-transform:initial;color:#1d1d1b;text-align:center}.alert-dialog .MuiPaper-root{width:70rem}.alert-dialog .no-record{font-family:Montserrat,sans-serif;font-size:1.2rem;font-weight:600;text-transform:initial;color:#1d1d1b;text-align:center}.alert-dialog .sticky-input-select{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:1;position:sticky;background:#fff;z-index:1;width:100%;top:0;height:5rem}.action-show-all-dialog .view-all{font-family:Montserrat,sans-serif;font-weight:500;text-transform:initial;font-size:1.2rem}.table{width:100%;border-collapse:collapse}.table tr th span{display:flex;align-items:center;justify-content:space-between;gap:.5rem;cursor:pointer}.table th,.table td{border:.125rem solid #1D1D1B;font-family:Montserrat,sans-serif}.table th{word-break:break-word;font-weight:600;font-size:1.3rem;line-height:1.5rem;color:#1d1d1b;background:#efefef;padding:.6rem 1.3125rem;text-align:left;vertical-align:middle}.table td{word-break:break-word;color:#212529;font-size:1.1rem;line-height:1.25rem;padding:.6rem 1.3125rem}
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
CHANGED
|
@@ -1,62 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@3sc/common-component",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"development": [
|
|
50
|
-
"last 1 chrome version",
|
|
51
|
-
"last 1 firefox version",
|
|
52
|
-
"last 1 safari version"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@babel/cli": "^7.23.4",
|
|
57
|
-
"@babel/core": "^7.23.7",
|
|
58
|
-
"@babel/preset-env": "^7.23.8",
|
|
59
|
-
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
60
|
-
"microbundle": "^0.15.1"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@3sc/common-component",
|
|
3
|
+
"version": "0.0.12",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.umd.js",
|
|
6
|
+
"module": "dist/index.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.es.js",
|
|
11
|
+
"require": "./dist/index.umd.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"/dist"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "restricted"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"build": "vite build",
|
|
24
|
+
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
|
25
|
+
"preview": "vite preview"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@emotion/react": "^11.11.3",
|
|
29
|
+
"@emotion/styled": "^11.11.0",
|
|
30
|
+
"@mui/icons-material": "^5.15.6",
|
|
31
|
+
"@mui/material": "^5.15.6",
|
|
32
|
+
"axios": "^1.6.5",
|
|
33
|
+
"react": "^18.2.0",
|
|
34
|
+
"react-dom": "^18.2.0",
|
|
35
|
+
"react-select": "^5.8.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/react": "^18.2.43",
|
|
39
|
+
"@types/react-dom": "^18.2.17",
|
|
40
|
+
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
41
|
+
"eslint": "^8.55.0",
|
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
|
43
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
44
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
45
|
+
"sass": "^1.70.0",
|
|
46
|
+
"vite": "^5.0.8"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/App.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _modules = require("./modules");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
function App() {
|
|
11
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
12
|
-
className: "App"
|
|
13
|
-
}, "hello", /*#__PURE__*/_react.default.createElement(_modules.Notification, null));
|
|
14
|
-
}
|
|
15
|
-
var _default = exports.default = App; // tenantId="9a33965c-162a-4089-8cb1-5e631e3cdd8a"
|
|
16
|
-
// buId="d628f9a3-1968-4102-b578-727616b382f3"
|
|
17
|
-
// snopId="13a53238-f493-41a5-9d17-7b95aeed7964"
|
package/dist/App.test.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _react = require("@testing-library/react");
|
|
4
|
-
var _App = _interopRequireDefault(require("./App"));
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
test('renders learn react link', () => {
|
|
7
|
-
(0, _react.render)( /*#__PURE__*/React.createElement(_App.default, null));
|
|
8
|
-
const linkElement = _react.screen.getByText(/learn react/i);
|
|
9
|
-
expect(linkElement).toBeInTheDocument();
|
|
10
|
-
});
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _ErrorMsg = _interopRequireDefault(require("../../utils/ErrorMsg"));
|
|
12
|
-
var _inputField = _interopRequireDefault(require("../input-field"));
|
|
13
|
-
var _Search = _interopRequireDefault(require("@mui/icons-material/Search"));
|
|
14
|
-
var _Refresh = _interopRequireDefault(require("@mui/icons-material/Refresh"));
|
|
15
|
-
var _Constant = require("../../utils/Constant");
|
|
16
|
-
var _card = _interopRequireDefault(require("../notification-card/card"));
|
|
17
|
-
var _commonFun = require("../../helper/common-fun");
|
|
18
|
-
var _myPagination = _interopRequireDefault(require("../my-pagination"));
|
|
19
|
-
var _logs = _interopRequireDefault(require("../my-pagination/logs"));
|
|
20
|
-
var _reactSelect = _interopRequireDefault(require("../select-field/react-select"));
|
|
21
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
-
const AlertBody = _ref => {
|
|
25
|
-
let {
|
|
26
|
-
loading,
|
|
27
|
-
isEmpty,
|
|
28
|
-
data,
|
|
29
|
-
handleShowDetails: _handleShowDetails,
|
|
30
|
-
handleRead: _handleRead,
|
|
31
|
-
handleRefresh
|
|
32
|
-
} = _ref;
|
|
33
|
-
const [inputValue, setInputValue] = (0, _react.useState)("");
|
|
34
|
-
const [page, setPage] = (0, _react.useState)(1);
|
|
35
|
-
const [rowPerPage, setRowPerPage] = (0, _react.useState)(10);
|
|
36
|
-
const [total, setTotal] = (0, _react.useState)(0);
|
|
37
|
-
const [newData, setNewData] = (0, _react.useState)([]);
|
|
38
|
-
const [selectedAlert, setSelectedAlert] = (0, _react.useState)([]);
|
|
39
|
-
(0, _react.useEffect)(() => {
|
|
40
|
-
if (inputValue) {
|
|
41
|
-
const newData = (0, _commonFun.searchByKeyArr)(data, _Constant.alertSearchKey, inputValue);
|
|
42
|
-
setNewData((0, _commonFun.dataSlice)(newData, page, rowPerPage));
|
|
43
|
-
setTotal(newData.length);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
setNewData((0, _commonFun.dataSlice)(data, page, rowPerPage));
|
|
47
|
-
setTotal(data.length);
|
|
48
|
-
}, [inputValue, data, page, rowPerPage]);
|
|
49
|
-
const handleSelectChange = e => {
|
|
50
|
-
setPage(1);
|
|
51
|
-
setRowPerPage(e.value);
|
|
52
|
-
};
|
|
53
|
-
const handleChangePage = page => {
|
|
54
|
-
setPage(page);
|
|
55
|
-
};
|
|
56
|
-
const handleSearch = e => {
|
|
57
|
-
const value = e.target.value;
|
|
58
|
-
if (value) setPage(1);
|
|
59
|
-
setInputValue(value);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// checkbox handler
|
|
63
|
-
const handleCheckboxChange = (e, value) => {
|
|
64
|
-
const checked = e.target.checked;
|
|
65
|
-
if (checked) {
|
|
66
|
-
setSelectedAlert(prev => [...prev, value]);
|
|
67
|
-
} else {
|
|
68
|
-
setSelectedAlert(prev => prev.filter(item => item !== value));
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const handleAllRead = () => {
|
|
72
|
-
_handleRead(selectedAlert);
|
|
73
|
-
setSelectedAlert([]);
|
|
74
|
-
};
|
|
75
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.DialogContent, {
|
|
76
|
-
dividers: true,
|
|
77
|
-
sx: {
|
|
78
|
-
pt: "0 !important"
|
|
79
|
-
}
|
|
80
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
81
|
-
sx: loading || isEmpty ? {
|
|
82
|
-
display: "flex",
|
|
83
|
-
justifyContent: "center",
|
|
84
|
-
alignItems: "center",
|
|
85
|
-
minHeight: 320
|
|
86
|
-
} : {}
|
|
87
|
-
}, loading ? /*#__PURE__*/_react.default.createElement(_material.CircularProgress, null) : isEmpty ? /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
88
|
-
className: "no-record"
|
|
89
|
-
}, _ErrorMsg.default.NRF) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
90
|
-
className: "sticky-input-select"
|
|
91
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
92
|
-
sx: {
|
|
93
|
-
display: "flex",
|
|
94
|
-
gap: 1
|
|
95
|
-
}
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement(_inputField.default, {
|
|
97
|
-
value: inputValue,
|
|
98
|
-
onChange: handleSearch,
|
|
99
|
-
label: "Search",
|
|
100
|
-
focused: true,
|
|
101
|
-
adornmentIcon: {
|
|
102
|
-
startAdornment: /*#__PURE__*/_react.default.createElement(_material.InputAdornment, {
|
|
103
|
-
position: "start"
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(_Search.default, null))
|
|
105
|
-
}
|
|
106
|
-
}), /*#__PURE__*/_react.default.createElement(_reactSelect.default, {
|
|
107
|
-
value: {
|
|
108
|
-
value: rowPerPage,
|
|
109
|
-
label: "Show ".concat(rowPerPage, " Rows")
|
|
110
|
-
},
|
|
111
|
-
option: _Constant.optionRow,
|
|
112
|
-
handleSelectChange: handleSelectChange
|
|
113
|
-
}), /*#__PURE__*/_react.default.createElement(_material.IconButton, {
|
|
114
|
-
color: "primary",
|
|
115
|
-
onClick: handleRefresh
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_Refresh.default, {
|
|
117
|
-
fontSize: "medium"
|
|
118
|
-
}))), /*#__PURE__*/_react.default.createElement(_logs.default, {
|
|
119
|
-
start: page * rowPerPage - rowPerPage + 1,
|
|
120
|
-
end: page * rowPerPage > total ? total : page * rowPerPage,
|
|
121
|
-
total: total
|
|
122
|
-
})), newData.length === 0 && /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
123
|
-
className: "no-record"
|
|
124
|
-
}, _ErrorMsg.default.NRF), newData.map((item, index) => {
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_card.default, {
|
|
126
|
-
key: index,
|
|
127
|
-
isCheckBox: true,
|
|
128
|
-
title: item.message,
|
|
129
|
-
subTitle: (0, _commonFun.fullFormatDate)(item.createdAt),
|
|
130
|
-
isRead: item.isRead,
|
|
131
|
-
handleShowDetails: () => _handleShowDetails(item.id),
|
|
132
|
-
handleRead: () => _handleRead([item.id]),
|
|
133
|
-
subType: item.sub_type,
|
|
134
|
-
isSubType: true,
|
|
135
|
-
selectedAlert: selectedAlert,
|
|
136
|
-
id: item.id,
|
|
137
|
-
handleCheckboxChange: handleCheckboxChange
|
|
138
|
-
});
|
|
139
|
-
})))), !(loading || isEmpty) && /*#__PURE__*/_react.default.createElement(_material.DialogActions, {
|
|
140
|
-
sx: {
|
|
141
|
-
justifyContent: "space-between",
|
|
142
|
-
gap: 1
|
|
143
|
-
},
|
|
144
|
-
className: "action-show-all-dialog"
|
|
145
|
-
}, /*#__PURE__*/_react.default.createElement(_myPagination.default, {
|
|
146
|
-
page: page,
|
|
147
|
-
rowPerPage: rowPerPage,
|
|
148
|
-
total: total,
|
|
149
|
-
handleChangePage: handleChangePage,
|
|
150
|
-
isMarkAllRead: true,
|
|
151
|
-
selectedAlert: selectedAlert,
|
|
152
|
-
handleAllRead: handleAllRead
|
|
153
|
-
})));
|
|
154
|
-
};
|
|
155
|
-
var _default = exports.default = AlertBody;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _ErrorMsg = _interopRequireDefault(require("../../utils/ErrorMsg"));
|
|
12
|
-
var _inputField = _interopRequireDefault(require("../input-field"));
|
|
13
|
-
var _Search = _interopRequireDefault(require("@mui/icons-material/Search"));
|
|
14
|
-
var _Constant = require("../../utils/Constant");
|
|
15
|
-
var _myPagination = _interopRequireDefault(require("../my-pagination"));
|
|
16
|
-
var _tableDetail = _interopRequireDefault(require("./table-detail"));
|
|
17
|
-
var _commonFun = require("../../helper/common-fun");
|
|
18
|
-
var _reactSelect = _interopRequireDefault(require("../select-field/react-select"));
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
const DetailsBody = _ref => {
|
|
23
|
-
let {
|
|
24
|
-
loading,
|
|
25
|
-
isEmpty,
|
|
26
|
-
data
|
|
27
|
-
} = _ref;
|
|
28
|
-
const [inputValue, setInputValue] = (0, _react.useState)("");
|
|
29
|
-
const [page, setPage] = (0, _react.useState)(1);
|
|
30
|
-
const [rowPerPage, setRowPerPage] = (0, _react.useState)(10);
|
|
31
|
-
const [total, setTotal] = (0, _react.useState)(0);
|
|
32
|
-
const [newData, setNewData] = (0, _react.useState)([]);
|
|
33
|
-
const [sortDir, setSortDir] = (0, _react.useState)(false);
|
|
34
|
-
const [sortKey, setSortKey] = (0, _react.useState)("");
|
|
35
|
-
(0, _react.useEffect)(() => {
|
|
36
|
-
if (inputValue || sortKey) {
|
|
37
|
-
const newData = (0, _commonFun.searchByKeyArr)(data, _Constant.detailsSearchKey, inputValue);
|
|
38
|
-
if (sortKey) {
|
|
39
|
-
const sortedData = (0, _commonFun.sortByKeyArr)(newData, sortKey, sortDir ? "asc" : "desc");
|
|
40
|
-
setNewData((0, _commonFun.dataSlice)(sortedData, page, rowPerPage));
|
|
41
|
-
setTotal(sortedData.length);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
setNewData((0, _commonFun.dataSlice)(newData, page, rowPerPage));
|
|
45
|
-
setTotal(newData.length);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
setNewData((0, _commonFun.dataSlice)(data, page, rowPerPage));
|
|
49
|
-
setTotal(data.length);
|
|
50
|
-
}, [inputValue, data, page, rowPerPage, sortDir, sortKey]);
|
|
51
|
-
const handleSelectChange = e => {
|
|
52
|
-
setPage(1);
|
|
53
|
-
setRowPerPage(e.value);
|
|
54
|
-
};
|
|
55
|
-
const handleChangePage = page => {
|
|
56
|
-
setPage(page);
|
|
57
|
-
};
|
|
58
|
-
const handleSearch = e => {
|
|
59
|
-
const value = e.target.value;
|
|
60
|
-
if (value) setPage(1);
|
|
61
|
-
setInputValue(value);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// sort function
|
|
65
|
-
const handleSort = key => {
|
|
66
|
-
setSortDir(!sortDir);
|
|
67
|
-
setSortKey(key);
|
|
68
|
-
};
|
|
69
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.DialogContent, {
|
|
70
|
-
dividers: true,
|
|
71
|
-
sx: {
|
|
72
|
-
pt: "0 !important"
|
|
73
|
-
}
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
75
|
-
sx: loading || isEmpty ? {
|
|
76
|
-
display: "flex",
|
|
77
|
-
justifyContent: "center",
|
|
78
|
-
alignItems: "center",
|
|
79
|
-
minHeight: 320
|
|
80
|
-
} : {}
|
|
81
|
-
}, loading ? /*#__PURE__*/_react.default.createElement(_material.CircularProgress, null) : isEmpty ? /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
82
|
-
className: "no-record"
|
|
83
|
-
}, _ErrorMsg.default.NRF) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
84
|
-
className: "sticky-input-select"
|
|
85
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
86
|
-
sx: {
|
|
87
|
-
display: "flex",
|
|
88
|
-
gap: 1
|
|
89
|
-
}
|
|
90
|
-
}, /*#__PURE__*/_react.default.createElement(_inputField.default, {
|
|
91
|
-
value: inputValue,
|
|
92
|
-
onChange: handleSearch,
|
|
93
|
-
label: "Search",
|
|
94
|
-
focused: true,
|
|
95
|
-
adornmentIcon: {
|
|
96
|
-
startAdornment: /*#__PURE__*/_react.default.createElement(_material.InputAdornment, {
|
|
97
|
-
position: "start"
|
|
98
|
-
}, /*#__PURE__*/_react.default.createElement(_Search.default, null))
|
|
99
|
-
}
|
|
100
|
-
}), /*#__PURE__*/_react.default.createElement(_reactSelect.default, {
|
|
101
|
-
value: {
|
|
102
|
-
value: rowPerPage,
|
|
103
|
-
label: "Show ".concat(rowPerPage, " Rows")
|
|
104
|
-
},
|
|
105
|
-
option: _Constant.optionRow,
|
|
106
|
-
handleSelectChange: handleSelectChange
|
|
107
|
-
}))), newData.length === 0 ? /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
108
|
-
className: "no-record"
|
|
109
|
-
}, _ErrorMsg.default.NRF) : /*#__PURE__*/_react.default.createElement(_tableDetail.default, {
|
|
110
|
-
data: newData,
|
|
111
|
-
handleSort: handleSort,
|
|
112
|
-
sortDir: sortDir,
|
|
113
|
-
sortKey: sortKey
|
|
114
|
-
})))), !(loading || isEmpty) && /*#__PURE__*/_react.default.createElement(_material.DialogActions, {
|
|
115
|
-
sx: {
|
|
116
|
-
justifyContent: "space-between",
|
|
117
|
-
gap: 1
|
|
118
|
-
},
|
|
119
|
-
className: "action-show-all-dialog"
|
|
120
|
-
}, /*#__PURE__*/_react.default.createElement(_myPagination.default, {
|
|
121
|
-
page: page,
|
|
122
|
-
rowPerPage: rowPerPage,
|
|
123
|
-
total: total,
|
|
124
|
-
handleChangePage: handleChangePage,
|
|
125
|
-
isLogo: true
|
|
126
|
-
})));
|
|
127
|
-
};
|
|
128
|
-
var _default = exports.default = DetailsBody;
|