@bethinkpl/design-system 34.2.1 → 34.2.2
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/dist/design-system.css +1 -1
- package/dist/design-system.js +2459 -2391
- package/dist/design-system.js.map +1 -1
- package/dist/i18n/en/blockadeStatus.json +4 -0
- package/dist/i18n/en/cardExpandable.json +4 -0
- package/dist/i18n/en/overlayHeader.json +3 -0
- package/dist/i18n/en/survey.json +3 -0
- package/dist/i18n/pl/blockadeStatus.json +4 -0
- package/dist/i18n/pl/cardExpandable.json +4 -0
- package/dist/i18n/pl/overlayHeader.json +3 -0
- package/dist/i18n/pl/survey.json +3 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +9 -5
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +3 -1
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +4 -2
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +12 -6
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +10 -5
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue.d.ts +7 -3
- package/dist/lib/js/i18n/en.d.ts +6 -0
- package/dist/lib/js/i18n/index.d.ts +12 -0
- package/dist/lib/js/i18n/pl.d.ts +6 -0
- package/lib/js/components/Cards/CardExpandable/CardExpandable.stories.ts +2 -2
- package/lib/js/components/Cards/CardExpandable/CardExpandable.vue +19 -3
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +7 -1
- package/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue +8 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.ts +2 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +7 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts +4 -4
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +5 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue +13 -2
- package/lib/js/i18n/en/blockadeStatus.json +4 -0
- package/lib/js/i18n/en/cardExpandable.json +4 -0
- package/lib/js/i18n/en/overlayHeader.json +3 -0
- package/lib/js/i18n/en/survey.json +3 -0
- package/lib/js/i18n/en.ts +8 -0
- package/lib/js/i18n/pl/blockadeStatus.json +4 -0
- package/lib/js/i18n/pl/cardExpandable.json +4 -0
- package/lib/js/i18n/pl/overlayHeader.json +3 -0
- package/lib/js/i18n/pl/survey.json +3 -0
- package/lib/js/i18n/pl.ts +8 -0
- package/package.json +1 -1
|
@@ -9,11 +9,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
9
9
|
};
|
|
10
10
|
expanderTextCollapsed: {
|
|
11
11
|
type: StringConstructor;
|
|
12
|
-
default:
|
|
12
|
+
default: null;
|
|
13
13
|
};
|
|
14
14
|
expanderTextExpanded: {
|
|
15
15
|
type: StringConstructor;
|
|
16
|
-
default:
|
|
16
|
+
default: null;
|
|
17
17
|
};
|
|
18
18
|
headerHasPadding: {
|
|
19
19
|
type: BooleanConstructor;
|
|
@@ -23,7 +23,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
|
-
}>, {
|
|
26
|
+
}>, {
|
|
27
|
+
t: import('../../../i18n').TranslateFunction;
|
|
28
|
+
}, {
|
|
27
29
|
isExpandedInternal: boolean;
|
|
28
30
|
ICONS: Readonly<{
|
|
29
31
|
readonly ANSWERS: VueConstructor<Vue>;
|
|
@@ -305,6 +307,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
305
307
|
XX_LARGE: string;
|
|
306
308
|
}>;
|
|
307
309
|
}, {
|
|
310
|
+
resolvedExpanderTextCollapsed(): string;
|
|
311
|
+
resolvedExpanderTextExpanded(): string;
|
|
308
312
|
chevronRotation(): number | null;
|
|
309
313
|
}, {
|
|
310
314
|
onExpanderClick(): void;
|
|
@@ -321,11 +325,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
321
325
|
};
|
|
322
326
|
expanderTextCollapsed: {
|
|
323
327
|
type: StringConstructor;
|
|
324
|
-
default:
|
|
328
|
+
default: null;
|
|
325
329
|
};
|
|
326
330
|
expanderTextExpanded: {
|
|
327
331
|
type: StringConstructor;
|
|
328
|
-
default:
|
|
332
|
+
default: null;
|
|
329
333
|
};
|
|
330
334
|
headerHasPadding: {
|
|
331
335
|
type: BooleanConstructor;
|
|
@@ -34,7 +34,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
34
34
|
default: () => import('@fortawesome/fontawesome-common-types').IconDefinition;
|
|
35
35
|
validator(icon: unknown): boolean;
|
|
36
36
|
};
|
|
37
|
-
}>, {
|
|
37
|
+
}>, {
|
|
38
|
+
t: import('../../../i18n').TranslateFunction;
|
|
39
|
+
}, {
|
|
38
40
|
ICON_BUTTON_SIZES: Readonly<{
|
|
39
41
|
readonly XX_SMALL: "xx-small";
|
|
40
42
|
readonly X_SMALL: "x-small";
|
|
@@ -3,7 +3,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
|
-
}>, {
|
|
6
|
+
}>, {
|
|
7
|
+
t: import('../../../i18n').TranslateFunction;
|
|
8
|
+
}, {
|
|
7
9
|
ICONS: Readonly<{
|
|
8
10
|
readonly ANSWERS: VueConstructor<Vue>;
|
|
9
11
|
readonly CHANGE: VueConstructor<Vue>;
|
|
@@ -286,7 +288,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
286
288
|
}, {
|
|
287
289
|
icon(): import('@fortawesome/fontawesome-common-types').IconDefinition;
|
|
288
290
|
statusClass(): "" | "-ds-active";
|
|
289
|
-
text():
|
|
291
|
+
text(): any;
|
|
290
292
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
291
293
|
status: {
|
|
292
294
|
type: StringConstructor;
|
|
@@ -11,7 +11,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
11
11
|
};
|
|
12
12
|
placeholder: {
|
|
13
13
|
type: StringConstructor;
|
|
14
|
-
default:
|
|
14
|
+
default: null;
|
|
15
15
|
};
|
|
16
16
|
state: {
|
|
17
17
|
type: StringConstructor;
|
|
@@ -322,7 +322,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
322
322
|
readonly DEFAULT: "default";
|
|
323
323
|
readonly DISABLED: "disabled";
|
|
324
324
|
}>;
|
|
325
|
-
}, {
|
|
325
|
+
}, {
|
|
326
|
+
resolvedPlaceholder(): string;
|
|
327
|
+
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "input"[], "input", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
326
328
|
title: {
|
|
327
329
|
type: StringConstructor;
|
|
328
330
|
required: true;
|
|
@@ -333,7 +335,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
333
335
|
};
|
|
334
336
|
placeholder: {
|
|
335
337
|
type: StringConstructor;
|
|
336
|
-
default:
|
|
338
|
+
default: null;
|
|
337
339
|
};
|
|
338
340
|
state: {
|
|
339
341
|
type: StringConstructor;
|
|
@@ -353,13 +355,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
353
355
|
};
|
|
354
356
|
placeholder: {
|
|
355
357
|
type: StringConstructor;
|
|
356
|
-
default:
|
|
358
|
+
default: null;
|
|
357
359
|
};
|
|
358
360
|
disabled: {
|
|
359
361
|
type: BooleanConstructor;
|
|
360
362
|
default: boolean;
|
|
361
363
|
};
|
|
362
|
-
}>, {
|
|
364
|
+
}>, {
|
|
365
|
+
t: import('../../../i18n').TranslateFunction;
|
|
366
|
+
}, {}, {
|
|
367
|
+
resolvedPlaceholder(): string;
|
|
368
|
+
}, {
|
|
363
369
|
onInput(evt: any): void;
|
|
364
370
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "input"[], "input", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
365
371
|
value: {
|
|
@@ -368,7 +374,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
368
374
|
};
|
|
369
375
|
placeholder: {
|
|
370
376
|
type: StringConstructor;
|
|
371
|
-
default:
|
|
377
|
+
default: null;
|
|
372
378
|
};
|
|
373
379
|
disabled: {
|
|
374
380
|
type: BooleanConstructor;
|
package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
26
26
|
};
|
|
27
27
|
placeholder: {
|
|
28
28
|
type: StringConstructor;
|
|
29
|
-
default:
|
|
29
|
+
default: null;
|
|
30
30
|
};
|
|
31
31
|
selectedValue: {
|
|
32
32
|
type: StringConstructor;
|
|
@@ -359,6 +359,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
359
359
|
readonly TWO: "two";
|
|
360
360
|
}>;
|
|
361
361
|
}, {
|
|
362
|
+
resolvedPlaceholder(): string;
|
|
362
363
|
standaloneOptions(): any;
|
|
363
364
|
}, {
|
|
364
365
|
onToggleClick(value: string): void;
|
|
@@ -387,7 +388,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
387
388
|
};
|
|
388
389
|
placeholder: {
|
|
389
390
|
type: StringConstructor;
|
|
390
|
-
default:
|
|
391
|
+
default: null;
|
|
391
392
|
};
|
|
392
393
|
selectedValue: {
|
|
393
394
|
type: StringConstructor;
|
|
@@ -415,13 +416,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
415
416
|
};
|
|
416
417
|
placeholder: {
|
|
417
418
|
type: StringConstructor;
|
|
418
|
-
default:
|
|
419
|
+
default: null;
|
|
419
420
|
};
|
|
420
421
|
disabled: {
|
|
421
422
|
type: BooleanConstructor;
|
|
422
423
|
default: boolean;
|
|
423
424
|
};
|
|
424
|
-
}>, {
|
|
425
|
+
}>, {
|
|
426
|
+
t: import('../../../i18n').TranslateFunction;
|
|
427
|
+
}, {}, {
|
|
428
|
+
resolvedPlaceholder(): string;
|
|
429
|
+
}, {
|
|
425
430
|
onInput(evt: any): void;
|
|
426
431
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "input"[], "input", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
427
432
|
value: {
|
|
@@ -430,7 +435,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
430
435
|
};
|
|
431
436
|
placeholder: {
|
|
432
437
|
type: StringConstructor;
|
|
433
|
-
default:
|
|
438
|
+
default: null;
|
|
434
439
|
};
|
|
435
440
|
disabled: {
|
|
436
441
|
type: BooleanConstructor;
|
|
@@ -5,13 +5,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
5
5
|
};
|
|
6
6
|
placeholder: {
|
|
7
7
|
type: StringConstructor;
|
|
8
|
-
default:
|
|
8
|
+
default: null;
|
|
9
9
|
};
|
|
10
10
|
disabled: {
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
|
-
}>, {
|
|
14
|
+
}>, {
|
|
15
|
+
t: import('../../i18n').TranslateFunction;
|
|
16
|
+
}, {}, {
|
|
17
|
+
resolvedPlaceholder(): string;
|
|
18
|
+
}, {
|
|
15
19
|
onInput(evt: any): void;
|
|
16
20
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "input"[], "input", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
21
|
value: {
|
|
@@ -20,7 +24,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
24
|
};
|
|
21
25
|
placeholder: {
|
|
22
26
|
type: StringConstructor;
|
|
23
|
-
default:
|
|
27
|
+
default: null;
|
|
24
28
|
};
|
|
25
29
|
disabled: {
|
|
26
30
|
type: BooleanConstructor;
|
package/dist/lib/js/i18n/en.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
"ds.blockadeStatus.active": string;
|
|
3
|
+
"ds.blockadeStatus.ended": string;
|
|
4
|
+
"ds.cardExpandable.collapse": string;
|
|
5
|
+
"ds.cardExpandable.expand": string;
|
|
6
|
+
"ds.overlayHeader.close": string;
|
|
7
|
+
"ds.survey.placeholder": string;
|
|
2
8
|
"ds.datePicker.selectDate": string;
|
|
3
9
|
"ds.datePicker.set": string;
|
|
4
10
|
"ds.statsLayout.default.leftColumnLabel": string;
|
|
@@ -4,6 +4,12 @@ import { default as pl } from './pl';
|
|
|
4
4
|
export type MessageSchema = typeof pl;
|
|
5
5
|
export declare const messages: {
|
|
6
6
|
pl: {
|
|
7
|
+
"ds.blockadeStatus.active": string;
|
|
8
|
+
"ds.blockadeStatus.ended": string;
|
|
9
|
+
"ds.cardExpandable.collapse": string;
|
|
10
|
+
"ds.cardExpandable.expand": string;
|
|
11
|
+
"ds.overlayHeader.close": string;
|
|
12
|
+
"ds.survey.placeholder": string;
|
|
7
13
|
"ds.datePicker.selectDate": string;
|
|
8
14
|
"ds.datePicker.set": string;
|
|
9
15
|
"ds.statsLayout.default.leftColumnLabel": string;
|
|
@@ -26,6 +32,12 @@ export declare const messages: {
|
|
|
26
32
|
"ds.globals.loading": string;
|
|
27
33
|
};
|
|
28
34
|
en: {
|
|
35
|
+
"ds.blockadeStatus.active": string;
|
|
36
|
+
"ds.blockadeStatus.ended": string;
|
|
37
|
+
"ds.cardExpandable.collapse": string;
|
|
38
|
+
"ds.cardExpandable.expand": string;
|
|
39
|
+
"ds.overlayHeader.close": string;
|
|
40
|
+
"ds.survey.placeholder": string;
|
|
29
41
|
"ds.datePicker.selectDate": string;
|
|
30
42
|
"ds.datePicker.set": string;
|
|
31
43
|
"ds.statsLayout.default.leftColumnLabel": string;
|
package/dist/lib/js/i18n/pl.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
"ds.blockadeStatus.active": string;
|
|
3
|
+
"ds.blockadeStatus.ended": string;
|
|
4
|
+
"ds.cardExpandable.collapse": string;
|
|
5
|
+
"ds.cardExpandable.expand": string;
|
|
6
|
+
"ds.overlayHeader.close": string;
|
|
7
|
+
"ds.survey.placeholder": string;
|
|
2
8
|
"ds.datePicker.selectDate": string;
|
|
3
9
|
"ds.datePicker.set": string;
|
|
4
10
|
"ds.statsLayout.default.leftColumnLabel": string;
|
|
@@ -13,8 +13,8 @@ const StoryTemplate: StoryFn<typeof CardExpandable> = (args) => ({
|
|
|
13
13
|
return args;
|
|
14
14
|
},
|
|
15
15
|
template: `
|
|
16
|
-
<card-expandable :is-expander-visible="isExpanderVisible" :expander-text-collapsed="expanderTextCollapsed"
|
|
17
|
-
:expander-text-expanded="expanderTextExpanded" :is-expanded="isExpanded"
|
|
16
|
+
<card-expandable :is-expander-visible="isExpanderVisible" :expander-text-collapsed="expanderTextCollapsed !== '' ? expanderTextCollapsed : null"
|
|
17
|
+
:expander-text-expanded="expanderTextExpanded !== '' ? expanderTextExpanded : null" :is-expanded="isExpanded"
|
|
18
18
|
:header-has-padding="headerHasPadding" :divider-under-header="dividerUnderHeader">
|
|
19
19
|
<template v-if="header" #header>
|
|
20
20
|
<div v-html="header" />
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
<template v-if="isExpanderVisible" #footer>
|
|
17
17
|
<div class="ds-cardExpandable__expander" @click="onExpanderClick">
|
|
18
18
|
<span class="ds-cardExpandable__expanderLabel">
|
|
19
|
-
{{
|
|
19
|
+
{{
|
|
20
|
+
isExpandedInternal
|
|
21
|
+
? resolvedExpanderTextExpanded
|
|
22
|
+
: resolvedExpanderTextCollapsed
|
|
23
|
+
}}
|
|
20
24
|
</span>
|
|
21
25
|
<ds-icon
|
|
22
26
|
class="ds-cardExpandable__expanderIcon"
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
import { defineComponent } from 'vue';
|
|
73
77
|
import DsCard from '../Card/';
|
|
74
78
|
import DsIcon, { ICON_SIZES, ICONS } from '../../../components/Icons/Icon';
|
|
79
|
+
import { useLegacyI18n } from '../../../composables/useLegacyI18n';
|
|
75
80
|
|
|
76
81
|
export default defineComponent({
|
|
77
82
|
name: 'CardExpandable',
|
|
@@ -90,11 +95,11 @@ export default defineComponent({
|
|
|
90
95
|
},
|
|
91
96
|
expanderTextCollapsed: {
|
|
92
97
|
type: String,
|
|
93
|
-
default:
|
|
98
|
+
default: null,
|
|
94
99
|
},
|
|
95
100
|
expanderTextExpanded: {
|
|
96
101
|
type: String,
|
|
97
|
-
default:
|
|
102
|
+
default: null,
|
|
98
103
|
},
|
|
99
104
|
headerHasPadding: {
|
|
100
105
|
type: Boolean,
|
|
@@ -106,6 +111,11 @@ export default defineComponent({
|
|
|
106
111
|
},
|
|
107
112
|
},
|
|
108
113
|
emits: { 'update:isExpanded': (payload: Boolean) => true },
|
|
114
|
+
setup() {
|
|
115
|
+
const { t } = useLegacyI18n();
|
|
116
|
+
|
|
117
|
+
return { t };
|
|
118
|
+
},
|
|
109
119
|
data() {
|
|
110
120
|
return {
|
|
111
121
|
isExpandedInternal: false,
|
|
@@ -114,6 +124,12 @@ export default defineComponent({
|
|
|
114
124
|
};
|
|
115
125
|
},
|
|
116
126
|
computed: {
|
|
127
|
+
resolvedExpanderTextCollapsed(): string {
|
|
128
|
+
return this.expanderTextCollapsed ?? this.t('ds.cardExpandable.expand');
|
|
129
|
+
},
|
|
130
|
+
resolvedExpanderTextExpanded(): string {
|
|
131
|
+
return this.expanderTextExpanded ?? this.t('ds.cardExpandable.collapse');
|
|
132
|
+
},
|
|
117
133
|
chevronRotation(): number | null {
|
|
118
134
|
return this.isExpandedInternal ? 180 : null;
|
|
119
135
|
},
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<ds-tooltip
|
|
105
105
|
:is-pointer-visible="false"
|
|
106
106
|
:placement="TOOLTIP_PLACEMENTS.LEFT"
|
|
107
|
-
text="
|
|
107
|
+
:text="t('ds.overlayHeader.close')"
|
|
108
108
|
>
|
|
109
109
|
<ds-icon-button
|
|
110
110
|
data-test-selector="overlay-header-close-button"
|
|
@@ -320,6 +320,7 @@ import {
|
|
|
320
320
|
} from './OverlayHeader.consts';
|
|
321
321
|
import { Value } from '../../../utils/type.utils';
|
|
322
322
|
import { isElementEditable } from '../../../utils/shortcut-keys';
|
|
323
|
+
import { useLegacyI18n } from '../../../composables/useLegacyI18n';
|
|
323
324
|
import { toRaw } from 'vue';
|
|
324
325
|
|
|
325
326
|
import { defineComponent } from 'vue';
|
|
@@ -369,6 +370,11 @@ export default defineComponent({
|
|
|
369
370
|
close: () => true,
|
|
370
371
|
titleClick: () => true,
|
|
371
372
|
},
|
|
373
|
+
setup() {
|
|
374
|
+
const { t } = useLegacyI18n();
|
|
375
|
+
|
|
376
|
+
return { t };
|
|
377
|
+
},
|
|
372
378
|
data() {
|
|
373
379
|
return {
|
|
374
380
|
ICON_BUTTON_SIZES: Object.freeze(ICON_BUTTON_SIZES),
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
import { defineComponent } from 'vue';
|
|
41
41
|
import Icon, { ICON_SIZES, ICONS } from '../../Icons/Icon';
|
|
42
42
|
import { COURSE_BLOCKADE_ACCESS_STATUS } from '../../../consts/user';
|
|
43
|
+
import { useLegacyI18n } from '../../../composables/useLegacyI18n';
|
|
43
44
|
|
|
44
45
|
export default defineComponent({
|
|
45
46
|
name: 'BlockadeStatus',
|
|
@@ -52,6 +53,11 @@ export default defineComponent({
|
|
|
52
53
|
required: true,
|
|
53
54
|
},
|
|
54
55
|
},
|
|
56
|
+
setup() {
|
|
57
|
+
const { t } = useLegacyI18n();
|
|
58
|
+
|
|
59
|
+
return { t };
|
|
60
|
+
},
|
|
55
61
|
data() {
|
|
56
62
|
return {
|
|
57
63
|
ICONS: Object.freeze(ICONS),
|
|
@@ -73,9 +79,9 @@ export default defineComponent({
|
|
|
73
79
|
},
|
|
74
80
|
text() {
|
|
75
81
|
if (this.status === COURSE_BLOCKADE_ACCESS_STATUS.ACTIVE) {
|
|
76
|
-
return '
|
|
82
|
+
return this.t('ds.blockadeStatus.active');
|
|
77
83
|
}
|
|
78
|
-
return '
|
|
84
|
+
return this.t('ds.blockadeStatus.ended');
|
|
79
85
|
},
|
|
80
86
|
},
|
|
81
87
|
});
|
package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.ts
CHANGED
|
@@ -19,7 +19,7 @@ const StoryTemplate: StoryFn<typeof SurveyQuestionOpenEnded> = (args) => {
|
|
|
19
19
|
},
|
|
20
20
|
// TODO typing in textarea looses focus
|
|
21
21
|
template:
|
|
22
|
-
'<survey-question-open-ended :title="title" :value="value" :state="state" :placeholder="placeholder" @input="explanationUpdate">' +
|
|
22
|
+
'<survey-question-open-ended :title="title" :value="value" :state="state" :placeholder="placeholder !== \'\' ? placeholder: null" @input="explanationUpdate">' +
|
|
23
23
|
'<template v-if="explanation" #explanation><div v-html="explanation" /></template>' +
|
|
24
24
|
'</survey-question-open-ended>',
|
|
25
25
|
methods: {
|
|
@@ -37,7 +37,7 @@ const args = {
|
|
|
37
37
|
value: 'value',
|
|
38
38
|
explanation:
|
|
39
39
|
'<h3 class="modalHeader" style="text-align: center; margin-bottom: 16px;">Jak ocenić, czy slajdy i diagramy były zrozumiałe?</h3><div>Wyczerpujące materiały dają poczucie pełnego zrozumieina, przy jednoczesnym usystematyzowaniu informacji. Wpływa na to nie tylko ich jakość, ale też ilość.</div>',
|
|
40
|
-
placeholder: '
|
|
40
|
+
placeholder: '',
|
|
41
41
|
state: SURVEY_QUESTION_STATES.DEFAULT,
|
|
42
42
|
} as Args;
|
|
43
43
|
|
package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
class="ds-surveyQuestionOpenEnded__input"
|
|
36
36
|
:disabled="state === SURVEY_QUESTION_STATES.DISABLED"
|
|
37
37
|
:value="value"
|
|
38
|
-
:placeholder="
|
|
38
|
+
:placeholder="resolvedPlaceholder"
|
|
39
39
|
@input="$emit('input', $event)"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
@@ -114,7 +114,7 @@ export default defineComponent({
|
|
|
114
114
|
},
|
|
115
115
|
placeholder: {
|
|
116
116
|
type: String,
|
|
117
|
-
default:
|
|
117
|
+
default: null,
|
|
118
118
|
},
|
|
119
119
|
state: {
|
|
120
120
|
type: String,
|
|
@@ -143,5 +143,10 @@ export default defineComponent({
|
|
|
143
143
|
SURVEY_QUESTION_STATES: Object.freeze(SURVEY_QUESTION_STATES),
|
|
144
144
|
};
|
|
145
145
|
},
|
|
146
|
+
computed: {
|
|
147
|
+
resolvedPlaceholder(): string {
|
|
148
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
149
|
+
},
|
|
150
|
+
},
|
|
146
151
|
});
|
|
147
152
|
</script>
|
package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts
CHANGED
|
@@ -19,7 +19,7 @@ const StoryTemplate: StoryFn<typeof SurveyQuestionScale> = (args) => {
|
|
|
19
19
|
return args;
|
|
20
20
|
},
|
|
21
21
|
template:
|
|
22
|
-
'<survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder" :selected-value="selectedValue" :state="state" :containers="containers" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
22
|
+
'<survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder !== \'\' ? placeholder: null" :selected-value="selectedValue" :state="state" :containers="containers" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
23
23
|
'<template v-if="explanation" #explanation><div v-html="explanation" /></template>' +
|
|
24
24
|
'</survey-question-scale>',
|
|
25
25
|
methods: {
|
|
@@ -41,7 +41,7 @@ const args = {
|
|
|
41
41
|
elaborationValue: '',
|
|
42
42
|
explanation:
|
|
43
43
|
'<h3 style="text-align: center; margin-bottom: 16px;">Jak ocenić, czy slajdy i diagramy były zrozumiałe?</h3>\n<div>Wyczerpujące materiały dają poczucie pełnego zrozumienia, przy jednoczesnym usystematyzowaniu informacji. Wpływa na to nie tylko ich jakość, ale też ilość.</div>',
|
|
44
|
-
placeholder: '
|
|
44
|
+
placeholder: '',
|
|
45
45
|
containers: SURVEY_QUESTION_SCALE_CONTAINERS.TWO,
|
|
46
46
|
selectedValue: null,
|
|
47
47
|
scaleOptions: [
|
|
@@ -126,7 +126,7 @@ const StoryLimitedWidthTemplate: StoryFn<typeof SurveyQuestionScale> = (args) =>
|
|
|
126
126
|
return args;
|
|
127
127
|
},
|
|
128
128
|
template:
|
|
129
|
-
'<div style="max-width: 600px"><survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder" :selected-value="selectedValue" :containers="containers" :state="state" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
129
|
+
'<div style="max-width: 600px"><survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder !== \'\' ? placeholder: null" :selected-value="selectedValue" :containers="containers" :state="state" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
130
130
|
'<template v-if="explanation" #explanation><div v-html="explanation" /></template>' +
|
|
131
131
|
'</survey-question-scale></div>',
|
|
132
132
|
methods: {
|
|
@@ -155,7 +155,7 @@ LimitedWidth.args = {
|
|
|
155
155
|
elaborationValue: '',
|
|
156
156
|
explanation:
|
|
157
157
|
'<h3 class="modalHeader" style="text-align: center; margin-bottom: 16px;">Jak ocenić, czy slajdy i diagramy były zrozumiałe?</h3>\n<div>Wyczerpujące materiały dają poczucie pełnego zrozumienia, przy jednoczesnym usystematyzowaniu informacji. Wpływa na to nie tylko ich jakość, ale też ilość.</div>',
|
|
158
|
-
placeholder: '
|
|
158
|
+
placeholder: '',
|
|
159
159
|
containers: SURVEY_QUESTION_SCALE_CONTAINERS.TWO,
|
|
160
160
|
state: SURVEY_QUESTION_STATES.DEFAULT,
|
|
161
161
|
selectedValue: null,
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
:id="inputId"
|
|
106
106
|
:value="elaborationValue"
|
|
107
107
|
class="ds-surveyQuestionScale__elaborationInput"
|
|
108
|
-
:placeholder="
|
|
108
|
+
:placeholder="resolvedPlaceholder"
|
|
109
109
|
:disabled="state === SURVEY_QUESTION_STATES.DISABLED"
|
|
110
110
|
@input="$emit('elaboration-change', $event)"
|
|
111
111
|
/>
|
|
@@ -293,7 +293,7 @@ export default defineComponent({
|
|
|
293
293
|
},
|
|
294
294
|
placeholder: {
|
|
295
295
|
type: String,
|
|
296
|
-
default:
|
|
296
|
+
default: null,
|
|
297
297
|
},
|
|
298
298
|
selectedValue: {
|
|
299
299
|
type: String,
|
|
@@ -331,6 +331,9 @@ export default defineComponent({
|
|
|
331
331
|
};
|
|
332
332
|
},
|
|
333
333
|
computed: {
|
|
334
|
+
resolvedPlaceholder(): string {
|
|
335
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
336
|
+
},
|
|
334
337
|
standaloneOptions() {
|
|
335
338
|
return this.scaleOptions.filter(
|
|
336
339
|
(option: SurveyQuestionScaleOption) => option.standalone,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="textarea"
|
|
4
4
|
class="ds-surveyQuestionTextarea"
|
|
5
5
|
:disabled="disabled"
|
|
6
|
-
:placeholder="
|
|
6
|
+
:placeholder="resolvedPlaceholder"
|
|
7
7
|
:value="value"
|
|
8
8
|
@input="onInput"
|
|
9
9
|
/>
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
37
|
import { defineComponent } from 'vue';
|
|
38
|
+
import { useLegacyI18n } from '../../composables/useLegacyI18n';
|
|
38
39
|
|
|
39
40
|
export default defineComponent({
|
|
40
41
|
name: 'SurveyQuestionTextarea',
|
|
@@ -45,7 +46,7 @@ export default defineComponent({
|
|
|
45
46
|
},
|
|
46
47
|
placeholder: {
|
|
47
48
|
type: String,
|
|
48
|
-
default:
|
|
49
|
+
default: null,
|
|
49
50
|
},
|
|
50
51
|
disabled: {
|
|
51
52
|
type: Boolean,
|
|
@@ -55,6 +56,16 @@ export default defineComponent({
|
|
|
55
56
|
// TODO fix me when touching this file
|
|
56
57
|
// eslint-disable-next-line vue/require-emit-validator
|
|
57
58
|
emits: ['input'],
|
|
59
|
+
setup() {
|
|
60
|
+
const { t } = useLegacyI18n();
|
|
61
|
+
|
|
62
|
+
return { t };
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
resolvedPlaceholder(): string {
|
|
66
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
67
|
+
},
|
|
68
|
+
},
|
|
58
69
|
watch: {
|
|
59
70
|
value() {
|
|
60
71
|
// we want to update height of textarea based on content that is inside
|
package/lib/js/i18n/en.ts
CHANGED
|
@@ -3,6 +3,10 @@ import accessStatus from './en/accessStatus.json';
|
|
|
3
3
|
import pagination from './en/pagination.json';
|
|
4
4
|
import statsLayout from './en/statsLayout.json';
|
|
5
5
|
import datePicker from './en/datePicker.json';
|
|
6
|
+
import survey from './en/survey.json';
|
|
7
|
+
import overlayHeader from './en/overlayHeader.json';
|
|
8
|
+
import cardExpandable from './en/cardExpandable.json';
|
|
9
|
+
import blockadeStatus from './en/blockadeStatus.json';
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
...globals,
|
|
@@ -10,4 +14,8 @@ export default {
|
|
|
10
14
|
...pagination,
|
|
11
15
|
...statsLayout,
|
|
12
16
|
...datePicker,
|
|
17
|
+
...survey,
|
|
18
|
+
...overlayHeader,
|
|
19
|
+
...cardExpandable,
|
|
20
|
+
...blockadeStatus,
|
|
13
21
|
};
|