@dative-gpi/foundation-shared-components 1.0.128-mountain-alpha → 1.0.128-remove-deprecated-scenario

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/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.128-mountain-alpha",
4
+ "version": "1.0.128-remove-deprecated-scenario",
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.128-mountain-alpha",
14
- "@dative-gpi/foundation-shared-services": "1.0.128-mountain-alpha"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.128-remove-deprecated-scenario",
14
+ "@dative-gpi/foundation-shared-services": "1.0.128-remove-deprecated-scenario"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "37cef6036141cc79839c97f8ffc124c024e5486a"
38
+ "gitHead": "c130943e7cb96800dbd98069299ec689da3c9866"
39
39
  }
@@ -47,7 +47,6 @@
47
47
  @import "fs_option_group.scss";
48
48
  @import "fs_pagination.scss";
49
49
  @import "fs_password_field.scss";
50
- @import "fs_progress_bar.scss";
51
50
  @import "fs_radio.scss";
52
51
  @import "fs_rich_text_field.scss";
53
52
  @import "fs_row.scss";
@@ -1,266 +0,0 @@
1
- <template>
2
- <FSBaseField
3
- :description="$props.description"
4
- :hideHeader="$props.hideHeader"
5
- :required="$props.required"
6
- :editable="$props.editable"
7
- :label="$props.label"
8
- >
9
- <FSRow
10
- align="bottom-center"
11
- gap="32px"
12
- >
13
- <FSTermField
14
- width="430px"
15
- :label="$tr('ui.instant-picker.analyze-period', 'Analyze Period')"
16
- :startDate="$props.startDate"
17
- :endDate="$props.endDate"
18
- @update:startDate="$emit('update:startDate', $event)"
19
- @update:endDate="$emit('update:endDate', $event)"
20
- />
21
- <FSRow
22
- padding="0 0 2px 0"
23
- align="center-center"
24
- >
25
- <FSCol
26
- width="fill"
27
- >
28
- <FSSlider
29
- minWidth='min(300px, 90vw)'
30
- :color="ColorEnum.Light"
31
- :thumbColor="ColorEnum.Primary"
32
- :thumbSize="18"
33
- :trackSize="8"
34
- thumb-label="always"
35
- :step="$props.stepTime"
36
- :min="startTimestamp"
37
- :max="endTimestamp"
38
- :ticks="ticks"
39
- showTicks="always"
40
- :modelValue="$props.modelValue"
41
- @update:modelValue="$emit('update:modelValue', $event)"
42
- >
43
- <template
44
- #thumb-label="{ modelValue }"
45
- >
46
- <FSSpan
47
- font="text-overline"
48
- >
49
- {{ epochToMonthShortTimeFormat(modelValue) }}
50
- </FSSpan>
51
- </template>
52
- <template
53
- #tick-label="{ tick, index }"
54
- >
55
- <FSRow
56
- v-if="index % Math.trunc(ticks.length / maximumTickToShow) === 0 || ticks.length < maximumTickToShow"
57
- >
58
- <FSText
59
- :color="lightColors.dark"
60
- font="text-overline"
61
- >
62
- {{ intervalTime <= 3600000
63
- ?
64
- epochToShortTimeOnlyFormat(tick.value)
65
- :
66
- epochToDayMonthShortOnly(tick.value)
67
- }}
68
- </FSText>
69
- </FSRow>
70
- </template>
71
- </FSSlider>
72
- </FSCol>
73
- <FSPlayButtons
74
- v-if="$props.playable"
75
- :modelValue="playing"
76
- @click:backward="onClickBackward"
77
- @click:forward="onClickForward"
78
- @update:modelValue="onPlayingChange"
79
- />
80
- </FSRow>
81
- </FSRow>
82
- </FSBaseField>
83
- </template>
84
-
85
- <script lang="ts">
86
- import { computed, defineComponent, ref, watch } from "vue";
87
-
88
- import { useDateFormat, useTermFieldDate } from "@dative-gpi/foundation-shared-services/composables";
89
-
90
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
91
- import { useBreakpoints, useColors } from '@dative-gpi/foundation-shared-components/composables';
92
-
93
- import FSCol from '@dative-gpi/foundation-shared-components/components/FSCol.vue';
94
- import FSSpan from '@dative-gpi/foundation-shared-components/components/FSSpan.vue';
95
- import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
96
- import FSSlider from '@dative-gpi/foundation-shared-components/components/FSSlider.vue';
97
- import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
98
- import FSTermField from '@dative-gpi/foundation-shared-components/components/fields/FSTermField.vue';
99
- import FSPlayButtons from '@dative-gpi/foundation-shared-components/components/FSPlayButtons.vue';
100
-
101
- export default defineComponent({
102
- name: "FSInstantPicker",
103
- components: {
104
- FSCol,
105
- FSSpan,
106
- FSText,
107
- FSSlider,
108
- FSTermField,
109
- FSBaseField,
110
- FSPlayButtons
111
- },
112
- props: {
113
- label: {
114
- type: String,
115
- required: false,
116
- },
117
- modelValue: {
118
- type: Number,
119
- required: false,
120
- default: 0,
121
- },
122
- startDate: {
123
- type: String,
124
- required: true
125
- },
126
- endDate: {
127
- type: String,
128
- required: true
129
- },
130
- description: {
131
- type: String,
132
- required: false,
133
- default: null
134
- },
135
- hideHeader: {
136
- type: Boolean,
137
- required: false,
138
- default: false
139
- },
140
- required: {
141
- type: Boolean,
142
- required: false,
143
- default: false
144
- },
145
- editable: {
146
- type: Boolean,
147
- required: false,
148
- default: true
149
- },
150
- playable: {
151
- type: Boolean,
152
- required: false,
153
- default: true
154
- },
155
- stepTime: {
156
- type: Number,
157
- required: false,
158
- default: 60000
159
- },
160
- playingStepDuration: {
161
- type: Number,
162
- required: false,
163
- default: 50
164
- }
165
- },
166
- emits: ['update:modelValue', 'update:startDate', 'update:endDate'],
167
- setup(props, { emit }) {
168
- const { epochToShortTimeOnlyFormat, epochToShortDateFormat, epochToDayMonthShortOnly, epochToISO, epochToMonthShortTimeFormat } = useDateFormat();
169
- const { convert : convertTermToEpoch } = useTermFieldDate();
170
- const { isMobileSized, isExtraSmall } = useBreakpoints();
171
- const { getColors } = useColors();
172
-
173
- const lightColors = getColors(ColorEnum.Light);
174
- const playing = ref(false);
175
- const playingInterval = ref();
176
-
177
- const startTimestamp = computed(() => convertTermToEpoch(props.startDate));
178
- const endTimestamp = computed(() => convertTermToEpoch(props.endDate));
179
-
180
- const intervalTime = computed(() => {
181
- const possibleIntervals = [60000, 3600000, 86400000];
182
-
183
- const interval = possibleIntervals.find(interval => {
184
- return (endTimestamp.value - startTimestamp.value) / interval < 100;
185
- });
186
-
187
- if (interval) {
188
- return interval;
189
- }
190
- return 86400000;
191
- });
192
-
193
- const ticks = computed(() => {
194
- const ticks: number[] = [];
195
-
196
- const firstTick = Math.ceil(startTimestamp.value / intervalTime.value) * intervalTime.value;
197
- for (let i = firstTick; i <= endTimestamp.value; i += intervalTime.value) {
198
- ticks.push(i);
199
- }
200
- return ticks;
201
- });
202
-
203
- const maximumTickToShow = computed(() => {
204
- if (isMobileSized.value) {
205
- return 5;
206
- }
207
- if (isExtraSmall.value) {
208
- return 4;
209
- }
210
- return 6;
211
- });
212
-
213
- const onPlayingChange = (value: boolean) => {
214
- playing.value = value;
215
- };
216
-
217
- const onClickBackward = () => {
218
- emit('update:modelValue', startTimestamp.value);
219
- };
220
-
221
- const onClickForward = () => {
222
- emit('update:modelValue', endTimestamp.value);
223
- };
224
-
225
- watch(() => [props.startDate, props.endDate], () => {
226
- if(props.modelValue < startTimestamp.value || props.modelValue > endTimestamp.value) {
227
- emit('update:modelValue', endTimestamp.value);
228
- }
229
- }, { immediate: true });
230
-
231
- watch(playing, (value) => {
232
- if(!value && playingInterval.value) {
233
- clearInterval(playingInterval.value);
234
- } else {
235
- playingInterval.value = setInterval(() => {
236
- if(props.modelValue + props.stepTime <= endTimestamp.value) {
237
- emit('update:modelValue', props.modelValue + props.stepTime);
238
- } else {
239
- emit('update:modelValue', endTimestamp.value);
240
- playing.value = false;
241
- }
242
- }, props.playingStepDuration);
243
- }
244
- });
245
-
246
- return {
247
- ticks,
248
- playing,
249
- ColorEnum,
250
- lightColors,
251
- intervalTime,
252
- endTimestamp,
253
- startTimestamp,
254
- maximumTickToShow,
255
- epochToISO,
256
- onPlayingChange,
257
- onClickForward,
258
- onClickBackward,
259
- epochToShortDateFormat,
260
- epochToShortTimeOnlyFormat,
261
- epochToDayMonthShortOnly,
262
- epochToMonthShortTimeFormat
263
- };
264
- },
265
- });
266
- </script>
@@ -1,72 +0,0 @@
1
- <template>
2
- <FSRow
3
- width="hug"
4
- gap="4px"
5
- >
6
- <FSClickable
7
- variant="full"
8
- :color="ColorEnum.Light"
9
- borderRadius="50%"
10
- padding="2px"
11
- @click="$emit('click:backward')"
12
- >
13
- <FSIcon
14
- size="18px"
15
- icon="mdi-skip-backward"
16
- />
17
- </FSClickable>
18
- <FSClickable
19
- variant="full"
20
- :color="ColorEnum.Light"
21
- borderRadius="50%"
22
- padding="2px"
23
- @click="$emit('update:modelValue', !$props.modelValue)"
24
- >
25
- <FSIcon
26
- size="18px"
27
- :icon="$props.modelValue ? 'mdi-pause' : 'mdi-play'"
28
- />
29
- </FSClickable>
30
- <FSClickable
31
- variant="full"
32
- :color="ColorEnum.Light"
33
- borderRadius="50%"
34
- padding="2px"
35
- @click="$emit('click:forward')"
36
- >
37
- <FSIcon
38
- size="18px"
39
- icon="mdi-skip-forward"
40
- />
41
- </FSClickable>
42
- </FSRow>
43
- </template>
44
-
45
- <script lang="ts">
46
- import { defineComponent } from "vue";
47
-
48
- import { ColorEnum } from '@dative-gpi/foundation-shared-components/models';
49
-
50
- import FSIcon from '@dative-gpi/foundation-shared-components/components/FSIcon.vue';
51
- import FSClickable from '@dative-gpi/foundation-shared-components/components/FSClickable.vue';
52
-
53
- export default defineComponent({
54
- name: "FSPlayButtons",
55
- components: {
56
- FSClickable,
57
- FSIcon
58
- },
59
- props: {
60
- modelValue: {
61
- type: Boolean,
62
- required: true,
63
- }
64
- },
65
- emits: ['update:modelValue', 'click:backward', 'click:forward'],
66
- setup() {
67
- return {
68
- ColorEnum
69
- };
70
- },
71
- });
72
- </script>
@@ -1,90 +0,0 @@
1
- <template>
2
- <FSRow
3
- align="center-center"
4
- :style="style"
5
- gap="8px"
6
- >
7
- <div
8
- class="fs-progress-bar-gradient"
9
- >
10
- <div></div>
11
- </div>
12
- <FSText
13
- v-if="$props.showValue"
14
- font="text-button"
15
- >
16
- {{ fixedRate }}%
17
- </FSText>
18
- </FSRow>
19
- </template>
20
-
21
- <script lang="ts">
22
- import { computed, defineComponent, type StyleValue } from "vue";
23
-
24
- import { useColors } from '@dative-gpi/foundation-shared-components/composables';
25
-
26
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
27
-
28
- export default defineComponent({
29
- name: "FSProgressBar",
30
- props: {
31
- modelValue: {
32
- type: Number,
33
- required: true
34
- },
35
- startColor: {
36
- type: String,
37
- required: false
38
- },
39
- endColor: {
40
- type: String,
41
- required: false
42
- },
43
- showValue: {
44
- type: Boolean,
45
- required: false,
46
- default: true
47
- }
48
- },
49
- components: {
50
- },
51
- setup(props) {
52
- const { getColors } = useColors();
53
-
54
- const lightColors = getColors(ColorEnum.Light);
55
- const successColors = getColors(ColorEnum.Success);
56
- const errorColors = getColors(ColorEnum.Error);
57
-
58
- const fixedRate = computed(() => {
59
- return (props.modelValue * 100).toFixed(0);
60
- });
61
-
62
- const relativeWidth = computed(() => {
63
- return props.modelValue ? 100 / props.modelValue : 0;
64
- });
65
-
66
- const startColor = computed(() => {
67
- return props.startColor ?? errorColors.base;
68
- });
69
-
70
- const endColor = computed(() => {
71
- return props.endColor ?? successColors.base;
72
- });
73
-
74
- const style = computed((): StyleValue => {
75
- return {
76
- '--progress-bar-background-color': lightColors.dark,
77
- '--progress-bar-gradient-start-color': startColor.value,
78
- '--progress-bar-gradient-end-color': endColor.value,
79
- '--progress-bar-gradient-width': `min(100%, ${fixedRate.value}%)`,
80
- '--progress-bar-total-relative-width': `${relativeWidth.value}%`
81
- };
82
- });
83
-
84
- return {
85
- style,
86
- fixedRate
87
- }
88
- },
89
- });
90
- </script>
@@ -1,14 +0,0 @@
1
- .fs-progress-bar-gradient {
2
- flex: 1;
3
- background-color: var(--progress-bar-background-color);
4
- height: 8px;
5
- border-radius: 4px;
6
-
7
- div {
8
- transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
9
- height: 100%;
10
- background: linear-gradient(to right, var(--progress-bar-gradient-start-color) 0%, var(--progress-bar-gradient-end-color) var(--progress-bar-total-relative-width));
11
- width: var(--progress-bar-gradient-width);
12
- border-radius: 4px;
13
- }
14
- }