mediacube-ui 0.1.324 → 0.1.325
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.325](https://github.com/MediaCubeCo/mcui/compare/v0.1.324...v0.1.325) (2024-11-05)
|
|
6
|
+
|
|
5
7
|
### [0.1.324](https://github.com/MediaCubeCo/mcui/compare/v0.1.323...v0.1.324) (2024-10-29)
|
|
6
8
|
|
|
7
9
|
### [0.1.323](https://github.com/MediaCubeCo/mcui/compare/v0.1.322...v0.1.323) (2024-10-24)
|
package/package.json
CHANGED
|
@@ -123,7 +123,6 @@
|
|
|
123
123
|
<mc-field-text
|
|
124
124
|
v-model="newPresetName"
|
|
125
125
|
:placeholder="placeholders.enter_preset_name"
|
|
126
|
-
:max-length="20"
|
|
127
126
|
class="mc-filter__preset-input"
|
|
128
127
|
name="preset_name"
|
|
129
128
|
/>
|
|
@@ -334,7 +333,7 @@ export default {
|
|
|
334
333
|
return !_isEmpty(this.currentCondition)
|
|
335
334
|
},
|
|
336
335
|
buttonCreateIsDisable() {
|
|
337
|
-
return !this.newPresetName.trim()
|
|
336
|
+
return !(this.newPresetName.trim() && Object.keys(this.currentValues)?.length)
|
|
338
337
|
},
|
|
339
338
|
},
|
|
340
339
|
watch: {
|
|
@@ -366,23 +365,6 @@ export default {
|
|
|
366
365
|
if (_isEmpty(this.value.filter) && _isEmpty(newVal)) {
|
|
367
366
|
this.buttonConfirmIsDisable = true
|
|
368
367
|
}
|
|
369
|
-
|
|
370
|
-
if (this.activePreset) {
|
|
371
|
-
const mappedPresets = this.presets[this.name].map(p => {
|
|
372
|
-
if (p.name === this.activePreset.name) {
|
|
373
|
-
return {
|
|
374
|
-
name: p.name,
|
|
375
|
-
filter: _cloneDeep(this.currentValues),
|
|
376
|
-
filter_name: _cloneDeep(this.currentValuesName),
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
return p
|
|
380
|
-
})
|
|
381
|
-
this.presets[this.name] = [...mappedPresets]
|
|
382
|
-
window.localStorage.mcFilterPresets = JSON.stringify({
|
|
383
|
-
...this.presets,
|
|
384
|
-
})
|
|
385
|
-
}
|
|
386
368
|
},
|
|
387
369
|
},
|
|
388
370
|
mounted() {
|
|
@@ -677,6 +659,22 @@ export default {
|
|
|
677
659
|
if (_isEmpty(this.currentValues)) {
|
|
678
660
|
this.buttonConfirmIsDisable = true
|
|
679
661
|
}
|
|
662
|
+
if (this.activePreset) {
|
|
663
|
+
const mappedPresets = this.presets[this.name].map(p => {
|
|
664
|
+
if (p.name === this.activePreset.name) {
|
|
665
|
+
return {
|
|
666
|
+
name: p.name,
|
|
667
|
+
filter: _cloneDeep(this.currentValues),
|
|
668
|
+
filter_name: _cloneDeep(this.currentValuesName),
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return p
|
|
672
|
+
})
|
|
673
|
+
this.presets[this.name] = [...mappedPresets]
|
|
674
|
+
window.localStorage.mcFilterPresets = JSON.stringify({
|
|
675
|
+
...this.presets,
|
|
676
|
+
})
|
|
677
|
+
}
|
|
680
678
|
},
|
|
681
679
|
handleDeletePreset(preset) {
|
|
682
680
|
const filteredPresets = this.presets[this.name].filter(p => p.name !== preset.name)
|