cozy-ui 128.2.0 → 128.3.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 +8 -0
- package/package.json +5 -1
- package/react/Contacts/AddModal/ContactAddressDialog/helpers.js +22 -0
- package/react/Contacts/AddModal/ContactAddressDialog/helpers.spec.js +64 -0
- package/react/Contacts/AddModal/ContactAddressDialog/index.jsx +84 -0
- package/react/Contacts/AddModal/ContactAddressDialog/locales/en.json +25 -0
- package/react/Contacts/AddModal/ContactAddressDialog/locales/fr.json +25 -0
- package/react/Contacts/AddModal/ContactAddressDialog/locales/index.jsx +7 -0
- package/react/Contacts/AddModal/ContactForm/FieldInput.jsx +117 -0
- package/react/Contacts/AddModal/ContactForm/FieldInputArray.jsx +80 -0
- package/react/Contacts/AddModal/ContactForm/FieldInputLayout.jsx +65 -0
- package/react/Contacts/AddModal/ContactForm/FieldInputWrapper.jsx +41 -0
- package/react/Contacts/AddModal/ContactForm/HasValueCondition.jsx +31 -0
- package/react/Contacts/AddModal/ContactForm/HasValueCondition.spec.jsx +79 -0
- package/react/Contacts/AddModal/ContactForm/RelatedContactList.jsx +37 -0
- package/react/Contacts/AddModal/ContactForm/TextFieldCustomLabelSelect.jsx +78 -0
- package/react/Contacts/AddModal/ContactForm/TextFieldSelect.jsx +39 -0
- package/react/Contacts/AddModal/ContactForm/__snapshots__/HasValueCondition.spec.jsx.snap +33 -0
- package/react/Contacts/AddModal/ContactForm/contactToFormValues.js +99 -0
- package/react/Contacts/AddModal/ContactForm/contactToFormValues.spec.js +128 -0
- package/react/Contacts/AddModal/ContactForm/fieldsConfig.jsx +341 -0
- package/react/Contacts/AddModal/ContactForm/formValuesToContact.js +100 -0
- package/react/Contacts/AddModal/ContactForm/formValuesToContact.spec.js +494 -0
- package/react/Contacts/AddModal/ContactForm/helpers.js +324 -0
- package/react/Contacts/AddModal/ContactForm/helpers.spec.js +152 -0
- package/react/Contacts/AddModal/ContactForm/index.jsx +104 -0
- package/react/Contacts/AddModal/ContactForm/index.spec.jsx +289 -0
- package/react/Contacts/AddModal/ContactForm/locales/en.json +73 -0
- package/react/Contacts/AddModal/ContactForm/locales/fr.json +73 -0
- package/react/Contacts/AddModal/ContactForm/locales/index.jsx +7 -0
- package/react/Contacts/AddModal/ContactForm/styles.styl +2 -0
- package/react/Contacts/AddModal/CustomLabelDialog/index.jsx +108 -0
- package/react/Contacts/AddModal/CustomLabelDialog/locales/en.json +15 -0
- package/react/Contacts/AddModal/CustomLabelDialog/locales/fr.json +15 -0
- package/react/Contacts/AddModal/CustomLabelDialog/locales/index.jsx +7 -0
- package/react/Contacts/AddModal/Readme.md +46 -0
- package/react/Contacts/AddModal/index.jsx +78 -0
- package/react/Contacts/AddModal/locales/en.json +13 -0
- package/react/Contacts/AddModal/locales/fr.json +13 -0
- package/react/Contacts/AddModal/locales/index.jsx +7 -0
- package/react/Contacts/AddModal/mocks.js +249 -0
- package/react/Contacts/AddModal/types.js +57 -0
- package/react/Contacts/Header/Readme.md +0 -2
- package/react/providers/DemoProvider.jsx +3 -2
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/helpers.d.ts +4 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/helpers.js +20 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/helpers.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/index.d.ts +39 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/index.js +87 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/locales/index.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/ContactAddressDialog/locales/index.js +54 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInput.d.ts +35 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInput.js +126 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputArray.d.ts +14 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputArray.js +82 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputLayout.d.ts +20 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputLayout.js +70 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputWrapper.d.ts +16 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/FieldInputWrapper.js +31 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/HasValueCondition.d.ts +18 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/HasValueCondition.js +32 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/HasValueCondition.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/RelatedContactList.d.ts +15 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/RelatedContactList.js +39 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/TextFieldCustomLabelSelect.d.ts +9 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/TextFieldCustomLabelSelect.js +81 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/TextFieldSelect.d.ts +5 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/TextFieldSelect.js +42 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/contactToFormValues.d.ts +2 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/contactToFormValues.js +88 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/contactToFormValues.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/fieldsConfig.d.ts +4 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/fieldsConfig.js +278 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/formValuesToContact.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/formValuesToContact.js +94 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/formValuesToContact.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/helpers.d.ts +28 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/helpers.js +335 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/helpers.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/index.d.ts +11 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/index.js +114 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/index.spec.d.ts +1 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/locales/index.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/ContactForm/locales/index.js +150 -0
- package/transpiled/react/Contacts/AddModal/CustomLabelDialog/index.d.ts +22 -0
- package/transpiled/react/Contacts/AddModal/CustomLabelDialog/index.js +113 -0
- package/transpiled/react/Contacts/AddModal/CustomLabelDialog/locales/index.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/CustomLabelDialog/locales/index.js +34 -0
- package/transpiled/react/Contacts/AddModal/index.d.ts +7 -0
- package/transpiled/react/Contacts/AddModal/index.js +109 -0
- package/transpiled/react/Contacts/AddModal/locales/index.d.ts +6 -0
- package/transpiled/react/Contacts/AddModal/locales/index.js +30 -0
- package/transpiled/react/Contacts/AddModal/mocks.d.ts +270 -0
- package/transpiled/react/Contacts/AddModal/mocks.js +214 -0
- package/transpiled/react/Contacts/AddModal/types.d.ts +54 -0
- package/transpiled/react/Contacts/AddModal/types.js +49 -0
- package/transpiled/react/providers/DemoProvider.d.ts +2 -1
- package/transpiled/react/providers/DemoProvider.js +7 -3
- package/transpiled/react/stylesheet.css +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { locales } from "cozy-ui/transpiled/react/Contacts/AddModal/CustomLabelDialog/locales";
|
|
5
|
+
import Button from "cozy-ui/transpiled/react/Buttons";
|
|
6
|
+
import { ConfirmDialog } from "cozy-ui/transpiled/react/CozyDialogs";
|
|
7
|
+
import FormControlLabel from "cozy-ui/transpiled/react/FormControlLabel";
|
|
8
|
+
import RadioGroup from "cozy-ui/transpiled/react/RadioGroup";
|
|
9
|
+
import Radio from "cozy-ui/transpiled/react/Radios";
|
|
10
|
+
import TextField from "cozy-ui/transpiled/react/TextField";
|
|
11
|
+
import { useBreakpoints } from "cozy-ui/transpiled/react/providers/Breakpoints";
|
|
12
|
+
import { useI18n, useExtendI18n } from "cozy-ui/transpiled/react/providers/I18n";
|
|
13
|
+
|
|
14
|
+
var CustomLabelDialog = function CustomLabelDialog(_ref) {
|
|
15
|
+
var customValue = _ref.customValue,
|
|
16
|
+
setCustomValue = _ref.setCustomValue,
|
|
17
|
+
customLabelOptions = _ref.customLabelOptions,
|
|
18
|
+
onSubmit = _ref.onSubmit,
|
|
19
|
+
onClose = _ref.onClose;
|
|
20
|
+
var customValueObj = JSON.parse(customValue || '{}');
|
|
21
|
+
useExtendI18n(locales);
|
|
22
|
+
|
|
23
|
+
var _useI18n = useI18n(),
|
|
24
|
+
t = _useI18n.t;
|
|
25
|
+
|
|
26
|
+
var _useBreakpoints = useBreakpoints(),
|
|
27
|
+
isMobile = _useBreakpoints.isMobile;
|
|
28
|
+
|
|
29
|
+
var _useState = useState(customValueObj.type || customLabelOptions.defaultType),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
type = _useState2[0],
|
|
32
|
+
setType = _useState2[1];
|
|
33
|
+
|
|
34
|
+
var _useState3 = useState(customValueObj.label || customLabelOptions.defaultLabel),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
label = _useState4[0],
|
|
37
|
+
setLabel = _useState4[1];
|
|
38
|
+
|
|
39
|
+
var handleSubmit = function handleSubmit() {
|
|
40
|
+
setCustomValue(JSON.stringify({
|
|
41
|
+
type: type,
|
|
42
|
+
label: label
|
|
43
|
+
}));
|
|
44
|
+
onSubmit({
|
|
45
|
+
target: {
|
|
46
|
+
value: JSON.stringify({
|
|
47
|
+
type: type,
|
|
48
|
+
label: label
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
onClose();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return /*#__PURE__*/React.createElement(ConfirmDialog, {
|
|
56
|
+
open: true,
|
|
57
|
+
title: t('Contacts.AddModal.CustomLabelDialog.label.custom'),
|
|
58
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextField, {
|
|
59
|
+
className: "u-mt-half",
|
|
60
|
+
variant: "outlined",
|
|
61
|
+
fullWidth: true,
|
|
62
|
+
autoFocus: true,
|
|
63
|
+
value: type,
|
|
64
|
+
onChange: function onChange(ev) {
|
|
65
|
+
return setType(ev.target.value);
|
|
66
|
+
}
|
|
67
|
+
}), !customLabelOptions.hide && /*#__PURE__*/React.createElement(RadioGroup, {
|
|
68
|
+
style: {
|
|
69
|
+
flexDirection: 'row'
|
|
70
|
+
},
|
|
71
|
+
className: "u-mt-half u-ml-half",
|
|
72
|
+
"aria-label": "radio",
|
|
73
|
+
name: "label",
|
|
74
|
+
value: label,
|
|
75
|
+
onChange: function onChange(ev) {
|
|
76
|
+
return setLabel(ev.target.value);
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
79
|
+
value: "home",
|
|
80
|
+
label: t('Contacts.AddModal.CustomLabelDialog.label.home'),
|
|
81
|
+
control: /*#__PURE__*/React.createElement(Radio, null)
|
|
82
|
+
}), /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
83
|
+
value: "work",
|
|
84
|
+
label: t('Contacts.AddModal.CustomLabelDialog.label.work'),
|
|
85
|
+
control: /*#__PURE__*/React.createElement(Radio, null)
|
|
86
|
+
}))),
|
|
87
|
+
actions: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
fullWidth: isMobile,
|
|
90
|
+
label: t('Contacts.AddModal.CustomLabelDialog.cancel'),
|
|
91
|
+
onClick: onClose
|
|
92
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
93
|
+
label: t('Contacts.AddModal.CustomLabelDialog.ok'),
|
|
94
|
+
fullWidth: isMobile,
|
|
95
|
+
disabled: !type,
|
|
96
|
+
onClick: handleSubmit
|
|
97
|
+
})),
|
|
98
|
+
onClose: onClose
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
CustomLabelDialog.propTypes = {
|
|
103
|
+
customValue: PropTypes.string,
|
|
104
|
+
setCustomValue: PropTypes.func,
|
|
105
|
+
customLabelOptions: PropTypes.shape({
|
|
106
|
+
hide: PropTypes.bool,
|
|
107
|
+
defaultType: PropTypes.string,
|
|
108
|
+
defaultLabel: PropTypes.string
|
|
109
|
+
}),
|
|
110
|
+
onSubmit: PropTypes.func,
|
|
111
|
+
onClose: PropTypes.func
|
|
112
|
+
};
|
|
113
|
+
export default CustomLabelDialog;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var en = {
|
|
2
|
+
Contacts: {
|
|
3
|
+
AddModal: {
|
|
4
|
+
CustomLabelDialog: {
|
|
5
|
+
label: {
|
|
6
|
+
custom: "Customised label",
|
|
7
|
+
home: "Personal",
|
|
8
|
+
work: "Pro"
|
|
9
|
+
},
|
|
10
|
+
cancel: "Cancel",
|
|
11
|
+
ok: "Ok"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var fr = {
|
|
17
|
+
Contacts: {
|
|
18
|
+
AddModal: {
|
|
19
|
+
CustomLabelDialog: {
|
|
20
|
+
label: {
|
|
21
|
+
custom: "Libell\xE9 personnalis\xE9",
|
|
22
|
+
home: "Perso",
|
|
23
|
+
work: "Pro"
|
|
24
|
+
},
|
|
25
|
+
cancel: "Annuler",
|
|
26
|
+
ok: "Ok"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export var locales = {
|
|
32
|
+
en: en,
|
|
33
|
+
fr: fr
|
|
34
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import ContactForm, { getSubmitContactForm } from "cozy-ui/transpiled/react/Contacts/AddModal/ContactForm";
|
|
6
|
+
import { locales } from "cozy-ui/transpiled/react/Contacts/AddModal/locales";
|
|
7
|
+
import Button from "cozy-ui/transpiled/react/Buttons";
|
|
8
|
+
import { FixedDialog } from "cozy-ui/transpiled/react/CozyDialogs";
|
|
9
|
+
import { useAlert } from "cozy-ui/transpiled/react/providers/Alert";
|
|
10
|
+
import { useI18n, useExtendI18n } from "cozy-ui/transpiled/react/providers/I18n";
|
|
11
|
+
|
|
12
|
+
var AddModal = function AddModal(_ref) {
|
|
13
|
+
var contacts = _ref.contacts,
|
|
14
|
+
contact = _ref.contact,
|
|
15
|
+
onSubmit = _ref.onSubmit,
|
|
16
|
+
onClose = _ref.onClose;
|
|
17
|
+
useExtendI18n(locales);
|
|
18
|
+
|
|
19
|
+
var _useI18n = useI18n(),
|
|
20
|
+
t = _useI18n.t;
|
|
21
|
+
|
|
22
|
+
var _useAlert = useAlert(),
|
|
23
|
+
showAlert = _useAlert.showAlert;
|
|
24
|
+
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
isBusy = _useState2[0],
|
|
28
|
+
setIsBusy = _useState2[1]; // Tip to prevent fields from being filled with old information for a short period of time during form submission.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var _useState3 = useState(contact),
|
|
32
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
33
|
+
selfContact = _useState4[0],
|
|
34
|
+
setSelfContact = _useState4[1];
|
|
35
|
+
|
|
36
|
+
var handleClick = function handleClick(event) {
|
|
37
|
+
var submitContactForm = getSubmitContactForm();
|
|
38
|
+
submitContactForm(event);
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @param {import('cozy-client/types/types').IOCozyContact} formData - Contact document (except _id, _rev & _type attrs to create a new contact)
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var handleFormSubmit = /*#__PURE__*/function () {
|
|
46
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(formData) {
|
|
47
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
48
|
+
while (1) {
|
|
49
|
+
switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
setSelfContact(formData);
|
|
52
|
+
setIsBusy(true);
|
|
53
|
+
_context.prev = 2;
|
|
54
|
+
_context.next = 5;
|
|
55
|
+
return onSubmit(formData);
|
|
56
|
+
|
|
57
|
+
case 5:
|
|
58
|
+
onClose();
|
|
59
|
+
_context.next = 13;
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case 8:
|
|
63
|
+
_context.prev = 8;
|
|
64
|
+
_context.t0 = _context["catch"](2);
|
|
65
|
+
setIsBusy(false);
|
|
66
|
+
console.warn(_context.t0); // eslint-disable-line no-console
|
|
67
|
+
|
|
68
|
+
showAlert({
|
|
69
|
+
severity: 'error',
|
|
70
|
+
message: t('Contacts.AddModal.error.save')
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
case 13:
|
|
74
|
+
case "end":
|
|
75
|
+
return _context.stop();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, _callee, null, [[2, 8]]);
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
return function handleFormSubmit(_x) {
|
|
82
|
+
return _ref2.apply(this, arguments);
|
|
83
|
+
};
|
|
84
|
+
}();
|
|
85
|
+
|
|
86
|
+
return /*#__PURE__*/React.createElement(FixedDialog, {
|
|
87
|
+
open: true,
|
|
88
|
+
onClose: onClose,
|
|
89
|
+
title: contact ? t('Contacts.AddModal.edit-contact') : t('Contacts.AddModal.create_contact'),
|
|
90
|
+
content: /*#__PURE__*/React.createElement(ContactForm, {
|
|
91
|
+
contacts: contacts,
|
|
92
|
+
contact: selfContact,
|
|
93
|
+
onSubmit: handleFormSubmit
|
|
94
|
+
}),
|
|
95
|
+
actions: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
96
|
+
variant: "secondary",
|
|
97
|
+
label: t('Contacts.AddModal.cancel'),
|
|
98
|
+
onClick: onClose
|
|
99
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
100
|
+
className: "u-ml-half",
|
|
101
|
+
type: "submit",
|
|
102
|
+
label: t('Contacts.AddModal.save'),
|
|
103
|
+
busy: isBusy,
|
|
104
|
+
onClick: handleClick
|
|
105
|
+
}))
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default AddModal;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var en = {
|
|
2
|
+
Contacts: {
|
|
3
|
+
AddModal: {
|
|
4
|
+
error: {
|
|
5
|
+
save: "An error occurred while saving the contact, please try again"
|
|
6
|
+
},
|
|
7
|
+
"edit-contact": "Edit contact",
|
|
8
|
+
create_contact: "Create a contact",
|
|
9
|
+
cancel: "Cancel",
|
|
10
|
+
save: "Save"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var fr = {
|
|
15
|
+
Contacts: {
|
|
16
|
+
AddModal: {
|
|
17
|
+
error: {
|
|
18
|
+
save: "Une erreur est survenue lors de l'enregistrement du contact, veuillez r\xE9essayer"
|
|
19
|
+
},
|
|
20
|
+
"edit-contact": "Edit contact",
|
|
21
|
+
create_contact: "Cr\xE9er un contact",
|
|
22
|
+
cancel: "Annuler",
|
|
23
|
+
save: "Enregistrer"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export var locales = {
|
|
28
|
+
en: en,
|
|
29
|
+
fr: fr
|
|
30
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
export namespace johnDoeContact {
|
|
2
|
+
const id: string;
|
|
3
|
+
const _id: string;
|
|
4
|
+
const _type: string;
|
|
5
|
+
const _rev: string;
|
|
6
|
+
const address: ({
|
|
7
|
+
formattedAddress: string;
|
|
8
|
+
type: string;
|
|
9
|
+
primary: boolean;
|
|
10
|
+
pobox?: undefined;
|
|
11
|
+
street?: undefined;
|
|
12
|
+
city?: undefined;
|
|
13
|
+
region?: undefined;
|
|
14
|
+
country?: undefined;
|
|
15
|
+
postcode?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
pobox: string;
|
|
18
|
+
street: string;
|
|
19
|
+
city: string;
|
|
20
|
+
region: undefined;
|
|
21
|
+
country: string;
|
|
22
|
+
postcode: string;
|
|
23
|
+
type: string;
|
|
24
|
+
formattedAddress?: undefined;
|
|
25
|
+
primary?: undefined;
|
|
26
|
+
})[];
|
|
27
|
+
const email: ({
|
|
28
|
+
address: string;
|
|
29
|
+
type: string;
|
|
30
|
+
primary: boolean;
|
|
31
|
+
} | {
|
|
32
|
+
address: string;
|
|
33
|
+
primary: boolean;
|
|
34
|
+
type?: undefined;
|
|
35
|
+
})[];
|
|
36
|
+
const birthday: string;
|
|
37
|
+
const birthplace: string;
|
|
38
|
+
const gender: string;
|
|
39
|
+
const company: string;
|
|
40
|
+
const jobTitle: string;
|
|
41
|
+
const cozy: {
|
|
42
|
+
type: string;
|
|
43
|
+
primary: boolean;
|
|
44
|
+
url: string;
|
|
45
|
+
}[];
|
|
46
|
+
const fullname: string;
|
|
47
|
+
namespace name {
|
|
48
|
+
const givenName: string;
|
|
49
|
+
const familyName: string;
|
|
50
|
+
const additionalName: string;
|
|
51
|
+
}
|
|
52
|
+
namespace metadata {
|
|
53
|
+
const cozy_1: boolean;
|
|
54
|
+
export { cozy_1 as cozy };
|
|
55
|
+
export const version: number;
|
|
56
|
+
}
|
|
57
|
+
const note: string;
|
|
58
|
+
const phone: {
|
|
59
|
+
number: string;
|
|
60
|
+
primary: boolean;
|
|
61
|
+
}[];
|
|
62
|
+
}
|
|
63
|
+
export namespace johnDoeFormValues {
|
|
64
|
+
const birthday_1: string;
|
|
65
|
+
export { birthday_1 as birthday };
|
|
66
|
+
const birthplace_1: string;
|
|
67
|
+
export { birthplace_1 as birthplace };
|
|
68
|
+
const gender_1: string;
|
|
69
|
+
export { gender_1 as gender };
|
|
70
|
+
const cozy_2: string;
|
|
71
|
+
export { cozy_2 as cozy };
|
|
72
|
+
export const cozyLabel: string;
|
|
73
|
+
const address_1: ({
|
|
74
|
+
fieldId: string;
|
|
75
|
+
address: string;
|
|
76
|
+
addressLabel: string;
|
|
77
|
+
addressapartment: undefined;
|
|
78
|
+
addressbuilding: undefined;
|
|
79
|
+
addresscity: undefined;
|
|
80
|
+
addresscode: undefined;
|
|
81
|
+
addressregion: undefined;
|
|
82
|
+
addresscountry: undefined;
|
|
83
|
+
addressentrycode: undefined;
|
|
84
|
+
addressfloor: undefined;
|
|
85
|
+
addresslocality: undefined;
|
|
86
|
+
addressnumber: undefined;
|
|
87
|
+
addressstairs: undefined;
|
|
88
|
+
addressstreet: string;
|
|
89
|
+
} | {
|
|
90
|
+
fieldId: string;
|
|
91
|
+
address: string;
|
|
92
|
+
addressLabel: string;
|
|
93
|
+
addressapartment: undefined;
|
|
94
|
+
addressbuilding: undefined;
|
|
95
|
+
addresscity: string;
|
|
96
|
+
addressregion: undefined;
|
|
97
|
+
addresscode: string;
|
|
98
|
+
addresscountry: string;
|
|
99
|
+
addressentrycode: undefined;
|
|
100
|
+
addressfloor: undefined;
|
|
101
|
+
addresslocality: undefined;
|
|
102
|
+
addressnumber: undefined;
|
|
103
|
+
addressstairs: undefined;
|
|
104
|
+
addressstreet: string;
|
|
105
|
+
})[];
|
|
106
|
+
export { address_1 as address };
|
|
107
|
+
const email_1: ({
|
|
108
|
+
fieldId: string;
|
|
109
|
+
email: string;
|
|
110
|
+
emailLabel: undefined;
|
|
111
|
+
} | {
|
|
112
|
+
fieldId: string;
|
|
113
|
+
email: string;
|
|
114
|
+
emailLabel: string;
|
|
115
|
+
})[];
|
|
116
|
+
export { email_1 as email };
|
|
117
|
+
const phone_1: {
|
|
118
|
+
fieldId: string;
|
|
119
|
+
phone: string;
|
|
120
|
+
phoneLabel: undefined;
|
|
121
|
+
}[];
|
|
122
|
+
export { phone_1 as phone };
|
|
123
|
+
const givenName_1: string;
|
|
124
|
+
export { givenName_1 as givenName };
|
|
125
|
+
const additionalName_1: string;
|
|
126
|
+
export { additionalName_1 as additionalName };
|
|
127
|
+
const familyName_1: string;
|
|
128
|
+
export { familyName_1 as familyName };
|
|
129
|
+
const company_1: string;
|
|
130
|
+
export { company_1 as company };
|
|
131
|
+
const jobTitle_1: string;
|
|
132
|
+
export { jobTitle_1 as jobTitle };
|
|
133
|
+
const note_1: string;
|
|
134
|
+
export { note_1 as note };
|
|
135
|
+
export const relatedContact: {
|
|
136
|
+
relatedContactId: string;
|
|
137
|
+
relatedContactLabel: string;
|
|
138
|
+
}[];
|
|
139
|
+
}
|
|
140
|
+
export namespace johnDoeContactWithRelated {
|
|
141
|
+
const id_1: string;
|
|
142
|
+
export { id_1 as id };
|
|
143
|
+
const _id_1: string;
|
|
144
|
+
export { _id_1 as _id };
|
|
145
|
+
const _type_1: string;
|
|
146
|
+
export { _type_1 as _type };
|
|
147
|
+
const _rev_1: string;
|
|
148
|
+
export { _rev_1 as _rev };
|
|
149
|
+
const address_2: ({
|
|
150
|
+
formattedAddress: string;
|
|
151
|
+
type: string;
|
|
152
|
+
primary: boolean;
|
|
153
|
+
pobox?: undefined;
|
|
154
|
+
street?: undefined;
|
|
155
|
+
city?: undefined;
|
|
156
|
+
region?: undefined;
|
|
157
|
+
country?: undefined;
|
|
158
|
+
postcode?: undefined;
|
|
159
|
+
} | {
|
|
160
|
+
pobox: string;
|
|
161
|
+
street: string;
|
|
162
|
+
city: string;
|
|
163
|
+
region: undefined;
|
|
164
|
+
country: string;
|
|
165
|
+
postcode: string;
|
|
166
|
+
type: string;
|
|
167
|
+
formattedAddress?: undefined;
|
|
168
|
+
primary?: undefined;
|
|
169
|
+
})[];
|
|
170
|
+
export { address_2 as address };
|
|
171
|
+
const email_2: ({
|
|
172
|
+
address: string;
|
|
173
|
+
type: string;
|
|
174
|
+
primary: boolean;
|
|
175
|
+
} | {
|
|
176
|
+
address: string;
|
|
177
|
+
primary: boolean;
|
|
178
|
+
type?: undefined;
|
|
179
|
+
})[];
|
|
180
|
+
export { email_2 as email };
|
|
181
|
+
const birthday_2: string;
|
|
182
|
+
export { birthday_2 as birthday };
|
|
183
|
+
const birthplace_2: string;
|
|
184
|
+
export { birthplace_2 as birthplace };
|
|
185
|
+
const gender_2: string;
|
|
186
|
+
export { gender_2 as gender };
|
|
187
|
+
const company_2: string;
|
|
188
|
+
export { company_2 as company };
|
|
189
|
+
const jobTitle_2: string;
|
|
190
|
+
export { jobTitle_2 as jobTitle };
|
|
191
|
+
const cozy_3: {
|
|
192
|
+
type: string;
|
|
193
|
+
primary: boolean;
|
|
194
|
+
url: string;
|
|
195
|
+
}[];
|
|
196
|
+
export { cozy_3 as cozy };
|
|
197
|
+
const fullname_1: string;
|
|
198
|
+
export { fullname_1 as fullname };
|
|
199
|
+
export namespace name_1 {
|
|
200
|
+
const givenName_2: string;
|
|
201
|
+
export { givenName_2 as givenName };
|
|
202
|
+
const familyName_2: string;
|
|
203
|
+
export { familyName_2 as familyName };
|
|
204
|
+
const additionalName_2: string;
|
|
205
|
+
export { additionalName_2 as additionalName };
|
|
206
|
+
}
|
|
207
|
+
export { name_1 as name };
|
|
208
|
+
export namespace metadata_1 {
|
|
209
|
+
const cozy_4: boolean;
|
|
210
|
+
export { cozy_4 as cozy };
|
|
211
|
+
const version_1: number;
|
|
212
|
+
export { version_1 as version };
|
|
213
|
+
}
|
|
214
|
+
export { metadata_1 as metadata };
|
|
215
|
+
const note_2: string;
|
|
216
|
+
export { note_2 as note };
|
|
217
|
+
const phone_2: {
|
|
218
|
+
number: string;
|
|
219
|
+
primary: boolean;
|
|
220
|
+
}[];
|
|
221
|
+
export { phone_2 as phone };
|
|
222
|
+
export namespace relationships {
|
|
223
|
+
namespace accounts {
|
|
224
|
+
const data: never[];
|
|
225
|
+
}
|
|
226
|
+
namespace groups {
|
|
227
|
+
const data_1: never[];
|
|
228
|
+
export { data_1 as data };
|
|
229
|
+
}
|
|
230
|
+
namespace related {
|
|
231
|
+
const data_2: {
|
|
232
|
+
metadata: {
|
|
233
|
+
relationTypes: string[];
|
|
234
|
+
};
|
|
235
|
+
_id: string;
|
|
236
|
+
_type: string;
|
|
237
|
+
}[];
|
|
238
|
+
export { data_2 as data };
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
export namespace related_1 {
|
|
242
|
+
export namespace target {
|
|
243
|
+
const id_2: string;
|
|
244
|
+
export { id_2 as id };
|
|
245
|
+
const _id_2: string;
|
|
246
|
+
export { _id_2 as _id };
|
|
247
|
+
const _type_2: string;
|
|
248
|
+
export { _type_2 as _type };
|
|
249
|
+
const _rev_2: string;
|
|
250
|
+
export { _rev_2 as _rev };
|
|
251
|
+
const company_3: string;
|
|
252
|
+
export { company_3 as company };
|
|
253
|
+
const fullname_2: string;
|
|
254
|
+
export { fullname_2 as fullname };
|
|
255
|
+
export const me: boolean;
|
|
256
|
+
const note_3: string;
|
|
257
|
+
export { note_3 as note };
|
|
258
|
+
}
|
|
259
|
+
const name_2: string;
|
|
260
|
+
export { name_2 as name };
|
|
261
|
+
export const doctype: string;
|
|
262
|
+
const data_3: {
|
|
263
|
+
displayName: string;
|
|
264
|
+
_id: string;
|
|
265
|
+
_type: string;
|
|
266
|
+
}[];
|
|
267
|
+
export { data_3 as data };
|
|
268
|
+
}
|
|
269
|
+
export { related_1 as related };
|
|
270
|
+
}
|