@dative-gpi/foundation-shared-components 1.0.55 → 1.0.56
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/components/FSImage.vue
CHANGED
|
@@ -12,7 +12,7 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
12
12
|
|
|
13
13
|
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
14
14
|
|
|
15
|
-
import { useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
15
|
+
import { useAppAuthToken, useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
16
16
|
|
|
17
17
|
import FSImageUI from "./FSImageUI.vue";
|
|
18
18
|
|
|
@@ -30,9 +30,10 @@ export default defineComponent({
|
|
|
30
30
|
},
|
|
31
31
|
setup(props) {
|
|
32
32
|
const { get: getImage, entity: image } = useImage();
|
|
33
|
+
const { authToken } = useAppAuthToken();
|
|
33
34
|
|
|
34
35
|
const source = computed(() => {
|
|
35
|
-
return props.imageId ? IMAGE_RAW_URL(props.imageId) : null;
|
|
36
|
+
return props.imageId ? IMAGE_RAW_URL(props.imageId, authToken.value) : null;
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
const onError = (): void => {
|
|
@@ -179,8 +179,14 @@
|
|
|
179
179
|
</FSIcon>
|
|
180
180
|
</template>
|
|
181
181
|
</FSRow>
|
|
182
|
+
<FSText
|
|
183
|
+
v-if="readonly && !$props.modelValue && $props.emptyLabel"
|
|
184
|
+
variant="soft"
|
|
185
|
+
>
|
|
186
|
+
{{ $props.emptyLabel }}
|
|
187
|
+
</FSText>
|
|
182
188
|
<div
|
|
183
|
-
class="
|
|
189
|
+
:class="classes"
|
|
184
190
|
:style="style"
|
|
185
191
|
>
|
|
186
192
|
<div
|
|
@@ -237,6 +243,7 @@ import FSAutoCompleteField from "./FSAutocompleteField.vue";
|
|
|
237
243
|
import FSTextField from "./FSTextField.vue";
|
|
238
244
|
import FSIcon from "../FSIcon.vue";
|
|
239
245
|
import FSCard from "../FSCard.vue";
|
|
246
|
+
import FSText from "../FSText.vue";
|
|
240
247
|
import FSCol from "../FSCol.vue";
|
|
241
248
|
import FSRow from "../FSRow.vue";
|
|
242
249
|
|
|
@@ -245,6 +252,7 @@ export default defineComponent({
|
|
|
245
252
|
components: {
|
|
246
253
|
FSAutoCompleteField,
|
|
247
254
|
FSTextField,
|
|
255
|
+
FSText,
|
|
248
256
|
FSIcon,
|
|
249
257
|
FSCard,
|
|
250
258
|
FSCol,
|
|
@@ -261,6 +269,11 @@ export default defineComponent({
|
|
|
261
269
|
required: false,
|
|
262
270
|
default: null
|
|
263
271
|
},
|
|
272
|
+
emptyLabel: {
|
|
273
|
+
type: String as PropType<string | null>,
|
|
274
|
+
required: false,
|
|
275
|
+
default: null
|
|
276
|
+
},
|
|
264
277
|
modelValue: {
|
|
265
278
|
type: String as PropType<string | null>,
|
|
266
279
|
required: false,
|
|
@@ -350,6 +363,10 @@ export default defineComponent({
|
|
|
350
363
|
onError: console.error
|
|
351
364
|
}
|
|
352
365
|
|
|
366
|
+
const isEmpty = computed((): boolean => {
|
|
367
|
+
return editor.getEditorState().isEmpty();
|
|
368
|
+
});
|
|
369
|
+
|
|
353
370
|
const editor = createEditor(config);
|
|
354
371
|
|
|
355
372
|
onMounted((): void => {
|
|
@@ -423,6 +440,14 @@ export default defineComponent({
|
|
|
423
440
|
}
|
|
424
441
|
});
|
|
425
442
|
|
|
443
|
+
const classes = computed((): string[] => {
|
|
444
|
+
const innerClasses = ["fs-rich-text-field"];
|
|
445
|
+
if (!readonly.value) {
|
|
446
|
+
innerClasses.push("fs-rich-text-field-readonly");
|
|
447
|
+
}
|
|
448
|
+
return innerClasses;
|
|
449
|
+
});
|
|
450
|
+
|
|
426
451
|
const toolbarColors = computed((): { [code: string]: string } => {
|
|
427
452
|
if (props.editable) {
|
|
428
453
|
return {
|
|
@@ -655,8 +680,11 @@ export default defineComponent({
|
|
|
655
680
|
toolbarColors,
|
|
656
681
|
menuVariable,
|
|
657
682
|
UNDO_COMMAND,
|
|
683
|
+
ColorEnum,
|
|
658
684
|
readonly,
|
|
659
685
|
linkUrl,
|
|
686
|
+
classes,
|
|
687
|
+
isEmpty,
|
|
660
688
|
editor,
|
|
661
689
|
isLink,
|
|
662
690
|
style,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.56",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.56",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.56"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c77d95e9a7724fa4a39d94b0b2bd0fa9d4fbdefc"
|
|
39
39
|
}
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
&:focus-within {
|
|
26
26
|
border-color: var(--fs-rich-text-field-active-border-color) !important;
|
|
27
27
|
}
|
|
28
|
+
}
|
|
28
29
|
|
|
30
|
+
.fs-rich-text-field-readonly {
|
|
29
31
|
@include web {
|
|
30
32
|
padding: 10px 12px !important;
|
|
31
33
|
}
|
|
@@ -33,7 +35,6 @@
|
|
|
33
35
|
@include mobile {
|
|
34
36
|
padding: 6px 16px !important;
|
|
35
37
|
}
|
|
36
|
-
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.fs-rich-text-field-undo {
|