Skip to content

Commit 1ecbd7f

Browse files
Merge pull request #54 from webdevnerdstuff/dev
Dev
2 parents 9dcf605 + 7c732dc commit 1ecbd7f

16 files changed

+76
-16
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class="px-7"
1616
style="max-width: 1368px;"
1717
>
18-
<DocsPage :codeBlockOptions="codeBlockSettings" />
18+
<DocsPage />
1919
</v-container>
2020
</v-main>
2121
</v-app>

src/documentation/components/ExampleContainer.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
</template>
114114

115115
<script setup lang="ts">
116+
defineOptions({ inheritAttrs: false });
116117
const emit = defineEmits(['closePicker']);
117118
118119
export interface ExampleCode {

src/documentation/components/examples/ButtonsFieldExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ import {
154154
} from 'yup';
155155
import AnswersDialog from '../AnswersDialog.vue';
156156
157+
interface Props {
158+
open?: HTMLPreElement | null;
159+
}
160+
161+
defineProps<Props>();
157162
158163
const emit = defineEmits(['codeUpdated']);
159164

src/documentation/components/examples/ColumnsExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<script setup lang="ts">
2121
import AnswersDialog from '../AnswersDialog.vue';
2222
23+
interface Props {
24+
open?: HTMLPreElement | null;
25+
}
26+
27+
defineProps<Props>();
2328
2429
const links = inject<Docs.Links>('links')!;
2530
const dialog = ref(false);

src/documentation/components/examples/ConditionalFieldExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
import { ref } from 'vue';
1616
import AnswersDialog from '../AnswersDialog.vue';
1717
18+
interface Props {
19+
open?: HTMLPreElement | null;
20+
}
21+
22+
defineProps<Props>();
1823
1924
const dialog = ref(false);
2025
const formAnswers = ref({

src/documentation/components/examples/ConditionalPageExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
import { ref } from 'vue';
1616
import AnswersDialog from '../AnswersDialog.vue';
1717
18+
interface Props {
19+
open?: HTMLPreElement | null;
20+
}
21+
22+
defineProps<Props>();
1823
1924
const dialog = ref(false);
2025
const answers = ref({

src/documentation/components/examples/DynamicAnswersQuestionsExample.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import type { MaybeRef } from 'vue';
1717
import AnswersDialog from '../AnswersDialog.vue';
1818
1919
20+
interface Props {
21+
open?: HTMLPreElement | null;
22+
}
23+
24+
defineProps<Props>();
25+
2026
const dialog = ref(false);
2127
const answers = ref<{
2228
foobar: string | null;

src/documentation/components/examples/FieldSlotExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
import { ref } from 'vue';
5050
import AnswersDialog from '../AnswersDialog.vue';
5151
52+
interface Props {
53+
open?: HTMLPreElement | null;
54+
}
55+
56+
defineProps<Props>();
5257
5358
const dialog = ref(false);
5459

src/documentation/components/examples/SimpleExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
import { ref } from 'vue';
1616
import AnswersDialog from '../AnswersDialog.vue';
1717
18+
interface Props {
19+
open?: HTMLPreElement | null;
20+
}
21+
22+
defineProps<Props>();
1823
1924
const dialog = ref(false);
2025
const answers = ref({

src/documentation/components/examples/SummaryPageExample.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
import { ref } from 'vue';
2020
import AnswersDialog from '../AnswersDialog.vue';
2121
22+
interface Props {
23+
open?: HTMLPreElement | null;
24+
}
25+
26+
defineProps<Props>();
2227
2328
const dialog = ref(false);
2429
const answers = ref({

src/documentation/components/examples/TemplateExample.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ import {
1414
string as yupString,
1515
} from 'yup';
1616
17+
18+
interface Props {
19+
open?: HTMLPreElement | null;
20+
}
21+
22+
defineProps<Props>();
23+
1724
const answers = ref({
1825
bar: null,
1926
foo: null,

src/documentation/components/examples/TooltipExample.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ import { ref } from 'vue';
2020
import AnswersDialog from '../AnswersDialog.vue';
2121
2222
23+
interface Props {
24+
open?: HTMLPreElement | null;
25+
}
26+
27+
defineProps<Props>();
28+
2329
const dialog = ref(false);
2430
const answers = ref({
2531
address: '123 Street',

src/documentation/components/examples/ValidationExample.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ import {
2020
} from 'yup';
2121
import AnswersDialog from '../AnswersDialog.vue';
2222
23+
24+
interface Props {
25+
open?: HTMLPreElement | null;
26+
}
27+
28+
defineProps<Props>();
29+
2330
const dialog = ref(false);
2431
2532
const answers = ref({

src/documentation/sections/ExampleSection.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
<ExampleContainer
1717
:code="getTemplateCode('SimpleExampleRef')"
18-
:codeBlockSettings="codeBlockSettings"
1918
@closePicker="closePicker('SimpleExampleRef');"
2019
>
2120
<Example.SimpleExample
@@ -26,7 +25,6 @@
2625

2726
<ExampleContainer
2827
:code="getTemplateCode('ColumnsExampleRef')"
29-
:codeBlockSettings="codeBlockSettings"
3028
@closePicker="closePicker('ColumnsExampleRef');"
3129
>
3230
<Example.ColumnsExample
@@ -37,7 +35,6 @@
3735

3836
<ExampleContainer
3937
:code="getTemplateCode('FieldSlotExampleRef')"
40-
:codeBlockSettings="codeBlockSettings"
4138
@closePicker="closePicker('FieldSlotExampleRef');"
4239
>
4340
<Example.FieldSlotExample
@@ -49,7 +46,6 @@
4946
<ExampleContainer
5047
id="validation-example"
5148
:code="getTemplateCode('ValidationExampleRef')"
52-
:codeBlockSettings="codeBlockSettings"
5349
@closePicker="closePicker('ValidationExampleRef');"
5450
>
5551
<Example.ValidationExample
@@ -60,7 +56,6 @@
6056

6157
<ExampleContainer
6258
:code="getTemplateCode('ButtonsFieldExampleRef')"
63-
:codeBlockSettings="codeBlockSettings"
6459
:codeUpdatedAt="ButtonsFieldExampleCode?.updatedAt"
6560
:updatedCode="ButtonsFieldExampleCode?.updatedCode"
6661
@closePicker="closePicker('ButtonsFieldExampleRef');"
@@ -74,7 +69,6 @@
7469

7570
<ExampleContainer
7671
:code="getTemplateCode('SummaryPageExampleRef')"
77-
:codeBlockSettings="codeBlockSettings"
7872
@closePicker="closePicker('SummaryPageExampleRef');"
7973
>
8074
<Example.SummaryPageExample
@@ -85,7 +79,6 @@
8579

8680
<ExampleContainer
8781
:code="getTemplateCode('TooltipExampleRef')"
88-
:codeBlockSettings="codeBlockSettings"
8982
@closePicker="closePicker('TooltipExampleRef');"
9083
>
9184
<Example.TooltipExample
@@ -96,7 +89,6 @@
9689

9790
<ExampleContainer
9891
:code="getTemplateCode('ConditionalPageExampleRef')"
99-
:codeBlockSettings="codeBlockSettings"
10092
@closePicker="closePicker('ConditionalPageExampleRef');"
10193
>
10294
<Example.ConditionalPageExample
@@ -107,7 +99,6 @@
10799

108100
<ExampleContainer
109101
:code="getTemplateCode('ConditionalFieldExampleRef')"
110-
:codeBlockSettings="codeBlockSettings"
111102
@closePicker="closePicker('ConditionalFieldExampleRef');"
112103
>
113104
<Example.ConditionalFieldExample
@@ -118,7 +109,6 @@
118109

119110
<ExampleContainer
120111
:code="getTemplateCode('DynamicAnswersQuestionsExampleRef')"
121-
:codeBlockSettings="codeBlockSettings"
122112
@closePicker="closePicker('DynamicAnswersQuestionsExampleRef');"
123113
>
124114
<Example.DynamicAnswersQuestionsExample
@@ -134,8 +124,6 @@ import type { ExampleCode } from '../components/ExampleContainer.vue';
134124
import ExampleContainer from '../components/ExampleContainer.vue';
135125
import * as Example from '../components/examples';
136126
137-
138-
const codeBlockSettings = inject<Docs.CodeBlockSettings>('codeBlockSettings')!;
139127
const classes = inject<Docs.GlobalClasses>('classes')!;
140128
141129
const SimpleExampleRef = ref(null);

src/plugin/components/fields/VSFButtonField/VSFButtonField.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const getIcon = (option: Option, prop: string): string => {
210210
};
211211
212212
213-
function getId(option: { id?: string; }, key: string | number) {
213+
function getId(option: { id?: string | number; }, key: string | number) {
214214
if (option.id != null) {
215215
return option.id;
216216
}
@@ -317,7 +317,17 @@ const isActive = (val: string | number): boolean | undefined => {
317317
return undefined;
318318
}
319319
320-
return value.value === val || (value.value as string[]).includes(val as string);
320+
// If value.value is a number, compare directly.
321+
if (typeof value.value === 'number') {
322+
return value.value === val;
323+
}
324+
325+
// If value.value is a string or an array of strings, handle both cases.
326+
if (typeof value.value === 'string' || Array.isArray(value.value)) {
327+
return (value.value as string[]).includes(val as string);
328+
}
329+
330+
return undefined;
321331
};
322332
323333
// ------------------------- Variants //

src/plugin/components/shared/FieldLabel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script lang="ts" setup>
1212
export interface FieldLabelProps {
1313
label: string | undefined;
14-
required: boolean | undefined;
14+
required?: boolean | undefined;
1515
}
1616
1717
const { label, required = false } = defineProps<FieldLabelProps>();

0 commit comments

Comments
 (0)