@digigov/form 0.6.6 → 0.6.9
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/CHANGELOG.md +23 -1
- package/Field/index.js +24 -7
- package/Fieldset/index.js +1 -1
- package/es/Field/index.js +24 -7
- package/es/Fieldset/index.js +1 -1
- package/es/index.js +2 -2
- package/es/inputs/Checkboxes/index.js +12 -2
- package/es/inputs/DateInput/index.js +6 -3
- package/es/inputs/FileInput/index.js +10 -3
- package/es/inputs/Input/index.js +7 -2
- package/es/inputs/Radio/index.js +12 -3
- package/es/inputs/Select/index.js +10 -3
- package/es/validators.js +88 -4
- package/es/validators.spec.js +41 -2
- package/esm/Field/index.js +24 -7
- package/esm/Fieldset/index.js +1 -1
- package/esm/index.js +3 -3
- package/esm/inputs/Checkboxes/index.js +12 -2
- package/esm/inputs/DateInput/index.js +6 -3
- package/esm/inputs/FileInput/index.js +10 -3
- package/esm/inputs/Input/index.js +7 -2
- package/esm/inputs/Radio/index.js +12 -3
- package/esm/inputs/Select/index.js +10 -3
- package/esm/validators.js +88 -4
- package/esm/validators.spec.js +41 -2
- package/index.js +2 -2
- package/inputs/Checkboxes/index.js +13 -2
- package/inputs/DateInput/index.js +6 -3
- package/inputs/FileInput/index.js +13 -3
- package/inputs/Input/index.js +7 -2
- package/inputs/Radio/index.js +14 -3
- package/inputs/Select/index.js +12 -3
- package/libs/form/src/Field/index.d.ts +2 -0
- package/libs/form/src/index.d.ts +2 -2
- package/libs/form/src/validators.d.ts +3 -0
- package/libs/ui/src/core/Accordion/index.d.ts +3 -3
- package/libs/ui/src/core/BackLink/index.d.ts +3 -0
- package/libs/ui/src/core/Blockquote/index.d.ts +1 -1
- package/libs/ui/src/core/Breadcrumbs/index.d.ts +2 -0
- package/libs/ui/src/core/Button/BackButton.d.ts +1 -1
- package/libs/ui/src/core/Button/ButtonLink.d.ts +1 -1
- package/libs/ui/src/core/Button/index.d.ts +1 -1
- package/libs/ui/src/core/Confirmation/index.d.ts +5 -0
- package/libs/ui/src/core/Divider/index.d.ts +1 -1
- package/libs/ui/src/core/NavList/NavList.d.ts +1 -1
- package/libs/ui/src/core/NavList/NavListItem.d.ts +1 -1
- package/libs/ui/src/core/NavList/NavListItemBase.d.ts +1 -1
- package/libs/ui/src/core/NotificationBanner/index.d.ts +1 -1
- package/libs/ui/src/core/PhaseBanner/index.d.ts +6 -0
- package/libs/ui/src/core/TextArea/index.d.ts +3 -0
- package/libs/ui/src/core/TextInput/index.d.ts +3 -0
- package/libs/ui/src/core/VisuallyHidden/index.d.ts +2 -0
- package/libs/ui/src/core/index.d.ts +8 -3
- package/libs/ui/src/hooks/useTogglableSections.d.ts +3 -2
- package/libs/ui/src/layouts/Grid/index.d.ts +3 -0
- package/libs/ui/src/locales/el.d.ts +3 -0
- package/libs/ui/src/typography/{Caption.d.ts → Caption/index.d.ts} +1 -1
- package/libs/ui/src/typography/{NormalText.d.ts → NormalText/index.d.ts} +0 -0
- package/libs/ui/src/typography/{Paragraph.d.ts → Paragraph/index.d.ts} +0 -0
- package/libs/ui/src/typography/{Title.d.ts → Title/index.d.ts} +0 -0
- package/libs-ui/react-core/src/Accordion/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionControls/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionSection/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionSectionContent/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionSectionHeader/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionSectionSummary/index.d.ts +1 -1
- package/libs-ui/react-core/src/AccordionSectionSummaryHeading/index.d.ts +1 -1
- package/libs-ui/react-core/src/BackLink/index.d.ts +1 -1
- package/libs-ui/react-core/src/Blockquote/index.d.ts +1 -1
- package/libs-ui/react-core/src/Breadcrumbs/index.d.ts +1 -1
- package/libs-ui/react-core/src/BreadcrumbsList/index.d.ts +1 -1
- package/libs-ui/react-core/src/BreadcrumbsListItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/Button/index.d.ts +1 -1
- package/libs-ui/react-core/src/ButtonGroup/index.d.ts +1 -1
- package/libs-ui/react-core/src/ButtonLink/index.d.ts +1 -1
- package/libs-ui/react-core/src/CallToAction/index.d.ts +1 -1
- package/libs-ui/react-core/src/Card/index.d.ts +1 -1
- package/libs-ui/react-core/src/CardAction/index.d.ts +1 -1
- package/libs-ui/react-core/src/CardHeading/index.d.ts +1 -1
- package/libs-ui/react-core/src/CardText/index.d.ts +1 -1
- package/libs-ui/react-core/src/Checkbox/index.d.ts +1 -1
- package/libs-ui/react-core/src/CheckboxItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/Confirmation/index.d.ts +9 -0
- package/libs-ui/react-core/src/ConfirmationBody/index.d.ts +9 -0
- package/libs-ui/react-core/src/ConfirmationTitle/index.d.ts +9 -0
- package/libs-ui/react-core/src/DateInput/index.d.ts +1 -1
- package/libs-ui/react-core/src/DateInputItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/Details/index.d.ts +1 -1
- package/libs-ui/react-core/src/DetailsContent/index.d.ts +1 -1
- package/libs-ui/react-core/src/DetailsSummary/index.d.ts +1 -1
- package/libs-ui/react-core/src/ErrorMessage/index.d.ts +1 -1
- package/libs-ui/react-core/src/ErrorSummary/index.d.ts +1 -1
- package/libs-ui/react-core/src/Field/index.d.ts +1 -1
- package/libs-ui/react-core/src/Fieldset/index.d.ts +1 -1
- package/libs-ui/react-core/src/FieldsetLegend/index.d.ts +1 -1
- package/libs-ui/react-core/src/FileUpload/index.d.ts +1 -1
- package/libs-ui/react-core/src/Grid/index.d.ts +20 -0
- package/libs-ui/react-core/src/Heading/index.d.ts +1 -1
- package/libs-ui/react-core/src/HeadingCaption/index.d.ts +1 -1
- package/libs-ui/react-core/src/Hidden/index.d.ts +1 -1
- package/libs-ui/react-core/src/Hint/index.d.ts +1 -1
- package/libs-ui/react-core/src/Label/index.d.ts +1 -1
- package/libs-ui/react-core/src/LabelTitle/index.d.ts +1 -1
- package/libs-ui/react-core/src/Link/index.d.ts +1 -1
- package/libs-ui/react-core/src/List/index.d.ts +1 -1
- package/libs-ui/react-core/src/ListItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/NormalText/index.d.ts +1 -1
- package/libs-ui/react-core/src/NotificationBanner/index.d.ts +1 -1
- package/libs-ui/react-core/src/NotificationBannerContent/index.d.ts +1 -1
- package/libs-ui/react-core/src/NotificationBannerHeader/index.d.ts +1 -1
- package/libs-ui/react-core/src/NotificationBannerHeading/index.d.ts +1 -1
- package/libs-ui/react-core/src/NotificationBannerLink/index.d.ts +1 -1
- package/libs-ui/react-core/src/Paragraph/index.d.ts +1 -1
- package/libs-ui/react-core/src/PhaseBanner/index.d.ts +1 -1
- package/libs-ui/react-core/src/PhaseBannerHeaderContainer/index.d.ts +1 -1
- package/libs-ui/react-core/src/PhaseBannerTag/index.d.ts +1 -1
- package/libs-ui/react-core/src/PhaseBannerText/index.d.ts +1 -1
- package/libs-ui/react-core/src/Radio/index.d.ts +5 -1
- package/libs-ui/react-core/src/RadioItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/SectionBreak/index.d.ts +1 -1
- package/libs-ui/react-core/src/Select/index.d.ts +1 -1
- package/libs-ui/react-core/src/SelectOption/index.d.ts +1 -1
- package/libs-ui/react-core/src/SummaryList/index.d.ts +7 -1
- package/libs-ui/react-core/src/SummaryListItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/SummaryListItemAction/index.d.ts +1 -1
- package/libs-ui/react-core/src/SummaryListItemKey/index.d.ts +1 -1
- package/libs-ui/react-core/src/SummaryListItemValue/index.d.ts +1 -1
- package/libs-ui/react-core/src/SvgIcon/index.d.ts +1 -1
- package/libs-ui/react-core/src/Table/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableBody/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableCaption/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableContainer/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableDataCell/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableHead/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableHeadCell/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableNoDataRow/index.d.ts +1 -1
- package/libs-ui/react-core/src/TableRow/index.d.ts +1 -1
- package/libs-ui/react-core/src/Tabs/index.d.ts +1 -1
- package/libs-ui/react-core/src/TabsHeading/index.d.ts +1 -1
- package/libs-ui/react-core/src/TabsList/index.d.ts +1 -1
- package/libs-ui/react-core/src/TabsListItem/index.d.ts +1 -1
- package/libs-ui/react-core/src/TabsPanel/index.d.ts +1 -1
- package/libs-ui/react-core/src/TextArea/index.d.ts +1 -1
- package/libs-ui/react-core/src/TextInput/index.d.ts +1 -1
- package/libs-ui/react-core/src/VisuallyHidden/index.d.ts +1 -1
- package/libs-ui/react-core/src/WarningText/index.d.ts +1 -1
- package/package.json +2 -4
- package/validators.js +93 -4
- package/validators.spec.js +40 -1
- package/libs/ui/src/app/App.d.ts +0 -14
- package/libs/ui/src/app/CopyToClipboard.d.ts +0 -9
- package/libs/ui/src/app/Header/HeaderLogo.d.ts +0 -3
- package/libs/ui/src/app/Header/HeaderSection.d.ts +0 -5
- package/libs/ui/src/app/Header/HeaderTitle.d.ts +0 -5
- package/libs/ui/src/app/Header/index.d.ts +0 -11
- package/libs/ui/src/app/I18nText.d.ts +0 -10
- package/libs/ui/src/app/PhaseBannerHeader.d.ts +0 -8
- package/libs/ui/src/app/QrCodeScanner/index.d.ts +0 -29
- package/libs/ui/src/app/index.d.ts +0 -8
- package/libs/ui/src/core/PaginationLabel/index.d.ts +0 -21
- package/libs-ui/react-core/src/Header/index.d.ts +0 -10
- package/libs-ui/react-core/src/HeaderContent/index.d.ts +0 -9
- package/libs-ui/react-core/src/HeaderLogo/index.d.ts +0 -17
- package/libs-ui/react-core/src/HeaderSecondaryLogo/index.d.ts +0 -17
- package/libs-ui/react-core/src/HeaderSection/index.d.ts +0 -9
- package/libs-ui/react-core/src/HeaderSubtitle/index.d.ts +0 -9
- package/libs-ui/react-core/src/HeaderTitle/index.d.ts +0 -13
- package/libs-ui/react-extensions/src/admin/CopyToClipboardContainer/index.d.ts +0 -14
- package/libs-ui/react-extensions/src/admin/CopyToClipboardMessage/index.d.ts +0 -21
- package/libs-ui/react-extensions/src/admin/PaginationLabel/index.d.ts +0 -9
|
@@ -19,5 +19,5 @@ export interface TextAreaProps extends TextareaElementAttributes {
|
|
|
19
19
|
* Textarea component is used when you need to let users enter an
|
|
20
20
|
* amount of text that’s longer than a single line.
|
|
21
21
|
*/
|
|
22
|
-
export declare const TextArea: React.ForwardRefExoticComponent<Pick<TextAreaProps, "className" | "
|
|
22
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Pick<TextAreaProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "required" | "disabled" | "name" | "error" | "maxLength" | "minLength" | "autoComplete" | "autoFocus" | "readOnly" | "value" | "rows" | "cols" | "dirName" | "wrap"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
23
23
|
export default TextArea;
|
|
@@ -24,5 +24,5 @@ export interface TextInputProps extends InputElementAttributes {
|
|
|
24
24
|
* TextInput component when you need to let users enter text that’s no
|
|
25
25
|
* longer than a single line, such as their name or phone number.
|
|
26
26
|
*/
|
|
27
|
-
export declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "type" | "className" | "
|
|
27
|
+
export declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "type" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "pattern" | "list" | "step" | "required" | "disabled" | "name" | "size" | "error" | "min" | "max" | "maxLength" | "minLength" | "characterWidth" | "cellWidth" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "multiple" | "readOnly" | "src" | "value" | "width"> & React.RefAttributes<HTMLInputElement>>;
|
|
28
28
|
export default TextInput;
|
|
@@ -6,5 +6,5 @@ export interface VisuallyHiddenProps extends SpanElementAttributes {
|
|
|
6
6
|
* Details for the VisuallyHidden.
|
|
7
7
|
* VisuallyHidden component provides text for screen readers that is visually hidden.
|
|
8
8
|
*/
|
|
9
|
-
export declare const VisuallyHidden: React.ForwardRefExoticComponent<Pick<VisuallyHiddenProps, "className" | "
|
|
9
|
+
export declare const VisuallyHidden: React.ForwardRefExoticComponent<Pick<VisuallyHiddenProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLSpanElement>>;
|
|
10
10
|
export default VisuallyHidden;
|
|
@@ -7,5 +7,5 @@ export interface WarningTextProps extends DivElementAttributes {
|
|
|
7
7
|
* Use the WarningText component when you need to warn users about something important.
|
|
8
8
|
* The component is used with a text inside it.
|
|
9
9
|
*/
|
|
10
|
-
export declare const WarningText: React.ForwardRefExoticComponent<Pick<WarningTextProps, "className" | "
|
|
10
|
+
export declare const WarningText: React.ForwardRefExoticComponent<Pick<WarningTextProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export default WarningText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/form",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "@digigov form builder",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
"dayjs": "1.10.4"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@digigov/ui": "0.
|
|
21
|
-
"@material-ui/core": "4.11.3",
|
|
22
|
-
"@material-ui/icons": "4.11.2",
|
|
20
|
+
"@digigov/ui": "0.21.2",
|
|
23
21
|
"clsx": "1.1.1",
|
|
24
22
|
"react": "16.14.0",
|
|
25
23
|
"react-dom": "16.14.0"
|
package/validators.js
CHANGED
|
@@ -7,9 +7,11 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
+
exports.matchTypeOfPhoneNumber = matchTypeOfPhoneNumber;
|
|
10
11
|
exports.useValidationSchema = useValidationSchema;
|
|
11
12
|
exports.validateAFM = validateAFM;
|
|
12
13
|
exports.validateIban = validateIban;
|
|
14
|
+
exports.validatePhoneNumber = validatePhoneNumber;
|
|
13
15
|
exports.validatePostalCode = validatePostalCode;
|
|
14
16
|
exports.validateUUID4 = validateUUID4;
|
|
15
17
|
|
|
@@ -80,6 +82,61 @@ function validateAFM(afm) {
|
|
|
80
82
|
return valid;
|
|
81
83
|
}
|
|
82
84
|
|
|
85
|
+
function validatePhoneNumber(phoneNumber) {
|
|
86
|
+
var countries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['gr'];
|
|
87
|
+
var typeOfPhoneNumber = arguments.length > 2 ? arguments[2] : undefined;
|
|
88
|
+
var phoneUtil = gPhoneNumber.PhoneNumberUtil.getInstance();
|
|
89
|
+
|
|
90
|
+
if (!countries || countries.length === 0) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return countries.some(function (country) {
|
|
95
|
+
try {
|
|
96
|
+
var phone = phoneUtil.parse(phoneNumber, country.toUpperCase());
|
|
97
|
+
|
|
98
|
+
if (phoneUtil.isValidNumber(phone)) {
|
|
99
|
+
if (typeOfPhoneNumber) {
|
|
100
|
+
if (matchTypeOfPhoneNumber(phone, typeOfPhoneNumber, phoneUtil)) {
|
|
101
|
+
return true;
|
|
102
|
+
} else {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return false;
|
|
111
|
+
} catch (error) {
|
|
112
|
+
console.error(error);
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var phoneNumberTypes = {
|
|
119
|
+
0: 'landline',
|
|
120
|
+
1: 'mobile',
|
|
121
|
+
2: 'landline_or_mobile'
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
function matchTypeOfPhoneNumber(phone, type, phoneUtil) {
|
|
125
|
+
try {
|
|
126
|
+
var phoneNumberType = phoneUtil.getNumberType(phone);
|
|
127
|
+
var numberType = phoneNumberTypes[phoneNumberType];
|
|
128
|
+
|
|
129
|
+
if (numberType === 'landline_or_mobile' || numberType === type) {
|
|
130
|
+
return true;
|
|
131
|
+
} else {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.error(error);
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
83
140
|
function validateMobile(value) {
|
|
84
141
|
var phoneUtil = gPhoneNumber.PhoneNumberUtil.getInstance();
|
|
85
142
|
var origValue = value; // probably catch all the cases with a regex instead of gphonenumber
|
|
@@ -118,7 +175,7 @@ var POSTALCODE_VALIDATOR = function POSTALCODE_VALIDATOR(field) {
|
|
|
118
175
|
name: 'postal-code-validator',
|
|
119
176
|
message: 'form.error.postalCode',
|
|
120
177
|
test: function test(value) {
|
|
121
|
-
if (!value
|
|
178
|
+
if (!value) {
|
|
122
179
|
return true;
|
|
123
180
|
}
|
|
124
181
|
|
|
@@ -138,6 +195,35 @@ var MOBILE_PHONE_VALIDATOR = {
|
|
|
138
195
|
return true;
|
|
139
196
|
}
|
|
140
197
|
};
|
|
198
|
+
|
|
199
|
+
var PHONE_NUMBER_VALIDATOR = function PHONE_NUMBER_VALIDATOR(field) {
|
|
200
|
+
var _field$extra2, _field$extra3;
|
|
201
|
+
|
|
202
|
+
var countryCode = field === null || field === void 0 ? void 0 : (_field$extra2 = field.extra) === null || _field$extra2 === void 0 ? void 0 : _field$extra2.countries;
|
|
203
|
+
var typeOfPhone = field === null || field === void 0 ? void 0 : (_field$extra3 = field.extra) === null || _field$extra3 === void 0 ? void 0 : _field$extra3.phoneType;
|
|
204
|
+
return {
|
|
205
|
+
name: 'phone-number-validator',
|
|
206
|
+
message: function message() {
|
|
207
|
+
if (typeOfPhone === 'mobile') {
|
|
208
|
+
return 'form.error.mobile_phone';
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (typeOfPhone === 'landline') {
|
|
212
|
+
return 'form.error.landline';
|
|
213
|
+
} else {
|
|
214
|
+
return 'form.error.phone_number';
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
test: function test(value) {
|
|
218
|
+
if (!value) {
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return validatePhoneNumber(value, countryCode, typeOfPhone);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
141
227
|
var AFM_VALIDATOR = {
|
|
142
228
|
name: 'afm-validator',
|
|
143
229
|
message: 'form.error.afm',
|
|
@@ -328,14 +414,14 @@ function validateIban(value, countryCode) {
|
|
|
328
414
|
}
|
|
329
415
|
|
|
330
416
|
var IBAN_VALIDATOR = function IBAN_VALIDATOR(field) {
|
|
331
|
-
var _field$
|
|
417
|
+
var _field$extra4;
|
|
332
418
|
|
|
333
|
-
var countryCode = field === null || field === void 0 ? void 0 : (_field$
|
|
419
|
+
var countryCode = field === null || field === void 0 ? void 0 : (_field$extra4 = field.extra) === null || _field$extra4 === void 0 ? void 0 : _field$extra4.country;
|
|
334
420
|
return {
|
|
335
421
|
name: 'iban-validator',
|
|
336
422
|
message: 'form.error.iban',
|
|
337
423
|
test: function test(value) {
|
|
338
|
-
if (!value
|
|
424
|
+
if (!value) {
|
|
339
425
|
return true;
|
|
340
426
|
}
|
|
341
427
|
|
|
@@ -485,6 +571,9 @@ var getYUPTypeMap = function getYUPTypeMap() {
|
|
|
485
571
|
mobile_phone: function mobile_phone() {
|
|
486
572
|
return yup.string().test(MOBILE_PHONE_VALIDATOR);
|
|
487
573
|
},
|
|
574
|
+
phone_number: function phone_number(field) {
|
|
575
|
+
return yup.string().test(PHONE_NUMBER_VALIDATOR(field));
|
|
576
|
+
},
|
|
488
577
|
'choice:multiple': function choiceMultiple() {
|
|
489
578
|
return yup.array().of(yup.string()).nullable();
|
|
490
579
|
},
|
package/validators.spec.js
CHANGED
|
@@ -44,6 +44,45 @@ it('validates wrong postal code with wrong country code', function () {
|
|
|
44
44
|
it('validates wrong postal code with greek country code', function () {
|
|
45
45
|
expect((0, _validators.validatePostalCode)('123', ['GR'])).toBe(false);
|
|
46
46
|
});
|
|
47
|
-
it('validates
|
|
47
|
+
it('validates postal code with greek country code', function () {
|
|
48
48
|
expect((0, _validators.validatePostalCode)('11143', ['GR'])).toBe(true);
|
|
49
|
+
});
|
|
50
|
+
it('validates phone number type landline with greek country code', function () {
|
|
51
|
+
expect((0, _validators.validatePhoneNumber)('2102934896', ['GR'], 'landline')).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
it('validates phone number type landline with ch country code', function () {
|
|
54
|
+
expect((0, _validators.validatePhoneNumber)('2102934896', ['CH'], 'landline')).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
it('validates phone number type landline with ch and gr countries code', function () {
|
|
57
|
+
expect((0, _validators.validatePhoneNumber)('2102934896', ['GR', 'CH'], 'landline')).toBe(true);
|
|
58
|
+
});
|
|
59
|
+
it('validatesphone number type landline with ch and gr countries code', function () {
|
|
60
|
+
expect((0, _validators.validatePhoneNumber)('41446681800', ['GR', 'CH'], 'landline')).toBe(true);
|
|
61
|
+
});
|
|
62
|
+
it('validates phone number type landline with ch and gr countries code but phone number is mobile', function () {
|
|
63
|
+
expect((0, _validators.validatePhoneNumber)('2102934896', ['GR', 'CH'], 'mobile')).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
it('validates phone number type mobile with ch and gr countries code', function () {
|
|
66
|
+
expect((0, _validators.validatePhoneNumber)('6934100982', ['GR', 'CH'], 'mobile')).toBe(true);
|
|
67
|
+
});
|
|
68
|
+
it('validates phone number type mobile with gr country code', function () {
|
|
69
|
+
expect((0, _validators.validatePhoneNumber)('6934100982', ['GR'], 'mobile')).toBe(true);
|
|
70
|
+
});
|
|
71
|
+
it('validates phone number type mobile with ch country code', function () {
|
|
72
|
+
expect((0, _validators.validatePhoneNumber)('6934100982', ['CH'], 'mobile')).toBe(false);
|
|
73
|
+
});
|
|
74
|
+
it('validates phone number with no type and ch country code', function () {
|
|
75
|
+
expect((0, _validators.validatePhoneNumber)('6934100982', ['CH'], null)).toBe(false);
|
|
76
|
+
});
|
|
77
|
+
it('validates phone number with no type and gr country code', function () {
|
|
78
|
+
expect((0, _validators.validatePhoneNumber)('6934100982', ['gr'], null)).toBe(true);
|
|
79
|
+
});
|
|
80
|
+
it('validates phone number with no type and ch country code', function () {
|
|
81
|
+
expect((0, _validators.validatePhoneNumber)('41446681800', ['CH'], null)).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
it('validates phone number with no type and gr country code', function () {
|
|
84
|
+
expect((0, _validators.validatePhoneNumber)('41446681800', ['gr'], null)).toBe(false);
|
|
85
|
+
});
|
|
86
|
+
it('validates phone number with no type and gr and ch countries code', function () {
|
|
87
|
+
expect((0, _validators.validatePhoneNumber)('41446681800', ['gr', 'ch'], null)).toBe(true);
|
|
49
88
|
});
|
package/libs/ui/src/app/App.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
|
|
3
|
-
import { Theme } from '@material-ui/core/styles';
|
|
4
|
-
export declare const useAppStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root">;
|
|
5
|
-
export interface AppProps {
|
|
6
|
-
theme: Theme;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
classes?: {
|
|
9
|
-
root: BaseCSSProperties;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
declare const App: React.FC<AppProps>;
|
|
13
|
-
export declare const StaticApp: React.FC<AppProps>;
|
|
14
|
-
export default App;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
-
export interface CopyToClipboardProps extends DivElementAttributes {
|
|
4
|
-
text: string;
|
|
5
|
-
variant?: 'tooltip' | 'banner';
|
|
6
|
-
message?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const CopyToClipboard: React.ForwardRefExoticComponent<Pick<CopyToClipboardProps, "message" | "className" | "style" | "slot" | "title" | "text" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export default CopyToClipboard;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const HeaderLogo: import("react").ForwardRefExoticComponent<Pick<import("@digigov/react-core/HeaderLogo").HeaderLogoProps, "type" | "className" | "style" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "media" | "target" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
3
|
-
export default HeaderLogo;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HeaderSectionProps as CoreHeaderSectionProps } from '@digigov/react-core/HeaderSection';
|
|
3
|
-
export declare type HeaderSectionProps = CoreHeaderSectionProps;
|
|
4
|
-
export declare const HeaderSection: import("react").ForwardRefExoticComponent<Pick<CoreHeaderSectionProps, "className" | "style" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export default HeaderSection;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HeaderTitleProps as CoreHeaderTitleProps } from '@digigov/react-core/HeaderTitle';
|
|
3
|
-
export declare type HeaderTitleProps = CoreHeaderTitleProps;
|
|
4
|
-
export declare const HeaderTitle: import("react").ForwardRefExoticComponent<Pick<CoreHeaderTitleProps, "type" | "className" | "style" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
5
|
-
export default HeaderTitle;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HeaderProps as CoreHeaderProps } from '@digigov/react-core/Header';
|
|
3
|
-
export declare type HeaderProps = CoreHeaderProps;
|
|
4
|
-
export declare const Header: import("react").ForwardRefExoticComponent<Pick<CoreHeaderProps, "className" | "style" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
-
export * from '@digigov/ui/app/Header/HeaderTitle';
|
|
6
|
-
export * from '@digigov/ui/app/Header/HeaderLogo';
|
|
7
|
-
export * from '@digigov/ui/app/Header/HeaderSection';
|
|
8
|
-
export * from '@digigov/react-core/HeaderContent';
|
|
9
|
-
export * from '@digigov/react-core/HeaderSecondaryLogo';
|
|
10
|
-
export * from '@digigov/react-core/HeaderSubtitle';
|
|
11
|
-
export default Header;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
-
export interface PhaseBannerHeaderProps extends DivElementAttributes {
|
|
4
|
-
tag?: string;
|
|
5
|
-
text?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const PhaseBannerHeader: React.ForwardRefExoticComponent<Pick<PhaseBannerHeaderProps, "className" | "style" | "slot" | "title" | "text" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tag"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export default PhaseBannerHeader;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface QrCodeScannerProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
dataType?: 'url' | 'text';
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
legacyMode?: boolean;
|
|
7
|
-
validate?: (...args: any[]) => boolean;
|
|
8
|
-
onScan: (...args: any[]) => void;
|
|
9
|
-
onError: (err: any) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* QRCodeScanner assumes that the data provided inside the QR code image,
|
|
13
|
-
* are a HTTP link, thus it uses the `encodeURI` function to escape
|
|
14
|
-
* all scanned data that will be forwarded to the `onScan` function
|
|
15
|
-
*
|
|
16
|
-
* When a QR code is scanned, before we run the `onScan` callback function,
|
|
17
|
-
* we do the following:
|
|
18
|
-
*
|
|
19
|
-
* 1. Run a validator function provided in the props of QrCodeScanner component
|
|
20
|
-
* that receives the *raw* scanned data and returns a boolean type. (eg. check
|
|
21
|
-
* if it's a gov.gr subdomain, or that it matches the current domain)
|
|
22
|
-
* 2. If the validator returns `true`, then construct a URL object from the data provided
|
|
23
|
-
* and check if the protocol is `https` and the `origin` is the same as the origin of this page
|
|
24
|
-
* 2. Automatically fallback to the `onError` callback function, if the validation or url check fail
|
|
25
|
-
* 3. Finally, run `onScan` callback function with the scanned data encoded as a URI.
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export declare const QrCodeScanner: React.FC<QrCodeScannerProps>;
|
|
29
|
-
export default QrCodeScanner;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from '@digigov/ui/app/App';
|
|
2
|
-
export * from '@digigov/ui/app/PageTitle';
|
|
3
|
-
export * from '@digigov/ui/app/QrCodeScanner';
|
|
4
|
-
export * from '@digigov/ui/app/Header';
|
|
5
|
-
export * from '@digigov/ui/app/i18n';
|
|
6
|
-
export * from '@digigov/ui/app/I18nText';
|
|
7
|
-
export * from '@digigov/ui/app/CopyToClipboard';
|
|
8
|
-
export * from '@digigov/ui/app/PhaseBannerHeader';
|