Skip to content

Releases: spxbhuhb/zakadabar-stack

2021.6.7

07 Jun 10:08
f61c9f9
Compare
Choose a tag to compare

Core

added:

  • AuthorizerProvider, SimpleRoleAuthorizerProvider, see Authorizers

fixed:

  • font change from Lato to Roboto broke old index.html's, added Lato to the end of the font list

Lib: Blobs

fixed:

  • blob list by reference now works, read access is checked on the reference id
  • ZkImagesField: image drop works in create mode

2021.6.4

04 Jun 05:43
Compare
Choose a tag to compare

Frontend: Browser

Added

  • ZkElement.h1: builder
  • ZkElement.h2: builder
  • ZkElement.h3: builder
  • ZkElement.h4: builder
  • form: ZkFieldBase.labelText to store label text, can be changed any time
  • form: ZkElement.label to customize labels easily
  • form: ZkElement.newSecret to set autocomplete="new-password" easily
  • form: withoutFieldGrid function to store the fields in the section when fieldGrid = false
  • form: documentation
  • ZkDefaultLayout: when used on small screens, add 10px padding to the left

Deprecated

  • ZkFieldBase.label - use labelText instead
  • ZkCrudTarget.pageClass - use editorClass instead

Fixed

  • crud: table scrolling issue
  • sidebar: sidebar scroll issue on small screens

Lib:Bender

Added

  • add documentation and changelog link to the header
  • reorganize buttons to be more logical
  • add include instructions to the result

Changed

  • package names are set according convention

Fixed

  • deleted fields are in the generated code
  • id field is not added to the schema

Lib:Blobs

Changed

  • documentation improvements
  • ZkImagesField: upgraded to the latest core

Fixed

  • full screen preview icon colors

Lib:Demo

Added

  • test crud
  • test blob
  • themes

Lib:Markdown

Fixed

  • Chrome and Firefox displays the page shifted to left

2021.6.1

01 Jun 07:55
Compare
Choose a tag to compare

Overview

In this release we closed the BL/PA refactor. The major changes that might need migration steps:

  • remove of DtoBase, EntityBackend, ActionBackend, QueryBackend and all related classes
  • all account and session related code is now in lib:accounts
  • all blob related code moved is now in lib:blobs
  • all locale related code moved now in lib:i18n

As of now, we do not plan any more major changes. Our apologies for the mess the BL/PA
migration created, we felt that it is very important to clarify the software model
before we announce the stack to the public.

Common

Added

  • InstanceStore: store and look up instances easily
  • StringPair: simple bo that holds a string pair
  • TranslationProvider: service interface to be implemented for translators
  • after function and AfterDelegate

Removed

  • InstantAsStringSerializer (no need anymore, works out-of-the-box)
  • OptInstantAsStringSerializer r (no need anymore, works out-of-the-box)

Backend

Added

  • global module function to bind modules easily
  • main: loads version info from zkBuild.properties resource (if exists)
  • Server: modules is now an InstanceStore with first, firstOrNull
  • Server.ModuleDependency: delegate to handle module references
  • Server.dependencies: list of module dependencies
  • Server.settingsLogger: logger for setting load events
  • -t or --test parameter for Server.main, starts Ktor in non-blocking mode
  • ActionBusinessLogicBase: single action BL
  • QueryBusinessLogicBase: single query BL
  • EmptyEntityBo: placeholder entity bo to keep type safety
  • EmptyPersistenceApi: persistence API for action and query BLs
  • EmptyAuthorizer: denies everything, for BLs that are used internally
  • EmptyRouter: adds no endpoints, for BLs that are used internally
  • EmptyAuthenticationProvider: for session-less, account-less sites
  • DatabaseSettingsBo: debugSql - when true Exposed log level is set to DEBUG
  • settings namespace parameter is now optional and automatically set to package name when not passed
  • When there is no SettingProvider after module load, the server adds the default SettingBl

Changed

  • zakadabar.stack.server.yaml renamed to stack.server.yaml
  • Server.settingsDirectory: moved from companion to instance
  • Server.loadSettings: moved from Server to SettingBl
  • SettingBackend: moved to setting package and renamed to SettingBl
  • server now have a simple module list instead of multiple lists by module type
  • KtorRouter: calls apiCacheControl for queries as well
  • Setting: if there is no setting backend, returns with the supplied default value
  • Executor constructor is now public instad of internal

Removed

  • all account and session related code: moved to lib:accounts
  • all blob related code: moved to lib:blobs
  • all locale and translation related code: moved to lib:i18n
  • zakadabar.server.description.yaml: server name and default locale moved into stack.server.yaml
  • SQL storage for settings, SettingDao, SettingTable
  • authorize/rules.kt: ruleBl variable, use module function instead
  • EntityBusinessLogicBase.logger, auditor has its own logger
  • CustomBackend: replaced with BackendModule everywhere
  • EntityBackend: replaced everywhere (except blobs) with bl/pa

Fixed

  • AccountPrivateBackend: add table to Sql.tables instead of direct call to SchemaUtils
  • LogAuditor uses "anonymous object" logger for anonymous objects

Frontend: Browser

Added

  • TableBigExample: inline table example with 10.000 rows
  • ZkAppRouting: first function to find routing targets
  • global: target<T> function to find routing targets
  • sidebar: helpers with method<T>() syntax for adding targets
  • ZkGreenBlueTheme: a variation of light theme
  • ZkApplication.services: store general service instances
  • executor.hasRole, executor.withRole functions
  • ZkOptSecretVerificationField
  • ZkOptSecretField.newSecret

Changed

  • sidebar: section style change, close icon shows only on mouse over
  • sidebar: min width to 220px
  • themes: store chosen theme in localStorage instead of sessionStorage
  • application: locale comes from: url, executor, serverDescription, parameter (in this order)
  • application: displays an error message when the locale cannot be determined
  • application: looks for TranslationProvider to perform translation, when not installed, skips translation
  • application: looks for SessionManager to provide sessions, defaults to EmptySessionManager when no other is installed
  • form: when validation for submit is invalid, print validation dump to the console

Removed

  • settings: the current UI is removed, will be back after synthetic forms
  • accounts: move all account related UI to 'lib:accounts'
  • locales: move all i18n related UI to 'lib:i18n'
  • blobs: move all blob related UI to 'lib:blobs'
  • downloadTranslations parameter of ZkApplication.initLocale, use service instead
  • sessionManager parameter of ZkApplication.initSession, use service instead
  • after: move to common

Fixed

  • ZkTable: element.scrollIntoView() caused the page to scroll to the table
  • ZkSideBarGroup: clicking close to the highlight border does not open the group
  • ZkSideBarGroup: hover text color is now properly set
  • ZkElement.clear: children remove did not remove all children properly

Frontend:JVM

Added

  • CommBase: contains global connection data and the HTTP client

Changed

  • blobs: move all blob related functions to 'lib:blobs'

Remove

  • EntityComm.Companion: move properties to CommBase

Lib:Accounts

Added

  • ModuleSettings.initialSoPassword: start password for SO
  • db initialization when it is empty

Changed

  • move account, role, login, logout from core into this P&P package
  • merge principal and account
  • migrate all backend modules to the bl/pa concept
  • accountName minimum length is 2
  • displayName minimum length is 2

Lib:Bender

Changed

  • Instant serialization imports are not in the generated code
  • Frontend CRUD is now a class instead of an object

Lib:Blobs

Added

  • blob plug-and-play library

Lib:Demo

Added

  • new demo and test project
  • lib:accounts
  • automatically creates zkBuild.properties in resources

Lib:Examples

Added

  • Migrate all backends to bl/pa concept
  • SimpleStandaloneAction
  • SimpleStandaloneActionBl
  • SimpleStandaloneActionTest: unit (+integration) test
  • SimpleStandaloneQuery
  • SimpleStandaloneQueryBl
  • stack.server.yaml - with H2, for unit tests
  • blob example and test case

Lib:I18N

Added

  • new i18n plug-and-play module
  • working locale and translation frontend and backend

Lib:Markdown

Changed

  • markdown style tuning

Site

Added

  • ProjectStatus page

Changed

  • content of Welcome
  • move SiteMarkdownContext out of pages package
  • show "ALPHA" next to the version

2021.5.20.1

26 May 05:20
Compare
Choose a tag to compare

This is a hotfix release on 2021.5.20

Fixed

  • Global error handler for JVM frontend RecordCom
  • Issue 27 - Login timeout mechanics applied to static resources like index.html
  • browser: table positioning after search
  • browser: optional record select field marked mandatory

2021.5.20

20 May 09:15
Compare
Choose a tag to compare

Upgrade Steps

  • translate if needed

    • executeError
    • authenticationNeeded
    • forbiddenExplanation
  • rename ZkElement.findFirst to ZkElement.first

    • first will be removed in the future
  • in themes rename

    • zkTitleBarStyles.titleBarBackground to appTitleBarBackground
    • zkTitleBarStyles.titleBarText to appTitleBarText
    • zkTitleBarStyles.titleBarBorder to appTitleBarText
    • these will be removed from the future
  • replace (Ctrl-Shift-R or Cmd-Shift-R)

    • import zakadabar.stack.frontend.builtin.pages.ZkCrudTarget with import zakadabar.stack.frontend.builtin.crud.ZkCrudTarget
    • pages.ZkCrudTarget will be removed in future releases
  • from table configurations remove crud = ... lines

    • these are no longer necessary, ZkCrudTarget and ZkInlineCrud sets the crud automatically

Backend

  • fixed a bug when session expiration was not communicated to the frontend
  • record backends now validate incoming DTOs automatically
    • can be switched off globally by setting Server.validate to false
    • can be switched off per backend by setting validate to false

Browser

  • css
    • introduce cssParameter, changes applied in theme.onResume are independent
    • add Green/Blue theme to Show Case
    • store theme in session store instead of local store to avoid privacy issues
  • comm
    • onForbidden property function that makes a toast when server returns 403
    • onError property function that makes a toast when server returns 4xx or 5xx that is not 403 or 440
  • crud
    • move crud related classes from zakadabar.stack.frontend.builtin.pages to ../crud
    • ZkInlineCrud
  • elements
    • rename findFirst to first to follow Kotlin convention
    • add firstOrNull function
  • form
    • implements ZkLocalTitleBar
  • pages
    • LoginForm does not show cancel button during login, still shows during session renewal
  • sidebar
    • section stereotype for groups, section minimize
  • table
    • implements ZkLocalTitleBar
  • title

Android

  • write introduction
  • move jvm demo client from demo to lib.examples

Kod-o-mat

  • improve positioning of the editor

Site

  • show build version and pilot notice in the title
  • reorganize the sidebar, use sections
  • polish FAQ
  • add Legal Notices, Credits, Services And Support
  • add SiteBuiltinBackend and SiteExampleReferenceBackend to provide limited in-memory data store for examples

2021.5.18

18 May 08:29
Compare
Choose a tag to compare

Overview

  • Add the locale to frontend URLs.
  • SEO friendly (a tag) links in the sidebar, load sidebar from markdown.
  • Buttons may use a tag and have an url to open
  • Markdown view improvements.
  • Style, layout and theme improvements.
  • Documentation:
    • fix broken links,
    • new: Routing, Elements, SideBar, Pages, Introduction
    • major update: Css.
  • ZkApplication refactor, themes and styles are independent of the application.
  • Improve responsive design of the default layout.
  • Server descriptor:
    • Session now contains the server descriptor.
    • Server descriptor is loaded from a settings file.
    • Server descriptor settings file is updated by gradle build with project version (for site).
  • Dark theme for table.
  • Normalized keys in string store.
  • Kod-o-mat.

Breaking changes

  • change ZkApplication from object to class, application late init variable
  • AccountPublicDto.locale is now mandatory
  • AccountPrivateDto.locale is now mandatory
  • locale is present in the URL
  • remove type parameter of class from ZkCssStyleSheet
  • move theme, initTheme from application to resources/theme.kt

Upgrade steps

Browser

  • application
    • change t(key) to stringStore[key], import
    • change ZkApplication.executor to executor, import
    • change ZkApplication.theme to theme, import
    • change ZkApplication.hasRole to hasRole, import
    • change ZkApplication.back() to application.back(), import
  • css change ZkPage(cssClass = to ZkPage(css = )
    change ZkCssStyleSheet<ZkTheme> to ZkCssStyleSheet
    change this.classList += to +
    change this.className += to !
  • theme change ZkTheme.blockBorder to ZkTheme.fixBorder
  • appTitle change appTitle to setAppTitle
  • change manual routing to target based:
    • super.onNavStateChange(ZkNavState(Login.viewName, "")) to super.onNavStateChange(ZkNavState(Login))

template/app/etc

add zakadabar.server.description.yaml to template/app/etc

build.gradle.kts

Add these lines to copyAppStruct task:

filter { line: String ->
    line.replace("@version@", "${project.version}")
}

SQL

Execute this to set locale before starting the upgraded server.

update accounts set locale = 'en';
alter table accounts alter column locale set not null;

Common

  • ServerDescriptionDto.defaultLocale property
  • SessionDto.serverDesciption property
  • AccountPublicDto.locale is now mandatory
  • AccountPrivateDto.locale is now mandatory

Backend

  • zakadabar.server.description setting is now mandatory

Frontend

Buttons

  • ZkIconButton is now deprecated, use ZkButton instead
  • rename convenience functions from buttonXX to XXbutton
  • buttons now have a tabIndex parameter to make them focusable

Layout

  • spanned header support for ZkDefaultLayout, see Layout

Modals

  • Change opacity of overlay background from 0.2 to 0.5 to make the modal more distinct.

Markdown

  • view has limited width
  • toc is next to the view on large screens
  • internal markdown links use changeNavState instead of reloading the page

Notes

  • rename convenience functions from noteXX to XXnote

Toasts

  • rename convenience functions from toastXX to XXtoast

ZkApplication

  • convert from object to class
  • introduce application late init variable
  • locale property that stores the current locale
  • changeNavState shorthands

ZkAppTitleProvider

  • interface to implement by elements that can set the app title
  • default setAppTitleBar function
  • rename fields to reflect their use better

ZkCssStyleSheet

  • remove type parameter of class
  • rework initialization to allow modifications by the theme
  • add shortNames to use zks344 like class names

ZkElement

  • innerHtml, innerText, className, style helpers now use buildElement instead of element
  • gridRow, gridColumn extension functions for HTMLElement

ZkSideBar

  • SEO friendly groups and items, when url is passed to constructor uses "a" tag
  • constructors to add items from a ZkTarget, automatic name resolution, automatic url resolution.
  • load the sidebar from a markdown file with MarkdownNav.

ZkStringStore

  • getNormalized function to look up with normalized keys
  • normalizedKeyMap to assign the values to normalized keys

ZkTabContainer

  • builder function as constructor parameter

Bug Fixes

  • fix closed sidebar icon positioning

2021.5.11

11 May 08:46
Compare
Choose a tag to compare

Overview

  • Move demo:demo-lib into lib:examples
  • Many documentation improvements
  • Modules can install static routes from installStatic
  • ZkPathPage to server directories
  • start theme and style cleanup

Breaking Changes

  • ZkLayoutStyles
    • rename to zkLayoutStyles, import when necessary
    • for h100 and w100 remove zkLayoutStyles
    • for spacingStep use theme.spacingStep instead
    • for defaultForeground use theme.textColor instead
  • ZkPageStyles
    • rename to zkPageStyles, import when necessary
  • toast function
    • use shorthands or constructor, see Toasts for details
  • ZkTheme, refactor check ZkBuiltinLightTheme for example

Backend

  • Fixed principal creation validated=false

Browser

  • ZkButton revamp, documentation
  • ZkFlavour to handle default flavours (like Bootstrap)
  • delete contrast theme, will add back after style system cleanup
  • ZkCssStyleSheetDelegate and cssStyleSheet function to make style sheet change easy
  • ZkTheme revamp to handle flavour colors, will drop ZkColorTheme
  • ZkSideBar groups can run a function when clicked
  • ZkToast revamp, documentation
  • ZkIcon, ZkIcons revamp, documentation
  • ZkForm style revamp, dark mode, checkbox style
  • ZkCheckBoxList to latest styles
  • Fixed modals in dark mode
  • ZkNote style revamp

Site

  • Markdown improvements.
  • Markdown link transformations.
  • Static serving of content files.

Markdown

  • Markdown theme to configure colors.
  • Tables have border and padding.
  • Code blocks are theme-aware.
  • JetBrains Mono font for code blocks.
  • Code copy for code blocks.
  • MarkdownPathPage element to serve whole directories.
  • MarkdownPage element to serve one file.
  • Images fit to the content.
  • Enrich result with live components.
  • Links in title H1 and H2

2021.5.4.2

05 May 07:38
Compare
Choose a tag to compare

Overview

This release contains some major normalization in DTO handling, most notably:

  • all DTO types use the same dtoNamespace field
  • all DTO types have a companion constructor with the dtoNamespace as parameter
  • record ID is no longer Long but has a designated class hierarchy:
  • all record ID reference fields are switched from Long to RecordId

This release also takes the first steps towards major improvements:

  • DtoSchema can be converted into a DescriptorDto instance, which contains
    • list of properties
    • validations (except custom)
    • default values
    • actual values
  • DtoSchema can push values from the descriptor into an actual instance
  • ZkSyntheticForm builds forms automatically from DescriptorDto (unfinished)
  • Setting support to load settings from files or from SQL (unfinished)
  • ZkColorTheme introduces collection of site colors

Other improvements:

  • Lib.Markdown now has table of contents, table support, link styles
  • ZkScrollBarStyles add scroll bar
    styling
  • DarkLightMode header action
  • Welcome page for the site, documentation improvements
  • Roadmap for future improvements

Migration Instructions

Replace in files

>({
        recordType =

with

>(

Replace in files


    })

    override fun getRecordType() = recordType

with:

)

    override fun getDtoNamespace() = dtoNamespace

Replace in files

.recordType with dtoNamespace

Update to Latest

  • jsMain/kotlin/main.kt
  • jsMain/kotlin/DefaultLayout
  • jsMain/kotlin/SideBar

Change signature

  • ZkCssStyleSheet<T> to ZkCssStyleSheet<ZkTheme>
  • RecordBackend.read - change recordId to RecordId<T>
  • RecordBackend.delete - change recordId to RecordId<T>
  • blobAuthorize - follow IntelliJ suggestion to get in-line with super class

Other

  • replace Long record ids to RecordId<T>
  • replace record id notEquals 0 and min 1 validation checks with empty false
  • replace Exposed id.value with id.recordId()
  • replace title with titleText in ZkTable descendants
  • Modules.kt - change SettingStringBackend to SettingBackend
  • Modules.kt - change LocaleStringBackend to TranslationBackend
  • Modules.kt - if not added, add SettingBackend, TranslationBackend, LocaleBackend
  • rename zakadabar-server.yaml to zakadabar.stack.server.yaml
  • drop cascade SQL table stack-sessions

New Behaviour

  • AccountPrivateBackend now creates a so account with security-officer role.

Bugfixes

  • account creation bug fix
  • day and light themes now use the same font

2021.4.27

27 Apr 09:13
Compare
Choose a tag to compare

Overview

  • Normalize DTO companion field names. See Breaking Changes.
  • Account, role, settings, locale, translation UI for browser frontend.
  • Settings, locale and translation backend.
  • Sessions, see Sessions for details:
    • expiration,
    • renewal (re-login).
  • Markdown code formatting hard-break to 200.
  • Browser: ActionComm, RecordComm, QueryComm extends CommBase.
  • New theme for general colors: ZkColorTheme.
  • ZkNote class to display notes on the page consistently.
  • DtoSchema now handles DtoBase fields.
  • Started settings normalization (to be finished in next release).

Breaking Changes

  • RecordDtoCompanion.recordType renamed to namespace - search & replace it everywhere
  • stack_sessions table renamed to sessions - drop old table
  • Unauthorized exception renamed to Forbidden to align with standards - search & replace it everywhere
  • ZkBuiltinStrings add login-related strings - add override to project strings or remove the property if default is OK
  • PrincipalBackend.roles returns with a pair of role id list and role name list - no action needed
  • ZkButton.onClick - has be named when passed as parameter
  • ZkToastTheme - removed defaults

New Properties

  • SettingDto.role - the role this setting is visible for (optional)
  • SettingDao.role - the role this setting is visible for (optional)
  • SettingTable.role - the role this setting is visible for (optional)
  • Executor.roleIds (JVM) - role ids of the executor
  • StackSession.roleIds - role ids of the session
  • ZkApplication.sessionManager - session manager that performs session renewals
  • ZkBuiltinStrings.* - login-related strings
  • ZkTheme.color - colors for the application
  • Server.shutdown - indicates that the server is shutting down
  • SessionTable.lastAccess - last access time of the session (updates once in 2 minutes)

Changed Properties

  • Executor.roles (JVM) - renamed to roleNames
  • StackSession.roles - renamed to roleNames
  • ZkConfirmDialog.* - constructor properties are now open

Deprecated Properties

Removed Properties

New Methods

  • authorize - helper with role id as parameter
  • Executor.hasRole (JVM) - helper with role id as parameter
  • ZkElement.withOneOfRoles - execute a block when the user has one of the supplied roles
  • ZkForm.KMutableProperty.find - Find a field based on the property.

Changed Methods

New Behaviour

  • main.kt - calls sessionManager.init() instead of local session fetch and setup
  • all comm methods
    • handle 440 Login Timeout by calling renew of sessionManager
    • handle 409 Conflict by throwing DataConflictException
    • handle all other 4xx and 5xx statuses by throwing RuntimeException

Changed Behaviour

  • PrincipalBackend.roles - returns with (role id ,role name) pairs
  • SettingStringBackend - filters settings based on SettingStringDto.role
  • Server - translates LoginTimeout to HTTP status 440 Login Timeout
  • Server - translates Forbidden to HTTP status 403 Forbidden
  • Server - does not handle HTTP status 401
  • Server - uses manual cookie session configuration
  • Server - starts session maintenance task
  • ServerAuthenticationProvider - when there is a session cookie but there is no session throws LoginTimeout
  • PrincipalBackend.roles - now returns with a pair of role id list and role name list
  • ZkFieldBase.focus - calls focusValue()
  • ZkFormStyles.contentContainer - removed overflow="scroll"
  • SessionStorageSql - sends session access time updates to SessionMaintenanceTask

New Classes

  • LocaleDto - locale record to have the supported locales in the database
  • SettingFormat - formats of setting values
  • LoginTimeout - thrown at session expiration
  • pages.account.accounts.Accounts - CRUD for AccountPrivateDto
  • pages.account.accounts.Form - form for AccountPrivateDto
  • pages.account.accounts.Table - table for AccountPrivateDto
  • pages.account.roles.Roles - CRUD for RoleDto
  • pages.account.roles.Form - form for RoleDto
  • pages.account.roles.Table - table for RoleDto
  • pages.account.Login - Login page
  • pages.resources.locales.Locales - CRUD for LocaleDto
  • pages.resources.locales.Form - form for LocaleDto
  • pages.resources.locales.Table - table for LocaleDto
  • pages.resources.settings.Settings - CRUD for SettingsDto
  • pages.resources.settings.Form - form for SettingsDto
  • pages.resources.settings.Table - table for SettingsDto
  • pages.resources.translations.Translations - CRUD for TranslationDto
  • pages.resources.translations.Form - form for TranslationDto
  • pages.resources.translations.Table - table for TranslationDto
  • LocaleBackend - backend for LocaleDto
  • LocaleDao - dao for locales
  • LocaleTable - table for locales
  • CommBase - base functions (status check and relogin) for comms
  • RenewableSessionTrackerById - Ktor session tracker that allows session renewal
  • RenewLoginDialog - A dialog that asks for a password during session renewal
  • ZkMessageDialog - A general message dialog with one button.
  • ZkSessionManager - Session manager for the frontend that supports session renewal.
  • ZkColorTheme - theme to store application color set
  • ZkNote - display notes for the user
  • ZkNoteStyles - styles for ZkNote
  • SessionCacheEntry - stores session information
  • SessionMaintenanceTask - starts background coroutines to update and expire sessions
  • Setting (JVM) - delegate class to reference settings from backend code

Changed Classes

  • SessionTable - SQL table name changed to sessions
  • ActionComm (JS) - extends CommBase
  • RecordComm (JS) - extends CommBase
  • QueryComm (JS) - extends CommBase
  • SessionAuthenticationProvider - session renewal

Moved/Renamed Classes

  • ServerAuthenticationProvider - moved into backend.data.builtin.session
  • SettingStringDto - renamed to SettingDto
  • LocaleStringDto - renamed to TranslationDto
  • StringsByLocale - renamed to TranslationsByLocale
  • LocaleStringBackend - renamed to TranslationBackend
  • LocaleStringDao - renamed to TranslationDao
  • LocaleStringTable - renamed to TranslationTable
  • SettingStringBackend - renamed to SettingBackend
  • SettingStringDao - renamed to SettingDao
  • SettingStringTable - renamed to SettingTable
  • LoginForm - moved out of Login into its own class
  • SessionAuthenticationProvider - moved into ktor package
  • SessionStorageSql - moved into ktor package
  • StackSession - moved into ktor package
  • all server setting classes - moved to commonMain/data/settings as DTO

Deprecated Classes

Bugfixes

  • 22 - The format of the optional "Instant" value for ZKTable is incorrect
  • locked accounts are now remain locked when the number of tries is under lock limit
  • table styles used scroll instead of auto

2021.4.22

22 Apr 04:50
Compare
Choose a tag to compare

Overview

  • Common title bar concept. See Layout for details.
  • Refactor of themes and styles, themes demo.
  • Application now remembers theme selection. See Css for details.
  • Consistent page styles:
    • general pages are scrollable by default,
    • general pages may use ZkPageStyles.fixed to switch off default scrolling,
    • CRUD tables use fixed page (as the table provides scrolling by itself),
    • CRUD forms use scrollable page.
  • New landing page for site.
  • Zakadabar design colors added to ZkColors.
  • Server side data conflicts reported back to the client.
  • All login fails increment failed login count and update last failed time.
  • Enum select field initializes with non-selected value for create, action and query mode.
  • Bugfixes.

New Properties

  • ZkApplication.title - stores the data for top application title bar
  • ZkApplication.onTitleChange - callback, executed when title changes
  • ZkApplication.styleSheets - stores attached CSS style sheets
  • ZkApplication.themes - stores the registered themes (set in jsMain/main.kt)
  • ZkTheme.name - name of the theme
  • AccountPublicDto.theme - name of the theme this account uses
  • AccountPrivateDto.theme - name of the theme this account uses
  • AccountPrivateDao.theme - name of the theme this account uses
  • AccountPrivateTable.theme - name of the theme this account uses
  • ZkPageStyles.fixed - new style for non-scrolling page content
  • ZkPageStyles.scrollable - new style for scrolling page content (this is the default)
  • ZkPageStyles.content - new style for content with margin
  • ZkTitleBarTheme.height - height of appHandle and title bar
  • ZkTitleBarTheme.appHandleBackground - appHandle background
  • ZkTitleBarTheme.appHandleForeground - appHandle foreground
  • ZkTitleBarTheme.appHandleBorder - appHandle bottom border
  • ZkTitleBarTheme.titleBarBackground - title bar background
  • ZkTitleBarTheme.titleBarForeground - title bar foreground
  • ZkTitleBarTheme.titleBarBorder - title bar bottom border
  • ZkAccountPrivateDto.printipal - principal that belongs to this account
  • ZkPage.appTitle - set app title during page resume when true
  • ZkPage.titleText - make title from this string
  • ZkPage.title - title to use
  • ZkArgPage.appTitle - set app title during page resume when true
  • ZkArgPage.titleText - make title from this string
  • ZkArgPage.title - title to use
  • ZkForm.appTitle - set app title during page resume when true
  • ZkForm.titleText - make title from this string
  • ZkForm.title - title to use
  • ZkTable.appTitle - set app title during page resume when true
  • ZkTable.titleText - make title from this string
  • ZkTable.title - title to use
  • ZkSecretField.newSecret - when true autocomplete="new-password" is added to the field

Changed Properties

  • ZkPage.title - ZkPageTitle instead of text
  • ZkArgPage.title - ZkPageTitle instead of text
  • ZkLayoutTheme.paddingStep renamed to spacingStep
  • ZkLayoutTheme.marginStep renamed to spacingStep
  • ZkAppHandle.text renamed to appName
  • ZkTitleBarStyles.title renamed to appHandleContainer
  • ZkTitleBarStyles.titleBar renamed to appTitleBar

Deprecated Properties

  • ZkSideBar.title - replaced by appHandle in ZkDefaultLayout

Removed Properties

  • ZkLayoutStyles - all non-used
  • ZkLayoutTheme.titleBarHeight - replaced with ZkTitleBarTheme.height
  • ZkArgPage.cssClasses - replaced with a single-string constructor parameter
  • ZkForm.titleBar - replaced with title
  • ZkPage.cssClasses - replaced with a single-string constructor parameter
  • ZkTitleBarTheme - all, replaced with more detailed ones

New Methods

  • ZkElement.gridRow - set CSS grid row placement
  • ZkElement.gridColumn - set CSS grid column placement
  • ZkElement.display - set CSS display property
  • ZkForm.onConfigure - use this instead of init block, called by onCreate
  • ZkForm.newSecret - creates a secret field with autocomplete="new-password"
  • ZkIconButton.onMouseClick - default implementation calls onClick, intended for override
  • ZkCssStyleSheet.merge - merges another style sheet into this one.
  • ZkCssStyleSheet.onThemeChange - called when the ZkApplication.theme changes, rebuilds the style sheet.
  • ZkPage.onConfigure - called by onCreate, replace init block

Changed Methods

  • ZkForm.onSubmitStart - is now suspend to allow backend communication

New Behaviour

  • ZkApplication.theme - calls onThemeChange of all attached style sheets when set
  • ZkApplication.initTheme - theme selection logic
  • main.kt - should register themes, see site for example

Changed Behaviour

  • ZkButton - replace className= with classList +=
  • ZkIconButton - replace className= with classList +=
  • ZkApplication.theme.set - saves the selected theme to into window.localStorage under key 'zk-theme-name'
  • ZkDefaultLayout.onCreate - containers now uses css from ZkLayoutStyles
  • ZkCrudTarget - uses ZkPageStyles.content around forms, uses ZkPageStyles.fixed for tables
  • ZkPage.init - title is set to the class name translated when not passed to constructor
  • ZkArgPage.init - title is set to the class name translated when not passed to constructor
  • ZkArgPage.onResume - sets application title (when appTitle is true)
  • ZkForm.onResume - sets application title (when appTitle is true)
  • ZkForm.submit - hides button first, runs onSubmitStart and validate in an io block
  • ZkForm.submit - DataConflictException is shown in a toast
  • ZkPage.onResume - sets application title (when appTitle is true)
  • ZkTable.onResume - sets application title (when appTitle is true)
  • PrincipalBackend.authenticate - all login fails increment failed login count and update last failed time
  • Server.kt - DataConflictException is converted ino HTTP status 409
  • RecordComm - HTTP status 409 is converted into DataConflictException
  • ZkEnumSelectField - uses a shadow value for create-like modes to show not-selected even when the field is mandatory
  • ZkSecretVerificationField - adds autocomplete="new-password" to the input

New Classes

  • ZkBuiltinContrastTheme - high contrast theme
  • ZkBuiltinDarkTheme - dark theme
  • ZkBuiltinLightTheme - light theme
  • ZkAddRowAction - table add row action
  • ZkExportCsvAction - table export to CSV action
  • ZkSearchAction - table search action
  • ZkOptDoubleColumn - table optional double column
  • ZkIntColumn - table int column
  • ZkOptIntColumn - table optional int column

Changed Classes

  • ZkIconButton - the class is open
  • ZkCssStyleSheet - changed type parameter from the defined class to the theme class
  • ZkTable - actions moved into the actions package.

Moved/Renamed Classes

  • ZkAppHandle to frontend.builtin.titlebar
  • ZkPageTitle renamed to ZkAppTitle
  • ZkTableTitleBar replaced with ZkTitleBar

Deprecated Classes

  • ZkSideBarTitle - replaced by ZkAppHandle

Bugfixes

  • ZkTitleBarStyles.titleContainer - removed padding
  • ZkDoubleColumn.render - now displays value
  • ZkCssStyleRule.marginLeft - changed from Int to Any to make string values possible
  • RecordComm - now uses application/json; charset=UTF-8 when sending data
  • ZkColumn - column size calculation: embedeed table bug fix