@saooti/octopus-sdk 41.0.14 → 41.0.15
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/index.ts +1 -0
- package/package.json +2 -1
- package/src/components/form/ClassicCheckbox.vue +2 -2
- package/src/components/form/ClassicInputText.vue +21 -9
- package/src/components/misc/ClassicHelpButton.vue +44 -0
- package/src/components/misc/FooterSection.vue +2 -3
- package/src/router/utils.ts +4 -4
- package/src/stores/AuthStore.ts +2 -2
- package/src/stores/FilterStore.ts +2 -2
- package/src/stores/class/general/organisation.ts +2 -2
- package/tsconfig.json +6 -2
- package/typings/index.d.ts +1 -0
package/index.ts
CHANGED
|
@@ -38,6 +38,7 @@ export const getClassicModal = () => import("./src/components/misc/modal/Classic
|
|
|
38
38
|
export const getClassicLazy = () => import("./src/components/misc/ClassicLazy.vue");
|
|
39
39
|
export const getContractPreviewModal = () => import("./src/components/misc/modal/ContractPreviewModal.vue");
|
|
40
40
|
export const getClassicModalInBody = () => import("./src/components/misc/modal/ClassicModalInBody.vue");
|
|
41
|
+
export const getClassicHelpButton = () => import("./src/components/misc/ClassicHelpButton.vue");
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
//Display
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "41.0.
|
|
3
|
+
"version": "41.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/sockjs-client": "^1.5.4",
|
|
68
|
+
"@types/webpack-env": "^1.18.8",
|
|
68
69
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
69
70
|
"eslint": "^9.28.0",
|
|
70
71
|
"eslint-plugin-vue": "^9.33.0",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:tabindex="isSwitch ? '-1' : '0'"
|
|
12
12
|
@input="emit('update:textInit', !textInit)"
|
|
13
13
|
@click="emitClickAction"
|
|
14
|
-
|
|
14
|
+
>
|
|
15
15
|
<button
|
|
16
16
|
v-if="isSwitch"
|
|
17
17
|
class="slider btn-transparent"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<label
|
|
25
25
|
class="c-hand"
|
|
26
26
|
:class="[classLabel, displayLabel ? '' : 'd-none', isDisabled ? 'disabled' : '']"
|
|
27
|
-
|
|
27
|
+
@click="clickSlider"
|
|
28
28
|
>
|
|
29
29
|
{{ label }}
|
|
30
30
|
</label>
|
|
@@ -4,15 +4,21 @@
|
|
|
4
4
|
:class="{ 'form-margin': displayLabel }"
|
|
5
5
|
>
|
|
6
6
|
<div class="d-flex align-items-center">
|
|
7
|
-
<slot name="complementLabel"/>
|
|
7
|
+
<slot name="complementLabel" />
|
|
8
8
|
<component
|
|
9
9
|
:is="isWysiwyg? 'div': 'label'"
|
|
10
10
|
:class="[classLabel, displayLabel ? '' : 'd-none']"
|
|
11
11
|
:for="isWysiwyg ? '': computedInputId"
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
>
|
|
13
|
+
{{ label }}
|
|
14
|
+
<AsteriskIcon
|
|
15
|
+
v-if="displayRequired"
|
|
16
|
+
:size="10"
|
|
17
|
+
class="ms-1 mb-2"
|
|
18
|
+
:title="t('Mandatory input')"
|
|
19
|
+
/>
|
|
14
20
|
</component>
|
|
15
|
-
<slot name="afterTitle"/>
|
|
21
|
+
<slot name="afterTitle" />
|
|
16
22
|
<template v-if="popover">
|
|
17
23
|
<button
|
|
18
24
|
:id="'popover' + computedInputId"
|
|
@@ -32,9 +38,9 @@
|
|
|
32
38
|
<!-- eslint-enable -->
|
|
33
39
|
</ClassicPopover>
|
|
34
40
|
</template>
|
|
35
|
-
<slot name="afterHelp"/>
|
|
41
|
+
<slot name="afterHelp" />
|
|
36
42
|
</div>
|
|
37
|
-
<slot name="betweenTitleInput"/>
|
|
43
|
+
<slot name="betweenTitleInput" />
|
|
38
44
|
<input
|
|
39
45
|
v-if="!isWysiwyg && !isTextarea"
|
|
40
46
|
v-show="showField"
|
|
@@ -55,7 +61,7 @@
|
|
|
55
61
|
:disabled="isDisable"
|
|
56
62
|
:required="!canBeNull"
|
|
57
63
|
:autocomplete="autocompleteType"
|
|
58
|
-
|
|
64
|
+
>
|
|
59
65
|
<textarea
|
|
60
66
|
v-else-if="isTextarea"
|
|
61
67
|
v-show="showField"
|
|
@@ -89,10 +95,16 @@
|
|
|
89
95
|
:is-top-position="true"
|
|
90
96
|
@emoji-selected="addEmojiSelected"
|
|
91
97
|
/>
|
|
92
|
-
<div
|
|
98
|
+
<div
|
|
99
|
+
v-if="isWysiwyg"
|
|
100
|
+
class="h6"
|
|
101
|
+
>
|
|
93
102
|
{{ t("Characters number calculated over HTML code") }}
|
|
94
103
|
</div>
|
|
95
|
-
<div
|
|
104
|
+
<div
|
|
105
|
+
v-else-if="'' !== indicText"
|
|
106
|
+
class="text-indic"
|
|
107
|
+
>
|
|
96
108
|
{{ indicText }}
|
|
97
109
|
</div>
|
|
98
110
|
<div
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
A simple component to display a help button that shows its message when
|
|
3
|
+
hovered.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
<ClassicHelpButton>This is my help message</ClassicHelpButton>
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<button
|
|
10
|
+
:id="computedId"
|
|
11
|
+
class="btn-transparent"
|
|
12
|
+
>
|
|
13
|
+
<!-- Button icon -->
|
|
14
|
+
<HelpCircleIcon :size="30" />
|
|
15
|
+
|
|
16
|
+
<!-- Tooltip -->
|
|
17
|
+
<ClassicPopover
|
|
18
|
+
:target="computedId"
|
|
19
|
+
popover-class="popover-z-index"
|
|
20
|
+
>
|
|
21
|
+
<div class="reset">
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
24
|
+
</ClassicPopover>
|
|
25
|
+
</button>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { computed, getCurrentInstance } from 'vue';
|
|
30
|
+
|
|
31
|
+
import HelpCircleIcon from "vue-material-design-icons/HelpCircle.vue";
|
|
32
|
+
import ClassicPopover from './ClassicPopover.vue';
|
|
33
|
+
|
|
34
|
+
/** The internal ID for the elements */
|
|
35
|
+
const computedId = computed(() => {
|
|
36
|
+
return 'popover-' + getCurrentInstance()?.uid;
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.reset {
|
|
42
|
+
font: revert;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -163,14 +163,13 @@ function changeLanguage(): void {
|
|
|
163
163
|
* @param organisation The new organisation to focus on, or undefined to remove focus
|
|
164
164
|
*/
|
|
165
165
|
async function onOrganisationSelected( organisation: Organisation | undefined): Promise<void> {
|
|
166
|
-
// TODO use router utils
|
|
167
166
|
if (organisation?.id) {
|
|
168
167
|
router.push({
|
|
169
|
-
query: { ...route.query, ...{ productor: organisation.id, o:undefined,
|
|
168
|
+
query: { ...route.query, ...{ productor: organisation.id, o:undefined, viewall: "false" } },
|
|
170
169
|
});
|
|
171
170
|
}else{
|
|
172
171
|
router.push({
|
|
173
|
-
query: { ...route.query, ...{ productor: undefined,
|
|
172
|
+
query: { ...route.query, ...{ productor: undefined, viewall: "true" } },
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
175
|
}
|
package/src/router/utils.ts
CHANGED
|
@@ -91,11 +91,11 @@ export function setupRouter(router: Router, getMyOrgaActive: (authStore: AuthSto
|
|
|
91
91
|
newQuery.productor = filterStore.filterOrgaId;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// Enable '
|
|
95
|
-
if ((from.query.
|
|
96
|
-
newQuery.
|
|
94
|
+
// Enable 'viewall' mode if already active
|
|
95
|
+
if ((from.query.viewall === "true" || to.query.viewall === "true") && to.query.viewall !== "false") {
|
|
96
|
+
newQuery.viewall = "true";
|
|
97
97
|
} else {
|
|
98
|
-
delete newQuery.
|
|
98
|
+
delete newQuery.viewall;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// If the queries are different, update path
|
package/src/stores/AuthStore.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { KeycloakInfo } from "@/stores/class/user/person";
|
|
|
6
6
|
import { VideoConfig } from "@/stores/class/config/videoConfig";
|
|
7
7
|
import classicApi from "../api/classicApi";
|
|
8
8
|
|
|
9
|
-
interface AuthParam{
|
|
9
|
+
interface AuthParam {
|
|
10
10
|
accessToken?: string;
|
|
11
11
|
refreshToken?: string;
|
|
12
12
|
expiration?: Date|string;
|
|
@@ -45,7 +45,7 @@ export const useAuthStore = defineStore("AuthStore", {
|
|
|
45
45
|
comments: undefined,
|
|
46
46
|
attributes: {
|
|
47
47
|
RSS_CONTACT: undefined,
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
},
|
|
50
50
|
authVideoConfig: { active: false },
|
|
51
51
|
}),
|
|
@@ -32,7 +32,7 @@ export const useFilterStore = defineStore("FilterStore", () => {
|
|
|
32
32
|
* ID of the current organisation.
|
|
33
33
|
*/
|
|
34
34
|
const filterOrgaId = computed((): string|undefined => {
|
|
35
|
-
if (route?.query.
|
|
35
|
+
if (route?.query.viewall === "true") {
|
|
36
36
|
return undefined;
|
|
37
37
|
} else if (route?.query.productor) {
|
|
38
38
|
return route.query.productor as string;
|
|
@@ -46,7 +46,7 @@ export const useFilterStore = defineStore("FilterStore", () => {
|
|
|
46
46
|
/**
|
|
47
47
|
* The ID of the current organisation, regardless of other options.
|
|
48
48
|
* Use this if you want to know the organisation of the user even in
|
|
49
|
-
* unfocused mode (ie
|
|
49
|
+
* unfocused mode (ie viewall = true)
|
|
50
50
|
*/
|
|
51
51
|
const realOrgaId = computed(() => {
|
|
52
52
|
return _filterOrgaId.value ?? undefined;
|
|
@@ -22,13 +22,13 @@ export function emptyOrganisationData(): Organisation {
|
|
|
22
22
|
return {
|
|
23
23
|
imageUrl: "",
|
|
24
24
|
id: "",
|
|
25
|
-
name: ""
|
|
25
|
+
name: ""
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
export function emptyOrgaData(defaultName: string): Organisation {
|
|
29
29
|
return {
|
|
30
30
|
imageUrl: "/img/emptypodcast.webp",
|
|
31
31
|
id: "",
|
|
32
|
-
name: defaultName
|
|
32
|
+
name: defaultName
|
|
33
33
|
};
|
|
34
34
|
}
|
package/tsconfig.json
CHANGED
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
"sourceMap": true,
|
|
14
14
|
"baseUrl": ".",
|
|
15
15
|
"types": [
|
|
16
|
-
"webpack-env"
|
|
16
|
+
"webpack-env", "sockjs-client"
|
|
17
|
+
],
|
|
18
|
+
"typeRoots": [
|
|
19
|
+
"./typings",
|
|
20
|
+
"./node_modules/@types/"
|
|
17
21
|
],
|
|
18
22
|
"paths": {
|
|
19
23
|
"@/*": [
|
|
@@ -38,6 +42,6 @@
|
|
|
38
42
|
"node_modules"
|
|
39
43
|
],
|
|
40
44
|
"files": [
|
|
41
|
-
"src/shims-vue.d.ts"
|
|
45
|
+
"src/shims-vue.d.ts"
|
|
42
46
|
]
|
|
43
47
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'sockjs-client/dist/sockjs';
|