@edgedev/create-edge-app 1.1.25 → 1.1.27
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/README.md +55 -20
- package/{agent.md → agents.md} +2 -0
- package/bin/cli.js +6 -6
- package/edge/components/auth/login.vue +384 -0
- package/edge/components/auth/register.vue +396 -0
- package/edge/components/auth.vue +108 -0
- package/edge/components/autoFileUpload.vue +215 -0
- package/edge/components/billing.vue +8 -0
- package/edge/components/buttonDivider.vue +14 -0
- package/edge/components/chip.vue +34 -0
- package/edge/components/clipboardButton.vue +42 -0
- package/edge/components/cms/block.vue +529 -0
- package/edge/components/cms/blockApi.vue +212 -0
- package/edge/components/cms/blockEditor.vue +725 -0
- package/edge/components/cms/blockInput.vue +66 -0
- package/edge/components/cms/blockPicker.vue +486 -0
- package/edge/components/cms/blockRender.vue +78 -0
- package/edge/components/cms/blockSheetContent.vue +28 -0
- package/edge/components/cms/codeEditor.vue +466 -0
- package/edge/components/cms/fontUpload.vue +327 -0
- package/edge/components/cms/htmlContent.vue +807 -0
- package/edge/components/cms/init_blocks/api_with_subarrays.html +17 -0
- package/edge/components/cms/init_blocks/array_with_collection.html +7 -0
- package/edge/components/cms/init_blocks/array_with_objects.html +7 -0
- package/edge/components/cms/init_blocks/carousel.html +103 -0
- package/edge/components/cms/init_blocks/contact_us.html +69 -0
- package/edge/components/cms/init_blocks/content_with_left_image.html +27 -0
- package/edge/components/cms/init_blocks/footer.html +24 -0
- package/edge/components/cms/init_blocks/header_divider.html +7 -0
- package/edge/components/cms/init_blocks/hero.html +35 -0
- package/edge/components/cms/init_blocks/hero_carousel.html +52 -0
- package/edge/components/cms/init_blocks/newsletter.html +117 -0
- package/edge/components/cms/init_blocks/post_content.html +7 -0
- package/edge/components/cms/init_blocks/post_title_header.html +21 -0
- package/edge/components/cms/init_blocks/posts_list.html +20 -0
- package/edge/components/cms/init_blocks/properties_showcase.html +100 -0
- package/edge/components/cms/init_blocks/property_carousel.html +59 -0
- package/edge/components/cms/init_blocks/property_detail.html +112 -0
- package/edge/components/cms/init_blocks/property_detail_header.html +34 -0
- package/edge/components/cms/init_blocks/property_results.html +137 -0
- package/edge/components/cms/init_blocks/property_search.html +75 -0
- package/edge/components/cms/init_blocks/simple_array.html +7 -0
- package/edge/components/cms/mediaCard.vue +116 -0
- package/edge/components/cms/mediaManager.vue +386 -0
- package/edge/components/cms/menu.vue +1103 -0
- package/edge/components/cms/optionsSelect.vue +107 -0
- package/edge/components/cms/page.vue +1785 -0
- package/edge/components/cms/posts.vue +1083 -0
- package/edge/components/cms/site.vue +1475 -0
- package/edge/components/cms/themeDefaultMenu.vue +548 -0
- package/edge/components/cms/themeEditor.vue +429 -0
- package/edge/components/dashboard.vue +776 -0
- package/edge/components/editor.vue +671 -0
- package/edge/components/fileTree.vue +72 -0
- package/edge/components/files.vue +89 -0
- package/edge/components/formSubtypes/myOrgs.vue +214 -0
- package/edge/components/formSubtypes/users.vue +336 -0
- package/edge/components/functionChips.vue +57 -0
- package/edge/components/gError.vue +98 -0
- package/edge/components/gHelper.vue +67 -0
- package/edge/components/gInput.vue +1331 -0
- package/edge/components/loggingIn.vue +41 -0
- package/edge/components/menu.vue +137 -0
- package/edge/components/menuContent.vue +132 -0
- package/edge/components/myAccount.vue +317 -0
- package/edge/components/myOrganizations.vue +75 -0
- package/edge/components/myProfile.vue +122 -0
- package/edge/components/orgSwitcher.vue +25 -0
- package/edge/components/organizationMembers.vue +522 -0
- package/edge/components/organizationSettings.vue +271 -0
- package/edge/components/shad/breadcrumbs.vue +35 -0
- package/edge/components/shad/button.vue +43 -0
- package/edge/components/shad/checkbox.vue +73 -0
- package/edge/components/shad/combobox.vue +238 -0
- package/edge/components/shad/datepicker.vue +184 -0
- package/edge/components/shad/dialog.vue +32 -0
- package/edge/components/shad/dropdownMenu.vue +54 -0
- package/edge/components/shad/dropdownMenuItem.vue +21 -0
- package/edge/components/shad/form.vue +59 -0
- package/edge/components/shad/html.vue +877 -0
- package/edge/components/shad/input.vue +139 -0
- package/edge/components/shad/number.vue +109 -0
- package/edge/components/shad/select.vue +151 -0
- package/edge/components/shad/selectTags.vue +278 -0
- package/edge/components/shad/switch.vue +67 -0
- package/edge/components/shad/tags.vue +137 -0
- package/edge/components/shad/textarea.vue +102 -0
- package/edge/components/shad/typeMoney.vue +167 -0
- package/edge/components/sideBar.vue +288 -0
- package/edge/components/sideBarContent.vue +268 -0
- package/edge/components/sidebarProvider.vue +33 -0
- package/edge/components/tooltip.vue +16 -0
- package/edge/components/userMenu.vue +148 -0
- package/edge/components/v/alert.vue +59 -0
- package/edge/components/v/alertTitle.vue +18 -0
- package/edge/components/v/card.vue +53 -0
- package/edge/components/v/cardActions.vue +18 -0
- package/edge/components/v/cardText.vue +18 -0
- package/edge/components/v/cardTitle.vue +20 -0
- package/edge/components/v/col.vue +56 -0
- package/edge/components/v/list.vue +46 -0
- package/edge/components/v/listItem.vue +26 -0
- package/edge/components/v/listItemTitle.vue +18 -0
- package/edge/components/v/row.vue +42 -0
- package/edge/components/v/toolbar.vue +24 -0
- package/edge/composables/global.ts +519 -0
- package/edge-pull.sh +2 -0
- package/edge-push.sh +1 -0
- package/edge-status.sh +14 -0
- package/package.json +1 -1
- package/edge-components-install.sh +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from '@vueuse/core'
|
|
3
|
+
import { CalendarDate, parseDate } from '@internationalized/date'
|
|
4
|
+
import { Calendar as CalendarIcon } from 'lucide-vue-next'
|
|
5
|
+
import { onMounted, ref, watch } from 'vue'
|
|
6
|
+
import { useField } from 'vee-validate'
|
|
7
|
+
import {
|
|
8
|
+
FormControl,
|
|
9
|
+
FormDescription,
|
|
10
|
+
FormField,
|
|
11
|
+
FormItem,
|
|
12
|
+
FormLabel,
|
|
13
|
+
FormMessage,
|
|
14
|
+
} from '@/components/ui/form'
|
|
15
|
+
import { Button } from '@/components/ui/button'
|
|
16
|
+
import { cn } from '@/lib/utils'
|
|
17
|
+
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
|
18
|
+
import { Calendar } from '@/components/ui/calendar'
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false,
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
description: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: [String, Array],
|
|
36
|
+
required: false,
|
|
37
|
+
default: undefined,
|
|
38
|
+
},
|
|
39
|
+
multiple: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
minValue: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false,
|
|
47
|
+
default: '1900-01-01',
|
|
48
|
+
},
|
|
49
|
+
maxValue: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false,
|
|
52
|
+
default: '2099-01-14',
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const emits = defineEmits(['update:modelValue'])
|
|
57
|
+
|
|
58
|
+
const getCalendarDate = (dateString) => {
|
|
59
|
+
if (!dateString)
|
|
60
|
+
return null // Handle cases where the date string is not provided
|
|
61
|
+
const [year, month, day] = dateString.split('-').map(Number)
|
|
62
|
+
return new CalendarDate(year, month, day)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
66
|
+
passive: false,
|
|
67
|
+
prop: 'modelValue',
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const { setValue } = useField(props.name)
|
|
71
|
+
|
|
72
|
+
const value = ref(props.multiple ? [] : null)
|
|
73
|
+
|
|
74
|
+
const formatDate = (dates) => {
|
|
75
|
+
const pad = num => String(num).padStart(2, '0')
|
|
76
|
+
|
|
77
|
+
if (Array.isArray(dates)) {
|
|
78
|
+
return dates
|
|
79
|
+
.map(date => `${date.year}-${pad(date.month)}-${pad(date.day)}`)
|
|
80
|
+
.join(', ')
|
|
81
|
+
}
|
|
82
|
+
else if (dates) {
|
|
83
|
+
return `${dates.year}-${pad(dates.month)}-${pad(dates.day)}`
|
|
84
|
+
}
|
|
85
|
+
return ''
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
watch(() => value.value, (newValue) => {
|
|
89
|
+
if (props.multiple && Array.isArray(newValue)) {
|
|
90
|
+
// Sort dates in ascending order
|
|
91
|
+
newValue.sort((a, b) => {
|
|
92
|
+
const dateA = new Date(a.year, a.month - 1, a.day)
|
|
93
|
+
const dateB = new Date(b.year, b.month - 1, b.day)
|
|
94
|
+
return dateA - dateB
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
modelValue.value = props.multiple
|
|
99
|
+
? newValue.map(date => formatDate(date))
|
|
100
|
+
: formatDate(newValue)
|
|
101
|
+
setValue(
|
|
102
|
+
props.multiple
|
|
103
|
+
? newValue.map(date => `${date.year}-${date.month}-${date.day}`).join(', ')
|
|
104
|
+
: `${newValue?.year}-${newValue?.month}-${newValue?.day}`,
|
|
105
|
+
)
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
const placeholder = ref()
|
|
109
|
+
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
if (props.multiple) {
|
|
112
|
+
if (Array.isArray(props.modelValue) && props.modelValue.length > 0) {
|
|
113
|
+
value.value = props.modelValue.map(date => parseDate(date))
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
value.value = [] // Set to an empty array if modelValue is empty or invalid
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
if (typeof props.modelValue === 'string' && props.modelValue.trim() !== '') {
|
|
121
|
+
value.value = parseDate(props.modelValue)
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
value.value = null // Set to null if modelValue is empty or invalid
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<template>
|
|
131
|
+
<FormField :name="props.name">
|
|
132
|
+
<FormItem class="flex flex-col space-y-1">
|
|
133
|
+
<FormLabel>{{ props.label }}</FormLabel>
|
|
134
|
+
<Popover>
|
|
135
|
+
<PopoverTrigger as-child>
|
|
136
|
+
<FormControl>
|
|
137
|
+
<Button
|
|
138
|
+
:class="cn(
|
|
139
|
+
'w-full border border-solid ps-3 text-start font-normal items-start h-auto', // Added 'items-start'
|
|
140
|
+
(!value || (Array.isArray(value) && value.length === 0)) && 'text-muted-foreground',
|
|
141
|
+
)"
|
|
142
|
+
>
|
|
143
|
+
<div class="flex flex-wrap gap-1 overflow-hidden">
|
|
144
|
+
<template v-if="Array.isArray(value)">
|
|
145
|
+
<edge-chip v-for="date in value" :key="date" class="mr-1">
|
|
146
|
+
{{ date }}
|
|
147
|
+
</edge-chip>
|
|
148
|
+
</template>
|
|
149
|
+
<span v-else-if="value">
|
|
150
|
+
{{ value }}
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
<CalendarIcon class="ms-auto h-4 w-4 opacity-50" />
|
|
154
|
+
</Button>
|
|
155
|
+
<input hidden>
|
|
156
|
+
</FormControl>
|
|
157
|
+
</PopoverTrigger>
|
|
158
|
+
<PopoverContent class="w-auto p-0">
|
|
159
|
+
<Calendar
|
|
160
|
+
v-model:placeholder="placeholder"
|
|
161
|
+
v-model="value"
|
|
162
|
+
:multiple="props.multiple"
|
|
163
|
+
:calendar-label="props.label"
|
|
164
|
+
initial-focus
|
|
165
|
+
:min-value="getCalendarDate(props.minValue)"
|
|
166
|
+
:max-value="getCalendarDate(props.maxValue)"
|
|
167
|
+
/>
|
|
168
|
+
</PopoverContent>
|
|
169
|
+
</Popover>
|
|
170
|
+
<FormDescription>
|
|
171
|
+
{{ props.description }}
|
|
172
|
+
</FormDescription>
|
|
173
|
+
<FormMessage />
|
|
174
|
+
</FormItem>
|
|
175
|
+
</FormField>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
178
|
+
<style lang="scss" scoped>
|
|
179
|
+
.PopoverContent {
|
|
180
|
+
width: 100vw;
|
|
181
|
+
max-height: var(--radix-popover-content-available-height);
|
|
182
|
+
}
|
|
183
|
+
</style>
|
|
184
|
+
,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from '@vueuse/core'
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
required: false,
|
|
7
|
+
},
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const emits = defineEmits(['update:modelValue'])
|
|
11
|
+
|
|
12
|
+
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
13
|
+
passive: true,
|
|
14
|
+
defaultValue: props.defaultValue,
|
|
15
|
+
})
|
|
16
|
+
const setOpen = (value) => {
|
|
17
|
+
modelValue.value = value
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<Dialog
|
|
23
|
+
v-if="modelValue"
|
|
24
|
+
:open="modelValue"
|
|
25
|
+
@update:open="setOpen"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</Dialog>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Usage:
|
|
2
|
+
<edge-shad-dropdown-menu :items="[{ label: 'Hello', items: [{ title: 'Hello there', shortcut: '+L' }] }]">
|
|
3
|
+
<template #trigger>
|
|
4
|
+
<Button variant="outline" class="">
|
|
5
|
+
test
|
|
6
|
+
</Button>
|
|
7
|
+
</template>
|
|
8
|
+
<template #item="itemProps">
|
|
9
|
+
<edge-shad-dropdown-menu-item :item="itemProps.item" @click="console.log(itemProps.item)" />
|
|
10
|
+
</template>
|
|
11
|
+
</edge-shad-dropdown-menu> -->
|
|
12
|
+
<script setup>
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
class: {
|
|
15
|
+
type: null,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
items: {
|
|
19
|
+
type: Array,
|
|
20
|
+
required: false,
|
|
21
|
+
default: () => [],
|
|
22
|
+
},
|
|
23
|
+
variant: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false,
|
|
26
|
+
default: 'filled',
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<DropdownMenu>
|
|
33
|
+
<DropdownMenuTrigger as-child>
|
|
34
|
+
<slot name="trigger" />
|
|
35
|
+
</DropdownMenuTrigger>
|
|
36
|
+
<DropdownMenuContent class="w-56">
|
|
37
|
+
<template v-for="(group, key) in props.items" :key="key">
|
|
38
|
+
<DropdownMenuLabel>
|
|
39
|
+
{{ group.label }}
|
|
40
|
+
</DropdownMenuLabel>
|
|
41
|
+
<DropdownMenuSeparator />
|
|
42
|
+
<DropdownMenuGroup>
|
|
43
|
+
<template v-for="(item, key2) in group.items" :key="key2">
|
|
44
|
+
<slot name="item" :item="item" />
|
|
45
|
+
</template>
|
|
46
|
+
</DropdownMenuGroup>
|
|
47
|
+
</template>
|
|
48
|
+
</DropdownMenuContent>
|
|
49
|
+
</DropdownMenu>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<style lang="scss" scoped>
|
|
53
|
+
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
item: {
|
|
4
|
+
type: Object,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DropdownMenuItem class="cursor-pointer">
|
|
12
|
+
<span>{{ props.item.title }}</span>
|
|
13
|
+
<DropdownMenuShortcut v-if="props.item.shortcut">
|
|
14
|
+
{{ props.item.shorcut }}
|
|
15
|
+
</DropdownMenuShortcut>
|
|
16
|
+
</DropdownMenuItem>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
|
+
|
|
21
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useForm } from 'vee-validate'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
schema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: false,
|
|
8
|
+
default: () => ({}),
|
|
9
|
+
},
|
|
10
|
+
initialValues: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({}),
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits(['submit', 'error'])
|
|
17
|
+
|
|
18
|
+
const { schema, initialValues } = toRefs(props)
|
|
19
|
+
|
|
20
|
+
const form = useForm({
|
|
21
|
+
validationSchema: schema,
|
|
22
|
+
initialValues: initialValues.value,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const onSubmit = form.handleSubmit(
|
|
26
|
+
async (values) => {
|
|
27
|
+
emit('submit', values)
|
|
28
|
+
},
|
|
29
|
+
(errors) => {
|
|
30
|
+
if (errors.errors.length !== 0) {
|
|
31
|
+
console.log(errors)
|
|
32
|
+
emit('error', errors)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
// Expose form methods for parent components
|
|
38
|
+
defineExpose({
|
|
39
|
+
// submission
|
|
40
|
+
handleSubmit: form.handleSubmit,
|
|
41
|
+
// value setters
|
|
42
|
+
setValues: form.setValues,
|
|
43
|
+
setFieldValue: form.setFieldValue,
|
|
44
|
+
// validation helpers
|
|
45
|
+
validate: form.validate,
|
|
46
|
+
validateField: form.validateField,
|
|
47
|
+
// state accessors
|
|
48
|
+
values: form.values,
|
|
49
|
+
errors: form.errors,
|
|
50
|
+
// utils
|
|
51
|
+
resetForm: form.resetForm,
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<form @submit.prevent="onSubmit">
|
|
57
|
+
<slot />
|
|
58
|
+
</form>
|
|
59
|
+
</template>
|