ns-base-module 1.0.27 → 1.0.28

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"AAeA,OAAO,KAKN,MAAM,OAAO,CAAC;AAEf,OAAO,4CAA4C,CAAC;AAapD,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,UAAU,MAAM;IACd,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ,EAAE,CAAC;QACjB,UAAU,EAAE,QAAQ,EAAE,CAAC;QACvB,aAAa,EAAE,QAAQ,EAAE,CAAC;QAC1B,SAAS,EAAE,QAAQ,EAAE,CAAC;KACvB,CAAC;CACH;;AA6kBD,wBAAiC"}
1
+ {"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,4CAA4C,CAAC;AAapD,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,UAAU,MAAM;IACd,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ,EAAE,CAAC;QACjB,UAAU,EAAE,QAAQ,EAAE,CAAC;QACvB,aAAa,EAAE,QAAQ,EAAE,CAAC;QAC1B,SAAS,EAAE,QAAQ,EAAE,CAAC;KACvB,CAAC;CACH;;AA4lBD,wBAAiC"}
@@ -16,10 +16,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
16
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  /* eslint-disable no-case-declarations */
18
18
  /* eslint-disable react/no-unknown-property */
19
- import { ArrowDownOutlined, ArrowUpOutlined, CalculatorOutlined, CalendarOutlined, DeleteOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined, SortAscendingOutlined } from "@ant-design/icons";
19
+ import { ArrowDownOutlined, ArrowUpOutlined, CalculatorOutlined, CalendarOutlined, DeleteOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined, SortAscendingOutlined, SortDescendingOutlined, SwapOutlined } from "@ant-design/icons";
20
20
  import { Dropdown, Input, Popover, Radio, Space, Tooltip } from "antd";
21
21
  import { find, get, isEmpty } from "lodash";
22
- import React, { forwardRef, useEffect, useImperativeHandle, useState } from "react";
22
+ import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
23
23
  import { ReactSortable } from "react-sortablejs";
24
24
  import "../../style/components/SubtotalsModal.scss";
25
25
  import IconFont from "../Icon";
@@ -111,7 +111,7 @@ var Index = function Index(props, ref) {
111
111
  numberList: numberList,
112
112
  dimensionList: dimensionList,
113
113
  quotaList: quotaList,
114
- chartColumns: chartColumns,
114
+ chartColumns: valueRadio === "cross" ? chartColumns : [],
115
115
  valueRadio: valueRadio,
116
116
  sumColPosition: sumColPosition,
117
117
  sumRow: sumRow
@@ -213,7 +213,12 @@ var Index = function Index(props, ref) {
213
213
  setSumColPosition(_sumColPosition);
214
214
  setSumRow(_sumRow);
215
215
  };
216
+ var refColumns = useRef();
216
217
  useEffect(function () {
218
+ if (JSON.stringify(props.columns) === refColumns.current) {
219
+ return;
220
+ }
221
+ refColumns.current = JSON.stringify(props.columns);
217
222
  initList();
218
223
  }, [props.columns, props.initConfig]);
219
224
 
@@ -327,6 +332,10 @@ var Index = function Index(props, ref) {
327
332
  value: item === null || item === void 0 ? void 0 : item.expression,
328
333
  onChange: function onChange(e) {
329
334
  return changeExpress(e, item);
335
+ },
336
+ style: {
337
+ width: 300,
338
+ height: 120
330
339
  }
331
340
  })
332
341
  }, /*#__PURE__*/React.createElement(CalculatorOutlined, {
@@ -372,12 +381,16 @@ var Index = function Index(props, ref) {
372
381
  title: initLang({
373
382
  id: "list.column.sort"
374
383
  })
375
- }, /*#__PURE__*/React.createElement(SortAscendingOutlined, {
384
+ }, /*#__PURE__*/React.createElement("span", {
376
385
  style: {
377
386
  cursor: "pointer",
378
387
  marginLeft: 6
379
388
  }
380
- }))), /*#__PURE__*/React.createElement(Tooltip, {
389
+ }, (item === null || item === void 0 ? void 0 : item.sort) === "asc" ? /*#__PURE__*/React.createElement(SortDescendingOutlined, null) : (item === null || item === void 0 ? void 0 : item.sort) === "desc" ? /*#__PURE__*/React.createElement(SortAscendingOutlined, null) : /*#__PURE__*/React.createElement(SwapOutlined, {
390
+ style: {
391
+ transform: "rotate(90deg)"
392
+ }
393
+ })))), /*#__PURE__*/React.createElement(Tooltip, {
381
394
  title: initLang({
382
395
  id: "button.delete"
383
396
  })