@zgfe/business-lib 1.1.29-visual.8 → 1.1.29
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/es/addToPanel/components/addPanel.js +21 -8
- package/es/addToPanel/components/radioGroup.js +3 -1
- package/es/addToPanel/components/styleList.js +22 -5
- package/es/addToPanel/demo/edit.js +12 -5
- package/es/addToPanel/demo/index.js +12 -5
- package/es/addToPanel/index.js +58 -21
- package/es/addToScene/addGroup.js +4 -0
- package/es/addToScene/demo/index.js +12 -5
- package/es/addToScene/index.js +40 -13
- package/es/assets/demo/index.js +2 -0
- package/es/assets/demo/input.js +12 -5
- package/es/assets/iconfont/iconfont.js +17 -10
- package/es/assets/theme.js +1 -0
- package/es/attrConditions/components/operateList.js +27 -10
- package/es/attrConditions/components/stringList.js +97 -68
- package/es/attrConditions/components/valuesList.js +40 -14
- package/es/attrConditions/demo/group.js +23 -11
- package/es/attrConditions/demo/index.js +26 -17
- package/es/attrConditions/group.js +48 -17
- package/es/attrConditions/index.js +49 -22
- package/es/attrConditions/types.js +1 -0
- package/es/attributeSelector/demo/disable.js +16 -8
- package/es/attributeSelector/demo/index.js +17 -8
- package/es/attributeSelector/index.js +45 -22
- package/es/attributeSelector/listPanel.js +46 -18
- package/es/attributeSelector/option.js +13 -3
- package/es/attributeSelector/types.js +5 -0
- package/es/attributeSelector/util.js +3 -0
- package/es/chart/demo/index.js +14 -5
- package/es/chart/index.js +44 -30
- package/es/chart/util/chartOptionConfig.d.ts +3 -3
- package/es/chart/util/chartOptionConfig.js +37 -13
- package/es/chart/util/data/china.js +4 -1
- package/es/chart/util/formatData.d.ts +2 -2
- package/es/chart/util/formatData.js +5 -0
- package/es/chart/util/formatOption.js +13 -0
- package/es/chart/util/mapUtil.js +26 -5
- package/es/config.js +2 -0
- package/es/constants/apis.d.ts +0 -1
- package/es/constants/apis.js +1 -2
- package/es/cycleTime/demo/disable.js +1 -0
- package/es/cycleTime/index.js +46 -19
- package/es/cycleTime/month.js +27 -8
- package/es/datePicker/datePicker.js +23 -5
- package/es/datePicker/demo/customType.js +22 -13
- package/es/datePicker/demo/day.js +22 -13
- package/es/datePicker/demo/index.js +21 -12
- package/es/datePicker/index.js +41 -18
- package/es/datePicker/utils.js +7 -0
- package/es/demoWrapper/content.d.ts +1 -2
- package/es/demoWrapper/content.js +64 -42
- package/es/demoWrapper/demo/index.js +4 -5
- package/es/demoWrapper/head.d.ts +1 -3
- package/es/demoWrapper/head.js +27 -25
- package/es/demoWrapper/index.js +36 -28
- package/es/dialog/demo/index.js +12 -5
- package/es/dialog/index.js +6 -4
- package/es/dnd/demo/data.js +28 -19
- package/es/dnd/demo/handle.js +28 -19
- package/es/dnd/index.js +45 -21
- package/es/dnd/item.js +30 -10
- package/es/eventSelector/demo/index.js +23 -12
- package/es/eventSelector/index.js +42 -14
- package/es/eventSelector/listPanel.js +73 -31
- package/es/eventSelector/option.js +11 -6
- package/es/icon/iconFont.js +13 -7
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/layout/analysisLayout/demo/index.js +6 -0
- package/es/layout/analysisLayout/index.d.ts +1 -1
- package/es/layout/analysisLayout/index.js +34 -16
- package/es/layout/detail/index.js +3 -1
- package/es/loginForm/index.js +18 -7
- package/es/searchInput/index.js +7 -2
- package/es/select/demo/children.js +16 -8
- package/es/select/demo/customLabel.js +2 -0
- package/es/select/demo/group.js +17 -8
- package/es/select/demo/index.js +19 -11
- package/es/select/demo/loading.js +18 -8
- package/es/select/demo/multiple.js +16 -8
- package/es/select/handle.js +34 -14
- package/es/select/index.js +59 -22
- package/es/select/option.js +30 -10
- package/es/select/overlay.js +62 -25
- package/es/table/demo/data/table.js +2 -0
- package/es/table/demo/index.js +39 -13
- package/es/table/demo/index2.js +15 -5
- package/es/table/demo/index3.js +28 -7
- package/es/table/index.js +33 -14
- package/es/targetConditionGroup/components/targetDimension.js +38 -12
- package/es/targetConditionGroup/demo/group.js +36 -21
- package/es/targetConditionGroup/demo/index.js +13 -5
- package/es/targetConditionGroup/index.js +84 -31
- package/es/targetSelector/demo/index.js +28 -15
- package/es/targetSelector/editBox.js +20 -5
- package/es/targetSelector/index.js +36 -15
- package/es/targetSelector/optionIcon.js +5 -1
- package/es/targetSelector/optionMenu.js +3 -0
- package/es/userCondition/conditionTypeList.js +12 -7
- package/es/userCondition/conditionWrap.js +2 -0
- package/es/userCondition/conditions/cdpCondition.js +97 -51
- package/es/userCondition/conditions/eventCondition.js +16 -6
- package/es/userCondition/conditions/periodCondition.js +26 -8
- package/es/userCondition/conditions/propCondition.js +61 -29
- package/es/userCondition/conditions/runTimesCondition.js +10 -5
- package/es/userCondition/conditions/tagsCondition.d.ts +1 -1
- package/es/userCondition/conditions/tagsCondition.js +33 -15
- package/es/userCondition/conditions/textDesc.js +67 -16
- package/es/userCondition/demo/index.js +21 -11
- package/es/userCondition/index.js +91 -51
- package/es/userCondition/orConditions.js +48 -11
- package/es/userCondition/relationLabel.js +4 -1
- package/es/userCondition/types.d.ts +1 -1
- package/es/userCondition/types.js +1 -0
- package/es/userCondition/util.js +13 -4
- package/es/userGroup/demo/group.js +23 -14
- package/es/userGroup/demo/index.js +15 -5
- package/es/userGroup/index.js +30 -12
- package/es/userTagsSelector/cascaderOverlay.js +51 -19
- package/es/userTagsSelector/components/search/index.js +2 -0
- package/es/userTagsSelector/demo/index.js +3 -0
- package/es/userTagsSelector/groups/groupOption.js +8 -6
- package/es/userTagsSelector/groups/index.js +30 -15
- package/es/userTagsSelector/index.js +35 -17
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +6 -3
- package/es/userTagsSelector/multipleCheckPanel/index.js +21 -8
- package/es/userTagsSelector/util.js +2 -0
- package/es/utils/ajax.js +71 -45
- package/es/utils/base64.js +22 -3
- package/es/utils/type.d.ts +1 -1
- package/es/utils/type.js +7 -4
- package/es/utils/util.js +16 -0
- package/package.json +2 -2
- package/es/socket/demo/demo.d.ts +0 -2
- package/es/socket/demo/demo.js +0 -139
- package/es/socket/demo/index.less +0 -27
- package/es/socket/index.d.ts +0 -31
- package/es/socket/index.js +0 -284
- package/es/socket/types.d.ts +0 -37
- package/es/socket/types.js +0 -26
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
1
|
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); } }
|
|
2
|
+
|
|
4
3
|
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); }); }; }
|
|
4
|
+
|
|
5
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
|
|
6
7
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
|
|
7
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
+
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
+
|
|
10
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
|
|
11
17
|
import React, { useContext, useEffect, useState } from 'react';
|
|
12
18
|
import { classPrefix } from '..';
|
|
13
19
|
import Apis from '../../constants/apis';
|
|
@@ -15,30 +21,38 @@ import BizGlobalDataContext from '../../context';
|
|
|
15
21
|
import BizSelect from '../../select';
|
|
16
22
|
import request from '../../utils/ajax';
|
|
17
23
|
import { OperateTypes } from '../types';
|
|
24
|
+
|
|
18
25
|
var StringList = function StringList(props) {
|
|
19
26
|
var _props$attr;
|
|
27
|
+
|
|
20
28
|
var _useContext = useContext(BizGlobalDataContext),
|
|
21
|
-
|
|
29
|
+
currentApp = _useContext.currentApp;
|
|
30
|
+
|
|
22
31
|
var _useState = useState(),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
current = _useState2[0],
|
|
34
|
+
setCurrent = _useState2[1];
|
|
35
|
+
|
|
26
36
|
var _useState3 = useState(),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
|
+
options = _useState4[0],
|
|
39
|
+
setOptions = _useState4[1];
|
|
40
|
+
|
|
30
41
|
var _useState5 = useState(true),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
43
|
+
isFirst = _useState6[0],
|
|
44
|
+
setIsFirst = _useState6[1];
|
|
45
|
+
|
|
34
46
|
var _useState7 = useState(''),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
|
+
searchValue = _useState8[0],
|
|
49
|
+
setSearchValue = _useState8[1];
|
|
50
|
+
|
|
38
51
|
var _useState9 = useState(0),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
53
|
+
timer = _useState10[0],
|
|
54
|
+
setTimer = _useState10[1];
|
|
55
|
+
|
|
42
56
|
useEffect(function () {
|
|
43
57
|
if (props.value) {
|
|
44
58
|
var data = props.value.map(function (item) {
|
|
@@ -54,6 +68,7 @@ var StringList = function StringList(props) {
|
|
|
54
68
|
}, [props.value]);
|
|
55
69
|
useEffect(function () {
|
|
56
70
|
fetchValues();
|
|
71
|
+
|
|
57
72
|
if (isFirst) {
|
|
58
73
|
setIsFirst(false);
|
|
59
74
|
} else {
|
|
@@ -69,70 +84,82 @@ var StringList = function StringList(props) {
|
|
|
69
84
|
useEffect(function () {
|
|
70
85
|
fetchValues();
|
|
71
86
|
}, [searchValue]);
|
|
87
|
+
|
|
72
88
|
var fetchValues = /*#__PURE__*/function () {
|
|
73
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
89
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
74
90
|
var fetch;
|
|
75
|
-
return
|
|
76
|
-
while (1)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
arr
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
92
|
+
while (1) {
|
|
93
|
+
switch (_context.prev = _context.next) {
|
|
94
|
+
case 0:
|
|
95
|
+
fetch = function fetch() {
|
|
96
|
+
var attrData = props.attr;
|
|
97
|
+
var requestData = {
|
|
98
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
99
|
+
platform: currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform,
|
|
100
|
+
limit: 20,
|
|
101
|
+
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.id) || 0,
|
|
102
|
+
dimension_sub: attrData === null || attrData === void 0 ? void 0 : attrData.dimensionSub,
|
|
103
|
+
v: searchValue || ''
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var transformRequest = function transformRequest(params) {
|
|
107
|
+
var arr = [];
|
|
108
|
+
|
|
109
|
+
for (var key in params) {
|
|
110
|
+
arr.push("".concat(key, "=").concat(encodeURIComponent(params[key])));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return arr.join('&');
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var formData = transformRequest(requestData);
|
|
117
|
+
request(Apis.esQuery, {
|
|
118
|
+
method: 'post',
|
|
119
|
+
data: formData,
|
|
120
|
+
headers: {
|
|
121
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
122
|
+
}
|
|
123
|
+
}).then(function (result) {
|
|
124
|
+
setOptions(function () {
|
|
125
|
+
return result && result.sources ? result.sources.map(function (item) {
|
|
126
|
+
return {
|
|
127
|
+
name: item,
|
|
128
|
+
value: item
|
|
129
|
+
};
|
|
130
|
+
}) : [];
|
|
131
|
+
});
|
|
132
|
+
}).catch(function (e) {
|
|
133
|
+
console.error(e);
|
|
134
|
+
setOptions([]);
|
|
110
135
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return _context.stop();
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
if (timer) clearTimeout(timer);
|
|
139
|
+
setTimer(setTimeout(function () {
|
|
140
|
+
fetch();
|
|
141
|
+
}, 400));
|
|
142
|
+
|
|
143
|
+
case 3:
|
|
144
|
+
case "end":
|
|
145
|
+
return _context.stop();
|
|
146
|
+
}
|
|
123
147
|
}
|
|
124
148
|
}, _callee);
|
|
125
149
|
}));
|
|
150
|
+
|
|
126
151
|
return function fetchValues() {
|
|
127
152
|
return _ref.apply(this, arguments);
|
|
128
153
|
};
|
|
129
154
|
}();
|
|
155
|
+
|
|
130
156
|
var onChange = function onChange(data) {
|
|
131
157
|
var resData = data.map(function (item) {
|
|
132
158
|
return item.value;
|
|
133
159
|
});
|
|
134
160
|
if (props.onChange) props.onChange(resData);
|
|
135
161
|
};
|
|
162
|
+
|
|
136
163
|
if (!current || !options) {
|
|
137
164
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
138
165
|
multiple: true,
|
|
@@ -144,6 +171,7 @@ var StringList = function StringList(props) {
|
|
|
144
171
|
disable: true
|
|
145
172
|
});
|
|
146
173
|
}
|
|
174
|
+
|
|
147
175
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
148
176
|
className: "".concat(classPrefix, "-multi-select"),
|
|
149
177
|
value: current,
|
|
@@ -159,4 +187,5 @@ var StringList = function StringList(props) {
|
|
|
159
187
|
onSearch: setSearchValue
|
|
160
188
|
});
|
|
161
189
|
};
|
|
190
|
+
|
|
162
191
|
export default StringList;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
2
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
3
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
6
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
7
13
|
import { DatePicker, Input } from 'antd';
|
|
8
14
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
9
15
|
import moment from 'moment';
|
|
@@ -16,24 +22,29 @@ import { OperateTypes } from '../types';
|
|
|
16
22
|
import { propSubtype } from '../utils/operates';
|
|
17
23
|
import StringList from './stringList';
|
|
18
24
|
var RangePicker = DatePicker.RangePicker;
|
|
25
|
+
|
|
19
26
|
var ValuesList = function ValuesList(props) {
|
|
20
27
|
var attr = props.attr,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
defaultValue = props.defaultValue,
|
|
29
|
+
operate = props.operate,
|
|
30
|
+
theme = props.theme;
|
|
24
31
|
var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')];
|
|
32
|
+
|
|
25
33
|
var _useState = useState(),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
current = _useState2[0],
|
|
36
|
+
setCurrent = _useState2[1];
|
|
37
|
+
|
|
29
38
|
var _useState3 = useState('1'),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
40
|
+
unit = _useState4[0],
|
|
41
|
+
setUnit = _useState4[1];
|
|
42
|
+
|
|
33
43
|
var _useState5 = useState(true),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
+
isFirst = _useState6[0],
|
|
46
|
+
setIsFirst = _useState6[1];
|
|
47
|
+
|
|
37
48
|
useEffect(function () {
|
|
38
49
|
if (defaultValue) {
|
|
39
50
|
if ((attr === null || attr === void 0 ? void 0 : attr.propCategory) === 'userProp' && (attr === null || attr === void 0 ? void 0 : attr.subtype) === 2) {
|
|
@@ -43,10 +54,12 @@ var ValuesList = function ValuesList(props) {
|
|
|
43
54
|
setCurrent(defaultValue);
|
|
44
55
|
}
|
|
45
56
|
}
|
|
57
|
+
|
|
46
58
|
setIsFirst(false);
|
|
47
59
|
}, []);
|
|
48
60
|
useEffect(function () {
|
|
49
61
|
if (isFirst) return;
|
|
62
|
+
|
|
50
63
|
if (operate === OperateTypes.Absolute || operate === OperateTypes.Relative) {
|
|
51
64
|
var data = operate === OperateTypes.Absolute ? initValue : ['30', '1'];
|
|
52
65
|
onChange(data);
|
|
@@ -58,19 +71,24 @@ var ValuesList = function ValuesList(props) {
|
|
|
58
71
|
setCurrent([]);
|
|
59
72
|
}
|
|
60
73
|
}, [attr]);
|
|
74
|
+
|
|
61
75
|
var onChange = function onChange(data) {
|
|
62
76
|
setCurrent(data);
|
|
63
77
|
if (props.onChange) props.onChange(data);
|
|
64
78
|
};
|
|
79
|
+
|
|
65
80
|
var onChangeRange = function onChangeRange() {
|
|
66
81
|
onChange(arguments.length <= 1 ? undefined : arguments[1]);
|
|
67
82
|
};
|
|
83
|
+
|
|
68
84
|
var onChangeDate = function onChangeDate(e) {
|
|
69
85
|
var data = [e.target.value, '1'];
|
|
70
86
|
onChange(data);
|
|
71
87
|
};
|
|
88
|
+
|
|
72
89
|
var onChangeNumber = function onChangeNumber(e) {
|
|
73
90
|
var data = [e.target.value];
|
|
91
|
+
|
|
74
92
|
if ((attr === null || attr === void 0 ? void 0 : attr.propCategory) === PropCategory.UserProp && (attr === null || attr === void 0 ? void 0 : attr.subtype) === 2) {
|
|
75
93
|
var num = String(parseFloat(e.target.value) * getUnitCount(unit));
|
|
76
94
|
data = [num, unit];
|
|
@@ -78,21 +96,27 @@ var ValuesList = function ValuesList(props) {
|
|
|
78
96
|
} else {
|
|
79
97
|
setCurrent(data);
|
|
80
98
|
}
|
|
99
|
+
|
|
81
100
|
if (props.onChange) props.onChange(data);
|
|
82
101
|
};
|
|
102
|
+
|
|
83
103
|
var onChangeUnit = function onChangeUnit(data) {
|
|
84
104
|
setUnit(data.value);
|
|
105
|
+
|
|
85
106
|
if (current && current[0]) {
|
|
86
107
|
var num = String(parseFloat(current[0]) * getUnitCount(data.value));
|
|
87
108
|
if (props.onChange) props.onChange([num, data.value]);
|
|
88
109
|
}
|
|
89
110
|
};
|
|
111
|
+
|
|
90
112
|
var getUnitCount = function getUnitCount(value) {
|
|
91
113
|
return value === '1' ? 3600 : value === '2' ? 60 : 1;
|
|
92
114
|
};
|
|
115
|
+
|
|
93
116
|
var disabledDate = function disabledDate(current) {
|
|
94
117
|
return current && current > moment().endOf('day');
|
|
95
118
|
};
|
|
119
|
+
|
|
96
120
|
if (!attr || !operate || isFirst) {
|
|
97
121
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
98
122
|
disable: true,
|
|
@@ -102,6 +126,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
102
126
|
options: []
|
|
103
127
|
});
|
|
104
128
|
}
|
|
129
|
+
|
|
105
130
|
if (attr.type === PropType.STRING) {
|
|
106
131
|
return /*#__PURE__*/React.createElement(StringList, {
|
|
107
132
|
theme: theme,
|
|
@@ -163,4 +188,5 @@ var ValuesList = function ValuesList(props) {
|
|
|
163
188
|
}
|
|
164
189
|
}
|
|
165
190
|
};
|
|
191
|
+
|
|
166
192
|
export default ValuesList;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
2
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
3
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
6
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
7
13
|
import React, { useRef, useState } from 'react';
|
|
8
14
|
import { BizConditionGroup, DemoWrapper } from '@zgfe/business-lib';
|
|
9
15
|
import { Button } from 'antd';
|
|
@@ -25,29 +31,35 @@ var conditions = [{
|
|
|
25
31
|
}];
|
|
26
32
|
export default (function () {
|
|
27
33
|
var _useState = useState({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
relation: 'and',
|
|
35
|
+
conditions: conditions
|
|
36
|
+
}),
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
data = _useState2[0],
|
|
39
|
+
setData = _useState2[1];
|
|
40
|
+
|
|
34
41
|
var _useState3 = useState(conditions.length),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
count = _useState4[0],
|
|
44
|
+
setCount = _useState4[1];
|
|
45
|
+
|
|
38
46
|
var conditionRef = useRef(null);
|
|
47
|
+
|
|
39
48
|
var onChange = function onChange(value) {
|
|
40
49
|
setData(value);
|
|
41
50
|
};
|
|
51
|
+
|
|
42
52
|
var onClick = function onClick() {
|
|
43
53
|
conditionRef.current.add();
|
|
44
54
|
};
|
|
55
|
+
|
|
45
56
|
var onClear = function onClear() {
|
|
46
57
|
conditionRef.current.setValue();
|
|
47
58
|
setData({
|
|
48
59
|
conditions: []
|
|
49
60
|
});
|
|
50
61
|
};
|
|
62
|
+
|
|
51
63
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
52
64
|
needMeta: true
|
|
53
65
|
}, /*#__PURE__*/React.createElement(BizConditionGroup, {
|
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
2
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
3
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
6
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
7
13
|
import React, { useState } from 'react';
|
|
8
14
|
import { BizConditionItem, DemoWrapper } from '@zgfe/business-lib';
|
|
9
15
|
import { Form } from 'antd';
|
|
10
16
|
export default (function () {
|
|
11
17
|
var _Form$useForm = Form.useForm(),
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
19
|
+
form = _Form$useForm2[0];
|
|
20
|
+
|
|
14
21
|
var _useState = useState({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
condition: {
|
|
23
|
+
attrId: 30183426,
|
|
24
|
+
propCategory: 'eventProp',
|
|
25
|
+
type: 1,
|
|
26
|
+
operator: 'equal',
|
|
27
|
+
values: [],
|
|
28
|
+
dimensionSub: 'event_attr',
|
|
29
|
+
attrName: '公众号名称'
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
formData = _useState2[0],
|
|
34
|
+
setFormData = _useState2[1];
|
|
35
|
+
|
|
28
36
|
var onChange = function onChange() {
|
|
29
37
|
setFormData(arguments.length <= 1 ? undefined : arguments[1]);
|
|
30
38
|
};
|
|
39
|
+
|
|
31
40
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
32
41
|
needMeta: true
|
|
33
42
|
}, /*#__PURE__*/React.createElement(Form, {
|