@teselagen/ui 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js
CHANGED
|
@@ -7422,7 +7422,7 @@ function getPlainObjectKeys(object) {
|
|
|
7422
7422
|
var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {
|
|
7423
7423
|
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
|
|
7424
7424
|
} : /* istanbul ignore next */Object.getOwnPropertyNames;
|
|
7425
|
-
function toPrimitive$
|
|
7425
|
+
function toPrimitive$2(value) {
|
|
7426
7426
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
7427
7427
|
}
|
|
7428
7428
|
function hasProp(target, prop) {
|
|
@@ -8351,7 +8351,7 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
|
|
|
8351
8351
|
return this.name_ + "[" + this.value_ + "]";
|
|
8352
8352
|
};
|
|
8353
8353
|
_proto.valueOf = function valueOf() {
|
|
8354
|
-
return toPrimitive$
|
|
8354
|
+
return toPrimitive$2(this.get());
|
|
8355
8355
|
};
|
|
8356
8356
|
_proto[_Symbol$toPrimitive] = function () {
|
|
8357
8357
|
return this.valueOf();
|
|
@@ -8579,7 +8579,7 @@ var ComputedValue = /*#__PURE__*/function () {
|
|
|
8579
8579
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
8580
8580
|
};
|
|
8581
8581
|
_proto.valueOf = function valueOf() {
|
|
8582
|
-
return toPrimitive$
|
|
8582
|
+
return toPrimitive$2(this.get());
|
|
8583
8583
|
};
|
|
8584
8584
|
_proto[_Symbol$toPrimitive$1] = function () {
|
|
8585
8585
|
return this.valueOf();
|
|
@@ -30331,10 +30331,18 @@ var _fails = function (exec) {
|
|
|
30331
30331
|
}
|
|
30332
30332
|
};
|
|
30333
30333
|
|
|
30334
|
-
|
|
30335
|
-
var
|
|
30336
|
-
|
|
30337
|
-
|
|
30334
|
+
var _descriptors;
|
|
30335
|
+
var hasRequired_descriptors;
|
|
30336
|
+
|
|
30337
|
+
function require_descriptors () {
|
|
30338
|
+
if (hasRequired_descriptors) return _descriptors;
|
|
30339
|
+
hasRequired_descriptors = 1;
|
|
30340
|
+
// Thank's IE8 for his funny defineProperty
|
|
30341
|
+
_descriptors = !_fails(function () {
|
|
30342
|
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
30343
|
+
});
|
|
30344
|
+
return _descriptors;
|
|
30345
|
+
}
|
|
30338
30346
|
|
|
30339
30347
|
var _domCreate;
|
|
30340
30348
|
var hasRequired_domCreate;
|
|
@@ -30352,9 +30360,17 @@ function require_domCreate () {
|
|
|
30352
30360
|
return _domCreate;
|
|
30353
30361
|
}
|
|
30354
30362
|
|
|
30355
|
-
var _ie8DomDefine
|
|
30356
|
-
|
|
30357
|
-
|
|
30363
|
+
var _ie8DomDefine;
|
|
30364
|
+
var hasRequired_ie8DomDefine;
|
|
30365
|
+
|
|
30366
|
+
function require_ie8DomDefine () {
|
|
30367
|
+
if (hasRequired_ie8DomDefine) return _ie8DomDefine;
|
|
30368
|
+
hasRequired_ie8DomDefine = 1;
|
|
30369
|
+
_ie8DomDefine = !require_descriptors() && !_fails(function () {
|
|
30370
|
+
return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
30371
|
+
});
|
|
30372
|
+
return _ie8DomDefine;
|
|
30373
|
+
}
|
|
30358
30374
|
|
|
30359
30375
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
30360
30376
|
var isObject$d = _isObject;
|
|
@@ -30369,22 +30385,29 @@ var _toPrimitive = function (it, S) {
|
|
|
30369
30385
|
throw TypeError("Can't convert object to primitive value");
|
|
30370
30386
|
};
|
|
30371
30387
|
|
|
30372
|
-
var
|
|
30373
|
-
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
30374
|
-
var toPrimitive$2 = _toPrimitive;
|
|
30375
|
-
var dP$2 = Object.defineProperty;
|
|
30388
|
+
var hasRequired_objectDp;
|
|
30376
30389
|
|
|
30377
|
-
|
|
30378
|
-
|
|
30379
|
-
|
|
30380
|
-
|
|
30381
|
-
|
|
30382
|
-
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
|
|
30390
|
+
function require_objectDp () {
|
|
30391
|
+
if (hasRequired_objectDp) return _objectDp;
|
|
30392
|
+
hasRequired_objectDp = 1;
|
|
30393
|
+
var anObject = _anObject;
|
|
30394
|
+
var IE8_DOM_DEFINE = require_ie8DomDefine();
|
|
30395
|
+
var toPrimitive = _toPrimitive;
|
|
30396
|
+
var dP = Object.defineProperty;
|
|
30397
|
+
|
|
30398
|
+
_objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
30399
|
+
anObject(O);
|
|
30400
|
+
P = toPrimitive(P, true);
|
|
30401
|
+
anObject(Attributes);
|
|
30402
|
+
if (IE8_DOM_DEFINE) try {
|
|
30403
|
+
return dP(O, P, Attributes);
|
|
30404
|
+
} catch (e) { /* empty */ }
|
|
30405
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30406
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
30407
|
+
return O;
|
|
30408
|
+
};
|
|
30409
|
+
return _objectDp;
|
|
30410
|
+
}
|
|
30388
30411
|
|
|
30389
30412
|
var _propertyDesc = function (bitmap, value) {
|
|
30390
30413
|
return {
|
|
@@ -30395,9 +30418,9 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30395
30418
|
};
|
|
30396
30419
|
};
|
|
30397
30420
|
|
|
30398
|
-
var dP$1 =
|
|
30421
|
+
var dP$1 = require_objectDp();
|
|
30399
30422
|
var createDesc$3 = _propertyDesc;
|
|
30400
|
-
var _hide =
|
|
30423
|
+
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30401
30424
|
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30402
30425
|
} : function (object, key, value) {
|
|
30403
30426
|
object[key] = value;
|
|
@@ -30478,12 +30501,20 @@ var _cof = function (it) {
|
|
|
30478
30501
|
return toString$6.call(it).slice(8, -1);
|
|
30479
30502
|
};
|
|
30480
30503
|
|
|
30481
|
-
|
|
30482
|
-
var
|
|
30483
|
-
|
|
30484
|
-
|
|
30485
|
-
|
|
30486
|
-
|
|
30504
|
+
var _iobject;
|
|
30505
|
+
var hasRequired_iobject;
|
|
30506
|
+
|
|
30507
|
+
function require_iobject () {
|
|
30508
|
+
if (hasRequired_iobject) return _iobject;
|
|
30509
|
+
hasRequired_iobject = 1;
|
|
30510
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30511
|
+
var cof = _cof;
|
|
30512
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30513
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30514
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30515
|
+
};
|
|
30516
|
+
return _iobject;
|
|
30517
|
+
}
|
|
30487
30518
|
|
|
30488
30519
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30489
30520
|
var _defined = function (it) {
|
|
@@ -30492,7 +30523,7 @@ var _defined = function (it) {
|
|
|
30492
30523
|
};
|
|
30493
30524
|
|
|
30494
30525
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30495
|
-
var IObject =
|
|
30526
|
+
var IObject = require_iobject();
|
|
30496
30527
|
var defined$2 = _defined;
|
|
30497
30528
|
var _toIobject = function (it) {
|
|
30498
30529
|
return IObject(defined$2(it));
|
|
@@ -30634,12 +30665,12 @@ function require_objectAssign () {
|
|
|
30634
30665
|
if (hasRequired_objectAssign) return _objectAssign;
|
|
30635
30666
|
hasRequired_objectAssign = 1;
|
|
30636
30667
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
30637
|
-
var DESCRIPTORS =
|
|
30668
|
+
var DESCRIPTORS = require_descriptors();
|
|
30638
30669
|
var getKeys = _objectKeys;
|
|
30639
30670
|
var gOPS = _objectGops;
|
|
30640
30671
|
var pIE = require_objectPie();
|
|
30641
30672
|
var toObject = _toObject;
|
|
30642
|
-
var IObject =
|
|
30673
|
+
var IObject = require_iobject();
|
|
30643
30674
|
var $assign = Object.assign;
|
|
30644
30675
|
|
|
30645
30676
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30716,11 +30747,11 @@ var hasRequired_objectDps;
|
|
|
30716
30747
|
function require_objectDps () {
|
|
30717
30748
|
if (hasRequired_objectDps) return _objectDps;
|
|
30718
30749
|
hasRequired_objectDps = 1;
|
|
30719
|
-
var dP =
|
|
30750
|
+
var dP = require_objectDp();
|
|
30720
30751
|
var anObject = _anObject;
|
|
30721
30752
|
var getKeys = _objectKeys;
|
|
30722
30753
|
|
|
30723
|
-
_objectDps =
|
|
30754
|
+
_objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30724
30755
|
anObject(O);
|
|
30725
30756
|
var keys = getKeys(Properties);
|
|
30726
30757
|
var length = keys.length;
|
|
@@ -30809,7 +30840,7 @@ $exports.store = store;
|
|
|
30809
30840
|
|
|
30810
30841
|
var _wksExports = _wks.exports;
|
|
30811
30842
|
|
|
30812
|
-
var def =
|
|
30843
|
+
var def = require_objectDp().f;
|
|
30813
30844
|
var has$9 = _has;
|
|
30814
30845
|
var TAG$1 = _wksExports('toStringTag');
|
|
30815
30846
|
|
|
@@ -31123,7 +31154,7 @@ var _isArrayIter = function (it) {
|
|
|
31123
31154
|
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
31124
31155
|
};
|
|
31125
31156
|
|
|
31126
|
-
var $defineProperty$1 =
|
|
31157
|
+
var $defineProperty$1 = require_objectDp();
|
|
31127
31158
|
var createDesc$2 = _propertyDesc;
|
|
31128
31159
|
|
|
31129
31160
|
var _createProperty = function (object, index, value) {
|
|
@@ -31256,7 +31287,7 @@ var _default$8 = function (instance, Constructor) {
|
|
|
31256
31287
|
|
|
31257
31288
|
var $export$3 = _export;
|
|
31258
31289
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
31259
|
-
$export$3($export$3.S + $export$3.F * !
|
|
31290
|
+
$export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: require_objectDp().f });
|
|
31260
31291
|
|
|
31261
31292
|
var $Object$2 = _coreExports.Object;
|
|
31262
31293
|
var defineProperty$9 = function defineProperty(it, key, desc) {
|
|
@@ -31304,7 +31335,7 @@ var _meta = {exports: {}};
|
|
|
31304
31335
|
var META$1 = _uid('meta');
|
|
31305
31336
|
var isObject$c = _isObject;
|
|
31306
31337
|
var has$7 = _has;
|
|
31307
|
-
var setDesc =
|
|
31338
|
+
var setDesc = require_objectDp().f;
|
|
31308
31339
|
var id = 0;
|
|
31309
31340
|
var isExtensible = Object.isExtensible || function () {
|
|
31310
31341
|
return true;
|
|
@@ -31359,7 +31390,7 @@ var _metaExports = _meta.exports;
|
|
|
31359
31390
|
|
|
31360
31391
|
var core = _coreExports;
|
|
31361
31392
|
var wksExt$1 = _wksExt;
|
|
31362
|
-
var defineProperty$7 =
|
|
31393
|
+
var defineProperty$7 = require_objectDp().f;
|
|
31363
31394
|
var _wksDefine = function (name) {
|
|
31364
31395
|
var $Symbol = core.Symbol || (core.Symbol = {} );
|
|
31365
31396
|
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$7($Symbol, name, { value: wksExt$1.f(name) });
|
|
@@ -31433,10 +31464,10 @@ var createDesc$1 = _propertyDesc;
|
|
|
31433
31464
|
var toIObject$1 = _toIobject;
|
|
31434
31465
|
var toPrimitive$1 = _toPrimitive;
|
|
31435
31466
|
var has$6 = _has;
|
|
31436
|
-
var IE8_DOM_DEFINE =
|
|
31467
|
+
var IE8_DOM_DEFINE = require_ie8DomDefine();
|
|
31437
31468
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
31438
31469
|
|
|
31439
|
-
_objectGopd.f =
|
|
31470
|
+
_objectGopd.f = require_descriptors() ? gOPD$2 : function getOwnPropertyDescriptor(O, P) {
|
|
31440
31471
|
O = toIObject$1(O);
|
|
31441
31472
|
P = toPrimitive$1(P, true);
|
|
31442
31473
|
if (IE8_DOM_DEFINE) try {
|
|
@@ -31448,7 +31479,7 @@ _objectGopd.f = _descriptors ? gOPD$2 : function getOwnPropertyDescriptor(O, P)
|
|
|
31448
31479
|
// ECMAScript 6 symbols shim
|
|
31449
31480
|
var global$1 = _globalExports;
|
|
31450
31481
|
var has$5 = _has;
|
|
31451
|
-
var DESCRIPTORS =
|
|
31482
|
+
var DESCRIPTORS = require_descriptors();
|
|
31452
31483
|
var $export$2 = _export;
|
|
31453
31484
|
var redefine = _redefine;
|
|
31454
31485
|
var META = _metaExports.KEY;
|
|
@@ -31471,7 +31502,7 @@ var _create$1 = require_objectCreate();
|
|
|
31471
31502
|
var gOPNExt = _objectGopnExt;
|
|
31472
31503
|
var $GOPD = _objectGopd;
|
|
31473
31504
|
var $GOPS = _objectGops;
|
|
31474
|
-
var $DP =
|
|
31505
|
+
var $DP = require_objectDp();
|
|
31475
31506
|
var $keys$1 = _objectKeys;
|
|
31476
31507
|
var gOPD$1 = $GOPD.f;
|
|
31477
31508
|
var dP = $DP.f;
|
|
@@ -66204,7 +66235,7 @@ class TgSelect extends React$1.Component {
|
|
|
66204
66235
|
if (isTagSelect && item.value && item.value.includes && item.value.includes(":")) {
|
|
66205
66236
|
const topLevelId = item.value.split(":")[0];
|
|
66206
66237
|
valArray = valArray.filter((val) => {
|
|
66207
|
-
if (val
|
|
66238
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
66208
66239
|
const valId = val.value.split(":")[0];
|
|
66209
66240
|
if (valId === topLevelId) {
|
|
66210
66241
|
return false;
|
|
@@ -66292,7 +66323,7 @@ class TgSelect extends React$1.Component {
|
|
|
66292
66323
|
getTagProps = (label) => {
|
|
66293
66324
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
66294
66325
|
const val = Array.isArray(value) ? value : [value];
|
|
66295
|
-
const matchingVal = val.find((op) => op
|
|
66326
|
+
const matchingVal = val.find((op) => op?.label === label);
|
|
66296
66327
|
const disabled = _disabled || matchingVal && matchingVal.disabled;
|
|
66297
66328
|
const className = matchingVal && matchingVal.className;
|
|
66298
66329
|
return {
|
|
@@ -69015,7 +69046,7 @@ function getFieldsMappedByCCDisplayName(schema) {
|
|
|
69015
69046
|
}, {});
|
|
69016
69047
|
}
|
|
69017
69048
|
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
69018
|
-
if (orderArray
|
|
69049
|
+
if (orderArray?.length) {
|
|
69019
69050
|
const orderFuncs = [];
|
|
69020
69051
|
const ascOrDescArray = [];
|
|
69021
69052
|
orderArray.forEach((order) => {
|
|
@@ -83482,7 +83513,7 @@ const renderReactSelect = (props) => {
|
|
|
83482
83513
|
}
|
|
83483
83514
|
} else if (Array.isArray(value)) {
|
|
83484
83515
|
valueToUse = value.map((val) => {
|
|
83485
|
-
if (val
|
|
83516
|
+
if (val?.userCreated) {
|
|
83486
83517
|
return {
|
|
83487
83518
|
label: val.value,
|
|
83488
83519
|
value: val
|
|
@@ -83509,10 +83540,10 @@ const renderReactSelect = (props) => {
|
|
|
83509
83540
|
let valToPass;
|
|
83510
83541
|
if (Array.isArray(valOrVals)) {
|
|
83511
83542
|
valToPass = valOrVals.map(function(val) {
|
|
83512
|
-
if (val
|
|
83543
|
+
if (val?.userCreated) {
|
|
83513
83544
|
return val;
|
|
83514
83545
|
}
|
|
83515
|
-
return val
|
|
83546
|
+
return val?.value;
|
|
83516
83547
|
});
|
|
83517
83548
|
} else if (valOrVals) {
|
|
83518
83549
|
if (valOrVals.userCreated) {
|
|
@@ -85506,6 +85537,7 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85506
85537
|
noForm
|
|
85507
85538
|
} = mergedOpts;
|
|
85508
85539
|
const schema = getSchema$1(mergedOpts);
|
|
85540
|
+
const convertedSchema = convertSchema(schema);
|
|
85509
85541
|
if (ownProps.isTableParamsConnected) {
|
|
85510
85542
|
if (formName && formNameFromWithTPCall && formName !== formNameFromWithTPCall) {
|
|
85511
85543
|
console.error(
|
|
@@ -85527,6 +85559,12 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85527
85559
|
schema
|
|
85528
85560
|
);
|
|
85529
85561
|
}
|
|
85562
|
+
if (mergedOpts.orderByFirstColumn && !mergedOpts.defaults?.order?.length) {
|
|
85563
|
+
const r = [
|
|
85564
|
+
lodashExports.camelCase(schema.fields[0].displayName || schema.fields[0].path)
|
|
85565
|
+
];
|
|
85566
|
+
lodashExports.set(mergedOpts, "defaults.order", r);
|
|
85567
|
+
}
|
|
85530
85568
|
} else {
|
|
85531
85569
|
if (!formName || formName === "tgDataTable") {
|
|
85532
85570
|
console.error(
|
|
@@ -85575,7 +85613,7 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85575
85613
|
// for local table
|
|
85576
85614
|
urlConnected,
|
|
85577
85615
|
defaults: defaultsToUse,
|
|
85578
|
-
schema:
|
|
85616
|
+
schema: convertedSchema,
|
|
85579
85617
|
isInfinite: isInfinite || isSimple && !withPaging,
|
|
85580
85618
|
isLocalCall,
|
|
85581
85619
|
additionalFilter: additionalFilterToUse,
|
package/index.es.js
CHANGED
|
@@ -7401,7 +7401,7 @@ function getPlainObjectKeys(object) {
|
|
|
7401
7401
|
var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {
|
|
7402
7402
|
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
|
|
7403
7403
|
} : /* istanbul ignore next */Object.getOwnPropertyNames;
|
|
7404
|
-
function toPrimitive$
|
|
7404
|
+
function toPrimitive$2(value) {
|
|
7405
7405
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
7406
7406
|
}
|
|
7407
7407
|
function hasProp(target, prop) {
|
|
@@ -8330,7 +8330,7 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
|
|
|
8330
8330
|
return this.name_ + "[" + this.value_ + "]";
|
|
8331
8331
|
};
|
|
8332
8332
|
_proto.valueOf = function valueOf() {
|
|
8333
|
-
return toPrimitive$
|
|
8333
|
+
return toPrimitive$2(this.get());
|
|
8334
8334
|
};
|
|
8335
8335
|
_proto[_Symbol$toPrimitive] = function () {
|
|
8336
8336
|
return this.valueOf();
|
|
@@ -8558,7 +8558,7 @@ var ComputedValue = /*#__PURE__*/function () {
|
|
|
8558
8558
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
8559
8559
|
};
|
|
8560
8560
|
_proto.valueOf = function valueOf() {
|
|
8561
|
-
return toPrimitive$
|
|
8561
|
+
return toPrimitive$2(this.get());
|
|
8562
8562
|
};
|
|
8563
8563
|
_proto[_Symbol$toPrimitive$1] = function () {
|
|
8564
8564
|
return this.valueOf();
|
|
@@ -30310,10 +30310,18 @@ var _fails = function (exec) {
|
|
|
30310
30310
|
}
|
|
30311
30311
|
};
|
|
30312
30312
|
|
|
30313
|
-
|
|
30314
|
-
var
|
|
30315
|
-
|
|
30316
|
-
|
|
30313
|
+
var _descriptors;
|
|
30314
|
+
var hasRequired_descriptors;
|
|
30315
|
+
|
|
30316
|
+
function require_descriptors () {
|
|
30317
|
+
if (hasRequired_descriptors) return _descriptors;
|
|
30318
|
+
hasRequired_descriptors = 1;
|
|
30319
|
+
// Thank's IE8 for his funny defineProperty
|
|
30320
|
+
_descriptors = !_fails(function () {
|
|
30321
|
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
30322
|
+
});
|
|
30323
|
+
return _descriptors;
|
|
30324
|
+
}
|
|
30317
30325
|
|
|
30318
30326
|
var _domCreate;
|
|
30319
30327
|
var hasRequired_domCreate;
|
|
@@ -30331,9 +30339,17 @@ function require_domCreate () {
|
|
|
30331
30339
|
return _domCreate;
|
|
30332
30340
|
}
|
|
30333
30341
|
|
|
30334
|
-
var _ie8DomDefine
|
|
30335
|
-
|
|
30336
|
-
|
|
30342
|
+
var _ie8DomDefine;
|
|
30343
|
+
var hasRequired_ie8DomDefine;
|
|
30344
|
+
|
|
30345
|
+
function require_ie8DomDefine () {
|
|
30346
|
+
if (hasRequired_ie8DomDefine) return _ie8DomDefine;
|
|
30347
|
+
hasRequired_ie8DomDefine = 1;
|
|
30348
|
+
_ie8DomDefine = !require_descriptors() && !_fails(function () {
|
|
30349
|
+
return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
30350
|
+
});
|
|
30351
|
+
return _ie8DomDefine;
|
|
30352
|
+
}
|
|
30337
30353
|
|
|
30338
30354
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
30339
30355
|
var isObject$d = _isObject;
|
|
@@ -30348,22 +30364,29 @@ var _toPrimitive = function (it, S) {
|
|
|
30348
30364
|
throw TypeError("Can't convert object to primitive value");
|
|
30349
30365
|
};
|
|
30350
30366
|
|
|
30351
|
-
var
|
|
30352
|
-
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
30353
|
-
var toPrimitive$2 = _toPrimitive;
|
|
30354
|
-
var dP$2 = Object.defineProperty;
|
|
30367
|
+
var hasRequired_objectDp;
|
|
30355
30368
|
|
|
30356
|
-
|
|
30357
|
-
|
|
30358
|
-
|
|
30359
|
-
|
|
30360
|
-
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
|
|
30365
|
-
|
|
30366
|
-
|
|
30369
|
+
function require_objectDp () {
|
|
30370
|
+
if (hasRequired_objectDp) return _objectDp;
|
|
30371
|
+
hasRequired_objectDp = 1;
|
|
30372
|
+
var anObject = _anObject;
|
|
30373
|
+
var IE8_DOM_DEFINE = require_ie8DomDefine();
|
|
30374
|
+
var toPrimitive = _toPrimitive;
|
|
30375
|
+
var dP = Object.defineProperty;
|
|
30376
|
+
|
|
30377
|
+
_objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
30378
|
+
anObject(O);
|
|
30379
|
+
P = toPrimitive(P, true);
|
|
30380
|
+
anObject(Attributes);
|
|
30381
|
+
if (IE8_DOM_DEFINE) try {
|
|
30382
|
+
return dP(O, P, Attributes);
|
|
30383
|
+
} catch (e) { /* empty */ }
|
|
30384
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30385
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
30386
|
+
return O;
|
|
30387
|
+
};
|
|
30388
|
+
return _objectDp;
|
|
30389
|
+
}
|
|
30367
30390
|
|
|
30368
30391
|
var _propertyDesc = function (bitmap, value) {
|
|
30369
30392
|
return {
|
|
@@ -30374,9 +30397,9 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30374
30397
|
};
|
|
30375
30398
|
};
|
|
30376
30399
|
|
|
30377
|
-
var dP$1 =
|
|
30400
|
+
var dP$1 = require_objectDp();
|
|
30378
30401
|
var createDesc$3 = _propertyDesc;
|
|
30379
|
-
var _hide =
|
|
30402
|
+
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30380
30403
|
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30381
30404
|
} : function (object, key, value) {
|
|
30382
30405
|
object[key] = value;
|
|
@@ -30457,12 +30480,20 @@ var _cof = function (it) {
|
|
|
30457
30480
|
return toString$6.call(it).slice(8, -1);
|
|
30458
30481
|
};
|
|
30459
30482
|
|
|
30460
|
-
|
|
30461
|
-
var
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30465
|
-
|
|
30483
|
+
var _iobject;
|
|
30484
|
+
var hasRequired_iobject;
|
|
30485
|
+
|
|
30486
|
+
function require_iobject () {
|
|
30487
|
+
if (hasRequired_iobject) return _iobject;
|
|
30488
|
+
hasRequired_iobject = 1;
|
|
30489
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30490
|
+
var cof = _cof;
|
|
30491
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30492
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30493
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30494
|
+
};
|
|
30495
|
+
return _iobject;
|
|
30496
|
+
}
|
|
30466
30497
|
|
|
30467
30498
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30468
30499
|
var _defined = function (it) {
|
|
@@ -30471,7 +30502,7 @@ var _defined = function (it) {
|
|
|
30471
30502
|
};
|
|
30472
30503
|
|
|
30473
30504
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30474
|
-
var IObject =
|
|
30505
|
+
var IObject = require_iobject();
|
|
30475
30506
|
var defined$2 = _defined;
|
|
30476
30507
|
var _toIobject = function (it) {
|
|
30477
30508
|
return IObject(defined$2(it));
|
|
@@ -30613,12 +30644,12 @@ function require_objectAssign () {
|
|
|
30613
30644
|
if (hasRequired_objectAssign) return _objectAssign;
|
|
30614
30645
|
hasRequired_objectAssign = 1;
|
|
30615
30646
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
30616
|
-
var DESCRIPTORS =
|
|
30647
|
+
var DESCRIPTORS = require_descriptors();
|
|
30617
30648
|
var getKeys = _objectKeys;
|
|
30618
30649
|
var gOPS = _objectGops;
|
|
30619
30650
|
var pIE = require_objectPie();
|
|
30620
30651
|
var toObject = _toObject;
|
|
30621
|
-
var IObject =
|
|
30652
|
+
var IObject = require_iobject();
|
|
30622
30653
|
var $assign = Object.assign;
|
|
30623
30654
|
|
|
30624
30655
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30695,11 +30726,11 @@ var hasRequired_objectDps;
|
|
|
30695
30726
|
function require_objectDps () {
|
|
30696
30727
|
if (hasRequired_objectDps) return _objectDps;
|
|
30697
30728
|
hasRequired_objectDps = 1;
|
|
30698
|
-
var dP =
|
|
30729
|
+
var dP = require_objectDp();
|
|
30699
30730
|
var anObject = _anObject;
|
|
30700
30731
|
var getKeys = _objectKeys;
|
|
30701
30732
|
|
|
30702
|
-
_objectDps =
|
|
30733
|
+
_objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30703
30734
|
anObject(O);
|
|
30704
30735
|
var keys = getKeys(Properties);
|
|
30705
30736
|
var length = keys.length;
|
|
@@ -30788,7 +30819,7 @@ $exports.store = store;
|
|
|
30788
30819
|
|
|
30789
30820
|
var _wksExports = _wks.exports;
|
|
30790
30821
|
|
|
30791
|
-
var def =
|
|
30822
|
+
var def = require_objectDp().f;
|
|
30792
30823
|
var has$9 = _has;
|
|
30793
30824
|
var TAG$1 = _wksExports('toStringTag');
|
|
30794
30825
|
|
|
@@ -31102,7 +31133,7 @@ var _isArrayIter = function (it) {
|
|
|
31102
31133
|
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
31103
31134
|
};
|
|
31104
31135
|
|
|
31105
|
-
var $defineProperty$1 =
|
|
31136
|
+
var $defineProperty$1 = require_objectDp();
|
|
31106
31137
|
var createDesc$2 = _propertyDesc;
|
|
31107
31138
|
|
|
31108
31139
|
var _createProperty = function (object, index, value) {
|
|
@@ -31235,7 +31266,7 @@ var _default$8 = function (instance, Constructor) {
|
|
|
31235
31266
|
|
|
31236
31267
|
var $export$3 = _export;
|
|
31237
31268
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
31238
|
-
$export$3($export$3.S + $export$3.F * !
|
|
31269
|
+
$export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: require_objectDp().f });
|
|
31239
31270
|
|
|
31240
31271
|
var $Object$2 = _coreExports.Object;
|
|
31241
31272
|
var defineProperty$9 = function defineProperty(it, key, desc) {
|
|
@@ -31283,7 +31314,7 @@ var _meta = {exports: {}};
|
|
|
31283
31314
|
var META$1 = _uid('meta');
|
|
31284
31315
|
var isObject$c = _isObject;
|
|
31285
31316
|
var has$7 = _has;
|
|
31286
|
-
var setDesc =
|
|
31317
|
+
var setDesc = require_objectDp().f;
|
|
31287
31318
|
var id = 0;
|
|
31288
31319
|
var isExtensible = Object.isExtensible || function () {
|
|
31289
31320
|
return true;
|
|
@@ -31338,7 +31369,7 @@ var _metaExports = _meta.exports;
|
|
|
31338
31369
|
|
|
31339
31370
|
var core = _coreExports;
|
|
31340
31371
|
var wksExt$1 = _wksExt;
|
|
31341
|
-
var defineProperty$7 =
|
|
31372
|
+
var defineProperty$7 = require_objectDp().f;
|
|
31342
31373
|
var _wksDefine = function (name) {
|
|
31343
31374
|
var $Symbol = core.Symbol || (core.Symbol = {} );
|
|
31344
31375
|
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$7($Symbol, name, { value: wksExt$1.f(name) });
|
|
@@ -31412,10 +31443,10 @@ var createDesc$1 = _propertyDesc;
|
|
|
31412
31443
|
var toIObject$1 = _toIobject;
|
|
31413
31444
|
var toPrimitive$1 = _toPrimitive;
|
|
31414
31445
|
var has$6 = _has;
|
|
31415
|
-
var IE8_DOM_DEFINE =
|
|
31446
|
+
var IE8_DOM_DEFINE = require_ie8DomDefine();
|
|
31416
31447
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
31417
31448
|
|
|
31418
|
-
_objectGopd.f =
|
|
31449
|
+
_objectGopd.f = require_descriptors() ? gOPD$2 : function getOwnPropertyDescriptor(O, P) {
|
|
31419
31450
|
O = toIObject$1(O);
|
|
31420
31451
|
P = toPrimitive$1(P, true);
|
|
31421
31452
|
if (IE8_DOM_DEFINE) try {
|
|
@@ -31427,7 +31458,7 @@ _objectGopd.f = _descriptors ? gOPD$2 : function getOwnPropertyDescriptor(O, P)
|
|
|
31427
31458
|
// ECMAScript 6 symbols shim
|
|
31428
31459
|
var global$1 = _globalExports;
|
|
31429
31460
|
var has$5 = _has;
|
|
31430
|
-
var DESCRIPTORS =
|
|
31461
|
+
var DESCRIPTORS = require_descriptors();
|
|
31431
31462
|
var $export$2 = _export;
|
|
31432
31463
|
var redefine = _redefine;
|
|
31433
31464
|
var META = _metaExports.KEY;
|
|
@@ -31450,7 +31481,7 @@ var _create$1 = require_objectCreate();
|
|
|
31450
31481
|
var gOPNExt = _objectGopnExt;
|
|
31451
31482
|
var $GOPD = _objectGopd;
|
|
31452
31483
|
var $GOPS = _objectGops;
|
|
31453
|
-
var $DP =
|
|
31484
|
+
var $DP = require_objectDp();
|
|
31454
31485
|
var $keys$1 = _objectKeys;
|
|
31455
31486
|
var gOPD$1 = $GOPD.f;
|
|
31456
31487
|
var dP = $DP.f;
|
|
@@ -66183,7 +66214,7 @@ class TgSelect extends React__default.Component {
|
|
|
66183
66214
|
if (isTagSelect && item.value && item.value.includes && item.value.includes(":")) {
|
|
66184
66215
|
const topLevelId = item.value.split(":")[0];
|
|
66185
66216
|
valArray = valArray.filter((val) => {
|
|
66186
|
-
if (val
|
|
66217
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
66187
66218
|
const valId = val.value.split(":")[0];
|
|
66188
66219
|
if (valId === topLevelId) {
|
|
66189
66220
|
return false;
|
|
@@ -66271,7 +66302,7 @@ class TgSelect extends React__default.Component {
|
|
|
66271
66302
|
getTagProps = (label) => {
|
|
66272
66303
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
66273
66304
|
const val = Array.isArray(value) ? value : [value];
|
|
66274
|
-
const matchingVal = val.find((op) => op
|
|
66305
|
+
const matchingVal = val.find((op) => op?.label === label);
|
|
66275
66306
|
const disabled = _disabled || matchingVal && matchingVal.disabled;
|
|
66276
66307
|
const className = matchingVal && matchingVal.className;
|
|
66277
66308
|
return {
|
|
@@ -68994,7 +69025,7 @@ function getFieldsMappedByCCDisplayName(schema) {
|
|
|
68994
69025
|
}, {});
|
|
68995
69026
|
}
|
|
68996
69027
|
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
68997
|
-
if (orderArray
|
|
69028
|
+
if (orderArray?.length) {
|
|
68998
69029
|
const orderFuncs = [];
|
|
68999
69030
|
const ascOrDescArray = [];
|
|
69000
69031
|
orderArray.forEach((order) => {
|
|
@@ -83461,7 +83492,7 @@ const renderReactSelect = (props) => {
|
|
|
83461
83492
|
}
|
|
83462
83493
|
} else if (Array.isArray(value)) {
|
|
83463
83494
|
valueToUse = value.map((val) => {
|
|
83464
|
-
if (val
|
|
83495
|
+
if (val?.userCreated) {
|
|
83465
83496
|
return {
|
|
83466
83497
|
label: val.value,
|
|
83467
83498
|
value: val
|
|
@@ -83488,10 +83519,10 @@ const renderReactSelect = (props) => {
|
|
|
83488
83519
|
let valToPass;
|
|
83489
83520
|
if (Array.isArray(valOrVals)) {
|
|
83490
83521
|
valToPass = valOrVals.map(function(val) {
|
|
83491
|
-
if (val
|
|
83522
|
+
if (val?.userCreated) {
|
|
83492
83523
|
return val;
|
|
83493
83524
|
}
|
|
83494
|
-
return val
|
|
83525
|
+
return val?.value;
|
|
83495
83526
|
});
|
|
83496
83527
|
} else if (valOrVals) {
|
|
83497
83528
|
if (valOrVals.userCreated) {
|
|
@@ -85485,6 +85516,7 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85485
85516
|
noForm
|
|
85486
85517
|
} = mergedOpts;
|
|
85487
85518
|
const schema = getSchema$1(mergedOpts);
|
|
85519
|
+
const convertedSchema = convertSchema(schema);
|
|
85488
85520
|
if (ownProps.isTableParamsConnected) {
|
|
85489
85521
|
if (formName && formNameFromWithTPCall && formName !== formNameFromWithTPCall) {
|
|
85490
85522
|
console.error(
|
|
@@ -85506,6 +85538,12 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85506
85538
|
schema
|
|
85507
85539
|
);
|
|
85508
85540
|
}
|
|
85541
|
+
if (mergedOpts.orderByFirstColumn && !mergedOpts.defaults?.order?.length) {
|
|
85542
|
+
const r = [
|
|
85543
|
+
lodashExports.camelCase(schema.fields[0].displayName || schema.fields[0].path)
|
|
85544
|
+
];
|
|
85545
|
+
lodashExports.set(mergedOpts, "defaults.order", r);
|
|
85546
|
+
}
|
|
85509
85547
|
} else {
|
|
85510
85548
|
if (!formName || formName === "tgDataTable") {
|
|
85511
85549
|
console.error(
|
|
@@ -85554,7 +85592,7 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
85554
85592
|
// for local table
|
|
85555
85593
|
urlConnected,
|
|
85556
85594
|
defaults: defaultsToUse,
|
|
85557
|
-
schema:
|
|
85595
|
+
schema: convertedSchema,
|
|
85558
85596
|
isInfinite: isInfinite || isSimple && !withPaging,
|
|
85559
85597
|
isLocalCall,
|
|
85560
85598
|
additionalFilter: additionalFilterToUse,
|
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ function getFieldsMappedByCCDisplayName(schema) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
74
|
-
if (orderArray
|
|
74
|
+
if (orderArray?.length) {
|
|
75
75
|
const orderFuncs = [];
|
|
76
76
|
const ascOrDescArray = [];
|
|
77
77
|
orderArray.forEach(order => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react";
|
|
2
2
|
import { change, formValueSelector } from "redux-form";
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
|
-
import { isFunction } from "lodash";
|
|
4
|
+
import { camelCase, isFunction, set } from "lodash";
|
|
5
5
|
import { withRouter } from "react-router-dom";
|
|
6
6
|
import { branch, compose } from "recompose";
|
|
7
7
|
|
|
@@ -69,7 +69,7 @@ export default function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
69
69
|
} = mergedOpts;
|
|
70
70
|
|
|
71
71
|
const schema = getSchema(mergedOpts);
|
|
72
|
-
|
|
72
|
+
const convertedSchema = convertSchema(schema)
|
|
73
73
|
if (ownProps.isTableParamsConnected) {
|
|
74
74
|
if (
|
|
75
75
|
formName &&
|
|
@@ -97,6 +97,12 @@ export default function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
97
97
|
schema
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
+
if (mergedOpts.orderByFirstColumn && !mergedOpts.defaults?.order?.length) {
|
|
101
|
+
const r = [
|
|
102
|
+
camelCase(schema.fields[0].displayName || schema.fields[0].path)
|
|
103
|
+
];
|
|
104
|
+
set(mergedOpts, 'defaults.order', r)
|
|
105
|
+
}
|
|
100
106
|
} else {
|
|
101
107
|
//in user instantiated withTableParams() call
|
|
102
108
|
if (!formName || formName === "tgDataTable") {
|
|
@@ -163,7 +169,7 @@ export default function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
163
169
|
entities: mergedOpts.entities, // for local table
|
|
164
170
|
urlConnected,
|
|
165
171
|
defaults: defaultsToUse,
|
|
166
|
-
schema:
|
|
172
|
+
schema: convertedSchema,
|
|
167
173
|
isInfinite: isInfinite || (isSimple && !withPaging),
|
|
168
174
|
isLocalCall,
|
|
169
175
|
additionalFilter: additionalFilterToUse,
|
|
@@ -692,7 +692,7 @@ export const renderReactSelect = props => {
|
|
|
692
692
|
}
|
|
693
693
|
} else if (Array.isArray(value)) {
|
|
694
694
|
valueToUse = value.map(val => {
|
|
695
|
-
if (val
|
|
695
|
+
if (val?.userCreated) {
|
|
696
696
|
return {
|
|
697
697
|
label: val.value,
|
|
698
698
|
value: val
|
|
@@ -719,10 +719,10 @@ export const renderReactSelect = props => {
|
|
|
719
719
|
let valToPass;
|
|
720
720
|
if (Array.isArray(valOrVals)) {
|
|
721
721
|
valToPass = valOrVals.map(function (val) {
|
|
722
|
-
if (val
|
|
722
|
+
if (val?.userCreated) {
|
|
723
723
|
return val;
|
|
724
724
|
}
|
|
725
|
-
return val
|
|
725
|
+
return val?.value;
|
|
726
726
|
});
|
|
727
727
|
} else if (valOrVals) {
|
|
728
728
|
if (valOrVals.userCreated) {
|
package/src/TgSelect/index.js
CHANGED
|
@@ -76,7 +76,7 @@ class TgSelect extends React.Component {
|
|
|
76
76
|
) {
|
|
77
77
|
const topLevelId = item.value.split(":")[0];
|
|
78
78
|
valArray = valArray.filter(val => {
|
|
79
|
-
if (val
|
|
79
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
80
80
|
const valId = val.value.split(":")[0];
|
|
81
81
|
if (valId === topLevelId) {
|
|
82
82
|
return false;
|
|
@@ -187,7 +187,7 @@ class TgSelect extends React.Component {
|
|
|
187
187
|
getTagProps = label => {
|
|
188
188
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
189
189
|
const val = Array.isArray(value) ? value : [value];
|
|
190
|
-
const matchingVal = val.find(op => op
|
|
190
|
+
const matchingVal = val.find(op => op?.label === label);
|
|
191
191
|
const disabled = _disabled || (matchingVal && matchingVal.disabled);
|
|
192
192
|
const className = matchingVal && matchingVal.className;
|
|
193
193
|
|