Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/gulpfile.js

45 lines
1.8 KiB
JavaScript
Raw Normal View History

2019-10-23 10:31:07 +02:00
2019-01-17 17:02:12 +01:00
'use strict';
/*
2019-10-23 10:31:07 +02:00
* gulpfile.js
* ===========
* This is now using Gulp 4, each child task is now a child function in its own corresponding file.
*
* To add a new task, simply add a new task file to gulp/tasks folder, add a require statement below to include the one or more methods
2019-10-23 10:31:07 +02:00
* and then add the exports command to add the new item into the task menu.
*/
2019-01-17 17:02:12 +01:00
const { series, parallel } = require('gulp');
2019-10-23 10:31:07 +02:00
const config = require('./gulp/config');
const { setDevelopmentMode, setTestMode } = require('./gulp/modes');
2019-10-23 10:31:07 +02:00
const { dependencies } = require('./gulp/tasks/dependencies');
const { js } = require('./gulp/tasks/js');
const { less } = require('./gulp/tasks/less');
Block Grid Editor (#12826) * Refactor block list/grid property value editors for code reuse * Prettify block grid editor data conveter a bit * correct appearance and colors * validation should only kick in if value is higher than 0 and not null * Add copyright notice to code, a little formatting and file scoped namespaces where applicable * custom views * custom views for blocks * Refactor block list min/max validation and reuse for block grid * Prettify extraction of nested content-and-settings references for block grid * Fix bad naming * fix casing * Refactor block list notification handler and reuse for block grid * context sensitive ui for Blocks * Refactor notification handlers for block list and block grid incl. unit tests * Formatting and review * Bump number of expected data editors in unit test * initial progress on column options editor * column span options UI * column span UI adjustments * context aware ui adjustments * minor border improvement * get and pick layout stylesheet * remove random x * make highlight border standout more * dedicated context bar * UI improvements * remove annoying indication * copy paste * UI improvements * remove div.umb-block-grid__block--view from partial * show block ui, only hide when hovering area. * area actions * UI Adjustments * Block grid editor localization (#12915) Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> * fix case of empty value * use right index * place border on top of column indication * heroblock * userFlowWhenBlockWasCreated * shorter messages * overal improvements * force left/right drag feature * stylesheet picker localization * localizations * space * unnesecary removal of space * notes on masonry * validation form parent skipping + better snapping when drag n drop * remove icons * make rows go as minimal as posible * scale and drop indications * use item width to determin forceLeft or forceRight * clean up * Make clipboard filtering work with block arrays * readonly mode * important note * ask to revert failed paste * dont allow for backdrop click * changed wording * more area actions outside grid container * droppable indication * implemented minimal responsive solution. * add additional data fields about grid clumns * improved fallback columns width + rows height * make root element class `umb-block-grid` * align layout with position relatives, to align visual experience. * use clientX not screenX * rename area classes so they dont include the word 'block' * more renaming * commit flexbox layout css to repo * fixes * fix typo * only show a broader inline create button if the block is full width. * simplify css * remove headline block hover effect * use some font, to make it look better. * Drag and drop correctiions/limits * clean up * remove log * make assumptions about proposed distance of target * slightly white border on validation message for areas to make it standout * drag n drop seems good at this stage * force left and right buttons and indication * correct if * revert scale handler ui * If columnSpans is empty we fall back to full width * Access other PreValues from a PreValue Editor * maybe temprorary turn of distance drag n' drop condition * setDirty * area alias was missing in razor and needed help text * forceleft forceright translations * forceLeft / forceRight razor * correct translation + remove data- on ng-click * force placement when moving over edge * remove unnesecary wrapper element * show-validation * red text, might be hard to see, lets see. * for safety have the border-raduis correct * better wordings * Use mouse position to judge if the drop is good before or after. * fit placeholder when item is begin dragged away * initial step for finding nearest relation when drag-hovering nothing * Much better drag n drop experience, must be tested further to prove its not breaking some cases. * title for scale handler * new approach + massive drag n drop clean up * avoid complex CSS transfering of props, instead add the prop in HTML * adjust placeAfter when in vertical direction mode * do not scale bigger than the available space to the right * clean css * fix numbers * Fix the case of flickering when hitting an empty area. * correct placement of code * package lock * Adjustment for PreValue Area allowances * comment on fit in line feature * fixing scale and drag n drop potential issues * clean up * only disallow above max * outcomment unused code * clean up * drag n drop above or below container * fix for Firefox * Do not edit block if there is no properties in content * angularJS form for Entries, to correct validation * parse layout columns, used to know if block is full width of the layout * use inherited layout columns * add this to the example html * flexbox fix * highlight if empty area * comments for undefined column spans * bring back approvedContainer lock period. * fix * Do not edit something without properties * Remove Force, as thats confusing to read. * correct localization key * minor corrections * Fit within context columns * Conceptual, inline editor for Grid. * fix casing * consider related position in directional conditions * set default max row span to 1 * update columnSpanOption check for sync * move Editor to group of Rich Text * more shift autoScroll * assume layout columns comes as string * fix variable name * force left/right indication * Inject Areas directly in slot, to enable custom view manipulations of such. * fix sortableJS mis dropping items * Overwrite create label * ability to overwrite root layout create label * Simplify PreValue editor by hidding options that is not in effect. * Setup new areas as half width if possible * Grouping blockTypes * remove flexbox stylesheet * Chose groups for area allowance * ensure a good default width * improve block active state * Better contextual sizing * Comment clean up * Remove The StarterKit from branch * Unique group identification for the property editor sortable * only show avaiable block groups in picker. * Indication of taget area * Fallback to root grid columns * use root layout grid columns, so dont update when layoutColumns change * Ability to remove block group * clean up references when removing Group or single Block * fix drop in same group * Block picker use contexual create label as headline * adjust area highlight * Prevalue editor * structuralOptions * Move pre values into tabs for better overview and scope * Let area grid columns fallback to root grid columns, and let both default to "12" instead of "initial" * remove input close tag * Allow in areas * Move build-in custom views * only show property-into-button on hover when in group-panel__header * some height for the show buttons * filter available block type based on allowInAreas * remove OnlySpecifiedAllowance * unsupported block if trouble happend * move allow at root to allowance group * easily drop at top or below area if outside. If more than 100px outside then see if there is a parent layout to move into. * block group validation * shortcut for opening Areas if areas are defined * scale label for Areas editor * Added Legacy name on the old grid layout * Remove files that come with the starter kit * Sorting: takeover container detection * Refactor models + remove unused properties * Endpoint for creating block grid demo element types * CTA for getting Block Grid demo blocks * Refactor block grid sample element creation * Fix Constants-PropertyEditors spacing * Fixed unit tests * Get sample configuration * Labels for sample blocks * Improve drag, to swap across unallowed area/root * improved empty threshold * hide the after inline-create-button if block is located at right side of area/layout * clean up * translations * danish translations * move outside edge for forceRight * Update src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> * Review comments * Remove leftover TODO * big cleanup * Hide Sample CTA when installed * clean up * correct styling for wrapper + moving Block UI to z-index 3 for visiblity on top of other block * slightly adjusting inline-create-buttons to avoid collisions * correct localization for force left/right buttons * gitignorer update * Clean up nesting of classes in BlockGridConfiguration * change gitignorer to include App_Plugin folder * move default layout stylesheet * remove specific App_plugin folder * package-lock * update sample custom views paths * add custom views for sample * Adding sample custom views * Move sample partial Views and custom views * Update views to not use ModelsBuilder * Move sample custom views to wwwroot * Updated Sample CTA text * Use localize directory * Ensure groupKey for items without such to work. Co-authored-by: kjac <kja@umbraco.dk> Co-authored-by: Warren Buckley <warren@umbraco.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-10-05 13:50:26 +02:00
const { css } = require('./gulp/tasks/css');
const { testE2e, testUnit, runUnitTestServer } = require('./gulp/tasks/test');
2019-10-23 10:31:07 +02:00
const { views } = require('./gulp/tasks/views');
const { watchTask } = require('./gulp/tasks/watchTask');
// set default current compile mode:
config.compile.current = config.compile.build;
2019-10-23 10:31:07 +02:00
Block Grid Editor (#12826) * Refactor block list/grid property value editors for code reuse * Prettify block grid editor data conveter a bit * correct appearance and colors * validation should only kick in if value is higher than 0 and not null * Add copyright notice to code, a little formatting and file scoped namespaces where applicable * custom views * custom views for blocks * Refactor block list min/max validation and reuse for block grid * Prettify extraction of nested content-and-settings references for block grid * Fix bad naming * fix casing * Refactor block list notification handler and reuse for block grid * context sensitive ui for Blocks * Refactor notification handlers for block list and block grid incl. unit tests * Formatting and review * Bump number of expected data editors in unit test * initial progress on column options editor * column span options UI * column span UI adjustments * context aware ui adjustments * minor border improvement * get and pick layout stylesheet * remove random x * make highlight border standout more * dedicated context bar * UI improvements * remove annoying indication * copy paste * UI improvements * remove div.umb-block-grid__block--view from partial * show block ui, only hide when hovering area. * area actions * UI Adjustments * Block grid editor localization (#12915) Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> * fix case of empty value * use right index * place border on top of column indication * heroblock * userFlowWhenBlockWasCreated * shorter messages * overal improvements * force left/right drag feature * stylesheet picker localization * localizations * space * unnesecary removal of space * notes on masonry * validation form parent skipping + better snapping when drag n drop * remove icons * make rows go as minimal as posible * scale and drop indications * use item width to determin forceLeft or forceRight * clean up * Make clipboard filtering work with block arrays * readonly mode * important note * ask to revert failed paste * dont allow for backdrop click * changed wording * more area actions outside grid container * droppable indication * implemented minimal responsive solution. * add additional data fields about grid clumns * improved fallback columns width + rows height * make root element class `umb-block-grid` * align layout with position relatives, to align visual experience. * use clientX not screenX * rename area classes so they dont include the word 'block' * more renaming * commit flexbox layout css to repo * fixes * fix typo * only show a broader inline create button if the block is full width. * simplify css * remove headline block hover effect * use some font, to make it look better. * Drag and drop correctiions/limits * clean up * remove log * make assumptions about proposed distance of target * slightly white border on validation message for areas to make it standout * drag n drop seems good at this stage * force left and right buttons and indication * correct if * revert scale handler ui * If columnSpans is empty we fall back to full width * Access other PreValues from a PreValue Editor * maybe temprorary turn of distance drag n' drop condition * setDirty * area alias was missing in razor and needed help text * forceleft forceright translations * forceLeft / forceRight razor * correct translation + remove data- on ng-click * force placement when moving over edge * remove unnesecary wrapper element * show-validation * red text, might be hard to see, lets see. * for safety have the border-raduis correct * better wordings * Use mouse position to judge if the drop is good before or after. * fit placeholder when item is begin dragged away * initial step for finding nearest relation when drag-hovering nothing * Much better drag n drop experience, must be tested further to prove its not breaking some cases. * title for scale handler * new approach + massive drag n drop clean up * avoid complex CSS transfering of props, instead add the prop in HTML * adjust placeAfter when in vertical direction mode * do not scale bigger than the available space to the right * clean css * fix numbers * Fix the case of flickering when hitting an empty area. * correct placement of code * package lock * Adjustment for PreValue Area allowances * comment on fit in line feature * fixing scale and drag n drop potential issues * clean up * only disallow above max * outcomment unused code * clean up * drag n drop above or below container * fix for Firefox * Do not edit block if there is no properties in content * angularJS form for Entries, to correct validation * parse layout columns, used to know if block is full width of the layout * use inherited layout columns * add this to the example html * flexbox fix * highlight if empty area * comments for undefined column spans * bring back approvedContainer lock period. * fix * Do not edit something without properties * Remove Force, as thats confusing to read. * correct localization key * minor corrections * Fit within context columns * Conceptual, inline editor for Grid. * fix casing * consider related position in directional conditions * set default max row span to 1 * update columnSpanOption check for sync * move Editor to group of Rich Text * more shift autoScroll * assume layout columns comes as string * fix variable name * force left/right indication * Inject Areas directly in slot, to enable custom view manipulations of such. * fix sortableJS mis dropping items * Overwrite create label * ability to overwrite root layout create label * Simplify PreValue editor by hidding options that is not in effect. * Setup new areas as half width if possible * Grouping blockTypes * remove flexbox stylesheet * Chose groups for area allowance * ensure a good default width * improve block active state * Better contextual sizing * Comment clean up * Remove The StarterKit from branch * Unique group identification for the property editor sortable * only show avaiable block groups in picker. * Indication of taget area * Fallback to root grid columns * use root layout grid columns, so dont update when layoutColumns change * Ability to remove block group * clean up references when removing Group or single Block * fix drop in same group * Block picker use contexual create label as headline * adjust area highlight * Prevalue editor * structuralOptions * Move pre values into tabs for better overview and scope * Let area grid columns fallback to root grid columns, and let both default to "12" instead of "initial" * remove input close tag * Allow in areas * Move build-in custom views * only show property-into-button on hover when in group-panel__header * some height for the show buttons * filter available block type based on allowInAreas * remove OnlySpecifiedAllowance * unsupported block if trouble happend * move allow at root to allowance group * easily drop at top or below area if outside. If more than 100px outside then see if there is a parent layout to move into. * block group validation * shortcut for opening Areas if areas are defined * scale label for Areas editor * Added Legacy name on the old grid layout * Remove files that come with the starter kit * Sorting: takeover container detection * Refactor models + remove unused properties * Endpoint for creating block grid demo element types * CTA for getting Block Grid demo blocks * Refactor block grid sample element creation * Fix Constants-PropertyEditors spacing * Fixed unit tests * Get sample configuration * Labels for sample blocks * Improve drag, to swap across unallowed area/root * improved empty threshold * hide the after inline-create-button if block is located at right side of area/layout * clean up * translations * danish translations * move outside edge for forceRight * Update src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> * Review comments * Remove leftover TODO * big cleanup * Hide Sample CTA when installed * clean up * correct styling for wrapper + moving Block UI to z-index 3 for visiblity on top of other block * slightly adjusting inline-create-buttons to avoid collisions * correct localization for force left/right buttons * gitignorer update * Clean up nesting of classes in BlockGridConfiguration * change gitignorer to include App_Plugin folder * move default layout stylesheet * remove specific App_plugin folder * package-lock * update sample custom views paths * add custom views for sample * Adding sample custom views * Move sample partial Views and custom views * Update views to not use ModelsBuilder * Move sample custom views to wwwroot * Updated Sample CTA text * Use localize directory * Ensure groupKey for items without such to work. Co-authored-by: kjac <kja@umbraco.dk> Co-authored-by: Warren Buckley <warren@umbraco.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-10-05 13:50:26 +02:00
const coreBuild = parallel(dependencies, js, less, css, views);
2019-10-23 10:31:07 +02:00
// ***********************************************************
// These Exports are the new way of defining Tasks in Gulp 4.x
// ***********************************************************
exports.build = series(coreBuild, testUnit);
exports.buildDev = series(setDevelopmentMode, coreBuild);
exports.coreBuild = coreBuild;
exports.dev = series(setDevelopmentMode, coreBuild, runUnitTestServer, watchTask);
V11: Update the rich text editor TinyMCE to v6 (#13013) * update 'tinymce' from v4 to v6 * add/remove plugin & file changes * remove unsupported plugins * update changes to tinymce api * bump tinymce to 6.2.0 * reinstate fastdev task * update rte prevalues * fix styling of tinymce inline mode * document new files * update builtin allowed elements, plugins and styles * update upload_image_handler to new format * set correct startup plugins and config * remove old config for "Paste from Word" which is no longer supported * update naming in default toolbar * replace fire() with dispatch() * support resizing of other elements besides objects, e.g. tables * replace fire() with dispatch() * change classes for fullscreen styling * handle special parsing of AngularJS json response * remove deprecated tinymce options * use EditorOptions API to get settings * send in correct toolbar config * update icons to use tinymce's new icon pack * remove unused functions * configure custom styles * update docs * add initial toolbars to grid rte * change htmlId selector to support html id's with numbers * remove pintoolbar as it is not compatible with tiny 6 * register custom option maxImageSize through the OptionsManager * remove custom option * Revert "register custom option maxImageSize through the OptionsManager" This reverts commit 342354d6cdacea67349d9d6d97b944999f8cd136. * register custom option maxImageSize and fetch through EditorOptions * add rounding to forced image size * remove fullscreen plugin as it is not available in prod build anyway and it does not work * update API for uploadImages() function * update string extensions IsFullPath to support more filepaths with new built-in Path.IsPathFullyQualified * resolve TODO to switch to Path.IsPathFullyQualified supported from .NET Standard 2.1 * ensure that files are copied from the TEMP folder in the web root * add dragstart event to drag-events series * optimise isMediaPickerEnabled function with newer array function 'includes' * add TEMP folder to gitignore (fx fileuploads) * update selector for "Insert Macro" button in rte test * remove old documentation * Use content root instead of web root for uploaded images * test IsFullPath without tricky UNC paths that are not useful Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-09-20 15:20:20 +02:00
exports.fastdev = series(setDevelopmentMode, coreBuild, watchTask);
exports.watch = series(setDevelopmentMode, watchTask);
//
exports.runTests = series(setTestMode, series(js, testUnit));
exports.runUnit = series(setTestMode, series(js, runUnitTestServer), watchTask);
exports.testE2e = series(setTestMode, parallel(testE2e));