@nokecy/qc-ui 1.0.7 → 1.0.8
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/README.md +23 -23
- package/dist/cjs/ConfirmPro/index.js +4 -4
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +5 -5
- package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +352 -352
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +21 -7
- package/dist/cjs/ag-grid-plus/index.less +14 -14
- package/dist/cjs/ag-grid-plus/interface.d.ts +4 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/cjs/ag-grid-plus/toolBar/index.js +4 -4
- package/dist/cjs/array-table/preview.js +4 -23
- package/dist/cjs/array-table/utils.js +3 -5
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/cjs/dashboard/dashboard/index.less +173 -173
- package/dist/cjs/dashboard/dashboard/utils.js +4 -4
- package/dist/cjs/dashboard/utils.js +8 -8
- package/dist/cjs/dashboard/widget/index.less +7 -7
- package/dist/cjs/dashboard/widget/selector/index.less +172 -172
- package/dist/cjs/draggableModal/index.js +4 -4
- package/dist/cjs/draggableModal/style.less +16 -16
- package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
- package/dist/cjs/formDesigner/index.less +2 -2
- package/dist/cjs/fullScreenAlert/index.js +4 -4
- package/dist/cjs/fullScreenAlert/index.less +133 -133
- package/dist/cjs/importModal/index.js +4 -4
- package/dist/cjs/toolBar/index.less +25 -25
- package/dist/esm/ConfirmPro/index.js +4 -4
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +5 -5
- package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +352 -352
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +20 -6
- package/dist/esm/ag-grid-plus/index.less +14 -14
- package/dist/esm/ag-grid-plus/interface.d.ts +4 -0
- package/dist/esm/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/esm/ag-grid-plus/toolBar/index.js +4 -4
- package/dist/esm/array-table/preview.js +3 -21
- package/dist/esm/array-table/utils.js +3 -3
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/esm/dashboard/dashboard/index.less +173 -173
- package/dist/esm/dashboard/dashboard/utils.js +4 -4
- package/dist/esm/dashboard/utils.js +8 -8
- package/dist/esm/dashboard/widget/index.less +7 -7
- package/dist/esm/dashboard/widget/selector/index.less +172 -172
- package/dist/esm/draggableModal/index.js +4 -4
- package/dist/esm/draggableModal/style.less +16 -16
- package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
- package/dist/esm/formDesigner/index.less +2 -2
- package/dist/esm/fullScreenAlert/index.js +4 -4
- package/dist/esm/fullScreenAlert/index.less +133 -133
- package/dist/esm/importModal/index.js +4 -4
- package/dist/esm/toolBar/index.less +25 -25
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +70 -70
|
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
import { AgGridReact } from 'ag-grid-react';
|
|
20
|
-
import { Spin, Pagination, Card, Tag } from 'antd';
|
|
20
|
+
import { Spin, Pagination, Card, Tag, Typography } from 'antd';
|
|
21
21
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import "ag-grid-enterprise";
|
|
23
23
|
import "./index.less";
|
|
@@ -28,6 +28,8 @@ import { RedoOutlined } from '@ant-design/icons';
|
|
|
28
28
|
import { convertFilterModel, dateTimeValueFormatter, dateValueFormatter, flatten, toTree } from "./utils";
|
|
29
29
|
import Setting from "./setting";
|
|
30
30
|
import { useGridPlusColumnState } from '.';
|
|
31
|
+
var Paragraph = Typography.Paragraph,
|
|
32
|
+
Text = Typography.Text;
|
|
31
33
|
var getSort = function getSort(columnState) {
|
|
32
34
|
return columnState ? "".concat(columnState.colId, " ").concat(columnState.sort) : "";
|
|
33
35
|
};
|
|
@@ -330,17 +332,29 @@ function AgGridPlus(props) {
|
|
|
330
332
|
if (col.type || typeof col.cellRenderer == "string") {
|
|
331
333
|
return _objectSpread({}, col);
|
|
332
334
|
}
|
|
333
|
-
|
|
335
|
+
//@ts-ignore
|
|
336
|
+
if (col !== null && col !== void 0 && col.ellipsis) {
|
|
334
337
|
return _objectSpread(_objectSpread({}, col), {}, {
|
|
335
|
-
|
|
336
|
-
|
|
338
|
+
cellRenderer: function cellRenderer(_ref) {
|
|
339
|
+
var value = _ref.value;
|
|
340
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
341
|
+
ellipsis: {
|
|
342
|
+
tooltip: value
|
|
343
|
+
}
|
|
344
|
+
}, value);
|
|
345
|
+
}
|
|
337
346
|
});
|
|
338
|
-
}
|
|
339
|
-
|
|
347
|
+
}
|
|
348
|
+
if (col.cellRenderer) {
|
|
349
|
+
return _objectSpread(_objectSpread({}, col), {}, {
|
|
340
350
|
customCellRenderer: col.cellRenderer,
|
|
341
351
|
cellRenderer: cellRenderer
|
|
342
352
|
});
|
|
343
353
|
}
|
|
354
|
+
return _objectSpread(_objectSpread(_objectSpread({}, dataType), col), {}, {
|
|
355
|
+
customCellRenderer: col.cellRenderer,
|
|
356
|
+
cellRenderer: cellRenderer
|
|
357
|
+
});
|
|
344
358
|
});
|
|
345
359
|
extensibleColumns && gridKey && extensibleColumns[gridKey] && extensibleColumns[gridKey].map(function (column) {
|
|
346
360
|
columnDefs.push({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
.grid-spin {
|
|
2
|
-
height: 100%;
|
|
3
|
-
|
|
4
|
-
.ant-spin-container {
|
|
5
|
-
height: 100%;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ag-icon-filter:before {
|
|
10
|
-
-webkit-mask-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzIzNjg0NDAwMDY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI0MjgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTMyNS43MTQyODYgODg0LjU3MTQyOWMwIDIwLjIyODU3MSAxNi4yMjg1NzEgMzYuNTcxNDI5IDM2LjM0Mjg1NyAzNi41NzE0MjhoMjk5Ljg4NTcxNGMyMC4xMTQyODYgMCAzNi4zNDI4NTctMTYuMzQyODU3IDM2LjM0Mjg1Ny0zNi41NzE0MjhWNjYwLjU3MTQyOUgzMjUuNzE0Mjg2djIyNHogbTYwNi45NzE0MjgtNzgxLjcxNDI4Nkg5MS4zMTQyODZjLTI4IDAtNDUuNDg1NzE0IDMwLjUxNDI4Ni0zMS40M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yODYgNDI5LjcxNDI4NWgzOTguNjI4NTcxbDI1Mi45MTQyODYtNDI5LjcxNDI4NWMxMy44Mjg1NzEtMjQuMzQyODU3LTMuNjU3MTQzLTU0Ljg1NzE0My0zMS42NTcxNDMtNTQuODU3MTQzeiIgcC1pZD0iMjQyOSIgZmlsbD0iIzhhOGE4YSI+PC9wYXRoPjwvc3ZnPg==) !important;
|
|
13
|
-
|
|
14
|
-
color: #8a8a8a;
|
|
1
|
+
.grid-spin {
|
|
2
|
+
height: 100%;
|
|
3
|
+
|
|
4
|
+
.ant-spin-container {
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ag-icon-filter:before {
|
|
10
|
+
-webkit-mask-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzIzNjg0NDAwMDY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI0MjgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTMyNS43MTQyODYgODg0LjU3MTQyOWMwIDIwLjIyODU3MSAxNi4yMjg1NzEgMzYuNTcxNDI5IDM2LjM0Mjg1NyAzNi41NzE0MjhoMjk5Ljg4NTcxNGMyMC4xMTQyODYgMCAzNi4zNDI4NTctMTYuMzQyODU3IDM2LjM0Mjg1Ny0zNi41NzE0MjhWNjYwLjU3MTQyO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NzE0MjgtNzgxLjcxNDI4Nkg5MS4zMTQyODZjLTI4IDAtNDUuNDg1NzE0IDMwLjUxNDI4Ni0zMS40Mjg1NzIgNTQuODU3MTQzbDI1Mi45MTQyODYgNDI5LjcxNDI4NWgzOTguNjI4NTcxbDI1Mi45MTQyODYtNDI5LjcxNDI4NWMxMy44Mjg1NzEtMjQuMzQyODU3LTMuNjU3MTQzLTU0Ljg1NzE0My0zMS42NTcxNDMtNTQuODU3MTQzeiIgcC1pZD0iMjQyOSIgZmlsbD0iIzhhOGE4YSI+PC9wYXRoPjwvc3ZnPg==) !important;
|
|
13
|
+
|
|
14
|
+
color: #8a8a8a;
|
|
15
15
|
}
|
|
@@ -36,6 +36,10 @@ interface AgGridColumnPropsClone extends ColDef {
|
|
|
36
36
|
hideInTable?: boolean;
|
|
37
37
|
hideInSearch?: boolean;
|
|
38
38
|
queryField?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 是否文本缩略显示,并使用tooltip
|
|
41
|
+
*/
|
|
42
|
+
ellipsis?: boolean;
|
|
39
43
|
searchComponent?: ReactNode | JSX.Element | ((props: any) => JSX.Element);
|
|
40
44
|
searchComponentProps?: any;
|
|
41
45
|
searchSort?: number;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
@pro-table-search-prefix-cls: ~'ag-grid-table-search';
|
|
3
|
-
|
|
4
|
-
@pro-table-form-prefix-cls: ~'ag-grid-table-form';
|
|
5
|
-
|
|
6
|
-
.@{pro-table-search-prefix-cls} {
|
|
7
|
-
margin-bottom: 8px;
|
|
8
|
-
padding: 8px;
|
|
9
|
-
// padding-bottom: 0;
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
|
|
12
|
-
&.@{pro-table-form-prefix-cls} {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0 16px;
|
|
15
|
-
overflow: unset;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-light {
|
|
19
|
-
margin-bottom: 0;
|
|
20
|
-
padding: 16px 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-form-option {
|
|
24
|
-
.ant-form-item {
|
|
25
|
-
margin: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ant-form-item-label {
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.ant-form-item-control-input {
|
|
33
|
-
justify-content: flex-start;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@media (max-width: 575px) {
|
|
39
|
-
.@{pro-table-search-prefix-cls} {
|
|
40
|
-
height: auto !important;
|
|
41
|
-
padding-bottom: 24px;
|
|
42
|
-
|
|
43
|
-
.ant-form-item-label {
|
|
44
|
-
min-width: 80px;
|
|
45
|
-
text-align: left;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
|
|
2
|
+
@pro-table-search-prefix-cls: ~'ag-grid-table-search';
|
|
3
|
+
|
|
4
|
+
@pro-table-form-prefix-cls: ~'ag-grid-table-form';
|
|
5
|
+
|
|
6
|
+
.@{pro-table-search-prefix-cls} {
|
|
7
|
+
margin-bottom: 8px;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
// padding-bottom: 0;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
|
|
12
|
+
&.@{pro-table-form-prefix-cls} {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0 16px;
|
|
15
|
+
overflow: unset;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-light {
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
padding: 16px 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-form-option {
|
|
24
|
+
.ant-form-item {
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-form-item-label {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ant-form-item-control-input {
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (max-width: 575px) {
|
|
39
|
+
.@{pro-table-search-prefix-cls} {
|
|
40
|
+
height: auto !important;
|
|
41
|
+
padding-bottom: 24px;
|
|
42
|
+
|
|
43
|
+
.ant-form-item-label {
|
|
44
|
+
min-width: 80px;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -10,10 +10,10 @@ import { ConfigProvider, Tooltip } from 'antd';
|
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import React, { useContext, useMemo } from 'react';
|
|
12
12
|
import { useStyle } from "./style";
|
|
13
|
-
/**
|
|
14
|
-
* 获取配置区域 DOM Item
|
|
15
|
-
*
|
|
16
|
-
* @param setting 配置项
|
|
13
|
+
/**
|
|
14
|
+
* 获取配置区域 DOM Item
|
|
15
|
+
*
|
|
16
|
+
* @param setting 配置项
|
|
17
17
|
*/
|
|
18
18
|
function getSettingItem(setting) {
|
|
19
19
|
if ( /*#__PURE__*/React.isValidElement(setting)) {
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { AgGridReact } from "ag-grid-react";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import { useField } from "@formily/react";
|
|
4
3
|
import { useArrayTableColumns, useArrayTableSources } from "./utils";
|
|
5
|
-
|
|
4
|
+
import { AgGridPlus } from "../ag-grid-plus";
|
|
6
5
|
//@ts-ignore
|
|
7
6
|
var ArrayTable = function ArrayTable(props) {
|
|
8
7
|
var height = props.height;
|
|
9
|
-
var apiRef = useRef();
|
|
10
8
|
var field = useField();
|
|
11
9
|
var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
|
|
12
10
|
var sources = useArrayTableSources();
|
|
13
11
|
var columns = useArrayTableColumns(dataSource, field, sources);
|
|
14
|
-
console.log("columns", sources);
|
|
15
12
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
13
|
style: {
|
|
17
14
|
height: height ? height : 400
|
|
18
15
|
}
|
|
19
|
-
}, /*#__PURE__*/React.createElement(
|
|
20
|
-
onGridReady: function onGridReady(params) {
|
|
21
|
-
apiRef.current = params.api;
|
|
22
|
-
},
|
|
23
|
-
className: "ag-theme-alpine",
|
|
16
|
+
}, /*#__PURE__*/React.createElement(AgGridPlus, {
|
|
24
17
|
gridOptions: {
|
|
25
18
|
enableCellTextSelection: true,
|
|
26
19
|
ensureDomOrder: true
|
|
27
20
|
},
|
|
28
|
-
defaultColDef: {
|
|
29
|
-
resizable: true,
|
|
30
|
-
headerComponentParams: {
|
|
31
|
-
template: '<div class="ag-cell-label-container" role="presentation">' +
|
|
32
|
-
// ' <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>' +
|
|
33
|
-
' <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">' + ' <span data-ref="eText" class="ag-header-cell-text"></span>' + ' <span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' +
|
|
34
|
-
// ' <span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>' +
|
|
35
|
-
// ' <span data-ref="eSortOrder" class="ag-header-icon ag-sort-order"></span>' +
|
|
36
|
-
' <span data-ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' + ' <span data-ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' + ' <span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' + " </div>" + "</div>"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
21
|
getRowId: function getRowId(_ref) {
|
|
40
22
|
var data = _ref.data;
|
|
41
23
|
return data._id || data.id;
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { useField, useFieldSchema, RecursionField } from '@formily/react';
|
|
9
9
|
import { isArr } from '@formily/shared';
|
|
10
10
|
import ArrayBase from "./arrayBase";
|
|
@@ -63,7 +63,7 @@ var useArrayTableSources = function useArrayTableSources() {
|
|
|
63
63
|
if (!schema) throw new Error('can not found schema object');
|
|
64
64
|
return parseArrayItems(schema.items);
|
|
65
65
|
};
|
|
66
|
-
var AgField =
|
|
66
|
+
var AgField = function AgField(_ref) {
|
|
67
67
|
var value = _ref.value,
|
|
68
68
|
record = _ref.data,
|
|
69
69
|
dataSource = _ref.dataSource,
|
|
@@ -87,7 +87,7 @@ var AgField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
87
87
|
onlyRenderProperties: true
|
|
88
88
|
}));
|
|
89
89
|
return children;
|
|
90
|
-
}
|
|
90
|
+
};
|
|
91
91
|
var useArrayTableColumns = function useArrayTableColumns(dataSource, field, sources) {
|
|
92
92
|
return sources.reduce(function (buf, _ref2, key) {
|
|
93
93
|
var name = _ref2.name,
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
.react-dashboard-toolbar {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
// width: 100%;
|
|
6
|
-
padding: 0 10px;
|
|
7
|
-
padding-bottom: 10px;
|
|
8
|
-
// background: var(--component-background);
|
|
9
|
-
|
|
10
|
-
&:after {
|
|
11
|
-
display: block;
|
|
12
|
-
clear: both;
|
|
13
|
-
content: '';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&-left {
|
|
17
|
-
float: left;
|
|
18
|
-
|
|
19
|
-
button {
|
|
20
|
-
margin-right: 10px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-right {
|
|
25
|
-
float: right;
|
|
26
|
-
|
|
27
|
-
button {
|
|
28
|
-
margin-left: 10px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&-space {
|
|
33
|
-
flex: auto;
|
|
34
|
-
height: 1px;
|
|
35
|
-
margin: 0 !important;
|
|
36
|
-
padding: 0 !important;
|
|
37
|
-
border: 0 !important;
|
|
38
|
-
-webkit-box-flex: 1;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-fixed {
|
|
42
|
-
position: fixed;
|
|
43
|
-
right: 0;
|
|
44
|
-
bottom: 0;
|
|
45
|
-
z-index: 9;
|
|
46
|
-
border-top: 1px solid rgba(128, 128, 128, 0.1);
|
|
47
|
-
box-shadow: 0 -1px 2px rgba(128, 128, 128, 0.03);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
.react-dashboard-toolbar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
// width: 100%;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
padding-bottom: 10px;
|
|
8
|
+
// background: var(--component-background);
|
|
9
|
+
|
|
10
|
+
&:after {
|
|
11
|
+
display: block;
|
|
12
|
+
clear: both;
|
|
13
|
+
content: '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-left {
|
|
17
|
+
float: left;
|
|
18
|
+
|
|
19
|
+
button {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-right {
|
|
25
|
+
float: right;
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-space {
|
|
33
|
+
flex: auto;
|
|
34
|
+
height: 1px;
|
|
35
|
+
margin: 0 !important;
|
|
36
|
+
padding: 0 !important;
|
|
37
|
+
border: 0 !important;
|
|
38
|
+
-webkit-box-flex: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-fixed {
|
|
42
|
+
position: fixed;
|
|
43
|
+
right: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
z-index: 9;
|
|
46
|
+
border-top: 1px solid rgba(128, 128, 128, 0.1);
|
|
47
|
+
box-shadow: 0 -1px 2px rgba(128, 128, 128, 0.03);
|
|
48
|
+
}
|
|
49
|
+
}
|