@sphereon/ui-components.ssi-react 0.1.3-unstable.99 → 0.2.1-next.105

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 (167) hide show
  1. package/LICENSE +201 -636
  2. package/dist/@config/toasts/index.d.ts +2 -3
  3. package/dist/components/assets/icons/CopyIcon/index.d.ts +9 -0
  4. package/dist/components/assets/icons/CopyIcon/index.js +7 -0
  5. package/dist/components/assets/icons/{BitterballenIcon → CrossIcon}/index.d.ts +2 -2
  6. package/dist/components/assets/icons/CrossIcon/index.js +7 -0
  7. package/dist/components/assets/icons/DeleteIcon/index.d.ts +2 -1
  8. package/dist/components/assets/icons/DeleteIcon/index.js +2 -2
  9. package/dist/components/assets/icons/DocumentIcon/index.d.ts +9 -0
  10. package/dist/components/assets/icons/DocumentIcon/index.js +7 -0
  11. package/dist/components/assets/icons/ImageIcon/index.d.ts +9 -0
  12. package/dist/components/assets/icons/ImageIcon/index.js +7 -0
  13. package/dist/components/assets/icons/MeatBallsIcon/index.d.ts +9 -0
  14. package/dist/components/assets/icons/MeatBallsIcon/index.js +7 -0
  15. package/dist/components/assets/icons/PencilIcon/index.d.ts +8 -0
  16. package/dist/components/assets/icons/PencilIcon/index.js +7 -0
  17. package/dist/components/assets/icons/SSIAddIcon/index.js +1 -1
  18. package/dist/components/assets/icons/SSIArrowDownIcon/index.js +1 -1
  19. package/dist/components/assets/icons/SSIFilterIcon/index.js +1 -1
  20. package/dist/components/assets/icons/ViewIcon/index.d.ts +9 -0
  21. package/dist/components/assets/icons/ViewIcon/index.js +7 -0
  22. package/dist/components/assets/images/WarningImage/index.d.ts +8 -0
  23. package/dist/components/assets/images/WarningImage/index.js +6 -0
  24. package/dist/components/assets/placeholders/PersonPlaceholder/index.d.ts +9 -0
  25. package/dist/components/assets/placeholders/PersonPlaceholder/index.js +7 -0
  26. package/dist/components/buttons/IconButton/index.d.ts +11 -0
  27. package/dist/components/buttons/IconButton/index.js +17 -0
  28. package/dist/components/buttons/{SSISecondaryButton → PrimaryButton}/index.d.ts +3 -3
  29. package/dist/components/buttons/{SSIPrimaryButton → PrimaryButton}/index.js +5 -4
  30. package/dist/components/buttons/{SSIPrimaryButton → SecondaryButton}/index.d.ts +3 -3
  31. package/dist/components/buttons/{SSISecondaryButton → SecondaryButton}/index.js +5 -4
  32. package/dist/components/fields/ComboBox/index.d.ts +21 -0
  33. package/dist/components/fields/ComboBox/index.js +51 -0
  34. package/dist/components/fields/DragAndDropBox/index.d.ts +8 -0
  35. package/dist/components/fields/DragAndDropBox/index.js +30 -0
  36. package/dist/components/fields/FileSelection/index.d.ts +12 -0
  37. package/dist/components/fields/FileSelection/index.js +32 -0
  38. package/dist/components/fields/JSONForms/PassportPhotoControl/index.d.ts +5 -0
  39. package/dist/components/fields/JSONForms/PassportPhotoControl/index.js +34 -0
  40. package/dist/components/fields/SSICheckbox/index.d.ts +2 -1
  41. package/dist/components/fields/SSICheckbox/index.js +2 -2
  42. package/dist/components/fields/SSIHoverText/index.js +1 -1
  43. package/dist/components/fields/TextInputField/index.d.ts +12 -0
  44. package/dist/components/fields/TextInputField/index.js +20 -0
  45. package/dist/components/indicators/ProgressStepIndicator/index.js +5 -4
  46. package/dist/components/lists/DropDownList/index.d.ts +10 -0
  47. package/dist/components/lists/DropDownList/index.js +34 -0
  48. package/dist/components/lists/DropDownListItem/index.d.ts +13 -0
  49. package/dist/components/lists/DropDownListItem/index.js +15 -0
  50. package/dist/components/views/CredentialIssuanceWizardView/index.d.ts +10 -0
  51. package/dist/components/views/CredentialIssuanceWizardView/index.js +40 -0
  52. package/dist/components/views/CredentialMiniCardView/index.js +1 -1
  53. package/dist/components/views/CredentialViewItem/index.d.ts +16 -0
  54. package/dist/components/views/CredentialViewItem/index.js +14 -0
  55. package/dist/components/views/FormView/index.d.ts +20 -0
  56. package/dist/components/views/FormView/index.js +12 -0
  57. package/dist/components/views/FormView/styles.css +105 -0
  58. package/dist/components/views/InformationRequestView/index.d.ts +14 -0
  59. package/dist/components/views/InformationRequestView/index.js +14 -0
  60. package/dist/components/views/JSONDataView/index.d.ts +8 -0
  61. package/dist/components/views/JSONDataView/index.js +83 -0
  62. package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
  63. package/dist/components/views/SSITableView/PaginationControls/index.d.ts +8 -0
  64. package/dist/components/views/SSITableView/PaginationControls/index.js +9 -0
  65. package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +1 -0
  66. package/dist/components/views/SSITableView/SSITableViewHeader/index.js +9 -7
  67. package/dist/components/views/SSITableView/index.d.ts +5 -2
  68. package/dist/components/views/SSITableView/index.js +77 -46
  69. package/dist/index.d.ts +29 -7
  70. package/dist/index.js +28 -5
  71. package/dist/renders/jsonFormsRenders.d.ts +2 -0
  72. package/dist/renders/jsonFormsRenders.js +6 -0
  73. package/dist/styles/components/components/CredentialIssuanceWizardView/index.d.ts +14 -0
  74. package/dist/styles/components/components/CredentialIssuanceWizardView/index.js +55 -0
  75. package/dist/styles/components/components/CredentialViewItem/index.d.ts +14 -0
  76. package/dist/styles/components/components/CredentialViewItem/index.js +28 -0
  77. package/dist/styles/components/components/DragAndDropBox/index.d.ts +7 -0
  78. package/dist/styles/components/components/DragAndDropBox/index.js +25 -0
  79. package/dist/styles/components/components/DropDownList/index.d.ts +6 -0
  80. package/dist/styles/components/components/DropDownList/index.js +21 -0
  81. package/dist/styles/components/components/DropDownListItem/index.d.ts +8 -0
  82. package/dist/styles/components/components/DropDownListItem/index.js +21 -0
  83. package/dist/styles/components/components/FileSelectionField/index.d.ts +15 -0
  84. package/dist/styles/components/components/FileSelectionField/index.js +64 -0
  85. package/dist/styles/components/components/IconButton/index.d.ts +2 -0
  86. package/dist/styles/components/components/{SSIIconButton → IconButton}/index.js +5 -3
  87. package/dist/styles/components/components/InformationRequestView/index.d.ts +31 -0
  88. package/dist/styles/components/components/InformationRequestView/index.js +86 -0
  89. package/dist/styles/components/components/JSONDataView/index.d.ts +8 -0
  90. package/dist/styles/components/components/JSONDataView/index.js +47 -0
  91. package/dist/styles/components/components/Pagination/index.d.ts +5 -0
  92. package/dist/styles/components/components/Pagination/index.js +71 -0
  93. package/dist/styles/components/components/PassportPhotoControl/index.d.ts +5 -0
  94. package/dist/styles/components/components/PassportPhotoControl/index.js +27 -0
  95. package/dist/styles/components/components/PrimaryButton/index.d.ts +4 -0
  96. package/dist/styles/components/components/{SSIPrimaryButton → PrimaryButton}/index.js +3 -2
  97. package/dist/styles/components/components/ProgressStepIndicator/index.d.ts +14 -8
  98. package/dist/styles/components/components/ProgressStepIndicator/index.js +11 -0
  99. package/dist/styles/components/components/SSICheckbox/index.d.ts +9 -4
  100. package/dist/styles/components/components/SSICheckbox/index.js +2 -2
  101. package/dist/styles/components/components/SSICredentialCardView/index.d.ts +28 -13
  102. package/dist/styles/components/components/SSICredentialCardView/index.js +1 -0
  103. package/dist/styles/components/components/SSICredentialMiniCardView/index.d.ts +5 -2
  104. package/dist/styles/components/components/SSIHoverText/index.d.ts +4 -3
  105. package/dist/styles/components/components/SSIProfileIcon/index.d.ts +2 -1
  106. package/dist/styles/components/components/SSIStatusLabel/index.d.ts +8 -3
  107. package/dist/styles/components/components/SSIStatusLabel/index.js +1 -0
  108. package/dist/styles/components/components/SSITabView/index.d.ts +2 -1
  109. package/dist/styles/components/components/SSITabView/index.js +1 -1
  110. package/dist/styles/components/components/SSITabViewHeader/index.d.ts +6 -2
  111. package/dist/styles/components/components/SSITabViewHeader/index.js +5 -0
  112. package/dist/styles/components/components/SSITableView/index.d.ts +12 -7
  113. package/dist/styles/components/components/SSITableView/index.js +21 -3
  114. package/dist/styles/components/components/SSITableViewHeader/index.d.ts +11 -5
  115. package/dist/styles/components/components/SSITableViewHeader/index.js +8 -0
  116. package/dist/styles/components/components/SSIToast/index.d.ts +11 -4
  117. package/dist/styles/components/components/SSIToast/index.js +2 -2
  118. package/dist/styles/components/components/SSIToastContainer/index.d.ts +3 -1
  119. package/dist/styles/components/components/SSITypeLabel/index.d.ts +4 -1
  120. package/dist/styles/components/components/SecondaryButton/index.d.ts +7 -0
  121. package/dist/styles/components/components/{SSISecondaryButton → SecondaryButton}/index.js +5 -3
  122. package/dist/styles/components/components/StepMarker/index.d.ts +5 -4
  123. package/dist/styles/components/components/TextInputField/index.d.ts +3 -0
  124. package/dist/styles/components/components/TextInputField/index.js +27 -0
  125. package/dist/styles/components/components/buttons/index.d.ts +4 -0
  126. package/dist/styles/components/components/buttons/index.js +4 -0
  127. package/dist/styles/components/components/index.d.ts +15 -5
  128. package/dist/styles/components/components/index.js +15 -5
  129. package/dist/styles/components/containers/index.d.ts +7 -4
  130. package/dist/styles/css/index.d.ts +12 -10
  131. package/dist/styles/css/index.js +14 -0
  132. package/dist/styles/fonts/index.d.ts +29 -16
  133. package/dist/styles/fonts/index.js +23 -13
  134. package/dist/styles/typography.js +6 -0
  135. package/dist/types/button/index.d.ts +2 -1
  136. package/dist/types/field/index.d.ts +21 -0
  137. package/dist/types/field/index.js +10 -0
  138. package/dist/types/index.d.ts +2 -0
  139. package/dist/types/index.js +2 -0
  140. package/dist/types/indicator/index.d.ts +1 -0
  141. package/dist/types/table/index.d.ts +24 -14
  142. package/dist/types/table/index.js +3 -0
  143. package/dist/types/view/index.d.ts +13 -0
  144. package/dist/types/view/index.js +1 -0
  145. package/dist/utils/FileUtils.d.ts +1 -0
  146. package/dist/utils/FileUtils.js +7 -0
  147. package/dist/utils/IconUtils.d.ts +3 -0
  148. package/dist/utils/IconUtils.js +32 -0
  149. package/dist/utils/ImageUtils.d.ts +2 -0
  150. package/dist/utils/ImageUtils.js +12 -0
  151. package/dist/utils/index.d.ts +3 -0
  152. package/dist/utils/index.js +3 -0
  153. package/package.json +25 -9
  154. package/dist/components/assets/icons/BitterballenIcon/index.js +0 -7
  155. package/dist/components/buttons/RowActionMenuButton/index.d.ts +0 -13
  156. package/dist/components/buttons/RowActionMenuButton/index.js +0 -28
  157. package/dist/components/buttons/SSIIconButton/index.d.ts +0 -10
  158. package/dist/components/buttons/SSIIconButton/index.js +0 -29
  159. package/dist/components/lists/SSIDropDownList/index.d.ts +0 -7
  160. package/dist/components/lists/SSIDropDownList/index.js +0 -11
  161. package/dist/styles/components/components/RowActionMenuButton/index.d.ts +0 -4
  162. package/dist/styles/components/components/RowActionMenuButton/index.js +0 -27
  163. package/dist/styles/components/components/SSIDropDownList/index.d.ts +0 -2
  164. package/dist/styles/components/components/SSIDropDownList/index.js +0 -12
  165. package/dist/styles/components/components/SSIIconButton/index.d.ts +0 -1
  166. package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +0 -1
  167. package/dist/styles/components/components/SSISecondaryButton/index.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode } from 'react';
1
+ import { CSSProperties, FC, ReactNode } from 'react';
2
2
  export interface IProps {
3
3
  onValueChange?: (isChecked: boolean) => Promise<void>;
4
4
  initialValue?: boolean;
@@ -10,6 +10,7 @@ export interface IProps {
10
10
  selectedColor?: string;
11
11
  labelColor?: string;
12
12
  checkmarkColor?: string;
13
+ style?: CSSProperties;
13
14
  }
14
15
  declare const SSICheckbox: FC<IProps>;
15
16
  export default SSICheckbox;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { OpacityStyleEnum, fontColors, selectionElementColors } from '@sphereon/ui-components.core';
4
4
  import { SSICheckboxContainerStyled as Container, SSICheckboxLabelContainerStyled as LabelCaption, SSICheckboxSelectedContainerStyled as SelectedContainer, SSICheckboxUnselectedContainerStyled as UnselectedContainer, } from '../../../styles/components';
5
5
  const SSICheckbox = (props) => {
6
- const { backgroundColor, borderColor = selectionElementColors.primaryBorderDark, disabled = false, initialValue = false, label, selectedColor = selectionElementColors.primaryDark, labelColor = fontColors.light, checkmarkColor = fontColors.dark, } = props;
6
+ const { backgroundColor, borderColor = selectionElementColors.primaryBorderDark, disabled = false, initialValue = false, label, selectedColor = selectionElementColors.primaryDark, labelColor = fontColors.light, checkmarkColor = fontColors.dark, style, } = props;
7
7
  const [isChecked, setChecked] = React.useState(initialValue);
8
8
  const value = props.isChecked !== undefined ? props.isChecked : isChecked;
9
9
  const onValueChange = async () => {
@@ -16,6 +16,6 @@ const SSICheckbox = (props) => {
16
16
  }
17
17
  setChecked(!isChecked);
18
18
  };
19
- return (_jsxs(Container, { onClick: onValueChange, style: { ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, children: [value ? (_jsx(SelectedContainer, { style: { backgroundColor: selectedColor, border: `1px solid ${borderColor}` } })) : (_jsx(UnselectedContainer, { style: { backgroundColor, border: `1px solid ${borderColor}` } })), label && (typeof label === 'string' ? _jsx(LabelCaption, { style: { color: labelColor }, children: label }) : label)] }));
19
+ return (_jsxs(Container, { onClick: onValueChange, style: { ...style, ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, children: [value ? (_jsx(SelectedContainer, { style: { backgroundColor: selectedColor, border: `1px solid ${borderColor}` } })) : (_jsx(UnselectedContainer, { style: { backgroundColor, border: `1px solid ${borderColor}` } })), label && (typeof label === 'string' ? _jsx(LabelCaption, { style: { color: labelColor }, children: label }) : label)] }));
20
20
  };
21
21
  export default SSICheckbox;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { SSIHoverTextTextStyled as Text, SSIHoverTextContainerStyled as Container, SSIHoverTextTextHoverStyled as TextHover, } from '../../../styles/components';
3
3
  const SSIHoverText = (props) => {
4
4
  const { text, truncationLength, enableHover = true } = props;
5
- const value = truncationLength ? text.substring(0, truncationLength) : text;
5
+ const value = truncationLength ? `${text.substring(0, truncationLength)}...` : text;
6
6
  return (_jsxs(Container, { children: [_jsx(Text, { children: value }), enableHover && _jsx(TextHover, { children: text })] }));
7
7
  };
8
8
  export default SSIHoverText;
@@ -0,0 +1,12 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ type Props = {
3
+ initialValue?: string;
4
+ value?: string;
5
+ onChangeValue?: (value: string) => Promise<void>;
6
+ placeholder?: string;
7
+ maxLength?: number;
8
+ label?: string;
9
+ style?: CSSProperties;
10
+ };
11
+ declare const TextInputField: FC<Props>;
12
+ export default TextInputField;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useState } from 'react';
3
+ import { TextFieldInputContainerStyled as Container, TextFieldInputInputStyled as Input, SSITextH2Styled as Label } from '../../../styles';
4
+ const TextInputField = (props) => {
5
+ const { initialValue, label, placeholder, maxLength, onChangeValue, style } = props;
6
+ const [value, setValue] = React.useState(initialValue);
7
+ const [isFocused, setIsFocused] = useState(false);
8
+ const onChange = async (event) => {
9
+ setValue(event.target.value);
10
+ await onChangeValue?.(event.target.value);
11
+ };
12
+ const onFocus = () => {
13
+ setIsFocused(true);
14
+ };
15
+ const onBlur = () => {
16
+ setIsFocused(false);
17
+ };
18
+ return (_jsxs(Container, { style: { ...style }, children: [label && _jsx(Label, { children: label }), _jsx(Input, { onChange: onChange, value: value, placeholder: isFocused ? '' : placeholder, type: 'text', onFocus: onFocus, onBlur: onBlur, maxLength: maxLength })] }));
19
+ };
20
+ export default TextInputField;
@@ -1,16 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { elementColors, fontColors } from '@sphereon/ui-components.core';
2
+ import { elementColors, fontColors, Localization } from '@sphereon/ui-components.core';
3
3
  import StepMarker from '../../assets/markers/StepMarker';
4
4
  import { gradientColors } from '../../../styles/colors';
5
- import { ProgressStepIndicatorContainerStyled as Container, ProgressStepIndicatorContentGridContainerStyled as GridContainer, ProgressStepIndicatorStepMarkerCellStyled as StepMarkerCell, ProgressStepIndicatorStepLineStyled as StepLine, ProgressStepIndicatorStepTextCellStyled as StepTextCell, ProgressStepIndicatorTitleTextStyled as TitleText, ProgressStepIndicatorDescriptionTextStyled as DescriptionText, ProgressStepIndicatorSpacerLineCellStyled as SpacerLineCell, } from '../../../styles';
5
+ import { ProgressStepIndicatorContainerStyled as Container, ProgressStepIndicatorContentGridContainerStyled as GridContainer, ProgressStepIndicatorStepMarkerCellStyled as StepMarkerCell, ProgressStepIndicatorStepLineStyled as StepLine, ProgressStepIndicatorStepTextCellStyled as StepTextCell, ProgressStepIndicatorTitleTextStyled as TitleText, ProgressStepIndicatorDescriptionTextStyled as DescriptionText, ProgressStepIndicatorOptionalTextStyled as OptionalText, ProgressStepIndicatorSpacerLineCellStyled as SpacerLineCell, } from '../../../styles';
6
6
  import { StepStatus } from '../../../types';
7
7
  const getStepRowElement = (stepNumber, status, step, maxSteps) => {
8
+ const { title, description, required = true } = step;
8
9
  const gridRowNumber = stepNumber * 2 - 1;
9
10
  return (_jsxs(_Fragment, { children: [_jsxs(StepMarkerCell, { style: { gridRow: gridRowNumber }, children: [_jsx(StepMarker, { stepNumber: stepNumber, status: status }), stepNumber < maxSteps && (_jsx(StepLine, { style: {
10
11
  ...(status === StepStatus.COMPLETED && {
11
12
  backgroundColor: elementColors.purple,
12
13
  }),
13
- } }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [step.title && (_jsx(TitleText, { style: {
14
+ } }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [title && (_jsxs(TitleText, { style: {
14
15
  ...(status === StepStatus.CURRENT && {
15
16
  background: gradientColors['100'],
16
17
  backgroundClip: 'text',
@@ -19,7 +20,7 @@ const getStepRowElement = (stepNumber, status, step, maxSteps) => {
19
20
  }),
20
21
  ...(status === StepStatus.COMPLETED && { color: fontColors.dark }),
21
22
  ...(status === StepStatus.NEXT && { color: fontColors.lightGrey }),
22
- }, children: step.title })), step.description && (_jsx(DescriptionText, { style: { ...((status === StepStatus.CURRENT || status === StepStatus.COMPLETED) && { color: fontColors.dark }) }, children: step.description }))] }), stepNumber < maxSteps && (_jsx(SpacerLineCell, { style: { gridRow: gridRowNumber + 1 }, children: _jsx(StepLine, { style: {
23
+ }, children: [_jsx("div", { children: title }), !required && _jsx(OptionalText, { children: Localization.translate('optional_label') })] })), description && (_jsx(DescriptionText, { style: { ...((status === StepStatus.CURRENT || status === StepStatus.COMPLETED) && { color: fontColors.dark }) }, children: description }))] }), stepNumber < maxSteps && (_jsx(SpacerLineCell, { style: { gridRow: gridRowNumber + 1 }, children: _jsx(StepLine, { style: {
23
24
  ...(status === StepStatus.COMPLETED && {
24
25
  backgroundColor: elementColors.purple,
25
26
  }),
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ import { Button } from '../../../types';
4
+ export type Props = {
5
+ icon: ButtonIcon;
6
+ buttons: Array<Button>;
7
+ showBorder?: boolean;
8
+ };
9
+ declare const DropDownList: FC<Props>;
10
+ export default DropDownList;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect } from 'react';
3
+ import { borderColors } from '@sphereon/ui-components.core';
4
+ import DropDownListItem from '../DropDownListItem';
5
+ import IconButton from '../../buttons/IconButton';
6
+ import { DropDownListContainerStyled as Container, DropDownContainerStyled as DropDownContainer, DropDownListButtonStyled as ListButton, } from '../../../styles/components';
7
+ const DropDownList = (props) => {
8
+ const { icon, buttons, showBorder = false } = props;
9
+ const [showActionsMenu, setShowActionsMenu] = useState(false);
10
+ const dropdownRef = useRef(null);
11
+ const onMore = (event) => {
12
+ setShowActionsMenu(!showActionsMenu);
13
+ event.stopPropagation();
14
+ };
15
+ useEffect(() => {
16
+ const onClickOutside = (event) => {
17
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
18
+ setShowActionsMenu(false);
19
+ }
20
+ };
21
+ document.addEventListener('mousedown', onClickOutside);
22
+ return () => {
23
+ document.removeEventListener('mousedown', onClickOutside);
24
+ };
25
+ }, [showActionsMenu]);
26
+ const getItems = () => {
27
+ return buttons.map((item, index) => {
28
+ const showBorder = buttons.length > 1 && index !== buttons.length - 1;
29
+ return (_jsx(DropDownListItem, { showBorder: showBorder, label: item.caption, onClick: item.onClick, icon: item.icon, fontColor: item.fontColor }, index));
30
+ });
31
+ };
32
+ return (_jsxs(Container, { ref: dropdownRef, children: [_jsx(ListButton, { children: _jsx(IconButton, { icon: icon, onClick: onMore }) }), showActionsMenu && (_jsx(DropDownContainer, { style: { ...(showBorder && { borderWidth: 2, borderColor: borderColors.lightGrey, borderStyle: 'solid' }) }, children: getItems() }))] }));
33
+ };
34
+ export default DropDownList;
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ type Props = {
4
+ label: string;
5
+ onClick: (args?: any) => Promise<void>;
6
+ disabled?: boolean;
7
+ icon?: ButtonIcon;
8
+ fontColor?: string;
9
+ showBorder?: boolean;
10
+ borderColor?: string;
11
+ };
12
+ declare const DropDownListItem: FC<Props>;
13
+ export default DropDownListItem;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { borderColors, fontColors } from '@sphereon/ui-components.core';
3
+ import { getIcon } from '../../../utils';
4
+ import { DropDownListItemCaptionContainerStyled as ListItemCaption, DropDownListItemContainerStyled as Container, DropDownListItemIconContainerStyled as IconContainer, } from '../../../styles/components';
5
+ const DropDownListItem = (props) => {
6
+ const { disabled, label, icon, showBorder = false, fontColor = fontColors.dark, borderColor = borderColors.light, onClick } = props;
7
+ const onContainerClick = async (event) => {
8
+ event.stopPropagation();
9
+ if (onClick) {
10
+ await onClick();
11
+ }
12
+ };
13
+ return (_jsxs(Container, { onClick: onContainerClick, style: { ...(showBorder && { borderBottomWidth: 2, borderBottomColor: borderColor }) }, children: [_jsx(ListItemCaption, { children: label }), icon && _jsx(IconContainer, { children: getIcon(icon) })] }));
14
+ };
15
+ export default DropDownListItem;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { CredentialFormData, CredentialFormSelectionType } from '../../../types';
3
+ type Props = {
4
+ credentialTypes: Array<CredentialFormSelectionType>;
5
+ onSelectCredentialTypeChange?: (credentialType: CredentialFormSelectionType) => Promise<void>;
6
+ onCredentialFormDataChange?: (credentialFormData: CredentialFormData) => Promise<void>;
7
+ credentialData?: Record<any, any>;
8
+ };
9
+ declare const CredentialIssuanceWizardView: FC<Props>;
10
+ export default CredentialIssuanceWizardView;
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Autocomplete, TextField } from '@mui/material';
4
+ import { Localization } from '@sphereon/ui-components.core';
5
+ import FileSelection from '../../fields/FileSelection';
6
+ import DragAndDropBox from '../../fields/DragAndDropBox';
7
+ 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';
8
+ import FormView from '../FormView';
9
+ const CredentialIssuanceWizardView = (props) => {
10
+ const { credentialData, credentialTypes, onSelectCredentialTypeChange, onCredentialFormDataChange } = props;
11
+ const [selectedCredentialType, setSelectedCredentialType] = useState(null);
12
+ const [credentialInput, setCredentialInput] = useState(null);
13
+ const [evidence, setEvidence] = useState([]);
14
+ const onCredentialTypeChange = (event, value) => {
15
+ setCredentialInput(null);
16
+ setEvidence([]);
17
+ setSelectedCredentialType(value);
18
+ onSelectCredentialTypeChange?.(value);
19
+ };
20
+ const onCredentialFormInputChange = async (state) => {
21
+ setCredentialInput(state);
22
+ onCredentialFormDataChange?.({ ...state, evidence });
23
+ };
24
+ const onAddEvidence = async (file) => {
25
+ const evidenceFiles = [...evidence, file];
26
+ setEvidence(evidenceFiles);
27
+ onCredentialFormDataChange?.({ ...credentialInput, evidence: evidenceFiles, data: { ...(credentialInput?.data ?? {}) } });
28
+ };
29
+ const onRemoveEvidence = async (index) => {
30
+ evidence.splice(index, 1);
31
+ const evidenceFiles = [...evidence];
32
+ setEvidence(evidenceFiles);
33
+ onCredentialFormDataChange?.({ ...credentialInput, evidence: evidenceFiles, data: { ...(credentialInput?.data ?? {}) } });
34
+ };
35
+ const getEvidenceElements = () => {
36
+ return evidence.map((file, index) => (_jsx(FileSelection, { file: file, onRemove: async () => onRemoveEvidence(index) }, index)));
37
+ };
38
+ return (_jsxs(Container, { children: [_jsxs(CredentialTypeContainer, { children: [_jsx(CredentialTypeTitle, { children: Localization.translate('credential_issuance_wizard_title') }), _jsx(Autocomplete, { options: credentialTypes, sx: { flexGrow: 1 }, renderInput: (params) => (_jsx(TextField, { ...params, label: Localization.translate('credential_issuance_wizard_credential_type_label') })), onChange: onCredentialTypeChange })] }), selectedCredentialType && (_jsxs(_Fragment, { children: [_jsx(FormContainer, { children: selectedCredentialType.schema && selectedCredentialType.uiSchema && (_jsx(FormView, { schema: selectedCredentialType.schema, uiSchema: selectedCredentialType.uiSchema, data: credentialData, onFormStateChange: onCredentialFormInputChange })) }), _jsx(EvidenceContainer, { children: _jsxs(EvidenceContentContainer, { children: [_jsxs("div", { children: [_jsxs(EvidenceTitleContainer, { children: [_jsx(EvidenceTitle, { children: Localization.translate('credential_issuance_wizard_evidence_title') }), _jsx(EvidenceTitleOptional, { children: Localization.translate('optional_label') })] }), _jsx(EvidenceDescription, { children: Localization.translate('credential_issuance_wizard_evidence_description') })] }), _jsxs(EvidenceFilesContainer, { children: [_jsx(DragAndDropBox, { caption: Localization.translate('drag_and_drop_upload_evidence_caption'), description: Localization.translate('credential_attach_evidence_description'), onChangeFile: onAddEvidence }), getEvidenceElements()] })] }) })] }))] }));
39
+ };
40
+ export default CredentialIssuanceWizardView;
@@ -6,6 +6,6 @@ const CredentialMiniCardView = (props) => {
6
6
  const { backgroundColor = credentialCardColors.default, backgroundImage, logo, logoColor, style } = props;
7
7
  return (_jsx(Container, { style: { ...style, backgroundColor }, children: _jsx(BackgroundImage, { style: {
8
8
  ...(backgroundImage?.uri && { background: `url(${backgroundImage.uri})`, backgroundSize: 'cover' }),
9
- }, children: (!backgroundImage || logo) && _jsx(SSILogo, { logo: logo, color: logoColor }) }) }));
9
+ }, children: (!backgroundImage || logo) && _jsx(SSILogo, { logo: logo, color: logoColor, size: logo?.style?.height }) }) }));
10
10
  };
11
11
  export default CredentialMiniCardView;
@@ -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,14 @@
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 ? toLocalDateTimeString(props.expirationDate) : toLocalDateString(props.expirationDate)}`
11
+ : Localization.translate('credential_status_never_expires_date_label');
12
+ return (_jsxs(Container, { style: { ...style }, children: [showCard && _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 })] })] })] }));
13
+ };
14
+ export default CredentialViewItem;
@@ -0,0 +1,20 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ import { JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonSchema, Middleware, UISchemaElement, ValidationMode } from '@jsonforms/core';
3
+ import { JSONFormState } from '../../../types';
4
+ import Ajv from 'ajv';
5
+ type Props<DataType = Record<any, any>> = {
6
+ schema: JsonSchema;
7
+ uiSchema: UISchemaElement;
8
+ validationMode?: ValidationMode;
9
+ data?: DataType;
10
+ renderers?: Array<JsonFormsRendererRegistryEntry>;
11
+ cells?: Array<JsonFormsCellRendererRegistryEntry>;
12
+ onFormStateChange?: (state: JSONFormState) => Promise<void>;
13
+ style?: CSSProperties;
14
+ middleware?: Middleware;
15
+ ajv?: Ajv;
16
+ readonly?: boolean;
17
+ config?: any;
18
+ };
19
+ declare const FormView: FC<Props>;
20
+ export default FormView;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { JsonForms } from '@jsonforms/react';
3
+ import { materialCells } from '@jsonforms/material-renderers';
4
+ import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
5
+ const FormView = (props) => {
6
+ const { data, schema, uiSchema, validationMode = 'ValidateAndShow', renderers = jsonFormsMaterialRenderers, cells = materialCells, style, middleware, ajv, onFormStateChange, readonly = false, config, } = props;
7
+ const onFormStateChanged = (state) => {
8
+ void onFormStateChange?.(state);
9
+ };
10
+ return (_jsx("div", { style: style, children: _jsx(JsonForms, { schema: schema, uischema: uiSchema, data: data, renderers: renderers, cells: cells, onChange: onFormStateChanged, validationMode: validationMode, middleware: middleware, ajv: ajv, readonly: readonly, config: config }) }));
11
+ };
12
+ export default FormView;
@@ -0,0 +1,105 @@
1
+ .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
2
+ border-color: #7276F7 !important;
3
+ }
4
+
5
+ .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
6
+ border-color: #7276F7 !important;
7
+ }
8
+
9
+ .MuiTypography-h6 {
10
+ font-size: 16px !important;
11
+ font-style: normal !important;
12
+ font-weight: 600 !important;
13
+ }
14
+
15
+ .MuiGrid-container {
16
+ padding: 0 !important;
17
+ }
18
+
19
+ .MuiFormControl-root {
20
+ padding: 0 !important;
21
+
22
+ }
23
+
24
+ .MuiCardContent-root {
25
+ padding: 0 !important;
26
+ }
27
+
28
+ .MuiCardHeader-root {
29
+ padding: 0 !important;
30
+ }
31
+
32
+ .MuiPaper-root {
33
+ margin: 0 !important;
34
+ background-color: #FBFBFB !important;
35
+ box-shadow: none !important;
36
+ border-radius: 4px !important;
37
+ }
38
+
39
+ .MuiCardHeader-title {
40
+ font-family: Poppins, serif !important;
41
+ font-size: 16px !important;
42
+ font-style: normal !important;
43
+ font-weight: 400 !important;
44
+ margin-bottom: 10px !important;
45
+ }
46
+
47
+ .MuiGrid-root.MuiGrid-container.MuiGrid-direction-xs-column {
48
+ gap: 24px !important;
49
+ }
50
+
51
+ .MuiFormLabel-root.MuiInputLabel-root {
52
+ font-family: 'Poppins', sans-serif !important;
53
+ }
54
+
55
+ .MuiInputBase-root.MuiOutlinedInput-root .MuiInputBase-input {
56
+ font-family: 'Poppins', sans-serif !important;
57
+ }
58
+
59
+ .MuiInputBase-root.MuiOutlinedInput-root {
60
+ font-family: 'Poppins', sans-serif !important;
61
+ }
62
+
63
+ .MuiTypography-root {
64
+ font-family: 'Poppins', sans-serif !important;
65
+ color: #303030 !important;
66
+ }
67
+
68
+ .MuiDateCalendar-root {
69
+ background-color: #ECE6F0 !important;
70
+ border-radius: 16px !important;
71
+ }
72
+
73
+ .MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation8.MuiPickersPopper-paper {
74
+ border-radius: 16px !important;
75
+ }
76
+
77
+ .MuiButtonBase-root.MuiPickersDay-root.Mui-selected.MuiPickersDay-dayWithMargin {
78
+ background-color: #7276F7 !important;
79
+ }
80
+
81
+ .MuiButtonBase-root.MuiPickersDay-root.MuiPickersDay-dayWithMargin:hover {
82
+ background-color: #B7B8D9 !important;
83
+ }
84
+
85
+ .base-Popper-root {
86
+ border-radius: 4px !important;
87
+ }
88
+
89
+ .MuiFormGroup-root.MuiFormGroup-row {
90
+ display: grid !important;
91
+ grid-template-columns: repeat(2, 1fr) !important;
92
+ grid-gap: 10px !important;
93
+ }
94
+
95
+ .MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-true:empty {
96
+ display: none !important;
97
+ }
98
+
99
+ textarea.MuiInputBase-input.MuiInputBase-inputMultiline {
100
+ min-height: 112px !important;
101
+ }
102
+
103
+ .MuiTabs-scroller.MuiTabs-fixed {
104
+ margin-bottom: 12px !important;
105
+ }
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { CredentialStatus, ImageAttributes } from '@sphereon/ui-components.core';
3
+ type Props = {
4
+ relyingPartyName: string;
5
+ purpose: string;
6
+ credentialStatus: CredentialStatus;
7
+ credentialTitle?: string;
8
+ credentialSubtitle?: string;
9
+ uri?: string;
10
+ logo?: ImageAttributes;
11
+ textColor?: string;
12
+ };
13
+ declare const InformationRequestView: FC<Props>;
14
+ export default InformationRequestView;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Localization } from '@sphereon/ui-components.core';
3
+ import { InformationRequestViewCardSubtitle as CardSubtitle, InformationRequestViewCardTextContainer as CardTextContainer, InformationRequestViewCardTitle as CardTitle, InformationRequestViewContainerStyled as Container, InformationRequestViewContentContainerStyled as ContentContainer, InformationRequestViewFormContainerStyled as FormContainer, InformationRequestViewFormContainerStyled as PurposeContainer, InformationRequestViewHeaderContainerStyled as HeaderContainer, InformationRequestViewLogoContainerStyled as LogoContainer, InformationRequestViewRPCardContainerStyled as RPCardContainer, InformationRequestViewTitleStyled as HeaderTitle, InformationRequestViewParagraphStyled as PurposeTitle, InformationRequestViewParagraphStyled as FormTitle, InformationRequestViewDescriptionStyled as Description, } from '../../../styles/components';
4
+ import SSIStatusLabel from '../../labels/SSIStatusLabel';
5
+ import SSILogo from '../../assets/logos/SSILogo';
6
+ const InformationRequestView = (args) => {
7
+ const { relyingPartyName, purpose, uri, credentialStatus, logo, textColor } = args;
8
+ return (_jsx(Container, { children: _jsxs(ContentContainer, { children: [_jsxs(HeaderContainer, { children: [_jsx(HeaderTitle, { children: Localization.translate('information_request_title') }), _jsx(Description, { children: Localization.translate('information_request_header_description', {
9
+ partyName: relyingPartyName,
10
+ }) })] }), _jsxs(PurposeContainer, { children: [_jsx(PurposeTitle, { children: Localization.translate('information_request_purpose_label') }), _jsx(Description, { children: purpose })] }), _jsxs(FormContainer, { children: [_jsx(FormTitle, { children: Localization.translate('information_request_form_label') }), _jsx(Description, { children: Localization.translate('information_request_interacting_with', {
11
+ partyName: relyingPartyName,
12
+ }) }), _jsxs(RPCardContainer, { children: [_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor ?? '#000' }) }), _jsxs(CardTextContainer, { children: [_jsx(CardTitle, { children: relyingPartyName }), _jsx(CardSubtitle, { children: "Verifier" }), uri && _jsx(CardSubtitle, { children: uri })] }), _jsx(SSIStatusLabel, { status: credentialStatus })] })] })] }) }));
13
+ };
14
+ export default InformationRequestView;
@@ -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,83 @@
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)
20
+ .filter(([_key, value]) => !!value)
21
+ .map(async ([key, value]) => {
22
+ if (typeof value === 'object') {
23
+ processedData[key] = await preprocessData(value);
24
+ }
25
+ else if (typeof value === 'string' && isBase64ImageUri(value)) {
26
+ const base64Uri = value;
27
+ const dimensions = await getImageSize(base64Uri);
28
+ processedData[key] = {
29
+ uri: base64Uri,
30
+ dimensions: {
31
+ height: dimensions.height,
32
+ width: dimensions.width,
33
+ aspectRatio: calculateAspectRatio(dimensions.width, dimensions.height),
34
+ },
35
+ };
36
+ }
37
+ else {
38
+ processedData[key] = value;
39
+ }
40
+ }));
41
+ return processedData;
42
+ };
43
+ useEffect(() => {
44
+ preprocessData(props.data).then((data) => setData(data));
45
+ }, [props.data]);
46
+ const getItemString = () => {
47
+ return null;
48
+ };
49
+ const valueRenderer = (valueAsString, value) => {
50
+ if (isBoolean(value)) {
51
+ return parseToBoolean(value) ? _jsx(SSICheckmarkBadge, {}) : _jsx(SSIExclamationMarkBadge, {});
52
+ }
53
+ if (typeof value === 'object' && value !== null && '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 && (_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 && (_jsx(JSONTree, { theme: {
69
+ base0D: fontColors.dark,
70
+ tree: {
71
+ margin: 0,
72
+ backgroundColor: backgroundColors.primaryLight,
73
+ },
74
+ arrowContainer: {
75
+ paddingRight: 6,
76
+ },
77
+ arrow: {
78
+ fontSize: 10,
79
+ ...(!focused && { display: 'none' }),
80
+ },
81
+ }, hideRoot: true, shouldExpandNodeInitially: expandNodeInitially, getItemString: getItemString, labelRenderer: labelRenderer, valueRenderer: valueRenderer, isCustomNode: isCustomNode, data: data })) })] }));
82
+ };
83
+ 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) => {
@@ -0,0 +1,8 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ import { PaginationProps } from '@mui/material';
3
+ export type PaginationControlsProps = PaginationProps & {
4
+ goToInputId?: string;
5
+ containerStyle?: CSSProperties;
6
+ };
7
+ declare const PaginationControls: FC<PaginationControlsProps>;
8
+ export default PaginationControls;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack } from '@mui/material';
3
+ import { GoToInputContainer, GoToInputStyled, PaginationContainerStyled, PaginationStyled } from '../../../../styles';
4
+ import { Localization } from '@sphereon/ui-components.core';
5
+ const PaginationControls = (props) => {
6
+ const { onKeyDown, containerStyle, goToInputId = 'goTo' } = props;
7
+ return (_jsxs(PaginationContainerStyled, { style: containerStyle, children: [_jsx(Stack, { children: _jsx(PaginationStyled, { ...props }) }), _jsxs(GoToInputContainer, { children: [Localization.translate('table_pagination_input_caption_go_to'), _jsx(GoToInputStyled, { id: goToInputId, onKeyDown: onKeyDown }), Localization.translate('table_pagination_input_caption_page')] })] }));
8
+ };
9
+ export default PaginationControls;
@@ -4,6 +4,7 @@ type Props = {
4
4
  enableFiltering?: boolean;
5
5
  enableMostRecent?: boolean;
6
6
  actions?: Array<Button>;
7
+ onDelete?: () => Promise<void>;
7
8
  };
8
9
  declare const SSITableViewHeader: React.FC<Props>;
9
10
  export default SSITableViewHeader;
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ButtonIcon, Localization } from '@sphereon/ui-components.core';
3
- import SSIIconButton from '../../../buttons/SSIIconButton';
4
- import SSIDropDownList from '../../../lists/SSIDropDownList';
5
- import SSIPrimaryButton from '../../../buttons/SSIPrimaryButton';
6
- import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, SSITableViewHeaderShowOptionContainerStyled as ShowOptionContainer, } from '../../../../styles';
2
+ import { ButtonIcon, Localization, statusColors } from '@sphereon/ui-components.core';
3
+ import IconButton from '../../../buttons/IconButton';
4
+ import PrimaryButton from '../../../buttons/PrimaryButton';
5
+ import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, TableViewHeaderStaticActionsContainerStyled as StaticActionsContainer, } from '../../../../styles';
7
6
  const SSITableViewHeader = (props) => {
8
- const { enableFiltering = false, enableMostRecent = false, actions = [] } = props;
9
- return (_jsx(Container, { children: _jsx(ContentContainer, { children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(SSIIconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), enableMostRecent && (_jsx(ShowOptionContainer, { children: _jsx(SSIDropDownList, { label: Localization.translate('action_show_caption'), initialValue: 'Most recent' }) })), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) }) }));
7
+ const { enableFiltering = false, enableMostRecent = false, actions = [], onDelete } = props;
8
+ const onDeleteClick = async () => {
9
+ await onDelete?.();
10
+ };
11
+ return (_jsxs(Container, { children: [_jsx(StaticActionsContainer, { children: onDelete && (_jsx(IconButton, { caption: Localization.translate('action_delete_label'), icon: ButtonIcon.DELETE, iconColor: statusColors.error, onClick: onDeleteClick })) }), _jsx(ContentContainer, { style: { width: 'fit-content' }, children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(IconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(PrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) })] }));
10
12
  };
11
13
  export default SSITableViewHeader;