Releases: laravel-enso/enso
v2.14.0
Changes:
This is one of the biggest releases until now, with changes such as the complete rewrite of the Data Import package, the rewrite and improvement of the DataTable Export functionality, enhancements and new functionality for the VueForm and much more.
The improvements brought to the DataTable Export and the DataImport now allow the export of practically unlimited records from a datatable, as well as the import of xlsx files limited only by your ability to create them and the limitations of the file format.
That's not all though, as the new mechanisms also become much much more efficient due to the parallelization of the operations. This is made possible by leveraging Laravel's queueing facilities and impressive load balancing.
Together with the refreshed web socketed operations' progress reporting we now have hugely powerful, high throughput solutions for I/O operations.
This is yet another step towards our vision for Enso and rest assured, there is more to come.
Core
- adds IO structure for monitoring background export/import operations progress in real-time (needs websockets). It will soon be refactored and extracted to its own separate package
- fixes the global search on medium screen sized devices
- refactors the request management helpers
- adds params support for translations, thanks to @jlsjonas
- fixes translation for the
auth
layout - adds a
shortNumber
filter ({{ 1000 | shortNumber }} // 1k
) - globally adds the
font-awesome-layers
component under the name offal
- both the
dataimport
andcompanies
packages are now required bycore
and are no longer optional
DataExport
- adds
type
,entries
,status
andcreated_by
columns to the table - uses the
CreatedBy
trait - integrates with the new background operations management system (IO) for real time progress in the FE
DataImport
- completely redesigned the package and import philosophy. Adds support for a virtually infinite number of rows that can imported in the same import with very low memory consumption, by splitting the import file in chunks and processing them in queued jobs
- adds queue management
- generates a downloadable xlsx rejected rows summary if there are import validation errors. The summary has the same structure as the import file with an extra column (on each sheet) that will describe all the validation errors for each row. This will streamline the import operations when dealing with large files
- improves local (dev's) import and validation classes
- adds
before
andafter
hooks which are available in the importing process - integrates with the new background operations management system (IO) for real time progress in the FE
- comes with a new
import-uploader
component that can be placed anywhere in the applications for local imports
Helpers
- enhances the
Obj
class. Now it can receive any object or associative array, including Laravel collections, and even Models with loaded relations. - changed the
Obj@get($key)
method to returnnull
for an unset$key
, instead of throwing an exception - enhances the Enum by reordering the data source priority. Take a look at
LaravelEnso\Examples\app\Enums\SeniorityEnum
for an example
FormBuilder
- adds the
tabs
property to the form template root. If provided, it will require atab
property for each section, which will represent the tab's label. The sections will be grouped in tabs using their given labels - the delete modal has the commit button focused by default
- exposes a series of getters/helpers from
vue-from
andenso-form
that can be accessed via$refs
:- computed:
data
- represents the whole objectcustomFields
- represents custom fields arrayerrors
- represents the errors object
- methods
formData()
- returns the params that are sent to the server on POST / PATCHfield(field)
- returns the field object for a given labelparam(param)
- returns the specified param from the optionalparams
objectrouteParam(param)
- returns the route param from therouteParams
objectfetch()
- form's fetch method for getting the template
- computed:
VueComponents
- removes the deprecated
MorpableContainer
- adds a new
enso-tabs
component. The oldtabs
component is visually limited to the Bulma available options.enso-tabs
has less props and displays the custom tabs used in the Files menu, theaccesories
component and invue-form
(new!) - adds compact mode to
accesories
VueDatatable
- adds practically unlimited excel export functionality by greatly improving the table fetcher. The whole process is done in the background and uses a small amount of memory. You should consider using appropriate values for the configuration options
enso.datatable.exports.timeout
and for thequeues.connections.yourConnection.retry_after
- improves the builder logic and reusability
- optimizes the Builder for date / enum / translatable computing
- renamed the
translation
template param totranslatable
- the (delete) modal accepts
shift-enter
as a keyboard shortcut for the commit action - changes the way actions are processed. Now, in the
CustomAction@process
class / method only one$row
at a time will be available - adds options for customizing the export & notification queues
- integrates with the new background operations management system (IO) for real time progress in the FE
Upgrade instructions - estimated time per project ~ 10-15min
- update in
composer.json
: "laravel-enso/core": "3.4.*" - from
composer.json
, remove the packages:- "laravel-enso/companies"
- "laravel-enso/dataimport"
- run
composer update
- run
php artisan migrate
- run
yarn upgrade
- run
yarn run dev
- run
php artisan enso:upgrade
- add the new route in your
routes/channels.php
fileBroadcast::channel('operations.{userId}', function ($user, $operationId) { return (int) $user->id === (int) $operationId; });
- in your
config/queue.php
file make sure that you setretry_after
to a higher value for the imports / exports connection (we are using 1800) - update the configuration files with the newly introduced options:
config/enso/imports.php
withvendor/laravel-enso/dataimport/src/config/imports.php
config/enso/datatable.php
withvendor/laravel-enso/vuedatatable/src/config/datatable.php
- configure your
config/horizon.php
to make sure that you have the appropriate queues for both local and production envs. You can use the config from this repo as an example. - refactor your import classes and validators to match the new structure
- if necessary, in your table templates, rename the attribute
translation
totranslatable
- sync
phpunit.xml
with the one from the main repo