@dative-gpi/foundation-shared-components 0.0.50 → 0.0.52
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/FSAccordion.vue +3 -3
- package/components/FSAccordionPanel.vue +5 -5
- package/components/FSBadge.vue +1 -1
- package/components/FSBreadcrumbs.vue +1 -1
- package/components/FSButton.vue +5 -5
- package/components/FSCalendar.vue +19 -9
- package/components/FSCalendarTwin.vue +13 -9
- package/components/FSCard.vue +11 -2
- package/components/FSCarousel.vue +1 -1
- package/components/FSCheckbox.vue +4 -4
- package/components/FSChip.vue +4 -4
- package/components/FSClickable.vue +1 -1
- package/components/FSClock.vue +38 -46
- package/components/FSCol.vue +1 -1
- package/components/FSColor.vue +9 -7
- package/components/FSColorIcon.vue +1 -1
- package/components/FSDivider.vue +2 -2
- package/components/FSEditImage.vue +13 -11
- package/components/FSErrorToast.vue +1 -1
- package/components/FSFadeOut.vue +1 -1
- package/components/FSForm.vue +4 -4
- package/components/FSGrid.vue +1 -1
- package/components/FSImage.vue +13 -14
- package/components/FSLabel.vue +2 -2
- package/components/FSLink.vue +2 -2
- package/components/FSLoader.vue +1 -1
- package/components/FSOptionGroup.vue +3 -3
- package/components/FSOptionItem.vue +4 -4
- package/components/FSPagination.vue +1 -1
- package/components/FSRadio.vue +4 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRow.vue +1 -1
- package/components/FSSlideGroup.vue +11 -11
- package/components/FSSlider.vue +4 -4
- package/components/FSSpan.vue +2 -2
- package/components/FSSubmitDialog.vue +8 -8
- package/components/FSSwitch.vue +4 -4
- package/components/FSTab.vue +4 -4
- package/components/FSTabs.vue +2 -2
- package/components/FSTag.vue +2 -2
- package/components/FSText.vue +2 -2
- package/components/FSToggleSet.vue +4 -4
- package/components/FSWindow.vue +1 -1
- package/components/FSWrapGroup.vue +2 -2
- package/components/buttons/FSButtonFile.vue +18 -12
- package/components/buttons/FSButtonFileIcon.vue +18 -12
- package/components/buttons/FSButtonFileLabel.vue +19 -13
- package/components/buttons/FSButtonFileMini.vue +19 -13
- package/components/deviceOrganisations/FSStatusesCarousel.vue +2 -3
- package/components/deviceOrganisations/FSStatusesRow.vue +2 -3
- package/components/fields/FSAutocompleteField.vue +5 -5
- package/components/fields/FSColorField.vue +3 -3
- package/components/fields/FSDateField.vue +8 -7
- package/components/fields/FSDateRangeField.vue +6 -6
- package/components/fields/FSDateTimeField.vue +14 -12
- package/components/fields/FSDateTimeRangeField.vue +10 -12
- package/components/fields/FSIconField.vue +10 -10
- package/components/fields/FSNumberField.vue +2 -2
- package/components/fields/FSPasswordField.vue +4 -4
- package/components/fields/FSRichTextField.vue +82 -92
- package/components/fields/FSSearchField.vue +8 -8
- package/components/fields/FSSelectField.vue +6 -6
- package/components/fields/FSTagField.vue +4 -4
- package/components/fields/FSTextArea.vue +5 -5
- package/components/fields/FSTextField.vue +5 -5
- package/components/fields/FSTimeField.vue +15 -9
- package/components/fields/FSTimeSlotField.vue +49 -21
- package/components/lists/FSDataTableUI.vue +1 -1
- package/components/lists/FSDraggable.vue +12 -6
- package/components/lists/FSFilterButton.vue +11 -8
- package/components/lists/FSLoadDataTable.vue +1 -1
- package/components/selects/FSSelectTimeZone.vue +2 -2
- package/components/tiles/FSDeviceOrganisationTileUI.vue +3 -3
- package/components/tiles/FSGroupTileUI.vue +3 -3
- package/components/tiles/FSLoadTile.vue +1 -1
- package/components/tiles/FSTile.vue +1 -1
- package/composables/index.ts +0 -1
- package/composables/useRules.ts +1 -1
- package/models/colors.ts +1 -1
- package/models/deviceStatuses.ts +1 -1
- package/package.json +4 -4
- package/styles/components/fs_clock.scss +3 -2
- package/styles/globals/overrides.scss +1 -1
- package/composables/useFiles.ts +0 -13
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script lang="ts">
|
|
27
|
-
import { computed, defineComponent, ref } from "vue";
|
|
27
|
+
import { computed, defineComponent, PropType, ref } from "vue";
|
|
28
28
|
|
|
29
29
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
30
30
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -40,7 +40,7 @@ export default defineComponent({
|
|
|
40
40
|
},
|
|
41
41
|
props: {
|
|
42
42
|
modelValue: {
|
|
43
|
-
type: String
|
|
43
|
+
type: String as PropType<string | null>,
|
|
44
44
|
required: false,
|
|
45
45
|
default: null
|
|
46
46
|
},
|
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
|
|
60
60
|
const stars = ref(true);
|
|
61
61
|
|
|
62
|
-
const style = computed((): {[
|
|
62
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
63
63
|
if (!props.editable) {
|
|
64
64
|
return {
|
|
65
65
|
"--fs-password-field-cursor" : "default",
|
|
@@ -74,7 +74,7 @@ export default defineComponent({
|
|
|
74
74
|
};
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
const type = computed(():
|
|
77
|
+
const type = computed((): "password" | "text" => stars.value ? "password" : "text");
|
|
78
78
|
|
|
79
79
|
const icon = computed((): string => stars.value ? "mdi-eye-off-outline" : "mdi-eye-outline");
|
|
80
80
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
class="fs-rich-text-field-icon"
|
|
30
30
|
:color="toolbarColors.undo"
|
|
31
31
|
:style="style"
|
|
32
|
-
@click="editor.dispatchCommand(UNDO_COMMAND)"
|
|
32
|
+
@click="editor.dispatchCommand(UNDO_COMMAND, undefined)"
|
|
33
33
|
>
|
|
34
34
|
mdi-undo-variant
|
|
35
35
|
</FSIcon>
|
|
@@ -186,17 +186,17 @@ export default defineComponent({
|
|
|
186
186
|
},
|
|
187
187
|
props: {
|
|
188
188
|
label: {
|
|
189
|
-
type: String
|
|
189
|
+
type: String as PropType<string | null>,
|
|
190
190
|
required: false,
|
|
191
191
|
default: null
|
|
192
192
|
},
|
|
193
193
|
description: {
|
|
194
|
-
type: String
|
|
194
|
+
type: String as PropType<string | null>,
|
|
195
195
|
required: false,
|
|
196
196
|
default: null
|
|
197
197
|
},
|
|
198
198
|
modelValue: {
|
|
199
|
-
type: String
|
|
199
|
+
type: String as PropType<string | null>,
|
|
200
200
|
required: false,
|
|
201
201
|
default: null
|
|
202
202
|
},
|
|
@@ -284,7 +284,7 @@ export default defineComponent({
|
|
|
284
284
|
|
|
285
285
|
if (props.modelValue != null) {
|
|
286
286
|
editor.update((): void => {
|
|
287
|
-
editor.setEditorState(editor.parseEditorState(props.modelValue));
|
|
287
|
+
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
else {
|
|
@@ -298,7 +298,7 @@ export default defineComponent({
|
|
|
298
298
|
return ["readonly"].includes(props.variant);
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
const style = computed((): {[
|
|
301
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
302
302
|
let minHeight: string | undefined = "auto";
|
|
303
303
|
if (!readonly.value) {
|
|
304
304
|
const base = isMobileSized.value ? 30 : 42;
|
|
@@ -440,106 +440,96 @@ export default defineComponent({
|
|
|
440
440
|
const selection = $getSelection();
|
|
441
441
|
$setSelection(null);
|
|
442
442
|
|
|
443
|
-
|
|
443
|
+
if (selection != null) {
|
|
444
|
+
const nodes = selection.extract();
|
|
444
445
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
parent.
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
parent.remove();
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
else {
|
|
462
|
-
if (nodes.length === 1) {
|
|
463
|
-
const firstNode = nodes[0];
|
|
464
|
-
const linkNode = getAncestor(firstNode, $isLinkNode);
|
|
465
|
-
|
|
466
|
-
if (linkNode !== null) {
|
|
467
|
-
linkNode.setURL(linkUrl.value);
|
|
468
|
-
if (target !== undefined) {
|
|
469
|
-
linkNode.setTarget(target);
|
|
470
|
-
}
|
|
471
|
-
if (rel !== null) {
|
|
472
|
-
linkNode.setRel(rel);
|
|
473
|
-
}
|
|
474
|
-
if (title !== undefined) {
|
|
475
|
-
linkNode.setTitle(title);
|
|
446
|
+
if (linkUrl.value === null) {
|
|
447
|
+
// Remove LinkNodes
|
|
448
|
+
nodes.forEach((node) => {
|
|
449
|
+
const parent = node.getParent();
|
|
450
|
+
if ($isLinkNode(parent)) {
|
|
451
|
+
const children = parent.getChildren();
|
|
452
|
+
for (let i = 0; i < children.length; i++) {
|
|
453
|
+
parent.insertBefore(children[i]);
|
|
454
|
+
}
|
|
455
|
+
parent.remove();
|
|
476
456
|
}
|
|
477
|
-
|
|
478
|
-
}
|
|
457
|
+
});
|
|
479
458
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
if (rel !== null) {
|
|
498
|
-
linkNode.setRel(rel);
|
|
499
|
-
}
|
|
500
|
-
if (title !== undefined) {
|
|
501
|
-
linkNode.setTitle(title);
|
|
459
|
+
else {
|
|
460
|
+
if (nodes.length === 1) {
|
|
461
|
+
const firstNode = nodes[0];
|
|
462
|
+
const linkNode = getAncestor(firstNode, $isLinkNode);
|
|
463
|
+
if (linkNode !== null) {
|
|
464
|
+
linkNode.setURL(linkUrl.value);
|
|
465
|
+
if (target !== undefined) {
|
|
466
|
+
linkNode.setTarget(target);
|
|
467
|
+
}
|
|
468
|
+
if (rel !== null) {
|
|
469
|
+
linkNode.setRel(rel);
|
|
470
|
+
}
|
|
471
|
+
if (title !== undefined) {
|
|
472
|
+
linkNode.setTitle(title);
|
|
473
|
+
}
|
|
474
|
+
return;
|
|
502
475
|
}
|
|
503
|
-
return;
|
|
504
476
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
477
|
+
let prevParent: ElementNode | LinkNode | null = null;
|
|
478
|
+
let linkNode: LinkNode | null = null;
|
|
479
|
+
nodes.forEach((node) => {
|
|
480
|
+
const parent = node.getParent();
|
|
481
|
+
if ( parent === linkNode || parent === null || ($isElementNode(node) && !node.isInline())) {
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
510
484
|
if ($isLinkNode(parent)) {
|
|
511
|
-
|
|
512
|
-
|
|
485
|
+
linkNode = parent;
|
|
486
|
+
parent.setURL(linkUrl.value);
|
|
487
|
+
if (target !== undefined) {
|
|
488
|
+
parent.setTarget(target);
|
|
513
489
|
}
|
|
514
|
-
|
|
515
|
-
|
|
490
|
+
if (rel !== null) {
|
|
491
|
+
linkNode.setRel(rel);
|
|
492
|
+
}
|
|
493
|
+
if (title !== undefined) {
|
|
494
|
+
linkNode.setTitle(title);
|
|
516
495
|
}
|
|
496
|
+
return;
|
|
517
497
|
}
|
|
518
|
-
|
|
519
|
-
|
|
498
|
+
if (!parent.is(prevParent)) {
|
|
499
|
+
prevParent = parent;
|
|
500
|
+
linkNode = $createLinkNode(linkUrl.value, {rel, target, title});
|
|
501
|
+
|
|
502
|
+
if ($isLinkNode(parent)) {
|
|
503
|
+
if (node.getPreviousSibling() === null) {
|
|
504
|
+
parent.insertBefore(linkNode);
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
parent.insertAfter(linkNode);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
node.insertBefore(linkNode);
|
|
512
|
+
}
|
|
520
513
|
}
|
|
521
|
-
|
|
514
|
+
if ($isLinkNode(node)) {
|
|
515
|
+
if (node.is(linkNode)) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
if (linkNode !== null) {
|
|
519
|
+
const children = node.getChildren();
|
|
522
520
|
|
|
523
|
-
|
|
524
|
-
|
|
521
|
+
for (let i = 0; i < children.length; i++) {
|
|
522
|
+
linkNode.append(children[i]);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
node.remove();
|
|
525
526
|
return;
|
|
526
527
|
}
|
|
527
528
|
if (linkNode !== null) {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
for (let i = 0; i < children.length; i++) {
|
|
531
|
-
linkNode.append(children[i]);
|
|
532
|
-
}
|
|
529
|
+
linkNode.append(node);
|
|
533
530
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
if (linkNode !== null) {
|
|
540
|
-
linkNode.append(node);
|
|
541
|
-
}
|
|
542
|
-
});
|
|
531
|
+
});
|
|
532
|
+
}
|
|
543
533
|
}
|
|
544
534
|
});
|
|
545
535
|
isLink.value = false;
|
|
@@ -549,7 +539,7 @@ export default defineComponent({
|
|
|
549
539
|
if (JSON.stringify(editor.getEditorState().toJSON()) != props.modelValue) {
|
|
550
540
|
if (props.modelValue != null) {
|
|
551
541
|
editor.update(() => {
|
|
552
|
-
editor.setEditorState(editor.parseEditorState(props.modelValue));
|
|
542
|
+
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
553
543
|
});
|
|
554
544
|
}
|
|
555
545
|
else if (JSON.stringify(editor.getEditorState().toJSON()) !== emptyState) {
|
|
@@ -58,22 +58,22 @@ export default defineComponent({
|
|
|
58
58
|
},
|
|
59
59
|
props: {
|
|
60
60
|
label: {
|
|
61
|
-
type: String
|
|
61
|
+
type: String as PropType<string | null>,
|
|
62
62
|
required: false,
|
|
63
63
|
default: null
|
|
64
64
|
},
|
|
65
65
|
description: {
|
|
66
|
-
type: String
|
|
66
|
+
type: String as PropType<string | null>,
|
|
67
67
|
required: false,
|
|
68
68
|
default: null
|
|
69
69
|
},
|
|
70
70
|
placeholder: {
|
|
71
|
-
type: String
|
|
71
|
+
type: String as PropType<string | null>,
|
|
72
72
|
required: false,
|
|
73
73
|
default: null
|
|
74
74
|
},
|
|
75
75
|
prependInnerIcon: {
|
|
76
|
-
type: String
|
|
76
|
+
type: String as PropType<string | null>,
|
|
77
77
|
required: false,
|
|
78
78
|
default: "mdi-magnify"
|
|
79
79
|
},
|
|
@@ -83,17 +83,17 @@ export default defineComponent({
|
|
|
83
83
|
default: "instant"
|
|
84
84
|
},
|
|
85
85
|
buttonPrependIcon: {
|
|
86
|
-
type: String
|
|
86
|
+
type: String as PropType<string | null>,
|
|
87
87
|
required: false,
|
|
88
88
|
default: null
|
|
89
89
|
},
|
|
90
90
|
buttonLabel: {
|
|
91
|
-
type: String
|
|
91
|
+
type: String as PropType<string | null>,
|
|
92
92
|
required: false,
|
|
93
93
|
default: null
|
|
94
94
|
},
|
|
95
95
|
buttonAppendIcon: {
|
|
96
|
-
type: String
|
|
96
|
+
type: String as PropType<string | null>,
|
|
97
97
|
required: false,
|
|
98
98
|
default: null
|
|
99
99
|
},
|
|
@@ -103,7 +103,7 @@ export default defineComponent({
|
|
|
103
103
|
default: "standard"
|
|
104
104
|
},
|
|
105
105
|
modelValue: {
|
|
106
|
-
type: String
|
|
106
|
+
type: String as PropType<string | null>,
|
|
107
107
|
required: false,
|
|
108
108
|
default: null
|
|
109
109
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
:itemTitle="$props.itemTitle"
|
|
43
43
|
:itemValue="$props.itemValue"
|
|
44
44
|
:readonly="!$props.editable"
|
|
45
|
-
:clearable="$props.editable &&
|
|
45
|
+
:clearable="$props.editable && !!$props.modelValue"
|
|
46
46
|
:returnObject="$props.returnObject"
|
|
47
47
|
:rules="$props.rules"
|
|
48
48
|
:validateOn="validateOn"
|
|
@@ -87,12 +87,12 @@ export default defineComponent({
|
|
|
87
87
|
},
|
|
88
88
|
props: {
|
|
89
89
|
label: {
|
|
90
|
-
type: String
|
|
90
|
+
type: String as PropType<string | null>,
|
|
91
91
|
required: false,
|
|
92
92
|
default: null
|
|
93
93
|
},
|
|
94
94
|
description: {
|
|
95
|
-
type: String
|
|
95
|
+
type: String as PropType<string | null>,
|
|
96
96
|
required: false,
|
|
97
97
|
default: null
|
|
98
98
|
},
|
|
@@ -111,7 +111,7 @@ export default defineComponent({
|
|
|
111
111
|
default: "label"
|
|
112
112
|
},
|
|
113
113
|
modelValue: {
|
|
114
|
-
type: [Array, String, Number] as PropType<(string | number)[] | string | number>,
|
|
114
|
+
type: [Array, String, Number] as PropType<(string | number)[] | string | number | null>,
|
|
115
115
|
required: false,
|
|
116
116
|
default: null
|
|
117
117
|
},
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
default: false
|
|
132
132
|
},
|
|
133
133
|
rules: {
|
|
134
|
-
type: Array as PropType<
|
|
134
|
+
type: Array as PropType<any[]>,
|
|
135
135
|
required: false,
|
|
136
136
|
default: () => []
|
|
137
137
|
},
|
|
@@ -159,7 +159,7 @@ export default defineComponent({
|
|
|
159
159
|
const lights = getColors(ColorEnum.Light);
|
|
160
160
|
const darks = getColors(ColorEnum.Dark);
|
|
161
161
|
|
|
162
|
-
const style = computed((): {[
|
|
162
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
163
163
|
if (!props.editable) {
|
|
164
164
|
return {
|
|
165
165
|
"--fs-select-field-cursor" : "default",
|
|
@@ -65,12 +65,12 @@ export default defineComponent({
|
|
|
65
65
|
},
|
|
66
66
|
props: {
|
|
67
67
|
label: {
|
|
68
|
-
type: String
|
|
68
|
+
type: String as PropType<string | null>,
|
|
69
69
|
required: false,
|
|
70
70
|
default: null
|
|
71
71
|
},
|
|
72
72
|
description: {
|
|
73
|
-
type: String
|
|
73
|
+
type: String as PropType<string | null>,
|
|
74
74
|
required: false,
|
|
75
75
|
default: null
|
|
76
76
|
},
|
|
@@ -100,7 +100,7 @@ export default defineComponent({
|
|
|
100
100
|
default: false
|
|
101
101
|
},
|
|
102
102
|
rules: {
|
|
103
|
-
type: Array as PropType<
|
|
103
|
+
type: Array as PropType<any[]>,
|
|
104
104
|
required: false,
|
|
105
105
|
default: () => []
|
|
106
106
|
},
|
|
@@ -121,7 +121,7 @@ export default defineComponent({
|
|
|
121
121
|
|
|
122
122
|
const innerValue = ref("");
|
|
123
123
|
|
|
124
|
-
const style = computed((): {[
|
|
124
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
125
125
|
if (!props.editable) {
|
|
126
126
|
return {
|
|
127
127
|
"--fs-tag-field-color": lights.dark
|
|
@@ -87,17 +87,17 @@ export default defineComponent({
|
|
|
87
87
|
},
|
|
88
88
|
props: {
|
|
89
89
|
label: {
|
|
90
|
-
type: String
|
|
90
|
+
type: String as PropType<string | null>,
|
|
91
91
|
required: false,
|
|
92
92
|
default: null
|
|
93
93
|
},
|
|
94
94
|
description: {
|
|
95
|
-
type: String
|
|
95
|
+
type: String as PropType<string | null>,
|
|
96
96
|
required: false,
|
|
97
97
|
default: null
|
|
98
98
|
},
|
|
99
99
|
modelValue: {
|
|
100
|
-
type: String
|
|
100
|
+
type: String as PropType<string | null>,
|
|
101
101
|
required: false,
|
|
102
102
|
default: null
|
|
103
103
|
},
|
|
@@ -127,7 +127,7 @@ export default defineComponent({
|
|
|
127
127
|
default: false
|
|
128
128
|
},
|
|
129
129
|
rules: {
|
|
130
|
-
type: Array as PropType<
|
|
130
|
+
type: Array as PropType<any[]>,
|
|
131
131
|
required: false,
|
|
132
132
|
default: () => []
|
|
133
133
|
},
|
|
@@ -152,7 +152,7 @@ export default defineComponent({
|
|
|
152
152
|
const lights = getColors(ColorEnum.Light);
|
|
153
153
|
const darks = getColors(ColorEnum.Dark);
|
|
154
154
|
|
|
155
|
-
const style = computed((): {[
|
|
155
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
156
156
|
let height: string | undefined = undefined;
|
|
157
157
|
let minHeight: string | undefined = undefined;
|
|
158
158
|
if (!props.autoGrow) {
|
|
@@ -86,12 +86,12 @@ export default defineComponent({
|
|
|
86
86
|
},
|
|
87
87
|
props: {
|
|
88
88
|
label: {
|
|
89
|
-
type: String
|
|
89
|
+
type: String as PropType<string | null>,
|
|
90
90
|
required: false,
|
|
91
91
|
default: null
|
|
92
92
|
},
|
|
93
93
|
description: {
|
|
94
|
-
type: String
|
|
94
|
+
type: String as PropType<string | null>,
|
|
95
95
|
required: false,
|
|
96
96
|
default: null
|
|
97
97
|
},
|
|
@@ -101,7 +101,7 @@ export default defineComponent({
|
|
|
101
101
|
default: "text"
|
|
102
102
|
},
|
|
103
103
|
modelValue: {
|
|
104
|
-
type: String
|
|
104
|
+
type: String as PropType<string | null>,
|
|
105
105
|
required: false,
|
|
106
106
|
default: null
|
|
107
107
|
},
|
|
@@ -116,7 +116,7 @@ export default defineComponent({
|
|
|
116
116
|
default: false
|
|
117
117
|
},
|
|
118
118
|
rules: {
|
|
119
|
-
type: Array as PropType<
|
|
119
|
+
type: Array as PropType<any[]>,
|
|
120
120
|
required: false,
|
|
121
121
|
default: () => []
|
|
122
122
|
},
|
|
@@ -144,7 +144,7 @@ export default defineComponent({
|
|
|
144
144
|
const lights = getColors(ColorEnum.Light);
|
|
145
145
|
const darks = getColors(ColorEnum.Dark);
|
|
146
146
|
|
|
147
|
-
const style = computed((): {[
|
|
147
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
148
148
|
if (!props.editable) {
|
|
149
149
|
return {
|
|
150
150
|
"--fs-text-field-cursor" : "default",
|
|
@@ -94,17 +94,17 @@ export default defineComponent({
|
|
|
94
94
|
},
|
|
95
95
|
props: {
|
|
96
96
|
label: {
|
|
97
|
-
type: String
|
|
97
|
+
type: String as PropType<string | null>,
|
|
98
98
|
required: false,
|
|
99
99
|
default: null
|
|
100
100
|
},
|
|
101
101
|
description: {
|
|
102
|
-
type: String
|
|
102
|
+
type: String as PropType<string | null>,
|
|
103
103
|
required: false,
|
|
104
104
|
default: null
|
|
105
105
|
},
|
|
106
106
|
modelValue: {
|
|
107
|
-
type: Number
|
|
107
|
+
type: Number as PropType<number | null>,
|
|
108
108
|
required: false,
|
|
109
109
|
default: null
|
|
110
110
|
},
|
|
@@ -119,7 +119,7 @@ export default defineComponent({
|
|
|
119
119
|
default: false
|
|
120
120
|
},
|
|
121
121
|
rules: {
|
|
122
|
-
type: Array as PropType<
|
|
122
|
+
type: Array as PropType<any[]>,
|
|
123
123
|
required: false,
|
|
124
124
|
default: () => []
|
|
125
125
|
},
|
|
@@ -147,15 +147,20 @@ export default defineComponent({
|
|
|
147
147
|
const lights = getColors(ColorEnum.Light);
|
|
148
148
|
const darks = getColors(ColorEnum.Dark);
|
|
149
149
|
|
|
150
|
-
const innerTime = ref(
|
|
150
|
+
const innerTime = ref(0);
|
|
151
151
|
const selectedUnit = ref(timeScale[0]);
|
|
152
152
|
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
if (props.modelValue) {
|
|
154
|
+
if (getTimeScaleIndex(props.modelValue) !== 0) {
|
|
155
|
+
selectedUnit.value = timeScale[getTimeScaleIndex(props.modelValue)];
|
|
156
|
+
innerTime.value = props.modelValue / selectedUnit.value.id;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
innerTime.value = props.modelValue;
|
|
160
|
+
}
|
|
156
161
|
}
|
|
157
162
|
|
|
158
|
-
const style = computed((): {[
|
|
163
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
159
164
|
if (!props.editable) {
|
|
160
165
|
return {
|
|
161
166
|
"--fs-time-field-cursor" : "default",
|
|
@@ -193,6 +198,7 @@ export default defineComponent({
|
|
|
193
198
|
timeScale,
|
|
194
199
|
messages,
|
|
195
200
|
blurred,
|
|
201
|
+
slots,
|
|
196
202
|
style,
|
|
197
203
|
onSubmitTimeScale,
|
|
198
204
|
onSubmitValue
|