ps-toolkit-ui 1.8.78 → 1.8.80
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/bundles/ps-toolkit-ui.umd.js +26 -15
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/select/form.select.component.js +15 -5
- package/fesm2015/ps-toolkit-ui.js +14 -4
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/select/form.select.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -5286,25 +5286,12 @@
|
|
|
5286
5286
|
this.inp.load();
|
|
5287
5287
|
}
|
|
5288
5288
|
this.inp.setValue = function (v, isEdit) {
|
|
5289
|
-
var e_1, _a;
|
|
5290
5289
|
if (!_this.inp.multiple) {
|
|
5291
5290
|
_this.selectOption(v == null ? null : v.toString(), isEdit);
|
|
5292
5291
|
}
|
|
5293
5292
|
else {
|
|
5294
5293
|
if (v != null) {
|
|
5295
|
-
|
|
5296
|
-
for (var v_1 = __values(v), v_1_1 = v_1.next(); !v_1_1.done; v_1_1 = v_1.next()) {
|
|
5297
|
-
var t = v_1_1.value;
|
|
5298
|
-
_this.selectOption(t.toString(), isEdit);
|
|
5299
|
-
}
|
|
5300
|
-
}
|
|
5301
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
5302
|
-
finally {
|
|
5303
|
-
try {
|
|
5304
|
-
if (v_1_1 && !v_1_1.done && (_a = v_1.return)) _a.call(v_1);
|
|
5305
|
-
}
|
|
5306
|
-
finally { if (e_1) throw e_1.error; }
|
|
5307
|
-
}
|
|
5294
|
+
_this.setValue(v.map(String));
|
|
5308
5295
|
}
|
|
5309
5296
|
}
|
|
5310
5297
|
};
|
|
@@ -5332,7 +5319,7 @@
|
|
|
5332
5319
|
_this.inp.setValue(_this.inp.default, true);
|
|
5333
5320
|
}
|
|
5334
5321
|
else {
|
|
5335
|
-
_this.
|
|
5322
|
+
_this.setValue([]);
|
|
5336
5323
|
}
|
|
5337
5324
|
if (_this.inp.rel != null) {
|
|
5338
5325
|
_this.inp.rel.options = [];
|
|
@@ -5354,6 +5341,30 @@
|
|
|
5354
5341
|
HelperClass.setBarcodeReader(this.inp);
|
|
5355
5342
|
}
|
|
5356
5343
|
};
|
|
5344
|
+
FormSelectComponent.prototype.setValue = function (ids, rows) {
|
|
5345
|
+
var e_1, _a;
|
|
5346
|
+
if (rows === void 0) { rows = this.inp.options; }
|
|
5347
|
+
try {
|
|
5348
|
+
for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
|
|
5349
|
+
var r = rows_1_1.value;
|
|
5350
|
+
r.selected = ids.includes(r.value);
|
|
5351
|
+
if (this.inp.onlyChild) {
|
|
5352
|
+
if (r.selected) {
|
|
5353
|
+
this.checkParent(r.parent);
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
this.setValue(ids, r.options);
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
5360
|
+
finally {
|
|
5361
|
+
try {
|
|
5362
|
+
if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
|
|
5363
|
+
}
|
|
5364
|
+
finally { if (e_1) throw e_1.error; }
|
|
5365
|
+
}
|
|
5366
|
+
return true;
|
|
5367
|
+
};
|
|
5357
5368
|
FormSelectComponent.prototype.loadOptions = function () {
|
|
5358
5369
|
var v = this.inp.search.replace(/^_+|_+$/g, '');
|
|
5359
5370
|
if (v) {
|