@edgedev/create-edge-app 1.1.25 → 1.1.26

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.
Files changed (111) hide show
  1. package/README.md +55 -20
  2. package/{agent.md → agents.md} +2 -0
  3. package/bin/cli.js +6 -6
  4. package/edge/components/auth/login.vue +384 -0
  5. package/edge/components/auth/register.vue +396 -0
  6. package/edge/components/auth.vue +108 -0
  7. package/edge/components/autoFileUpload.vue +215 -0
  8. package/edge/components/billing.vue +8 -0
  9. package/edge/components/buttonDivider.vue +14 -0
  10. package/edge/components/chip.vue +34 -0
  11. package/edge/components/clipboardButton.vue +42 -0
  12. package/edge/components/cms/block.vue +529 -0
  13. package/edge/components/cms/blockApi.vue +212 -0
  14. package/edge/components/cms/blockEditor.vue +725 -0
  15. package/edge/components/cms/blockInput.vue +66 -0
  16. package/edge/components/cms/blockPicker.vue +486 -0
  17. package/edge/components/cms/blockRender.vue +78 -0
  18. package/edge/components/cms/blockSheetContent.vue +28 -0
  19. package/edge/components/cms/codeEditor.vue +466 -0
  20. package/edge/components/cms/fontUpload.vue +327 -0
  21. package/edge/components/cms/htmlContent.vue +807 -0
  22. package/edge/components/cms/init_blocks/api_with_subarrays.html +17 -0
  23. package/edge/components/cms/init_blocks/array_with_collection.html +7 -0
  24. package/edge/components/cms/init_blocks/array_with_objects.html +7 -0
  25. package/edge/components/cms/init_blocks/carousel.html +103 -0
  26. package/edge/components/cms/init_blocks/contact_us.html +69 -0
  27. package/edge/components/cms/init_blocks/content_with_left_image.html +27 -0
  28. package/edge/components/cms/init_blocks/footer.html +24 -0
  29. package/edge/components/cms/init_blocks/header_divider.html +7 -0
  30. package/edge/components/cms/init_blocks/hero.html +35 -0
  31. package/edge/components/cms/init_blocks/hero_carousel.html +52 -0
  32. package/edge/components/cms/init_blocks/newsletter.html +117 -0
  33. package/edge/components/cms/init_blocks/post_content.html +7 -0
  34. package/edge/components/cms/init_blocks/post_title_header.html +21 -0
  35. package/edge/components/cms/init_blocks/posts_list.html +20 -0
  36. package/edge/components/cms/init_blocks/properties_showcase.html +100 -0
  37. package/edge/components/cms/init_blocks/property_carousel.html +59 -0
  38. package/edge/components/cms/init_blocks/property_detail.html +112 -0
  39. package/edge/components/cms/init_blocks/property_detail_header.html +34 -0
  40. package/edge/components/cms/init_blocks/property_results.html +137 -0
  41. package/edge/components/cms/init_blocks/property_search.html +75 -0
  42. package/edge/components/cms/init_blocks/simple_array.html +7 -0
  43. package/edge/components/cms/mediaCard.vue +116 -0
  44. package/edge/components/cms/mediaManager.vue +386 -0
  45. package/edge/components/cms/menu.vue +1103 -0
  46. package/edge/components/cms/optionsSelect.vue +107 -0
  47. package/edge/components/cms/page.vue +1785 -0
  48. package/edge/components/cms/posts.vue +1083 -0
  49. package/edge/components/cms/site.vue +1298 -0
  50. package/edge/components/cms/themeDefaultMenu.vue +548 -0
  51. package/edge/components/cms/themeEditor.vue +426 -0
  52. package/edge/components/dashboard.vue +776 -0
  53. package/edge/components/editor.vue +671 -0
  54. package/edge/components/fileTree.vue +72 -0
  55. package/edge/components/files.vue +89 -0
  56. package/edge/components/formSubtypes/myOrgs.vue +214 -0
  57. package/edge/components/formSubtypes/users.vue +336 -0
  58. package/edge/components/functionChips.vue +57 -0
  59. package/edge/components/gError.vue +98 -0
  60. package/edge/components/gHelper.vue +67 -0
  61. package/edge/components/gInput.vue +1331 -0
  62. package/edge/components/loggingIn.vue +41 -0
  63. package/edge/components/menu.vue +137 -0
  64. package/edge/components/menuContent.vue +132 -0
  65. package/edge/components/myAccount.vue +317 -0
  66. package/edge/components/myOrganizations.vue +75 -0
  67. package/edge/components/myProfile.vue +122 -0
  68. package/edge/components/orgSwitcher.vue +25 -0
  69. package/edge/components/organizationMembers.vue +522 -0
  70. package/edge/components/organizationSettings.vue +271 -0
  71. package/edge/components/shad/breadcrumbs.vue +35 -0
  72. package/edge/components/shad/button.vue +43 -0
  73. package/edge/components/shad/checkbox.vue +73 -0
  74. package/edge/components/shad/combobox.vue +238 -0
  75. package/edge/components/shad/datepicker.vue +184 -0
  76. package/edge/components/shad/dialog.vue +32 -0
  77. package/edge/components/shad/dropdownMenu.vue +54 -0
  78. package/edge/components/shad/dropdownMenuItem.vue +21 -0
  79. package/edge/components/shad/form.vue +59 -0
  80. package/edge/components/shad/html.vue +877 -0
  81. package/edge/components/shad/input.vue +139 -0
  82. package/edge/components/shad/number.vue +109 -0
  83. package/edge/components/shad/select.vue +151 -0
  84. package/edge/components/shad/selectTags.vue +278 -0
  85. package/edge/components/shad/switch.vue +67 -0
  86. package/edge/components/shad/tags.vue +137 -0
  87. package/edge/components/shad/textarea.vue +102 -0
  88. package/edge/components/shad/typeMoney.vue +167 -0
  89. package/edge/components/sideBar.vue +288 -0
  90. package/edge/components/sideBarContent.vue +268 -0
  91. package/edge/components/sidebarProvider.vue +33 -0
  92. package/edge/components/tooltip.vue +16 -0
  93. package/edge/components/userMenu.vue +148 -0
  94. package/edge/components/v/alert.vue +59 -0
  95. package/edge/components/v/alertTitle.vue +18 -0
  96. package/edge/components/v/card.vue +53 -0
  97. package/edge/components/v/cardActions.vue +18 -0
  98. package/edge/components/v/cardText.vue +18 -0
  99. package/edge/components/v/cardTitle.vue +20 -0
  100. package/edge/components/v/col.vue +56 -0
  101. package/edge/components/v/list.vue +46 -0
  102. package/edge/components/v/listItem.vue +26 -0
  103. package/edge/components/v/listItemTitle.vue +18 -0
  104. package/edge/components/v/row.vue +42 -0
  105. package/edge/components/v/toolbar.vue +24 -0
  106. package/edge/composables/global.ts +519 -0
  107. package/edge-pull.sh +2 -0
  108. package/edge-push.sh +1 -0
  109. package/edge-status.sh +14 -0
  110. package/package.json +1 -1
  111. package/edge-components-install.sh +0 -1
@@ -0,0 +1,72 @@
1
+ <script setup>
2
+ const props = defineProps ({
3
+ title: {
4
+ type: String,
5
+ required: false,
6
+ default: '',
7
+ },
8
+ items: {
9
+ type: Array,
10
+ required: true,
11
+ default: () => [],
12
+ },
13
+ })
14
+
15
+ const emit = defineEmits(['fileDelete'])
16
+
17
+ const state = reactive({
18
+ fileTypes: {
19
+ 'text/html': 'FileCode2',
20
+ 'application/javascript': 'FileCode2',
21
+ 'application/json': 'FileCode2',
22
+ 'application/xml': 'FileCode2',
23
+ 'text/markdown': 'FileCode2',
24
+ 'application/pdf': 'FileText',
25
+ 'image/png': 'FileImage',
26
+ 'text/plain': 'FileText',
27
+ 'image/svg+xml': 'FileImage',
28
+ 'image/jpeg': 'FileImage',
29
+ 'image/gif': 'FileImage',
30
+ 'image/webp': 'FileImage',
31
+ 'image/x-icon': 'FileImage',
32
+ 'application/vnd.ms-excel': 'FileSpreadsheet',
33
+ 'text/css': 'FileCode2',
34
+ 'image/vnd.microsoft.icon': 'FileImage', // ICO files
35
+ },
36
+ })
37
+
38
+ const fileDelete = (value) => {
39
+ emit('fileDelete', value)
40
+ }
41
+ </script>
42
+
43
+ <template>
44
+ <Command class="rounded-lg border shadow-md w-full h-full border-0">
45
+ <CommandList>
46
+ <CommandGroup :heading="props.title">
47
+ <template v-for="(item, index) in items" :key="index">
48
+ <CommandItem v-if="edgeGlobal.objHas(item, 'children')" class="items-start" :value="item.title">
49
+ <div class="w-full">
50
+ <div class="flex items-center">
51
+ <FolderOpen class="mr-2" />
52
+ <span>{{ item.title }}</span>
53
+ </div>
54
+ <div class="ml-4 w-full">
55
+ <edge-file-tree :items="item.children" @file-delete="fileDelete" />
56
+ </div>
57
+ </div>
58
+ </CommandItem>
59
+ <CommandItem v-else :value="item.title">
60
+ <component :is="state.fileTypes[item.file]" class="mr-2" />
61
+ <span>{{ item.title }}</span>
62
+ <CommandShortcut>
63
+ <edge-shad-button class="h-6 w-6 hover:bg-slate-600" variant="text" size="icon" @click.prevent.stop="fileDelete(item)">
64
+ <Trash class="h-4 w-4" />
65
+ </edge-shad-button>
66
+ </CommandShortcut>
67
+ </CommandItem>
68
+ </template>
69
+ </CommandGroup>
70
+ </CommandList>
71
+ </Command>
72
+ </template>
@@ -0,0 +1,89 @@
1
+ <script setup>
2
+ import { useVModel } from '@vueuse/core'
3
+
4
+ const props = defineProps({
5
+ title: {
6
+ type: String,
7
+ default: 'Upload Files',
8
+ },
9
+ description: {
10
+ type: String,
11
+ default: 'Drag and drop files here or click to upload.',
12
+ },
13
+ modelValue: {
14
+ type: [Array, Object],
15
+ default: () => [],
16
+ },
17
+ accept: {
18
+ type: String,
19
+ default: '',
20
+ },
21
+ name: {
22
+ type: String,
23
+ default: '',
24
+ },
25
+ multiple: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ })
30
+
31
+ const emits = defineEmits(['update:modelValue'])
32
+
33
+ const state = reactive({
34
+ files: [],
35
+ })
36
+
37
+ const modelValue = useVModel(props, 'modelValue', emits, {
38
+ passive: false,
39
+ prop: 'modelValue',
40
+ })
41
+
42
+ const dropFiles = computed(() => {
43
+ return state.files
44
+ })
45
+
46
+ watch (dropFiles, (newValue) => {
47
+ const files = []
48
+ newValue.forEach((file) => {
49
+ files.push(file.file)
50
+ })
51
+ modelValue.value = files
52
+ })
53
+
54
+ // Ensure modelValue is always an array
55
+ watch(modelValue, (newValue) => {
56
+ console.log(newValue)
57
+ if (!Array.isArray(newValue)) {
58
+ modelValue.value = [newValue]
59
+ }
60
+ })
61
+ </script>
62
+
63
+ <template>
64
+ <Card color="secondary" class="px-0 py-2 my-2 drop-active text-center sticky z-10 top-0 cursor-pointer">
65
+ <file-upload
66
+ v-model="state.files"
67
+ :accept="props.accept"
68
+ :name="props.name"
69
+ :multiple="props.multiple"
70
+ drop
71
+ class="w-full"
72
+ >
73
+ <Card-title class="pt-6">
74
+ {{ props.title }}
75
+ </Card-title>
76
+ <CardContent style="width:100%;" class="pb-3">
77
+ <p>{{ props.description }}</p>
78
+ </CardContent>
79
+ </file-upload>
80
+ <div v-if="modelValue.length > 0" class="mt-0">
81
+ <div v-if="props.multiple" class="mb-2">
82
+ {{ modelValue.length }} file(s) selected for upload.
83
+ </div>
84
+ <div v-else class="mt-0">
85
+ {{ modelValue[0].name }} selected for upload.
86
+ </div>
87
+ </div>
88
+ </Card>
89
+ </template>
@@ -0,0 +1,214 @@
1
+ <script setup>
2
+ import { toTypedSchema } from '@vee-validate/zod'
3
+ import * as z from 'zod'
4
+
5
+ const props = defineProps({
6
+ item: {
7
+ type: Object,
8
+ default: null,
9
+ },
10
+ items: {
11
+ type: Array,
12
+ default: () => [],
13
+ },
14
+ passThroughProps: {
15
+ type: [Number, String, Array, Object, Boolean],
16
+ required: false,
17
+ },
18
+ })
19
+
20
+ const edgeFirebase = inject('edgeFirebase')
21
+
22
+ const state = reactive({
23
+ workingItem: {},
24
+ dialog: false,
25
+ form: false,
26
+ currentTitle: '',
27
+ saveButton: 'Add Organization',
28
+ helpers: {
29
+ submits: true,
30
+ },
31
+ deleteDialog: false,
32
+ loading: false,
33
+ })
34
+
35
+ const newItem = {
36
+ name: '',
37
+ }
38
+
39
+ const addItem = () => {
40
+ console.log(newItem)
41
+ state.saveButton = 'Add Organization'
42
+ state.workingItem = edgeGlobal.dupObject(newItem)
43
+ state.workingItem.id = edgeGlobal.generateShortId()
44
+ state.currentTitle = 'Add Organization'
45
+ state.dialog = true
46
+ }
47
+
48
+ const joinOrg = () => {
49
+ state.saveButton = 'Join Organization'
50
+ state.workingItem = edgeGlobal.dupObject(newItem)
51
+ state.workingItem.id = edgeGlobal.generateShortId()
52
+ state.currentTitle = 'Join Organization'
53
+ state.dialog = true
54
+ }
55
+
56
+ const deleteConfirm = (item) => {
57
+ state.currentTitle = item.name
58
+ state.workingItem = edgeGlobal.dupObject(item)
59
+ state.deleteDialog = true
60
+ }
61
+
62
+ const deleteAction = async () => {
63
+ await edgeFirebase.removeUser(state.workingItem.docId)
64
+ state.deleteDialog = false
65
+ edgeGlobal.edgeState.changeTracker = {}
66
+ }
67
+
68
+ const closeDialog = () => {
69
+ state.dialog = false
70
+ edgeGlobal.edgeState.changeTracker = {}
71
+ }
72
+
73
+ const register = reactive({
74
+ registrationCode: props.passThroughProps,
75
+ dynamicDocumentFieldValue: '',
76
+ })
77
+
78
+ const onSubmit = async () => {
79
+ const registerSend = edgeGlobal.dupObject(register)
80
+ state.loading = true
81
+ if (state.saveButton === 'Add Organization') {
82
+ registerSend.dynamicDocumentFieldValue = state.workingItem.name
83
+ }
84
+ else {
85
+ registerSend.dynamicDocumentFieldValue = ''
86
+ registerSend.registrationCode = state.workingItem.name
87
+ }
88
+ const results = await edgeFirebase.currentUserRegister(registerSend)
89
+ edgeGlobal.getOrganizations(edgeFirebase)
90
+ console.log(results)
91
+ edgeGlobal.edgeState.changeTracker = {}
92
+ state.dialog = false
93
+ state.loading = false
94
+ }
95
+ const schema = toTypedSchema(z.object({
96
+ name: z.string({
97
+ required_error: 'Required',
98
+ }).min(1, { message: 'Required' }),
99
+ }))
100
+ </script>
101
+
102
+ <template>
103
+ <edge-shad-button v-if="props.item === null && props.passThroughProps" class="bg-slate-500 mx-2 h-6 text-xs" @click="addItem()">
104
+ Add Organization
105
+ </edge-shad-button>
106
+ <edge-shad-button v-if="props.item === null" class="bg-slate-500 mx-2 h-6 text-xs" @click="joinOrg()">
107
+ Join Organization
108
+ </edge-shad-button>
109
+ <div v-else class="flex w-full py-2 justify-between items-center">
110
+ <Avatar class="p-0 h-6 w-6 mr-2">
111
+ <User width="18" height="18" />
112
+ </Avatar>
113
+ <div class="flex gap-2 mr-2 items-center">
114
+ <div class="text-md text-bold mr-2">
115
+ {{ props.item.name }}
116
+ </div>
117
+ <edge-chip v-if="edgeGlobal.edgeState.currentOrganization === props.item.docId" size="small" color="primary">
118
+ Current
119
+ </edge-chip>
120
+ <edge-shad-button v-else class="bg-slate-500 h-6 text-xs" @click.stop.prevent="edgeGlobal.setOrganization(props.item.docId, edgeFirebase)">
121
+ Switch
122
+ </edge-shad-button>
123
+ </div>
124
+ <div class="grow flex gap-2 justify-end">
125
+ <edge-chip>
126
+ {{ edgeGlobal.getRoleName(edgeFirebase.user.roles, props.item.docId) }}
127
+ </edge-chip>
128
+ </div>
129
+ <edge-shad-button
130
+ class="bg-red-400 mx-2 h-6 text-xs"
131
+ variant="outline"
132
+ @click.stop="deleteConfirm(props.item)"
133
+ >
134
+ Leave
135
+ </edge-shad-button>
136
+ </div>
137
+
138
+ <edge-shad-dialog v-model="state.deleteDialog">
139
+ <DialogContent>
140
+ <DialogHeader>
141
+ <DialogTitle>
142
+ Leave Organization
143
+ </DialogTitle>
144
+ </DialogHeader>
145
+ <DialogDescription />
146
+ <h3 v-if="edgeGlobal.getRoleName(edgeFirebase.user.roles, state.workingItem.docId) === 'User'">
147
+ Are you sure you want to leave the organization "{{ state.currentTitle }}"? You will no longer have access to any of the organization's data.
148
+ </h3>
149
+ <h3 v-else>
150
+ As an admin, you cannot leave the organization "{{ state.currentTitle }}" from this screen. Please go to the organization's members page to remove yourself.
151
+ </h3>
152
+ <DialogFooter class="pt-6 flex justify-between">
153
+ <edge-shad-button class="text-white bg-slate-800 hover:bg-slate-400" @click="state.deleteDialog = false">
154
+ Cancel
155
+ </edge-shad-button>
156
+ <edge-shad-button
157
+ v-if="edgeGlobal.getRoleName(edgeFirebase.user.roles, state.workingItem.docId) === 'User'"
158
+ class="w-full"
159
+ variant="destructive"
160
+ @click="deleteAction()"
161
+ >
162
+ Leave
163
+ </edge-shad-button>
164
+ </DialogFooter>
165
+ </DialogContent>
166
+ </edge-shad-dialog>
167
+
168
+ <edge-shad-dialog v-model="state.dialog">
169
+ <DialogContent>
170
+ <edge-shad-form :schema="schema" @submit="onSubmit">
171
+ <DialogHeader>
172
+ <DialogTitle>
173
+ {{ state.currentTitle }}
174
+ </DialogTitle>
175
+ </DialogHeader>
176
+ <DialogDescription />
177
+ <edge-g-input
178
+ v-model="state.workingItem.name"
179
+ name="name"
180
+ :disable-tracking="true"
181
+ field-type="text"
182
+ :label="state.saveButton === 'Add Organization' ? 'Name' : 'Registration Code'"
183
+ :parent-tracker-id="`myOrgs-${state.workingItem.id}`"
184
+ />
185
+
186
+ <template v-if="state.saveButton === 'Add Organization'">
187
+ Please enter the name of the organization you would like to create.
188
+ </template>
189
+ <template v-else>
190
+ To join an existing organization, please enter the registration code provided by the organization.
191
+ </template>
192
+ <DialogFooter class="pt-6 flex justify-between">
193
+ <edge-shad-button variant="destructive" @click="closeDialog">
194
+ Close
195
+ </edge-shad-button>
196
+ <edge-shad-button
197
+ :disabled="state.loading"
198
+ class="text-white w-100 bg-slate-800 hover:bg-slate-400"
199
+ type="submit"
200
+ >
201
+ <Loader2 v-if="state.loading" class="w-4 h-4 mr-2 animate-spin" />
202
+ {{ state.saveButton }}
203
+ </edge-shad-button>
204
+ </DialogFooter>
205
+ </edge-shad-form>
206
+ </DialogContent>
207
+ </edge-shad-dialog>
208
+ </template>
209
+
210
+ <style lang="scss" scoped>
211
+ .pointer {
212
+ cursor: move;
213
+ }
214
+ </style>