@saooti/octopus-sdk 30.0.7 → 30.0.8
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/README.md +2 -1
- package/index.ts +13 -2
- package/package.json +1 -1
- package/src/assets/bootstrap-diff.scss +2 -1
- package/src/assets/form.scss +7 -0
- package/src/assets/general.scss +14 -20
- package/src/assets/multiselect.scss +1 -1
- package/src/assets/share.scss +1 -12
- package/src/components/display/comments/CommentPlayer.vue +1 -1
- package/src/components/display/emission/EmissionInlineList.vue +1 -1
- package/src/components/display/emission/EmissionItem.vue +2 -2
- package/src/components/display/emission/EmissionList.vue +1 -1
- package/src/components/display/emission/EmissionPlayerItem.vue +1 -1
- package/src/components/display/filter/AdvancedSearch.vue +39 -101
- package/src/components/display/filter/CategoryFilter.vue +9 -13
- package/src/components/display/filter/ProductorSearch.vue +20 -39
- package/src/components/display/filter/RubriqueChoice.vue +1 -1
- package/src/components/display/filter/RubriqueFilter.vue +8 -12
- package/src/components/display/organisation/OrganisationChooserLight.vue +7 -1
- package/src/components/display/playlist/PlaylistItem.vue +1 -1
- package/src/components/display/playlist/PodcastList.vue +8 -19
- package/src/components/display/podcasts/PodcastFilterList.vue +9 -18
- package/src/components/display/podcasts/PodcastImage.vue +1 -1
- package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
- package/src/components/display/podcasts/PodcastItem.vue +1 -1
- package/src/components/display/sharing/PlayerParameters.vue +24 -45
- package/src/components/display/sharing/SharePlayer.vue +8 -17
- package/src/components/display/sharing/SharePlayerColors.vue +2 -2
- package/src/components/display/sharing/SubscribeButtons.vue +1 -1
- package/src/components/form/ClassicCheckbox.vue +61 -0
- package/src/components/form/ClassicLoading.vue +28 -0
- package/src/components/form/ClassicRadio.vue +61 -0
- package/src/components/form/ClassicSearch.vue +82 -0
- package/src/components/misc/ErrorMessage.vue +1 -1
- package/src/components/misc/Footer.vue +26 -35
- package/src/components/misc/HomeDropdown.vue +44 -93
- package/src/components/misc/LeftMenu.vue +108 -141
- package/src/components/misc/Player.vue +14 -28
- package/src/components/misc/PlayerButtons.vue +14 -37
- package/src/components/misc/PlayerProgressBar.vue +15 -50
- package/src/components/misc/TopBar.vue +140 -222
- package/src/components/misc/modal/NewsletterModal.vue +13 -27
- package/src/components/pages/Category.vue +3 -8
- package/src/components/pages/Emission.vue +12 -24
- package/src/components/pages/Emissions.vue +8 -17
- package/src/components/pages/Home.vue +1 -3
- package/src/components/pages/Lives.vue +1 -3
- package/src/components/pages/Participant.vue +18 -26
- package/src/components/pages/Participants.vue +7 -15
- package/src/components/pages/Playlist.vue +16 -29
- package/src/components/pages/Playlists.vue +1 -11
- package/src/components/pages/Podcast.vue +16 -30
- package/src/components/pages/Podcasts.vue +9 -23
- package/src/components/pages/Search.vue +26 -64
|
@@ -30,25 +30,13 @@
|
|
|
30
30
|
>
|
|
31
31
|
{{ $t('Number podcasts', { nb: podcasts.length }) + $t('sort by score') }}
|
|
32
32
|
</div>
|
|
33
|
-
<
|
|
33
|
+
<ClassicSearch
|
|
34
34
|
v-if="notEmptyPlaylist"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
:aria-label="$t('Search')"
|
|
41
|
-
/>
|
|
42
|
-
<input
|
|
43
|
-
id="search"
|
|
44
|
-
v-model="searchPattern"
|
|
45
|
-
:placeholder="$t('Search')"
|
|
46
|
-
class="filter-search-input input-no-outline flex-grow"
|
|
47
|
-
>
|
|
48
|
-
<div
|
|
49
|
-
class="saooti-search-bounty filter-list-search-icon search-icon-container"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
35
|
+
v-model:textInit="searchPattern"
|
|
36
|
+
class="width-600 align-self-baseline"
|
|
37
|
+
id-checkbox="podcast-list-search"
|
|
38
|
+
:label="$t('Search')"
|
|
39
|
+
/>
|
|
52
40
|
<ul
|
|
53
41
|
v-show="loaded"
|
|
54
42
|
class="podcast-list"
|
|
@@ -78,7 +66,7 @@
|
|
|
78
66
|
import octopusApi from '@saooti/octopus-api';
|
|
79
67
|
import PodcastItem from '../podcasts/PodcastItem.vue';
|
|
80
68
|
import { state } from '../../../store/paramStore';
|
|
81
|
-
|
|
69
|
+
import ClassicSearch from '../../form/ClassicSearch.vue';
|
|
82
70
|
import { Podcast } from '@/store/class/general/podcast';
|
|
83
71
|
import { Playlist } from '@/store/class/general/playlist';
|
|
84
72
|
import { defineComponent } from 'vue'
|
|
@@ -87,6 +75,7 @@ export default defineComponent({
|
|
|
87
75
|
|
|
88
76
|
components: {
|
|
89
77
|
PodcastItem,
|
|
78
|
+
ClassicSearch
|
|
90
79
|
},
|
|
91
80
|
|
|
92
81
|
props: {
|
|
@@ -9,29 +9,19 @@
|
|
|
9
9
|
<div class="d-flex align-items-center flex-wrap">
|
|
10
10
|
<div
|
|
11
11
|
v-if="categoryFilter"
|
|
12
|
-
class="d-flex align-items-center flex-grow categories-filter"
|
|
12
|
+
class="d-flex align-items-center flex-grow-1 categories-filter"
|
|
13
13
|
>
|
|
14
14
|
<CategoryChooser
|
|
15
15
|
:defaultanswer="$t('No category filter')"
|
|
16
16
|
@selected="onCategorySelected"
|
|
17
17
|
/>
|
|
18
18
|
</div>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<input
|
|
26
|
-
id="search"
|
|
27
|
-
v-model="searchPattern"
|
|
28
|
-
:placeholder="$t('Search')"
|
|
29
|
-
class="filter-search-input input-no-outline flex-grow"
|
|
30
|
-
>
|
|
31
|
-
<div
|
|
32
|
-
class="saooti-search-bounty filter-list-search-icon search-icon-container"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
19
|
+
<ClassicSearch
|
|
20
|
+
v-model:textInit="searchPattern"
|
|
21
|
+
class="small-flex-grow"
|
|
22
|
+
id-checkbox="podcast-filter-search"
|
|
23
|
+
:label="$t('Search')"
|
|
24
|
+
/>
|
|
35
25
|
</div>
|
|
36
26
|
<PodcastList
|
|
37
27
|
:first="first"
|
|
@@ -49,7 +39,7 @@
|
|
|
49
39
|
</template>
|
|
50
40
|
|
|
51
41
|
<script lang="ts">
|
|
52
|
-
|
|
42
|
+
import ClassicSearch from '../../form/ClassicSearch.vue';
|
|
53
43
|
import PodcastList from './PodcastList.vue';
|
|
54
44
|
import { Category } from '@/store/class/general/category';
|
|
55
45
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
@@ -59,6 +49,7 @@ export default defineComponent({
|
|
|
59
49
|
components: {
|
|
60
50
|
CategoryChooser,
|
|
61
51
|
PodcastList,
|
|
52
|
+
ClassicSearch
|
|
62
53
|
},
|
|
63
54
|
props: {
|
|
64
55
|
participantId: { default: undefined, type: Number},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="podcast"
|
|
4
|
-
class="img-box d-flex flex-column justify-content-start align-items-start position-relative justify rounded-lg flex-shrink float-start"
|
|
4
|
+
class="img-box d-flex flex-column justify-content-start align-items-start position-relative justify rounded-lg flex-shrink-0 float-start"
|
|
5
5
|
:style="{ 'background-image': 'url(\'' + podcast.imageUrl + '\')' }"
|
|
6
6
|
>
|
|
7
7
|
<template v-if="isPodcastmaker">
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
params: { podcastId: podcast.podcastId },
|
|
55
55
|
query: { productor: $store.state.filter.organisationId },
|
|
56
56
|
}"
|
|
57
|
-
class="text-dark d-flex flex-column flex-grow"
|
|
57
|
+
class="text-dark d-flex flex-column flex-grow-1"
|
|
58
58
|
>
|
|
59
59
|
<div class="title-podcast-item">
|
|
60
60
|
{{ title }}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class="accordion-body">
|
|
29
29
|
<div
|
|
30
30
|
v-if="choseNumberEpisode"
|
|
31
|
-
class="d-flex flex-column flex-grow"
|
|
31
|
+
class="d-flex flex-column flex-grow-1"
|
|
32
32
|
>
|
|
33
33
|
<div
|
|
34
34
|
v-if="displayChoiceAllEpisodes"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
name="episodeNumbers"
|
|
42
42
|
value="all"
|
|
43
43
|
>
|
|
44
|
-
<span class="flex-shrink">{{ $t('Show every episode') }}</span>
|
|
44
|
+
<span class="flex-shrink-0">{{ $t('Show every episode') }}</span>
|
|
45
45
|
</div>
|
|
46
46
|
<div
|
|
47
47
|
class="d-flex align-items-center flex-wrap"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
name="episodeNumbers"
|
|
56
56
|
value="number"
|
|
57
57
|
>
|
|
58
|
-
<span class="flex-shrink">{{ $t('Show') }}</span>
|
|
58
|
+
<span class="flex-shrink-0">{{ $t('Show') }}</span>
|
|
59
59
|
<input
|
|
60
60
|
id="number-input"
|
|
61
61
|
v-model="iFrameNumber"
|
|
@@ -69,53 +69,28 @@
|
|
|
69
69
|
class="d-inline"
|
|
70
70
|
:aria-label="$t('Number of player podcasts')"
|
|
71
71
|
/>
|
|
72
|
-
<span class="flex-shrink">{{ $t('Last podcasts') }}</span>
|
|
73
|
-
</div>
|
|
74
|
-
<div>
|
|
75
|
-
<input
|
|
76
|
-
id="proceedCheck"
|
|
77
|
-
v-model="proceedReading"
|
|
78
|
-
type="checkbox"
|
|
79
|
-
class="form-check-input"
|
|
80
|
-
>
|
|
81
|
-
<label
|
|
82
|
-
class="form-check-label"
|
|
83
|
-
for="proceedCheck"
|
|
84
|
-
>{{
|
|
85
|
-
$t('Proceed reading')
|
|
86
|
-
}}</label>
|
|
87
|
-
</div>
|
|
88
|
-
<div>
|
|
89
|
-
<input
|
|
90
|
-
id="isVisibleCheckbox"
|
|
91
|
-
v-model="isVisibleTemp"
|
|
92
|
-
type="checkbox"
|
|
93
|
-
class="form-check-input"
|
|
94
|
-
>
|
|
95
|
-
<label
|
|
96
|
-
class="form-check-label me-2"
|
|
97
|
-
for="isVisibleCheckbox"
|
|
98
|
-
>{{ $t('Podcasts still available') }}</label>
|
|
72
|
+
<span class="flex-shrink-0">{{ $t('Last podcasts') }}</span>
|
|
99
73
|
</div>
|
|
74
|
+
<ClassicCheckbox
|
|
75
|
+
v-model:textInit="proceedReading"
|
|
76
|
+
id-checkbox="proceed-reading-checkbox"
|
|
77
|
+
:label="$t('Proceed reading')"
|
|
78
|
+
/>
|
|
79
|
+
<ClassicCheckbox
|
|
80
|
+
v-model:textInit="isVisibleTemp"
|
|
81
|
+
id-checkbox="is-visible-checkbox"
|
|
82
|
+
:label="$t('Podcasts still available')"
|
|
83
|
+
/>
|
|
100
84
|
</div>
|
|
101
85
|
<div
|
|
102
86
|
v-else
|
|
103
|
-
class="d-flex flex-column flex-grow"
|
|
87
|
+
class="d-flex flex-column flex-grow-1"
|
|
104
88
|
>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class="form-check-input"
|
|
111
|
-
>
|
|
112
|
-
<label
|
|
113
|
-
class="form-check-label"
|
|
114
|
-
for="proceedCheck"
|
|
115
|
-
>{{
|
|
116
|
-
$t('Display associated article')
|
|
117
|
-
}}</label>
|
|
118
|
-
</div>
|
|
89
|
+
<ClassicCheckbox
|
|
90
|
+
v-model:textInit="displayArticle"
|
|
91
|
+
id-checkbox="display-article-checkbox"
|
|
92
|
+
:label="$t('Display associated article')"
|
|
93
|
+
/>
|
|
119
94
|
</div>
|
|
120
95
|
</div>
|
|
121
96
|
</div>
|
|
@@ -124,8 +99,12 @@
|
|
|
124
99
|
</template>
|
|
125
100
|
|
|
126
101
|
<script lang="ts">
|
|
102
|
+
import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
|
|
127
103
|
import { defineComponent } from 'vue'
|
|
128
104
|
export default defineComponent({
|
|
105
|
+
components:{
|
|
106
|
+
ClassicCheckbox,
|
|
107
|
+
},
|
|
129
108
|
props: {
|
|
130
109
|
isVisible: { default: false, type: Boolean},
|
|
131
110
|
choseNumberEpisode: {default: false, type: Boolean},
|
|
@@ -40,23 +40,12 @@
|
|
|
40
40
|
v-model:color="color"
|
|
41
41
|
v-model:theme="theme"
|
|
42
42
|
/>
|
|
43
|
-
<
|
|
43
|
+
<ClassicCheckbox
|
|
44
44
|
v-if="isPodcastNotVisible || playlist"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
id="isVisibleCheckbox"
|
|
50
|
-
v-model="isVisible"
|
|
51
|
-
type="checkbox"
|
|
52
|
-
class="form-check-input"
|
|
53
|
-
>
|
|
54
|
-
<label
|
|
55
|
-
class="form-check-label me-2"
|
|
56
|
-
for="isVisibleCheckbox"
|
|
57
|
-
>{{ titleStillAvailable }}</label>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
45
|
+
v-model:textInit="isVisible"
|
|
46
|
+
id-checkbox="is-visible-checkbox"
|
|
47
|
+
:label="titleStillAvailable"
|
|
48
|
+
/>
|
|
60
49
|
</div>
|
|
61
50
|
<PlayerParameters
|
|
62
51
|
v-if="isPlayerParameter"
|
|
@@ -99,12 +88,14 @@ const ShareModalPlayer = defineAsyncComponent(() => import('../../misc/modal/Sha
|
|
|
99
88
|
const PlayerParameters = defineAsyncComponent(() => import('./PlayerParameters.vue'));
|
|
100
89
|
const SharePlayerTypes = defineAsyncComponent(() => import('./SharePlayerTypes.vue'));
|
|
101
90
|
const SharePlayerColors = defineAsyncComponent(() => import('./SharePlayerColors.vue'));
|
|
91
|
+
const ClassicCheckbox = defineAsyncComponent(() => import('../../form/ClassicCheckbox.vue'));
|
|
102
92
|
export default defineComponent({
|
|
103
93
|
components: {
|
|
104
94
|
ShareModalPlayer,
|
|
105
95
|
SharePlayerColors,
|
|
106
96
|
PlayerParameters,
|
|
107
|
-
SharePlayerTypes
|
|
97
|
+
SharePlayerTypes,
|
|
98
|
+
ClassicCheckbox
|
|
108
99
|
},
|
|
109
100
|
|
|
110
101
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="d-flex justify-content-around mt-3 flex-grow w-100">
|
|
3
|
-
<div class="d-flex flex-column align-items-center flex-shrink me-3">
|
|
2
|
+
<div class="d-flex justify-content-around mt-3 flex-grow-1 w-100">
|
|
3
|
+
<div class="d-flex flex-column align-items-center flex-shrink-0 me-3">
|
|
4
4
|
<div class="fw-600">
|
|
5
5
|
{{ $t('Choose color') }}
|
|
6
6
|
</div>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="form-check"
|
|
4
|
+
:class="isSwitch?'form-switch':''"
|
|
5
|
+
>
|
|
6
|
+
<input
|
|
7
|
+
:id="idCheckbox"
|
|
8
|
+
v-model="textValue"
|
|
9
|
+
type="checkbox"
|
|
10
|
+
class="form-check-input"
|
|
11
|
+
:disabled="isDisabled"
|
|
12
|
+
@click="emitClickAction"
|
|
13
|
+
>
|
|
14
|
+
<label
|
|
15
|
+
class="form-check-label"
|
|
16
|
+
:for="idCheckbox"
|
|
17
|
+
>{{ label }}</label>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent } from 'vue';
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: 'ClassicCheckbox',
|
|
25
|
+
|
|
26
|
+
props: {
|
|
27
|
+
idCheckbox: { default: '', type: String },
|
|
28
|
+
label: { default: '', type: String },
|
|
29
|
+
isDisabled: { default: false, type: Boolean },
|
|
30
|
+
textInit: { default: false, type: Boolean },
|
|
31
|
+
isSwitch:{default:false, type:Boolean}
|
|
32
|
+
},
|
|
33
|
+
emits: ['update:textInit', 'clickAction'],
|
|
34
|
+
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
textValue: false as boolean,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
watch: {
|
|
41
|
+
textValue(){
|
|
42
|
+
if(this.textInit !== this.textValue){
|
|
43
|
+
this.$emit('update:textInit', this.textValue)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
textInit(){
|
|
47
|
+
if(this.textInit !== this.textValue){
|
|
48
|
+
this.textValue =this.textInit;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
mounted(){
|
|
53
|
+
this.textValue = this.textInit;
|
|
54
|
+
},
|
|
55
|
+
methods:{
|
|
56
|
+
emitClickAction():void{
|
|
57
|
+
this.$emit('clickAction');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="loadingText"
|
|
4
|
+
class="d-flex justify-content-center"
|
|
5
|
+
>
|
|
6
|
+
<div class="spinner-border me-3" />
|
|
7
|
+
<h3 class="mt-2">
|
|
8
|
+
{{ loadingText }}
|
|
9
|
+
</h3>
|
|
10
|
+
</div>
|
|
11
|
+
<div
|
|
12
|
+
v-else-if="errorText"
|
|
13
|
+
class="text-center"
|
|
14
|
+
>
|
|
15
|
+
<h3>{{ errorText }}</h3>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { defineComponent } from 'vue';
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
name: "ClassicLoading",
|
|
23
|
+
props: {
|
|
24
|
+
loadingText: { default: undefined, type: String},
|
|
25
|
+
errorText: { default: undefined, type: String},
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex flex-column">
|
|
3
|
+
<div
|
|
4
|
+
v-for="option in options"
|
|
5
|
+
:key="option.title"
|
|
6
|
+
class="form-check"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
:id="idRadio + option.value"
|
|
10
|
+
v-model="textValue"
|
|
11
|
+
class="form-check-input"
|
|
12
|
+
type="radio"
|
|
13
|
+
:name="idRadio"
|
|
14
|
+
:value="option.value"
|
|
15
|
+
:disabled="isDisabled"
|
|
16
|
+
>
|
|
17
|
+
<label
|
|
18
|
+
class="form-check-label"
|
|
19
|
+
:for="idRadio + option.value"
|
|
20
|
+
>{{
|
|
21
|
+
option.title
|
|
22
|
+
}}</label>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { defineComponent } from 'vue';
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: 'ClassicRadio',
|
|
31
|
+
|
|
32
|
+
props: {
|
|
33
|
+
idRadio: { default: '', type: String },
|
|
34
|
+
isDisabled: { default: false, type: Boolean },
|
|
35
|
+
options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined}> },
|
|
36
|
+
textInit: { default: undefined, type: String },
|
|
37
|
+
},
|
|
38
|
+
emits: ['update:textInit'],
|
|
39
|
+
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
textValue: undefined as string|undefined,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
textValue(){
|
|
47
|
+
if(this.textInit !== this.textValue){
|
|
48
|
+
this.$emit('update:textInit', this.textValue)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
textInit(){
|
|
52
|
+
if(this.textInit !== this.textValue){
|
|
53
|
+
this.textValue =this.textInit;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
mounted(){
|
|
58
|
+
this.textValue = this.textInit;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="position-relative champs-searchPage static-height">
|
|
3
|
+
<input
|
|
4
|
+
:id="idSearch"
|
|
5
|
+
ref="search"
|
|
6
|
+
v-model="textValue"
|
|
7
|
+
type="text"
|
|
8
|
+
class="search-input w-100 p-2 input-no-outline"
|
|
9
|
+
:placeholder="label"
|
|
10
|
+
:autofocus="autofocus"
|
|
11
|
+
>
|
|
12
|
+
<label
|
|
13
|
+
:for="idSearch"
|
|
14
|
+
:aria-label="label"
|
|
15
|
+
/>
|
|
16
|
+
<div
|
|
17
|
+
v-if="!textValue"
|
|
18
|
+
class="saooti-search-bounty search-icon-container"
|
|
19
|
+
/>
|
|
20
|
+
<div
|
|
21
|
+
v-else
|
|
22
|
+
class="saooti-cross search-icon-container c-hand"
|
|
23
|
+
@click="textValue = ''"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { defineComponent } from 'vue';
|
|
30
|
+
export default defineComponent({
|
|
31
|
+
name: 'ClassicSearch',
|
|
32
|
+
props: {
|
|
33
|
+
idSearch: { default: '', type: String },
|
|
34
|
+
label: { default: '', type: String },
|
|
35
|
+
textInit: { default: '', type: String },
|
|
36
|
+
autofocus: { default: false, type: Boolean },
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
emits: ['update:textInit'],
|
|
40
|
+
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
textValue: '' as string,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
watch: {
|
|
47
|
+
textValue(){
|
|
48
|
+
if(this.textInit !== this.textValue){
|
|
49
|
+
this.$emit('update:textInit', this.textValue)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
textInit(){
|
|
53
|
+
if(this.textInit !== this.textValue){
|
|
54
|
+
this.textValue =this.textInit;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mounted(){
|
|
59
|
+
this.textValue = this.textInit;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
.champs-searchPage input {
|
|
65
|
+
border: 2px solid #dee2e6;
|
|
66
|
+
border-radius: 10px;
|
|
67
|
+
margin: 0 !important;
|
|
68
|
+
}
|
|
69
|
+
.saooti-search-bounty,
|
|
70
|
+
.saooti-cross {
|
|
71
|
+
font-size: 1rem;
|
|
72
|
+
}
|
|
73
|
+
.search-icon-container {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
right: 0;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
margin: 1rem;
|
|
81
|
+
}
|
|
82
|
+
</style>
|