Skip to content

Commit

Permalink
ignore vulnerabiity implementation & refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
future-pirate-king committed May 23, 2024
1 parent 486c8e4 commit 0a6d90e
Show file tree
Hide file tree
Showing 78 changed files with 4,282 additions and 2,205 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'warn',
'no-debugger': 'error',
'ember/no-empty-glimmer-component-classes': 'off',
'ember/no-pause-test': 'error',
},
overrides: [
// node files
Expand Down
55 changes: 55 additions & 0 deletions app/components/ak-svg/severity-override-success.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<svg
...attributes
width='167'
height='97'
viewBox='0 0 167 97'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M160 14.2695C163.866 14.2695 167 17.2509 167 20.9287C167 24.6065 163.866 27.5879 160 27.5879H120C123.866 27.5879 127 30.5693 127 34.2471C127 37.9248 123.866 40.9062 120 40.9062H142C145.866 40.9062 149 43.8876 149 47.5654C149 51.2432 145.866 54.2246 142 54.2246H131.826C126.952 54.2246 123 57.206 123 60.8838C123 63.3356 125 65.5553 129 67.5429C132.866 67.5429 136 70.5244 136 74.2021C136 77.8799 132.866 80.8613 129 80.8613H46C42.134 80.8613 39 77.8799 39 74.2021C39 70.5244 42.134 67.5429 46 67.5429H7C3.13401 67.5429 0 64.5615 0 60.8838C0 57.206 3.13401 54.2246 7 54.2246H47C50.866 54.2246 54 51.2432 54 47.5654C54 43.8876 50.866 40.9062 47 40.9062H22C18.134 40.9062 15 37.9248 15 34.2471C15 30.5693 18.134 27.5879 22 27.5879H62C58.134 27.5879 55 24.6065 55 20.9287C55 17.2509 58.134 14.2695 62 14.2695H160ZM160 40.9062C163.866 40.9062 167 43.8876 167 47.5654C167 51.2432 163.866 54.2246 160 54.2246C156.134 54.2246 153 51.2432 153 47.5654C153 43.8876 156.134 40.9062 160 40.9062Z'
fill='#F5F5F5'
/>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M106.262 13.316L115.917 78.1467L116.788 84.6503C117.069 86.7454 115.531 88.6425 113.352 88.8876L55.1606 95.4333C52.9817 95.6784 50.9878 94.1786 50.707 92.0835L41.3035 21.9217C41.1631 20.8742 41.9324 19.9256 43.0218 19.803C43.0287 19.8023 43.0356 19.8015 43.0425 19.8008L47.8705 19.307M51.8449 19.1783L56.4264 18.7061L51.8449 19.1783Z'
fill='white'
/>
<path
d='M107.5 13.1469C107.399 12.4639 106.762 11.9859 106.078 12.0793C105.394 12.1728 104.922 12.8022 105.024 13.4851L107.5 13.1469ZM115.917 78.1467L117.157 77.9956C117.157 77.9896 117.156 77.9835 117.155 77.9775L115.917 78.1467ZM116.788 84.6503L118.029 84.4992L116.788 84.6503ZM113.352 88.8876L113.506 90.128L113.352 88.8876ZM55.1606 95.4333L55.3153 96.6737L55.1606 95.4333ZM50.707 92.0835L51.9477 91.9324L50.707 92.0835ZM41.3035 21.9217L40.0627 22.0728L41.3035 21.9217ZM43.0425 19.8008L43.1847 21.0425L43.0425 19.8008ZM48.0127 20.5487C48.6996 20.4784 49.1928 19.8655 49.1143 19.1798C49.0357 18.494 48.4153 17.9951 47.7284 18.0653L48.0127 20.5487ZM51.7017 17.9368C51.0149 18.0076 50.5222 18.6208 50.6013 19.3065C50.6804 19.9922 51.3012 20.4907 51.9881 20.4199L51.7017 17.9368ZM56.5695 19.9476C57.2563 19.8768 57.749 19.2636 57.67 18.5779C57.5909 17.8922 56.97 17.3937 56.2832 17.4645L56.5695 19.9476ZM105.024 13.4851L114.679 78.3158L117.155 77.9775L107.5 13.1469L105.024 13.4851ZM114.676 78.2977L115.548 84.8013L118.029 84.4992L117.157 77.9956L114.676 78.2977ZM115.548 84.8013C115.73 86.1649 114.729 87.475 113.197 87.6473L113.506 90.128C116.332 89.8101 118.408 87.3259 118.029 84.4992L115.548 84.8013ZM113.197 87.6473L55.0058 94.193L55.3153 96.6737L113.506 90.128L113.197 87.6473ZM55.0058 94.193C53.466 94.3662 52.1318 93.306 51.9477 91.9324L49.4662 92.2346C49.8437 95.0513 52.4974 96.9906 55.3153 96.6737L55.0058 94.193ZM51.9477 91.9324L42.5442 21.7707L40.0627 22.0728L49.4662 92.2346L51.9477 91.9324ZM42.5442 21.7707C42.5019 21.4547 42.7338 21.0932 43.1765 21.0434L42.8671 18.5627C41.131 18.758 39.8242 20.2936 40.0627 22.0728L42.5442 21.7707ZM43.1765 21.0434C43.1792 21.0431 43.182 21.0428 43.1847 21.0425L42.9003 18.5592C42.8892 18.5603 42.8782 18.5615 42.8671 18.5627L43.1765 21.0434ZM43.1847 21.0425L48.0127 20.5487L47.7284 18.0653L42.9003 18.5592L43.1847 21.0425ZM51.9881 20.4199L56.5695 19.9476L56.2832 17.4645L51.7017 17.9368L51.9881 20.4199Z'
fill='#9D9D9D'
/>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M104.14 17.3801L112.559 75.8703L113.317 81.7381C113.561 83.6285 112.167 85.3469 110.203 85.5762L57.761 91.7018C55.7974 91.9311 54.0079 90.5846 53.7639 88.6943L45.6261 25.6447C45.4847 24.5492 46.2595 23.5572 47.3566 23.4291L53.8428 22.6715'
fill='#E9E9E9'
/>
<path
d='M60.9219 4C60.9219 2.48122 62.1531 1.25 63.6719 1.25H109.287C109.992 1.25 110.67 1.521 111.182 2.00697L124.567 14.7325L125.428 13.8266L124.567 14.7325C125.113 15.2516 125.422 15.9721 125.422 16.7255V75.9101C125.422 77.4289 124.191 78.6601 122.672 78.6601H63.6719C62.1531 78.6601 60.9219 77.4289 60.9219 75.9101V4Z'
fill='white'
stroke='#9D9D9D'
stroke-width='2.5'
/>
<path
d='M79.6668 24.2497V22.4559L82.8897 19.2476C82.9772 19.1601 83.0745 19.0969 83.1814 19.058C83.2884 19.0191 83.3953 18.9997 83.5022 18.9997C83.6189 18.9997 83.7307 19.0215 83.8377 19.0653C83.9446 19.109 84.0418 19.1747 84.1293 19.2622L84.6689 19.8018C84.7467 19.8893 84.8075 19.9865 84.8512 20.0934C84.895 20.2004 84.9168 20.3073 84.9168 20.4143C84.9168 20.5212 84.8974 20.6306 84.8585 20.7424C84.8196 20.8542 84.7564 20.9538 84.6689 21.0413L81.4606 24.2497H79.6668ZM73.8335 23.6663V22.033C73.8335 21.7025 73.9186 21.3986 74.0887 21.1215C74.2588 20.8445 74.4849 20.633 74.7668 20.4872C75.3696 20.1858 75.9821 19.9597 76.6043 19.809C77.2266 19.6584 77.8585 19.583 78.5002 19.583C78.8599 19.583 79.2147 19.6049 79.5647 19.6486C79.9147 19.6924 80.2647 19.7629 80.6147 19.8601L78.5002 21.9747V23.6663H73.8335ZM83.5022 20.983L84.0418 20.4143L83.5022 19.8747L82.9481 20.4288L83.5022 20.983ZM78.5002 18.9997C77.8585 18.9997 77.3092 18.7712 76.8522 18.3143C76.3953 17.8573 76.1668 17.308 76.1668 16.6663C76.1668 16.0247 76.3953 15.4754 76.8522 15.0184C77.3092 14.5615 77.8585 14.333 78.5002 14.333C79.1418 14.333 79.6911 14.5615 80.1481 15.0184C80.605 15.4754 80.8335 16.0247 80.8335 16.6663C80.8335 17.308 80.605 17.8573 80.1481 18.3143C79.6911 18.7712 79.1418 18.9997 78.5002 18.9997Z'
fill='#FF4D3F'
/>
<path
d='M110.672 2.28516V13.3177C110.672 14.8939 112.015 16.1716 113.672 16.1716H123.5'
stroke='#9D9D9D'
stroke-width='2.5'
stroke-linecap='round'
stroke-linejoin='round'
/>
<path
d='M71 65H96.3953M71 34H96.3953H71ZM71 41.2941H113H71ZM71 49.1961H113H71ZM71 57.098H113H71Z'
stroke='#E9E9E9'
stroke-width='2.5'
stroke-linecap='round'
stroke-linejoin='round'
/>
</svg>
63 changes: 63 additions & 0 deletions app/components/ak-svg/severity-reset-success.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<svg
...attributes
width='167'
height='97'
viewBox='0 0 167 97'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M160 14.2695C163.866 14.2695 167 17.2509 167 20.9287C167 24.6065 163.866 27.5879 160 27.5879H120C123.866 27.5879 127 30.5693 127 34.2471C127 37.9248 123.866 40.9062 120 40.9062H142C145.866 40.9062 149 43.8876 149 47.5654C149 51.2432 145.866 54.2246 142 54.2246H131.826C126.952 54.2246 123 57.206 123 60.8838C123 63.3356 125 65.5553 129 67.5429C132.866 67.5429 136 70.5244 136 74.2021C136 77.8799 132.866 80.8613 129 80.8613H46C42.134 80.8613 39 77.8799 39 74.2021C39 70.5244 42.134 67.5429 46 67.5429H7C3.13401 67.5429 0 64.5615 0 60.8838C0 57.206 3.13401 54.2246 7 54.2246H47C50.866 54.2246 54 51.2432 54 47.5654C54 43.8876 50.866 40.9062 47 40.9062H22C18.134 40.9062 15 37.9248 15 34.2471C15 30.5693 18.134 27.5879 22 27.5879H62C58.134 27.5879 55 24.6065 55 20.9287C55 17.2509 58.134 14.2695 62 14.2695H160ZM160 40.9062C163.866 40.9062 167 43.8876 167 47.5654C167 51.2432 163.866 54.2246 160 54.2246C156.134 54.2246 153 51.2432 153 47.5654C153 43.8876 156.134 40.9062 160 40.9062Z'
fill='#2DB421'
fill-opacity='0.1'
/>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M106.262 13.316L115.917 78.1467L116.788 84.6503C117.069 86.7454 115.531 88.6425 113.352 88.8876L55.1606 95.4333C52.9817 95.6784 50.9878 94.1786 50.707 92.0835L41.3035 21.9217C41.1631 20.8742 41.9324 19.9256 43.0218 19.803C43.0287 19.8023 43.0356 19.8015 43.0425 19.8008L47.8705 19.307M51.8449 19.1783L56.4264 18.7061L51.8449 19.1783Z'
fill='white'
/>
<path
d='M107.5 13.1469C107.399 12.4639 106.762 11.9859 106.078 12.0793C105.394 12.1728 104.922 12.8022 105.024 13.4851L107.5 13.1469ZM115.917 78.1467L117.157 77.9956C117.157 77.9896 117.156 77.9835 117.155 77.9775L115.917 78.1467ZM116.788 84.6503L118.029 84.4992L116.788 84.6503ZM113.352 88.8876L113.506 90.128L113.352 88.8876ZM55.1606 95.4333L55.3153 96.6737L55.1606 95.4333ZM50.707 92.0835L51.9477 91.9324L50.707 92.0835ZM41.3035 21.9217L40.0627 22.0728L41.3035 21.9217ZM43.0425 19.8008L43.1847 21.0425L43.0425 19.8008ZM48.0127 20.5487C48.6996 20.4784 49.1928 19.8655 49.1143 19.1798C49.0357 18.494 48.4153 17.9951 47.7284 18.0653L48.0127 20.5487ZM51.7017 17.9368C51.0149 18.0076 50.5222 18.6208 50.6013 19.3065C50.6804 19.9922 51.3012 20.4907 51.9881 20.4199L51.7017 17.9368ZM56.5695 19.9476C57.2563 19.8768 57.749 19.2636 57.67 18.5779C57.5909 17.8922 56.97 17.3937 56.2832 17.4645L56.5695 19.9476ZM105.024 13.4851L114.679 78.3158L117.155 77.9775L107.5 13.1469L105.024 13.4851ZM114.676 78.2977L115.548 84.8013L118.029 84.4992L117.157 77.9956L114.676 78.2977ZM115.548 84.8013C115.73 86.1649 114.729 87.475 113.197 87.6473L113.506 90.128C116.332 89.8101 118.408 87.3259 118.029 84.4992L115.548 84.8013ZM113.197 87.6473L55.0058 94.193L55.3153 96.6737L113.506 90.128L113.197 87.6473ZM55.0058 94.193C53.466 94.3662 52.1318 93.306 51.9477 91.9324L49.4662 92.2346C49.8437 95.0513 52.4974 96.9906 55.3153 96.6737L55.0058 94.193ZM51.9477 91.9324L42.5442 21.7707L40.0627 22.0728L49.4662 92.2346L51.9477 91.9324ZM42.5442 21.7707C42.5019 21.4547 42.7338 21.0932 43.1765 21.0434L42.8671 18.5627C41.131 18.758 39.8242 20.2936 40.0627 22.0728L42.5442 21.7707ZM43.1765 21.0434C43.1792 21.0431 43.182 21.0428 43.1847 21.0425L42.9003 18.5592C42.8892 18.5603 42.8782 18.5615 42.8671 18.5627L43.1765 21.0434ZM43.1847 21.0425L48.0127 20.5487L47.7284 18.0653L42.9003 18.5592L43.1847 21.0425ZM51.9881 20.4199L56.5695 19.9476L56.2832 17.4645L51.7017 17.9368L51.9881 20.4199Z'
fill='#9D9D9D'
/>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M104.14 17.3801L112.559 75.8703L113.317 81.7381C113.561 83.6285 112.167 85.3469 110.203 85.5762L57.761 91.7018C55.7974 91.9311 54.0079 90.5846 53.7639 88.6943L45.6261 25.6447C45.4847 24.5492 46.2595 23.5572 47.3566 23.4291L53.8428 22.6715'
fill='#E9E9E9'
/>
<path
d='M60.9219 4C60.9219 2.48122 62.1531 1.25 63.6719 1.25H109.287C109.992 1.25 110.67 1.521 111.182 2.00697L124.567 14.7325L125.428 13.8266L124.567 14.7325C125.113 15.2516 125.422 15.9721 125.422 16.7255V75.9101C125.422 77.4289 124.191 78.6601 122.672 78.6601H63.6719C62.1531 78.6601 60.9219 77.4289 60.9219 75.9101V4Z'
fill='white'
stroke='#2DB421'
stroke-width='2.5'
/>
<g clip-path='url(#clip0_20025_4883)'>
<path
d='M85.7656 19.5C85.7656 23.5127 82.5127 26.7656 78.5 26.7656C74.4873 26.7656 71.2344 23.5127 71.2344 19.5C71.2344 15.4873 74.4873 12.2344 78.5 12.2344C82.5127 12.2344 85.7656 15.4873 85.7656 19.5ZM77.6596 23.3471L83.0502 17.9565C83.2333 17.7734 83.2333 17.4766 83.0502 17.2936L82.3873 16.6307C82.2043 16.4476 81.9075 16.4476 81.7244 16.6307L77.3281 21.0269L75.2756 18.9744C75.0926 18.7913 74.7958 18.7913 74.6127 18.9744L73.9498 19.6373C73.7667 19.8203 73.7667 20.1171 73.9498 20.3002L76.9967 23.3471C77.1797 23.5301 77.4765 23.5301 77.6596 23.3471Z'
fill='#2DB421'
/>
</g>
<path
d='M110.672 2.28516V13.3177C110.672 14.8939 112.015 16.1716 113.672 16.1716H123.5'
stroke='#2DB421'
stroke-width='2.5'
stroke-linecap='round'
stroke-linejoin='round'
/>
<path
d='M71 65H96.3953M71 34H96.3953H71ZM71 41.2941H113H71ZM71 49.1961H113H71ZM71 57.098H113H71Z'
stroke='#E9E9E9'
stroke-width='2.5'
stroke-linecap='round'
stroke-linejoin='round'
/>
<defs>
<clipPath id='clip0_20025_4883'>
<rect width='15' height='15' fill='white' transform='translate(71 12)' />
</clipPath>
</defs>
</svg>
2 changes: 1 addition & 1 deletion app/components/analysis-risk/overridden-icon/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from '@glimmer/component';

export interface AnalysisRiskOverriddenIconSignature {
Element: Element;
Element: SVGElement;
}

export default class AnalysisRiskOverriddenIconComponent extends Component<AnalysisRiskOverriddenIconSignature> {}
Expand Down
12 changes: 12 additions & 0 deletions app/components/analysis-risk/override-details-icon/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<svg
width='16'
height='16'
viewBox='0 0 12 12'
fill='#171717'
xmlns='http://www.w3.org/2000/svg'
...attributes
>
<path
d='M8.125 10.6665H8.70833V8.33317H8.125V10.6665ZM8.41667 7.74984C8.49444 7.74984 8.5625 7.72067 8.62083 7.66234C8.67917 7.604 8.70833 7.53595 8.70833 7.45817C8.70833 7.38039 8.67917 7.31234 8.62083 7.254C8.5625 7.19567 8.49444 7.1665 8.41667 7.1665C8.33889 7.1665 8.27083 7.19567 8.2125 7.254C8.15417 7.31234 8.125 7.38039 8.125 7.45817C8.125 7.53595 8.15417 7.604 8.2125 7.66234C8.27083 7.72067 8.33889 7.74984 8.41667 7.74984ZM2.58333 7.1665H4.72708C4.83403 6.94289 4.95799 6.73387 5.09896 6.53942C5.23993 6.34498 5.39792 6.16511 5.57292 5.99984H2.58333V7.1665ZM2.58333 9.49984H4.37708C4.34792 9.30539 4.33333 9.11095 4.33333 8.9165C4.33333 8.72206 4.34792 8.52761 4.37708 8.33317H2.58333V9.49984ZM1.41667 11.8332C1.09583 11.8332 0.821181 11.7189 0.592708 11.4905C0.364236 11.262 0.25 10.9873 0.25 10.6665V1.33317C0.25 1.01234 0.364236 0.737684 0.592708 0.509212C0.821181 0.28074 1.09583 0.166504 1.41667 0.166504H6.08333L9.58333 3.6665V5.00817C9.39861 4.94984 9.20903 4.90609 9.01458 4.87692C8.82014 4.84775 8.62083 4.83317 8.41667 4.83317V4.24984H5.5V1.33317H1.41667V10.6665H4.72708C4.83403 10.8901 4.95799 11.0991 5.09896 11.2936C5.23993 11.488 5.39792 11.6679 5.57292 11.8332H1.41667ZM8.41667 5.99984C9.22361 5.99984 9.91146 6.28421 10.4802 6.85296C11.049 7.42171 11.3333 8.10956 11.3333 8.9165C11.3333 9.72345 11.049 10.4113 10.4802 10.98C9.91146 11.5488 9.22361 11.8332 8.41667 11.8332C7.60972 11.8332 6.92187 11.5488 6.35312 10.98C5.78437 10.4113 5.5 9.72345 5.5 8.9165C5.5 8.10956 5.78437 7.42171 6.35312 6.85296C6.92187 6.28421 7.60972 5.99984 8.41667 5.99984Z'
/>
</svg>
13 changes: 13 additions & 0 deletions app/components/analysis-risk/override-details-icon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Component from '@glimmer/component';

export interface AnalysisRiskOverrideDetailsIconSignature {
Element: SVGElement;
}

export default class AnalysisRiskOverrideDetailsIconComponent extends Component<AnalysisRiskOverrideDetailsIconSignature> {}

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
'AnalysisRisk::OverrideDetailsIcon': typeof AnalysisRiskOverrideDetailsIconComponent;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div local-class='edit-analysis-content'>
{{#let (component this.activeComponent) as |ActiveComponent|}}
<ActiveComponent
@dataModel={{@dataModel}}
@setAppBarData={{@setAppBarData}}
@setActiveComponent={{this.setActiveComponent}}
@drawerCloseHandler={{@drawerCloseHandler}}
/>
{{/let}}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.edit-analysis-content {
width: 650px;
border: 1px solid
var(--analysis-risk-override-edit-drawer-content-border-color);
border-radius: var(
--analysis-risk-override-edit-drawer-content-border-radius
);
margin: 1.5em;
}
50 changes: 50 additions & 0 deletions app/components/analysis-risk/override-edit-drawer/content/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

import { AnalysisRiskDataModel, OverrideEditDrawerAppBarData } from '..';

export interface AnalysisRiskOverrideEditDrawerContentSignature {
Args: {
dataModel: AnalysisRiskDataModel;
setAppBarData: (appBarData: OverrideEditDrawerAppBarData) => void;
drawerCloseHandler: () => void;
};
}

export type ActiveContentComponent =
| 'analysis-risk/override-edit-drawer/override-details'
| 'analysis-risk/override-edit-drawer/override-form'
| 'analysis-risk/override-edit-drawer/reset-confirm';

export default class AnalysisRiskOverrideEditDrawerContentComponent extends Component<AnalysisRiskOverrideEditDrawerContentSignature> {
@tracked showOverrideFormToEdit = false;
@tracked activeComponent: ActiveContentComponent;

constructor(
owner: unknown,
args: AnalysisRiskOverrideEditDrawerContentSignature['Args']
) {
super(owner, args);

this.activeComponent = this.args.dataModel.isOverridden
? 'analysis-risk/override-edit-drawer/override-details'
: 'analysis-risk/override-edit-drawer/override-form';
}

@action
handleShowOverrideFormToEdit(value: boolean) {
this.showOverrideFormToEdit = value;
}

@action
setActiveComponent(component: ActiveContentComponent) {
this.activeComponent = component;
}
}

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
'AnalysisRisk::OverrideEditDrawer::Content': typeof AnalysisRiskOverrideEditDrawerContentComponent;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div
local-class='divider-container'
data-test-analysisRisk-overrideEditDrawer-divider
>
<div local-class='divider'></div>

<AkTypography @tag='div' local-class='divider-label'>
{{@label}}
</AkTypography>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.divider-container {
width: 100px;
height: 24px;
position: relative;

.divider {
width: 100%;
border-bottom: 1px dashed
var(--analysis-risk-override-edit-drawer-divider-color);
z-index: -1;
}

.divider,
.divider-label {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.divider-label {
z-index: 1;
min-width: 32px;
height: 24px;
border-radius: 6px;
box-sizing: border-box;
padding: 0 0.75em;
background-color: var(
--analysis-risk-override-edit-drawer-divider-label-background-color
);
font-size: 0.857rem !important;
display: inline-flex;
align-items: center;
}
}
16 changes: 16 additions & 0 deletions app/components/analysis-risk/override-edit-drawer/divider/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Component from '@glimmer/component';

export interface AnalysisRiskOverrideEditDrawerDividerSignature {
Args: {
label: string;
};
}

export default class AnalysisRiskOverrideEditDrawerDividerComponent extends Component<AnalysisRiskOverrideEditDrawerDividerSignature> {}

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
'AnalysisRisk::OverrideEditDrawer::Divider': typeof AnalysisRiskOverrideEditDrawerDividerComponent;
'analysis-risk/override-edit-drawer/divider': typeof AnalysisRiskOverrideEditDrawerDividerComponent;
}
}
37 changes: 37 additions & 0 deletions app/components/analysis-risk/override-edit-drawer/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<AkDrawer @open={{@open}} @onClose={{@onClose}} @anchor='right' as |dr|>
<AkAppbar @justifyContent='space-between' class='px-3' as |ab|>
<AkStack @alignItems='center' @spacing='1'>
{{#if this.appBarData.onBackClick}}
<AkIconButton
data-test-analysisRisk-overrideEditDrawer-backBtn
{{on 'click' this.appBarData.onBackClick}}
class={{ab.classes.defaultIconBtn}}
>
<AkIcon @iconName='arrow-back' />
</AkIconButton>
{{/if}}

<AkTypography
data-test-analysisRisk-overrideEditDrawer-title
@color='inherit'
@variant='h5'
>
{{this.appBarData.title}}
</AkTypography>
</AkStack>

<AkIconButton
data-test-analysisRisk-overrideEditDrawer-closeBtn
{{on 'click' dr.closeHandler}}
class={{ab.classes.defaultIconBtn}}
>
<AkIcon @iconName='close' />
</AkIconButton>
</AkAppbar>

<AnalysisRisk::OverrideEditDrawer::Content
@dataModel={{@dataModel}}
@setAppBarData={{this.setAppBarData}}
@drawerCloseHandler={{dr.closeHandler}}
/>
</AkDrawer>
Loading

0 comments on commit 0a6d90e

Please sign in to comment.