cozy-bar 8.3.0 → 8.4.2

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.
@@ -9,7 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  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; } }
10
10
 
11
11
  import React, { Component } from 'react';
12
- import { setContent as _setContent, unsetContent as _unsetContent, setLocale, setTheme } from "../reducers";
12
+ import { setContent as _setContent, unsetContent as _unsetContent, setLocale, setTheme, setWebviewContext } from "../reducers";
13
13
  import { locations, getJsApiName, getReactApiName } from "./helpers"; // The React API need unique IDs, so we will increment this variable
14
14
 
15
15
  var idToIncrement = 0;
@@ -126,6 +126,10 @@ export var createBarAPI = function createBarAPI(store) {
126
126
  store.dispatch(setTheme.apply(void 0, arguments));
127
127
  };
128
128
 
129
+ methods.setWebviewContext = function () {
130
+ store.dispatch(setWebviewContext.apply(void 0, arguments));
131
+ };
132
+
129
133
  return methods;
130
134
  }; // Handle exceptions for API before init
131
135
 
@@ -162,7 +166,7 @@ export var createBarProxiedAPI = function createBarProxiedAPI(exposedAPI) {
162
166
  };
163
167
  });
164
168
 
165
- for (var _i = 0, _arr = ['setLocale', 'setTheme']; _i < _arr.length; _i++) {
169
+ for (var _i = 0, _arr = ['setLocale', 'setTheme', 'setWebviewContext']; _i < _arr.length; _i++) {
166
170
  var fnName = _arr[_i];
167
171
  apiReferences[fnName] = makeProxyMethodToAPI(exposedAPI, fnName);
168
172
  }
@@ -2,6 +2,7 @@ import { combineReducers } from 'redux';
2
2
  import * as content from "./content";
3
3
  import * as locale from "./locale";
4
4
  import * as theme from "./theme";
5
+ import * as unserializable from "./unserializable";
5
6
  import appsReducer, * as apps from "./apps";
6
7
  import settingsReducer, * as settings from "./settings";
7
8
  import contextReducer, * as context from "./context";
@@ -20,12 +21,13 @@ var setContent = content.setContent;
20
21
  var unsetContent = content.unsetContent;
21
22
  var setLocale = locale.setLocale;
22
23
  var setTheme = theme.setTheme;
24
+ var setWebviewContext = unserializable.setWebviewContext;
23
25
  var fetchApps = apps.fetchApps;
24
26
  var setInfos = apps.setInfos;
25
27
  var fetchSettingsData = settings.fetchSettingsData;
26
28
  var logOut = settings.logOut;
27
29
  var fetchContext = context.fetchContext;
28
- export { setContent, unsetContent, setLocale, setTheme, fetchApps, setInfos, fetchSettingsData, logOut, fetchContext };
30
+ export { setContent, unsetContent, setLocale, setTheme, setWebviewContext, fetchApps, setInfos, fetchSettingsData, logOut, fetchContext };
29
31
  export var getContent = proxy('content', content.getContent);
30
32
  export var getLocale = proxy('locale', locale.getLocale);
31
33
  export var getTheme = proxy('theme', theme.getTheme);
@@ -40,16 +42,18 @@ export var isSettingsBusy = proxy('settings', settings.isSettingsBusy);
40
42
  export var isFetchingSettings = proxy('settings', settings.isFetchingSettings);
41
43
  export var getHelpLink = proxy('context', context.getHelpLink);
42
44
  export var getClaudyActions = proxy('context', context.getClaudyActions);
43
- export var shouldEnableClaudy = proxy('context', context.shouldEnableClaudy); // realtime handlers
45
+ export var shouldEnableClaudy = proxy('context', context.shouldEnableClaudy);
46
+ export var getWebviewContext = proxy('unserializable', unserializable.getWebviewContext); // realtime handlers
44
47
 
45
48
  export var onRealtimeCreate = apps.receiveApp;
46
49
  export var onRealtimeDelete = apps.deleteApp;
47
50
  export var reducers = {
51
+ apps: appsReducer,
48
52
  content: content.reducer,
53
+ context: contextReducer,
49
54
  locale: locale.reducer,
50
- theme: theme.reducer,
51
- apps: appsReducer,
52
55
  settings: settingsReducer,
53
- context: contextReducer
56
+ theme: theme.reducer,
57
+ unserializable: unserializable.reducer
54
58
  };
55
59
  export default combineReducers(reducers);
@@ -0,0 +1,31 @@
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
+ };
@@ -46,11 +46,16 @@
46
46
  }
47
47
 
48
48
  [role=banner] .coz-nav-apps-btns-home {
49
- width: 2rem;
50
49
  height: 2rem;
51
50
  margin-right: .75rem;
52
51
  }
53
52
 
53
+ [role=banner] .coz-nav-apps-btns-home.--flagship {
54
+ background: none;
55
+ border: 0;
56
+ height: 100%;
57
+ }
58
+
54
59
  [role=banner] .coz-nav-apps-btns-home-svg {
55
60
  max-width: 2rem;
56
61
  max-height: 2rem;