- BC Break: Rename
Date
filter toDateRange
. A text filter can be used for precise dates. - Fix an issue with top right header where icons and tooltips were not using the proper API and props.
- Fix the fuzzy behavior of the
DateRange
filter, making it more explicit. - Fixed/changed the
getSubmittedFormData()
function's behavior: it now supports cases when you have the samename
several times in Form data (via<input name="...">
for instance), so that the processed data is properly converted to an array.
Check thesrc/lib/Crud/Form.test.ts
file for more details about how it works. - Create script to create new theme based on Carbon (for future theming, again).
- BC Break: Themes are now separate from the lib, and the default Carbon theme was moved to a
themes/svelte/carbon
subdirectory for now. The goal is to be able to use other kind of themes in the future. - Add support for batch actions in CrudList
- Add
Email
field. - Add a setup to unit-test single components, especially fields, and test a lot of them.
- Fix a date parsing bug in
DateField.svelte
by using the luxon lib. - Fix wrongly configured depth display in
KeyValueObjectField.svelte
. - Fix
NumberField.svelte
's inconsistent handling of numbers & enhance visual. - Replace local packager to
pnpm
.
- Fix an issue where StateProcessor's promise is not properly resolved
- Add support for
disabled
fields.
- Implement the base features of a new
ArrayField
. - Fix an issue with null values in
KeyValueObject.svelte
view template. - Create small internal CLI package to make it easier to create new fields.
- Convert error throw with error log when setting Crud or Dashboard twice in an Operation or Crud object. This was really annoying when using HMR in development, because the server had to be restarted for any update in the Typescript code of the Dashboard object, or any Crud object, or even the internal memory implementations, both when developing SvelteAdmin, but also when it was used as a library, where it was really inconvenient and confusing.
- (internal) Refactor internal providers to use a common memory-based storage.
- BC Break: Rename Crud operation
Field
intoSingleField
to avoid mistyping with theField
class in the eponym directory. - BC Break: Remove some internal types to avoid circular dependencies with generic types (like
Optional
andKeyValueObject
). - The project is now fully built with Typescript instead of using JS files as "intermediate".
- Reorganized index files to have more "automatic" imports. This avoid forgetting to import some types that were newly imported. Not perfect because it needs manual import of certain files, but works nonetheless.
- Remove "sideMenu" store and put it in Carbon's components. It wasn't exported to the end-user anyway, but was still available through other kind of imports. For now, it's useless for the end-user, and needs not be exported, so it was removed.
docs
path was changed forapidocs
- BC Break all internal code structure has been changed.
This will not concern paths likeimport {...} from '@orbitale/svelte-admin';
, as all library imports are still the same. However, you will have to update the loading of all the Typescript types from other files/directories.
The main reason for this change is to make sure the lib is better organized, but also the API docs are more readable just because of the code's structure.
- Fix DataTable types so they don't rely on Carbon types.
- Allow Submenu links/actions to have options.
- Allow Action options to use arbitrary key/value pairs.
- Revamp TopRightMenu to avoid having one single submenu, and to allow multiple submenus.
(Note: this can be considered as BC break, but technically it's just a UI fix because it was previously impossible to have "normal" links, so it was decided to not flag it as BC break)
- BC Break:
Dashboard
attributessideMenu
,topRightMenu
andtopLeftMenu
are now deprecated. They are moved to thestores.*
property. - Add
Dashboard.stores
property, to allow dynamic configuration of the dashboard, especially when updating menus after the dashboard is loaded. - Add
htmlAttributes
option toAction
url/button types.
- Add support for external entities
- BC Break: CrudDefinition's
name
is no longer an argument, and set in the options instead. - Allow accessing
Dashboard
fromCrudDefinition
instances. - Allow accessing
Dashboard
andCrudDefinition
fromCrudOperation
instances. - Remove internal stores and functions to fetch current theme, and use new dashboard accessors instead.
- Add new
KeyValueObjectFied
and its templates.
- Fix
formFormat
option in Date field
- Add Date field
- Add "button kind" option to all Action objects, to customize button style
- Add popup message system based on @zerodevx/svelte-toast
- Normalize "test" crud fields
- Fix Columns and Tabs incorrect options types
- Fix text fields templates names
- Update "books" and "tests" cruds with latest updates
- Fix expandable DataTable that was only here for testing
- Add sortable fields for the
List
operation 🎉
- BC Break: Definition options types have been renamed and merged in the
$lib/Fields/index.ts
file. - Add
DateFilter
as a range of dates. - Add
BooleanFilter
with radio inputs. - Remove empty values from submitted filters.
- Make Dashboard no longer generic.
- Rename Field & Filter interfaces and merge definitions in one file. This was inconsistent.
- (Carbon theme) Create a FilterContainer component to uniformize filters rendering.
- Fix columns and tabs rendering in List (not super UX-friendly at first, but use cases could definitely be found for that)
- Standardize more fields to properly use dashboard's configured theme
- Update theme injection in view & form fields
- BC Break: importing a theme is now done via the
themes
variable which is exported by default in the main package. - Fixed some building issues caused by the test setup
- Add a new "test" crud to showcase more fields
- Create or improve templates for Url, Number, Checkbox and Toggle fields
- Added
openInNewTab
option toUrlField
, for "view" type usage (aka "list" and "view" operations)
- BC Break:
StateProcessor.process()
now returns an emptyPromise
, even though it contains nothing. It is to be in sync with theStateProvider
class, and to make sure one canawait
the.process()
method to execute actions after it finished. - Instead of using SvelteKit's
goto()
to redirect in New and Edit actions, changed its usage towindow.location.href = '...';
. It's only client-compatible, but these calls were only made in client context, so it should be fine. The main reason for this was to avoid having to depend on SvelteKit when building the package. - Add base setup for Filters. 🎉 Now need more filter types!
- Update dependencies internally, especially update to Vitest 1.0
- Make sure CrudList requires a List operation object.
- Allow forcing List state provider to wait a minimum amount of time to avoid stressful blinking. Useful for UX and accessibility.
- Fix wrong variable assignation
- Fix UX issue with pagination where whole DataTable disappeared
- Fix wrong pagination default config
- Fix remaining extension imports in CrudList
- Fix missing export of
PaginatedResults
class.
- BC Break (though was unused): Disable Crud events for now, they have no real usage, and they imply mandatory callback. The configuration, apart Callback providers and processors, is supposed to be as much static as possible, to be able to configure it from outside just with JSON.
- Implemented pagination. To use it, configure the
itemsPerPage
in your action's Operation (likeList
for instance), and make sure yourStateProvider
for the same Operation returns an instance of thePaginatedResults
object. - Add
adminConfig.rootUrl
and configure redirection when submittingnew
oredit
forms. - Rename Dashboard web-component name to avoid duplication with other themes (still not sure whether the package will be built as web-components, but maybe, who knows)
- Remove useless custom theme call in test app, this helps in making sure the Dashboard-configured theme is the main one.
Changes:
- BC Break: Reorganize theme config, for consistency.
Before, some theme components were mixed in crud, view and form fields.
Now there are components specific tocrudActions
,viewFields
andformFields
that can be dynamic.
If end users want to, they can add new keys to these specific theme components, so their custom-created theme views can be used by their customDefinition
objects. - BC Break (internal): Revamp tabs and optimize their behavior for a simpler and more flexible approach (and even nestable, though I don't see use-cases for that).
- Create
identifierFieldName
CrudDefinition option, to allow using another field thanid
as an entity identifier.
Having anid
property is mandatory for Carbon'sDataTable
component, but might become useful for standardization of identifier usage later in filters. - Add
Columns
field type (new name, replaces "sections" concept). Nestable and sizeable. Thesize
property in columns will have a behavior only related to the used theme. For example, Carbon has a 16-units grid, and Bootstrap's one is 12.
The user value will not be converted into any other grid size.
Changes:
- Fix null coalescing property call in Icon.svelte
Changes:
- Move
Icon
component outside themes, since it's generic, and export it to the public
Changes:
- Make sure icons can still be used when icon type is empty.
Changes:
- Fix CrudOperation that's no longer generic
- Attempt at fixing paths for themes module loading
Changes:
- Standardize more theme usage, to give form/view fields a name instead of the direct component
- Update all crud actions with new theme system, using a store
Internal work:
- Move internal test app persistence to a specific file
- Generate fake books with Faker for test app
- Start working on a Section field (upcoming)
Changes:
- BC Break: Create a separate theme config system. Themes must now be added to the
DashboardDefinition
config via theadminConfig
option.
The current theme's path is@orbitale/svelte-admin/themes/carbon
. - Remove some warnings in test app
- Slight readme wording updates
- First addition of CI script
- Add browser-save support for whole test app. This means books are stored in your
localStorage
!
Changes:
- Add "autoCloseSideMenu" to AdminConfig to allow customizing left-side menu
Changes:
- Fixed wrong empty label display in menus
Changes:
- Added
AdminConfig.defaultLocale
property, to avoid having to set the locale manually outside the dashboard.
Changes:
- Added missing exports in
package.json
Changes:
- Turns out previous version was incorrectly built when pushed to npm registry, so rebuilt it.
Changes:
- Remove all extensions from file imports
Changes:
- BC Break: lib was previously in the
admin/
subdirectory. This part has been removed, library is now accessible from its root path. - BC Break: all Svelte templates have been moved to the
themes/carbon/
directory: this will further help with themes integration. - BC Break: Svelte templates are no longer available from library's root, only via the
themes/
directory. - Add a changelog
- Try to uniformize file imports
- Remove code from older repository
- Fix some linting errors
Changes:
- Add
initLocale
function helper to lib exports, this allows users to call the function themselves before the library does
Changes:
- Fix demo crud state provider and processor
- Transform peer deps into normal deps, and update installation readme
- Update documentation to add more details about state providers and processors
Changes:
- Fix file imports to use only js, because svelte-package doesn't change it
New version, complete revamp of previous version.
Prototype, stored in a previous v0
branch.