@digigov/form 0.6.5 → 0.6.8
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 +24 -1
- package/Field/index.js +24 -7
- package/Questions/index.mdx +0 -2
- package/es/Field/index.js +24 -7
- package/es/Questions/index.mdx +0 -2
- package/es/index.js +1 -1
- 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 +120 -3
- package/es/validators.spec.js +52 -1
- package/esm/Field/index.js +24 -7
- package/esm/Questions/index.mdx +0 -2
- package/esm/index.js +2 -2
- 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 +120 -3
- package/esm/validators.spec.js +52 -1
- package/index.js +1 -1
- 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 +1 -1
- package/libs/form/src/validators.d.ts +4 -0
- package/libs/ui/src/core/index.d.ts +0 -1
- package/libs/ui/src/locales/el.d.ts +4 -0
- package/package.json +2 -2
- package/validators.js +127 -3
- package/validators.spec.js +51 -0
- package/libs/ui/src/app/App.d.ts +0 -14
- package/libs/ui/src/app/CopyToClipboard.d.ts +0 -8
- 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-core/src/PhaseBannerHeaderContainer/index.d.ts +0 -8
- 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
|
@@ -146,7 +146,8 @@ var DateInput = function DateInput(_ref2) {
|
|
|
146
146
|
width: 2,
|
|
147
147
|
name: "".concat(name, "-day"),
|
|
148
148
|
maxlength: "2",
|
|
149
|
-
disabled: props.disabled
|
|
149
|
+
disabled: props.disabled,
|
|
150
|
+
"aria-required": props['aria-required']
|
|
150
151
|
}), /*#__PURE__*/_react["default"].createElement(DatePart, {
|
|
151
152
|
label: t('form.label.month'),
|
|
152
153
|
onChange: date.setMonth,
|
|
@@ -157,7 +158,8 @@ var DateInput = function DateInput(_ref2) {
|
|
|
157
158
|
width: 2,
|
|
158
159
|
name: "".concat(props.name, "-month"),
|
|
159
160
|
maxlength: "2",
|
|
160
|
-
disabled: props.disabled
|
|
161
|
+
disabled: props.disabled,
|
|
162
|
+
"aria-required": props['aria-required']
|
|
161
163
|
}), /*#__PURE__*/_react["default"].createElement(DatePart, {
|
|
162
164
|
label: t('form.label.year'),
|
|
163
165
|
onChange: date.setYear,
|
|
@@ -165,7 +167,8 @@ var DateInput = function DateInput(_ref2) {
|
|
|
165
167
|
width: 4,
|
|
166
168
|
name: "".concat(props.name, "-year"),
|
|
167
169
|
maxlength: "4",
|
|
168
|
-
disabled: props.disabled
|
|
170
|
+
disabled: props.disabled,
|
|
171
|
+
"aria-required": props['aria-required']
|
|
169
172
|
}));
|
|
170
173
|
};
|
|
171
174
|
|
|
@@ -9,8 +9,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = exports.FileInput = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
14
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
19
|
|
|
16
20
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -21,6 +25,8 @@ var _Paragraph = _interopRequireDefault(require("@digigov/ui/typography/Paragrap
|
|
|
21
25
|
|
|
22
26
|
var _Hint = _interopRequireDefault(require("@digigov/react-core/Hint"));
|
|
23
27
|
|
|
28
|
+
var _excluded = ["name", "extra", "disabled", "type"];
|
|
29
|
+
|
|
24
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
31
|
|
|
26
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -30,7 +36,9 @@ var FileInput = /*#__PURE__*/_react["default"].forwardRef(function FileInput(_re
|
|
|
30
36
|
var name = _ref.name,
|
|
31
37
|
_ref$extra = _ref.extra,
|
|
32
38
|
extra = _ref$extra === void 0 ? {} : _ref$extra,
|
|
33
|
-
disabled = _ref.disabled
|
|
39
|
+
disabled = _ref.disabled,
|
|
40
|
+
type = _ref.type,
|
|
41
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
34
42
|
|
|
35
43
|
var _useTranslation = (0, _i18n.useTranslation)(),
|
|
36
44
|
t = _useTranslation.t;
|
|
@@ -46,7 +54,7 @@ var FileInput = /*#__PURE__*/_react["default"].forwardRef(function FileInput(_re
|
|
|
46
54
|
tabIndex: 0,
|
|
47
55
|
role: "button",
|
|
48
56
|
className: (0, _clsx["default"])(extra.className, files.length === 0 && ['govgr-btn', 'govgr-btn-primary'], files.length > 0 && 'govgr-link', true && 'govgr-label-file')
|
|
49
|
-
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
|
|
50
58
|
ref: ref,
|
|
51
59
|
type: "file",
|
|
52
60
|
name: name,
|
|
@@ -63,7 +71,9 @@ var FileInput = /*#__PURE__*/_react["default"].forwardRef(function FileInput(_re
|
|
|
63
71
|
});
|
|
64
72
|
setFiles(selectedFiles);
|
|
65
73
|
}
|
|
66
|
-
}
|
|
74
|
+
}, (0, _extends2["default"])({}, props, {
|
|
75
|
+
required: undefined
|
|
76
|
+
}))), files.length ? t('upload.change_file') : t('upload.choose_file')));
|
|
67
77
|
});
|
|
68
78
|
|
|
69
79
|
exports.FileInput = FileInput;
|
package/inputs/Input/index.js
CHANGED
|
@@ -52,14 +52,19 @@ var Input = /*#__PURE__*/_react["default"].forwardRef(function WrappedInput(_ref
|
|
|
52
52
|
className: className,
|
|
53
53
|
rows: rows,
|
|
54
54
|
ref: ref
|
|
55
|
-
}, props
|
|
55
|
+
}, (0, _extends2["default"])({}, props, {
|
|
56
|
+
required: undefined,
|
|
57
|
+
type: fieldType
|
|
58
|
+
})));
|
|
56
59
|
} else {
|
|
57
60
|
return /*#__PURE__*/_react["default"].createElement(_TextInput["default"], (0, _extends2["default"])({
|
|
58
61
|
name: name,
|
|
59
62
|
type: fieldType,
|
|
60
63
|
className: className,
|
|
61
64
|
ref: ref
|
|
62
|
-
}, props
|
|
65
|
+
}, (0, _extends2["default"])({}, props, {
|
|
66
|
+
required: undefined
|
|
67
|
+
})));
|
|
63
68
|
}
|
|
64
69
|
});
|
|
65
70
|
|
package/inputs/Radio/index.js
CHANGED
|
@@ -9,8 +9,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = exports.RadioButtonsGroup = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
14
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
19
|
|
|
16
20
|
var _Radio = _interopRequireDefault(require("@digigov/react-core/Radio"));
|
|
@@ -23,6 +27,8 @@ var _reactHookForm = require("react-hook-form");
|
|
|
23
27
|
|
|
24
28
|
var _Hint = _interopRequireDefault(require("@digigov/react-core/Hint"));
|
|
25
29
|
|
|
30
|
+
var _excluded = ["register", "name", "control", "extra", "disabled"];
|
|
31
|
+
|
|
26
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
33
|
|
|
28
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -34,7 +40,8 @@ var RadioButtonsGroup = function RadioButtonsGroup(_ref) {
|
|
|
34
40
|
_ref$extra = _ref.extra,
|
|
35
41
|
options = _ref$extra.options,
|
|
36
42
|
className = _ref$extra.className,
|
|
37
|
-
disabled = _ref.disabled
|
|
43
|
+
disabled = _ref.disabled,
|
|
44
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
38
45
|
var currentValue = (0, _reactHookForm.useWatch)({
|
|
39
46
|
control: control,
|
|
40
47
|
name: name
|
|
@@ -55,13 +62,17 @@ var RadioButtonsGroup = function RadioButtonsGroup(_ref) {
|
|
|
55
62
|
var label = _ref2.label,
|
|
56
63
|
v = _ref2.value,
|
|
57
64
|
optionDisabled = _ref2.disabled;
|
|
58
|
-
return /*#__PURE__*/_react["default"].createElement(_RadioItem["default"], {
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_RadioItem["default"], (0, _extends2["default"])({
|
|
59
66
|
ref: register,
|
|
60
67
|
key: v,
|
|
61
68
|
name: name,
|
|
62
69
|
value: v,
|
|
63
70
|
disabled: disabled || optionDisabled
|
|
64
|
-
},
|
|
71
|
+
}, (0, _extends2["default"])({}, props, {
|
|
72
|
+
required: undefined,
|
|
73
|
+
'aria-describedby': undefined,
|
|
74
|
+
type: 'radio'
|
|
75
|
+
})), label && label.primary && t(label.primary) || v, label && label.secondary && /*#__PURE__*/_react["default"].createElement(_Hint["default"], null, t(label.secondary)));
|
|
65
76
|
}));
|
|
66
77
|
};
|
|
67
78
|
|
package/inputs/Select/index.js
CHANGED
|
@@ -7,24 +7,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = exports.Select = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireDefault(require("react"));
|
|
11
15
|
|
|
12
16
|
var _Select = _interopRequireDefault(require("@digigov/react-core/Select"));
|
|
13
17
|
|
|
14
18
|
var _SelectOption = _interopRequireDefault(require("@digigov/react-core/SelectOption"));
|
|
15
19
|
|
|
20
|
+
var _excluded = ["name", "extra", "disabled"];
|
|
21
|
+
|
|
16
22
|
var Select = /*#__PURE__*/_react["default"].forwardRef(function WrappedSelect(_ref, ref) {
|
|
17
23
|
var name = _ref.name,
|
|
18
24
|
_ref$extra = _ref.extra,
|
|
19
25
|
options = _ref$extra.options,
|
|
20
26
|
className = _ref$extra.className,
|
|
21
|
-
disabled = _ref.disabled
|
|
22
|
-
|
|
27
|
+
disabled = _ref.disabled,
|
|
28
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], (0, _extends2["default"])({
|
|
23
30
|
className: className,
|
|
24
31
|
ref: ref,
|
|
25
32
|
name: name,
|
|
26
33
|
disabled: disabled
|
|
27
|
-
},
|
|
34
|
+
}, (0, _extends2["default"])({}, props, {
|
|
35
|
+
required: undefined
|
|
36
|
+
})), options.map(function (_ref2) {
|
|
28
37
|
var value = _ref2.value,
|
|
29
38
|
label = _ref2.label;
|
|
30
39
|
return /*#__PURE__*/_react["default"].createElement(_SelectOption["default"], {
|
|
@@ -8,6 +8,7 @@ export declare type FieldComponentItem = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare type FieldComponentRegistry = Record<string, FieldComponentItem>;
|
|
10
10
|
export interface FieldContainerProps {
|
|
11
|
+
name?: FieldSpec['key'];
|
|
11
12
|
layout?: FieldSpec['layout'];
|
|
12
13
|
label?: FieldSpec['label'];
|
|
13
14
|
error?: FieldError;
|
|
@@ -17,6 +18,7 @@ export interface FieldContainerProps {
|
|
|
17
18
|
export declare type OmittedFieldSpec = Omit<FieldSpec, 'component'>;
|
|
18
19
|
export declare type UnknownValue = never | never[];
|
|
19
20
|
export interface ControlledFieldProps {
|
|
21
|
+
type?: string;
|
|
20
22
|
value: UnknownValue;
|
|
21
23
|
onChange: (v: UnknownValue) => void;
|
|
22
24
|
defaultValue?: UnknownValue;
|
package/libs/form/src/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface FieldCondition {
|
|
|
19
19
|
}
|
|
20
20
|
export interface FieldSpec {
|
|
21
21
|
key: string;
|
|
22
|
-
type?: 'int' | 'string' | 'boolean' | 'choice:multiple' | 'choice:single' | 'mobile_phone' | 'afm';
|
|
22
|
+
type?: 'int' | 'string' | 'boolean' | 'choice:multiple' | 'choice:single' | 'mobile_phone' | 'afm' | 'iban' | 'postal_code' | 'phone_number';
|
|
23
23
|
component?: any;
|
|
24
24
|
condition?: Record<string, FieldCondition>;
|
|
25
25
|
controlled?: boolean;
|
|
@@ -2,7 +2,11 @@ import * as yup from 'yup';
|
|
|
2
2
|
import { FieldSpec } from '@digigov/form';
|
|
3
3
|
import { MutableRefObject } from 'react';
|
|
4
4
|
export declare type ValidatorSchema = yup.BaseTestOptions;
|
|
5
|
+
export declare function validatePostalCode(number: string, countries: Array<string>): boolean;
|
|
5
6
|
export declare function validateAFM(afm: string): boolean;
|
|
7
|
+
export declare type PhoneNumberType = 'landline' | 'mobile' | null;
|
|
8
|
+
export declare function validatePhoneNumber(phoneNumber: string, countries: string[] | undefined, typeOfPhoneNumber: PhoneNumberType): boolean;
|
|
9
|
+
export declare function matchTypeOfPhoneNumber(phone: any, type: string, phoneUtil: any): boolean;
|
|
6
10
|
export declare function validateUUID4(uuid4: string): boolean;
|
|
7
11
|
export declare function validateIban(value: string, countryCode: string): boolean;
|
|
8
12
|
export interface MutableRefObjectProps {
|
|
@@ -18,6 +18,5 @@ export * from '@digigov/ui/core/Table';
|
|
|
18
18
|
export * from '@digigov/ui/core/Tabs';
|
|
19
19
|
export * from '@digigov/ui/core/VisuallyHidden';
|
|
20
20
|
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
21
|
-
export * from '@digigov/ui/core/PaginationLabel';
|
|
22
21
|
export * from '@digigov/ui/core/SvgIcon';
|
|
23
22
|
export * from '@digigov/ui/core/FileUpload';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/form",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "@digigov form builder",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dayjs": "1.10.4"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@digigov/ui": "0.
|
|
20
|
+
"@digigov/ui": "0.21.1",
|
|
21
21
|
"@material-ui/core": "4.11.3",
|
|
22
22
|
"@material-ui/icons": "4.11.2",
|
|
23
23
|
"clsx": "1.1.1",
|
package/validators.js
CHANGED
|
@@ -7,9 +7,12 @@ 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;
|
|
15
|
+
exports.validatePostalCode = validatePostalCode;
|
|
13
16
|
exports.validateUUID4 = validateUUID4;
|
|
14
17
|
|
|
15
18
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -40,6 +43,20 @@ _dayjs["default"].extend(_customParseFormat["default"]);
|
|
|
40
43
|
|
|
41
44
|
var DEFAULT_FILE_MAX_SIZE = 10000000;
|
|
42
45
|
|
|
46
|
+
function validatePostalCode(number, countries) {
|
|
47
|
+
if (!countries) {
|
|
48
|
+
return false;
|
|
49
|
+
} else {
|
|
50
|
+
if (countries.length === 1 && countries[0].toUpperCase() === 'GR') {
|
|
51
|
+
// Greek postal code must be 5 digits long and shouldn't start with 0 or 9.
|
|
52
|
+
var CODE_REGEX = /^[12345678][0-9]{4}$/;
|
|
53
|
+
return CODE_REGEX.test(number);
|
|
54
|
+
} else {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
43
60
|
function validateAFM(afm) {
|
|
44
61
|
if (afm.length !== 9) {
|
|
45
62
|
// "afm should be 9 digits"
|
|
@@ -65,6 +82,61 @@ function validateAFM(afm) {
|
|
|
65
82
|
return valid;
|
|
66
83
|
}
|
|
67
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
|
+
|
|
68
140
|
function validateMobile(value) {
|
|
69
141
|
var phoneUtil = gPhoneNumber.PhoneNumberUtil.getInstance();
|
|
70
142
|
var origValue = value; // probably catch all the cases with a regex instead of gphonenumber
|
|
@@ -95,6 +167,23 @@ function validateMobile(value) {
|
|
|
95
167
|
}
|
|
96
168
|
}
|
|
97
169
|
|
|
170
|
+
var POSTALCODE_VALIDATOR = function POSTALCODE_VALIDATOR(field) {
|
|
171
|
+
var _field$extra;
|
|
172
|
+
|
|
173
|
+
var countryCode = field === null || field === void 0 ? void 0 : (_field$extra = field.extra) === null || _field$extra === void 0 ? void 0 : _field$extra.countries;
|
|
174
|
+
return {
|
|
175
|
+
name: 'postal-code-validator',
|
|
176
|
+
message: 'form.error.postalCode',
|
|
177
|
+
test: function test(value) {
|
|
178
|
+
if (!value) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return validatePostalCode(value, countryCode);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
|
|
98
187
|
var MOBILE_PHONE_VALIDATOR = {
|
|
99
188
|
name: 'mobile-phone-validator',
|
|
100
189
|
message: 'form.error.mobile_phone',
|
|
@@ -106,6 +195,35 @@ var MOBILE_PHONE_VALIDATOR = {
|
|
|
106
195
|
return true;
|
|
107
196
|
}
|
|
108
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
|
+
|
|
109
227
|
var AFM_VALIDATOR = {
|
|
110
228
|
name: 'afm-validator',
|
|
111
229
|
message: 'form.error.afm',
|
|
@@ -296,14 +414,14 @@ function validateIban(value, countryCode) {
|
|
|
296
414
|
}
|
|
297
415
|
|
|
298
416
|
var IBAN_VALIDATOR = function IBAN_VALIDATOR(field) {
|
|
299
|
-
var _field$
|
|
417
|
+
var _field$extra4;
|
|
300
418
|
|
|
301
|
-
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;
|
|
302
420
|
return {
|
|
303
421
|
name: 'iban-validator',
|
|
304
422
|
message: 'form.error.iban',
|
|
305
423
|
test: function test(value) {
|
|
306
|
-
if (!value
|
|
424
|
+
if (!value) {
|
|
307
425
|
return true;
|
|
308
426
|
}
|
|
309
427
|
|
|
@@ -447,9 +565,15 @@ var getYUPTypeMap = function getYUPTypeMap() {
|
|
|
447
565
|
iban: function iban(field) {
|
|
448
566
|
return yup.string().test(IBAN_VALIDATOR(field));
|
|
449
567
|
},
|
|
568
|
+
postal_code: function postal_code(field) {
|
|
569
|
+
return yup.string().test(POSTALCODE_VALIDATOR(field));
|
|
570
|
+
},
|
|
450
571
|
mobile_phone: function mobile_phone() {
|
|
451
572
|
return yup.string().test(MOBILE_PHONE_VALIDATOR);
|
|
452
573
|
},
|
|
574
|
+
phone_number: function phone_number(field) {
|
|
575
|
+
return yup.string().test(PHONE_NUMBER_VALIDATOR(field));
|
|
576
|
+
},
|
|
453
577
|
'choice:multiple': function choiceMultiple() {
|
|
454
578
|
return yup.array().of(yup.string()).nullable();
|
|
455
579
|
},
|
package/validators.spec.js
CHANGED
|
@@ -34,4 +34,55 @@ it('validates wrong iban for non existing country code', function () {
|
|
|
34
34
|
});
|
|
35
35
|
it('validates correct greek iban whithout country code', function () {
|
|
36
36
|
expect((0, _validators.validateIban)('7801100800000008009825202', '')).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
it('validates wrong postal code without country code', function () {
|
|
39
|
+
expect((0, _validators.validatePostalCode)('123', [])).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it('validates wrong postal code with wrong country code', function () {
|
|
42
|
+
expect((0, _validators.validatePostalCode)('123', ['FR'])).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
it('validates wrong postal code with greek country code', function () {
|
|
45
|
+
expect((0, _validators.validatePostalCode)('123', ['GR'])).toBe(false);
|
|
46
|
+
});
|
|
47
|
+
it('validates postal code with greek country code', function () {
|
|
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);
|
|
37
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,8 +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
|
-
}
|
|
7
|
-
export declare const CopyToClipboard: React.ForwardRefExoticComponent<Pick<CopyToClipboardProps, "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>>;
|
|
8
|
-
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;
|