@omniumretail/component-library 1.2.4 → 1.2.6

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/main.css CHANGED
@@ -18,8 +18,8 @@
18
18
  .x_X2axa502qG690LM5DM{width:300px;max-width:300px;height:100%;background-color:var(--color-white);padding:24px;position:relative;transition:var(--transition-fast);overflow:hidden}@media(max-width: 1024px){.x_X2axa502qG690LM5DM{width:250px;max-width:250px;padding:12px}}.iEepDtDljm_PdBbkR3JA{max-width:100px;width:100px;overflow:hidden}@media(max-width: 1024px){.iEepDtDljm_PdBbkR3JA{max-width:75px;width:75px}}.iEepDtDljm_PdBbkR3JA .dcC_pqHYFgU16huYkWP5{font-size:0;transition:0;padding-left:42px}@media(max-width: 1024px){.iEepDtDljm_PdBbkR3JA .dcC_pqHYFgU16huYkWP5{padding-left:30px}}.iEepDtDljm_PdBbkR3JA .dcC_pqHYFgU16huYkWP5:first-letter{font-size:var(--font-size-body-4)}@media(max-width: 1024px){.iEepDtDljm_PdBbkR3JA .dcC_pqHYFgU16huYkWP5:first-letter{font-size:var(--font-size-body-3)}}.iEepDtDljm_PdBbkR3JA .spPPzIkYjj024FZcGckd{font-size:24px;padding-left:35px}@media(max-width: 1024px){.iEepDtDljm_PdBbkR3JA .spPPzIkYjj024FZcGckd{font-size:20px;padding-left:26px}}.dcC_pqHYFgU16huYkWP5{color:var(--color-black);padding:16px;font-weight:var(--font-weight-semibold);text-transform:uppercase;position:relative;white-space:nowrap;cursor:pointer}@media(max-width: 1024px){.dcC_pqHYFgU16huYkWP5{font-size:var(--font-size-body-3)}}.dcC_pqHYFgU16huYkWP5:after{content:"";position:absolute;bottom:0;left:0;height:1px;width:100%;background-color:var(--color-orange);transform:scaleY(0.5)}.MVw3JKiEvATmRxAAyFA8{color:var(--color-orange) !important}.ULIAFOHHnjA6viVps4dE{position:absolute;top:12px;right:24px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;z-index:1;cursor:pointer}@media(max-width: 1024px){.ULIAFOHHnjA6viVps4dE{right:4px}}.ULIAFOHHnjA6viVps4dE>*{font-size:var(--font-size-body-5)}@media(max-width: 1024px){.ULIAFOHHnjA6viVps4dE>*{font-size:var(--font-size-body-4)}}.PxCQRuiQJ_ybUIGB2l5f{margin-top:8px;padding-left:16px}.N7GunVO7DCC1e16M_hkm{color:var(--color-black);padding:8px;margin-top:8px;font-weight:var(--font-weight-semibold);cursor:pointer}@media(max-width: 767px){.x_X2axa502qG690LM5DM{width:50px;max-width:50px;padding:12px}.iEepDtDljm_PdBbkR3JA .dcC_pqHYFgU16huYkWP5{padding:12px 12px 12px 16px}.iEepDtDljm_PdBbkR3JA .spPPzIkYjj024FZcGckd{font-size:20px;padding-left:12px}}
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
- .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}.BAso_dbeoowN7VtxWiKx.W120L8cnn6ydwOqHngty{max-width:650px}.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}.GbZVOtcaUURjn4CweVjF{display:flex;gap:40px;font-size:var(--font-size-body-3);align-items:center}@media(max-width: 768px){.GbZVOtcaUURjn4CweVjF{gap:12px}}.C3Qrjv76hDipL39fyfzf{display:flex;align-items:center;gap:8px}@media(max-width: 768px){.C3Qrjv76hDipL39fyfzf{width:100%}}.kknDal3CIbUXI7Lu2wPV{display:flex;align-items:center;justify-content:flex-start;gap:20px}.CIMvcFtQWcBY31wttg2C{min-width:200px;max-width:450px}@media(max-width: 768px){.CIMvcFtQWcBY31wttg2C{min-width:100px;max-width:250px}}.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}:where(.css-dev-only-do-not-override-f7vrd6).ant-cascader-dropdown .ant-cascader-menu-item-disabled{color:unset}
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}.k3OGGGQwXB0zmX0T61yt{display:flex;gap:32px}.JHuRhb2cRXyGWESiQ2TQ{width:100%}.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}.mIHYAri6ebHm4Oeb1ogj{min-width:200px}@media(max-width: 768px){.mIHYAri6ebHm4Oeb1ogj{min-width:150px}}.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}
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}.BAso_dbeoowN7VtxWiKx.W120L8cnn6ydwOqHngty{max-width:650px}.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}.GbZVOtcaUURjn4CweVjF{display:flex;gap:40px;font-size:var(--font-size-body-3);align-items:center}@media(max-width: 768px){.GbZVOtcaUURjn4CweVjF{gap:12px}}.C3Qrjv76hDipL39fyfzf{display:flex;align-items:center;gap:8px}@media(max-width: 768px){.C3Qrjv76hDipL39fyfzf{width:100%}}.kknDal3CIbUXI7Lu2wPV{display:flex;align-items:center;justify-content:flex-start;gap:20px}.CIMvcFtQWcBY31wttg2C{min-width:200px;max-width:450px}@media(max-width: 768px){.CIMvcFtQWcBY31wttg2C{min-width:100px;max-width:250px}}.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}.QcIGOVL3fVF6jLF1kIL3{width:150px;pointer-events:none}.QcIGOVL3fVF6jLF1kIL3 .ant-input-group-addon{pointer-events:auto;padding:0 8px;background:rgba(0,0,0,.01)}.QcIGOVL3fVF6jLF1kIL3 .ant-input{height:35px;text-align:center;padding:unset}.QcIGOVL3fVF6jLF1kIL3 :where(.css-dev-only-do-not-override-f7vrd6).ant-space-align-center{padding:0 2px;border-bottom:unset}:where(.css-dev-only-do-not-override-f7vrd6).ant-cascader-dropdown .ant-cascader-menu-item-disabled{color:unset}
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}.k3OGGGQwXB0zmX0T61yt{display:flex;gap:32px}.JHuRhb2cRXyGWESiQ2TQ{width:100%}.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}.mIHYAri6ebHm4Oeb1ogj{min-width:200px}@media(max-width: 768px){.mIHYAri6ebHm4Oeb1ogj{min-width:150px}}.g19LZsD26yzPPjBtV31w .ant-select{width:100%}.g19LZsD26yzPPjBtV31w .ant-select-selector{border-color:rgba(var(--color-black-rgb), 0.5) !important;height:35px !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:100%;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}.CHFuXtnqohUXV_oCAEKD{font-weight:var(--font-weight-light);margin-top:20px;display:flex;gap:4px}._Bw2YaPxzqqQRpeCMde6{word-wrap:break-word;white-space:pre-wrap;max-height:100px;overflow:auto}.bIiuhNuRh643knAaSeyC{font-weight:var(--font-weight-semibold)}.DdqSfNoeh7KPEQiD0Zpe{margin-bottom:unset;width:100%}.sZh7rUlP4vu0LIE2fcab{font-weight:var(--font-weight-light);margin-bottom:4px;margin-top:16px}.mdSJ5YgFou8MwSkVypYb{margin-left:46px;margin-top:12px}.AvKaftoXc2t7E53rqtq6{display:flex;flex-direction:row;gap:12px;margin-top:12px;margin-bottom:12px;width:100%}.SgT02NKW7ogui8ih5ehj{color:var(--color-black);background-color:var(--color-white);border:1px var(--color-black) solid;min-width:100px;height:20px;font-size:10px;padding:unset}.SgT02NKW7ogui8ih5ehj:hover{background-color:var(--color-grey-light);color:var(--color-black) !important;border:1px var(--color-black) solid !important}.WPOztO5lxS5PXlAz75dE{color:var(--color-black);background-color:var(--color-white);border:1px var(--color-black) solid;min-width:100px;height:20px;font-size:10px;padding:unset}.WPOztO5lxS5PXlAz75dE:hover{background-color:var(--color-grey-light);color:var(--color-black) !important;border:1px var(--color-black) solid !important}.Yz6q7yIXvsA956q84MoK{min-width:100% !important}.wNWP4ysIqgPu6PZjqhL4{width:25%;height:40px}@media(max-width: 767px){.wNWP4ysIqgPu6PZjqhL4{width:50%}}.WMxJFTbZxL1XrEMouOTq{width:25%;height:40px}@media(max-width: 767px){.WMxJFTbZxL1XrEMouOTq{width:50%}}.ant-upload-wrapper{line-height:12px}.ant-upload-wrapper .ant-upload-list .ant-upload-list-item{max-width:100px !important}@media(max-width: 767px){.ant-upload-wrapper .ant-upload-list .ant-upload-list-item{max-width:90px !important}}:where(.css-dev-only-do-not-override-f7vrd6).ant-input-number .ant-input-number-input{height:35px}
@@ -46,5 +46,6 @@ export interface ResponsiveTableCustomProps extends TableProps<any> {
46
46
  buttonActionMethod?: () => void;
47
47
  buttonActionStyle?: string | ((record: any) => any);
48
48
  cleanRowSelection?: boolean;
49
+ getRowActions?: (record: any) => any;
49
50
  }
50
51
  export declare const ResponsiveTable: (props: ResponsiveTableCustomProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/component-library",
3
- "version": "1.2.04",
3
+ "version": "1.2.06",
4
4
  "private": false,
5
5
  "main": "dist/bundle.js",
6
6
  "typings": "./dist/types/index",
@@ -55,6 +55,7 @@ const Template: Story<any> = (args) => {
55
55
  "State": "Finished",
56
56
  "Grade": 0,
57
57
  "Rank": 0,
58
+ "UseName": true,
58
59
  "Options": [
59
60
  {
60
61
  "Value": "Sim",
@@ -67,6 +68,12 @@ const Template: Story<any> = (args) => {
67
68
  "Grade": 10,
68
69
  "Color": "#00000",
69
70
  "NeedsAction": true
71
+ },
72
+ {
73
+ "Value": "xpto",
74
+ "Grade": 10,
75
+ "Color": "#00000",
76
+ "NeedsAction": true
70
77
  }
71
78
  ],
72
79
  "CreateDate": "2024-04-12T14:58:32.085Z",
@@ -83,7 +90,7 @@ const Template: Story<any> = (args) => {
83
90
  "IsNumerical": false,
84
91
  "IsDate": false,
85
92
  "HasGrade": false,
86
- "IsEmphasis": false,
93
+ "IsEmphasis": true,
87
94
  "IsMultipleChoise": true,
88
95
  "State": "Draft",
89
96
  "Grade": 0,
@@ -53,7 +53,7 @@ Label {
53
53
 
54
54
  .ant-select-selector {
55
55
  border-color: rgba(var(--color-black-rgb), .5) !important;
56
- height: 50px !important;
56
+ height: 35px !important;
57
57
  display: flex;
58
58
  align-items: center;
59
59
  }
@@ -410,7 +410,7 @@ export const CategoryResponse = React.forwardRef((props: CategoryResponse, ref)
410
410
  ? <Form.Item
411
411
  name={["Questions", index, "Answer"]}
412
412
  >
413
- <TextArea />
413
+ <TextArea disabled={question.Disabled} />
414
414
  </Form.Item>
415
415
 
416
416
  : question.IsDate
@@ -446,7 +446,6 @@ export const CategoryResponse = React.forwardRef((props: CategoryResponse, ref)
446
446
  ? question?.Options?.map((option: any) => ({ label: option.Value, value: option.Value }))
447
447
  : evaluationOptions[selectedEvaluationOption]
448
448
  }
449
- // style={{ minWidth: '100%' }}
450
449
  mode={form.getFieldValue(`Questions`)?.[index]?.IsMultipleChoise ? "multiple" : undefined}
451
450
  customClass={styles.selectAnswerStyle}
452
451
  />
@@ -1,8 +1,8 @@
1
- import { DeleteOutlined, HolderOutlined, InfoCircleOutlined } from '@ant-design/icons';
2
- import { Checkbox, ColorPicker, Form, Input, Select, Space } from 'antd';
1
+ import { DeleteOutlined, DownOutlined, HolderOutlined, InfoCircleOutlined } from '@ant-design/icons';
2
+ import { Checkbox, ColorPicker, Form, Input, Select, Space, Dropdown } from 'antd';
3
3
  import { t } from 'i18next';
4
4
  import styles from './styles.module.scss';
5
- import { useState } from 'react';
5
+ import { useEffect, useState } from 'react';
6
6
  import classnames from 'classnames';
7
7
 
8
8
  export const SingleQuestion = ({
@@ -21,9 +21,15 @@ export const SingleQuestion = ({
21
21
  form,
22
22
  ...restField
23
23
  }: any) => {
24
+
25
+ const responseTypeCurrentValue = form.getFieldsValue().questions?.[name]?.responseType;
26
+ const initialEmphasisValue = form.getFieldsValue().questions?.[name]?.emphasis;
27
+
24
28
  const [mandatoryCheckbox, setMandatoryCheckbox] = useState<boolean>(false);
25
- const [emphasisCheckbox, setEmphasisCheckbox] = useState<boolean>(false);
29
+ const [emphasisCheckbox, setEmphasisCheckbox] = useState<boolean>(initialEmphasisValue ? initialEmphasisValue : true);
26
30
  const [multipleChoiseCheckbox, setMultipleChoiseCheckbox] = useState<boolean>(false);
31
+ const [flaggedOptions, setFlaggedOptions] = useState([]);
32
+
27
33
 
28
34
  const filteredResponsesMultiple = responseTypeOptions
29
35
  ?.filter((item: { IsMultipleChoise: any; }) => item.IsMultipleChoise)
@@ -61,19 +67,16 @@ export const SingleQuestion = ({
61
67
  };
62
68
  });
63
69
 
64
- const handleResponseType = (selectedValue: string) => {
65
- const selectedResponseType = sortedAnswerTypeOptions.find(
66
- (type: any) => type.Id === selectedValue
67
- );
68
-
69
- if (selectedResponseType) {
70
- const hasNeedsAction = selectedResponseType.Options.some(
71
- (option: any) => option.NeedsAction === true
72
- );
73
-
74
- // setEmphasisCheckbox(hasNeedsAction);
75
- }
70
+ const handleResponseType = () => {
76
71
  handleChanges();
72
+ setEmphasisCheckbox(true);
73
+ form.setFieldsValue({
74
+ questions: {
75
+ [name]: {
76
+ emphasis: true,
77
+ },
78
+ },
79
+ });
77
80
  };
78
81
 
79
82
  const onCheckboxMultipeChoiseHandler = (checked: boolean) => {
@@ -91,6 +94,34 @@ export const SingleQuestion = ({
91
94
  handleChanges();
92
95
  };
93
96
 
97
+ useEffect(() => {
98
+ const selectedResponseType = form.getFieldValue(['questions', name, 'responseType']);
99
+
100
+ if (selectedResponseType) {
101
+ const selectedAnswerType = sortedAnswerTypeOptions.find(
102
+ (answerType: any) => answerType.Id === selectedResponseType
103
+ );
104
+
105
+ if (selectedAnswerType) {
106
+ const flagged = selectedAnswerType.Options?.filter((option: any) => option.NeedsAction) || [];
107
+ setFlaggedOptions(flagged);
108
+ }
109
+ } else {
110
+ setFlaggedOptions([]);
111
+ }
112
+ }, [responseTypeCurrentValue]);
113
+
114
+ const getFlaggedOptionsMenu = () => {
115
+ return flaggedOptions.map((option: any, idx) => ({
116
+ key: idx,
117
+ label: (
118
+ <span key={idx} style={{ color: option.Color }}>
119
+ {option.Value} ({option.Grade}) 🚩
120
+ </span>
121
+ ),
122
+ }));
123
+ };
124
+
94
125
  const canDrag = !((restField.fieldKey === 0 || restField.fieldKey === 1) && isTheHeader);
95
126
 
96
127
  const questionStyle = classnames({
@@ -195,19 +226,30 @@ export const SingleQuestion = ({
195
226
 
196
227
  {filteredResponsesEmphasised?.includes(form.getFieldsValue().questions?.[name]?.responseType) &&
197
228
  <div className={styles.checkboxContainer}>
198
- <Form.Item
199
- {...restField}
200
- name={[name, 'emphasis']}
201
- valuePropName='checked'
202
- // getValueProps={() => ({ checked: emphasisCheckbox })}
203
- >
204
- <Checkbox
205
- onChange={(e) => onCheckboxEmphasisHandler(e.target.checked)}
206
- checked={emphasisCheckbox}
207
- />
208
- </Form.Item>
209
-
210
- <span>{t('components.category.emphasisAnswer')}</span>
229
+ <Input
230
+ addonBefore={
231
+ <Form.Item
232
+ {...restField}
233
+ name={[name, 'emphasis']}
234
+ valuePropName='checked'
235
+ initialValue={initialEmphasisValue ? initialEmphasisValue : true}
236
+ >
237
+ <Checkbox
238
+ onChange={(e) => onCheckboxEmphasisHandler(e.target.checked)}
239
+ checked={emphasisCheckbox}
240
+ />
241
+ </Form.Item>
242
+ }
243
+ addonAfter={
244
+ <Dropdown menu={{ items: getFlaggedOptionsMenu() }}>
245
+ <a>
246
+ <DownOutlined />
247
+ </a>
248
+ </Dropdown>
249
+ }
250
+ defaultValue={t('components.category.emphasisAnswer')!}
251
+ className={styles.emphasisInputStyle}
252
+ />
211
253
  </div>
212
254
  }
213
255
 
@@ -111,6 +111,30 @@ $questionAndInformationGap: 20px;
111
111
  margin-top: 24px;
112
112
  }
113
113
 
114
+ .emphasisInputStyle {
115
+ width: 150px;
116
+ pointer-events: none;
117
+
118
+ :global {
119
+ .ant-input-group-addon {
120
+ pointer-events: auto;
121
+ padding: 0 8px;
122
+ background: rgba(0, 0, 0, 0.01);
123
+ }
124
+
125
+ .ant-input {
126
+ height: 35px;
127
+ text-align: center;
128
+ padding: unset;
129
+ }
130
+
131
+ :where(.css-dev-only-do-not-override-f7vrd6).ant-space-align-center {
132
+ padding: 0 2px;
133
+ border-bottom: unset;
134
+ }
135
+ }
136
+ }
137
+
114
138
  :global {
115
139
  :where(.css-dev-only-do-not-override-f7vrd6).ant-cascader-dropdown .ant-cascader-menu-item-disabled {
116
140
  color: unset;
@@ -25,23 +25,41 @@ const Template: Story<ResponsiveTableCustomProps> = (args) => {
25
25
  return (record as any)?.type === "Efetivo" ? "Pog" : null;
26
26
  };
27
27
 
28
- console.log(rowSelectionInfo);
28
+ const getActionsForRecord = (record: any) => {
29
+ return (record as any)?.role === "Gerente"
30
+ ? [
31
+ {
32
+ key: '1', label: `${t('actions.one')}`, onClick: () => {
33
+ setClearRowSelection(true);
34
+ }
35
+ },
36
+ { key: '2', label: `${t('actions.two')}` },
37
+ {
38
+ key: '3', label: 'label 3'
39
+ }
40
+ ]
41
+ : [
42
+ {
43
+ key: '1', label: `${t('actions.one')}`, onClick: () => {
44
+ setClearRowSelection(true);
45
+ }
46
+ },
47
+ { key: '2', label: `${t('actions.two')}` },
48
+ {
49
+ key: '3', label: 'label 3'
50
+ },
51
+ {
52
+ key: '4', label: 'label 4'
53
+ }
54
+ ];
55
+ };
56
+
29
57
 
30
58
  return <ResponsiveTable
31
59
  scroll={{ x: 4000 }}
32
60
  cleanRowSelection={clearRowSelection}
33
61
  columnsSortChange={handleSortByColumnChange} paginationInfo={setPageInfo} headingTranslationsKey={'tableHeadings'} rowSelectionInfo={setRowSelectionInfo}
34
- actionsArray={[
35
- {
36
- key: '1', label: `${t('actions.one')}`, onClick: () => {
37
- setClearRowSelection(true);
38
- }
39
- },
40
- { key: '2', label: `${t('actions.two')}` },
41
- {
42
- key: '3', label: 'label 3'
43
- }
44
- ]}
62
+ getRowActions={getActionsForRecord}
45
63
  fixedColumns={[{ dataIndex: 'action', side: 'right' }]} buttonActionMethod={() => handleSortByColumnChange} buttonActionLabel={getButtonLabel} {...args}>
46
64
  </ResponsiveTable>;
47
65
  };
@@ -52,6 +52,7 @@ export interface ResponsiveTableCustomProps extends TableProps<any> {
52
52
  buttonActionMethod?: () => void;
53
53
  buttonActionStyle?: string | ((record: any) => any);
54
54
  cleanRowSelection?: boolean;
55
+ getRowActions?: (record: any) => any;
55
56
  }
56
57
 
57
58
  export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
@@ -81,7 +82,8 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
81
82
  buttonActionMethod,
82
83
  buttonActionStyle,
83
84
  buttonActionLabel,
84
- cleanRowSelection
85
+ cleanRowSelection,
86
+ getRowActions
85
87
  } = props;
86
88
 
87
89
  const [customFilters, setCustomFilters] = useState<any>([]);
@@ -211,7 +213,12 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
211
213
  ellipsis: false,
212
214
  align: 'right',
213
215
  render: (_: any, record: any) => {
214
- if (!items?.[0]) return null;
216
+ const rowActions = getRowActions ? getRowActions(record) : null;
217
+
218
+ if ((!items?.[0] && !rowActions)) return null;
219
+
220
+ const actions = rowActions ? rowActions : items;
221
+
215
222
  const buttonLabel = buttonActionLabel ? buttonActionLabel(record) : null;
216
223
 
217
224
  const buttonClass = typeof buttonActionStyle === 'function'
@@ -224,7 +231,7 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
224
231
  <Button customClass={buttonClass} onClick={() => buttonActionMethod?.()}>{buttonActionName || buttonLabel}</Button>
225
232
  }
226
233
 
227
- <Dropdown menu={{ items }}>
234
+ <Dropdown menu={{ items: actions }}>
228
235
  <a>
229
236
  <MoreOutlined style={{ color: 'var(--color-blue)', transform: 'scale(1.6)' }} />
230
237
  </a>
@@ -234,7 +241,7 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
234
241
  },
235
242
  };
236
243
 
237
- items && columns.push(columnActions as any);
244
+ (items || getRowActions) && columns.push(columnActions as any);
238
245
 
239
246
  if (fixedColumns) {
240
247
  fixedColumns.forEach((column) => {