mediacube-ui 0.1.329 → 0.1.331
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,10 @@
|
|
|
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.331](https://github.com/MediaCubeCo/mcui/compare/v0.1.330...v0.1.331) (2024-11-12)
|
|
6
|
+
|
|
7
|
+
### [0.1.330](https://github.com/MediaCubeCo/mcui/compare/v0.1.329...v0.1.330) (2024-11-12)
|
|
8
|
+
|
|
5
9
|
### [0.1.329](https://github.com/MediaCubeCo/mcui/compare/v0.1.328...v0.1.329) (2024-11-11)
|
|
6
10
|
|
|
7
11
|
### [0.1.328](https://github.com/MediaCubeCo/mcui/compare/v0.1.327...v0.1.328) (2024-11-11)
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
secondary-color="purple"
|
|
23
23
|
@mouseup="() => handlePresetMouseUp(preset)"
|
|
24
24
|
>
|
|
25
|
-
{{ preset.
|
|
25
|
+
{{ preset.visibleName }}
|
|
26
26
|
</mc-button>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -342,7 +342,7 @@ export default {
|
|
|
342
342
|
const hasLongName = preset?.name?.length > this.preset_max_size
|
|
343
343
|
return {
|
|
344
344
|
...preset,
|
|
345
|
-
|
|
345
|
+
visibleName: hasLongName ? `${preset.name.slice(0, this.preset_max_size)}...` : preset.name,
|
|
346
346
|
tooltip: hasLongName ? preset?.name : null,
|
|
347
347
|
}
|
|
348
348
|
})
|
|
@@ -377,6 +377,9 @@ export default {
|
|
|
377
377
|
if (_isEmpty(this.value.filter) && _isEmpty(newVal)) {
|
|
378
378
|
this.buttonConfirmIsDisable = true
|
|
379
379
|
}
|
|
380
|
+
if (!_isEqual(this.activePreset?.filter, newVal)) {
|
|
381
|
+
this.activePreset = null
|
|
382
|
+
}
|
|
380
383
|
},
|
|
381
384
|
},
|
|
382
385
|
mounted() {
|
|
@@ -392,7 +395,10 @@ export default {
|
|
|
392
395
|
},
|
|
393
396
|
methods: {
|
|
394
397
|
updatePresets() {
|
|
395
|
-
this.presets =
|
|
398
|
+
this.presets = {
|
|
399
|
+
[this.name]: [],
|
|
400
|
+
...JSON.parse(window.localStorage.mcFilterPresets || '{}'),
|
|
401
|
+
}
|
|
396
402
|
},
|
|
397
403
|
handlerSetFastFilter(tag) {
|
|
398
404
|
const filterValue = tag.relation ? { [tag.relation]: tag.default } : tag.default
|
|
@@ -671,22 +677,6 @@ export default {
|
|
|
671
677
|
if (_isEmpty(this.currentValues)) {
|
|
672
678
|
this.buttonConfirmIsDisable = true
|
|
673
679
|
}
|
|
674
|
-
if (this.activePreset) {
|
|
675
|
-
const mappedPresets = this.presets[this.name].map(p => {
|
|
676
|
-
if (p.name === this.activePreset.name) {
|
|
677
|
-
return {
|
|
678
|
-
name: p.name,
|
|
679
|
-
filter: _cloneDeep(this.currentValues),
|
|
680
|
-
filter_name: _cloneDeep(this.currentValuesName),
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
return p
|
|
684
|
-
})
|
|
685
|
-
this.presets[this.name] = [...mappedPresets]
|
|
686
|
-
window.localStorage.mcFilterPresets = JSON.stringify({
|
|
687
|
-
...this.presets,
|
|
688
|
-
})
|
|
689
|
-
}
|
|
690
680
|
},
|
|
691
681
|
handleDeletePreset(preset) {
|
|
692
682
|
const filteredPresets = this.presets[this.name].filter(p => p.name !== preset.name)
|
package/src/styles/_mixins.scss
CHANGED
|
@@ -451,9 +451,15 @@
|
|
|
451
451
|
h2 {
|
|
452
452
|
margin-bottom: $space-200;
|
|
453
453
|
}
|
|
454
|
+
* + h2 {
|
|
455
|
+
margin-top: $space-300;
|
|
456
|
+
}
|
|
454
457
|
h3, strong {
|
|
455
458
|
margin-bottom: $space-100;
|
|
456
459
|
}
|
|
460
|
+
* + h3 {
|
|
461
|
+
margin-top: $space-250;
|
|
462
|
+
}
|
|
457
463
|
img {
|
|
458
464
|
object-fit: cover;
|
|
459
465
|
margin: $space-250 $space-zero;
|