adminforth 1.1.23 → 1.1.25
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/dist/index.js +12 -12
- package/dist/plugins/AccessControl/index.js +3 -56
- package/dist/plugins/AuditLog/index.js +13 -0
- package/dist/plugins/AuditLog/types.js +1 -0
- package/dist/plugins/plugins/ForeignInlineListPlugin/custom/InlineList.vue +248 -0
- package/dist/spa/index.html +2 -2
- package/dist/spa/package-lock.json +1 -189
- package/dist/spa/package.json +1 -6
- package/dist/spa/spa/src/components/ShowTableItem.vue +14 -0
- package/dist/spa/spa/src/views/HomeView.vue +8 -0
- package/dist/spa/src/App.vue +57 -76
- package/dist/spa/src/components/AcceptModal.vue +1 -1
- package/dist/spa/src/components/CustomDatePicker.vue +3 -3
- package/dist/spa/src/components/CustomDateRangePicker.vue +3 -3
- package/dist/spa/src/components/Dropdown.vue +4 -13
- package/dist/spa/src/components/Filters.vue +22 -55
- package/dist/spa/src/components/MenuLink.vue +2 -2
- package/dist/spa/src/components/ResourceForm.vue +99 -157
- package/dist/spa/src/components/ValueRenderer.vue +1 -11
- package/dist/spa/src/router/index.ts +2 -3
- package/dist/spa/src/stores/core.ts +33 -22
- package/dist/spa/src/utils.ts +3 -5
- package/dist/spa/src/views/CreateView.vue +7 -15
- package/dist/spa/src/views/EditView.vue +8 -36
- package/dist/spa/src/views/HomeView.vue +8 -0
- package/dist/spa/src/views/ListView.vue +23 -35
- package/dist/spa/src/views/LoginView.vue +1 -1
- package/dist/spa/src/views/ResourceParent.vue +1 -1
- package/dist/spa/src/views/ShowView.vue +9 -20
- package/dist/spa/tailwind.config.js +2 -5
- package/dist/types/AdminForthConfig.js +9 -0
- package/index.ts +16 -18
- package/package.json +1 -1
- package/plugins/AuditLog/index.ts +29 -0
- package/plugins/AuditLog/types.ts +4 -0
- package/types/AdminForthConfig.ts +23 -1
- package/dist/spa/src/components/CustomRangePicker.vue +0 -148
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-wrap gap-2">
|
|
3
|
-
<input
|
|
4
|
-
type="number" aria-describedby="helper-text-explanation"
|
|
5
|
-
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-20 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"
|
|
6
|
-
placeholder="From"
|
|
7
|
-
v-model="start"
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
<input
|
|
11
|
-
type="number" aria-describedby="helper-text-explanation"
|
|
12
|
-
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-20 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"
|
|
13
|
-
placeholder="To"
|
|
14
|
-
v-model="end"
|
|
15
|
-
>
|
|
16
|
-
|
|
17
|
-
<button
|
|
18
|
-
v-if="isChanged"
|
|
19
|
-
type="button"
|
|
20
|
-
class="flex items-center p-0.5 ml-auto px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
21
|
-
@click="clear">Clear
|
|
22
|
-
</button>
|
|
23
|
-
|
|
24
|
-
<div class="w-full">
|
|
25
|
-
<vue-slider
|
|
26
|
-
class="custom-slider"
|
|
27
|
-
:dot-size="20"
|
|
28
|
-
height="7.99px"
|
|
29
|
-
:min="minFormatted"
|
|
30
|
-
:max="maxFormatted"
|
|
31
|
-
v-model="sliderValue"
|
|
32
|
-
@update:model-value="updateFromSlider($event)"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
<script setup lang="ts">
|
|
38
|
-
import VueSlider from 'vue-slider-component';
|
|
39
|
-
import 'vue-slider-component/theme/antd.css'
|
|
40
|
-
import {computed, onMounted, ref, watch} from "vue";
|
|
41
|
-
import debounce from 'debounce'
|
|
42
|
-
|
|
43
|
-
const props = defineProps({
|
|
44
|
-
valueStart: {
|
|
45
|
-
default: '',
|
|
46
|
-
},
|
|
47
|
-
valueEnd: {
|
|
48
|
-
default: '',
|
|
49
|
-
},
|
|
50
|
-
min: {
|
|
51
|
-
default: 0,
|
|
52
|
-
},
|
|
53
|
-
max: {
|
|
54
|
-
default: 10,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const emit = defineEmits(['update:valueStart', 'update:valueEnd']);
|
|
59
|
-
|
|
60
|
-
const minFormatted = computed(() => Math.floor(props.min));
|
|
61
|
-
const maxFormatted = computed(() => Math.ceil(props.max));
|
|
62
|
-
|
|
63
|
-
const isChanged = computed(() => {
|
|
64
|
-
return start.value && start.value !== minFormatted.value || end.value && end.value !== maxFormatted.value;
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const start = ref(props.valueStart);
|
|
68
|
-
const end = ref(props.valueEnd);
|
|
69
|
-
|
|
70
|
-
const sliderValue = ref([minFormatted.value, maxFormatted.value]);
|
|
71
|
-
|
|
72
|
-
const updateFromSlider =
|
|
73
|
-
debounce((value: [number, number]) => {
|
|
74
|
-
start.value = value[0] === minFormatted.value ? '': value[0];
|
|
75
|
-
end.value = value[1] === maxFormatted.value ? '': value[1];
|
|
76
|
-
}, 500);
|
|
77
|
-
|
|
78
|
-
onMounted(() => {
|
|
79
|
-
updateStartFromProps();
|
|
80
|
-
updateEndFromProps();
|
|
81
|
-
|
|
82
|
-
watch(() => props.valueStart, (value) => {
|
|
83
|
-
updateStartFromProps();
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
watch(() => props.valueEnd, (value) => {
|
|
87
|
-
updateEndFromProps();
|
|
88
|
-
});
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
function updateStartFromProps() {
|
|
92
|
-
start.value = props.valueStart;
|
|
93
|
-
setSliderValues(start.value, end.value)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function updateEndFromProps() {
|
|
97
|
-
end.value = props.valueEnd;
|
|
98
|
-
setSliderValues(start.value, end.value)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
watch(start, () => {
|
|
102
|
-
console.log('⚡ emit', start.value)
|
|
103
|
-
emit('update:valueStart', start.value)
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
watch(end, () => {
|
|
107
|
-
console.log('⚡ emit', end.value)
|
|
108
|
-
emit('update:valueEnd', end.value);
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
const clear = () => {
|
|
112
|
-
start.value = ''
|
|
113
|
-
end.value = ''
|
|
114
|
-
setSliderValues('', '')
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function setSliderValues(start, end) {
|
|
118
|
-
sliderValue.value = [start || minFormatted.value, end || maxFormatted.value];
|
|
119
|
-
}
|
|
120
|
-
</script>
|
|
121
|
-
|
|
122
|
-
<style lang="scss" scoped>
|
|
123
|
-
.custom-slider {
|
|
124
|
-
&:deep(.vue-slider-rail) {
|
|
125
|
-
background-color: rgb(229 231 235);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&:deep(.vue-slider-dot-handle) {
|
|
129
|
-
background-color: #1c64f2;
|
|
130
|
-
border: none;
|
|
131
|
-
box-shadow: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:deep(.vue-slider-dot-handle:hover) {
|
|
135
|
-
background-color: #1c64f2;
|
|
136
|
-
border: none;
|
|
137
|
-
box-shadow: none;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&:deep(.vue-slider-process) {
|
|
141
|
-
background-color: rgb(225 239 254);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&:deep(.vue-slider-process:hover) {
|
|
145
|
-
background-color: rgb(225 239 254);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
</style>
|