asab_webui_shell 27.5.5 → 27.6.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/dist/actions.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SET_SUBTITLE = exports.SET_ROUTES = exports.SET_NAVIGATION_ITEMS = exports.SET_HELP_PATH = exports.SET_HEADER_NAVIGATION_ITEMS = exports.SET_FULLSCREEN_MODE = exports.SET_CONNECTIVITY_STATUS = exports.SET_ATTENTION_REQUIRED_BEACON = exports.
|
|
6
|
+
exports.SET_SUBTITLE = exports.SET_ROUTES = exports.SET_NAVIGATION_ITEMS = exports.SET_HELP_PATH = exports.SET_HEADER_NAVIGATION_ITEMS = exports.SET_FULLSCREEN_MODE = exports.SET_CONNECTIVITY_STATUS = exports.SET_ATTENTION_REQUIRED_BEACON = exports.DEL_TOAST = exports.DEL_ALERT = exports.COLLAPSE_SIDEBAR = exports.CHANGE_CONFIG = exports.ADD_TOAST = exports.ADD_ALERT = exports.ACK_ALERT = void 0;
|
|
7
7
|
var ADD_ALERT = exports.ADD_ALERT = "asab/addAlert";
|
|
8
8
|
var ACK_ALERT = exports.ACK_ALERT = "asab/ackAlert";
|
|
9
9
|
var DEL_ALERT = exports.DEL_ALERT = "asab/delAlert";
|
|
@@ -11,7 +11,6 @@ var ADD_TOAST = exports.ADD_TOAST = "asab/addToast";
|
|
|
11
11
|
var DEL_TOAST = exports.DEL_TOAST = "asab/delToast";
|
|
12
12
|
var SET_HELP_PATH = exports.SET_HELP_PATH = "asab/setHelpContent";
|
|
13
13
|
var SET_SUBTITLE = exports.SET_SUBTITLE = "asab/setSubtitle";
|
|
14
|
-
var SET_ADVANCED_MODE = exports.SET_ADVANCED_MODE = "asab/setAdvancedMode";
|
|
15
14
|
var SET_FULLSCREEN_MODE = exports.SET_FULLSCREEN_MODE = "asab/setFullscreenMode";
|
|
16
15
|
var CHANGE_CONFIG = exports.CHANGE_CONFIG = "asab/changeConfig";
|
|
17
16
|
var COLLAPSE_SIDEBAR = exports.COLLAPSE_SIDEBAR = "asab/collapseSidebar";
|
|
@@ -25,7 +25,6 @@ var _reducer3 = _interopRequireDefault(require("./Header/reducer"));
|
|
|
25
25
|
var _reducer4 = _interopRequireDefault(require("./Navigation/reducer"));
|
|
26
26
|
var _reducer5 = _interopRequireDefault(require("./Router/reducer"));
|
|
27
27
|
var _reducer6 = _interopRequireDefault(require("./FullscreenMode/reducer"));
|
|
28
|
-
var _reducer7 = _interopRequireDefault(require("./AdvancedMode/reducer"));
|
|
29
28
|
var _ReduxService = _interopRequireDefault(require("../services/ReduxService"));
|
|
30
29
|
var _ConfigService = _interopRequireDefault(require("../config/ConfigService"));
|
|
31
30
|
var _HeaderService = _interopRequireDefault(require("../services/HeaderService"));
|
|
@@ -55,7 +54,6 @@ class Application extends _react.Component {
|
|
|
55
54
|
|
|
56
55
|
// Register reducers which are not part of any app service
|
|
57
56
|
this.ReduxService.addReducer("alerts", _reducer.default);
|
|
58
|
-
this.ReduxService.addReducer("advmode", _reducer7.default);
|
|
59
57
|
this.ReduxService.addReducer("fullscreenmode", _reducer6.default);
|
|
60
58
|
this.ReduxService.addReducer("header", _reducer3.default);
|
|
61
59
|
this.ReduxService.addReducer("sidebar", _reducer2.default);
|
|
@@ -513,13 +511,6 @@ class Application extends _react.Component {
|
|
|
513
511
|
if (event.ctrlKey && event.shiftKey && event.code === 'KeyF') {
|
|
514
512
|
this.setFullScreenMode('on');
|
|
515
513
|
}
|
|
516
|
-
|
|
517
|
-
// TODO: Remove CTRL+Q and CTRL+1 by May of 2027
|
|
518
|
-
// CTRL+SHIFT+U (Chrome, Firefox and Safari on Windows, Linux and MacOS)
|
|
519
|
-
// CTRL+Q (Windows) or CTRL+1 (Linux) enables the advanced mode
|
|
520
|
-
if (event.ctrlKey && event.code === 'KeyQ' || event.code === 'Digit1' && event.ctrlKey || event.ctrlKey && event.shiftKey && event.code === 'KeyU') {
|
|
521
|
-
this.setAdvancedMode(0);
|
|
522
|
-
}
|
|
523
514
|
}
|
|
524
515
|
componentDidMount() {
|
|
525
516
|
document.addEventListener("keyup", this._handleKeyUp, false);
|
|
@@ -680,35 +671,18 @@ class Application extends _react.Component {
|
|
|
680
671
|
component: component
|
|
681
672
|
});
|
|
682
673
|
}
|
|
683
|
-
setAdvancedMode(enabled) {
|
|
684
|
-
var _this$AppStore$dispat3, _this$AppStore3;
|
|
685
|
-
if (enabled === 0) {
|
|
686
|
-
var _state$advmode;
|
|
687
|
-
var state = this.AppStore.getState();
|
|
688
|
-
enabled = !(state !== null && state !== void 0 && (_state$advmode = state.advmode) !== null && _state$advmode !== void 0 && _state$advmode.enabled);
|
|
689
|
-
}
|
|
690
|
-
(_this$AppStore$dispat3 = (_this$AppStore3 = this.AppStore).dispatch) === null || _this$AppStore$dispat3 === void 0 || _this$AppStore$dispat3.call(_this$AppStore3, {
|
|
691
|
-
type: _actions.SET_ADVANCED_MODE,
|
|
692
|
-
enabled: enabled
|
|
693
|
-
});
|
|
694
|
-
if (enabled) {
|
|
695
|
-
this.addAlert('warning', "ASABApplicationContainer|Advanced mode enabled", 2, true);
|
|
696
|
-
} else {
|
|
697
|
-
this.addAlert('success', "ASABApplicationContainer|Advanced mode disabled", 2, true);
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
674
|
|
|
701
675
|
/*
|
|
702
676
|
This method toggles the full-screen mode of the application container.
|
|
703
677
|
It takes a parameter called "status" to indicate whether to turn the full-screen mode on or off.
|
|
704
678
|
*/
|
|
705
679
|
setFullScreenMode(status) {
|
|
706
|
-
var _state$fullscreenmode, _this$AppStore$
|
|
680
|
+
var _state$fullscreenmode, _this$AppStore$dispat3, _this$AppStore3;
|
|
707
681
|
var state = this.AppStore.getState();
|
|
708
682
|
if (status === 'on' && (state === null || state === void 0 || (_state$fullscreenmode = state.fullscreenmode) === null || _state$fullscreenmode === void 0 ? void 0 : _state$fullscreenmode.status) === 'on') {
|
|
709
683
|
status = 'off';
|
|
710
684
|
}
|
|
711
|
-
(_this$AppStore$
|
|
685
|
+
(_this$AppStore$dispat3 = (_this$AppStore3 = this.AppStore).dispatch) === null || _this$AppStore$dispat3 === void 0 || _this$AppStore$dispat3.call(_this$AppStore3, {
|
|
712
686
|
type: _actions.SET_FULLSCREEN_MODE,
|
|
713
687
|
status: status
|
|
714
688
|
});
|
|
@@ -780,9 +754,9 @@ Application.prototype._initConnectivitySubscription = function () {
|
|
|
780
754
|
if (this.PubSub && typeof this.PubSub.subscribe === 'function') {
|
|
781
755
|
if (!this._unsubscribeConnectivity) {
|
|
782
756
|
this._unsubscribeConnectivity = this.PubSub.subscribe('Application.status!', value => {
|
|
783
|
-
var _this$AppStore$
|
|
757
|
+
var _this$AppStore$dispat4, _this$AppStore4;
|
|
784
758
|
// Prefer store so UI updates predictably
|
|
785
|
-
(_this$AppStore$
|
|
759
|
+
(_this$AppStore$dispat4 = (_this$AppStore4 = this.AppStore).dispatch) === null || _this$AppStore$dispat4 === void 0 || _this$AppStore$dispat4.call(_this$AppStore4, {
|
|
786
760
|
type: _actions.SET_CONNECTIVITY_STATUS,
|
|
787
761
|
status: value.status
|
|
788
762
|
});
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = advancedModeReducer;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _actions = require("../../actions");
|
|
10
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
var initialState = {
|
|
13
|
-
enabled: false
|
|
14
|
-
};
|
|
15
|
-
function advancedModeReducer() {
|
|
16
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
17
|
-
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
18
|
-
switch (action.type) {
|
|
19
|
-
case _actions.SET_ADVANCED_MODE:
|
|
20
|
-
{
|
|
21
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
22
|
-
enabled: action.enabled
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
default:
|
|
26
|
-
return state;
|
|
27
|
-
}
|
|
28
|
-
}
|