@farris/ui-list-filter 0.1.17 → 0.1.19
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/farris-ui-list-filter.umd.js +50 -20
- package/bundles/farris-ui-list-filter.umd.js.map +1 -1
- package/bundles/farris-ui-list-filter.umd.min.js +1 -1
- package/bundles/farris-ui-list-filter.umd.min.js.map +1 -1
- package/esm2015/lib/controlcomponent/inputcomponent/input.component.js +1 -1
- package/esm2015/lib/directives/clear-fields.directive.js +4 -1
- package/esm2015/lib/list-filter.component.js +48 -19
- package/esm2015/lib/submithandlers/handlers/dropdown.handler.js +2 -2
- package/esm2015/lib/submithandlers/handlers/radio.handler.js +2 -2
- package/esm5/lib/controlcomponent/inputcomponent/input.component.js +1 -1
- package/esm5/lib/directives/clear-fields.directive.js +4 -1
- package/esm5/lib/list-filter.component.js +49 -19
- package/esm5/lib/submithandlers/handlers/dropdown.handler.js +2 -2
- package/esm5/lib/submithandlers/handlers/radio.handler.js +2 -2
- package/fesm2015/farris-ui-list-filter.js +51 -21
- package/fesm2015/farris-ui-list-filter.js.map +1 -1
- package/fesm5/farris-ui-list-filter.js +52 -21
- package/fesm5/farris-ui-list-filter.js.map +1 -1
- package/lib/list-filter.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2840,7 +2840,7 @@
|
|
|
2840
2840
|
function (qc) {
|
|
2841
2841
|
/** @type {?} */
|
|
2842
2842
|
var ddv = (( /** @type {?} */(qc.value)));
|
|
2843
|
-
if (Object.keys(ddv).length === 0 || Object.keys(ddv.value).length === 0)
|
|
2843
|
+
if (ddv === undefined || ddv === null || Object.keys(ddv).length === 0 || Object.keys(ddv.value || {}).length === 0)
|
|
2844
2844
|
return [];
|
|
2845
2845
|
return [{
|
|
2846
2846
|
'FilterField': qc.fieldCode,
|
|
@@ -3190,7 +3190,7 @@
|
|
|
3190
3190
|
function (qc) {
|
|
3191
3191
|
/** @type {?} */
|
|
3192
3192
|
var radiov = (( /** @type {?} */(qc.value)));
|
|
3193
|
-
if (Object.keys(radiov).length === 0 || Object.keys(radiov.value).length === 0)
|
|
3193
|
+
if (radiov.value === undefined || radiov.value === null || Object.keys(radiov).length === 0 || Object.keys(radiov.value).length === 0)
|
|
3194
3194
|
return [];
|
|
3195
3195
|
return [{
|
|
3196
3196
|
'FilterField': qc.fieldCode,
|
|
@@ -4295,6 +4295,7 @@
|
|
|
4295
4295
|
this.currentLocale = 'zh-CHS';
|
|
4296
4296
|
this.isControlInline = true;
|
|
4297
4297
|
this.fieldCodeOfClearFields = [];
|
|
4298
|
+
this.UPDATE_FILTER_VALUES_TIMER = null;
|
|
4298
4299
|
if (this.injector) {
|
|
4299
4300
|
this.currentLocale = this.injector.get(i0.LOCALE_ID);
|
|
4300
4301
|
this.listfilterHandler = this.injector.get(LISTFILTER_HANDLER_TOKEN, null, i0.InjectFlags.Optional);
|
|
@@ -4945,30 +4946,56 @@
|
|
|
4945
4946
|
* @return {?}
|
|
4946
4947
|
*/
|
|
4947
4948
|
function (fieldConfigs) {
|
|
4948
|
-
|
|
4949
|
-
|
|
4949
|
+
var _this = this;
|
|
4950
|
+
if (this.UPDATE_FILTER_VALUES_TIMER) {
|
|
4951
|
+
clearTimeout(this.UPDATE_FILTER_VALUES_TIMER);
|
|
4952
|
+
}
|
|
4953
|
+
this.UPDATE_FILTER_VALUES_TIMER = setTimeout(( /**
|
|
4950
4954
|
* @return {?}
|
|
4951
|
-
*/function (
|
|
4952
|
-
if (this.listFilterConditions && this.listFilterConditions.length) {
|
|
4953
|
-
this.setValues(this.listFilterConditions, fieldConfigs);
|
|
4955
|
+
*/function () {
|
|
4954
4956
|
/** @type {?} */
|
|
4955
|
-
var
|
|
4957
|
+
var _filters = _this.stagListFilterConditions.map(( /**
|
|
4956
4958
|
* @param {?} o
|
|
4957
4959
|
* @return {?}
|
|
4958
4960
|
*/function (o) { return (__assign({}, o)); }));
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4961
|
+
if (_filters && _filters.length) {
|
|
4962
|
+
_this.setValues(_filters, fieldConfigs);
|
|
4963
|
+
/** @type {?} */
|
|
4964
|
+
var listFilter = _filters.map(( /**
|
|
4965
|
+
* @param {?} o
|
|
4966
|
+
* @return {?}
|
|
4967
|
+
*/function (o) { return (__assign({}, o)); }));
|
|
4968
|
+
_this.listFilterConditions = listFilter;
|
|
4969
|
+
_this.requiredListInit();
|
|
4970
|
+
_this.searchChange.emit(_this.listFilterConditions);
|
|
4971
|
+
_this.inSetCurrentFilterConditions();
|
|
4972
|
+
// this.listSearch();
|
|
4973
|
+
_this.cd.detectChanges();
|
|
4974
|
+
_this.cd.markForCheck();
|
|
4975
|
+
_this.canSubmit = _this.canSubmitFilter(_this.requiredListFilter);
|
|
4976
|
+
if (!_this.canSubmit) {
|
|
4977
|
+
return;
|
|
4978
|
+
}
|
|
4979
|
+
_this.submit('showFormData', _this.listFilterConditions);
|
|
4969
4980
|
}
|
|
4970
|
-
|
|
4971
|
-
}
|
|
4981
|
+
}));
|
|
4982
|
+
// this.listFilterConditions = this.stagListFilterConditions.map(o => ({ ...o }));
|
|
4983
|
+
// if (this.listFilterConditions && this.listFilterConditions.length) {
|
|
4984
|
+
// this.setValues(this.listFilterConditions, fieldConfigs);
|
|
4985
|
+
// const listFilter = this.listFilterConditions.map(o => ({ ...o }));
|
|
4986
|
+
// this.listFilterConditions = listFilter;
|
|
4987
|
+
// this.requiredListInit();
|
|
4988
|
+
// this.searchChange.emit(this.listFilterConditions);
|
|
4989
|
+
// this.inSetCurrentFilterConditions();
|
|
4990
|
+
// // this.listSearch();
|
|
4991
|
+
// this.cd.detectChanges();
|
|
4992
|
+
// this.cd.markForCheck();
|
|
4993
|
+
// this.canSubmit = this.canSubmitFilter(this.requiredListFilter);
|
|
4994
|
+
// if (!this.canSubmit) {
|
|
4995
|
+
// return;
|
|
4996
|
+
// }
|
|
4997
|
+
// this.submit('showFormData', this.listFilterConditions);
|
|
4998
|
+
// }
|
|
4972
4999
|
};
|
|
4973
5000
|
// 设置value
|
|
4974
5001
|
// 设置value
|
|
@@ -7605,6 +7632,9 @@
|
|
|
7605
7632
|
* @param {?} v
|
|
7606
7633
|
* @return {?}
|
|
7607
7634
|
*/function (v) {
|
|
7635
|
+
if (!_this.ngCtrl.dirty) {
|
|
7636
|
+
return;
|
|
7637
|
+
}
|
|
7608
7638
|
_this.listFilterCmp.fieldCodeOfClearFields = [];
|
|
7609
7639
|
_this.clearFields.split(',').forEach(( /**
|
|
7610
7640
|
* @param {?} n
|