cozy-ui 128.8.0 → 128.10.0
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 +22 -0
- package/assets/icons/ui/matrix.svg +1 -0
- package/package.json +1 -1
- package/react/Contacts/AddModal/ContactForm/FieldInput.jsx +3 -0
- package/react/Contacts/AddModal/ContactForm/FieldInputAccordion.jsx +57 -0
- package/react/Contacts/AddModal/ContactForm/FieldInputArray.jsx +1 -1
- package/react/Contacts/AddModal/ContactForm/FieldInputLayout.jsx +14 -4
- package/react/Contacts/AddModal/ContactForm/contactToFormValues.js +9 -2
- package/react/Contacts/AddModal/ContactForm/contactToFormValues.spec.js +5 -0
- package/react/Contacts/AddModal/ContactForm/fieldsConfig.jsx +48 -32
- package/react/Contacts/AddModal/ContactForm/formValuesToContact.js +3 -0
- package/react/Contacts/AddModal/ContactForm/formValuesToContact.spec.js +57 -0
- package/react/Contacts/AddModal/ContactForm/helpers.js +41 -0
- package/react/Contacts/AddModal/ContactForm/helpers.spec.js +138 -0
- package/react/Contacts/AddModal/ContactForm/index.jsx +14 -1
- package/react/Contacts/AddModal/ContactForm/index.spec.jsx +12 -0
- package/react/Contacts/AddModal/ContactForm/locales/en.json +2 -0
- package/react/Contacts/AddModal/ContactForm/locales/fr.json +2 -0
- package/react/Contacts/AddModal/Readme.md +1 -1
- package/react/Contacts/AddModal/mocks.js +40 -1
- package/react/Contacts/AddModal/types.js +1 -1
- package/react/Icon/Readme.md +3 -1
- package/react/Icons/Matrix.jsx +12 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/index.d.ts +1 -1
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInput.d.ts +3 -1
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInput.js +3 -1
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputAccordion.d.ts +12 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputAccordion.js +71 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputArray.js +1 -1
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputLayout.d.ts +4 -2
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputLayout.js +14 -5
- package/transpiled/react/Contacts/AddModal/ContactForm/contactToFormValues.js +9 -2
- package/transpiled/react/Contacts/AddModal/ContactForm/fieldsConfig.js +41 -28
- package/transpiled/react/Contacts/AddModal/ContactForm/formValuesToContact.js +3 -1
- package/transpiled/react/Contacts/AddModal/ContactForm/helpers.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/helpers.js +39 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/index.js +18 -2
- package/transpiled/react/Contacts/AddModal/ContactForm/locales/index.js +4 -0
- package/transpiled/react/Contacts/AddModal/mocks.d.ts +19 -0
- package/transpiled/react/Contacts/AddModal/mocks.js +32 -0
- package/transpiled/react/Contacts/AddModal/types.d.ts +1 -1
- package/transpiled/react/Contacts/AddModal/types.js +1 -1
- package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Matrix.d.ts +2 -0
- package/transpiled/react/Icons/Matrix.js +13 -0
|
@@ -7,12 +7,14 @@ var contactToFormValues = function contactToFormValues(contact, t) {
|
|
|
7
7
|
// initialize the form values, required so that array fields start with at least one editable field
|
|
8
8
|
var initialFieldValues = fields.reduce(function (initialValues, _ref) {
|
|
9
9
|
var name = _ref.name,
|
|
10
|
-
|
|
11
|
-
initialValues[name] =
|
|
10
|
+
layout = _ref.layout;
|
|
11
|
+
initialValues[name] = layout === 'array' ? [undefined] : undefined;
|
|
12
12
|
return initialValues;
|
|
13
13
|
}, {});
|
|
14
14
|
|
|
15
15
|
if (contact) {
|
|
16
|
+
var _impp$find;
|
|
17
|
+
|
|
16
18
|
var gender = contact.gender,
|
|
17
19
|
address = contact.address,
|
|
18
20
|
birthday = contact.birthday,
|
|
@@ -21,6 +23,7 @@ var contactToFormValues = function contactToFormValues(contact, t) {
|
|
|
21
23
|
jobTitle = contact.jobTitle,
|
|
22
24
|
cozy = contact.cozy,
|
|
23
25
|
email = contact.email,
|
|
26
|
+
impp = contact.impp,
|
|
24
27
|
name = contact.name,
|
|
25
28
|
note = contact.note,
|
|
26
29
|
phone = contact.phone;
|
|
@@ -54,6 +57,9 @@ var contactToFormValues = function contactToFormValues(contact, t) {
|
|
|
54
57
|
emailLabel: makeItemLabel(item)
|
|
55
58
|
};
|
|
56
59
|
}) : [undefined];
|
|
60
|
+
var matrixValue = impp && impp.length > 0 ? ((_impp$find = impp.find(function (item) {
|
|
61
|
+
return item.label === 'work' && item.protocol === 'matrix';
|
|
62
|
+
})) === null || _impp$find === void 0 ? void 0 : _impp$find.uri) || undefined : undefined;
|
|
57
63
|
var phoneValue = phone && phone.length > 0 ? movePrimaryToHead(phone).map(function (item) {
|
|
58
64
|
return {
|
|
59
65
|
fieldId: uniqueId('fieldId_'),
|
|
@@ -70,6 +76,7 @@ var contactToFormValues = function contactToFormValues(contact, t) {
|
|
|
70
76
|
familyName: name === null || name === void 0 ? void 0 : name.familyName,
|
|
71
77
|
phone: phoneValue,
|
|
72
78
|
email: emailValue,
|
|
79
|
+
matrix: matrixValue,
|
|
73
80
|
address: addressValue,
|
|
74
81
|
cozy: cozyValue,
|
|
75
82
|
cozyLabel: cozyLabel,
|
|
@@ -7,6 +7,7 @@ import CommentIcon from "cozy-ui/transpiled/react/Icons/Comment";
|
|
|
7
7
|
import CompanyIcon from "cozy-ui/transpiled/react/Icons/Company";
|
|
8
8
|
import EmailIcon from "cozy-ui/transpiled/react/Icons/Email";
|
|
9
9
|
import LocationIcon from "cozy-ui/transpiled/react/Icons/Location";
|
|
10
|
+
import MatrixIcon from "cozy-ui/transpiled/react/Icons/Matrix";
|
|
10
11
|
import PeopleIcon from "cozy-ui/transpiled/react/Icons/People";
|
|
11
12
|
import RelationshipIcon from "cozy-ui/transpiled/react/Icons/Relationship";
|
|
12
13
|
import TelephoneIcon from "cozy-ui/transpiled/react/Icons/Telephone";
|
|
@@ -29,31 +30,36 @@ export var fields = [{
|
|
|
29
30
|
}, {
|
|
30
31
|
name: 'givenName',
|
|
31
32
|
icon: null,
|
|
32
|
-
type: 'text'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
type: 'text',
|
|
34
|
+
layout: 'accordion',
|
|
35
|
+
subFields: [{
|
|
36
|
+
name: 'additionalName',
|
|
37
|
+
icon: null,
|
|
38
|
+
type: 'text'
|
|
39
|
+
}, {
|
|
40
|
+
name: 'surname',
|
|
41
|
+
icon: null,
|
|
42
|
+
type: 'text'
|
|
43
|
+
}]
|
|
37
44
|
}, {
|
|
38
45
|
name: 'familyName',
|
|
39
46
|
icon: null,
|
|
40
47
|
type: 'text'
|
|
41
|
-
}, {
|
|
42
|
-
name: 'surname',
|
|
43
|
-
icon: null,
|
|
44
|
-
type: 'text'
|
|
45
48
|
}, {
|
|
46
49
|
name: 'company',
|
|
47
50
|
icon: CompanyIcon,
|
|
48
|
-
type: 'text'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
type: 'text',
|
|
52
|
+
layout: 'accordion',
|
|
53
|
+
subFields: [{
|
|
54
|
+
name: 'jobTitle',
|
|
55
|
+
icon: null,
|
|
56
|
+
type: 'text'
|
|
57
|
+
}]
|
|
53
58
|
}, {
|
|
54
59
|
name: 'phone',
|
|
55
60
|
icon: TelephoneIcon,
|
|
56
61
|
type: 'tel',
|
|
62
|
+
layout: 'array',
|
|
57
63
|
label: {
|
|
58
64
|
name: 'phoneLabel',
|
|
59
65
|
select: true,
|
|
@@ -83,12 +89,12 @@ export var fields = [{
|
|
|
83
89
|
value: '{"type":"fax","label":"work"}',
|
|
84
90
|
label: 'Contacts.AddModal.ContactForm.label.phone.fax-work'
|
|
85
91
|
}]
|
|
86
|
-
}
|
|
87
|
-
isArray: true
|
|
92
|
+
}
|
|
88
93
|
}, {
|
|
89
94
|
name: 'email',
|
|
90
95
|
icon: EmailIcon,
|
|
91
96
|
type: 'email',
|
|
97
|
+
layout: 'array',
|
|
92
98
|
label: {
|
|
93
99
|
name: 'emailLabel',
|
|
94
100
|
select: true,
|
|
@@ -106,12 +112,16 @@ export var fields = [{
|
|
|
106
112
|
value: '{"label":"work"}',
|
|
107
113
|
label: 'Contacts.AddModal.ContactForm.label.work'
|
|
108
114
|
}]
|
|
109
|
-
}
|
|
110
|
-
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
name: 'matrix',
|
|
118
|
+
icon: MatrixIcon,
|
|
119
|
+
type: 'text'
|
|
111
120
|
}, {
|
|
112
121
|
name: 'address',
|
|
113
122
|
icon: LocationIcon,
|
|
114
123
|
type: 'text',
|
|
124
|
+
layout: 'array',
|
|
115
125
|
InputProps: {
|
|
116
126
|
readOnly: true
|
|
117
127
|
},
|
|
@@ -181,12 +191,17 @@ export var fields = [{
|
|
|
181
191
|
value: '{"label":"work"}',
|
|
182
192
|
label: 'Contacts.AddModal.ContactForm.label.address.work'
|
|
183
193
|
}]
|
|
184
|
-
}
|
|
185
|
-
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
name: 'note',
|
|
197
|
+
icon: CommentIcon,
|
|
198
|
+
type: 'text',
|
|
199
|
+
multiline: true
|
|
186
200
|
}, {
|
|
187
201
|
name: 'cozy',
|
|
188
202
|
icon: CloudIcon,
|
|
189
203
|
type: 'url',
|
|
204
|
+
isSecondary: true,
|
|
190
205
|
label: {
|
|
191
206
|
name: 'cozyLabel',
|
|
192
207
|
select: true,
|
|
@@ -209,16 +224,20 @@ export var fields = [{
|
|
|
209
224
|
name: 'birthday',
|
|
210
225
|
icon: CalendarIcon,
|
|
211
226
|
type: 'date',
|
|
227
|
+
isSecondary: true,
|
|
212
228
|
InputLabelProps: {
|
|
213
229
|
shrink: true
|
|
214
230
|
}
|
|
215
231
|
}, {
|
|
216
232
|
name: 'birthplace',
|
|
217
233
|
icon: null,
|
|
218
|
-
type: 'text'
|
|
234
|
+
type: 'text',
|
|
235
|
+
isSecondary: true
|
|
219
236
|
}, {
|
|
220
237
|
name: 'relatedContact',
|
|
221
238
|
icon: RelationshipIcon,
|
|
239
|
+
layout: 'array',
|
|
240
|
+
isSecondary: true,
|
|
222
241
|
InputProps: {
|
|
223
242
|
readOnly: true,
|
|
224
243
|
endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
|
|
@@ -268,11 +287,5 @@ export var fields = [{
|
|
|
268
287
|
value: '{"type":"recipient"}',
|
|
269
288
|
label: 'Contacts.AddModal.ContactForm.label.relationship.recipient'
|
|
270
289
|
}]
|
|
271
|
-
}
|
|
272
|
-
isArray: true
|
|
273
|
-
}, {
|
|
274
|
-
name: 'note',
|
|
275
|
-
icon: CommentIcon,
|
|
276
|
-
type: 'text',
|
|
277
|
-
multiline: true
|
|
290
|
+
}
|
|
278
291
|
}];
|
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { updateIndexFullNameAndDisplayName } from 'cozy-client/dist/models/contact';
|
|
8
|
-
import { removeAsscociatedData, removeRelatedContactRelationships, createAddress, getRelatedContactRelationships, makeTypeAndLabel } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/helpers";
|
|
8
|
+
import { removeAsscociatedData, removeRelatedContactRelationships, createAddress, getRelatedContactRelationships, makeImppValues, makeTypeAndLabel } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/helpers";
|
|
9
9
|
|
|
10
10
|
var formValuesToContact = function formValuesToContact(_ref) {
|
|
11
11
|
var formValues = _ref.formValues,
|
|
@@ -19,6 +19,7 @@ var formValuesToContact = function formValuesToContact(_ref) {
|
|
|
19
19
|
phone = formValues.phone,
|
|
20
20
|
email = formValues.email,
|
|
21
21
|
address = formValues.address,
|
|
22
|
+
matrix = formValues.matrix,
|
|
22
23
|
cozy = formValues.cozy,
|
|
23
24
|
company = formValues.company,
|
|
24
25
|
jobTitle = formValues.jobTitle,
|
|
@@ -55,6 +56,7 @@ var formValuesToContact = function formValuesToContact(_ref) {
|
|
|
55
56
|
primary: index === 0
|
|
56
57
|
});
|
|
57
58
|
}) : [],
|
|
59
|
+
impp: makeImppValues(oldContactCleaned, matrix),
|
|
58
60
|
address: createAddress({
|
|
59
61
|
address: address,
|
|
60
62
|
oldContact: oldContactCleaned,
|
|
@@ -25,4 +25,10 @@ export function makeRelatedContact(contact: import('cozy-client/types/types').IO
|
|
|
25
25
|
export function addField(fields: any): any;
|
|
26
26
|
export function removeField(fields: any, index: any): void;
|
|
27
27
|
export function makeCustomLabel(value: string, t: func): string;
|
|
28
|
+
export function makeImppValues(oldContact: import('cozy-client/types/types').IOCozyContact, value: string | null): {
|
|
29
|
+
uri: string;
|
|
30
|
+
protocol: string;
|
|
31
|
+
label: string;
|
|
32
|
+
primary?: boolean;
|
|
33
|
+
}[];
|
|
28
34
|
export function makeInitialCustomValue(name: string, value: string): string;
|
|
@@ -282,6 +282,45 @@ export var makeCustomLabel = function makeCustomLabel(value, t) {
|
|
|
282
282
|
var secondString = label ? type ? " (".concat(t("Contacts.AddModal.ContactForm.label.".concat(label)), ")").toLowerCase() : "label.".concat(label) : '';
|
|
283
283
|
return firstString + secondString || null;
|
|
284
284
|
};
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
* @param {import('cozy-client/types/types').IOCozyContact} oldContact - Contact to be modified
|
|
288
|
+
* @param {string?} value - New URI value to add to the Contact
|
|
289
|
+
* @returns {{ uri: string, protocol: string, label: string, primary?: boolean }[]}
|
|
290
|
+
*/
|
|
291
|
+
|
|
292
|
+
export var makeImppValues = function makeImppValues(oldContact, value) {
|
|
293
|
+
var _value = (value === null || value === void 0 ? void 0 : value.trim()) || '';
|
|
294
|
+
|
|
295
|
+
var oldImppValues = oldContact === null || oldContact === void 0 ? void 0 : oldContact.impp;
|
|
296
|
+
|
|
297
|
+
if (_value) {
|
|
298
|
+
if (!oldImppValues || oldImppValues.length === 0) {
|
|
299
|
+
return [{
|
|
300
|
+
uri: _value,
|
|
301
|
+
protocol: 'matrix',
|
|
302
|
+
label: 'work',
|
|
303
|
+
primary: true
|
|
304
|
+
}];
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return oldImppValues.map(function (el) {
|
|
308
|
+
if (el.protocol === 'matrix' && el.label === 'work') {
|
|
309
|
+
return _objectSpread(_objectSpread({}, el), {}, {
|
|
310
|
+
uri: _value
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return el;
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return (oldImppValues === null || oldImppValues === void 0 ? void 0 : oldImppValues.map(function (el) {
|
|
319
|
+
if (el.protocol !== 'matrix' || el.label !== 'work') {
|
|
320
|
+
return el;
|
|
321
|
+
}
|
|
322
|
+
}).filter(Boolean)) || [];
|
|
323
|
+
};
|
|
285
324
|
/**
|
|
286
325
|
*
|
|
287
326
|
* @param {string} name
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
|
|
3
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
5
|
|
|
5
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
7
|
|
|
7
8
|
import arrayMutators from 'final-form-arrays';
|
|
8
|
-
import React from 'react';
|
|
9
|
+
import React, { useState } from 'react';
|
|
9
10
|
import { Form } from 'react-final-form';
|
|
10
11
|
import { getHasManyItems } from 'cozy-client/dist/associations/HasMany';
|
|
11
12
|
import FieldInputLayout from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/FieldInputLayout";
|
|
@@ -14,6 +15,7 @@ import { fields } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/f
|
|
|
14
15
|
import formValuesToContact from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/formValuesToContact";
|
|
15
16
|
import { validateFields } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/helpers";
|
|
16
17
|
import { locales } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm/locales";
|
|
18
|
+
import Button from "cozy-ui/transpiled/react/Buttons";
|
|
17
19
|
import { useI18n, useExtendI18n } from "cozy-ui/transpiled/react/providers/I18n"; // import { fullContactPropTypes } from '../../ContactPropTypes' // !!
|
|
18
20
|
// this variable will be set in the form's render prop
|
|
19
21
|
// and used by the submit button in ContactFormModal
|
|
@@ -42,6 +44,12 @@ var ContactForm = function ContactForm(_ref) {
|
|
|
42
44
|
var contact = _ref.contact,
|
|
43
45
|
_onSubmit = _ref.onSubmit,
|
|
44
46
|
contacts = _ref.contacts;
|
|
47
|
+
|
|
48
|
+
var _useState = useState(false),
|
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
+
showSecondaryFields = _useState2[0],
|
|
51
|
+
setShowSecondaryFields = _useState2[1];
|
|
52
|
+
|
|
45
53
|
useExtendI18n(locales);
|
|
46
54
|
|
|
47
55
|
var _useI18n = useI18n(),
|
|
@@ -75,13 +83,21 @@ var ContactForm = function ContactForm(_ref) {
|
|
|
75
83
|
key: index,
|
|
76
84
|
attributes: attributes,
|
|
77
85
|
contacts: contacts,
|
|
86
|
+
showSecondaryFields: showSecondaryFields,
|
|
78
87
|
formProps: {
|
|
79
88
|
valid: valid,
|
|
80
89
|
submitFailed: submitFailed,
|
|
81
90
|
errors: errors
|
|
82
91
|
}
|
|
83
92
|
});
|
|
84
|
-
})
|
|
93
|
+
}), !showSecondaryFields && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
94
|
+
className: "u-db u-ml-2 u-mt-1",
|
|
95
|
+
variant: "text",
|
|
96
|
+
label: t('Contacts.AddModal.ContactForm.other-fields'),
|
|
97
|
+
onClick: function onClick() {
|
|
98
|
+
return setShowSecondaryFields(true);
|
|
99
|
+
}
|
|
100
|
+
})));
|
|
85
101
|
}
|
|
86
102
|
});
|
|
87
103
|
}; // Used to avoid unnecessary multiple rendering of ContactForm when creating a new contact in another way.
|
|
@@ -6,6 +6,7 @@ var en = {
|
|
|
6
6
|
man: "Man",
|
|
7
7
|
woman: "Woman"
|
|
8
8
|
},
|
|
9
|
+
"other-fields": "Other fields",
|
|
9
10
|
fields: {
|
|
10
11
|
gender: "Civility",
|
|
11
12
|
givenName: "Firstname",
|
|
@@ -14,6 +15,7 @@ var en = {
|
|
|
14
15
|
familyName: "Lastname",
|
|
15
16
|
phone: "Phone",
|
|
16
17
|
email: "Email",
|
|
18
|
+
matrix: "Matrix ID",
|
|
17
19
|
address: "Address",
|
|
18
20
|
cozy: "Twake URL",
|
|
19
21
|
company: "Company",
|
|
@@ -79,6 +81,7 @@ var fr = {
|
|
|
79
81
|
man: "Homme",
|
|
80
82
|
woman: "Femme"
|
|
81
83
|
},
|
|
84
|
+
"other-fields": "Autres champs",
|
|
82
85
|
fields: {
|
|
83
86
|
gender: "Civilit\xE9",
|
|
84
87
|
givenName: "Pr\xE9nom",
|
|
@@ -88,6 +91,7 @@ var fr = {
|
|
|
88
91
|
phone: "T\xE9l\xE9phone",
|
|
89
92
|
email: "Email",
|
|
90
93
|
address: "Adresse",
|
|
94
|
+
matrix: "ID Matrix",
|
|
91
95
|
cozy: "URL du Twake",
|
|
92
96
|
company: "Entreprise",
|
|
93
97
|
jobTitle: "Fonction",
|
|
@@ -33,6 +33,17 @@ export namespace johnDoeContact {
|
|
|
33
33
|
primary: boolean;
|
|
34
34
|
type?: undefined;
|
|
35
35
|
})[];
|
|
36
|
+
const impp: ({
|
|
37
|
+
uri: string;
|
|
38
|
+
protocol: string;
|
|
39
|
+
label: string;
|
|
40
|
+
primary: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
uri: string;
|
|
43
|
+
protocol: string;
|
|
44
|
+
label: string;
|
|
45
|
+
primary?: undefined;
|
|
46
|
+
})[];
|
|
36
47
|
const birthday: string;
|
|
37
48
|
const birthplace: string;
|
|
38
49
|
const gender: string;
|
|
@@ -70,6 +81,7 @@ export namespace johnDoeFormValues {
|
|
|
70
81
|
const cozy_2: string;
|
|
71
82
|
export { cozy_2 as cozy };
|
|
72
83
|
export const cozyLabel: string;
|
|
84
|
+
export const matrix: string;
|
|
73
85
|
const address_1: ({
|
|
74
86
|
fieldId: string;
|
|
75
87
|
address: string;
|
|
@@ -168,6 +180,13 @@ export namespace johnDoeContactWithRelated {
|
|
|
168
180
|
primary?: undefined;
|
|
169
181
|
})[];
|
|
170
182
|
export { address_2 as address };
|
|
183
|
+
const impp_1: {
|
|
184
|
+
uri: string;
|
|
185
|
+
protocol: string;
|
|
186
|
+
label: string;
|
|
187
|
+
primary: boolean;
|
|
188
|
+
}[];
|
|
189
|
+
export { impp_1 as impp };
|
|
171
190
|
const email_2: ({
|
|
172
191
|
address: string;
|
|
173
192
|
type: string;
|
|
@@ -24,6 +24,26 @@ export var johnDoeContact = {
|
|
|
24
24
|
address: 'john.doe@cozycloud.cc',
|
|
25
25
|
primary: true
|
|
26
26
|
}],
|
|
27
|
+
impp: [{
|
|
28
|
+
uri: 'john.doe@xmpp.net',
|
|
29
|
+
protocol: 'xmpp',
|
|
30
|
+
label: 'home',
|
|
31
|
+
primary: false
|
|
32
|
+
}, {
|
|
33
|
+
uri: 'john.doe@xmpp.net',
|
|
34
|
+
protocol: 'xmpp',
|
|
35
|
+
label: 'work',
|
|
36
|
+
primary: false
|
|
37
|
+
}, {
|
|
38
|
+
uri: 'john@doe.matrix.net',
|
|
39
|
+
protocol: 'matrix',
|
|
40
|
+
label: 'work',
|
|
41
|
+
primary: true
|
|
42
|
+
}, {
|
|
43
|
+
uri: 'john@doe.matrix.home',
|
|
44
|
+
protocol: 'matrix',
|
|
45
|
+
label: 'home'
|
|
46
|
+
}],
|
|
27
47
|
birthday: '1999-5-1',
|
|
28
48
|
birthplace: 'somewhere',
|
|
29
49
|
gender: 'male',
|
|
@@ -59,6 +79,7 @@ export var johnDoeFormValues = {
|
|
|
59
79
|
gender: 'male',
|
|
60
80
|
cozy: 'https://johndoe.mycozy.cloud',
|
|
61
81
|
cozyLabel: '{"type":"MyCozy"}',
|
|
82
|
+
matrix: 'john@doe.matrix.net',
|
|
62
83
|
address: [{
|
|
63
84
|
fieldId: 'fieldId_1',
|
|
64
85
|
address: '94 Hinton Road 05034 Fresno, Singapore',
|
|
@@ -139,6 +160,17 @@ export var johnDoeContactWithRelated = {
|
|
|
139
160
|
postcode: '84573',
|
|
140
161
|
type: 'Work'
|
|
141
162
|
}],
|
|
163
|
+
impp: [{
|
|
164
|
+
uri: 'john.doe@xmpp.net',
|
|
165
|
+
protocol: 'xmpp',
|
|
166
|
+
label: 'home',
|
|
167
|
+
primary: false
|
|
168
|
+
}, {
|
|
169
|
+
uri: 'john@doe.matrix.net',
|
|
170
|
+
protocol: 'matrix',
|
|
171
|
+
label: 'work',
|
|
172
|
+
primary: true
|
|
173
|
+
}],
|
|
142
174
|
email: [{
|
|
143
175
|
address: 'john.doe@posteo.net',
|
|
144
176
|
type: 'personal',
|
|
@@ -26,7 +26,7 @@ export const fieldInputAttributesTypes: PropTypes.Requireable<PropTypes.InferPro
|
|
|
26
26
|
defaultLabel: PropTypes.Requireable<string>;
|
|
27
27
|
}>>;
|
|
28
28
|
}>>;
|
|
29
|
-
|
|
29
|
+
layout: PropTypes.Requireable<string>;
|
|
30
30
|
subFields: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
31
31
|
name: PropTypes.Validator<string>;
|
|
32
32
|
icon: PropTypes.Requireable<string>;
|
|
@@ -17,7 +17,7 @@ export var fieldInputAttributesTypes = PropTypes.shape({
|
|
|
17
17
|
icon: iconPropType,
|
|
18
18
|
type: PropTypes.string,
|
|
19
19
|
label: labelPropTypes,
|
|
20
|
-
|
|
20
|
+
layout: PropTypes.string,
|
|
21
21
|
subFields: PropTypes.arrayOf(PropTypes.shape({
|
|
22
22
|
name: PropTypes.string.isRequired,
|
|
23
23
|
icon: PropTypes.string,
|