@saooti/octopus-sdk 39.4.9 → 39.4.10
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/package.json +1 -1
- package/src/components/display/categories/CategoryChooser.vue +2 -0
- package/src/components/display/filter/AdvancedSearch.vue +4 -4
- package/src/components/display/filter/SearchOrder.vue +3 -1
- package/src/components/display/sharing/ChooseEpisodesNumber.vue +59 -0
- package/src/components/display/sharing/PlayerParameters.vue +98 -115
- package/src/components/display/sharing/SharePlayer.vue +11 -16
- package/src/components/form/ClassicInputText.vue +3 -4
- package/src/components/form/ClassicMultiselect.vue +6 -1
- package/src/components/form/ClassicRadio.vue +1 -1
- package/src/components/form/ClassicRadioLabel.vue +4 -3
- package/src/components/form/ClassicSelect.vue +2 -2
- package/src/components/misc/ClassicPopover.vue +0 -2
- package/src/style/_utilities.scss +2 -0
- package/src/style/form.scss +5 -0
- package/src/style/share.scss +0 -1
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
:width="width"
|
|
16
16
|
:is-disabled="isDisabled"
|
|
17
17
|
:no-deselect="noDeselect"
|
|
18
|
+
:display-required="displayRequired"
|
|
18
19
|
@on-search="onSearchCategory"
|
|
19
20
|
@selected="onCategorySelected"
|
|
20
21
|
/>
|
|
@@ -50,6 +51,7 @@ export default defineComponent({
|
|
|
50
51
|
label:{default: undefined, type: String },
|
|
51
52
|
displayLabel: { default: false, type: Boolean },
|
|
52
53
|
textDanger :{ default: undefined, type: String },
|
|
54
|
+
displayRequired: { default: false, type: Boolean },
|
|
53
55
|
},
|
|
54
56
|
emits: [
|
|
55
57
|
"update:categorySelected",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
v-show="showFilters"
|
|
13
13
|
class="advanced-search-container"
|
|
14
14
|
>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
15
|
+
<fieldset class="d-flex flex-column flex-grow-3">
|
|
16
|
+
<legend class="text-primary mb-2">
|
|
17
17
|
{{ $t("Filter") }}
|
|
18
|
-
</
|
|
18
|
+
</legend>
|
|
19
19
|
<MonetizableFilter
|
|
20
20
|
v-if="!isPodcastmaker && !platformEducation"
|
|
21
21
|
:is-emission="isEmission"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
:label="$t('Show only episodes with video')"
|
|
64
64
|
@update:text-init="updateOnlyVideo"
|
|
65
65
|
/>
|
|
66
|
-
</
|
|
66
|
+
</fieldset>
|
|
67
67
|
<SearchOrder
|
|
68
68
|
:is-emission="isEmission"
|
|
69
69
|
:sort="sort"
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
:options="optionsArray"
|
|
6
6
|
:radio-label="$t('Sort')"
|
|
7
7
|
class-label="text-primary mb-2"
|
|
8
|
+
:type-tag="typeTag"
|
|
9
|
+
class="flex-grow-1"
|
|
8
10
|
@update:text-init="$emit('update:sort', $event)"
|
|
9
11
|
/>
|
|
10
12
|
</template>
|
|
11
|
-
|
|
12
13
|
<script lang="ts">
|
|
13
14
|
import ClassicRadioLabel from "../../form/ClassicRadioLabel.vue";
|
|
14
15
|
import { defineComponent } from "vue";
|
|
@@ -19,6 +20,7 @@ export default defineComponent({
|
|
|
19
20
|
props: {
|
|
20
21
|
isEmission: { default: false, type: Boolean },
|
|
21
22
|
sort: { default: "DATE", type: String },
|
|
23
|
+
typeTag: { default: "fieldset", type: String },
|
|
22
24
|
},
|
|
23
25
|
|
|
24
26
|
emits: ["update:sort"],
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex align-items-center flex-wrap">
|
|
3
|
+
<span class="flex-shrink-0">{{ $t("Show") }}</span>
|
|
4
|
+
<input
|
|
5
|
+
id="number-input"
|
|
6
|
+
v-model="internNumber"
|
|
7
|
+
type="number"
|
|
8
|
+
min="1"
|
|
9
|
+
max="50"
|
|
10
|
+
class="input-share-player text-center m-2"
|
|
11
|
+
:title="$t('Number of player podcasts')"
|
|
12
|
+
/>
|
|
13
|
+
<span class="flex-shrink-0">{{ $t("Last podcasts") }}</span>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { defineComponent } from "vue";
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
props: {
|
|
21
|
+
episodesNumber: { default: 3, type: Number },
|
|
22
|
+
},
|
|
23
|
+
emits: [
|
|
24
|
+
"updateNumber",
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
internNumber: 3 as number
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
watch:{
|
|
33
|
+
internNumber(){
|
|
34
|
+
if (this.internNumber < 1) {
|
|
35
|
+
this.$emit("updateNumber", 1);
|
|
36
|
+
}else if(this.internNumber > 50){
|
|
37
|
+
this.$emit("updateNumber", 50);
|
|
38
|
+
}else{
|
|
39
|
+
this.$emit("updateNumber", this.internNumber);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
created(){
|
|
45
|
+
this.internNumber = this.episodesNumber;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style lang="scss">
|
|
52
|
+
.octopus-app {
|
|
53
|
+
.input-share-player {
|
|
54
|
+
border: 1px solid var(--octopus-border-default);
|
|
55
|
+
border-radius: 50px;
|
|
56
|
+
width: 60px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -1,98 +1,102 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
v-if="displayChoiceAllEpisodes"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
<fieldset class="mt-3">
|
|
3
|
+
<legend class="h4 mb-2 mt-3">
|
|
4
|
+
{{ $t("player parameters") }}
|
|
5
|
+
</legend>
|
|
6
|
+
<template v-if="choseNumberEpisode">
|
|
7
|
+
<div v-if="displayChoiceAllEpisodes" role="radiogroup">
|
|
8
|
+
<div
|
|
9
|
+
class="d-flex align-items-center flex-wrap mt-1"
|
|
10
|
+
>
|
|
11
|
+
<input
|
|
12
|
+
id="radio-all-episodes"
|
|
13
|
+
v-model="episodeChoiceDisplay"
|
|
14
|
+
class="form-check-input"
|
|
15
|
+
type="radio"
|
|
16
|
+
name="episodeNumbers"
|
|
17
|
+
value="all"
|
|
18
|
+
/>
|
|
19
|
+
<label for="radio-all-episodes" class="flex-shrink-0">{{
|
|
20
|
+
$t("Show every episode")
|
|
21
|
+
}}</label>
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
class="d-flex align-items-center flex-wrap"
|
|
25
|
+
>
|
|
26
|
+
<input
|
|
27
|
+
v-if="displayChoiceAllEpisodes"
|
|
28
|
+
v-model="episodeChoiceDisplay"
|
|
29
|
+
class="form-check-input"
|
|
30
|
+
type="radio"
|
|
31
|
+
name="episodeNumbers"
|
|
32
|
+
value="number"
|
|
33
|
+
:title="$t('Show') + ' ' + $t('Last podcasts')"
|
|
34
|
+
/>
|
|
35
|
+
<ChooseEpisodesNumber :episodes-number="episodesNumber" @update-number="$emit('update:episodesNumber', $event)"/>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<ChooseEpisodesNumber v-else :episodes-number="episodesNumber" @update-number="$emit('update:episodesNumber', $event)"/>
|
|
39
|
+
<ClassicCheckbox
|
|
40
|
+
:text-init="proceedReading"
|
|
41
|
+
id-checkbox="proceed-reading-checkbox"
|
|
42
|
+
:label="$t('Proceed reading')"
|
|
43
|
+
@update:text-init="$emit('update:proceedReading', $event)"
|
|
17
44
|
/>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
</template>
|
|
46
|
+
<ClassicCheckbox
|
|
47
|
+
v-if="displayIsVisible"
|
|
48
|
+
:text-init="isVisible"
|
|
49
|
+
id-checkbox="is-visible-checkbox"
|
|
50
|
+
:label="titleStillAvailable"
|
|
51
|
+
@update:text-init="$emit('update:isVisible', $event)"
|
|
52
|
+
/>
|
|
53
|
+
<ClassicCheckbox
|
|
54
|
+
v-if="displayArticleParam"
|
|
55
|
+
:text-init="displayArticle"
|
|
56
|
+
id-checkbox="display-article-checkbox"
|
|
57
|
+
:label="$t('Display associated article')"
|
|
58
|
+
@update:text-init="$emit('update:displayArticle', $event)"
|
|
59
|
+
/>
|
|
60
|
+
<ClassicCheckbox
|
|
61
|
+
v-if="displayTranscriptParam"
|
|
62
|
+
:text-init="displayTranscript"
|
|
63
|
+
id-checkbox="display-transcript-checkbox"
|
|
64
|
+
:label="$t('If the transcript is available, show it')"
|
|
65
|
+
@update:text-init="$emit('update:displayTranscript', $event)"
|
|
66
|
+
/>
|
|
67
|
+
<ClassicCheckbox
|
|
68
|
+
v-if="displayWaveParam"
|
|
69
|
+
:text-init="displayWave"
|
|
70
|
+
id-checkbox="display-wave-checkbox"
|
|
71
|
+
:label="$t('Show animated wave')"
|
|
72
|
+
@update:text-init="$emit('update:displayWave', $event)"
|
|
73
|
+
/>
|
|
47
74
|
<ClassicCheckbox
|
|
48
|
-
:text-init="
|
|
49
|
-
id-checkbox="
|
|
50
|
-
:label="$t('
|
|
51
|
-
@update:text-init="$emit('update:
|
|
75
|
+
:text-init="playerAutoPlay"
|
|
76
|
+
id-checkbox="player-autoplay-checkbox"
|
|
77
|
+
:label="$t('Trigger automatic reading if this is possible')"
|
|
78
|
+
@update:text-init="$emit('update:playerAutoPlay', $event)"
|
|
79
|
+
/>
|
|
80
|
+
<PlayerCommonParameters
|
|
81
|
+
v-if="displayInsertCode"
|
|
82
|
+
:insert-code="insertCode"
|
|
83
|
+
@update:insert-code="$emit('update:insertCode', $event)"
|
|
52
84
|
/>
|
|
53
|
-
</
|
|
54
|
-
<ClassicCheckbox
|
|
55
|
-
v-if="displayIsVisible"
|
|
56
|
-
:text-init="isVisible"
|
|
57
|
-
id-checkbox="is-visible-checkbox"
|
|
58
|
-
:label="titleStillAvailable"
|
|
59
|
-
@update:text-init="$emit('update:isVisible', $event)"
|
|
60
|
-
/>
|
|
61
|
-
<ClassicCheckbox
|
|
62
|
-
v-if="displayArticleParam"
|
|
63
|
-
:text-init="displayArticle"
|
|
64
|
-
id-checkbox="display-article-checkbox"
|
|
65
|
-
:label="$t('Display associated article')"
|
|
66
|
-
@update:text-init="$emit('update:displayArticle', $event)"
|
|
67
|
-
/>
|
|
68
|
-
<ClassicCheckbox
|
|
69
|
-
v-if="displayTranscriptParam"
|
|
70
|
-
:text-init="displayTranscript"
|
|
71
|
-
id-checkbox="display-transcript-checkbox"
|
|
72
|
-
:label="$t('If the transcript is available, show it')"
|
|
73
|
-
@update:text-init="$emit('update:displayTranscript', $event)"
|
|
74
|
-
/>
|
|
75
|
-
<ClassicCheckbox
|
|
76
|
-
v-if="displayWaveParam"
|
|
77
|
-
:text-init="displayWave"
|
|
78
|
-
id-checkbox="display-wave-checkbox"
|
|
79
|
-
:label="$t('Show animated wave')"
|
|
80
|
-
@update:text-init="$emit('update:displayWave', $event)"
|
|
81
|
-
/>
|
|
82
|
-
<ClassicCheckbox
|
|
83
|
-
:text-init="playerAutoPlay"
|
|
84
|
-
id-checkbox="player-autoplay-checkbox"
|
|
85
|
-
:label="$t('Trigger automatic reading if this is possible')"
|
|
86
|
-
@update:text-init="$emit('update:playerAutoPlay', $event)"
|
|
87
|
-
/>
|
|
85
|
+
</fieldset>
|
|
88
86
|
</template>
|
|
89
87
|
|
|
90
88
|
<script lang="ts">
|
|
91
89
|
import ClassicCheckbox from "../../form/ClassicCheckbox.vue";
|
|
92
|
-
import { defineComponent } from "vue";
|
|
90
|
+
import { defineAsyncComponent, defineComponent } from "vue";
|
|
91
|
+
const ChooseEpisodesNumber = defineAsyncComponent(() => import("./ChooseEpisodesNumber.vue"));
|
|
92
|
+
const PlayerCommonParameters = defineAsyncComponent(
|
|
93
|
+
() => import("./PlayerCommonParameters.vue"),
|
|
94
|
+
);
|
|
93
95
|
export default defineComponent({
|
|
94
96
|
components: {
|
|
95
97
|
ClassicCheckbox,
|
|
98
|
+
ChooseEpisodesNumber,
|
|
99
|
+
PlayerCommonParameters
|
|
96
100
|
},
|
|
97
101
|
props: {
|
|
98
102
|
isVisible: { default: false, type: Boolean },
|
|
@@ -102,28 +106,31 @@ export default defineComponent({
|
|
|
102
106
|
displayTranscriptParam: { default: false, type: Boolean },
|
|
103
107
|
displayArticleParam: { default: false, type: Boolean },
|
|
104
108
|
displayIsVisible: { default: false, type: Boolean },
|
|
109
|
+
displayInsertCode: { default: false, type: Boolean },
|
|
105
110
|
proceedReading: { default: true, type: Boolean },
|
|
106
111
|
displayArticle: { default: true, type: Boolean },
|
|
107
112
|
displayTranscript: { default: true, type: Boolean },
|
|
108
113
|
displayWave: { default: true, type: Boolean },
|
|
109
114
|
playerAutoPlay: { default: false, type: Boolean },
|
|
110
115
|
isPodcastNotVisible: { default: false, type: Boolean },
|
|
116
|
+
episodesNumber: { default: 3, type: Number },
|
|
117
|
+
insertCode: { default: false, type: Boolean },
|
|
111
118
|
},
|
|
112
119
|
emits: [
|
|
113
|
-
"
|
|
120
|
+
"episodeChoiceDisplay",
|
|
114
121
|
"update:proceedReading",
|
|
115
122
|
"update:isVisible",
|
|
116
|
-
"
|
|
123
|
+
"update:episodesNumber",
|
|
117
124
|
"update:displayArticle",
|
|
118
125
|
"update:displayTranscript",
|
|
119
126
|
"update:displayWave",
|
|
120
127
|
"update:playerAutoPlay",
|
|
128
|
+
"update:insertCode"
|
|
121
129
|
],
|
|
122
130
|
|
|
123
131
|
data() {
|
|
124
132
|
return {
|
|
125
|
-
|
|
126
|
-
iFrameNumberPriv: "3" as string,
|
|
133
|
+
episodeChoiceDisplay: "number" as string,
|
|
127
134
|
};
|
|
128
135
|
},
|
|
129
136
|
computed: {
|
|
@@ -132,35 +139,11 @@ export default defineComponent({
|
|
|
132
139
|
? this.$t("Podcast still available")
|
|
133
140
|
: this.$t("Podcasts still available");
|
|
134
141
|
},
|
|
135
|
-
iFrameNumber: {
|
|
136
|
-
get(): string {
|
|
137
|
-
return this.iFrameNumberPriv;
|
|
138
|
-
},
|
|
139
|
-
set(value: string) {
|
|
140
|
-
const val = parseInt(value, 10);
|
|
141
|
-
if (!isNaN(val) && val >= 1 && val <= 50) {
|
|
142
|
-
this.iFrameNumberPriv = value;
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
142
|
},
|
|
147
143
|
watch: {
|
|
148
|
-
|
|
149
|
-
this.$emit("
|
|
150
|
-
},
|
|
151
|
-
iFrameNumberPriv(): void {
|
|
152
|
-
this.$emit("iFrameNumber", this.iFrameNumberPriv);
|
|
144
|
+
episodeChoiceDisplay(): void {
|
|
145
|
+
this.$emit("episodeChoiceDisplay", this.episodeChoiceDisplay);
|
|
153
146
|
},
|
|
154
147
|
},
|
|
155
148
|
});
|
|
156
|
-
</script>
|
|
157
|
-
|
|
158
|
-
<style lang="scss">
|
|
159
|
-
.octopus-app {
|
|
160
|
-
.input-share-player {
|
|
161
|
-
border: 1px solid var(--octopus-border-default);
|
|
162
|
-
border-radius: 50px;
|
|
163
|
-
width: 60px;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
</style>
|
|
149
|
+
</script>
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
v-model:proceed-reading="proceedReading"
|
|
48
48
|
v-model:is-visible="isVisible"
|
|
49
49
|
v-model:player-auto-play="playerAutoPlay"
|
|
50
|
+
v-model:episodes-number="episodesNumber"
|
|
51
|
+
v-model:insert-code="insertCode"
|
|
50
52
|
:display-is-visible="displayIsVisible"
|
|
51
53
|
:is-podcast-not-visible="isPodcastNotVisible"
|
|
52
54
|
:chose-number-episode="choseNumberEpisodes"
|
|
@@ -54,13 +56,10 @@
|
|
|
54
56
|
:display-transcript-param="displayTranscriptParam"
|
|
55
57
|
:display-article-param="displayArticleParam"
|
|
56
58
|
:display-wave-param="displayWaveParam"
|
|
57
|
-
|
|
58
|
-
@episode-
|
|
59
|
-
/>
|
|
60
|
-
<PlayerCommonParameters
|
|
61
|
-
v-if="displayInsertCode"
|
|
62
|
-
v-model:insert-code="insertCode"
|
|
59
|
+
:display-insert-code="displayInsertCode"
|
|
60
|
+
@episode-choice-display="episodeChoiceDisplay = $event"
|
|
63
61
|
/>
|
|
62
|
+
|
|
64
63
|
<ShareModalPlayer
|
|
65
64
|
v-if="isShareModal"
|
|
66
65
|
:embed-link="iFrame"
|
|
@@ -102,9 +101,6 @@ const ShareModalPlayer = defineAsyncComponent(
|
|
|
102
101
|
const PlayerParameters = defineAsyncComponent(
|
|
103
102
|
() => import("./PlayerParameters.vue"),
|
|
104
103
|
);
|
|
105
|
-
const PlayerCommonParameters = defineAsyncComponent(
|
|
106
|
-
() => import("./PlayerCommonParameters.vue"),
|
|
107
|
-
);
|
|
108
104
|
const SharePlayerTypes = defineAsyncComponent(
|
|
109
105
|
() => import("./SharePlayerTypes.vue"),
|
|
110
106
|
);
|
|
@@ -117,7 +113,6 @@ export default defineComponent({
|
|
|
117
113
|
SharePlayerColors,
|
|
118
114
|
PlayerParameters,
|
|
119
115
|
SharePlayerTypes,
|
|
120
|
-
PlayerCommonParameters,
|
|
121
116
|
},
|
|
122
117
|
props: {
|
|
123
118
|
podcast: { default: undefined, type: Object as () => Podcast },
|
|
@@ -136,8 +131,8 @@ export default defineComponent({
|
|
|
136
131
|
color: "#40a372" as string,
|
|
137
132
|
theme: "#000000" as string,
|
|
138
133
|
proceedReading: true as boolean,
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
episodeChoiceDisplay: "number" as string,
|
|
135
|
+
episodesNumber: 3 as number,
|
|
141
136
|
isVisible: false as boolean,
|
|
142
137
|
displayArticle: true as boolean,
|
|
143
138
|
displayTranscript: true as boolean,
|
|
@@ -263,9 +258,9 @@ export default defineComponent({
|
|
|
263
258
|
}
|
|
264
259
|
let url = [""];
|
|
265
260
|
const iFrameNumber =
|
|
266
|
-
this.displayChoiceAllEpisodes && "all" === this.
|
|
261
|
+
this.displayChoiceAllEpisodes && "all" === this.episodeChoiceDisplay
|
|
267
262
|
? "/0"
|
|
268
|
-
: "/" + this.
|
|
263
|
+
: "/" + this.episodesNumber;
|
|
269
264
|
url.push(`${this.miniplayerUrl}miniplayer/`);
|
|
270
265
|
if (!this.podcast && !this.playlist && this.emission) {
|
|
271
266
|
url = this.constructEmissionUrl(url);
|
|
@@ -334,9 +329,9 @@ export default defineComponent({
|
|
|
334
329
|
}
|
|
335
330
|
},
|
|
336
331
|
getIframeNumber(): string {
|
|
337
|
-
return this.displayChoiceAllEpisodes && "all" === this.
|
|
332
|
+
return this.displayChoiceAllEpisodes && "all" === this.episodeChoiceDisplay
|
|
338
333
|
? "/0"
|
|
339
|
-
: "/" + this.
|
|
334
|
+
: "/" + this.episodesNumber;
|
|
340
335
|
},
|
|
341
336
|
constructEmissionUrl(url: Array<string>) {
|
|
342
337
|
if (!this.emission) {
|
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
<div class="d-flex align-items-center">
|
|
7
7
|
<component
|
|
8
8
|
:is="isWysiwyg? 'div': 'label'"
|
|
9
|
-
|
|
10
|
-
class="form-label"
|
|
9
|
+
:class="[classLabel, displayLabel ? '' : 'd-none']"
|
|
11
10
|
:for="isWysiwyg ? '': inputId"
|
|
12
|
-
:class="displayLabel ? '' : 'd-none'"
|
|
13
11
|
>{{ label }}
|
|
14
|
-
<AsteriskIcon v-if="displayRequired" size="
|
|
12
|
+
<AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="$t('Mandatory input')"/>
|
|
15
13
|
</component>
|
|
16
14
|
<template v-if="popover">
|
|
17
15
|
<button
|
|
@@ -154,6 +152,7 @@ export default defineComponent({
|
|
|
154
152
|
forceReload: { default: false, type: Boolean },
|
|
155
153
|
typeInput: { default: "text", type: String },
|
|
156
154
|
displayRequired: { default: false, type: Boolean },
|
|
155
|
+
classLabel: { default: "form-label", type: String },
|
|
157
156
|
},
|
|
158
157
|
emits: ["update:textInit", "update:errorVariable"],
|
|
159
158
|
data() {
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
>
|
|
10
10
|
<label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
|
|
11
11
|
label
|
|
12
|
-
}}
|
|
12
|
+
}}
|
|
13
|
+
<AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="$t('Mandatory input')"/>
|
|
14
|
+
</label>
|
|
13
15
|
<vSelect
|
|
14
16
|
v-model="optionSelected"
|
|
15
17
|
:input-id="id"
|
|
@@ -74,12 +76,14 @@
|
|
|
74
76
|
</template>
|
|
75
77
|
|
|
76
78
|
<script lang="ts">
|
|
79
|
+
import AsteriskIcon from "vue-material-design-icons/Asterisk.vue";
|
|
77
80
|
import ChevronDownIcon from "vue-material-design-icons/ChevronDown.vue";
|
|
78
81
|
import vSelect from "vue-select";
|
|
79
82
|
export default {
|
|
80
83
|
components: {
|
|
81
84
|
vSelect,
|
|
82
85
|
ChevronDownIcon,
|
|
86
|
+
AsteriskIcon
|
|
83
87
|
},
|
|
84
88
|
props: {
|
|
85
89
|
id: { default: "", type: String },
|
|
@@ -100,6 +104,7 @@ export default {
|
|
|
100
104
|
maxOptions: { default: null, type: Number },
|
|
101
105
|
allowEmpty: { default: true, type: Boolean },
|
|
102
106
|
textDanger :{ default: undefined, type: String },
|
|
107
|
+
displayRequired: { default: false, type: Boolean },
|
|
103
108
|
},
|
|
104
109
|
|
|
105
110
|
emits: ["onSearch", "selected", "onClose"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div v-if="radioLabel" :class="classLabel">{{ radioLabel }}</
|
|
2
|
+
<component :is="typeTag" class="d-flex flex-column">
|
|
3
|
+
<component :is="'fieldset'===typeTag ? 'legend': 'div'" v-if="radioLabel" :class="classLabel">{{ radioLabel }}</component>
|
|
4
4
|
<ClassicRadio
|
|
5
5
|
:id-radio="idRadio"
|
|
6
6
|
:is-disabled="isDisabled"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:is-column="isColumn"
|
|
10
10
|
@update:text-init="$emit('update:textInit', $event)"
|
|
11
11
|
/>
|
|
12
|
-
</
|
|
12
|
+
</component>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script lang="ts">
|
|
@@ -32,6 +32,7 @@ export default defineComponent({
|
|
|
32
32
|
isColumn: { default: true, type: Boolean },
|
|
33
33
|
radioLabel: { default: undefined, type: String },
|
|
34
34
|
classLabel: { default: "form-label", type: String },
|
|
35
|
+
typeTag: { default: "div", type: String },
|
|
35
36
|
},
|
|
36
37
|
emits: ["update:textInit"]
|
|
37
38
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<label v-show="displayLabel" :for="idSelect" :class="classLabel">{{
|
|
4
4
|
label
|
|
5
5
|
}}
|
|
6
|
-
<AsteriskIcon v-if="displayRequired" size="
|
|
6
|
+
<AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="$t('Mandatory input')"/></label>
|
|
7
7
|
<select
|
|
8
8
|
:id="idSelect"
|
|
9
9
|
:value="textInit"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
:class="transparent ? 'transparent' : ''"
|
|
13
13
|
:style="getFontFamily"
|
|
14
14
|
:aria-label="label"
|
|
15
|
-
@change="$emit('update:textInit', $event.target.value)"
|
|
16
15
|
:required="displayRequired"
|
|
16
|
+
@change="$emit('update:textInit', $event.target.value)"
|
|
17
17
|
>
|
|
18
18
|
<option v-if="placeholder" value="" disabled selected>{{ placeholder }}</option>
|
|
19
19
|
<option
|
|
@@ -173,7 +173,6 @@ export default defineComponent({
|
|
|
173
173
|
}
|
|
174
174
|
this.show = true;
|
|
175
175
|
let parentLeft = 0;
|
|
176
|
-
let parentRight = 0;
|
|
177
176
|
let parentTop = 0;
|
|
178
177
|
let parentScrollTop = 0;
|
|
179
178
|
let parentBottom = 0;
|
|
@@ -190,7 +189,6 @@ export default defineComponent({
|
|
|
190
189
|
}
|
|
191
190
|
const modalBodyRect = modalBody.getBoundingClientRect();
|
|
192
191
|
parentLeft = modalBodyRect.left;
|
|
193
|
-
parentRight = modalBodyRect.right;
|
|
194
192
|
parentTop = modalBodyRect.top;
|
|
195
193
|
parentScrollTop = modalBody.scrollTop;
|
|
196
194
|
parentBottom=modalBodyRect.bottom;
|
package/src/style/form.scss
CHANGED