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.
- package/CHANGELOG.md +27 -0
- package/package.json +3 -3
- package/dist/ListItem/ExpandedAttributes/ExpandedAttribute.js +0 -62
- package/dist/ListItem/ExpandedAttributes/helpers.js +0 -263
- package/dist/ListItem/ExpandedAttributes/index.js +0 -90
- package/dist/ListItem/ListItemBase/Renaming/RenameDialog.js +0 -52
- package/dist/ListItem/ListItemBase/Renaming/RenameInput.js +0 -319
- package/dist/ListItem/ListItemBase/Renaming/helpers.js +0 -73
- package/dist/ListItem/ListItemBase/index.js +0 -151
- package/dist/ListItem/ListItemByDoc/index.js +0 -109
- package/dist/ListItem/ListItemContact/helpers.js +0 -39
- package/dist/ListItem/ListItemContact/index.js +0 -85
- package/dist/ListItem/ListItemContact/useActions.js +0 -28
- package/dist/ListItem/ListItemFile/ExpirationAnnotation.js +0 -54
- package/dist/ListItem/ListItemFile/ItemIcon.js +0 -64
- package/dist/ListItem/ListItemFile/PrimaryText.js +0 -47
- package/dist/ListItem/ListItemFile/SecondaryText.js +0 -41
- package/dist/ListItem/ListItemFile/index.js +0 -96
- package/dist/ListItem/hoc/withListItemLocales.js +0 -320
- package/dist/Qualification/QualificationGrid/helpers.js +0 -16
- package/dist/Qualification/QualificationGrid/index.js +0 -118
- package/dist/Qualification/QualificationGrid/locales/withLocales.js +0 -80
- package/dist/Qualification/QualificationItem/index.js +0 -76
- package/dist/providers/Intent/index.js +0 -130
- package/dist/src/ListItem/ExpandedAttributes/ExpandedAttribute.d.ts +0 -14
- package/dist/src/ListItem/ExpandedAttributes/helpers.d.ts +0 -43
- package/dist/src/ListItem/ExpandedAttributes/helpers.spec.d.ts +0 -1
- package/dist/src/ListItem/ExpandedAttributes/index.d.ts +0 -2
- package/dist/src/ListItem/ListItemBase/Renaming/RenameDialog.d.ts +0 -2
- package/dist/src/ListItem/ListItemBase/Renaming/RenameInput.d.ts +0 -12
- package/dist/src/ListItem/ListItemBase/Renaming/helpers.d.ts +0 -1
- package/dist/src/ListItem/ListItemBase/index.d.ts +0 -2
- package/dist/src/ListItem/ListItemByDoc/index.d.ts +0 -46
- package/dist/src/ListItem/ListItemContact/helpers.d.ts +0 -1
- package/dist/src/ListItem/ListItemContact/helpers.spec.d.ts +0 -1
- package/dist/src/ListItem/ListItemContact/index.d.ts +0 -35
- package/dist/src/ListItem/ListItemContact/useActions.d.ts +0 -2
- package/dist/src/ListItem/ListItemFile/ExpirationAnnotation.d.ts +0 -2
- package/dist/src/ListItem/ListItemFile/ItemIcon.d.ts +0 -12
- package/dist/src/ListItem/ListItemFile/PrimaryText.d.ts +0 -12
- package/dist/src/ListItem/ListItemFile/SecondaryText.d.ts +0 -12
- package/dist/src/ListItem/ListItemFile/index.d.ts +0 -37
- package/dist/src/ListItem/hoc/withListItemLocales.d.ts +0 -12
- package/dist/src/Qualification/QualificationGrid/helpers.d.ts +0 -1
- package/dist/src/Qualification/QualificationGrid/index.d.ts +0 -2
- package/dist/src/Qualification/QualificationGrid/locales/withLocales.d.ts +0 -12
- package/dist/src/Qualification/QualificationItem/index.d.ts +0 -17
- package/dist/src/providers/Intent/index.d.ts +0 -9
- package/src/ListItem/ExpandedAttributes/ExpandedAttribute.jsx +0 -39
- package/src/ListItem/ExpandedAttributes/helpers.js +0 -214
- package/src/ListItem/ExpandedAttributes/helpers.spec.js +0 -175
- package/src/ListItem/ExpandedAttributes/index.jsx +0 -62
- package/src/ListItem/ListItemBase/Renaming/RenameDialog.jsx +0 -38
- package/src/ListItem/ListItemBase/Renaming/RenameInput.jsx +0 -134
- package/src/ListItem/ListItemBase/Renaming/helpers.js +0 -35
- package/src/ListItem/ListItemBase/index.jsx +0 -115
- package/src/ListItem/ListItemByDoc/index.jsx +0 -103
- package/src/ListItem/ListItemContact/helpers.js +0 -28
- package/src/ListItem/ListItemContact/helpers.spec.js +0 -41
- package/src/ListItem/ListItemContact/index.jsx +0 -67
- package/src/ListItem/ListItemContact/useActions.jsx +0 -22
- package/src/ListItem/ListItemFile/ExpirationAnnotation.jsx +0 -39
- package/src/ListItem/ListItemFile/ItemIcon.jsx +0 -55
- package/src/ListItem/ListItemFile/PrimaryText.jsx +0 -38
- package/src/ListItem/ListItemFile/SecondaryText.jsx +0 -36
- package/src/ListItem/ListItemFile/index.jsx +0 -75
- package/src/ListItem/Readme.md +0 -211
- package/src/ListItem/hoc/withListItemLocales.jsx +0 -15
- package/src/ListItem/locales/en.json +0 -75
- package/src/ListItem/locales/fr.json +0 -75
- package/src/ListItem/locales/ru.json +0 -75
- package/src/ListItem/locales/vi.json +0 -75
- package/src/Qualification/QualificationGrid/Readme.md +0 -26
- package/src/Qualification/QualificationGrid/helpers.js +0 -4
- package/src/Qualification/QualificationGrid/index.jsx +0 -93
- package/src/Qualification/QualificationGrid/locales/en.json +0 -15
- package/src/Qualification/QualificationGrid/locales/fr.json +0 -15
- package/src/Qualification/QualificationGrid/locales/ru.json +0 -15
- package/src/Qualification/QualificationGrid/locales/vi.json +0 -15
- package/src/Qualification/QualificationGrid/locales/withLocales.jsx +0 -15
- package/src/Qualification/QualificationItem/Readme.md +0 -8
- package/src/Qualification/QualificationItem/index.jsx +0 -63
- package/src/providers/Intent/index.jsx +0 -83
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"themes": {
|
|
3
|
-
"activity": "Loisirs",
|
|
4
|
-
"family": "Famille",
|
|
5
|
-
"finance": "Finances",
|
|
6
|
-
"health": "Santé",
|
|
7
|
-
"home": "Logement",
|
|
8
|
-
"identity": "Identité",
|
|
9
|
-
"invoice": "Factures",
|
|
10
|
-
"others": "Autres",
|
|
11
|
-
"transport": "Transport",
|
|
12
|
-
"undefined": "Indéfini",
|
|
13
|
-
"work_study": "Travail"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"themes": {
|
|
3
|
-
"activity": "Деятельность",
|
|
4
|
-
"family": "Семья",
|
|
5
|
-
"finance": "Финансы",
|
|
6
|
-
"health": "Здоровье",
|
|
7
|
-
"home": "Дом",
|
|
8
|
-
"identity": "Личность",
|
|
9
|
-
"invoice": "Счет",
|
|
10
|
-
"others": "Прочее",
|
|
11
|
-
"transport": "Транспорт",
|
|
12
|
-
"undefined": "Не определено",
|
|
13
|
-
"work_study": "Работа"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"themes": {
|
|
3
|
-
"activity": "Hoạt động",
|
|
4
|
-
"family": "Gia đình",
|
|
5
|
-
"finance": "Tài chính",
|
|
6
|
-
"health": "Sức khỏe",
|
|
7
|
-
"home": "Nhà",
|
|
8
|
-
"identity": "Danh tính",
|
|
9
|
-
"invoice": "Hóa đơn",
|
|
10
|
-
"others": "Khác",
|
|
11
|
-
"transport": "Giao thông",
|
|
12
|
-
"undefined": "Chưa xác định",
|
|
13
|
-
"work_study": "Công việc"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
-
|
|
3
|
-
import en from './en.json'
|
|
4
|
-
import fr from './fr.json'
|
|
5
|
-
import ru from './ru.json'
|
|
6
|
-
import vi from './vi.json'
|
|
7
|
-
|
|
8
|
-
export const locales = {
|
|
9
|
-
en,
|
|
10
|
-
fr,
|
|
11
|
-
ru,
|
|
12
|
-
vi
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default withOnlyLocales(locales)
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Icon, FileDuotone } from '@linagora/twake-icons'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
import ButtonBase from 'cozy-ui/transpiled/react/ButtonBase'
|
|
6
|
-
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
7
|
-
import { makeStyles } from 'cozy-ui/transpiled/react/styles'
|
|
8
|
-
|
|
9
|
-
const useStyles = makeStyles({
|
|
10
|
-
item: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
flexDirection: 'column',
|
|
13
|
-
width: '100%',
|
|
14
|
-
height: 84,
|
|
15
|
-
marginBottom: 8,
|
|
16
|
-
borderRadius: 4,
|
|
17
|
-
borderColor: ({ isSelected }) =>
|
|
18
|
-
isSelected ? 'var(--primaryColor)' : 'var(--borderMainColor)',
|
|
19
|
-
border: '1px solid'
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const QualificationItem = ({ icon, label, isSelected, onClick, ...props }) => {
|
|
24
|
-
const styles = useStyles({ isSelected })
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<ButtonBase {...props} className={styles.item} onClick={onClick}>
|
|
28
|
-
<div className="u-mb-half">
|
|
29
|
-
{icon ? (
|
|
30
|
-
<Icon
|
|
31
|
-
icon={icon}
|
|
32
|
-
color={
|
|
33
|
-
isSelected ? 'var(--primaryColor)' : 'var(--secondaryTextColor)'
|
|
34
|
-
}
|
|
35
|
-
/>
|
|
36
|
-
) : (
|
|
37
|
-
<Icon
|
|
38
|
-
icon={FileDuotone}
|
|
39
|
-
size="32"
|
|
40
|
-
color={
|
|
41
|
-
isSelected ? 'var(--primaryColor)' : 'var(--secondaryTextColor)'
|
|
42
|
-
}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
</div>
|
|
46
|
-
<Typography variant="caption">{label}</Typography>
|
|
47
|
-
</ButtonBase>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
QualificationItem.propTypes = {
|
|
52
|
-
icon: PropTypes.oneOfType([
|
|
53
|
-
PropTypes.string,
|
|
54
|
-
PropTypes.node,
|
|
55
|
-
PropTypes.object,
|
|
56
|
-
PropTypes.func
|
|
57
|
-
]),
|
|
58
|
-
label: PropTypes.string,
|
|
59
|
-
isSelected: PropTypes.bool,
|
|
60
|
-
onClick: PropTypes.func
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export default QualificationItem
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
useEffect,
|
|
3
|
-
useMemo,
|
|
4
|
-
useState,
|
|
5
|
-
createContext,
|
|
6
|
-
useContext
|
|
7
|
-
} from 'react'
|
|
8
|
-
|
|
9
|
-
import { useClient } from 'cozy-client'
|
|
10
|
-
import Backdrop from 'cozy-ui/transpiled/react/Backdrop'
|
|
11
|
-
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
12
|
-
|
|
13
|
-
export const IntentContext = createContext()
|
|
14
|
-
|
|
15
|
-
export const useIntent = () => {
|
|
16
|
-
const context = useContext(IntentContext)
|
|
17
|
-
|
|
18
|
-
if (!context) {
|
|
19
|
-
throw new Error('useIntent must be used within a IntentProvider')
|
|
20
|
-
}
|
|
21
|
-
return context
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const IntentProvider = ({ intentId, componentsProps, children }) => {
|
|
25
|
-
const client = useClient()
|
|
26
|
-
const [state, setState] = useState({
|
|
27
|
-
service: null,
|
|
28
|
-
intent: null,
|
|
29
|
-
data: null
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const value = useMemo(
|
|
33
|
-
() => ({
|
|
34
|
-
service: state.service,
|
|
35
|
-
intent: state.intent,
|
|
36
|
-
data: state.data
|
|
37
|
-
}),
|
|
38
|
-
[state]
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
const startService = async () => {
|
|
43
|
-
let service
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
service = await client.intents.createService(intentId, window)
|
|
47
|
-
const intent = service.getIntent()
|
|
48
|
-
const data = service.getData()
|
|
49
|
-
|
|
50
|
-
setState({
|
|
51
|
-
service,
|
|
52
|
-
intent,
|
|
53
|
-
data
|
|
54
|
-
})
|
|
55
|
-
} catch (error) {
|
|
56
|
-
service.throw(error)
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!state.service) {
|
|
61
|
-
startService()
|
|
62
|
-
}
|
|
63
|
-
}, [client, intentId, state.service])
|
|
64
|
-
|
|
65
|
-
if (!state.service) {
|
|
66
|
-
return (
|
|
67
|
-
<Backdrop open {...componentsProps?.backdrop}>
|
|
68
|
-
<Spinner
|
|
69
|
-
className="u-m-0"
|
|
70
|
-
size="xxlarge"
|
|
71
|
-
middle
|
|
72
|
-
{...componentsProps?.spinner}
|
|
73
|
-
/>
|
|
74
|
-
</Backdrop>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<IntentContext.Provider value={value}>{children}</IntentContext.Provider>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export default IntentProvider
|