dtable-statistic 5.3.46 → 5.3.47-beta.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.
@@ -171,12 +171,12 @@
171
171
  }
172
172
 
173
173
  .statistic-list .statistic-chart-preview-container .sea-chart-pivot-table td {
174
- min-width: 32px;
174
+ min-width: 32px;
175
175
  width: auto
176
176
  }
177
177
 
178
178
  .statistic-list .statistic-chart-preview-container .sea-chart-pivot-table th {
179
- min-width: 32px;
179
+ min-width: 32px;
180
180
  width: auto
181
181
  }
182
182
 
@@ -288,38 +288,28 @@
288
288
  font-size: 12px;
289
289
  }
290
290
 
291
- .statistic-chart-preview .stat-item-dropdown-menu {
292
- background-color: var(--dropdown-bg-color);
293
- color: var(--common-font-color);
294
- border: 1px solid var(--dropdown-border-color);
295
- }
296
-
297
- .statistic-chart-preview .dtable-dropdown-menu .toggle-icon {
291
+ .statistic-chart-preview .dtable-dropdown .toggle-icon {
298
292
  font-size: 14px;
299
293
  color: var(--stat-item-font-color);
300
294
  }
301
295
 
302
- .statistic-chart-preview .dtable-dropdown-menu .dropdown-item {
303
- padding: 3px 12px;
304
- line-height: 1.5;
305
- font-size: 14px;
306
- color: var(--common-font-color);
307
- cursor: pointer;
296
+ .statistic-dropdown-dark.dtable-dropdown-menu {
297
+ background-color: rgba(28, 29, 31, 1);
298
+ border: 1px solid rgba(51, 52, 53, 1);
299
+ box-shadow: none;
308
300
  }
309
301
 
310
- .statistic-chart-preview .dtable-dropdown-menu .dropdown-item .item-icon {
311
- font-size: 14px;
312
- margin-right: 10px;
313
- color: #8c8c8c;
302
+ .statistic-dropdown-dark.dtable-dropdown-menu,
303
+ .statistic-dropdown-dark.dtable-dropdown-menu .dropdown-item {
304
+ color: rgba(255, 255, 255, .9);
314
305
  }
315
306
 
316
- .statistic-chart-preview .dtable-dropdown-menu .dropdown-item:hover {
317
- color: #fff;
318
- background-color: #20a0ff;
307
+ .statistic-dropdown-dark.dtable-dropdown-menu .dropdown-item .item-icon {
308
+ color: hsla(0, 0%, 100%, .7);
319
309
  }
320
310
 
321
- .statistic-chart-preview .dtable-dropdown-menu .dropdown-item:hover .item-icon {
322
- color: #fff;
311
+ .statistic-dropdown-dark.dtable-dropdown-menu .dropdown-item:hover {
312
+ background-color: hsla(0, 0%, 100%, .1);
323
313
  }
324
314
 
325
315
  .statistic-chart-preview .dtable-icon-more-level:hover {
@@ -398,40 +388,6 @@
398
388
  --font-hover-color: #ffffff;
399
389
  }
400
390
 
401
- .statistic-dropdown-menu {
402
- font-weight: normal;
403
- background-color: var(--dropdown-bg-color);
404
- border: 1px solid var(--dropdown-border-color);
405
- }
406
-
407
- .statistic-dropdown-menu .no-options {
408
- display: flex;
409
- align-items: center;
410
- justify-content: center;
411
- height: 40px;
412
- color: #c2c2c2;
413
- }
414
-
415
- .statistic-dropdown-menu .dropdown-item {
416
- color: var(--font-color);
417
- cursor: pointer;
418
- }
419
-
420
- .statistic-dropdown-menu .dropdown-item:hover {
421
- color: var(--font-hover-color);
422
- background-color: #20a0ff;
423
- }
424
-
425
- .statistic-dropdown-menu .dropdown-item .item-icon {
426
- font-size: 14px;
427
- margin-right: 10px;
428
- color: var(--font-color);
429
- }
430
-
431
- .statistic-dropdown-menu .dropdown-item:hover .item-icon {
432
- color: var(--font-hover-color);
433
- }
434
-
435
391
  /* basic-number-card */
436
392
  .statistic-number-card .g2-html-annotation {
437
393
  transform: translate(-50%, -50%);
@@ -666,15 +622,3 @@
666
622
  margin-top: -16px !important;
667
623
  margin-left: 8px !important;
668
624
  }
669
-
670
- .statistic-views-dropdown-menu .dropdown-item {
671
- display: flex;
672
- align-items: center;
673
- min-height: 32px;
674
- padding: 3px 12px;
675
- }
676
-
677
- .statistic-views-dropdown-menu .statistic-view-name {
678
- display: inline-block;
679
- width: 100%;
680
- }
@@ -8,9 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
11
+ var _classnames = _interopRequireDefault(require("classnames"));
11
12
  var _reactstrap = require("reactstrap");
12
13
  var _seaChart = require("sea-chart");
13
14
  var _icon = _interopRequireDefault(require("../icon"));
15
+ var _constants = require("../../constants");
14
16
  class StatisticDropdownMenu extends _react.default.Component {
15
17
  constructor(props) {
16
18
  super(props);
@@ -60,12 +62,13 @@ class StatisticDropdownMenu extends _react.default.Component {
60
62
  render() {
61
63
  const {
62
64
  isTableReadOnly,
63
- chartType
65
+ chartType,
66
+ theme
64
67
  } = this.props;
65
68
  const otherViews = this.props.getOtherStatistics();
66
69
  const hasOtherViews = otherViews && otherViews.length > 0;
67
70
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactstrap.Dropdown, {
68
- className: "dtable-dropdown-menu",
71
+ className: "dtable-dropdown",
69
72
  isOpen: this.state.isItemMenuShow,
70
73
  onMouseDown: this.onMouseDown,
71
74
  toggle: this.onDropdownToggleClick
@@ -76,7 +79,9 @@ class StatisticDropdownMenu extends _react.default.Component {
76
79
  }, /*#__PURE__*/_react.default.createElement("i", {
77
80
  className: "toggle-icon dtable-font dtable-icon-more-level"
78
81
  })), /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownMenu, {
79
- className: "stat-item-dropdown-menu",
82
+ className: (0, _classnames.default)('dtable-dropdown-menu', {
83
+ 'statistic-dropdown-dark': theme === _constants.THEME_NAME_MAP.DARK
84
+ }),
80
85
  end: true
81
86
  }, !isTableReadOnly && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
82
87
  onMouseDown: this.editStatItem
@@ -138,7 +143,9 @@ class StatisticDropdownMenu extends _react.default.Component {
138
143
  })), /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownToggle, {
139
144
  className: "move-to-statistic-views-toggle"
140
145
  })), this.state.isShowViewsMenu && /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownMenu, {
141
- className: "statistic-views-dropdown-menu",
146
+ className: (0, _classnames.default)('statistic-views-dropdown-menu dtable-dropdown-menu', {
147
+ 'statistic-dropdown-dark': theme === _constants.THEME_NAME_MAP.DARK
148
+ }),
142
149
  flip: false,
143
150
  positionFixed: true,
144
151
  modifiers: [{
package/es/index.js CHANGED
@@ -65,7 +65,7 @@ class Statistic {
65
65
  static mount(props) {
66
66
  const customProps = this.getInitProps();
67
67
  if (!customProps) return;
68
- window.app.mountWidget( /*#__PURE__*/_react.default.createElement(_dashboard.default, Object.assign({}, props, customProps)));
68
+ window.app.mountWidget(/*#__PURE__*/_react.default.createElement(_dashboard.default, Object.assign({}, props, customProps)));
69
69
  }
70
70
  static unmount() {
71
71
  let {
@@ -4,26 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- let config = {
8
- username: 'cffbc4dbc6364befbdccb8623842a8ed@auth.local',
9
- password: '123456',
10
- dtableUuid: '842e9c84-8311-432d-b818-27012c807b13',
11
- // required
12
- APIToken: '83a5ec5848242d4da6c086acabd8e3a6e2fefa10',
13
- // required
14
- server: 'https://dev.seatable.cn',
15
- mediaUrl: '/media/',
16
- // required
17
- dtableBaiduMapKey: '1qRjaf9gprzfG6Kykg54jSzAEZZI0NZV',
18
- // required
19
- dtableMineMapKey: '57bccfdf646e4118aa68accfa1f256a5',
20
- // optional
21
- dtableGoogleMapKey: 'AIzaSyC0K2fPe31FfLm3fyoPT5YXQcqO-GrSTi8',
22
- workspaceID: '291',
23
- // optional
24
- fileName: '通用应用表格测试',
25
- // optional
26
- lang: 'en' // optional
27
- // lang:'en'
28
- };
29
- var _default = exports.default = config;
7
+ /**
8
+ * local development settings
9
+ */
10
+ var _default = exports.default = {
11
+ // dtable api token (required)
12
+ APIToken: '9ae2df4c95a9a42d33bb794c100f7b1fcc2b8cfb',
13
+ // server URL of the dtable of the plugin (required)
14
+ server: 'https://dev.seatable.cn/',
15
+ // id of the workspace with the dtable of the plugin (required, workspace must exist)
16
+ workspaceID: '5',
17
+ // name of the dtable to add the plugin to (required, dtable must exist under this name)
18
+ fileName: '测试专用',
19
+ dtableUuid: '77e70288-7ae3-410e-bec8-374569e3d6c1',
20
+ // default language ('en' or 'zh-cn' are common, see "src/locale/index.js" for all lang keys)
21
+ lang: 'zh-cn',
22
+ username: 'jie.ren@seafile.com',
23
+ password: 'missu101258'
24
+ };
@@ -129,6 +129,7 @@ class ChartPreview extends _react.Component {
129
129
  }, /*#__PURE__*/_react.default.createElement("i", {
130
130
  className: "dtable-font dtable-icon-open"
131
131
  })), /*#__PURE__*/_react.default.createElement(_statisticDropdownMenu.default, {
132
+ theme: this.props.theme,
132
133
  isTableReadOnly: isTableReadOnly,
133
134
  chartType: type,
134
135
  getOtherStatistics: this.props.getOtherStatistics,
package/es/tabs/tab.js CHANGED
@@ -143,7 +143,7 @@ class DashBoardTab extends _react.Component {
143
143
  }, /*#__PURE__*/_react.default.createElement("i", {
144
144
  className: `${_statisticTabsModule.default['icon']} dtable-font dtable-icon-down3`
145
145
  }), isShowViewDropdown && /*#__PURE__*/_react.default.createElement(_ModalPortal2.default, null, /*#__PURE__*/_react.default.createElement("div", {
146
- className: `${theme === _constants.THEME_NAME_MAP.DARK ? 'statistic-tabs-dropdown-dark' : 'statistic-tabs-dropdown-light'} statistic-dropdown-menu dropdown-menu large show`,
146
+ className: `${theme === _constants.THEME_NAME_MAP.DARK ? 'statistic-dropdown-dark' : 'statistic-tabs-dropdown-light'} dtable-dropdown-menu dropdown-menu large show`,
147
147
  style: {
148
148
  ...dropdownMenuPosition,
149
149
  zIndex: 1500
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.3.46",
2
+ "version": "5.3.47-beta.2",
3
3
  "name": "dtable-statistic",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
@@ -7,6 +7,7 @@
7
7
  "private": false,
8
8
  "dependencies": {
9
9
  "@antv/util": "^3.3.2",
10
+ "classnames": "^2.5.1",
10
11
  "comlink": "^4.4.1",
11
12
  "dayjs": "1.10.7",
12
13
  "html2canvas": "^1.4.1",
@@ -15,7 +16,7 @@
15
16
  "react-grid-layout": "^1.2.5",
16
17
  "react-intl-universal": "^2.4.8",
17
18
  "reactstrap": "9.2.3",
18
- "sea-chart": "^1.1.129"
19
+ "sea-chart": "1.1.130-beta.2"
19
20
  },
20
21
  "peerDependencies": {
21
22
  "dtable-ui-component": "~6.0.*",