adminforth 1.1.31 → 1.1.33

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 (105) hide show
  1. package/dist/index.js +9 -0
  2. package/dist/modules/codeInjector.js +19 -7
  3. package/dist/modules/styles.js +2 -2
  4. package/dist/spa/index.html +4 -4
  5. package/dist/spa/package-lock.json +206 -5
  6. package/dist/spa/package.json +8 -2
  7. package/dist/spa/src/App.vue +171 -72
  8. package/dist/spa/src/assets/logo.svg +19 -1
  9. package/dist/spa/src/components/AcceptModal.vue +3 -10
  10. package/dist/spa/src/components/BreadcrumbsWithButtons.vue +1 -1
  11. package/dist/spa/src/components/CustomDatePicker.vue +19 -6
  12. package/dist/spa/src/components/CustomDateRangePicker.vue +14 -5
  13. package/dist/spa/src/components/Dropdown.vue +19 -5
  14. package/dist/spa/src/components/Filters.vue +91 -37
  15. package/dist/spa/src/components/MenuLink.vue +2 -2
  16. package/dist/spa/src/components/ResourceForm.vue +163 -103
  17. package/dist/spa/src/components/ValueRenderer.vue +22 -6
  18. package/dist/spa/src/main.ts +1 -1
  19. package/dist/spa/src/router/index.ts +30 -19
  20. package/dist/spa/src/stores/core.ts +65 -59
  21. package/dist/spa/src/stores/modal.ts +13 -3
  22. package/dist/spa/src/utils.ts +65 -8
  23. package/dist/spa/src/views/CreateView.vue +76 -16
  24. package/dist/spa/src/views/EditView.vue +76 -14
  25. package/dist/spa/src/views/ListView.vue +88 -360
  26. package/dist/spa/src/views/LoginView.vue +17 -5
  27. package/dist/spa/src/views/ResourceParent.vue +1 -1
  28. package/dist/spa/src/views/ShowView.vue +114 -19
  29. package/dist/spa/tailwind.config.js +5 -2
  30. package/dist/spa/vite.config.ts +6 -0
  31. package/index.ts +11 -0
  32. package/modules/codeInjector.ts +19 -1
  33. package/modules/styles.ts +2 -2
  34. package/package.json +1 -1
  35. package/spa/index.html +1 -1
  36. package/spa/src/App.vue +3 -2
  37. package/spa/src/components/ResourceForm.vue +1 -1
  38. package/types/AdminForthConfig.ts +15 -0
  39. package/dist/plugins/AccessControl/index.js +0 -13
  40. package/dist/plugins/AccessControl/types.js +0 -1
  41. package/dist/plugins/plugins/ForeignInlineListPlugin/custom/InlineList.vue +0 -248
  42. package/dist/spa/public/favicon.ico +0 -0
  43. package/dist/spa/spa/.eslintrc.cjs +0 -14
  44. package/dist/spa/spa/.vscode/extensions.json +0 -6
  45. package/dist/spa/spa/README.md +0 -39
  46. package/dist/spa/spa/env.d.ts +0 -1
  47. package/dist/spa/spa/index.html +0 -23
  48. package/dist/spa/spa/package-lock.json +0 -4359
  49. package/dist/spa/spa/package.json +0 -47
  50. package/dist/spa/spa/postcss.config.js +0 -6
  51. package/dist/spa/spa/public/favicon.ico +0 -0
  52. package/dist/spa/spa/src/App.vue +0 -270
  53. package/dist/spa/spa/src/assets/base.css +0 -0
  54. package/dist/spa/spa/src/assets/logo.svg +0 -19
  55. package/dist/spa/spa/src/components/AcceptModal.vue +0 -45
  56. package/dist/spa/spa/src/components/Breadcrumbs.vue +0 -40
  57. package/dist/spa/spa/src/components/BreadcrumbsWithButtons.vue +0 -26
  58. package/dist/spa/spa/src/components/CustomDatePicker.vue +0 -174
  59. package/dist/spa/spa/src/components/CustomDateRangePicker.vue +0 -218
  60. package/dist/spa/spa/src/components/Dropdown.vue +0 -168
  61. package/dist/spa/spa/src/components/Filters.vue +0 -211
  62. package/dist/spa/spa/src/components/HelloWorld.vue +0 -17
  63. package/dist/spa/spa/src/components/MenuLink.vue +0 -24
  64. package/dist/spa/spa/src/components/ResourceForm.vue +0 -265
  65. package/dist/spa/spa/src/components/ShowTableItem.vue +0 -14
  66. package/dist/spa/spa/src/components/SingleSkeletLoader.vue +0 -13
  67. package/dist/spa/spa/src/components/ValueRenderer.vue +0 -60
  68. package/dist/spa/spa/src/components/icons/IconCalendar.vue +0 -5
  69. package/dist/spa/spa/src/components/icons/IconCommunity.vue +0 -7
  70. package/dist/spa/spa/src/components/icons/IconDocumentation.vue +0 -7
  71. package/dist/spa/spa/src/components/icons/IconEcosystem.vue +0 -7
  72. package/dist/spa/spa/src/components/icons/IconSupport.vue +0 -7
  73. package/dist/spa/spa/src/components/icons/IconTime.vue +0 -5
  74. package/dist/spa/spa/src/components/icons/IconTooling.vue +0 -19
  75. package/dist/spa/spa/src/index.scss +0 -26
  76. package/dist/spa/spa/src/main.ts +0 -18
  77. package/dist/spa/spa/src/router/index.ts +0 -64
  78. package/dist/spa/spa/src/stores/core.ts +0 -144
  79. package/dist/spa/spa/src/stores/modal.ts +0 -48
  80. package/dist/spa/spa/src/utils.ts +0 -101
  81. package/dist/spa/spa/src/views/CreateView.vue +0 -163
  82. package/dist/spa/spa/src/views/EditView.vue +0 -165
  83. package/dist/spa/spa/src/views/HomeView.vue +0 -8
  84. package/dist/spa/spa/src/views/ListView.vue +0 -257
  85. package/dist/spa/spa/src/views/LoginView.vue +0 -134
  86. package/dist/spa/spa/src/views/ResourceParent.vue +0 -18
  87. package/dist/spa/spa/src/views/ShowView.vue +0 -188
  88. package/dist/spa/spa/tailwind.config.js +0 -15
  89. package/dist/spa/spa/tsconfig.app.json +0 -14
  90. package/dist/spa/spa/tsconfig.json +0 -11
  91. package/dist/spa/spa/tsconfig.node.json +0 -19
  92. package/dist/spa/spa/vite.config.ts +0 -49
  93. package/dist/spa/src/views/HomeView.vue +0 -8
  94. package/dist/types.js +0 -30
  95. /package/dist/spa/{spa/public → public/assets}/favicon.png +0 -0
  96. /package/dist/spa/{spa/src → src}/components/CustomRangePicker.vue +0 -0
  97. /package/dist/spa/{spa/src → src}/components/ResourceListTable.vue +0 -0
  98. /package/dist/spa/{spa/src → src}/components/Toast.vue +0 -0
  99. /package/dist/spa/{spa/src → src}/composables/useFrontendApi.ts +0 -0
  100. /package/dist/spa/{spa/src → src}/composables/useStores.ts +0 -0
  101. /package/dist/spa/{spa/src → src}/spa_types/core.ts +0 -0
  102. /package/dist/spa/{spa/src → src}/stores/filters.ts +0 -0
  103. /package/dist/spa/{spa/src → src}/stores/toast.ts +0 -0
  104. /package/dist/spa/{spa/src → src}/stores/user.ts +0 -0
  105. /package/spa/public/{favicon.png → assets/favicon.png} +0 -0
@@ -1,265 +0,0 @@
1
- <template>
2
- <div class="rounded-default">
3
-
4
- <div
5
- class="relative shadow-resourse-form-shadow sm:rounded-lg dark:shadow-2xl dark:shadow-black rounded-default"
6
- >
7
- <form autocomplete="off" @submit.prevent>
8
- <table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 ">
9
- <thead class="text-xs text-gray-700 uppercase bg-form-view-heading dark:bg-gray-700 dark:text-gray-400">
10
- <tr>
11
- <th scope="col" class="px-6 py-3">
12
- Field
13
- </th>
14
- <th scope="col" class="px-6 py-3 w-4/6">
15
- Value
16
- </th>
17
- </tr>
18
- </thead>
19
- <tbody>
20
- <tr v-for="column, i in editableColumns" :key="column.name"
21
- class="bg-form-view-bg dark:bg-gray-800 border-b dark:border-gray-700"
22
- >
23
- <!-- if column is in customComponentsPerColumn, use this component. If not, use this code -->
24
- <template v-if="customComponentsPerColumn[column.name]">
25
- <component
26
- :is="customComponentsPerColumn[column.name]"
27
- :column="column"
28
- :value="currentValues[column.name]"
29
- @update:value="setCurrentValue(column.name, $event)"
30
- />
31
- </template>
32
- <template v-else>
33
- <td class="px-6 py-4 whitespace-nowrap "> <!--align-top-->
34
- {{ column.label }}
35
- <span :data-tooltip-target="`tooltip-show-${i}`" class="relative inline-block">
36
- <IconExclamationCircleSolid v-if="column.required[mode]" class="w-4 h-4"
37
- :class="(columnError(column) && validating) ? 'text-red-500 dark:text-red-400' : 'text-gray-400 dark:text-gray-500'"
38
- />
39
- </span>
40
- <div :id="`tooltip-show-${i}`"
41
- role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
42
- Required field
43
- <div class="tooltip-arrow" data-popper-arrow></div>
44
- </div>
45
- </td>
46
- <td class="px-6 py-4 whitespace-nowrap whitespace-pre-wrap relative">
47
- <Dropdown
48
- single
49
- v-if="column.foreignResource"
50
- :options="columnOptions[column.name] || []"
51
- :placeholder = "columnOptions[column.name].length || 'There are no options available'"
52
- :modelValue="currentValues[column.name]"
53
- @update:modelValue="setCurrentValue(column.name, $event)"
54
- ></Dropdown>
55
- <Dropdown
56
- single
57
- v-else-if="column.enum"
58
- :options="column.enum"
59
- :modelValue="currentValues[column.name]"
60
- @update:modelValue="setCurrentValue(column.name, $event)"
61
- />
62
- <Dropdown
63
- single
64
- v-else-if="column.type === 'boolean'"
65
- :options="[{ label: 'Yes', value: true }, { label: 'No', value: false }, { label: 'Unset', value: null }]"
66
- :modelValue="currentValues[column.name]"
67
- @update:modelValue="setCurrentValue(column.name, $event)"
68
- />
69
- <input
70
- v-else-if="['integer'].includes(column.type)"
71
- type="number"
72
- step="1"
73
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
74
- placeholder="0"
75
- :value="currentValues[column.name]"
76
- @input="setCurrentValue(column.name, $event.target.value)"
77
- >
78
- <CustomDatePicker
79
- v-else-if="['datetime'].includes(column.type)"
80
- :column="column"
81
- :valueStart="currentValues[column.name]"
82
- auto-hide
83
- @update:valueStart="setCurrentValue(column.name, $event)"
84
- />
85
- <input
86
- v-else-if="['decimal', 'float'].includes(column.type)"
87
- type="number"
88
- step="0.1"
89
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
90
- placeholder="0.0"
91
- :value="currentValues[column.name]"
92
- @input="setCurrentValue(column.name, $event.target.value)"
93
- />
94
- <textarea
95
- v-else-if="['text'].includes(column.type)"
96
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
97
- placeholder="Text"
98
- :value="currentValues[column.name]"
99
- @input="setCurrentValue(column.name, $event.target.value)"
100
- >
101
- </textarea>
102
- <input
103
- v-else
104
- :type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
105
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
106
- placeholder="Text"
107
- :value="currentValues[column.name]"
108
- @input="setCurrentValue(column.name, $event.target.value)"
109
- autocomplete="false"
110
- data-lpignore="true"
111
- readonly
112
- onfocus="this.removeAttribute('readonly');"
113
- >
114
-
115
- <button
116
- v-if="column.masked"
117
- type="button"
118
- @click="unmasked[column.name] = !unmasked[column.name]"
119
- class="h-6 absolute inset-y-2 top-6 right-6 flex items-center pr-2 z-index-100 focus:outline-none"
120
- >
121
- <IconEyeSolid class="w-6 h-6 text-gray-400" v-if="!unmasked[column.name]" />
122
- <IconEyeSlashSolid class="w-6 h-6 text-gray-400" v-else />
123
- </button>
124
- <div v-if="columnError(column) && validating" class="mt-1 text-xs text-red-500 dark:text-red-400">{{ columnError(column) }}</div>
125
-
126
- <div v-if="column.editingNote && column.editingNote[mode]" class="mt-1 text-xs text-gray-400 dark:text-gray-500">{{ column.editingNote[mode] }}</div>
127
- </td>
128
- </template>
129
- </tr>
130
-
131
- </tbody>
132
- </table>
133
- </form>
134
- </div>
135
- </div>
136
-
137
- </template>
138
-
139
- <script setup>
140
-
141
- import CustomDatePicker from "@/components/CustomDatePicker.vue";
142
- import Dropdown from '@/components/Dropdown.vue';
143
- import { useCoreStore } from '@/stores/core';
144
- import { callAdminForthApi } from '@/utils';
145
- import { IconExclamationCircleSolid, IconEyeSlashSolid, IconEyeSolid } from '@iconify-prerendered/vue-flowbite';
146
- import { computedAsync } from '@vueuse/core';
147
- import { initFlowbite } from 'flowbite';
148
- import { computed, onMounted, ref, watch } from 'vue';
149
- import { useRouter } from 'vue-router';
150
-
151
- const router = useRouter();
152
-
153
- const props = defineProps({
154
- loading: Boolean,
155
- resource: Object,
156
- record: Object,
157
- validating: Boolean,
158
- customComponentsPerColumn: Object,
159
- });
160
-
161
-
162
- const unmasked = ref({});
163
-
164
- const mode = computed(() => props.record && Object.keys(props.record).length ? 'edit' : 'create');
165
-
166
- const emit = defineEmits(['update:record', 'update:isValid']);
167
-
168
- const currentValues = ref({});
169
-
170
-
171
- const columnError = (column) => {
172
- const val = computed(() => {
173
- if ( column.required[mode.value] && (currentValues.value[column.name] === undefined || currentValues.value[column.name] === null || currentValues.value[column.name] === '') ) {
174
- return 'This field is required';
175
- }
176
- if ( column.type === 'string' || column.type === 'text' ) {
177
- if ( column.maxLength && currentValues.value[column.name]?.length > column.maxLength ) {
178
- return `This field must be shorter than ${column.maxLength} characters`;
179
- }
180
- if ( column.minLength && currentValues.value[column.name]?.length < column.minLength ) {
181
- return `This field must be longer than ${column.minLength} characters`;
182
- }
183
- }
184
- if ( ['integer', 'decimal', 'float'].includes(column.type) ) {
185
- if ( column.minValue !== undefined && currentValues.value[column.name] < column.minValue ) {
186
- return `This field must be greater than ${column.minValue}`;
187
- }
188
- if ( column.maxValue !== undefined && currentValues.value[column.name] > column.maxValue ) {
189
- return `This field must be less than ${column.maxValue}`;
190
- }
191
- }
192
- if ( column.validation && column.validation.length ){
193
- const validationArray = column.validation;
194
- for (let i = 0; i < validationArray.length; i++) {
195
- if (validationArray[i].regExp) {
196
- const regExp = new RegExp(validationArray[i].regExp);
197
- let value = currentValues.value[column.name];
198
- if (value === undefined || value === null) {
199
- value = '';
200
- }
201
- if (!regExp.test(value)) {
202
- return validationArray[i].message;
203
- }
204
- }
205
- }
206
-
207
- }
208
- return null;
209
- });
210
- return val.value;
211
- };
212
-
213
-
214
- const setCurrentValue = (key, value) => {
215
- currentValues.value[key] = value;
216
-
217
- emit('update:record', currentValues.value);
218
- };
219
-
220
- onMounted(() => {
221
- Object.keys(props.record).forEach((key) => {
222
- currentValues.value[key] = props.record[key];
223
- });
224
- initFlowbite();
225
-
226
-
227
- });
228
-
229
- const columnOptions = computedAsync(async () => {
230
- return (await Promise.all(
231
- Object.values(props.resource.columns).map(async (column) => {
232
- if (column.foreignResource) {
233
- const list = await callAdminForthApi({
234
- method: 'POST',
235
- path: `/get_resource_foreign_data`,
236
- body: {
237
- resourceId: router.currentRoute.value.params.resourceId,
238
- column: column.name,
239
- limit: 1000,
240
- offset: 0,
241
- },
242
- });
243
- return { [column.name]: list.items };
244
- }
245
- })
246
- )).reduce((acc, val) => Object.assign(acc, val), {})
247
-
248
- }, {});
249
-
250
- const coreStore = useCoreStore();
251
-
252
- const editableColumns = computed(() => {
253
- const mode = props.record ? 'edit' : 'create';
254
- return props.resource?.columns?.filter(column => column.showIn.includes(mode));
255
- });
256
-
257
- const isValid = computed(() => {
258
- return editableColumns.value?.every(column => !columnError(column));
259
- });
260
-
261
- watch(() => isValid.value, (value) => {
262
- emit('update:isValid', value);
263
- });
264
-
265
- </script>
@@ -1,14 +0,0 @@
1
- <template>
2
- <td class="px-6 py-4 whitespace-nowrap">
3
- {{ column.label }}
4
- </td>
5
- <td class="px-6 py-4 whitespace-nowrap whitespace-pre-wrap">
6
- <ValueRenderer :column="column" :row="row" />
7
- </td>
8
- </template>
9
-
10
- <script setup>
11
- import ValueRenderer from '@/components/ValueRenderer.vue';
12
-
13
- defineProps(['column', 'row']);
14
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div
3
- role="status" class="max-w-sm animate-pulse"
4
- >
5
- <div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div>
6
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px] mb-2.5"></div>
7
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div>
8
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[330px] mb-2.5"></div>
9
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[300px] mb-2.5"></div>
10
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"></div>
11
- <span class="sr-only">Loading...</span>
12
- </div>
13
- </template>
@@ -1,60 +0,0 @@
1
- <template>
2
- <div>
3
-
4
- <span v-if="column.foreignResource">
5
- <RouterLink v-if="record[column.name]" class="font-medium text-blue-600 dark:text-blue-500 hover:brightness-110"
6
- :to="{ name: 'resource-show', params: { resourceId: column.foreignResource.resourceId, primaryKey: record[column.name].pk } }">
7
- {{ record[column.name].label }}
8
- </RouterLink>
9
- <div v-else>
10
- <span class="text-gray-400">-</span>
11
- </div>
12
- </span>
13
-
14
- <span v-else-if="column.type === 'boolean'">
15
- <span v-if="record[column.name]" class="bg-green-100 text-green-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-green-400 border border-green-400">Yes</span>
16
- <span v-else class="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-red-400 border border-red-400">No</span>
17
- </span>
18
- <span v-else-if="column.enum">
19
- {{ checkEmptyValues(column.enum.find(e => e.value === record[column.name])?.label,route.meta.type) }}
20
- </span>
21
- <span v-else-if="column.type === 'datetime'">
22
- {{ checkEmptyValues(formatDate(record[column.name]),route.meta.type) }}
23
-
24
- </span>
25
- <span v-else>
26
- {{ checkEmptyValues(record[column.name],route.meta.type) }}
27
- </span>
28
- </div>
29
- </template>
30
-
31
-
32
- <script setup>
33
-
34
- import dayjs from 'dayjs';
35
- import utc from 'dayjs/plugin/utc';
36
- import timezone from 'dayjs/plugin/timezone';
37
- import {checkEmptyValues} from '@/utils';
38
- import { useRoute, useRouter } from 'vue-router';
39
-
40
-
41
- import { useCoreStore } from '@/stores/core';
42
-
43
- const coreStore = useCoreStore();
44
- const route = useRoute();
45
-
46
-
47
- dayjs.extend(utc);
48
- dayjs.extend(timezone);
49
-
50
- const props = defineProps({
51
- column: Object,
52
- record: Object
53
- });
54
-
55
-
56
- function formatDate(date) {
57
- if (!date) return '';
58
- return dayjs.utc(date).local().format(coreStore.config?.datesFormat || 'YYYY-MM-DD HH:mm:ss');
59
- }
60
- </script>
@@ -1,5 +0,0 @@
1
- <template>
2
- <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
3
- <path d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"/>
4
- </svg>
5
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
3
- <path
4
- d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
5
- />
6
- </svg>
7
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
3
- <path
4
- d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
5
- />
6
- </svg>
7
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
3
- <path
4
- d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
5
- />
6
- </svg>
7
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
3
- <path
4
- d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
5
- />
6
- </svg>
7
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
3
- <path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v4a1 1 0 0 0 .293.707l3 3a1 1 0 0 0 1.414-1.414L13 11.586V8Z" clip-rule="evenodd"></path>
4
- </svg>
5
- </template>
@@ -1,19 +0,0 @@
1
- <!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
2
- <template>
3
- <svg
4
- xmlns="http://www.w3.org/2000/svg"
5
- xmlns:xlink="http://www.w3.org/1999/xlink"
6
- aria-hidden="true"
7
- role="img"
8
- class="iconify iconify--mdi"
9
- width="24"
10
- height="24"
11
- preserveAspectRatio="xMidYMid meet"
12
- viewBox="0 0 24 24"
13
- >
14
- <path
15
- d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
16
- fill="currentColor"
17
- ></path>
18
- </svg>
19
- </template>
@@ -1,26 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
-
6
- // @layer base {
7
- // /* width */
8
- // ::-webkit-scrollbar {
9
- // @apply w-2 p-2
10
- // }
11
-
12
- // /* Track */
13
- // ::-webkit-scrollbar-track {
14
- // @apply bg-inherit
15
- // }
16
-
17
- // /* Handle */
18
- // ::-webkit-scrollbar-thumb {
19
- // @apply bg-gray-200 dark:bg-gray-600 rounded-xl
20
- // }
21
-
22
- // /* Handle on hover */
23
- // ::-webkit-scrollbar-thumb:hover {
24
- // @apply bg-gray-700
25
- // }
26
- // }
@@ -1,18 +0,0 @@
1
- import { createApp } from 'vue'
2
- import { createPinia } from 'pinia'
3
- /* IMPORTANT:ADMINFORTH IMPORTS */
4
-
5
-
6
- import App from './App.vue'
7
- import router from './router'
8
-
9
- const app = createApp(App)
10
- /* IMPORTANT:ADMINFORTH COMPONENT REGISTRATIONS */
11
-
12
-
13
- app.use(createPinia())
14
- app.use(router)
15
-
16
- /* IMPORTANT:ADMINFORTH CUSTOM USES */
17
-
18
- app.mount('#app')
@@ -1,64 +0,0 @@
1
- import { createRouter, createWebHistory } from 'vue-router'
2
- import ResourceParent from '@/views/ResourceParent.vue'
3
- import { useUserStore } from '@/stores/user'
4
- /* IMPORTANT:ADMINFORTH ROUTES IMPORTS */
5
-
6
- const router = createRouter({
7
- history: createWebHistory(import.meta.env.BASE_URL),
8
- routes: [
9
- {
10
- path: '/login',
11
- name: 'login',
12
- component: () => import('@/views/LoginView.vue'),
13
- meta: { title: 'login' },
14
- beforeEnter: async (to, from, next) => {
15
- const userStore = useUserStore()
16
- if(localStorage.getItem('isAuthorized') === 'true'){
17
- next({name: 'home'})
18
- } else {
19
- next()
20
- }
21
- }
22
- },
23
- {
24
- path: '/resource/:resourceId',
25
- component: ResourceParent,
26
- name: 'resource',
27
- children: [
28
- {
29
- path: '',
30
- component: () => import('@/views/ListView.vue'),
31
- name: 'resource-list',
32
- meta: { title: 'list',type: 'list' }
33
- },
34
- {
35
- path: 'show/:primaryKey',
36
- component: () => import('@/views/ShowView.vue'),
37
- name: 'resource-show',
38
- meta: { title: 'show', type: 'show'}
39
-
40
- },
41
- {
42
- path: 'edit/:primaryKey',
43
- component: () => import('@/views/EditView.vue'),
44
- name: 'resource-edit',
45
- meta: { title: 'edit', type: 'edit'}
46
- },
47
- {
48
- path: 'create',
49
- component: () => import('@/views/CreateView.vue'),
50
- name: 'resource-create',
51
- meta: { title: 'create', type: 'create'}
52
-
53
- },
54
- ]
55
- },
56
- /* IMPORTANT:ADMINFORTH ROUTES */
57
- ]
58
- })
59
-
60
-
61
-
62
-
63
-
64
- export default router