@saooti/octopus-sdk 36.0.6 → 36.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/package.json +1 -1
- package/src/assets/octopus-library.scss +0 -1
- package/src/assets/share.scss +0 -6
- package/src/components/display/categories/CategoryChooser.vue +2 -0
- package/src/components/display/categories/CategoryFilter.vue +0 -1
- package/src/components/display/filter/MonetizableFilter.vue +16 -13
- package/src/components/display/filter/RubriqueChoice.vue +12 -16
- package/src/components/display/organisation/OrganisationChooser.vue +5 -2
- package/src/components/display/rubriques/RubriqueChooser.vue +1 -1
- package/src/components/form/ClassicMultiselect.vue +54 -17
- package/src/locale/de.ts +1 -0
- package/src/locale/en.ts +1 -0
- package/src/locale/es.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/locale/it.ts +1 -0
- package/src/locale/sl.ts +1 -0
package/package.json
CHANGED
package/src/assets/share.scss
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:min-search-length="1"
|
|
13
13
|
:width="width"
|
|
14
14
|
:is-disabled="isDisabled"
|
|
15
|
+
:no-deselect="noDeselect"
|
|
15
16
|
@onSearch="onSearchCategory"
|
|
16
17
|
@selected="onCategorySelected"
|
|
17
18
|
/>
|
|
@@ -37,6 +38,7 @@ export default defineComponent({
|
|
|
37
38
|
categorySelected: { default: undefined, type: Number },
|
|
38
39
|
categorySelectedArray: { default: undefined, type: Array as ()=>Array<number> },
|
|
39
40
|
inModal:{default: false, type: Boolean},
|
|
41
|
+
noDeselect: {default: true, type: Boolean},
|
|
40
42
|
},
|
|
41
43
|
emits: ['update:categorySelected','update:categorySelectedArray','selected'],
|
|
42
44
|
data() {
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex align-items-center">
|
|
3
3
|
<div>{{ $t('Advertising') + ' :' }}</div>
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
<select
|
|
5
|
+
ref="select"
|
|
6
|
+
v-model="monetization"
|
|
7
|
+
class="ms-2 mb-0 c-hand"
|
|
8
|
+
@change="onChange"
|
|
9
|
+
>
|
|
10
|
+
<option value="UNDEFINED">
|
|
11
|
+
{{ allString }}
|
|
12
|
+
</option>
|
|
13
|
+
<option value="YES">
|
|
14
|
+
{{ $t('Authorized advertising') }}
|
|
15
|
+
</option>
|
|
16
|
+
<option value="NO">
|
|
17
|
+
{{ $t('Prohibited advertising') }}
|
|
18
|
+
</option>
|
|
19
|
+
</select>
|
|
17
20
|
</div>
|
|
18
21
|
</template>
|
|
19
22
|
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex align-items-center">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
<select
|
|
4
|
+
v-model="rubriquageId"
|
|
5
|
+
class="ms-2 mb-0 c-hand"
|
|
6
|
+
@change="onRubriquageSelected"
|
|
7
|
+
>
|
|
8
|
+
<option
|
|
9
|
+
v-for="rubriquage in rubriquageDisplay"
|
|
10
|
+
:key="rubriquage.rubriquageId"
|
|
11
|
+
:value="rubriquage.rubriquageId"
|
|
8
12
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:value="rubriquage.rubriquageId"
|
|
13
|
-
>{{ rubriquage.title }}</option>
|
|
14
|
-
</select>
|
|
15
|
-
<div
|
|
16
|
-
class="saooti-down octopus-arrow-down-absolute"
|
|
17
|
-
/>
|
|
18
|
-
</label>
|
|
13
|
+
{{ rubriquage.title }}
|
|
14
|
+
</option>
|
|
15
|
+
</select>
|
|
19
16
|
<template v-if="rubriquageId">
|
|
20
17
|
<div class="ms-3 flex-shrink-0">
|
|
21
18
|
{{ $t('By rubric') }}
|
|
@@ -30,7 +27,6 @@
|
|
|
30
27
|
:defaultanswer="$t('No rubric filter')"
|
|
31
28
|
:reset="reset"
|
|
32
29
|
:without-rubrique="true"
|
|
33
|
-
:no-deselect="true"
|
|
34
30
|
@selected="onRubriqueSelected"
|
|
35
31
|
/>
|
|
36
32
|
</template>
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
:width="width"
|
|
10
10
|
:in-modal="inModal"
|
|
11
11
|
:option-chosen="organisationChosen"
|
|
12
|
-
|
|
12
|
+
option-custom-templating="optionTemplating"
|
|
13
|
+
option-selected-custom-templating="optionTemplating"
|
|
14
|
+
:no-deselect="noDeselect"
|
|
13
15
|
@onSearch="onSearchOrganisation"
|
|
14
16
|
@selected="$emit('selected', $event)"
|
|
15
17
|
>
|
|
@@ -58,6 +60,7 @@ export default defineComponent({
|
|
|
58
60
|
width: { default: '100%', type: String },
|
|
59
61
|
isImage: { default: true, type: Boolean },
|
|
60
62
|
inModal:{default: false, type: Boolean},
|
|
63
|
+
noDeselect: {default: true, type: Boolean},
|
|
61
64
|
},
|
|
62
65
|
emits: ['selected'],
|
|
63
66
|
data() {
|
|
@@ -95,7 +98,7 @@ export default defineComponent({
|
|
|
95
98
|
},
|
|
96
99
|
},
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
created() {
|
|
99
102
|
this.organisationChosen = this.getDefaultOrganisation;
|
|
100
103
|
},
|
|
101
104
|
methods: {
|
|
@@ -39,7 +39,7 @@ export default defineComponent({
|
|
|
39
39
|
rubriquageId: { default: undefined, type: Number },
|
|
40
40
|
withoutRubrique: { default: false, type: Boolean },
|
|
41
41
|
isDisabled: { default: false, type: Boolean },
|
|
42
|
-
noDeselect: {default:
|
|
42
|
+
noDeselect: {default: true, type: Boolean},
|
|
43
43
|
inModal:{default: false, type: Boolean},
|
|
44
44
|
},
|
|
45
45
|
emits: ['update:rubriqueSelected', 'update:rubriqueSelectedArray', 'selected'],
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="default-multiselect-width"
|
|
4
3
|
:class="{'multiselect-in-modal' : inModal,
|
|
5
4
|
'multiselect-no-deselect': noDeselect}"
|
|
6
5
|
:style="{ width: width }"
|
|
7
6
|
>
|
|
8
7
|
<label
|
|
8
|
+
:class="displayLabel? '':'d-none'"
|
|
9
9
|
:for="id"
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
class="form-label"
|
|
11
|
+
>{{ label }}</label>
|
|
12
12
|
<vSelect
|
|
13
13
|
:id="id"
|
|
14
14
|
v-model="optionSelected"
|
|
@@ -19,25 +19,27 @@
|
|
|
19
19
|
:disabled="isDisabled"
|
|
20
20
|
:loading="isLoading"
|
|
21
21
|
:placeholder="placeholder"
|
|
22
|
+
:selectable="()=>!maxOptionsSelected"
|
|
22
23
|
@open="onSearch"
|
|
23
24
|
@search="onSearch"
|
|
24
25
|
@option:selected="onOptionSelected"
|
|
26
|
+
@option:deselected="onOptionDeselect"
|
|
25
27
|
>
|
|
26
28
|
<template
|
|
27
|
-
v-if="optionCustomTemplating"
|
|
29
|
+
v-if="optionCustomTemplating.length"
|
|
28
30
|
#option="option"
|
|
29
31
|
>
|
|
30
32
|
<slot
|
|
31
|
-
name="
|
|
33
|
+
:name="optionCustomTemplating"
|
|
32
34
|
:option="option"
|
|
33
35
|
/>
|
|
34
36
|
</template>
|
|
35
37
|
<template
|
|
36
|
-
v-if="
|
|
38
|
+
v-if="optionSelectedCustomTemplating.length"
|
|
37
39
|
#selected-option="option"
|
|
38
40
|
>
|
|
39
41
|
<slot
|
|
40
|
-
name="
|
|
42
|
+
:name="optionSelectedCustomTemplating"
|
|
41
43
|
:option="option"
|
|
42
44
|
/>
|
|
43
45
|
</template>
|
|
@@ -55,6 +57,16 @@
|
|
|
55
57
|
}}
|
|
56
58
|
</li>
|
|
57
59
|
</template>
|
|
60
|
+
<template #list-header>
|
|
61
|
+
<li
|
|
62
|
+
v-if="maxOptionsSelected"
|
|
63
|
+
class="vs__dropdown-option"
|
|
64
|
+
>
|
|
65
|
+
{{
|
|
66
|
+
$t('Multiselect max options', {max:maxOptions})
|
|
67
|
+
}}
|
|
68
|
+
</li>
|
|
69
|
+
</template>
|
|
58
70
|
</vSelect>
|
|
59
71
|
</div>
|
|
60
72
|
</template>
|
|
@@ -77,8 +89,12 @@ import vSelect from "vue-select";
|
|
|
77
89
|
maxElement: { default: 50, type: Number },
|
|
78
90
|
minSearchLength: { default: 3, type: Number },
|
|
79
91
|
optionChosen: { default: undefined, type: Object as ()=>unknown},
|
|
80
|
-
noDeselect:{default:
|
|
81
|
-
optionCustomTemplating:{default:
|
|
92
|
+
noDeselect:{default: true, type: Boolean},
|
|
93
|
+
optionCustomTemplating:{default: "", type: String},
|
|
94
|
+
optionSelectedCustomTemplating:{default: "", type: String},
|
|
95
|
+
displayLabel:{default: false, type: Boolean},
|
|
96
|
+
maxOptions: { default: null, type: Number },
|
|
97
|
+
allowEmpty: { default: true, type: Boolean },
|
|
82
98
|
},
|
|
83
99
|
|
|
84
100
|
emits: ['onSearch','selected'],
|
|
@@ -89,8 +105,17 @@ import vSelect from "vue-select";
|
|
|
89
105
|
options: [] as Array<unknown>,
|
|
90
106
|
remainingElements: 0 as number,
|
|
91
107
|
isLoading: false as boolean,
|
|
108
|
+
nbOptionsSelected: 0 as number,
|
|
92
109
|
};
|
|
93
110
|
},
|
|
111
|
+
computed:{
|
|
112
|
+
maxOptionsSelected(): boolean{
|
|
113
|
+
if(this.maxOptions !== null && this.multiple){
|
|
114
|
+
return (this.optionSelected as Array<unknown>).length >= this.maxOptions;
|
|
115
|
+
}
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
94
119
|
|
|
95
120
|
watch: {
|
|
96
121
|
optionChosen: {
|
|
@@ -99,6 +124,13 @@ import vSelect from "vue-select";
|
|
|
99
124
|
handler(){
|
|
100
125
|
this.optionSelected = this.optionChosen;
|
|
101
126
|
}
|
|
127
|
+
},
|
|
128
|
+
optionSelected: {
|
|
129
|
+
deep: true,
|
|
130
|
+
handler(){
|
|
131
|
+
if(this.noDeselect || null!==this.optionSelected){ return; }
|
|
132
|
+
this.$emit('selected', undefined);
|
|
133
|
+
}
|
|
102
134
|
}
|
|
103
135
|
},
|
|
104
136
|
|
|
@@ -115,29 +147,34 @@ import vSelect from "vue-select";
|
|
|
115
147
|
},
|
|
116
148
|
onOptionSelected(optionSelected: unknown):void{
|
|
117
149
|
this.$emit('selected', optionSelected);
|
|
150
|
+
},
|
|
151
|
+
onOptionDeselect(event: unknown):void{
|
|
152
|
+
if(!this.multiple){ return; }
|
|
153
|
+
if(!this.allowEmpty && 1>=(this.optionSelected as Array<unknown>).length){
|
|
154
|
+
(this.optionSelected as Array<unknown>).push(event);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.$emit('selected', this.optionSelected);
|
|
118
158
|
}
|
|
119
159
|
}
|
|
120
160
|
}
|
|
121
161
|
</script>
|
|
122
162
|
<style lang="scss">
|
|
123
163
|
@import "vue-select/dist/vue-select.css";
|
|
124
|
-
|
|
164
|
+
:root{
|
|
165
|
+
--vs-dropdown-z-index:1060;
|
|
125
166
|
--vs-border-radius: 0.2rem;
|
|
126
167
|
--vs-dropdown-option--active-bg: #ddd;
|
|
127
168
|
--vs-dropdown-option--active-color: black;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
169
|
+
--vs-font-size:0.8rem;
|
|
170
|
+
}
|
|
171
|
+
.octopus-app{
|
|
132
172
|
.vs__dropdown-option{
|
|
133
173
|
white-space: initial;
|
|
134
174
|
}
|
|
135
175
|
.vs__search:focus{
|
|
136
176
|
min-width: 150px;
|
|
137
177
|
}
|
|
138
|
-
.multiselect-in-modal .vs__dropdown-menu{
|
|
139
|
-
z-index: 9999;
|
|
140
|
-
}
|
|
141
178
|
.multiselect-no-deselect .vs__clear{
|
|
142
179
|
display: none;
|
|
143
180
|
}
|
package/src/locale/de.ts
CHANGED
package/src/locale/en.ts
CHANGED
package/src/locale/es.ts
CHANGED
package/src/locale/fr.ts
CHANGED
|
@@ -323,4 +323,5 @@ export default{
|
|
|
323
323
|
"Newsletter":"Newsletter",
|
|
324
324
|
"QR Code":"QR Code",
|
|
325
325
|
"Rss feed": "Flux RSS",
|
|
326
|
+
"Multiselect max options":"Maximum de {max} options simultanées. Veuillez dans un premier temps retirer une option pour pouvoir en sélectionner une nouvelle",
|
|
326
327
|
};
|
package/src/locale/it.ts
CHANGED