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.
Files changed (66) hide show
  1. package/dist/basePlugin.d.ts +1 -1
  2. package/dist/basePlugin.d.ts.map +1 -1
  3. package/dist/dataConnectors/baseConnector.d.ts +2 -1
  4. package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
  5. package/dist/dataConnectors/baseConnector.js +1 -1
  6. package/dist/dataConnectors/baseConnector.js.map +1 -1
  7. package/dist/dataConnectors/clickhouse.d.ts +2 -1
  8. package/dist/dataConnectors/clickhouse.d.ts.map +1 -1
  9. package/dist/dataConnectors/clickhouse.js +1 -1
  10. package/dist/dataConnectors/clickhouse.js.map +1 -1
  11. package/dist/dataConnectors/mongo.d.ts +2 -1
  12. package/dist/dataConnectors/mongo.d.ts.map +1 -1
  13. package/dist/dataConnectors/mongo.js +1 -1
  14. package/dist/dataConnectors/mongo.js.map +1 -1
  15. package/dist/dataConnectors/postgres.d.ts +2 -1
  16. package/dist/dataConnectors/postgres.d.ts.map +1 -1
  17. package/dist/dataConnectors/postgres.js +1 -1
  18. package/dist/dataConnectors/postgres.js.map +1 -1
  19. package/dist/dataConnectors/sqlite.d.ts +1 -1
  20. package/dist/dataConnectors/sqlite.d.ts.map +1 -1
  21. package/dist/dataConnectors/sqlite.js +1 -1
  22. package/dist/dataConnectors/sqlite.js.map +1 -1
  23. package/dist/index.d.ts +4 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +3 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/modules/codeInjector.d.ts +1 -1
  28. package/dist/modules/codeInjector.d.ts.map +1 -1
  29. package/dist/modules/configValidator.d.ts +2 -1
  30. package/dist/modules/configValidator.d.ts.map +1 -1
  31. package/dist/modules/configValidator.js +1 -2
  32. package/dist/modules/configValidator.js.map +1 -1
  33. package/dist/modules/operationalResource.d.ts +1 -1
  34. package/dist/modules/operationalResource.d.ts.map +1 -1
  35. package/dist/modules/restApi.d.ts +2 -1
  36. package/dist/modules/restApi.d.ts.map +1 -1
  37. package/dist/modules/restApi.js +1 -1
  38. package/dist/modules/restApi.js.map +1 -1
  39. package/dist/servers/express.d.ts +1 -1
  40. package/dist/servers/express.d.ts.map +1 -1
  41. package/dist/spa/src/composables/useStores.ts +2 -3
  42. package/dist/spa/src/types/Back.ts +1181 -0
  43. package/dist/spa/src/types/Common.ts +702 -0
  44. package/dist/spa/src/types/Commons.ts +702 -0
  45. package/dist/spa/src/types/FrontAndBack.ts +698 -0
  46. package/dist/spa/src/types/FrontendAPI.ts +3 -3
  47. package/dist/spa/src/views/ListView.vue +11 -11
  48. package/dist/types/Back.d.ts +1083 -0
  49. package/dist/types/Back.d.ts.map +1 -0
  50. package/dist/types/Back.js +86 -0
  51. package/dist/types/Back.js.map +1 -0
  52. package/dist/types/Common.d.ts +616 -0
  53. package/dist/types/Common.d.ts.map +1 -0
  54. package/dist/types/Common.js +65 -0
  55. package/dist/types/Common.js.map +1 -0
  56. package/dist/types/Commons.d.ts +616 -0
  57. package/dist/types/Commons.d.ts.map +1 -0
  58. package/dist/types/Commons.js +65 -0
  59. package/dist/types/Commons.js.map +1 -0
  60. package/dist/types/FrontAndBack.d.ts +613 -0
  61. package/dist/types/FrontAndBack.d.ts.map +1 -0
  62. package/dist/types/FrontAndBack.js +62 -0
  63. package/dist/types/FrontAndBack.js.map +1 -0
  64. package/dist/types/FrontendAPI.d.ts +9 -0
  65. package/dist/types/FrontendAPI.d.ts.map +1 -1
  66. 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.columns.find(c => c.primaryKey).name,
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.columns.find(c => c.primaryKey).name;
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
- // let listAutorefresher: any = null;
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.options?.listRowsAutoRefreshSeconds) {
343
+ if (coreStore.resource!.options?.listRowsAutoRefreshSeconds) {
344
344
  listAutorefresher = setInterval(async () => {
345
345
  await window.adminforth.list.silentRefresh();
346
- }, coreStore.resource.options.listRowsAutoRefreshSeconds * 1000);
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