fcad-core-dragon 2.0.0 → 2.0.1-beta.1

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 (55) hide show
  1. package/CHANGELOG +7 -0
  2. package/README.md +57 -72
  3. package/documentation/.vitepress/config.js +114 -0
  4. package/documentation/api-examples.md +49 -0
  5. package/documentation/composants/app-base-button.md +58 -0
  6. package/documentation/composants/app-base-error-display.md +59 -0
  7. package/documentation/composants/app-base-popover.md +68 -0
  8. package/documentation/composants/app-comp-audio.md +43 -0
  9. package/documentation/composants/app-comp-branch-buttons.md +111 -0
  10. package/documentation/composants/app-comp-button-progress.md +53 -0
  11. package/documentation/composants/app-comp-carousel.md +53 -0
  12. package/documentation/composants/app-comp-container.md +53 -0
  13. package/documentation/composants/app-comp-input-checkbox-next.md +42 -0
  14. package/documentation/composants/app-comp-input-dropdown-next.md +34 -0
  15. package/documentation/composants/app-comp-input-radio-next.md +39 -0
  16. package/documentation/composants/app-comp-input-text-next.md +35 -0
  17. package/documentation/composants/app-comp-input-text-table-next.md +34 -0
  18. package/documentation/composants/app-comp-input-text-to-fill-dropdown-next.md +53 -0
  19. package/documentation/composants/app-comp-input-text-to-fill-next.md +31 -0
  20. package/documentation/composants/app-comp-jauge.md +31 -0
  21. package/documentation/composants/app-comp-menu-item.md +55 -0
  22. package/documentation/composants/app-comp-menu.md +29 -0
  23. package/documentation/composants/app-comp-navigation.md +41 -0
  24. package/documentation/composants/app-comp-note-call.md +53 -0
  25. package/documentation/composants/app-comp-note-credit.md +53 -0
  26. package/documentation/composants/app-comp-play-bar-next.md +53 -0
  27. package/documentation/composants/app-comp-pop-up-next.md +93 -0
  28. package/documentation/composants/app-comp-quiz-next.md +235 -0
  29. package/documentation/composants/app-comp-quiz-recall.md +53 -0
  30. package/documentation/composants/app-comp-svg-next.md +53 -0
  31. package/documentation/composants/app-comp-table-of-content.md +50 -0
  32. package/documentation/composants/app-comp-video-player.md +43 -0
  33. package/documentation/composants.md +46 -0
  34. package/documentation/composants_critiques/ModelPageComposant.md +53 -0
  35. package/documentation/composants_critiques/app-base-module.md +43 -0
  36. package/documentation/composants_critiques/app-base-page.md +48 -0
  37. package/documentation/composants_critiques/app-base.md +311 -0
  38. package/documentation/composants_critiques/main.md +15 -0
  39. package/documentation/demarrage.md +50 -0
  40. package/documentation/deploiement.md +58 -0
  41. package/documentation/index.md +33 -0
  42. package/documentation/markdown-examples.md +85 -0
  43. package/documentation/public/npm_version.png +0 -0
  44. package/documentation/public/vite.svg +15 -0
  45. package/documentation/public/vuejs.svg +2 -0
  46. package/documentation/public/vuetify.svg +6 -0
  47. package/package.json +6 -2
  48. package/src/components/AppBase.vue +3 -0
  49. package/src/components/AppCompBranchButtons.vue +3 -5
  50. package/src/components/AppCompInputCheckBoxNext.vue +18 -13
  51. package/src/components/AppCompInputDropdownNext.vue +1 -1
  52. package/src/components/AppCompInputRadioNext.vue +158 -152
  53. package/src/components/AppCompInputTextNext.vue +0 -1
  54. package/src/components/AppCompInputTextToFillNext.vue +171 -171
  55. package/src/components/AppCompQuizNext.vue +1 -1
@@ -1,171 +1,171 @@
1
- <!-- About this Component--
2
- * Renders a Series of inputs to collect input for the Quiz component.
3
- * Related Quiz to question: TEXTE_TROUE
4
- * Receives the a data object defined by user
5
- * Used by AppCompQuizNext
6
- * Uses useQuiz composable
7
- -->
8
- <template>
9
- <div class="input-box">
10
- <div
11
- v-for="textInput in theInputData"
12
- :key="textInput.id"
13
- class="texteatrou"
14
- >
15
- <span v-if="!textInput.type" v-html="textInput.content"></span>
16
- <label
17
- :for="`${inputDataId}_${textInput.id}-champ`"
18
- style="display: none"
19
- >
20
- {{ $t('text.quiz') }}
21
- </label>
22
- <v-text-field
23
- v-if="textInput.type == 'inputText'"
24
- :id="`${inputDataId}_${textInput.id}-champ`"
25
- v-model="quizInputTypeValue[textInput.id]"
26
- :placeholder="$t('text.place_holder.for_textarea')"
27
- :disabled="quizLimitActive"
28
- no-resize
29
- :class="classInput(textInput.id, quizInputTypeValue)"
30
- class="input-textatrou"
31
- :aria-describedby="`${inputDataId}_${textInput.id}-msg-erreur`"
32
- :aria-labelledby="`${inputDataId}_${textInput.id}-label`"
33
- />
34
- <span :id="`${inputDataId}_${textInput.id}-msg-erreur`" class="sr-only">
35
- {{ messageAccessibility(textInput.id, quizInputTypeValue) }}
36
- </span>
37
- </div>
38
- </div>
39
- </template>
40
- <script>
41
- import { useQuiz } from '../composables/useQuiz'
42
- import { toRefs } from 'vue'
43
- export default {
44
- name: 'AppCompInputTextToFillNext',
45
- props: {
46
- quizType: {
47
- type: String,
48
- default: ''
49
- },
50
- inputDataId: {
51
- type: String,
52
- default: ''
53
- },
54
- inputData: {
55
- type: Array,
56
- default: () => []
57
- },
58
- inputType: {
59
- type: String,
60
- default: ''
61
- },
62
- textBase: {
63
- type: String,
64
- default: ''
65
- },
66
- quizInputType: {
67
- type: Array,
68
- default: () => []
69
- },
70
- solution: {
71
- type: Array,
72
- default: () => []
73
- },
74
- showSolution: {
75
- type: Boolean,
76
- default: false
77
- },
78
- quizLimitActive: {
79
- type: Boolean,
80
- default: false
81
- }, //use to set if quiz should be active or not
82
- quizSubmit: {
83
- type: Boolean,
84
- default: false
85
- } //use to call a submit
86
- },
87
- emits: ['input-change'],
88
- setup(props) {
89
- const { shuffleArray, classInput, messageAccessibility } = useQuiz(
90
- toRefs(props)
91
- )
92
- return { shuffleArray, classInput, messageAccessibility }
93
- },
94
- data() {
95
- return {
96
- quizInputTypeValue: [], //not using quizInputType because quizInputType is a prop
97
- theInputData: [], //to create the list of drop down and text mixed togeter
98
- quizSolution: null
99
- }
100
- },
101
-
102
- watch: {
103
- /**
104
- * @description to pass value to AppCompQuiz
105
- * @fires input-change to AppCompQuiz.vue
106
- */
107
- quizInputTypeValue: {
108
- deep: true,
109
- handler(newValue) {
110
- this.$emit('input-change', newValue)
111
- }
112
- }
113
- },
114
-
115
- mounted() {
116
- this.initQuiz()
117
- },
118
-
119
- methods: {
120
- initQuiz() {
121
- this.quizSolution = this.solution
122
- if (this.quizSolution !== null) {
123
- this.quizSolution.sort(function (a, b) {
124
- return a - b
125
- })
126
- }
127
- let textChoices = []
128
-
129
- const regex = /\$%\S*%\$/g // regex pattern to match exp: $%number%$
130
- let matchAll = this.textBase.split(regex)
131
-
132
- for (let i = 0; i < matchAll.length - 1; i++) {
133
- textChoices.push('')
134
- }
135
- //apply previous answers
136
- if (this.quizInputType && this.quizInputType.length == 0) {
137
- this.quizInputTypeValue = textChoices
138
- } else {
139
- this.quizInputTypeValue = this.quizInputType
140
- }
141
- this.createTextWithInput(this.textBase)
142
- },
143
- /**
144
- * @description create the object to genate the text and inputs
145
- * @param {String} str the text with holes to fill
146
- */
147
- createTextWithInput(str) {
148
- const regex = /\$%\S*%\$/g // regex pattern to match exp: $%number%$
149
- let matchAll = str.split(regex)
150
- let listInput = []
151
- for (let i = 0; i < matchAll.length - 1; i++) {
152
- listInput.push({ id: 't' + i, content: matchAll[i] })
153
- listInput.push({ id: i, type: 'inputText' })
154
- }
155
- let lastItem = matchAll.length - 1
156
- listInput.push({ id: 't' + lastItem, content: matchAll[lastItem] })
157
- this.theInputData = listInput
158
- }
159
- }
160
- }
161
- </script>
162
- <style lang="scss" scoped>
163
- .texteatrou {
164
- display: inline;
165
- position: relative;
166
- }
167
- .texteatrou > input {
168
- display: inline;
169
- width: auto;
170
- }
171
- </style>
1
+ <!-- About this Component--
2
+ * Renders a Series of inputs to collect input for the Quiz component.
3
+ * Related Quiz to question: TEXTE_TROUE
4
+ * Receives the a data object defined by user
5
+ * Used by AppCompQuizNext
6
+ * Uses useQuiz composable
7
+ -->
8
+ <template>
9
+ <div class="input-box">
10
+ <div
11
+ v-for="textInput in theInputData"
12
+ :key="textInput.id"
13
+ class="texteatrou"
14
+ >
15
+ <span v-if="!textInput.type" v-html="textInput.content"></span>
16
+ <label
17
+ :for="`${inputDataId}_${textInput.id}-champ`"
18
+ style="display: none"
19
+ >
20
+ {{ $t('text.quiz') }}
21
+ </label>
22
+ <v-text-field
23
+ v-if="textInput.type == 'inputText'"
24
+ :id="`${inputDataId}_${textInput.id}-champ`"
25
+ v-model="quizInputTypeValue[textInput.id]"
26
+ :placeholder="$t('text.place_holder.for_textarea')"
27
+ :disabled="quizLimitActive"
28
+ no-resize
29
+ :class="classInput(textInput.id, quizInputTypeValue)"
30
+ class="input-textatrou"
31
+ :aria-describedby="`${inputDataId}_${textInput.id}-msg-erreur`"
32
+ :aria-labelledby="`${inputDataId}_${textInput.id}-label`"
33
+ />
34
+ <span :id="`${inputDataId}_${textInput.id}-msg-erreur`" class="sr-only">
35
+ {{ messageAccessibility(textInput.id, quizInputTypeValue) }}
36
+ </span>
37
+ </div>
38
+ </div>
39
+ </template>
40
+ <script>
41
+ import { useQuiz } from '../composables/useQuiz'
42
+ import { toRefs } from 'vue'
43
+ export default {
44
+ name: 'AppCompInputTextToFillNext',
45
+ props: {
46
+ quizType: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ inputDataId: {
51
+ type: String,
52
+ default: ''
53
+ },
54
+ inputData: {
55
+ type: Array,
56
+ default: () => []
57
+ },
58
+ inputType: {
59
+ type: String,
60
+ default: ''
61
+ },
62
+ textBase: {
63
+ type: String,
64
+ default: ''
65
+ },
66
+ quizInputType: {
67
+ type: Array,
68
+ default: () => []
69
+ },
70
+ solution: {
71
+ type: Array,
72
+ default: () => []
73
+ },
74
+ showSolution: {
75
+ type: Boolean,
76
+ default: false
77
+ },
78
+ quizLimitActive: {
79
+ type: Boolean,
80
+ default: false
81
+ }, //use to set if quiz should be active or not
82
+ quizSubmit: {
83
+ type: Boolean,
84
+ default: false
85
+ } //use to call a submit
86
+ },
87
+ emits: ['input-change'],
88
+ setup(props) {
89
+ const { shuffleArray, classInput, messageAccessibility } = useQuiz(
90
+ toRefs(props)
91
+ )
92
+ return { shuffleArray, classInput, messageAccessibility }
93
+ },
94
+ data() {
95
+ return {
96
+ quizInputTypeValue: [], //not using quizInputType because quizInputType is a prop
97
+ theInputData: [], //to create the list of drop down and text mixed togeter
98
+ quizSolution: null
99
+ }
100
+ },
101
+
102
+ watch: {
103
+ /**
104
+ * @description to pass value to AppCompQuiz
105
+ * @fires input-change to AppCompQuiz.vue
106
+ */
107
+ quizInputTypeValue: {
108
+ deep: true,
109
+ handler(newValue) {
110
+ this.$emit('input-change', newValue)
111
+ }
112
+ }
113
+ },
114
+
115
+ mounted() {
116
+ this.initQuiz()
117
+ },
118
+
119
+ methods: {
120
+ initQuiz() {
121
+ this.quizSolution = this.solution
122
+ if (this.quizSolution !== null) {
123
+ this.quizSolution.sort(function (a, b) {
124
+ return a - b
125
+ })
126
+ }
127
+ let textChoices = []
128
+
129
+ const regex = /\$%\S*%\$/g // regex pattern to match exp: $%number%$
130
+ let matchAll = this.textBase.split(regex)
131
+
132
+ for (let i = 0; i < matchAll.length - 1; i++) {
133
+ textChoices.push('')
134
+ }
135
+ //apply previous answers
136
+ if (this.quizInputType && this.quizInputType.length == 0) {
137
+ this.quizInputTypeValue = textChoices
138
+ } else {
139
+ this.quizInputTypeValue = this.quizInputType
140
+ }
141
+ this.createTextWithInput(this.textBase)
142
+ },
143
+ /**
144
+ * @description create the object to genate the text and inputs
145
+ * @param {String} str the text with holes to fill
146
+ */
147
+ createTextWithInput(str) {
148
+ const regex = /\$%\S*%\$/g // regex pattern to match exp: $%number%$
149
+ let matchAll = str.split(regex)
150
+ let listInput = []
151
+ for (let i = 0; i < matchAll.length - 1; i++) {
152
+ listInput.push({ id: 't' + i, content: matchAll[i] })
153
+ listInput.push({ id: i, type: 'inputText' })
154
+ }
155
+ let lastItem = matchAll.length - 1
156
+ listInput.push({ id: 't' + lastItem, content: matchAll[lastItem] })
157
+ this.theInputData = listInput
158
+ }
159
+ }
160
+ }
161
+ </script>
162
+ <style lang="scss" scoped>
163
+ .texteatrou {
164
+ display: inline;
165
+ position: relative;
166
+ }
167
+ .texteatrou > input {
168
+ display: inline;
169
+ width: auto;
170
+ }
171
+ </style>
@@ -86,7 +86,7 @@
86
86
  </div>
87
87
  </div>
88
88
  </v-col>
89
- <v-col cols="12" aria-live="polite">
89
+ <v-col cols="12" aria-live="polite" class="ctn-retro">
90
90
  <transition name="fade" mode="in-out">
91
91
  <div
92
92
  v-if="showSolution && showRetro"