adminforth 2.57.0 → 2.57.2
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/spa/src/afcl/AreaChart.vue +12 -3
- package/dist/spa/src/afcl/BarChart.vue +12 -3
- package/dist/spa/src/afcl/JsonViewer.vue +3 -2
- package/dist/spa/src/afcl/MixedChart.vue +11 -3
- package/dist/spa/src/afcl/PieChart.vue +12 -3
- package/dist/spa/src/afcl/TreeMapChart.vue +11 -3
- package/dist/spa/src/components/ResourceForm.vue +3 -0
- package/dist/spa/src/components/ResourceListTable.vue +1 -1
- package/dist/spa/src/components/ValueRenderer.vue +2 -1
- package/package.json +1 -1
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import
|
|
6
|
+
import type ApexCharts from 'apexcharts';
|
|
7
|
+
import { type ApexOptions } from 'apexcharts';
|
|
7
8
|
import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
|
|
9
|
+
type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
|
|
8
10
|
|
|
9
11
|
const chart: Ref<HTMLDivElement | null> = ref(null);
|
|
10
12
|
|
|
@@ -137,15 +139,22 @@ const options = computed(() => {
|
|
|
137
139
|
});
|
|
138
140
|
|
|
139
141
|
let apexChart: ApexCharts | null = null;
|
|
142
|
+
let ApexChartsCtor: ApexChartsConstructor | null = null;
|
|
140
143
|
|
|
141
|
-
watch(() => [options.value, chart.value], (value) => {
|
|
144
|
+
watch(() => [options.value, chart.value], async (value) => {
|
|
142
145
|
if (!value || !chart.value) {
|
|
143
146
|
return;
|
|
144
147
|
}
|
|
148
|
+
|
|
149
|
+
if (!ApexChartsCtor) {
|
|
150
|
+
const module = await import('apexcharts') as { default: ApexChartsConstructor };
|
|
151
|
+
ApexChartsCtor = module.default;
|
|
152
|
+
}
|
|
153
|
+
|
|
145
154
|
if (apexChart) {
|
|
146
155
|
apexChart.updateOptions(options.value);
|
|
147
156
|
} else {
|
|
148
|
-
apexChart = new
|
|
157
|
+
apexChart = new ApexChartsCtor(chart.value, options.value);
|
|
149
158
|
apexChart.render();
|
|
150
159
|
}
|
|
151
160
|
});
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import
|
|
6
|
+
import type ApexCharts from 'apexcharts';
|
|
7
|
+
import { type ApexOptions } from 'apexcharts';
|
|
7
8
|
import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
|
|
9
|
+
type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
|
|
8
10
|
|
|
9
11
|
const chart: Ref<HTMLDivElement | null> = ref(null);
|
|
10
12
|
|
|
@@ -150,15 +152,22 @@ const options = computed(() => {
|
|
|
150
152
|
});
|
|
151
153
|
|
|
152
154
|
let apexChart: ApexCharts | null = null;
|
|
155
|
+
let ApexChartsCtor: ApexChartsConstructor | null = null;
|
|
153
156
|
|
|
154
|
-
watch(() => [options.value, chart.value], (value) => {
|
|
157
|
+
watch(() => [options.value, chart.value], async (value) => {
|
|
155
158
|
if (!value || !chart.value) {
|
|
156
159
|
return;
|
|
157
160
|
}
|
|
161
|
+
|
|
162
|
+
if (!ApexChartsCtor) {
|
|
163
|
+
const module = await import('apexcharts') as { default: ApexChartsConstructor };
|
|
164
|
+
ApexChartsCtor = module.default;
|
|
165
|
+
}
|
|
166
|
+
|
|
158
167
|
if (apexChart) {
|
|
159
168
|
apexChart.updateOptions(options.value);
|
|
160
169
|
} else {
|
|
161
|
-
apexChart = new
|
|
170
|
+
apexChart = new ApexChartsCtor(chart.value, options.value);
|
|
162
171
|
apexChart.render();
|
|
163
172
|
}
|
|
164
173
|
});
|
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup lang="ts">
|
|
13
|
-
import { computed } from 'vue'
|
|
14
|
-
import { JsonViewer } from 'vue3-json-viewer'
|
|
13
|
+
import { computed, defineAsyncComponent } from 'vue'
|
|
15
14
|
import { useCoreStore } from '@/stores/core'
|
|
15
|
+
import "vue3-json-viewer/dist/vue3-json-viewer.css";
|
|
16
16
|
|
|
17
17
|
defineProps<{
|
|
18
18
|
value: any
|
|
19
19
|
expandDepth?: number
|
|
20
20
|
}>()
|
|
21
21
|
|
|
22
|
+
const JsonViewer = defineAsyncComponent(() => import('vue3-json-viewer').then(module => module.JsonViewer))
|
|
22
23
|
const coreStore = useCoreStore()
|
|
23
24
|
|
|
24
25
|
const currentTheme = computed(() => (coreStore.theme === 'dark' ? 'dark' : 'light'))
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import
|
|
6
|
+
import type ApexCharts from 'apexcharts';
|
|
7
|
+
import { type ApexOptions } from 'apexcharts';
|
|
7
8
|
import { ref, onUnmounted, watch, computed } from 'vue';
|
|
9
|
+
type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
|
|
8
10
|
|
|
9
11
|
const props = defineProps<{
|
|
10
12
|
data: {
|
|
@@ -103,17 +105,23 @@ const chartOptions = computed(() => {
|
|
|
103
105
|
});
|
|
104
106
|
|
|
105
107
|
let apexChart: ApexCharts | null = null;
|
|
108
|
+
let ApexChartsCtor: ApexChartsConstructor | null = null;
|
|
106
109
|
|
|
107
110
|
|
|
108
|
-
watch(() => [chartOptions.value, chart.value], ([newOptions, newRef]) => {
|
|
111
|
+
watch(() => [chartOptions.value, chart.value], async ([newOptions, newRef]) => {
|
|
109
112
|
if (!newOptions || !newRef) {
|
|
110
113
|
return;
|
|
111
114
|
}
|
|
115
|
+
|
|
116
|
+
if (!ApexChartsCtor) {
|
|
117
|
+
const module = await import('apexcharts') as { default: ApexChartsConstructor };
|
|
118
|
+
ApexChartsCtor = module.default;
|
|
119
|
+
}
|
|
112
120
|
|
|
113
121
|
if (apexChart) {
|
|
114
122
|
apexChart.updateOptions(newOptions);
|
|
115
123
|
} else if (chart.value) {
|
|
116
|
-
apexChart = new
|
|
124
|
+
apexChart = new ApexChartsCtor(chart.value, newOptions);
|
|
117
125
|
apexChart.render();
|
|
118
126
|
}
|
|
119
127
|
}, { deep: true });
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import
|
|
6
|
+
import type ApexCharts from 'apexcharts';
|
|
7
|
+
import { type ApexOptions } from 'apexcharts';
|
|
7
8
|
import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
|
|
9
|
+
type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
|
|
8
10
|
|
|
9
11
|
const chart: Ref<HTMLDivElement | null> = ref(null);
|
|
10
12
|
|
|
@@ -154,15 +156,22 @@ const options = computed(() => {
|
|
|
154
156
|
});
|
|
155
157
|
|
|
156
158
|
let apexChart: ApexCharts | null = null;
|
|
159
|
+
let ApexChartsCtor: ApexChartsConstructor | null = null;
|
|
157
160
|
|
|
158
|
-
watch(() => [options.value, chart.value], (value) => {
|
|
161
|
+
watch(() => [options.value, chart.value], async (value) => {
|
|
159
162
|
if (!value || !chart.value) {
|
|
160
163
|
return;
|
|
161
164
|
}
|
|
165
|
+
|
|
166
|
+
if (!ApexChartsCtor) {
|
|
167
|
+
const module = await import('apexcharts') as { default: ApexChartsConstructor };
|
|
168
|
+
ApexChartsCtor = module.default;
|
|
169
|
+
}
|
|
170
|
+
|
|
162
171
|
if (apexChart) {
|
|
163
172
|
apexChart.updateOptions(options.value);
|
|
164
173
|
} else {
|
|
165
|
-
apexChart = new
|
|
174
|
+
apexChart = new ApexChartsCtor(chart.value, options.value);
|
|
166
175
|
apexChart.render();
|
|
167
176
|
}
|
|
168
177
|
});
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import
|
|
6
|
+
import type ApexCharts from 'apexcharts';
|
|
7
|
+
import { type ApexOptions } from 'apexcharts';
|
|
7
8
|
import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
|
|
9
|
+
type ApexChartsConstructor = new (el: Element, options: ApexOptions) => ApexCharts;
|
|
8
10
|
|
|
9
11
|
const chart: Ref<HTMLDivElement | null> = ref(null);
|
|
10
12
|
|
|
@@ -94,16 +96,22 @@ const options = computed(() => {
|
|
|
94
96
|
});
|
|
95
97
|
|
|
96
98
|
let apexChart: ApexCharts | null = null;
|
|
99
|
+
let ApexChartsCtor: ApexChartsConstructor | null = null;
|
|
97
100
|
|
|
98
|
-
watch(() => [options.value, chart.value], (value) => {
|
|
101
|
+
watch(() => [options.value, chart.value], async (value) => {
|
|
99
102
|
if (!value || !chart.value) {
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
102
105
|
|
|
106
|
+
if (!ApexChartsCtor) {
|
|
107
|
+
const module = await import('apexcharts') as { default: ApexChartsConstructor };
|
|
108
|
+
ApexChartsCtor = module.default;
|
|
109
|
+
}
|
|
110
|
+
|
|
103
111
|
if (apexChart) {
|
|
104
112
|
apexChart.updateOptions(options.value);
|
|
105
113
|
} else {
|
|
106
|
-
apexChart = new
|
|
114
|
+
apexChart = new ApexChartsCtor(chart.value, options.value);
|
|
107
115
|
apexChart.render();
|
|
108
116
|
}
|
|
109
117
|
});
|
|
@@ -308,6 +308,9 @@ onMounted(() => {
|
|
|
308
308
|
if (column.type === 'json' && currentValues.value) {
|
|
309
309
|
if (column.isArray?.enabled) {
|
|
310
310
|
// if value is null or undefined, we should set it to empty array
|
|
311
|
+
if (column.showIn?.[mode.value] === false) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
311
314
|
if (!currentValues.value[column.name]) {
|
|
312
315
|
currentValues.value[column.name] = [];
|
|
313
316
|
} else {
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
</span>
|
|
341
341
|
</template>
|
|
342
342
|
</span>
|
|
343
|
-
<div v-if="totalRows > 0 &&
|
|
343
|
+
<div v-if="totalRows > 0 && resource?.options?.listPageSizeOptions?.length"
|
|
344
344
|
class="flex items-center gap-2 ml-auto" >
|
|
345
345
|
<span class="text-sm text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText whitespace-nowrap">
|
|
346
346
|
{{ $t('Rows per page') }}
|
|
@@ -117,9 +117,10 @@ import utc from 'dayjs/plugin/utc';
|
|
|
117
117
|
import timezone from 'dayjs/plugin/timezone';
|
|
118
118
|
import {checkEmptyValues} from '@/utils';
|
|
119
119
|
import { useRoute, useRouter } from 'vue-router';
|
|
120
|
-
import { JsonViewer } from "vue3-json-viewer";
|
|
121
120
|
import "vue3-json-viewer/dist/vue3-json-viewer.css";
|
|
121
|
+
import { defineAsyncComponent } from 'vue';
|
|
122
122
|
import type { AdminForthResourceColumnCommon } from '@/types/Common';
|
|
123
|
+
const JsonViewer = defineAsyncComponent(() => import('vue3-json-viewer').then(module => module.JsonViewer))
|
|
123
124
|
|
|
124
125
|
import { useCoreStore } from '@/stores/core';
|
|
125
126
|
|