@chaoswise/business 0.0.17 → 1.0.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/config/babel/index.js +2 -29
- package/config/swc.js +5 -0
- package/lib/AggregateSearch/CLSPL/CLQLLexer.js +2 -2
- package/lib/AggregateSearch/CLSPL/CLQLParser.js +2 -2
- package/lib/AggregateSearch/CLSPL/CLQLParserListener.js +2 -2
- package/lib/AggregateSearch/CLSPL/CLQLParserVisitor.js +2 -2
- package/lib/AggregateSearch/CLSPL/SPLStagy.js +19 -9
- package/lib/AggregateSearch/CLSPL/index.js +4 -3
- package/lib/AggregateSearch/components/CloseAllIcon/index.js +1 -1
- package/lib/AggregateSearch/components/DropDown/config.js +54 -0
- package/lib/AggregateSearch/components/DropDown/index.js +33 -67
- package/lib/AggregateSearch/components/SwitchBtn/index.js +9 -7
- package/lib/AggregateSearch/hooks/useDropDown.js +2 -2
- package/lib/AggregateSearch/index.js +17 -5
- package/lib/AggregateSearch/index.less +1 -1
- package/lib/AggregateSearch/utils/index.js +3 -4
- package/lib/PropertyControlViewer/components/DoAppIcon/CustomIcon/index.js +1 -2
- package/lib/PropertyControlViewer/components/DoCiUnitBitmap.js +3 -3
- package/lib/PropertyControlViewer/components/DoCommon.js +3 -3
- package/lib/PropertyControlViewer/components/DoImage.js +2 -2
- package/lib/PropertyControlViewer/components/DoQuote/components/QuoteView.js +3 -3
- package/lib/PropertyControlViewer/components/DoSelect.js +3 -3
- package/lib/PropertyControlViewer/components/DoUser.js +15 -19
- package/lib/PropertyControlViewer/components/TagShowMoreList/index.js +4 -4
- package/lib/PropertyControlViewer/config/utils.js +60 -61
- package/lib/PropertyControlViewer/index.js +7 -6
- package/lib/Watermark/index.js +5 -7
- package/lib/locales/en_US.json +1 -0
- package/lib/locales/index.js +42 -0
- package/lib/locales/intl.js +75 -0
- package/lib/locales/withLocale.js +37 -0
- package/lib/locales/zh_CN.json +1 -0
- package/lib/locales/zh_TW.json +1 -0
- package/package.json +12 -7
- package/config/babel/antdComs.js +0 -51
- package/config/babel/formily.js +0 -22
- package/config/city/citys.js +0 -1964
- package/config/theme/CWTheme.js +0 -427
- package/config/theme/chart.dark.js +0 -394
- package/config/theme/chart.light.js +0 -3
- package/config/theme/common.less +0 -161
- package/config/theme/dark.js +0 -784
- package/config/theme/dark.less +0 -80
- package/config/theme/default.js +0 -717
- package/config/theme/default.less +0 -144
- package/config/theme/style/color/bezierEasing.less +0 -110
- package/config/theme/style/color/colorPalette.less +0 -85
- package/config/theme/style/color/colors.less +0 -162
- package/config/theme/style/color/tinyColor.less +0 -1184
- package/config/theme/style/compact.less +0 -4
- package/config/theme/style/components.less +0 -65
- package/config/theme/style/core/base.less +0 -10
- package/config/theme/style/core/global.less +0 -491
- package/config/theme/style/core/iconfont.less +0 -22
- package/config/theme/style/core/index.less +0 -5
- package/config/theme/style/core/motion/fade.less +0 -34
- package/config/theme/style/core/motion/move.less +0 -129
- package/config/theme/style/core/motion/other.less +0 -51
- package/config/theme/style/core/motion/slide.less +0 -129
- package/config/theme/style/core/motion/zoom.less +0 -179
- package/config/theme/style/core/motion.less +0 -22
- package/config/theme/style/css.js +0 -3
- package/config/theme/style/dark.less +0 -4
- package/config/theme/style/default.css +0 -1784
- package/config/theme/style/default.less +0 -4
- package/config/theme/style/index-pure.less +0 -2
- package/config/theme/style/index.css +0 -1784
- package/config/theme/style/index.d.ts +0 -1
- package/config/theme/style/index.js +0 -3
- package/config/theme/style/index.less +0 -3
- package/config/theme/style/mixins/box.less +0 -7
- package/config/theme/style/mixins/clearfix.less +0 -16
- package/config/theme/style/mixins/compatibility.less +0 -13
- package/config/theme/style/mixins/customize.less +0 -181
- package/config/theme/style/mixins/iconfont.less +0 -28
- package/config/theme/style/mixins/index.less +0 -14
- package/config/theme/style/mixins/modal-mask.less +0 -30
- package/config/theme/style/mixins/motion.less +0 -33
- package/config/theme/style/mixins/operation-unit.less +0 -16
- package/config/theme/style/mixins/reset.less +0 -11
- package/config/theme/style/mixins/rounded-arrow.less +0 -44
- package/config/theme/style/mixins/size.less +0 -10
- package/config/theme/style/mixins/typography.less +0 -58
- package/config/theme/style/themes/compact.less +0 -295
- package/config/theme/style/themes/dark.less +0 -457
- package/config/theme/style/themes/default.less +0 -1080
- package/config/theme/style/themes/index.less +0 -7
- package/config/theme/style/themes/variable.less +0 -1135
- package/config/theme/style/variable.less +0 -4
|
@@ -6,8 +6,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
6
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
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; }
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
11
|
import makeTokenizeFn from "../CLSPL/makeTokenizeFn";
|
|
12
12
|
import MyGrammarLexer from "../CLSPL/CLQLLexer.js";
|
|
13
13
|
import { TOKEN_TYPES } from "../CLSPL/token";
|
|
@@ -55,7 +55,6 @@ export var parseStringToToken = function parseStringToToken(value) {
|
|
|
55
55
|
// 关键字 NOT
|
|
56
56
|
[MyGrammarLexer.K_TO, TOKEN_TYPES.KEYWORD] // 关键字 TO
|
|
57
57
|
]);
|
|
58
|
-
|
|
59
58
|
var tokenize = makeTokenizeFn(MyGrammarLexer, TOKEN_MAPPING);
|
|
60
59
|
return tokenize(value);
|
|
61
60
|
};
|
|
@@ -173,7 +172,7 @@ export var genHtmlAndSyntaxCheckResByString = function genHtmlAndSyntaxCheckResB
|
|
|
173
172
|
}), TOKEN_TYPES.KEYWORD, {
|
|
174
173
|
tagName: "span",
|
|
175
174
|
props: {
|
|
176
|
-
"class": genClassName(text === "AND" || text === "OR" ? "tag-con-keyword tag-con-keyword_AND_OR" : "tag-con-keyword"),
|
|
175
|
+
"class": genClassName(text.toUpperCase() === "AND" || text.toUpperCase() === "OR" ? "tag-con-keyword tag-con-keyword_AND_OR" : "tag-con-keyword"),
|
|
177
176
|
"data-attr": "keyword",
|
|
178
177
|
"data-type": dataType
|
|
179
178
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
1
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
2
2
|
var _excluded = ["type"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
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; }
|
|
@@ -23,7 +23,6 @@ var CustomIcon = function CustomIcon(_ref) {
|
|
|
23
23
|
CustomIcon.propTypes = {
|
|
24
24
|
type: PropTypes.string.isRequired // icon类型
|
|
25
25
|
};
|
|
26
|
-
|
|
27
26
|
CustomIcon.defaultProps = {
|
|
28
27
|
theme: "filled"
|
|
29
28
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _Popover from "@chaoswise/ui/lib/
|
|
1
|
+
import _Popover from "@chaoswise/ui/lib/Popover";
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
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; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
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); }
|
|
6
6
|
import React, { useMemo, useState, useEffect, Fragment } from 'react';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import DoAppIcon from './DoAppIcon';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
3
|
-
import _Typography from "@chaoswise/ui/lib/
|
|
3
|
+
import _Typography from "@chaoswise/ui/lib/Typography";
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
7
|
import React, { Fragment } from "react";
|
|
8
8
|
var Paragraph = _Typography.Paragraph;
|
|
9
9
|
var DoCommon = function DoCommon(_ref) {
|
|
@@ -6,8 +6,8 @@ import _Upload from "antd/es/upload";
|
|
|
6
6
|
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; }
|
|
7
7
|
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) { _defineProperty(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; }
|
|
8
8
|
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; }
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
11
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
12
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
13
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _List from "@chaoswise/ui/lib/
|
|
1
|
+
import _List from "@chaoswise/ui/lib/List";
|
|
2
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
3
|
-
import _Avatar from "@chaoswise/ui/lib/
|
|
4
|
-
import _Card from "@chaoswise/ui/lib/
|
|
3
|
+
import _Avatar from "@chaoswise/ui/lib/Avatar";
|
|
4
|
+
import _Card from "@chaoswise/ui/lib/Card";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import DoAppIcon from '../../DoAppIcon';
|
|
7
7
|
import '../../../assets/index.less';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Popover from "@chaoswise/ui/lib/
|
|
1
|
+
import _Popover from "@chaoswise/ui/lib/Popover";
|
|
2
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
3
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -10,8 +10,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
10
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
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) { _defineProperty(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
12
|
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; }
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
+
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); }
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import '../assets/doSelect.less';
|
|
17
17
|
import { isLightColorFunc } from '../config/utils';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
2
|
-
import _Avatar from "@chaoswise/ui/lib/
|
|
3
|
-
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
2
|
+
import _Avatar from "@chaoswise/ui/lib/Avatar";
|
|
4
3
|
import React, { Fragment } from 'react';
|
|
5
4
|
import '../assets/index.less';
|
|
6
5
|
import TagShowMoreList from './TagShowMoreList';
|
|
7
|
-
import {
|
|
6
|
+
import { useIntl } from '../../locales';
|
|
8
7
|
var DoUser = function DoUser(_ref) {
|
|
9
8
|
var data = _ref.data;
|
|
10
9
|
var belongComponentType = data.belongComponentType,
|
|
@@ -12,30 +11,27 @@ var DoUser = function DoUser(_ref) {
|
|
|
12
11
|
tooltipContent = data.tooltipContent,
|
|
13
12
|
list = data.list,
|
|
14
13
|
componentType = data.componentType;
|
|
15
|
-
var
|
|
16
|
-
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
17
|
-
locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
|
|
18
|
-
var localeObj = getLocale(locale);
|
|
14
|
+
var intl = useIntl();
|
|
19
15
|
var userTooltip = {
|
|
20
|
-
userName:
|
|
21
|
-
userAlias:
|
|
22
|
-
department:
|
|
23
|
-
email:
|
|
24
|
-
mobile:
|
|
16
|
+
userName: intl.get('5b412c79-b099-47cd-8745-21264d9212c4').d('姓名') + ':',
|
|
17
|
+
userAlias: intl.get('43395ce9-35f2-4a6d-9e84-8c277369157b').d('用户名') + ':',
|
|
18
|
+
department: intl.get('3190d9a0-41bf-42b3-adf9-9d22a337f65d').d('部门') + ':',
|
|
19
|
+
email: intl.get('e28ef3cf-569c-49f8-99b3-533e5013cb9d').d('邮箱') + ':',
|
|
20
|
+
mobile: intl.get('905a2fe5-4c8a-467e-813a-963fdb268b10').d('手机') + ':'
|
|
25
21
|
};
|
|
26
22
|
var userGroupTooltip = {
|
|
27
|
-
groupName:
|
|
28
|
-
groupDetails:
|
|
23
|
+
groupName: intl.get('bc71d288-1654-454d-8639-5ed225d8d6f6').d('用户组') + ':',
|
|
24
|
+
groupDetails: intl.get('e94234be-e478-4314-bc85-572cc285f5f9').d('描述') + ':'
|
|
29
25
|
};
|
|
30
|
-
tooltipContent = componentType ===
|
|
31
|
-
var gridShare = belongComponentType ===
|
|
26
|
+
tooltipContent = componentType === 'USER_GROUP' ? userGroupTooltip : userTooltip;
|
|
27
|
+
var gridShare = belongComponentType === 'TABLE' ? '100%' : fieldWidth == 'WHOLE_LINE' ? '25%' : '50%';
|
|
32
28
|
var tooltipContentFuc = function tooltipContentFuc(item) {
|
|
33
29
|
return Object.keys(tooltipContent).map(function (key) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, tooltipContent[key], " ", item[key] ||
|
|
30
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, tooltipContent[key], " ", item[key] || '', ' '), /*#__PURE__*/React.createElement("br", null));
|
|
35
31
|
});
|
|
36
32
|
};
|
|
37
|
-
var nameKey = componentType ===
|
|
38
|
-
return /*#__PURE__*/React.createElement(Fragment, null, belongComponentType ===
|
|
33
|
+
var nameKey = componentType === 'USER_GROUP' ? 'groupName' : 'userAlias';
|
|
34
|
+
return /*#__PURE__*/React.createElement(Fragment, null, belongComponentType === 'TABLE' ? /*#__PURE__*/React.createElement(TagShowMoreList, {
|
|
39
35
|
text: list,
|
|
40
36
|
tagCount: 1,
|
|
41
37
|
flag: "user",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _Popover from "@chaoswise/ui/lib/
|
|
1
|
+
import _Popover from "@chaoswise/ui/lib/Popover";
|
|
2
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
3
|
-
import _Avatar from "@chaoswise/ui/lib/
|
|
3
|
+
import _Avatar from "@chaoswise/ui/lib/Avatar";
|
|
4
4
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -11,8 +11,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; }
|
|
12
12
|
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) { _defineProperty(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; }
|
|
13
13
|
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; }
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
|
+
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); }
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import './index.less';
|
|
18
18
|
import classnames from 'classnames';
|
|
@@ -2,12 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
7
|
import moment from 'moment';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { ATTR_DES_ENUM, DATE_FORMATE_ENUM } from './constants';
|
|
10
|
-
import
|
|
10
|
+
import intl from '../../locales';
|
|
11
11
|
|
|
12
12
|
//根据属性类型获取对应的组件
|
|
13
13
|
export var getDescriptionComp = function getDescriptionComp(type) {
|
|
@@ -92,48 +92,48 @@ export var guidFunc = function guidFunc() {
|
|
|
92
92
|
export var judgmentTypeFunc = function judgmentTypeFunc(type, value) {
|
|
93
93
|
var judgmentType = true; // 判断返回的value类型
|
|
94
94
|
switch (type) {
|
|
95
|
-
case
|
|
95
|
+
case 'INPUT':
|
|
96
96
|
break;
|
|
97
|
-
case
|
|
97
|
+
case 'SELECT':
|
|
98
98
|
break;
|
|
99
|
-
case
|
|
99
|
+
case 'TEXTAREA':
|
|
100
100
|
break;
|
|
101
|
-
case
|
|
101
|
+
case 'NUMBER':
|
|
102
102
|
break;
|
|
103
|
-
case
|
|
103
|
+
case 'UID':
|
|
104
104
|
break;
|
|
105
|
-
case
|
|
105
|
+
case 'AUTO_CALCULATE':
|
|
106
106
|
break;
|
|
107
|
-
case
|
|
108
|
-
judgmentType = typeof value ===
|
|
107
|
+
case 'DATE':
|
|
108
|
+
judgmentType = typeof value === 'string' || typeof value === 'number';
|
|
109
109
|
break;
|
|
110
|
-
case
|
|
111
|
-
judgmentType = typeof value ===
|
|
110
|
+
case 'RADIO':
|
|
111
|
+
judgmentType = typeof value === 'string';
|
|
112
112
|
break;
|
|
113
|
-
case
|
|
113
|
+
case 'CHECKBOX':
|
|
114
114
|
break;
|
|
115
|
-
case
|
|
115
|
+
case 'NUMBER_RANGE':
|
|
116
116
|
break;
|
|
117
|
-
case
|
|
117
|
+
case 'RACK_UNIT':
|
|
118
118
|
break;
|
|
119
|
-
case
|
|
119
|
+
case 'USER':
|
|
120
120
|
break;
|
|
121
|
-
case
|
|
121
|
+
case 'USER_GROUP':
|
|
122
122
|
break;
|
|
123
|
-
case
|
|
123
|
+
case 'QUOTE':
|
|
124
124
|
break;
|
|
125
|
-
case
|
|
125
|
+
case 'IMAGE':
|
|
126
126
|
break;
|
|
127
|
-
case
|
|
127
|
+
case 'FILE':
|
|
128
128
|
break;
|
|
129
|
-
case
|
|
129
|
+
case 'TABLE':
|
|
130
130
|
judgmentType = Array.isArray(value) && (value === null || value === void 0 ? void 0 : value.length) > 0;
|
|
131
131
|
break;
|
|
132
|
-
case
|
|
133
|
-
judgmentType = typeof value ===
|
|
132
|
+
case 'SWITCH':
|
|
133
|
+
judgmentType = typeof value === 'boolean' || typeof value === 'string';
|
|
134
134
|
break;
|
|
135
|
-
case
|
|
136
|
-
judgmentType = Object.prototype.toString.call(value) ===
|
|
135
|
+
case 'UNIT_BITMAP':
|
|
136
|
+
judgmentType = Object.prototype.toString.call(value) === '[object Object]';
|
|
137
137
|
break;
|
|
138
138
|
default:
|
|
139
139
|
judgmentType = true;
|
|
@@ -160,28 +160,28 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
160
160
|
var data = {};
|
|
161
161
|
try {
|
|
162
162
|
switch (componentType) {
|
|
163
|
-
case
|
|
164
|
-
case
|
|
163
|
+
case 'INPUT':
|
|
164
|
+
case 'TEXTAREA':
|
|
165
165
|
data = {
|
|
166
166
|
paragraphEllipsis: paragraphEllipsis || {
|
|
167
167
|
rows: 5,
|
|
168
168
|
expandable: true
|
|
169
169
|
},
|
|
170
170
|
list: [{
|
|
171
|
-
value: unit ? value +
|
|
171
|
+
value: unit ? value + ' ' + unit : value
|
|
172
172
|
}]
|
|
173
173
|
};
|
|
174
174
|
break;
|
|
175
|
-
case
|
|
176
|
-
case
|
|
177
|
-
case
|
|
175
|
+
case 'NUMBER':
|
|
176
|
+
case 'UID':
|
|
177
|
+
case 'AUTO_CALCULATE':
|
|
178
178
|
data = {
|
|
179
179
|
list: [{
|
|
180
|
-
value: !(value === undefined || value === null || value === '') ? unit ? value +
|
|
180
|
+
value: !(value === undefined || value === null || value === '') ? unit ? value + ' ' + unit : value : '-'
|
|
181
181
|
}]
|
|
182
182
|
};
|
|
183
183
|
break;
|
|
184
|
-
case
|
|
184
|
+
case 'RADIO':
|
|
185
185
|
data = {
|
|
186
186
|
tagCount: 1,
|
|
187
187
|
list: (enumList || []).filter(function (i) {
|
|
@@ -195,9 +195,9 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
195
195
|
})
|
|
196
196
|
};
|
|
197
197
|
break;
|
|
198
|
-
case
|
|
198
|
+
case 'SELECT':
|
|
199
199
|
data = {
|
|
200
|
-
tagCount: belongComponentType ===
|
|
200
|
+
tagCount: belongComponentType === 'TABLE' ? 1 : tagCount ? tagCount : 10000,
|
|
201
201
|
list: (enumList || []).filter(function (i) {
|
|
202
202
|
return value === null || value === void 0 ? void 0 : value.includes(i === null || i === void 0 ? void 0 : i.itemCode);
|
|
203
203
|
}).map(function (m) {
|
|
@@ -209,7 +209,7 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
209
209
|
})
|
|
210
210
|
};
|
|
211
211
|
break;
|
|
212
|
-
case
|
|
212
|
+
case 'CHECKBOX':
|
|
213
213
|
data = {
|
|
214
214
|
tagCount: tagCount || 10000,
|
|
215
215
|
list: (enumList || []).filter(function (i) {
|
|
@@ -223,29 +223,29 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
223
223
|
})
|
|
224
224
|
};
|
|
225
225
|
break;
|
|
226
|
-
case
|
|
226
|
+
case 'SWITCH':
|
|
227
227
|
var _value = String(value).toLowerCase();
|
|
228
228
|
data = {
|
|
229
229
|
list: [{
|
|
230
|
-
value: _value ==
|
|
230
|
+
value: _value == 'true' || _value === '1' ? onValue : offValue
|
|
231
231
|
}]
|
|
232
232
|
};
|
|
233
233
|
break;
|
|
234
|
-
case
|
|
234
|
+
case 'NUMBER_RANGE':
|
|
235
235
|
data = {
|
|
236
236
|
list: [{
|
|
237
|
-
value: value ? unit ? (value === null || value === void 0 ? void 0 : value.join(
|
|
237
|
+
value: value ? unit ? (value === null || value === void 0 ? void 0 : value.join(' - ')) + ' ' + unit : value === null || value === void 0 ? void 0 : value.join(' - ') : '-'
|
|
238
238
|
}]
|
|
239
239
|
};
|
|
240
240
|
break;
|
|
241
|
-
case
|
|
241
|
+
case 'RACK_UNIT':
|
|
242
242
|
data = {
|
|
243
243
|
list: [{
|
|
244
|
-
value: (value === null || value === void 0 ? void 0 : value.join(
|
|
244
|
+
value: (value === null || value === void 0 ? void 0 : value.join(' - ')) || []
|
|
245
245
|
}]
|
|
246
246
|
};
|
|
247
247
|
break;
|
|
248
|
-
case
|
|
248
|
+
case 'DATE':
|
|
249
249
|
var dataFormatString = DATE_FORMATE_ENUM[dateFormat] || 'YYYY-MM-DD HH:mm:ss';
|
|
250
250
|
data = {
|
|
251
251
|
list: [{
|
|
@@ -253,13 +253,13 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
253
253
|
}]
|
|
254
254
|
};
|
|
255
255
|
break;
|
|
256
|
-
case
|
|
256
|
+
case 'USER':
|
|
257
257
|
var userTooltip = {
|
|
258
|
-
userName:
|
|
259
|
-
userAlias:
|
|
260
|
-
department:
|
|
261
|
-
email:
|
|
262
|
-
mobile:
|
|
258
|
+
userName: intl.get('cfbba0e5-b133-4bd7-9b8c-3c92368fe049').d('姓名:'),
|
|
259
|
+
userAlias: intl.get('b59f74be-dff0-4e3e-92db-354b475c3efd').d('用户名:'),
|
|
260
|
+
department: intl.get('79279aa4-ad27-4082-8093-06122d68c611').d('部门:'),
|
|
261
|
+
email: intl.get('88d7ad39-7f49-459f-a1fd-48dd4c0ff9d5').d('邮箱:'),
|
|
262
|
+
mobile: intl.get('db3f4bef-089e-4144-861d-29f79fa4cd38').d('手机:')
|
|
263
263
|
};
|
|
264
264
|
data = {
|
|
265
265
|
fieldWidth: fieldWidth,
|
|
@@ -267,17 +267,16 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
267
267
|
belongComponentType: belongComponentType,
|
|
268
268
|
componentType: componentType,
|
|
269
269
|
list: (value ? Array.isArray(value) ? value : [value] : []).map(function (i) {
|
|
270
|
-
console.log(i, 'oooo');
|
|
271
270
|
i.id = i === null || i === void 0 ? void 0 : i.userId;
|
|
272
271
|
i.name = i === null || i === void 0 ? void 0 : i.userName;
|
|
273
272
|
return i;
|
|
274
273
|
})
|
|
275
274
|
};
|
|
276
275
|
break;
|
|
277
|
-
case
|
|
276
|
+
case 'USER_GROUP':
|
|
278
277
|
var userGroupTooltip = {
|
|
279
|
-
groupName:
|
|
280
|
-
groupDetails:
|
|
278
|
+
groupName: intl.get('0ee18787-448b-4f7b-a3f2-5067a38c9a26').d('用户组:'),
|
|
279
|
+
groupDetails: intl.get('f307bd91-6737-4667-9e89-daec35b21198').d('描述:')
|
|
281
280
|
};
|
|
282
281
|
data = {
|
|
283
282
|
fieldWidth: fieldWidth,
|
|
@@ -291,7 +290,7 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
291
290
|
})
|
|
292
291
|
};
|
|
293
292
|
break;
|
|
294
|
-
case
|
|
293
|
+
case 'QUOTE':
|
|
295
294
|
data = {
|
|
296
295
|
fieldWidth: fieldWidth,
|
|
297
296
|
attrSource: rest === null || rest === void 0 ? void 0 : rest.attrSource,
|
|
@@ -299,9 +298,9 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
299
298
|
list: value || []
|
|
300
299
|
};
|
|
301
300
|
break;
|
|
302
|
-
case
|
|
301
|
+
case 'IMAGE':
|
|
303
302
|
data = {
|
|
304
|
-
type:
|
|
303
|
+
type: 'image',
|
|
305
304
|
list: (value || []).map(function (i) {
|
|
306
305
|
return {
|
|
307
306
|
uid: i.id,
|
|
@@ -312,9 +311,9 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
312
311
|
})
|
|
313
312
|
};
|
|
314
313
|
break;
|
|
315
|
-
case
|
|
314
|
+
case 'FILE':
|
|
316
315
|
data = {
|
|
317
|
-
type:
|
|
316
|
+
type: 'file',
|
|
318
317
|
list: (value || []).map(function (i) {
|
|
319
318
|
return {
|
|
320
319
|
uid: i.id,
|
|
@@ -325,13 +324,13 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
325
324
|
})
|
|
326
325
|
};
|
|
327
326
|
break;
|
|
328
|
-
case
|
|
327
|
+
case 'UNIT_BITMAP':
|
|
329
328
|
data = {
|
|
330
329
|
list: (value === null || value === void 0 ? void 0 : value.units) || [],
|
|
331
330
|
handleClickChange: handleClickChange
|
|
332
331
|
};
|
|
333
332
|
break;
|
|
334
|
-
case
|
|
333
|
+
case 'TABLE':
|
|
335
334
|
data = {
|
|
336
335
|
properties: properties,
|
|
337
336
|
handleClickChange: handleClickChange,
|
|
@@ -6,26 +6,27 @@ var _excluded = ["schemaData", "detailContent"],
|
|
|
6
6
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
|
-
import { intl } from '@chaoswise/intl';
|
|
10
9
|
import React, { useState, useEffect, useMemo, memo } from 'react';
|
|
11
|
-
import { getDescriptionComp, getDataFunc, judgmentTypeFunc } from
|
|
10
|
+
import { getDescriptionComp, getDataFunc, judgmentTypeFunc } from './config/utils';
|
|
11
|
+
import { useIntl } from '../locales';
|
|
12
12
|
import './index.less';
|
|
13
13
|
var Panel = _Collapse.Panel;
|
|
14
14
|
var compositeAttr = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
UNIT_RANGE: 1,
|
|
16
|
+
UNIT_SELECT: 1
|
|
17
17
|
};
|
|
18
18
|
var setWidthClassName = {
|
|
19
|
-
|
|
19
|
+
TABLE: 1
|
|
20
20
|
};
|
|
21
21
|
var PropertyControlViewer = function PropertyControlViewer(_ref) {
|
|
22
22
|
var schemaData = _ref.schemaData,
|
|
23
23
|
detailContent = _ref.detailContent,
|
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
var intl = useIntl();
|
|
25
26
|
var comList = useMemo(function () {
|
|
26
27
|
if (schemaData && schemaData.length > 0) {
|
|
27
28
|
return schemaData.map(function (i, index) {
|
|
28
|
-
if (i.componentType ===
|
|
29
|
+
if (i.componentType === 'ATTRIBUTE_GROUP') {
|
|
29
30
|
return /*#__PURE__*/React.createElement(_Collapse, {
|
|
30
31
|
key: i.attrID,
|
|
31
32
|
style: {
|
package/lib/Watermark/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _Watermark from "@chaoswise/ui/lib/Watermark";
|
|
2
|
-
import _message from "@chaoswise/ui/lib/message";
|
|
3
2
|
var _excluded = ["type", "fetchWatermark", "densityConfig", "children"];
|
|
4
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -15,9 +14,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
15
14
|
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; }
|
|
16
15
|
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; }
|
|
17
16
|
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; }
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
20
|
-
import React, { useEffect, useState, useRef, useCallback
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
|
+
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); }
|
|
19
|
+
import React, { useEffect, useState, useRef, useCallback } from "react";
|
|
21
20
|
import PropTypes from "prop-types";
|
|
22
21
|
import moment from "moment";
|
|
23
22
|
import "./index.less";
|
|
@@ -51,10 +50,10 @@ var WatermarkCom = function WatermarkCom(_ref) {
|
|
|
51
50
|
if (res && res.code === 100000) {
|
|
52
51
|
return res.data;
|
|
53
52
|
} else {
|
|
54
|
-
|
|
53
|
+
console.error(res);
|
|
55
54
|
}
|
|
56
55
|
})["catch"](function (error) {
|
|
57
|
-
|
|
56
|
+
console.error(error);
|
|
58
57
|
}));
|
|
59
58
|
case 1:
|
|
60
59
|
case "end":
|
|
@@ -184,5 +183,4 @@ WatermarkCom.propTypes = {
|
|
|
184
183
|
*/
|
|
185
184
|
// densityConfig: PropTypes.object,
|
|
186
185
|
};
|
|
187
|
-
|
|
188
186
|
export default WatermarkCom;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"0ee18787-448b-4f7b-a3f2-5067a38c9a26":"User group:","15444b85-9196-4bb6-97bd-eb5cd4186cb9":"search criteria copied","1cd159c8-2a4d-4208-a170-55a34b91f671":"No data available. Please submit the search to search for keywords.","1e9cc6b2-f761-4aaa-a216-9f842c6f8fce":"Switch to filter mode","229e8f35-ce6c-403a-b52e-05346dd8eb0b":"wildcard: *?","2bf0d704-4106-4359-8488-d0e395f37d34":"Missing {slot1} after {slot0}","2e8bd2b4-57bf-4778-a254-3b577d0241c5":"combination symbols","30a2737a-c786-4f9f-bb22-02ca27a557ff":"End","3190d9a0-41bf-42b3-adf9-9d22a337f65d":"Department","324f8bc5-e6dc-46b5-a18b-8c4e55c7352e":"Group","3431b29b-5fb7-411f-8a1d-8d7676b03264":"Help","354fbc6d-1abb-4510-81a9-9aa2efa6f482":"search history","3f52c2a1-892d-47fe-b296-49a35ff8c4ee":"Syntax error","43395ce9-35f2-4a6d-9e84-8c277369157b":"Username:","4412a02d-d11d-4231-bf91-fd65afd9ea77":"tag search","47e5459f-882c-4395-a8f1-d49e89b0a263":"is not","48b09da1-28bf-497d-a327-0ad6e3ef9af1":"bracket","4ced2ca1-2a3f-49d9-9907-1b404d5a1586":"There is <unknown input>","51b43939-ce6a-4a41-9038-832b8ab4a175":"Loading...","5b412c79-b099-47cd-8745-21264d9212c4":"Name","5faa90fc-6455-499a-a0d5-c7ff9c9867df":"Switch to manual CQL syntax mode","7058c2d9-91f3-4fe6-8a38-2c145a627959":"Less than","719234f9-de71-4fc6-ab3f-59287ff20570":"Greater than","79279aa4-ad27-4082-8093-06122d68c611":"Department:","88d7ad39-7f49-459f-a1fd-48dd4c0ff9d5":"Email:","8b3465a5-e2ca-4f7c-af17-2cb091ef40fe":"{slot0} followed by the expectation {slot1}","905a2fe5-4c8a-467e-813a-963fdb268b10":"Phone","914a6df4-9561-4345-a98c-0559e3f787ff":"Less than or equal to","94f38306-0e2c-4d1c-beff-64d14bd7da20":"Unnecessary input of {tokenName}, expecting {slot0}","b2df07f1-b093-4f56-9ec2-af471999634d":"Location","b59f74be-dff0-4e3e-92db-354b475c3efd":"Username:","bc71d288-1654-454d-8639-5ed225d8d6f6":"User group","bdfe4b04-efd7-4f93-a6ba-3954aca3b0eb":"numeric range","be953f09-653f-4715-a3b9-9e0faef199b3":"full-text search: hello world","cfbba0e5-b133-4bd7-9b8c-3c92368fe049":"Name:","d6f72140-92e1-4214-8bcb-d548fa8ed1ce":"Incomplete statement, missing end","db3f4bef-089e-4144-861d-29f79fa4cd38":"Phone:","df7b8ec5-840a-4fc7-aa8c-806d470ec97c":"is","e28ef3cf-569c-49f8-99b3-533e5013cb9d":"Email ","e633ed68-a12e-4af5-9a7a-d2eb476f4cef":"Greater than or equal to","e7413527-a5ee-4057-b765-3595cd26c09b":"related search: status:(error OR warning) AND NOT service:\"service_a\"","e94234be-e478-4314-bc85-572cc285f5f9":"Description","f2447d25-e81c-4656-9e4c-f66741dd8a52":"matching mode","f307bd91-6737-4667-9e89-daec35b21198":"Description:","fbda5bcb-67b0-4b7c-85fd-fb30068f73a0":"Field name","fc7ca498-ab95-4a4b-9f5f-0d024cc127c3":"The component is not registered yet","ff777cfe-21b4-4eb0-bf80-ebd92081fdf5":"exact match: \"hello world\""}
|