All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- now you should use import adminforth from '@/adminforth' instead of window.adminforth. It has type hints and is more reliable
- show hook is now called as it was when user edits the page
- fixed showRow in ShowTable.vue
- if not ab le to connect postgres, don't crash the app
- fix LastPass and other passowrd managers who try make autocomplete on user creation form
- reduce stdout output from AdminForth itself
- AFCL Chart components
- add requestUrl param to hooks extra
npx adminforth create-app --app-name myadmin --db sqlite://.db.sqlite
- Command to generate typescript models
npx -y adminforth generate-models --env-file=.env
- add i18n support: add vue-i18n to frontend and tr function to backend. This will allow to implement translation plugins
- badgeTooltip - now you can add a tooltip to the badge to explain what it means
- ability to authorize not only subscription on websocket but filter out whom users message will be published (updated doc)
- added ability to refresh menu item badge from the backend using websocket publish
- fix bugs when e.g. UR (urdu) can't be recognized by LLM (define names explicitly)
- make user menu switch shorter
- next param support on login route (also preserve next param between login/signup navigation)
- Added separate BeforeCreateSave function in types without oldRecord and make oldRecord mandatory in existing BeforeSaveFunction
- Added dataConnector: IAdminForthDataSourceConnectorBase; into IOperationalResource - for reusing connectors from users code
- WS on base URL
- favicon when using BaseURL
- Mongo: fix search by strings with "+" and other special characters
- mongo storing boolean as true/false now. Before it was 1/0 which broke compatibility with many other ORMs
- Resolved issue with filters being displayed incorrectly
- USe
IS DISTINCT FROM
for [AdminForthFilterOperators.NE] in postgress to properly compare for note equal when values hold zero
- Added adapters
- Form hooks to fix file upload plugin
- fixed inability to use multiple upload plugins on one resource
- wrong title which not respects title/brandname sometimes or uncovers AdminForth instead of brandName in some cases
- Added dynamic positioning for dropdown in Select component
- Added validation to dropzone
- rounding corderns on show view
- boolean field which is required has no "unset" option
- flowbite icons package
- Remove border/background and surrounding padding from tab widget
- if selected checkboxes after refresh have no relevant items, they are now cleared (e.g. after delete manually or switching page)
- for custom pages try use their label (same as in menu) after meta.title for the <title> tags
- old bug: when going to custom page and not being authorized it blinks with own content
- get rid of
getClientIp
function, and replace it withadmin.auth.getClientIp
which respects new settingauth.clientIpHeader
- afcl Select now supports
extra-item
slot to add extra item at the bottom of the list
- afcl Checkbox and afcl Dropzone
- decimal null check in mongo
- socket now is reconnected on logout and reconnected (to reset user and permissions on current connection)
- also socket is reconnected on login to improve user auth and permissions on current connection
- fixed several typechecks for frontend and cusotm user frontend components
- reshaped types on backend to distinguish inputs from runtime
- add websocket reconnect on disconnect
- fixed bundleNow.ts to exit process
- not collected loginPageInjections of user
- wrong dev dependenciy which should be in dependencies
- added VerticalTabs component to AFCL
- cleanup unused deps
- postgresql now can be accessed via
postgresql
scheme in addition topostgres
scheme - Postgres wrap table names in quotes in SQL queries to prevent any issues with reserved words
- move nonesense "IN" blank array check to not pass this case to any data connector for both data API and standard pages
- reduce login /logout CLS
- allocate new port for dev server if old one is busy, allow parallel development on 2 apps
- fix HMR in vite, now Vue files during adminforth dev and app dev are reloaded smoothly
- add INotify watchers to files instead of dirs to minimaze CP operation volume and CPU usage
- add adminforth instance into hooks
- removed several warnings and unneded outputs in console
- security fix: remove full item after fetch in
get_resource_foreign_data
(foreign requests exposed backendOnly fields) - count in postgress forced to return number
- fixed sources for allowedActions in hooks
- menu now auto-closes on mobile after selecting item
- backplate on mobile now is higher then table sticky header
- fix split js error when going to 404 page in logged out state
- primary color adoption for login page
- menu badges now loaded in "lazy" mode to not block the menu rendering
- added
adminforth.menu.refreshMenuBadges()
to refresh all badges in menu from the frontend component - created env HEAVY_DEBUG_QUERY to log SQL queries in the console
- simplified logic on detecting whether to init user Dropdown or not
- add autocomplete suggestion for password inputs
- Start creating AFCL - AdminForth Components Library
- AFCL Link
- AFCL Button
- AFCL Select (based on old Dropdown component, add slots to it)
- move old AfTooltip to @/afcl/Tooltip
- Ability to set read-only fields
- Websockets
- fix type mismatch in dataSourceColumns
- Indicate pagination wrong page
- after bundling in tmp location, copy dist folder back to the dist of spa (in node_modules),
after this we can apply /tmp caching in docker using
RUN --mount=type=cache,target=/tmp
and keep spa served from container - use brandName for tmp folder isolations so you can develop multiple apps on the same machine
- implement Frontend API for silent table refresh and silent row update
- add option
listRowsAutoRefreshSeconds
- to silently auto-refresh rows in list every N seconds - add JSONB and JSON data types support for Postgres
- allow to set
column.extra.jsonCollapsedLevel
to collapse JSON fields in the show/list views. - significant types refactor to split Common types (both front and back) and back types
- fix bug when clear filter
- make theme reactive in storage
- suggest NodeNext for getting started and hello world for right completions
- CompactUUID renderer fixes
- remove initFlowbite call from components which used tooltip, and moved tooltip to seaparate component. This fixed extra resources allocation on the page, improved scroll performance
- applied shrink table strategy on list table for better UX (scrolls are now inside of table so you can switch pages without scrolling to the end of the page)
- fix border radius between show/edit/create pages
- fix loginPageInjections is not getting listified and might crash plugin which uses it
- AuditLog plugin diff field on mobile screens now works with more convenient unified mode
- make table label column fixed width
- Isolate cookies for case when you have multiple adminForth apps on one machine
- URL renderer
@/renderers/URL.vue
- Fields grouping
- When discovery is no started, getUserByPk will show error in console
- Clickhouse count for some clickhouse versions
- overflow on mobile
- comapct UUID value renederer shows no copy button when value is empty
- support for Bool and DateTime64 data types in Clickhouse
- add .d.ts files for type hints
- Now you can get plugin instance by Plugin class name (for single plugins):
admin.getPluginByClassName<AuditLogPlugin>('AuditLogPlugin')
- Pre-made field renderer
@/renderers/CompactUUID.vue
- Pre-made field renderer
@/renderers/CountryFlag.vue
- "Add new" button to show
- Filters, page and sort are now saved to query parameters
- Don't install users packages which are already in AdminForth
- Add
json
renderer for json fields - Add validation for
defaultSort
in resource options - set target=es2017 in tsconfig (min node version is >=8), to remove awaiters
- Paddings for table now are smaller on lower screen sizes
- added user pk to adminUser passed to page injection components
- Remove dump sidebar on every page
- Add config.customization.globalInjections
- Util function to get client IP address from request import { getClientIp } from 'adminforth';
- Util to Rate limit requests import { RateLimiter } from 'adminforth';
timeFormat
fix for pure time stamps- page input in list table now autogrows in large values
- plugin was not able to use more then one package in
custom
folder package.json - express server proxy now has
blobStream()
method which returns stream for blob data e.g. for piping
timeFormat
anddateFormat
are now separated, datetime is concatinated from them. This allows to specify formats for all time stamps date stampts and datetime stamps separately
- when page input is focused and changed focus to losts
- listTableClickUrl supports target blank
- listTableClickUrl supports null
- Page backspace requests first page
- homepage detection for case when no childer items are present
- more minor validation and typo suggestionss
- allow use table instead of resource id for auth resource
- add email validator AdminForth.Utils.EMAIL_VALIDATOR
- removed -moz-user-select for unwanted side effects like selecting wierd rectangles in table cells when new page should be opened
- fix ctrl+click in for default table items
- fix title (try to get it from resource label first, then fallback to humanified router param)
- run bulk action without allowed attribute
- make
listTableClickUrl
to be async
- was unable to set foreign item to empty on edit page
- bulkActions without 'allowed' property did not show up.
- add new injection for icons in table:
customActionIcons
- listTableClickUrl - allows to define where to navigate when user clicks on the row in the list table
- minLength + not required columns now work correctly
- add opacity to disabled save button
- don't discover virtual columns for mongo
- Password reset now respects same password constraints as on the user creation from virtual field
- Regexes in
column.validation
now support insensitive and other flags
- Updating fields did not respect native data types on the update data apu
- Now create/update/delete methods which run hooks where ejected fromr est api, makes them available from plugin
- In data connector interface added update with original values
- threeDotsDropdownItems page injection
- plugin for import/export
- add alert after edit created
- fix login issue when rememberMe is not set
- Cookie expiration time is synced with JWT token expiration time, had no expiration before (session cookie)
- "Remember me" option on login page
- allow to specify expiration time during issuing JWT token
- close all toasts automatically if during route change they exist more then 5 seconds.
- Also for alerts without timeout param set 30 seconds as default timeout, you still can use 'unlimited' intentially to never hide alert
- Add alert when record is created
- Add delete bulk action confirmation as default behavior, allow to return successMessage from bulk action
- When user was nto found during login, return same message as when password is wrong to prevent email/username enumeration
- Added underInputs injection to login page
- now plugins can issue a JWT tokens without users (to not expose user id in the token), userless verification achieved by setting decodeUser param in auth.verify to false
- Skeeleton loaders now work correctly on the list page
- Multilevel sort is working with Ctrl+click. Without Ctrl sort is single-level
- If value in enum type field is not in the list, it is now shown as a string instead of empty value on list/show
- Move light and dark switch from menu to the top right corner of the page
enforceLowerCase
option for text/string columns. Might be handy for emails to comply with RFC 5321 and RFC 5322, usernames etc. We recommend setting it to email field for users table (updated in the tutorial)
- upgrade express dep to fix security vulnerability
- Empty pagination
- Edit/Create form: create rules (note, required etc) applied from edit mode instead of create mode when user entered first value on create
- Remove duplicated requests when moving from page to page
- Internal code improvements to simplify filters cleanup on pages navigation
- fix unique checks in both data API and UI
- Move unique check to the data API and make requests parallel to speed up the response time
- Now create data API returns error and ok:true/false code.
- loginBackgroundPosition - now you can set position and size of the login background image. By default it is
1/2
which means image will be in the left side of the login page with cover mode. You can also set it toover
to make image over the whole login page with cover mode.
- showBrandNameInSidebar - now to hide brand name in the sidebar you have to use this new option (on the same level with brandName).
Previously you had to set brandName to empty string. By default it is
true
.
- Selecting one item in some cases selected all (if id attribute had name different from id)
- DataAPI create is now returning full created record (handy when e.g. id field auto-populated by fillOnCreate)
- Rename
primaryKey
torecordId
in all hooks
- SQLite now supports native
DATETIME
type
- Mongo filtering issues (e.g. user can't login because filters was not applied)
primaryKey
to all before/after save hooks so e.g. in update you can understand for what record it is called
- Data API using admin.resource(xxx).get/list/create/update/delete
- Use fuse search to suggest developers right names during config validations in case of typos in config e.g. when user specified non-existing resourceId
- Removed
rootUser
from everywhere. Now you need to create a first user via dataApi:
admin.discoverDatabases().then(async () => {
if (!await admin.resource('users').get([Filters.EQ('email', 'adminforth')])) {
await admin.resource('users').create({
email: 'adminforth',
password_hash: await AdminForth.Utils.generatePasswordHash('adminforth'),
role: 'superadmin',
});
}
});
- Sorting in Mongo datasource connector
- Items count request in table and datasource interface moved to separate method This allows to run it in parallel with a list request to speed up the response time
- Better resource names generation
- Improve look of foreign references in ResourceListTable
- Improve CTA badge appearance when there is no title
- base plugin now remembers pointer to resourceConfig, so in any plugin you can access it via
this.resourceConfig
- plugins now support orderedActivation so you can control the order of plugin activation by setting
activationOrder
in plugin class
- Dropdown on lowest form input (create and edit)
- More bindings to the primary color variable
- Support OL / UL lists in
richtext
fields
- Make primary color variable and use it for colored links
- Create style variables for announcement badge
- Fix announcement badge appearance when it is not configured
- customization.announcementBadge
- Fixed filters selected on the previous page persists on the next page #2
- support noRoundings for ResourceListTable, to improve look in inline plugin
- Look on the show and edit pages improved
- Plugin custom Vue components can now import types from
@/types
folder. Used "postinstall" ln -fs which is not supported on pure Windows (no wsl).
- improved HEAVY_DEBUG logging
- moved "postinstall" hook in plugins to "prepare" to not execute "npm link" when plugin installed as dependency
- login error when rootUser is not set
- improved default styles to better match flowbite
- add config.auth.loginPromptHTML and config.auth.demoCredentials
- error toast was not shown on Show page on delete call
- Error tost now light red color for more attention