cozy-bar 8.4.2 → 8.4.3

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 (103) hide show
  1. package/dist/cozy-bar.min.js +4 -4
  2. package/dist/cozy-bar.min.js.map +1 -1
  3. package/package.json +2 -2
  4. package/CHANGELOG.md +0 -493
  5. package/transpiled/assets/icons/16/icon-storage-16.svg +0 -3
  6. package/transpiled/assets/icons/24/icon-arrow-left.svg +0 -3
  7. package/transpiled/assets/icons/32/icon-claudy.svg +0 -1
  8. package/transpiled/assets/icons/apps/icon-collect.svg +0 -25
  9. package/transpiled/assets/icons/apps/icon-drive.svg +0 -17
  10. package/transpiled/assets/icons/apps/icon-market-soon.svg +0 -25
  11. package/transpiled/assets/icons/apps/icon-photos.svg +0 -19
  12. package/transpiled/assets/icons/apps/icon-soon.svg +0 -21
  13. package/transpiled/assets/icons/apps/icon-store.svg +0 -19
  14. package/transpiled/assets/icons/claudyActions/icon-bills.svg +0 -6
  15. package/transpiled/assets/icons/claudyActions/icon-laptop.svg +0 -7
  16. package/transpiled/assets/icons/claudyActions/icon-phone.svg +0 -8
  17. package/transpiled/assets/icons/claudyActions/icon-question-mark.svg +0 -6
  18. package/transpiled/assets/icons/comingsoon/icon-bank.svg +0 -12
  19. package/transpiled/assets/icons/comingsoon/icon-sante.svg +0 -12
  20. package/transpiled/assets/icons/comingsoon/icon-store.svg +0 -6
  21. package/transpiled/assets/icons/icon-cozy.svg +0 -3
  22. package/transpiled/assets/icons/icon-shield.svg +0 -3
  23. package/transpiled/assets/icons/spinner.svg +0 -4
  24. package/transpiled/assets/sprites/icon-apps.svg +0 -1
  25. package/transpiled/assets/sprites/icon-cozy-home.svg +0 -16
  26. package/transpiled/components/Apps/AppItem.js +0 -134
  27. package/transpiled/components/Apps/AppItemPlaceholder.js +0 -14
  28. package/transpiled/components/Apps/AppNavButtons.js +0 -108
  29. package/transpiled/components/Apps/AppsContent.js +0 -124
  30. package/transpiled/components/Apps/ButtonCozyHome.js +0 -25
  31. package/transpiled/components/Apps/ButtonCozyHome.spec.jsx +0 -53
  32. package/transpiled/components/Apps/IconCozyHome.js +0 -67
  33. package/transpiled/components/Apps/index.js +0 -102
  34. package/transpiled/components/Banner.js +0 -76
  35. package/transpiled/components/Bar.js +0 -329
  36. package/transpiled/components/Bar.spec.jsx +0 -133
  37. package/transpiled/components/Claudy.js +0 -123
  38. package/transpiled/components/ClaudyIcon.js +0 -16
  39. package/transpiled/components/Drawer.js +0 -367
  40. package/transpiled/components/Drawer.spec.jsx +0 -98
  41. package/transpiled/components/SearchBar.js +0 -407
  42. package/transpiled/components/Settings/SettingsContent.js +0 -128
  43. package/transpiled/components/Settings/StorageData.js +0 -24
  44. package/transpiled/components/Settings/helper.js +0 -9
  45. package/transpiled/components/Settings/index.js +0 -225
  46. package/transpiled/components/StorageIcon.js +0 -16
  47. package/transpiled/components/SupportModal.js +0 -86
  48. package/transpiled/components/__snapshots__/Bar.spec.jsx.snap +0 -302
  49. package/transpiled/config/claudyActions.json +0 -20
  50. package/transpiled/config/persistWhitelist.json +0 -4
  51. package/transpiled/cozy-bar.css +0 -5905
  52. package/transpiled/dom.js +0 -84
  53. package/transpiled/index.js +0 -246
  54. package/transpiled/index.spec.jsx +0 -34
  55. package/transpiled/lib/api/helpers.js +0 -12
  56. package/transpiled/lib/api/index.js +0 -175
  57. package/transpiled/lib/exceptions.js +0 -156
  58. package/transpiled/lib/expiringMemoize.js +0 -17
  59. package/transpiled/lib/icon.js +0 -154
  60. package/transpiled/lib/intents.js +0 -17
  61. package/transpiled/lib/logger.js +0 -10
  62. package/transpiled/lib/middlewares/appsI18n.js +0 -64
  63. package/transpiled/lib/realtime.js +0 -76
  64. package/transpiled/lib/reducers/apps.js +0 -291
  65. package/transpiled/lib/reducers/apps.spec.js +0 -59
  66. package/transpiled/lib/reducers/content.js +0 -68
  67. package/transpiled/lib/reducers/context.js +0 -138
  68. package/transpiled/lib/reducers/index.js +0 -59
  69. package/transpiled/lib/reducers/locale.js +0 -27
  70. package/transpiled/lib/reducers/settings.js +0 -253
  71. package/transpiled/lib/reducers/theme.js +0 -64
  72. package/transpiled/lib/reducers/unserializable.js +0 -31
  73. package/transpiled/lib/stack-client.js +0 -442
  74. package/transpiled/lib/stack.js +0 -122
  75. package/transpiled/lib/store/index.js +0 -42
  76. package/transpiled/locales/de.json +0 -57
  77. package/transpiled/locales/en.json +0 -57
  78. package/transpiled/locales/es.json +0 -57
  79. package/transpiled/locales/fr.json +0 -57
  80. package/transpiled/locales/it.json +0 -57
  81. package/transpiled/locales/ja.json +0 -57
  82. package/transpiled/locales/nl_NL.json +0 -57
  83. package/transpiled/locales/pl.json +0 -57
  84. package/transpiled/locales/ru.json +0 -57
  85. package/transpiled/locales/sq.json +0 -57
  86. package/transpiled/locales/zh_CN.json +0 -57
  87. package/transpiled/proptypes/index.js +0 -11
  88. package/transpiled/queries/index.js +0 -19
  89. package/transpiled/styles/apps.css +0 -248
  90. package/transpiled/styles/banner.css +0 -64
  91. package/transpiled/styles/bar.css +0 -106
  92. package/transpiled/styles/base.css +0 -21
  93. package/transpiled/styles/claudy.css +0 -98
  94. package/transpiled/styles/drawer.css +0 -126
  95. package/transpiled/styles/index.styl +0 -33
  96. package/transpiled/styles/indicators.css +0 -58
  97. package/transpiled/styles/nav.css +0 -81
  98. package/transpiled/styles/navigation_item.css +0 -34
  99. package/transpiled/styles/searchbar.css +0 -156
  100. package/transpiled/styles/settings.css +0 -34
  101. package/transpiled/styles/storage.css +0 -22
  102. package/transpiled/styles/supportModal.css +0 -20
  103. package/transpiled/styles/theme.styl +0 -25
@@ -1,253 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
- import stack from "../stack";
5
- var FETCH_SETTINGS = 'FETCH_SETTINGS';
6
- var FETCH_SETTINGS_BUSY = 'FETCH_SETTINGS_BUSY';
7
- var FETCH_SETTINGS_SUCCESS = 'FETCH_SETTINGS_SUCCESS';
8
- var RECEIVE_NO_CONTEXT = 'RECEIVE_NO_CONTEXT';
9
- var RECEIVE_STORAGE = 'RECEIVE_STORAGE';
10
- var RECEIVE_SETTINGS_URL = 'RECEIVE_SETTINGS_URL';
11
- export var LOG_OUT = 'LOG_OUT';
12
- var BUSY_DELAY = 450; // selectors
13
-
14
- export var getStorageData = function getStorageData(state) {
15
- return state.storageData;
16
- };
17
- export var getSettingsAppURL = function getSettingsAppURL(state) {
18
- return state.settingsAppURL;
19
- };
20
- export var isSettingsBusy = function isSettingsBusy(state) {
21
- return state.isBusy;
22
- };
23
- export var isFetchingSettings = function isFetchingSettings(state) {
24
- return state.isFetching;
25
- }; // actions
26
-
27
- var fetchStorageData = function fetchStorageData() {
28
- return /*#__PURE__*/function () {
29
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch) {
30
- var storageData;
31
- return _regeneratorRuntime.wrap(function _callee$(_context) {
32
- while (1) {
33
- switch (_context.prev = _context.next) {
34
- case 0:
35
- _context.prev = 0;
36
- _context.next = 3;
37
- return stack.get.storageData();
38
-
39
- case 3:
40
- storageData = _context.sent;
41
- return _context.abrupt("return", dispatch({
42
- type: RECEIVE_STORAGE,
43
- storageData: storageData
44
- }));
45
-
46
- case 7:
47
- _context.prev = 7;
48
- _context.t0 = _context["catch"](0);
49
- // eslint-disable-next-line no-console
50
- console.warn && console.warn('Cannot get Cozy storage informations');
51
- return _context.abrupt("return", null);
52
-
53
- case 11:
54
- case "end":
55
- return _context.stop();
56
- }
57
- }
58
- }, _callee, null, [[0, 7]]);
59
- }));
60
-
61
- return function (_x) {
62
- return _ref.apply(this, arguments);
63
- };
64
- }();
65
- };
66
-
67
- var fetchSettingsAppURL = function fetchSettingsAppURL() {
68
- return /*#__PURE__*/function () {
69
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(dispatch, getState) {
70
- var settingsAppURL;
71
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
72
- while (1) {
73
- switch (_context2.prev = _context2.next) {
74
- case 0:
75
- if (!getState().settings.settingsAppURL) {
76
- _context2.next = 2;
77
- break;
78
- }
79
-
80
- return _context2.abrupt("return", dispatch({
81
- type: RECEIVE_SETTINGS_URL,
82
- settingsAppURL: getState().settings.settingsAppURL
83
- }));
84
-
85
- case 2:
86
- _context2.prev = 2;
87
- _context2.next = 5;
88
- return stack.get.settingsAppURL();
89
-
90
- case 5:
91
- settingsAppURL = _context2.sent;
92
- return _context2.abrupt("return", dispatch({
93
- type: RECEIVE_SETTINGS_URL,
94
- settingsAppURL: settingsAppURL
95
- }));
96
-
97
- case 9:
98
- _context2.prev = 9;
99
- _context2.t0 = _context2["catch"](2);
100
- // eslint-disable-next-line no-console
101
- console.warn('Settings app is unavailable, settings links are disabled');
102
- return _context2.abrupt("return", null);
103
-
104
- case 13:
105
- case "end":
106
- return _context2.stop();
107
- }
108
- }
109
- }, _callee2, null, [[2, 9]]);
110
- }));
111
-
112
- return function (_x2, _x3) {
113
- return _ref2.apply(this, arguments);
114
- };
115
- }();
116
- };
117
-
118
- export var fetchSettingsData = function fetchSettingsData() {
119
- var displayBusy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
120
- return /*#__PURE__*/function () {
121
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(dispatch) {
122
- var busySpinner;
123
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
124
- while (1) {
125
- switch (_context3.prev = _context3.next) {
126
- case 0:
127
- dispatch({
128
- type: FETCH_SETTINGS
129
- }); // put the busy status after BUSY_DELAY secs
130
-
131
- busySpinner = setTimeout(function () {
132
- // we do not display the busy status in the drawer
133
- if (displayBusy) dispatch({
134
- type: FETCH_SETTINGS_BUSY
135
- });
136
- }, BUSY_DELAY);
137
- _context3.next = 4;
138
- return dispatch(fetchStorageData());
139
-
140
- case 4:
141
- _context3.next = 6;
142
- return dispatch(fetchSettingsAppURL());
143
-
144
- case 6:
145
- clearTimeout(busySpinner);
146
- dispatch({
147
- type: FETCH_SETTINGS_SUCCESS
148
- });
149
-
150
- case 8:
151
- case "end":
152
- return _context3.stop();
153
- }
154
- }
155
- }, _callee3);
156
- }));
157
-
158
- return function (_x4) {
159
- return _ref3.apply(this, arguments);
160
- };
161
- }();
162
- };
163
- export var logOut = function logOut() {
164
- return /*#__PURE__*/function () {
165
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(dispatch) {
166
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
167
- while (1) {
168
- switch (_context4.prev = _context4.next) {
169
- case 0:
170
- dispatch({
171
- type: LOG_OUT
172
- });
173
- _context4.prev = 1;
174
- _context4.next = 4;
175
- return stack.logout();
176
-
177
- case 4:
178
- _context4.next = 9;
179
- break;
180
-
181
- case 6:
182
- _context4.prev = 6;
183
- _context4.t0 = _context4["catch"](1);
184
- // eslint-disable-next-line no-console
185
- console.warn('Error while logging out in the cozy-bar', _context4.t0);
186
-
187
- case 9:
188
- case "end":
189
- return _context4.stop();
190
- }
191
- }
192
- }, _callee4, null, [[1, 6]]);
193
- }));
194
-
195
- return function (_x5) {
196
- return _ref4.apply(this, arguments);
197
- };
198
- }();
199
- }; // reducers
200
-
201
- var defaultState = {
202
- contextNotExist: false,
203
- isFetching: false,
204
- isBusy: false,
205
- settingsAppURL: null,
206
- storageData: null
207
- };
208
-
209
- var reducer = function reducer() {
210
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
211
- var action = arguments.length > 1 ? arguments[1] : undefined;
212
-
213
- switch (action.type) {
214
- case FETCH_SETTINGS:
215
- return _objectSpread({}, state, {
216
- isFetching: true
217
- });
218
-
219
- case FETCH_SETTINGS_BUSY:
220
- return _objectSpread({}, state, {
221
- isBusy: true
222
- });
223
-
224
- case FETCH_SETTINGS_SUCCESS:
225
- return _objectSpread({}, state, {
226
- isFetching: false,
227
- isBusy: false
228
- });
229
-
230
- case RECEIVE_NO_CONTEXT:
231
- return _objectSpread({}, state, {
232
- contextNotExist: true
233
- });
234
-
235
- case RECEIVE_STORAGE:
236
- return _objectSpread({}, state, {
237
- storageData: action.storageData
238
- });
239
-
240
- case RECEIVE_SETTINGS_URL:
241
- return _objectSpread({}, state, {
242
- settingsAppURL: action.settingsAppURL
243
- });
244
-
245
- case LOG_OUT:
246
- return defaultState;
247
-
248
- default:
249
- return state;
250
- }
251
- };
252
-
253
- export default reducer;
@@ -1,64 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
- var SET_THEME = 'SET_THEME';
3
- var DEFAULT_THEME = 'default';
4
- var PRIMARY_THEME = 'primary';
5
- var THEMES = [DEFAULT_THEME, PRIMARY_THEME];
6
- var EMPTY_OVERRIDES = {}; // Theme state is { name, overrides }
7
- // where both have the form described in `setTheme`
8
-
9
- var DEFAULT_STATE = {
10
- name: DEFAULT_THEME,
11
- overrides: EMPTY_OVERRIDES
12
- };
13
- /**
14
- * Change the cozy-bar theme
15
- *
16
- * Today, the value 'primary' will change the background color
17
- * of the bar in the mobile view. It will then use the
18
- * `--primaryColor` CSS variable and the `--primaryContrastTextColor`
19
- * for the text.
20
- *
21
- * @function
22
- * @param {String} name - either 'default' or 'primary'
23
- * @param {Object} overrides - overrides of default values for the theme
24
- * default to an empty object (no overrides)
25
- * It will only overrides the values for the
26
- * 'primary' specific theme/view
27
- * @param {Object} overrides.primaryColor - the background color
28
- * @param {Object} overrides.primaryContrastTextColor - the text color
29
- * @returns {Object} action `{ type: SET_THEME, theme: {name, overrides} }
30
- */
31
-
32
- export var setTheme = function setTheme(name) {
33
- var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_OVERRIDES;
34
- return {
35
- type: SET_THEME,
36
- theme: {
37
- name: name,
38
- overrides: overrides
39
- }
40
- };
41
- };
42
- export var getDefaultTheme = function getDefaultTheme() {
43
- return DEFAULT_STATE;
44
- };
45
- export var reducer = function reducer() {
46
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultTheme();
47
- var action = arguments.length > 1 ? arguments[1] : undefined;
48
-
49
- if (action.type === SET_THEME) {
50
- if (THEMES.includes(action.theme.name)) {
51
- return action.theme;
52
- }
53
-
54
- return _objectSpread({}, action.theme, {
55
- name: DEFAULT_THEME
56
- });
57
- } else {
58
- return state;
59
- }
60
- }; // selector
61
-
62
- export var getTheme = function getTheme(state) {
63
- return state;
64
- };
@@ -1,31 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
- var SET_WEBVIEW_CONTEXT = 'SET_WEBVIEW_CONTEXT'; // selectors
3
-
4
- export var getWebviewContext = function getWebviewContext(state) {
5
- return state.webviewContext;
6
- }; // actions
7
-
8
- export var setWebviewContext = function setWebviewContext(payload) {
9
- return {
10
- type: SET_WEBVIEW_CONTEXT,
11
- payload: payload
12
- };
13
- }; // reducers
14
-
15
- var defaultState = {
16
- webviewContext: undefined
17
- };
18
- export var reducer = function reducer() {
19
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
20
- var action = arguments.length > 1 ? arguments[1] : undefined;
21
-
22
- switch (action.type) {
23
- case SET_WEBVIEW_CONTEXT:
24
- return _objectSpread({}, state, {
25
- webviewContext: action.payload
26
- });
27
-
28
- default:
29
- return state;
30
- }
31
- };