@saooti/octopus-sdk 37.0.6 → 37.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.
Files changed (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <div
3
- :class="{'multiselect-in-modal' : inModal,
4
- 'multiselect-no-deselect': noDeselect}"
2
+ <div
3
+ :class="{
4
+ 'multiselect-in-modal': inModal,
5
+ 'multiselect-no-deselect': noDeselect,
6
+ }"
5
7
  :style="{ width: width }"
6
8
  >
7
- <label
8
- :class="displayLabel? '':'d-none'"
9
- :for="id"
10
- class="form-label"
11
- >{{ label }}</label>
9
+ <label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
10
+ label
11
+ }}</label>
12
12
  <vSelect
13
13
  :id="id"
14
14
  v-model="optionSelected"
@@ -20,52 +20,40 @@
20
20
  :loading="isLoading"
21
21
  :placeholder="placeholder"
22
22
  :filter="fakeSearch"
23
- :selectable="()=>!maxOptionsSelected"
23
+ :selectable="() => !maxOptionsSelected"
24
24
  @open="onSearch"
25
25
  @search="onSearch"
26
26
  @option:selected="onOptionSelected"
27
27
  @option:deselected="onOptionDeselect"
28
28
  >
29
- <template
30
- v-if="optionCustomTemplating.length"
31
- #option="option"
32
- >
33
- <slot
34
- :name="optionCustomTemplating"
35
- :option="option"
36
- />
29
+ <template v-if="optionCustomTemplating.length" #option="option">
30
+ <slot :name="optionCustomTemplating" :option="option" />
37
31
  </template>
38
32
  <template
39
33
  v-if="optionSelectedCustomTemplating.length"
40
34
  #selected-option="option"
41
35
  >
42
- <slot
43
- :name="optionSelectedCustomTemplating"
44
- :option="option"
45
- />
36
+ <slot :name="optionSelectedCustomTemplating" :option="option" />
46
37
  </template>
47
38
  <template #no-options="{ searching }">
48
- <span v-if="searching">{{ $t('No elements found. Consider changing the search query.') }}</span>
49
- <span v-else>{{ $t('List is empty') }}</span>
39
+ <span v-if="searching">{{
40
+ $t("No elements found. Consider changing the search query.")
41
+ }}</span>
42
+ <span v-else>{{ $t("List is empty") }}</span>
50
43
  </template>
51
44
  <template #list-footer>
52
- <div
53
- v-if="remainingElements"
54
- class="vs__dropdown-option"
55
- >
45
+ <div v-if="remainingElements" class="vs__dropdown-option">
56
46
  {{
57
- $t('Count more elements matched your query, please make a more specific search.',{ count: remainingElements })
47
+ $t(
48
+ "Count more elements matched your query, please make a more specific search.",
49
+ { count: remainingElements },
50
+ )
58
51
  }}
59
52
  </div>
60
53
  </template>
61
54
  <template #list-header>
62
- <div
63
- v-if="maxOptionsSelected"
64
- class="vs__dropdown-option"
65
- >
66
- {{
67
- $t('Multiselect max options', {max:maxOptions})
68
- }}
55
+ <div v-if="maxOptionsSelected" class="vs__dropdown-option">
56
+ {{ $t("Multiselect max options", { max: maxOptions }) }}
69
57
  </div>
70
58
  </template>
71
59
  </vSelect>
@@ -74,130 +62,141 @@
74
62
 
75
63
  <script lang="ts">
76
64
  import vSelect from "vue-select";
77
- export default {
78
- components: {
79
- vSelect,
80
- },
81
- props: {
82
- id:{default: '', type: String},
83
- label:{default: '', type: String},
84
- placeholder:{default: '', type: String},
85
- optionLabel:{default: '', type: String},
86
- inModal:{default: false, type: Boolean},
87
- multiple:{default: false, type: Boolean},
88
- isDisabled:{default: false, type: Boolean},
89
- width: { default: '100%', type: String },
90
- maxElement: { default: 50, type: Number },
91
- minSearchLength: { default: 3, type: Number },
92
- optionChosen: { default: undefined, type: Object as ()=>unknown},
93
- noDeselect:{default: true, type: Boolean},
94
- optionCustomTemplating:{default: "", type: String},
95
- optionSelectedCustomTemplating:{default: "", type: String},
96
- displayLabel:{default: false, type: Boolean},
97
- maxOptions: { default: null, type: Number },
98
- allowEmpty: { default: true, type: Boolean },
99
- },
65
+ export default {
66
+ components: {
67
+ vSelect,
68
+ },
69
+ props: {
70
+ id: { default: "", type: String },
71
+ label: { default: "", type: String },
72
+ placeholder: { default: "", type: String },
73
+ optionLabel: { default: "", type: String },
74
+ inModal: { default: false, type: Boolean },
75
+ multiple: { default: false, type: Boolean },
76
+ isDisabled: { default: false, type: Boolean },
77
+ width: { default: "100%", type: String },
78
+ maxElement: { default: 50, type: Number },
79
+ minSearchLength: { default: 3, type: Number },
80
+ optionChosen: { default: undefined, type: Object as () => unknown },
81
+ noDeselect: { default: true, type: Boolean },
82
+ optionCustomTemplating: { default: "", type: String },
83
+ optionSelectedCustomTemplating: { default: "", type: String },
84
+ displayLabel: { default: false, type: Boolean },
85
+ maxOptions: { default: null, type: Number },
86
+ allowEmpty: { default: true, type: Boolean },
87
+ },
100
88
 
101
- emits: ['onSearch','selected'],
89
+ emits: ["onSearch", "selected"],
102
90
 
103
- data() {
104
- return {
105
- optionSelected: undefined as unknown|undefined,
106
- options: [] as Array<unknown>,
107
- remainingElements: 0 as number,
108
- isLoading: false as boolean,
109
- nbOptionsSelected: 0 as number,
110
- };
111
- },
112
- computed:{
113
- maxOptionsSelected(): boolean{
114
- if(this.maxOptions !== null && this.multiple){
115
- return (this.optionSelected as Array<unknown>).length >= this.maxOptions;
116
- }
117
- return false;
91
+ data() {
92
+ return {
93
+ optionSelected: undefined as unknown | undefined,
94
+ options: [] as Array<unknown>,
95
+ remainingElements: 0 as number,
96
+ isLoading: false as boolean,
97
+ nbOptionsSelected: 0 as number,
98
+ };
99
+ },
100
+ computed: {
101
+ maxOptionsSelected(): boolean {
102
+ if (this.maxOptions !== null && this.multiple) {
103
+ return (
104
+ (this.optionSelected as Array<unknown>).length >= this.maxOptions
105
+ );
118
106
  }
107
+ return false;
119
108
  },
109
+ },
120
110
 
121
- watch: {
122
- optionChosen: {
123
- deep: true,
124
- immediate:true,
125
- handler(){
126
- this.optionSelected = this.optionChosen;
127
- }
111
+ watch: {
112
+ optionChosen: {
113
+ deep: true,
114
+ immediate: true,
115
+ handler() {
116
+ this.optionSelected = this.optionChosen;
128
117
  },
129
- optionSelected: {
130
- deep: true,
131
- handler(){
132
- if(this.noDeselect || null!==this.optionSelected){ return; }
133
- this.$emit('selected', undefined);
134
- }
135
- }
136
118
  },
137
-
138
- methods:{
139
- fakeSearch():Array<unknown>{
140
- return this.options;
141
- },
142
- onSearch(search: string): void{
143
- if(search && search.length < this.minSearchLength){return;}
144
- this.isLoading = true;
145
- this.$emit('onSearch', search);
146
- },
147
- afterSearch(optionsFetched: Array<unknown>, count: number):void{
148
- this.options = optionsFetched;
149
- this.remainingElements = Math.max(0, count - this.maxElement);
150
- this.isLoading = false;
151
- },
152
- onOptionSelected(optionSelected: unknown):void{
153
- this.$emit('selected', optionSelected);
154
- },
155
- onOptionDeselect(event: unknown):void{
156
- if(!this.multiple){ return; }
157
- if(!this.allowEmpty && 1>=(this.optionSelected as Array<unknown>).length){
158
- (this.optionSelected as Array<unknown>).push(event);
119
+ optionSelected: {
120
+ deep: true,
121
+ handler() {
122
+ if (this.noDeselect || null !== this.optionSelected) {
159
123
  return;
160
124
  }
161
- this.$emit('selected', this.optionSelected);
125
+ this.$emit("selected", undefined);
126
+ },
127
+ },
128
+ },
129
+
130
+ methods: {
131
+ fakeSearch(): Array<unknown> {
132
+ return this.options;
133
+ },
134
+ onSearch(search: string): void {
135
+ if (search && search.length < this.minSearchLength) {
136
+ return;
162
137
  }
163
- }
164
- }
138
+ this.isLoading = true;
139
+ this.$emit("onSearch", search);
140
+ },
141
+ afterSearch(optionsFetched: Array<unknown>, count: number): void {
142
+ this.options = optionsFetched;
143
+ this.remainingElements = Math.max(0, count - this.maxElement);
144
+ this.isLoading = false;
145
+ },
146
+ onOptionSelected(optionSelected: unknown): void {
147
+ this.$emit("selected", optionSelected);
148
+ },
149
+ onOptionDeselect(event: unknown): void {
150
+ if (!this.multiple) {
151
+ return;
152
+ }
153
+ if (
154
+ !this.allowEmpty &&
155
+ 1 >= (this.optionSelected as Array<unknown>).length
156
+ ) {
157
+ (this.optionSelected as Array<unknown>).push(event);
158
+ return;
159
+ }
160
+ this.$emit("selected", this.optionSelected);
161
+ },
162
+ },
163
+ };
165
164
  </script>
166
165
  <style lang="scss">
167
166
  @import "vue-select/dist/vue-select.css";
168
- :root{
169
- --vs-dropdown-z-index:1060;
167
+ :root {
168
+ --vs-dropdown-z-index: 1060;
170
169
  --vs-border-radius: 0.2rem;
171
170
  --vs-dropdown-option--active-bg: #ddd;
172
171
  --vs-dropdown-option--active-color: black;
173
- --vs-font-size:0.8rem;
172
+ --vs-font-size: 0.8rem;
174
173
  --vs-border-width: 2px;
175
174
  --vs-border-color: #dee2e6;
176
175
  }
177
- .octopus-app{
178
- .vs__dropdown-option{
176
+ .octopus-app {
177
+ .vs__dropdown-option {
179
178
  white-space: initial;
180
179
  }
181
- .vs--searchable .vs__dropdown-toggle{
180
+ .vs--searchable .vs__dropdown-toggle {
182
181
  cursor: pointer;
183
182
  }
184
- .vs__search:focus{
183
+ .vs__search:focus {
185
184
  min-width: 150px;
186
185
  }
187
- .multiselect-no-deselect .vs__clear{
186
+ .multiselect-no-deselect .vs__clear {
188
187
  display: none;
189
188
  }
190
- .multiselect-transparent{
189
+ .multiselect-transparent {
191
190
  --vs-border-color: transparent;
192
191
  }
193
- .multiselect-white{
192
+ .multiselect-white {
194
193
  --vs-selected-color: white;
195
194
  --vs-selected-bg: transparent;
196
195
  --vs-dropdown-bg: black;
197
- --vs-controls-color:white;
198
- .vs__actions path{
196
+ --vs-controls-color: white;
197
+ .vs__actions path {
199
198
  fill: white;
200
199
  }
201
200
  }
202
201
  }
203
- </style>
202
+ </style>
@@ -1,27 +1,21 @@
1
1
  <template>
2
- <div
3
- class="d-flex"
4
- :class="isColumn? 'flex-column':''"
5
- >
2
+ <div class="d-flex" :class="isColumn ? 'flex-column' : ''">
6
3
  <div
7
4
  v-for="option in options"
8
5
  :key="option.title"
9
6
  class="octopus-form-item"
10
- :class="isColumn? 'd-flex align-items-center':'me-2'"
7
+ :class="isColumn ? 'd-flex align-items-center' : 'me-2'"
11
8
  >
12
9
  <input
13
10
  :id="idRadio + option.value"
14
- :checked="textInit===option.value"
11
+ :checked="textInit === option.value"
15
12
  type="radio"
16
13
  :name="idRadio"
17
14
  :value="option.value"
18
15
  :disabled="isDisabled"
19
- @input="$emit('update:textInit',$event.target.value)"
20
- >
21
- <label
22
- class="c-hand"
23
- :for="idRadio + option.value"
24
- >{{
16
+ @input="$emit('update:textInit', $event.target.value)"
17
+ />
18
+ <label class="c-hand" :for="idRadio + option.value">{{
25
19
  option.title
26
20
  }}</label>
27
21
  </div>
@@ -29,17 +23,20 @@
29
23
  </template>
30
24
 
31
25
  <script lang="ts">
32
- import { defineComponent } from 'vue';
26
+ import { defineComponent } from "vue";
33
27
  export default defineComponent({
34
- name: 'ClassicRadio',
28
+ name: "ClassicRadio",
35
29
 
36
30
  props: {
37
- idRadio: { default: '', type: String },
31
+ idRadio: { default: "", type: String },
38
32
  isDisabled: { default: false, type: Boolean },
39
- options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined}> },
33
+ options: {
34
+ default: () => [],
35
+ type: Array as () => Array<{ title: string; value: string | undefined }>,
36
+ },
40
37
  textInit: { default: undefined, type: String },
41
- isColumn: {default:true, type:Boolean}
38
+ isColumn: { default: true, type: Boolean },
42
39
  },
43
- emits: ['update:textInit'],
40
+ emits: ["update:textInit"],
44
41
  });
45
42
  </script>
@@ -5,45 +5,39 @@
5
5
  ref="search"
6
6
  :value="textInit"
7
7
  type="text"
8
- class="search-input w-100 p-2 "
8
+ class="search-input w-100 p-2"
9
9
  :placeholder="label"
10
10
  :autofocus="autofocus"
11
- @input="$emit('update:textInit',$event.target.value)"
12
- >
13
- <label
14
- :for="idSearch"
15
- :title="label"
16
- />
17
- <div
18
- v-if="!textInit"
19
- class="saooti-search search-icon-container"
11
+ @input="$emit('update:textInit', $event.target.value)"
20
12
  />
13
+ <label :for="idSearch" :title="label" />
14
+ <div v-if="!textInit" class="saooti-search search-icon-container" />
21
15
  <div
22
16
  v-else
23
17
  class="saooti-remove search-icon-container c-hand"
24
- @click="$emit('update:textInit','')"
18
+ @click="$emit('update:textInit', '')"
25
19
  />
26
20
  </div>
27
21
  </template>
28
22
 
29
23
  <script lang="ts">
30
- import { defineComponent } from 'vue';
24
+ import { defineComponent } from "vue";
31
25
  export default defineComponent({
32
- name: 'ClassicSearch',
33
- props: {
34
- idSearch: { default: '', type: String },
35
- label: { default: '', type: String },
36
- textInit: { default: '', type: String },
26
+ name: "ClassicSearch",
27
+ props: {
28
+ idSearch: { default: "", type: String },
29
+ label: { default: "", type: String },
30
+ textInit: { default: "", type: String },
37
31
  autofocus: { default: false, type: Boolean },
38
32
  },
39
33
 
40
- emits: ['update:textInit'],
34
+ emits: ["update:textInit"],
41
35
  });
42
36
  </script>
43
37
  <style lang="scss">
44
- @import '@scss/_variables.scss';
45
- .octopus-app{
46
- .champs-searchPage{
38
+ @import "@scss/_variables.scss";
39
+ .octopus-app {
40
+ .champs-searchPage {
47
41
  input {
48
42
  border: 2px solid #dee2e6;
49
43
  border-radius: $octopus-borderradius;
@@ -63,6 +57,6 @@ export default defineComponent({
63
57
  align-items: center;
64
58
  margin: 1rem;
65
59
  }
66
- }
60
+ }
67
61
  }
68
- </style>
62
+ </style>
@@ -3,22 +3,23 @@
3
3
  <label
4
4
  :for="idSelect"
5
5
  class="form-label mt-2"
6
- :class="displayLabel?'':'d-none'"
7
- >{{ label }}</label>
6
+ :class="displayLabel ? '' : 'd-none'"
7
+ >{{ label }}</label
8
+ >
8
9
  <select
9
10
  :id="idSelect"
10
11
  :value="textInit"
11
12
  :disabled="isDisabled"
12
13
  class="c-hand w-100"
13
- :class="transparent?'transparent':''"
14
+ :class="transparent ? 'transparent' : ''"
14
15
  :style="getFontFamily"
15
- @change="$emit('update:textInit',$event.target.value)"
16
+ @change="$emit('update:textInit', $event.target.value)"
16
17
  >
17
18
  <option
18
19
  v-for="option in options"
19
20
  :key="option.title"
20
21
  :value="option.value"
21
- :style="option.fontFamily ? 'font-family:'+option.fontFamily:''"
22
+ :style="option.fontFamily ? 'font-family:' + option.fontFamily : ''"
22
23
  >
23
24
  {{ option.title }}
24
25
  </option>
@@ -26,40 +27,47 @@
26
27
  </div>
27
28
  </template>
28
29
  <script lang="ts">
29
- import { defineComponent } from 'vue';
30
+ import { defineComponent } from "vue";
30
31
  export default defineComponent({
31
- name: 'ClassicSelect',
32
+ name: "ClassicSelect",
32
33
  props: {
33
- idSelect: { default: '', type: String },
34
- label: { default: '', type: String },
35
- displayLabel:{default: true, type: Boolean},
36
- transparent:{ default: false, type: Boolean },
34
+ idSelect: { default: "", type: String },
35
+ label: { default: "", type: String },
36
+ displayLabel: { default: true, type: Boolean },
37
+ transparent: { default: false, type: Boolean },
37
38
  isDisabled: { default: false, type: Boolean },
38
- options: { default: ()=>[], type: Array as () => Array<{title: string, value: number|string|undefined, fontFamily?: string}> },
39
- textInit: { default: undefined, type: [ String, Number ] },
39
+ options: {
40
+ default: () => [],
41
+ type: Array as () => Array<{
42
+ title: string;
43
+ value: number | string | undefined;
44
+ fontFamily?: string;
45
+ }>,
46
+ },
47
+ textInit: { default: undefined, type: [String, Number] },
40
48
  },
41
- emits: ['update:textInit'],
42
- computed:{
43
- getFontFamily(): string{
49
+ emits: ["update:textInit"],
50
+ computed: {
51
+ getFontFamily(): string {
44
52
  const item = this.options.find((x) => {
45
53
  return this.textInit === x.value;
46
54
  });
47
- if(item && item.fontFamily){
48
- return 'font-family:'+item.fontFamily;
55
+ if (item && item.fontFamily) {
56
+ return "font-family:" + item.fontFamily;
49
57
  }
50
58
  return "";
51
- }
59
+ },
52
60
  },
53
61
  });
54
62
  </script>
55
63
  <style lang="scss">
56
- .octopus-app{
64
+ .octopus-app {
57
65
  select.transparent {
58
- background: transparent !important;
59
- outline-color: transparent !important;
60
- padding:0;
61
- border: 0;
62
- height: unset;
63
- }
66
+ background: transparent !important;
67
+ outline-color: transparent !important;
68
+ padding: 0;
69
+ border: 0;
70
+ height: unset;
71
+ }
64
72
  }
65
- </style>
73
+ </style>