@sphereon/ui-components.ssi-react 0.1.3-unstable.15 → 0.1.3-unstable.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@config/toasts/index.d.ts +7 -0
- package/dist/@config/toasts/index.js +13 -0
- package/dist/components/assets/badges/SSICheckmarkBadge/index.js +1 -1
- package/dist/components/assets/badges/SSIExclamationMarkBadge/index.js +1 -1
- package/dist/components/assets/icons/CrossIcon/index.d.ts +8 -0
- package/dist/components/assets/icons/CrossIcon/index.js +7 -0
- package/dist/components/assets/icons/DeleteIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/DeleteIcon/index.js +7 -0
- package/dist/components/assets/icons/DocumentIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/DocumentIcon/index.js +7 -0
- package/dist/components/assets/icons/ImageIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/ImageIcon/index.js +7 -0
- package/dist/components/assets/icons/MeatBallsIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/MeatBallsIcon/index.js +7 -0
- package/dist/components/assets/icons/SSIAddIcon/index.d.ts +3 -3
- package/dist/components/assets/icons/SSIAddIcon/index.js +1 -1
- package/dist/components/assets/icons/SSIArrowDownIcon/index.d.ts +3 -3
- package/dist/components/assets/icons/SSIArrowDownIcon/index.js +1 -1
- package/dist/components/assets/icons/SSIFilterIcon/index.d.ts +3 -3
- package/dist/components/assets/icons/SSIFilterIcon/index.js +1 -1
- package/dist/components/assets/icons/SSIProfileIcon/index.d.ts +1 -1
- package/dist/components/assets/icons/SSIProfileIcon/index.js +1 -2
- package/dist/components/assets/markers/StepMarker/index.d.ts +8 -0
- package/dist/components/assets/markers/StepMarker/index.js +26 -0
- package/dist/components/assets/placeholders/PersonPlaceholder/index.d.ts +9 -0
- package/dist/components/assets/placeholders/PersonPlaceholder/index.js +7 -0
- package/dist/components/buttons/SSIIconButton/index.d.ts +7 -6
- package/dist/components/buttons/SSIIconButton/index.js +15 -10
- package/dist/components/buttons/SSIPrimaryButton/index.d.ts +3 -3
- package/dist/components/buttons/SSIPrimaryButton/index.js +6 -7
- package/dist/components/buttons/SSISecondaryButton/index.d.ts +3 -3
- package/dist/components/buttons/SSISecondaryButton/index.js +7 -7
- package/dist/components/fields/ComboBox/index.d.ts +21 -0
- package/dist/components/fields/ComboBox/index.js +52 -0
- package/dist/components/fields/DragAndDropBox/index.d.ts +8 -0
- package/dist/components/fields/DragAndDropBox/index.js +30 -0
- package/dist/components/fields/FileSelection/index.d.ts +12 -0
- package/dist/components/fields/FileSelection/index.js +33 -0
- package/dist/components/fields/JSONForms/PassportPhotoControl/index.d.ts +5 -0
- package/dist/components/fields/JSONForms/PassportPhotoControl/index.js +37 -0
- package/dist/components/fields/SSICheckbox/index.d.ts +15 -0
- package/dist/components/fields/SSICheckbox/index.js +21 -0
- package/dist/components/fields/SSIHoverText/index.d.ts +8 -0
- package/dist/components/fields/SSIHoverText/index.js +8 -0
- package/dist/components/indicators/ProgressStepIndicator/index.d.ts +9 -0
- package/dist/components/indicators/ProgressStepIndicator/index.js +51 -0
- package/dist/components/indicators/SSIActivityIndicator/index.d.ts +10 -0
- package/dist/components/indicators/SSIActivityIndicator/index.js +8 -0
- package/dist/components/labels/SSIStatusLabel/index.d.ts +1 -1
- package/dist/components/labels/SSIStatusLabel/index.js +1 -1
- package/dist/components/labels/SSITypeLabel/index.d.ts +3 -3
- package/dist/components/labels/SSITypeLabel/index.js +5 -5
- package/dist/components/lists/DropDownList/index.d.ts +10 -0
- package/dist/components/lists/DropDownList/index.js +34 -0
- package/dist/components/lists/DropDownListItem/index.d.ts +13 -0
- package/dist/components/lists/DropDownListItem/index.js +23 -0
- package/dist/components/messageBoxes/toasts/SSIToast/index.d.ts +11 -0
- package/dist/components/messageBoxes/toasts/SSIToast/index.js +20 -0
- package/dist/components/messageBoxes/toasts/SSIToastContainer/index.d.ts +10 -0
- package/dist/components/messageBoxes/toasts/SSIToastContainer/index.js +7 -0
- package/dist/components/views/CredentialIssuanceWizardView/index.d.ts +10 -0
- package/dist/components/views/CredentialIssuanceWizardView/index.js +43 -0
- package/dist/components/views/CredentialIssuanceWizardView/styles.css +87 -0
- package/dist/components/views/{SSICredentialMiniCardView → CredentialMiniCardView}/index.d.ts +3 -3
- package/dist/components/views/{SSICredentialMiniCardView → CredentialMiniCardView}/index.js +4 -5
- package/dist/components/views/CredentialViewItem/index.d.ts +13 -0
- package/dist/components/views/CredentialViewItem/index.js +15 -0
- package/dist/components/views/SSICredentialCardView/index.js +3 -4
- package/dist/components/views/SSITabView/SSITabViewHeader/index.d.ts +2 -2
- package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
- package/dist/components/views/SSITabView/index.d.ts +2 -2
- package/dist/components/views/SSITabView/index.js +1 -1
- package/dist/components/views/SSITableView/PaginationControls/index.d.ts +8 -0
- package/dist/components/views/SSITableView/PaginationControls/index.js +9 -0
- package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +2 -1
- package/dist/components/views/SSITableView/SSITableViewHeader/index.js +7 -7
- package/dist/components/views/SSITableView/index.d.ts +5 -1
- package/dist/components/views/SSITableView/index.js +88 -26
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/toastHelper.d.ts +3 -0
- package/dist/helpers/toastHelper.js +14 -0
- package/dist/index.d.ts +26 -4
- package/dist/index.js +24 -4
- package/dist/renders/jsonFormsRenders.d.ts +2 -0
- package/dist/renders/jsonFormsRenders.js +6 -0
- package/dist/styles/colors.d.ts +3 -0
- package/dist/styles/colors.js +5 -0
- package/dist/styles/components/components/CredentialIssuanceWizardView/index.d.ts +9 -0
- package/dist/styles/components/components/CredentialIssuanceWizardView/index.js +55 -0
- package/dist/styles/components/components/CredentialViewItem/index.d.ts +4 -0
- package/dist/styles/components/components/CredentialViewItem/index.js +22 -0
- package/dist/styles/components/components/DragAndDropBox/index.d.ts +4 -0
- package/dist/styles/components/components/DragAndDropBox/index.js +25 -0
- package/dist/styles/components/components/DropDownList/index.d.ts +3 -0
- package/dist/styles/components/components/DropDownList/index.js +21 -0
- package/dist/styles/components/components/DropDownListItem/index.d.ts +3 -0
- package/dist/styles/components/components/DropDownListItem/index.js +21 -0
- package/dist/styles/components/components/FileSelectionField/index.d.ts +10 -0
- package/dist/styles/components/components/FileSelectionField/index.js +64 -0
- package/dist/styles/components/components/Pagination/index.d.ts +5 -0
- package/dist/styles/components/components/Pagination/index.js +71 -0
- package/dist/styles/components/components/PassportPhotoControl/index.d.ts +4 -0
- package/dist/styles/components/components/PassportPhotoControl/index.js +27 -0
- package/dist/styles/components/components/ProgressStepIndicator/index.d.ts +8 -0
- package/dist/styles/components/components/ProgressStepIndicator/index.js +49 -0
- package/dist/styles/components/components/SSICheckbox/index.d.ts +4 -0
- package/dist/styles/components/components/SSICheckbox/index.js +25 -0
- package/dist/styles/components/components/SSICredentialCardView/index.d.ts +2 -2
- package/dist/styles/components/components/SSICredentialCardView/index.js +1 -1
- package/dist/styles/components/components/SSIHoverText/index.d.ts +3 -0
- package/dist/styles/components/components/{SSIText → SSIHoverText}/index.js +5 -5
- package/dist/styles/components/components/SSIIconButton/index.js +4 -2
- package/dist/styles/components/components/SSIPrimaryButton/index.js +1 -1
- package/dist/styles/components/components/SSISecondaryButton/index.d.ts +1 -1
- package/dist/styles/components/components/SSISecondaryButton/index.js +5 -10
- package/dist/styles/components/components/SSIStatusLabel/index.d.ts +1 -1
- package/dist/styles/components/components/SSIStatusLabel/index.js +3 -1
- package/dist/styles/components/components/SSITabView/index.js +1 -1
- package/dist/styles/components/components/SSITableView/index.d.ts +5 -1
- package/dist/styles/components/components/SSITableView/index.js +25 -3
- package/dist/styles/components/components/SSITableViewHeader/index.d.ts +1 -0
- package/dist/styles/components/components/SSITableViewHeader/index.js +8 -0
- package/dist/styles/components/components/SSIToast/index.d.ts +4 -0
- package/dist/styles/components/components/SSIToast/index.js +24 -0
- package/dist/styles/components/components/SSIToastContainer/index.d.ts +2 -0
- package/dist/styles/components/components/SSIToastContainer/index.js +314 -0
- package/dist/styles/components/components/StepMarker/index.d.ts +4 -0
- package/dist/styles/components/components/StepMarker/index.js +39 -0
- package/dist/styles/components/components/buttons/index.d.ts +1 -0
- package/dist/styles/components/components/buttons/index.js +4 -0
- package/dist/styles/components/components/index.d.ts +16 -1
- package/dist/styles/components/components/index.js +16 -1
- package/dist/styles/components/index.d.ts +0 -1
- package/dist/styles/components/index.js +0 -1
- package/dist/styles/css/index.d.ts +4 -0
- package/dist/styles/css/index.js +28 -0
- package/dist/styles/fonts/index.d.ts +16 -0
- package/dist/styles/fonts/index.js +61 -0
- package/dist/styles/index.d.ts +4 -0
- package/dist/styles/index.js +4 -0
- package/dist/styles/typography.js +12 -0
- package/dist/types/button/index.d.ts +8 -0
- package/dist/types/button/index.js +1 -0
- package/dist/types/field/index.d.ts +21 -0
- package/dist/types/field/index.js +10 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/index.js +6 -1
- package/dist/types/indicator/index.d.ts +9 -0
- package/dist/types/indicator/index.js +6 -0
- package/dist/types/table/index.d.ts +41 -0
- package/dist/types/table/index.js +10 -0
- package/dist/types/toast/index.d.ts +6 -0
- package/dist/types/toast/index.js +1 -0
- package/dist/types/view/index.d.ts +13 -0
- package/dist/types/view/index.js +1 -0
- package/dist/utils/FileUtils.d.ts +1 -0
- package/dist/utils/FileUtils.js +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +23 -5
- package/dist/components/labels/SSIText/index.d.ts +0 -7
- package/dist/components/labels/SSIText/index.js +0 -13
- package/dist/components/lists/SSIDropDownList/index.d.ts +0 -7
- package/dist/components/lists/SSIDropDownList/index.js +0 -11
- package/dist/styles/components/components/SSIDropDownList/index.d.ts +0 -2
- package/dist/styles/components/components/SSIDropDownList/index.js +0 -15
- package/dist/styles/components/components/SSIText/index.d.ts +0 -3
- package/dist/styles/components/fonts/index.d.ts +0 -12
- package/dist/styles/components/fonts/index.js +0 -39
- package/dist/types/component/index.d.ts +0 -38
- package/dist/types/component/index.js +0 -16
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { backgroundColors, credentialCardColors, Localization, toLocalDateString } from '@sphereon/ui-components.core';
|
|
2
|
+
import { backgroundColors, credentialCardColors, Localization, toLocalDateString, } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSILogo from '../../assets/logos/SSILogo';
|
|
4
4
|
import SSIStatusLabel from '../../labels/SSIStatusLabel';
|
|
5
|
-
import { SSIAlphaContainerStyled as AlphaContainer, SSICredentialCardViewContainerStyled as Container, SSICredentialCardViewBackgroundImageStyled as BackgroundImage, SSICredentialCardViewContentMainContainerStyled as ContentMainContainer, SSICredentialCardViewContentSubContainerStyled as ContentSubContainer, SSICredentialCardViewStatusContainerStyled as StatusContainer, SSICredentialCardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICredentialCardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICredentialCardViewFooterContainerStyled as FooterContainer, SSITextH4LightStyled as H4Text, SSICredentialCardViewHeaderContainerStyled as HeaderContainer, SSICredentialCardViewContentIssueNameContainerStyled as IssueNameContainer, SSICredentialCardViewHeaderLogoContainerStyled as LogoContainer, SSICredentialCardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICredentialCardViewHeaderTitleContainerStyled as TitleContainer, SSIFlexDirectionColumnViewStyled as PropertyContainer, } from '../../../styles
|
|
5
|
+
import { SSIAlphaContainerStyled as AlphaContainer, SSICredentialCardViewContainerStyled as Container, SSICredentialCardViewBackgroundImageStyled as BackgroundImage, SSICredentialCardViewContentMainContainerStyled as ContentMainContainer, SSICredentialCardViewContentSubContainerStyled as ContentSubContainer, SSICredentialCardViewStatusContainerStyled as StatusContainer, SSICredentialCardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICredentialCardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICredentialCardViewFooterContainerStyled as FooterContainer, SSITextH4LightStyled as H4Text, SSICredentialCardViewHeaderContainerStyled as HeaderContainer, SSICredentialCardViewContentIssueNameContainerStyled as IssueNameContainer, SSICredentialCardViewHeaderLogoContainerStyled as LogoContainer, SSICredentialCardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICredentialCardViewHeaderTitleContainerStyled as TitleContainer, SSIFlexDirectionColumnViewStyled as PropertyContainer, } from '../../../styles';
|
|
6
6
|
const SSICredentialCardView = (props) => {
|
|
7
7
|
const { header, body, footer } = props;
|
|
8
8
|
const { credentialTitle, credentialSubtitle, logo } = props.header ?? {};
|
|
@@ -17,8 +17,7 @@ const SSICredentialCardView = (props) => {
|
|
|
17
17
|
};
|
|
18
18
|
return (_jsx(Container, { style: { backgroundColor }, children: _jsx(BackgroundImage, { style: {
|
|
19
19
|
...(backgroundImage?.uri && { background: `url(${backgroundImage.uri})`, backgroundSize: 'cover' }),
|
|
20
|
-
}, children: _jsxs(AlphaContainer, { children: [header && (_jsxs(HeaderContainer, { children: [(!backgroundImage || logo) &&
|
|
21
|
-
_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) }), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, { style: { color: textColor }, children: credentialTitle }), credentialSubtitle && _jsx(CredentialSubtitleText, { style: { color: textColor }, children: credentialSubtitle })] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, { style: { color: textColor }, children: issuerName }) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [_jsx(ExpirationDateText, { style: { color: textColor }, children: expirationDate
|
|
20
|
+
}, children: _jsxs(AlphaContainer, { children: [header && (_jsxs(HeaderContainer, { children: [(!backgroundImage || logo) && (_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) })), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, { style: { color: textColor }, children: credentialTitle }), credentialSubtitle && _jsx(CredentialSubtitleText, { style: { color: textColor }, children: credentialSubtitle })] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, { style: { color: textColor }, children: issuerName }) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [_jsx(ExpirationDateText, { style: { color: textColor }, children: expirationDate
|
|
22
21
|
? `${Localization.translate('credential_card_expires_message')} ${toLocalDateString(expirationDate)}`
|
|
23
22
|
: Localization.translate('credential_status_never_expires_date_label') }), credentialStatus && (_jsx(StatusContainer, { children: credentialStatus && _jsx(SSIStatusLabel, { status: credentialStatus, color: textColor }) }))] }))] }) }) }));
|
|
24
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabNavigationState } from '
|
|
3
|
-
|
|
2
|
+
import { TabNavigationState } from '@sphereon/ui-components.core';
|
|
3
|
+
type Props = {
|
|
4
4
|
navigationState: TabNavigationState;
|
|
5
5
|
onIndexChange: (index: number) => void;
|
|
6
6
|
};
|
|
@@ -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, SSITextH3Styled 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) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import SSITabViewHeader from './SSITabViewHeader';
|
|
4
|
-
import { SSITabViewContainerStyled as Container } from '../../../styles
|
|
4
|
+
import { SSITabViewContainerStyled as Container } from '../../../styles';
|
|
5
5
|
const Tab = (props) => {
|
|
6
6
|
return _jsx(React.Fragment, { children: props.children });
|
|
7
7
|
};
|
|
@@ -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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '../../../../types';
|
|
3
|
-
|
|
3
|
+
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,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Localization } from '@sphereon/ui-components.core';
|
|
2
|
+
import { ButtonIcon, Localization, statusColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSIIconButton from '../../../buttons/SSIIconButton';
|
|
4
|
-
import { ButtonIconsEnum } from '../../../../types';
|
|
5
|
-
import SSIDropDownList from '../../../lists/SSIDropDownList';
|
|
6
4
|
import SSIPrimaryButton from '../../../buttons/SSIPrimaryButton';
|
|
7
|
-
import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer,
|
|
5
|
+
import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, TableViewHeaderStaticActionsContainerStyled as StaticActionsContainer, } from '../../../../styles';
|
|
8
6
|
const SSITableViewHeader = (props) => {
|
|
9
|
-
const { enableFiltering = false, enableMostRecent = false, actions = [] } = props;
|
|
10
|
-
|
|
11
|
-
|
|
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(SSIIconButton, { 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(SSIIconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) })] }));
|
|
12
12
|
};
|
|
13
13
|
export default SSITableViewHeader;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ColumnResizeMode, Row } from '@tanstack/react-table';
|
|
3
3
|
import { Button, ColumnHeader } from '../../../types';
|
|
4
|
-
|
|
4
|
+
import { PaginationControlsProps } from './PaginationControls';
|
|
5
|
+
type Props<T> = {
|
|
5
6
|
data: Array<T>;
|
|
6
7
|
columns: Array<ColumnHeader<T>>;
|
|
7
8
|
onRowClick?: (data: Row<T>) => Promise<void>;
|
|
9
|
+
onDelete?: (rows: Array<T>) => Promise<void>;
|
|
8
10
|
enableRowSelection?: boolean;
|
|
11
|
+
enableRowHover?: boolean;
|
|
9
12
|
enableFiltering?: boolean;
|
|
10
13
|
enableMostRecent?: boolean;
|
|
11
14
|
enableResultCount?: boolean;
|
|
12
15
|
columnResizeMode?: ColumnResizeMode;
|
|
13
16
|
actions?: Array<Button>;
|
|
17
|
+
pagination?: PaginationControlsProps;
|
|
14
18
|
};
|
|
15
19
|
declare const SSITableView: <T extends {}>(props: Props<T>) => ReactElement;
|
|
16
20
|
export default SSITableView;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { createColumnHelper, flexRender, getCoreRowModel, useReactTable, } from '@tanstack/react-table';
|
|
4
|
-
import { Localization } from '@sphereon/ui-components.core';
|
|
5
|
-
import { TableCellTypeEnum } from '../../../types';
|
|
4
|
+
import { ButtonIcon, Localization, selectionElementColors } from '@sphereon/ui-components.core';
|
|
6
5
|
import SSITableViewHeader from './SSITableViewHeader';
|
|
7
6
|
import SSITypeLabel from '../../labels/SSITypeLabel';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import SSIHoverText from '../../fields/SSIHoverText';
|
|
8
|
+
import SSIStatusLabel from '../../labels/SSIStatusLabel';
|
|
9
|
+
import CredentialMiniCardView from '../CredentialMiniCardView';
|
|
10
|
+
import DropDownList from '../../lists/DropDownList';
|
|
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
|
+
import { TableCellType } from '../../../types';
|
|
13
|
+
import PaginationControls from './PaginationControls';
|
|
14
|
+
import ComboBox from "../../fields/ComboBox";
|
|
15
|
+
import CredentialDetailsView from "../CredentialViewItem";
|
|
10
16
|
function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
|
|
11
17
|
const ref = React.useRef(null);
|
|
12
18
|
React.useEffect(() => {
|
|
@@ -16,26 +22,59 @@ function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
|
|
|
16
22
|
}, [ref, indeterminate]);
|
|
17
23
|
return _jsx("input", { type: "checkbox", ref: ref, className: className + ' cursor-pointer', ...rest });
|
|
18
24
|
}
|
|
19
|
-
const getCellFormatting = (type, value,
|
|
25
|
+
const getCellFormatting = (type, value, row, options) => {
|
|
20
26
|
switch (type) {
|
|
21
|
-
case
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
case TableCellType.TEXT:
|
|
28
|
+
const { truncationLength, enableHover = false } = options ?? {};
|
|
29
|
+
return _jsx(SSIHoverText, { text: value, truncationLength: truncationLength, enableHover: enableHover });
|
|
30
|
+
case TableCellType.LABEL: {
|
|
24
31
|
const labels = Array.isArray(value) ? value.map((label) => _jsx(SSITypeLabel, { type: label })) : _jsx(SSITypeLabel, { type: value });
|
|
25
32
|
return _jsx(LabelCell, { children: labels });
|
|
26
33
|
}
|
|
34
|
+
case TableCellType.STATUS: {
|
|
35
|
+
return _jsx(SSIStatusLabel, { status: value });
|
|
36
|
+
}
|
|
37
|
+
case TableCellType.CREDENTIAL_CARD: {
|
|
38
|
+
return _jsx(CredentialMiniCardView, { ...value });
|
|
39
|
+
}
|
|
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) => ({
|
|
46
|
+
...action,
|
|
47
|
+
onClick: () => action.onClick(row),
|
|
48
|
+
}));
|
|
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 });
|
|
54
|
+
}
|
|
27
55
|
default:
|
|
28
56
|
return _jsx("div", {});
|
|
29
57
|
}
|
|
30
58
|
};
|
|
59
|
+
const toRowSelectionObject = (rows) => {
|
|
60
|
+
const rowSelectionObject = {};
|
|
61
|
+
rows.forEach((row) => {
|
|
62
|
+
rowSelectionObject[row.rowId] = true;
|
|
63
|
+
});
|
|
64
|
+
return rowSelectionObject;
|
|
65
|
+
};
|
|
31
66
|
const SSITableView = (props) => {
|
|
32
|
-
const { columns, data, enableRowSelection = false, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick } = props;
|
|
33
|
-
const [rowSelection, setRowSelection] = React.useState(
|
|
67
|
+
const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onDelete, pagination, } = props;
|
|
68
|
+
const [rowSelection, setRowSelection] = React.useState([]);
|
|
69
|
+
const [focusedRowId, setFocusedRowId] = React.useState();
|
|
34
70
|
const columnHelper = createColumnHelper();
|
|
35
71
|
let availableColumns = columns.map((header) => columnHelper.accessor(header.accessor, {
|
|
36
72
|
id: header.accessor,
|
|
37
73
|
header: header.label,
|
|
38
|
-
cell: (info) => getCellFormatting(header.type, info.getValue(), header.
|
|
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,
|
|
39
78
|
}));
|
|
40
79
|
if (enableRowSelection) {
|
|
41
80
|
availableColumns = [
|
|
@@ -46,41 +85,64 @@ const SSITableView = (props) => {
|
|
|
46
85
|
indeterminate: table.getIsSomeRowsSelected(),
|
|
47
86
|
onChange: table.getToggleAllRowsSelectedHandler(),
|
|
48
87
|
} })),
|
|
49
|
-
cell: ({ row }) => (_jsx(
|
|
88
|
+
cell: ({ row }) => (_jsx(RowSelectionCheckboxContainer, { children: (row.id === focusedRowId || rowSelection.length > 0) && (_jsx(IndeterminateCheckbox, { ...{
|
|
50
89
|
checked: row.getIsSelected(),
|
|
51
90
|
disabled: !row.getCanSelect(),
|
|
52
91
|
indeterminate: row.getIsSomeSelected(),
|
|
53
92
|
onChange: row.getToggleSelectedHandler(),
|
|
54
|
-
} }) })),
|
|
93
|
+
} })) })),
|
|
55
94
|
},
|
|
56
95
|
...availableColumns,
|
|
57
96
|
];
|
|
58
97
|
}
|
|
98
|
+
const onFocusRow = (rowId) => {
|
|
99
|
+
setFocusedRowId(rowId);
|
|
100
|
+
};
|
|
101
|
+
const onRowSelectionChange = (updatedRowSelection) => {
|
|
102
|
+
const currentRowSelection = updatedRowSelection(toRowSelectionObject(rowSelection));
|
|
103
|
+
const selection = Object.keys(currentRowSelection).map((key) => {
|
|
104
|
+
return {
|
|
105
|
+
rowId: key,
|
|
106
|
+
rowData: data[Number(key)],
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
setRowSelection(selection);
|
|
110
|
+
};
|
|
59
111
|
const table = useReactTable({
|
|
112
|
+
defaultColumn: {
|
|
113
|
+
size: 0,
|
|
114
|
+
},
|
|
60
115
|
state: {
|
|
61
|
-
rowSelection,
|
|
116
|
+
rowSelection: toRowSelectionObject(rowSelection),
|
|
62
117
|
},
|
|
63
118
|
enableRowSelection,
|
|
64
|
-
onRowSelectionChange:
|
|
119
|
+
onRowSelectionChange: onRowSelectionChange,
|
|
65
120
|
data,
|
|
66
121
|
columns: availableColumns,
|
|
67
122
|
columnResizeMode,
|
|
68
123
|
getCoreRowModel: getCoreRowModel(),
|
|
69
124
|
});
|
|
70
125
|
const onRowClicked = async (row) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
126
|
+
await onRowClick?.(row);
|
|
127
|
+
};
|
|
128
|
+
const onDeleteClicked = async () => {
|
|
129
|
+
await onDelete?.(rowSelection.map((row) => row.rowData));
|
|
74
130
|
};
|
|
75
|
-
return (
|
|
76
|
-
_jsx(ResultCountCaption, { children: Localization.translate('result_count_label', {
|
|
131
|
+
return (_jsxs(Container, { children: [_jsxs("div", { className: "overflow-x-auto", children: [enableResultCount && (_jsx(ResultCountCaption, { children: Localization.translate('result_count_label', {
|
|
77
132
|
count: data.length,
|
|
78
133
|
maxCount: data.length,
|
|
79
|
-
}) }), (enableFiltering || enableMostRecent || actions.length > 0) &&
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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: {
|
|
135
|
+
...(header.column.columnDef.minSize && { minWidth: header.column.columnDef.minSize }),
|
|
136
|
+
...(header.column.columnDef.maxSize && { maxWidth: header.column.columnDef.maxSize }),
|
|
137
|
+
...(header.column.columnDef.size !== 0 && { width: header.column.columnDef.size }),
|
|
138
|
+
}, children: [header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), _jsx("div", { className: `resizer ${header.column.getIsResizing() ? 'isResizing' : ''}`, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
|
|
139
|
+
transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
|
|
140
|
+
? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
|
|
141
|
+
: '',
|
|
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: {
|
|
143
|
+
...(cell.column.columnDef.minSize && { minWidth: cell.column.columnDef.minSize }),
|
|
144
|
+
...(cell.column.columnDef.maxSize && { maxWidth: cell.column.columnDef.maxSize }),
|
|
145
|
+
...(cell.column.columnDef.size !== 0 && { width: cell.column.columnDef.size }),
|
|
146
|
+
}, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id))) })] })] }), pagination && _jsx(PaginationControls, { ...pagination })] }));
|
|
85
147
|
};
|
|
86
148
|
export default SSITableView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toastHelper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toastHelper';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { toast } from 'react-toastify';
|
|
2
|
+
import { toastConfig } from '../@config/toasts';
|
|
3
|
+
export const showToast = async (type, params) => {
|
|
4
|
+
const { title, message, onClick, props } = params;
|
|
5
|
+
if (!toastConfig.hasOwnProperty(type)) {
|
|
6
|
+
return Promise.reject('Unknown toast type');
|
|
7
|
+
}
|
|
8
|
+
toast(toastConfig[type]({
|
|
9
|
+
title,
|
|
10
|
+
message,
|
|
11
|
+
onClick,
|
|
12
|
+
props,
|
|
13
|
+
}));
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import SSIToastContainer from './components/messageBoxes/toasts/SSIToastContainer';
|
|
1
2
|
import SSIStatusLabel from './components/labels/SSIStatusLabel';
|
|
2
3
|
import SSICredentialCardView from './components/views/SSICredentialCardView';
|
|
3
|
-
import
|
|
4
|
+
import CredentialMiniCardView from './components/views/CredentialMiniCardView';
|
|
5
|
+
import { CredentialMiniCardViewProps } from './components/views/CredentialMiniCardView';
|
|
4
6
|
import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
|
|
5
7
|
import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
|
|
6
8
|
import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
|
|
@@ -11,13 +13,33 @@ import SSIArrowDownIcon from './components/assets/icons/SSIArrowDownIcon';
|
|
|
11
13
|
import SSITypeLabel from './components/labels/SSITypeLabel';
|
|
12
14
|
import SSIIconButton from './components/buttons/SSIIconButton';
|
|
13
15
|
import SSIPrimaryButton from './components/buttons/SSIPrimaryButton';
|
|
14
|
-
import
|
|
16
|
+
import DropDownList from './components/lists/DropDownList';
|
|
15
17
|
import SSITableView from './components/views/SSITableView';
|
|
16
18
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
17
19
|
import SSITabView from './components/views/SSITabView';
|
|
18
20
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
19
21
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
20
22
|
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
23
|
+
import SSICheckbox from './components/fields/SSICheckbox';
|
|
24
|
+
import SSIActivityIndicator from './components/indicators/SSIActivityIndicator';
|
|
25
|
+
import SSIHoverText from './components/fields/SSIHoverText';
|
|
26
|
+
import ProgressStepIndicator from './components/indicators/ProgressStepIndicator';
|
|
27
|
+
import StepMarker from './components/assets/markers/StepMarker';
|
|
28
|
+
import DocumentIcon from './components/assets/icons/DocumentIcon';
|
|
29
|
+
import CrossIcon from './components/assets/icons/CrossIcon';
|
|
30
|
+
import ImageIcon from './components/assets/icons/ImageIcon';
|
|
31
|
+
import FileSelection from './components/fields/FileSelection';
|
|
32
|
+
import ComboBox from './components/fields/ComboBox';
|
|
33
|
+
import DragAndDropBox from './components/fields/DragAndDropBox';
|
|
34
|
+
import PersonPlaceholder from './components/assets/placeholders/PersonPlaceholder';
|
|
35
|
+
import PassportPhotoControl, { passportPhotoControlTester } from './components/fields/JSONForms/PassportPhotoControl';
|
|
36
|
+
import CredentialIssuanceWizardView from './components/views/CredentialIssuanceWizardView';
|
|
37
|
+
import PaginationControls from './components/views/SSITableView/PaginationControls';
|
|
38
|
+
import PaginationControlsProps from './components/views/SSITableView/PaginationControls';
|
|
39
|
+
import CredentialViewItem from './components/views/CredentialViewItem';
|
|
40
|
+
import { Row } from '@tanstack/react-table';
|
|
41
|
+
export * from './styles/fonts';
|
|
21
42
|
export * from './types';
|
|
22
|
-
export * from './
|
|
23
|
-
export
|
|
43
|
+
export * from './helpers';
|
|
44
|
+
export * from './utils';
|
|
45
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import SSIToastContainer from './components/messageBoxes/toasts/SSIToastContainer';
|
|
1
2
|
import SSIStatusLabel from './components/labels/SSIStatusLabel';
|
|
2
3
|
import SSICredentialCardView from './components/views/SSICredentialCardView';
|
|
3
|
-
import
|
|
4
|
+
import CredentialMiniCardView from './components/views/CredentialMiniCardView';
|
|
4
5
|
import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
|
|
5
6
|
import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
|
|
6
7
|
import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
|
|
@@ -11,13 +12,32 @@ import SSIArrowDownIcon from './components/assets/icons/SSIArrowDownIcon';
|
|
|
11
12
|
import SSITypeLabel from './components/labels/SSITypeLabel';
|
|
12
13
|
import SSIIconButton from './components/buttons/SSIIconButton';
|
|
13
14
|
import SSIPrimaryButton from './components/buttons/SSIPrimaryButton';
|
|
14
|
-
import
|
|
15
|
+
import DropDownList from './components/lists/DropDownList';
|
|
15
16
|
import SSITableView from './components/views/SSITableView';
|
|
16
17
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
17
18
|
import SSITabView from './components/views/SSITabView';
|
|
18
19
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
19
20
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
20
21
|
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
22
|
+
import SSICheckbox from './components/fields/SSICheckbox';
|
|
23
|
+
import SSIActivityIndicator from './components/indicators/SSIActivityIndicator';
|
|
24
|
+
import SSIHoverText from './components/fields/SSIHoverText';
|
|
25
|
+
import ProgressStepIndicator from './components/indicators/ProgressStepIndicator';
|
|
26
|
+
import StepMarker from './components/assets/markers/StepMarker';
|
|
27
|
+
import DocumentIcon from './components/assets/icons/DocumentIcon';
|
|
28
|
+
import CrossIcon from './components/assets/icons/CrossIcon';
|
|
29
|
+
import ImageIcon from './components/assets/icons/ImageIcon';
|
|
30
|
+
import FileSelection from './components/fields/FileSelection';
|
|
31
|
+
import ComboBox from './components/fields/ComboBox';
|
|
32
|
+
import DragAndDropBox from './components/fields/DragAndDropBox';
|
|
33
|
+
import PersonPlaceholder from './components/assets/placeholders/PersonPlaceholder';
|
|
34
|
+
import PassportPhotoControl, { passportPhotoControlTester } from './components/fields/JSONForms/PassportPhotoControl';
|
|
35
|
+
import CredentialIssuanceWizardView from './components/views/CredentialIssuanceWizardView';
|
|
36
|
+
import PaginationControls from './components/views/SSITableView/PaginationControls';
|
|
37
|
+
import PaginationControlsProps from './components/views/SSITableView/PaginationControls';
|
|
38
|
+
import CredentialViewItem from './components/views/CredentialViewItem';
|
|
39
|
+
export * from './styles/fonts';
|
|
21
40
|
export * from './types';
|
|
22
|
-
export * from './
|
|
23
|
-
export
|
|
41
|
+
export * from './helpers';
|
|
42
|
+
export * from './utils';
|
|
43
|
+
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 };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { materialRenderers } from '@jsonforms/material-renderers';
|
|
2
|
+
import PassportPhotoControl, { passportPhotoControlTester } from '../components/fields/JSONForms/PassportPhotoControl';
|
|
3
|
+
export const jsonFormsMaterialRenderers = [
|
|
4
|
+
...materialRenderers,
|
|
5
|
+
{ tester: passportPhotoControlTester, renderer: PassportPhotoControl },
|
|
6
|
+
];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { gradientsColors } from '@sphereon/ui-components.core';
|
|
2
|
+
export const gradientColors = {
|
|
3
|
+
100: `linear-gradient(135deg, ${gradientsColors[100].primaryColor} 0%, ${gradientsColors[100].secondaryColor} 100%)`,
|
|
4
|
+
200: `linear-gradient(135deg, ${gradientsColors[200].primaryColor} 0%, ${gradientsColors[200].secondaryColor} 100%)`,
|
|
5
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CredentialIssuanceWizardViewContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const CredentialIssuanceWizardViewCredentialTypeContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const CredentialIssuanceWizardViewCredentialTypeTitleStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const CredentialIssuanceWizardViewFormContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const CredentialIssuanceWizardViewEvidenceContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const CredentialIssuanceWizardViewEvidenceContentContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const CredentialIssuanceWizardViewEvidenceTitleContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const CredentialIssuanceWizardViewEvidenceTitleOptionalStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const CredentialIssuanceWizardViewEvidenceFilesContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { backgroundColors, borderColors, SSIRoundedEdgesCss } from "@sphereon/ui-components.core";
|
|
3
|
+
import { SSITextH1SemiBoldStyled, SSITextH2Styled } from "../../../fonts";
|
|
4
|
+
export const CredentialIssuanceWizardViewContainerStyled = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 42px;
|
|
8
|
+
width: 560px;
|
|
9
|
+
height: fit-content;
|
|
10
|
+
`;
|
|
11
|
+
export const CredentialIssuanceWizardViewCredentialTypeContainerStyled = styled.div `
|
|
12
|
+
border: 1px solid ${borderColors.lightGrey};
|
|
13
|
+
${SSIRoundedEdgesCss};
|
|
14
|
+
background-color: ${backgroundColors.primaryLight};
|
|
15
|
+
padding: 24px;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 24px;
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
`;
|
|
21
|
+
export const CredentialIssuanceWizardViewCredentialTypeTitleStyled = styled(SSITextH1SemiBoldStyled) `
|
|
22
|
+
text-align: left;
|
|
23
|
+
`;
|
|
24
|
+
export const CredentialIssuanceWizardViewFormContainerStyled = styled.div `
|
|
25
|
+
flex-grow: 1;
|
|
26
|
+
border: 1px solid ${borderColors.lightGrey};
|
|
27
|
+
background-color: ${backgroundColors.primaryLight};
|
|
28
|
+
${SSIRoundedEdgesCss};
|
|
29
|
+
padding: 24px;
|
|
30
|
+
`;
|
|
31
|
+
export const CredentialIssuanceWizardViewEvidenceContainerStyled = styled.div `
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
border: 1px solid ${borderColors.lightGrey};
|
|
34
|
+
background-color: ${backgroundColors.primaryLight};
|
|
35
|
+
${SSIRoundedEdgesCss};
|
|
36
|
+
padding: 24px;
|
|
37
|
+
`;
|
|
38
|
+
export const CredentialIssuanceWizardViewEvidenceContentContainerStyled = styled.div `
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
gap: 24px;
|
|
42
|
+
`;
|
|
43
|
+
export const CredentialIssuanceWizardViewEvidenceTitleContainerStyled = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
gap: 4px;
|
|
47
|
+
`;
|
|
48
|
+
export const CredentialIssuanceWizardViewEvidenceTitleOptionalStyled = styled(SSITextH2Styled) `
|
|
49
|
+
font-style: italic;
|
|
50
|
+
`;
|
|
51
|
+
export const CredentialIssuanceWizardViewEvidenceFilesContainerStyled = styled.div `
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CredentialViewItemContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const CredentialViewItemTitleCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const CredentialViewItemStatusContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const CredentialViewItemExpirationDateCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { SSIFlexDirectionColumnViewStyled } from '../../containers';
|
|
3
|
+
import { SSITextH3Styled, SSITextH5Styled } from '../../../fonts';
|
|
4
|
+
export const CredentialViewItemContainerStyled = styled(SSIFlexDirectionColumnViewStyled) `
|
|
5
|
+
gap: 6px;
|
|
6
|
+
`;
|
|
7
|
+
export const CredentialViewItemTitleCaptionStyled = styled(SSITextH3Styled) `
|
|
8
|
+
display: -webkit-box;
|
|
9
|
+
-webkit-line-clamp: 2;
|
|
10
|
+
-webkit-box-orient: vertical;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
word-break: break-all;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
`;
|
|
15
|
+
export const CredentialViewItemStatusContainerStyled = styled.div `
|
|
16
|
+
margin-top: 3px;
|
|
17
|
+
margin-left: auto;
|
|
18
|
+
padding-left: 9px;
|
|
19
|
+
`;
|
|
20
|
+
export const CredentialViewItemExpirationDateCaptionStyled = styled(SSITextH5Styled) `
|
|
21
|
+
margin-left: auto;
|
|
22
|
+
`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const DragAndDropBoxContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const DragAndDropBoxHiddenInputStyled: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
3
|
+
export declare const DragAndDropBoxCaptionContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const DragAndDropBoxDescriptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { backgroundColors, borderColors, fontColors } from '@sphereon/ui-components.core';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { SSITextH7RegularStyled } from '../../../fonts';
|
|
4
|
+
export const DragAndDropBoxContainerStyled = styled.div `
|
|
5
|
+
background-color: ${backgroundColors.lightGrey};
|
|
6
|
+
flex-grow: 1;
|
|
7
|
+
height: 138px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
border: 1px dashed ${borderColors.lightGrey};
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
`;
|
|
15
|
+
export const DragAndDropBoxHiddenInputStyled = styled.input `
|
|
16
|
+
display: none;
|
|
17
|
+
`;
|
|
18
|
+
export const DragAndDropBoxCaptionContainerStyled = styled.div `
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
`;
|
|
23
|
+
export const DragAndDropBoxDescriptionStyled = styled(SSITextH7RegularStyled) `
|
|
24
|
+
color: ${fontColors.lightGrey};
|
|
25
|
+
`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const DropDownListContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const DropDownListButtonStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const DropDownContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|