This *absolute commit monster* does the following things:
- Introduce gulp to build javascript and css files.
This includes moving node_modules out of the public/ folder.
Use `gulp --tasks` to get a list of all tasks; however some
of them are automatically generated.
Use `gulp live` to watch for changes and automatically recompile
what's needed.
- Upgrade to yarn2
- Upgrade FullCalendar to 4.4.2
I know that 5.x is the current version, but two major version upgrades
are too much right now. Also v5 would break any custom css as they
renamed a bunch of classes.
- Move Styles to sass
(Most) global styles are now included in one sass file. This also
means that we now compile our own bootstrap.
- Javascript is now in strict mode
Because everything is a module now, `use strict` is now in effect
for all javascript files. There are probably still some parts left
where implicit variable declarations were used.
- grocy*.js were split up in modules.
`window.Grocy` is now an instance of GrocyClass. API-wise nothing
has changed (albeit some functions were added regarding Undo actions)
At the Moment, this leaks a whole bunch of functions into window
(that was easier than tracking those down).
- FindObjectIn... style functions were removed.
Array.prototype.find and Array.prototype.filter suffice.
- Use babel to preprocess javascript.
- Use rollup to bundle javascript.
rollup bundles and tree-shakes es6 javascript bundles.
It also allows to "import" css files and generate css
files specific to this javascript file. This is used
in viewjs scripts, for example when importing FullCalendar,
to generate an associated viewcss file.
- Use postcss to post-process css files.
postcss uses autoprefixer to handle browser compatiblity.
Internally this uses the package `browserslist`; and is currently
configured to the default setting.
- Minify assets when building in production
`gulp publish` builds all assets in production mode, that is,
the assets get minified. This includes javascript as well as
css files.
- css bundling
concatCss is used to pull @imports of non-sass-files into one
grocy.css
- animate.css is now in the main bundle
animate.css was used in so many places that it is now located
in the main style bundle.
* Grocycode: Productpicker, StockService
* Grocycode: Datamatrix generation
* Grocycode: Display in UI, make Images downloadable
* Grocycode: Do not show on product card
* Grocycode: Stockentry Label view
* Grocycode: Webhooks & Labelprinter Feature
* Grocycode: Manual Label printing
* Grocycode: Print Label from product form
* Quagga2: use zxing for DataMatrix recognition
* Grocycode: Default settings for label printing
* Prepare merge of master
* Grocycode: docs
* Docs: label printing webhook
* Review
- "grocy" is currently written lower-case everywhere, so let's do this also for "grocycode"
- Unified phrases / capitalization
- Minor UI adjustments (mainly context menu item ordering / ordering/spacing on product edit page)
- Documented API changes for Swagger UI (grocy.openapi.json)
- Reverted German localizations (those are managed via Transifex; would cause conflicts when manually edited - will import them later there)
- Reverted a somehow messed up localization string (productform/help text for `cumulate_min_stock_amount_of_sub_products`)
- Suppress deprecation warnings when generating Datamatrix PNG (otherwise the PNG is invalid, https://github.com/jucksearm/php-barcode/issues/3)
- Default `FEATURE_FLAG_LABELPRINTER` to disabled
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
Fixed some localization strings
Reviewed/optimized product deletion handling
Add option to hide products from the stock overview page (closes#906)
Prefill default_due_days also on the inventory page (closes#591)
Added DataTables accent chinese-string plugin (closes#872)
Show costs and calories per recipe ingredient (closes#1072)
Fixed user permission saving (fixes#1099)
User permissions should not have an effect for demo mode (closes#972)
Handle QU conversion when consuming a substituation (child) product (fixes#1118)
Consume/open any child product when the parent product is not in stock (closes#899)
Added a retry camera barcode scanning button to product picker workflow (closes#736)
Fixed number input min/max amount handling
Only (auto) save valid user inputs
More filters on the stock journal pages
Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes#1131)
Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes#1120)
Render shopping list userfields (closes#1052)
Fixed Focus when adding included recipes (closes#1019)
Order all base objects with NOCASE (closes#1086)
* Simplified stock overview on mobile.
* Stock table horizontally scrollable
* Use the new mobile views for all pages (except the shopping list page, use the existing special handling there for now)
And add a clear filter button to all pages
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
* Fixes#1005. Recipes: filter by stock-status in gallery
* Fixes#1017. Productform: Remove "Store"-Header from barcode-table if FEATURE_FLAG_STOCK_PRICE_TRACKING is not set.
* Fixed typo
Co-authored-by: Bernd Bestel <bernd@berrnd.de>