cozy-ui 134.2.0 → 135.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 +25 -0
- package/package.json +4 -2
- package/react/ActionsBar/index.jsx +1 -1
- package/react/ActionsBar/locales/withActionsLocales.jsx +2 -1
- package/react/ActionsMenu/Actions/locales/withActionsLocales.jsx +2 -2
- package/react/ActionsMenu/ActionsItems.jsx +1 -1
- package/react/ActionsMenu/ActionsMenuButton.jsx +1 -1
- package/react/CozyDialogs/DialogBackButton.jsx +1 -1
- package/react/CozyDialogs/DialogCloseButton.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/ShortcutDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.jsx +2 -1
- package/react/DateMonthPicker/Readme.md +1 -1
- package/react/DateMonthPicker/index.jsx +1 -1
- package/react/DateMonthPicker/index.spec.jsx +1 -1
- package/react/DatePicker/index.jsx +1 -1
- package/react/DatePicker/locales/withOwnLocales.jsx +2 -1
- package/react/EditBadge/EditMenu.jsx +1 -1
- package/react/Labs/PasswordInput/index.jsx +1 -1
- package/react/Nav/index.jsx +1 -1
- package/react/Nav/locales/withNavLocales.jsx +2 -1
- package/react/PasswordField/index.jsx +1 -2
- package/react/SearchBar/index.jsx +1 -1
- package/react/SearchBar/locales/withOnlyLocales.jsx +2 -1
- package/react/SelectionBar/SelectionBarAction.jsx +1 -1
- package/react/SelectionBar/SelectionBarMore.jsx +1 -1
- package/react/SelectionBar/index.jsx +1 -1
- package/react/Spinner/Readme.md +1 -1
- package/react/Spinner/index.jsx +1 -1
- package/react/Table/Virtualized/Dnd/TableRow.jsx +1 -2
- package/react/Wizard/index.jsx +1 -1
- package/react/deprecated/ActionMenu/Actions/ActionsItems.jsx +1 -1
- package/react/deprecated/ActionMenu/Actions/call.js +1 -1
- package/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
- package/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx +2 -1
- package/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
- package/react/hooks/useConfirmExit/index.jsx +1 -1
- package/react/index.js +0 -1
- package/react/jestLib/I18n.js +1 -1
- package/react/providers/DemoProvider.jsx +1 -1
- package/transpiled/react/ActionsBar/index.js +1 -1
- package/transpiled/react/ActionsBar/locales/withActionsLocales.js +1 -1
- package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.d.ts +1 -1
- package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.js +1 -2
- package/transpiled/react/ActionsMenu/ActionsItems.js +1 -1
- package/transpiled/react/ActionsMenu/ActionsMenuButton.js +1 -1
- package/transpiled/react/CozyDialogs/DialogBackButton.js +1 -1
- package/transpiled/react/CozyDialogs/DialogCloseButton.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/ShortcutDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.js +1 -1
- package/transpiled/react/DateMonthPicker/index.js +1 -1
- package/transpiled/react/DatePicker/index.js +1 -1
- package/transpiled/react/DatePicker/locales/withOwnLocales.js +1 -1
- package/transpiled/react/EditBadge/EditMenu.js +1 -1
- package/transpiled/react/Labs/PasswordInput/index.js +1 -1
- package/transpiled/react/Nav/index.js +1 -1
- package/transpiled/react/Nav/locales/withNavLocales.js +1 -1
- package/transpiled/react/PasswordField/index.js +1 -2
- package/transpiled/react/SearchBar/index.js +1 -1
- package/transpiled/react/SearchBar/locales/withOnlyLocales.js +1 -1
- package/transpiled/react/SelectionBar/SelectionBarAction.js +1 -1
- package/transpiled/react/SelectionBar/SelectionBarMore.js +1 -1
- package/transpiled/react/SelectionBar/index.js +1 -1
- package/transpiled/react/Spinner/index.js +1 -1
- package/transpiled/react/Table/Virtualized/Dnd/TableRow.js +1 -1
- package/transpiled/react/Wizard/index.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/ActionsItems.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/call.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
- package/transpiled/react/hooks/useConfirmExit/index.js +1 -1
- package/transpiled/react/index.d.ts +0 -1
- package/transpiled/react/index.js +0 -1
- package/transpiled/react/jestLib/I18n.d.ts +1 -1
- package/transpiled/react/jestLib/I18n.js +1 -1
- package/transpiled/react/providers/DemoProvider.js +1 -1
- package/react/I18n/index.js +0 -25
- package/react/I18n/withLocales.js +0 -14
- package/react/providers/I18n/createUseI18n.jsx +0 -32
- package/react/providers/I18n/format.jsx +0 -62
- package/react/providers/I18n/format.spec.jsx +0 -73
- package/react/providers/I18n/helpers.js +0 -33
- package/react/providers/I18n/index.jsx +0 -107
- package/react/providers/I18n/index.spec.jsx +0 -135
- package/react/providers/I18n/translate.jsx +0 -28
- package/react/providers/I18n/translation.jsx +0 -42
- package/react/providers/I18n/useExtendI18n.jsx +0 -37
- package/react/providers/I18n/withLocales.jsx +0 -47
- package/react/providers/I18n/withLocales.spec.jsx +0 -58
- package/react/providers/I18n/withOnlyLocales.jsx +0 -38
- package/transpiled/react/I18n/index.d.ts +0 -3
- package/transpiled/react/I18n/index.js +0 -16
- package/transpiled/react/I18n/withLocales.d.ts +0 -2
- package/transpiled/react/I18n/withLocales.js +0 -10
- package/transpiled/react/providers/I18n/createUseI18n.d.ts +0 -6
- package/transpiled/react/providers/I18n/createUseI18n.js +0 -39
- package/transpiled/react/providers/I18n/format.d.ts +0 -3
- package/transpiled/react/providers/I18n/format.js +0 -72
- package/transpiled/react/providers/I18n/format.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/helpers.d.ts +0 -5
- package/transpiled/react/providers/I18n/helpers.js +0 -35
- package/transpiled/react/providers/I18n/index.d.ts +0 -62
- package/transpiled/react/providers/I18n/index.js +0 -132
- package/transpiled/react/providers/I18n/index.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/translate.d.ts +0 -3
- package/transpiled/react/providers/I18n/translate.js +0 -21
- package/transpiled/react/providers/I18n/translation.d.ts +0 -3
- package/transpiled/react/providers/I18n/translation.js +0 -40
- package/transpiled/react/providers/I18n/useExtendI18n.d.ts +0 -7
- package/transpiled/react/providers/I18n/useExtendI18n.js +0 -42
- package/transpiled/react/providers/I18n/withLocales.d.ts +0 -8
- package/transpiled/react/providers/I18n/withLocales.js +0 -69
- package/transpiled/react/providers/I18n/withLocales.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/withOnlyLocales.d.ts +0 -8
- package/transpiled/react/providers/I18n/withOnlyLocales.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# [135.0.0](https://github.com/cozy/cozy-ui/compare/v134.2.0...v135.0.0) (2025-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Add twake-i18n package ([7b9ff5f](https://github.com/cozy/cozy-ui/commit/7b9ff5f))
|
|
7
|
+
* Remove I18n ([df09711](https://github.com/cozy/cozy-ui/commit/df09711))
|
|
8
|
+
* Replace I18n stuff by twake-i18n ([ab99763](https://github.com/cozy/cozy-ui/commit/ab99763))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
* No longer expose I18n provider. You must import everything previously based on `providers/I18n` from `twake-i18n`.
|
|
14
|
+
You can use this codemods to migrate:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
yarn add twake-i18n
|
|
18
|
+
yarn global add @cozy/codemods
|
|
19
|
+
yarn global add jscodeshift@0.13.1
|
|
20
|
+
jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-ui-bc-135.js src babel --ignore-pattern=src/targets/ --extensions js,jsx,tsx --parser tsx
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
You probably will need to fix linter issue after that with something like `yarn lint --fix`.
|
|
24
|
+
* you must have `twake-i18n >= 0.3.0`
|
|
25
|
+
|
|
1
26
|
# [134.2.0](https://github.com/cozy/cozy-ui/compare/v134.1.0...v134.2.0) (2025-12-04)
|
|
2
27
|
|
|
3
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "135.0.0",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
"svg-sprite-loader": "4.1.6",
|
|
152
152
|
"svgo": "2.8.0",
|
|
153
153
|
"svgstore-cli": "1.3.2",
|
|
154
|
+
"twake-i18n": "^0.3.0",
|
|
154
155
|
"url-loader": "1.1.2",
|
|
155
156
|
"webpack": "4.39.3",
|
|
156
157
|
"whatwg-fetch": "3.5.0"
|
|
@@ -187,7 +188,8 @@
|
|
|
187
188
|
"react": "^16 || ^17 || ^18",
|
|
188
189
|
"react-dnd": "^16.0.1",
|
|
189
190
|
"react-dnd-html5-backend": "^16.0.1",
|
|
190
|
-
"react-dom": "^16 || ^17 || ^18"
|
|
191
|
+
"react-dom": "^16 || ^17 || ^18",
|
|
192
|
+
"twake-i18n": ">=0.3.0"
|
|
191
193
|
},
|
|
192
194
|
"eslintConfig": {
|
|
193
195
|
"extends": [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useRef, useState, useMemo } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import ResponsiveAction from './ResponsiveAction'
|
|
5
6
|
import withActionsLocales from './locales/withActionsLocales'
|
|
@@ -19,7 +20,6 @@ import Toolbar from '../Toolbar'
|
|
|
19
20
|
import Typography from '../Typography'
|
|
20
21
|
import useBreakpoints from '../providers/Breakpoints'
|
|
21
22
|
import CozyTheme, { useCozyTheme } from '../providers/CozyTheme'
|
|
22
|
-
import { useI18n } from '../providers/I18n'
|
|
23
23
|
import { makeStyles } from '../styles'
|
|
24
24
|
|
|
25
25
|
const useStyles = makeStyles({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './en.json'
|
|
2
4
|
import fr from './fr.json'
|
|
3
5
|
import ru from './ru.json'
|
|
4
6
|
import vi from './vi.json'
|
|
5
|
-
import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
|
|
6
7
|
|
|
7
8
|
export const locales = {
|
|
8
9
|
en,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales, getI18n } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './en.json'
|
|
2
4
|
import fr from './fr.json'
|
|
3
5
|
import ru from './ru.json'
|
|
4
6
|
import vi from './vi.json'
|
|
5
|
-
import { getI18n } from '../../../providers/I18n/helpers'
|
|
6
|
-
import withOnlyLocales from '../../../providers/I18n/withOnlyLocales'
|
|
7
7
|
|
|
8
8
|
export const locales = {
|
|
9
9
|
en,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef, useMemo } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useWebviewIntent } from 'cozy-intent'
|
|
5
6
|
|
|
6
7
|
import { getActionName, getOnlyNeededActions } from './Actions/helpers'
|
|
7
|
-
import { useI18n } from '../providers/I18n'
|
|
8
8
|
|
|
9
9
|
const ActionsItems = forwardRef(
|
|
10
10
|
(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react'
|
|
2
|
+
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import ActionsMenu from '.'
|
|
4
5
|
import { locales } from './Actions/locales/withActionsLocales'
|
|
@@ -6,7 +7,6 @@ import Icon from '../Icon'
|
|
|
6
7
|
import IconButton from '../IconButton'
|
|
7
8
|
import DotsIcon from '../Icons/Dots'
|
|
8
9
|
import ListItemIcon from '../ListItemIcon'
|
|
9
|
-
import { useI18n, useExtendI18n } from '../providers/I18n'
|
|
10
10
|
|
|
11
11
|
const ActionsMenuButton = ({ docs, actions }) => {
|
|
12
12
|
const [showActions, setShowActions] = useState(false)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { createUseI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import locales from './locales'
|
|
5
6
|
import styles from './styles.styl'
|
|
6
7
|
import Icon from '../Icon'
|
|
7
8
|
import IconButton from '../IconButton'
|
|
8
9
|
import PreviousIcon from '../Icons/Previous'
|
|
9
|
-
import { createUseI18n } from '../providers/I18n'
|
|
10
10
|
|
|
11
11
|
const useI18n = createUseI18n(locales)
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { createUseI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import locales from './locales'
|
|
5
6
|
import styles from './styles.styl'
|
|
6
7
|
import Icon from '../Icon'
|
|
7
8
|
import IconButton from '../IconButton'
|
|
8
9
|
import CrossMediumIcon from '../Icons/CrossMedium'
|
|
9
|
-
import { createUseI18n } from '../providers/I18n'
|
|
10
10
|
|
|
11
11
|
const useI18n = createUseI18n(locales)
|
|
12
12
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import CozyLocation from './icons/CozyLocation'
|
|
5
6
|
import withSpecificDialogsLocales from './withSpecificDialogsLocales'
|
|
@@ -7,7 +8,6 @@ import { IllustrationDialog } from '..'
|
|
|
7
8
|
import Button from '../../Buttons'
|
|
8
9
|
import Icon from '../../Icon'
|
|
9
10
|
import Typography from '../../Typography'
|
|
10
|
-
import { useI18n } from '../../providers/I18n'
|
|
11
11
|
|
|
12
12
|
const createStyles = () => ({
|
|
13
13
|
typography: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import DefaultQRCode from './icons/QRCodeInstallFlagshipAppDialog.png'
|
|
5
6
|
import appStoreIcon from './icons/appstore.png'
|
|
@@ -8,7 +9,6 @@ import withSpecificDialogsLocales from './withSpecificDialogsLocales'
|
|
|
8
9
|
import { IllustrationDialog } from '..'
|
|
9
10
|
import Link from '../../Link'
|
|
10
11
|
import Typography from '../../Typography'
|
|
11
|
-
import { useI18n } from '../../providers/I18n'
|
|
12
12
|
|
|
13
13
|
const InstallFlagshipAppDialog = forwardRef(
|
|
14
14
|
({ onClose, playStoreUrl, appStoreUrl, QRCode }, ref) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
checkAndSaveShortcut,
|
|
@@ -11,7 +12,6 @@ import Button from '../../Buttons'
|
|
|
11
12
|
import Stack from '../../Stack'
|
|
12
13
|
import TextField from '../../TextField'
|
|
13
14
|
import { useAlert } from '../../providers/Alert'
|
|
14
|
-
import { useI18n } from '../../providers/I18n'
|
|
15
15
|
|
|
16
16
|
const ENTER_KEY = 13
|
|
17
17
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './locales/en.json'
|
|
2
4
|
import fr from './locales/fr.json'
|
|
3
5
|
import ru from './locales/ru.json'
|
|
4
6
|
import vi from './locales/vi.json'
|
|
5
|
-
import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
|
|
6
7
|
|
|
7
8
|
export const locales = {
|
|
8
9
|
en,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
```jsx
|
|
2
|
-
import I18n from '
|
|
2
|
+
import I18n from 'twake-i18n';
|
|
3
3
|
import DateMonthPicker from 'cozy-ui/transpiled/react/DateMonthPicker';
|
|
4
4
|
import Stack from 'cozy-ui/transpiled/react/Stack';
|
|
5
5
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
@@ -3,12 +3,12 @@ import format from 'date-fns/format'
|
|
|
3
3
|
import range from 'lodash/range'
|
|
4
4
|
import PropTypes from 'prop-types'
|
|
5
5
|
import React, { useState } from 'react'
|
|
6
|
+
import { useI18n } from 'twake-i18n'
|
|
6
7
|
|
|
7
8
|
import styles from './styles.styl'
|
|
8
9
|
import Icon from '../Icon'
|
|
9
10
|
import LeftIcon from '../Icons/Left'
|
|
10
11
|
import RightIcon from '../Icons/Right'
|
|
11
|
-
import { useI18n } from '../providers/I18n'
|
|
12
12
|
|
|
13
13
|
const MonthButton = ({ monthNum, onClick, isSelected }) => {
|
|
14
14
|
const { f } = useI18n()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fireEvent, render, screen } from '@testing-library/react'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import I18n from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import DateMonthPicker from '.'
|
|
5
|
-
import I18n from '../providers/I18n'
|
|
6
6
|
|
|
7
7
|
describe('DateMonthPicker', () => {
|
|
8
8
|
const setup = ({ initialValue }) => {
|
|
@@ -16,11 +16,11 @@ import LocaleFR from 'date-fns/locale/fr'
|
|
|
16
16
|
import subDays from 'date-fns/subDays'
|
|
17
17
|
import PropTypes from 'prop-types'
|
|
18
18
|
import React, { forwardRef, useState } from 'react'
|
|
19
|
+
import { useI18n } from 'twake-i18n'
|
|
19
20
|
|
|
20
21
|
import { makeFormat } from './helpers'
|
|
21
22
|
import withOwnLocales from './locales/withOwnLocales'
|
|
22
23
|
import useBreakpoints from '../providers/Breakpoints'
|
|
23
|
-
import { useI18n } from '../providers/I18n'
|
|
24
24
|
import { makeStyles } from '../styles'
|
|
25
25
|
|
|
26
26
|
const localesFNS = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './en.json'
|
|
2
4
|
import fr from './fr.json'
|
|
3
5
|
import ru from './ru.json'
|
|
4
6
|
import vi from './vi.json'
|
|
5
|
-
import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
|
|
6
7
|
|
|
7
8
|
export const locales = {
|
|
8
9
|
en,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react'
|
|
2
|
+
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { handleDelete, handleUpload } from './helpers'
|
|
4
5
|
import { locales } from './locales'
|
|
@@ -10,7 +11,6 @@ import ListItemText from '../ListItemText'
|
|
|
10
11
|
import Menu from '../Menu'
|
|
11
12
|
import MenuItem from '../MenuItem'
|
|
12
13
|
import { useAlert } from '../providers/Alert'
|
|
13
|
-
import { useI18n, useExtendI18n } from '../providers/I18n'
|
|
14
14
|
|
|
15
15
|
const EditMenu = ({
|
|
16
16
|
anchorRef,
|
|
@@ -7,8 +7,8 @@ import styles from './styles.styl'
|
|
|
7
7
|
import Icon from '../../Icon'
|
|
8
8
|
import EyeIcon from '../../Icons/Eye'
|
|
9
9
|
import EyeClosedIcon from '../../Icons/EyeClosed'
|
|
10
|
-
import Input from '../../legacy/Input'
|
|
11
10
|
import InputGroup from '../../InputGroup'
|
|
11
|
+
import Input from '../../legacy/Input'
|
|
12
12
|
|
|
13
13
|
const HideShowButton = props => {
|
|
14
14
|
const { hidden, className, ...rest } = props
|
package/react/Nav/index.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import React, { Children, isValidElement, useState, forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import withNavLocales from './locales/withNavLocales'
|
|
5
6
|
import styles from './styles.styl'
|
|
@@ -9,7 +10,6 @@ import BottomIcon from '../Icons/Bottom'
|
|
|
9
10
|
import TopIcon from '../Icons/Top'
|
|
10
11
|
import ListItem from '../ListItem'
|
|
11
12
|
import useBreakpoints from '../providers/Breakpoints'
|
|
12
|
-
import { useI18n } from '../providers/I18n'
|
|
13
13
|
|
|
14
14
|
export const NavItem = ({ className, children, secondary, ...restProps }) => (
|
|
15
15
|
<li
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './en.json'
|
|
2
4
|
import fr from './fr.json'
|
|
3
5
|
import ru from './ru.json'
|
|
4
6
|
import vi from './vi.json'
|
|
5
|
-
import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
|
|
6
7
|
|
|
7
8
|
export const locales = {
|
|
8
9
|
en,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useI18n, withOnlyLocales } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import en from './locales/en.json'
|
|
4
5
|
import fr from './locales/fr.json'
|
|
@@ -10,8 +11,6 @@ import EyeIcon from '../Icons/Eye'
|
|
|
10
11
|
import EyeClosedIcon from '../Icons/EyeClosed'
|
|
11
12
|
import InputAdornment from '../InputAdornment'
|
|
12
13
|
import TextField from '../TextField'
|
|
13
|
-
import { useI18n } from '../providers/I18n'
|
|
14
|
-
import withOnlyLocales from '../providers/I18n/withOnlyLocales'
|
|
15
14
|
|
|
16
15
|
export const locales = {
|
|
17
16
|
en,
|
|
@@ -2,6 +2,7 @@ import cx from 'classnames'
|
|
|
2
2
|
import debounce from 'lodash/debounce'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import React, { forwardRef, useState, useMemo } from 'react'
|
|
5
|
+
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
5
6
|
|
|
6
7
|
import { locales } from './locales/withOnlyLocales'
|
|
7
8
|
import ButtonBase from '../ButtonBase'
|
|
@@ -13,7 +14,6 @@ import MagnifierIcon from '../Icons/Magnifier'
|
|
|
13
14
|
import InputBase from '../InputBase'
|
|
14
15
|
import Paper from '../Paper'
|
|
15
16
|
import Typography from '../Typography'
|
|
16
|
-
import { useI18n, useExtendI18n } from '../providers/I18n'
|
|
17
17
|
import { makeStyles } from '../styles'
|
|
18
18
|
|
|
19
19
|
const sizeToPixel = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n'
|
|
2
|
+
|
|
1
3
|
import en from './en.json'
|
|
2
4
|
import fr from './fr.json'
|
|
3
5
|
import ru from './ru.json'
|
|
4
6
|
import vi from './vi.json'
|
|
5
|
-
import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
|
|
6
7
|
|
|
7
8
|
export const locales = {
|
|
8
9
|
en,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
|
+
import { useI18n } from 'twake-i18n'
|
|
4
5
|
|
|
5
6
|
import styles from './styles.styl'
|
|
6
7
|
import Button from '../Button'
|
|
7
8
|
import Icon from '../Icon'
|
|
8
9
|
import IconButton from '../IconButton'
|
|
9
10
|
import useBreakpoints from '../providers/Breakpoints'
|
|
10
|
-
import { useI18n } from '../providers/I18n'
|
|
11
11
|
|
|
12
12
|
const SelectionBarAction = ({ selectedCount, selected, action }) => {
|
|
13
13
|
const { isDesktop } = useBreakpoints()
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useState, useRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import styles from './styles.styl'
|
|
5
6
|
import Icon from '../Icon'
|
|
6
7
|
import IconButton from '../IconButton'
|
|
7
8
|
import DotsIcon from '../Icons/Dots'
|
|
8
9
|
import { ActionMenuWithClose, ActionMenuItem } from '../deprecated/ActionMenu'
|
|
9
|
-
import { useI18n } from '../providers/I18n'
|
|
10
10
|
|
|
11
11
|
const SelectionBarMore = ({ actions, selectedCount, selected }) => {
|
|
12
12
|
const { t } = useI18n()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useTheme } from '@material-ui/core'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React, { useEffect } from 'react'
|
|
4
|
+
import { useI18n } from 'twake-i18n'
|
|
4
5
|
|
|
5
6
|
import { useWebviewIntent } from 'cozy-intent'
|
|
6
7
|
|
|
@@ -12,7 +13,6 @@ import Icon from '../Icon'
|
|
|
12
13
|
import IconButton from '../IconButton'
|
|
13
14
|
import CrossIcon from '../Icons/Cross'
|
|
14
15
|
import useBreakpoints from '../providers/Breakpoints'
|
|
15
|
-
import { useI18n } from '../providers/I18n'
|
|
16
16
|
|
|
17
17
|
/*
|
|
18
18
|
|
package/react/Spinner/Readme.md
CHANGED
package/react/Spinner/index.jsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
|
+
import { translate } from 'twake-i18n'
|
|
4
5
|
|
|
5
6
|
import styles from './styles.styl'
|
|
6
7
|
import Icon from '../Icon'
|
|
7
8
|
import SpinnerIcon from '../Icons/Spinner'
|
|
8
9
|
import Typography from '../Typography'
|
|
9
|
-
import { translate } from '../providers/I18n'
|
|
10
10
|
|
|
11
11
|
export const Spinner = ({
|
|
12
12
|
t,
|
package/react/Wizard/index.jsx
CHANGED
|
@@ -4,9 +4,9 @@ import React from 'react'
|
|
|
4
4
|
import styles from './styles.styl'
|
|
5
5
|
import Icon from '../Icon'
|
|
6
6
|
import CloudIcon from '../Icons/Cloud'
|
|
7
|
-
import Input from '../legacy/Input'
|
|
8
7
|
import Typography from '../Typography'
|
|
9
8
|
import Button from '../deprecated/Button'
|
|
9
|
+
import Input from '../legacy/Input'
|
|
10
10
|
|
|
11
11
|
export const Wizard = ({ children, tag, ...props }) => {
|
|
12
12
|
const Component = tag || 'div'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useMemo } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { getActionName, getOnlyNeededActions } from './helpers'
|
|
5
|
-
import { useI18n } from '../../../providers/I18n'
|
|
6
6
|
|
|
7
7
|
const ActionsItems = ({ doc, actions, isLast, setIsRenaming, onClose }) => {
|
|
8
8
|
const { t } = useI18n()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import withActionsLocales from './locales/withActionsLocales'
|
|
4
5
|
import TelephoneIcon from '../../../Icons/Telephone'
|
|
5
|
-
import { useI18n } from '../../../providers/I18n'
|
|
6
6
|
import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
|
|
7
7
|
|
|
8
8
|
export const call = () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import withActionsLocales from './locales/withActionsLocales'
|
|
4
5
|
import EmailIcon from '../../../Icons/Email'
|
|
5
|
-
import { useI18n } from '../../../providers/I18n'
|
|
6
6
|
import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
|
|
7
7
|
|
|
8
8
|
export const emailTo = () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import withActionsLocales from './locales/withActionsLocales'
|
|
4
5
|
import CommentIcon from '../../../Icons/Comment'
|
|
5
|
-
import { useI18n } from '../../../providers/I18n'
|
|
6
6
|
import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
|
|
7
7
|
|
|
8
8
|
export const smsTo = () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useCallback, useRef, useState } from 'react'
|
|
3
|
+
import { withLocales } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import en from './locales/en.json'
|
|
5
6
|
import fr from './locales/fr.json'
|
|
@@ -7,7 +8,6 @@ import ru from './locales/ru.json'
|
|
|
7
8
|
import vi from './locales/vi.json'
|
|
8
9
|
import { ConfirmDialog } from '../../CozyDialogs'
|
|
9
10
|
import Button from '../../deprecated/Button'
|
|
10
|
-
import withLocales from '../../providers/I18n/withLocales'
|
|
11
11
|
import useEventListener from '../useEventListener'
|
|
12
12
|
|
|
13
13
|
/**
|
package/react/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export { default as Banner } from './Banner'
|
|
|
6
6
|
export { default as ButtonAction } from './deprecated/ButtonAction'
|
|
7
7
|
export { default as BottomDrawer } from './deprecated/BottomDrawer'
|
|
8
8
|
export { default as BarButton } from './BarButton'
|
|
9
|
-
export { default as I18n, translate, useI18n } from './providers/I18n'
|
|
10
9
|
export { default as Icon } from './Icon'
|
|
11
10
|
export { default as Sprite } from './Icon/Sprite'
|
|
12
11
|
export { default as Sidebar } from './Sidebar'
|
package/react/jestLib/I18n.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import I18n from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { BreakpointsProvider } from './Breakpoints'
|
|
4
5
|
import CozyTheme from './CozyTheme'
|
|
5
6
|
import AlertProvider from '../providers/Alert'
|
|
6
|
-
import I18n from '../providers/I18n'
|
|
7
7
|
|
|
8
8
|
const DemoProvider = ({ variant, dictRequire, children }) => {
|
|
9
9
|
const lang = localStorage.getItem('lang') || 'en'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, { useRef, useState, useMemo } from 'react';
|
|
4
|
+
import { useI18n } from 'twake-i18n';
|
|
4
5
|
import ResponsiveAction from "cozy-ui/transpiled/react/ActionsBar/ResponsiveAction";
|
|
5
6
|
import withActionsLocales from "cozy-ui/transpiled/react/ActionsBar/locales/withActionsLocales";
|
|
6
7
|
import ActionsMenu from "cozy-ui/transpiled/react/ActionsMenu";
|
|
@@ -19,7 +20,6 @@ import Toolbar from "cozy-ui/transpiled/react/Toolbar";
|
|
|
19
20
|
import Typography from "cozy-ui/transpiled/react/Typography";
|
|
20
21
|
import useBreakpoints from "cozy-ui/transpiled/react/providers/Breakpoints";
|
|
21
22
|
import CozyTheme, { useCozyTheme } from "cozy-ui/transpiled/react/providers/CozyTheme";
|
|
22
|
-
import { useI18n } from "cozy-ui/transpiled/react/providers/I18n";
|
|
23
23
|
import { makeStyles } from "cozy-ui/transpiled/react/styles";
|
|
24
24
|
var useStyles = makeStyles({
|
|
25
25
|
appBar: function appBar(_ref) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withOnlyLocales } from 'twake-i18n';
|
|
1
2
|
var en = {
|
|
2
3
|
selected: "%{smart_count} item selected |||| %{smart_count} items selected",
|
|
3
4
|
selected_light: "%{smart_count} item |||| %{smart_count} items"
|
|
@@ -14,7 +15,6 @@ var vi = {
|
|
|
14
15
|
selected: "%{smart_count} m\u1EE5c \u0111\u01B0\u1EE3c ch\u1ECDn |||| %{smart_count} m\u1EE5c \u0111\u01B0\u1EE3c ch\u1ECDn",
|
|
15
16
|
selected_light: "%{smart_count} m\u1EE5c |||| %{smart_count} m\u1EE5c"
|
|
16
17
|
};
|
|
17
|
-
import withOnlyLocales from "cozy-ui/transpiled/react/providers/I18n/withOnlyLocales";
|
|
18
18
|
export var locales = {
|
|
19
19
|
en: en,
|
|
20
20
|
fr: fr,
|
|
@@ -6,7 +6,7 @@ export namespace locales {
|
|
|
6
6
|
}
|
|
7
7
|
export function getActionsI18n(): {
|
|
8
8
|
t: any;
|
|
9
|
-
f: (date: any, formatStr: any, opts?: {}) => string
|
|
9
|
+
f: (date: any, formatStr: any, opts?: {} | undefined) => string;
|
|
10
10
|
lang: any;
|
|
11
11
|
};
|
|
12
12
|
declare var _default: Component;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withOnlyLocales, getI18n } from 'twake-i18n';
|
|
1
2
|
var en = {
|
|
2
3
|
menu: "Menu",
|
|
3
4
|
viewInContacts: "View in Cozy Contacts",
|
|
@@ -114,8 +115,6 @@ var vi = {
|
|
|
114
115
|
},
|
|
115
116
|
call: "G\u1ECDi"
|
|
116
117
|
};
|
|
117
|
-
import { getI18n } from "cozy-ui/transpiled/react/providers/I18n/helpers";
|
|
118
|
-
import withOnlyLocales from "cozy-ui/transpiled/react/providers/I18n/withOnlyLocales";
|
|
119
118
|
export var locales = {
|
|
120
119
|
en: en,
|
|
121
120
|
fr: fr,
|
|
@@ -9,9 +9,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
9
9
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React, { forwardRef, useMemo } from 'react';
|
|
12
|
+
import { useI18n } from 'twake-i18n';
|
|
12
13
|
import { useWebviewIntent } from 'cozy-intent';
|
|
13
14
|
import { getActionName, getOnlyNeededActions } from "cozy-ui/transpiled/react/ActionsMenu/Actions/helpers";
|
|
14
|
-
import { useI18n } from "cozy-ui/transpiled/react/providers/I18n";
|
|
15
15
|
var ActionsItems = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
16
|
var docs = _ref.docs,
|
|
17
17
|
actions = _ref.actions,
|