@rio-cloud/rio-uikit 0.16.1-beta-3 → 0.16.1-beta-7
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/lib/components/applicationLayout/ApplicationLayout.js +5 -8
- package/lib/components/assetTree/AssetTree.js +7 -4
- package/lib/components/assetTree/Tree.js +153 -29
- package/lib/components/assetTree/TreeSelectAll.js +1 -1
- package/lib/components/assetTree/TreeSidebar.js +22 -10
- package/lib/components/assetTree/TreeSummary.js +11 -6
- package/lib/components/assetTree/TypeCounter.js +45 -8
- package/lib/components/datepicker/DatePicker.js +1 -2
- package/lib/components/navigation/AppNavigationBar.js +64 -0
- package/lib/components/selects/BaseDropdownMenu.js +29 -23
- package/lib/components/selects/Select.js +11 -5
- package/lib/es/AppNavigationBar.d.ts +5 -0
- package/lib/es/AppNavigationBar.js +15 -0
- package/lib/es/DeviceUtils.d.ts +2 -0
- package/lib/es/deviceUtils.js +12 -0
- package/lib/es/useResizeObserver.d.ts +4 -0
- package/lib/es/useResizeObserver.js +15 -0
- package/lib/hooks/useResizeObserver.js +54 -0
- package/lib/hooks/useWindowResize.js +8 -5
- package/lib/style/css/_exports/rio-website.less +70 -7
- package/lib/style/css/animations/_imports.less +1 -0
- package/lib/style/css/animations/pulsing.less +5 -0
- package/lib/style/css/components/ApplicationLayout.less +3 -1
- package/lib/style/css/components/AssetTree.less +1 -5
- package/lib/style/css/design/buttons.less +4 -1
- package/lib/style/css/design/rioglyph.less +1 -12
- package/lib/types.ts +17 -0
- package/lib/utils/deviceUtils.js +11 -2
- package/lib/version.json +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = exports.AppNavigationBar = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
22
|
+
var _noop = _interopRequireDefault(require("lodash/fp/noop"));
|
|
23
|
+
|
|
24
|
+
var _excluded = ["className", "title", "right", "onNavigateBack"];
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
var AppNavigationBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
31
|
+
var className = props.className,
|
|
32
|
+
title = props.title,
|
|
33
|
+
right = props.right,
|
|
34
|
+
onNavigateBack = props.onNavigateBack,
|
|
35
|
+
remainingProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
36
|
+
var navigationClasses = (0, _classnames.default)('AppNavigationBar', 'width-100pct display-flex align-items-center justify-content-between height-45 user-select-none padding-x-10', className);
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
38
|
+
ref: ref
|
|
39
|
+
}, remainingProps, {
|
|
40
|
+
className: navigationClasses
|
|
41
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: "display-flex align-items-center"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: "width-30 text-size-20 text-color-darkest"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
46
|
+
className: "rioglyph rioglyph-arrow-left",
|
|
47
|
+
onClick: onNavigateBack
|
|
48
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: "text-medium text-color-darker"
|
|
50
|
+
}, title)), /*#__PURE__*/_react.default.createElement("div", null, right));
|
|
51
|
+
});
|
|
52
|
+
exports.AppNavigationBar = AppNavigationBar;
|
|
53
|
+
AppNavigationBar.defaultProps = {
|
|
54
|
+
onNavigateBack: _noop.default,
|
|
55
|
+
right: /*#__PURE__*/_react.default.createElement("span", null)
|
|
56
|
+
};
|
|
57
|
+
AppNavigationBar.propTypes = {
|
|
58
|
+
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
59
|
+
right: _propTypes.default.node,
|
|
60
|
+
onNavigateBack: _propTypes.default.func,
|
|
61
|
+
className: _propTypes.default.string
|
|
62
|
+
};
|
|
63
|
+
var _default = AppNavigationBar;
|
|
64
|
+
exports.default = _default;
|
|
@@ -79,7 +79,7 @@ var BaseDropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
pullRight: props.pullRight,
|
|
80
80
|
focusedItemIndex: _this.props.focusedItemIndex,
|
|
81
81
|
keyboardUsed: _this.props.keyboardUsed,
|
|
82
|
-
itemDOMValues:
|
|
82
|
+
itemDOMValues: []
|
|
83
83
|
};
|
|
84
84
|
_this.handleOptionChange = _this.handleOptionChange.bind((0, _assertThisInitialized2.default)(_this));
|
|
85
85
|
_this.handleKeydown = _this.handleKeydown.bind((0, _assertThisInitialized2.default)(_this));
|
|
@@ -113,24 +113,29 @@ var BaseDropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (!(0, _isEqual.default)(nextProps.options, this.props.options)) {
|
|
116
|
-
// Only update the DOM values if it is explicitly requested
|
|
117
|
-
// otherwise it will reduce the dom values to the filtered options
|
|
118
|
-
var updatedItemDOMValues;
|
|
119
|
-
|
|
120
|
-
if (nextProps.requestItemDOMValues) {
|
|
121
|
-
updatedItemDOMValues = this.setItemDOMValues();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
116
|
this.setState(function () {
|
|
125
117
|
return {
|
|
126
|
-
options: nextProps.options
|
|
127
|
-
itemDOMValues: updatedItemDOMValues ? updatedItemDOMValues : _this2.state.itemDOMValues
|
|
118
|
+
options: nextProps.options
|
|
128
119
|
};
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
120
|
+
}); // Workaround to put the update of DOM values into a setTimeout to have the component
|
|
121
|
+
// re-rendered to fetch the DOM items.
|
|
122
|
+
// This should be refactored when reworking the component as functional component
|
|
123
|
+
|
|
124
|
+
setTimeout(function () {
|
|
125
|
+
// Only update the DOM values if it is explicitly requested
|
|
126
|
+
// otherwise it will reduce the dom values to the filtered options
|
|
127
|
+
if (nextProps.requestItemDOMValues) {
|
|
128
|
+
var items = _this2.setItemDOMValues();
|
|
129
|
+
|
|
130
|
+
_this2.props.updateDOMValues(items);
|
|
131
|
+
|
|
132
|
+
_this2.setState(function () {
|
|
133
|
+
return {
|
|
134
|
+
itemDOMValues: items ? items : _this2.state.itemDOMValues
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}, 0);
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
141
|
}
|
|
@@ -273,10 +278,10 @@ var BaseDropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
273
278
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
274
279
|
className: dropdownMenuClasses
|
|
275
280
|
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
276
|
-
className:
|
|
281
|
+
className: "no-item-message disabled",
|
|
277
282
|
disabled: true
|
|
278
283
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
279
|
-
role:
|
|
284
|
+
role: "button"
|
|
280
285
|
}, /*#__PURE__*/_react.default.createElement("i", null, noItemMessage))));
|
|
281
286
|
}
|
|
282
287
|
|
|
@@ -301,7 +306,7 @@ var BaseDropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
301
306
|
id: option.id,
|
|
302
307
|
icon: option.icon,
|
|
303
308
|
label: option.label,
|
|
304
|
-
type:
|
|
309
|
+
type: "dropdown"
|
|
305
310
|
});
|
|
306
311
|
} // Show focused style only when keyboard is in use
|
|
307
312
|
|
|
@@ -312,15 +317,15 @@ var BaseDropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
312
317
|
key: option.id,
|
|
313
318
|
className: classNames
|
|
314
319
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
315
|
-
role:
|
|
320
|
+
role: "button",
|
|
316
321
|
className: anchorClassNames,
|
|
317
322
|
"data-item-id": option.id,
|
|
318
323
|
"data-item-index": index,
|
|
319
324
|
onClick: !option.disabled ? this.handleOptionChange : undefined
|
|
320
325
|
}, /*#__PURE__*/_react.default.createElement("span", null, option.icon && /*#__PURE__*/_react.default.createElement("span", {
|
|
321
|
-
className:
|
|
326
|
+
className: "margin-right-5"
|
|
322
327
|
}, option.icon), option.label), /*#__PURE__*/_react.default.createElement("input", {
|
|
323
|
-
type:
|
|
328
|
+
type: "hidden",
|
|
324
329
|
value: option.id
|
|
325
330
|
})));
|
|
326
331
|
}
|
|
@@ -416,5 +421,6 @@ BaseDropdownMenu.propTypes = {
|
|
|
416
421
|
autoDropDirection: _propTypes.default.bool,
|
|
417
422
|
noItemMessage: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
418
423
|
focusedItemIndex: _propTypes.default.number.isRequired,
|
|
419
|
-
dropdownClassName: _propTypes.default.string
|
|
424
|
+
dropdownClassName: _propTypes.default.string,
|
|
425
|
+
requestItemDOMValues: _propTypes.default.bool
|
|
420
426
|
};
|
|
@@ -71,7 +71,8 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
71
71
|
filteredOptions: props.options,
|
|
72
72
|
itemDOMValues: [],
|
|
73
73
|
focusedItemIndex: DEFAULT_FOCUSED_ITEM_INDEX,
|
|
74
|
-
keyboardUsed: false
|
|
74
|
+
keyboardUsed: false,
|
|
75
|
+
requestItemDOMValues: false
|
|
75
76
|
};
|
|
76
77
|
_this.onToggle = _this.onToggle.bind((0, _assertThisInitialized2.default)(_this));
|
|
77
78
|
_this.handleClickOutside = _this.handleClickOutside.bind((0, _assertThisInitialized2.default)(_this));
|
|
@@ -125,7 +126,8 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
125
126
|
}
|
|
126
127
|
}, {
|
|
127
128
|
key: "updateDOMValues",
|
|
128
|
-
value: function updateDOMValues(
|
|
129
|
+
value: function updateDOMValues() {
|
|
130
|
+
var itemDOMValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
129
131
|
this.setState(function () {
|
|
130
132
|
return {
|
|
131
133
|
itemDOMValues: itemDOMValues,
|
|
@@ -294,7 +296,8 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
294
296
|
noItemMessage: noItemMessage,
|
|
295
297
|
autoDropDirection: autoDropDirection,
|
|
296
298
|
pullRight: pullRight,
|
|
297
|
-
dropdownClassName: dropdownClassName
|
|
299
|
+
dropdownClassName: dropdownClassName,
|
|
300
|
+
requestItemDOMValues: this.state.requestItemDOMValues
|
|
298
301
|
});
|
|
299
302
|
}
|
|
300
303
|
}, {
|
|
@@ -311,10 +314,13 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
311
314
|
}
|
|
312
315
|
}, {
|
|
313
316
|
key: "filterOptions",
|
|
314
|
-
value: function filterOptions(
|
|
317
|
+
value: function filterOptions() {
|
|
318
|
+
var itemDOMValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
319
|
+
var filterValue = arguments.length > 1 ? arguments[1] : undefined;
|
|
320
|
+
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
315
321
|
var filteredDOMValues = itemDOMValues.filter(function (item) {
|
|
316
322
|
return item.text.toLowerCase().includes(filterValue.toLowerCase());
|
|
317
|
-
}); // Filter the options
|
|
323
|
+
}); // Filter the options according to the filtered DOM values and map the IDs since the filter cannot be done
|
|
318
324
|
// on the options itself as they might contain arbitrary components
|
|
319
325
|
|
|
320
326
|
return options.filter(function (option) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _AppNavigationBar2.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _AppNavigationBar2 = _interopRequireDefault(require("../components/navigation/AppNavigationBar"));
|
package/lib/es/DeviceUtils.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ declare module '@rio-cloud/rio-uikit/lib/es/DeviceUtils' {
|
|
|
2
2
|
export function hasTouch(): boolean;
|
|
3
3
|
export function isDesktop(): boolean;
|
|
4
4
|
export function isMobile(): boolean;
|
|
5
|
+
export function isMobileScreen(): boolean;
|
|
5
6
|
export function inIframe(): boolean;
|
|
6
7
|
export function toggleZoomOnMobile(): boolean;
|
|
8
|
+
export type MOBILE_SCREEN = number;
|
|
7
9
|
}
|
package/lib/es/deviceUtils.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "MOBILE_SCREEN", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _deviceUtils.MOBILE_SCREEN;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "hasTouch", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -27,6 +33,12 @@ Object.defineProperty(exports, "isMobile", {
|
|
|
27
33
|
return _deviceUtils.isMobile;
|
|
28
34
|
}
|
|
29
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "isMobileScreen", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _deviceUtils.isMobileScreen;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
30
42
|
Object.defineProperty(exports, "toggleZoomOnMobile", {
|
|
31
43
|
enumerable: true,
|
|
32
44
|
get: function get() {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _useResizeObserver2.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _useResizeObserver2 = _interopRequireDefault(require("../hooks/useResizeObserver"));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
// inspired from https://tobbelindstrom.com/blog/resize-observer-hook/
|
|
15
|
+
var useResizeObserver = function useResizeObserver() {
|
|
16
|
+
var _useState = (0, _react.useState)({}),
|
|
17
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
18
|
+
observerEntry = _useState2[0],
|
|
19
|
+
setObserverEntry = _useState2[1];
|
|
20
|
+
|
|
21
|
+
var _useState3 = (0, _react.useState)(null),
|
|
22
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
23
|
+
node = _useState4[0],
|
|
24
|
+
setNode = _useState4[1];
|
|
25
|
+
|
|
26
|
+
var observer = (0, _react.useRef)(null);
|
|
27
|
+
var disconnect = (0, _react.useCallback)(function () {
|
|
28
|
+
var _observer$current;
|
|
29
|
+
|
|
30
|
+
return (_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.disconnect();
|
|
31
|
+
}, []);
|
|
32
|
+
var observe = (0, _react.useCallback)(function () {
|
|
33
|
+
observer.current = new ResizeObserver(function (_ref) {
|
|
34
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
|
35
|
+
entry = _ref2[0];
|
|
36
|
+
|
|
37
|
+
return setObserverEntry(entry);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (node) {
|
|
41
|
+
observer.current.observe(node);
|
|
42
|
+
}
|
|
43
|
+
}, [node]);
|
|
44
|
+
(0, _react.useLayoutEffect)(function () {
|
|
45
|
+
observe();
|
|
46
|
+
return function () {
|
|
47
|
+
return disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, [disconnect, observe]);
|
|
50
|
+
return [setNode, observerEntry];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var _default = useResizeObserver;
|
|
54
|
+
exports.default = _default;
|
|
@@ -5,19 +5,22 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
|
|
12
12
|
var _throttle = _interopRequireDefault(require("lodash/fp/throttle"));
|
|
13
13
|
|
|
14
|
-
function useWindowResize(onResizeCallback) {
|
|
14
|
+
var useWindowResize = function useWindowResize(onResizeCallback) {
|
|
15
15
|
var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
|
|
16
16
|
(0, _react.useEffect)(function () {
|
|
17
17
|
var throttledCallback = (0, _throttle.default)(timeout, onResizeCallback);
|
|
18
|
-
window.addEventListener('resize', throttledCallback
|
|
18
|
+
window.addEventListener('resize', throttledCallback);
|
|
19
19
|
return function () {
|
|
20
|
-
|
|
20
|
+
window.removeEventListener('resize', throttledCallback);
|
|
21
21
|
};
|
|
22
22
|
}, [onResizeCallback, timeout]);
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var _default = useWindowResize;
|
|
26
|
+
exports.default = _default;
|
|
@@ -191,7 +191,7 @@ body .module-content {
|
|
|
191
191
|
|
|
192
192
|
.ApplicationHeader {
|
|
193
193
|
.navbar-brand {
|
|
194
|
-
background-image: url('@{cdnBase}/svg/common/ico_rio.svg') !important;
|
|
194
|
+
//background-image: url('@{cdnBase}/svg/common/ico_rio.svg') !important;
|
|
195
195
|
background-size: cover;
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -554,6 +554,29 @@ body .module-content {
|
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
+
&.btn-default {
|
|
558
|
+
.btn {
|
|
559
|
+
.button-variant(
|
|
560
|
+
~'!important';
|
|
561
|
+
@btn-default-bg;
|
|
562
|
+
@btn-default-border;
|
|
563
|
+
@btn-default-color;
|
|
564
|
+
@btn-default-color;
|
|
565
|
+
@btn-default-color;
|
|
566
|
+
@btn-default-color;
|
|
567
|
+
darken(@btn-default-color, 17%);
|
|
568
|
+
darken(@btn-default-border, 12%);
|
|
569
|
+
darken(@btn-default-border, 12%);
|
|
570
|
+
darken(@btn-default-border, 25%);
|
|
571
|
+
darken(@btn-default-border, 25%);
|
|
572
|
+
@btn-default-bg;
|
|
573
|
+
@btn-default-bg;
|
|
574
|
+
@btn-default-bg;
|
|
575
|
+
@btn-default-bg;
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
557
580
|
&.btn-white {
|
|
558
581
|
.btn {
|
|
559
582
|
.button-variant(
|
|
@@ -671,6 +694,24 @@ body .module-content {
|
|
|
671
694
|
}
|
|
672
695
|
}
|
|
673
696
|
|
|
697
|
+
&.list-style-position-inside {
|
|
698
|
+
ul, ol {
|
|
699
|
+
list-style-position: inside !important;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
&.large-panel-border {
|
|
704
|
+
> .section-content-container.panel {
|
|
705
|
+
border-width: 3px;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
&.panel-border-color-lighter {
|
|
709
|
+
> .section-content-container.panel {
|
|
710
|
+
border-color: @gray-lighter;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
674
715
|
// Section Wrapper Inner Container
|
|
675
716
|
.section-content-container {
|
|
676
717
|
height: 100%;
|
|
@@ -1526,6 +1567,26 @@ body .module-content {
|
|
|
1526
1567
|
}
|
|
1527
1568
|
}
|
|
1528
1569
|
}
|
|
1570
|
+
|
|
1571
|
+
&-always {
|
|
1572
|
+
.section-layout {
|
|
1573
|
+
padding-left: 0;
|
|
1574
|
+
padding-right: 0;
|
|
1575
|
+
|
|
1576
|
+
.section-layout-container {
|
|
1577
|
+
max-width: none;
|
|
1578
|
+
padding-left: 0;
|
|
1579
|
+
padding-right: 0;
|
|
1580
|
+
|
|
1581
|
+
.section-layout-container-row {
|
|
1582
|
+
.section-content-container-col {
|
|
1583
|
+
padding-left: 0;
|
|
1584
|
+
padding-right: 0;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1529
1590
|
}
|
|
1530
1591
|
|
|
1531
1592
|
&-marketplace-details-panel {
|
|
@@ -1594,6 +1655,14 @@ body .module-content {
|
|
|
1594
1655
|
}
|
|
1595
1656
|
}
|
|
1596
1657
|
|
|
1658
|
+
&-hide-background-on-mobile {
|
|
1659
|
+
@media (max-width: @screen-ls) {
|
|
1660
|
+
.section-wrapper-background-image {
|
|
1661
|
+
display: none;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1597
1666
|
&-overlay-light {
|
|
1598
1667
|
.section-wrapper-background-image,
|
|
1599
1668
|
.section-content-container-background-image {
|
|
@@ -1834,12 +1903,6 @@ blockquote {
|
|
|
1834
1903
|
.anchor {
|
|
1835
1904
|
margin-top: -50px;
|
|
1836
1905
|
}
|
|
1837
|
-
|
|
1838
|
-
// .preset-rimless {
|
|
1839
|
-
// > .anchor {
|
|
1840
|
-
// margin-top: -50px;
|
|
1841
|
-
// }
|
|
1842
|
-
// }
|
|
1843
1906
|
}
|
|
1844
1907
|
|
|
1845
1908
|
.ApplicationLayoutBody {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
border-bottom: 1px solid @gray-light;
|
|
60
60
|
display: flex;
|
|
61
61
|
justify-content: space-between;
|
|
62
|
-
padding: 0 @ApplicationLayoutBodyPadding*0.25 0 @ApplicationLayoutBodyPadding*0.5;
|
|
62
|
+
// padding: 0 @ApplicationLayoutBodyPadding*0.25 0 @ApplicationLayoutBodyPadding*0.5;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&:not(.header-has-no-application-menu) {
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.nav-pills {
|
|
72
|
+
padding-left: @ApplicationLayoutBodyPadding*0.5;
|
|
73
|
+
|
|
72
74
|
&:not(.nav-stacked) {
|
|
73
75
|
box-shadow: none;
|
|
74
76
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
&.closed {
|
|
44
44
|
box-shadow: none !important;
|
|
45
|
-
width: 50px
|
|
45
|
+
width: 50px;
|
|
46
46
|
|
|
47
47
|
.TreeSidebarToggle {
|
|
48
48
|
transform: rotate(180deg);
|
|
@@ -237,10 +237,6 @@
|
|
|
237
237
|
|
|
238
238
|
.TreeHead {
|
|
239
239
|
min-height: 50px;
|
|
240
|
-
|
|
241
|
-
.TreeSelectAll {
|
|
242
|
-
margin-right: 5px;
|
|
243
|
-
}
|
|
244
240
|
}
|
|
245
241
|
|
|
246
242
|
&Options {
|
|
@@ -318,9 +318,12 @@
|
|
|
318
318
|
|
|
319
319
|
&:before {
|
|
320
320
|
.rioglyph;
|
|
321
|
+
animation-name: spinning;
|
|
322
|
+
animation-duration: 1s;
|
|
323
|
+
animation-iteration-count: infinite;
|
|
324
|
+
animation-timing-function: linear;
|
|
321
325
|
content: "\e9c7";
|
|
322
326
|
color: @brand-primary;
|
|
323
|
-
animation: spinning 1s linear infinite;
|
|
324
327
|
font-size: 20px;
|
|
325
328
|
}
|
|
326
329
|
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
@import (less) '../../fonts/rioglyph/rioglyph.less';
|
|
2
2
|
|
|
3
|
-
@keyframes spinning {
|
|
4
|
-
from { transform: rotate(0deg) }
|
|
5
|
-
to { transform: rotate(359deg) }
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@keyframes pulse {
|
|
9
|
-
50% {
|
|
10
|
-
opacity:.5
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
3
|
.rioglyph {
|
|
15
4
|
&.spinning:before {
|
|
16
5
|
display: inline-block;
|
|
@@ -19,6 +8,6 @@
|
|
|
19
8
|
|
|
20
9
|
&.pulsing:before {
|
|
21
10
|
display: inline-block;
|
|
22
|
-
animation:
|
|
11
|
+
animation: pulsing 2s cubic-bezier(.4,0,.6,1) infinite;
|
|
23
12
|
}
|
|
24
13
|
}
|
package/lib/types.ts
CHANGED
|
@@ -57,6 +57,14 @@ export interface AnimatedNumberProps {
|
|
|
57
57
|
className?: string;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export interface AppNavigationBarProps {
|
|
61
|
+
ref?: React.MutableRefObject<object>;
|
|
62
|
+
title?: string | React.ReactNode;
|
|
63
|
+
right?: React.ReactNode;
|
|
64
|
+
onNavigateBack?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
export interface ApplicationHeaderProps {
|
|
61
69
|
label?: React.ReactNode;
|
|
62
70
|
homeRoute?: React.ReactNode;
|
|
@@ -73,6 +81,7 @@ export interface ApplicationHeaderProps {
|
|
|
73
81
|
|
|
74
82
|
export interface ApplicationLayoutProps {
|
|
75
83
|
className?: string;
|
|
84
|
+
layoutRef: React.MutableRefObject<object>;
|
|
76
85
|
}
|
|
77
86
|
|
|
78
87
|
export interface ApplicationLayoutHeaderProps {
|
|
@@ -498,6 +507,7 @@ export interface DatePickerProps extends DatetimepickerProps {
|
|
|
498
507
|
alignRight?: boolean;
|
|
499
508
|
locale?: string;
|
|
500
509
|
closeOnSelect?: boolean;
|
|
510
|
+
initialValue?: Date | Moment;
|
|
501
511
|
value?: Date | string | Moment;
|
|
502
512
|
dateFormat?: string | boolean;
|
|
503
513
|
timeFormat?: string | boolean;
|
|
@@ -2028,7 +2038,12 @@ export interface TreeSummaryProps {
|
|
|
2028
2038
|
}
|
|
2029
2039
|
|
|
2030
2040
|
export interface TypeCounterProps {
|
|
2041
|
+
type?: string;
|
|
2031
2042
|
icon?: string;
|
|
2043
|
+
isActive?: boolean;
|
|
2044
|
+
enableActivity?: boolean;
|
|
2045
|
+
hideOnZero?: boolean;
|
|
2046
|
+
onClick?: (type: string) => void;
|
|
2032
2047
|
value?: string | React.ReactNode | number;
|
|
2033
2048
|
}
|
|
2034
2049
|
|
|
@@ -2116,6 +2131,8 @@ export type UseOnScreen = (
|
|
|
2116
2131
|
|
|
2117
2132
|
export type UseRenderCount = () => number;
|
|
2118
2133
|
|
|
2134
|
+
export type UseResizeObserver = () => [React.MutableRefObject<object>, ResizeObserverEntry];
|
|
2135
|
+
|
|
2119
2136
|
export type UseStateWithValidation = (validationFn: Function, initialValue: any) => [any, Function, boolean];
|
|
2120
2137
|
|
|
2121
2138
|
export type UseLocalStorage = (key: string, defaultValue: any) => [any, Function, Function];
|
package/lib/utils/deviceUtils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.toggleZoomOnMobile = exports.isMobile = exports.isDesktop = exports.inIframe = exports.hasTouch = void 0;
|
|
6
|
+
exports.toggleZoomOnMobile = exports.isMobileScreen = exports.isMobile = exports.isDesktop = exports.inIframe = exports.hasTouch = exports.MOBILE_SCREEN = void 0;
|
|
7
7
|
|
|
8
8
|
// As "cssuseragent" is accessing the html dom object directly without checking whether it exists or not, we need to
|
|
9
9
|
// use old shool require() to have a conditional import only when html really exists. This avoids issues when
|
|
@@ -34,9 +34,18 @@ var hasTouch = function hasTouch() {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return false;
|
|
37
|
-
};
|
|
37
|
+
}; // Screen sizes
|
|
38
|
+
|
|
38
39
|
|
|
39
40
|
exports.hasTouch = hasTouch;
|
|
41
|
+
var MOBILE_SCREEN = 480;
|
|
42
|
+
exports.MOBILE_SCREEN = MOBILE_SCREEN;
|
|
43
|
+
|
|
44
|
+
var isMobileScreen = function isMobileScreen() {
|
|
45
|
+
return window.matchMedia("(max-width: ".concat(MOBILE_SCREEN, "px)")).matches;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.isMobileScreen = isMobileScreen;
|
|
40
49
|
|
|
41
50
|
var isMobile = function isMobile() {
|
|
42
51
|
return document && document.documentElement.classList.contains('ua-mobile');
|
package/lib/version.json
CHANGED