adminforth 2.4.0-next.3 → 2.4.0-next.300
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 +14 -4
- package/commands/cli.js +12 -4
- package/commands/createApp/templates/api.ts.hbs +10 -0
- package/commands/createApp/templates/custom/tsconfig.json.hbs +2 -3
- package/commands/createApp/templates/index.ts.hbs +13 -5
- package/commands/createApp/templates/package.json.hbs +1 -1
- package/commands/createApp/utils.js +45 -7
- package/commands/createCustomComponent/configLoader.js +17 -4
- package/commands/createCustomComponent/configUpdater.js +25 -21
- package/commands/createCustomComponent/fileGenerator.js +1 -1
- package/commands/createCustomComponent/main.js +15 -8
- package/commands/createCustomComponent/templates/customCrud/beforeActionButtons.vue.hbs +38 -0
- package/commands/createCustomComponent/templates/customCrud/saveButton.vue.hbs +28 -0
- package/commands/createCustomComponent/templates/login/beforeLogin.vue.hbs +18 -0
- package/commands/createPlugin/templates/custom/tsconfig.json.hbs +2 -5
- package/commands/createPlugin/templates/package.json.hbs +1 -1
- package/commands/generateModels.js +30 -22
- package/dist/auth.d.ts +9 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +21 -2
- package/dist/auth.js.map +1 -1
- package/dist/dataConnectors/baseConnector.d.ts +1 -1
- package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
- package/dist/dataConnectors/baseConnector.js +69 -17
- package/dist/dataConnectors/baseConnector.js.map +1 -1
- package/dist/dataConnectors/clickhouse.d.ts.map +1 -1
- package/dist/dataConnectors/clickhouse.js +15 -0
- package/dist/dataConnectors/clickhouse.js.map +1 -1
- package/dist/dataConnectors/mongo.d.ts.map +1 -1
- package/dist/dataConnectors/mongo.js +50 -15
- package/dist/dataConnectors/mongo.js.map +1 -1
- package/dist/dataConnectors/mysql.d.ts.map +1 -1
- package/dist/dataConnectors/mysql.js +11 -0
- package/dist/dataConnectors/mysql.js.map +1 -1
- package/dist/dataConnectors/postgres.d.ts.map +1 -1
- package/dist/dataConnectors/postgres.js +43 -14
- package/dist/dataConnectors/postgres.js.map +1 -1
- package/dist/dataConnectors/sqlite.d.ts.map +1 -1
- package/dist/dataConnectors/sqlite.js +11 -0
- package/dist/dataConnectors/sqlite.js.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -21
- package/dist/index.js.map +1 -1
- package/dist/modules/codeInjector.d.ts +2 -0
- package/dist/modules/codeInjector.d.ts.map +1 -1
- package/dist/modules/codeInjector.js +67 -12
- package/dist/modules/codeInjector.js.map +1 -1
- package/dist/modules/configValidator.d.ts +6 -0
- package/dist/modules/configValidator.d.ts.map +1 -1
- package/dist/modules/configValidator.js +203 -25
- package/dist/modules/configValidator.js.map +1 -1
- package/dist/modules/restApi.d.ts +1 -1
- package/dist/modules/restApi.d.ts.map +1 -1
- package/dist/modules/restApi.js +172 -31
- package/dist/modules/restApi.js.map +1 -1
- package/dist/modules/styles.d.ts +499 -13
- package/dist/modules/styles.d.ts.map +1 -1
- package/dist/modules/styles.js +555 -31
- package/dist/modules/styles.js.map +1 -1
- package/dist/modules/utils.d.ts +7 -15
- package/dist/modules/utils.d.ts.map +1 -1
- package/dist/modules/utils.js +45 -68
- package/dist/modules/utils.js.map +1 -1
- package/dist/servers/express.d.ts +5 -0
- package/dist/servers/express.d.ts.map +1 -1
- package/dist/servers/express.js +40 -1
- package/dist/servers/express.js.map +1 -1
- package/dist/spa/index.html +1 -1
- package/dist/spa/package-lock.json +1208 -708
- package/dist/spa/package.json +34 -34
- package/dist/spa/src/App.vue +58 -173
- package/dist/spa/src/adminforth.ts +42 -18
- package/dist/spa/src/afcl/AreaChart.vue +0 -1
- package/dist/spa/src/afcl/BarChart.vue +2 -2
- package/dist/spa/src/afcl/Button.vue +6 -6
- package/dist/spa/src/afcl/ButtonGroup.vue +91 -0
- package/dist/spa/src/afcl/Card.vue +25 -0
- package/dist/spa/src/afcl/Checkbox.vue +21 -13
- package/dist/spa/src/afcl/CountryFlag.vue +4 -1
- package/dist/spa/src/{components/CustomDatePicker.vue → afcl/DatePicker.vue} +95 -9
- package/dist/spa/src/afcl/Dialog.vue +47 -27
- package/dist/spa/src/afcl/Dropzone.vue +103 -44
- package/dist/spa/src/afcl/Input.vue +18 -8
- package/dist/spa/src/afcl/JsonViewer.vue +25 -0
- package/dist/spa/src/afcl/Link.vue +1 -1
- package/dist/spa/src/afcl/LinkButton.vue +3 -3
- package/dist/spa/src/afcl/PieChart.vue +5 -5
- package/dist/spa/src/afcl/ProgressBar.vue +7 -7
- package/dist/spa/src/afcl/Select.vue +82 -34
- package/dist/spa/src/afcl/Skeleton.vue +6 -6
- package/dist/spa/src/afcl/Table.vue +309 -73
- package/dist/spa/src/afcl/Textarea.vue +31 -0
- package/dist/spa/src/afcl/Toggle.vue +32 -0
- package/dist/spa/src/afcl/Tooltip.vue +28 -18
- package/dist/spa/src/afcl/VerticalTabs.vue +16 -7
- package/dist/spa/src/afcl/index.ts +6 -3
- package/dist/spa/src/components/AcceptModal.vue +48 -14
- package/dist/spa/src/components/Breadcrumbs.vue +5 -5
- package/dist/spa/src/components/CallActionWrapper.vue +15 -0
- package/dist/spa/src/components/ColumnValueInput.vue +38 -18
- package/dist/spa/src/components/ColumnValueInputWrapper.vue +4 -3
- package/dist/spa/src/components/CustomDateRangePicker.vue +9 -8
- package/dist/spa/src/components/CustomRangePicker.vue +37 -21
- package/dist/spa/src/components/ErrorMessage.vue +21 -0
- package/dist/spa/src/components/Filters.vue +194 -131
- package/dist/spa/src/components/GroupsTable.vue +9 -8
- package/dist/spa/src/components/MenuLink.vue +90 -23
- package/dist/spa/src/components/ResourceForm.vue +94 -51
- package/dist/spa/src/components/ResourceListTable.vue +120 -90
- package/dist/spa/src/components/ResourceListTableVirtual.vue +118 -84
- package/dist/spa/src/components/ShowTable.vue +21 -15
- package/dist/spa/src/components/Sidebar.vue +470 -0
- package/dist/spa/src/components/SingleSkeletLoader.vue +6 -6
- package/dist/spa/src/components/SkeleteLoader.vue +3 -3
- package/dist/spa/src/components/ThreeDotsMenu.vue +84 -15
- package/dist/spa/src/components/Toast.vue +40 -29
- package/dist/spa/src/components/UserMenuSettingsButton.vue +69 -0
- package/dist/spa/src/components/ValueRenderer.vue +44 -17
- package/dist/spa/src/controls/BoolToggle.vue +34 -0
- package/dist/spa/src/i18n.ts +5 -3
- package/dist/spa/src/main.ts +1 -1
- package/dist/spa/src/renderers/CompactField.vue +1 -1
- package/dist/spa/src/renderers/CompactUUID.vue +1 -1
- package/dist/spa/src/router/index.ts +8 -0
- package/dist/spa/src/shims-vue.d.ts +5 -0
- package/dist/spa/src/spa_types/core.ts +13 -1
- package/dist/spa/src/stores/core.ts +13 -1
- package/dist/spa/src/stores/filters.ts +33 -2
- package/dist/spa/src/stores/modal.ts +6 -1
- package/dist/spa/src/stores/toast.ts +22 -3
- package/dist/spa/src/types/Back.ts +164 -23
- package/dist/spa/src/types/Common.ts +92 -32
- package/dist/spa/src/types/FrontendAPI.ts +31 -5
- package/dist/spa/src/types/adapters/CaptchaAdapter.ts +34 -0
- package/dist/spa/src/types/adapters/CompletionAdapter.ts +25 -0
- package/dist/spa/src/types/adapters/EmailAdapter.ts +27 -0
- package/dist/spa/src/types/adapters/ImageGenerationAdapter.ts +50 -0
- package/dist/spa/src/types/adapters/ImageVisionAdapter.ts +30 -0
- package/dist/spa/src/types/adapters/KeyValueAdapter.ts +16 -0
- package/dist/spa/src/types/adapters/OAuth2Adapter.ts +34 -0
- package/dist/spa/src/types/adapters/StorageAdapter.ts +73 -0
- package/dist/spa/src/types/adapters/index.ts +8 -0
- package/dist/spa/src/utils.ts +291 -11
- package/dist/spa/src/views/CreateView.vue +63 -21
- package/dist/spa/src/views/EditView.vue +55 -22
- package/dist/spa/src/views/ListView.vue +144 -87
- package/dist/spa/src/views/LoginView.vue +60 -55
- package/dist/spa/src/views/ResourceParent.vue +2 -2
- package/dist/spa/src/views/SettingsView.vue +121 -0
- package/dist/spa/src/views/ShowView.vue +83 -53
- package/dist/spa/src/websocket.ts +6 -1
- package/dist/spa/tsconfig.app.json +1 -1
- package/dist/spa/vite.config.ts +45 -2
- package/dist/types/Back.d.ts +147 -14
- package/dist/types/Back.d.ts.map +1 -1
- package/dist/types/Back.js +15 -0
- package/dist/types/Back.js.map +1 -1
- package/dist/types/Common.d.ts +107 -29
- package/dist/types/Common.d.ts.map +1 -1
- package/dist/types/Common.js.map +1 -1
- package/dist/types/FrontendAPI.d.ts +31 -3
- package/dist/types/FrontendAPI.d.ts.map +1 -1
- package/dist/types/FrontendAPI.js.map +1 -1
- package/dist/types/adapters/CaptchaAdapter.d.ts +30 -0
- package/dist/types/adapters/CaptchaAdapter.d.ts.map +1 -0
- package/dist/types/adapters/CaptchaAdapter.js +5 -0
- package/dist/types/adapters/CaptchaAdapter.js.map +1 -0
- package/dist/types/adapters/CompletionAdapter.d.ts +20 -0
- package/dist/types/adapters/CompletionAdapter.d.ts.map +1 -0
- package/dist/types/adapters/CompletionAdapter.js +2 -0
- package/dist/types/adapters/CompletionAdapter.js.map +1 -0
- package/dist/types/adapters/EmailAdapter.d.ts +20 -0
- package/dist/types/adapters/EmailAdapter.d.ts.map +1 -0
- package/dist/types/adapters/EmailAdapter.js +2 -0
- package/dist/types/adapters/EmailAdapter.js.map +1 -0
- package/dist/types/adapters/ImageGenerationAdapter.d.ts +37 -0
- package/dist/types/adapters/ImageGenerationAdapter.d.ts.map +1 -0
- package/dist/types/adapters/ImageGenerationAdapter.js +2 -0
- package/dist/types/adapters/ImageGenerationAdapter.js.map +1 -0
- package/dist/types/adapters/ImageVisionAdapter.d.ts +25 -0
- package/dist/types/adapters/ImageVisionAdapter.d.ts.map +1 -0
- package/dist/types/adapters/ImageVisionAdapter.js +2 -0
- package/dist/types/adapters/ImageVisionAdapter.js.map +1 -0
- package/dist/types/adapters/KeyValueAdapter.d.ts +10 -0
- package/dist/types/adapters/KeyValueAdapter.d.ts.map +1 -0
- package/dist/types/adapters/KeyValueAdapter.js +2 -0
- package/dist/types/adapters/KeyValueAdapter.js.map +1 -0
- package/dist/types/adapters/OAuth2Adapter.d.ts +32 -0
- package/dist/types/adapters/OAuth2Adapter.d.ts.map +1 -0
- package/dist/types/adapters/OAuth2Adapter.js +2 -0
- package/dist/types/adapters/OAuth2Adapter.js.map +1 -0
- package/dist/types/adapters/StorageAdapter.d.ts +63 -0
- package/dist/types/adapters/StorageAdapter.d.ts.map +1 -0
- package/dist/types/adapters/StorageAdapter.js +2 -0
- package/dist/types/adapters/StorageAdapter.js.map +1 -0
- package/dist/types/adapters/index.d.ts +9 -0
- package/dist/types/adapters/index.d.ts.map +1 -0
- package/dist/types/adapters/index.js +2 -0
- package/dist/types/adapters/index.js.map +1 -0
- package/package.json +4 -2
- package/dist/spa/src/types/Adapters.ts +0 -213
- package/dist/types/Adapters.d.ts +0 -168
- package/dist/types/Adapters.d.ts.map +0 -1
- package/dist/types/Adapters.js +0 -2
- package/dist/types/Adapters.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Express } from 'express';
|
|
1
|
+
import type { Express, Request } from 'express';
|
|
2
2
|
import type { Writable } from 'stream';
|
|
3
3
|
|
|
4
4
|
import { ActionCheckSource, AdminForthFilterOperators, AdminForthSortDirections, AllowedActionsEnum,
|
|
@@ -8,12 +8,12 @@ import { ActionCheckSource, AdminForthFilterOperators, AdminForthSortDirections,
|
|
|
8
8
|
type AdminForthBulkActionCommon,
|
|
9
9
|
type AdminForthForeignResourceCommon,
|
|
10
10
|
type AdminForthResourceColumnCommon,
|
|
11
|
-
AdminForthResourceInputCommon,
|
|
12
|
-
AdminForthComponentDeclarationFull,
|
|
13
|
-
AdminForthConfigMenuItem,
|
|
14
|
-
AnnouncementBadgeResponse,
|
|
11
|
+
type AdminForthResourceInputCommon,
|
|
12
|
+
type AdminForthComponentDeclarationFull,
|
|
13
|
+
type AdminForthConfigMenuItem,
|
|
14
|
+
type AnnouncementBadgeResponse,
|
|
15
15
|
AdminForthResourcePages,
|
|
16
|
-
AdminForthResourceColumnInputCommon,
|
|
16
|
+
type AdminForthResourceColumnInputCommon,
|
|
17
17
|
} from './Common.js';
|
|
18
18
|
|
|
19
19
|
export interface ICodeInjector {
|
|
@@ -22,12 +22,13 @@ export interface ICodeInjector {
|
|
|
22
22
|
devServerPort: number;
|
|
23
23
|
|
|
24
24
|
getServeDir(): string;
|
|
25
|
-
|
|
25
|
+
registerCustomComponent(filePath: string): void;
|
|
26
26
|
spaTmpPath(): string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface IConfigValidator {
|
|
30
30
|
validateConfig(): void;
|
|
31
|
+
validateAfterPluginsActivation(): void;
|
|
31
32
|
postProcessAfterDiscover(resource: AdminForthResource): void;
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -92,19 +93,36 @@ export interface IExpressHttpServer extends IHttpServer {
|
|
|
92
93
|
* Adds adminUser to request object if user is authorized. Drops request with 401 status if user is not authorized.
|
|
93
94
|
* @param callable : Function which will be called if user is authorized.
|
|
94
95
|
*
|
|
95
|
-
* Example:
|
|
96
96
|
*
|
|
97
|
+
* @example
|
|
97
98
|
* ```ts
|
|
98
|
-
* expressApp.get('/myApi', authorize((req, res) =>
|
|
99
|
+
* expressApp.get('/myApi', authorize((req, res) => {
|
|
99
100
|
* console.log('User is authorized', req.adminUser);
|
|
100
|
-
* res.json(
|
|
101
|
-
*
|
|
102
|
-
*
|
|
101
|
+
* res.json({ message: 'Hello World' });
|
|
102
|
+
* }));
|
|
103
|
+
* ```
|
|
103
104
|
*
|
|
104
|
-
*/
|
|
105
|
+
*/
|
|
105
106
|
authorize(callable: Function): void;
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
export interface ITranslateFunction {
|
|
110
|
+
(
|
|
111
|
+
msg: string,
|
|
112
|
+
category: string,
|
|
113
|
+
params: any,
|
|
114
|
+
pluralizationNumber?: number
|
|
115
|
+
): Promise<string>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Omit <Request, 'param'> is used to remove 'param' method from Request type for correct docs generation
|
|
119
|
+
export interface IAdminUserExpressRequest extends Omit<Request, 'protocol' | 'param' | 'unshift'> {
|
|
120
|
+
adminUser: AdminUser;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ITranslateExpressRequest extends Omit<Request, 'protocol' | 'param' | 'unshift'> {
|
|
124
|
+
tr: ITranslateFunction;
|
|
125
|
+
}
|
|
108
126
|
|
|
109
127
|
export interface IAdminForthSingleFilter {
|
|
110
128
|
field?: string;
|
|
@@ -113,7 +131,9 @@ export interface IAdminForthSingleFilter {
|
|
|
113
131
|
| AdminForthFilterOperators.LTE | AdminForthFilterOperators.LIKE | AdminForthFilterOperators.ILIKE
|
|
114
132
|
| AdminForthFilterOperators.IN | AdminForthFilterOperators.NIN;
|
|
115
133
|
value?: any;
|
|
134
|
+
rightField?: string;
|
|
116
135
|
insecureRawSQL?: string;
|
|
136
|
+
insecureRawNoSQL?: any;
|
|
117
137
|
}
|
|
118
138
|
export interface IAdminForthAndOrFilter {
|
|
119
139
|
operator: AdminForthFilterOperators.AND | AdminForthFilterOperators.OR;
|
|
@@ -287,6 +307,10 @@ export interface IAdminForthAuth {
|
|
|
287
307
|
|
|
288
308
|
removeCustomCookie({response, name}: {response: any, name: string}): void;
|
|
289
309
|
|
|
310
|
+
setCustomCookie({response, payload}: {response: any, payload: {name: string, value: string, expiry: number, expirySeconds: number, httpOnly: boolean}}): void;
|
|
311
|
+
|
|
312
|
+
getCustomCookie({cookies, name}: {cookies: {key: string, value: string}[], name: string}): string | null;
|
|
313
|
+
|
|
290
314
|
setAuthCookie({expireInDays, response, username, pk,}: {expireInDays?: number, response: any, username: string, pk: string}): void;
|
|
291
315
|
|
|
292
316
|
removeAuthCookie(response: any): void;
|
|
@@ -336,10 +360,11 @@ export interface IAdminForth {
|
|
|
336
360
|
|
|
337
361
|
createResourceRecord(
|
|
338
362
|
params: { resource: AdminForthResource, record: any, adminUser: AdminUser, extra?: HttpExtra }
|
|
339
|
-
): Promise<{ error?: string, createdRecord?: any }>;
|
|
363
|
+
): Promise<{ error?: string, createdRecord?: any, newRecordId?: any }>;
|
|
340
364
|
|
|
341
365
|
updateResourceRecord(
|
|
342
|
-
params: { resource: AdminForthResource, recordId: any, record: any, oldRecord: any, adminUser: AdminUser, extra?: HttpExtra }
|
|
366
|
+
params: { resource: AdminForthResource, recordId: any, record: any, oldRecord: any, adminUser: AdminUser, extra?: HttpExtra, updates?: never }
|
|
367
|
+
| { resource: AdminForthResource, recordId: any, record?: never, oldRecord: any, adminUser: AdminUser, extra?: HttpExtra, updates: any }
|
|
343
368
|
): Promise<{ error?: string }>;
|
|
344
369
|
|
|
345
370
|
deleteResourceRecord(
|
|
@@ -474,7 +499,7 @@ export type BeforeDataSourceRequestFunction = (params: {
|
|
|
474
499
|
requestUrl: string,
|
|
475
500
|
},
|
|
476
501
|
adminforth: IAdminForth,
|
|
477
|
-
}) => Promise<{ok: boolean, error?: string}>;
|
|
502
|
+
}) => Promise<{ok: boolean, error?: string, newRecordId?: string}>;
|
|
478
503
|
|
|
479
504
|
/**
|
|
480
505
|
* Modify response to change how data is returned after fetching from database.
|
|
@@ -525,7 +550,7 @@ export type BeforeEditSaveFunction = (params: {
|
|
|
525
550
|
oldRecord: any,
|
|
526
551
|
adminforth: IAdminForth,
|
|
527
552
|
extra?: HttpExtra,
|
|
528
|
-
}) => Promise<{ok: boolean, error?: string}>;
|
|
553
|
+
}) => Promise<{ok: boolean, error?: string | null}>;
|
|
529
554
|
|
|
530
555
|
|
|
531
556
|
|
|
@@ -535,7 +560,7 @@ export type BeforeCreateSaveFunction = (params: {
|
|
|
535
560
|
record: any,
|
|
536
561
|
adminforth: IAdminForth,
|
|
537
562
|
extra?: HttpExtra,
|
|
538
|
-
}) => Promise<{ok: boolean, error?: string}>;
|
|
563
|
+
}) => Promise<{ok: boolean, error?: string | null, newRecordId?: string}>;
|
|
539
564
|
|
|
540
565
|
export type AfterCreateSaveFunction = (params: {
|
|
541
566
|
resource: AdminForthResource,
|
|
@@ -579,6 +604,7 @@ export type BeforeLoginConfirmationFunction = (params?: {
|
|
|
579
604
|
response: IAdminForthHttpResponse,
|
|
580
605
|
adminforth: IAdminForth,
|
|
581
606
|
extra?: HttpExtra,
|
|
607
|
+
rememberMeDays?: number,
|
|
582
608
|
}) => Promise<{
|
|
583
609
|
error?: string,
|
|
584
610
|
body: {
|
|
@@ -587,6 +613,19 @@ export type BeforeLoginConfirmationFunction = (params?: {
|
|
|
587
613
|
}
|
|
588
614
|
}>;
|
|
589
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Allow to make extra authorization
|
|
618
|
+
*/
|
|
619
|
+
export type AdminUserAuthorizeFunction = ((params?: {
|
|
620
|
+
adminUser: AdminUser,
|
|
621
|
+
response: IAdminForthHttpResponse,
|
|
622
|
+
adminforth: IAdminForth,
|
|
623
|
+
extra?: HttpExtra,
|
|
624
|
+
}) => Promise<{
|
|
625
|
+
error?: string,
|
|
626
|
+
allowed?: boolean,
|
|
627
|
+
}>);
|
|
628
|
+
|
|
590
629
|
|
|
591
630
|
/**
|
|
592
631
|
* Data source describes database connection which will be used to fetch data for resources.
|
|
@@ -619,12 +658,23 @@ interface AdminForthInputConfigCustomization {
|
|
|
619
658
|
*/
|
|
620
659
|
brandName?: string,
|
|
621
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Whether to use single theme for the app
|
|
663
|
+
*/
|
|
664
|
+
singleTheme?: 'light' | 'dark',
|
|
665
|
+
|
|
622
666
|
/**
|
|
623
667
|
* Whether to show brand name in sidebar
|
|
624
668
|
* default is true
|
|
625
669
|
*/
|
|
626
670
|
showBrandNameInSidebar?: boolean,
|
|
627
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Whether to show brand logo in sidebar
|
|
674
|
+
* default is true
|
|
675
|
+
*/
|
|
676
|
+
showBrandLogoInSidebar?: boolean,
|
|
677
|
+
|
|
628
678
|
/**
|
|
629
679
|
* Path to your app logo
|
|
630
680
|
*
|
|
@@ -638,6 +688,19 @@ interface AdminForthInputConfigCustomization {
|
|
|
638
688
|
*/
|
|
639
689
|
brandLogo?: string,
|
|
640
690
|
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Path to your app logo for icon only sidebar
|
|
694
|
+
*
|
|
695
|
+
* Example:
|
|
696
|
+
* Place file `logo.svg` to `./custom` folder and set this option:
|
|
697
|
+
*
|
|
698
|
+
*/
|
|
699
|
+
iconOnlySidebar?: {
|
|
700
|
+
logo?: string,
|
|
701
|
+
enabled?: boolean,
|
|
702
|
+
},
|
|
703
|
+
|
|
641
704
|
/**
|
|
642
705
|
* Path to your app favicon
|
|
643
706
|
*
|
|
@@ -747,6 +810,8 @@ interface AdminForthInputConfigCustomization {
|
|
|
747
810
|
*/
|
|
748
811
|
loginPageInjections?: {
|
|
749
812
|
underInputs?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
813
|
+
underLoginButton?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
814
|
+
panelHeader?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
750
815
|
}
|
|
751
816
|
|
|
752
817
|
/**
|
|
@@ -756,8 +821,20 @@ interface AdminForthInputConfigCustomization {
|
|
|
756
821
|
userMenu?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
757
822
|
header?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
758
823
|
sidebar?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
824
|
+
sidebarTop?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
759
825
|
everyPageBottom?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
760
826
|
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Allows adding custom elements (e.g., <link>, <script>, <meta>) to the <head> of the HTML document.
|
|
830
|
+
* Each item must include a tag name and a set of attributes.
|
|
831
|
+
*/
|
|
832
|
+
customHeadItems?: {
|
|
833
|
+
tagName: string;
|
|
834
|
+
attributes: Record<string, string | boolean>;
|
|
835
|
+
innerCode?: string;
|
|
836
|
+
}[];
|
|
837
|
+
|
|
761
838
|
}
|
|
762
839
|
|
|
763
840
|
export interface AdminForthActionInput {
|
|
@@ -786,6 +863,7 @@ export interface AdminForthActionInput {
|
|
|
786
863
|
}>;
|
|
787
864
|
icon?: string;
|
|
788
865
|
id?: string;
|
|
866
|
+
customComponent?: AdminForthComponentDeclaration;
|
|
789
867
|
}
|
|
790
868
|
|
|
791
869
|
export interface AdminForthResourceInput extends Omit<NonNullable<AdminForthResourceInputCommon>, 'columns' | 'hooks' | 'options'> {
|
|
@@ -934,12 +1012,24 @@ export interface AdminForthInputConfig {
|
|
|
934
1012
|
*/
|
|
935
1013
|
loginBackgroundPosition?: 'over' | '1/2' | '1/3' | '2/3' | '3/4' | '2/5' | '3/5',
|
|
936
1014
|
|
|
1015
|
+
/**
|
|
1016
|
+
* If true, background blend mode will be removed from login background image when position is 'over'
|
|
1017
|
+
*
|
|
1018
|
+
* Default: false
|
|
1019
|
+
*/
|
|
1020
|
+
removeBackgroundBlendMode?: boolean,
|
|
1021
|
+
|
|
937
1022
|
/**
|
|
938
1023
|
* Function or functions which will be called before user try to login.
|
|
939
1024
|
* Each function will resive User object as an argument
|
|
940
1025
|
*/
|
|
941
1026
|
beforeLoginConfirmation?: BeforeLoginConfirmationFunction | Array<BeforeLoginConfirmationFunction>,
|
|
942
1027
|
|
|
1028
|
+
/**
|
|
1029
|
+
* Array of functions which will be called before any request to AdminForth API.
|
|
1030
|
+
*/
|
|
1031
|
+
adminUserAuthorize?: AdminUserAuthorizeFunction | Array<AdminUserAuthorizeFunction>,
|
|
1032
|
+
|
|
943
1033
|
/**
|
|
944
1034
|
* Optionally if your users table has a field(column) with full name, you can set it here.
|
|
945
1035
|
* This field will be used to display user name in the top right corner of the admin panel.
|
|
@@ -955,7 +1045,7 @@ export interface AdminForthInputConfig {
|
|
|
955
1045
|
/**
|
|
956
1046
|
* Any prompt to show users on login. Supports HTML.
|
|
957
1047
|
*/
|
|
958
|
-
loginPromptHTML?: string
|
|
1048
|
+
loginPromptHTML?: string | (() => string | void | undefined | Promise<string | void | undefined>) | undefined
|
|
959
1049
|
|
|
960
1050
|
/**
|
|
961
1051
|
* Remember me days for "Remember Me" checkbox on login page.
|
|
@@ -987,6 +1077,16 @@ export interface AdminForthInputConfig {
|
|
|
987
1077
|
* If you are using Cloudflare, set this to 'CF-Connecting-IP'. Case-insensitive.
|
|
988
1078
|
*/
|
|
989
1079
|
clientIpHeader?: string,
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Add custom page to the settings page
|
|
1083
|
+
*/
|
|
1084
|
+
userMenuSettingsPages: {
|
|
1085
|
+
icon?: string,
|
|
1086
|
+
pageLabel: string,
|
|
1087
|
+
slug?: string,
|
|
1088
|
+
component: string
|
|
1089
|
+
}[],
|
|
990
1090
|
},
|
|
991
1091
|
|
|
992
1092
|
/**
|
|
@@ -1054,14 +1154,24 @@ export interface AdminForthConfigCustomization extends Omit<AdminForthInputConfi
|
|
|
1054
1154
|
|
|
1055
1155
|
loginPageInjections: {
|
|
1056
1156
|
underInputs: Array<AdminForthComponentDeclarationFull>,
|
|
1157
|
+
underLoginButton?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
1158
|
+
panelHeader: Array<AdminForthComponentDeclarationFull>,
|
|
1057
1159
|
},
|
|
1058
1160
|
|
|
1059
1161
|
globalInjections: {
|
|
1060
1162
|
userMenu: Array<AdminForthComponentDeclarationFull>,
|
|
1061
1163
|
header: Array<AdminForthComponentDeclarationFull>,
|
|
1062
1164
|
sidebar: Array<AdminForthComponentDeclarationFull>,
|
|
1165
|
+
sidebarTop: Array<AdminForthComponentDeclarationFull>,
|
|
1063
1166
|
everyPageBottom: Array<AdminForthComponentDeclarationFull>,
|
|
1064
1167
|
},
|
|
1168
|
+
|
|
1169
|
+
customHeadItems?: {
|
|
1170
|
+
tagName: string;
|
|
1171
|
+
attributes: Record<string, string | boolean>;
|
|
1172
|
+
innerCode?: string;
|
|
1173
|
+
}[];
|
|
1174
|
+
|
|
1065
1175
|
}
|
|
1066
1176
|
|
|
1067
1177
|
export interface AdminForthConfig extends Omit<AdminForthInputConfig, 'customization' | 'resources'> {
|
|
@@ -1109,6 +1219,21 @@ export class Filters {
|
|
|
1109
1219
|
static LIKE(field: string, value: any): IAdminForthSingleFilter {
|
|
1110
1220
|
return { field, operator: AdminForthFilterOperators.LIKE, value };
|
|
1111
1221
|
}
|
|
1222
|
+
static ILIKE(field: string, value: any): IAdminForthSingleFilter {
|
|
1223
|
+
return { field, operator: AdminForthFilterOperators.ILIKE, value };
|
|
1224
|
+
}
|
|
1225
|
+
static GT_FIELD(leftField: string, rightField: string): IAdminForthSingleFilter {
|
|
1226
|
+
return { field: leftField, operator: AdminForthFilterOperators.GT, rightField };
|
|
1227
|
+
}
|
|
1228
|
+
static GTE_FIELD(leftField: string, rightField: string): IAdminForthSingleFilter {
|
|
1229
|
+
return { field: leftField, operator: AdminForthFilterOperators.GTE, rightField };
|
|
1230
|
+
}
|
|
1231
|
+
static LT_FIELD(leftField: string, rightField: string): IAdminForthSingleFilter {
|
|
1232
|
+
return { field: leftField, operator: AdminForthFilterOperators.LT, rightField };
|
|
1233
|
+
}
|
|
1234
|
+
static LTE_FIELD(leftField: string, rightField: string): IAdminForthSingleFilter {
|
|
1235
|
+
return { field: leftField, operator: AdminForthFilterOperators.LTE, rightField };
|
|
1236
|
+
}
|
|
1112
1237
|
static AND(
|
|
1113
1238
|
...args: (IAdminForthSingleFilter | IAdminForthAndOrFilter | Array<IAdminForthSingleFilter | IAdminForthAndOrFilter>)[]
|
|
1114
1239
|
): IAdminForthAndOrFilter {
|
|
@@ -1316,9 +1441,13 @@ export interface AdminForthResource extends Omit<AdminForthResourceInput, 'optio
|
|
|
1316
1441
|
},
|
|
1317
1442
|
create?: {
|
|
1318
1443
|
/**
|
|
1444
|
+
* Should return `ok: true` to continue saving pipeline and allow creating record in database, and `ok: false` to interrupt pipeline and prevent record creation.
|
|
1445
|
+
* If you need to show error on UI, set `error: \<error message\>` in response.
|
|
1446
|
+
*
|
|
1319
1447
|
* Typical use-cases:
|
|
1320
|
-
* -
|
|
1321
|
-
* -
|
|
1448
|
+
* - Create record by custom code (return `{ ok: false, newRecordId: <id of created record from custom code> }`)
|
|
1449
|
+
* - Validate record before saving to database and interrupt execution if validation failed (return `{ ok: false, error: <validation error> }`), though `allowedActions.create` should be preferred in most cases
|
|
1450
|
+
* - fill-in adminUser as creator of record (set `record.<some field> = x; return \{ ok: true \}`)
|
|
1322
1451
|
* - Attach additional data to record before saving to database (mostly fillOnCreate should be used instead)
|
|
1323
1452
|
*/
|
|
1324
1453
|
beforeSave?: Array<BeforeCreateSaveFunction>,
|
|
@@ -1469,15 +1598,27 @@ export type ShowInInput = ShowInModernInput | ShowInLegacyInput;
|
|
|
1469
1598
|
export type ShowIn = {
|
|
1470
1599
|
[key in AdminForthResourcePages]: AllowedActionValue
|
|
1471
1600
|
}
|
|
1601
|
+
export type BackendOnlyInput =
|
|
1602
|
+
| boolean
|
|
1603
|
+
| ((p: {
|
|
1604
|
+
adminUser: AdminUser;
|
|
1605
|
+
resource: AdminForthResource;
|
|
1606
|
+
meta: any;
|
|
1607
|
+
source: ActionCheckSource;
|
|
1608
|
+
adminforth: IAdminForth;
|
|
1609
|
+
}) => boolean | Promise<boolean>);
|
|
1610
|
+
|
|
1472
1611
|
|
|
1473
|
-
export interface AdminForthResourceColumnInput extends Omit<AdminForthResourceColumnInputCommon, 'showIn'> {
|
|
1612
|
+
export interface AdminForthResourceColumnInput extends Omit<AdminForthResourceColumnInputCommon, 'showIn' | 'backendOnly'> {
|
|
1474
1613
|
showIn?: ShowInInput,
|
|
1475
1614
|
foreignResource?: AdminForthForeignResource,
|
|
1615
|
+
backendOnly?: BackendOnlyInput;
|
|
1476
1616
|
}
|
|
1477
1617
|
|
|
1478
|
-
export interface AdminForthResourceColumn extends Omit<AdminForthResourceColumnCommon, 'showIn'> {
|
|
1618
|
+
export interface AdminForthResourceColumn extends Omit<AdminForthResourceColumnCommon, 'showIn' | 'backendOnly'> {
|
|
1479
1619
|
showIn?: ShowIn,
|
|
1480
1620
|
foreignResource?: AdminForthForeignResource,
|
|
1621
|
+
backendOnly?: BackendOnlyInput;
|
|
1481
1622
|
}
|
|
1482
1623
|
|
|
1483
1624
|
export interface IWebSocketClient {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* Types that are common for both frontend side (SPA) and backend side (server).
|
|
4
3
|
*/
|
|
@@ -68,6 +67,11 @@ export type AllowedActionsResolved = {
|
|
|
68
67
|
[key in AllowedActionsEnum]: boolean
|
|
69
68
|
}
|
|
70
69
|
|
|
70
|
+
// conditional operators for predicates
|
|
71
|
+
type Value = any;
|
|
72
|
+
type Operators = { $eq: Value } | { $not: Value } | { $gt: Value } | { $gte: Value } | { $lt: Value } | { $lte: Value } | { $in: Value[] } | { $nin: Value[] } | { $includes: Value } | { $nincludes: Value };
|
|
73
|
+
export type Predicate = { $and: Predicate[] } | { $or: Predicate[] } | { [key: string]: Operators | Value };
|
|
74
|
+
|
|
71
75
|
export interface AdminUser {
|
|
72
76
|
/**
|
|
73
77
|
* primaryKey field value of user in table which is defined by {@link AdminForthConfig.auth.usersResourceId}
|
|
@@ -95,12 +99,9 @@ export interface AdminForthBulkActionCommon {
|
|
|
95
99
|
label: string,
|
|
96
100
|
|
|
97
101
|
/**
|
|
98
|
-
*
|
|
99
|
-
* * 'danger' - red button
|
|
100
|
-
* * 'success' - green button
|
|
101
|
-
* * 'active' - blue button
|
|
102
|
+
* Add custom class
|
|
102
103
|
**/
|
|
103
|
-
|
|
104
|
+
buttonCustomCssClass?: string;
|
|
104
105
|
|
|
105
106
|
/**
|
|
106
107
|
* Optional small badge for button which will be displayed in the list view
|
|
@@ -122,6 +123,10 @@ export interface AdminForthBulkActionCommon {
|
|
|
122
123
|
*/
|
|
123
124
|
successMessage?: string,
|
|
124
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Show in three dots dropdown menu in list view.
|
|
128
|
+
*/
|
|
129
|
+
showInThreeDotsDropdown?: boolean,
|
|
125
130
|
}
|
|
126
131
|
|
|
127
132
|
export interface AdminForthFieldComponents {
|
|
@@ -261,11 +266,29 @@ export interface AdminForthComponentDeclarationFull {
|
|
|
261
266
|
* </script>
|
|
262
267
|
*
|
|
263
268
|
*/
|
|
264
|
-
meta?:
|
|
269
|
+
meta?: {
|
|
270
|
+
/**
|
|
271
|
+
* Controls sidebar and header visibility for custom pages
|
|
272
|
+
* - 'default': Show both sidebar and header (default behavior)
|
|
273
|
+
* - 'none': Hide both sidebar and header (full custom layout)
|
|
274
|
+
* - 'preferIconOnly': Show header but prefer icon-only sidebar
|
|
275
|
+
*/
|
|
276
|
+
sidebarAndHeader?: 'default' | 'none' | 'preferIconOnly',
|
|
277
|
+
|
|
278
|
+
[key: string]: any,
|
|
279
|
+
}
|
|
265
280
|
}
|
|
281
|
+
import { type AdminForthActionInput } from './Back.js'
|
|
282
|
+
export { type AdminForthActionInput } from './Back.js'
|
|
266
283
|
|
|
267
284
|
export type AdminForthComponentDeclaration = AdminForthComponentDeclarationFull | string;
|
|
268
285
|
|
|
286
|
+
export type FieldGroup = {
|
|
287
|
+
groupName: string;
|
|
288
|
+
columns: string[];
|
|
289
|
+
noTitle?: boolean;
|
|
290
|
+
};
|
|
291
|
+
|
|
269
292
|
/**
|
|
270
293
|
* Resource describes one table or collection in database.
|
|
271
294
|
* AdminForth generates set of pages for 'list', 'show', 'edit', 'create', 'filter' operations for each resource.
|
|
@@ -347,6 +370,11 @@ export interface AdminForthResourceInputCommon {
|
|
|
347
370
|
direction: AdminForthSortDirections | string,
|
|
348
371
|
}
|
|
349
372
|
|
|
373
|
+
/*
|
|
374
|
+
* Custom actions list. Actions available in show, edit and create views.
|
|
375
|
+
*/
|
|
376
|
+
actions?: AdminForthActionInput[],
|
|
377
|
+
|
|
350
378
|
/**
|
|
351
379
|
* Custom bulk actions list. Bulk actions available in list view when user selects multiple records by
|
|
352
380
|
* using checkboxes.
|
|
@@ -374,26 +402,10 @@ export interface AdminForthResourceInputCommon {
|
|
|
374
402
|
/**
|
|
375
403
|
* Allows to make groups of columns in show, create and edit resource pages.
|
|
376
404
|
*/
|
|
377
|
-
fieldGroups?:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}[];
|
|
382
|
-
createFieldGroups?: {
|
|
383
|
-
groupName: string;
|
|
384
|
-
columns: string[];
|
|
385
|
-
noTitle?: boolean;
|
|
386
|
-
}[];
|
|
387
|
-
editFieldGroups?: {
|
|
388
|
-
groupName: string;
|
|
389
|
-
columns: string[];
|
|
390
|
-
noTitle?: boolean;
|
|
391
|
-
}[];
|
|
392
|
-
showFieldGroups?: {
|
|
393
|
-
groupName: string;
|
|
394
|
-
columns: string[];
|
|
395
|
-
noTitle?: boolean;
|
|
396
|
-
}[];
|
|
405
|
+
fieldGroups?: FieldGroup[];
|
|
406
|
+
createFieldGroups?: FieldGroup[];
|
|
407
|
+
editFieldGroups?: FieldGroup[];
|
|
408
|
+
showFieldGroups?: FieldGroup[];
|
|
397
409
|
|
|
398
410
|
/**
|
|
399
411
|
* Page size for list view
|
|
@@ -471,6 +483,7 @@ export interface AdminForthResourceInputCommon {
|
|
|
471
483
|
list?: {
|
|
472
484
|
beforeBreadcrumbs?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
473
485
|
afterBreadcrumbs?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
486
|
+
beforeActionButtons?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
474
487
|
bottom?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
475
488
|
threeDotsDropdownItems?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
476
489
|
customActionIcons?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
@@ -499,6 +512,11 @@ export interface AdminForthResourceInputCommon {
|
|
|
499
512
|
afterBreadcrumbs?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
500
513
|
bottom?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
501
514
|
threeDotsDropdownItems?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
515
|
+
/**
|
|
516
|
+
* Custom Save button component for Edit page.
|
|
517
|
+
* Accepts props: [record, resource, adminUser, meta, saving, validating, isValid, disabled, saveRecord]
|
|
518
|
+
*/
|
|
519
|
+
saveButton?: AdminForthComponentDeclaration,
|
|
502
520
|
},
|
|
503
521
|
|
|
504
522
|
/**
|
|
@@ -511,6 +529,11 @@ export interface AdminForthResourceInputCommon {
|
|
|
511
529
|
afterBreadcrumbs?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
512
530
|
bottom?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
513
531
|
threeDotsDropdownItems?: AdminForthComponentDeclaration | Array<AdminForthComponentDeclaration>,
|
|
532
|
+
/**
|
|
533
|
+
* Custom Save button component for Create page.
|
|
534
|
+
* Accepts props: [record, resource, adminUser, meta, saving, validating, isValid, disabled, saveRecord]
|
|
535
|
+
*/
|
|
536
|
+
saveButton?: AdminForthComponentDeclaration,
|
|
514
537
|
},
|
|
515
538
|
}
|
|
516
539
|
},
|
|
@@ -584,6 +607,8 @@ export interface AdminForthForeignResourceCommon {
|
|
|
584
607
|
polymorphicResources?: Array<AdminForthPolymorphicForeignResource>,
|
|
585
608
|
polymorphicOn?: string,
|
|
586
609
|
unsetLabel?: string,
|
|
610
|
+
searchableFields?: string | string[],
|
|
611
|
+
searchIsCaseSensitive?: boolean,
|
|
587
612
|
}
|
|
588
613
|
|
|
589
614
|
export type FillOnCreateFunction = (params: {
|
|
@@ -810,9 +835,6 @@ export interface AdminForthResourceColumnInputCommon {
|
|
|
810
835
|
*/
|
|
811
836
|
minLength?: number,
|
|
812
837
|
|
|
813
|
-
min?: number,
|
|
814
|
-
max?: number,
|
|
815
|
-
|
|
816
838
|
/**
|
|
817
839
|
* Minimum value that can be entered in this field.
|
|
818
840
|
*/
|
|
@@ -865,6 +887,15 @@ export interface AdminForthResourceColumnInputCommon {
|
|
|
865
887
|
*/
|
|
866
888
|
masked?: boolean,
|
|
867
889
|
|
|
890
|
+
/**
|
|
891
|
+
* Sticky position for column
|
|
892
|
+
*/
|
|
893
|
+
listSticky?: boolean;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Show field only if certain conditions are met.
|
|
897
|
+
*/
|
|
898
|
+
showIf?: Predicate;
|
|
868
899
|
}
|
|
869
900
|
|
|
870
901
|
export interface AdminForthResourceColumnCommon extends AdminForthResourceColumnInputCommon {
|
|
@@ -878,6 +909,15 @@ export interface AdminForthResourceColumnCommon extends AdminForthResourceColumn
|
|
|
878
909
|
|
|
879
910
|
editingNote?: { create?: string, edit?: string },
|
|
880
911
|
|
|
912
|
+
/**
|
|
913
|
+
* Minimal value stored in this field.
|
|
914
|
+
*/
|
|
915
|
+
min?: number,
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Maximum value stored in this field.
|
|
919
|
+
*/
|
|
920
|
+
max?: number,
|
|
881
921
|
}
|
|
882
922
|
|
|
883
923
|
export enum AdminForthMenuTypes {
|
|
@@ -1055,15 +1095,23 @@ export interface AdminForthConfigForFrontend {
|
|
|
1055
1095
|
usernameFieldName: string,
|
|
1056
1096
|
loginBackgroundImage: string,
|
|
1057
1097
|
loginBackgroundPosition: string,
|
|
1098
|
+
removeBackgroundBlendMode: boolean,
|
|
1058
1099
|
title?: string,
|
|
1059
1100
|
demoCredentials?: string,
|
|
1060
|
-
loginPromptHTML?: string
|
|
1101
|
+
loginPromptHTML?: string | (() => string | Promise<string> | void | Promise<void> | Promise<undefined>) | undefined
|
|
1061
1102
|
loginPageInjections: {
|
|
1062
1103
|
underInputs: Array<AdminForthComponentDeclaration>,
|
|
1104
|
+
panelHeader: Array<AdminForthComponentDeclaration>,
|
|
1063
1105
|
},
|
|
1064
1106
|
rememberMeDays: number,
|
|
1065
1107
|
showBrandNameInSidebar: boolean,
|
|
1108
|
+
showBrandLogoInSidebar: boolean,
|
|
1066
1109
|
brandLogo?: string,
|
|
1110
|
+
iconOnlySidebar?: {
|
|
1111
|
+
logo?: string,
|
|
1112
|
+
enabled?: boolean,
|
|
1113
|
+
},
|
|
1114
|
+
singleTheme?: 'light' | 'dark',
|
|
1067
1115
|
datesFormat: string,
|
|
1068
1116
|
timeFormat: string,
|
|
1069
1117
|
auth: any,
|
|
@@ -1078,8 +1126,20 @@ export interface AdminForthConfigForFrontend {
|
|
|
1078
1126
|
userMenu: Array<AdminForthComponentDeclarationFull>,
|
|
1079
1127
|
header: Array<AdminForthComponentDeclarationFull>,
|
|
1080
1128
|
sidebar: Array<AdminForthComponentDeclarationFull>,
|
|
1129
|
+
sidebarTop: Array<AdminForthComponentDeclarationFull>,
|
|
1081
1130
|
everyPageBottom: Array<AdminForthComponentDeclarationFull>,
|
|
1082
|
-
}
|
|
1131
|
+
},
|
|
1132
|
+
customHeadItems?: {
|
|
1133
|
+
tagName: string;
|
|
1134
|
+
attributes: Record<string, string | boolean>;
|
|
1135
|
+
innerCode?: string;
|
|
1136
|
+
}[],
|
|
1137
|
+
settingPages?:{
|
|
1138
|
+
icon?: string,
|
|
1139
|
+
pageLabel: string,
|
|
1140
|
+
slug?: string,
|
|
1141
|
+
component: string,
|
|
1142
|
+
}[],
|
|
1083
1143
|
}
|
|
1084
1144
|
|
|
1085
1145
|
export interface GetBaseConfigResponse {
|