cozy-ui-plus 12.3.14 → 13.0.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/package.json +3 -3
  3. package/dist/ListItem/ExpandedAttributes/ExpandedAttribute.js +0 -62
  4. package/dist/ListItem/ExpandedAttributes/helpers.js +0 -263
  5. package/dist/ListItem/ExpandedAttributes/index.js +0 -90
  6. package/dist/ListItem/ListItemBase/Renaming/RenameDialog.js +0 -52
  7. package/dist/ListItem/ListItemBase/Renaming/RenameInput.js +0 -319
  8. package/dist/ListItem/ListItemBase/Renaming/helpers.js +0 -73
  9. package/dist/ListItem/ListItemBase/index.js +0 -151
  10. package/dist/ListItem/ListItemByDoc/index.js +0 -109
  11. package/dist/ListItem/ListItemContact/helpers.js +0 -39
  12. package/dist/ListItem/ListItemContact/index.js +0 -85
  13. package/dist/ListItem/ListItemContact/useActions.js +0 -28
  14. package/dist/ListItem/ListItemFile/ExpirationAnnotation.js +0 -54
  15. package/dist/ListItem/ListItemFile/ItemIcon.js +0 -64
  16. package/dist/ListItem/ListItemFile/PrimaryText.js +0 -47
  17. package/dist/ListItem/ListItemFile/SecondaryText.js +0 -41
  18. package/dist/ListItem/ListItemFile/index.js +0 -96
  19. package/dist/ListItem/hoc/withListItemLocales.js +0 -320
  20. package/dist/Qualification/QualificationGrid/helpers.js +0 -16
  21. package/dist/Qualification/QualificationGrid/index.js +0 -118
  22. package/dist/Qualification/QualificationGrid/locales/withLocales.js +0 -80
  23. package/dist/Qualification/QualificationItem/index.js +0 -76
  24. package/dist/providers/Intent/index.js +0 -130
  25. package/dist/src/ListItem/ExpandedAttributes/ExpandedAttribute.d.ts +0 -14
  26. package/dist/src/ListItem/ExpandedAttributes/helpers.d.ts +0 -43
  27. package/dist/src/ListItem/ExpandedAttributes/helpers.spec.d.ts +0 -1
  28. package/dist/src/ListItem/ExpandedAttributes/index.d.ts +0 -2
  29. package/dist/src/ListItem/ListItemBase/Renaming/RenameDialog.d.ts +0 -2
  30. package/dist/src/ListItem/ListItemBase/Renaming/RenameInput.d.ts +0 -12
  31. package/dist/src/ListItem/ListItemBase/Renaming/helpers.d.ts +0 -1
  32. package/dist/src/ListItem/ListItemBase/index.d.ts +0 -2
  33. package/dist/src/ListItem/ListItemByDoc/index.d.ts +0 -46
  34. package/dist/src/ListItem/ListItemContact/helpers.d.ts +0 -1
  35. package/dist/src/ListItem/ListItemContact/helpers.spec.d.ts +0 -1
  36. package/dist/src/ListItem/ListItemContact/index.d.ts +0 -35
  37. package/dist/src/ListItem/ListItemContact/useActions.d.ts +0 -2
  38. package/dist/src/ListItem/ListItemFile/ExpirationAnnotation.d.ts +0 -2
  39. package/dist/src/ListItem/ListItemFile/ItemIcon.d.ts +0 -12
  40. package/dist/src/ListItem/ListItemFile/PrimaryText.d.ts +0 -12
  41. package/dist/src/ListItem/ListItemFile/SecondaryText.d.ts +0 -12
  42. package/dist/src/ListItem/ListItemFile/index.d.ts +0 -37
  43. package/dist/src/ListItem/hoc/withListItemLocales.d.ts +0 -12
  44. package/dist/src/Qualification/QualificationGrid/helpers.d.ts +0 -1
  45. package/dist/src/Qualification/QualificationGrid/index.d.ts +0 -2
  46. package/dist/src/Qualification/QualificationGrid/locales/withLocales.d.ts +0 -12
  47. package/dist/src/Qualification/QualificationItem/index.d.ts +0 -17
  48. package/dist/src/providers/Intent/index.d.ts +0 -9
  49. package/src/ListItem/ExpandedAttributes/ExpandedAttribute.jsx +0 -39
  50. package/src/ListItem/ExpandedAttributes/helpers.js +0 -214
  51. package/src/ListItem/ExpandedAttributes/helpers.spec.js +0 -175
  52. package/src/ListItem/ExpandedAttributes/index.jsx +0 -62
  53. package/src/ListItem/ListItemBase/Renaming/RenameDialog.jsx +0 -38
  54. package/src/ListItem/ListItemBase/Renaming/RenameInput.jsx +0 -134
  55. package/src/ListItem/ListItemBase/Renaming/helpers.js +0 -35
  56. package/src/ListItem/ListItemBase/index.jsx +0 -115
  57. package/src/ListItem/ListItemByDoc/index.jsx +0 -103
  58. package/src/ListItem/ListItemContact/helpers.js +0 -28
  59. package/src/ListItem/ListItemContact/helpers.spec.js +0 -41
  60. package/src/ListItem/ListItemContact/index.jsx +0 -67
  61. package/src/ListItem/ListItemContact/useActions.jsx +0 -22
  62. package/src/ListItem/ListItemFile/ExpirationAnnotation.jsx +0 -39
  63. package/src/ListItem/ListItemFile/ItemIcon.jsx +0 -55
  64. package/src/ListItem/ListItemFile/PrimaryText.jsx +0 -38
  65. package/src/ListItem/ListItemFile/SecondaryText.jsx +0 -36
  66. package/src/ListItem/ListItemFile/index.jsx +0 -75
  67. package/src/ListItem/Readme.md +0 -211
  68. package/src/ListItem/hoc/withListItemLocales.jsx +0 -15
  69. package/src/ListItem/locales/en.json +0 -75
  70. package/src/ListItem/locales/fr.json +0 -75
  71. package/src/ListItem/locales/ru.json +0 -75
  72. package/src/ListItem/locales/vi.json +0 -75
  73. package/src/Qualification/QualificationGrid/Readme.md +0 -26
  74. package/src/Qualification/QualificationGrid/helpers.js +0 -4
  75. package/src/Qualification/QualificationGrid/index.jsx +0 -93
  76. package/src/Qualification/QualificationGrid/locales/en.json +0 -15
  77. package/src/Qualification/QualificationGrid/locales/fr.json +0 -15
  78. package/src/Qualification/QualificationGrid/locales/ru.json +0 -15
  79. package/src/Qualification/QualificationGrid/locales/vi.json +0 -15
  80. package/src/Qualification/QualificationGrid/locales/withLocales.jsx +0 -15
  81. package/src/Qualification/QualificationItem/Readme.md +0 -8
  82. package/src/Qualification/QualificationItem/index.jsx +0 -63
  83. package/src/providers/Intent/index.jsx +0 -83
@@ -1,130 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.useIntent = exports.default = exports.IntentContext = void 0;
9
-
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
-
16
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
-
18
- var _react = _interopRequireWildcard(require("react"));
19
-
20
- var _cozyClient = require("cozy-client");
21
-
22
- var _Backdrop = _interopRequireDefault(require("cozy-ui/transpiled/react/Backdrop"));
23
-
24
- var _Spinner = _interopRequireDefault(require("cozy-ui/transpiled/react/Spinner"));
25
-
26
- 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
-
28
- 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; }
29
-
30
- var IntentContext = /*#__PURE__*/(0, _react.createContext)();
31
- exports.IntentContext = IntentContext;
32
-
33
- var useIntent = function useIntent() {
34
- var context = (0, _react.useContext)(IntentContext);
35
-
36
- if (!context) {
37
- throw new Error('useIntent must be used within a IntentProvider');
38
- }
39
-
40
- return context;
41
- };
42
-
43
- exports.useIntent = useIntent;
44
-
45
- var IntentProvider = function IntentProvider(_ref) {
46
- var intentId = _ref.intentId,
47
- componentsProps = _ref.componentsProps,
48
- children = _ref.children;
49
- var client = (0, _cozyClient.useClient)();
50
-
51
- var _useState = (0, _react.useState)({
52
- service: null,
53
- intent: null,
54
- data: null
55
- }),
56
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
57
- state = _useState2[0],
58
- setState = _useState2[1];
59
-
60
- var value = (0, _react.useMemo)(function () {
61
- return {
62
- service: state.service,
63
- intent: state.intent,
64
- data: state.data
65
- };
66
- }, [state]);
67
- (0, _react.useEffect)(function () {
68
- var startService = /*#__PURE__*/function () {
69
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
70
- var service, intent, data;
71
- return _regenerator.default.wrap(function _callee$(_context) {
72
- while (1) {
73
- switch (_context.prev = _context.next) {
74
- case 0:
75
- _context.prev = 0;
76
- _context.next = 3;
77
- return client.intents.createService(intentId, window);
78
-
79
- case 3:
80
- service = _context.sent;
81
- intent = service.getIntent();
82
- data = service.getData();
83
- setState({
84
- service: service,
85
- intent: intent,
86
- data: data
87
- });
88
- _context.next = 12;
89
- break;
90
-
91
- case 9:
92
- _context.prev = 9;
93
- _context.t0 = _context["catch"](0);
94
- service.throw(_context.t0);
95
-
96
- case 12:
97
- case "end":
98
- return _context.stop();
99
- }
100
- }
101
- }, _callee, null, [[0, 9]]);
102
- }));
103
-
104
- return function startService() {
105
- return _ref2.apply(this, arguments);
106
- };
107
- }();
108
-
109
- if (!state.service) {
110
- startService();
111
- }
112
- }, [client, intentId, state.service]);
113
-
114
- if (!state.service) {
115
- return /*#__PURE__*/_react.default.createElement(_Backdrop.default, (0, _extends2.default)({
116
- open: true
117
- }, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.backdrop), /*#__PURE__*/_react.default.createElement(_Spinner.default, (0, _extends2.default)({
118
- className: "u-m-0",
119
- size: "xxlarge",
120
- middle: true
121
- }, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.spinner)));
122
- }
123
-
124
- return /*#__PURE__*/_react.default.createElement(IntentContext.Provider, {
125
- value: value
126
- }, children);
127
- };
128
-
129
- var _default = IntentProvider;
130
- exports.default = _default;
@@ -1,14 +0,0 @@
1
- export default ExpandedAttribute;
2
- declare function ExpandedAttribute({ label, value, setAlertProps }: {
3
- label: any;
4
- value: any;
5
- setAlertProps: any;
6
- }): JSX.Element;
7
- declare namespace ExpandedAttribute {
8
- namespace propTypes {
9
- let label: PropTypes.Requireable<string>;
10
- let value: PropTypes.Requireable<NonNullable<string | number>>;
11
- let setAlertProps: PropTypes.Requireable<(...args: any[]) => any>;
12
- }
13
- }
14
- import PropTypes from 'prop-types';
@@ -1,43 +0,0 @@
1
- export function normalizeExpandedAttribute(attr: any): any;
2
- export const notExpandedAttributes: {
3
- 'io.cozy.contacts': string[];
4
- 'io.cozy.files': any[];
5
- };
6
- export const defaultExpandedAttributes: {
7
- 'io.cozy.contacts': string[];
8
- 'io.cozy.files': any[];
9
- };
10
- export function hasAllElement(arr1: any, arr2: any): any;
11
- export function makeDefaultExpandedAttributes(doc: any, expandedAttributes: any): any;
12
- export function copyToClipboard({ value, setAlertProps, t }: {
13
- value: any;
14
- setAlertProps: any;
15
- t: any;
16
- }): () => Promise<void>;
17
- export function isDate(value: any): boolean;
18
- export function getAttrValue(doc: any, attrName: any): any;
19
- export function makeAttrsValues(doc: any, expandedAttributes: any): any;
20
- export function hasExpandedAttributesDisplayed({ doc, expandedAttributes }: {
21
- doc: any;
22
- expandedAttributes: any;
23
- }): boolean;
24
- export function getFormattedValue({ attrName, attrValue, qualificationLabel, f, lang }: {
25
- attrName: any;
26
- attrValue: any;
27
- qualificationLabel: any;
28
- f: any;
29
- lang: any;
30
- }): any;
31
- export function makeLabel({ attrName, qualificationLabel, t, lang }: {
32
- attrName: any;
33
- qualificationLabel: any;
34
- t: any;
35
- lang: any;
36
- }): any;
37
- export function makeAttrsLabelAndFormattedValue({ doc, expandedAttributes, t, f, lang }: {
38
- doc: any;
39
- expandedAttributes: any;
40
- t: any;
41
- f: any;
42
- lang: any;
43
- }): any;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,12 +0,0 @@
1
- export default RenameInput;
2
- declare function RenameInput({ file, onClose }: {
3
- file: any;
4
- onClose: any;
5
- }): JSX.Element;
6
- declare namespace RenameInput {
7
- namespace propTypes {
8
- let file: PropTypes.Validator<object>;
9
- let onClose: PropTypes.Validator<(...args: any[]) => any>;
10
- }
11
- }
12
- import PropTypes from 'prop-types';
@@ -1 +0,0 @@
1
- export function renameFile(client: any, file: any, name: any): Promise<any>;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,46 +0,0 @@
1
- export default ListItemByDoc;
2
- declare function ListItemByDoc({ doc, primary, secondary, icon, actions, selectProps, expandedAttributesProps: { isExpandedAttributesActive, expandedAttributes }, onClick }: {
3
- doc: any;
4
- primary: any;
5
- secondary: any;
6
- icon: any;
7
- actions: any;
8
- selectProps: any;
9
- expandedAttributesProps: {
10
- isExpandedAttributesActive: any;
11
- expandedAttributes: any;
12
- };
13
- onClick: any;
14
- }): JSX.Element;
15
- declare namespace ListItemByDoc {
16
- namespace defaultProps {
17
- namespace selectProps {
18
- let isSelectActive: boolean;
19
- let isSelected: boolean;
20
- let isChecked: boolean;
21
- }
22
- namespace expandedAttributesProps {
23
- let isExpandedAttributesActive: boolean;
24
- }
25
- }
26
- namespace propTypes {
27
- export let doc: PropTypes.Requireable<object>;
28
- export let primary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
29
- export let secondary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
30
- export let icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
31
- export let actions: PropTypes.Requireable<any[]>;
32
- let selectProps_1: PropTypes.Requireable<PropTypes.InferProps<{
33
- isSelectActive: PropTypes.Requireable<boolean>;
34
- isSelected: PropTypes.Requireable<boolean>;
35
- isChecked: PropTypes.Requireable<boolean>;
36
- }>>;
37
- export { selectProps_1 as selectProps };
38
- let expandedAttributesProps_1: PropTypes.Requireable<PropTypes.InferProps<{
39
- isExpandedAttributesActive: PropTypes.Requireable<boolean>;
40
- expandedAttributes: PropTypes.Requireable<any[]>;
41
- }>>;
42
- export { expandedAttributesProps_1 as expandedAttributesProps };
43
- export let onClick: PropTypes.Requireable<(...args: any[]) => any>;
44
- }
45
- }
46
- import PropTypes from 'prop-types';
@@ -1 +0,0 @@
1
- export function makeOptionalActions(contact: any): any[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,35 +0,0 @@
1
- export default ListItemContact;
2
- declare function ListItemContact({ contact, primary, secondary, icon, actions, selectProps, expandedAttributesProps, onClick }: {
3
- contact: any;
4
- primary: any;
5
- secondary: any;
6
- icon: any;
7
- actions: any;
8
- selectProps: any;
9
- expandedAttributesProps: any;
10
- onClick: any;
11
- }): JSX.Element;
12
- declare namespace ListItemContact {
13
- namespace defaultProps {
14
- let actions: any[];
15
- }
16
- namespace propTypes {
17
- export let contact: PropTypes.Requireable<object>;
18
- export let primary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
19
- export let secondary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
20
- export let icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
21
- let actions_1: PropTypes.Requireable<any[]>;
22
- export { actions_1 as actions };
23
- export let selectProps: PropTypes.Requireable<PropTypes.InferProps<{
24
- isSelectActive: PropTypes.Requireable<boolean>;
25
- isSelected: PropTypes.Requireable<boolean>;
26
- isChecked: PropTypes.Requireable<boolean>;
27
- }>>;
28
- export let expandedAttributesProps: PropTypes.Requireable<PropTypes.InferProps<{
29
- isExpandedAttributesActive: PropTypes.Requireable<boolean>;
30
- expandedAttributes: PropTypes.Requireable<any[]>;
31
- }>>;
32
- export let onClick: PropTypes.Requireable<(...args: any[]) => any>;
33
- }
34
- }
35
- import PropTypes from 'prop-types';
@@ -1,2 +0,0 @@
1
- export default useActions;
2
- declare function useActions(contact: any): object[];
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,12 +0,0 @@
1
- export default ItemIcon;
2
- declare function ItemIcon({ icon, file }: {
3
- icon: any;
4
- file: any;
5
- }): any;
6
- declare namespace ItemIcon {
7
- namespace propTypes {
8
- let icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- let file: PropTypes.Requireable<object>;
10
- }
11
- }
12
- import PropTypes from 'prop-types';
@@ -1,12 +0,0 @@
1
- export default PrimaryText;
2
- declare function PrimaryText({ primary, file }: {
3
- primary: any;
4
- file: any;
5
- }): any;
6
- declare namespace PrimaryText {
7
- namespace propTypes {
8
- let primary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- let file: PropTypes.Requireable<object>;
10
- }
11
- }
12
- import PropTypes from 'prop-types';
@@ -1,12 +0,0 @@
1
- export default SecondaryText;
2
- declare function SecondaryText({ secondary, file }: {
3
- secondary: any;
4
- file: any;
5
- }): any;
6
- declare namespace SecondaryText {
7
- namespace propTypes {
8
- let secondary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- let file: PropTypes.Requireable<object>;
10
- }
11
- }
12
- import PropTypes from 'prop-types';
@@ -1,37 +0,0 @@
1
- export default ListItemFile;
2
- declare function ListItemFile({ file, primary, secondary, icon, actions, selectProps, expandedAttributesProps, onClick }: {
3
- file: any;
4
- primary: any;
5
- secondary: any;
6
- icon: any;
7
- actions: any;
8
- selectProps: any;
9
- expandedAttributesProps: any;
10
- onClick: any;
11
- }): JSX.Element;
12
- declare namespace ListItemFile {
13
- namespace defaultProps {
14
- namespace expandedAttributesProps {
15
- let isExpandedAttributesActive: boolean;
16
- }
17
- }
18
- namespace propTypes {
19
- export let file: PropTypes.Requireable<object>;
20
- export let primary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
21
- export let secondary: PropTypes.Requireable<PropTypes.ReactNodeLike>;
22
- export let icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
23
- export let actions: PropTypes.Requireable<any[]>;
24
- export let selectProps: PropTypes.Requireable<PropTypes.InferProps<{
25
- isSelectActive: PropTypes.Requireable<boolean>;
26
- isSelected: PropTypes.Requireable<boolean>;
27
- isChecked: PropTypes.Requireable<boolean>;
28
- }>>;
29
- let expandedAttributesProps_1: PropTypes.Requireable<PropTypes.InferProps<{
30
- isExpandedAttributesActive: PropTypes.Requireable<boolean>;
31
- expandedAttributes: PropTypes.Requireable<any[]>;
32
- }>>;
33
- export { expandedAttributesProps_1 as expandedAttributesProps };
34
- export let onClick: PropTypes.Requireable<(...args: any[]) => any>;
35
- }
36
- }
37
- import PropTypes from 'prop-types';
@@ -1,12 +0,0 @@
1
- export namespace locales {
2
- export { en };
3
- export { fr };
4
- export { ru };
5
- export { vi };
6
- }
7
- declare const _default: Component;
8
- export default _default;
9
- import en from '../locales/en.json';
10
- import fr from '../locales/fr.json';
11
- import ru from '../locales/ru.json';
12
- import vi from '../locales/vi.json';
@@ -1 +0,0 @@
1
- export function getThemesList(noHealth: any): any;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,12 +0,0 @@
1
- export namespace locales {
2
- export { en };
3
- export { fr };
4
- export { ru };
5
- export { vi };
6
- }
7
- declare const _default: Component;
8
- export default _default;
9
- import en from './en.json';
10
- import fr from './fr.json';
11
- import ru from './ru.json';
12
- import vi from './vi.json';
@@ -1,17 +0,0 @@
1
- export default QualificationItem;
2
- declare function QualificationItem({ icon, label, isSelected, onClick, ...props }: {
3
- [x: string]: any;
4
- icon: any;
5
- label: any;
6
- isSelected: any;
7
- onClick: any;
8
- }): JSX.Element;
9
- declare namespace QualificationItem {
10
- namespace propTypes {
11
- let icon: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
12
- let label: PropTypes.Requireable<string>;
13
- let isSelected: PropTypes.Requireable<boolean>;
14
- let onClick: PropTypes.Requireable<(...args: any[]) => any>;
15
- }
16
- }
17
- import PropTypes from 'prop-types';
@@ -1,9 +0,0 @@
1
- export const IntentContext: React.Context<any>;
2
- export function useIntent(): any;
3
- export default IntentProvider;
4
- import React from 'react';
5
- declare function IntentProvider({ intentId, componentsProps, children }: {
6
- intentId: any;
7
- componentsProps: any;
8
- children: any;
9
- }): JSX.Element;
@@ -1,39 +0,0 @@
1
- import { Icon, Copy } from '@linagora/twake-icons'
2
- import PropTypes from 'prop-types'
3
- import React from 'react'
4
-
5
- import ListItem from 'cozy-ui/transpiled/react/ListItem'
6
- import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
- import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
- import Typography from 'cozy-ui/transpiled/react/Typography'
9
- import { useI18n } from 'twake-i18n'
10
-
11
- import { copyToClipboard } from './helpers'
12
-
13
- const ExpandedAttribute = ({ label, value, setAlertProps }) => {
14
- const { t } = useI18n()
15
-
16
- return (
17
- <ListItem
18
- className="u-pl-2"
19
- button
20
- onClick={copyToClipboard({ value, setAlertProps, t })}
21
- >
22
- <ListItemIcon>
23
- <Icon icon={Copy} />
24
- </ListItemIcon>
25
- <ListItemText
26
- primary={<Typography variant="caption">{label}</Typography>}
27
- secondary={<Typography variant="body2">{value}</Typography>}
28
- />
29
- </ListItem>
30
- )
31
- }
32
-
33
- ExpandedAttribute.propTypes = {
34
- label: PropTypes.string,
35
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
36
- setAlertProps: PropTypes.func
37
- }
38
-
39
- export default ExpandedAttribute