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,225 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
- import React, { Component } from 'react';
14
- import { connect } from 'react-redux';
15
- import { compose } from 'redux';
16
- import get from 'lodash/get';
17
- import { translate } from "cozy-ui/transpiled/react/I18n";
18
- import { Button } from "cozy-ui/transpiled/react/Button";
19
- import GearIcon from "cozy-ui/transpiled/react/Icons/Gear";
20
- import { queryConnect } from 'cozy-client/dist';
21
- import { models } from 'cozy-client';
22
- var instanceModel = undefined;
23
- var hasAnOffer = undefined;
24
- var isFremiumFixed = undefined;
25
-
26
- if (models) {
27
- instanceModel = models.instance; // TODO fallback from cozy-client
28
-
29
- isFremiumFixed = function isFremiumFixed(data) {
30
- var GB = 1000 * 1000 * 1000;
31
- var PREMIUM_QUOTA = 50 * GB;
32
- var quota = get(data, 'diskUsage.data.attributes.quota', false);
33
- return parseInt(quota) < PREMIUM_QUOTA;
34
- };
35
-
36
- hasAnOffer = function hasAnOffer(data) {
37
- return !instanceModel.isSelfHosted(data) && instanceModel.arePremiumLinksEnabled(data) && instanceModel.getUuid(data) && !isFremiumFixed(data);
38
- };
39
- }
40
-
41
- import SettingsContent from "./SettingsContent";
42
- import { fetchSettingsData as _fetchSettingsData, getStorageData, getSettingsAppURL, isSettingsBusy, isFetchingSettings, logOut as _logOut } from "../../lib/reducers";
43
- import { instanceReq, contextReq, diskUsageReq } from "../../queries";
44
- import { isFetchingQueries, cozyClientCanCheckPremium } from "./helper";
45
- export var Settings = /*#__PURE__*/function (_Component) {
46
- _inherits(Settings, _Component);
47
-
48
- var _super = _createSuper(Settings);
49
-
50
- function Settings(props) {
51
- var _this;
52
-
53
- _classCallCheck(this, Settings);
54
-
55
- _this = _super.call(this, props);
56
-
57
- _defineProperty(_assertThisInitialized(_this), "onClickOutside", function (event) {
58
- if (_this.props.isFetching || _this.state.opened) {
59
- // if it's not a cozy-bar nav popup, close the opened popup
60
- if (!_this.rootRef.contains(event.target)) {
61
- _this.setState({
62
- opened: false
63
- });
64
-
65
- event.stopPropagation();
66
- }
67
- }
68
- });
69
-
70
- _defineProperty(_assertThisInitialized(_this), "toggleMenu", function () {
71
- var stateUpdate = {
72
- opened: false
73
- }; // if popup already opened, stop here to close it
74
-
75
- if (_this.state.opened) return _this.setState(stateUpdate); // fetch data
76
-
77
- _this.props.fetchSettingsData();
78
-
79
- _this.setState({
80
- opened: true
81
- });
82
- });
83
-
84
- _this.state = {
85
- opened: false
86
- };
87
- return _this;
88
- }
89
-
90
- _createClass(Settings, [{
91
- key: "componentDidMount",
92
- value: function componentDidMount() {
93
- document.body.addEventListener('click', this.onClickOutside);
94
- }
95
- }, {
96
- key: "componentWillUnmount",
97
- value: function componentWillUnmount() {
98
- document.body.removeEventListener('click', this.onClickOutside);
99
- }
100
- }, {
101
- key: "render",
102
- value: function render() {
103
- var _this2 = this;
104
-
105
- var _this$props = this.props,
106
- isBusy = _this$props.isBusy,
107
- logOut = _this$props.logOut,
108
- _onLogOut = _this$props.onLogOut,
109
- t = _this$props.t,
110
- toggleSupport = _this$props.toggleSupport,
111
- diskUsageQuery = _this$props.diskUsageQuery,
112
- instanceQuery = _this$props.instanceQuery,
113
- contextQuery = _this$props.contextQuery,
114
- storageData = _this$props.storageData,
115
- settingsAppURL = _this$props.settingsAppURL,
116
- isFetching = _this$props.isFetching;
117
- var shouldDisplayViewOfferButton = false;
118
- var managerUrlPremiumLink;
119
- var isFetchingFromQueries;
120
- var viewOfferButtonText = '';
121
- var canCheckPremium = cozyClientCanCheckPremium();
122
-
123
- if (canCheckPremium) {
124
- isFetchingFromQueries = isFetchingQueries([diskUsageQuery, instanceQuery, contextQuery]);
125
-
126
- if (!isFetchingFromQueries) {
127
- var data = {
128
- context: contextQuery,
129
- diskUsage: diskUsageQuery,
130
- instance: instanceQuery
131
- };
132
- shouldDisplayViewOfferButton = instanceModel.shouldDisplayOffers(data) || hasAnOffer(data);
133
-
134
- if (shouldDisplayViewOfferButton && !hasAnOffer(data)) {
135
- viewOfferButtonText = t('view_offers');
136
- } else if (hasAnOffer(data)) {
137
- viewOfferButtonText = t('view_my_offer');
138
- }
139
-
140
- managerUrlPremiumLink = instanceModel.buildPremiumLink(data);
141
- }
142
- }
143
-
144
- var areAllFetchingDone = false;
145
-
146
- if (!canCheckPremium) {
147
- areAllFetchingDone = !isFetching;
148
- } else {
149
- areAllFetchingDone = !isFetchingFromQueries && !isFetching;
150
- }
151
-
152
- var opened = this.state.opened;
153
- var openMenu = opened && areAllFetchingDone;
154
- return /*#__PURE__*/React.createElement("div", {
155
- className: "coz-nav coz-nav-settings",
156
- ref: function ref(_ref) {
157
- _this2.rootRef = _ref;
158
- }
159
- }, /*#__PURE__*/React.createElement(Button, {
160
- type: "button",
161
- theme: "text",
162
- onClick: this.toggleMenu,
163
- className: "coz-nav-settings-btn",
164
- "aria-controls": "coz-nav-pop--settings",
165
- busy: isBusy,
166
- icon: GearIcon,
167
- label: t('menu.settings')
168
- }), /*#__PURE__*/React.createElement("div", {
169
- className: "coz-nav-pop coz-nav-pop--settings",
170
- id: "coz-nav-pop--settings",
171
- "aria-hidden": !openMenu
172
- }, areAllFetchingDone && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SettingsContent, {
173
- onLogOut: function onLogOut() {
174
- if (_onLogOut && typeof _onLogOut === 'function') {
175
- _onLogOut();
176
- } else {
177
- logOut();
178
- }
179
- },
180
- toggleSupport: toggleSupport,
181
- storageData: storageData,
182
- settingsAppURL: settingsAppURL,
183
- shoulDisplayViewOfferButton: shouldDisplayViewOfferButton,
184
- managerUrlPremiumLink: managerUrlPremiumLink,
185
- viewOfferButtonText: viewOfferButtonText
186
- }))));
187
- }
188
- }]);
189
-
190
- return Settings;
191
- }(Component);
192
-
193
- var mapStateToProps = function mapStateToProps(state) {
194
- return {
195
- storageData: getStorageData(state),
196
- settingsAppURL: getSettingsAppURL(state),
197
- isBusy: isSettingsBusy(state),
198
- isFetching: isFetchingSettings(state)
199
- };
200
- };
201
-
202
- var mapDispatchToProps = function mapDispatchToProps(dispatch) {
203
- return {
204
- fetchSettingsData: function fetchSettingsData() {
205
- return dispatch(_fetchSettingsData());
206
- },
207
- logOut: function logOut() {
208
- return dispatch(_logOut());
209
- }
210
- };
211
- };
212
-
213
- var exported;
214
-
215
- if (cozyClientCanCheckPremium()) {
216
- exported = compose(translate(), queryConnect({
217
- instanceQuery: instanceReq,
218
- contextQuery: contextReq,
219
- diskUsageQuery: diskUsageReq
220
- }), connect(mapStateToProps, mapDispatchToProps))(Settings);
221
- } else {
222
- exported = compose(translate(), connect(mapStateToProps, mapDispatchToProps))(Settings);
223
- }
224
-
225
- export default exported;
@@ -1,16 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
-
3
- /* Automatically generated via svgr */
4
- import React from 'react';
5
-
6
- function SvgIconStorage16(props) {
7
- return /*#__PURE__*/React.createElement("svg", _extends({
8
- width: 16,
9
- height: 16
10
- }, props), /*#__PURE__*/React.createElement("path", {
11
- fillRule: "evenodd",
12
- d: "M1 4h14v10.004a1 1 0 01-1.007.996H2.007A1 1 0 011 14.004V4zM0 2c0-.552.445-1 1-1h14c.552 0 1 .444 1 1v1H0V2zm5 4h6v2H5V6z"
13
- }));
14
- }
15
-
16
- export default SvgIconStorage16;
@@ -1,86 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
- import React, { Component } from 'react';
14
- import Modal, { ModalContent } from "cozy-ui/transpiled/react/Modal";
15
- import Spinner from "cozy-ui/transpiled/react/Spinner";
16
- import { getIntents } from "../lib/stack";
17
-
18
- var SupportModal = /*#__PURE__*/function (_Component) {
19
- _inherits(SupportModal, _Component);
20
-
21
- var _super = _createSuper(SupportModal);
22
-
23
- function SupportModal(props, context) {
24
- var _this;
25
-
26
- _classCallCheck(this, SupportModal);
27
-
28
- _this = _super.call(this, props);
29
-
30
- _defineProperty(_assertThisInitialized(_this), "toggle", function () {
31
- _this.setState({
32
- isLoading: true
33
- }); // init support intent
34
-
35
-
36
- _this.intents.create('SUPPORT', 'io.cozy.settings').start(_this.intentWrapperRef, function () {
37
- _this.setState({
38
- isLoading: false
39
- });
40
- });
41
- });
42
-
43
- _this.store = context.barStore;
44
- _this.state = {
45
- isLoading: false
46
- };
47
- _this.intents = getIntents();
48
- return _this;
49
- }
50
-
51
- _createClass(SupportModal, [{
52
- key: "componentDidMount",
53
- value: function componentDidMount() {
54
- this.toggle();
55
- }
56
- }, {
57
- key: "render",
58
- value: function render() {
59
- var _this2 = this;
60
-
61
- var isLoading = this.state.isLoading;
62
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Modal, {
63
- secondaryAction: this.props.onClose,
64
- className: "coz-support-modal",
65
- into: "#cozy-bar-modal-dom-place",
66
- closeBtnClassName: "coz-support-modal-close"
67
- }, /*#__PURE__*/React.createElement(ModalContent, {
68
- className: "coz-support-modal-wrapper u-mt-1"
69
- }, /*#__PURE__*/React.createElement("div", {
70
- className: "coz-support-modal-content"
71
- }, isLoading && /*#__PURE__*/React.createElement(Spinner, {
72
- size: "xxlarge",
73
- middle: true
74
- }), /*#__PURE__*/React.createElement("div", {
75
- className: "coz-support-intent-wrapper".concat(isLoading ? ' coz-hidden' : ''),
76
- ref: function ref(wrapper) {
77
- _this2.intentWrapperRef = wrapper;
78
- }
79
- })))));
80
- }
81
- }]);
82
-
83
- return SupportModal;
84
- }(Component);
85
-
86
- export default SupportModal;
@@ -1,302 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Bar should change allow theme overrides 1`] = `
4
- <div
5
- className="coz-bar-wrapper coz-theme-primary"
6
- style={
7
- Object {
8
- "--cozBarThemePrimaryColor": "red",
9
- }
10
- }
11
- >
12
- <div
13
- id="cozy-bar-modal-dom-place"
14
- />
15
- <div
16
- className="coz-bar-container"
17
- >
18
- <button
19
- className="coz-bar-btn coz-bar-burger"
20
- data-tutorial="apps-mobile"
21
- onClick={[Function]}
22
- type="button"
23
- >
24
- <Icon
25
- color="currentColor"
26
- height={16}
27
- icon={[Function]}
28
- spin={false}
29
- width={16}
30
- />
31
- <span
32
- className="coz-bar-hidden"
33
- >
34
- drawer
35
- </span>
36
- </button>
37
- <Apps />
38
- <div
39
- className="u-flex-grow"
40
- />
41
- <withI18n(Connect(Settings))
42
- toggleSupport={[Function]}
43
- />
44
- <Connect(Drawer)
45
- drawerListener={[Function]}
46
- isClaudyLoading={false}
47
- onClaudy={false}
48
- onClose={[Function]}
49
- toggleSupport={[Function]}
50
- visible={false}
51
- />
52
- </div>
53
- </div>
54
- `;
55
-
56
- exports[`Bar should change theme 1`] = `
57
- <div
58
- className="coz-bar-wrapper coz-theme-primary"
59
- style={Object {}}
60
- >
61
- <div
62
- id="cozy-bar-modal-dom-place"
63
- />
64
- <div
65
- className="coz-bar-container"
66
- >
67
- <button
68
- className="coz-bar-btn coz-bar-burger"
69
- data-tutorial="apps-mobile"
70
- onClick={[Function]}
71
- type="button"
72
- >
73
- <Icon
74
- color="currentColor"
75
- height={16}
76
- icon={[Function]}
77
- spin={false}
78
- width={16}
79
- />
80
- <span
81
- className="coz-bar-hidden"
82
- >
83
- drawer
84
- </span>
85
- </button>
86
- <Apps />
87
- <div
88
- className="u-flex-grow"
89
- />
90
- <withI18n(Connect(Settings))
91
- toggleSupport={[Function]}
92
- />
93
- <Connect(Drawer)
94
- drawerListener={[Function]}
95
- isClaudyLoading={false}
96
- onClaudy={false}
97
- onClose={[Function]}
98
- toggleSupport={[Function]}
99
- visible={false}
100
- />
101
- </div>
102
- </div>
103
- `;
104
-
105
- exports[`Bar should display the Searchbar 1`] = `
106
- <div
107
- className="coz-bar-wrapper coz-theme-default"
108
- style={Object {}}
109
- >
110
- <div
111
- id="cozy-bar-modal-dom-place"
112
- />
113
- <div
114
- className="coz-bar-container"
115
- >
116
- <button
117
- className="coz-bar-btn coz-bar-burger"
118
- data-tutorial="apps-mobile"
119
- onClick={[Function]}
120
- type="button"
121
- >
122
- <Icon
123
- color="currentColor"
124
- height={16}
125
- icon={[Function]}
126
- spin={false}
127
- width={16}
128
- />
129
- <span
130
- className="coz-bar-hidden"
131
- >
132
- drawer
133
- </span>
134
- </button>
135
- <Apps
136
- isPublic={false}
137
- />
138
- <div
139
- className="u-flex-grow"
140
- >
141
- <withI18n(SearchBar) />
142
- </div>
143
- <withI18n(Connect(Settings))
144
- toggleSupport={[Function]}
145
- />
146
- <Connect(Drawer)
147
- drawerListener={[Function]}
148
- isClaudyLoading={false}
149
- onClaudy={false}
150
- onClose={[Function]}
151
- toggleSupport={[Function]}
152
- visible={false}
153
- />
154
- </div>
155
- </div>
156
- `;
157
-
158
- exports[`Bar should have correct dispatch props provided by the store 1`] = `
159
- Object {
160
- "fetchApps": [Function],
161
- "fetchContext": [Function],
162
- "fetchSettingsData": [Function],
163
- }
164
- `;
165
-
166
- exports[`Bar should have correct state props provided by the store with the initial state 1`] = `
167
- Object {
168
- "barCenter": undefined,
169
- "barLeft": undefined,
170
- "barRight": undefined,
171
- "barSearch": undefined,
172
- "claudyEnabled": false,
173
- "hasFetchedApps": false,
174
- "isDrive": false,
175
- "theme": "default",
176
- "themeOverrides": Object {},
177
- "webviewContext": undefined,
178
- }
179
- `;
180
-
181
- exports[`Bar should not display searchbar if we are not on a public page 1`] = `
182
- <div
183
- className="coz-bar-wrapper coz-theme-default"
184
- style={Object {}}
185
- >
186
- <div
187
- id="cozy-bar-modal-dom-place"
188
- />
189
- <div
190
- className="coz-bar-container"
191
- >
192
- <Apps
193
- isPublic={true}
194
- />
195
- <div
196
- className="u-flex-grow"
197
- />
198
- </div>
199
- </div>
200
- `;
201
-
202
- exports[`Bar should not display searchbar if we are not on Cozy Drive 1`] = `
203
- <div
204
- className="coz-bar-wrapper coz-theme-default"
205
- style={Object {}}
206
- >
207
- <div
208
- id="cozy-bar-modal-dom-place"
209
- />
210
- <div
211
- className="coz-bar-container"
212
- >
213
- <button
214
- className="coz-bar-btn coz-bar-burger"
215
- data-tutorial="apps-mobile"
216
- onClick={[Function]}
217
- type="button"
218
- >
219
- <Icon
220
- color="currentColor"
221
- height={16}
222
- icon={[Function]}
223
- spin={false}
224
- width={16}
225
- />
226
- <span
227
- className="coz-bar-hidden"
228
- >
229
- drawer
230
- </span>
231
- </button>
232
- <Apps
233
- isPublic={false}
234
- />
235
- <div
236
- className="u-flex-grow"
237
- />
238
- <withI18n(Connect(Settings))
239
- toggleSupport={[Function]}
240
- />
241
- <Connect(Drawer)
242
- drawerListener={[Function]}
243
- isClaudyLoading={false}
244
- onClaudy={false}
245
- onClose={[Function]}
246
- toggleSupport={[Function]}
247
- visible={false}
248
- />
249
- </div>
250
- </div>
251
- `;
252
-
253
- exports[`Bar should not display searchbar if we are on mobile 1`] = `
254
- <div
255
- className="coz-bar-wrapper coz-theme-default"
256
- style={Object {}}
257
- >
258
- <div
259
- id="cozy-bar-modal-dom-place"
260
- />
261
- <div
262
- className="coz-bar-container"
263
- >
264
- <button
265
- className="coz-bar-btn coz-bar-burger"
266
- data-tutorial="apps-mobile"
267
- onClick={[Function]}
268
- type="button"
269
- >
270
- <Icon
271
- color="currentColor"
272
- height={16}
273
- icon={[Function]}
274
- spin={false}
275
- width={16}
276
- />
277
- <span
278
- className="coz-bar-hidden"
279
- >
280
- drawer
281
- </span>
282
- </button>
283
- <Apps
284
- isPublic={false}
285
- />
286
- <div
287
- className="u-flex-grow"
288
- />
289
- <withI18n(Connect(Settings))
290
- toggleSupport={[Function]}
291
- />
292
- <Connect(Drawer)
293
- drawerListener={[Function]}
294
- isClaudyLoading={false}
295
- onClaudy={false}
296
- onClose={[Function]}
297
- toggleSupport={[Function]}
298
- visible={false}
299
- />
300
- </div>
301
- </div>
302
- `;
@@ -1,20 +0,0 @@
1
- {
2
- "desktop": {
3
- "icon": "icon-laptop.svg",
4
- "link": {
5
- "type": "external"
6
- }
7
- },
8
- "mobile": {
9
- "icon": "icon-phone.svg",
10
- "link": {
11
- "type": "external"
12
- }
13
- },
14
- "support": {
15
- "icon": "icon-question-mark.svg",
16
- "link": {
17
- "type": "external"
18
- }
19
- }
20
- }
@@ -1,4 +0,0 @@
1
- [
2
- "apps",
3
- "context"
4
- ]