@omniumretail/component-library 1.1.30 → 1.1.32

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.
@@ -19,10 +19,24 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
21
 
22
+ /*! exports provided: default */
23
+
24
+ /*! no static exports found */
25
+
26
+ /*! react */
27
+
22
28
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
23
29
 
24
30
  /*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */
25
31
 
32
+ /*!******************************!*\
33
+ !*** ./src/react-webcam.tsx ***!
34
+ \******************************/
35
+
36
+ /*!**************************************************************************************!*\
37
+ !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
38
+ \**************************************************************************************/
39
+
26
40
  /**
27
41
  * @license React
28
42
  * react-jsx-runtime.production.min.js
package/dist/main.css CHANGED
@@ -19,7 +19,7 @@
19
19
  .lOKzfPUFf3ukLT2wGZaY{display:grid;grid-template-columns:300px auto;gap:16px}.OIrZOBn2f036M5MGzc61,.adDQP_uvIYgNFVC4VdHj{background:#fff;padding:20px;overflow:auto}
20
20
  .yBjbWkudwA_AOwhHrnlc .ant-tree-title{font-weight:var(--font-weight-semibold)}.yBjbWkudwA_AOwhHrnlc button{margin-top:32px;width:100%}.yBjbWkudwA_AOwhHrnlc button:nth-child(3){margin-top:12px}.je000VEfsPqZupGr8ymu{font-size:var(--font-size-body-4);font-weight:600;line-height:100%;color:var(--color-blue);text-transform:uppercase}.tUDGWNXopUejF6zWJloy{margin-top:20px}
21
21
  .O0Juh2loT1HHb612gOA4 .ant-form-item{margin-bottom:0}.O0Juh2loT1HHb612gOA4 .ant-space{display:flex;flex-direction:column;gap:12px;border-bottom:1px solid var(--color-blue);padding:16px 10px}.O0Juh2loT1HHb612gOA4 .ant-space-item{width:100%}.hg7oiINfKCZSUt6dEq4A{display:none}.BAso_dbeoowN7VtxWiKx{display:grid;grid-template-columns:minmax(18px, auto) 1fr 90px;gap:20px;color:var(--color-black);font-size:var(--font-size-body-4);line-height:100%;font-weight:var(--font-weight-medium);align-items:center}.qg_bZXG9dQdJvLBRGuqw{display:grid;grid-template-columns:minmax(18px, auto) 1fr 90px;gap:20px;color:var(--color-grey-dark);font-size:var(--font-size-body-3);align-items:center}.y8UJFmCyGQzEQk4XjnI9{display:none}.kknDal3CIbUXI7Lu2wPV{display:flex;align-items:center;justify-content:flex-start;gap:20px}.upuPapYjj1uGowukEEIi{display:none;align-items:center;justify-content:center}.KfrJPVKxY4b6bmXeJL5U{display:flex;align-items:center;justify-content:center;gap:16px}.zRPlv7rfSSACHPLZLs16,.EHyxN8DmDHOLkQDROSV5,.NLIlnBPfo09cpWYzpZ_J{font-size:var(--font-size-body-5);cursor:pointer}.AHIc83P7PkYUr3no83sO{margin-top:24px}
22
- .vw302ajYc4_7bIROncyM{font-size:var(--font-size-body-4);font-weight:600;line-height:100%;color:var(--color-blue);text-transform:uppercase;margin-bottom:32px}.DrsaZTs1Ny6wZ76RwDR9{font-size:var(--font-size-body-2);color:var(--color-black);font-weight:700;text-transform:uppercase}.HVSssNqaNxLcYT_1lxBL{display:grid;grid-template-columns:minmax(200px, 1fr) auto 1fr auto;gap:46px}.ACPbYsV0wNkissVLHcFh{margin-top:16px}Label{margin-bottom:8px}.g19LZsD26yzPPjBtV31w .ant-select{width:100%}.g19LZsD26yzPPjBtV31w .ant-select-selector{border-color:rgba(var(--color-black-rgb), 0.5) !important;height:50px !important;display:flex;align-items:center}.g19LZsD26yzPPjBtV31w .ant-select-arrow{color:var(--color-black)}.g19LZsD26yzPPjBtV31w .ant-switch{width:30px}
22
+ .vw302ajYc4_7bIROncyM{font-size:var(--font-size-body-4);font-weight:600;line-height:100%;color:var(--color-blue);text-transform:uppercase;margin-bottom:32px}.DrsaZTs1Ny6wZ76RwDR9{font-size:var(--font-size-body-2);color:var(--color-black);font-weight:700;text-transform:uppercase}.HVSssNqaNxLcYT_1lxBL{display:grid;grid-template-columns:minmax(200px, 1fr) auto auto auto auto;gap:46px}.ACPbYsV0wNkissVLHcFh{margin-top:16px}Label{margin-bottom:8px}.g19LZsD26yzPPjBtV31w .ant-select{width:100%}.g19LZsD26yzPPjBtV31w .ant-select-selector{border-color:rgba(var(--color-black-rgb), 0.5) !important;height:50px !important;display:flex;align-items:center}.g19LZsD26yzPPjBtV31w .ant-select-arrow{color:var(--color-black)}.g19LZsD26yzPPjBtV31w .ant-switch{width:30px}
23
23
  .j8_c3JHTX0JOkT36fF6A{contain:inline-size}.j8_c3JHTX0JOkT36fF6A .HgmGSts5FIH3osmekIYG{height:50px;width:300px}@media(min-width: 1024px){.j8_c3JHTX0JOkT36fF6A .HgmGSts5FIH3osmekIYG{width:450px}}.j8_c3JHTX0JOkT36fF6A .xlaG0XsJDRR9AClqXzzC .ant-tag{background-color:var(--color-orange);color:var(--color-white);padding:6px 16px;max-width:240px}.j8_c3JHTX0JOkT36fF6A .xlaG0XsJDRR9AClqXzzC .anticon-close{color:var(--color-white);font-size:12px}.j8_c3JHTX0JOkT36fF6A .xlaG0XsJDRR9AClqXzzC .anticon-close:hover{color:var(--color-black)}
24
24
  .BWmwZ5nFKyctBZyOAXzg{width:100%}.GWTSauaAl_v9W8o4YPxW{background:rgba(44,45,46,.0509803922);height:100%;position:relative}.GWTSauaAl_v9W8o4YPxW .ant-menu-light{background-color:rgba(0,0,0,0) !important;border-inline-end:none !important}.GWTSauaAl_v9W8o4YPxW .ant-menu-title-content{font-size:17px;line-height:20px;font-weight:var(--font-weight-semibold)}.GWTSauaAl_v9W8o4YPxW .ant-menu-title-content:hover{color:var(--color-orange)}.GWTSauaAl_v9W8o4YPxW .ant-menu-sub .ant-menu-title-content{font-size:15px;line-height:18px;font-weight:var(--font-weight-medium)}.GWTSauaAl_v9W8o4YPxW .ant-menu-sub .ant-menu-item{height:30px;line-height:30px;margin-bottom:16px}.GWTSauaAl_v9W8o4YPxW .ant-menu-sub .ant-menu-item:first-child{margin-top:-10px}.GWTSauaAl_v9W8o4YPxW .ant-menu-submenu{border-top:1px solid var(--color-orange);border-radius:0}.GWTSauaAl_v9W8o4YPxW .ant-menu-item:hover{background-color:initial !important}.GWTSauaAl_v9W8o4YPxW .ant-menu-item-selected,.GWTSauaAl_v9W8o4YPxW .ant-menu-submenu-selected>.ant-menu-submenu-title{color:var(--color-orange);background-color:initial}.GWTSauaAl_v9W8o4YPxW .ant-menu-inline .ant-menu-sub.ant-menu-inline{background:initial}.GWTSauaAl_v9W8o4YPxW .ant-menu-submenu-title{height:50px !important;line-height:50px !important}.GWTSauaAl_v9W8o4YPxW .ant-menu-submenu-title:hover{background-color:initial !important}.GWTSauaAl_v9W8o4YPxW .ant-menu-submenu-title .anticon{color:var(--color-orange)}.GWTSauaAl_v9W8o4YPxW .ant-menu-inline.ant-menu-root .ant-menu-item>.ant-menu-title-content{overflow-x:auto;text-overflow:unset}.hWGer1IJ7RdkfQWwYfsw{position:absolute;top:24px;left:24px;right:24px;height:144px}.MD1FhirslDDwd2izGwai{font-size:var(--font-size-body-2);line-height:14px;font-weight:var(--font-weight-light);display:inline-block;padding:12px;cursor:pointer;position:absolute;right:0;top:60px}.RxGn4c38kNq8Ai4ypW_x{position:absolute;top:144px;left:24px;right:24px;bottom:0;overflow-y:auto;overflow-x:hidden;padding-bottom:24px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{border-radius:10px;background:rgba(0,0,0,.1)}::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2)}::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.9)}
25
25
  .rdjN4ln3xiUoa6Q0NMMm{display:flex;flex-direction:column;gap:16px;height:100%}@media(min-width: 600px){.rdjN4ln3xiUoa6Q0NMMm{display:grid;grid-template-columns:220px auto}}@media(min-width: 768px){.rdjN4ln3xiUoa6Q0NMMm{grid-template-columns:300px auto}}.Q4flbvKEPN6Jx9Cob22I{background:#ebeced;overflow:auto;padding:20px}@media(max-width: 599px){.Q4flbvKEPN6Jx9Cob22I{padding:20px 20px 0 20px;max-height:80px}}.hK3soC6m563VuiLnNutq{background:var(--color-white);overflow:auto;padding:20px}@media(max-width: 599px){.hK3soC6m563VuiLnNutq{height:100%}}.guqqOMHeZE56Bg2p5Ad8{font-size:var(--font-size-body-2);color:var(--color-blue);margin-bottom:12px;font-weight:var(--font-weight-semibold);text-transform:uppercase}@media(min-width: 768px){.guqqOMHeZE56Bg2p5Ad8{font-size:var(--font-size-body-4);margin-bottom:36px}}.wRCQxnQc_MZGDeiY1bcL{padding-bottom:15px;font-weight:var(--font-weight-bold);font-size:var(--font-size-body-2)}@media(min-width: 768px){.wRCQxnQc_MZGDeiY1bcL{font-size:var(--font-size-body-4)}}.JRmeFBsSP1f1HJwarMpc{cursor:pointer}.Y6yF3VITdrKdQzDtqTZX{padding-left:16px}.Y6yF3VITdrKdQzDtqTZX .wRCQxnQc_MZGDeiY1bcL{font-weight:var(--font-weight-semibold)}.Y6yF3VITdrKdQzDtqTZX .aKZCkmPsc0LiPdj3sEeG .Y6yF3VITdrKdQzDtqTZX .wRCQxnQc_MZGDeiY1bcL{font-weight:var(--font-weight-light)}.aKZCkmPsc0LiPdj3sEeG{display:block}.U_3frSKmaOQyTCb9oBkg{color:var(--color-orange)}.GEZDeWAneRLnZQyf4y9l{margin-bottom:16px}@media(min-width: 768px){.GEZDeWAneRLnZQyf4y9l{margin-bottom:24px}}.YcOvMLXE7vKR2Y0_BPRr{font-size:var(--font-size-body-3);color:var(--color-blue);font-weight:var(--font-weight-semibold);margin-bottom:8px}@media(min-width: 768px){.YcOvMLXE7vKR2Y0_BPRr{font-size:var(--font-size-body-4)}}.vlMh_CCr45wbKV4fMhJx{font-size:var(--font-size-body-2);font-weight:var(--font-weight-light);color:var(--color-black)}@media(min-width: 768px){.vlMh_CCr45wbKV4fMhJx{font-size:var(--font-size-body-3)}}.NZ_ohAxNxhxZsCBr2PRA{display:flex;flex-direction:row;gap:12px;margin-bottom:24px}@media(min-width: 768px){.NZ_ohAxNxhxZsCBr2PRA{margin-bottom:36px}}.CArVrMs2ac6JvM1VGLSw{flex-direction:column;border-bottom:1px solid rgba(var(--color-blue-rgb), 0.2);margin-bottom:24px}.CArVrMs2ac6JvM1VGLSw .OpqJ6gab6fPIq3KyckPO{width:100%;border-bottom:none}.CArVrMs2ac6JvM1VGLSw .E9TXHxbgaI6LGMZHG9bV{width:100%;height:auto}.CArVrMs2ac6JvM1VGLSw .E9TXHxbgaI6LGMZHG9bV .ant-input{min-height:140px}.CArVrMs2ac6JvM1VGLSw .E9TXHxbgaI6LGMZHG9bV .ant-form-item{margin-bottom:16px}.OpqJ6gab6fPIq3KyckPO{width:calc(100% - 112px);border-bottom:1px solid rgba(var(--color-blue-rgb), 0.2)}.E9TXHxbgaI6LGMZHG9bV{width:100px;height:50px;align-self:flex-end}.xdLvKgnXC4tm2aa6tAap{font-size:var(--font-size-body-2);font-weight:var(--font-weight-semibold);margin-bottom:8px}@media(min-width: 768px){.xdLvKgnXC4tm2aa6tAap{font-size:var(--font-size-body-3)}}.r5obiTduSUBq1uL7oceW{font-weight:var(--font-weight-light);margin-bottom:4px}
@@ -27,3 +27,4 @@
27
27
  .zsvRMmfrmqBj9iRjtQpO{display:grid;grid-template-columns:300px auto;gap:16px;height:100%}.pb4QP8qfuDG2T6wfXkUC{overflow:auto;background:#ebeced}.gP05vt1R1r67eWteznvr{overflow:auto;background:var(--color-white)}.pb4QP8qfuDG2T6wfXkUC,.gP05vt1R1r67eWteznvr{padding:20px}.btRPAI8631Q2XXYP6nZ7{font-size:var(--font-size-body-4);color:var(--color-blue);margin-bottom:36px;font-weight:var(--font-weight-semibold);text-transform:uppercase}.SbA9dHRh1JSG4xp1Aqie{padding-bottom:15px;font-weight:var(--font-weight-bold);font-size:var(--font-size-body-4)}.ZsQJQ__gMgYGYau95r8U{cursor:pointer}.PPF4FGgo1aDsBm13cNj8{padding-left:16px}.PPF4FGgo1aDsBm13cNj8 .SbA9dHRh1JSG4xp1Aqie{font-weight:var(--font-weight-semibold)}.PPF4FGgo1aDsBm13cNj8 .QEsWraNRLBQux4k4KNAE .PPF4FGgo1aDsBm13cNj8 .SbA9dHRh1JSG4xp1Aqie{font-weight:var(--font-weight-light)}.QEsWraNRLBQux4k4KNAE{display:block}.VQ09MnwMcIzpW1iabb4A{color:var(--color-orange)}.cmcMqdZJEUjlu34ag1Md{margin-bottom:32px;display:flex;justify-content:space-between;align-items:center}.i_U4mKg0Sxl4EvVzgv0L{font-size:var(--font-size-body-4);color:var(--color-blue);font-weight:var(--font-weight-semibold);margin-bottom:8px}.Tnut0v2OeSU0e7XwrCXI{font-size:var(--font-size-body-3);font-weight:var(--font-weight-light);color:var(--color-black)}.W2hZQFsItdqKPcBu4UrA{display:flex;flex-direction:row;gap:36px;margin-bottom:36px;border-bottom:1px solid rgba(var(--color-blue-rgb), 0.2);padding-bottom:4px}.tIVLagS5XxibJ4PBCNpp{flex-direction:column;border-bottom:1px solid rgba(var(--color-blue-rgb), 0.2);margin-bottom:24px}.tIVLagS5XxibJ4PBCNpp .RenA6EOwu2sFJGoqYbYz{width:100%;border-bottom:none}.tIVLagS5XxibJ4PBCNpp .N0_FbFF8bLYtEcr8_2B9{width:100%;height:auto}.tIVLagS5XxibJ4PBCNpp .N0_FbFF8bLYtEcr8_2B9 .ant-input{min-height:140px}.tIVLagS5XxibJ4PBCNpp .N0_FbFF8bLYtEcr8_2B9 .ant-form-item{margin-bottom:16px}.RenA6EOwu2sFJGoqYbYz{width:calc(100% - 149px);display:flex;align-items:center}.N0_FbFF8bLYtEcr8_2B9{width:130px;min-width:130px;align-self:flex-end;display:flex;justify-content:space-between;padding-right:15px}.GaBbmrXh2G03hz6ha5vB{display:none}.QYrBVtDmfSFNxJFztXVl{min-width:130px;align-self:flex-end;display:flex;justify-content:space-between;gap:34px}.V_qOYQwuQ9mXa8aniYgl{font-size:var(--font-size-body-3);font-weight:var(--font-weight-medium)}.pvSzNydRHp3dkh3WrOeA{font-weight:var(--font-weight-light);margin-bottom:4px}.Ehgx39o1k8blh7IDJ2mg{padding:6px;font-size:var(--font-size-body-4);font-weight:var(--font-weight-medium);color:var(--color-white);border-radius:5px;display:inline-flex;letter-spacing:3px}.ifR0bkZtK7yVHD6YZ_Zz{background-color:rgba(217,217,217,.5);border-radius:5px;padding:8px 15px;display:flex;flex-direction:row;gap:50px;align-items:center}.NL5HeemkTIg0oPHDXVtO{font-size:var(--font-size-body-3);font-weight:var(--font-weight-medium);color:var(--color-black)}.koYqEMOf6wzxWpwvrFkL{display:flex;justify-content:space-between;margin-bottom:12px;margin-left:16px;gap:40px;width:100%}
28
28
  .vhUOPe6KeB6afW8Pj3M1{font-size:32px}
29
29
  .nkyL3EtE9Zsnc5VOW43L{display:flex;flex-wrap:wrap;flex-direction:column}.nkyL3EtE9Zsnc5VOW43L .ant-table-thead>tr>th{background-color:rgba(0,0,0,0);border:0px;color:var(--color-blue)}.nkyL3EtE9Zsnc5VOW43L .ant-table-thead>tr>th:before{display:none}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper{margin-bottom:12px}.nkyL3EtE9Zsnc5VOW43L .ant-table-cell{word-break:break-word}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr{cursor:pointer}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr:last-child>td{border-bottom:1px solid var(--color-grey-light) !important}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr:first-child>td{border-top:1px solid var(--color-blue) !important}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr:hover td{border-radius:0 !important;border-bottom-color:var(--color-grey-light) !important}.nkyL3EtE9Zsnc5VOW43L .ant-space{align-self:flex-end}.nkyL3EtE9Zsnc5VOW43L .ant-select-selection-placeholder{color:var(--color-black)}.nkyL3EtE9Zsnc5VOW43L .ant-select-selector,.nkyL3EtE9Zsnc5VOW43L .ant-select-focused .ant-select-selection-search{border:none !important;box-shadow:none !important}.nkyL3EtE9Zsnc5VOW43L .ant-select-selector:focus,.nkyL3EtE9Zsnc5VOW43L .ant-select-selector:hover,.nkyL3EtE9Zsnc5VOW43L .ant-select-focused .ant-select-selection-search:focus,.nkyL3EtE9Zsnc5VOW43L .ant-select-focused .ant-select-selection-search:hover{border:none !important;box-shadow:none !important}.nkyL3EtE9Zsnc5VOW43L .ant-pagination{max-width:calc(100% - 200px);margin-left:auto !important}.nkyL3EtE9Zsnc5VOW43L button[type=button].ant-pagination-item-link{margin-top:0 !important}.nkyL3EtE9Zsnc5VOW43L button[type=button]{margin-top:-50px}@media screen and (max-width: 1024px){.nkyL3EtE9Zsnc5VOW43L .ant-table-thead>tr>th{font-size:12px}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr>td{font-size:12px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-thead>tr>th{padding:8px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-tbody>tr>td{padding:8px}}@media screen and (max-width: 767px){.nkyL3EtE9Zsnc5VOW43L .ant-table-thead>tr>th{font-size:10px}.nkyL3EtE9Zsnc5VOW43L .ant-table-tbody>tr>td{font-size:10px}.nkyL3EtE9Zsnc5VOW43L .ant-table-content table{width:100%}.nkyL3EtE9Zsnc5VOW43L .ant-table-content{width:100%}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table .ant-table-title,.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table .ant-table-header{word-break:break-all}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-thead>tr>th{padding:4px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-tbody>tr>td{padding:4px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-column-sorter{margin-inline-start:0px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-column-sorter-up{font-size:8px}.nkyL3EtE9Zsnc5VOW43L .ant-table-wrapper .ant-table-column-sorter-down{font-size:8px}.nkyL3EtE9Zsnc5VOW43L .ant-pagination{max-width:unset}}
30
+ .aZEBTQus3Y3MyodeDwkf{display:flex;flex-direction:column;align-items:center;justify-content:center}.cc1pbQlAgw2CmXVml3bs{height:300px;width:400px}.aTf_CXAsyp0tySsoZdD_{display:flex;justify-content:space-between;margin:10px 10px 0px 10px;font-size:20px}.kuu1hf_JTvYD55IW6Nxl{color:#ff4d4f}.N8ODEO3zDbY7gmecjTrp{color:#52c41a}.WIsL9Shu6c0mGJq9qSSz{margin-top:20px;border-radius:4px;overflow:hidden}.WIsL9Shu6c0mGJq9qSSz img{width:100%;height:auto}
@@ -0,0 +1,4 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Primary: Story<any>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CameraCaptureProps {
3
+ isCameraOn: boolean;
4
+ customClass?: string;
5
+ setImgSrc: React.Dispatch<React.SetStateAction<string>>;
6
+ }
7
+ export declare const CameraCapture: React.FC<CameraCaptureProps>;
8
+ export {};
@@ -26,3 +26,4 @@ export * from './Notification';
26
26
  export * from './ExportTableData';
27
27
  export * from './DropdownButton';
28
28
  export * from './ResponsiveTable';
29
+ export * from './WebCam';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/component-library",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "private": false,
5
5
  "main": "dist/bundle.js",
6
6
  "typings": "./dist/types/index",
@@ -57,6 +57,7 @@
57
57
  "react-dom": "^18.2.0",
58
58
  "react-easy-crop": "^4.7.4",
59
59
  "react-i18next": "^12.1.4",
60
+ "react-webcam": "^7.1.1",
60
61
  "sass": "^1.56.1",
61
62
  "sass-loader": "^12.3.0",
62
63
  "style-loader": "^3.3.1",
@@ -27,9 +27,9 @@ export const CategoryContent = (props: categoryContent) => {
27
27
  categorySidebarData
28
28
  } = props;
29
29
 
30
- const [submitForm, setSubmitForm] = useState<boolean>(false);
31
30
  const [contentInfo, setContentInfo] = useState<any>(defaultInitialValues);
32
- const [switchStatus, setSwitchStatus] = useState<boolean>(false);
31
+ const [switchOpenAnswStatus, setSwitchOpenAnswStatus] = useState<boolean>(false);
32
+ const [switchYesOrNoAnswStatus, setSwitchYesOrNoAnswStatus] = useState<boolean>(false);
33
33
  const [initialValues, setInitialValues] = useState<any>(categorySidebarData?.data || defaultInitialValues)
34
34
  const [form] = useForm();
35
35
 
@@ -37,8 +37,13 @@ export const CategoryContent = (props: categoryContent) => {
37
37
  setContentInfo(values);
38
38
  };
39
39
 
40
- const switchHandler = (enabled: boolean) => {
41
- setSwitchStatus(enabled);
40
+ const openSwitchHandler = (enabled: boolean) => {
41
+ setSwitchOpenAnswStatus(enabled);
42
+ handleInputChange();
43
+ }
44
+
45
+ const yesNoSwitchHandler = (enabled: boolean) => {
46
+ setSwitchYesOrNoAnswStatus(enabled);
42
47
  handleInputChange();
43
48
  }
44
49
 
@@ -63,7 +68,7 @@ export const CategoryContent = (props: categoryContent) => {
63
68
  useEffect(() => {
64
69
  form.resetFields();
65
70
  form.setFieldsValue(initialValues);
66
- setSwitchStatus(initialValues?.openAnswer || false);
71
+ setSwitchOpenAnswStatus(initialValues?.openAnswer || false);
67
72
  }, [form, initialValues]);
68
73
 
69
74
  return (
@@ -113,19 +118,34 @@ export const CategoryContent = (props: categoryContent) => {
113
118
 
114
119
  {!categorySidebarData?.data?.children?.length &&
115
120
  <>
116
- <div className={styles.openAnswer}>
117
- <Label isUppercase>
118
- {t('components.categoryContent.openAnswer')}
119
- </Label>
120
- <Form.Item
121
- name={['openAnswer']}
122
- >
123
- <Switch onChange={(enabled: boolean) => { switchHandler(enabled) }} checked={switchStatus} />
124
- </Form.Item>
125
- </div>
121
+ {!switchYesOrNoAnswStatus &&
122
+ <div className={styles.openAnswer}>
123
+ <Label isUppercase>
124
+ {t('components.categoryContent.openAnswer')}
125
+ </Label>
126
+ <Form.Item
127
+ name={['openAnswer']}
128
+ >
129
+ <Switch onChange={(enabled: boolean) => { openSwitchHandler(enabled) }} checked={switchOpenAnswStatus} />
130
+ </Form.Item>
131
+ </div>
132
+ }
133
+
134
+ {!switchOpenAnswStatus &&
135
+ <div className={styles.yesNoAnswer}>
136
+ <Label isUppercase>
137
+ {t('components.categoryContent.yesNoAnswer')}
138
+ </Label>
139
+ <Form.Item
140
+ name={['yesNoAnswer']}
141
+ >
142
+ <Switch onChange={(enabled: boolean) => { yesNoSwitchHandler(enabled) }} checked={switchYesOrNoAnswStatus} />
143
+ </Form.Item>
144
+ </div>
145
+ }
126
146
 
127
147
  {
128
- !switchStatus &&
148
+ !switchOpenAnswStatus && !switchYesOrNoAnswStatus &&
129
149
  <>
130
150
  <div className={styles.generalEvaluationLevel}>
131
151
  <Label isUppercase>
@@ -174,7 +194,10 @@ export const CategoryContent = (props: categoryContent) => {
174
194
  {t('components.categoryContent.answers')}
175
195
  </Label>
176
196
  <Form.Item>
177
- <Questions showGrade={!switchStatus} handleChanges={handleInputChange}></Questions>
197
+ <Questions
198
+ showGrade={(switchOpenAnswStatus || switchYesOrNoAnswStatus) === true ? false : true}
199
+ handleChanges={handleInputChange}
200
+ />
178
201
  </Form.Item>
179
202
  </div>
180
203
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  .formHeader {
18
18
  display: grid;
19
- grid-template-columns: minmax(200px, 1fr) auto 1fr auto;
19
+ grid-template-columns: minmax(200px, 1fr) auto auto auto auto;
20
20
  gap: 46px;
21
21
  }
22
22
 
@@ -0,0 +1,24 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ import { CameraCapture } from '.';
3
+ import { useState } from "react";
4
+ import { Button } from "antd";
5
+
6
+ export default {
7
+ title: 'CameraCapture',
8
+ component: CameraCapture,
9
+ } as Meta;
10
+
11
+ const Template: Story<any> = (args) => {
12
+ const [openCamera, setOpenCamera] = useState(false);
13
+ const [imgSrc, setImgSrc] = useState("");
14
+
15
+ return <>
16
+ <p>Source: {imgSrc}</p>
17
+ <Button onClick={() => setOpenCamera(!openCamera)}>Open</Button>
18
+ <CameraCapture {...args} setImgSrc={setImgSrc} isCameraOn={openCamera}></CameraCapture>
19
+ </>;
20
+ }
21
+
22
+ export const Primary = Template.bind({});
23
+ Primary.args = {
24
+ };
@@ -0,0 +1,73 @@
1
+ import React, { useRef, useState } from 'react';
2
+ import styles from './styles.module.scss';
3
+ import Webcam from 'react-webcam';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
6
+ import classNames from 'classnames';
7
+ import { Button } from 'antd';
8
+
9
+ interface CameraCaptureProps {
10
+ isCameraOn: boolean;
11
+ customClass?: string;
12
+ setImgSrc: React.Dispatch<React.SetStateAction<string>>;
13
+ }
14
+
15
+ export const CameraCapture: React.FC<CameraCaptureProps> = ({ isCameraOn, customClass, setImgSrc }) => {
16
+ const { t } = useTranslation();
17
+
18
+ const webcamRef = useRef<Webcam>(null);
19
+ const [imageSrc, setImageSrc] = useState<string | null>(null);
20
+ const [captured, setCaptured] = useState(false);
21
+
22
+ const capture = () => {
23
+ const imageSrc = webcamRef.current?.getScreenshot();
24
+ if (imageSrc) {
25
+ setImageSrc(imageSrc);
26
+ setCaptured(true);
27
+ }
28
+ };
29
+
30
+ const retake = () => {
31
+ setImageSrc(null);
32
+ setCaptured(false);
33
+ };
34
+
35
+
36
+ const confirm = () => {
37
+ setImgSrc(imageSrc as string);
38
+ setCaptured(false);
39
+ };
40
+
41
+ const webCamStyle = classNames({
42
+ [`${customClass}`]: customClass,
43
+ }, [styles.webCam]);
44
+
45
+ return (
46
+ <div className={styles.cameraCapture}>
47
+ <div>
48
+ {isCameraOn && !captured && (
49
+ <Webcam
50
+ audio={false}
51
+ ref={webcamRef}
52
+ screenshotFormat="image/jpeg"
53
+ className={webCamStyle}
54
+ />
55
+ )}
56
+ </div>
57
+
58
+ {isCameraOn && !captured && (
59
+ <Button onClick={capture}>{t('components.webCam.takePhoto')}</Button>
60
+ )}
61
+
62
+ {captured && (
63
+ <div className={styles.capturedImage}>
64
+ <img src={imageSrc || ''} alt="Captured" />
65
+ <div className={styles.buttonGroup}>
66
+ <CloseOutlined onClick={retake} title={t('components.webCam.takeAgain')!} className={styles.closeButton} />
67
+ <CheckOutlined onClick={confirm} title={t('components.webCam.confirm')!} className={styles.checkButton} />
68
+ </div>
69
+ </div>
70
+ )}
71
+ </div>
72
+ );
73
+ };
@@ -0,0 +1,37 @@
1
+ .cameraCapture {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
7
+
8
+ .webCam {
9
+ height: 300px;
10
+ width: 400px;
11
+ }
12
+
13
+ .buttonGroup {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ margin: 10px 10px 0px 10px;
17
+ font-size: 20px;
18
+ }
19
+
20
+ .closeButton {
21
+ color: #ff4d4f;
22
+ }
23
+
24
+ .checkButton {
25
+ color: #52c41a;
26
+ }
27
+
28
+ .capturedImage {
29
+ margin-top: 20px;
30
+ border-radius: 4px;
31
+ overflow: hidden;
32
+ }
33
+
34
+ .capturedImage img {
35
+ width: 100%;
36
+ height: auto;
37
+ }
@@ -26,3 +26,4 @@ export * from './Notification';
26
26
  export * from './ExportTableData';
27
27
  export * from './DropdownButton';
28
28
  export * from './ResponsiveTable';
29
+ export * from './WebCam';
@@ -6,7 +6,7 @@
6
6
  "store": "Store",
7
7
  "role": "Role",
8
8
  "type": "Type",
9
- "id": "Id",
9
+ "id": "ID",
10
10
  "action": "Action"
11
11
  },
12
12
  "userInfoColumn": {
@@ -14,7 +14,7 @@
14
14
  "Store": "Store",
15
15
  "Team": "Team",
16
16
  "Supervisor": "Supervisor",
17
- "TypeOfContract": "Type Of Contract",
17
+ "TypeOfContract": "Contract Type",
18
18
  "Nationality": "Nationality",
19
19
  "CivilStatus": "Civil Status",
20
20
  "IdentificationDocument": "Identification Document",
@@ -32,14 +32,14 @@
32
32
  "home": "Home"
33
33
  },
34
34
  "actions": {
35
- "one": "one",
36
- "two": "two"
35
+ "one": "One",
36
+ "two": "Two"
37
37
  },
38
38
  "components": {
39
39
  "category": {
40
40
  "addQuestion": "Add Question",
41
- "placeholderInfo": "Placeholder Info",
42
- "errorInfo": "Error Info",
41
+ "placeholderInfo": "Marker Information",
42
+ "errorInfo": "Information Error",
43
43
  "placeholderQuestion": "Question",
44
44
  "errorQuestion": "Error/Missing Question",
45
45
  "placeholderGrade": "Grade",
@@ -53,9 +53,10 @@
53
53
  "categoryContent": {
54
54
  "message": "Please select a category in the sidebar",
55
55
  "categoryName": "Category Name",
56
- "categoryNameError": "Category Name Error/Missing",
56
+ "categoryNameError": "Error/Missing Category Name",
57
57
  "weighting": "Weighting",
58
58
  "openAnswer": "Open Answer",
59
+ "yesNoAnswer": "Yes/No Answer",
59
60
  "answerOption": "Answer Option",
60
61
  "answers": "Answers"
61
62
  },
@@ -75,7 +76,8 @@
75
76
  },
76
77
  "tag": {
77
78
  "search": "Search",
78
- "advancedFields": "Advanced Filters"
79
+ "advancedFields": "Advanced Filters",
80
+ "State": "State"
79
81
  },
80
82
  "table": {
81
83
  "selectAll": "Select All",
@@ -83,6 +85,11 @@
83
85
  },
84
86
  "datePickerTag": {
85
87
  "placeholder": "Select Date"
86
- }
88
+ },
89
+ "webCam": {
90
+ "takePhoto": "Take Photo",
91
+ "confirm": "Confirm",
92
+ "takeAgain": "Take Again"
93
+ }
87
94
  }
88
95
  }
@@ -1,88 +1,95 @@
1
1
  {
2
2
  "tableHeadings": {
3
- "key": "Chave",
4
- "name": "Nome",
5
- "mecanographicNumber": "Número Mecanográfico",
6
- "store": "Loja",
7
- "role": "Posição",
3
+ "key": "Clave",
4
+ "name": "Nombre",
5
+ "mecanographicNumber": "Código de Empleado",
6
+ "store": "Tienda",
7
+ "role": "Rol",
8
8
  "type": "Tipo",
9
- "id": "Id",
10
- "action": "Ação"
9
+ "id": "ID",
10
+ "action": "Acción"
11
11
  },
12
12
  "userInfoColumn": {
13
- "Date": "Data",
14
- "Store": "Loja",
15
- "Team": "Equipa em Gestão",
13
+ "Date": "Fecha",
14
+ "Store": "Tienda",
15
+ "Team": "Equipo",
16
16
  "Supervisor": "Supervisor",
17
- "TypeOfContract": "Tipo de contrato",
18
- "Nationality": "Nacionalidade",
17
+ "TypeOfContract": "Tipo de Contrato",
18
+ "Nationality": "Nacionalidad",
19
19
  "CivilStatus": "Estado Civil",
20
- "IdentificationDocument": "Doc.Identificação",
21
- "NTaxpayer": " Contribuinte",
20
+ "IdentificationDocument": "Documento de Identificación",
21
+ "NTaxpayer": "Número de Contribuyente",
22
22
  "NIB": "NIB",
23
- "SocialSecurity": "Nr Segurança Social",
24
- "NChildren": " Filhos",
25
- "Workload": "Carga horária",
26
- "Description": "Descrição",
27
- "Comments": "Comentários"
23
+ "SocialSecurity": "Seguro Social",
24
+ "NChildren": "Número de Hijos",
25
+ "Workload": "Carga de Trabajo",
26
+ "Description": "Descripción",
27
+ "Comments": "Comentarios"
28
28
  },
29
29
  "navigation": {
30
- "back": "Voltar Atrás ES",
31
- "logout": "Terminar Sessão ES",
32
- "home": "Início ES"
30
+ "back": "Atrás",
31
+ "logout": "Cerrar Sesión",
32
+ "home": "Inicio"
33
33
  },
34
34
  "actions": {
35
- "one": "one",
36
- "two": "two"
35
+ "one": "Uno",
36
+ "two": "Dos"
37
37
  },
38
38
  "components": {
39
39
  "category": {
40
- "addQuestion": "Adicionar questão",
41
- "placeholderInfo": "Informação da questão",
42
- "errorInfo": "Informação da questão em falta",
43
- "placeholderQuestion": "Questão",
44
- "errorQuestion": "Questão em falta",
45
- "placeholderGrade": "Ponderação",
46
- "errorGrade": "Ponderação em falta",
47
- "newCategory": "Nova categoria"
40
+ "addQuestion": "Agregar Pregunta",
41
+ "placeholderInfo": "Información de Marcador",
42
+ "errorInfo": "Error de Información",
43
+ "placeholderQuestion": "Pregunta",
44
+ "errorQuestion": "Error/Pregunta Faltante",
45
+ "placeholderGrade": "Calificación",
46
+ "errorGrade": "Error/Calificación Faltante",
47
+ "newCategory": "Nueva Categoría"
48
48
  },
49
49
  "categorySidBar": {
50
- "addCategory": "Adicionar categoria",
51
- "removeCategory": "Remover categoria"
50
+ "addCategory": "Agregar Categoría",
51
+ "removeCategory": "Eliminar Categoría"
52
52
  },
53
53
  "categoryContent": {
54
- "message": "Por favor selecione uma categoria na barra lateral",
55
- "categoryName": "Nome da categoria",
56
- "categoryNameError": "Nome categoria em falta",
57
- "weighting": "Ponderação",
58
- "openAnswer": "Resposta aberta",
59
- "answerOption": "Opção de resposta",
60
- "answers": "Questões"
54
+ "message": "Por favor, seleccione una categoría en la barra lateral",
55
+ "categoryName": "Nombre de la Categoría",
56
+ "categoryNameError": "Error/Nombre de Categoría Faltante",
57
+ "weighting": "Ponderación",
58
+ "openAnswer": "Respuesta Abierta",
59
+ "yesNoAnswer": "Respuesta Si/Não",
60
+ "answerOption": "Opción de Respuesta",
61
+ "answers": "Respuestas"
61
62
  },
62
63
  "categoryResponse": {
63
- "notApplicable": "Não Aplicável",
64
- "answer": "Resposta"
64
+ "notApplicable": "No Aplicable",
65
+ "answer": "Respuesta"
65
66
  },
66
67
  "categoryReadOnly": {
67
- "categories": "Categorias",
68
- "categoryAverage": "Ponderação da categoria",
69
- "userResponse": "Resposta Utilizador:",
70
- "supervisorResponse": "Resposta Supervisor:"
68
+ "categories": "Categorías",
69
+ "categoryAverage": "Promedio de la Categoría",
70
+ "userResponse": "Respuesta del Usuario:",
71
+ "supervisorResponse": "Respuesta del Supervisor:"
71
72
  },
72
73
  "analyticsBar": {
73
- "desc": "Decrescente",
74
- "asc": "Crescente"
74
+ "desc": "Descendente",
75
+ "asc": "Ascendente"
75
76
  },
76
77
  "tag": {
77
- "search": "Procurar",
78
- "advancedFields": "Filtros avançados"
78
+ "search": "Buscar",
79
+ "advancedFields": "Filtros Avanzados",
80
+ "State": "Estado"
79
81
  },
80
82
  "table": {
81
- "selectAll": "Selecionar todos",
82
- "deselectAll": "Desselecionar Todos"
83
+ "selectAll": "Seleccionar Todo",
84
+ "deselectAll": "Deseleccionar Todo"
83
85
  },
84
86
  "datePickerTag": {
85
- "placeholder": "Selecionar Data"
86
- }
87
+ "placeholder": "Seleccionar Fecha"
88
+ },
89
+ "webCam": {
90
+ "takePhoto": "Tomar foto",
91
+ "confirm": "Confirme",
92
+ "takeAgain": "Tomar de nuevo"
93
+ }
87
94
  }
88
95
  }
@@ -32,8 +32,8 @@
32
32
  "home": "Início"
33
33
  },
34
34
  "actions": {
35
- "one": "one",
36
- "two": "two"
35
+ "one": "um",
36
+ "two": "dois"
37
37
  },
38
38
  "components": {
39
39
  "category": {
@@ -56,6 +56,7 @@
56
56
  "categoryNameError": "Nome categoria em falta",
57
57
  "weighting": "Ponderação",
58
58
  "openAnswer": "Resposta aberta",
59
+ "yesNoAnswer": "Resposta Sim/Não",
59
60
  "answerOption": "Opção de resposta",
60
61
  "answers": "Questões"
61
62
  },
@@ -84,6 +85,11 @@
84
85
  },
85
86
  "datePickerTag": {
86
87
  "placeholder": "Selecionar Data"
88
+ },
89
+ "webCam": {
90
+ "takePhoto": "Tirar Foto",
91
+ "confirm": "Confirmar",
92
+ "takeAgain": "Tirar Novamente"
87
93
  }
88
94
  }
89
95
  }