mediacube-ui 0.1.323 → 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,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.325](https://github.com/MediaCubeCo/mcui/compare/v0.1.324...v0.1.325) (2024-11-05)
|
|
6
|
+
|
|
7
|
+
### [0.1.324](https://github.com/MediaCubeCo/mcui/compare/v0.1.323...v0.1.324) (2024-10-29)
|
|
8
|
+
|
|
5
9
|
### [0.1.323](https://github.com/MediaCubeCo/mcui/compare/v0.1.322...v0.1.323) (2024-10-24)
|
|
6
10
|
|
|
7
11
|
### [0.1.322](https://github.com/MediaCubeCo/mcui/compare/v0.1.321...v0.1.322) (2024-10-22)
|
package/package.json
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
</label>
|
|
9
9
|
<div class="mc-date-picker__inner">
|
|
10
10
|
<div class="mc-date-picker__input-wrapper" :style="{ minWidth }">
|
|
11
|
+
<mc-svg-icon
|
|
12
|
+
v-if="!isTime"
|
|
13
|
+
class="mc-date-picker__icon-calendar mx-icon-calendar"
|
|
14
|
+
name="calendar"
|
|
15
|
+
size="300"
|
|
16
|
+
/>
|
|
11
17
|
<date-picker
|
|
12
18
|
ref="input"
|
|
13
19
|
:type="type"
|
|
@@ -102,11 +108,6 @@
|
|
|
102
108
|
</div>
|
|
103
109
|
</slot>
|
|
104
110
|
</template>
|
|
105
|
-
|
|
106
|
-
<!-- @slot Слот для вставки пользовательской иконки календаря -->
|
|
107
|
-
<template slot="icon-calendar">
|
|
108
|
-
<mc-svg-icon class="mc-date-picker__icon" name="calendar" />
|
|
109
|
-
</template>
|
|
110
111
|
</date-picker>
|
|
111
112
|
</div>
|
|
112
113
|
</div>
|
|
@@ -604,6 +605,7 @@ export default {
|
|
|
604
605
|
}
|
|
605
606
|
|
|
606
607
|
&__input-wrapper {
|
|
608
|
+
position: relative;
|
|
607
609
|
width: 100%;
|
|
608
610
|
}
|
|
609
611
|
|
|
@@ -661,6 +663,15 @@ export default {
|
|
|
661
663
|
color: $color-outline-gray;
|
|
662
664
|
}
|
|
663
665
|
}
|
|
666
|
+
&__icon-calendar {
|
|
667
|
+
position: absolute;
|
|
668
|
+
z-index: 1;
|
|
669
|
+
}
|
|
670
|
+
&__date-picker {
|
|
671
|
+
.mx-icon-calendar {
|
|
672
|
+
display: none;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
664
675
|
}
|
|
665
676
|
|
|
666
677
|
.mx-datepicker {
|
|
@@ -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)
|