mediacube-ui 0.1.326 → 0.1.328
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 +4 -0
- package/package.json +1 -1
- package/src/patterns/McFilter/McFilter.vue +14 -2
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.328](https://github.com/MediaCubeCo/mcui/compare/v0.1.327...v0.1.328) (2024-11-11)
|
|
6
|
+
|
|
7
|
+
### [0.1.327](https://github.com/MediaCubeCo/mcui/compare/v0.1.326...v0.1.327) (2024-11-11)
|
|
8
|
+
|
|
5
9
|
### [0.1.326](https://github.com/MediaCubeCo/mcui/compare/v0.1.325...v0.1.326) (2024-11-11)
|
|
6
10
|
|
|
7
11
|
### [0.1.325](https://github.com/MediaCubeCo/mcui/compare/v0.1.324...v0.1.325) (2024-11-05)
|
package/package.json
CHANGED
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
<mc-svg-icon slot="icon-prepend" name="filter_list" />
|
|
13
13
|
</mc-button>
|
|
14
14
|
</mc-tooltip>
|
|
15
|
-
<div v-if="
|
|
15
|
+
<div v-if="currentPresets?.length" class="mc-filter__presets">
|
|
16
16
|
<div ref="dragArea" class="mc-filter__presets-inner" @mousedown="onMouseDown">
|
|
17
17
|
<mc-button
|
|
18
|
-
v-for="preset in
|
|
18
|
+
v-for="preset in currentPresets"
|
|
19
19
|
:key="preset.name"
|
|
20
20
|
:variation="getPresetButtonVariation(preset)"
|
|
21
|
+
:tooltip="preset.tooltip"
|
|
21
22
|
secondary-color="purple"
|
|
22
23
|
@mouseup="() => handlePresetMouseUp(preset)"
|
|
23
24
|
>
|
|
@@ -298,6 +299,7 @@ export default {
|
|
|
298
299
|
currentConditionName: null,
|
|
299
300
|
buttonConfirmIsDisable: false,
|
|
300
301
|
newPresetName: '',
|
|
302
|
+
preset_max_size: 40,
|
|
301
303
|
dragOptions: {
|
|
302
304
|
scrollPos: 0,
|
|
303
305
|
startClientPos: 0,
|
|
@@ -335,6 +337,16 @@ export default {
|
|
|
335
337
|
buttonCreateIsDisable() {
|
|
336
338
|
return !(this.newPresetName.trim() && Object.keys(this.currentValues)?.length)
|
|
337
339
|
},
|
|
340
|
+
currentPresets() {
|
|
341
|
+
return this.presets[this.name]?.map(preset => {
|
|
342
|
+
const hasLongName = preset?.name?.length > this.preset_max_size
|
|
343
|
+
return {
|
|
344
|
+
...preset,
|
|
345
|
+
name: hasLongName ? `${preset.name.slice(0, this.preset_max_size)}...` : preset.name,
|
|
346
|
+
tooltip: hasLongName ? preset?.name : null,
|
|
347
|
+
}
|
|
348
|
+
})
|
|
349
|
+
},
|
|
338
350
|
},
|
|
339
351
|
watch: {
|
|
340
352
|
value: {
|