ps-toolkit-ui 1.16.86 → 1.16.88
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 +44 -27
- 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/classes/table.class.js +21 -12
- package/esm2015/lib/components/form/date/form.date.component.js +8 -2
- package/esm2015/lib/components/table/row/table.row.component.js +2 -1
- package/fesm2015/ps-toolkit-ui.js +28 -12
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/table.class.d.ts +3 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -3515,6 +3515,7 @@
|
|
|
3515
3515
|
opt.modal.table.form.url = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
|
|
3516
3516
|
opt.modal.table.form.baseUrl = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
|
|
3517
3517
|
}
|
|
3518
|
+
opt.modal.table.relatedRow = _this.row.Data;
|
|
3518
3519
|
opt.modal.table.set();
|
|
3519
3520
|
}
|
|
3520
3521
|
if (opt.modal.form) {
|
|
@@ -4611,10 +4612,16 @@
|
|
|
4611
4612
|
}
|
|
4612
4613
|
};
|
|
4613
4614
|
FormDateComponent.prototype.onKeyUp = function (e) {
|
|
4614
|
-
if (this.cSearch !== e.target.value
|
|
4615
|
+
if (this.cSearch !== e.target.value) {
|
|
4615
4616
|
this.inp.error = null;
|
|
4616
4617
|
this.inp.value = null;
|
|
4617
4618
|
this.cSearch = e.target.value;
|
|
4619
|
+
if (this.inp.type === exports.InputType.Month) {
|
|
4620
|
+
if (this.inp.onChange) {
|
|
4621
|
+
this.inp.onChange(this.inp);
|
|
4622
|
+
}
|
|
4623
|
+
return;
|
|
4624
|
+
}
|
|
4618
4625
|
if (this.inp.search !== '' && this.inp.search !== null) {
|
|
4619
4626
|
var v = moment__namespace(this.inp.search, 'jYYYY/jMM/jDD');
|
|
4620
4627
|
if (v.isValid() && this.inp.search.length <= 10) {
|
|
@@ -9119,6 +9126,8 @@
|
|
|
9119
9126
|
this.searchForm = null;
|
|
9120
9127
|
this.modal = null;
|
|
9121
9128
|
this.level = null;
|
|
9129
|
+
this.withRelatedRow = false;
|
|
9130
|
+
this.relatedRow = false;
|
|
9122
9131
|
this.listAccess = null;
|
|
9123
9132
|
this.insertAccess = null;
|
|
9124
9133
|
this.onLoad = null;
|
|
@@ -9150,7 +9159,7 @@
|
|
|
9150
9159
|
return (relatedId ? url.replace('{}', relatedId) : (url.match(/{}/g) || []).length > 1 ? url.replace('/{}', '') : url).replace('{}', rowId);
|
|
9151
9160
|
};
|
|
9152
9161
|
TableClass.prototype.searchData = function (report) {
|
|
9153
|
-
var e_1, _a
|
|
9162
|
+
var e_1, _a;
|
|
9154
9163
|
if (report === void 0) { report = false; }
|
|
9155
9164
|
var d = {};
|
|
9156
9165
|
if (!report) {
|
|
@@ -9169,42 +9178,50 @@
|
|
|
9169
9178
|
d.SortType = this.sortType;
|
|
9170
9179
|
}
|
|
9171
9180
|
try {
|
|
9172
|
-
for (var
|
|
9173
|
-
var c =
|
|
9181
|
+
for (var _b = __values(this.cols.filter(function (x) { return x.withSearch && x.search != null && x.search.data() != null && x.search.data() !== ''; })), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
9182
|
+
var c = _c.value;
|
|
9174
9183
|
var vl = c.search.data();
|
|
9175
|
-
|
|
9176
|
-
try {
|
|
9177
|
-
for (var _e = (e_2 = void 0, __values(Object.entries(vl))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
9178
|
-
var _g = __read(_f.value, 2), key = _g[0], value = _g[1];
|
|
9179
|
-
if (value != null) {
|
|
9180
|
-
d[key] = value;
|
|
9181
|
-
}
|
|
9182
|
-
}
|
|
9183
|
-
}
|
|
9184
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
9185
|
-
finally {
|
|
9186
|
-
try {
|
|
9187
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
9188
|
-
}
|
|
9189
|
-
finally { if (e_2) throw e_2.error; }
|
|
9190
|
-
}
|
|
9191
|
-
}
|
|
9192
|
-
else {
|
|
9193
|
-
if (vl != null) {
|
|
9194
|
-
d[c.name] = vl;
|
|
9195
|
-
}
|
|
9196
|
-
}
|
|
9184
|
+
this.addData(d, c.name, vl);
|
|
9197
9185
|
}
|
|
9198
9186
|
}
|
|
9199
9187
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
9200
9188
|
finally {
|
|
9201
9189
|
try {
|
|
9202
|
-
if (
|
|
9190
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
9203
9191
|
}
|
|
9204
9192
|
finally { if (e_1) throw e_1.error; }
|
|
9205
9193
|
}
|
|
9194
|
+
if (this.withRelatedRow) {
|
|
9195
|
+
d = Object.assign({}, d, this.relatedRow);
|
|
9196
|
+
}
|
|
9197
|
+
console.log(d, 'dddddddddd');
|
|
9206
9198
|
return this.searchForm ? this.searchForm.data(d) : d;
|
|
9207
9199
|
};
|
|
9200
|
+
TableClass.prototype.addData = function (d, name, vl) {
|
|
9201
|
+
var e_2, _a;
|
|
9202
|
+
if (typeof vl === 'object' && !(vl instanceof Array)) {
|
|
9203
|
+
try {
|
|
9204
|
+
for (var _b = __values(Object.entries(vl)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
9205
|
+
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
9206
|
+
if (value != null) {
|
|
9207
|
+
d[key] = value;
|
|
9208
|
+
}
|
|
9209
|
+
}
|
|
9210
|
+
}
|
|
9211
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
9212
|
+
finally {
|
|
9213
|
+
try {
|
|
9214
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
9215
|
+
}
|
|
9216
|
+
finally { if (e_2) throw e_2.error; }
|
|
9217
|
+
}
|
|
9218
|
+
}
|
|
9219
|
+
else {
|
|
9220
|
+
if (vl != null) {
|
|
9221
|
+
d[name] = vl;
|
|
9222
|
+
}
|
|
9223
|
+
}
|
|
9224
|
+
};
|
|
9208
9225
|
TableClass.prototype.getUrl = function (url) {
|
|
9209
9226
|
return this.permissions.RelatedId ? url.replace('{}', this.permissions.RelatedId) : url.replace('/{}', '');
|
|
9210
9227
|
};
|