@steedos-widgets/amis-object 6.3.7 → 6.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var _$1 = require('lodash');
7
7
  var antd = require('antd');
8
+ var amisCore = require('amis-core');
9
+ var amisUi = require('amis-ui');
8
10
  var ReactDOM = require('react-dom');
9
11
 
10
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -46,6 +48,22 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
46
48
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
47
49
  PERFORMANCE OF THIS SOFTWARE.
48
50
  ***************************************************************************** */
51
+ /* global Reflect, Promise */
52
+
53
+ var extendStatics = function(d, b) {
54
+ extendStatics = Object.setPrototypeOf ||
55
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57
+ return extendStatics(d, b);
58
+ };
59
+
60
+ function __extends(d, b) {
61
+ if (typeof b !== "function" && b !== null)
62
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
63
+ extendStatics(d, b);
64
+ function __() { this.constructor = d; }
65
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
66
+ }
49
67
 
50
68
  var __assign$2 = function() {
51
69
  __assign$2 = Object.assign || function __assign(t) {
@@ -70,6 +88,13 @@ function __rest(s, e) {
70
88
  return t;
71
89
  }
72
90
 
91
+ function __decorate(decorators, target, key, desc) {
92
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
93
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
94
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
96
+ }
97
+
73
98
  function __awaiter(thisArg, _arguments, P, generator) {
74
99
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
75
100
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -245,7 +270,7 @@ function _getPrototypeOf(o) {
245
270
  return _getPrototypeOf(o);
246
271
  }
247
272
 
248
- function _defineProperty$1(obj, key, value) {
273
+ function _defineProperty$2(obj, key, value) {
249
274
  key = _toPropertyKey$1(key);
250
275
  if (key in obj) {
251
276
  Object.defineProperty(obj, key, {
@@ -292,7 +317,7 @@ function _toArray(arr) {
292
317
  }
293
318
 
294
319
  function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
295
- function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
320
+ function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
296
321
  var consoleLogger = {
297
322
  type: 'logger',
298
323
  log: function log(args) {
@@ -600,7 +625,7 @@ function deepFind(obj, path) {
600
625
  }
601
626
 
602
627
  function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
603
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
628
+ function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
604
629
  function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
605
630
  function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
606
631
  var ResourceStore = function (_EventEmitter) {
@@ -771,7 +796,7 @@ var postProcessor = {
771
796
  };
772
797
 
773
798
  function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
774
- function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
799
+ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
775
800
  function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
776
801
  function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
777
802
  var checkedLoadedFor = {};
@@ -1582,7 +1607,7 @@ var PluralResolver = function () {
1582
1607
  }();
1583
1608
 
1584
1609
  function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1585
- function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1610
+ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1586
1611
  function deepFindWithDefaults(data, defaultData, key) {
1587
1612
  var keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';
1588
1613
  var ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
@@ -1787,7 +1812,7 @@ var Interpolator = function () {
1787
1812
  }();
1788
1813
 
1789
1814
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1790
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1815
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1791
1816
  function parseFormatStr(formatStr) {
1792
1817
  var formatName = formatStr.toLowerCase().trim();
1793
1818
  var formatOptions = {};
@@ -1925,7 +1950,7 @@ var Formatter = function () {
1925
1950
  }();
1926
1951
 
1927
1952
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1928
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1953
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1929
1954
  function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1930
1955
  function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1931
1956
  function removePending(q, name) {
@@ -2262,7 +2287,7 @@ function transformOptions(options) {
2262
2287
  }
2263
2288
 
2264
2289
  function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2265
- function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2290
+ function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2266
2291
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2267
2292
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2268
2293
  function noop() {}
@@ -2772,7 +2797,7 @@ var I18n = function (_EventEmitter) {
2772
2797
  }]);
2773
2798
  return I18n;
2774
2799
  }(EventEmitter);
2775
- _defineProperty$1(I18n, "createInstance", function () {
2800
+ _defineProperty$2(I18n, "createInstance", function () {
2776
2801
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2777
2802
  var callback = arguments.length > 1 ? arguments[1] : undefined;
2778
2803
  return new I18n(options, callback);
@@ -2821,7 +2846,7 @@ function _toPropertyKey(arg) {
2821
2846
  return _typeof(key) === "symbol" ? key : String(key);
2822
2847
  }
2823
2848
 
2824
- function _defineProperty(obj, key, value) {
2849
+ function _defineProperty$1(obj, key, value) {
2825
2850
  key = _toPropertyKey(key);
2826
2851
  if (key in obj) {
2827
2852
  Object.defineProperty(obj, key, {
@@ -2872,7 +2897,7 @@ var unescape = function unescape(text) {
2872
2897
 
2873
2898
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2874
2899
 
2875
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2900
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2876
2901
  var defaultOptions = {
2877
2902
  bindI18n: 'languageChanged',
2878
2903
  bindI18nStore: '',
@@ -2958,31 +2983,31 @@ var freeGlobal = _freeGlobal;
2958
2983
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2959
2984
 
2960
2985
  /** Used as a reference to the global object. */
2961
- var root$1 = freeGlobal || freeSelf || Function('return this')();
2986
+ var root$4 = freeGlobal || freeSelf || Function('return this')();
2962
2987
 
2963
- var _root = root$1;
2988
+ var _root = root$4;
2964
2989
 
2965
- var root = _root;
2990
+ var root$3 = _root;
2966
2991
 
2967
2992
  /** Built-in value references. */
2968
- var Symbol$3 = root.Symbol;
2993
+ var Symbol$3 = root$3.Symbol;
2969
2994
 
2970
2995
  var _Symbol = Symbol$3;
2971
2996
 
2972
2997
  var Symbol$2 = _Symbol;
2973
2998
 
2974
2999
  /** Used for built-in method references. */
2975
- var objectProto$2 = Object.prototype;
3000
+ var objectProto$a = Object.prototype;
2976
3001
 
2977
3002
  /** Used to check objects for own properties. */
2978
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
3003
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
2979
3004
 
2980
3005
  /**
2981
3006
  * Used to resolve the
2982
3007
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2983
3008
  * of values.
2984
3009
  */
2985
- var nativeObjectToString$1 = objectProto$2.toString;
3010
+ var nativeObjectToString$1 = objectProto$a.toString;
2986
3011
 
2987
3012
  /** Built-in value references. */
2988
3013
  var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
@@ -2995,7 +3020,7 @@ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
2995
3020
  * @returns {string} Returns the raw `toStringTag`.
2996
3021
  */
2997
3022
  function getRawTag$1(value) {
2998
- var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
3023
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
2999
3024
  tag = value[symToStringTag$1];
3000
3025
 
3001
3026
  try {
@@ -3018,14 +3043,14 @@ var _getRawTag = getRawTag$1;
3018
3043
 
3019
3044
  /** Used for built-in method references. */
3020
3045
 
3021
- var objectProto$1 = Object.prototype;
3046
+ var objectProto$9 = Object.prototype;
3022
3047
 
3023
3048
  /**
3024
3049
  * Used to resolve the
3025
3050
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3026
3051
  * of values.
3027
3052
  */
3028
- var nativeObjectToString = objectProto$1.toString;
3053
+ var nativeObjectToString = objectProto$9.toString;
3029
3054
 
3030
3055
  /**
3031
3056
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -3058,7 +3083,7 @@ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
3058
3083
  * @param {*} value The value to query.
3059
3084
  * @returns {string} Returns the `toStringTag`.
3060
3085
  */
3061
- function baseGetTag$1(value) {
3086
+ function baseGetTag$4(value) {
3062
3087
  if (value == null) {
3063
3088
  return value === undefined ? undefinedTag : nullTag;
3064
3089
  }
@@ -3067,7 +3092,7 @@ function baseGetTag$1(value) {
3067
3092
  : objectToString(value);
3068
3093
  }
3069
3094
 
3070
- var _baseGetTag = baseGetTag$1;
3095
+ var _baseGetTag = baseGetTag$4;
3071
3096
 
3072
3097
  /**
3073
3098
  * Creates a unary function that invokes `func` with its argument transformed.
@@ -3089,9 +3114,9 @@ var _overArg = overArg$1;
3089
3114
  var overArg = _overArg;
3090
3115
 
3091
3116
  /** Built-in value references. */
3092
- var getPrototype$1 = overArg(Object.getPrototypeOf, Object);
3117
+ var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
3093
3118
 
3094
- var _getPrototype = getPrototype$1;
3119
+ var _getPrototype = getPrototype$2;
3095
3120
 
3096
3121
  /**
3097
3122
  * Checks if `value` is object-like. A value is object-like if it's not `null`
@@ -3118,31 +3143,31 @@ var _getPrototype = getPrototype$1;
3118
3143
  * // => false
3119
3144
  */
3120
3145
 
3121
- function isObjectLike$1(value) {
3146
+ function isObjectLike$5(value) {
3122
3147
  return value != null && typeof value == 'object';
3123
3148
  }
3124
3149
 
3125
- var isObjectLike_1 = isObjectLike$1;
3150
+ var isObjectLike_1 = isObjectLike$5;
3126
3151
 
3127
- var baseGetTag = _baseGetTag,
3128
- getPrototype = _getPrototype,
3129
- isObjectLike = isObjectLike_1;
3152
+ var baseGetTag$3 = _baseGetTag,
3153
+ getPrototype$1 = _getPrototype,
3154
+ isObjectLike$4 = isObjectLike_1;
3130
3155
 
3131
3156
  /** `Object#toString` result references. */
3132
- var objectTag = '[object Object]';
3157
+ var objectTag$1 = '[object Object]';
3133
3158
 
3134
3159
  /** Used for built-in method references. */
3135
- var funcProto = Function.prototype,
3136
- objectProto = Object.prototype;
3160
+ var funcProto$2 = Function.prototype,
3161
+ objectProto$8 = Object.prototype;
3137
3162
 
3138
3163
  /** Used to resolve the decompiled source of functions. */
3139
- var funcToString = funcProto.toString;
3164
+ var funcToString$2 = funcProto$2.toString;
3140
3165
 
3141
3166
  /** Used to check objects for own properties. */
3142
- var hasOwnProperty = objectProto.hasOwnProperty;
3167
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
3143
3168
 
3144
3169
  /** Used to infer the `Object` constructor. */
3145
- var objectCtorString = funcToString.call(Object);
3170
+ var objectCtorString = funcToString$2.call(Object);
3146
3171
 
3147
3172
  /**
3148
3173
  * Checks if `value` is a plain object, that is, an object created by the
@@ -3172,20 +3197,20 @@ var objectCtorString = funcToString.call(Object);
3172
3197
  * _.isPlainObject(Object.create(null));
3173
3198
  * // => true
3174
3199
  */
3175
- function isPlainObject(value) {
3176
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
3200
+ function isPlainObject$1(value) {
3201
+ if (!isObjectLike$4(value) || baseGetTag$3(value) != objectTag$1) {
3177
3202
  return false;
3178
3203
  }
3179
- var proto = getPrototype(value);
3204
+ var proto = getPrototype$1(value);
3180
3205
  if (proto === null) {
3181
3206
  return true;
3182
3207
  }
3183
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
3208
+ var Ctor = hasOwnProperty$7.call(proto, 'constructor') && proto.constructor;
3184
3209
  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
3185
- funcToString.call(Ctor) == objectCtorString;
3210
+ funcToString$2.call(Ctor) == objectCtorString;
3186
3211
  }
3187
3212
 
3188
- var isPlainObject_1 = isPlainObject;
3213
+ var isPlainObject_1 = isPlainObject$1;
3189
3214
 
3190
3215
  /*
3191
3216
  * @Author: baozhoutao@steedos.com
@@ -7625,7 +7650,7 @@ function createObject(superProps, props, properties) {
7625
7650
  } }))
7626
7651
  : Object.create(Object.prototype, properties);
7627
7652
  props &&
7628
- isObject(props) &&
7653
+ isObject$8(props) &&
7629
7654
  Object.keys(props).forEach(function (key) { return (obj[key] = props[key]); });
7630
7655
  return obj;
7631
7656
  }
@@ -7651,7 +7676,7 @@ function extendObject(target, src, persistOwnProps) {
7651
7676
  src && Object.keys(src).forEach(function (key) { return (obj[key] = src[key]); });
7652
7677
  return obj;
7653
7678
  }
7654
- function isObject(obj) {
7679
+ function isObject$8(obj) {
7655
7680
  var typename = typeof obj;
7656
7681
  return (obj &&
7657
7682
  typename !== 'string' &&
@@ -21745,7 +21770,7 @@ var index_esm$1 = /*#__PURE__*/Object.freeze({
21745
21770
  getUserId: getUserId,
21746
21771
  getViewSchema: getViewSchema,
21747
21772
  isExpression: isExpression$1,
21748
- isObject: isObject,
21773
+ isObject: isObject$8,
21749
21774
  lookupToAmis: lookupToAmis,
21750
21775
  lookupToAmisIdsPicker: lookupToAmisIdsPicker,
21751
21776
  lookupToAmisPicker: lookupToAmisPicker,
@@ -21852,6 +21877,9 @@ var AmisObjectFieldLookup = function (props) {
21852
21877
  // if(!data[field.name] && data.recordId && formItemValue === undefined){
21853
21878
  // return ;
21854
21879
  // }
21880
+ if (!field) {
21881
+ return;
21882
+ }
21855
21883
  var _b = __read(React.useState(), 2), schema = _b[0], setSchema = _b[1];
21856
21884
  if (formItemValue === undefined) {
21857
21885
  formItemValue = data[field.name];
@@ -22190,229 +22218,2761 @@ var SteedosSkeleton = function (props) {
22190
22218
  }))) : null));
22191
22219
  };
22192
22220
 
22193
- // md:border-b
22194
- var AmisObjectForm = function (props) { return __awaiter(void 0, void 0, void 0, function () {
22195
- var $schema, recordId, defaultData, mode, _a, layout, labelAlign, appId, fieldsExtend, _b, excludedFields, _c, fields, _d, form, _e, className, enableInitApi, initApiRequestAdaptor, initApiAdaptor, apiRequestAdaptor, apiAdaptor, enableTabs, tabsMode, submitSuccActions, data, formDataFilter, onFormDataFilter, env, objectApiName, schemaKeys, formSchema, defaults, options, globalData, amisSchema, uiSchema, allData, schema, schema, formData;
22196
- return __generator(this, function (_f) {
22197
- switch (_f.label) {
22198
- case 0:
22199
- $schema = props.$schema, recordId = props.recordId, defaultData = props.defaultData, mode = props.mode, _a = props.layout, layout = _a === void 0 ? "horizontal" : _a, labelAlign = props.labelAlign, appId = props.appId, fieldsExtend = props.fieldsExtend, _b = props.excludedFields, excludedFields = _b === void 0 ? null : _b, _c = props.fields, fields = _c === void 0 ? null : _c, _d = props.form, form = _d === void 0 ? {} : _d, _e = props.className, className = _e === void 0 ? "" : _e, enableInitApi = props.enableInitApi, initApiRequestAdaptor = props.initApiRequestAdaptor, initApiAdaptor = props.initApiAdaptor, apiRequestAdaptor = props.apiRequestAdaptor, apiAdaptor = props.apiAdaptor, enableTabs = props.enableTabs, tabsMode = props.tabsMode, submitSuccActions = props.submitSuccActions, data = props.data, formDataFilter = props.formDataFilter, onFormDataFilter = props.onFormDataFilter, env = props.env;
22200
- objectApiName = props.objectApiName || "space_users";
22201
- schemaKeys = _$1.difference(_$1.keys($schema), ["id", "form", "type", "mode", "layout", "defaultData", "formDataFilter", "onFormDataFilter", "env"]);
22202
- formSchema = _$1.pick(props, schemaKeys);
22203
- defaults = {
22204
- formSchema: Object.assign({}, formSchema, form)
22205
- };
22206
- options = {
22207
- recordId: recordId,
22208
- mode: mode,
22209
- layout: layout === 'vertical' ? 'normal' : layout,
22210
- labelAlign: labelAlign,
22211
- defaults: defaults,
22212
- appId: appId,
22213
- excludedFields: excludedFields,
22214
- fields: fields
22215
- };
22216
- try {
22217
- options.fieldsExtend = _$1.isString(fieldsExtend) ? JSON.parse(fieldsExtend) : fieldsExtend;
22218
- }
22219
- catch (error) {
22220
- console.warn(error);
22221
- }
22222
- globalData = props.data.global || {};
22223
- globalData.mode = mode === 'edit' ? 'edit' : 'read';
22224
- allData = createObject(data, {});
22225
- if (!(mode === 'edit')) return [3 /*break*/, 2];
22226
- if (defaultData) {
22227
- // 让ObjectForm支持props中的dafaultData属性与上层组件配置的defaultData混合
22228
- // 为了解决相关表新建时如果是表单类型微页面,因为找不到ObjectForm在哪层而造成无法设置ObjectForm的defaultData的问题
22229
- allData.defaultData = __assign$2({ "&": "${defaultData}" }, defaultData //这里的defaultData是form组件的defaultData属性值
22230
- );
22231
- }
22232
- return [4 /*yield*/, getFormSchema(objectApiName, Object.assign({}, options, {
22233
- initApiRequestAdaptor: initApiRequestAdaptor,
22234
- initApiAdaptor: initApiAdaptor,
22235
- apiRequestAdaptor: apiRequestAdaptor,
22236
- apiAdaptor: apiAdaptor,
22237
- enableTabs: enableTabs,
22238
- tabsMode: tabsMode,
22239
- submitSuccActions: submitSuccActions,
22240
- formDataFilter: formDataFilter,
22241
- onFormDataFilter: onFormDataFilter,
22242
- amisData: allData,
22243
- env: env
22244
- }))];
22245
- case 1:
22246
- schema = _f.sent();
22247
- amisSchema = schema.amisSchema;
22248
- uiSchema = schema.uiSchema;
22249
- return [3 /*break*/, 4];
22250
- case 2:
22251
- if (props.$$editor) {
22252
- options.isEditor = true;
22253
- }
22254
- return [4 /*yield*/, getViewSchema(objectApiName, recordId, Object.assign({}, options, {
22255
- enableInitApi: enableInitApi,
22256
- initApiRequestAdaptor: initApiRequestAdaptor,
22257
- initApiAdaptor: initApiAdaptor,
22258
- enableTabs: enableTabs,
22259
- tabsMode: tabsMode || "vertical",
22260
- formDataFilter: formDataFilter,
22261
- onFormDataFilter: onFormDataFilter,
22262
- amisData: allData,
22263
- env: env
22264
- }))];
22265
- case 3:
22266
- schema = _f.sent();
22267
- amisSchema = schema.amisSchema;
22268
- uiSchema = schema.uiSchema;
22269
- _f.label = 4;
22270
- case 4:
22271
- formData = {};
22272
- // formData.recordId = recordId || null;
22273
- // if(objectApiName){
22274
- // formData.objectName = objectApiName;
22275
- // }
22276
- if (_$1.has(props, "recordId") && $schema.recordId !== "${recordId}") {
22277
- formData.recordId = props.recordId;
22278
- }
22279
- amisSchema.className = "steedos-object-form ".concat(className);
22280
- // console.log('AmisObjectForm amisSchema======>', amisSchema)
22281
- amisSchema.data = Object.assign({}, amisSchema.data || {}, formData, { global: globalData, uiSchema: uiSchema });
22282
- if (_$1.has(props, 'objectApiName')) {
22283
- amisSchema.data.objectName = objectApiName;
22221
+ var Collapse = /** @class */ (function (_super) {
22222
+ __extends(Collapse, _super);
22223
+ function Collapse() {
22224
+ var _this = _super !== null && _super.apply(this, arguments) || this;
22225
+ _this.basicCollapse = React__default["default"].createRef();
22226
+ return _this;
22227
+ }
22228
+ Collapse.prototype.handleCollapseChange = function (collapsed) {
22229
+ return __awaiter(this, void 0, void 0, function () {
22230
+ var _a, dispatchEvent, onCollapse, eventData, changeEvent, toggleEvent;
22231
+ return __generator(this, function (_b) {
22232
+ switch (_b.label) {
22233
+ case 0:
22234
+ _a = this.props, dispatchEvent = _a.dispatchEvent, onCollapse = _a.onCollapse;
22235
+ eventData = amisCore.resolveEventData(this.props, {
22236
+ collapsed: collapsed
22237
+ });
22238
+ return [4 /*yield*/, dispatchEvent('change', eventData)];
22239
+ case 1:
22240
+ changeEvent = _b.sent();
22241
+ return [4 /*yield*/, dispatchEvent(collapsed ? 'collapse' : 'expand', eventData)];
22242
+ case 2:
22243
+ toggleEvent = _b.sent();
22244
+ if ((changeEvent === null || changeEvent === void 0 ? void 0 : changeEvent.prevented) || (toggleEvent === null || toggleEvent === void 0 ? void 0 : toggleEvent.prevented)) {
22245
+ return [2 /*return*/];
22246
+ }
22247
+ onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(collapsed);
22248
+ return [2 /*return*/];
22284
22249
  }
22285
- return [2 /*return*/, amisSchema];
22250
+ });
22251
+ });
22252
+ };
22253
+ Collapse.prototype.doAction = function (action, data, throwErrors, args) {
22254
+ var _a, _b, _c, _d;
22255
+ if (this.props.disabled || this.props.collapsable === false) {
22256
+ return;
22286
22257
  }
22287
- });
22288
- }); };
22258
+ if (['expand', 'collapse'].includes(action.actionType)) {
22259
+ var targetState = action.actionType === 'collapse';
22260
+ /**
22261
+ * 说明:changeCollapsedState 会执行 onCollapse 方法(间接执行handleCollapseChange),
22262
+ * 所以这里不需要再重复调用。
22263
+ */
22264
+ // this.handleCollapseChange(targetState);
22265
+ var collapseInstance = (_c = (_b = (_a = this.basicCollapse) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.getWrappedInstance) === null || _c === void 0 ? void 0 : _c.call(_b);
22266
+ (_d = collapseInstance === null || collapseInstance === void 0 ? void 0 : collapseInstance.changeCollapsedState) === null || _d === void 0 ? void 0 : _d.call(collapseInstance, targetState);
22267
+ }
22268
+ };
22269
+ Collapse.prototype.render = function () {
22270
+ var _a = this.props, id = _a.id, ns = _a.classPrefix, cx = _a.classnames, size = _a.size, wrapperComponent = _a.wrapperComponent, headingComponent = _a.headingComponent, className = _a.className, style = _a.style, headingClassName = _a.headingClassName, children = _a.children, titlePosition = _a.titlePosition, headerPosition = _a.headerPosition, title = _a.title, collapseTitle = _a.collapseTitle, collapseHeader = _a.collapseHeader, header = _a.header, body = _a.body, bodyClassName = _a.bodyClassName, render = _a.render, collapsable = _a.collapsable; _a.translate; var mountOnEnter = _a.mountOnEnter, unmountOnExit = _a.unmountOnExit, showArrow = _a.showArrow, expandIcon = _a.expandIcon, disabled = _a.disabled, collapsed = _a.collapsed, propsUpdate = _a.propsUpdate, mobileUI = _a.mobileUI, divideLine = _a.divideLine, enableFieldSetStyle = _a.enableFieldSetStyle;
22271
+ var heading = title || header || '';
22272
+ return (React__default["default"].createElement(amisUi.Collapse, { id: id, ref: this.basicCollapse, classnames: cx, classPrefix: ns, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit, size: size, wrapperComponent: wrapperComponent, headingComponent: headingComponent, className: className, style: style, headingClassName: headingClassName, bodyClassName: bodyClassName, headerPosition: titlePosition || headerPosition, collapsable: collapsable, collapsed: collapsed, showArrow: showArrow, disabled: disabled, propsUpdate: propsUpdate, expandIcon: expandIcon ? (typeof expandIcon.icon === 'object' ? (React__default["default"].createElement(amisUi.Icon, { cx: cx, icon: expandIcon.icon, className: cx('Collapse-icon-tranform') })) : (render('arrow-icon', expandIcon || '', {
22273
+ className: cx('Collapse-icon-tranform')
22274
+ }))) : null, collapseHeader: collapseTitle || collapseHeader
22275
+ ? render('heading', collapseTitle || collapseHeader)
22276
+ : null, header: heading ? render('heading', heading) : null, body: children
22277
+ ? typeof children === 'function'
22278
+ ? children(this.props)
22279
+ : children
22280
+ : body
22281
+ ? render('body', body)
22282
+ : null, mobileUI: mobileUI, onCollapse: this.handleCollapseChange, divideLine: divideLine, enableFieldSetStyle: enableFieldSetStyle }));
22283
+ };
22284
+ Collapse.propsList = [
22285
+ 'collapsable',
22286
+ 'collapsed',
22287
+ 'collapseTitle',
22288
+ 'showArrow',
22289
+ 'headerPosition',
22290
+ 'bodyClassName',
22291
+ 'headingClassName',
22292
+ 'collapseHeader',
22293
+ 'size'
22294
+ ];
22295
+ __decorate([
22296
+ amisCore.autobind
22297
+ ], Collapse.prototype, "handleCollapseChange", null);
22298
+ return Collapse;
22299
+ }(React__default["default"].Component));
22300
+ var FieldSetControl = /** @class */ (function (_super) {
22301
+ __extends(FieldSetControl, _super);
22302
+ function FieldSetControl(props) {
22303
+ var _this = _super.call(this, props) || this;
22304
+ _this.renderBody = _this.renderBody.bind(_this);
22305
+ return _this;
22306
+ }
22307
+ FieldSetControl.prototype.renderBody = function () {
22308
+ var _a = this.props, body = _a.body; _a.collapsable; var horizontal = _a.horizontal, render = _a.render, mode = _a.mode, formMode = _a.formMode, cx = _a.classnames, store = _a.store, formClassName = _a.formClassName, disabled = _a.disabled, formHorizontal = _a.formHorizontal, subFormMode = _a.subFormMode, subFormHorizontal = _a.subFormHorizontal;
22309
+ var props = {
22310
+ store: store,
22311
+ data: store === null || store === void 0 ? void 0 : store.data,
22312
+ render: render,
22313
+ disabled: disabled,
22314
+ formMode: subFormMode || formMode,
22315
+ formHorizontal: subFormHorizontal || formHorizontal
22316
+ };
22317
+ mode && (props.mode = mode);
22318
+ horizontal && (props.horizontal = horizontal);
22319
+ return (React__default["default"].createElement("div", { className: cx("Form--".concat(props.mode || formMode || 'normal'), formClassName) }, body ? render('body', body, props) : null));
22320
+ };
22321
+ FieldSetControl.prototype.render = function () {
22322
+ var _a = this.props; _a.controls; var className = _a.className; _a.mode; var body = _a.body, rest = __rest(_a, ["controls", "className", "mode", "body"]);
22323
+ var children = this.renderBody;
22324
+ return (React__default["default"].createElement(Collapse, __assign$2({}, rest, { body: body, className: className, children: children, wrapperComponent: "SteedosFieldSet", headingComponent: rest.titlePosition === 'bottom' ? 'div' : 'legend' })));
22325
+ };
22326
+ FieldSetControl.defaultProps = {
22327
+ titlePosition: 'top',
22328
+ headingClassName: '',
22329
+ collapsable: false
22330
+ };
22331
+ FieldSetControl.propsList = [
22332
+ 'collapsable',
22333
+ 'collapsed',
22334
+ 'collapseTitle',
22335
+ 'titlePosition',
22336
+ 'collapseTitle'
22337
+ ];
22338
+ return FieldSetControl;
22339
+ }(React__default["default"].Component));
22340
+ // @Renderer({
22341
+ // type: 'SteedosFieldSet',
22342
+ // weight: -100,
22343
+ // name: 'SteedosFieldSet'
22344
+ // })
22345
+ var SteedosFieldSet = /** @class */ (function (_super) {
22346
+ __extends(SteedosFieldSet, _super);
22347
+ function SteedosFieldSet() {
22348
+ return _super !== null && _super.apply(this, arguments) || this;
22349
+ }
22350
+ return SteedosFieldSet;
22351
+ }(FieldSetControl));
22289
22352
 
22290
- var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
22291
- var $schema, top, perPage, _a, showHeader, data, defaultData, _b, className, _c, style, crudClassName, _d, showDisplayAs, sideSchema, _f, filterVisible, headerToolbarItems, rowClassNameExpr, _g, hiddenColumnOperation, columns, crudDataFilter, onCrudDataFilter, env, rebuildOn, crudMode, requestAdaptor, adaptor, headerSchema, ctx, crud, listName, defaults, objectApiName, uiSchema, displayAs, formFactor, isMobile, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, allData, listViewSchemaProps, serviceData;
22292
- var _h;
22293
- return __generator(this, function (_j) {
22294
- switch (_j.label) {
22295
- case 0:
22296
- $schema = props.$schema, top = props.top, perPage = props.perPage, _a = props.showHeader, showHeader = _a === void 0 ? true : _a, data = props.data, defaultData = props.defaultData, _b = props.className, className = _b === void 0 ? "" : _b, _c = props.style, style = _c === void 0 ? {} : _c, crudClassName = props.crudClassName, _d = props.showDisplayAs, showDisplayAs = _d === void 0 ? false : _d, sideSchema = props.sideSchema, props.columnsTogglable, _f = props.filterVisible, filterVisible = _f === void 0 ? true : _f, headerToolbarItems = props.headerToolbarItems, rowClassNameExpr = props.rowClassNameExpr, _g = props.hiddenColumnOperation, hiddenColumnOperation = _g === void 0 ? false : _g, columns = props.columns, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env, rebuildOn = props.rebuildOn, crudMode = props.crudMode, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor;
22297
- headerSchema = props.headerSchema;
22298
- ctx = props.ctx;
22299
- crud = props.crud || {};
22300
- listName = (defaultData === null || defaultData === void 0 ? void 0 : defaultData.listName) || (data === null || data === void 0 ? void 0 : data.listName) || (props === null || props === void 0 ? void 0 : props.listName);
22301
- defaults = {};
22302
- objectApiName = props.objectApiName || "space_users";
22303
- if (!ctx) {
22304
- ctx = {};
22305
- }
22306
- return [4 /*yield*/, getUISchema(objectApiName, false)];
22307
- case 1:
22308
- uiSchema = _j.sent();
22309
- displayAs = Router$1.getTabDisplayAs(objectApiName, uiSchema.enable_split);
22310
- formFactor = props.formFactor;
22311
- if (!formFactor) {
22312
- isMobile = window.innerWidth < 768;
22313
- if (isMobile) {
22314
- formFactor = 'SMALL';
22315
- }
22316
- else {
22317
- formFactor = 'LARGE';
22318
- }
22319
- }
22320
- // 分栏模式不应该改变尺寸变量值
22321
- // if(["split"].indexOf(displayAs) > -1){
22322
- // formFactor = 'SMALL';
22323
- // }
22324
- if (!ctx.formFactor) {
22325
- ctx.formFactor = formFactor;
22326
- }
22327
- listView = _$1.find(uiSchema.list_views, function (listView, name) {
22328
- // 传入listViewName空值则取第一个
22329
- if (!listName) {
22330
- listName = name;
22331
- }
22332
- return name === listName || listView._id === listName;
22333
- });
22334
- if (!listView) {
22335
- return [2 /*return*/, {
22336
- "type": "alert",
22337
- "body": "".concat(instance.t('frontend_listview_warning_start')).concat(listName).concat(instance.t('frontend_listview_warning_end')),
22338
- "level": "warning",
22339
- "showIcon": true,
22340
- "className": "mb-3"
22341
- }];
22342
- }
22343
- listName = listView.name;
22344
- if (crudMode) {
22345
- // 把crudMode属性传入到crud.mode属性值中
22346
- // 如果只配置了crudMode属性,则后续内核代码会自动生成对应mode的默认属性值,比如card,listItem
22347
- // 这样可以省去手动配置crud.card或crud.listItem属性的时间提高开发效率
22348
- crud = Object.assign({
22349
- mode: crudMode
22350
- }, crud);
22351
- }
22352
- if (!(ctx && ctx.defaults)) {
22353
- schemaKeys = _$1.difference(_$1.keys($schema), ["type", "showHeader", "id",
22354
- "crud", "crudDataFilter", "onCrudDataFilter", "env", "rebuildOn", "crudMode"]);
22355
- listSchema = _$1.pick(props, schemaKeys);
22356
- // className不传入crud组件,crud单独识别crudClassName属性
22357
- listSchema.className = crudClassName;
22358
- listSchema.onEvent = {}; // 为啥要将一个内置event放在此处?
22359
- // 下面expression中_isRelated参数判断的是列表视图分栏模式下,新建、编辑、删除相关子表记录时不应该刷新左侧(主表)列表视图组件
22360
- listSchema.onEvent["@data.changed.".concat(objectApiName)] = {
22361
- "actions": [
22362
- {
22363
- "args": {
22364
- "link": "/app/${appId}/${objectName}/view/${event.data.result.data.recordId}?side_object=${objectName}&side_listview_id=${listName}",
22365
- "blank": false
22366
- },
22367
- "actionType": "link",
22368
- "expression": "${!!!event.data.recordId && event.data.__deletedRecord != true && event.data._isRelated != true}" //是新建, 则进入详细页面.
22369
- },
22370
- {
22371
- "actionType": "reload",
22372
- "expression": "${(event.data.recordId || event.data.__deletedRecord === true || event.data.displayAs === 'split') && event.data._isRelated != true}" //不是新建, 或分栏模式下新建主对象记录, 则刷新列表
22373
- }
22374
- ]
22375
- };
22376
- //触发amis crud 高度重算
22377
- listSchema.onEvent["selectedChange"] = {
22378
- "actions": [
22379
- {
22380
- "actionType": "broadcast",
22381
- "args": {
22382
- "eventName": "@height.changed.".concat(objectApiName),
22383
- },
22384
- "data": {
22385
- "timeOut": 500
22386
- }
22387
- }
22388
- ]
22389
- };
22390
- defaults = {
22391
- listSchema: Object.assign({}, listSchema, crud)
22392
- };
22393
- }
22394
- setDataToComponentId = ctx && ctx.setDataToComponentId;
22395
- if (!setDataToComponentId) {
22396
- setDataToComponentId = "service_listview_".concat(objectApiName);
22397
- }
22398
- amisSchemaData = Object.assign({}, data, defaultData);
22399
- listViewId = (ctx === null || ctx === void 0 ? void 0 : ctx.listViewId) || amisSchemaData.listViewId;
22400
- allData = createObject(data, defaultData);
22401
- listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems, rowClassNameExpr: rowClassNameExpr, hiddenColumnOperation: hiddenColumnOperation, columns: columns, crudDataFilter: crudDataFilter, onCrudDataFilter: onCrudDataFilter, amisData: allData, env: env, requestAdaptor: requestAdaptor, adaptor: adaptor });
22402
- if (!headerSchema) {
22403
- headerSchema = getObjectListHeader$1(uiSchema, listName, ctx);
22404
- }
22405
- headerSchema.className = "steedos-object-listview-header " + headerSchema.className || "";
22406
- serviceData = Object.assign({}, { showDisplayAs: showDisplayAs, displayAs: displayAs, recordPermissions: uiSchema.permissions, _id: null, $listviewId: listName, isObjectListview: true });
22407
- if (_$1.has(props, 'objectApiName')) {
22408
- serviceData.objectName = objectApiName;
22409
- }
22410
- if (_$1.has(props, 'listName') && _$1.has(props, '$$editor')) {
22411
- serviceData.listName = listName;
22412
- }
22413
- if (!_$1.has(data, 'uiSchema')) {
22414
- serviceData.uiSchema = uiSchema;
22415
- }
22353
+ /**
22354
+ * Removes all key-value entries from the list cache.
22355
+ *
22356
+ * @private
22357
+ * @name clear
22358
+ * @memberOf ListCache
22359
+ */
22360
+
22361
+ function listCacheClear$1() {
22362
+ this.__data__ = [];
22363
+ this.size = 0;
22364
+ }
22365
+
22366
+ var _listCacheClear = listCacheClear$1;
22367
+
22368
+ /**
22369
+ * Performs a
22370
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
22371
+ * comparison between two values to determine if they are equivalent.
22372
+ *
22373
+ * @static
22374
+ * @memberOf _
22375
+ * @since 4.0.0
22376
+ * @category Lang
22377
+ * @param {*} value The value to compare.
22378
+ * @param {*} other The other value to compare.
22379
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
22380
+ * @example
22381
+ *
22382
+ * var object = { 'a': 1 };
22383
+ * var other = { 'a': 1 };
22384
+ *
22385
+ * _.eq(object, object);
22386
+ * // => true
22387
+ *
22388
+ * _.eq(object, other);
22389
+ * // => false
22390
+ *
22391
+ * _.eq('a', 'a');
22392
+ * // => true
22393
+ *
22394
+ * _.eq('a', Object('a'));
22395
+ * // => false
22396
+ *
22397
+ * _.eq(NaN, NaN);
22398
+ * // => true
22399
+ */
22400
+
22401
+ function eq$4(value, other) {
22402
+ return value === other || (value !== value && other !== other);
22403
+ }
22404
+
22405
+ var eq_1 = eq$4;
22406
+
22407
+ var eq$3 = eq_1;
22408
+
22409
+ /**
22410
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
22411
+ *
22412
+ * @private
22413
+ * @param {Array} array The array to inspect.
22414
+ * @param {*} key The key to search for.
22415
+ * @returns {number} Returns the index of the matched value, else `-1`.
22416
+ */
22417
+ function assocIndexOf$4(array, key) {
22418
+ var length = array.length;
22419
+ while (length--) {
22420
+ if (eq$3(array[length][0], key)) {
22421
+ return length;
22422
+ }
22423
+ }
22424
+ return -1;
22425
+ }
22426
+
22427
+ var _assocIndexOf = assocIndexOf$4;
22428
+
22429
+ var assocIndexOf$3 = _assocIndexOf;
22430
+
22431
+ /** Used for built-in method references. */
22432
+ var arrayProto = Array.prototype;
22433
+
22434
+ /** Built-in value references. */
22435
+ var splice = arrayProto.splice;
22436
+
22437
+ /**
22438
+ * Removes `key` and its value from the list cache.
22439
+ *
22440
+ * @private
22441
+ * @name delete
22442
+ * @memberOf ListCache
22443
+ * @param {string} key The key of the value to remove.
22444
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
22445
+ */
22446
+ function listCacheDelete$1(key) {
22447
+ var data = this.__data__,
22448
+ index = assocIndexOf$3(data, key);
22449
+
22450
+ if (index < 0) {
22451
+ return false;
22452
+ }
22453
+ var lastIndex = data.length - 1;
22454
+ if (index == lastIndex) {
22455
+ data.pop();
22456
+ } else {
22457
+ splice.call(data, index, 1);
22458
+ }
22459
+ --this.size;
22460
+ return true;
22461
+ }
22462
+
22463
+ var _listCacheDelete = listCacheDelete$1;
22464
+
22465
+ var assocIndexOf$2 = _assocIndexOf;
22466
+
22467
+ /**
22468
+ * Gets the list cache value for `key`.
22469
+ *
22470
+ * @private
22471
+ * @name get
22472
+ * @memberOf ListCache
22473
+ * @param {string} key The key of the value to get.
22474
+ * @returns {*} Returns the entry value.
22475
+ */
22476
+ function listCacheGet$1(key) {
22477
+ var data = this.__data__,
22478
+ index = assocIndexOf$2(data, key);
22479
+
22480
+ return index < 0 ? undefined : data[index][1];
22481
+ }
22482
+
22483
+ var _listCacheGet = listCacheGet$1;
22484
+
22485
+ var assocIndexOf$1 = _assocIndexOf;
22486
+
22487
+ /**
22488
+ * Checks if a list cache value for `key` exists.
22489
+ *
22490
+ * @private
22491
+ * @name has
22492
+ * @memberOf ListCache
22493
+ * @param {string} key The key of the entry to check.
22494
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
22495
+ */
22496
+ function listCacheHas$1(key) {
22497
+ return assocIndexOf$1(this.__data__, key) > -1;
22498
+ }
22499
+
22500
+ var _listCacheHas = listCacheHas$1;
22501
+
22502
+ var assocIndexOf = _assocIndexOf;
22503
+
22504
+ /**
22505
+ * Sets the list cache `key` to `value`.
22506
+ *
22507
+ * @private
22508
+ * @name set
22509
+ * @memberOf ListCache
22510
+ * @param {string} key The key of the value to set.
22511
+ * @param {*} value The value to set.
22512
+ * @returns {Object} Returns the list cache instance.
22513
+ */
22514
+ function listCacheSet$1(key, value) {
22515
+ var data = this.__data__,
22516
+ index = assocIndexOf(data, key);
22517
+
22518
+ if (index < 0) {
22519
+ ++this.size;
22520
+ data.push([key, value]);
22521
+ } else {
22522
+ data[index][1] = value;
22523
+ }
22524
+ return this;
22525
+ }
22526
+
22527
+ var _listCacheSet = listCacheSet$1;
22528
+
22529
+ var listCacheClear = _listCacheClear,
22530
+ listCacheDelete = _listCacheDelete,
22531
+ listCacheGet = _listCacheGet,
22532
+ listCacheHas = _listCacheHas,
22533
+ listCacheSet = _listCacheSet;
22534
+
22535
+ /**
22536
+ * Creates an list cache object.
22537
+ *
22538
+ * @private
22539
+ * @constructor
22540
+ * @param {Array} [entries] The key-value pairs to cache.
22541
+ */
22542
+ function ListCache$4(entries) {
22543
+ var index = -1,
22544
+ length = entries == null ? 0 : entries.length;
22545
+
22546
+ this.clear();
22547
+ while (++index < length) {
22548
+ var entry = entries[index];
22549
+ this.set(entry[0], entry[1]);
22550
+ }
22551
+ }
22552
+
22553
+ // Add methods to `ListCache`.
22554
+ ListCache$4.prototype.clear = listCacheClear;
22555
+ ListCache$4.prototype['delete'] = listCacheDelete;
22556
+ ListCache$4.prototype.get = listCacheGet;
22557
+ ListCache$4.prototype.has = listCacheHas;
22558
+ ListCache$4.prototype.set = listCacheSet;
22559
+
22560
+ var _ListCache = ListCache$4;
22561
+
22562
+ var ListCache$3 = _ListCache;
22563
+
22564
+ /**
22565
+ * Removes all key-value entries from the stack.
22566
+ *
22567
+ * @private
22568
+ * @name clear
22569
+ * @memberOf Stack
22570
+ */
22571
+ function stackClear$1() {
22572
+ this.__data__ = new ListCache$3;
22573
+ this.size = 0;
22574
+ }
22575
+
22576
+ var _stackClear = stackClear$1;
22577
+
22578
+ /**
22579
+ * Removes `key` and its value from the stack.
22580
+ *
22581
+ * @private
22582
+ * @name delete
22583
+ * @memberOf Stack
22584
+ * @param {string} key The key of the value to remove.
22585
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
22586
+ */
22587
+
22588
+ function stackDelete$1(key) {
22589
+ var data = this.__data__,
22590
+ result = data['delete'](key);
22591
+
22592
+ this.size = data.size;
22593
+ return result;
22594
+ }
22595
+
22596
+ var _stackDelete = stackDelete$1;
22597
+
22598
+ /**
22599
+ * Gets the stack value for `key`.
22600
+ *
22601
+ * @private
22602
+ * @name get
22603
+ * @memberOf Stack
22604
+ * @param {string} key The key of the value to get.
22605
+ * @returns {*} Returns the entry value.
22606
+ */
22607
+
22608
+ function stackGet$1(key) {
22609
+ return this.__data__.get(key);
22610
+ }
22611
+
22612
+ var _stackGet = stackGet$1;
22613
+
22614
+ /**
22615
+ * Checks if a stack value for `key` exists.
22616
+ *
22617
+ * @private
22618
+ * @name has
22619
+ * @memberOf Stack
22620
+ * @param {string} key The key of the entry to check.
22621
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
22622
+ */
22623
+
22624
+ function stackHas$1(key) {
22625
+ return this.__data__.has(key);
22626
+ }
22627
+
22628
+ var _stackHas = stackHas$1;
22629
+
22630
+ /**
22631
+ * Checks if `value` is the
22632
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
22633
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
22634
+ *
22635
+ * @static
22636
+ * @memberOf _
22637
+ * @since 0.1.0
22638
+ * @category Lang
22639
+ * @param {*} value The value to check.
22640
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
22641
+ * @example
22642
+ *
22643
+ * _.isObject({});
22644
+ * // => true
22645
+ *
22646
+ * _.isObject([1, 2, 3]);
22647
+ * // => true
22648
+ *
22649
+ * _.isObject(_.noop);
22650
+ * // => true
22651
+ *
22652
+ * _.isObject(null);
22653
+ * // => false
22654
+ */
22655
+
22656
+ function isObject$7(value) {
22657
+ var type = typeof value;
22658
+ return value != null && (type == 'object' || type == 'function');
22659
+ }
22660
+
22661
+ var isObject_1 = isObject$7;
22662
+
22663
+ var baseGetTag$2 = _baseGetTag,
22664
+ isObject$6 = isObject_1;
22665
+
22666
+ /** `Object#toString` result references. */
22667
+ var asyncTag = '[object AsyncFunction]',
22668
+ funcTag$1 = '[object Function]',
22669
+ genTag = '[object GeneratorFunction]',
22670
+ proxyTag = '[object Proxy]';
22671
+
22672
+ /**
22673
+ * Checks if `value` is classified as a `Function` object.
22674
+ *
22675
+ * @static
22676
+ * @memberOf _
22677
+ * @since 0.1.0
22678
+ * @category Lang
22679
+ * @param {*} value The value to check.
22680
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
22681
+ * @example
22682
+ *
22683
+ * _.isFunction(_);
22684
+ * // => true
22685
+ *
22686
+ * _.isFunction(/abc/);
22687
+ * // => false
22688
+ */
22689
+ function isFunction$3(value) {
22690
+ if (!isObject$6(value)) {
22691
+ return false;
22692
+ }
22693
+ // The use of `Object#toString` avoids issues with the `typeof` operator
22694
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
22695
+ var tag = baseGetTag$2(value);
22696
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
22697
+ }
22698
+
22699
+ var isFunction_1 = isFunction$3;
22700
+
22701
+ var root$2 = _root;
22702
+
22703
+ /** Used to detect overreaching core-js shims. */
22704
+ var coreJsData$1 = root$2['__core-js_shared__'];
22705
+
22706
+ var _coreJsData = coreJsData$1;
22707
+
22708
+ var coreJsData = _coreJsData;
22709
+
22710
+ /** Used to detect methods masquerading as native. */
22711
+ var maskSrcKey = (function() {
22712
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
22713
+ return uid ? ('Symbol(src)_1.' + uid) : '';
22714
+ }());
22715
+
22716
+ /**
22717
+ * Checks if `func` has its source masked.
22718
+ *
22719
+ * @private
22720
+ * @param {Function} func The function to check.
22721
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
22722
+ */
22723
+ function isMasked$1(func) {
22724
+ return !!maskSrcKey && (maskSrcKey in func);
22725
+ }
22726
+
22727
+ var _isMasked = isMasked$1;
22728
+
22729
+ /** Used for built-in method references. */
22730
+
22731
+ var funcProto$1 = Function.prototype;
22732
+
22733
+ /** Used to resolve the decompiled source of functions. */
22734
+ var funcToString$1 = funcProto$1.toString;
22735
+
22736
+ /**
22737
+ * Converts `func` to its source code.
22738
+ *
22739
+ * @private
22740
+ * @param {Function} func The function to convert.
22741
+ * @returns {string} Returns the source code.
22742
+ */
22743
+ function toSource$1(func) {
22744
+ if (func != null) {
22745
+ try {
22746
+ return funcToString$1.call(func);
22747
+ } catch (e) {}
22748
+ try {
22749
+ return (func + '');
22750
+ } catch (e) {}
22751
+ }
22752
+ return '';
22753
+ }
22754
+
22755
+ var _toSource = toSource$1;
22756
+
22757
+ var isFunction$2 = isFunction_1,
22758
+ isMasked = _isMasked,
22759
+ isObject$5 = isObject_1,
22760
+ toSource = _toSource;
22761
+
22762
+ /**
22763
+ * Used to match `RegExp`
22764
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
22765
+ */
22766
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
22767
+
22768
+ /** Used to detect host constructors (Safari). */
22769
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
22770
+
22771
+ /** Used for built-in method references. */
22772
+ var funcProto = Function.prototype,
22773
+ objectProto$7 = Object.prototype;
22774
+
22775
+ /** Used to resolve the decompiled source of functions. */
22776
+ var funcToString = funcProto.toString;
22777
+
22778
+ /** Used to check objects for own properties. */
22779
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
22780
+
22781
+ /** Used to detect if a method is native. */
22782
+ var reIsNative = RegExp('^' +
22783
+ funcToString.call(hasOwnProperty$6).replace(reRegExpChar, '\\$&')
22784
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
22785
+ );
22786
+
22787
+ /**
22788
+ * The base implementation of `_.isNative` without bad shim checks.
22789
+ *
22790
+ * @private
22791
+ * @param {*} value The value to check.
22792
+ * @returns {boolean} Returns `true` if `value` is a native function,
22793
+ * else `false`.
22794
+ */
22795
+ function baseIsNative$1(value) {
22796
+ if (!isObject$5(value) || isMasked(value)) {
22797
+ return false;
22798
+ }
22799
+ var pattern = isFunction$2(value) ? reIsNative : reIsHostCtor;
22800
+ return pattern.test(toSource(value));
22801
+ }
22802
+
22803
+ var _baseIsNative = baseIsNative$1;
22804
+
22805
+ /**
22806
+ * Gets the value at `key` of `object`.
22807
+ *
22808
+ * @private
22809
+ * @param {Object} [object] The object to query.
22810
+ * @param {string} key The key of the property to get.
22811
+ * @returns {*} Returns the property value.
22812
+ */
22813
+
22814
+ function getValue$1(object, key) {
22815
+ return object == null ? undefined : object[key];
22816
+ }
22817
+
22818
+ var _getValue = getValue$1;
22819
+
22820
+ var baseIsNative = _baseIsNative,
22821
+ getValue = _getValue;
22822
+
22823
+ /**
22824
+ * Gets the native function at `key` of `object`.
22825
+ *
22826
+ * @private
22827
+ * @param {Object} object The object to query.
22828
+ * @param {string} key The key of the method to get.
22829
+ * @returns {*} Returns the function if it's native, else `undefined`.
22830
+ */
22831
+ function getNative$3(object, key) {
22832
+ var value = getValue(object, key);
22833
+ return baseIsNative(value) ? value : undefined;
22834
+ }
22835
+
22836
+ var _getNative = getNative$3;
22837
+
22838
+ var getNative$2 = _getNative,
22839
+ root$1 = _root;
22840
+
22841
+ /* Built-in method references that are verified to be native. */
22842
+ var Map$2 = getNative$2(root$1, 'Map');
22843
+
22844
+ var _Map = Map$2;
22845
+
22846
+ var getNative$1 = _getNative;
22847
+
22848
+ /* Built-in method references that are verified to be native. */
22849
+ var nativeCreate$4 = getNative$1(Object, 'create');
22850
+
22851
+ var _nativeCreate = nativeCreate$4;
22852
+
22853
+ var nativeCreate$3 = _nativeCreate;
22854
+
22855
+ /**
22856
+ * Removes all key-value entries from the hash.
22857
+ *
22858
+ * @private
22859
+ * @name clear
22860
+ * @memberOf Hash
22861
+ */
22862
+ function hashClear$1() {
22863
+ this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
22864
+ this.size = 0;
22865
+ }
22866
+
22867
+ var _hashClear = hashClear$1;
22868
+
22869
+ /**
22870
+ * Removes `key` and its value from the hash.
22871
+ *
22872
+ * @private
22873
+ * @name delete
22874
+ * @memberOf Hash
22875
+ * @param {Object} hash The hash to modify.
22876
+ * @param {string} key The key of the value to remove.
22877
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
22878
+ */
22879
+
22880
+ function hashDelete$1(key) {
22881
+ var result = this.has(key) && delete this.__data__[key];
22882
+ this.size -= result ? 1 : 0;
22883
+ return result;
22884
+ }
22885
+
22886
+ var _hashDelete = hashDelete$1;
22887
+
22888
+ var nativeCreate$2 = _nativeCreate;
22889
+
22890
+ /** Used to stand-in for `undefined` hash values. */
22891
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
22892
+
22893
+ /** Used for built-in method references. */
22894
+ var objectProto$6 = Object.prototype;
22895
+
22896
+ /** Used to check objects for own properties. */
22897
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
22898
+
22899
+ /**
22900
+ * Gets the hash value for `key`.
22901
+ *
22902
+ * @private
22903
+ * @name get
22904
+ * @memberOf Hash
22905
+ * @param {string} key The key of the value to get.
22906
+ * @returns {*} Returns the entry value.
22907
+ */
22908
+ function hashGet$1(key) {
22909
+ var data = this.__data__;
22910
+ if (nativeCreate$2) {
22911
+ var result = data[key];
22912
+ return result === HASH_UNDEFINED$1 ? undefined : result;
22913
+ }
22914
+ return hasOwnProperty$5.call(data, key) ? data[key] : undefined;
22915
+ }
22916
+
22917
+ var _hashGet = hashGet$1;
22918
+
22919
+ var nativeCreate$1 = _nativeCreate;
22920
+
22921
+ /** Used for built-in method references. */
22922
+ var objectProto$5 = Object.prototype;
22923
+
22924
+ /** Used to check objects for own properties. */
22925
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
22926
+
22927
+ /**
22928
+ * Checks if a hash value for `key` exists.
22929
+ *
22930
+ * @private
22931
+ * @name has
22932
+ * @memberOf Hash
22933
+ * @param {string} key The key of the entry to check.
22934
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
22935
+ */
22936
+ function hashHas$1(key) {
22937
+ var data = this.__data__;
22938
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
22939
+ }
22940
+
22941
+ var _hashHas = hashHas$1;
22942
+
22943
+ var nativeCreate = _nativeCreate;
22944
+
22945
+ /** Used to stand-in for `undefined` hash values. */
22946
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
22947
+
22948
+ /**
22949
+ * Sets the hash `key` to `value`.
22950
+ *
22951
+ * @private
22952
+ * @name set
22953
+ * @memberOf Hash
22954
+ * @param {string} key The key of the value to set.
22955
+ * @param {*} value The value to set.
22956
+ * @returns {Object} Returns the hash instance.
22957
+ */
22958
+ function hashSet$1(key, value) {
22959
+ var data = this.__data__;
22960
+ this.size += this.has(key) ? 0 : 1;
22961
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
22962
+ return this;
22963
+ }
22964
+
22965
+ var _hashSet = hashSet$1;
22966
+
22967
+ var hashClear = _hashClear,
22968
+ hashDelete = _hashDelete,
22969
+ hashGet = _hashGet,
22970
+ hashHas = _hashHas,
22971
+ hashSet = _hashSet;
22972
+
22973
+ /**
22974
+ * Creates a hash object.
22975
+ *
22976
+ * @private
22977
+ * @constructor
22978
+ * @param {Array} [entries] The key-value pairs to cache.
22979
+ */
22980
+ function Hash$1(entries) {
22981
+ var index = -1,
22982
+ length = entries == null ? 0 : entries.length;
22983
+
22984
+ this.clear();
22985
+ while (++index < length) {
22986
+ var entry = entries[index];
22987
+ this.set(entry[0], entry[1]);
22988
+ }
22989
+ }
22990
+
22991
+ // Add methods to `Hash`.
22992
+ Hash$1.prototype.clear = hashClear;
22993
+ Hash$1.prototype['delete'] = hashDelete;
22994
+ Hash$1.prototype.get = hashGet;
22995
+ Hash$1.prototype.has = hashHas;
22996
+ Hash$1.prototype.set = hashSet;
22997
+
22998
+ var _Hash = Hash$1;
22999
+
23000
+ var Hash = _Hash,
23001
+ ListCache$2 = _ListCache,
23002
+ Map$1 = _Map;
23003
+
23004
+ /**
23005
+ * Removes all key-value entries from the map.
23006
+ *
23007
+ * @private
23008
+ * @name clear
23009
+ * @memberOf MapCache
23010
+ */
23011
+ function mapCacheClear$1() {
23012
+ this.size = 0;
23013
+ this.__data__ = {
23014
+ 'hash': new Hash,
23015
+ 'map': new (Map$1 || ListCache$2),
23016
+ 'string': new Hash
23017
+ };
23018
+ }
23019
+
23020
+ var _mapCacheClear = mapCacheClear$1;
23021
+
23022
+ /**
23023
+ * Checks if `value` is suitable for use as unique object key.
23024
+ *
23025
+ * @private
23026
+ * @param {*} value The value to check.
23027
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
23028
+ */
23029
+
23030
+ function isKeyable$1(value) {
23031
+ var type = typeof value;
23032
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
23033
+ ? (value !== '__proto__')
23034
+ : (value === null);
23035
+ }
23036
+
23037
+ var _isKeyable = isKeyable$1;
23038
+
23039
+ var isKeyable = _isKeyable;
23040
+
23041
+ /**
23042
+ * Gets the data for `map`.
23043
+ *
23044
+ * @private
23045
+ * @param {Object} map The map to query.
23046
+ * @param {string} key The reference key.
23047
+ * @returns {*} Returns the map data.
23048
+ */
23049
+ function getMapData$4(map, key) {
23050
+ var data = map.__data__;
23051
+ return isKeyable(key)
23052
+ ? data[typeof key == 'string' ? 'string' : 'hash']
23053
+ : data.map;
23054
+ }
23055
+
23056
+ var _getMapData = getMapData$4;
23057
+
23058
+ var getMapData$3 = _getMapData;
23059
+
23060
+ /**
23061
+ * Removes `key` and its value from the map.
23062
+ *
23063
+ * @private
23064
+ * @name delete
23065
+ * @memberOf MapCache
23066
+ * @param {string} key The key of the value to remove.
23067
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23068
+ */
23069
+ function mapCacheDelete$1(key) {
23070
+ var result = getMapData$3(this, key)['delete'](key);
23071
+ this.size -= result ? 1 : 0;
23072
+ return result;
23073
+ }
23074
+
23075
+ var _mapCacheDelete = mapCacheDelete$1;
23076
+
23077
+ var getMapData$2 = _getMapData;
23078
+
23079
+ /**
23080
+ * Gets the map value for `key`.
23081
+ *
23082
+ * @private
23083
+ * @name get
23084
+ * @memberOf MapCache
23085
+ * @param {string} key The key of the value to get.
23086
+ * @returns {*} Returns the entry value.
23087
+ */
23088
+ function mapCacheGet$1(key) {
23089
+ return getMapData$2(this, key).get(key);
23090
+ }
23091
+
23092
+ var _mapCacheGet = mapCacheGet$1;
23093
+
23094
+ var getMapData$1 = _getMapData;
23095
+
23096
+ /**
23097
+ * Checks if a map value for `key` exists.
23098
+ *
23099
+ * @private
23100
+ * @name has
23101
+ * @memberOf MapCache
23102
+ * @param {string} key The key of the entry to check.
23103
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23104
+ */
23105
+ function mapCacheHas$1(key) {
23106
+ return getMapData$1(this, key).has(key);
23107
+ }
23108
+
23109
+ var _mapCacheHas = mapCacheHas$1;
23110
+
23111
+ var getMapData = _getMapData;
23112
+
23113
+ /**
23114
+ * Sets the map `key` to `value`.
23115
+ *
23116
+ * @private
23117
+ * @name set
23118
+ * @memberOf MapCache
23119
+ * @param {string} key The key of the value to set.
23120
+ * @param {*} value The value to set.
23121
+ * @returns {Object} Returns the map cache instance.
23122
+ */
23123
+ function mapCacheSet$1(key, value) {
23124
+ var data = getMapData(this, key),
23125
+ size = data.size;
23126
+
23127
+ data.set(key, value);
23128
+ this.size += data.size == size ? 0 : 1;
23129
+ return this;
23130
+ }
23131
+
23132
+ var _mapCacheSet = mapCacheSet$1;
23133
+
23134
+ var mapCacheClear = _mapCacheClear,
23135
+ mapCacheDelete = _mapCacheDelete,
23136
+ mapCacheGet = _mapCacheGet,
23137
+ mapCacheHas = _mapCacheHas,
23138
+ mapCacheSet = _mapCacheSet;
23139
+
23140
+ /**
23141
+ * Creates a map cache object to store key-value pairs.
23142
+ *
23143
+ * @private
23144
+ * @constructor
23145
+ * @param {Array} [entries] The key-value pairs to cache.
23146
+ */
23147
+ function MapCache$1(entries) {
23148
+ var index = -1,
23149
+ length = entries == null ? 0 : entries.length;
23150
+
23151
+ this.clear();
23152
+ while (++index < length) {
23153
+ var entry = entries[index];
23154
+ this.set(entry[0], entry[1]);
23155
+ }
23156
+ }
23157
+
23158
+ // Add methods to `MapCache`.
23159
+ MapCache$1.prototype.clear = mapCacheClear;
23160
+ MapCache$1.prototype['delete'] = mapCacheDelete;
23161
+ MapCache$1.prototype.get = mapCacheGet;
23162
+ MapCache$1.prototype.has = mapCacheHas;
23163
+ MapCache$1.prototype.set = mapCacheSet;
23164
+
23165
+ var _MapCache = MapCache$1;
23166
+
23167
+ var ListCache$1 = _ListCache,
23168
+ Map = _Map,
23169
+ MapCache = _MapCache;
23170
+
23171
+ /** Used as the size to enable large array optimizations. */
23172
+ var LARGE_ARRAY_SIZE = 200;
23173
+
23174
+ /**
23175
+ * Sets the stack `key` to `value`.
23176
+ *
23177
+ * @private
23178
+ * @name set
23179
+ * @memberOf Stack
23180
+ * @param {string} key The key of the value to set.
23181
+ * @param {*} value The value to set.
23182
+ * @returns {Object} Returns the stack cache instance.
23183
+ */
23184
+ function stackSet$1(key, value) {
23185
+ var data = this.__data__;
23186
+ if (data instanceof ListCache$1) {
23187
+ var pairs = data.__data__;
23188
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
23189
+ pairs.push([key, value]);
23190
+ this.size = ++data.size;
23191
+ return this;
23192
+ }
23193
+ data = this.__data__ = new MapCache(pairs);
23194
+ }
23195
+ data.set(key, value);
23196
+ this.size = data.size;
23197
+ return this;
23198
+ }
23199
+
23200
+ var _stackSet = stackSet$1;
23201
+
23202
+ var ListCache = _ListCache,
23203
+ stackClear = _stackClear,
23204
+ stackDelete = _stackDelete,
23205
+ stackGet = _stackGet,
23206
+ stackHas = _stackHas,
23207
+ stackSet = _stackSet;
23208
+
23209
+ /**
23210
+ * Creates a stack cache object to store key-value pairs.
23211
+ *
23212
+ * @private
23213
+ * @constructor
23214
+ * @param {Array} [entries] The key-value pairs to cache.
23215
+ */
23216
+ function Stack$1(entries) {
23217
+ var data = this.__data__ = new ListCache(entries);
23218
+ this.size = data.size;
23219
+ }
23220
+
23221
+ // Add methods to `Stack`.
23222
+ Stack$1.prototype.clear = stackClear;
23223
+ Stack$1.prototype['delete'] = stackDelete;
23224
+ Stack$1.prototype.get = stackGet;
23225
+ Stack$1.prototype.has = stackHas;
23226
+ Stack$1.prototype.set = stackSet;
23227
+
23228
+ var _Stack = Stack$1;
23229
+
23230
+ var getNative = _getNative;
23231
+
23232
+ var defineProperty$2 = (function() {
23233
+ try {
23234
+ var func = getNative(Object, 'defineProperty');
23235
+ func({}, '', {});
23236
+ return func;
23237
+ } catch (e) {}
23238
+ }());
23239
+
23240
+ var _defineProperty = defineProperty$2;
23241
+
23242
+ var defineProperty$1 = _defineProperty;
23243
+
23244
+ /**
23245
+ * The base implementation of `assignValue` and `assignMergeValue` without
23246
+ * value checks.
23247
+ *
23248
+ * @private
23249
+ * @param {Object} object The object to modify.
23250
+ * @param {string} key The key of the property to assign.
23251
+ * @param {*} value The value to assign.
23252
+ */
23253
+ function baseAssignValue$3(object, key, value) {
23254
+ if (key == '__proto__' && defineProperty$1) {
23255
+ defineProperty$1(object, key, {
23256
+ 'configurable': true,
23257
+ 'enumerable': true,
23258
+ 'value': value,
23259
+ 'writable': true
23260
+ });
23261
+ } else {
23262
+ object[key] = value;
23263
+ }
23264
+ }
23265
+
23266
+ var _baseAssignValue = baseAssignValue$3;
23267
+
23268
+ var baseAssignValue$2 = _baseAssignValue,
23269
+ eq$2 = eq_1;
23270
+
23271
+ /**
23272
+ * This function is like `assignValue` except that it doesn't assign
23273
+ * `undefined` values.
23274
+ *
23275
+ * @private
23276
+ * @param {Object} object The object to modify.
23277
+ * @param {string} key The key of the property to assign.
23278
+ * @param {*} value The value to assign.
23279
+ */
23280
+ function assignMergeValue$2(object, key, value) {
23281
+ if ((value !== undefined && !eq$2(object[key], value)) ||
23282
+ (value === undefined && !(key in object))) {
23283
+ baseAssignValue$2(object, key, value);
23284
+ }
23285
+ }
23286
+
23287
+ var _assignMergeValue = assignMergeValue$2;
23288
+
23289
+ /**
23290
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
23291
+ *
23292
+ * @private
23293
+ * @param {boolean} [fromRight] Specify iterating from right to left.
23294
+ * @returns {Function} Returns the new base function.
23295
+ */
23296
+
23297
+ function createBaseFor$1(fromRight) {
23298
+ return function(object, iteratee, keysFunc) {
23299
+ var index = -1,
23300
+ iterable = Object(object),
23301
+ props = keysFunc(object),
23302
+ length = props.length;
23303
+
23304
+ while (length--) {
23305
+ var key = props[fromRight ? length : ++index];
23306
+ if (iteratee(iterable[key], key, iterable) === false) {
23307
+ break;
23308
+ }
23309
+ }
23310
+ return object;
23311
+ };
23312
+ }
23313
+
23314
+ var _createBaseFor = createBaseFor$1;
23315
+
23316
+ var createBaseFor = _createBaseFor;
23317
+
23318
+ /**
23319
+ * The base implementation of `baseForOwn` which iterates over `object`
23320
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
23321
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
23322
+ *
23323
+ * @private
23324
+ * @param {Object} object The object to iterate over.
23325
+ * @param {Function} iteratee The function invoked per iteration.
23326
+ * @param {Function} keysFunc The function to get the keys of `object`.
23327
+ * @returns {Object} Returns `object`.
23328
+ */
23329
+ var baseFor$1 = createBaseFor();
23330
+
23331
+ var _baseFor = baseFor$1;
23332
+
23333
+ var _cloneBuffer = {exports: {}};
23334
+
23335
+ (function (module, exports) {
23336
+ var root = _root;
23337
+
23338
+ /** Detect free variable `exports`. */
23339
+ var freeExports = exports && !exports.nodeType && exports;
23340
+
23341
+ /** Detect free variable `module`. */
23342
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
23343
+
23344
+ /** Detect the popular CommonJS extension `module.exports`. */
23345
+ var moduleExports = freeModule && freeModule.exports === freeExports;
23346
+
23347
+ /** Built-in value references. */
23348
+ var Buffer = moduleExports ? root.Buffer : undefined,
23349
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
23350
+
23351
+ /**
23352
+ * Creates a clone of `buffer`.
23353
+ *
23354
+ * @private
23355
+ * @param {Buffer} buffer The buffer to clone.
23356
+ * @param {boolean} [isDeep] Specify a deep clone.
23357
+ * @returns {Buffer} Returns the cloned buffer.
23358
+ */
23359
+ function cloneBuffer(buffer, isDeep) {
23360
+ if (isDeep) {
23361
+ return buffer.slice();
23362
+ }
23363
+ var length = buffer.length,
23364
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
23365
+
23366
+ buffer.copy(result);
23367
+ return result;
23368
+ }
23369
+
23370
+ module.exports = cloneBuffer;
23371
+ } (_cloneBuffer, _cloneBuffer.exports));
23372
+
23373
+ var root = _root;
23374
+
23375
+ /** Built-in value references. */
23376
+ var Uint8Array$2 = root.Uint8Array;
23377
+
23378
+ var _Uint8Array = Uint8Array$2;
23379
+
23380
+ var Uint8Array$1 = _Uint8Array;
23381
+
23382
+ /**
23383
+ * Creates a clone of `arrayBuffer`.
23384
+ *
23385
+ * @private
23386
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
23387
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
23388
+ */
23389
+ function cloneArrayBuffer$1(arrayBuffer) {
23390
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
23391
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
23392
+ return result;
23393
+ }
23394
+
23395
+ var _cloneArrayBuffer = cloneArrayBuffer$1;
23396
+
23397
+ var cloneArrayBuffer = _cloneArrayBuffer;
23398
+
23399
+ /**
23400
+ * Creates a clone of `typedArray`.
23401
+ *
23402
+ * @private
23403
+ * @param {Object} typedArray The typed array to clone.
23404
+ * @param {boolean} [isDeep] Specify a deep clone.
23405
+ * @returns {Object} Returns the cloned typed array.
23406
+ */
23407
+ function cloneTypedArray$1(typedArray, isDeep) {
23408
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
23409
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
23410
+ }
23411
+
23412
+ var _cloneTypedArray = cloneTypedArray$1;
23413
+
23414
+ /**
23415
+ * Copies the values of `source` to `array`.
23416
+ *
23417
+ * @private
23418
+ * @param {Array} source The array to copy values from.
23419
+ * @param {Array} [array=[]] The array to copy values to.
23420
+ * @returns {Array} Returns `array`.
23421
+ */
23422
+
23423
+ function copyArray$1(source, array) {
23424
+ var index = -1,
23425
+ length = source.length;
23426
+
23427
+ array || (array = Array(length));
23428
+ while (++index < length) {
23429
+ array[index] = source[index];
23430
+ }
23431
+ return array;
23432
+ }
23433
+
23434
+ var _copyArray = copyArray$1;
23435
+
23436
+ var isObject$4 = isObject_1;
23437
+
23438
+ /** Built-in value references. */
23439
+ var objectCreate = Object.create;
23440
+
23441
+ /**
23442
+ * The base implementation of `_.create` without support for assigning
23443
+ * properties to the created object.
23444
+ *
23445
+ * @private
23446
+ * @param {Object} proto The object to inherit from.
23447
+ * @returns {Object} Returns the new object.
23448
+ */
23449
+ var baseCreate$1 = (function() {
23450
+ function object() {}
23451
+ return function(proto) {
23452
+ if (!isObject$4(proto)) {
23453
+ return {};
23454
+ }
23455
+ if (objectCreate) {
23456
+ return objectCreate(proto);
23457
+ }
23458
+ object.prototype = proto;
23459
+ var result = new object;
23460
+ object.prototype = undefined;
23461
+ return result;
23462
+ };
23463
+ }());
23464
+
23465
+ var _baseCreate = baseCreate$1;
23466
+
23467
+ /** Used for built-in method references. */
23468
+
23469
+ var objectProto$4 = Object.prototype;
23470
+
23471
+ /**
23472
+ * Checks if `value` is likely a prototype object.
23473
+ *
23474
+ * @private
23475
+ * @param {*} value The value to check.
23476
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
23477
+ */
23478
+ function isPrototype$2(value) {
23479
+ var Ctor = value && value.constructor,
23480
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
23481
+
23482
+ return value === proto;
23483
+ }
23484
+
23485
+ var _isPrototype = isPrototype$2;
23486
+
23487
+ var baseCreate = _baseCreate,
23488
+ getPrototype = _getPrototype,
23489
+ isPrototype$1 = _isPrototype;
23490
+
23491
+ /**
23492
+ * Initializes an object clone.
23493
+ *
23494
+ * @private
23495
+ * @param {Object} object The object to clone.
23496
+ * @returns {Object} Returns the initialized clone.
23497
+ */
23498
+ function initCloneObject$1(object) {
23499
+ return (typeof object.constructor == 'function' && !isPrototype$1(object))
23500
+ ? baseCreate(getPrototype(object))
23501
+ : {};
23502
+ }
23503
+
23504
+ var _initCloneObject = initCloneObject$1;
23505
+
23506
+ var baseGetTag$1 = _baseGetTag,
23507
+ isObjectLike$3 = isObjectLike_1;
23508
+
23509
+ /** `Object#toString` result references. */
23510
+ var argsTag$1 = '[object Arguments]';
23511
+
23512
+ /**
23513
+ * The base implementation of `_.isArguments`.
23514
+ *
23515
+ * @private
23516
+ * @param {*} value The value to check.
23517
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
23518
+ */
23519
+ function baseIsArguments$1(value) {
23520
+ return isObjectLike$3(value) && baseGetTag$1(value) == argsTag$1;
23521
+ }
23522
+
23523
+ var _baseIsArguments = baseIsArguments$1;
23524
+
23525
+ var baseIsArguments = _baseIsArguments,
23526
+ isObjectLike$2 = isObjectLike_1;
23527
+
23528
+ /** Used for built-in method references. */
23529
+ var objectProto$3 = Object.prototype;
23530
+
23531
+ /** Used to check objects for own properties. */
23532
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
23533
+
23534
+ /** Built-in value references. */
23535
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
23536
+
23537
+ /**
23538
+ * Checks if `value` is likely an `arguments` object.
23539
+ *
23540
+ * @static
23541
+ * @memberOf _
23542
+ * @since 0.1.0
23543
+ * @category Lang
23544
+ * @param {*} value The value to check.
23545
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
23546
+ * else `false`.
23547
+ * @example
23548
+ *
23549
+ * _.isArguments(function() { return arguments; }());
23550
+ * // => true
23551
+ *
23552
+ * _.isArguments([1, 2, 3]);
23553
+ * // => false
23554
+ */
23555
+ var isArguments$2 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
23556
+ return isObjectLike$2(value) && hasOwnProperty$3.call(value, 'callee') &&
23557
+ !propertyIsEnumerable.call(value, 'callee');
23558
+ };
23559
+
23560
+ var isArguments_1 = isArguments$2;
23561
+
23562
+ /**
23563
+ * Checks if `value` is classified as an `Array` object.
23564
+ *
23565
+ * @static
23566
+ * @memberOf _
23567
+ * @since 0.1.0
23568
+ * @category Lang
23569
+ * @param {*} value The value to check.
23570
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
23571
+ * @example
23572
+ *
23573
+ * _.isArray([1, 2, 3]);
23574
+ * // => true
23575
+ *
23576
+ * _.isArray(document.body.children);
23577
+ * // => false
23578
+ *
23579
+ * _.isArray('abc');
23580
+ * // => false
23581
+ *
23582
+ * _.isArray(_.noop);
23583
+ * // => false
23584
+ */
23585
+
23586
+ var isArray$2 = Array.isArray;
23587
+
23588
+ var isArray_1 = isArray$2;
23589
+
23590
+ /** Used as references for various `Number` constants. */
23591
+
23592
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
23593
+
23594
+ /**
23595
+ * Checks if `value` is a valid array-like length.
23596
+ *
23597
+ * **Note:** This method is loosely based on
23598
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
23599
+ *
23600
+ * @static
23601
+ * @memberOf _
23602
+ * @since 4.0.0
23603
+ * @category Lang
23604
+ * @param {*} value The value to check.
23605
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
23606
+ * @example
23607
+ *
23608
+ * _.isLength(3);
23609
+ * // => true
23610
+ *
23611
+ * _.isLength(Number.MIN_VALUE);
23612
+ * // => false
23613
+ *
23614
+ * _.isLength(Infinity);
23615
+ * // => false
23616
+ *
23617
+ * _.isLength('3');
23618
+ * // => false
23619
+ */
23620
+ function isLength$2(value) {
23621
+ return typeof value == 'number' &&
23622
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
23623
+ }
23624
+
23625
+ var isLength_1 = isLength$2;
23626
+
23627
+ var isFunction$1 = isFunction_1,
23628
+ isLength$1 = isLength_1;
23629
+
23630
+ /**
23631
+ * Checks if `value` is array-like. A value is considered array-like if it's
23632
+ * not a function and has a `value.length` that's an integer greater than or
23633
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
23634
+ *
23635
+ * @static
23636
+ * @memberOf _
23637
+ * @since 4.0.0
23638
+ * @category Lang
23639
+ * @param {*} value The value to check.
23640
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
23641
+ * @example
23642
+ *
23643
+ * _.isArrayLike([1, 2, 3]);
23644
+ * // => true
23645
+ *
23646
+ * _.isArrayLike(document.body.children);
23647
+ * // => true
23648
+ *
23649
+ * _.isArrayLike('abc');
23650
+ * // => true
23651
+ *
23652
+ * _.isArrayLike(_.noop);
23653
+ * // => false
23654
+ */
23655
+ function isArrayLike$3(value) {
23656
+ return value != null && isLength$1(value.length) && !isFunction$1(value);
23657
+ }
23658
+
23659
+ var isArrayLike_1 = isArrayLike$3;
23660
+
23661
+ var isArrayLike$2 = isArrayLike_1,
23662
+ isObjectLike$1 = isObjectLike_1;
23663
+
23664
+ /**
23665
+ * This method is like `_.isArrayLike` except that it also checks if `value`
23666
+ * is an object.
23667
+ *
23668
+ * @static
23669
+ * @memberOf _
23670
+ * @since 4.0.0
23671
+ * @category Lang
23672
+ * @param {*} value The value to check.
23673
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
23674
+ * else `false`.
23675
+ * @example
23676
+ *
23677
+ * _.isArrayLikeObject([1, 2, 3]);
23678
+ * // => true
23679
+ *
23680
+ * _.isArrayLikeObject(document.body.children);
23681
+ * // => true
23682
+ *
23683
+ * _.isArrayLikeObject('abc');
23684
+ * // => false
23685
+ *
23686
+ * _.isArrayLikeObject(_.noop);
23687
+ * // => false
23688
+ */
23689
+ function isArrayLikeObject$1(value) {
23690
+ return isObjectLike$1(value) && isArrayLike$2(value);
23691
+ }
23692
+
23693
+ var isArrayLikeObject_1 = isArrayLikeObject$1;
23694
+
23695
+ var isBuffer$2 = {exports: {}};
23696
+
23697
+ /**
23698
+ * This method returns `false`.
23699
+ *
23700
+ * @static
23701
+ * @memberOf _
23702
+ * @since 4.13.0
23703
+ * @category Util
23704
+ * @returns {boolean} Returns `false`.
23705
+ * @example
23706
+ *
23707
+ * _.times(2, _.stubFalse);
23708
+ * // => [false, false]
23709
+ */
23710
+
23711
+ function stubFalse() {
23712
+ return false;
23713
+ }
23714
+
23715
+ var stubFalse_1 = stubFalse;
23716
+
23717
+ (function (module, exports) {
23718
+ var root = _root,
23719
+ stubFalse = stubFalse_1;
23720
+
23721
+ /** Detect free variable `exports`. */
23722
+ var freeExports = exports && !exports.nodeType && exports;
23723
+
23724
+ /** Detect free variable `module`. */
23725
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
23726
+
23727
+ /** Detect the popular CommonJS extension `module.exports`. */
23728
+ var moduleExports = freeModule && freeModule.exports === freeExports;
23729
+
23730
+ /** Built-in value references. */
23731
+ var Buffer = moduleExports ? root.Buffer : undefined;
23732
+
23733
+ /* Built-in method references for those with the same name as other `lodash` methods. */
23734
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
23735
+
23736
+ /**
23737
+ * Checks if `value` is a buffer.
23738
+ *
23739
+ * @static
23740
+ * @memberOf _
23741
+ * @since 4.3.0
23742
+ * @category Lang
23743
+ * @param {*} value The value to check.
23744
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
23745
+ * @example
23746
+ *
23747
+ * _.isBuffer(new Buffer(2));
23748
+ * // => true
23749
+ *
23750
+ * _.isBuffer(new Uint8Array(2));
23751
+ * // => false
23752
+ */
23753
+ var isBuffer = nativeIsBuffer || stubFalse;
23754
+
23755
+ module.exports = isBuffer;
23756
+ } (isBuffer$2, isBuffer$2.exports));
23757
+
23758
+ var baseGetTag = _baseGetTag,
23759
+ isLength = isLength_1,
23760
+ isObjectLike = isObjectLike_1;
23761
+
23762
+ /** `Object#toString` result references. */
23763
+ var argsTag = '[object Arguments]',
23764
+ arrayTag = '[object Array]',
23765
+ boolTag = '[object Boolean]',
23766
+ dateTag = '[object Date]',
23767
+ errorTag = '[object Error]',
23768
+ funcTag = '[object Function]',
23769
+ mapTag = '[object Map]',
23770
+ numberTag = '[object Number]',
23771
+ objectTag = '[object Object]',
23772
+ regexpTag = '[object RegExp]',
23773
+ setTag = '[object Set]',
23774
+ stringTag = '[object String]',
23775
+ weakMapTag = '[object WeakMap]';
23776
+
23777
+ var arrayBufferTag = '[object ArrayBuffer]',
23778
+ dataViewTag = '[object DataView]',
23779
+ float32Tag = '[object Float32Array]',
23780
+ float64Tag = '[object Float64Array]',
23781
+ int8Tag = '[object Int8Array]',
23782
+ int16Tag = '[object Int16Array]',
23783
+ int32Tag = '[object Int32Array]',
23784
+ uint8Tag = '[object Uint8Array]',
23785
+ uint8ClampedTag = '[object Uint8ClampedArray]',
23786
+ uint16Tag = '[object Uint16Array]',
23787
+ uint32Tag = '[object Uint32Array]';
23788
+
23789
+ /** Used to identify `toStringTag` values of typed arrays. */
23790
+ var typedArrayTags = {};
23791
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
23792
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
23793
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
23794
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
23795
+ typedArrayTags[uint32Tag] = true;
23796
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
23797
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
23798
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
23799
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
23800
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
23801
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
23802
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
23803
+ typedArrayTags[weakMapTag] = false;
23804
+
23805
+ /**
23806
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
23807
+ *
23808
+ * @private
23809
+ * @param {*} value The value to check.
23810
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
23811
+ */
23812
+ function baseIsTypedArray$1(value) {
23813
+ return isObjectLike(value) &&
23814
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
23815
+ }
23816
+
23817
+ var _baseIsTypedArray = baseIsTypedArray$1;
23818
+
23819
+ /**
23820
+ * The base implementation of `_.unary` without support for storing metadata.
23821
+ *
23822
+ * @private
23823
+ * @param {Function} func The function to cap arguments for.
23824
+ * @returns {Function} Returns the new capped function.
23825
+ */
23826
+
23827
+ function baseUnary$1(func) {
23828
+ return function(value) {
23829
+ return func(value);
23830
+ };
23831
+ }
23832
+
23833
+ var _baseUnary = baseUnary$1;
23834
+
23835
+ var _nodeUtil = {exports: {}};
23836
+
23837
+ (function (module, exports) {
23838
+ var freeGlobal = _freeGlobal;
23839
+
23840
+ /** Detect free variable `exports`. */
23841
+ var freeExports = exports && !exports.nodeType && exports;
23842
+
23843
+ /** Detect free variable `module`. */
23844
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
23845
+
23846
+ /** Detect the popular CommonJS extension `module.exports`. */
23847
+ var moduleExports = freeModule && freeModule.exports === freeExports;
23848
+
23849
+ /** Detect free variable `process` from Node.js. */
23850
+ var freeProcess = moduleExports && freeGlobal.process;
23851
+
23852
+ /** Used to access faster Node.js helpers. */
23853
+ var nodeUtil = (function() {
23854
+ try {
23855
+ // Use `util.types` for Node.js 10+.
23856
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
23857
+
23858
+ if (types) {
23859
+ return types;
23860
+ }
23861
+
23862
+ // Legacy `process.binding('util')` for Node.js < 10.
23863
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
23864
+ } catch (e) {}
23865
+ }());
23866
+
23867
+ module.exports = nodeUtil;
23868
+ } (_nodeUtil, _nodeUtil.exports));
23869
+
23870
+ var baseIsTypedArray = _baseIsTypedArray,
23871
+ baseUnary = _baseUnary,
23872
+ nodeUtil = _nodeUtil.exports;
23873
+
23874
+ /* Node.js helper references. */
23875
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
23876
+
23877
+ /**
23878
+ * Checks if `value` is classified as a typed array.
23879
+ *
23880
+ * @static
23881
+ * @memberOf _
23882
+ * @since 3.0.0
23883
+ * @category Lang
23884
+ * @param {*} value The value to check.
23885
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
23886
+ * @example
23887
+ *
23888
+ * _.isTypedArray(new Uint8Array);
23889
+ * // => true
23890
+ *
23891
+ * _.isTypedArray([]);
23892
+ * // => false
23893
+ */
23894
+ var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
23895
+
23896
+ var isTypedArray_1 = isTypedArray$2;
23897
+
23898
+ /**
23899
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
23900
+ *
23901
+ * @private
23902
+ * @param {Object} object The object to query.
23903
+ * @param {string} key The key of the property to get.
23904
+ * @returns {*} Returns the property value.
23905
+ */
23906
+
23907
+ function safeGet$2(object, key) {
23908
+ if (key === 'constructor' && typeof object[key] === 'function') {
23909
+ return;
23910
+ }
23911
+
23912
+ if (key == '__proto__') {
23913
+ return;
23914
+ }
23915
+
23916
+ return object[key];
23917
+ }
23918
+
23919
+ var _safeGet = safeGet$2;
23920
+
23921
+ var baseAssignValue$1 = _baseAssignValue,
23922
+ eq$1 = eq_1;
23923
+
23924
+ /** Used for built-in method references. */
23925
+ var objectProto$2 = Object.prototype;
23926
+
23927
+ /** Used to check objects for own properties. */
23928
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
23929
+
23930
+ /**
23931
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
23932
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
23933
+ * for equality comparisons.
23934
+ *
23935
+ * @private
23936
+ * @param {Object} object The object to modify.
23937
+ * @param {string} key The key of the property to assign.
23938
+ * @param {*} value The value to assign.
23939
+ */
23940
+ function assignValue$1(object, key, value) {
23941
+ var objValue = object[key];
23942
+ if (!(hasOwnProperty$2.call(object, key) && eq$1(objValue, value)) ||
23943
+ (value === undefined && !(key in object))) {
23944
+ baseAssignValue$1(object, key, value);
23945
+ }
23946
+ }
23947
+
23948
+ var _assignValue = assignValue$1;
23949
+
23950
+ var assignValue = _assignValue,
23951
+ baseAssignValue = _baseAssignValue;
23952
+
23953
+ /**
23954
+ * Copies properties of `source` to `object`.
23955
+ *
23956
+ * @private
23957
+ * @param {Object} source The object to copy properties from.
23958
+ * @param {Array} props The property identifiers to copy.
23959
+ * @param {Object} [object={}] The object to copy properties to.
23960
+ * @param {Function} [customizer] The function to customize copied values.
23961
+ * @returns {Object} Returns `object`.
23962
+ */
23963
+ function copyObject$1(source, props, object, customizer) {
23964
+ var isNew = !object;
23965
+ object || (object = {});
23966
+
23967
+ var index = -1,
23968
+ length = props.length;
23969
+
23970
+ while (++index < length) {
23971
+ var key = props[index];
23972
+
23973
+ var newValue = customizer
23974
+ ? customizer(object[key], source[key], key, object, source)
23975
+ : undefined;
23976
+
23977
+ if (newValue === undefined) {
23978
+ newValue = source[key];
23979
+ }
23980
+ if (isNew) {
23981
+ baseAssignValue(object, key, newValue);
23982
+ } else {
23983
+ assignValue(object, key, newValue);
23984
+ }
23985
+ }
23986
+ return object;
23987
+ }
23988
+
23989
+ var _copyObject = copyObject$1;
23990
+
23991
+ /**
23992
+ * The base implementation of `_.times` without support for iteratee shorthands
23993
+ * or max array length checks.
23994
+ *
23995
+ * @private
23996
+ * @param {number} n The number of times to invoke `iteratee`.
23997
+ * @param {Function} iteratee The function invoked per iteration.
23998
+ * @returns {Array} Returns the array of results.
23999
+ */
24000
+
24001
+ function baseTimes$1(n, iteratee) {
24002
+ var index = -1,
24003
+ result = Array(n);
24004
+
24005
+ while (++index < n) {
24006
+ result[index] = iteratee(index);
24007
+ }
24008
+ return result;
24009
+ }
24010
+
24011
+ var _baseTimes = baseTimes$1;
24012
+
24013
+ /** Used as references for various `Number` constants. */
24014
+
24015
+ var MAX_SAFE_INTEGER = 9007199254740991;
24016
+
24017
+ /** Used to detect unsigned integer values. */
24018
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
24019
+
24020
+ /**
24021
+ * Checks if `value` is a valid array-like index.
24022
+ *
24023
+ * @private
24024
+ * @param {*} value The value to check.
24025
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
24026
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
24027
+ */
24028
+ function isIndex$2(value, length) {
24029
+ var type = typeof value;
24030
+ length = length == null ? MAX_SAFE_INTEGER : length;
24031
+
24032
+ return !!length &&
24033
+ (type == 'number' ||
24034
+ (type != 'symbol' && reIsUint.test(value))) &&
24035
+ (value > -1 && value % 1 == 0 && value < length);
24036
+ }
24037
+
24038
+ var _isIndex = isIndex$2;
24039
+
24040
+ var baseTimes = _baseTimes,
24041
+ isArguments$1 = isArguments_1,
24042
+ isArray$1 = isArray_1,
24043
+ isBuffer$1 = isBuffer$2.exports,
24044
+ isIndex$1 = _isIndex,
24045
+ isTypedArray$1 = isTypedArray_1;
24046
+
24047
+ /** Used for built-in method references. */
24048
+ var objectProto$1 = Object.prototype;
24049
+
24050
+ /** Used to check objects for own properties. */
24051
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
24052
+
24053
+ /**
24054
+ * Creates an array of the enumerable property names of the array-like `value`.
24055
+ *
24056
+ * @private
24057
+ * @param {*} value The value to query.
24058
+ * @param {boolean} inherited Specify returning inherited property names.
24059
+ * @returns {Array} Returns the array of property names.
24060
+ */
24061
+ function arrayLikeKeys$1(value, inherited) {
24062
+ var isArr = isArray$1(value),
24063
+ isArg = !isArr && isArguments$1(value),
24064
+ isBuff = !isArr && !isArg && isBuffer$1(value),
24065
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
24066
+ skipIndexes = isArr || isArg || isBuff || isType,
24067
+ result = skipIndexes ? baseTimes(value.length, String) : [],
24068
+ length = result.length;
24069
+
24070
+ for (var key in value) {
24071
+ if ((inherited || hasOwnProperty$1.call(value, key)) &&
24072
+ !(skipIndexes && (
24073
+ // Safari 9 has enumerable `arguments.length` in strict mode.
24074
+ key == 'length' ||
24075
+ // Node.js 0.10 has enumerable non-index properties on buffers.
24076
+ (isBuff && (key == 'offset' || key == 'parent')) ||
24077
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
24078
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
24079
+ // Skip index properties.
24080
+ isIndex$1(key, length)
24081
+ ))) {
24082
+ result.push(key);
24083
+ }
24084
+ }
24085
+ return result;
24086
+ }
24087
+
24088
+ var _arrayLikeKeys = arrayLikeKeys$1;
24089
+
24090
+ /**
24091
+ * This function is like
24092
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
24093
+ * except that it includes inherited enumerable properties.
24094
+ *
24095
+ * @private
24096
+ * @param {Object} object The object to query.
24097
+ * @returns {Array} Returns the array of property names.
24098
+ */
24099
+
24100
+ function nativeKeysIn$1(object) {
24101
+ var result = [];
24102
+ if (object != null) {
24103
+ for (var key in Object(object)) {
24104
+ result.push(key);
24105
+ }
24106
+ }
24107
+ return result;
24108
+ }
24109
+
24110
+ var _nativeKeysIn = nativeKeysIn$1;
24111
+
24112
+ var isObject$3 = isObject_1,
24113
+ isPrototype = _isPrototype,
24114
+ nativeKeysIn = _nativeKeysIn;
24115
+
24116
+ /** Used for built-in method references. */
24117
+ var objectProto = Object.prototype;
24118
+
24119
+ /** Used to check objects for own properties. */
24120
+ var hasOwnProperty = objectProto.hasOwnProperty;
24121
+
24122
+ /**
24123
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
24124
+ *
24125
+ * @private
24126
+ * @param {Object} object The object to query.
24127
+ * @returns {Array} Returns the array of property names.
24128
+ */
24129
+ function baseKeysIn$1(object) {
24130
+ if (!isObject$3(object)) {
24131
+ return nativeKeysIn(object);
24132
+ }
24133
+ var isProto = isPrototype(object),
24134
+ result = [];
24135
+
24136
+ for (var key in object) {
24137
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
24138
+ result.push(key);
24139
+ }
24140
+ }
24141
+ return result;
24142
+ }
24143
+
24144
+ var _baseKeysIn = baseKeysIn$1;
24145
+
24146
+ var arrayLikeKeys = _arrayLikeKeys,
24147
+ baseKeysIn = _baseKeysIn,
24148
+ isArrayLike$1 = isArrayLike_1;
24149
+
24150
+ /**
24151
+ * Creates an array of the own and inherited enumerable property names of `object`.
24152
+ *
24153
+ * **Note:** Non-object values are coerced to objects.
24154
+ *
24155
+ * @static
24156
+ * @memberOf _
24157
+ * @since 3.0.0
24158
+ * @category Object
24159
+ * @param {Object} object The object to query.
24160
+ * @returns {Array} Returns the array of property names.
24161
+ * @example
24162
+ *
24163
+ * function Foo() {
24164
+ * this.a = 1;
24165
+ * this.b = 2;
24166
+ * }
24167
+ *
24168
+ * Foo.prototype.c = 3;
24169
+ *
24170
+ * _.keysIn(new Foo);
24171
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
24172
+ */
24173
+ function keysIn$2(object) {
24174
+ return isArrayLike$1(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
24175
+ }
24176
+
24177
+ var keysIn_1 = keysIn$2;
24178
+
24179
+ var copyObject = _copyObject,
24180
+ keysIn$1 = keysIn_1;
24181
+
24182
+ /**
24183
+ * Converts `value` to a plain object flattening inherited enumerable string
24184
+ * keyed properties of `value` to own properties of the plain object.
24185
+ *
24186
+ * @static
24187
+ * @memberOf _
24188
+ * @since 3.0.0
24189
+ * @category Lang
24190
+ * @param {*} value The value to convert.
24191
+ * @returns {Object} Returns the converted plain object.
24192
+ * @example
24193
+ *
24194
+ * function Foo() {
24195
+ * this.b = 2;
24196
+ * }
24197
+ *
24198
+ * Foo.prototype.c = 3;
24199
+ *
24200
+ * _.assign({ 'a': 1 }, new Foo);
24201
+ * // => { 'a': 1, 'b': 2 }
24202
+ *
24203
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
24204
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
24205
+ */
24206
+ function toPlainObject$1(value) {
24207
+ return copyObject(value, keysIn$1(value));
24208
+ }
24209
+
24210
+ var toPlainObject_1 = toPlainObject$1;
24211
+
24212
+ var assignMergeValue$1 = _assignMergeValue,
24213
+ cloneBuffer = _cloneBuffer.exports,
24214
+ cloneTypedArray = _cloneTypedArray,
24215
+ copyArray = _copyArray,
24216
+ initCloneObject = _initCloneObject,
24217
+ isArguments = isArguments_1,
24218
+ isArray = isArray_1,
24219
+ isArrayLikeObject = isArrayLikeObject_1,
24220
+ isBuffer = isBuffer$2.exports,
24221
+ isFunction = isFunction_1,
24222
+ isObject$2 = isObject_1,
24223
+ isPlainObject = isPlainObject_1,
24224
+ isTypedArray = isTypedArray_1,
24225
+ safeGet$1 = _safeGet,
24226
+ toPlainObject = toPlainObject_1;
24227
+
24228
+ /**
24229
+ * A specialized version of `baseMerge` for arrays and objects which performs
24230
+ * deep merges and tracks traversed objects enabling objects with circular
24231
+ * references to be merged.
24232
+ *
24233
+ * @private
24234
+ * @param {Object} object The destination object.
24235
+ * @param {Object} source The source object.
24236
+ * @param {string} key The key of the value to merge.
24237
+ * @param {number} srcIndex The index of `source`.
24238
+ * @param {Function} mergeFunc The function to merge values.
24239
+ * @param {Function} [customizer] The function to customize assigned values.
24240
+ * @param {Object} [stack] Tracks traversed source values and their merged
24241
+ * counterparts.
24242
+ */
24243
+ function baseMergeDeep$1(object, source, key, srcIndex, mergeFunc, customizer, stack) {
24244
+ var objValue = safeGet$1(object, key),
24245
+ srcValue = safeGet$1(source, key),
24246
+ stacked = stack.get(srcValue);
24247
+
24248
+ if (stacked) {
24249
+ assignMergeValue$1(object, key, stacked);
24250
+ return;
24251
+ }
24252
+ var newValue = customizer
24253
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
24254
+ : undefined;
24255
+
24256
+ var isCommon = newValue === undefined;
24257
+
24258
+ if (isCommon) {
24259
+ var isArr = isArray(srcValue),
24260
+ isBuff = !isArr && isBuffer(srcValue),
24261
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
24262
+
24263
+ newValue = srcValue;
24264
+ if (isArr || isBuff || isTyped) {
24265
+ if (isArray(objValue)) {
24266
+ newValue = objValue;
24267
+ }
24268
+ else if (isArrayLikeObject(objValue)) {
24269
+ newValue = copyArray(objValue);
24270
+ }
24271
+ else if (isBuff) {
24272
+ isCommon = false;
24273
+ newValue = cloneBuffer(srcValue, true);
24274
+ }
24275
+ else if (isTyped) {
24276
+ isCommon = false;
24277
+ newValue = cloneTypedArray(srcValue, true);
24278
+ }
24279
+ else {
24280
+ newValue = [];
24281
+ }
24282
+ }
24283
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
24284
+ newValue = objValue;
24285
+ if (isArguments(objValue)) {
24286
+ newValue = toPlainObject(objValue);
24287
+ }
24288
+ else if (!isObject$2(objValue) || isFunction(objValue)) {
24289
+ newValue = initCloneObject(srcValue);
24290
+ }
24291
+ }
24292
+ else {
24293
+ isCommon = false;
24294
+ }
24295
+ }
24296
+ if (isCommon) {
24297
+ // Recursively merge objects and arrays (susceptible to call stack limits).
24298
+ stack.set(srcValue, newValue);
24299
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
24300
+ stack['delete'](srcValue);
24301
+ }
24302
+ assignMergeValue$1(object, key, newValue);
24303
+ }
24304
+
24305
+ var _baseMergeDeep = baseMergeDeep$1;
24306
+
24307
+ var Stack = _Stack,
24308
+ assignMergeValue = _assignMergeValue,
24309
+ baseFor = _baseFor,
24310
+ baseMergeDeep = _baseMergeDeep,
24311
+ isObject$1 = isObject_1,
24312
+ keysIn = keysIn_1,
24313
+ safeGet = _safeGet;
24314
+
24315
+ /**
24316
+ * The base implementation of `_.merge` without support for multiple sources.
24317
+ *
24318
+ * @private
24319
+ * @param {Object} object The destination object.
24320
+ * @param {Object} source The source object.
24321
+ * @param {number} srcIndex The index of `source`.
24322
+ * @param {Function} [customizer] The function to customize merged values.
24323
+ * @param {Object} [stack] Tracks traversed source values and their merged
24324
+ * counterparts.
24325
+ */
24326
+ function baseMerge$1(object, source, srcIndex, customizer, stack) {
24327
+ if (object === source) {
24328
+ return;
24329
+ }
24330
+ baseFor(source, function(srcValue, key) {
24331
+ stack || (stack = new Stack);
24332
+ if (isObject$1(srcValue)) {
24333
+ baseMergeDeep(object, source, key, srcIndex, baseMerge$1, customizer, stack);
24334
+ }
24335
+ else {
24336
+ var newValue = customizer
24337
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
24338
+ : undefined;
24339
+
24340
+ if (newValue === undefined) {
24341
+ newValue = srcValue;
24342
+ }
24343
+ assignMergeValue(object, key, newValue);
24344
+ }
24345
+ }, keysIn);
24346
+ }
24347
+
24348
+ var _baseMerge = baseMerge$1;
24349
+
24350
+ /**
24351
+ * This method returns the first argument it receives.
24352
+ *
24353
+ * @static
24354
+ * @since 0.1.0
24355
+ * @memberOf _
24356
+ * @category Util
24357
+ * @param {*} value Any value.
24358
+ * @returns {*} Returns `value`.
24359
+ * @example
24360
+ *
24361
+ * var object = { 'a': 1 };
24362
+ *
24363
+ * console.log(_.identity(object) === object);
24364
+ * // => true
24365
+ */
24366
+
24367
+ function identity$2(value) {
24368
+ return value;
24369
+ }
24370
+
24371
+ var identity_1 = identity$2;
24372
+
24373
+ /**
24374
+ * A faster alternative to `Function#apply`, this function invokes `func`
24375
+ * with the `this` binding of `thisArg` and the arguments of `args`.
24376
+ *
24377
+ * @private
24378
+ * @param {Function} func The function to invoke.
24379
+ * @param {*} thisArg The `this` binding of `func`.
24380
+ * @param {Array} args The arguments to invoke `func` with.
24381
+ * @returns {*} Returns the result of `func`.
24382
+ */
24383
+
24384
+ function apply$1(func, thisArg, args) {
24385
+ switch (args.length) {
24386
+ case 0: return func.call(thisArg);
24387
+ case 1: return func.call(thisArg, args[0]);
24388
+ case 2: return func.call(thisArg, args[0], args[1]);
24389
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
24390
+ }
24391
+ return func.apply(thisArg, args);
24392
+ }
24393
+
24394
+ var _apply = apply$1;
24395
+
24396
+ var apply = _apply;
24397
+
24398
+ /* Built-in method references for those with the same name as other `lodash` methods. */
24399
+ var nativeMax = Math.max;
24400
+
24401
+ /**
24402
+ * A specialized version of `baseRest` which transforms the rest array.
24403
+ *
24404
+ * @private
24405
+ * @param {Function} func The function to apply a rest parameter to.
24406
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
24407
+ * @param {Function} transform The rest array transform.
24408
+ * @returns {Function} Returns the new function.
24409
+ */
24410
+ function overRest$1(func, start, transform) {
24411
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
24412
+ return function() {
24413
+ var args = arguments,
24414
+ index = -1,
24415
+ length = nativeMax(args.length - start, 0),
24416
+ array = Array(length);
24417
+
24418
+ while (++index < length) {
24419
+ array[index] = args[start + index];
24420
+ }
24421
+ index = -1;
24422
+ var otherArgs = Array(start + 1);
24423
+ while (++index < start) {
24424
+ otherArgs[index] = args[index];
24425
+ }
24426
+ otherArgs[start] = transform(array);
24427
+ return apply(func, this, otherArgs);
24428
+ };
24429
+ }
24430
+
24431
+ var _overRest = overRest$1;
24432
+
24433
+ /**
24434
+ * Creates a function that returns `value`.
24435
+ *
24436
+ * @static
24437
+ * @memberOf _
24438
+ * @since 2.4.0
24439
+ * @category Util
24440
+ * @param {*} value The value to return from the new function.
24441
+ * @returns {Function} Returns the new constant function.
24442
+ * @example
24443
+ *
24444
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
24445
+ *
24446
+ * console.log(objects);
24447
+ * // => [{ 'a': 1 }, { 'a': 1 }]
24448
+ *
24449
+ * console.log(objects[0] === objects[1]);
24450
+ * // => true
24451
+ */
24452
+
24453
+ function constant$1(value) {
24454
+ return function() {
24455
+ return value;
24456
+ };
24457
+ }
24458
+
24459
+ var constant_1 = constant$1;
24460
+
24461
+ var constant = constant_1,
24462
+ defineProperty = _defineProperty,
24463
+ identity$1 = identity_1;
24464
+
24465
+ /**
24466
+ * The base implementation of `setToString` without support for hot loop shorting.
24467
+ *
24468
+ * @private
24469
+ * @param {Function} func The function to modify.
24470
+ * @param {Function} string The `toString` result.
24471
+ * @returns {Function} Returns `func`.
24472
+ */
24473
+ var baseSetToString$1 = !defineProperty ? identity$1 : function(func, string) {
24474
+ return defineProperty(func, 'toString', {
24475
+ 'configurable': true,
24476
+ 'enumerable': false,
24477
+ 'value': constant(string),
24478
+ 'writable': true
24479
+ });
24480
+ };
24481
+
24482
+ var _baseSetToString = baseSetToString$1;
24483
+
24484
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
24485
+
24486
+ var HOT_COUNT = 800,
24487
+ HOT_SPAN = 16;
24488
+
24489
+ /* Built-in method references for those with the same name as other `lodash` methods. */
24490
+ var nativeNow = Date.now;
24491
+
24492
+ /**
24493
+ * Creates a function that'll short out and invoke `identity` instead
24494
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
24495
+ * milliseconds.
24496
+ *
24497
+ * @private
24498
+ * @param {Function} func The function to restrict.
24499
+ * @returns {Function} Returns the new shortable function.
24500
+ */
24501
+ function shortOut$1(func) {
24502
+ var count = 0,
24503
+ lastCalled = 0;
24504
+
24505
+ return function() {
24506
+ var stamp = nativeNow(),
24507
+ remaining = HOT_SPAN - (stamp - lastCalled);
24508
+
24509
+ lastCalled = stamp;
24510
+ if (remaining > 0) {
24511
+ if (++count >= HOT_COUNT) {
24512
+ return arguments[0];
24513
+ }
24514
+ } else {
24515
+ count = 0;
24516
+ }
24517
+ return func.apply(undefined, arguments);
24518
+ };
24519
+ }
24520
+
24521
+ var _shortOut = shortOut$1;
24522
+
24523
+ var baseSetToString = _baseSetToString,
24524
+ shortOut = _shortOut;
24525
+
24526
+ /**
24527
+ * Sets the `toString` method of `func` to return `string`.
24528
+ *
24529
+ * @private
24530
+ * @param {Function} func The function to modify.
24531
+ * @param {Function} string The `toString` result.
24532
+ * @returns {Function} Returns `func`.
24533
+ */
24534
+ var setToString$1 = shortOut(baseSetToString);
24535
+
24536
+ var _setToString = setToString$1;
24537
+
24538
+ var identity = identity_1,
24539
+ overRest = _overRest,
24540
+ setToString = _setToString;
24541
+
24542
+ /**
24543
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
24544
+ *
24545
+ * @private
24546
+ * @param {Function} func The function to apply a rest parameter to.
24547
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
24548
+ * @returns {Function} Returns the new function.
24549
+ */
24550
+ function baseRest$1(func, start) {
24551
+ return setToString(overRest(func, start, identity), func + '');
24552
+ }
24553
+
24554
+ var _baseRest = baseRest$1;
24555
+
24556
+ var eq = eq_1,
24557
+ isArrayLike = isArrayLike_1,
24558
+ isIndex = _isIndex,
24559
+ isObject = isObject_1;
24560
+
24561
+ /**
24562
+ * Checks if the given arguments are from an iteratee call.
24563
+ *
24564
+ * @private
24565
+ * @param {*} value The potential iteratee value argument.
24566
+ * @param {*} index The potential iteratee index or key argument.
24567
+ * @param {*} object The potential iteratee object argument.
24568
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
24569
+ * else `false`.
24570
+ */
24571
+ function isIterateeCall$1(value, index, object) {
24572
+ if (!isObject(object)) {
24573
+ return false;
24574
+ }
24575
+ var type = typeof index;
24576
+ if (type == 'number'
24577
+ ? (isArrayLike(object) && isIndex(index, object.length))
24578
+ : (type == 'string' && index in object)
24579
+ ) {
24580
+ return eq(object[index], value);
24581
+ }
24582
+ return false;
24583
+ }
24584
+
24585
+ var _isIterateeCall = isIterateeCall$1;
24586
+
24587
+ var baseRest = _baseRest,
24588
+ isIterateeCall = _isIterateeCall;
24589
+
24590
+ /**
24591
+ * Creates a function like `_.assign`.
24592
+ *
24593
+ * @private
24594
+ * @param {Function} assigner The function to assign values.
24595
+ * @returns {Function} Returns the new assigner function.
24596
+ */
24597
+ function createAssigner$1(assigner) {
24598
+ return baseRest(function(object, sources) {
24599
+ var index = -1,
24600
+ length = sources.length,
24601
+ customizer = length > 1 ? sources[length - 1] : undefined,
24602
+ guard = length > 2 ? sources[2] : undefined;
24603
+
24604
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
24605
+ ? (length--, customizer)
24606
+ : undefined;
24607
+
24608
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
24609
+ customizer = length < 3 ? undefined : customizer;
24610
+ length = 1;
24611
+ }
24612
+ object = Object(object);
24613
+ while (++index < length) {
24614
+ var source = sources[index];
24615
+ if (source) {
24616
+ assigner(object, source, index, customizer);
24617
+ }
24618
+ }
24619
+ return object;
24620
+ });
24621
+ }
24622
+
24623
+ var _createAssigner = createAssigner$1;
24624
+
24625
+ var baseMerge = _baseMerge,
24626
+ createAssigner = _createAssigner;
24627
+
24628
+ /**
24629
+ * This method is like `_.assign` except that it recursively merges own and
24630
+ * inherited enumerable string keyed properties of source objects into the
24631
+ * destination object. Source properties that resolve to `undefined` are
24632
+ * skipped if a destination value exists. Array and plain object properties
24633
+ * are merged recursively. Other objects and value types are overridden by
24634
+ * assignment. Source objects are applied from left to right. Subsequent
24635
+ * sources overwrite property assignments of previous sources.
24636
+ *
24637
+ * **Note:** This method mutates `object`.
24638
+ *
24639
+ * @static
24640
+ * @memberOf _
24641
+ * @since 0.5.0
24642
+ * @category Object
24643
+ * @param {Object} object The destination object.
24644
+ * @param {...Object} [sources] The source objects.
24645
+ * @returns {Object} Returns `object`.
24646
+ * @example
24647
+ *
24648
+ * var object = {
24649
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
24650
+ * };
24651
+ *
24652
+ * var other = {
24653
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
24654
+ * };
24655
+ *
24656
+ * _.merge(object, other);
24657
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
24658
+ */
24659
+ var merge = createAssigner(function(object, source, srcIndex) {
24660
+ baseMerge(object, source, srcIndex);
24661
+ });
24662
+
24663
+ var merge_1 = merge;
24664
+
24665
+ var Container = /** @class */ (function (_super) {
24666
+ __extends(Container, _super);
24667
+ function Container() {
24668
+ return _super !== null && _super.apply(this, arguments) || this;
24669
+ }
24670
+ Container.prototype.handleClick = function (e) {
24671
+ var _a = this.props, dispatchEvent = _a.dispatchEvent, data = _a.data;
24672
+ dispatchEvent(e, data);
24673
+ };
24674
+ Container.prototype.handleMouseEnter = function (e) {
24675
+ var _a = this.props, dispatchEvent = _a.dispatchEvent, data = _a.data;
24676
+ dispatchEvent(e, data);
24677
+ };
24678
+ Container.prototype.handleMouseLeave = function (e) {
24679
+ var _a = this.props, dispatchEvent = _a.dispatchEvent, data = _a.data;
24680
+ dispatchEvent(e, data);
24681
+ };
24682
+ Container.prototype.renderBody = function () {
24683
+ var _a = this.props, children = _a.children, body = _a.body, render = _a.render, cx = _a.classnames, bodyClassName = _a.bodyClassName, disabled = _a.disabled, wrapperBody = _a.wrapperBody;
24684
+ var isWrapperBody = wrapperBody !== null && wrapperBody !== void 0 ? wrapperBody : true;
24685
+ var containerBody = children
24686
+ ? typeof children === 'function'
24687
+ ? children(this.props)
24688
+ : children
24689
+ : body
24690
+ ? render('body', body, { disabled: disabled })
24691
+ : null;
24692
+ if (isWrapperBody) {
24693
+ return (React__default["default"].createElement("div", { className: cx('Container-body', bodyClassName) }, containerBody));
24694
+ }
24695
+ else {
24696
+ return containerBody;
24697
+ }
24698
+ };
24699
+ Container.prototype.render = function () {
24700
+ var _a = this.props, className = _a.className, wrapperComponent = _a.wrapperComponent, size = _a.size, cx = _a.classnames, style = _a.style, data = _a.data, draggable = _a.draggable, draggableConfig = _a.draggableConfig, id = _a.id, wrapperCustomStyle = _a.wrapperCustomStyle, env = _a.env, themeCss = _a.themeCss; _a.baseControlClassName; _a.testid;
24701
+ var finalDraggable = amisCore.isPureVariable(draggable)
24702
+ ? amisCore.resolveVariableAndFilter(draggable, data, '| raw')
24703
+ : draggable;
24704
+ var finalDraggableConfig = merge_1(Container.defaultProps.draggableConfig, amisCore.isPureVariable(draggableConfig)
24705
+ ? amisCore.resolveVariableAndFilter(draggableConfig, data, '| raw')
24706
+ : draggableConfig);
24707
+ var Component = wrapperComponent || 'div';
24708
+ var contentDom = (React__default["default"].createElement(Component, { className: cx('antd-Form antd-Form--horizontal steedos-amis-form Container', size && size !== 'none' ? "Container--".concat(size) : '', className, amisCore.setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'baseControlClassName', id: id, themeCss: themeCss })), amisCore.setThemeClassName(__assign$2(__assign$2({}, this.props), { name: 'wrapperCustomStyle', id: id, themeCss: wrapperCustomStyle }))), onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, style: amisCore.buildStyle(style, data) },
24709
+ this.renderBody(),
24710
+ React__default["default"].createElement(amisCore.CustomStyle, __assign$2({}, this.props, { config: {
24711
+ wrapperCustomStyle: wrapperCustomStyle,
24712
+ id: id,
24713
+ themeCss: themeCss,
24714
+ classNames: [
24715
+ {
24716
+ key: 'baseControlClassName'
24717
+ }
24718
+ ]
24719
+ }, env: env }))));
24720
+ return finalDraggable ? (React__default["default"].createElement(amisUi.DndContainer, __assign$2({}, finalDraggableConfig, { draggable: true }), contentDom)) : (contentDom);
24721
+ };
24722
+ Container.propsList = ['body', 'className'];
24723
+ Container.defaultProps = {
24724
+ className: '',
24725
+ draggableConfig: {
24726
+ axis: 'both',
24727
+ scale: 1,
24728
+ enableUserSelect: false
24729
+ }
24730
+ };
24731
+ __decorate([
24732
+ amisCore.autobind
24733
+ ], Container.prototype, "handleClick", null);
24734
+ __decorate([
24735
+ amisCore.autobind
24736
+ ], Container.prototype, "handleMouseEnter", null);
24737
+ __decorate([
24738
+ amisCore.autobind
24739
+ ], Container.prototype, "handleMouseLeave", null);
24740
+ return Container;
24741
+ }(React__default["default"].Component));
24742
+ // @Renderer({
24743
+ // type: 'container'
24744
+ // })
24745
+ var SteedosObject = /** @class */ (function (_super) {
24746
+ __extends(SteedosObject, _super);
24747
+ function SteedosObject() {
24748
+ return _super !== null && _super.apply(this, arguments) || this;
24749
+ }
24750
+ return SteedosObject;
24751
+ }(Container));
24752
+
24753
+ // md:border-b
24754
+ var AmisObjectForm = function (props) { return __awaiter(void 0, void 0, void 0, function () {
24755
+ var $schema, recordId, defaultData, mode, _a, layout, labelAlign, appId, fieldsExtend, _b, excludedFields, _c, fields, _d, form, _e, className, enableInitApi, initApiRequestAdaptor, initApiAdaptor, apiRequestAdaptor, apiAdaptor, enableTabs, tabsMode, submitSuccActions, data, formDataFilter, onFormDataFilter, env, objectApiName, schemaKeys, formSchema, defaults, options, globalData, amisSchema, uiSchema, allData, schema, schema, formData;
24756
+ return __generator(this, function (_f) {
24757
+ switch (_f.label) {
24758
+ case 0:
24759
+ $schema = props.$schema, recordId = props.recordId, defaultData = props.defaultData, mode = props.mode, _a = props.layout, layout = _a === void 0 ? "horizontal" : _a, labelAlign = props.labelAlign, appId = props.appId, fieldsExtend = props.fieldsExtend, _b = props.excludedFields, excludedFields = _b === void 0 ? null : _b, _c = props.fields, fields = _c === void 0 ? null : _c, _d = props.form, form = _d === void 0 ? {} : _d, _e = props.className, className = _e === void 0 ? "" : _e, enableInitApi = props.enableInitApi, initApiRequestAdaptor = props.initApiRequestAdaptor, initApiAdaptor = props.initApiAdaptor, apiRequestAdaptor = props.apiRequestAdaptor, apiAdaptor = props.apiAdaptor, enableTabs = props.enableTabs, tabsMode = props.tabsMode, submitSuccActions = props.submitSuccActions, data = props.data, formDataFilter = props.formDataFilter, onFormDataFilter = props.onFormDataFilter, env = props.env;
24760
+ objectApiName = props.objectApiName || "space_users";
24761
+ schemaKeys = _$1.difference(_$1.keys($schema), ["id", "form", "type", "mode", "layout", "defaultData", "formDataFilter", "onFormDataFilter", "env"]);
24762
+ formSchema = _$1.pick(props, schemaKeys);
24763
+ defaults = {
24764
+ formSchema: Object.assign({}, formSchema, form)
24765
+ };
24766
+ options = {
24767
+ recordId: recordId,
24768
+ mode: mode,
24769
+ layout: layout === 'vertical' ? 'normal' : layout,
24770
+ labelAlign: labelAlign,
24771
+ defaults: defaults,
24772
+ appId: appId,
24773
+ excludedFields: excludedFields,
24774
+ fields: fields
24775
+ };
24776
+ try {
24777
+ options.fieldsExtend = _$1.isString(fieldsExtend) ? JSON.parse(fieldsExtend) : fieldsExtend;
24778
+ }
24779
+ catch (error) {
24780
+ console.warn(error);
24781
+ }
24782
+ globalData = props.data.global || {};
24783
+ globalData.mode = mode === 'edit' ? 'edit' : 'read';
24784
+ allData = createObject(data, {});
24785
+ if (!(mode === 'edit')) return [3 /*break*/, 2];
24786
+ if (defaultData) {
24787
+ // 让ObjectForm支持props中的dafaultData属性与上层组件配置的defaultData混合
24788
+ // 为了解决相关表新建时如果是表单类型微页面,因为找不到ObjectForm在哪层而造成无法设置ObjectForm的defaultData的问题
24789
+ allData.defaultData = __assign$2({ "&": "${defaultData}" }, defaultData //这里的defaultData是form组件的defaultData属性值
24790
+ );
24791
+ }
24792
+ return [4 /*yield*/, getFormSchema(objectApiName, Object.assign({}, options, {
24793
+ initApiRequestAdaptor: initApiRequestAdaptor,
24794
+ initApiAdaptor: initApiAdaptor,
24795
+ apiRequestAdaptor: apiRequestAdaptor,
24796
+ apiAdaptor: apiAdaptor,
24797
+ enableTabs: enableTabs,
24798
+ tabsMode: tabsMode,
24799
+ submitSuccActions: submitSuccActions,
24800
+ formDataFilter: formDataFilter,
24801
+ onFormDataFilter: onFormDataFilter,
24802
+ amisData: allData,
24803
+ env: env
24804
+ }))];
24805
+ case 1:
24806
+ schema = _f.sent();
24807
+ amisSchema = schema.amisSchema;
24808
+ uiSchema = schema.uiSchema;
24809
+ return [3 /*break*/, 4];
24810
+ case 2:
24811
+ if (props.$$editor) {
24812
+ options.isEditor = true;
24813
+ }
24814
+ return [4 /*yield*/, getViewSchema(objectApiName, recordId, Object.assign({}, options, {
24815
+ enableInitApi: enableInitApi,
24816
+ initApiRequestAdaptor: initApiRequestAdaptor,
24817
+ initApiAdaptor: initApiAdaptor,
24818
+ enableTabs: enableTabs,
24819
+ tabsMode: tabsMode || "vertical",
24820
+ formDataFilter: formDataFilter,
24821
+ onFormDataFilter: onFormDataFilter,
24822
+ amisData: allData,
24823
+ env: env
24824
+ }))];
24825
+ case 3:
24826
+ schema = _f.sent();
24827
+ amisSchema = schema.amisSchema;
24828
+ uiSchema = schema.uiSchema;
24829
+ _f.label = 4;
24830
+ case 4:
24831
+ formData = {};
24832
+ // formData.recordId = recordId || null;
24833
+ // if(objectApiName){
24834
+ // formData.objectName = objectApiName;
24835
+ // }
24836
+ if (_$1.has(props, "recordId") && $schema.recordId !== "${recordId}") {
24837
+ formData.recordId = props.recordId;
24838
+ }
24839
+ amisSchema.className = "steedos-object-form ".concat(className);
24840
+ // console.log('AmisObjectForm amisSchema======>', amisSchema)
24841
+ amisSchema.data = Object.assign({}, amisSchema.data || {}, formData, { global: globalData, uiSchema: uiSchema });
24842
+ if (_$1.has(props, 'objectApiName')) {
24843
+ amisSchema.data.objectName = objectApiName;
24844
+ }
24845
+ return [2 /*return*/, amisSchema];
24846
+ }
24847
+ });
24848
+ }); };
24849
+
24850
+ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
24851
+ var $schema, top, perPage, _a, showHeader, data, defaultData, _b, className, _c, style, crudClassName, _d, showDisplayAs, sideSchema, _f, filterVisible, headerToolbarItems, rowClassNameExpr, _g, hiddenColumnOperation, columns, crudDataFilter, onCrudDataFilter, env, rebuildOn, crudMode, requestAdaptor, adaptor, headerSchema, ctx, crud, listName, defaults, objectApiName, uiSchema, displayAs, formFactor, isMobile, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, allData, listViewSchemaProps, serviceData;
24852
+ var _h;
24853
+ return __generator(this, function (_j) {
24854
+ switch (_j.label) {
24855
+ case 0:
24856
+ $schema = props.$schema, top = props.top, perPage = props.perPage, _a = props.showHeader, showHeader = _a === void 0 ? true : _a, data = props.data, defaultData = props.defaultData, _b = props.className, className = _b === void 0 ? "" : _b, _c = props.style, style = _c === void 0 ? {} : _c, crudClassName = props.crudClassName, _d = props.showDisplayAs, showDisplayAs = _d === void 0 ? false : _d, sideSchema = props.sideSchema, props.columnsTogglable, _f = props.filterVisible, filterVisible = _f === void 0 ? true : _f, headerToolbarItems = props.headerToolbarItems, rowClassNameExpr = props.rowClassNameExpr, _g = props.hiddenColumnOperation, hiddenColumnOperation = _g === void 0 ? false : _g, columns = props.columns, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env, rebuildOn = props.rebuildOn, crudMode = props.crudMode, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor;
24857
+ headerSchema = props.headerSchema;
24858
+ ctx = props.ctx;
24859
+ crud = props.crud || {};
24860
+ listName = (defaultData === null || defaultData === void 0 ? void 0 : defaultData.listName) || (data === null || data === void 0 ? void 0 : data.listName) || (props === null || props === void 0 ? void 0 : props.listName);
24861
+ defaults = {};
24862
+ objectApiName = props.objectApiName || "space_users";
24863
+ if (!ctx) {
24864
+ ctx = {};
24865
+ }
24866
+ return [4 /*yield*/, getUISchema(objectApiName, false)];
24867
+ case 1:
24868
+ uiSchema = _j.sent();
24869
+ displayAs = Router$1.getTabDisplayAs(objectApiName, uiSchema.enable_split);
24870
+ formFactor = props.formFactor;
24871
+ if (!formFactor) {
24872
+ isMobile = window.innerWidth < 768;
24873
+ if (isMobile) {
24874
+ formFactor = 'SMALL';
24875
+ }
24876
+ else {
24877
+ formFactor = 'LARGE';
24878
+ }
24879
+ }
24880
+ // 分栏模式不应该改变尺寸变量值
24881
+ // if(["split"].indexOf(displayAs) > -1){
24882
+ // formFactor = 'SMALL';
24883
+ // }
24884
+ if (!ctx.formFactor) {
24885
+ ctx.formFactor = formFactor;
24886
+ }
24887
+ listView = _$1.find(uiSchema.list_views, function (listView, name) {
24888
+ // 传入listViewName空值则取第一个
24889
+ if (!listName) {
24890
+ listName = name;
24891
+ }
24892
+ return name === listName || listView._id === listName;
24893
+ });
24894
+ if (!listView) {
24895
+ return [2 /*return*/, {
24896
+ "type": "alert",
24897
+ "body": "".concat(instance.t('frontend_listview_warning_start')).concat(listName).concat(instance.t('frontend_listview_warning_end')),
24898
+ "level": "warning",
24899
+ "showIcon": true,
24900
+ "className": "mb-3"
24901
+ }];
24902
+ }
24903
+ listName = listView.name;
24904
+ if (crudMode) {
24905
+ // 把crudMode属性传入到crud.mode属性值中
24906
+ // 如果只配置了crudMode属性,则后续内核代码会自动生成对应mode的默认属性值,比如card,listItem
24907
+ // 这样可以省去手动配置crud.card或crud.listItem属性的时间提高开发效率
24908
+ crud = Object.assign({
24909
+ mode: crudMode
24910
+ }, crud);
24911
+ }
24912
+ if (!(ctx && ctx.defaults)) {
24913
+ schemaKeys = _$1.difference(_$1.keys($schema), ["type", "showHeader", "id",
24914
+ "crud", "crudDataFilter", "onCrudDataFilter", "env", "rebuildOn", "crudMode"]);
24915
+ listSchema = _$1.pick(props, schemaKeys);
24916
+ // className不传入crud组件,crud单独识别crudClassName属性
24917
+ listSchema.className = crudClassName;
24918
+ listSchema.onEvent = {}; // 为啥要将一个内置event放在此处?
24919
+ // 下面expression中_isRelated参数判断的是列表视图分栏模式下,新建、编辑、删除相关子表记录时不应该刷新左侧(主表)列表视图组件
24920
+ listSchema.onEvent["@data.changed.".concat(objectApiName)] = {
24921
+ "actions": [
24922
+ {
24923
+ "args": {
24924
+ "link": "/app/${appId}/${objectName}/view/${event.data.result.data.recordId}?side_object=${objectName}&side_listview_id=${listName}",
24925
+ "blank": false
24926
+ },
24927
+ "actionType": "link",
24928
+ "expression": "${!!!event.data.recordId && event.data.__deletedRecord != true && event.data._isRelated != true}" //是新建, 则进入详细页面.
24929
+ },
24930
+ {
24931
+ "actionType": "reload",
24932
+ "expression": "${(event.data.recordId || event.data.__deletedRecord === true || event.data.displayAs === 'split') && event.data._isRelated != true}" //不是新建, 或分栏模式下新建主对象记录, 则刷新列表
24933
+ }
24934
+ ]
24935
+ };
24936
+ //触发amis crud 高度重算
24937
+ listSchema.onEvent["selectedChange"] = {
24938
+ "actions": [
24939
+ {
24940
+ "actionType": "broadcast",
24941
+ "args": {
24942
+ "eventName": "@height.changed.".concat(objectApiName),
24943
+ },
24944
+ "data": {
24945
+ "timeOut": 500
24946
+ }
24947
+ }
24948
+ ]
24949
+ };
24950
+ defaults = {
24951
+ listSchema: Object.assign({}, listSchema, crud)
24952
+ };
24953
+ }
24954
+ setDataToComponentId = ctx && ctx.setDataToComponentId;
24955
+ if (!setDataToComponentId) {
24956
+ setDataToComponentId = "service_listview_".concat(objectApiName);
24957
+ }
24958
+ amisSchemaData = Object.assign({}, data, defaultData);
24959
+ listViewId = (ctx === null || ctx === void 0 ? void 0 : ctx.listViewId) || amisSchemaData.listViewId;
24960
+ allData = createObject(data, defaultData);
24961
+ listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems, rowClassNameExpr: rowClassNameExpr, hiddenColumnOperation: hiddenColumnOperation, columns: columns, crudDataFilter: crudDataFilter, onCrudDataFilter: onCrudDataFilter, amisData: allData, env: env, requestAdaptor: requestAdaptor, adaptor: adaptor });
24962
+ if (!headerSchema) {
24963
+ headerSchema = getObjectListHeader$1(uiSchema, listName, ctx);
24964
+ }
24965
+ headerSchema.className = "steedos-object-listview-header " + headerSchema.className || "";
24966
+ serviceData = Object.assign({}, { showDisplayAs: showDisplayAs, displayAs: displayAs, recordPermissions: uiSchema.permissions, _id: null, $listviewId: listName, isObjectListview: true });
24967
+ if (_$1.has(props, 'objectApiName')) {
24968
+ serviceData.objectName = objectApiName;
24969
+ }
24970
+ if (_$1.has(props, 'listName') && _$1.has(props, '$$editor')) {
24971
+ serviceData.listName = listName;
24972
+ }
24973
+ if (!_$1.has(data, 'uiSchema')) {
24974
+ serviceData.uiSchema = uiSchema;
24975
+ }
22416
24976
  serviceData.defaultListName = listName ? listName : (_h = _$1.first(_$1.values(uiSchema.list_views))) === null || _h === void 0 ? void 0 : _h.name;
22417
24977
  if (!showHeader) {
22418
24978
  headerSchema = {};
@@ -24309,21 +26869,73 @@ function getLookupLinkOnClick(field, options) {
24309
26869
  });
24310
26870
  });
24311
26871
  }
26872
+ function addEditorClass(schema, editorClassName) {
26873
+ if (schema.className && typeof schema.className == 'string') {
26874
+ schema.className += " ".concat(editorClassName);
26875
+ }
26876
+ else if (schema.className && typeof schema.className == 'object') {
26877
+ schema.className[editorClassName] = "true";
26878
+ }
26879
+ else {
26880
+ schema.className = editorClassName;
26881
+ }
26882
+ }
26883
+ function generateRandomString$1(length) {
26884
+ if (length === void 0) { length = 5; }
26885
+ var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
26886
+ return _$1.sampleSize(characters, length).join('');
26887
+ }
24312
26888
  var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void 0, function () {
24313
- var steedosField, field, _a, readonly, _b, ctx, config, fStatic, env, inInputTable, className, _c, appId, formFactor, lookupATagClick, defaultSource, source, fieldBaseProps, referenceTo_1, fieldValue, fieldRefObject, _d, _e, _f, _g, res, valueOptions_1, fieldValue, values, disPlayValue_1, _h, _j, _k, _l, schema, fieldSchema, fieldValue, hasImageOrFile_1, fieldHtml_1, schema, map, tableFields, _m, _o, subField, subFieldName, fieldAmis, schema, error_1;
26889
+ var steedosField, field, _a, readonly, _b, ctx, config, fStatic, env, inInputTable, className, _c, appId, formFactor, editorClassName, lookupATagClick, defaultSource, source, fieldBaseProps, referenceTo_1, fieldValue, fieldRefObject, _d, _e, _f, _g, res, valueOptions_1, fieldValue, values, disPlayValue_1, _h, _j, _k, _l, schema, fieldSchema, fieldValue, hasImageOrFile_1, fieldHtml_1, schema, map, tableFields, _m, _o, subField, subFieldName, fieldAmis, schema, error_1;
24314
26890
  var _p, _q, _r, _s, _t, _u, _v, _w, _x, e_1, _y;
24315
- var _z, _0, _1, _2, _3, _4;
24316
- return __generator(this, function (_5) {
24317
- switch (_5.label) {
26891
+ var _z, _0, _1, _2, _3, _4, _5;
26892
+ return __generator(this, function (_6) {
26893
+ switch (_6.label) {
24318
26894
  case 0:
26895
+ if (_$1.has(props, '$$editor')) {
26896
+ setTimeout(function () {
26897
+ var fieldEditDiv = document.getElementsByName(props.id)[0];
26898
+ if (fieldEditDiv) {
26899
+ if (props.config.is_wide) {
26900
+ fieldEditDiv.style.gridColumn = 'span 2 / span 2';
26901
+ }
26902
+ else {
26903
+ fieldEditDiv.style.gridColumn = "";
26904
+ }
26905
+ var amisFieldEditDiv_1 = fieldEditDiv.children[0];
26906
+ //拖动字段后, 也要清理amis字段的编辑属性.
26907
+ setInterval(function () {
26908
+ if (amisFieldEditDiv_1) {
26909
+ amisFieldEditDiv_1.removeAttribute("data-editor-id");
26910
+ amisFieldEditDiv_1.removeAttribute("name");
26911
+ amisFieldEditDiv_1.removeAttribute("data-visible");
26912
+ amisFieldEditDiv_1.removeAttribute("data-hide-text");
26913
+ }
26914
+ }, 200);
26915
+ }
26916
+ }, 200);
26917
+ }
26918
+ if (!props.config) {
26919
+ props.config = {};
26920
+ }
26921
+ if (!props.config.object) {
26922
+ props.config.object = ((_z = props.data) === null || _z === void 0 ? void 0 : _z.objectName) || '';
26923
+ }
26924
+ if (!props.config.name) {
26925
+ props.config.name = "f".concat(generateRandomString$1(5));
26926
+ }
24319
26927
  steedosField = null;
24320
26928
  field = props.field, _a = props.readonly, readonly = _a === void 0 ? false : _a, _b = props.ctx, ctx = _b === void 0 ? {} : _b, config = props.config, props.$schema, fStatic = props.static, env = props.env, inInputTable = props.inInputTable, className = props.className;
24321
26929
  _c = props.data || {}, appId = _c.appId, formFactor = _c.formFactor;
24322
- // console.log(`AmisSteedosField`, props)
24323
- // if($schema.config && isString($schema.config)){
24324
- // $schema.config = JSON.parse($schema.config)
24325
- // props.config = $schema.config
24326
- // }
26930
+ editorClassName = "";
26931
+ if (props.$$editor) {
26932
+ if (config.amis) {
26933
+ if (config.amis.name !== config.name) {
26934
+ config.amis.name = config.name;
26935
+ }
26936
+ }
26937
+ editorClassName = "mx-10";
26938
+ }
24327
26939
  if (_$1.isString(ctx)) {
24328
26940
  ctx = JSON.parse(ctx);
24329
26941
  }
@@ -24346,9 +26958,9 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24346
26958
  // 字段配置为只读,强制走fStatic模式,加上_display判断是为了不影响历史代码,比如直接在ObjectForm中调用steedos-field组件
24347
26959
  fStatic = true;
24348
26960
  }
24349
- _5.label = 1;
26961
+ _6.label = 1;
24350
26962
  case 1:
24351
- _5.trys.push([1, 22, , 23]);
26963
+ _6.trys.push([1, 22, , 23]);
24352
26964
  if (!(fStatic && (steedosField.type === 'lookup' || steedosField.type === 'master_detail'))) return [3 /*break*/, 16];
24353
26965
  lookupATagClick = 'onclick="return false;"';
24354
26966
  if (window.innerWidth < 768) {
@@ -24374,14 +26986,14 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24374
26986
  defaultSource.adaptor = "\n var options = ".concat(JSON.stringify(steedosField.options), "\n if(api.body.$term){\n options = _.filter(options, function(o) {\n var label = o.label;\n return label.toLowerCase().indexOf(api.body.$term.toLowerCase()) > -1;\n });\n }\n if(!payload.data){\n payload.data = {};\n }\n payload.data.options = options;\n return payload;\n ");
24375
26987
  }
24376
26988
  }
24377
- source = ((_z = steedosField.amis) === null || _z === void 0 ? void 0 : _z.source) || ((_0 = steedosField.amis) === null || _0 === void 0 ? void 0 : _0.autoComplete) || defaultSource;
26989
+ source = ((_0 = steedosField.amis) === null || _0 === void 0 ? void 0 : _0.source) || ((_1 = steedosField.amis) === null || _1 === void 0 ? void 0 : _1.autoComplete) || defaultSource;
24378
26990
  fieldBaseProps = {
24379
26991
  multiple: steedosField.multiple,
24380
26992
  name: steedosField.name,
24381
26993
  label: steedosField.label,
24382
26994
  static: true,
24383
26995
  required: steedosField.required,
24384
- className: "".concat(className || '', " ").concat(((_1 = steedosField.amis) === null || _1 === void 0 ? void 0 : _1.className) || '')
26996
+ className: "".concat(className || '', " ").concat(((_2 = steedosField.amis) === null || _2 === void 0 ? void 0 : _2.className) || '')
24385
26997
  };
24386
26998
  if (!inInputTable) return [3 /*break*/, 2];
24387
26999
  fieldBaseProps = Object.assign({}, fieldBaseProps, { type: 'select', source: source });
@@ -24390,7 +27002,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24390
27002
  referenceTo_1 = steedosField.reference_to;
24391
27003
  if (!referenceTo_1) return [3 /*break*/, 14];
24392
27004
  if (_$1.isArray(referenceTo_1)) {
24393
- fieldValue = (_2 = props.data) === null || _2 === void 0 ? void 0 : _2[steedosField.name];
27005
+ fieldValue = (_3 = props.data) === null || _3 === void 0 ? void 0 : _3[steedosField.name];
24394
27006
  if (fieldValue && fieldValue.o) {
24395
27007
  referenceTo_1 = fieldValue.o;
24396
27008
  }
@@ -24404,7 +27016,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24404
27016
  }
24405
27017
  return [4 /*yield*/, getUISchema(referenceTo_1)];
24406
27018
  case 3:
24407
- fieldRefObject = _5.sent();
27019
+ fieldRefObject = _6.sent();
24408
27020
  if (!(props.data._display && _$1.has(props.data._display, steedosField.name))) return [3 /*break*/, 7];
24409
27021
  _e = (_d = Object).assign;
24410
27022
  _f = [{}, fieldBaseProps];
@@ -24465,8 +27077,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24465
27077
  formFactor: formFactor
24466
27078
  })];
24467
27079
  case 5:
24468
- _g = _5.sent();
24469
- _5.label = 6;
27080
+ _g = _6.sent();
27081
+ _6.label = 6;
24470
27082
  case 6:
24471
27083
  fieldBaseProps = _e.apply(_d, _f.concat([(_p.body = [(_q.body = [
24472
27084
  (_r.items = (
@@ -24485,9 +27097,9 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24485
27097
  return [3 /*break*/, 13];
24486
27098
  case 7: return [4 /*yield*/, env.fetcher(source, props.data)];
24487
27099
  case 8:
24488
- res = _5.sent();
24489
- valueOptions_1 = ((_3 = res === null || res === void 0 ? void 0 : res.data) === null || _3 === void 0 ? void 0 : _3.options) || [];
24490
- fieldValue = (_4 = props.data) === null || _4 === void 0 ? void 0 : _4[steedosField.name];
27100
+ res = _6.sent();
27101
+ valueOptions_1 = ((_4 = res === null || res === void 0 ? void 0 : res.data) === null || _4 === void 0 ? void 0 : _4.options) || [];
27102
+ fieldValue = (_5 = props.data) === null || _5 === void 0 ? void 0 : _5[steedosField.name];
24491
27103
  values = fieldValue;
24492
27104
  if (_$1.isString(values)) {
24493
27105
  values = [values];
@@ -24560,8 +27172,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24560
27172
  formFactor: formFactor
24561
27173
  })];
24562
27174
  case 10:
24563
- _l = _5.sent();
24564
- _5.label = 11;
27175
+ _l = _6.sent();
27176
+ _6.label = 11;
24565
27177
  case 11:
24566
27178
  fieldBaseProps = _j.apply(_h, _k.concat([(_t.body = (_u.body = [
24567
27179
  (_w.items = (
@@ -24574,14 +27186,15 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24574
27186
  return [3 /*break*/, 13];
24575
27187
  case 12:
24576
27188
  fieldBaseProps = Object.assign({}, fieldBaseProps, { type: 'static', tpl: '-', className: "".concat(fieldBaseProps.className || '', " text-muted") });
24577
- _5.label = 13;
27189
+ _6.label = 13;
24578
27190
  case 13: return [3 /*break*/, 15];
24579
27191
  case 14:
24580
27192
  fieldBaseProps = Object.assign({}, fieldBaseProps, { type: 'select', source: source });
24581
- _5.label = 15;
27193
+ _6.label = 15;
24582
27194
  case 15:
24583
27195
  schema = Object.assign({}, fieldBaseProps, _$1.pick(steedosField.amis || {}, ['className', 'inline', 'label', 'labelAlign', 'name', 'labelRemark', 'description', 'placeholder', 'staticClassName', 'staticLabelClassName', 'staticInputClassName', 'staticSchema']));
24584
27196
  schema.placeholder = "";
27197
+ addEditorClass(schema, editorClassName);
24585
27198
  // console.log(`steedos field [lookup] schema:`, schema)
24586
27199
  return [2 /*return*/, schema];
24587
27200
  case 16:
@@ -24589,7 +27202,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24589
27202
  if (!props.data.hasOwnProperty("_display")) return [3 /*break*/, 18];
24590
27203
  return [4 /*yield*/, index.convertSFieldToAmisField(steedosField, true, ctx)];
24591
27204
  case 17:
24592
- fieldSchema = _5.sent();
27205
+ fieldSchema = _6.sent();
24593
27206
  if (steedosField.type === 'file' && fieldSchema.disabled) {
24594
27207
  fieldValue = fieldSchema.value;
24595
27208
  if (fieldValue && fieldValue.length) {
@@ -24628,6 +27241,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24628
27241
  }];
24629
27242
  }
24630
27243
  }
27244
+ addEditorClass(fieldSchema, editorClassName);
24631
27245
  return [2 /*return*/, fieldSchema];
24632
27246
  case 18:
24633
27247
  schema = Object.assign({}, steedosField, {
@@ -24839,6 +27453,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24839
27453
  });
24840
27454
  }
24841
27455
  Object.assign(schema, steedosField.amis || {});
27456
+ addEditorClass(schema, editorClassName);
24842
27457
  return [2 /*return*/, schema];
24843
27458
  case 19:
24844
27459
  if (!ctx.className) {
@@ -24902,12 +27517,13 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
24902
27517
  }
24903
27518
  return [4 /*yield*/, index.convertSFieldToAmisField(steedosField, readonly, ctx)];
24904
27519
  case 20:
24905
- schema = _5.sent();
27520
+ schema = _6.sent();
27521
+ addEditorClass(schema, editorClassName);
24906
27522
  // console.log(`AmisSteedosField return schema`, schema)
24907
27523
  return [2 /*return*/, schema];
24908
27524
  case 21: return [3 /*break*/, 23];
24909
27525
  case 22:
24910
- error_1 = _5.sent();
27526
+ error_1 = _6.sent();
24911
27527
  console.log("error", error_1);
24912
27528
  return [3 /*break*/, 23];
24913
27529
  case 23: return [2 /*return*/, null];
@@ -25220,6 +27836,120 @@ var AmisRecordDetailMini = function (props) { return __awaiter(void 0, void 0, v
25220
27836
  });
25221
27837
  }); };
25222
27838
 
27839
+ function generateRandomString(length) {
27840
+ if (length === void 0) { length = 5; }
27841
+ var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
27842
+ return _$1.sampleSize(characters, length).join('');
27843
+ }
27844
+ // 通用函数生成器
27845
+ var createFieldFunction = function (type) {
27846
+ return function (props) { return __awaiter(void 0, void 0, void 0, function () {
27847
+ var _a;
27848
+ return __generator(this, function (_b) {
27849
+ switch (_b.label) {
27850
+ case 0:
27851
+ if (!props.config) {
27852
+ props.config = {};
27853
+ }
27854
+ if (!props.config.object) {
27855
+ props.config.object = ((_a = props.data) === null || _a === void 0 ? void 0 : _a.objectName) || '';
27856
+ }
27857
+ if (!props.config.name) {
27858
+ props.config.name = "f".concat(generateRandomString(5));
27859
+ }
27860
+ if (_$1.has(props, '$$editor')) {
27861
+ // props.config = Object.assign({}, props.config, {label: `${props.config.label}:${props.config.name}`})
27862
+ if (props.config.hidden || props.config.visible_on === '{{false}}') {
27863
+ props.config = Object.assign({}, props.config, { label: "".concat(props.config.label, "(\u9690\u85CF)"), visible_on: null });
27864
+ }
27865
+ }
27866
+ return [4 /*yield*/, AmisSteedosField(props)
27867
+ // {
27868
+ // type: "steedos-field",
27869
+ // config: Object.assign({}, props.config || {}, {
27870
+ // type: type
27871
+ // })
27872
+ // };
27873
+ ];
27874
+ case 1: return [2 /*return*/, _b.sent()
27875
+ // {
27876
+ // type: "steedos-field",
27877
+ // config: Object.assign({}, props.config || {}, {
27878
+ // type: type
27879
+ // })
27880
+ // };
27881
+ ];
27882
+ }
27883
+ });
27884
+ }); };
27885
+ };
27886
+ // 针对每个字段类型生成函数和元数据
27887
+ var fieldTypes = [
27888
+ { name: "Text", type: "text", title: "文本", icon: "fa-fw fa fa-list-alt" },
27889
+ { name: "Textarea", type: "textarea", title: "多行文本", icon: "fa-fw fa fa-list-alt" },
27890
+ { name: "Html", type: "html", title: "HTML", icon: "fa-fw fa fa-code" },
27891
+ { name: "Lookup", type: "lookup", title: "查找", icon: "fa-fw fa fa-search" },
27892
+ { name: "MasterDetail", type: "master_detail", title: "主细节", icon: "fa-fw fa fa-link" },
27893
+ { name: "Select", type: "select", title: "选择", icon: "fa-fw fa fa-list" },
27894
+ { name: "Boolean", type: "boolean", title: "布尔", icon: "fa-fw fa fa-check" },
27895
+ { name: "Date", type: "date", title: "日期", icon: "fa-fw fa fa-calendar" },
27896
+ { name: "Datetime", type: "datetime", title: "日期时间", icon: "fa-fw fa fa-clock" },
27897
+ { name: "Time", type: "time", title: "时间", icon: "fa-fw fa fa-clock" },
27898
+ { name: "Number", type: "number", title: "数字", icon: "fa-fw fa fa-calculator" },
27899
+ { name: "Currency", type: "currency", title: "货币", icon: "fa-fw fa fa-money" },
27900
+ { name: "Percent", type: "percent", title: "百分比", icon: "fa-fw fa fa-percent" },
27901
+ { name: "Image", type: "image", title: "图片", icon: "fa-fw fa fa-image" },
27902
+ { name: "File", type: "file", title: "文件", icon: "fa-fw fa fa-file" },
27903
+ { name: "Code", type: "code", title: "代码", icon: "fa-fw fa fa-code" },
27904
+ { name: "Markdown", type: "markdown", title: "Markdown", icon: "fa-fw fa fa-markdown" },
27905
+ { name: "Color", type: "color", title: "颜色", icon: "fa-fw fa fa-palette" },
27906
+ { name: "Toggle", type: "toggle", title: "切换", icon: "fa-fw fa fa-toggle-on" },
27907
+ { name: "Password", type: "password", title: "密码", icon: "fa-fw fa fa-key" },
27908
+ { name: "Autonumber", type: "autonumber", title: "自动编号", icon: "fa-fw fa fa-hashtag" },
27909
+ { name: "Url", type: "url", title: "URL", icon: "fa-fw fa fa-link" },
27910
+ { name: "Email", type: "email", title: "电子邮件", icon: "fa-fw fa fa-envelope" },
27911
+ { name: "Location", type: "location", title: "位置", icon: "fa-fw fa fa-map-marker" },
27912
+ { name: "Formula", type: "formula", title: "公式", icon: "fa-fw fa fa-sigma" },
27913
+ { name: "Summary", type: "summary", title: "累计汇总", icon: "fa-fw fa fa-sum" }
27914
+ ];
27915
+ // 生成每个字段类型的函数
27916
+ var generatedFunctions = fieldTypes.reduce(function (acc, _a) {
27917
+ var name = _a.name; _a.type;
27918
+ acc["SteedosField".concat(name)] = createFieldFunction();
27919
+ return acc;
27920
+ }, {});
27921
+ // 导出所有生成的函数
27922
+ var SteedosFieldText = generatedFunctions.SteedosFieldText, SteedosFieldTextarea = generatedFunctions.SteedosFieldTextarea, SteedosFieldHtml = generatedFunctions.SteedosFieldHtml, SteedosFieldLookup = generatedFunctions.SteedosFieldLookup, SteedosFieldMasterDetail = generatedFunctions.SteedosFieldMasterDetail, SteedosFieldSelect = generatedFunctions.SteedosFieldSelect, SteedosFieldBoolean = generatedFunctions.SteedosFieldBoolean, SteedosFieldDate = generatedFunctions.SteedosFieldDate, SteedosFieldDatetime = generatedFunctions.SteedosFieldDatetime, SteedosFieldTime = generatedFunctions.SteedosFieldTime, SteedosFieldNumber = generatedFunctions.SteedosFieldNumber, SteedosFieldCurrency = generatedFunctions.SteedosFieldCurrency, SteedosFieldPercent = generatedFunctions.SteedosFieldPercent, SteedosFieldImage = generatedFunctions.SteedosFieldImage, SteedosFieldFile = generatedFunctions.SteedosFieldFile, SteedosFieldCode = generatedFunctions.SteedosFieldCode, SteedosFieldMarkdown = generatedFunctions.SteedosFieldMarkdown, SteedosFieldColor = generatedFunctions.SteedosFieldColor, SteedosFieldToggle = generatedFunctions.SteedosFieldToggle, SteedosFieldPassword = generatedFunctions.SteedosFieldPassword, SteedosFieldAutonumber = generatedFunctions.SteedosFieldAutonumber, SteedosFieldUrl = generatedFunctions.SteedosFieldUrl, SteedosFieldEmail = generatedFunctions.SteedosFieldEmail, SteedosFieldLocation = generatedFunctions.SteedosFieldLocation, SteedosFieldFormula = generatedFunctions.SteedosFieldFormula, SteedosFieldSummary = generatedFunctions.SteedosFieldSummary;
27923
+
27924
+ var AmisSteedosFieldGroup = function (props) {
27925
+ if (props === void 0) { props = { title: null, body: null }; }
27926
+ return __awaiter(void 0, void 0, void 0, function () {
27927
+ var _a;
27928
+ return __generator(this, function (_b) {
27929
+ console.log("props===>", props);
27930
+ return [2 /*return*/, {
27931
+ type: "fieldSet",
27932
+ title: props.title || "分组",
27933
+ collapsable: true,
27934
+ body: ((_a = props.body) === null || _a === void 0 ? void 0 : _a.length) > 0 ? props.body : [{ type: 'sfield-text', "label": '文本', amis: {} }]
27935
+ }];
27936
+ });
27937
+ });
27938
+ };
27939
+
27940
+ var AmisSteedosObject = function (props) {
27941
+ if (props === void 0) { props = { className: null, body: null }; }
27942
+ return __awaiter(void 0, void 0, void 0, function () {
27943
+ return __generator(this, function (_a) {
27944
+ return [2 /*return*/, {
27945
+ type: "container",
27946
+ className: props.className,
27947
+ body: props.body || []
27948
+ }];
27949
+ });
27950
+ });
27951
+ };
27952
+
25223
27953
  var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
25224
27954
  var formFactor, appId, objectApiName, display, data, _display, page, listSchema;
25225
27955
  return __generator(this, function (_b) {
@@ -25447,6 +28177,8 @@ exports.AmisRecordService = AmisRecordService;
25447
28177
  exports.AmisSelectFlow = AmisSelectFlow;
25448
28178
  exports.AmisSelectUser = AmisSelectUser;
25449
28179
  exports.AmisSteedosField = AmisSteedosField;
28180
+ exports.AmisSteedosFieldGroup = AmisSteedosFieldGroup;
28181
+ exports.AmisSteedosObject = AmisSteedosObject;
25450
28182
  exports.FromNow = FromNow;
25451
28183
  exports.PageListView = PageListView;
25452
28184
  exports.PageObject = PageObject;
@@ -25455,8 +28187,36 @@ exports.SteedosBadge = SteedosBadge;
25455
28187
  exports.SteedosBadgeRibbon = SteedosBadgeRibbon;
25456
28188
  exports.SteedosDropdown = SteedosDropdown;
25457
28189
  exports.SteedosDropdownButton = SteedosDropdownButton;
28190
+ exports.SteedosFieldAutonumber = SteedosFieldAutonumber;
28191
+ exports.SteedosFieldBoolean = SteedosFieldBoolean;
28192
+ exports.SteedosFieldCode = SteedosFieldCode;
28193
+ exports.SteedosFieldColor = SteedosFieldColor;
28194
+ exports.SteedosFieldCurrency = SteedosFieldCurrency;
28195
+ exports.SteedosFieldDate = SteedosFieldDate;
28196
+ exports.SteedosFieldDatetime = SteedosFieldDatetime;
28197
+ exports.SteedosFieldEmail = SteedosFieldEmail;
28198
+ exports.SteedosFieldFile = SteedosFieldFile;
28199
+ exports.SteedosFieldFormula = SteedosFieldFormula;
28200
+ exports.SteedosFieldHtml = SteedosFieldHtml;
28201
+ exports.SteedosFieldImage = SteedosFieldImage;
28202
+ exports.SteedosFieldLocation = SteedosFieldLocation;
28203
+ exports.SteedosFieldLookup = SteedosFieldLookup;
28204
+ exports.SteedosFieldMarkdown = SteedosFieldMarkdown;
28205
+ exports.SteedosFieldMasterDetail = SteedosFieldMasterDetail;
28206
+ exports.SteedosFieldNumber = SteedosFieldNumber;
28207
+ exports.SteedosFieldPassword = SteedosFieldPassword;
28208
+ exports.SteedosFieldPercent = SteedosFieldPercent;
28209
+ exports.SteedosFieldSelect = SteedosFieldSelect;
28210
+ exports.SteedosFieldSet = SteedosFieldSet;
28211
+ exports.SteedosFieldSummary = SteedosFieldSummary;
28212
+ exports.SteedosFieldText = SteedosFieldText;
28213
+ exports.SteedosFieldTextarea = SteedosFieldTextarea;
28214
+ exports.SteedosFieldTime = SteedosFieldTime;
28215
+ exports.SteedosFieldToggle = SteedosFieldToggle;
28216
+ exports.SteedosFieldUrl = SteedosFieldUrl;
25458
28217
  exports.SteedosIcon = SteedosIcon;
25459
28218
  exports.SteedosLib = index_esm;
25460
28219
  exports.SteedosLoading = SteedosLoading;
28220
+ exports.SteedosObject = SteedosObject;
25461
28221
  exports.SteedosSkeleton = SteedosSkeleton;
25462
28222
  //# sourceMappingURL=amis-object.cjs.js.map