adminforth 1.3.57-next.13 → 1.3.57-next.15
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/basePlugin.d.ts +1 -1
- package/dist/basePlugin.d.ts.map +1 -1
- package/dist/dataConnectors/baseConnector.d.ts +2 -1
- package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
- package/dist/dataConnectors/baseConnector.js +1 -1
- package/dist/dataConnectors/baseConnector.js.map +1 -1
- package/dist/dataConnectors/clickhouse.d.ts +2 -1
- package/dist/dataConnectors/clickhouse.d.ts.map +1 -1
- package/dist/dataConnectors/clickhouse.js +1 -1
- package/dist/dataConnectors/clickhouse.js.map +1 -1
- package/dist/dataConnectors/mongo.d.ts +2 -1
- package/dist/dataConnectors/mongo.d.ts.map +1 -1
- package/dist/dataConnectors/mongo.js +1 -1
- package/dist/dataConnectors/mongo.js.map +1 -1
- package/dist/dataConnectors/postgres.d.ts +2 -1
- package/dist/dataConnectors/postgres.d.ts.map +1 -1
- package/dist/dataConnectors/postgres.js +1 -1
- package/dist/dataConnectors/postgres.js.map +1 -1
- package/dist/dataConnectors/sqlite.d.ts +1 -1
- package/dist/dataConnectors/sqlite.d.ts.map +1 -1
- package/dist/dataConnectors/sqlite.js +1 -1
- package/dist/dataConnectors/sqlite.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/codeInjector.d.ts +1 -1
- package/dist/modules/codeInjector.d.ts.map +1 -1
- package/dist/modules/configValidator.d.ts +2 -1
- package/dist/modules/configValidator.d.ts.map +1 -1
- package/dist/modules/configValidator.js +1 -2
- package/dist/modules/configValidator.js.map +1 -1
- package/dist/modules/operationalResource.d.ts +1 -1
- package/dist/modules/operationalResource.d.ts.map +1 -1
- package/dist/modules/restApi.d.ts +2 -1
- package/dist/modules/restApi.d.ts.map +1 -1
- package/dist/modules/restApi.js +1 -1
- package/dist/modules/restApi.js.map +1 -1
- package/dist/servers/express.d.ts +1 -1
- package/dist/servers/express.d.ts.map +1 -1
- package/dist/spa/src/composables/useStores.ts +2 -3
- package/dist/spa/src/types/Back.ts +1181 -0
- package/dist/spa/src/types/Common.ts +702 -0
- package/dist/spa/src/types/Commons.ts +702 -0
- package/dist/spa/src/types/FrontAndBack.ts +698 -0
- package/dist/spa/src/types/FrontendAPI.ts +3 -3
- package/dist/spa/src/views/ListView.vue +11 -11
- package/dist/types/Back.d.ts +1083 -0
- package/dist/types/Back.d.ts.map +1 -0
- package/dist/types/Back.js +86 -0
- package/dist/types/Back.js.map +1 -0
- package/dist/types/Common.d.ts +616 -0
- package/dist/types/Common.d.ts.map +1 -0
- package/dist/types/Common.js +65 -0
- package/dist/types/Common.js.map +1 -0
- package/dist/types/Commons.d.ts +616 -0
- package/dist/types/Commons.d.ts.map +1 -0
- package/dist/types/Commons.js +65 -0
- package/dist/types/Commons.js.map +1 -0
- package/dist/types/FrontAndBack.d.ts +613 -0
- package/dist/types/FrontAndBack.d.ts.map +1 -0
- package/dist/types/FrontAndBack.js +62 -0
- package/dist/types/FrontAndBack.js.map +1 -0
- package/dist/types/FrontendAPI.d.ts +9 -0
- package/dist/types/FrontendAPI.d.ts.map +1 -1
- package/package.json +5 -3
|
@@ -110,13 +110,13 @@
|
|
|
110
110
|
</div>
|
|
111
111
|
</template>
|
|
112
112
|
|
|
113
|
-
<script setup>
|
|
113
|
+
<script setup lang="ts">
|
|
114
114
|
import BreadcrumbsWithButtons from '@/components/BreadcrumbsWithButtons.vue';
|
|
115
115
|
import ResourceListTable from '@/components/ResourceListTable.vue';
|
|
116
116
|
import { useCoreStore } from '@/stores/core';
|
|
117
117
|
import { useFiltersStore } from '@/stores/filters';
|
|
118
118
|
import { callAdminForthApi, currentQuery, getIcon, setQuery } from '@/utils';
|
|
119
|
-
import { computed, onMounted, ref, watch, nextTick } from 'vue';
|
|
119
|
+
import { computed, onMounted, ref, watch, nextTick, type Ref } from 'vue';
|
|
120
120
|
import { useRoute } from 'vue-router';
|
|
121
121
|
import { showErrorTost } from '@/composables/useFrontendApi'
|
|
122
122
|
import { getCustomComponent, initThreeDotsDropdown } from '@/utils';
|
|
@@ -147,7 +147,7 @@ watch(() => sort, async (to, from) => {
|
|
|
147
147
|
filtersStore.setSort(sort.value);
|
|
148
148
|
}, {deep: true});
|
|
149
149
|
|
|
150
|
-
const rows = ref(null);
|
|
150
|
+
const rows: Ref<any[]|null> = ref(null);
|
|
151
151
|
const totalRows = ref(0);
|
|
152
152
|
const checkboxes = ref([]);
|
|
153
153
|
|
|
@@ -186,7 +186,7 @@ async function getList() {
|
|
|
186
186
|
return {}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
async function refreshExistingList(pk) {
|
|
189
|
+
async function refreshExistingList(pk?: any) {
|
|
190
190
|
const currentData = rows.value;
|
|
191
191
|
if (!currentData) {
|
|
192
192
|
throw new Error('No rows loaded yet. Silent refresh is possible only after some rows are loaded. COnsider calling getList() instead first');
|
|
@@ -213,7 +213,7 @@ async function refreshExistingList(pk) {
|
|
|
213
213
|
resourceId: route.params.resourceId,
|
|
214
214
|
filters: [
|
|
215
215
|
{
|
|
216
|
-
field: coreStore.resource
|
|
216
|
+
field: coreStore.resource!.columns.find(c => c.primaryKey)!.name,
|
|
217
217
|
operator: 'in',
|
|
218
218
|
value: pks
|
|
219
219
|
}
|
|
@@ -224,8 +224,8 @@ async function refreshExistingList(pk) {
|
|
|
224
224
|
if (data.error) {
|
|
225
225
|
return data;
|
|
226
226
|
}
|
|
227
|
-
data.data.forEach((row) => {
|
|
228
|
-
const pkKeyName = coreStore.resource
|
|
227
|
+
data.data.forEach((row: any) => {
|
|
228
|
+
const pkKeyName = coreStore.resource!.columns.find(c => c.primaryKey)!.name;
|
|
229
229
|
|
|
230
230
|
const existingRow = currentData.find(r => r._primaryKeyValue === row[pkKeyName]);
|
|
231
231
|
if (existingRow) {
|
|
@@ -287,7 +287,7 @@ class SortQuerySerializer {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
let listAutorefresher: any = null;
|
|
291
291
|
|
|
292
292
|
async function init() {
|
|
293
293
|
|
|
@@ -340,10 +340,10 @@ async function init() {
|
|
|
340
340
|
clearInterval(listAutorefresher);
|
|
341
341
|
listAutorefresher = null;
|
|
342
342
|
}
|
|
343
|
-
if (coreStore.resource
|
|
343
|
+
if (coreStore.resource!.options?.listRowsAutoRefreshSeconds) {
|
|
344
344
|
listAutorefresher = setInterval(async () => {
|
|
345
345
|
await window.adminforth.list.silentRefresh();
|
|
346
|
-
}, coreStore.resource
|
|
346
|
+
}, coreStore.resource!.options.listRowsAutoRefreshSeconds * 1000);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
|
|
@@ -361,7 +361,7 @@ window.adminforth.list.silentRefresh = async () => {
|
|
|
361
361
|
return await refreshExistingList();
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
window.adminforth.list.silentRefreshRow = async (pk) => {
|
|
364
|
+
window.adminforth.list.silentRefreshRow = async (pk: any) => {
|
|
365
365
|
return await refreshExistingList(pk);
|
|
366
366
|
}
|
|
367
367
|
|