adminforth 2.17.0-next.9 → 2.17.1
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/commands/callTsProxy.js +2 -1
- package/commands/createApp/templates/adminuser.ts.hbs +2 -1
- package/commands/createApp/templates/index.ts.hbs +3 -2
- package/commands/createCustomComponent/main.js +0 -3
- package/commands/createCustomComponent/templates/customCrud/afterBreadcrumbs.vue.hbs +4 -2
- package/commands/createCustomComponent/templates/customCrud/beforeActionButtons.vue.hbs +3 -2
- package/commands/createCustomComponent/templates/customCrud/beforeBreadcrumbs.vue.hbs +4 -2
- package/commands/createCustomComponent/templates/customCrud/bottom.vue.hbs +4 -2
- package/commands/createCustomComponent/templates/customCrud/threeDotsDropdownItems.vue.hbs +4 -2
- package/commands/createPlugin/templates/index.ts.hbs +4 -0
- package/dist/auth.d.ts +2 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +17 -10
- package/dist/auth.js.map +1 -1
- package/dist/basePlugin.d.ts +1 -0
- package/dist/basePlugin.d.ts.map +1 -1
- package/dist/basePlugin.js +6 -2
- package/dist/basePlugin.js.map +1 -1
- package/dist/dataConnectors/baseConnector.d.ts +1 -0
- package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
- package/dist/dataConnectors/baseConnector.js +100 -14
- package/dist/dataConnectors/baseConnector.js.map +1 -1
- package/dist/dataConnectors/clickhouse.d.ts +2 -0
- package/dist/dataConnectors/clickhouse.d.ts.map +1 -1
- package/dist/dataConnectors/clickhouse.js +15 -4
- package/dist/dataConnectors/clickhouse.js.map +1 -1
- package/dist/dataConnectors/mongo.d.ts +8 -1
- package/dist/dataConnectors/mongo.d.ts.map +1 -1
- package/dist/dataConnectors/mongo.js +72 -28
- package/dist/dataConnectors/mongo.js.map +1 -1
- package/dist/dataConnectors/mysql.d.ts +2 -0
- package/dist/dataConnectors/mysql.d.ts.map +1 -1
- package/dist/dataConnectors/mysql.js +22 -23
- package/dist/dataConnectors/mysql.js.map +1 -1
- package/dist/dataConnectors/postgres.d.ts +2 -0
- package/dist/dataConnectors/postgres.d.ts.map +1 -1
- package/dist/dataConnectors/postgres.js +23 -26
- package/dist/dataConnectors/postgres.js.map +1 -1
- package/dist/dataConnectors/sqlite.d.ts +2 -0
- package/dist/dataConnectors/sqlite.d.ts.map +1 -1
- package/dist/dataConnectors/sqlite.js +19 -19
- package/dist/dataConnectors/sqlite.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -54
- package/dist/index.js.map +1 -1
- package/dist/modules/codeInjector.d.ts.map +1 -1
- package/dist/modules/codeInjector.js +45 -63
- package/dist/modules/codeInjector.js.map +1 -1
- package/dist/modules/configValidator.d.ts.map +1 -1
- package/dist/modules/configValidator.js +14 -9
- package/dist/modules/configValidator.js.map +1 -1
- package/dist/modules/logger.d.ts +5 -0
- package/dist/modules/logger.d.ts.map +1 -0
- package/dist/modules/logger.js +16 -0
- package/dist/modules/logger.js.map +1 -0
- package/dist/modules/restApi.d.ts.map +1 -1
- package/dist/modules/restApi.js +21 -23
- package/dist/modules/restApi.js.map +1 -1
- package/dist/modules/socketBroker.d.ts.map +1 -1
- package/dist/modules/socketBroker.js +6 -5
- package/dist/modules/socketBroker.js.map +1 -1
- package/dist/modules/styles.js +1 -1
- package/dist/servers/express.d.ts.map +1 -1
- package/dist/servers/express.js +11 -11
- package/dist/servers/express.js.map +1 -1
- package/dist/spa/src/App.vue +6 -3
- package/dist/spa/src/adminforth.ts +60 -1
- package/dist/spa/src/afcl/DatePicker.vue +0 -1
- package/dist/spa/src/afcl/Dropzone.vue +6 -4
- package/dist/spa/src/afcl/Tooltip.vue +38 -4
- package/dist/spa/src/components/ColumnValueInput.vue +14 -1
- package/dist/spa/src/components/CustomDateRangePicker.vue +0 -2
- package/dist/spa/src/components/CustomRangePicker.vue +9 -6
- package/dist/spa/src/components/Filters.vue +4 -4
- package/dist/spa/src/components/ListActionsThreeDots.vue +235 -0
- package/dist/spa/src/components/ResourceForm.vue +4 -4
- package/dist/spa/src/components/ResourceListTable.vue +30 -16
- package/dist/spa/src/components/ResourceListTableVirtual.vue +34 -18
- package/dist/spa/src/components/Sidebar.vue +4 -2
- package/dist/spa/src/components/ThreeDotsMenu.vue +35 -20
- package/dist/spa/src/composables/useFrontendApi.ts +8 -4
- package/dist/spa/src/renderers/CompactField.vue +3 -2
- package/dist/spa/src/renderers/CompactUUID.vue +3 -2
- package/dist/spa/src/stores/core.ts +3 -2
- package/dist/spa/src/types/Back.ts +33 -10
- package/dist/spa/src/types/Common.ts +7 -14
- package/dist/spa/src/types/FrontendAPI.ts +25 -10
- package/dist/spa/src/views/CreateView.vue +23 -31
- package/dist/spa/src/views/EditView.vue +23 -31
- package/dist/spa/src/views/ListView.vue +20 -10
- package/dist/spa/src/views/SettingsView.vue +3 -2
- package/dist/spa/src/views/ShowView.vue +7 -6
- package/dist/types/Back.d.ts +26 -4
- package/dist/types/Back.d.ts.map +1 -1
- package/dist/types/Back.js +6 -0
- package/dist/types/Back.js.map +1 -1
- package/dist/types/Common.d.ts +8 -15
- package/dist/types/Common.d.ts.map +1 -1
- package/dist/types/Common.js +2 -0
- package/dist/types/Common.js.map +1 -1
- package/dist/types/FrontendAPI.d.ts +32 -10
- package/dist/types/FrontendAPI.d.ts.map +1 -1
- package/dist/types/FrontendAPI.js.map +1 -1
- package/package.json +4 -1
- package/commands/createCustomComponent/templates/customCrud/saveButton.vue.hbs +0 -28
|
@@ -8,9 +8,10 @@ export interface FrontendAPIInterface {
|
|
|
8
8
|
* Example:
|
|
9
9
|
*
|
|
10
10
|
* ```ts
|
|
11
|
-
*
|
|
11
|
+
*import { useAdminforth } from '@/adminforth';
|
|
12
12
|
*
|
|
13
|
-
* const
|
|
13
|
+
* const { confirm } = useAdminforth();
|
|
14
|
+
* const isConfirmed = await confirm({message: 'Are you sure?', yes: 'Yes', no: 'No'})
|
|
14
15
|
* if (isConfirmed) {
|
|
15
16
|
* your code...
|
|
16
17
|
* }
|
|
@@ -28,9 +29,10 @@ export interface FrontendAPIInterface {
|
|
|
28
29
|
* Example:
|
|
29
30
|
*
|
|
30
31
|
* ```ts
|
|
31
|
-
* import
|
|
32
|
+
* import { useAdminforth } from '@/adminforth';
|
|
33
|
+
* const { alert } = useAdminforth();
|
|
32
34
|
*
|
|
33
|
-
*
|
|
35
|
+
* alert({message: 'Hello', variant: 'success'})
|
|
34
36
|
* ```
|
|
35
37
|
*
|
|
36
38
|
* @param params - The parameters of the alert
|
|
@@ -72,13 +74,14 @@ export interface FrontendAPIInterface {
|
|
|
72
74
|
* Example:
|
|
73
75
|
*
|
|
74
76
|
* ```ts
|
|
75
|
-
* import
|
|
77
|
+
* import { useAdminforth } from '@/adminforth';
|
|
76
78
|
*
|
|
79
|
+
* const { list } = useAdminforth();
|
|
77
80
|
* // Regular filter (will show in badge if column.showIn.filter !== false)
|
|
78
|
-
*
|
|
81
|
+
* list.setFilter({field: 'name', operator: 'ilike', value: 'john'})
|
|
79
82
|
*
|
|
80
83
|
* // Hidden filter (won't show in badge if column.showIn.filter === false)
|
|
81
|
-
*
|
|
84
|
+
* list.setFilter({field: 'internal_status', operator: 'eq', value: 'active'})
|
|
82
85
|
* ```
|
|
83
86
|
*
|
|
84
87
|
* Please note that you can set/update filter even for fields which have showIn.filter=false in resource configuration.
|
|
@@ -97,9 +100,9 @@ export interface FrontendAPIInterface {
|
|
|
97
100
|
* Example:
|
|
98
101
|
*
|
|
99
102
|
* ```ts
|
|
100
|
-
* import
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
+
* import { useAdminforth } from '@/adminforth';
|
|
104
|
+
* const { list } = useAdminforth();
|
|
105
|
+
* list.updateFilter({field: 'name', operator: 'ilike', value: 'john'})
|
|
103
106
|
* ```
|
|
104
107
|
*
|
|
105
108
|
* @param filter - The filter to update
|
|
@@ -127,6 +130,25 @@ export interface FrontendAPIInterface {
|
|
|
127
130
|
* Close the user menu dropdown
|
|
128
131
|
*/
|
|
129
132
|
closeUserMenuDropdown(): void;
|
|
133
|
+
/**
|
|
134
|
+
* Run save interceptors for a specific resource or all resources if no resourceId is provided
|
|
135
|
+
*/
|
|
136
|
+
runSaveInterceptors(params: {
|
|
137
|
+
action: 'create' | 'edit';
|
|
138
|
+
values: any;
|
|
139
|
+
resource: any;
|
|
140
|
+
resourceId: string;
|
|
141
|
+
}): Promise<{
|
|
142
|
+
ok: boolean;
|
|
143
|
+
error?: string | null;
|
|
144
|
+
extra?: object;
|
|
145
|
+
}>;
|
|
146
|
+
/**
|
|
147
|
+
* Clear save interceptors for a specific resource or all resources if no resourceId is provided
|
|
148
|
+
*
|
|
149
|
+
* @param resourceId - The resource ID to clear interceptors for
|
|
150
|
+
*/
|
|
151
|
+
clearSaveInterceptors(resourceId?: string): void;
|
|
130
152
|
}
|
|
131
153
|
export type ConfirmParams = {
|
|
132
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendAPI.d.ts","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IAEjC
|
|
1
|
+
{"version":3,"file":"FrontendAPI.d.ts","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IAEjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjD;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,MAAM,EAAC,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAG3D,IAAI,EAAE;QAEF;;WAEG;QACH,OAAO,IAAI,OAAO,CAAC;YAAE,KAAK,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;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CAEf,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;IAEnD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CAE3C,CAAA;AAID,oBAAY,YAAY;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendAPI.js","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FrontendAPI.js","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"AA0MA,MAAM,CAAN,IAAY,YAKT;AALH,WAAY,YAAY;IACpB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,6BAAa,CAAA;AACf,CAAC,EALS,YAAY,KAAZ,YAAY,QAKrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminforth",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.1",
|
|
4
4
|
"description": "OpenSource Vue3 powered forth-generation admin panel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -82,6 +82,9 @@
|
|
|
82
82
|
"mysql2": "^3.14.2",
|
|
83
83
|
"node-fetch": "^3.3.2",
|
|
84
84
|
"pg": "^8.11.5",
|
|
85
|
+
"pino": "^10.1.0",
|
|
86
|
+
"pino-pretty": "^13.1.3",
|
|
87
|
+
"private-ip": "^3.0.2",
|
|
85
88
|
"rate-limiter-flexible": "^8.1.0",
|
|
86
89
|
"recast": "^0.23.11",
|
|
87
90
|
"ws": "^8.18.0"
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
class="px-4 py-2 border border-blue-500 text-blue-600 rounded hover:bg-blue-50 disabled:opacity-50"
|
|
4
|
-
:disabled="props.disabled || props.saving || !props.isValid"
|
|
5
|
-
@click="props.saveRecord()"
|
|
6
|
-
>
|
|
7
|
-
<span v-if="props.saving">Saving…</span>
|
|
8
|
-
<span v-else>Save</span>
|
|
9
|
-
</button>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
|
|
14
|
-
const props = defineProps<{
|
|
15
|
-
record: any
|
|
16
|
-
resource: any
|
|
17
|
-
adminUser: any
|
|
18
|
-
meta: any
|
|
19
|
-
saving: boolean
|
|
20
|
-
validating: boolean
|
|
21
|
-
isValid: boolean
|
|
22
|
-
disabled: boolean
|
|
23
|
-
saveRecord: () => Promise<void>
|
|
24
|
-
}>();
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style scoped>
|
|
28
|
-
</style>
|