cozy-ui 142.3.1 → 144.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 +35 -0
- package/package.json +1 -1
- package/react/CozyDialogs/SpecificDialogs/Readme.md +0 -23
- package/react/CozyDialogs/SpecificDialogs/index.jsx +0 -1
- package/react/CozyDialogs/SpecificDialogs/locales/de.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/en.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/es.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/fr.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/it.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/ru.json +0 -6
- package/react/CozyDialogs/SpecificDialogs/locales/vi.json +0 -6
- package/react/CozyDialogs/index.jsx +1 -5
- package/react/Table/Readme.md +48 -0
- package/react/Table/Virtualized/index.jsx +12 -10
- package/transpiled/react/CozyDialogs/SpecificDialogs/index.d.ts +0 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/index.js +0 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.js +0 -42
- package/transpiled/react/CozyDialogs/index.d.ts +1 -1
- package/transpiled/react/CozyDialogs/index.js +1 -1
- package/transpiled/react/Table/Virtualized/index.js +9 -9
- package/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.jsx +0 -72
- package/react/CozyDialogs/SpecificDialogs/icons/CozyLocation.jsx +0 -42
- package/transpiled/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.d.ts +0 -2
- package/transpiled/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.js +0 -73
- package/transpiled/react/CozyDialogs/SpecificDialogs/icons/CozyLocation.d.ts +0 -2
- package/transpiled/react/CozyDialogs/SpecificDialogs/icons/CozyLocation.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
# [144.0.0](https://github.com/cozy/cozy-ui/compare/v143.0.0...v144.0.0) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **CozyDialogs:** Remove AllowLocationDialog ([238bfd6](https://github.com/cozy/cozy-ui/commit/238bfd6))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **CozyDialogs:** AllowLocationDialog is no longer exported from
|
|
12
|
+
CozyDialogs. Apps that still need it must copy it.
|
|
13
|
+
|
|
14
|
+
# [143.0.0](https://github.com/cozy/cozy-ui/compare/v142.3.1...v143.0.0) (2026-10-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Code Refactoring
|
|
18
|
+
|
|
19
|
+
* **Table:** Remove secondarySort from VirtualizedTable ([772c5f7](https://github.com/cozy/cozy-ui/commit/772c5f7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **Table:** Add sortingMode to VirtualizedTable ([2413bd5](https://github.com/cozy/cozy-ui/commit/2413bd5))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### BREAKING CHANGES
|
|
28
|
+
|
|
29
|
+
* **Table:** VirtualizedTable no longer takes secondarySort. Sort
|
|
30
|
+
the rows, secondary order included, before passing them (stableSort
|
|
31
|
+
and getComparator are in cozy-ui/transpiled/react/Table/Virtualized/helpers),
|
|
32
|
+
and set sortingMode="server" so that the table keeps their order.
|
|
33
|
+
|
|
34
|
+
Assisted-by: LLM
|
|
35
|
+
|
|
1
36
|
## [142.3.1](https://github.com/cozy/cozy-ui/compare/v142.3.0...v142.3.1) (2026-10-13)
|
|
2
37
|
|
|
3
38
|
|
package/package.json
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
### AllowLocationDialog dialog
|
|
2
|
-
|
|
3
|
-
```jsx
|
|
4
|
-
import { useState } from 'react'
|
|
5
|
-
|
|
6
|
-
import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
|
|
7
|
-
import { AllowLocationDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
8
|
-
import Buttons from 'cozy-ui/transpiled/react/Buttons'
|
|
9
|
-
|
|
10
|
-
const [open, setOpen] = useState(isTesting())
|
|
11
|
-
|
|
12
|
-
;
|
|
13
|
-
|
|
14
|
-
<DemoProvider>
|
|
15
|
-
{ open && (
|
|
16
|
-
<AllowLocationDialog
|
|
17
|
-
onClose={() => { setOpen(false)}}
|
|
18
|
-
/>
|
|
19
|
-
)}
|
|
20
|
-
<Buttons onClick={() => { setOpen(true) }} label="Open AllowLocationDialog" />
|
|
21
|
-
</DemoProvider>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
1
|
### InstallFlagshipApp dialog
|
|
25
2
|
|
|
26
3
|
You can customize links and image with `playStoreUrl`, `appStoreUrl` and `QRCode` props.
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Abbrechen",
|
|
3
|
-
"allow": "Zulassen",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Zugriff auf Ihren Standort zulassen",
|
|
6
|
-
"description": "Ihr Twake benötigt dauerhaft Zugriff auf den Standort Ihres Telefons, um Ihre Wege zu speichern und Ihnen bei deren Auswertung zu helfen, auch wenn die App nicht verwendet wird.\n\nIhr Standort wird NIEMALS ohne Ihre Zustimmung an Dritte weitergegeben.\n\nSie können diese Funktion in den Einstellungen der App Coach CO2 deaktivieren."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Scannen Sie den QR-Code",
|
|
10
4
|
"text": "oder öffnen Sie direkt den <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>oder den <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a>, um die App Twake Workplace zu installieren",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Cancel",
|
|
3
|
-
"allow": "Allow",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Allow access to your location",
|
|
6
|
-
"description": "Your Twake needs to always be authorised to access your phone's location in order to memorise and help you analyse your movements, even when the app is not in use.\n\nIt will NEVER be passed on to anyone without your request.\n\nYou can deactivate this feature from the Coach CO2 app settings."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Scan the QR Code",
|
|
10
4
|
"text": "or go directly to the <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>or <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> to install the Twake Workplace app",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Cancelar",
|
|
3
|
-
"allow": "Permitir",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Permitir el acceso a su ubicación",
|
|
6
|
-
"description": "Su Twake necesita tener siempre autorización para acceder a la ubicación de su teléfono a fin de memorizar sus desplazamientos y ayudarle a analizarlos, incluso cuando la app no esté en uso.\n\nNUNCA se compartirá con nadie sin su solicitud.\n\nPuede desactivar esta función desde los ajustes de la app Coach CO2."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Escanee el código QR",
|
|
10
4
|
"text": "o vaya directamente a <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o a <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> para instalar la app Twake Workplace",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Annuler",
|
|
3
|
-
"allow": "Autoriser",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Autoriser l'accès à votre position",
|
|
6
|
-
"description": "Votre Twake a besoin d'être toujours autorisé à accéder à la position de votre téléphone pour mémoriser, et vous aider à analyser vos déplacements, même lorsque l'app n'est pas utilisée ou affichée.\n\nElle ne sera JAMAIS transmise à qui que ce soit sans votre demande.\n\nVous pourrez désactiver cette fonctionnalité depuis les paramètres de l'app Coach CO2."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Scannez le QR Code",
|
|
10
4
|
"text": "ou rendez vous directement sur <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>l’App Store</a><br>ou sur le <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> pour installer l’app Twake Workplace",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Annulla",
|
|
3
|
-
"allow": "Consenti",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Consenti l'accesso alla tua posizione",
|
|
6
|
-
"description": "Il tuo Twake deve essere sempre autorizzato ad accedere alla posizione del tuo telefono per memorizzare i tuoi spostamenti e aiutarti ad analizzarli, anche quando l'app non è in uso.\n\nNon verrà MAI condivisa con nessuno senza una tua richiesta.\n\nPuoi disattivare questa funzione dalle impostazioni dell'app Coach CO2."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Scansiona il codice QR",
|
|
10
4
|
"text": "oppure vai direttamente su <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o su <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> per installare l'app Twake Workplace",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Отменить",
|
|
3
|
-
"allow": "Разрешить",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Разрешить доступ к вашему местоположению",
|
|
6
|
-
"description": "Ваше приложение Twake должно всегда быть авторизовано для доступа к местоположению вашего телефона, чтобы запоминать и помочь вам анализировать ваши перемещения, даже когда приложение не используется.\n\nОно НИКОГДА не будет передано кому-либо без вашего запроса.\n\nВы можете отключить эту функцию в настройках приложения Coach CO2."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Отсканируйте QR-код",
|
|
10
4
|
"text": "или перейдите напрямую в <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>или <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> чтобы установить приложение Twake Workplace",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cancel": "Hủy",
|
|
3
|
-
"allow": "Cho phép",
|
|
4
|
-
"allow-location-dialog": {
|
|
5
|
-
"title": "Cho phép truy cập vào vị trí của bạn",
|
|
6
|
-
"description": "Twake của bạn cần phải luôn được ủy quyền để truy cập vị trí điện thoại của bạn để ghi nhớ và giúp bạn phân tích các chuyển động của mình, ngay cả khi ứng dụng không được sử dụng.\n\nNó sẽ KHÔNG BAO GIỜ được chuyển cho bất kỳ ai mà không có yêu cầu của bạn.\n\nBạn có thể hủy kích hoạt tính năng này từ cài đặt ứng dụng Coach CO2."
|
|
7
|
-
},
|
|
8
2
|
"install-flagship-app-dialog": {
|
|
9
3
|
"title": "Quét mã QR",
|
|
10
4
|
"text": "hoặc trực tiếp đến <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>hoặc <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> để cài đặt ứng dụng Twake Workplace",
|
|
@@ -9,8 +9,4 @@ export { default as IllustrationDialog } from './IllustrationDialog'
|
|
|
9
9
|
export { default as PermissionDialog } from './PermissionDialog'
|
|
10
10
|
export { default as useCozyDialog } from './useCozyDialog'
|
|
11
11
|
export { default as TopAnchoredDialog } from './TopAnchoredDialog'
|
|
12
|
-
export {
|
|
13
|
-
AllowLocationDialog,
|
|
14
|
-
InstallFlagshipAppDialog,
|
|
15
|
-
ShortcutDialog
|
|
16
|
-
} from './SpecificDialogs'
|
|
12
|
+
export { InstallFlagshipAppDialog, ShortcutDialog } from './SpecificDialogs'
|
package/react/Table/Readme.md
CHANGED
|
@@ -252,3 +252,51 @@ const DndExample = () => {
|
|
|
252
252
|
</SelectionProvider>
|
|
253
253
|
</DemoProvider>
|
|
254
254
|
```
|
|
255
|
+
|
|
256
|
+
### With rows sorted by the caller
|
|
257
|
+
|
|
258
|
+
With `sortingMode="server"`, the table keeps the rows in the given order, e.g. paged from a server: the headers still change the sort and call `onSortChange`, for the caller to sort the rows. With `sortingMode="client"`, the default, the table sorts them.
|
|
259
|
+
|
|
260
|
+
```jsx
|
|
261
|
+
import { useState } from 'react'
|
|
262
|
+
import VirtualizedTable from 'cozy-ui/transpiled/react/Table/Virtualized'
|
|
263
|
+
import { getComparator, stableSort } from 'cozy-ui/transpiled/react/Table/Virtualized/helpers'
|
|
264
|
+
import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
|
|
265
|
+
|
|
266
|
+
const rows = [
|
|
267
|
+
{ id: 0, name: 'Cupcake', calories: 305 },
|
|
268
|
+
{ id: 1, name: 'Donut', calories: 452 },
|
|
269
|
+
{ id: 2, name: 'Eclair', calories: 262 },
|
|
270
|
+
{ id: 3, name: 'Gingerbread', calories: 356 },
|
|
271
|
+
{ id: 4, name: 'Honeycomb', calories: 408 }
|
|
272
|
+
]
|
|
273
|
+
|
|
274
|
+
const columns = [
|
|
275
|
+
{ id: 'name', label: 'Dessert', width: 300 },
|
|
276
|
+
{ id: 'calories', label: 'Calories', width: 80, textAlign: 'right' }
|
|
277
|
+
]
|
|
278
|
+
|
|
279
|
+
// The caller sorts the rows, as a server would, and the table keeps their order
|
|
280
|
+
const SortedByCallerTable = () => {
|
|
281
|
+
const [sortedRows, setSortedRows] = useState(rows)
|
|
282
|
+
|
|
283
|
+
return (
|
|
284
|
+
<VirtualizedTable
|
|
285
|
+
rows={sortedRows}
|
|
286
|
+
columns={columns}
|
|
287
|
+
sortingMode="server"
|
|
288
|
+
onSortChange={({ order, orderBy }) =>
|
|
289
|
+
setSortedRows(stableSort(rows, getComparator(order, orderBy)))
|
|
290
|
+
}
|
|
291
|
+
/>
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
;
|
|
296
|
+
|
|
297
|
+
<DemoProvider>
|
|
298
|
+
<div style={{ border: "1px solid var(--borderMainColor)", height: 300, width: "100%" }}>
|
|
299
|
+
<SortedByCallerTable />
|
|
300
|
+
</div>
|
|
301
|
+
</DemoProvider>
|
|
302
|
+
```
|
|
@@ -17,7 +17,7 @@ const VirtualizedTable = forwardRef(
|
|
|
17
17
|
columns,
|
|
18
18
|
groups,
|
|
19
19
|
defaultOrder,
|
|
20
|
-
|
|
20
|
+
sortingMode,
|
|
21
21
|
selectedItems,
|
|
22
22
|
isSelectedItem,
|
|
23
23
|
componentsProps,
|
|
@@ -34,12 +34,13 @@ const VirtualizedTable = forwardRef(
|
|
|
34
34
|
)
|
|
35
35
|
const [orderBy, setOrderBy] = useState(defaultOrder?.by ?? undefined)
|
|
36
36
|
|
|
37
|
-
const data = useMemo(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const data = useMemo(
|
|
38
|
+
() =>
|
|
39
|
+
orderBy && sortingMode === 'client'
|
|
40
|
+
? stableSort(rows, getComparator(orderDirection, orderBy))
|
|
41
|
+
: rows,
|
|
42
|
+
[rows, orderBy, orderDirection, sortingMode]
|
|
43
|
+
)
|
|
43
44
|
const { groupLabels, groupCounts } = groups?.(data) || {}
|
|
44
45
|
const isGroupedTable = !!groupCounts
|
|
45
46
|
const _context = {
|
|
@@ -105,6 +106,7 @@ const VirtualizedTable = forwardRef(
|
|
|
105
106
|
VirtualizedTable.displayName = 'VirtualizedTable'
|
|
106
107
|
|
|
107
108
|
VirtualizedTable.defaultProps = {
|
|
109
|
+
sortingMode: 'client',
|
|
108
110
|
selectedItems: [],
|
|
109
111
|
isSelectedItem: () => {}
|
|
110
112
|
}
|
|
@@ -116,19 +118,19 @@ VirtualizedTable.propTypes = {
|
|
|
116
118
|
columns: PropTypes.array,
|
|
117
119
|
/** Returned object is: PropTypes.shape({ groupLabels: PropTypes.array, groupCounts: PropTypes.array }) */
|
|
118
120
|
groups: PropTypes.func,
|
|
119
|
-
/**
|
|
121
|
+
/** Column sorted at first: without it, no column is sorted until one is clicked */
|
|
120
122
|
defaultOrder: PropTypes.shape({
|
|
121
123
|
direction: PropTypes.oneOf(['asc', 'desc']),
|
|
122
124
|
by: PropTypes.string
|
|
123
125
|
}),
|
|
126
|
+
/** Who sorts the rows. 'server': the table keeps the given order, its headers changing the sort and calling onSortChange for the caller to sort them, e.g. on its server. 'client': the table sorts them by the sorted column */
|
|
127
|
+
sortingMode: PropTypes.oneOf(['client', 'server']),
|
|
124
128
|
/** Context object passed down to children and virtuoso */
|
|
125
129
|
context: PropTypes.object,
|
|
126
130
|
/** Props passed to child components */
|
|
127
131
|
componentsProps: PropTypes.object,
|
|
128
132
|
/** Custom components used by react-virtuoso */
|
|
129
133
|
components: PropTypes.object,
|
|
130
|
-
/** Sort files by type to put directory and trash before files */
|
|
131
|
-
secondarySort: PropTypes.func,
|
|
132
134
|
/** Array of selected items */
|
|
133
135
|
selectedItems: PropTypes.array,
|
|
134
136
|
/** Function to determine if a row is selected */
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { withOnlyLocales } from 'twake-i18n';
|
|
2
2
|
var de = {
|
|
3
|
-
cancel: "Abbrechen",
|
|
4
|
-
allow: "Zulassen",
|
|
5
|
-
"allow-location-dialog": {
|
|
6
|
-
title: "Zugriff auf Ihren Standort zulassen",
|
|
7
|
-
description: "Ihr Twake ben\xF6tigt dauerhaft Zugriff auf den Standort Ihres Telefons, um Ihre Wege zu speichern und Ihnen bei deren Auswertung zu helfen, auch wenn die App nicht verwendet wird.\n\nIhr Standort wird NIEMALS ohne Ihre Zustimmung an Dritte weitergegeben.\n\nSie k\xF6nnen diese Funktion in den Einstellungen der App Coach CO2 deaktivieren."
|
|
8
|
-
},
|
|
9
3
|
"install-flagship-app-dialog": {
|
|
10
4
|
title: "Scannen Sie den QR-Code",
|
|
11
5
|
text: "oder \xF6ffnen Sie direkt den <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>oder den <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a>, um die App Twake Workplace zu installieren",
|
|
@@ -41,12 +35,6 @@ var de = {
|
|
|
41
35
|
}
|
|
42
36
|
};
|
|
43
37
|
var en = {
|
|
44
|
-
cancel: "Cancel",
|
|
45
|
-
allow: "Allow",
|
|
46
|
-
"allow-location-dialog": {
|
|
47
|
-
title: "Allow access to your location",
|
|
48
|
-
description: "Your Twake needs to always be authorised to access your phone's location in order to memorise and help you analyse your movements, even when the app is not in use.\n\nIt will NEVER be passed on to anyone without your request.\n\nYou can deactivate this feature from the Coach CO2 app settings."
|
|
49
|
-
},
|
|
50
38
|
"install-flagship-app-dialog": {
|
|
51
39
|
title: "Scan the QR Code",
|
|
52
40
|
text: "or go directly to the <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>or <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> to install the Twake\xA0Workplace app",
|
|
@@ -82,12 +70,6 @@ var en = {
|
|
|
82
70
|
}
|
|
83
71
|
};
|
|
84
72
|
var es = {
|
|
85
|
-
cancel: "Cancelar",
|
|
86
|
-
allow: "Permitir",
|
|
87
|
-
"allow-location-dialog": {
|
|
88
|
-
title: "Permitir el acceso a su ubicaci\xF3n",
|
|
89
|
-
description: "Su Twake necesita tener siempre autorizaci\xF3n para acceder a la ubicaci\xF3n de su tel\xE9fono a fin de memorizar sus desplazamientos y ayudarle a analizarlos, incluso cuando la app no est\xE9 en uso.\n\nNUNCA se compartir\xE1 con nadie sin su solicitud.\n\nPuede desactivar esta funci\xF3n desde los ajustes de la app Coach CO2."
|
|
90
|
-
},
|
|
91
73
|
"install-flagship-app-dialog": {
|
|
92
74
|
title: "Escanee el c\xF3digo QR",
|
|
93
75
|
text: "o vaya directamente a <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o a <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> para instalar la app Twake Workplace",
|
|
@@ -123,12 +105,6 @@ var es = {
|
|
|
123
105
|
}
|
|
124
106
|
};
|
|
125
107
|
var fr = {
|
|
126
|
-
cancel: "Annuler",
|
|
127
|
-
allow: "Autoriser",
|
|
128
|
-
"allow-location-dialog": {
|
|
129
|
-
title: "Autoriser l'acc\xE8s \xE0 votre position",
|
|
130
|
-
description: "Votre Twake a besoin d'\xEAtre toujours autoris\xE9 \xE0 acc\xE9der \xE0 la position de votre t\xE9l\xE9phone pour m\xE9moriser, et vous aider \xE0 analyser vos d\xE9placements, m\xEAme lorsque l'app n'est pas utilis\xE9e ou affich\xE9e.\n\nElle ne sera JAMAIS transmise \xE0 qui que ce soit sans votre demande.\n\nVous pourrez d\xE9sactiver cette fonctionnalit\xE9 depuis les param\xE8tres de l'app Coach CO2."
|
|
131
|
-
},
|
|
132
108
|
"install-flagship-app-dialog": {
|
|
133
109
|
title: "Scannez le QR Code",
|
|
134
110
|
text: "ou rendez vous directement sur <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>l\u2019App Store</a><br>ou sur le <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> pour installer l\u2019app Twake\xA0Workplace",
|
|
@@ -164,12 +140,6 @@ var fr = {
|
|
|
164
140
|
}
|
|
165
141
|
};
|
|
166
142
|
var it = {
|
|
167
|
-
cancel: "Annulla",
|
|
168
|
-
allow: "Consenti",
|
|
169
|
-
"allow-location-dialog": {
|
|
170
|
-
title: "Consenti l'accesso alla tua posizione",
|
|
171
|
-
description: "Il tuo Twake deve essere sempre autorizzato ad accedere alla posizione del tuo telefono per memorizzare i tuoi spostamenti e aiutarti ad analizzarli, anche quando l'app non \xE8 in uso.\n\nNon verr\xE0 MAI condivisa con nessuno senza una tua richiesta.\n\nPuoi disattivare questa funzione dalle impostazioni dell'app Coach CO2."
|
|
172
|
-
},
|
|
173
143
|
"install-flagship-app-dialog": {
|
|
174
144
|
title: "Scansiona il codice QR",
|
|
175
145
|
text: "oppure vai direttamente su <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o su <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> per installare l'app Twake Workplace",
|
|
@@ -205,12 +175,6 @@ var it = {
|
|
|
205
175
|
}
|
|
206
176
|
};
|
|
207
177
|
var ru = {
|
|
208
|
-
cancel: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",
|
|
209
|
-
allow: "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C",
|
|
210
|
-
"allow-location-dialog": {
|
|
211
|
-
title: "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0432\u0430\u0448\u0435\u043C\u0443 \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044E",
|
|
212
|
-
description: "\u0412\u0430\u0448\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 Twake \u0434\u043E\u043B\u0436\u043D\u043E \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044B\u0442\u044C \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u043D\u043E \u0434\u043B\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0432\u0430\u0448\u0435\u0433\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u0442\u044C \u0438 \u043F\u043E\u043C\u043E\u0447\u044C \u0432\u0430\u043C \u0430\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0430\u0448\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F, \u0434\u0430\u0436\u0435 \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043D\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F.\n\n\u041E\u043D\u043E \u041D\u0418\u041A\u041E\u0413\u0414\u0410 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u043D\u043E \u043A\u043E\u043C\u0443-\u043B\u0438\u0431\u043E \u0431\u0435\u0437 \u0432\u0430\u0448\u0435\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0430.\n\n\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u044D\u0442\u0443 \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F Coach CO2."
|
|
213
|
-
},
|
|
214
178
|
"install-flagship-app-dialog": {
|
|
215
179
|
title: "\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434",
|
|
216
180
|
text: "\u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u044F\u043C\u0443\u044E \u0432 <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>\u0438\u043B\u0438 <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> \u0447\u0442\u043E\u0431\u044B \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 Twake Workplace",
|
|
@@ -246,12 +210,6 @@ var ru = {
|
|
|
246
210
|
}
|
|
247
211
|
};
|
|
248
212
|
var vi = {
|
|
249
|
-
cancel: "H\u1EE7y",
|
|
250
|
-
allow: "Cho ph\xE9p",
|
|
251
|
-
"allow-location-dialog": {
|
|
252
|
-
title: "Cho ph\xE9p truy c\u1EADp v\xE0o v\u1ECB tr\xED c\u1EE7a b\u1EA1n",
|
|
253
|
-
description: "Twake c\u1EE7a b\u1EA1n c\u1EA7n ph\u1EA3i lu\xF4n \u0111\u01B0\u1EE3c \u1EE7y quy\u1EC1n \u0111\u1EC3 truy c\u1EADp v\u1ECB tr\xED \u0111i\u1EC7n tho\u1EA1i c\u1EE7a b\u1EA1n \u0111\u1EC3 ghi nh\u1EDB v\xE0 gi\xFAp b\u1EA1n ph\xE2n t\xEDch c\xE1c chuy\u1EC3n \u0111\u1ED9ng c\u1EE7a m\xECnh, ngay c\u1EA3 khi \u1EE9ng d\u1EE5ng kh\xF4ng \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng.\n\nN\xF3 s\u1EBD KH\xD4NG BAO GI\u1EDC \u0111\u01B0\u1EE3c chuy\u1EC3n cho b\u1EA5t k\u1EF3 ai m\xE0 kh\xF4ng c\xF3 y\xEAu c\u1EA7u c\u1EE7a b\u1EA1n.\n\nB\u1EA1n c\xF3 th\u1EC3 h\u1EE7y k\xEDch ho\u1EA1t t\xEDnh n\u0103ng n\xE0y t\u1EEB c\xE0i \u0111\u1EB7t \u1EE9ng d\u1EE5ng Coach CO2."
|
|
254
|
-
},
|
|
255
213
|
"install-flagship-app-dialog": {
|
|
256
214
|
title: "Qu\xE9t m\xE3 QR",
|
|
257
215
|
text: "ho\u1EB7c tr\u1EF1c ti\u1EBFp \u0111\u1EBFn <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>ho\u1EB7c <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> \u0111\u1EC3 c\xE0i \u0111\u1EB7t \u1EE9ng d\u1EE5ng Twake Workplace",
|
|
@@ -8,4 +8,4 @@ export { default as IllustrationDialog } from "./IllustrationDialog";
|
|
|
8
8
|
export { default as PermissionDialog } from "./PermissionDialog";
|
|
9
9
|
export { default as useCozyDialog } from "./useCozyDialog";
|
|
10
10
|
export { default as TopAnchoredDialog } from "./TopAnchoredDialog";
|
|
11
|
-
export {
|
|
11
|
+
export { InstallFlagshipAppDialog, ShortcutDialog } from "./SpecificDialogs";
|
|
@@ -8,4 +8,4 @@ export { default as IllustrationDialog } from './IllustrationDialog';
|
|
|
8
8
|
export { default as PermissionDialog } from './PermissionDialog';
|
|
9
9
|
export { default as useCozyDialog } from './useCozyDialog';
|
|
10
10
|
export { default as TopAnchoredDialog } from './TopAnchoredDialog';
|
|
11
|
-
export {
|
|
11
|
+
export { InstallFlagshipAppDialog, ShortcutDialog } from './SpecificDialogs';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["rows", "columns", "groups", "defaultOrder", "
|
|
5
|
+
var _excluded = ["rows", "columns", "groups", "defaultOrder", "sortingMode", "selectedItems", "isSelectedItem", "componentsProps", "context", "components", "onSortChange", "isNewItem"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ var VirtualizedTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24
24
|
columns = _ref.columns,
|
|
25
25
|
groups = _ref.groups,
|
|
26
26
|
defaultOrder = _ref.defaultOrder,
|
|
27
|
-
|
|
27
|
+
sortingMode = _ref.sortingMode,
|
|
28
28
|
selectedItems = _ref.selectedItems,
|
|
29
29
|
isSelectedItem = _ref.isSelectedItem,
|
|
30
30
|
componentsProps = _ref.componentsProps,
|
|
@@ -45,9 +45,8 @@ var VirtualizedTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
45
45
|
setOrderBy = _useState4[1];
|
|
46
46
|
|
|
47
47
|
var data = useMemo(function () {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, [rows, orderBy, orderDirection, secondarySort]);
|
|
48
|
+
return orderBy && sortingMode === 'client' ? stableSort(rows, getComparator(orderDirection, orderBy)) : rows;
|
|
49
|
+
}, [rows, orderBy, orderDirection, sortingMode]);
|
|
51
50
|
|
|
52
51
|
var _ref2 = (groups === null || groups === void 0 ? void 0 : groups(data)) || {},
|
|
53
52
|
groupLabels = _ref2.groupLabels,
|
|
@@ -114,6 +113,7 @@ var VirtualizedTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
114
113
|
});
|
|
115
114
|
VirtualizedTable.displayName = 'VirtualizedTable';
|
|
116
115
|
VirtualizedTable.defaultProps = {
|
|
116
|
+
sortingMode: 'client',
|
|
117
117
|
selectedItems: [],
|
|
118
118
|
isSelectedItem: function isSelectedItem() {}
|
|
119
119
|
};
|
|
@@ -127,12 +127,15 @@ VirtualizedTable.propTypes = {
|
|
|
127
127
|
/** Returned object is: PropTypes.shape({ groupLabels: PropTypes.array, groupCounts: PropTypes.array }) */
|
|
128
128
|
groups: PropTypes.func,
|
|
129
129
|
|
|
130
|
-
/**
|
|
130
|
+
/** Column sorted at first: without it, no column is sorted until one is clicked */
|
|
131
131
|
defaultOrder: PropTypes.shape({
|
|
132
132
|
direction: PropTypes.oneOf(['asc', 'desc']),
|
|
133
133
|
by: PropTypes.string
|
|
134
134
|
}),
|
|
135
135
|
|
|
136
|
+
/** Who sorts the rows. 'server': the table keeps the given order, its headers changing the sort and calling onSortChange for the caller to sort them, e.g. on its server. 'client': the table sorts them by the sorted column */
|
|
137
|
+
sortingMode: PropTypes.oneOf(['client', 'server']),
|
|
138
|
+
|
|
136
139
|
/** Context object passed down to children and virtuoso */
|
|
137
140
|
context: PropTypes.object,
|
|
138
141
|
|
|
@@ -142,9 +145,6 @@ VirtualizedTable.propTypes = {
|
|
|
142
145
|
/** Custom components used by react-virtuoso */
|
|
143
146
|
components: PropTypes.object,
|
|
144
147
|
|
|
145
|
-
/** Sort files by type to put directory and trash before files */
|
|
146
|
-
secondarySort: PropTypes.func,
|
|
147
|
-
|
|
148
148
|
/** Array of selected items */
|
|
149
149
|
selectedItems: PropTypes.array,
|
|
150
150
|
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@linagora/twake-icons'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import React, { forwardRef } from 'react'
|
|
4
|
-
import { useI18n } from 'twake-i18n'
|
|
5
|
-
|
|
6
|
-
import CozyLocation from './icons/CozyLocation'
|
|
7
|
-
import withSpecificDialogsLocales from './withSpecificDialogsLocales'
|
|
8
|
-
import { IllustrationDialog } from '..'
|
|
9
|
-
import Button from '../../Buttons'
|
|
10
|
-
import Typography from '../../Typography'
|
|
11
|
-
|
|
12
|
-
const createStyles = () => ({
|
|
13
|
-
typography: {
|
|
14
|
-
whiteSpace: 'pre-line'
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const AllowLocationDialog = forwardRef(
|
|
19
|
-
({ onClose, onAllow, description }, ref) => {
|
|
20
|
-
const { t } = useI18n()
|
|
21
|
-
|
|
22
|
-
const styles = createStyles()
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<IllustrationDialog
|
|
26
|
-
open
|
|
27
|
-
ref={ref}
|
|
28
|
-
size="small"
|
|
29
|
-
onClose={onClose}
|
|
30
|
-
title={
|
|
31
|
-
<div className="u-flex u-flex-column u-flex-items-center">
|
|
32
|
-
<Icon icon={CozyLocation} width={128} height={128} />
|
|
33
|
-
<Typography variant="h3" className="u-ta-center">
|
|
34
|
-
{t('allow-location-dialog.title')}
|
|
35
|
-
</Typography>
|
|
36
|
-
</div>
|
|
37
|
-
}
|
|
38
|
-
content={
|
|
39
|
-
<div className="u-ta-center">
|
|
40
|
-
<Typography
|
|
41
|
-
gutterBottom
|
|
42
|
-
variant="body1"
|
|
43
|
-
color="textPrimary"
|
|
44
|
-
style={styles.typography}
|
|
45
|
-
>
|
|
46
|
-
{description || t('allow-location-dialog.description')}
|
|
47
|
-
</Typography>
|
|
48
|
-
</div>
|
|
49
|
-
}
|
|
50
|
-
actions={
|
|
51
|
-
<>
|
|
52
|
-
<Button variant="secondary" label={t('cancel')} onClick={onClose} />
|
|
53
|
-
<Button variant="primary" label={t('allow')} onClick={onAllow} />
|
|
54
|
-
</>
|
|
55
|
-
}
|
|
56
|
-
/>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
AllowLocationDialog.propTypes = {
|
|
62
|
-
/** A function called when clicking the close button */
|
|
63
|
-
onClose: PropTypes.func,
|
|
64
|
-
/** A function called when clicking the allow button */
|
|
65
|
-
onAllow: PropTypes.func,
|
|
66
|
-
/** A custom description */
|
|
67
|
-
description: PropTypes.string
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
AllowLocationDialog.displayName = 'AllowLocationDialog'
|
|
71
|
-
|
|
72
|
-
export default withSpecificDialogsLocales(AllowLocationDialog)
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/illus/cozy-location.svg` to regenerate;
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
function SvgCozyLocation(props) {
|
|
5
|
-
return (
|
|
6
|
-
<svg viewBox="0 0 172 128" fill="none" {...props}>
|
|
7
|
-
<path
|
|
8
|
-
fillRule="evenodd"
|
|
9
|
-
clipRule="evenodd"
|
|
10
|
-
d="M51.533 125.273c2.862 1.018 10.204 1.899 16.121 2.251 16.158.963 38.736.439 48.306-1.331 9.642-1.785 10.07-4.485-14.44-5.821-20.872-1.139-45.234.484-50.444 2.901-1.399.648-1.322 1.369.457 2z"
|
|
11
|
-
fill="#BBD9FD"
|
|
12
|
-
/>
|
|
13
|
-
<path
|
|
14
|
-
fillRule="evenodd"
|
|
15
|
-
clipRule="evenodd"
|
|
16
|
-
d="M92.189 18.264l-34.745 7.19c-5.051 1.052-8.293 5.965-7.248 10.99l14.47 69.251c1.045 5.03 5.99 8.247 11.037 7.217l34.749-7.217a9.282 9.282 0 007.243-10.99l-14.464-69.24c-1.051-5.025-5.99-8.253-11.042-7.201z"
|
|
17
|
-
fill="#297EF1"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
fillRule="evenodd"
|
|
21
|
-
clipRule="evenodd"
|
|
22
|
-
d="M108.213 83.562L68.9 91.715 57.72 38.219l39.324-8.142 11.169 53.485zm-14.002 16.2a3.515 3.515 0 01-4.85.998 3.456 3.456 0 01-1.507-2.209 3.468 3.468 0 01.51-2.615c1.092-1.558 3.204-1.992 4.844-1.009a3.475 3.475 0 011.013 4.824l-.01.01z"
|
|
23
|
-
fill="#BBD9FD"
|
|
24
|
-
/>
|
|
25
|
-
<path
|
|
26
|
-
d="M131.104 0c-18.777 0-34 15.222-34 34l.004.46a33.997 33.997 0 0017.697 29.386l.241.129.094-.163c-.507.853-.823 1.741-.823 2.623 0 1.898.905 3.494 2.734 4.132l.307.102c3.468 1.092 6.602.057 10.395-2.599l.289-.207.749.06c.767.051 1.539.077 2.313.077 18.778 0 34-15.222 34-34s-15.222-34-34-34z"
|
|
27
|
-
fill="#fff"
|
|
28
|
-
/>
|
|
29
|
-
<path
|
|
30
|
-
d="M131.104 0c-18.777 0-34 15.222-34 34l.004.46a33.997 33.997 0 0017.697 29.386l.241.129.094-.163c-.507.853-.823 1.741-.823 2.623 0 1.898.905 3.494 2.734 4.132l.307.102c3.468 1.092 6.602.057 10.395-2.599l.289-.207.749.06c.767.051 1.539.077 2.313.077 18.778 0 34-15.222 34-34s-15.222-34-34-34zm0 4c16.569 0 30 13.431 30 30 0 16.569-13.431 30-30 30a30.39 30.39 0 01-3.395-.19l-.773-.087-1.19.867c-2.986 2.143-5.098 2.895-7.163 2.27l-.214-.07c-.048-.017-.052-.023-.052-.356 0-.038.09-.29.241-.544l.081-.13a7.163 7.163 0 00.964-2.237l.392-1.598-1.493-.692A30.001 30.001 0 01101.104 34c0-16.569 13.432-30 30-30z"
|
|
31
|
-
fill="#BBD9FD"
|
|
32
|
-
/>
|
|
33
|
-
<path
|
|
34
|
-
d="M144.667 29.333c0 7.992-9.776 20.872-12.586 24.41a.945.945 0 01-1.495 0C127.776 50.204 118 37.324 118 29.332 118 21.97 123.97 16 131.333 16c7.364 0 13.334 5.97 13.334 13.333z"
|
|
35
|
-
fill="#97ECA1"
|
|
36
|
-
/>
|
|
37
|
-
<circle cx={131.333} cy={29.333} fill="#09AE1C" r={5.333} />
|
|
38
|
-
</svg>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default SvgCozyLocation
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@linagora/twake-icons';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import React, { forwardRef } from 'react';
|
|
4
|
-
import { useI18n } from 'twake-i18n';
|
|
5
|
-
import CozyLocation from "cozy-ui/transpiled/react/CozyDialogs/SpecificDialogs/icons/CozyLocation";
|
|
6
|
-
import withSpecificDialogsLocales from "cozy-ui/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales";
|
|
7
|
-
import { IllustrationDialog } from "cozy-ui/transpiled/react/CozyDialogs";
|
|
8
|
-
import Button from "cozy-ui/transpiled/react/Buttons";
|
|
9
|
-
import Typography from "cozy-ui/transpiled/react/Typography";
|
|
10
|
-
|
|
11
|
-
var createStyles = function createStyles() {
|
|
12
|
-
return {
|
|
13
|
-
typography: {
|
|
14
|
-
whiteSpace: 'pre-line'
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
var AllowLocationDialog = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
20
|
-
var onClose = _ref.onClose,
|
|
21
|
-
onAllow = _ref.onAllow,
|
|
22
|
-
description = _ref.description;
|
|
23
|
-
|
|
24
|
-
var _useI18n = useI18n(),
|
|
25
|
-
t = _useI18n.t;
|
|
26
|
-
|
|
27
|
-
var styles = createStyles();
|
|
28
|
-
return /*#__PURE__*/React.createElement(IllustrationDialog, {
|
|
29
|
-
open: true,
|
|
30
|
-
ref: ref,
|
|
31
|
-
size: "small",
|
|
32
|
-
onClose: onClose,
|
|
33
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: "u-flex u-flex-column u-flex-items-center"
|
|
35
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
36
|
-
icon: CozyLocation,
|
|
37
|
-
width: 128,
|
|
38
|
-
height: 128
|
|
39
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
40
|
-
variant: "h3",
|
|
41
|
-
className: "u-ta-center"
|
|
42
|
-
}, t('allow-location-dialog.title'))),
|
|
43
|
-
content: /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: "u-ta-center"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
46
|
-
gutterBottom: true,
|
|
47
|
-
variant: "body1",
|
|
48
|
-
color: "textPrimary",
|
|
49
|
-
style: styles.typography
|
|
50
|
-
}, description || t('allow-location-dialog.description'))),
|
|
51
|
-
actions: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
52
|
-
variant: "secondary",
|
|
53
|
-
label: t('cancel'),
|
|
54
|
-
onClick: onClose
|
|
55
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
56
|
-
variant: "primary",
|
|
57
|
-
label: t('allow'),
|
|
58
|
-
onClick: onAllow
|
|
59
|
-
}))
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
AllowLocationDialog.propTypes = {
|
|
63
|
-
/** A function called when clicking the close button */
|
|
64
|
-
onClose: PropTypes.func,
|
|
65
|
-
|
|
66
|
-
/** A function called when clicking the allow button */
|
|
67
|
-
onAllow: PropTypes.func,
|
|
68
|
-
|
|
69
|
-
/** A custom description */
|
|
70
|
-
description: PropTypes.string
|
|
71
|
-
};
|
|
72
|
-
AllowLocationDialog.displayName = 'AllowLocationDialog';
|
|
73
|
-
export default withSpecificDialogsLocales(AllowLocationDialog);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/illus/cozy-location.svg` to regenerate;
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
function SvgCozyLocation(props) {
|
|
6
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
-
viewBox: "0 0 172 128",
|
|
8
|
-
fill: "none"
|
|
9
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
-
fillRule: "evenodd",
|
|
11
|
-
clipRule: "evenodd",
|
|
12
|
-
d: "M51.533 125.273c2.862 1.018 10.204 1.899 16.121 2.251 16.158.963 38.736.439 48.306-1.331 9.642-1.785 10.07-4.485-14.44-5.821-20.872-1.139-45.234.484-50.444 2.901-1.399.648-1.322 1.369.457 2z",
|
|
13
|
-
fill: "#BBD9FD"
|
|
14
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
-
fillRule: "evenodd",
|
|
16
|
-
clipRule: "evenodd",
|
|
17
|
-
d: "M92.189 18.264l-34.745 7.19c-5.051 1.052-8.293 5.965-7.248 10.99l14.47 69.251c1.045 5.03 5.99 8.247 11.037 7.217l34.749-7.217a9.282 9.282 0 007.243-10.99l-14.464-69.24c-1.051-5.025-5.99-8.253-11.042-7.201z",
|
|
18
|
-
fill: "#297EF1"
|
|
19
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
-
fillRule: "evenodd",
|
|
21
|
-
clipRule: "evenodd",
|
|
22
|
-
d: "M108.213 83.562L68.9 91.715 57.72 38.219l39.324-8.142 11.169 53.485zm-14.002 16.2a3.515 3.515 0 01-4.85.998 3.456 3.456 0 01-1.507-2.209 3.468 3.468 0 01.51-2.615c1.092-1.558 3.204-1.992 4.844-1.009a3.475 3.475 0 011.013 4.824l-.01.01z",
|
|
23
|
-
fill: "#BBD9FD"
|
|
24
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
-
d: "M131.104 0c-18.777 0-34 15.222-34 34l.004.46a33.997 33.997 0 0017.697 29.386l.241.129.094-.163c-.507.853-.823 1.741-.823 2.623 0 1.898.905 3.494 2.734 4.132l.307.102c3.468 1.092 6.602.057 10.395-2.599l.289-.207.749.06c.767.051 1.539.077 2.313.077 18.778 0 34-15.222 34-34s-15.222-34-34-34z",
|
|
26
|
-
fill: "#fff"
|
|
27
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
28
|
-
d: "M131.104 0c-18.777 0-34 15.222-34 34l.004.46a33.997 33.997 0 0017.697 29.386l.241.129.094-.163c-.507.853-.823 1.741-.823 2.623 0 1.898.905 3.494 2.734 4.132l.307.102c3.468 1.092 6.602.057 10.395-2.599l.289-.207.749.06c.767.051 1.539.077 2.313.077 18.778 0 34-15.222 34-34s-15.222-34-34-34zm0 4c16.569 0 30 13.431 30 30 0 16.569-13.431 30-30 30a30.39 30.39 0 01-3.395-.19l-.773-.087-1.19.867c-2.986 2.143-5.098 2.895-7.163 2.27l-.214-.07c-.048-.017-.052-.023-.052-.356 0-.038.09-.29.241-.544l.081-.13a7.163 7.163 0 00.964-2.237l.392-1.598-1.493-.692A30.001 30.001 0 01101.104 34c0-16.569 13.432-30 30-30z",
|
|
29
|
-
fill: "#BBD9FD"
|
|
30
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
-
d: "M144.667 29.333c0 7.992-9.776 20.872-12.586 24.41a.945.945 0 01-1.495 0C127.776 50.204 118 37.324 118 29.332 118 21.97 123.97 16 131.333 16c7.364 0 13.334 5.97 13.334 13.333z",
|
|
32
|
-
fill: "#97ECA1"
|
|
33
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
34
|
-
cx: 131.333,
|
|
35
|
-
cy: 29.333,
|
|
36
|
-
fill: "#09AE1C",
|
|
37
|
-
r: 5.333
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default SvgCozyLocation;
|