@phoenix-cg/v-filters 0.2.13 → 0.2.15
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/dist/v-filters.common.js +20 -10
- package/dist/v-filters.common.js.map +1 -1
- package/dist/v-filters.umd.js +20 -10
- package/dist/v-filters.umd.js.map +1 -1
- package/dist/v-filters.umd.min.js +1 -1
- package/dist/v-filters.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VFilters.vue +12 -8
package/dist/v-filters.umd.js
CHANGED
|
@@ -6036,7 +6036,7 @@ if (typeof window !== 'undefined') {
|
|
|
6036
6036
|
// Indicate to webpack that this file can be concatenated
|
|
6037
6037
|
/* harmony default export */ var setPublicPath = (null);
|
|
6038
6038
|
|
|
6039
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22714775-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VFilters.vue?vue&type=template&id=
|
|
6039
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22714775-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VFilters.vue?vue&type=template&id=70961223&
|
|
6040
6040
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-filters"},[_c('div',{staticClass:"v-filters_fields"},[_vm._t("before-fields"),_vm._l((_vm.fields),function(field){return _c(_vm.fieldComponentName,{key:field._name,tag:"component",class:[("__" + (field._name))],attrs:{"title":field.title}},[_c(_vm.componentsMap[field._type],_vm._b({key:_vm.fieldKey,tag:"component",on:{"input":function($event){return _vm.handleFieldChange(field._name, $event)}},model:{value:(_vm.filters[field._name]),callback:function ($$v) {_vm.$set(_vm.filters, field._name, $$v)},expression:"filters[field._name]"}},'component',_vm.getFieldProps(field),false))],1)}),_vm._t("after-fields"),_vm._t("actions",[_c(_vm.fieldComponentName,{tag:"component"},[(!_vm.immediate)?_c('button',{staticClass:"v-button v-filters_button",on:{"click":_vm.showResult}},[_vm._v(" "+_vm._s(_vm.actionTitle)+" ")]):_vm._e(),(_vm.edited)?_c('button',{staticClass:"v-button v-filters_button __reset",on:{"click":_vm.resetFilters}},[_vm._v(" Сбросить параметры ")]):_vm._e()])],null,{
|
|
6041
6041
|
showResult: _vm.showResult,
|
|
6042
6042
|
resetFilters: _vm.resetFilters,
|
|
@@ -6053,7 +6053,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
|
|
|
6053
6053
|
var staticRenderFns = []
|
|
6054
6054
|
|
|
6055
6055
|
|
|
6056
|
-
// CONCATENATED MODULE: ./src/components/VFilters.vue?vue&type=template&id=
|
|
6056
|
+
// CONCATENATED MODULE: ./src/components/VFilters.vue?vue&type=template&id=70961223&
|
|
6057
6057
|
|
|
6058
6058
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
|
|
6059
6059
|
var es_promise = __webpack_require__("e6cf");
|
|
@@ -7215,13 +7215,15 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
|
|
|
7215
7215
|
});
|
|
7216
7216
|
this.inited = true;
|
|
7217
7217
|
|
|
7218
|
-
if (!isUpdate) {
|
|
7218
|
+
if (!isUpdate && this.initializedEmitted) {
|
|
7219
|
+
this.setUrlParams();
|
|
7220
|
+
this.doAction(true);
|
|
7221
|
+
}
|
|
7222
|
+
|
|
7223
|
+
if (!this.initializedEmitted) {
|
|
7219
7224
|
this.setUrlParams(false, this.getInitialFlatFilters());
|
|
7220
7225
|
this.$emit('fields-initialized', this.getInitialFlatFilters());
|
|
7221
7226
|
this.initializedEmitted = true;
|
|
7222
|
-
} else {
|
|
7223
|
-
this.setUrlParams();
|
|
7224
|
-
this.doAction(true);
|
|
7225
7227
|
}
|
|
7226
7228
|
},
|
|
7227
7229
|
getInitialFlatFilters: function getInitialFlatFilters() {
|
|
@@ -7230,9 +7232,17 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
|
|
|
7230
7232
|
var filters = _objectSpread2({}, this.filterParamsToInclude);
|
|
7231
7233
|
|
|
7232
7234
|
this.fields.forEach(function (field) {
|
|
7233
|
-
var
|
|
7234
|
-
|
|
7235
|
-
|
|
7235
|
+
var filtersValue = _this3.filters[field._name];
|
|
7236
|
+
var wrappedValue = getType(filtersValue) === 'Array' ? filtersValue : [filtersValue];
|
|
7237
|
+
|
|
7238
|
+
var _wrappedValue2 = _slicedToArray(wrappedValue, 1),
|
|
7239
|
+
value = _wrappedValue2[0];
|
|
7240
|
+
|
|
7241
|
+
if (value) {
|
|
7242
|
+
filters[field._name] = wrappedValue.map(function (value) {
|
|
7243
|
+
return (value === null || value === void 0 ? void 0 : value._id) || value;
|
|
7244
|
+
});
|
|
7245
|
+
}
|
|
7236
7246
|
});
|
|
7237
7247
|
return filters;
|
|
7238
7248
|
},
|
|
@@ -7285,7 +7295,7 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
|
|
|
7285
7295
|
doAction: function doAction() {
|
|
7286
7296
|
var showResult = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
7287
7297
|
|
|
7288
|
-
if (showResult
|
|
7298
|
+
if (showResult) {
|
|
7289
7299
|
this.showResult();
|
|
7290
7300
|
} else {
|
|
7291
7301
|
this.requestCount();
|