@saooti/octopus-sdk 33.1.3 → 33.2.0

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 (49) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -3
  3. package/src/App.vue +1 -1
  4. package/src/assets/_utilities.scss +522 -0
  5. package/src/assets/bootstrap.scss +181 -0
  6. package/src/assets/form.scss +0 -20
  7. package/src/assets/general.scss +1 -0
  8. package/src/assets/modal.scss +49 -8
  9. package/src/assets/octopus-library.scss +2 -3
  10. package/src/components/display/categories/CategoryChooser.vue +1 -1
  11. package/src/components/display/categories/CategoryFilter.vue +60 -46
  12. package/src/components/display/categories/CategoryList.vue +22 -19
  13. package/src/components/display/comments/AddCommentModal.vue +60 -67
  14. package/src/components/display/comments/CommentBasicView.vue +2 -3
  15. package/src/components/display/emission/EmissionItem.vue +2 -1
  16. package/src/components/display/emission/EmissionPlayerItem.vue +0 -11
  17. package/src/components/display/participant/ParticipantItem.vue +2 -1
  18. package/src/components/display/playlist/PlaylistItem.vue +2 -1
  19. package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
  20. package/src/components/display/podcasts/PodcastInlineListClassic.vue +1 -1
  21. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +6 -2
  22. package/src/components/display/podcasts/PodcastPlayBar.vue +9 -35
  23. package/src/components/display/podcasts/TagList.vue +0 -2
  24. package/src/components/display/rubriques/RubriqueList.vue +25 -20
  25. package/src/components/display/sharing/PlayerParameters.vue +76 -99
  26. package/src/components/display/sharing/ShareButtons.vue +3 -5
  27. package/src/components/display/sharing/ShareButtonsIntern.vue +1 -1
  28. package/src/components/display/sharing/ShareDistribution.vue +11 -10
  29. package/src/components/display/sharing/SubscribeButtons.vue +1 -1
  30. package/src/components/form/ClassicLoading.vue +5 -1
  31. package/src/components/misc/Accordion.vue +48 -0
  32. package/src/components/misc/ErrorMessage.vue +2 -1
  33. package/src/components/misc/HomeDropdown.vue +66 -63
  34. package/src/components/misc/Nav.vue +92 -0
  35. package/src/components/misc/Popover.vue +137 -98
  36. package/src/components/misc/ProgressBar.vue +96 -0
  37. package/src/components/misc/Spinner.vue +26 -0
  38. package/src/components/misc/modal/ClassicModal.vue +141 -0
  39. package/src/components/misc/modal/ClipboardModal.vue +25 -40
  40. package/src/components/misc/modal/MessageModal.vue +45 -60
  41. package/src/components/misc/modal/NewsletterModal.vue +84 -92
  42. package/src/components/misc/modal/QrCodeModal.vue +19 -36
  43. package/src/components/misc/modal/ShareModalPlayer.vue +69 -133
  44. package/src/components/misc/player/Player.vue +0 -6
  45. package/src/components/misc/player/PlayerCompact.vue +4 -3
  46. package/src/components/misc/player/PlayerLarge.vue +12 -8
  47. package/src/components/misc/player/PlayerProgressBar.vue +10 -48
  48. package/src/components/pages/Podcast.vue +1 -1
  49. package/src/assets/bootstrap-diff.scss +0 -195
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <div
3
+ :id="idModal"
4
+ class="octopus-modal"
5
+ >
6
+ <div class="octopus-modal-backdrop" />
7
+ <div class="octopus-modal-dialog">
8
+ <div class="octopus-modal-content">
9
+ <div class="octopus-modal-header">
10
+ <h5 cclass="octopus-modal-title">
11
+ {{ titleModal }}
12
+ </h5>
13
+ <button
14
+ v-if="closable"
15
+ :ref="closable?'focusElement':''"
16
+ type="button"
17
+ class="btn-transparent text-light saooti-remove"
18
+ title="Close"
19
+ @click="$emit('close')"
20
+ />
21
+ </div>
22
+ <div class="octopus-modal-body">
23
+ <slot name="body" />
24
+ </div>
25
+ <div
26
+ class="octopus-modal-footer"
27
+ >
28
+ <slot name="footer" />
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <script lang="ts">
36
+ import { defineComponent } from 'vue'
37
+ export default defineComponent({
38
+ name: 'ClassicModal',
39
+ props: {
40
+ idModal: { default: undefined, type: String},
41
+ titleModal: { default: undefined, type: String},
42
+ closable: { default: true, type: Boolean},
43
+ },
44
+ emits: ['close'],
45
+ mounted(){
46
+ (this.$refs.focusElement as HTMLElement)?.focus();
47
+ },
48
+ })
49
+ </script>
50
+ <style lang="scss">
51
+ @import '@scss/_variables.scss';
52
+ .octopus-app{
53
+ .octopus-modal{
54
+ position: fixed;
55
+ top: 0;
56
+ left: 0;
57
+ display: block;
58
+ z-index: 1055;
59
+ width: 100%;
60
+ height: 100%;
61
+ overflow-x: hidden;
62
+ overflow-y: auto;
63
+ outline: 0;
64
+ }
65
+ .octopus-modal-backdrop {
66
+ opacity: 0.5;
67
+ z-index: 0;
68
+ position: fixed;
69
+ top: 0;
70
+ left: 0;
71
+ width: 100vw;
72
+ height: 100vh;
73
+ background-color: black;
74
+ }
75
+
76
+ .octopus-modal-dialog {
77
+ position: relative;
78
+ pointer-events: none;
79
+ margin: 1.75rem auto;
80
+ max-height: 75vh;
81
+ max-width: 640px;
82
+ width: 100%;
83
+ display: flex;
84
+ color: #353535 !important;
85
+ @media (max-width: 500px){
86
+ width: 95%;
87
+ margin: 2.5% !important;
88
+ }
89
+ }
90
+ .octopus-modal-body{
91
+ position: relative;
92
+ flex: 1 1 auto;
93
+ padding: 1rem;
94
+ }
95
+ .octopus-modal-header {
96
+ display: flex;
97
+ flex-shrink: 0;
98
+ align-items: center;
99
+ justify-content: space-between;
100
+ border: 0;
101
+ border-radius: 0.8rem 0.8rem 0 0;
102
+ background: $octopus-primary-color;
103
+ color: white;
104
+ padding: 1rem;
105
+ }
106
+ .octopus-modal-body{
107
+ overflow-x: auto;
108
+ .scroller-vertical {
109
+ min-height: 200px;
110
+ height: 200px;
111
+ }
112
+ }
113
+ .octopus-modal-dialog, .octopus-modal-content {
114
+ min-height: 300px;
115
+ }
116
+ .octopus-modal-content{
117
+ position: relative;
118
+ display: flex;
119
+ flex-direction: column;
120
+ pointer-events: auto;
121
+ width: 100%;
122
+ background-color: white;
123
+ background-clip: padding-box;
124
+ border: 0;
125
+ outline: 0;
126
+ height: auto !important;
127
+ max-height: calc(100vh - 250px) !important;
128
+ border-radius: 0.8rem;
129
+ box-shadow: 0 0.2rem 0.5rem rgba(40,40,40,.3);
130
+ }
131
+ .octopus-modal-footer{
132
+ display: flex;
133
+ flex-shrink: 0;
134
+ border: 0;
135
+ flex-wrap: initial;
136
+ align-items: center;
137
+ justify-content: flex-end;
138
+ padding: 1rem;
139
+ }
140
+ }
141
+ </style>
@@ -1,43 +1,31 @@
1
1
  <template>
2
- <div class="modal">
3
- <div class="modal-backdrop" />
4
- <div class="modal-dialog">
5
- <div class="modal-content">
6
- <div class="modal-header">
7
- <div class="modal-title h5">
8
- {{ $t('RSS Link') }}
9
- </div>
10
- <button
11
- ref="focusElement"
12
- type="button"
13
- class="btn-close btn-close-white"
14
- title="Close"
15
- @click="closePopup"
16
- />
17
- </div>
18
- <div class="modal-body">
19
- <p class="d-flex justify-content-between align-items-center">
20
- {{ $t('Rss feed:') }}
21
- <span id="LINK">{{ link }}</span>
22
- <input
23
- type="button"
24
- :value="$t('Copy')"
25
- class="btn btn-primary"
26
- :title="$t('Copy')"
27
- @click="onCopyCode(link, afterCopy)"
28
- >
29
- </p>
30
- <RssSection
31
- v-if="emission && authenticated"
32
- :emission="emission"
33
- />
34
- </div>
35
- </div>
36
- </div>
37
- </div>
2
+ <ClassicModal
3
+ id-modal="clipboard-modal"
4
+ :title-modal="$t('RSS Link')"
5
+ @close="closePopup"
6
+ >
7
+ <template #body>
8
+ <p class="d-flex justify-content-between align-items-center">
9
+ {{ $t('Rss feed:') }}
10
+ <span id="LINK">{{ link }}</span>
11
+ <input
12
+ type="button"
13
+ :value="$t('Copy')"
14
+ class="btn btn-primary"
15
+ :title="$t('Copy')"
16
+ @click="onCopyCode(link, afterCopy)"
17
+ >
18
+ </p>
19
+ <RssSection
20
+ v-if="emission && authenticated"
21
+ :emission="emission"
22
+ />
23
+ </template>
24
+ </ClassicModal>
38
25
  </template>
39
26
 
40
27
  <script lang="ts">
28
+ import ClassicModal from '../modal/ClassicModal.vue';
41
29
  import { Emission } from '@/store/class/general/emission';
42
30
  import displayMethods from '../../mixins/displayMethods';
43
31
  import { defineComponent, defineAsyncComponent } from 'vue';
@@ -47,6 +35,7 @@ export default defineComponent({
47
35
  name: 'ClipboardModal',
48
36
  components: {
49
37
  RssSection,
38
+ ClassicModal
50
39
  },
51
40
  mixins: [displayMethods],
52
41
 
@@ -60,10 +49,6 @@ export default defineComponent({
60
49
  return state.generalParameters.authenticated??false;
61
50
  },
62
51
  },
63
- mounted(){
64
- (this.$refs.focusElement as HTMLElement)?.focus();
65
- },
66
-
67
52
  methods: {
68
53
  closePopup(): void {
69
54
  this.$emit('close');
@@ -1,68 +1,56 @@
1
1
  <template>
2
- <div
3
- id="message-modal"
4
- class="modal"
2
+ <ClassicModal
3
+ id-modal="message-modal"
4
+ :title-modal="title"
5
+ :closable="closable"
6
+ @close="closePopup"
5
7
  >
6
- <div class="modal-backdrop" />
7
- <div class="modal-dialog">
8
- <div class="modal-content">
9
- <div class="modal-header">
10
- <h5 class="modal-title">
11
- {{ title }}
12
- </h5>
13
- <button
14
- v-if="closable"
15
- :ref="closable?'focusElement':''"
16
- type="button"
17
- class="btn-close btn-close-white"
18
- title="Close"
19
- @click="closePopup"
20
- />
21
- </div>
22
- <div class="modal-body">
23
- <!-- eslint-disable vue/no-v-html -->
24
- <div
25
- class="content"
26
- v-html="message"
27
- />
28
- <!-- eslint-enable -->
29
- </div>
30
- <div
31
- v-if="validatetext"
32
- class="modal-footer"
33
- >
34
- <button
35
- v-if="canceltext"
36
- :ref="!closable && canceltext?'focusElement':''"
37
- class="btn m-1"
38
- @click="onCancel"
39
- >
40
- {{ canceltext }}
41
- </button>
42
- <button
43
- v-if="thirdText"
44
- class="btn btn-primary m-1"
45
- @click="onThirdAction"
46
- >
47
- {{ thirdText }}
48
- </button>
49
- <button
50
- :ref="!closable && !canceltext?'focusElement':''"
51
- class="btn btn-primary m-1"
52
- @click="onValid"
53
- >
54
- {{ validatetext }}
55
- </button>
56
- </div>
57
- </div>
58
- </div>
59
- </div>
8
+ <template #body>
9
+ <!-- eslint-disable vue/no-v-html -->
10
+ <div
11
+ class="content"
12
+ v-html="message"
13
+ />
14
+ <!-- eslint-enable -->
15
+ </template>
16
+ <template
17
+ v-if="validatetext"
18
+ #footer
19
+ >
20
+ <button
21
+ v-if="canceltext"
22
+ :ref="!closable && canceltext?'focusElement':''"
23
+ class="btn m-1"
24
+ @click="onCancel"
25
+ >
26
+ {{ canceltext }}
27
+ </button>
28
+ <button
29
+ v-if="thirdText"
30
+ class="btn btn-primary m-1"
31
+ @click="onThirdAction"
32
+ >
33
+ {{ thirdText }}
34
+ </button>
35
+ <button
36
+ :ref="!closable && !canceltext?'focusElement':''"
37
+ class="btn btn-primary m-1"
38
+ @click="onValid"
39
+ >
40
+ {{ validatetext }}
41
+ </button>
42
+ </template>
43
+ </ClassicModal>
60
44
  </template>
61
45
 
62
46
  <script lang="ts">
47
+ import ClassicModal from '../modal/ClassicModal.vue';
63
48
  import { defineComponent } from 'vue'
64
49
  export default defineComponent({
65
50
  name: 'MessageModal',
51
+ components: {
52
+ ClassicModal
53
+ },
66
54
  props: {
67
55
  title: { default: undefined, type: String},
68
56
  active: { default: false, type: Boolean},
@@ -73,9 +61,6 @@ export default defineComponent({
73
61
  thirdText: { default: undefined, type: String},
74
62
  },
75
63
  emits: ['close', 'validate', 'cancel', 'thirdEvent'],
76
- mounted(){
77
- (this.$refs.focusElement as HTMLElement)?.focus();
78
- },
79
64
  methods: {
80
65
  closePopup(): void {
81
66
  this.$emit('close');
@@ -1,103 +1,94 @@
1
1
  <template>
2
- <div>
3
- <div
4
- id="newsletter-modal"
5
- class="modal"
6
- >
7
- <div class="modal-backdrop" />
8
- <div class="modal-dialog">
9
- <div class="modal-content">
10
- <div class="modal-header">
11
- <h5 class="modal-title">
12
- {{ $t('Share newsletter') }}
13
- </h5>
2
+ <ClassicModal
3
+ id-modal="newsletter-modal"
4
+ :title-modal="$t('Share newsletter')"
5
+ :closable="false"
6
+ @close="closePopup"
7
+ >
8
+ <template #body>
9
+ <div class="d-flex justify-content-between">
10
+ <!-- eslint-disable vue/no-v-html -->
11
+ <div v-html="newsletterHtml" />
12
+ <!-- eslint-enable -->
13
+ <div class="d-flex flex-column flex-grow-1 ms-4">
14
+ <h4 class="mb-3">
15
+ {{ $t('Configuration') }}
16
+ </h4>
17
+ <label for="share-url-newsletter">{{ $t('Share') }}</label>
18
+ <input
19
+ id="share-url-newsletter"
20
+ v-model="shareUrl"
21
+ class="form-input mb-2"
22
+ type="text"
23
+ :class="{ 'border border-danger': 0 === shareUrl }"
24
+ >
25
+ <template v-if="podcast">
26
+ <ClassicCheckbox
27
+ v-model:textInit="displayEmissionName"
28
+ id-checkbox="display-emission-name"
29
+ :label="$t('Display emission name')"
30
+ />
31
+ <ClassicCheckbox
32
+ v-model:textInit="displayParticipantsNames"
33
+ id-checkbox="display-participants-names"
34
+ :label="$t('Display participants list')"
35
+ />
36
+ </template>
37
+ <div class="d-flex align-items-center mt-2">
38
+ <VSwatches
39
+ v-model="color"
40
+ class="c-hand me-2 mt-2"
41
+ show-fallback
42
+ colors="text-advanced"
43
+ popover-to="right"
44
+ :data-color="color"
45
+ />
46
+ <div>{{ $t('Choose main color') }}</div>
14
47
  </div>
15
- <div class="modal-body">
16
- <div class="d-flex justify-content-between">
17
- <!-- eslint-disable vue/no-v-html -->
18
- <div v-html="newsletterHtml" />
19
- <!-- eslint-enable -->
20
- <div class="d-flex flex-column flex-grow-1 ms-4">
21
- <h4 class="mb-3">
22
- {{ $t('Configuration') }}
23
- </h4>
24
- <label for="share-url-newsletter">{{ $t('Share') }}</label>
25
- <input
26
- id="share-url-newsletter"
27
- v-model="shareUrl"
28
- class="form-input mb-2"
29
- type="text"
30
- :class="{ 'border border-danger': 0 === shareUrl }"
31
- >
32
- <template v-if="podcast">
33
- <ClassicCheckbox
34
- v-model:textInit="displayEmissionName"
35
- id-checkbox="display-emission-name"
36
- :label="$t('Display emission name')"
37
- />
38
- <ClassicCheckbox
39
- v-model:textInit="displayParticipantsNames"
40
- id-checkbox="display-participants-names"
41
- :label="$t('Display participants list')"
42
- />
43
- </template>
44
- <div class="d-flex align-items-center mt-2">
45
- <VSwatches
46
- v-model="color"
47
- class="c-hand me-2 mt-2"
48
- show-fallback
49
- colors="text-advanced"
50
- popover-to="right"
51
- :data-color="color"
52
- />
53
- <div>{{ $t('Choose main color') }}</div>
54
- </div>
55
- <div
56
- class=" d-flex justify-content-between align-items-center mt-3 mb-2"
57
- >
58
- <h4 class="mb-0">
59
- {{ $t('HTML Code') }}
60
- </h4>
61
- <input
62
- type="button"
63
- :value="$t('Copy')"
64
- class="btn btn-primary"
65
- :title="$t('Copy')"
66
- @click="onCopyCode(newsletterHtml, afterCopy)"
67
- >
68
- </div>
69
- <textarea
70
- id="newsletter_code_textarea"
71
- v-model="newsletterHtml"
72
- readonly
73
- @click="selectAll"
74
- />
75
- <label
76
- for="newsletter_code_textarea"
77
- :title="$t('HTML Code')"
78
- />
79
- </div>
80
- </div>
81
- </div>
82
- <div class="modal-footer">
83
- <button
84
- class="btn btn-primary m-1"
85
- @click="closePopup"
48
+ <div
49
+ class=" d-flex justify-content-between align-items-center mt-3 mb-2"
50
+ >
51
+ <h4 class="mb-0">
52
+ {{ $t('HTML Code') }}
53
+ </h4>
54
+ <input
55
+ type="button"
56
+ :value="$t('Copy')"
57
+ class="btn btn-primary"
58
+ :title="$t('Copy')"
59
+ @click="onCopyCode(newsletterHtml, afterCopy)"
86
60
  >
87
- {{ $t('Close') }}
88
- </button>
89
61
  </div>
62
+ <textarea
63
+ id="newsletter_code_textarea"
64
+ v-model="newsletterHtml"
65
+ readonly
66
+ @click="selectAll"
67
+ />
68
+ <label
69
+ for="newsletter_code_textarea"
70
+ :title="$t('HTML Code')"
71
+ />
90
72
  </div>
91
73
  </div>
92
- </div>
93
- <Snackbar
94
- ref="snackbar"
95
- position="bottom-left"
96
- />
97
- </div>
74
+ </template>
75
+ <template #footer>
76
+ <button
77
+ class="btn btn-primary m-1"
78
+ @click="closePopup"
79
+ >
80
+ {{ $t('Close') }}
81
+ </button>
82
+ </template>
83
+ </ClassicModal>
84
+ <Snackbar
85
+ ref="snackbar"
86
+ position="bottom-left"
87
+ />
98
88
  </template>
99
89
 
100
90
  <script lang="ts">
91
+ import ClassicModal from '../modal/ClassicModal.vue';
101
92
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
102
93
  import Snackbar from '../../misc/Snackbar.vue';
103
94
  import moment from 'moment';
@@ -119,7 +110,8 @@ export default defineComponent({
119
110
  components: {
120
111
  Snackbar,
121
112
  VSwatches,
122
- ClassicCheckbox
113
+ ClassicCheckbox,
114
+ ClassicModal
123
115
  },
124
116
 
125
117
  mixins: [displayMethods],
@@ -1,54 +1,37 @@
1
1
  <template>
2
- <div
3
- id="qrcode-modal"
4
- class="modal"
2
+ <ClassicModal
3
+ id-modal="qrcode-modal"
4
+ :title-modal="$t('Share QR Code')"
5
+ @close="closePopup"
5
6
  >
6
- <div class="modal-backdrop" />
7
- <div class="modal-dialog">
8
- <div class="modal-content">
9
- <div class="modal-header">
10
- <h5 class="modal-title">
11
- {{ $t('Share QR Code') }}
12
- </h5>
13
- <button
14
- ref="focusElement"
15
- type="button"
16
- class="btn-close btn-close-white"
17
- title="Close"
18
- @click="closePopup"
19
- />
20
- </div>
21
- <div class="modal-body">
22
- <QrCode :url="urlPage" />
23
- </div>
24
- <div class="modal-footer">
25
- <button
26
- class="btn btn-primary m-1"
27
- @click="closePopup"
28
- >
29
- {{ $t('Close') }}
30
- </button>
31
- </div>
32
- </div>
33
- </div>
34
- </div>
7
+ <template #body>
8
+ <QrCode :url="urlPage" />
9
+ </template>
10
+ <template #footer>
11
+ <button
12
+ class="btn btn-primary m-1"
13
+ @click="closePopup"
14
+ >
15
+ {{ $t('Close') }}
16
+ </button>
17
+ </template>
18
+ </ClassicModal>
35
19
  </template>
36
20
 
37
21
  <script lang="ts">
22
+ import ClassicModal from '../modal/ClassicModal.vue';
38
23
  import QrCode from '../../display/sharing/QrCode.vue';
39
24
  import { defineComponent } from 'vue'
40
25
  export default defineComponent({
41
26
  name: 'QrCodeModal',
42
27
  components: {
43
- QrCode
28
+ QrCode,
29
+ ClassicModal
44
30
  },
45
31
  props: {
46
32
  urlPage: { default: undefined, type: String},
47
33
  },
48
34
  emits: ['close'],
49
- mounted(){
50
- (this.$refs.focusElement as HTMLElement)?.focus();
51
- },
52
35
  methods:{
53
36
  closePopup(): void {
54
37
  this.$emit('close');