@sphereon/ui-components.ssi-react 0.1.3-next.149 → 0.1.3-next.157

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.
Files changed (51) hide show
  1. package/dist/components/assets/icons/CrossIcon/index.js +1 -1
  2. package/dist/components/assets/icons/DeleteIcon/index.js +1 -1
  3. package/dist/components/assets/icons/DocumentIcon/index.js +1 -1
  4. package/dist/components/assets/icons/ImageIcon/index.js +1 -1
  5. package/dist/components/assets/icons/MeatBallsIcon/index.js +1 -1
  6. package/dist/components/assets/icons/SSIAddIcon/index.js +1 -1
  7. package/dist/components/assets/icons/SSIArrowDownIcon/index.js +1 -1
  8. package/dist/components/assets/icons/SSIFilterIcon/index.js +1 -1
  9. package/dist/components/assets/placeholders/PersonPlaceholder/index.js +1 -1
  10. package/dist/components/buttons/SSIPrimaryButton/index.js +1 -1
  11. package/dist/components/buttons/SSISecondaryButton/index.js +1 -1
  12. package/dist/components/fields/ComboBox/index.d.ts +2 -1
  13. package/dist/components/fields/ComboBox/index.js +9 -3
  14. package/dist/components/fields/DragAndDropBox/index.js +1 -1
  15. package/dist/components/views/CredentialIssuanceWizardView/index.js +1 -1
  16. package/dist/components/views/CredentialViewItem/index.d.ts +16 -0
  17. package/dist/components/views/CredentialViewItem/index.js +17 -0
  18. package/dist/components/views/JSONDataView/index.d.ts +8 -0
  19. package/dist/components/views/JSONDataView/index.js +85 -0
  20. package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
  21. package/dist/components/views/SSITableView/index.d.ts +1 -0
  22. package/dist/components/views/SSITableView/index.js +23 -14
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +3 -1
  25. package/dist/styles/components/components/CredentialIssuanceWizardView/index.js +3 -3
  26. package/dist/styles/components/components/CredentialViewItem/index.d.ts +5 -0
  27. package/dist/styles/components/components/CredentialViewItem/index.js +28 -0
  28. package/dist/styles/components/components/DropDownListItem/index.js +2 -2
  29. package/dist/styles/components/components/FileSelectionField/index.js +2 -2
  30. package/dist/styles/components/components/JSONDataView/index.d.ts +7 -0
  31. package/dist/styles/components/components/JSONDataView/index.js +47 -0
  32. package/dist/styles/components/components/SSIStatusLabel/index.js +1 -0
  33. package/dist/styles/components/components/SSITabView/index.js +1 -1
  34. package/dist/styles/components/components/SSITabViewHeader/index.d.ts +1 -0
  35. package/dist/styles/components/components/SSITabViewHeader/index.js +5 -0
  36. package/dist/styles/components/components/SSITableView/index.d.ts +4 -1
  37. package/dist/styles/components/components/SSITableView/index.js +14 -4
  38. package/dist/styles/components/components/SSIToast/index.js +2 -2
  39. package/dist/styles/components/components/index.d.ts +2 -0
  40. package/dist/styles/components/components/index.js +2 -0
  41. package/dist/styles/css/index.d.ts +1 -0
  42. package/dist/styles/css/index.js +7 -0
  43. package/dist/styles/fonts/index.d.ts +0 -4
  44. package/dist/styles/fonts/index.js +15 -18
  45. package/dist/types/table/index.d.ts +20 -10
  46. package/dist/types/table/index.js +3 -1
  47. package/dist/utils/ImageUtils.d.ts +2 -0
  48. package/dist/utils/ImageUtils.js +12 -0
  49. package/dist/utils/index.d.ts +1 -0
  50. package/dist/utils/index.js +1 -0
  51. package/package.json +4 -3
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const CrossIcon = (props) => {
4
- const { size = 12, color = fontColors.dark, style = {} } = props;
4
+ const { size = 12, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width: size, height: size, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 12 12", fill: "none", children: _jsx("path", { d: "M11.3763 0.623718C11.2113 0.45875 10.9439 0.458771 10.7789 0.623718L5.99999 5.40265L1.22108 0.623744C1.05612 0.458776 0.788685 0.458776 0.62372 0.623744C0.458759 0.788692 0.458761 1.05613 0.623722 1.2211L5.40263 6L0.623735 10.7789C0.458779 10.9439 0.458773 11.2113 0.623733 11.3763C0.788697 11.5412 1.05614 11.5412 1.2211 11.3763L5.99999 6.59737L10.7789 11.3763C10.9439 11.5412 11.2113 11.5412 11.3763 11.3763C11.5412 11.2113 11.5412 10.9439 11.3763 10.7789L6.59736 6L11.3763 1.22107C11.5412 1.05612 11.5412 0.788687 11.3763 0.623718Z", fill: color }) }) }));
6
6
  };
7
7
  export default CrossIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const DeleteIcon = (props) => {
4
- const { width = 20, height = 21, color = fontColors.dark, style = {} } = props;
4
+ const { width = 20, height = 21, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M17.3126 4.36542V18.0301C17.3126 19.6588 15.975 21 14.3509 21H4.70454C3.07718 21 1.73962 19.6588 1.73962 18.0301V4.36542H0.685498C-0.228499 4.36542 -0.228499 2.97308 0.685498 2.97308H6.09623V1.63823C6.09623 0.766423 6.77775 0 7.66627 0H11.3891C12.2745 0 12.9592 0.769617 12.9592 1.63823V2.97308H18.3667C19.2807 2.97308 19.2807 4.36542 18.3667 4.36542H17.3126ZM7.48474 2.97308H11.5675V1.63823C11.5675 1.53604 11.507 1.39234 11.3891 1.39234H7.66627C7.54525 1.39234 7.48474 1.53604 7.48474 1.63823V2.97308ZM12.5515 15.7181C12.5515 16.6314 11.163 16.6314 11.163 15.7181V8.13686C11.163 7.22354 12.5515 7.22354 12.5515 8.13686V15.7181ZM7.8892 15.7181C7.8892 16.6314 6.50068 16.6314 6.50068 15.7181V8.13686C6.50068 7.22354 7.8892 7.22035 7.8892 8.13686V15.7181ZM15.9241 4.36542C11.6598 4.36542 7.39557 4.36542 3.13132 4.36542V18.0301C3.13132 18.8987 3.83513 19.6077 4.70454 19.6077H14.3509C15.2171 19.6077 15.9241 18.8987 15.9241 18.0301V4.36542Z", fill: color }) }) }));
6
6
  };
7
7
  export default DeleteIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const DocumentIcon = (props) => {
4
- const { width = 28, height = 38, color = fontColors.dark, style = {} } = props;
4
+ const { width = 28, height = 38, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 28 38", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M26.8828 7.409L21.4423 1.677C20.8054 1.006 19.6456 0.5 18.7458 0.5H17.5593H13.7627H3.32203C1.49064 0.5 0 2.0705 0 4V34C0 35.9295 1.49064 37.5 3.32203 37.5H24.678C26.5094 37.5 28 35.9295 28 34V19V11.5V10.25C28 9.3015 27.5197 8.08 26.8828 7.409ZM24.7643 8.0045C24.7349 8.004 24.7074 8 24.678 8H22.3051C21.5201 8 20.8814 7.327 20.8814 6.5V4C20.8814 3.9695 20.8776 3.94 20.8771 3.9095L24.7643 8.0045ZM26.1017 34C26.1017 34.827 25.4629 35.5 24.678 35.5H3.32203C2.53708 35.5 1.89831 34.827 1.89831 34V4C1.89831 3.173 2.53708 2.5 3.32203 2.5H13.7627H17.5593C18.3443 2.5 18.9831 3.173 18.9831 4V6.5C18.9831 8.4295 20.4737 10 22.3051 10H24.678C25.4629 10 26.1017 10.673 26.1017 11.5V19V34Z", fill: color }) }) }));
6
6
  };
7
7
  export default DocumentIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const ImageIcon = (props) => {
4
- const { width = 38, height = 30, color = fontColors.dark, style = {} } = props;
4
+ const { width = 38, height = 30, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 38 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.773 8.1151C16.0717 8.1151 16.3637 8.20496 16.6121 8.37331C16.8604 8.54166 17.054 8.78094 17.1683 9.06089C17.2826 9.34083 17.3125 9.64888 17.2542 9.94605C17.1959 10.2432 17.052 10.5162 16.8407 10.7304C16.6295 10.9446 16.3603 11.0905 16.0673 11.1496C15.7743 11.2086 15.4707 11.1782 15.1947 11.0622C14.9187 10.9462 14.6829 10.7498 14.517 10.4978C14.3511 10.2458 14.2626 9.94961 14.2627 9.6466C14.2632 9.24048 14.4225 8.85116 14.7056 8.56399C14.9888 8.27682 15.3726 8.11567 15.773 8.1151ZM15.773 12.3833C16.3066 12.3833 16.8283 12.2229 17.272 11.9223C17.7157 11.6216 18.0616 11.1942 18.2659 10.6942C18.4702 10.1941 18.5236 9.64386 18.4196 9.11297C18.3155 8.58208 18.0586 8.09442 17.6813 7.71164C17.304 7.32887 16.8233 7.06819 16.2999 6.96256C15.7765 6.85693 15.234 6.9111 14.741 7.11822C14.248 7.32534 13.8266 7.6761 13.5301 8.12615C13.2336 8.5762 13.0754 9.10532 13.0754 9.6466C13.0766 10.3719 13.3612 11.0672 13.8668 11.58C14.3725 12.0929 15.0579 12.382 15.773 12.3833ZM2.81918 1.70473C2.38666 1.70507 1.97195 1.87947 1.66608 2.18964C1.3602 2.49982 1.18816 2.92043 1.18771 3.35914V22.6369L9.78458 13.9173C10.105 13.5935 10.5389 13.4116 10.9913 13.4116C11.4436 13.4116 11.8776 13.5935 12.198 13.9173L15.6007 17.3692L23.5385 9.32026C23.8587 8.99597 24.2927 8.81382 24.7452 8.81382C25.1977 8.81382 25.6317 8.99597 25.9519 9.32026L36.8123 20.338V3.35914C36.8118 2.9205 36.6399 2.49996 36.3341 2.1898C36.0283 1.87963 35.6137 1.70518 35.1812 1.70473H2.81918ZM35.1812 28.2957C35.6137 28.2951 36.0283 28.1206 36.3341 27.8104C36.6399 27.5001 36.8118 27.0795 36.8123 26.6409V22.0421L25.1104 10.1721C25.0129 10.0733 24.8807 10.0178 24.7429 10.0178C24.605 10.0178 24.4728 10.0733 24.3753 10.1721L16.0208 18.6467C15.9093 18.7597 15.7582 18.8231 15.6007 18.8231C15.4431 18.8231 15.292 18.7597 15.1806 18.6467L11.3578 14.7692C11.2604 14.6704 11.1283 14.615 10.9907 14.615C10.853 14.615 10.7209 14.6704 10.6235 14.7692L1.18771 24.3402V26.6409C1.18816 27.0796 1.36019 27.5003 1.66605 27.8105C1.97191 28.1208 2.38662 28.2952 2.81918 28.2957H35.1812ZM2.81918 29.5H35.1812C35.9286 29.4991 36.645 29.1976 37.1734 28.6616C37.7018 28.1256 37.9991 27.3989 38 26.6409V3.35914C37.9991 2.60113 37.7018 1.87442 37.1734 1.33843C36.645 0.802428 35.9286 0.500907 35.1812 0.5H2.81918C2.0718 0.500793 1.35525 0.802265 0.826731 1.33827C0.298214 1.87428 0.000894121 2.60106 0 3.35914V26.6409C0.000894121 27.3989 0.298214 28.1257 0.826731 28.6617C1.35525 29.1977 2.0718 29.4992 2.81918 29.5Z", fill: color }) }) }));
6
6
  };
7
7
  export default ImageIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const MeatBallsIcon = (props) => {
4
- const { width = 20, height = 5, color = fontColors.dark, style = {} } = props;
4
+ const { width = 20, height = 5, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 20 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "2", cy: "2.5", r: "2", fill: color }), _jsx("circle", { cx: "10", cy: "2.5", r: "2", fill: color }), _jsx("circle", { cx: "18", cy: "2.5", r: "2", fill: color })] }) }));
6
6
  };
7
7
  export default MeatBallsIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const SSIAddIcon = (props) => {
4
- const { size = 16, color = fontColors.dark, style = {} } = props;
4
+ const { size = 16, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width: size, height: size, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color }) }) }));
6
6
  };
7
7
  export default SSIAddIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const SSIArrowDownIcon = (props) => {
4
- const { width = 16, height = 8, color = fontColors.dark, style = {} } = props;
4
+ const { width = 16, height = 8, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8.03265 7.74886C8.14951 7.74175 8.26065 7.69465 8.34825 7.61511L15.3133 1.19499C15.367 1.1489 15.411 1.09224 15.4429 1.02837C15.4747 0.964504 15.4937 0.894731 15.4987 0.823204C15.5037 0.751676 15.4946 0.67985 15.4719 0.611995C15.4493 0.54414 15.4135 0.481647 15.3668 0.428216C15.3201 0.374784 15.2634 0.331504 15.2001 0.300961C15.1367 0.270419 15.068 0.253238 14.9981 0.250423C14.9281 0.247608 14.8583 0.259221 14.7928 0.28458C14.7273 0.309939 14.6675 0.348517 14.6168 0.398032L8 6.49492L1.38317 0.398032C1.33252 0.348517 1.27268 0.309939 1.20718 0.28458C1.14169 0.259221 1.07189 0.247597 1.00193 0.250412C0.931963 0.253227 0.863266 0.270419 0.799918 0.300961C0.736569 0.331504 0.679861 0.374784 0.633164 0.428216C0.586466 0.481647 0.550732 0.54414 0.528085 0.611995C0.505437 0.67985 0.496338 0.751676 0.501329 0.823204C0.506319 0.894731 0.525297 0.964504 0.557135 1.02837C0.588973 1.09224 0.633022 1.1489 0.686663 1.19499L7.65174 7.61511C7.70344 7.6621 7.76372 7.69811 7.82911 7.72107C7.89449 7.74403 7.96367 7.75348 8.03265 7.74886Z", fill: color }) }) }));
6
6
  };
7
7
  export default SSIArrowDownIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  const SSIFilterIcon = (props) => {
4
- const { height = 16, width = 18, color = fontColors.dark, style = {} } = props;
4
+ const { height = 16, width = 18, color = fontColors.dark, style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M16.5 1.5H1.5L7.5 8.33222V13.0556L10.5 14.5V8.33222L16.5 1.5Z", stroke: color, strokeOpacity: "0.8", strokeWidth: "1.29412", strokeLinecap: "round", strokeLinejoin: "round" }) }) }));
6
6
  };
7
7
  export default SSIFilterIcon;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { elementColors } from '@sphereon/ui-components.core';
3
3
  const PersonPlaceholder = (props) => {
4
- const { width = 79, height = 77, color = elementColors[300], style = {} } = props;
4
+ const { width = 79, height = 77, color = elementColors[300], style } = props;
5
5
  return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 79 77", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M22.8136 19.3766C22.8136 10.2672 30.2594 2.85265 39.4999 2.85265C48.7404 2.85265 56.1862 10.2672 56.1862 19.3766C56.1862 28.486 48.7404 35.9005 39.4999 35.9005C30.2594 35.9005 22.8136 28.486 22.8136 19.3766ZM3.52788 62.4042C3.52788 60.1881 4.62672 58.0491 6.89989 55.9687C9.18981 53.873 12.4868 52.0225 16.3463 50.4894C24.0686 47.4219 33.3853 45.8802 39.4999 45.8802C45.6144 45.8802 54.9312 47.4219 62.6534 50.4894C66.513 52.0225 69.81 53.873 72.0999 55.9687C74.3731 58.0491 75.4719 60.1881 75.4719 62.4042V74.1473H3.52788V62.4042Z", stroke: color, strokeWidth: "5.19882" }) }) }));
6
6
  };
7
7
  export default PersonPlaceholder;
@@ -3,7 +3,7 @@ import { ButtonIcon, fontColors, OpacityStyleEnum } from '@sphereon/ui-component
3
3
  import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
4
  import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles';
5
5
  const SSIPrimaryButton = (props) => {
6
- const { caption, icon, onClick, disabled = false, style = {} } = props;
6
+ const { caption, icon, onClick, disabled = false, style } = props;
7
7
  const getIcon = (icon, color) => {
8
8
  switch (icon) {
9
9
  case ButtonIcon.ADD:
@@ -4,7 +4,7 @@ import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
4
  import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container } from '../../../styles';
5
5
  import { gradientColors } from '../../../styles/colors';
6
6
  const SSISecondaryButton = (props) => {
7
- const { caption, icon, onClick, disabled = false, style = {} } = props;
7
+ const { caption, icon, onClick, disabled = false, style } = props;
8
8
  const getIcon = (icon, color) => {
9
9
  switch (icon) {
10
10
  case ButtonIcon.ADD:
@@ -4,10 +4,11 @@ type ComboBoxOption = {
4
4
  value: any;
5
5
  };
6
6
  type Props<T extends ComboBoxOption> = {
7
- onChange?: (value: any) => Promise<void>;
7
+ onChange?: (value: T) => Promise<void>;
8
8
  noOptionsMessage?: string;
9
9
  placeholder?: string;
10
10
  defaultValue?: T;
11
+ value?: T;
11
12
  inlineOption?: InlineOption;
12
13
  options: Array<T>;
13
14
  style?: CSSProperties;
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import CreatableSelect from 'react-select/creatable';
3
4
  import { backgroundColors, fontColors } from '@sphereon/ui-components.core';
4
5
  const ComboBox = (props) => {
5
6
  const { onChange, noOptionsMessage, placeholder, defaultValue, inlineOption, options = [] } = props;
7
+ const [value, setValue] = React.useState(props.value);
6
8
  const creatableProps = inlineOption
7
9
  ? {
8
10
  allowCreateWhileLoading: true,
@@ -12,7 +14,11 @@ const ComboBox = (props) => {
12
14
  formatCreateLabel: () => `${inlineOption.caption}`,
13
15
  }
14
16
  : {};
15
- return (_jsx(CreatableSelect, { styles: {
17
+ const onValueChange = async (newValue) => {
18
+ setValue(newValue);
19
+ await onChange?.(newValue);
20
+ };
21
+ return (_jsx(CreatableSelect, { menuPortalTarget: document.querySelector('body'), styles: {
16
22
  control: (provided, state) => ({
17
23
  ...provided,
18
24
  maxWidth: 455,
@@ -26,7 +32,7 @@ const ComboBox = (props) => {
26
32
  }),
27
33
  menu: (provided) => ({
28
34
  ...provided,
29
- maxWidth: 455,
35
+ maxWidth: 455
30
36
  }),
31
37
  option: (provided, state) => ({
32
38
  ...provided,
@@ -40,6 +46,6 @@ const ComboBox = (props) => {
40
46
  ...provided,
41
47
  color: fontColors.dark,
42
48
  }),
43
- }, defaultValue: defaultValue, onChange: onChange, options: options, placeholder: placeholder, noOptionsMessage: noOptionsMessage ? () => noOptionsMessage : undefined, maxMenuHeight: 210, ...creatableProps }));
49
+ }, defaultValue: defaultValue, onChange: onValueChange, value: value, options: options, placeholder: placeholder, noOptionsMessage: noOptionsMessage ? () => noOptionsMessage : undefined, maxMenuHeight: 210, ...creatableProps }));
44
50
  };
45
51
  export default ComboBox;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef } from 'react';
3
- import { DragAndDropBoxContainerStyled as Container, DragAndDropBoxHiddenInputStyled as HiddenInput, DragAndDropBoxCaptionContainerStyled as CaptionContainer, SSITextH2DarkStyled as Caption, DragAndDropBoxDescriptionStyled as Description } from '../../../styles';
3
+ import { DragAndDropBoxContainerStyled as Container, DragAndDropBoxHiddenInputStyled as HiddenInput, DragAndDropBoxCaptionContainerStyled as CaptionContainer, SSITextH2Styled as Caption, DragAndDropBoxDescriptionStyled as Description } from '../../../styles';
4
4
  const DragAndDropBox = (props) => {
5
5
  const { caption, description, onChangeFile } = props;
6
6
  const inputFile = useRef(null);
@@ -7,7 +7,7 @@ import { Localization } from '@sphereon/ui-components.core';
7
7
  import FileSelection from '../../fields/FileSelection';
8
8
  import DragAndDropBox from '../../fields/DragAndDropBox';
9
9
  import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
10
- import { CredentialIssuanceWizardViewContainerStyled as Container, CredentialIssuanceWizardViewCredentialTypeContainerStyled as CredentialTypeContainer, CredentialIssuanceWizardViewCredentialTypeTitleStyled as CredentialTypeTitle, CredentialIssuanceWizardViewFormContainerStyled as FormContainer, CredentialIssuanceWizardViewEvidenceContainerStyled as EvidenceContainer, CredentialIssuanceWizardViewEvidenceContentContainerStyled as EvidenceContentContainer, CredentialIssuanceWizardViewEvidenceTitleContainerStyled as EvidenceTitleContainer, SSITextH2SemiBoldDarkStyled as EvidenceTitle, CredentialIssuanceWizardViewEvidenceTitleOptionalStyled as EvidenceTitleOptional, SSITextH2DarkStyled as EvidenceDescription, CredentialIssuanceWizardViewEvidenceFilesContainerStyled as EvidenceFilesContainer } from '../../../styles';
10
+ import { CredentialIssuanceWizardViewContainerStyled as Container, CredentialIssuanceWizardViewCredentialTypeContainerStyled as CredentialTypeContainer, CredentialIssuanceWizardViewCredentialTypeTitleStyled as CredentialTypeTitle, CredentialIssuanceWizardViewFormContainerStyled as FormContainer, CredentialIssuanceWizardViewEvidenceContainerStyled as EvidenceContainer, CredentialIssuanceWizardViewEvidenceContentContainerStyled as EvidenceContentContainer, CredentialIssuanceWizardViewEvidenceTitleContainerStyled as EvidenceTitleContainer, SSITextH2SemiBoldStyled as EvidenceTitle, CredentialIssuanceWizardViewEvidenceTitleOptionalStyled as EvidenceTitleOptional, SSITextH2Styled as EvidenceDescription, CredentialIssuanceWizardViewEvidenceFilesContainerStyled as EvidenceFilesContainer } from '../../../styles';
11
11
  const CredentialIssuanceWizardView = (props) => {
12
12
  const { credentialData, credentialTypes, onSelectCredentialTypeChange, onCredentialFormDataChange } = props;
13
13
  const [selectedCredentialType, setSelectedCredentialType] = useState(null);
@@ -0,0 +1,16 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ import { CredentialStatus } from '@sphereon/ui-components.core';
3
+ import { CredentialMiniCardViewProps } from '../CredentialMiniCardView';
4
+ type Props = {
5
+ credentialTitle: string;
6
+ credentialStatus: CredentialStatus;
7
+ issuerName: string;
8
+ issueDate: number;
9
+ expirationDate?: number;
10
+ showTime?: boolean;
11
+ showCard?: boolean;
12
+ credentialBranding?: CredentialMiniCardViewProps;
13
+ style?: CSSProperties;
14
+ };
15
+ declare const CredentialViewItem: FC<Props>;
16
+ export default CredentialViewItem;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Localization, toLocalDateString, toLocalDateTimeString } from '@sphereon/ui-components.core';
3
+ import SSIStatusLabel from '../../labels/SSIStatusLabel';
4
+ import CredentialMiniCardView from '../CredentialMiniCardView';
5
+ import { CredentialViewItemContainerStyled as Container, CredentialViewItemDetailsContainerStyled as DetailsContainer, SSIFlexDirectionRowViewStyled as ContentRowContainer, CredentialViewItemTitleCaptionStyled as TitleCaption, SSITextH4Styled as IssuerCaption, CredentialViewItemStatusContainerStyled as StatusContainer, SSITextH5Styled as IssueDateCaption, CredentialViewItemExpirationDateCaptionStyled as ExpirationDateCaption, } from '../../../styles';
6
+ const CredentialViewItem = (props) => {
7
+ const { credentialStatus, credentialTitle, issuerName, showTime = false, showCard = true, credentialBranding, style } = props;
8
+ const issueDate = showTime ? toLocalDateTimeString(props.issueDate) : toLocalDateString(props.issueDate);
9
+ const expirationDate = props.expirationDate
10
+ ? `${Localization.translate('credentials_view_item_expires_on')} ${showTime
11
+ ? toLocalDateTimeString(props.expirationDate)
12
+ : toLocalDateString(props.expirationDate)}`
13
+ : Localization.translate('credential_status_never_expires_date_label');
14
+ return (_jsxs(Container, { style: { ...style }, children: [showCard &&
15
+ _jsx(CredentialMiniCardView, { ...credentialBranding }), _jsxs(DetailsContainer, { children: [_jsxs(ContentRowContainer, { children: [_jsxs("div", { children: [_jsx(TitleCaption, { children: credentialTitle }), _jsx(IssuerCaption, { children: issuerName })] }), _jsx(StatusContainer, { children: _jsx(SSIStatusLabel, { status: credentialStatus }) })] }), _jsxs(ContentRowContainer, { children: [_jsx(IssueDateCaption, { children: issueDate }), _jsx(ExpirationDateCaption, { children: expirationDate })] })] })] }));
16
+ };
17
+ export default CredentialViewItem;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ data: Record<string, any>;
4
+ showHeader?: boolean;
5
+ shouldExpandNodeInitially?: (() => boolean) | boolean;
6
+ };
7
+ declare const JSONDataView: FC<Props>;
8
+ export default JSONDataView;
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect } from 'react';
3
+ import { JSONTree } from 'react-json-tree';
4
+ import { backgroundColors, calculateAspectRatio, fontColors, isBase64ImageUri, isBoolean, Localization, parseToBoolean } from '@sphereon/ui-components.core';
5
+ import SSICheckmarkBadge from '../../assets/badges/SSICheckmarkBadge';
6
+ import SSIExclamationMarkBadge from '../../assets/badges/SSIExclamationMarkBadge';
7
+ import { getImageSize } from '../../../utils';
8
+ import { JSONDataViewContainerStyled as Container, JSONDataViewHeaderContainerStyled as HeaderContainer, JSONDataViewColumnHeaderCaptionStyled as ColumnHeaderCaption, JSONDataViewDataContainerCaptionStyled as ContainerCaption, JSONDataViewDataImageValueStyled as ImageValue, JSONDataViewDataTextValueStyled as TextValue, JSONDataViewDataLabelStyled as Label } from '../../../styles';
9
+ const JSONDataView = (props) => {
10
+ const { showHeader = true, shouldExpandNodeInitially = () => false } = props;
11
+ const expandNodeInitially = typeof shouldExpandNodeInitially === 'function' ? shouldExpandNodeInitially : () => shouldExpandNodeInitially;
12
+ const [focused, setFocused] = React.useState(false);
13
+ const [data, setData] = React.useState();
14
+ const preprocessData = async (data) => {
15
+ if (typeof data !== 'object' || data === null) {
16
+ return data;
17
+ }
18
+ const processedData = {};
19
+ await Promise.all(Object.entries(data).map(async ([key, value]) => {
20
+ if (typeof value === 'object' && value !== null) {
21
+ processedData[key] = await preprocessData(value);
22
+ }
23
+ else if (typeof value === 'string' && isBase64ImageUri(value)) {
24
+ const base64Uri = value;
25
+ const dimensions = await getImageSize(base64Uri);
26
+ processedData[key] = {
27
+ uri: base64Uri,
28
+ dimensions: {
29
+ height: dimensions.height,
30
+ width: dimensions.width,
31
+ aspectRatio: calculateAspectRatio(dimensions.width, dimensions.height)
32
+ }
33
+ };
34
+ }
35
+ else {
36
+ processedData[key] = value;
37
+ }
38
+ }));
39
+ return processedData;
40
+ };
41
+ useEffect(() => {
42
+ preprocessData(props.data).then((data) => setData(data));
43
+ }, [props.data]);
44
+ const getItemString = () => {
45
+ return null;
46
+ };
47
+ const valueRenderer = (valueAsString, value) => {
48
+ if (isBoolean(value)) {
49
+ return parseToBoolean(value) ? _jsx(SSICheckmarkBadge, {}) : _jsx(SSIExclamationMarkBadge, {});
50
+ }
51
+ if (typeof value === 'object'
52
+ && value !== null
53
+ && 'uri' in value) {
54
+ const imageData = value;
55
+ return _jsx(ImageValue, { style: {
56
+ aspectRatio: imageData.dimensions?.aspectRatio,
57
+ backgroundImage: `url(${imageData.uri})`,
58
+ } });
59
+ }
60
+ return _jsx(TextValue, { children: value?.toString() });
61
+ };
62
+ const labelRenderer = ([key]) => {
63
+ return _jsx(Label, { children: key });
64
+ };
65
+ const isCustomNode = (value) => {
66
+ return typeof value === 'object' && value !== null && 'uri' in value && 'dimensions' in value;
67
+ };
68
+ return (_jsxs(Container, { children: [showHeader &&
69
+ _jsxs(HeaderContainer, { children: [_jsx(ColumnHeaderCaption, { children: Localization.translate('json_data_view_attribute_column_label') }), _jsx(ColumnHeaderCaption, { children: Localization.translate('json_data_view_value_column_label') })] }), _jsx(ContainerCaption, { onMouseEnter: () => setFocused(true), onMouseLeave: () => setFocused(false), children: data &&
70
+ _jsx(JSONTree, { theme: {
71
+ base0D: fontColors.dark,
72
+ tree: {
73
+ margin: 0,
74
+ backgroundColor: backgroundColors.primaryLight,
75
+ },
76
+ arrowContainer: {
77
+ paddingRight: 6,
78
+ },
79
+ arrow: {
80
+ fontSize: 10,
81
+ ...(!focused && { display: 'none' }),
82
+ },
83
+ }, hideRoot: true, shouldExpandNodeInitially: expandNodeInitially, getItemString: getItemString, labelRenderer: labelRenderer, valueRenderer: valueRenderer, isCustomNode: isCustomNode, data: data }) })] }));
84
+ };
85
+ export default JSONDataView;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITextH3Styled as TitleCaption, } from '../../../../styles';
2
+ import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITabViewHeaderTitleCaptionStyled as TitleCaption, } from '../../../../styles';
3
3
  const SSITabViewHeader = (props) => {
4
4
  const { navigationState, onIndexChange } = props;
5
5
  return (_jsx(Container, { children: navigationState.routes.map((value, index) => {
@@ -8,6 +8,7 @@ type Props<T> = {
8
8
  onRowClick?: (data: Row<T>) => Promise<void>;
9
9
  onDelete?: (rows: Array<T>) => Promise<void>;
10
10
  enableRowSelection?: boolean;
11
+ enableRowHover?: boolean;
11
12
  enableFiltering?: boolean;
12
13
  enableMostRecent?: boolean;
13
14
  enableResultCount?: boolean;
@@ -8,9 +8,11 @@ import SSIHoverText from '../../fields/SSIHoverText';
8
8
  import SSIStatusLabel from '../../labels/SSIStatusLabel';
9
9
  import CredentialMiniCardView from '../CredentialMiniCardView';
10
10
  import DropDownList from '../../lists/DropDownList';
11
- import { SSITableViewCellContainerStyled as CellContainer, SSITableViewContainerStyled as Container, SSITableViewHeaderCellContainerStyled as HeaderCellContainer, SSITableViewLabelCellStyled as LabelCell, SSITableViewResultCountCaptionStyled as ResultCountCaption, SSITableViewRowContainerStyled as RowContainer, SSITableViewTableContainerStyled as TableContainer, TableViewRowSelectionCheckboxContainerStyled as RowSelectionCheckboxContainer, } from '../../../styles';
11
+ import { SSITableViewCellContainerStyled as CellContainer, SSITableViewContainerStyled as Container, SSITableViewHeaderCellContainerStyled as HeaderCellContainer, SSITableViewLabelCellStyled as LabelCell, SSITableViewResultCountCaptionStyled as ResultCountCaption, SSITableViewHeaderRowContainerStyled as HeaderRowContainer, SSITableViewRowContainerStyled as RowContainer, SSITableViewTableContainerStyled as TableContainer, TableViewRowSelectionCheckboxContainerStyled as RowSelectionCheckboxContainer, } from '../../../styles';
12
12
  import { TableCellType } from '../../../types';
13
13
  import PaginationControls from './PaginationControls';
14
+ import ComboBox from "../../fields/ComboBox";
15
+ import CredentialDetailsView from "../CredentialViewItem";
14
16
  function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
15
17
  const ref = React.useRef(null);
16
18
  React.useEffect(() => {
@@ -20,10 +22,10 @@ function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
20
22
  }, [ref, indeterminate]);
21
23
  return _jsx("input", { type: "checkbox", ref: ref, className: className + ' cursor-pointer', ...rest });
22
24
  }
23
- const getCellFormatting = (type, value, row, opts) => {
25
+ const getCellFormatting = (type, value, row, options) => {
24
26
  switch (type) {
25
27
  case TableCellType.TEXT:
26
- const { truncationLength, enableHover = false } = opts ?? {};
28
+ const { truncationLength, enableHover = false } = options ?? {};
27
29
  return _jsx(SSIHoverText, { text: value, truncationLength: truncationLength, enableHover: enableHover });
28
30
  case TableCellType.LABEL: {
29
31
  const labels = Array.isArray(value) ? value.map((label) => _jsx(SSITypeLabel, { type: label })) : _jsx(SSITypeLabel, { type: value });
@@ -35,13 +37,20 @@ const getCellFormatting = (type, value, row, opts) => {
35
37
  case TableCellType.CREDENTIAL_CARD: {
36
38
  return _jsx(CredentialMiniCardView, { ...value });
37
39
  }
38
- case TableCellType.ACTION_GROUP: {
39
- const { actionGroup = { actions: [] } } = opts ?? { actions: [] };
40
- const actions = actionGroup.actions.map((action) => ({
40
+ case TableCellType.CREDENTIAL_DETAILS: {
41
+ return _jsx(CredentialDetailsView, { ...value, style: { maxWidth: 261 } });
42
+ }
43
+ case TableCellType.ACTIONS: {
44
+ const { actions = [] } = options ?? {};
45
+ const buttons = actions.map((action) => ({
41
46
  ...action,
42
47
  onClick: () => action.onClick(row),
43
48
  }));
44
- return _jsx(DropDownList, { icon: ButtonIcon.MEATBALLS, buttons: actions, showBorder: true });
49
+ return _jsx(DropDownList, { icon: ButtonIcon.MEATBALLS, buttons: buttons, showBorder: true });
50
+ }
51
+ case TableCellType.COMBOBOX: {
52
+ const { defaultValue, onChange, selectOptions = [] } = options ?? {};
53
+ return _jsx(ComboBox, { defaultValue: defaultValue, value: value, onChange: onChange, options: selectOptions });
45
54
  }
46
55
  default:
47
56
  return _jsx("div", {});
@@ -55,17 +64,17 @@ const toRowSelectionObject = (rows) => {
55
64
  return rowSelectionObject;
56
65
  };
57
66
  const SSITableView = (props) => {
58
- const { columns, data, enableRowSelection = false, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onDelete, pagination, } = props;
67
+ const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onDelete, pagination, } = props;
59
68
  const [rowSelection, setRowSelection] = React.useState([]);
60
69
  const [focusedRowId, setFocusedRowId] = React.useState();
61
70
  const columnHelper = createColumnHelper();
62
71
  let availableColumns = columns.map((header) => columnHelper.accessor(header.accessor, {
63
72
  id: header.accessor,
64
73
  header: header.label,
65
- cell: (info) => getCellFormatting(header.type, info.getValue(), info.row, header.opts),
66
- minSize: header.opts?.columnMinWidth,
67
- maxSize: header.opts?.columnMaxWidth,
68
- size: header.opts?.columnWidth,
74
+ cell: (info) => getCellFormatting(header.type, info.getValue(), info.row, header.columnOptions?.cellOptions),
75
+ minSize: header.columnOptions?.columnMinWidth,
76
+ maxSize: header.columnOptions?.columnMaxWidth,
77
+ size: header.columnOptions?.columnWidth,
69
78
  }));
70
79
  if (enableRowSelection) {
71
80
  availableColumns = [
@@ -122,7 +131,7 @@ const SSITableView = (props) => {
122
131
  return (_jsxs(Container, { children: [_jsxs("div", { className: "overflow-x-auto", children: [enableResultCount && (_jsx(ResultCountCaption, { children: Localization.translate('result_count_label', {
123
132
  count: data.length,
124
133
  maxCount: data.length,
125
- }) })), (enableFiltering || enableMostRecent || actions.length > 0) && (_jsx(SSITableViewHeader, { actions: actions, enableFiltering: enableFiltering, enableMostRecent: enableMostRecent, ...(onDelete && { onDelete: onDeleteClicked }) })), _jsxs(TableContainer, { children: [_jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => (_jsx(RowContainer, { children: headerGroup.headers.map((header) => (_jsxs(HeaderCellContainer, { colSpan: header.colSpan, style: {
134
+ }) })), (enableFiltering || enableMostRecent || actions.length > 0) && (_jsx(SSITableViewHeader, { actions: actions, enableFiltering: enableFiltering, enableMostRecent: enableMostRecent, ...(onDelete && { onDelete: onDeleteClicked }) })), _jsxs(TableContainer, { children: [_jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => (_jsx(HeaderRowContainer, { children: headerGroup.headers.map((header) => (_jsxs(HeaderCellContainer, { colSpan: header.colSpan, style: {
126
135
  ...(header.column.columnDef.minSize && { minWidth: header.column.columnDef.minSize }),
127
136
  ...(header.column.columnDef.maxSize && { maxWidth: header.column.columnDef.maxSize }),
128
137
  ...(header.column.columnDef.size !== 0 && { width: header.column.columnDef.size }),
@@ -130,7 +139,7 @@ const SSITableView = (props) => {
130
139
  transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
131
140
  ? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
132
141
  : '',
133
- } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
142
+ } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
134
143
  ...(cell.column.columnDef.minSize && { minWidth: cell.column.columnDef.minSize }),
135
144
  ...(cell.column.columnDef.maxSize && { maxWidth: cell.column.columnDef.maxSize }),
136
145
  ...(cell.column.columnDef.size !== 0 && { width: cell.column.columnDef.size }),
package/dist/index.d.ts CHANGED
@@ -36,9 +36,11 @@ import PassportPhotoControl, { passportPhotoControlTester } from './components/f
36
36
  import CredentialIssuanceWizardView from './components/views/CredentialIssuanceWizardView';
37
37
  import PaginationControls from './components/views/SSITableView/PaginationControls';
38
38
  import PaginationControlsProps from './components/views/SSITableView/PaginationControls';
39
+ import CredentialViewItem from './components/views/CredentialViewItem';
40
+ import JSONDataView from './components/views/JSONDataView';
39
41
  import { Row } from '@tanstack/react-table';
40
42
  export * from './styles/fonts';
41
43
  export * from './types';
42
44
  export * from './helpers';
43
45
  export * from './utils';
44
- export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, Row, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, };
46
+ export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, Row, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, CredentialViewItem, JSONDataView };
package/dist/index.js CHANGED
@@ -35,8 +35,10 @@ import PassportPhotoControl, { passportPhotoControlTester } from './components/f
35
35
  import CredentialIssuanceWizardView from './components/views/CredentialIssuanceWizardView';
36
36
  import PaginationControls from './components/views/SSITableView/PaginationControls';
37
37
  import PaginationControlsProps from './components/views/SSITableView/PaginationControls';
38
+ import CredentialViewItem from './components/views/CredentialViewItem';
39
+ import JSONDataView from './components/views/JSONDataView';
38
40
  export * from './styles/fonts';
39
41
  export * from './types';
40
42
  export * from './helpers';
41
43
  export * from './utils';
42
- export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, };
44
+ export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, CredentialViewItem, JSONDataView };
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { backgroundColors, borderColors, SSIRoundedEdgesCss } from "@sphereon/ui-components.core";
3
- import { SSITextH1SemiBoldDarkStyled, SSITextH2DarkStyled } from "../../../fonts";
3
+ import { SSITextH1SemiBoldStyled, SSITextH2Styled } from "../../../fonts";
4
4
  export const CredentialIssuanceWizardViewContainerStyled = styled.div `
5
5
  display: flex;
6
6
  flex-direction: column;
@@ -18,7 +18,7 @@ export const CredentialIssuanceWizardViewCredentialTypeContainerStyled = styled.
18
18
  gap: 24px;
19
19
  flex-grow: 1;
20
20
  `;
21
- export const CredentialIssuanceWizardViewCredentialTypeTitleStyled = styled(SSITextH1SemiBoldDarkStyled) `
21
+ export const CredentialIssuanceWizardViewCredentialTypeTitleStyled = styled(SSITextH1SemiBoldStyled) `
22
22
  text-align: left;
23
23
  `;
24
24
  export const CredentialIssuanceWizardViewFormContainerStyled = styled.div `
@@ -45,7 +45,7 @@ export const CredentialIssuanceWizardViewEvidenceTitleContainerStyled = styled.d
45
45
  flex-direction: row;
46
46
  gap: 4px;
47
47
  `;
48
- export const CredentialIssuanceWizardViewEvidenceTitleOptionalStyled = styled(SSITextH2DarkStyled) `
48
+ export const CredentialIssuanceWizardViewEvidenceTitleOptionalStyled = styled(SSITextH2Styled) `
49
49
  font-style: italic;
50
50
  `;
51
51
  export const CredentialIssuanceWizardViewEvidenceFilesContainerStyled = styled.div `
@@ -0,0 +1,5 @@
1
+ export declare const CredentialViewItemContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const CredentialViewItemDetailsContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const CredentialViewItemTitleCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const CredentialViewItemStatusContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const CredentialViewItemExpirationDateCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,28 @@
1
+ import styled from 'styled-components';
2
+ import { SSIFlexDirectionColumnViewStyled, SSIFlexDirectionRowViewStyled } from '../../containers';
3
+ import { SSITextH3Styled, SSITextH5Styled } from '../../../fonts';
4
+ export const CredentialViewItemContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
5
+ padding: 18px 24px;
6
+ gap: 8px;
7
+ align-items: center;
8
+ `;
9
+ export const CredentialViewItemDetailsContainerStyled = styled(SSIFlexDirectionColumnViewStyled) `
10
+ gap: 6px;
11
+ min-width: 245px;
12
+ `;
13
+ export const CredentialViewItemTitleCaptionStyled = styled(SSITextH3Styled) `
14
+ display: -webkit-box;
15
+ -webkit-line-clamp: 2;
16
+ -webkit-box-orient: vertical;
17
+ overflow: hidden;
18
+ word-break: break-all;
19
+ text-overflow: ellipsis;
20
+ `;
21
+ export const CredentialViewItemStatusContainerStyled = styled.div `
22
+ margin-top: 3px;
23
+ margin-left: auto;
24
+ padding-left: 9px;
25
+ `;
26
+ export const CredentialViewItemExpirationDateCaptionStyled = styled(SSITextH5Styled) `
27
+ margin-left: auto;
28
+ `;
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { SSIFlexDirectionRowViewStyled } from '../../containers';
3
- import { SSITextH2DarkStyled } from '../../../fonts';
3
+ import { SSITextH2Styled } from '../../../fonts';
4
4
  import { backgroundColors } from '@sphereon/ui-components.core';
5
5
  export const DropDownListItemContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
6
6
  flex-direction: row;
@@ -8,7 +8,7 @@ export const DropDownListItemContainerStyled = styled(SSIFlexDirectionRowViewSty
8
8
  background-color: ${backgroundColors.primaryLight};
9
9
  padding: 10px 16px;
10
10
  `;
11
- export const DropDownListItemCaptionContainerStyled = styled(SSITextH2DarkStyled) `
11
+ export const DropDownListItemCaptionContainerStyled = styled(SSITextH2Styled) `
12
12
  flex: 1;
13
13
  margin-right: 8px;
14
14
  `;
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { borderColors, fontColors } from '@sphereon/ui-components.core';
3
- import { SSITextH2SemiBoldDarkStyled, SSITextH7RegularStyled } from '../../../fonts';
3
+ import { SSITextH2SemiBoldStyled, SSITextH7RegularStyled } from '../../../fonts';
4
4
  export const FileSelectionFieldContainerStyled = styled.div `
5
5
  display: flex;
6
6
  flex-grow: 1;
@@ -49,7 +49,7 @@ export const FileSelectionFieldFileDataContainerStyled = styled.div `
49
49
  display: flex;
50
50
  flex-direction: column;
51
51
  `;
52
- export const FileSelectionFieldFileNameCaptionStyled = styled(SSITextH2SemiBoldDarkStyled) `
52
+ export const FileSelectionFieldFileNameCaptionStyled = styled(SSITextH2SemiBoldStyled) `
53
53
  overflow: hidden;
54
54
  text-overflow: ellipsis;
55
55
  max-width: 350px;
@@ -0,0 +1,7 @@
1
+ export declare const JSONDataViewContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const JSONDataViewHeaderContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const JSONDataViewColumnHeaderCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const JSONDataViewDataContainerCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const JSONDataViewDataImageValueStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const JSONDataViewDataTextValueStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
7
+ export declare const JSONDataViewDataLabelStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,47 @@
1
+ import styled from 'styled-components';
2
+ import { backgroundColors, borderColors, fontColors, SSIRoundedEdgesCss } from '@sphereon/ui-components.core';
3
+ import { SSITextH2SemiBoldStyledCss, SSITextH5Css, SSITextH7SemiBoldCss } from '../../../css';
4
+ export const JSONDataViewContainerStyled = styled.div `
5
+ ${SSIRoundedEdgesCss};
6
+ display: flex;
7
+ flex-direction: column;
8
+ overflow: hidden;
9
+ background-color: ${backgroundColors.primaryLight};
10
+ border: 1px solid ${borderColors.light};
11
+ `;
12
+ export const JSONDataViewHeaderContainerStyled = styled.div `
13
+ padding: 12px 24px;
14
+ display: flex;
15
+ flex-direction: row;
16
+ align-items: center;
17
+ border-bottom: 2px solid ${borderColors.light};
18
+ `;
19
+ export const JSONDataViewColumnHeaderCaptionStyled = styled.div `
20
+ display: flex;
21
+ flex-grow: 1;
22
+ ${SSITextH2SemiBoldStyledCss};
23
+ color: ${fontColors.lightGrey};
24
+ max-width: 200px;
25
+ `;
26
+ export const JSONDataViewDataContainerCaptionStyled = styled.div `
27
+ padding-right: 24px;
28
+ padding-bottom: 24px;
29
+ padding-left: 12px;
30
+ display: flex;
31
+ flex-direction: row;
32
+ `;
33
+ export const JSONDataViewDataImageValueStyled = styled.div `
34
+ background-size: cover;
35
+ height: 130px;
36
+ border-radius: 10px;
37
+ `;
38
+ export const JSONDataViewDataTextValueStyled = styled.span `
39
+ color: ${fontColors.dark};
40
+ ${SSITextH7SemiBoldCss}
41
+ `;
42
+ export const JSONDataViewDataLabelStyled = styled.span `
43
+ color: ${fontColors.dark};
44
+ ${SSITextH5Css};
45
+ width: 212px;
46
+ display: inline-block;
47
+ `;
@@ -5,6 +5,7 @@ export const SSIStatusLabelContainerStyled = styled(SSIFlexDirectionRowViewStyle
5
5
  border-radius: 9px;
6
6
  border: 1px solid #000;
7
7
  width: fit-content;
8
+ height: fit-content;
8
9
  `;
9
10
  export const SSIStatusLabelStatusCaptionStyled = styled(SSITextH5LightStyled) `
10
11
  margin-left: 7px;
@@ -2,5 +2,5 @@ import styled from 'styled-components';
2
2
  export const SSITabViewContainerStyled = styled.div `
3
3
  display: flex;
4
4
  flex-direction: column;
5
- width: 100%;
5
+ flex-grow: 1;
6
6
  `;
@@ -1,2 +1,3 @@
1
1
  export declare const SSITabViewHeaderContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export declare const SSITabViewHeaderTitleContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const SSITabViewHeaderTitleCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,4 +1,5 @@
1
1
  import styled from 'styled-components';
2
+ import { SSITextH3Styled } from '../../../fonts';
2
3
  export const SSITabViewHeaderContainerStyled = styled.div `
3
4
  display: flex;
4
5
  flex-direction: row;
@@ -7,4 +8,8 @@ export const SSITabViewHeaderContainerStyled = styled.div `
7
8
  `;
8
9
  export const SSITabViewHeaderTitleContainerStyled = styled.div `
9
10
  cursor: pointer;
11
+ display: flex;
12
+ `;
13
+ export const SSITabViewHeaderTitleCaptionStyled = styled(SSITextH3Styled) `
14
+ margin-top: auto;
10
15
  `;
@@ -1,7 +1,10 @@
1
1
  export declare const SSITableViewContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export declare const SSITableViewLabelCellStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const SSITableViewTableContainerStyled: import("styled-components").StyledComponent<"table", any, {}, never>;
4
- export declare const SSITableViewRowContainerStyled: import("styled-components").StyledComponent<"tr", any, {}, never>;
4
+ export declare const SSITableViewHeaderRowContainerStyled: import("styled-components").StyledComponent<"tr", any, {}, never>;
5
+ export declare const SSITableViewRowContainerStyled: import("styled-components").StyledComponent<"tr", any, {
6
+ enableHover?: boolean | undefined;
7
+ }, never>;
5
8
  export declare const SSITableViewCellContainerStyled: import("styled-components").StyledComponent<"td", any, {}, never>;
6
9
  export declare const SSITableViewHeaderCellContainerStyled: import("styled-components").StyledComponent<"th", any, {}, never>;
7
10
  export declare const SSITableViewResultCountCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,4 +1,4 @@
1
- import styled from 'styled-components';
1
+ import styled, { css } from 'styled-components';
2
2
  import { backgroundColors, borderColors, fontColors } from '@sphereon/ui-components.core';
3
3
  import { SSITextH2Css, SSITextH3Css } from '../../../css';
4
4
  export const SSITableViewContainerStyled = styled.div `
@@ -17,13 +17,23 @@ export const SSITableViewTableContainerStyled = styled.table `
17
17
  border-collapse: collapse;
18
18
  background-color: ${backgroundColors.lightGrey};
19
19
  `;
20
- export const SSITableViewRowContainerStyled = styled.tr `
20
+ export const SSITableViewHeaderRowContainerStyled = styled.tr `
21
21
  border-bottom: 1px solid ${borderColors.lightGrey};
22
22
  background-color: ${backgroundColors.primaryLight};
23
+ `;
24
+ export const SSITableViewRowContainerStyled = styled.tr `
25
+ background-color: ${backgroundColors.primaryLight};
23
26
 
24
- &:hover {
25
- background-color: #ececec;
27
+ &:not(:last-child) {
28
+ border-bottom: 1px solid ${borderColors.lightGrey};
26
29
  }
30
+
31
+ ${props => props.enableHover &&
32
+ css `
33
+ &:hover {
34
+ background-color: #ececec; // TODO
35
+ }
36
+ `}
27
37
  `;
28
38
  export const SSITableViewCellContainerStyled = styled.td `
29
39
  ${SSITextH3Css};
@@ -1,7 +1,7 @@
1
1
  import styled from 'styled-components';
2
2
  import { alertColors } from '@sphereon/ui-components.core';
3
3
  import { SSIFlexDirectionRowViewStyled, SSIRoundedContainerStyled } from '../../containers';
4
- import { SSITextH4DarkStyled } from '../../../fonts';
4
+ import { SSITextH4Styled } from '../../../fonts';
5
5
  export const SSIToastContainerStyled = styled(SSIRoundedContainerStyled) `
6
6
  //TODO we need better width, use a max width and use content to scale
7
7
  // 96.8%;
@@ -19,6 +19,6 @@ export const SSIToastTitleContainerStyled = styled(SSIFlexDirectionRowViewStyled
19
19
  margin-bottom: 12px;
20
20
  width: 100%;
21
21
  `;
22
- export const SSIToastMessageTextStyled = styled(SSITextH4DarkStyled) `
22
+ export const SSIToastMessageTextStyled = styled(SSITextH4Styled) `
23
23
  width: 100%;
24
24
  `;
@@ -24,3 +24,5 @@ export * from './DragAndDropBox';
24
24
  export * from './PassportPhotoControl';
25
25
  export * from './CredentialIssuanceWizardView';
26
26
  export * from './Pagination';
27
+ export * from './CredentialViewItem';
28
+ export * from './JSONDataView';
@@ -24,3 +24,5 @@ export * from './DragAndDropBox';
24
24
  export * from './PassportPhotoControl';
25
25
  export * from './CredentialIssuanceWizardView';
26
26
  export * from './Pagination';
27
+ export * from './CredentialViewItem';
28
+ export * from './JSONDataView';
@@ -8,4 +8,5 @@ export declare const SSITextH4SemiBoldCss: import("styled-components").FlattenSi
8
8
  export declare const SSITextH5Css: import("styled-components").FlattenSimpleInterpolation;
9
9
  export declare const SSITextH6Css: import("styled-components").FlattenSimpleInterpolation;
10
10
  export declare const SSITextH7RegularCss: import("styled-components").FlattenSimpleInterpolation;
11
+ export declare const SSITextH7SemiBoldCss: import("styled-components").FlattenSimpleInterpolation;
11
12
  export declare const gradient100TextCss: import("styled-components").FlattenSimpleInterpolation;
@@ -71,6 +71,13 @@ export const SSITextH7RegularCss = css `
71
71
  line-height: ${fontStyle.h7Regular.lineHeight}px;
72
72
  height: auto;
73
73
  `;
74
+ export const SSITextH7SemiBoldCss = css `
75
+ font-family: ${fontStyle.h7SemiBold.fontFamily};
76
+ font-size: ${fontStyle.h7SemiBold.fontSize}px;
77
+ font-weight: ${fontStyle.h7SemiBold.fontWeight};
78
+ line-height: ${fontStyle.h7SemiBold.lineHeight}px;
79
+ height: auto;
80
+ `;
74
81
  export const gradient100TextCss = css `
75
82
  background: ${gradientColors['100']};
76
83
  background-clip: text;
@@ -1,17 +1,13 @@
1
1
  export declare const SSITextH1Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export declare const SSITextH1SemiBoldStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const SSITextH1SemiBoldDarkStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
4
3
  export declare const SSITextH1SemiBoldLightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
5
4
  export declare const SSITextH2Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const SSITextH2DarkStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
7
5
  export declare const SSITextH2SemiBoldStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const SSITextH2SemiBoldDarkStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
9
6
  export declare const SSITextH3Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
10
7
  export declare const SSITextH3LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
11
8
  export declare const SSITextH4Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
12
9
  export declare const SSITextH4SemiBoldStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
13
10
  export declare const SSITextH4LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const SSITextH4DarkStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
15
11
  export declare const SSITextH4SemiBoldLightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
16
12
  export declare const SSITextH5Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
17
13
  export declare const SSITextH5LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -2,27 +2,22 @@ import styled from 'styled-components';
2
2
  import { fontColors } from '@sphereon/ui-components.core';
3
3
  import { SSITextH1Css, SSITextH1SemiBoldCss, SSITextH2Css, SSITextH2SemiBoldStyledCss, SSITextH3Css, SSITextH4Css, SSITextH4SemiBoldCss, SSITextH5Css, SSITextH6Css, SSITextH7RegularCss, } from '../css';
4
4
  export const SSITextH1Styled = styled.div `
5
- ${SSITextH1Css}
5
+ ${SSITextH1Css};
6
+ color: ${fontColors.dark};
6
7
  `;
7
8
  export const SSITextH1SemiBoldStyled = styled.div `
8
- ${SSITextH1SemiBoldCss}
9
- `;
10
- export const SSITextH1SemiBoldDarkStyled = styled(SSITextH1SemiBoldStyled) `
9
+ ${SSITextH1SemiBoldCss};
11
10
  color: ${fontColors.dark};
12
11
  `;
13
12
  export const SSITextH1SemiBoldLightStyled = styled(SSITextH1SemiBoldStyled) `
14
13
  color: ${fontColors.light};
15
14
  `;
16
15
  export const SSITextH2Styled = styled.div `
17
- ${SSITextH2Css}
18
- `;
19
- export const SSITextH2DarkStyled = styled(SSITextH2Styled) `
16
+ ${SSITextH2Css};
20
17
  color: ${fontColors.dark};
21
18
  `;
22
19
  export const SSITextH2SemiBoldStyled = styled.div `
23
- ${SSITextH2SemiBoldStyledCss}
24
- `;
25
- export const SSITextH2SemiBoldDarkStyled = styled(SSITextH2SemiBoldStyled) `
20
+ ${SSITextH2SemiBoldStyledCss};
26
21
  color: ${fontColors.dark};
27
22
  `;
28
23
  export const SSITextH3Styled = styled.div `
@@ -33,32 +28,34 @@ export const SSITextH3LightStyled = styled(SSITextH3Styled) `
33
28
  color: ${fontColors.light};
34
29
  `;
35
30
  export const SSITextH4Styled = styled.div `
36
- ${SSITextH4Css}
31
+ ${SSITextH4Css};
32
+ color: ${fontColors.dark};
37
33
  `;
38
34
  export const SSITextH4SemiBoldStyled = styled.div `
39
- ${SSITextH4SemiBoldCss}
35
+ ${SSITextH4SemiBoldCss};
36
+ color: ${fontColors.dark};
40
37
  `;
41
38
  export const SSITextH4LightStyled = styled(SSITextH4Styled) `
42
39
  color: ${fontColors.light};
43
40
  `;
44
- export const SSITextH4DarkStyled = styled(SSITextH4Styled) `
45
- color: ${fontColors.dark};
46
- `;
47
41
  export const SSITextH4SemiBoldLightStyled = styled(SSITextH4SemiBoldStyled) `
48
42
  color: ${fontColors.light};
49
43
  `;
50
44
  export const SSITextH5Styled = styled.div `
51
- ${SSITextH5Css}
45
+ ${SSITextH5Css};
46
+ color: ${fontColors.dark};
52
47
  `;
53
48
  export const SSITextH5LightStyled = styled(SSITextH5Styled) `
54
49
  color: ${fontColors.light};
55
50
  `;
56
51
  export const SSITextH6Styled = styled.div `
57
- ${SSITextH6Css}
52
+ ${SSITextH6Css};
53
+ color: ${fontColors.dark};
58
54
  `;
59
55
  export const SSITextH6LightStyled = styled(SSITextH6Styled) `
60
56
  color: ${fontColors.light};
61
57
  `;
62
58
  export const SSITextH7RegularStyled = styled.div `
63
- ${SSITextH7RegularCss}
59
+ ${SSITextH7RegularCss};
60
+ color: ${fontColors.dark};
64
61
  `;
@@ -1,31 +1,41 @@
1
1
  import { AccessorFn, DeepKeys } from '@tanstack/react-table';
2
2
  import { Button } from '../button';
3
+ import { ValueSelection } from '../field';
3
4
  export declare enum TableCellType {
4
5
  TEXT = "text",
5
6
  LABEL = "label",
6
7
  STATUS = "status",
7
8
  CREDENTIAL_CARD = "credentialCard",
8
- ACTION_GROUP = "actionGroup"
9
+ CREDENTIAL_DETAILS = "credentialDetails",
10
+ ACTIONS = "actions",
11
+ COMBOBOX = "combobox"
9
12
  }
10
13
  export type ColumnHeader<T> = {
11
14
  accessor: AccessorFn<T> | DeepKeys<T>;
12
15
  type: TableCellType;
13
16
  label?: string;
14
- opts?: TableCellOptions;
17
+ columnOptions?: TableColumnOptions;
15
18
  };
16
- export type TableCellOptions = {
17
- truncationLength?: number;
18
- enableHover?: boolean;
19
+ export type TableColumnOptions = {
19
20
  columnMinWidth?: number;
20
21
  columnMaxWidth?: number;
21
22
  columnWidth?: number;
22
- actionGroup?: TableColumnActionGroup;
23
- };
24
- export type TableColumnActionGroup = {
25
- label?: string;
26
- actions: Array<Button>;
23
+ cellOptions?: TableCellOptions;
27
24
  };
25
+ export type TableCellOptions = TextCellOptions | ComboboxCellOptions | ActionsCellOptions;
28
26
  export type TableRowSelection = {
29
27
  rowId: string;
30
28
  rowData: any;
31
29
  };
30
+ export type TextCellOptions = {
31
+ truncationLength?: number;
32
+ enableHover?: boolean;
33
+ };
34
+ export type ComboboxCellOptions = {
35
+ selectOptions?: Array<ValueSelection>;
36
+ defaultValue?: ValueSelection;
37
+ onChange?: (value: ValueSelection) => Promise<void>;
38
+ };
39
+ export type ActionsCellOptions = {
40
+ actions: Array<Button>;
41
+ };
@@ -4,5 +4,7 @@ export var TableCellType;
4
4
  TableCellType["LABEL"] = "label";
5
5
  TableCellType["STATUS"] = "status";
6
6
  TableCellType["CREDENTIAL_CARD"] = "credentialCard";
7
- TableCellType["ACTION_GROUP"] = "actionGroup";
7
+ TableCellType["CREDENTIAL_DETAILS"] = "credentialDetails";
8
+ TableCellType["ACTIONS"] = "actions";
9
+ TableCellType["COMBOBOX"] = "combobox";
8
10
  })(TableCellType || (TableCellType = {}));
@@ -0,0 +1,2 @@
1
+ import { ImageSize } from '@sphereon/ui-components.core';
2
+ export declare const getImageSize: (uri: string) => Promise<ImageSize>;
@@ -0,0 +1,12 @@
1
+ export const getImageSize = (uri) => {
2
+ return new Promise((resolve, reject) => {
3
+ const img = new Image();
4
+ img.onload = () => {
5
+ resolve({ width: img.width, height: img.height });
6
+ };
7
+ img.onerror = (error) => {
8
+ reject(error);
9
+ };
10
+ img.src = uri;
11
+ });
12
+ };
@@ -1 +1,2 @@
1
1
  export * from './FileUtils';
2
+ export * from './ImageUtils';
@@ -1 +1,2 @@
1
1
  export * from './FileUtils';
2
+ export * from './ImageUtils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.1.3-next.149+b8b840c",
4
+ "version": "0.1.3-next.157+cd7d4db",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -40,8 +40,9 @@
40
40
  "@mui/styled-engine-sc": "^5.14.12",
41
41
  "@mui/system": "^5.15.12",
42
42
  "@mui/x-date-pickers": "^6.19.5",
43
- "@sphereon/ui-components.core": "0.1.3-next.149+b8b840c",
43
+ "@sphereon/ui-components.core": "0.1.3-next.157+cd7d4db",
44
44
  "@tanstack/react-table": "^8.9.3",
45
+ "react-json-tree": "^0.18.0",
45
46
  "react-loader-spinner": "^5.4.5",
46
47
  "react-select": "^5.8.0",
47
48
  "react-toastify": "^9.1.3",
@@ -58,5 +59,5 @@
58
59
  "peerDependencies": {
59
60
  "react": ">= 16.8.0"
60
61
  },
61
- "gitHead": "b8b840c0e9384f8386a29f0fbd58e272e77d264d"
62
+ "gitHead": "cd7d4dbd82651ce16d04d08b2aa309258455d1bc"
62
63
  }